From 643b0388de88ee1cfbee22102bd2f6957cef560e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 3 Sep 2022 03:03:29 +0000 Subject: [PATCH 1/2] feat: add Deidentify action PiperOrigin-RevId: 471923438 Source-Link: https://github.com/googleapis/googleapis/commit/62995d04b95d4da6b691ca6090b394ec67becc8b Source-Link: https://github.com/googleapis/googleapis-gen/commit/96ba1731c712a693995de75378948781af283739 Copy-Tag: eyJwIjoiamF2YS1kbHAvLk93bEJvdC55YW1sIiwiaCI6Ijk2YmExNzMxYzcxMmE2OTM5OTVkZTc1Mzc4OTQ4NzgxYWYyODM3MzkifQ== --- .../google/cloud/dlp/v2/DlpServiceClient.java | 5835 +++++ .../cloud/dlp/v2/DlpServiceSettings.java | 648 + .../google/cloud/dlp/v2/gapic_metadata.json | 120 + .../com/google/cloud/dlp/v2/package-info.java | 51 + .../cloud/dlp/v2/stub/DlpServiceStub.java | 264 + .../dlp/v2/stub/DlpServiceStubSettings.java | 1549 ++ .../stub/GrpcDlpServiceCallableFactory.java | 113 + .../cloud/dlp/v2/stub/GrpcDlpServiceStub.java | 1323 + .../HttpJsonDlpServiceCallableFactory.java | 105 + .../dlp/v2/stub/HttpJsonDlpServiceStub.java | 2157 ++ .../dlp/v2/DlpServiceClientHttpJsonTest.java | 4449 ++++ .../cloud/dlp/v2/DlpServiceClientTest.java | 4075 +++ .../google/cloud/dlp/v2/MockDlpService.java | 59 + .../cloud/dlp/v2/MockDlpServiceImpl.java | 828 + .../google/privacy/dlp/v2/DlpServiceGrpc.java | 3496 +++ .../com/google/privacy/dlp/v2/Action.java | 7431 ++++++ .../privacy/dlp/v2/ActionOrBuilder.java | 203 + .../dlp/v2/ActivateJobTriggerRequest.java | 602 + .../ActivateJobTriggerRequestOrBuilder.java | 31 + .../dlp/v2/AnalyzeDataSourceRiskDetails.java | 21216 ++++++++++++++++ ...AnalyzeDataSourceRiskDetailsOrBuilder.java | 254 + .../google/privacy/dlp/v2/BigQueryField.java | 901 + .../dlp/v2/BigQueryFieldOrBuilder.java | 63 + .../google/privacy/dlp/v2/BigQueryKey.java | 762 + .../privacy/dlp/v2/BigQueryKeyOrBuilder.java | 50 + .../privacy/dlp/v2/BigQueryOptions.java | 2531 ++ .../dlp/v2/BigQueryOptionsOrBuilder.java | 231 + .../google/privacy/dlp/v2/BigQueryTable.java | 942 + .../dlp/v2/BigQueryTableOrBuilder.java | 71 + .../google/privacy/dlp/v2/BoundingBox.java | 749 + .../privacy/dlp/v2/BoundingBoxOrBuilder.java | 49 + .../privacy/dlp/v2/BucketingConfig.java | 2120 ++ .../dlp/v2/BucketingConfigOrBuilder.java | 53 + .../privacy/dlp/v2/ByteContentItem.java | 971 + .../dlp/v2/ByteContentItemOrBuilder.java | 38 + .../privacy/dlp/v2/CancelDlpJobRequest.java | 595 + .../dlp/v2/CancelDlpJobRequestOrBuilder.java | 29 + .../privacy/dlp/v2/CharacterMaskConfig.java | 1367 + .../dlp/v2/CharacterMaskConfigOrBuilder.java | 131 + .../google/privacy/dlp/v2/CharsToIgnore.java | 1090 + .../dlp/v2/CharsToIgnoreOrBuilder.java | 71 + .../privacy/dlp/v2/CloudStorageFileSet.java | 602 + .../dlp/v2/CloudStorageFileSetOrBuilder.java | 31 + .../privacy/dlp/v2/CloudStorageOptions.java | 2576 ++ .../dlp/v2/CloudStorageOptionsOrBuilder.java | 165 + .../privacy/dlp/v2/CloudStoragePath.java | 602 + .../dlp/v2/CloudStoragePathOrBuilder.java | 31 + .../dlp/v2/CloudStorageRegexFileSet.java | 1292 + .../v2/CloudStorageRegexFileSetOrBuilder.java | 159 + .../java/com/google/privacy/dlp/v2/Color.java | 675 + .../google/privacy/dlp/v2/ColorOrBuilder.java | 39 + .../com/google/privacy/dlp/v2/Container.java | 1804 ++ .../privacy/dlp/v2/ContainerOrBuilder.java | 195 + .../google/privacy/dlp/v2/ContentItem.java | 1264 + .../privacy/dlp/v2/ContentItemOrBuilder.java | 100 + .../privacy/dlp/v2/ContentLocation.java | 2212 ++ .../dlp/v2/ContentLocationOrBuilder.java | 211 + .../google/privacy/dlp/v2/ContentOption.java | 150 + .../v2/CreateDeidentifyTemplateRequest.java | 1289 + ...ateDeidentifyTemplateRequestOrBuilder.java | 132 + .../privacy/dlp/v2/CreateDlpJobRequest.java | 1636 ++ .../dlp/v2/CreateDlpJobRequestOrBuilder.java | 156 + .../dlp/v2/CreateInspectTemplateRequest.java | 1289 + ...CreateInspectTemplateRequestOrBuilder.java | 132 + .../dlp/v2/CreateJobTriggerRequest.java | 1261 + .../v2/CreateJobTriggerRequestOrBuilder.java | 124 + .../dlp/v2/CreateStoredInfoTypeRequest.java | 1289 + .../CreateStoredInfoTypeRequestOrBuilder.java | 132 + .../dlp/v2/CryptoDeterministicConfig.java | 1621 ++ .../CryptoDeterministicConfigOrBuilder.java | 210 + .../privacy/dlp/v2/CryptoHashConfig.java | 677 + .../dlp/v2/CryptoHashConfigOrBuilder.java | 36 + .../com/google/privacy/dlp/v2/CryptoKey.java | 1297 + .../privacy/dlp/v2/CryptoKeyOrBuilder.java | 92 + .../dlp/v2/CryptoReplaceFfxFpeConfig.java | 2400 ++ .../CryptoReplaceFfxFpeConfigOrBuilder.java | 297 + .../google/privacy/dlp/v2/CustomInfoType.java | 9675 +++++++ .../dlp/v2/CustomInfoTypeOrBuilder.java | 265 + .../privacy/dlp/v2/DataProfileAction.java | 3301 +++ .../dlp/v2/DataProfileActionOrBuilder.java | 65 + .../dlp/v2/DataProfileConfigSnapshot.java | 913 + .../DataProfileConfigSnapshotOrBuilder.java | 66 + .../privacy/dlp/v2/DataProfileJobConfig.java | 1698 ++ .../dlp/v2/DataProfileJobConfigOrBuilder.java | 193 + .../privacy/dlp/v2/DataProfileLocation.java | 734 + .../dlp/v2/DataProfileLocationOrBuilder.java | 49 + .../dlp/v2/DataProfilePubSubCondition.java | 2906 +++ .../DataProfilePubSubConditionOrBuilder.java | 36 + .../dlp/v2/DataProfilePubSubMessage.java | 817 + .../v2/DataProfilePubSubMessageOrBuilder.java | 61 + .../google/privacy/dlp/v2/DataRiskLevel.java | 729 + .../dlp/v2/DataRiskLevelOrBuilder.java | 28 + .../google/privacy/dlp/v2/DatastoreKey.java | 665 + .../privacy/dlp/v2/DatastoreKeyOrBuilder.java | 36 + .../privacy/dlp/v2/DatastoreOptions.java | 913 + .../dlp/v2/DatastoreOptionsOrBuilder.java | 66 + .../privacy/dlp/v2/DateShiftConfig.java | 1221 + .../dlp/v2/DateShiftConfigOrBuilder.java | 100 + .../com/google/privacy/dlp/v2/DateTime.java | 1798 ++ .../privacy/dlp/v2/DateTimeOrBuilder.java | 112 + .../privacy/dlp/v2/DeidentifyConfig.java | 1571 ++ .../dlp/v2/DeidentifyConfigOrBuilder.java | 131 + .../dlp/v2/DeidentifyContentRequest.java | 1982 ++ .../v2/DeidentifyContentRequestOrBuilder.java | 220 + .../dlp/v2/DeidentifyContentResponse.java | 901 + .../DeidentifyContentResponseOrBuilder.java | 63 + .../privacy/dlp/v2/DeidentifyTemplate.java | 1658 ++ .../dlp/v2/DeidentifyTemplateName.java | 512 + .../dlp/v2/DeidentifyTemplateOrBuilder.java | 156 + .../v2/DeleteDeidentifyTemplateRequest.java | 609 + ...eteDeidentifyTemplateRequestOrBuilder.java | 33 + .../privacy/dlp/v2/DeleteDlpJobRequest.java | 595 + .../dlp/v2/DeleteDlpJobRequestOrBuilder.java | 29 + .../dlp/v2/DeleteInspectTemplateRequest.java | 609 + ...DeleteInspectTemplateRequestOrBuilder.java | 33 + .../dlp/v2/DeleteJobTriggerRequest.java | 602 + .../v2/DeleteJobTriggerRequestOrBuilder.java | 31 + .../dlp/v2/DeleteStoredInfoTypeRequest.java | 609 + .../DeleteStoredInfoTypeRequestOrBuilder.java | 33 + .../google/privacy/dlp/v2/DlpContentName.java | 264 + .../com/google/privacy/dlp/v2/DlpJob.java | 2983 +++ .../com/google/privacy/dlp/v2/DlpJobName.java | 313 + .../privacy/dlp/v2/DlpJobOrBuilder.java | 270 + .../com/google/privacy/dlp/v2/DlpJobType.java | 150 + .../com/google/privacy/dlp/v2/DlpProto.java | 3641 +++ .../com/google/privacy/dlp/v2/DlpStorage.java | 560 + .../privacy/dlp/v2/DocumentLocation.java | 514 + .../dlp/v2/DocumentLocationOrBuilder.java | 20 + .../privacy/dlp/v2/EncryptionStatus.java | 150 + .../com/google/privacy/dlp/v2/EntityId.java | 673 + .../privacy/dlp/v2/EntityIdOrBuilder.java | 36 + .../java/com/google/privacy/dlp/v2/Error.java | 1110 + .../google/privacy/dlp/v2/ErrorOrBuilder.java | 80 + .../privacy/dlp/v2/ExcludeInfoTypes.java | 1033 + .../dlp/v2/ExcludeInfoTypesOrBuilder.java | 88 + .../google/privacy/dlp/v2/ExclusionRule.java | 1413 + .../dlp/v2/ExclusionRuleOrBuilder.java | 111 + .../com/google/privacy/dlp/v2/FieldId.java | 595 + .../privacy/dlp/v2/FieldIdOrBuilder.java | 29 + .../privacy/dlp/v2/FieldTransformation.java | 1856 ++ .../dlp/v2/FieldTransformationOrBuilder.java | 172 + .../com/google/privacy/dlp/v2/FileType.java | 335 + .../com/google/privacy/dlp/v2/Finding.java | 3228 +++ .../privacy/dlp/v2/FindingOrBuilder.java | 400 + .../privacy/dlp/v2/FinishDlpJobRequest.java | 595 + .../dlp/v2/FinishDlpJobRequestOrBuilder.java | 29 + .../dlp/v2/FixedSizeBucketingConfig.java | 1065 + .../v2/FixedSizeBucketingConfigOrBuilder.java | 88 + .../dlp/v2/GetDeidentifyTemplateRequest.java | 609 + ...GetDeidentifyTemplateRequestOrBuilder.java | 33 + .../privacy/dlp/v2/GetDlpJobRequest.java | 595 + .../dlp/v2/GetDlpJobRequestOrBuilder.java | 29 + .../dlp/v2/GetInspectTemplateRequest.java | 609 + .../GetInspectTemplateRequestOrBuilder.java | 33 + .../privacy/dlp/v2/GetJobTriggerRequest.java | 602 + .../dlp/v2/GetJobTriggerRequestOrBuilder.java | 31 + .../dlp/v2/GetStoredInfoTypeRequest.java | 609 + .../v2/GetStoredInfoTypeRequestOrBuilder.java | 33 + .../privacy/dlp/v2/HybridContentItem.java | 903 + .../dlp/v2/HybridContentItemOrBuilder.java | 63 + .../privacy/dlp/v2/HybridFindingDetails.java | 1585 ++ .../dlp/v2/HybridFindingDetailsOrBuilder.java | 211 + .../dlp/v2/HybridInspectDlpJobRequest.java | 838 + .../HybridInspectDlpJobRequestOrBuilder.java | 58 + .../v2/HybridInspectJobTriggerRequest.java | 838 + ...bridInspectJobTriggerRequestOrBuilder.java | 58 + .../privacy/dlp/v2/HybridInspectResponse.java | 429 + .../v2/HybridInspectResponseOrBuilder.java | 9 + .../dlp/v2/HybridInspectStatistics.java | 692 + .../v2/HybridInspectStatisticsOrBuilder.java | 44 + .../google/privacy/dlp/v2/HybridOptions.java | 1582 ++ .../dlp/v2/HybridOptionsOrBuilder.java | 218 + .../google/privacy/dlp/v2/ImageLocation.java | 872 + .../dlp/v2/ImageLocationOrBuilder.java | 53 + .../privacy/dlp/v2/ImageTransformations.java | 4271 ++++ .../dlp/v2/ImageTransformationsOrBuilder.java | 33 + .../com/google/privacy/dlp/v2/InfoType.java | 789 + .../privacy/dlp/v2/InfoTypeCategory.java | 2212 ++ .../dlp/v2/InfoTypeCategoryOrBuilder.java | 98 + .../privacy/dlp/v2/InfoTypeDescription.java | 2152 ++ .../dlp/v2/InfoTypeDescriptionOrBuilder.java | 208 + .../privacy/dlp/v2/InfoTypeOrBuilder.java | 57 + .../google/privacy/dlp/v2/InfoTypeStats.java | 746 + .../dlp/v2/InfoTypeStatsOrBuilder.java | 46 + .../privacy/dlp/v2/InfoTypeSummary.java | 749 + .../dlp/v2/InfoTypeSummaryOrBuilder.java | 47 + .../privacy/dlp/v2/InfoTypeSupportedBy.java | 150 + .../dlp/v2/InfoTypeTransformations.java | 2137 ++ .../v2/InfoTypeTransformationsOrBuilder.java | 58 + .../google/privacy/dlp/v2/InspectConfig.java | 4924 ++++ .../dlp/v2/InspectConfigOrBuilder.java | 336 + .../privacy/dlp/v2/InspectContentRequest.java | 1516 ++ .../v2/InspectContentRequestOrBuilder.java | 156 + .../dlp/v2/InspectContentResponse.java | 665 + .../v2/InspectContentResponseOrBuilder.java | 36 + .../dlp/v2/InspectDataSourceDetails.java | 3258 +++ .../v2/InspectDataSourceDetailsOrBuilder.java | 63 + .../privacy/dlp/v2/InspectJobConfig.java | 1524 ++ .../dlp/v2/InspectJobConfigOrBuilder.java | 131 + .../google/privacy/dlp/v2/InspectResult.java | 973 + .../dlp/v2/InspectResultOrBuilder.java | 68 + .../privacy/dlp/v2/InspectTemplate.java | 1662 ++ .../privacy/dlp/v2/InspectTemplateName.java | 496 + .../dlp/v2/InspectTemplateOrBuilder.java | 156 + .../google/privacy/dlp/v2/InspectionRule.java | 1026 + .../dlp/v2/InspectionRuleOrBuilder.java | 65 + .../privacy/dlp/v2/InspectionRuleSet.java | 1314 + .../dlp/v2/InspectionRuleSetOrBuilder.java | 97 + .../com/google/privacy/dlp/v2/JobTrigger.java | 4349 ++++ .../google/privacy/dlp/v2/JobTriggerName.java | 313 + .../privacy/dlp/v2/JobTriggerOrBuilder.java | 315 + .../java/com/google/privacy/dlp/v2/Key.java | 2449 ++ .../google/privacy/dlp/v2/KeyOrBuilder.java | 121 + .../google/privacy/dlp/v2/KindExpression.java | 595 + .../dlp/v2/KindExpressionOrBuilder.java | 29 + .../privacy/dlp/v2/KmsWrappedCryptoKey.java | 695 + .../dlp/v2/KmsWrappedCryptoKeyOrBuilder.java | 39 + .../dlp/v2/LargeCustomDictionaryConfig.java | 1306 + .../LargeCustomDictionaryConfigOrBuilder.java | 101 + .../dlp/v2/LargeCustomDictionaryStats.java | 510 + .../LargeCustomDictionaryStatsOrBuilder.java | 19 + .../com/google/privacy/dlp/v2/Likelihood.java | 186 + .../v2/ListDeidentifyTemplatesRequest.java | 1352 + ...stDeidentifyTemplatesRequestOrBuilder.java | 150 + .../v2/ListDeidentifyTemplatesResponse.java | 1068 + ...tDeidentifyTemplatesResponseOrBuilder.java | 80 + .../privacy/dlp/v2/ListDlpJobsRequest.java | 1757 ++ .../dlp/v2/ListDlpJobsRequestOrBuilder.java | 222 + .../privacy/dlp/v2/ListDlpJobsResponse.java | 1038 + .../dlp/v2/ListDlpJobsResponseOrBuilder.java | 73 + .../privacy/dlp/v2/ListInfoTypesRequest.java | 1128 + .../dlp/v2/ListInfoTypesRequestOrBuilder.java | 99 + .../privacy/dlp/v2/ListInfoTypesResponse.java | 872 + .../v2/ListInfoTypesResponseOrBuilder.java | 53 + .../dlp/v2/ListInspectTemplatesRequest.java | 1352 + .../ListInspectTemplatesRequestOrBuilder.java | 150 + .../dlp/v2/ListInspectTemplatesResponse.java | 1045 + ...ListInspectTemplatesResponseOrBuilder.java | 75 + .../dlp/v2/ListJobTriggersRequest.java | 1757 ++ .../v2/ListJobTriggersRequestOrBuilder.java | 222 + .../dlp/v2/ListJobTriggersResponse.java | 1045 + .../v2/ListJobTriggersResponseOrBuilder.java | 75 + .../dlp/v2/ListStoredInfoTypesRequest.java | 1331 + .../ListStoredInfoTypesRequestOrBuilder.java | 144 + .../dlp/v2/ListStoredInfoTypesResponse.java | 1045 + .../ListStoredInfoTypesResponseOrBuilder.java | 75 + .../com/google/privacy/dlp/v2/Location.java | 1675 ++ .../google/privacy/dlp/v2/LocationName.java | 192 + .../privacy/dlp/v2/LocationOrBuilder.java | 157 + .../com/google/privacy/dlp/v2/Manual.java | 431 + .../privacy/dlp/v2/ManualOrBuilder.java | 9 + .../google/privacy/dlp/v2/MatchingType.java | 187 + .../privacy/dlp/v2/MetadataLocation.java | 885 + .../dlp/v2/MetadataLocationOrBuilder.java | 57 + .../google/privacy/dlp/v2/MetadataType.java | 133 + .../dlp/v2/OrganizationLocationName.java | 192 + .../privacy/dlp/v2/OrganizationName.java | 168 + .../privacy/dlp/v2/OtherInfoTypeSummary.java | 749 + .../dlp/v2/OtherInfoTypeSummaryOrBuilder.java | 47 + .../privacy/dlp/v2/OutputStorageConfig.java | 1272 + .../dlp/v2/OutputStorageConfigOrBuilder.java | 106 + .../google/privacy/dlp/v2/PartitionId.java | 769 + .../privacy/dlp/v2/PartitionIdOrBuilder.java | 49 + .../dlp/v2/PrimitiveTransformation.java | 3654 +++ .../v2/PrimitiveTransformationOrBuilder.java | 335 + .../google/privacy/dlp/v2/PrivacyMetric.java | 13589 ++++++++++ .../dlp/v2/PrivacyMetricOrBuilder.java | 173 + .../google/privacy/dlp/v2/ProfileStatus.java | 893 + .../dlp/v2/ProfileStatusOrBuilder.java | 63 + .../google/privacy/dlp/v2/ProjectName.java | 168 + .../com/google/privacy/dlp/v2/QuasiId.java | 1554 ++ .../privacy/dlp/v2/QuasiIdOrBuilder.java | 142 + .../com/google/privacy/dlp/v2/QuoteInfo.java | 761 + .../privacy/dlp/v2/QuoteInfoOrBuilder.java | 38 + .../java/com/google/privacy/dlp/v2/Range.java | 591 + .../google/privacy/dlp/v2/RangeOrBuilder.java | 29 + .../privacy/dlp/v2/RecordCondition.java | 3780 +++ .../dlp/v2/RecordConditionOrBuilder.java | 36 + .../com/google/privacy/dlp/v2/RecordKey.java | 1188 + .../privacy/dlp/v2/RecordKeyOrBuilder.java | 86 + .../google/privacy/dlp/v2/RecordLocation.java | 1137 + .../dlp/v2/RecordLocationOrBuilder.java | 90 + .../privacy/dlp/v2/RecordSuppression.java | 679 + .../dlp/v2/RecordSuppressionOrBuilder.java | 39 + .../privacy/dlp/v2/RecordTransformation.java | 1059 + .../dlp/v2/RecordTransformationOrBuilder.java | 83 + .../privacy/dlp/v2/RecordTransformations.java | 1337 + .../v2/RecordTransformationsOrBuilder.java | 102 + .../google/privacy/dlp/v2/RedactConfig.java | 433 + .../privacy/dlp/v2/RedactConfigOrBuilder.java | 9 + .../privacy/dlp/v2/RedactImageRequest.java | 3097 +++ .../dlp/v2/RedactImageRequestOrBuilder.java | 180 + .../privacy/dlp/v2/RedactImageResponse.java | 929 + .../dlp/v2/RedactImageResponseOrBuilder.java | 70 + .../dlp/v2/ReidentifyContentRequest.java | 2044 ++ .../v2/ReidentifyContentRequestOrBuilder.java | 236 + .../dlp/v2/ReidentifyContentResponse.java | 901 + .../ReidentifyContentResponseOrBuilder.java | 63 + .../privacy/dlp/v2/RelationalOperator.java | 235 + .../dlp/v2/ReplaceDictionaryConfig.java | 785 + .../v2/ReplaceDictionaryConfigOrBuilder.java | 44 + .../privacy/dlp/v2/ReplaceValueConfig.java | 665 + .../dlp/v2/ReplaceValueConfigOrBuilder.java | 36 + .../dlp/v2/ReplaceWithInfoTypeConfig.java | 429 + .../ReplaceWithInfoTypeConfigOrBuilder.java | 9 + .../privacy/dlp/v2/ResourceVisibility.java | 151 + .../privacy/dlp/v2/RiskAnalysisJobConfig.java | 1369 + .../v2/RiskAnalysisJobConfigOrBuilder.java | 112 + .../com/google/privacy/dlp/v2/Schedule.java | 821 + .../privacy/dlp/v2/ScheduleOrBuilder.java | 53 + .../privacy/dlp/v2/SensitivityScore.java | 725 + .../dlp/v2/SensitivityScoreOrBuilder.java | 28 + .../privacy/dlp/v2/StatisticalTable.java | 2265 ++ .../dlp/v2/StatisticalTableOrBuilder.java | 110 + .../google/privacy/dlp/v2/StorageConfig.java | 3488 +++ .../dlp/v2/StorageConfigOrBuilder.java | 134 + .../privacy/dlp/v2/StorageMetadataLabel.java | 567 + .../dlp/v2/StorageMetadataLabelOrBuilder.java | 21 + .../google/privacy/dlp/v2/StoredInfoType.java | 1299 + .../privacy/dlp/v2/StoredInfoTypeConfig.java | 1623 ++ .../dlp/v2/StoredInfoTypeConfigOrBuilder.java | 132 + .../privacy/dlp/v2/StoredInfoTypeName.java | 495 + .../dlp/v2/StoredInfoTypeOrBuilder.java | 105 + .../privacy/dlp/v2/StoredInfoTypeState.java | 190 + .../privacy/dlp/v2/StoredInfoTypeStats.java | 761 + .../dlp/v2/StoredInfoTypeStatsOrBuilder.java | 38 + .../privacy/dlp/v2/StoredInfoTypeVersion.java | 1955 ++ .../v2/StoredInfoTypeVersionOrBuilder.java | 208 + .../com/google/privacy/dlp/v2/StoredType.java | 857 + .../privacy/dlp/v2/StoredTypeOrBuilder.java | 63 + .../java/com/google/privacy/dlp/v2/Table.java | 2231 ++ .../privacy/dlp/v2/TableDataProfile.java | 5572 ++++ .../dlp/v2/TableDataProfileOrBuilder.java | 615 + .../google/privacy/dlp/v2/TableLocation.java | 530 + .../dlp/v2/TableLocationOrBuilder.java | 24 + .../google/privacy/dlp/v2/TableOptions.java | 941 + .../privacy/dlp/v2/TableOptionsOrBuilder.java | 68 + .../google/privacy/dlp/v2/TableOrBuilder.java | 97 + .../google/privacy/dlp/v2/TimePartConfig.java | 768 + .../dlp/v2/TimePartConfigOrBuilder.java | 28 + .../privacy/dlp/v2/TransformationConfig.java | 1029 + .../dlp/v2/TransformationConfigOrBuilder.java | 97 + .../dlp/v2/TransformationContainerType.java | 135 + .../dlp/v2/TransformationDescription.java | 1200 + .../TransformationDescriptionOrBuilder.java | 117 + .../privacy/dlp/v2/TransformationDetails.java | 1894 ++ .../v2/TransformationDetailsOrBuilder.java | 187 + .../TransformationDetailsStorageConfig.java | 821 + ...ormationDetailsStorageConfigOrBuilder.java | 53 + .../dlp/v2/TransformationErrorHandling.java | 1900 ++ .../TransformationErrorHandlingOrBuilder.java | 65 + .../dlp/v2/TransformationLocation.java | 1144 + .../v2/TransformationLocationOrBuilder.java | 100 + .../dlp/v2/TransformationOverview.java | 953 + .../v2/TransformationOverviewOrBuilder.java | 63 + .../dlp/v2/TransformationResultStatus.java | 788 + .../TransformationResultStatusOrBuilder.java | 57 + .../v2/TransformationResultStatusType.java | 188 + .../privacy/dlp/v2/TransformationSummary.java | 3391 +++ .../v2/TransformationSummaryOrBuilder.java | 225 + .../privacy/dlp/v2/TransformationType.java | 356 + .../privacy/dlp/v2/TransientCryptoKey.java | 632 + .../dlp/v2/TransientCryptoKeyOrBuilder.java | 39 + .../privacy/dlp/v2/UnwrappedCryptoKey.java | 515 + .../dlp/v2/UnwrappedCryptoKeyOrBuilder.java | 19 + .../v2/UpdateDeidentifyTemplateRequest.java | 1081 + ...ateDeidentifyTemplateRequestOrBuilder.java | 87 + .../dlp/v2/UpdateInspectTemplateRequest.java | 1081 + ...UpdateInspectTemplateRequestOrBuilder.java | 87 + .../dlp/v2/UpdateJobTriggerRequest.java | 1074 + .../v2/UpdateJobTriggerRequestOrBuilder.java | 85 + .../dlp/v2/UpdateStoredInfoTypeRequest.java | 1105 + .../UpdateStoredInfoTypeRequestOrBuilder.java | 93 + .../java/com/google/privacy/dlp/v2/Value.java | 2037 ++ .../google/privacy/dlp/v2/ValueFrequency.java | 746 + .../dlp/v2/ValueFrequencyOrBuilder.java | 46 + .../google/privacy/dlp/v2/ValueOrBuilder.java | 206 + .../privacy/dlp/v2/VersionDescription.java | 761 + .../dlp/v2/VersionDescriptionOrBuilder.java | 49 + .../proto/google/privacy/dlp/v2/dlp.proto | 5372 ++++ .../proto/google/privacy/dlp/v2/storage.proto | 808 + 381 files changed, 331495 insertions(+) create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/gapic_metadata.json create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceCallableFactory.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceCallableFactory.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceStub.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientTest.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpService.java create mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpServiceImpl.java create mode 100644 owl-bot-staging/java-dlp/v2/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryField.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryFieldOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKey.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKeyOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptions.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptionsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTable.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTableOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBox.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBoxOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItemOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnoreOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSet.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSetOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePathOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSet.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSetOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Color.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ColorOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKey.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKeyOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileAction.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileActionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshot.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshotOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubConditionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessageOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevelOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKey.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKeyOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptions.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptionsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTime.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTimeOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpContentName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityId.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityIdOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Error.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ErrorOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypesOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRule.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRuleOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldId.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldIdOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItem.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItemOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetails.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetailsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatisticsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptions.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptionsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategory.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategoryOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStats.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStatsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformationsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetails.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetailsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResult.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResultOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRule.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSet.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSetOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Key.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KeyOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpression.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpressionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKey.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKeyOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStats.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStatsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Location.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Manual.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ManualOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationLocationName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionId.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionIdOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatus.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatusOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfo.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfoOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Range.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RangeOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordConditionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKey.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKeyOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppression.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppressionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformations.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponseOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabel.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabelOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeName.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStats.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStatsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredTypeOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfile.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfileOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptions.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptionsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandling.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandlingOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverview.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverviewOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummary.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummaryOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKey.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKeyOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKey.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKeyOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequest.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequestOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Value.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequency.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequencyOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto create mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java new file mode 100644 index 000000000000..0dcb903b1df1 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java @@ -0,0 +1,5835 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dlp.v2.stub.DlpServiceStub; +import com.google.cloud.dlp.v2.stub.DlpServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; +import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeidentifyTemplateName; +import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.DlpJobName; +import com.google.privacy.dlp.v2.FinishDlpJobRequest; +import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.GetInspectTemplateRequest; +import com.google.privacy.dlp.v2.GetJobTriggerRequest; +import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; +import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; +import com.google.privacy.dlp.v2.HybridInspectResponse; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.InspectTemplateName; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.JobTriggerName; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ListDlpJobsResponse; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ListJobTriggersResponse; +import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; +import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.OrganizationLocationName; +import com.google.privacy.dlp.v2.OrganizationName; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; +import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.StoredInfoTypeConfig; +import com.google.privacy.dlp.v2.StoredInfoTypeName; +import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; +import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; +import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The Cloud Data Loss Prevention (DLP) API is a service that allows clients to + * detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive data + * in user-supplied, unstructured data streams, like text blocks or images. The service also + * includes methods for sensitive data redaction and scheduling of data scans on Google Cloud + * Platform based data sets. + * + *

To learn more about concepts and find how-to guides see https://cloud.google.com/dlp/docs/. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ *   InspectContentRequest request =
+ *       InspectContentRequest.newBuilder()
+ *           .setParent(ProjectName.of("[PROJECT]").toString())
+ *           .setInspectConfig(InspectConfig.newBuilder().build())
+ *           .setItem(ContentItem.newBuilder().build())
+ *           .setInspectTemplateName("inspectTemplateName1828857433")
+ *           .setLocationId("locationId1541836720")
+ *           .build();
+ *   InspectContentResponse response = dlpServiceClient.inspectContent(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the DlpServiceClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of DlpServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DlpServiceSettings dlpServiceSettings =
+ *     DlpServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DlpServiceSettings dlpServiceSettings =
+ *     DlpServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DlpServiceSettings dlpServiceSettings =
+ *     DlpServiceSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             DlpServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DlpServiceClient implements BackgroundResource { + private final DlpServiceSettings settings; + private final DlpServiceStub stub; + + /** Constructs an instance of DlpServiceClient with default settings. */ + public static final DlpServiceClient create() throws IOException { + return create(DlpServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DlpServiceClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final DlpServiceClient create(DlpServiceSettings settings) throws IOException { + return new DlpServiceClient(settings); + } + + /** + * Constructs an instance of DlpServiceClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(DlpServiceSettings). + */ + public static final DlpServiceClient create(DlpServiceStub stub) { + return new DlpServiceClient(stub); + } + + /** + * Constructs an instance of DlpServiceClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected DlpServiceClient(DlpServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DlpServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected DlpServiceClient(DlpServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final DlpServiceSettings getSettings() { + return settings; + } + + public DlpServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds potentially sensitive info in content. This method has limits on input size, processing + * time, and output size. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and + * https://cloud.google.com/dlp/docs/inspecting-text, + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   InspectContentRequest request =
+   *       InspectContentRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setInspectConfig(InspectConfig.newBuilder().build())
+   *           .setItem(ContentItem.newBuilder().build())
+   *           .setInspectTemplateName("inspectTemplateName1828857433")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   InspectContentResponse response = dlpServiceClient.inspectContent(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectContentResponse inspectContent(InspectContentRequest request) { + return inspectContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finds potentially sensitive info in content. This method has limits on input size, processing + * time, and output size. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and + * https://cloud.google.com/dlp/docs/inspecting-text, + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   InspectContentRequest request =
+   *       InspectContentRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setInspectConfig(InspectConfig.newBuilder().build())
+   *           .setItem(ContentItem.newBuilder().build())
+   *           .setInspectTemplateName("inspectTemplateName1828857433")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.inspectContentCallable().futureCall(request);
+   *   // Do something.
+   *   InspectContentResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + inspectContentCallable() { + return stub.inspectContentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Redacts potentially sensitive info from an image. This method has limits on input size, + * processing time, and output size. See + * https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   RedactImageRequest request =
+   *       RedactImageRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setLocationId("locationId1541836720")
+   *           .setInspectConfig(InspectConfig.newBuilder().build())
+   *           .addAllImageRedactionConfigs(new ArrayList())
+   *           .setIncludeFindings(true)
+   *           .setByteItem(ByteContentItem.newBuilder().build())
+   *           .build();
+   *   RedactImageResponse response = dlpServiceClient.redactImage(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RedactImageResponse redactImage(RedactImageRequest request) { + return redactImageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Redacts potentially sensitive info from an image. This method has limits on input size, + * processing time, and output size. See + * https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   RedactImageRequest request =
+   *       RedactImageRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setLocationId("locationId1541836720")
+   *           .setInspectConfig(InspectConfig.newBuilder().build())
+   *           .addAllImageRedactionConfigs(new ArrayList())
+   *           .setIncludeFindings(true)
+   *           .setByteItem(ByteContentItem.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.redactImageCallable().futureCall(request);
+   *   // Do something.
+   *   RedactImageResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable redactImageCallable() { + return stub.redactImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * De-identifies potentially sensitive info from a ContentItem. This method has limits on input + * size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn + * more. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeidentifyContentRequest request =
+   *       DeidentifyContentRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setDeidentifyConfig(DeidentifyConfig.newBuilder().build())
+   *           .setInspectConfig(InspectConfig.newBuilder().build())
+   *           .setItem(ContentItem.newBuilder().build())
+   *           .setInspectTemplateName("inspectTemplateName1828857433")
+   *           .setDeidentifyTemplateName("deidentifyTemplateName-1374666414")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyContentResponse deidentifyContent(DeidentifyContentRequest request) { + return deidentifyContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * De-identifies potentially sensitive info from a ContentItem. This method has limits on input + * size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn + * more. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeidentifyContentRequest request =
+   *       DeidentifyContentRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setDeidentifyConfig(DeidentifyConfig.newBuilder().build())
+   *           .setInspectConfig(InspectConfig.newBuilder().build())
+   *           .setItem(ContentItem.newBuilder().build())
+   *           .setInspectTemplateName("inspectTemplateName1828857433")
+   *           .setDeidentifyTemplateName("deidentifyTemplateName-1374666414")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.deidentifyContentCallable().futureCall(request);
+   *   // Do something.
+   *   DeidentifyContentResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deidentifyContentCallable() { + return stub.deidentifyContentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Re-identifies content that has been de-identified. See + * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example + * to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ReidentifyContentRequest request =
+   *       ReidentifyContentRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setReidentifyConfig(DeidentifyConfig.newBuilder().build())
+   *           .setInspectConfig(InspectConfig.newBuilder().build())
+   *           .setItem(ContentItem.newBuilder().build())
+   *           .setInspectTemplateName("inspectTemplateName1828857433")
+   *           .setReidentifyTemplateName("reidentifyTemplateName157316612")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ReidentifyContentResponse response = dlpServiceClient.reidentifyContent(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReidentifyContentResponse reidentifyContent(ReidentifyContentRequest request) { + return reidentifyContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Re-identifies content that has been de-identified. See + * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example + * to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ReidentifyContentRequest request =
+   *       ReidentifyContentRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setReidentifyConfig(DeidentifyConfig.newBuilder().build())
+   *           .setInspectConfig(InspectConfig.newBuilder().build())
+   *           .setItem(ContentItem.newBuilder().build())
+   *           .setInspectTemplateName("inspectTemplateName1828857433")
+   *           .setReidentifyTemplateName("reidentifyTemplateName157316612")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.reidentifyContentCallable().futureCall(request);
+   *   // Do something.
+   *   ReidentifyContentResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + reidentifyContentCallable() { + return stub.reidentifyContentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of the sensitive information types that DLP API supports. See + * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(parent);
+   * }
+   * }
+ * + * @param parent The parent resource name. + *

The format of this value is as follows: + *

locations/<var>LOCATION_ID</var> + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInfoTypesResponse listInfoTypes(String parent) { + ListInfoTypesRequest request = ListInfoTypesRequest.newBuilder().setParent(parent).build(); + return listInfoTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of the sensitive information types that DLP API supports. See + * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListInfoTypesRequest request =
+   *       ListInfoTypesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setFilter("filter-1274492040")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInfoTypesResponse listInfoTypes(ListInfoTypesRequest request) { + return listInfoTypesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of the sensitive information types that DLP API supports. See + * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListInfoTypesRequest request =
+   *       ListInfoTypesRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .setFilter("filter-1274492040")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.listInfoTypesCallable().futureCall(request);
+   *   // Do something.
+   *   ListInfoTypesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable listInfoTypesCallable() { + return stub.listInfoTypesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, + * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param inspectTemplate Required. The InspectTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate createInspectTemplate( + LocationName parent, InspectTemplate inspectTemplate) { + CreateInspectTemplateRequest request = + CreateInspectTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInspectTemplate(inspectTemplate) + .build(); + return createInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, + * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param inspectTemplate Required. The InspectTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate createInspectTemplate( + OrganizationLocationName parent, InspectTemplate inspectTemplate) { + CreateInspectTemplateRequest request = + CreateInspectTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInspectTemplate(inspectTemplate) + .build(); + return createInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, + * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param inspectTemplate Required. The InspectTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate createInspectTemplate( + OrganizationName parent, InspectTemplate inspectTemplate) { + CreateInspectTemplateRequest request = + CreateInspectTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInspectTemplate(inspectTemplate) + .build(); + return createInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, + * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param inspectTemplate Required. The InspectTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate createInspectTemplate( + ProjectName parent, InspectTemplate inspectTemplate) { + CreateInspectTemplateRequest request = + CreateInspectTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInspectTemplate(inspectTemplate) + .build(); + return createInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, + * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param inspectTemplate Required. The InspectTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate createInspectTemplate( + String parent, InspectTemplate inspectTemplate) { + CreateInspectTemplateRequest request = + CreateInspectTemplateRequest.newBuilder() + .setParent(parent) + .setInspectTemplate(inspectTemplate) + .build(); + return createInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, + * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateInspectTemplateRequest request =
+   *       CreateInspectTemplateRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setInspectTemplate(InspectTemplate.newBuilder().build())
+   *           .setTemplateId("templateId1304010549")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest request) { + return createInspectTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, + * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateInspectTemplateRequest request =
+   *       CreateInspectTemplateRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setInspectTemplate(InspectTemplate.newBuilder().build())
+   *           .setTemplateId("templateId1304010549")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.createInspectTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   InspectTemplate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createInspectTemplateCallable() { + return stub.createInspectTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   InspectTemplateName name =
+   *       InspectTemplateName.ofOrganizationInspectTemplateName(
+   *           "[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   InspectTemplate response =
+   *       dlpServiceClient.updateInspectTemplate(name, inspectTemplate, updateMask);
+   * }
+   * }
+ * + * @param name Required. Resource name of organization and inspectTemplate to be updated, for + * example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + * @param inspectTemplate New InspectTemplate value. + * @param updateMask Mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate updateInspectTemplate( + InspectTemplateName name, InspectTemplate inspectTemplate, FieldMask updateMask) { + UpdateInspectTemplateRequest request = + UpdateInspectTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setInspectTemplate(inspectTemplate) + .setUpdateMask(updateMask) + .build(); + return updateInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name =
+   *       InspectTemplateName.ofOrganizationInspectTemplateName(
+   *               "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
+   *           .toString();
+   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   InspectTemplate response =
+   *       dlpServiceClient.updateInspectTemplate(name, inspectTemplate, updateMask);
+   * }
+   * }
+ * + * @param name Required. Resource name of organization and inspectTemplate to be updated, for + * example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + * @param inspectTemplate New InspectTemplate value. + * @param updateMask Mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate updateInspectTemplate( + String name, InspectTemplate inspectTemplate, FieldMask updateMask) { + UpdateInspectTemplateRequest request = + UpdateInspectTemplateRequest.newBuilder() + .setName(name) + .setInspectTemplate(inspectTemplate) + .setUpdateMask(updateMask) + .build(); + return updateInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   UpdateInspectTemplateRequest request =
+   *       UpdateInspectTemplateRequest.newBuilder()
+   *           .setName(
+   *               InspectTemplateName.ofOrganizationInspectTemplateName(
+   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
+   *                   .toString())
+   *           .setInspectTemplate(InspectTemplate.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   InspectTemplate response = dlpServiceClient.updateInspectTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate updateInspectTemplate(UpdateInspectTemplateRequest request) { + return updateInspectTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   UpdateInspectTemplateRequest request =
+   *       UpdateInspectTemplateRequest.newBuilder()
+   *           .setName(
+   *               InspectTemplateName.ofOrganizationInspectTemplateName(
+   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
+   *                   .toString())
+   *           .setInspectTemplate(InspectTemplate.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.updateInspectTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   InspectTemplate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateInspectTemplateCallable() { + return stub.updateInspectTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   InspectTemplateName name =
+   *       InspectTemplateName.ofOrganizationInspectTemplateName(
+   *           "[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+   *   InspectTemplate response = dlpServiceClient.getInspectTemplate(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and inspectTemplate to be read, for + * example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate getInspectTemplate(InspectTemplateName name) { + GetInspectTemplateRequest request = + GetInspectTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name =
+   *       InspectTemplateName.ofOrganizationInspectTemplateName(
+   *               "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
+   *           .toString();
+   *   InspectTemplate response = dlpServiceClient.getInspectTemplate(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and inspectTemplate to be read, for + * example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate getInspectTemplate(String name) { + GetInspectTemplateRequest request = + GetInspectTemplateRequest.newBuilder().setName(name).build(); + return getInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetInspectTemplateRequest request =
+   *       GetInspectTemplateRequest.newBuilder()
+   *           .setName(
+   *               InspectTemplateName.ofOrganizationInspectTemplateName(
+   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   InspectTemplate response = dlpServiceClient.getInspectTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InspectTemplate getInspectTemplate(GetInspectTemplateRequest request) { + return getInspectTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetInspectTemplateRequest request =
+   *       GetInspectTemplateRequest.newBuilder()
+   *           .setName(
+   *               InspectTemplateName.ofOrganizationInspectTemplateName(
+   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.getInspectTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   InspectTemplate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getInspectTemplateCallable() { + return stub.getInspectTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInspectTemplatesPagedResponse listInspectTemplates(LocationName parent) { + ListInspectTemplatesRequest request = + ListInspectTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInspectTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInspectTemplatesPagedResponse listInspectTemplates( + OrganizationLocationName parent) { + ListInspectTemplatesRequest request = + ListInspectTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInspectTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInspectTemplatesPagedResponse listInspectTemplates(OrganizationName parent) { + ListInspectTemplatesRequest request = + ListInspectTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInspectTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInspectTemplatesPagedResponse listInspectTemplates(ProjectName parent) { + ListInspectTemplatesRequest request = + ListInspectTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInspectTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInspectTemplatesPagedResponse listInspectTemplates(String parent) { + ListInspectTemplatesRequest request = + ListInspectTemplatesRequest.newBuilder().setParent(parent).build(); + return listInspectTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListInspectTemplatesRequest request =
+   *       ListInspectTemplatesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInspectTemplatesPagedResponse listInspectTemplates( + ListInspectTemplatesRequest request) { + return listInspectTemplatesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListInspectTemplatesRequest request =
+   *       ListInspectTemplatesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.listInspectTemplatesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (InspectTemplate element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInspectTemplatesPagedCallable() { + return stub.listInspectTemplatesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListInspectTemplatesRequest request =
+   *       ListInspectTemplatesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   while (true) {
+   *     ListInspectTemplatesResponse response =
+   *         dlpServiceClient.listInspectTemplatesCallable().call(request);
+   *     for (InspectTemplate element : response.getInspectTemplatesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInspectTemplatesCallable() { + return stub.listInspectTemplatesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   InspectTemplateName name =
+   *       InspectTemplateName.ofOrganizationInspectTemplateName(
+   *           "[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+   *   dlpServiceClient.deleteInspectTemplate(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and inspectTemplate to be deleted, for + * example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteInspectTemplate(InspectTemplateName name) { + DeleteInspectTemplateRequest request = + DeleteInspectTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name =
+   *       InspectTemplateName.ofOrganizationInspectTemplateName(
+   *               "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
+   *           .toString();
+   *   dlpServiceClient.deleteInspectTemplate(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and inspectTemplate to be deleted, for + * example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteInspectTemplate(String name) { + DeleteInspectTemplateRequest request = + DeleteInspectTemplateRequest.newBuilder().setName(name).build(); + deleteInspectTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteInspectTemplateRequest request =
+   *       DeleteInspectTemplateRequest.newBuilder()
+   *           .setName(
+   *               InspectTemplateName.ofOrganizationInspectTemplateName(
+   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   dlpServiceClient.deleteInspectTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteInspectTemplate(DeleteInspectTemplateRequest request) { + deleteInspectTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteInspectTemplateRequest request =
+   *       DeleteInspectTemplateRequest.newBuilder()
+   *           .setName(
+   *               InspectTemplateName.ofOrganizationInspectTemplateName(
+   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.deleteInspectTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteInspectTemplateCallable() { + return stub.deleteInspectTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying + * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+   *   DeidentifyTemplate response =
+   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param deidentifyTemplate Required. The DeidentifyTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate createDeidentifyTemplate( + LocationName parent, DeidentifyTemplate deidentifyTemplate) { + CreateDeidentifyTemplateRequest request = + CreateDeidentifyTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + return createDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying + * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+   *   DeidentifyTemplate response =
+   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param deidentifyTemplate Required. The DeidentifyTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate createDeidentifyTemplate( + OrganizationLocationName parent, DeidentifyTemplate deidentifyTemplate) { + CreateDeidentifyTemplateRequest request = + CreateDeidentifyTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + return createDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying + * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+   *   DeidentifyTemplate response =
+   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param deidentifyTemplate Required. The DeidentifyTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate createDeidentifyTemplate( + OrganizationName parent, DeidentifyTemplate deidentifyTemplate) { + CreateDeidentifyTemplateRequest request = + CreateDeidentifyTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + return createDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying + * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+   *   DeidentifyTemplate response =
+   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param deidentifyTemplate Required. The DeidentifyTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate createDeidentifyTemplate( + ProjectName parent, DeidentifyTemplate deidentifyTemplate) { + CreateDeidentifyTemplateRequest request = + CreateDeidentifyTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + return createDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying + * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+   *   DeidentifyTemplate response =
+   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param deidentifyTemplate Required. The DeidentifyTemplate to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate createDeidentifyTemplate( + String parent, DeidentifyTemplate deidentifyTemplate) { + CreateDeidentifyTemplateRequest request = + CreateDeidentifyTemplateRequest.newBuilder() + .setParent(parent) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + return createDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying + * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateDeidentifyTemplateRequest request =
+   *       CreateDeidentifyTemplateRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
+   *           .setTemplateId("templateId1304010549")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate createDeidentifyTemplate( + CreateDeidentifyTemplateRequest request) { + return createDeidentifyTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying + * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateDeidentifyTemplateRequest request =
+   *       CreateDeidentifyTemplateRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
+   *           .setTemplateId("templateId1304010549")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.createDeidentifyTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   DeidentifyTemplate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createDeidentifyTemplateCallable() { + return stub.createDeidentifyTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid + * to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeidentifyTemplateName name =
+   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *           "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DeidentifyTemplate response =
+   *       dlpServiceClient.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask);
+   * }
+   * }
+ * + * @param name Required. Resource name of organization and deidentify template to be updated, for + * example `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + * @param deidentifyTemplate New DeidentifyTemplate value. + * @param updateMask Mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate updateDeidentifyTemplate( + DeidentifyTemplateName name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask) { + UpdateDeidentifyTemplateRequest request = + UpdateDeidentifyTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setDeidentifyTemplate(deidentifyTemplate) + .setUpdateMask(updateMask) + .build(); + return updateDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid + * to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name =
+   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *               "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
+   *           .toString();
+   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DeidentifyTemplate response =
+   *       dlpServiceClient.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask);
+   * }
+   * }
+ * + * @param name Required. Resource name of organization and deidentify template to be updated, for + * example `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + * @param deidentifyTemplate New DeidentifyTemplate value. + * @param updateMask Mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate updateDeidentifyTemplate( + String name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask) { + UpdateDeidentifyTemplateRequest request = + UpdateDeidentifyTemplateRequest.newBuilder() + .setName(name) + .setDeidentifyTemplate(deidentifyTemplate) + .setUpdateMask(updateMask) + .build(); + return updateDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid + * to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   UpdateDeidentifyTemplateRequest request =
+   *       UpdateDeidentifyTemplateRequest.newBuilder()
+   *           .setName(
+   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
+   *                   .toString())
+   *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   DeidentifyTemplate response = dlpServiceClient.updateDeidentifyTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate updateDeidentifyTemplate( + UpdateDeidentifyTemplateRequest request) { + return updateDeidentifyTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid + * to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   UpdateDeidentifyTemplateRequest request =
+   *       UpdateDeidentifyTemplateRequest.newBuilder()
+   *           .setName(
+   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
+   *                   .toString())
+   *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.updateDeidentifyTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   DeidentifyTemplate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateDeidentifyTemplateCallable() { + return stub.updateDeidentifyTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeidentifyTemplateName name =
+   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *           "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+   *   DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and deidentify template to be read, for + * example `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate getDeidentifyTemplate(DeidentifyTemplateName name) { + GetDeidentifyTemplateRequest request = + GetDeidentifyTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name =
+   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *               "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
+   *           .toString();
+   *   DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and deidentify template to be read, for + * example `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate getDeidentifyTemplate(String name) { + GetDeidentifyTemplateRequest request = + GetDeidentifyTemplateRequest.newBuilder().setName(name).build(); + return getDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetDeidentifyTemplateRequest request =
+   *       GetDeidentifyTemplateRequest.newBuilder()
+   *           .setName(
+   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeidentifyTemplate getDeidentifyTemplate(GetDeidentifyTemplateRequest request) { + return getDeidentifyTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetDeidentifyTemplateRequest request =
+   *       GetDeidentifyTemplateRequest.newBuilder()
+   *           .setName(
+   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.getDeidentifyTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   DeidentifyTemplate response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDeidentifyTemplateCallable() { + return stub.getDeidentifyTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DeidentifyTemplate element :
+   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(LocationName parent) { + ListDeidentifyTemplatesRequest request = + ListDeidentifyTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDeidentifyTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (DeidentifyTemplate element :
+   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates( + OrganizationLocationName parent) { + ListDeidentifyTemplatesRequest request = + ListDeidentifyTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDeidentifyTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (DeidentifyTemplate element :
+   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates( + OrganizationName parent) { + ListDeidentifyTemplatesRequest request = + ListDeidentifyTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDeidentifyTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (DeidentifyTemplate element :
+   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(ProjectName parent) { + ListDeidentifyTemplatesRequest request = + ListDeidentifyTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDeidentifyTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   for (DeidentifyTemplate element :
+   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(String parent) { + ListDeidentifyTemplatesRequest request = + ListDeidentifyTemplatesRequest.newBuilder().setParent(parent).build(); + return listDeidentifyTemplates(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListDeidentifyTemplatesRequest request =
+   *       ListDeidentifyTemplatesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   for (DeidentifyTemplate element :
+   *       dlpServiceClient.listDeidentifyTemplates(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates( + ListDeidentifyTemplatesRequest request) { + return listDeidentifyTemplatesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListDeidentifyTemplatesRequest request =
+   *       ListDeidentifyTemplatesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.listDeidentifyTemplatesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DeidentifyTemplate element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDeidentifyTemplatesPagedCallable() { + return stub.listDeidentifyTemplatesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListDeidentifyTemplatesRequest request =
+   *       ListDeidentifyTemplatesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   while (true) {
+   *     ListDeidentifyTemplatesResponse response =
+   *         dlpServiceClient.listDeidentifyTemplatesCallable().call(request);
+   *     for (DeidentifyTemplate element : response.getDeidentifyTemplatesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDeidentifyTemplatesCallable() { + return stub.listDeidentifyTemplatesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeidentifyTemplateName name =
+   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *           "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+   *   dlpServiceClient.deleteDeidentifyTemplate(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and deidentify template to be deleted, + * for example `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDeidentifyTemplate(DeidentifyTemplateName name) { + DeleteDeidentifyTemplateRequest request = + DeleteDeidentifyTemplateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name =
+   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *               "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
+   *           .toString();
+   *   dlpServiceClient.deleteDeidentifyTemplate(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and deidentify template to be deleted, + * for example `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDeidentifyTemplate(String name) { + DeleteDeidentifyTemplateRequest request = + DeleteDeidentifyTemplateRequest.newBuilder().setName(name).build(); + deleteDeidentifyTemplate(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteDeidentifyTemplateRequest request =
+   *       DeleteDeidentifyTemplateRequest.newBuilder()
+   *           .setName(
+   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   dlpServiceClient.deleteDeidentifyTemplate(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest request) { + deleteDeidentifyTemplateCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteDeidentifyTemplateRequest request =
+   *       DeleteDeidentifyTemplateRequest.newBuilder()
+   *           .setName(
+   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
+   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.deleteDeidentifyTemplateCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteDeidentifyTemplateCallable() { + return stub.deleteDeidentifyTemplateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on + * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+   *   JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param jobTrigger Required. The JobTrigger to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger createJobTrigger(LocationName parent, JobTrigger jobTrigger) { + CreateJobTriggerRequest request = + CreateJobTriggerRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setJobTrigger(jobTrigger) + .build(); + return createJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on + * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+   *   JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param jobTrigger Required. The JobTrigger to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger createJobTrigger(ProjectName parent, JobTrigger jobTrigger) { + CreateJobTriggerRequest request = + CreateJobTriggerRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setJobTrigger(jobTrigger) + .build(); + return createJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on + * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+   *   JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param jobTrigger Required. The JobTrigger to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger createJobTrigger(String parent, JobTrigger jobTrigger) { + CreateJobTriggerRequest request = + CreateJobTriggerRequest.newBuilder().setParent(parent).setJobTrigger(jobTrigger).build(); + return createJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on + * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateJobTriggerRequest request =
+   *       CreateJobTriggerRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setJobTrigger(JobTrigger.newBuilder().build())
+   *           .setTriggerId("triggerId-648752909")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   JobTrigger response = dlpServiceClient.createJobTrigger(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger createJobTrigger(CreateJobTriggerRequest request) { + return createJobTriggerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on + * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateJobTriggerRequest request =
+   *       CreateJobTriggerRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setJobTrigger(JobTrigger.newBuilder().build())
+   *           .setTriggerId("triggerId-648752909")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.createJobTriggerCallable().futureCall(request);
+   *   // Do something.
+   *   JobTrigger response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createJobTriggerCallable() { + return stub.createJobTriggerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   JobTrigger response = dlpServiceClient.updateJobTrigger(name, jobTrigger, updateMask);
+   * }
+   * }
+ * + * @param name Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @param jobTrigger New JobTrigger value. + * @param updateMask Mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger updateJobTrigger( + JobTriggerName name, JobTrigger jobTrigger, FieldMask updateMask) { + UpdateJobTriggerRequest request = + UpdateJobTriggerRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setJobTrigger(jobTrigger) + .setUpdateMask(updateMask) + .build(); + return updateJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
+   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   JobTrigger response = dlpServiceClient.updateJobTrigger(name, jobTrigger, updateMask);
+   * }
+   * }
+ * + * @param name Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @param jobTrigger New JobTrigger value. + * @param updateMask Mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger updateJobTrigger( + String name, JobTrigger jobTrigger, FieldMask updateMask) { + UpdateJobTriggerRequest request = + UpdateJobTriggerRequest.newBuilder() + .setName(name) + .setJobTrigger(jobTrigger) + .setUpdateMask(updateMask) + .build(); + return updateJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   UpdateJobTriggerRequest request =
+   *       UpdateJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
+   *           .setJobTrigger(JobTrigger.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   JobTrigger response = dlpServiceClient.updateJobTrigger(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger updateJobTrigger(UpdateJobTriggerRequest request) { + return updateJobTriggerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   UpdateJobTriggerRequest request =
+   *       UpdateJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
+   *           .setJobTrigger(JobTrigger.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.updateJobTriggerCallable().futureCall(request);
+   *   // Do something.
+   *   JobTrigger response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateJobTriggerCallable() { + return stub.updateJobTriggerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Inspect hybrid content and store findings to a trigger. The inspection will be processed + * asynchronously. To review the findings monitor the jobs within the trigger. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   JobTriggerName name =
+   *       JobTriggerName.ofProjectLocationJobTriggerName(
+   *           "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]");
+   *   HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the trigger to execute a hybrid inspect on, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HybridInspectResponse hybridInspectJobTrigger(JobTriggerName name) { + HybridInspectJobTriggerRequest request = + HybridInspectJobTriggerRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return hybridInspectJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Inspect hybrid content and store findings to a trigger. The inspection will be processed + * asynchronously. To review the findings monitor the jobs within the trigger. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
+   *   HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the trigger to execute a hybrid inspect on, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HybridInspectResponse hybridInspectJobTrigger(String name) { + HybridInspectJobTriggerRequest request = + HybridInspectJobTriggerRequest.newBuilder().setName(name).build(); + return hybridInspectJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Inspect hybrid content and store findings to a trigger. The inspection will be processed + * asynchronously. To review the findings monitor the jobs within the trigger. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   HybridInspectJobTriggerRequest request =
+   *       HybridInspectJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectLocationJobTriggerName(
+   *                       "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
+   *                   .toString())
+   *           .setHybridItem(HybridContentItem.newBuilder().build())
+   *           .build();
+   *   HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HybridInspectResponse hybridInspectJobTrigger( + HybridInspectJobTriggerRequest request) { + return hybridInspectJobTriggerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Inspect hybrid content and store findings to a trigger. The inspection will be processed + * asynchronously. To review the findings monitor the jobs within the trigger. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   HybridInspectJobTriggerRequest request =
+   *       HybridInspectJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectLocationJobTriggerName(
+   *                       "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
+   *                   .toString())
+   *           .setHybridItem(HybridContentItem.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.hybridInspectJobTriggerCallable().futureCall(request);
+   *   // Do something.
+   *   HybridInspectResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + hybridInspectJobTriggerCallable() { + return stub.hybridInspectJobTriggerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+   *   JobTrigger response = dlpServiceClient.getJobTrigger(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger getJobTrigger(JobTriggerName name) { + GetJobTriggerRequest request = + GetJobTriggerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
+   *   JobTrigger response = dlpServiceClient.getJobTrigger(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger getJobTrigger(String name) { + GetJobTriggerRequest request = GetJobTriggerRequest.newBuilder().setName(name).build(); + return getJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetJobTriggerRequest request =
+   *       GetJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
+   *           .build();
+   *   JobTrigger response = dlpServiceClient.getJobTrigger(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobTrigger getJobTrigger(GetJobTriggerRequest request) { + return getJobTriggerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetJobTriggerRequest request =
+   *       GetJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.getJobTriggerCallable().futureCall(request);
+   *   // Do something.
+   *   JobTrigger response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getJobTriggerCallable() { + return stub.getJobTriggerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobTriggersPagedResponse listJobTriggers(LocationName parent) { + ListJobTriggersRequest request = + ListJobTriggersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listJobTriggers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobTriggersPagedResponse listJobTriggers(ProjectName parent) { + ListJobTriggersRequest request = + ListJobTriggersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listJobTriggers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobTriggersPagedResponse listJobTriggers(String parent) { + ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder().setParent(parent).build(); + return listJobTriggers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListJobTriggersRequest request =
+   *       ListJobTriggersRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFilter("filter-1274492040")
+   *           .setType(DlpJobType.forNumber(0))
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   for (JobTrigger element : dlpServiceClient.listJobTriggers(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest request) { + return listJobTriggersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListJobTriggersRequest request =
+   *       ListJobTriggersRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFilter("filter-1274492040")
+   *           .setType(DlpJobType.forNumber(0))
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.listJobTriggersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (JobTrigger element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listJobTriggersPagedCallable() { + return stub.listJobTriggersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListJobTriggersRequest request =
+   *       ListJobTriggersRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setFilter("filter-1274492040")
+   *           .setType(DlpJobType.forNumber(0))
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   while (true) {
+   *     ListJobTriggersResponse response = dlpServiceClient.listJobTriggersCallable().call(request);
+   *     for (JobTrigger element : response.getJobTriggersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listJobTriggersCallable() { + return stub.listJobTriggersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+   *   dlpServiceClient.deleteJobTrigger(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteJobTrigger(JobTriggerName name) { + DeleteJobTriggerRequest request = + DeleteJobTriggerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
+   *   dlpServiceClient.deleteJobTrigger(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteJobTrigger(String name) { + DeleteJobTriggerRequest request = DeleteJobTriggerRequest.newBuilder().setName(name).build(); + deleteJobTrigger(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteJobTriggerRequest request =
+   *       DeleteJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
+   *           .build();
+   *   dlpServiceClient.deleteJobTrigger(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteJobTrigger(DeleteJobTriggerRequest request) { + deleteJobTriggerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteJobTriggerRequest request =
+   *       DeleteJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.deleteJobTriggerCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteJobTriggerCallable() { + return stub.deleteJobTriggerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the + * trigger event to occur. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ActivateJobTriggerRequest request =
+   *       ActivateJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
+   *           .build();
+   *   DlpJob response = dlpServiceClient.activateJobTrigger(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob activateJobTrigger(ActivateJobTriggerRequest request) { + return activateJobTriggerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the + * trigger event to occur. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ActivateJobTriggerRequest request =
+   *       ActivateJobTriggerRequest.newBuilder()
+   *           .setName(
+   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.activateJobTriggerCallable().futureCall(request);
+   *   // Do something.
+   *   DlpJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable activateJobTriggerCallable() { + return stub.activateJobTriggerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
+   *   DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param inspectJob An inspection job scans a storage repository for InfoTypes. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob createDlpJob(LocationName parent, InspectJobConfig inspectJob) { + CreateDlpJobRequest request = + CreateDlpJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInspectJob(inspectJob) + .build(); + return createDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
+   *   DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param riskJob A risk analysis job calculates re-identification risk metrics for a BigQuery + * table. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob createDlpJob(LocationName parent, RiskAnalysisJobConfig riskJob) { + CreateDlpJobRequest request = + CreateDlpJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRiskJob(riskJob) + .build(); + return createDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
+   *   DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param inspectJob An inspection job scans a storage repository for InfoTypes. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob createDlpJob(ProjectName parent, InspectJobConfig inspectJob) { + CreateDlpJobRequest request = + CreateDlpJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInspectJob(inspectJob) + .build(); + return createDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
+   *   DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param riskJob A risk analysis job calculates re-identification risk metrics for a BigQuery + * table. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob createDlpJob(ProjectName parent, RiskAnalysisJobConfig riskJob) { + CreateDlpJobRequest request = + CreateDlpJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setRiskJob(riskJob) + .build(); + return createDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
+   *   DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param inspectJob An inspection job scans a storage repository for InfoTypes. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob createDlpJob(String parent, InspectJobConfig inspectJob) { + CreateDlpJobRequest request = + CreateDlpJobRequest.newBuilder().setParent(parent).setInspectJob(inspectJob).build(); + return createDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
+   *   DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param riskJob A risk analysis job calculates re-identification risk metrics for a BigQuery + * table. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob createDlpJob(String parent, RiskAnalysisJobConfig riskJob) { + CreateDlpJobRequest request = + CreateDlpJobRequest.newBuilder().setParent(parent).setRiskJob(riskJob).build(); + return createDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateDlpJobRequest request =
+   *       CreateDlpJobRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setJobId("jobId101296568")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   DlpJob response = dlpServiceClient.createDlpJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob createDlpJob(CreateDlpJobRequest request) { + return createDlpJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateDlpJobRequest request =
+   *       CreateDlpJobRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setJobId("jobId101296568")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.createDlpJobCallable().futureCall(request);
+   *   // Do something.
+   *   DlpJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDlpJobCallable() { + return stub.createDlpJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DlpJobs that match the specified filter in the request. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDlpJobsPagedResponse listDlpJobs(LocationName parent) { + ListDlpJobsRequest request = + ListDlpJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDlpJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DlpJobs that match the specified filter in the request. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDlpJobsPagedResponse listDlpJobs(ProjectName parent) { + ListDlpJobsRequest request = + ListDlpJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDlpJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DlpJobs that match the specified filter in the request. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDlpJobsPagedResponse listDlpJobs(String parent) { + ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder().setParent(parent).build(); + return listDlpJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DlpJobs that match the specified filter in the request. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListDlpJobsRequest request =
+   *       ListDlpJobsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setType(DlpJobType.forNumber(0))
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   for (DlpJob element : dlpServiceClient.listDlpJobs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request) { + return listDlpJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DlpJobs that match the specified filter in the request. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListDlpJobsRequest request =
+   *       ListDlpJobsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setType(DlpJobType.forNumber(0))
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.listDlpJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DlpJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDlpJobsPagedCallable() { + return stub.listDlpJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DlpJobs that match the specified filter in the request. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListDlpJobsRequest request =
+   *       ListDlpJobsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setType(DlpJobType.forNumber(0))
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   while (true) {
+   *     ListDlpJobsResponse response = dlpServiceClient.listDlpJobsCallable().call(request);
+   *     for (DlpJob element : response.getJobsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listDlpJobsCallable() { + return stub.listDlpJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest state of a long-running DlpJob. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+   *   DlpJob response = dlpServiceClient.getDlpJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DlpJob resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob getDlpJob(DlpJobName name) { + GetDlpJobRequest request = + GetDlpJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest state of a long-running DlpJob. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
+   *   DlpJob response = dlpServiceClient.getDlpJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DlpJob resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob getDlpJob(String name) { + GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(name).build(); + return getDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest state of a long-running DlpJob. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetDlpJobRequest request =
+   *       GetDlpJobRequest.newBuilder()
+   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
+   *           .build();
+   *   DlpJob response = dlpServiceClient.getDlpJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DlpJob getDlpJob(GetDlpJobRequest request) { + return getDlpJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the latest state of a long-running DlpJob. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetDlpJobRequest request =
+   *       GetDlpJobRequest.newBuilder()
+   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.getDlpJobCallable().futureCall(request);
+   *   // Do something.
+   *   DlpJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDlpJobCallable() { + return stub.getDlpJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in + * the DlpJob result. The job will be canceled if possible. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+   *   dlpServiceClient.deleteDlpJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DlpJob resource to be deleted. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDlpJob(DlpJobName name) { + DeleteDlpJobRequest request = + DeleteDlpJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in + * the DlpJob result. The job will be canceled if possible. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
+   *   dlpServiceClient.deleteDlpJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DlpJob resource to be deleted. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDlpJob(String name) { + DeleteDlpJobRequest request = DeleteDlpJobRequest.newBuilder().setName(name).build(); + deleteDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in + * the DlpJob result. The job will be canceled if possible. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteDlpJobRequest request =
+   *       DeleteDlpJobRequest.newBuilder()
+   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
+   *           .build();
+   *   dlpServiceClient.deleteDlpJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDlpJob(DeleteDlpJobRequest request) { + deleteDlpJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in + * the DlpJob result. The job will be canceled if possible. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteDlpJobRequest request =
+   *       DeleteDlpJobRequest.newBuilder()
+   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.deleteDlpJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDlpJobCallable() { + return stub.deleteDlpJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to + * cancel the DlpJob, but success is not guaranteed. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CancelDlpJobRequest request =
+   *       CancelDlpJobRequest.newBuilder()
+   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
+   *           .build();
+   *   dlpServiceClient.cancelDlpJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelDlpJob(CancelDlpJobRequest request) { + cancelDlpJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to + * cancel the DlpJob, but success is not guaranteed. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CancelDlpJobRequest request =
+   *       CancelDlpJobRequest.newBuilder()
+   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.cancelDlpJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable cancelDlpJobCallable() { + return stub.cancelDlpJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a pre-built stored infoType to be used for inspection. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param config Required. Configuration of the storedInfoType to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType createStoredInfoType( + LocationName parent, StoredInfoTypeConfig config) { + CreateStoredInfoTypeRequest request = + CreateStoredInfoTypeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConfig(config) + .build(); + return createStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a pre-built stored infoType to be used for inspection. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param config Required. Configuration of the storedInfoType to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType createStoredInfoType( + OrganizationLocationName parent, StoredInfoTypeConfig config) { + CreateStoredInfoTypeRequest request = + CreateStoredInfoTypeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConfig(config) + .build(); + return createStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a pre-built stored infoType to be used for inspection. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param config Required. Configuration of the storedInfoType to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType createStoredInfoType( + OrganizationName parent, StoredInfoTypeConfig config) { + CreateStoredInfoTypeRequest request = + CreateStoredInfoTypeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConfig(config) + .build(); + return createStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a pre-built stored infoType to be used for inspection. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param config Required. Configuration of the storedInfoType to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType createStoredInfoType( + ProjectName parent, StoredInfoTypeConfig config) { + CreateStoredInfoTypeRequest request = + CreateStoredInfoTypeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConfig(config) + .build(); + return createStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a pre-built stored infoType to be used for inspection. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + Organizations scope, location + * specified:<br/> + * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Organizations scope, no location specified (defaults to global):<br/> + * `organizations/`<var>ORG_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @param config Required. Configuration of the storedInfoType to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType createStoredInfoType(String parent, StoredInfoTypeConfig config) { + CreateStoredInfoTypeRequest request = + CreateStoredInfoTypeRequest.newBuilder().setParent(parent).setConfig(config).build(); + return createStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a pre-built stored infoType to be used for inspection. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateStoredInfoTypeRequest request =
+   *       CreateStoredInfoTypeRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
+   *           .setStoredInfoTypeId("storedInfoTypeId-1409591226")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType createStoredInfoType(CreateStoredInfoTypeRequest request) { + return createStoredInfoTypeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a pre-built stored infoType to be used for inspection. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   CreateStoredInfoTypeRequest request =
+   *       CreateStoredInfoTypeRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
+   *           .setStoredInfoTypeId("storedInfoTypeId-1409591226")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.createStoredInfoTypeCallable().futureCall(request);
+   *   // Do something.
+   *   StoredInfoType response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createStoredInfoTypeCallable() { + return stub.createStoredInfoTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the stored infoType by creating a new version. The existing version will continue to be + * used until the new version is ready. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   StoredInfoTypeName name =
+   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *           "[ORGANIZATION]", "[STORED_INFO_TYPE]");
+   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   StoredInfoType response = dlpServiceClient.updateStoredInfoType(name, config, updateMask);
+   * }
+   * }
+ * + * @param name Required. Resource name of organization and storedInfoType to be updated, for + * example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @param config Updated configuration for the storedInfoType. If not provided, a new version of + * the storedInfoType will be created with the existing configuration. + * @param updateMask Mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType updateStoredInfoType( + StoredInfoTypeName name, StoredInfoTypeConfig config, FieldMask updateMask) { + UpdateStoredInfoTypeRequest request = + UpdateStoredInfoTypeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setConfig(config) + .setUpdateMask(updateMask) + .build(); + return updateStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the stored infoType by creating a new version. The existing version will continue to be + * used until the new version is ready. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name =
+   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *               "[ORGANIZATION]", "[STORED_INFO_TYPE]")
+   *           .toString();
+   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   StoredInfoType response = dlpServiceClient.updateStoredInfoType(name, config, updateMask);
+   * }
+   * }
+ * + * @param name Required. Resource name of organization and storedInfoType to be updated, for + * example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @param config Updated configuration for the storedInfoType. If not provided, a new version of + * the storedInfoType will be created with the existing configuration. + * @param updateMask Mask to control which fields get updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType updateStoredInfoType( + String name, StoredInfoTypeConfig config, FieldMask updateMask) { + UpdateStoredInfoTypeRequest request = + UpdateStoredInfoTypeRequest.newBuilder() + .setName(name) + .setConfig(config) + .setUpdateMask(updateMask) + .build(); + return updateStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the stored infoType by creating a new version. The existing version will continue to be + * used until the new version is ready. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   UpdateStoredInfoTypeRequest request =
+   *       UpdateStoredInfoTypeRequest.newBuilder()
+   *           .setName(
+   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
+   *                   .toString())
+   *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   StoredInfoType response = dlpServiceClient.updateStoredInfoType(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType updateStoredInfoType(UpdateStoredInfoTypeRequest request) { + return updateStoredInfoTypeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the stored infoType by creating a new version. The existing version will continue to be + * used until the new version is ready. See + * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   UpdateStoredInfoTypeRequest request =
+   *       UpdateStoredInfoTypeRequest.newBuilder()
+   *           .setName(
+   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
+   *                   .toString())
+   *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.updateStoredInfoTypeCallable().futureCall(request);
+   *   // Do something.
+   *   StoredInfoType response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateStoredInfoTypeCallable() { + return stub.updateStoredInfoTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   StoredInfoTypeName name =
+   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *           "[ORGANIZATION]", "[STORED_INFO_TYPE]");
+   *   StoredInfoType response = dlpServiceClient.getStoredInfoType(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and storedInfoType to be read, for + * example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType getStoredInfoType(StoredInfoTypeName name) { + GetStoredInfoTypeRequest request = + GetStoredInfoTypeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name =
+   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *               "[ORGANIZATION]", "[STORED_INFO_TYPE]")
+   *           .toString();
+   *   StoredInfoType response = dlpServiceClient.getStoredInfoType(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and storedInfoType to be read, for + * example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType getStoredInfoType(String name) { + GetStoredInfoTypeRequest request = GetStoredInfoTypeRequest.newBuilder().setName(name).build(); + return getStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetStoredInfoTypeRequest request =
+   *       GetStoredInfoTypeRequest.newBuilder()
+   *           .setName(
+   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   StoredInfoType response = dlpServiceClient.getStoredInfoType(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final StoredInfoType getStoredInfoType(GetStoredInfoTypeRequest request) { + return getStoredInfoTypeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   GetStoredInfoTypeRequest request =
+   *       GetStoredInfoTypeRequest.newBuilder()
+   *           .setName(
+   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.getStoredInfoTypeCallable().futureCall(request);
+   *   // Do something.
+   *   StoredInfoType response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getStoredInfoTypeCallable() { + return stub.getStoredInfoTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(LocationName parent) { + ListStoredInfoTypesRequest request = + ListStoredInfoTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listStoredInfoTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListStoredInfoTypesPagedResponse listStoredInfoTypes( + OrganizationLocationName parent) { + ListStoredInfoTypesRequest request = + ListStoredInfoTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listStoredInfoTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(OrganizationName parent) { + ListStoredInfoTypesRequest request = + ListStoredInfoTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listStoredInfoTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(ProjectName parent) { + ListStoredInfoTypesRequest request = + ListStoredInfoTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listStoredInfoTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
+   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent resource name. + *

The format of this value varies depending on the scope of the request (project or + * organization) and whether you have [specified a processing + * location](https://cloud.google.com/dlp/docs/specifying-location): + *

+ Projects scope, location specified:<br/> + * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> + * + Projects scope, no location specified (defaults to global):<br/> + * `projects/`<var>PROJECT_ID</var> + *

The following example `parent` string specifies a parent project with the identifier + * `example-project`, and specifies the `europe-west3` location for processing data: + *

parent=projects/example-project/locations/europe-west3 + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(String parent) { + ListStoredInfoTypesRequest request = + ListStoredInfoTypesRequest.newBuilder().setParent(parent).build(); + return listStoredInfoTypes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListStoredInfoTypesRequest request =
+   *       ListStoredInfoTypesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListStoredInfoTypesPagedResponse listStoredInfoTypes( + ListStoredInfoTypesRequest request) { + return listStoredInfoTypesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListStoredInfoTypesRequest request =
+   *       ListStoredInfoTypesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.listStoredInfoTypesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (StoredInfoType element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listStoredInfoTypesPagedCallable() { + return stub.listStoredInfoTypesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   ListStoredInfoTypesRequest request =
+   *       ListStoredInfoTypesRequest.newBuilder()
+   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setLocationId("locationId1541836720")
+   *           .build();
+   *   while (true) {
+   *     ListStoredInfoTypesResponse response =
+   *         dlpServiceClient.listStoredInfoTypesCallable().call(request);
+   *     for (StoredInfoType element : response.getStoredInfoTypesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listStoredInfoTypesCallable() { + return stub.listStoredInfoTypesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   StoredInfoTypeName name =
+   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *           "[ORGANIZATION]", "[STORED_INFO_TYPE]");
+   *   dlpServiceClient.deleteStoredInfoType(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and storedInfoType to be deleted, for + * example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteStoredInfoType(StoredInfoTypeName name) { + DeleteStoredInfoTypeRequest request = + DeleteStoredInfoTypeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name =
+   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *               "[ORGANIZATION]", "[STORED_INFO_TYPE]")
+   *           .toString();
+   *   dlpServiceClient.deleteStoredInfoType(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the organization and storedInfoType to be deleted, for + * example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteStoredInfoType(String name) { + DeleteStoredInfoTypeRequest request = + DeleteStoredInfoTypeRequest.newBuilder().setName(name).build(); + deleteStoredInfoType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteStoredInfoTypeRequest request =
+   *       DeleteStoredInfoTypeRequest.newBuilder()
+   *           .setName(
+   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   dlpServiceClient.deleteStoredInfoType(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteStoredInfoType(DeleteStoredInfoTypeRequest request) { + deleteStoredInfoTypeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + * learn more. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DeleteStoredInfoTypeRequest request =
+   *       DeleteStoredInfoTypeRequest.newBuilder()
+   *           .setName(
+   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
+   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.deleteStoredInfoTypeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteStoredInfoTypeCallable() { + return stub.deleteStoredInfoTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Inspect hybrid content and store findings to a job. To review the findings, inspect the job. + * Inspection will occur asynchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   DlpJobName name =
+   *       DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]");
+   *   HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the job to execute a hybrid inspect on, for example + * `projects/dlp-test-project/dlpJob/53234423`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HybridInspectResponse hybridInspectDlpJob(DlpJobName name) { + HybridInspectDlpJobRequest request = + HybridInspectDlpJobRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return hybridInspectDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Inspect hybrid content and store findings to a job. To review the findings, inspect the job. + * Inspection will occur asynchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
+   *   HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of the job to execute a hybrid inspect on, for example + * `projects/dlp-test-project/dlpJob/53234423`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HybridInspectResponse hybridInspectDlpJob(String name) { + HybridInspectDlpJobRequest request = + HybridInspectDlpJobRequest.newBuilder().setName(name).build(); + return hybridInspectDlpJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Inspect hybrid content and store findings to a job. To review the findings, inspect the job. + * Inspection will occur asynchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   HybridInspectDlpJobRequest request =
+   *       HybridInspectDlpJobRequest.newBuilder()
+   *           .setName(
+   *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
+   *                   .toString())
+   *           .setHybridItem(HybridContentItem.newBuilder().build())
+   *           .build();
+   *   HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final HybridInspectResponse hybridInspectDlpJob(HybridInspectDlpJobRequest request) { + return hybridInspectDlpJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Inspect hybrid content and store findings to a job. To review the findings, inspect the job. + * Inspection will occur asynchronously. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   HybridInspectDlpJobRequest request =
+   *       HybridInspectDlpJobRequest.newBuilder()
+   *           .setName(
+   *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
+   *                   .toString())
+   *           .setHybridItem(HybridContentItem.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dlpServiceClient.hybridInspectDlpJobCallable().futureCall(request);
+   *   // Do something.
+   *   HybridInspectResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + hybridInspectDlpJobCallable() { + return stub.hybridInspectDlpJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled + * actions that have not yet run. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   FinishDlpJobRequest request =
+   *       FinishDlpJobRequest.newBuilder()
+   *           .setName(
+   *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
+   *                   .toString())
+   *           .build();
+   *   dlpServiceClient.finishDlpJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void finishDlpJob(FinishDlpJobRequest request) { + finishDlpJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled + * actions that have not yet run. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+   *   FinishDlpJobRequest request =
+   *       FinishDlpJobRequest.newBuilder()
+   *           .setName(
+   *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = dlpServiceClient.finishDlpJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable finishDlpJobCallable() { + return stub.finishDlpJobCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListInspectTemplatesPagedResponse + extends AbstractPagedListResponse< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate, + ListInspectTemplatesPage, ListInspectTemplatesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInspectTemplatesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInspectTemplatesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInspectTemplatesPagedResponse(ListInspectTemplatesPage page) { + super(page, ListInspectTemplatesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInspectTemplatesPage + extends AbstractPage< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate, + ListInspectTemplatesPage> { + + private ListInspectTemplatesPage( + PageContext + context, + ListInspectTemplatesResponse response) { + super(context, response); + } + + private static ListInspectTemplatesPage createEmptyPage() { + return new ListInspectTemplatesPage(null, null); + } + + @Override + protected ListInspectTemplatesPage createPage( + PageContext + context, + ListInspectTemplatesResponse response) { + return new ListInspectTemplatesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInspectTemplatesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate, + ListInspectTemplatesPage, ListInspectTemplatesFixedSizeCollection> { + + private ListInspectTemplatesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInspectTemplatesFixedSizeCollection createEmptyCollection() { + return new ListInspectTemplatesFixedSizeCollection(null, 0); + } + + @Override + protected ListInspectTemplatesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInspectTemplatesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDeidentifyTemplatesPagedResponse + extends AbstractPagedListResponse< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate, + ListDeidentifyTemplatesPage, ListDeidentifyTemplatesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDeidentifyTemplatesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDeidentifyTemplatesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDeidentifyTemplatesPagedResponse(ListDeidentifyTemplatesPage page) { + super(page, ListDeidentifyTemplatesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDeidentifyTemplatesPage + extends AbstractPage< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate, + ListDeidentifyTemplatesPage> { + + private ListDeidentifyTemplatesPage( + PageContext< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> + context, + ListDeidentifyTemplatesResponse response) { + super(context, response); + } + + private static ListDeidentifyTemplatesPage createEmptyPage() { + return new ListDeidentifyTemplatesPage(null, null); + } + + @Override + protected ListDeidentifyTemplatesPage createPage( + PageContext< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> + context, + ListDeidentifyTemplatesResponse response) { + return new ListDeidentifyTemplatesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDeidentifyTemplatesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate, + ListDeidentifyTemplatesPage, ListDeidentifyTemplatesFixedSizeCollection> { + + private ListDeidentifyTemplatesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDeidentifyTemplatesFixedSizeCollection createEmptyCollection() { + return new ListDeidentifyTemplatesFixedSizeCollection(null, 0); + } + + @Override + protected ListDeidentifyTemplatesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDeidentifyTemplatesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListJobTriggersPagedResponse + extends AbstractPagedListResponse< + ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger, ListJobTriggersPage, + ListJobTriggersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListJobTriggersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListJobTriggersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListJobTriggersPagedResponse(ListJobTriggersPage page) { + super(page, ListJobTriggersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListJobTriggersPage + extends AbstractPage< + ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger, ListJobTriggersPage> { + + private ListJobTriggersPage( + PageContext context, + ListJobTriggersResponse response) { + super(context, response); + } + + private static ListJobTriggersPage createEmptyPage() { + return new ListJobTriggersPage(null, null); + } + + @Override + protected ListJobTriggersPage createPage( + PageContext context, + ListJobTriggersResponse response) { + return new ListJobTriggersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListJobTriggersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger, ListJobTriggersPage, + ListJobTriggersFixedSizeCollection> { + + private ListJobTriggersFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListJobTriggersFixedSizeCollection createEmptyCollection() { + return new ListJobTriggersFixedSizeCollection(null, 0); + } + + @Override + protected ListJobTriggersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListJobTriggersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDlpJobsPagedResponse + extends AbstractPagedListResponse< + ListDlpJobsRequest, ListDlpJobsResponse, DlpJob, ListDlpJobsPage, + ListDlpJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDlpJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListDlpJobsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListDlpJobsPagedResponse(ListDlpJobsPage page) { + super(page, ListDlpJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDlpJobsPage + extends AbstractPage { + + private ListDlpJobsPage( + PageContext context, + ListDlpJobsResponse response) { + super(context, response); + } + + private static ListDlpJobsPage createEmptyPage() { + return new ListDlpJobsPage(null, null); + } + + @Override + protected ListDlpJobsPage createPage( + PageContext context, + ListDlpJobsResponse response) { + return new ListDlpJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDlpJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDlpJobsRequest, ListDlpJobsResponse, DlpJob, ListDlpJobsPage, + ListDlpJobsFixedSizeCollection> { + + private ListDlpJobsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDlpJobsFixedSizeCollection createEmptyCollection() { + return new ListDlpJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListDlpJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDlpJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListStoredInfoTypesPagedResponse + extends AbstractPagedListResponse< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType, + ListStoredInfoTypesPage, ListStoredInfoTypesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListStoredInfoTypesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListStoredInfoTypesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListStoredInfoTypesPagedResponse(ListStoredInfoTypesPage page) { + super(page, ListStoredInfoTypesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListStoredInfoTypesPage + extends AbstractPage< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType, + ListStoredInfoTypesPage> { + + private ListStoredInfoTypesPage( + PageContext + context, + ListStoredInfoTypesResponse response) { + super(context, response); + } + + private static ListStoredInfoTypesPage createEmptyPage() { + return new ListStoredInfoTypesPage(null, null); + } + + @Override + protected ListStoredInfoTypesPage createPage( + PageContext + context, + ListStoredInfoTypesResponse response) { + return new ListStoredInfoTypesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListStoredInfoTypesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType, + ListStoredInfoTypesPage, ListStoredInfoTypesFixedSizeCollection> { + + private ListStoredInfoTypesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListStoredInfoTypesFixedSizeCollection createEmptyCollection() { + return new ListStoredInfoTypesFixedSizeCollection(null, 0); + } + + @Override + protected ListStoredInfoTypesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListStoredInfoTypesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java new file mode 100644 index 000000000000..179b7a8a2539 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java @@ -0,0 +1,648 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2; + +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dlp.v2.stub.DlpServiceStubSettings; +import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; +import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FinishDlpJobRequest; +import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.GetInspectTemplateRequest; +import com.google.privacy.dlp.v2.GetJobTriggerRequest; +import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; +import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; +import com.google.privacy.dlp.v2.HybridInspectResponse; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ListDlpJobsResponse; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ListJobTriggersResponse; +import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; +import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; +import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; +import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DlpServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dlp.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of inspectContent to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DlpServiceSettings.Builder dlpServiceSettingsBuilder = DlpServiceSettings.newBuilder();
+ * dlpServiceSettingsBuilder
+ *     .inspectContentSettings()
+ *     .setRetrySettings(
+ *         dlpServiceSettingsBuilder
+ *             .inspectContentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DlpServiceSettings dlpServiceSettings = dlpServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DlpServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to inspectContent. */ + public UnaryCallSettings inspectContentSettings() { + return ((DlpServiceStubSettings) getStubSettings()).inspectContentSettings(); + } + + /** Returns the object with the settings used for calls to redactImage. */ + public UnaryCallSettings redactImageSettings() { + return ((DlpServiceStubSettings) getStubSettings()).redactImageSettings(); + } + + /** Returns the object with the settings used for calls to deidentifyContent. */ + public UnaryCallSettings + deidentifyContentSettings() { + return ((DlpServiceStubSettings) getStubSettings()).deidentifyContentSettings(); + } + + /** Returns the object with the settings used for calls to reidentifyContent. */ + public UnaryCallSettings + reidentifyContentSettings() { + return ((DlpServiceStubSettings) getStubSettings()).reidentifyContentSettings(); + } + + /** Returns the object with the settings used for calls to listInfoTypes. */ + public UnaryCallSettings listInfoTypesSettings() { + return ((DlpServiceStubSettings) getStubSettings()).listInfoTypesSettings(); + } + + /** Returns the object with the settings used for calls to createInspectTemplate. */ + public UnaryCallSettings + createInspectTemplateSettings() { + return ((DlpServiceStubSettings) getStubSettings()).createInspectTemplateSettings(); + } + + /** Returns the object with the settings used for calls to updateInspectTemplate. */ + public UnaryCallSettings + updateInspectTemplateSettings() { + return ((DlpServiceStubSettings) getStubSettings()).updateInspectTemplateSettings(); + } + + /** Returns the object with the settings used for calls to getInspectTemplate. */ + public UnaryCallSettings + getInspectTemplateSettings() { + return ((DlpServiceStubSettings) getStubSettings()).getInspectTemplateSettings(); + } + + /** Returns the object with the settings used for calls to listInspectTemplates. */ + public PagedCallSettings< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, + ListInspectTemplatesPagedResponse> + listInspectTemplatesSettings() { + return ((DlpServiceStubSettings) getStubSettings()).listInspectTemplatesSettings(); + } + + /** Returns the object with the settings used for calls to deleteInspectTemplate. */ + public UnaryCallSettings deleteInspectTemplateSettings() { + return ((DlpServiceStubSettings) getStubSettings()).deleteInspectTemplateSettings(); + } + + /** Returns the object with the settings used for calls to createDeidentifyTemplate. */ + public UnaryCallSettings + createDeidentifyTemplateSettings() { + return ((DlpServiceStubSettings) getStubSettings()).createDeidentifyTemplateSettings(); + } + + /** Returns the object with the settings used for calls to updateDeidentifyTemplate. */ + public UnaryCallSettings + updateDeidentifyTemplateSettings() { + return ((DlpServiceStubSettings) getStubSettings()).updateDeidentifyTemplateSettings(); + } + + /** Returns the object with the settings used for calls to getDeidentifyTemplate. */ + public UnaryCallSettings + getDeidentifyTemplateSettings() { + return ((DlpServiceStubSettings) getStubSettings()).getDeidentifyTemplateSettings(); + } + + /** Returns the object with the settings used for calls to listDeidentifyTemplates. */ + public PagedCallSettings< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + ListDeidentifyTemplatesPagedResponse> + listDeidentifyTemplatesSettings() { + return ((DlpServiceStubSettings) getStubSettings()).listDeidentifyTemplatesSettings(); + } + + /** Returns the object with the settings used for calls to deleteDeidentifyTemplate. */ + public UnaryCallSettings + deleteDeidentifyTemplateSettings() { + return ((DlpServiceStubSettings) getStubSettings()).deleteDeidentifyTemplateSettings(); + } + + /** Returns the object with the settings used for calls to createJobTrigger. */ + public UnaryCallSettings createJobTriggerSettings() { + return ((DlpServiceStubSettings) getStubSettings()).createJobTriggerSettings(); + } + + /** Returns the object with the settings used for calls to updateJobTrigger. */ + public UnaryCallSettings updateJobTriggerSettings() { + return ((DlpServiceStubSettings) getStubSettings()).updateJobTriggerSettings(); + } + + /** Returns the object with the settings used for calls to hybridInspectJobTrigger. */ + public UnaryCallSettings + hybridInspectJobTriggerSettings() { + return ((DlpServiceStubSettings) getStubSettings()).hybridInspectJobTriggerSettings(); + } + + /** Returns the object with the settings used for calls to getJobTrigger. */ + public UnaryCallSettings getJobTriggerSettings() { + return ((DlpServiceStubSettings) getStubSettings()).getJobTriggerSettings(); + } + + /** Returns the object with the settings used for calls to listJobTriggers. */ + public PagedCallSettings< + ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> + listJobTriggersSettings() { + return ((DlpServiceStubSettings) getStubSettings()).listJobTriggersSettings(); + } + + /** Returns the object with the settings used for calls to deleteJobTrigger. */ + public UnaryCallSettings deleteJobTriggerSettings() { + return ((DlpServiceStubSettings) getStubSettings()).deleteJobTriggerSettings(); + } + + /** Returns the object with the settings used for calls to activateJobTrigger. */ + public UnaryCallSettings activateJobTriggerSettings() { + return ((DlpServiceStubSettings) getStubSettings()).activateJobTriggerSettings(); + } + + /** Returns the object with the settings used for calls to createDlpJob. */ + public UnaryCallSettings createDlpJobSettings() { + return ((DlpServiceStubSettings) getStubSettings()).createDlpJobSettings(); + } + + /** Returns the object with the settings used for calls to listDlpJobs. */ + public PagedCallSettings + listDlpJobsSettings() { + return ((DlpServiceStubSettings) getStubSettings()).listDlpJobsSettings(); + } + + /** Returns the object with the settings used for calls to getDlpJob. */ + public UnaryCallSettings getDlpJobSettings() { + return ((DlpServiceStubSettings) getStubSettings()).getDlpJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteDlpJob. */ + public UnaryCallSettings deleteDlpJobSettings() { + return ((DlpServiceStubSettings) getStubSettings()).deleteDlpJobSettings(); + } + + /** Returns the object with the settings used for calls to cancelDlpJob. */ + public UnaryCallSettings cancelDlpJobSettings() { + return ((DlpServiceStubSettings) getStubSettings()).cancelDlpJobSettings(); + } + + /** Returns the object with the settings used for calls to createStoredInfoType. */ + public UnaryCallSettings + createStoredInfoTypeSettings() { + return ((DlpServiceStubSettings) getStubSettings()).createStoredInfoTypeSettings(); + } + + /** Returns the object with the settings used for calls to updateStoredInfoType. */ + public UnaryCallSettings + updateStoredInfoTypeSettings() { + return ((DlpServiceStubSettings) getStubSettings()).updateStoredInfoTypeSettings(); + } + + /** Returns the object with the settings used for calls to getStoredInfoType. */ + public UnaryCallSettings getStoredInfoTypeSettings() { + return ((DlpServiceStubSettings) getStubSettings()).getStoredInfoTypeSettings(); + } + + /** Returns the object with the settings used for calls to listStoredInfoTypes. */ + public PagedCallSettings< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, ListStoredInfoTypesPagedResponse> + listStoredInfoTypesSettings() { + return ((DlpServiceStubSettings) getStubSettings()).listStoredInfoTypesSettings(); + } + + /** Returns the object with the settings used for calls to deleteStoredInfoType. */ + public UnaryCallSettings deleteStoredInfoTypeSettings() { + return ((DlpServiceStubSettings) getStubSettings()).deleteStoredInfoTypeSettings(); + } + + /** Returns the object with the settings used for calls to hybridInspectDlpJob. */ + public UnaryCallSettings + hybridInspectDlpJobSettings() { + return ((DlpServiceStubSettings) getStubSettings()).hybridInspectDlpJobSettings(); + } + + /** Returns the object with the settings used for calls to finishDlpJob. */ + public UnaryCallSettings finishDlpJobSettings() { + return ((DlpServiceStubSettings) getStubSettings()).finishDlpJobSettings(); + } + + public static final DlpServiceSettings create(DlpServiceStubSettings stub) throws IOException { + return new DlpServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DlpServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DlpServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DlpServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DlpServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DlpServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DlpServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DlpServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DlpServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DlpServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DlpServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DlpServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DlpServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DlpServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DlpServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DlpServiceStubSettings.newHttpJsonBuilder()); + } + + public DlpServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DlpServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to inspectContent. */ + public UnaryCallSettings.Builder + inspectContentSettings() { + return getStubSettingsBuilder().inspectContentSettings(); + } + + /** Returns the builder for the settings used for calls to redactImage. */ + public UnaryCallSettings.Builder + redactImageSettings() { + return getStubSettingsBuilder().redactImageSettings(); + } + + /** Returns the builder for the settings used for calls to deidentifyContent. */ + public UnaryCallSettings.Builder + deidentifyContentSettings() { + return getStubSettingsBuilder().deidentifyContentSettings(); + } + + /** Returns the builder for the settings used for calls to reidentifyContent. */ + public UnaryCallSettings.Builder + reidentifyContentSettings() { + return getStubSettingsBuilder().reidentifyContentSettings(); + } + + /** Returns the builder for the settings used for calls to listInfoTypes. */ + public UnaryCallSettings.Builder + listInfoTypesSettings() { + return getStubSettingsBuilder().listInfoTypesSettings(); + } + + /** Returns the builder for the settings used for calls to createInspectTemplate. */ + public UnaryCallSettings.Builder + createInspectTemplateSettings() { + return getStubSettingsBuilder().createInspectTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to updateInspectTemplate. */ + public UnaryCallSettings.Builder + updateInspectTemplateSettings() { + return getStubSettingsBuilder().updateInspectTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to getInspectTemplate. */ + public UnaryCallSettings.Builder + getInspectTemplateSettings() { + return getStubSettingsBuilder().getInspectTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to listInspectTemplates. */ + public PagedCallSettings.Builder< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, + ListInspectTemplatesPagedResponse> + listInspectTemplatesSettings() { + return getStubSettingsBuilder().listInspectTemplatesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInspectTemplate. */ + public UnaryCallSettings.Builder + deleteInspectTemplateSettings() { + return getStubSettingsBuilder().deleteInspectTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to createDeidentifyTemplate. */ + public UnaryCallSettings.Builder + createDeidentifyTemplateSettings() { + return getStubSettingsBuilder().createDeidentifyTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to updateDeidentifyTemplate. */ + public UnaryCallSettings.Builder + updateDeidentifyTemplateSettings() { + return getStubSettingsBuilder().updateDeidentifyTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to getDeidentifyTemplate. */ + public UnaryCallSettings.Builder + getDeidentifyTemplateSettings() { + return getStubSettingsBuilder().getDeidentifyTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to listDeidentifyTemplates. */ + public PagedCallSettings.Builder< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + ListDeidentifyTemplatesPagedResponse> + listDeidentifyTemplatesSettings() { + return getStubSettingsBuilder().listDeidentifyTemplatesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDeidentifyTemplate. */ + public UnaryCallSettings.Builder + deleteDeidentifyTemplateSettings() { + return getStubSettingsBuilder().deleteDeidentifyTemplateSettings(); + } + + /** Returns the builder for the settings used for calls to createJobTrigger. */ + public UnaryCallSettings.Builder + createJobTriggerSettings() { + return getStubSettingsBuilder().createJobTriggerSettings(); + } + + /** Returns the builder for the settings used for calls to updateJobTrigger. */ + public UnaryCallSettings.Builder + updateJobTriggerSettings() { + return getStubSettingsBuilder().updateJobTriggerSettings(); + } + + /** Returns the builder for the settings used for calls to hybridInspectJobTrigger. */ + public UnaryCallSettings.Builder + hybridInspectJobTriggerSettings() { + return getStubSettingsBuilder().hybridInspectJobTriggerSettings(); + } + + /** Returns the builder for the settings used for calls to getJobTrigger. */ + public UnaryCallSettings.Builder getJobTriggerSettings() { + return getStubSettingsBuilder().getJobTriggerSettings(); + } + + /** Returns the builder for the settings used for calls to listJobTriggers. */ + public PagedCallSettings.Builder< + ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> + listJobTriggersSettings() { + return getStubSettingsBuilder().listJobTriggersSettings(); + } + + /** Returns the builder for the settings used for calls to deleteJobTrigger. */ + public UnaryCallSettings.Builder deleteJobTriggerSettings() { + return getStubSettingsBuilder().deleteJobTriggerSettings(); + } + + /** Returns the builder for the settings used for calls to activateJobTrigger. */ + public UnaryCallSettings.Builder + activateJobTriggerSettings() { + return getStubSettingsBuilder().activateJobTriggerSettings(); + } + + /** Returns the builder for the settings used for calls to createDlpJob. */ + public UnaryCallSettings.Builder createDlpJobSettings() { + return getStubSettingsBuilder().createDlpJobSettings(); + } + + /** Returns the builder for the settings used for calls to listDlpJobs. */ + public PagedCallSettings.Builder< + ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse> + listDlpJobsSettings() { + return getStubSettingsBuilder().listDlpJobsSettings(); + } + + /** Returns the builder for the settings used for calls to getDlpJob. */ + public UnaryCallSettings.Builder getDlpJobSettings() { + return getStubSettingsBuilder().getDlpJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDlpJob. */ + public UnaryCallSettings.Builder deleteDlpJobSettings() { + return getStubSettingsBuilder().deleteDlpJobSettings(); + } + + /** Returns the builder for the settings used for calls to cancelDlpJob. */ + public UnaryCallSettings.Builder cancelDlpJobSettings() { + return getStubSettingsBuilder().cancelDlpJobSettings(); + } + + /** Returns the builder for the settings used for calls to createStoredInfoType. */ + public UnaryCallSettings.Builder + createStoredInfoTypeSettings() { + return getStubSettingsBuilder().createStoredInfoTypeSettings(); + } + + /** Returns the builder for the settings used for calls to updateStoredInfoType. */ + public UnaryCallSettings.Builder + updateStoredInfoTypeSettings() { + return getStubSettingsBuilder().updateStoredInfoTypeSettings(); + } + + /** Returns the builder for the settings used for calls to getStoredInfoType. */ + public UnaryCallSettings.Builder + getStoredInfoTypeSettings() { + return getStubSettingsBuilder().getStoredInfoTypeSettings(); + } + + /** Returns the builder for the settings used for calls to listStoredInfoTypes. */ + public PagedCallSettings.Builder< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, + ListStoredInfoTypesPagedResponse> + listStoredInfoTypesSettings() { + return getStubSettingsBuilder().listStoredInfoTypesSettings(); + } + + /** Returns the builder for the settings used for calls to deleteStoredInfoType. */ + public UnaryCallSettings.Builder + deleteStoredInfoTypeSettings() { + return getStubSettingsBuilder().deleteStoredInfoTypeSettings(); + } + + /** Returns the builder for the settings used for calls to hybridInspectDlpJob. */ + public UnaryCallSettings.Builder + hybridInspectDlpJobSettings() { + return getStubSettingsBuilder().hybridInspectDlpJobSettings(); + } + + /** Returns the builder for the settings used for calls to finishDlpJob. */ + public UnaryCallSettings.Builder finishDlpJobSettings() { + return getStubSettingsBuilder().finishDlpJobSettings(); + } + + @Override + public DlpServiceSettings build() throws IOException { + return new DlpServiceSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/gapic_metadata.json b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/gapic_metadata.json new file mode 100644 index 000000000000..3afc787269d5 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/gapic_metadata.json @@ -0,0 +1,120 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.privacy.dlp.v2", + "libraryPackage": "com.google.cloud.dlp.v2", + "services": { + "DlpService": { + "clients": { + "grpc": { + "libraryClient": "DlpServiceClient", + "rpcs": { + "ActivateJobTrigger": { + "methods": ["activateJobTrigger", "activateJobTriggerCallable"] + }, + "CancelDlpJob": { + "methods": ["cancelDlpJob", "cancelDlpJobCallable"] + }, + "CreateDeidentifyTemplate": { + "methods": ["createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplateCallable"] + }, + "CreateDlpJob": { + "methods": ["createDlpJob", "createDlpJob", "createDlpJob", "createDlpJob", "createDlpJob", "createDlpJob", "createDlpJob", "createDlpJobCallable"] + }, + "CreateInspectTemplate": { + "methods": ["createInspectTemplate", "createInspectTemplate", "createInspectTemplate", "createInspectTemplate", "createInspectTemplate", "createInspectTemplate", "createInspectTemplateCallable"] + }, + "CreateJobTrigger": { + "methods": ["createJobTrigger", "createJobTrigger", "createJobTrigger", "createJobTrigger", "createJobTriggerCallable"] + }, + "CreateStoredInfoType": { + "methods": ["createStoredInfoType", "createStoredInfoType", "createStoredInfoType", "createStoredInfoType", "createStoredInfoType", "createStoredInfoType", "createStoredInfoTypeCallable"] + }, + "DeidentifyContent": { + "methods": ["deidentifyContent", "deidentifyContentCallable"] + }, + "DeleteDeidentifyTemplate": { + "methods": ["deleteDeidentifyTemplate", "deleteDeidentifyTemplate", "deleteDeidentifyTemplate", "deleteDeidentifyTemplateCallable"] + }, + "DeleteDlpJob": { + "methods": ["deleteDlpJob", "deleteDlpJob", "deleteDlpJob", "deleteDlpJobCallable"] + }, + "DeleteInspectTemplate": { + "methods": ["deleteInspectTemplate", "deleteInspectTemplate", "deleteInspectTemplate", "deleteInspectTemplateCallable"] + }, + "DeleteJobTrigger": { + "methods": ["deleteJobTrigger", "deleteJobTrigger", "deleteJobTrigger", "deleteJobTriggerCallable"] + }, + "DeleteStoredInfoType": { + "methods": ["deleteStoredInfoType", "deleteStoredInfoType", "deleteStoredInfoType", "deleteStoredInfoTypeCallable"] + }, + "FinishDlpJob": { + "methods": ["finishDlpJob", "finishDlpJobCallable"] + }, + "GetDeidentifyTemplate": { + "methods": ["getDeidentifyTemplate", "getDeidentifyTemplate", "getDeidentifyTemplate", "getDeidentifyTemplateCallable"] + }, + "GetDlpJob": { + "methods": ["getDlpJob", "getDlpJob", "getDlpJob", "getDlpJobCallable"] + }, + "GetInspectTemplate": { + "methods": ["getInspectTemplate", "getInspectTemplate", "getInspectTemplate", "getInspectTemplateCallable"] + }, + "GetJobTrigger": { + "methods": ["getJobTrigger", "getJobTrigger", "getJobTrigger", "getJobTriggerCallable"] + }, + "GetStoredInfoType": { + "methods": ["getStoredInfoType", "getStoredInfoType", "getStoredInfoType", "getStoredInfoTypeCallable"] + }, + "HybridInspectDlpJob": { + "methods": ["hybridInspectDlpJob", "hybridInspectDlpJob", "hybridInspectDlpJob", "hybridInspectDlpJobCallable"] + }, + "HybridInspectJobTrigger": { + "methods": ["hybridInspectJobTrigger", "hybridInspectJobTrigger", "hybridInspectJobTrigger", "hybridInspectJobTriggerCallable"] + }, + "InspectContent": { + "methods": ["inspectContent", "inspectContentCallable"] + }, + "ListDeidentifyTemplates": { + "methods": ["listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplatesPagedCallable", "listDeidentifyTemplatesCallable"] + }, + "ListDlpJobs": { + "methods": ["listDlpJobs", "listDlpJobs", "listDlpJobs", "listDlpJobs", "listDlpJobsPagedCallable", "listDlpJobsCallable"] + }, + "ListInfoTypes": { + "methods": ["listInfoTypes", "listInfoTypes", "listInfoTypesCallable"] + }, + "ListInspectTemplates": { + "methods": ["listInspectTemplates", "listInspectTemplates", "listInspectTemplates", "listInspectTemplates", "listInspectTemplates", "listInspectTemplates", "listInspectTemplatesPagedCallable", "listInspectTemplatesCallable"] + }, + "ListJobTriggers": { + "methods": ["listJobTriggers", "listJobTriggers", "listJobTriggers", "listJobTriggers", "listJobTriggersPagedCallable", "listJobTriggersCallable"] + }, + "ListStoredInfoTypes": { + "methods": ["listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypesPagedCallable", "listStoredInfoTypesCallable"] + }, + "RedactImage": { + "methods": ["redactImage", "redactImageCallable"] + }, + "ReidentifyContent": { + "methods": ["reidentifyContent", "reidentifyContentCallable"] + }, + "UpdateDeidentifyTemplate": { + "methods": ["updateDeidentifyTemplate", "updateDeidentifyTemplate", "updateDeidentifyTemplate", "updateDeidentifyTemplateCallable"] + }, + "UpdateInspectTemplate": { + "methods": ["updateInspectTemplate", "updateInspectTemplate", "updateInspectTemplate", "updateInspectTemplateCallable"] + }, + "UpdateJobTrigger": { + "methods": ["updateJobTrigger", "updateJobTrigger", "updateJobTrigger", "updateJobTriggerCallable"] + }, + "UpdateStoredInfoType": { + "methods": ["updateStoredInfoType", "updateStoredInfoType", "updateStoredInfoType", "updateStoredInfoTypeCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java new file mode 100644 index 000000000000..ed4f1afe278a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= DlpServiceClient ======================= + * + *

Service Description: The Cloud Data Loss Prevention (DLP) API is a service that allows clients + * to detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive + * data in user-supplied, unstructured data streams, like text blocks or images. The service also + * includes methods for sensitive data redaction and scheduling of data scans on Google Cloud + * Platform based data sets. + * + *

To learn more about concepts and find how-to guides see https://cloud.google.com/dlp/docs/. + * + *

Sample for DlpServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ *   InspectContentRequest request =
+ *       InspectContentRequest.newBuilder()
+ *           .setParent(ProjectName.of("[PROJECT]").toString())
+ *           .setInspectConfig(InspectConfig.newBuilder().build())
+ *           .setItem(ContentItem.newBuilder().build())
+ *           .setInspectTemplateName("inspectTemplateName1828857433")
+ *           .setLocationId("locationId1541836720")
+ *           .build();
+ *   InspectContentResponse response = dlpServiceClient.inspectContent(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.dlp.v2; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java new file mode 100644 index 000000000000..5b8b410748f8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java @@ -0,0 +1,264 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2.stub; + +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; +import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FinishDlpJobRequest; +import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.GetInspectTemplateRequest; +import com.google.privacy.dlp.v2.GetJobTriggerRequest; +import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; +import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; +import com.google.privacy.dlp.v2.HybridInspectResponse; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ListDlpJobsResponse; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ListJobTriggersResponse; +import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; +import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; +import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; +import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DlpService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DlpServiceStub implements BackgroundResource { + + public UnaryCallable inspectContentCallable() { + throw new UnsupportedOperationException("Not implemented: inspectContentCallable()"); + } + + public UnaryCallable redactImageCallable() { + throw new UnsupportedOperationException("Not implemented: redactImageCallable()"); + } + + public UnaryCallable + deidentifyContentCallable() { + throw new UnsupportedOperationException("Not implemented: deidentifyContentCallable()"); + } + + public UnaryCallable + reidentifyContentCallable() { + throw new UnsupportedOperationException("Not implemented: reidentifyContentCallable()"); + } + + public UnaryCallable listInfoTypesCallable() { + throw new UnsupportedOperationException("Not implemented: listInfoTypesCallable()"); + } + + public UnaryCallable + createInspectTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: createInspectTemplateCallable()"); + } + + public UnaryCallable + updateInspectTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: updateInspectTemplateCallable()"); + } + + public UnaryCallable getInspectTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: getInspectTemplateCallable()"); + } + + public UnaryCallable + listInspectTemplatesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInspectTemplatesPagedCallable()"); + } + + public UnaryCallable + listInspectTemplatesCallable() { + throw new UnsupportedOperationException("Not implemented: listInspectTemplatesCallable()"); + } + + public UnaryCallable deleteInspectTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInspectTemplateCallable()"); + } + + public UnaryCallable + createDeidentifyTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: createDeidentifyTemplateCallable()"); + } + + public UnaryCallable + updateDeidentifyTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: updateDeidentifyTemplateCallable()"); + } + + public UnaryCallable + getDeidentifyTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: getDeidentifyTemplateCallable()"); + } + + public UnaryCallable + listDeidentifyTemplatesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDeidentifyTemplatesPagedCallable()"); + } + + public UnaryCallable + listDeidentifyTemplatesCallable() { + throw new UnsupportedOperationException("Not implemented: listDeidentifyTemplatesCallable()"); + } + + public UnaryCallable deleteDeidentifyTemplateCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDeidentifyTemplateCallable()"); + } + + public UnaryCallable createJobTriggerCallable() { + throw new UnsupportedOperationException("Not implemented: createJobTriggerCallable()"); + } + + public UnaryCallable updateJobTriggerCallable() { + throw new UnsupportedOperationException("Not implemented: updateJobTriggerCallable()"); + } + + public UnaryCallable + hybridInspectJobTriggerCallable() { + throw new UnsupportedOperationException("Not implemented: hybridInspectJobTriggerCallable()"); + } + + public UnaryCallable getJobTriggerCallable() { + throw new UnsupportedOperationException("Not implemented: getJobTriggerCallable()"); + } + + public UnaryCallable + listJobTriggersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listJobTriggersPagedCallable()"); + } + + public UnaryCallable listJobTriggersCallable() { + throw new UnsupportedOperationException("Not implemented: listJobTriggersCallable()"); + } + + public UnaryCallable deleteJobTriggerCallable() { + throw new UnsupportedOperationException("Not implemented: deleteJobTriggerCallable()"); + } + + public UnaryCallable activateJobTriggerCallable() { + throw new UnsupportedOperationException("Not implemented: activateJobTriggerCallable()"); + } + + public UnaryCallable createDlpJobCallable() { + throw new UnsupportedOperationException("Not implemented: createDlpJobCallable()"); + } + + public UnaryCallable listDlpJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDlpJobsPagedCallable()"); + } + + public UnaryCallable listDlpJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listDlpJobsCallable()"); + } + + public UnaryCallable getDlpJobCallable() { + throw new UnsupportedOperationException("Not implemented: getDlpJobCallable()"); + } + + public UnaryCallable deleteDlpJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDlpJobCallable()"); + } + + public UnaryCallable cancelDlpJobCallable() { + throw new UnsupportedOperationException("Not implemented: cancelDlpJobCallable()"); + } + + public UnaryCallable createStoredInfoTypeCallable() { + throw new UnsupportedOperationException("Not implemented: createStoredInfoTypeCallable()"); + } + + public UnaryCallable updateStoredInfoTypeCallable() { + throw new UnsupportedOperationException("Not implemented: updateStoredInfoTypeCallable()"); + } + + public UnaryCallable getStoredInfoTypeCallable() { + throw new UnsupportedOperationException("Not implemented: getStoredInfoTypeCallable()"); + } + + public UnaryCallable + listStoredInfoTypesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listStoredInfoTypesPagedCallable()"); + } + + public UnaryCallable + listStoredInfoTypesCallable() { + throw new UnsupportedOperationException("Not implemented: listStoredInfoTypesCallable()"); + } + + public UnaryCallable deleteStoredInfoTypeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteStoredInfoTypeCallable()"); + } + + public UnaryCallable + hybridInspectDlpJobCallable() { + throw new UnsupportedOperationException("Not implemented: hybridInspectDlpJobCallable()"); + } + + public UnaryCallable finishDlpJobCallable() { + throw new UnsupportedOperationException("Not implemented: finishDlpJobCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java new file mode 100644 index 000000000000..2536c4c11343 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java @@ -0,0 +1,1549 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2.stub; + +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; +import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FinishDlpJobRequest; +import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.GetInspectTemplateRequest; +import com.google.privacy.dlp.v2.GetJobTriggerRequest; +import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; +import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; +import com.google.privacy.dlp.v2.HybridInspectResponse; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ListDlpJobsResponse; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ListJobTriggersResponse; +import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; +import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; +import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; +import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DlpServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dlp.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of inspectContent to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DlpServiceStubSettings.Builder dlpServiceSettingsBuilder = DlpServiceStubSettings.newBuilder();
+ * dlpServiceSettingsBuilder
+ *     .inspectContentSettings()
+ *     .setRetrySettings(
+ *         dlpServiceSettingsBuilder
+ *             .inspectContentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DlpServiceStubSettings dlpServiceSettings = dlpServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DlpServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + inspectContentSettings; + private final UnaryCallSettings redactImageSettings; + private final UnaryCallSettings + deidentifyContentSettings; + private final UnaryCallSettings + reidentifyContentSettings; + private final UnaryCallSettings + listInfoTypesSettings; + private final UnaryCallSettings + createInspectTemplateSettings; + private final UnaryCallSettings + updateInspectTemplateSettings; + private final UnaryCallSettings + getInspectTemplateSettings; + private final PagedCallSettings< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, + ListInspectTemplatesPagedResponse> + listInspectTemplatesSettings; + private final UnaryCallSettings + deleteInspectTemplateSettings; + private final UnaryCallSettings + createDeidentifyTemplateSettings; + private final UnaryCallSettings + updateDeidentifyTemplateSettings; + private final UnaryCallSettings + getDeidentifyTemplateSettings; + private final PagedCallSettings< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + ListDeidentifyTemplatesPagedResponse> + listDeidentifyTemplatesSettings; + private final UnaryCallSettings + deleteDeidentifyTemplateSettings; + private final UnaryCallSettings createJobTriggerSettings; + private final UnaryCallSettings updateJobTriggerSettings; + private final UnaryCallSettings + hybridInspectJobTriggerSettings; + private final UnaryCallSettings getJobTriggerSettings; + private final PagedCallSettings< + ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> + listJobTriggersSettings; + private final UnaryCallSettings deleteJobTriggerSettings; + private final UnaryCallSettings activateJobTriggerSettings; + private final UnaryCallSettings createDlpJobSettings; + private final PagedCallSettings + listDlpJobsSettings; + private final UnaryCallSettings getDlpJobSettings; + private final UnaryCallSettings deleteDlpJobSettings; + private final UnaryCallSettings cancelDlpJobSettings; + private final UnaryCallSettings + createStoredInfoTypeSettings; + private final UnaryCallSettings + updateStoredInfoTypeSettings; + private final UnaryCallSettings + getStoredInfoTypeSettings; + private final PagedCallSettings< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, ListStoredInfoTypesPagedResponse> + listStoredInfoTypesSettings; + private final UnaryCallSettings deleteStoredInfoTypeSettings; + private final UnaryCallSettings + hybridInspectDlpJobSettings; + private final UnaryCallSettings finishDlpJobSettings; + + private static final PagedListDescriptor< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate> + LIST_INSPECT_TEMPLATES_PAGE_STR_DESC = + new PagedListDescriptor< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInspectTemplatesRequest injectToken( + ListInspectTemplatesRequest payload, String token) { + return ListInspectTemplatesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInspectTemplatesRequest injectPageSize( + ListInspectTemplatesRequest payload, int pageSize) { + return ListInspectTemplatesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInspectTemplatesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInspectTemplatesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListInspectTemplatesResponse payload) { + return payload.getInspectTemplatesList() == null + ? ImmutableList.of() + : payload.getInspectTemplatesList(); + } + }; + + private static final PagedListDescriptor< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> + LIST_DEIDENTIFY_TEMPLATES_PAGE_STR_DESC = + new PagedListDescriptor< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + DeidentifyTemplate>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDeidentifyTemplatesRequest injectToken( + ListDeidentifyTemplatesRequest payload, String token) { + return ListDeidentifyTemplatesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDeidentifyTemplatesRequest injectPageSize( + ListDeidentifyTemplatesRequest payload, int pageSize) { + return ListDeidentifyTemplatesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListDeidentifyTemplatesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDeidentifyTemplatesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDeidentifyTemplatesResponse payload) { + return payload.getDeidentifyTemplatesList() == null + ? ImmutableList.of() + : payload.getDeidentifyTemplatesList(); + } + }; + + private static final PagedListDescriptor< + ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> + LIST_JOB_TRIGGERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListJobTriggersRequest injectToken( + ListJobTriggersRequest payload, String token) { + return ListJobTriggersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListJobTriggersRequest injectPageSize( + ListJobTriggersRequest payload, int pageSize) { + return ListJobTriggersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListJobTriggersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListJobTriggersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListJobTriggersResponse payload) { + return payload.getJobTriggersList() == null + ? ImmutableList.of() + : payload.getJobTriggersList(); + } + }; + + private static final PagedListDescriptor + LIST_DLP_JOBS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDlpJobsRequest injectToken(ListDlpJobsRequest payload, String token) { + return ListDlpJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDlpJobsRequest injectPageSize(ListDlpJobsRequest payload, int pageSize) { + return ListDlpJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDlpJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDlpJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDlpJobsResponse payload) { + return payload.getJobsList() == null + ? ImmutableList.of() + : payload.getJobsList(); + } + }; + + private static final PagedListDescriptor< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType> + LIST_STORED_INFO_TYPES_PAGE_STR_DESC = + new PagedListDescriptor< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListStoredInfoTypesRequest injectToken( + ListStoredInfoTypesRequest payload, String token) { + return ListStoredInfoTypesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListStoredInfoTypesRequest injectPageSize( + ListStoredInfoTypesRequest payload, int pageSize) { + return ListStoredInfoTypesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListStoredInfoTypesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListStoredInfoTypesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListStoredInfoTypesResponse payload) { + return payload.getStoredInfoTypesList() == null + ? ImmutableList.of() + : payload.getStoredInfoTypesList(); + } + }; + + private static final PagedListResponseFactory< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, + ListInspectTemplatesPagedResponse> + LIST_INSPECT_TEMPLATES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, + ListInspectTemplatesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInspectTemplatesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate> + pageContext = + PageContext.create( + callable, LIST_INSPECT_TEMPLATES_PAGE_STR_DESC, request, context); + return ListInspectTemplatesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + ListDeidentifyTemplatesPagedResponse> + LIST_DEIDENTIFY_TEMPLATES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + ListDeidentifyTemplatesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListDeidentifyTemplatesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + DeidentifyTemplate> + pageContext = + PageContext.create( + callable, LIST_DEIDENTIFY_TEMPLATES_PAGE_STR_DESC, request, context); + return ListDeidentifyTemplatesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> + LIST_JOB_TRIGGERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListJobTriggersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_JOB_TRIGGERS_PAGE_STR_DESC, request, context); + return ListJobTriggersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse> + LIST_DLP_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDlpJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DLP_JOBS_PAGE_STR_DESC, request, context); + return ListDlpJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, ListStoredInfoTypesPagedResponse> + LIST_STORED_INFO_TYPES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, + ListStoredInfoTypesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListStoredInfoTypesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_STORED_INFO_TYPES_PAGE_STR_DESC, request, context); + return ListStoredInfoTypesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to inspectContent. */ + public UnaryCallSettings inspectContentSettings() { + return inspectContentSettings; + } + + /** Returns the object with the settings used for calls to redactImage. */ + public UnaryCallSettings redactImageSettings() { + return redactImageSettings; + } + + /** Returns the object with the settings used for calls to deidentifyContent. */ + public UnaryCallSettings + deidentifyContentSettings() { + return deidentifyContentSettings; + } + + /** Returns the object with the settings used for calls to reidentifyContent. */ + public UnaryCallSettings + reidentifyContentSettings() { + return reidentifyContentSettings; + } + + /** Returns the object with the settings used for calls to listInfoTypes. */ + public UnaryCallSettings listInfoTypesSettings() { + return listInfoTypesSettings; + } + + /** Returns the object with the settings used for calls to createInspectTemplate. */ + public UnaryCallSettings + createInspectTemplateSettings() { + return createInspectTemplateSettings; + } + + /** Returns the object with the settings used for calls to updateInspectTemplate. */ + public UnaryCallSettings + updateInspectTemplateSettings() { + return updateInspectTemplateSettings; + } + + /** Returns the object with the settings used for calls to getInspectTemplate. */ + public UnaryCallSettings + getInspectTemplateSettings() { + return getInspectTemplateSettings; + } + + /** Returns the object with the settings used for calls to listInspectTemplates. */ + public PagedCallSettings< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, + ListInspectTemplatesPagedResponse> + listInspectTemplatesSettings() { + return listInspectTemplatesSettings; + } + + /** Returns the object with the settings used for calls to deleteInspectTemplate. */ + public UnaryCallSettings deleteInspectTemplateSettings() { + return deleteInspectTemplateSettings; + } + + /** Returns the object with the settings used for calls to createDeidentifyTemplate. */ + public UnaryCallSettings + createDeidentifyTemplateSettings() { + return createDeidentifyTemplateSettings; + } + + /** Returns the object with the settings used for calls to updateDeidentifyTemplate. */ + public UnaryCallSettings + updateDeidentifyTemplateSettings() { + return updateDeidentifyTemplateSettings; + } + + /** Returns the object with the settings used for calls to getDeidentifyTemplate. */ + public UnaryCallSettings + getDeidentifyTemplateSettings() { + return getDeidentifyTemplateSettings; + } + + /** Returns the object with the settings used for calls to listDeidentifyTemplates. */ + public PagedCallSettings< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + ListDeidentifyTemplatesPagedResponse> + listDeidentifyTemplatesSettings() { + return listDeidentifyTemplatesSettings; + } + + /** Returns the object with the settings used for calls to deleteDeidentifyTemplate. */ + public UnaryCallSettings + deleteDeidentifyTemplateSettings() { + return deleteDeidentifyTemplateSettings; + } + + /** Returns the object with the settings used for calls to createJobTrigger. */ + public UnaryCallSettings createJobTriggerSettings() { + return createJobTriggerSettings; + } + + /** Returns the object with the settings used for calls to updateJobTrigger. */ + public UnaryCallSettings updateJobTriggerSettings() { + return updateJobTriggerSettings; + } + + /** Returns the object with the settings used for calls to hybridInspectJobTrigger. */ + public UnaryCallSettings + hybridInspectJobTriggerSettings() { + return hybridInspectJobTriggerSettings; + } + + /** Returns the object with the settings used for calls to getJobTrigger. */ + public UnaryCallSettings getJobTriggerSettings() { + return getJobTriggerSettings; + } + + /** Returns the object with the settings used for calls to listJobTriggers. */ + public PagedCallSettings< + ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> + listJobTriggersSettings() { + return listJobTriggersSettings; + } + + /** Returns the object with the settings used for calls to deleteJobTrigger. */ + public UnaryCallSettings deleteJobTriggerSettings() { + return deleteJobTriggerSettings; + } + + /** Returns the object with the settings used for calls to activateJobTrigger. */ + public UnaryCallSettings activateJobTriggerSettings() { + return activateJobTriggerSettings; + } + + /** Returns the object with the settings used for calls to createDlpJob. */ + public UnaryCallSettings createDlpJobSettings() { + return createDlpJobSettings; + } + + /** Returns the object with the settings used for calls to listDlpJobs. */ + public PagedCallSettings + listDlpJobsSettings() { + return listDlpJobsSettings; + } + + /** Returns the object with the settings used for calls to getDlpJob. */ + public UnaryCallSettings getDlpJobSettings() { + return getDlpJobSettings; + } + + /** Returns the object with the settings used for calls to deleteDlpJob. */ + public UnaryCallSettings deleteDlpJobSettings() { + return deleteDlpJobSettings; + } + + /** Returns the object with the settings used for calls to cancelDlpJob. */ + public UnaryCallSettings cancelDlpJobSettings() { + return cancelDlpJobSettings; + } + + /** Returns the object with the settings used for calls to createStoredInfoType. */ + public UnaryCallSettings + createStoredInfoTypeSettings() { + return createStoredInfoTypeSettings; + } + + /** Returns the object with the settings used for calls to updateStoredInfoType. */ + public UnaryCallSettings + updateStoredInfoTypeSettings() { + return updateStoredInfoTypeSettings; + } + + /** Returns the object with the settings used for calls to getStoredInfoType. */ + public UnaryCallSettings getStoredInfoTypeSettings() { + return getStoredInfoTypeSettings; + } + + /** Returns the object with the settings used for calls to listStoredInfoTypes. */ + public PagedCallSettings< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, ListStoredInfoTypesPagedResponse> + listStoredInfoTypesSettings() { + return listStoredInfoTypesSettings; + } + + /** Returns the object with the settings used for calls to deleteStoredInfoType. */ + public UnaryCallSettings deleteStoredInfoTypeSettings() { + return deleteStoredInfoTypeSettings; + } + + /** Returns the object with the settings used for calls to hybridInspectDlpJob. */ + public UnaryCallSettings + hybridInspectDlpJobSettings() { + return hybridInspectDlpJobSettings; + } + + /** Returns the object with the settings used for calls to finishDlpJob. */ + public UnaryCallSettings finishDlpJobSettings() { + return finishDlpJobSettings; + } + + public DlpServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDlpServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDlpServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "dlp.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "dlp.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DlpServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DlpServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DlpServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DlpServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + inspectContentSettings = settingsBuilder.inspectContentSettings().build(); + redactImageSettings = settingsBuilder.redactImageSettings().build(); + deidentifyContentSettings = settingsBuilder.deidentifyContentSettings().build(); + reidentifyContentSettings = settingsBuilder.reidentifyContentSettings().build(); + listInfoTypesSettings = settingsBuilder.listInfoTypesSettings().build(); + createInspectTemplateSettings = settingsBuilder.createInspectTemplateSettings().build(); + updateInspectTemplateSettings = settingsBuilder.updateInspectTemplateSettings().build(); + getInspectTemplateSettings = settingsBuilder.getInspectTemplateSettings().build(); + listInspectTemplatesSettings = settingsBuilder.listInspectTemplatesSettings().build(); + deleteInspectTemplateSettings = settingsBuilder.deleteInspectTemplateSettings().build(); + createDeidentifyTemplateSettings = settingsBuilder.createDeidentifyTemplateSettings().build(); + updateDeidentifyTemplateSettings = settingsBuilder.updateDeidentifyTemplateSettings().build(); + getDeidentifyTemplateSettings = settingsBuilder.getDeidentifyTemplateSettings().build(); + listDeidentifyTemplatesSettings = settingsBuilder.listDeidentifyTemplatesSettings().build(); + deleteDeidentifyTemplateSettings = settingsBuilder.deleteDeidentifyTemplateSettings().build(); + createJobTriggerSettings = settingsBuilder.createJobTriggerSettings().build(); + updateJobTriggerSettings = settingsBuilder.updateJobTriggerSettings().build(); + hybridInspectJobTriggerSettings = settingsBuilder.hybridInspectJobTriggerSettings().build(); + getJobTriggerSettings = settingsBuilder.getJobTriggerSettings().build(); + listJobTriggersSettings = settingsBuilder.listJobTriggersSettings().build(); + deleteJobTriggerSettings = settingsBuilder.deleteJobTriggerSettings().build(); + activateJobTriggerSettings = settingsBuilder.activateJobTriggerSettings().build(); + createDlpJobSettings = settingsBuilder.createDlpJobSettings().build(); + listDlpJobsSettings = settingsBuilder.listDlpJobsSettings().build(); + getDlpJobSettings = settingsBuilder.getDlpJobSettings().build(); + deleteDlpJobSettings = settingsBuilder.deleteDlpJobSettings().build(); + cancelDlpJobSettings = settingsBuilder.cancelDlpJobSettings().build(); + createStoredInfoTypeSettings = settingsBuilder.createStoredInfoTypeSettings().build(); + updateStoredInfoTypeSettings = settingsBuilder.updateStoredInfoTypeSettings().build(); + getStoredInfoTypeSettings = settingsBuilder.getStoredInfoTypeSettings().build(); + listStoredInfoTypesSettings = settingsBuilder.listStoredInfoTypesSettings().build(); + deleteStoredInfoTypeSettings = settingsBuilder.deleteStoredInfoTypeSettings().build(); + hybridInspectDlpJobSettings = settingsBuilder.hybridInspectDlpJobSettings().build(); + finishDlpJobSettings = settingsBuilder.finishDlpJobSettings().build(); + } + + /** Builder for DlpServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + inspectContentSettings; + private final UnaryCallSettings.Builder + redactImageSettings; + private final UnaryCallSettings.Builder + deidentifyContentSettings; + private final UnaryCallSettings.Builder + reidentifyContentSettings; + private final UnaryCallSettings.Builder + listInfoTypesSettings; + private final UnaryCallSettings.Builder + createInspectTemplateSettings; + private final UnaryCallSettings.Builder + updateInspectTemplateSettings; + private final UnaryCallSettings.Builder + getInspectTemplateSettings; + private final PagedCallSettings.Builder< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, + ListInspectTemplatesPagedResponse> + listInspectTemplatesSettings; + private final UnaryCallSettings.Builder + deleteInspectTemplateSettings; + private final UnaryCallSettings.Builder + createDeidentifyTemplateSettings; + private final UnaryCallSettings.Builder + updateDeidentifyTemplateSettings; + private final UnaryCallSettings.Builder + getDeidentifyTemplateSettings; + private final PagedCallSettings.Builder< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + ListDeidentifyTemplatesPagedResponse> + listDeidentifyTemplatesSettings; + private final UnaryCallSettings.Builder + deleteDeidentifyTemplateSettings; + private final UnaryCallSettings.Builder + createJobTriggerSettings; + private final UnaryCallSettings.Builder + updateJobTriggerSettings; + private final UnaryCallSettings.Builder + hybridInspectJobTriggerSettings; + private final UnaryCallSettings.Builder getJobTriggerSettings; + private final PagedCallSettings.Builder< + ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> + listJobTriggersSettings; + private final UnaryCallSettings.Builder + deleteJobTriggerSettings; + private final UnaryCallSettings.Builder + activateJobTriggerSettings; + private final UnaryCallSettings.Builder createDlpJobSettings; + private final PagedCallSettings.Builder< + ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse> + listDlpJobsSettings; + private final UnaryCallSettings.Builder getDlpJobSettings; + private final UnaryCallSettings.Builder deleteDlpJobSettings; + private final UnaryCallSettings.Builder cancelDlpJobSettings; + private final UnaryCallSettings.Builder + createStoredInfoTypeSettings; + private final UnaryCallSettings.Builder + updateStoredInfoTypeSettings; + private final UnaryCallSettings.Builder + getStoredInfoTypeSettings; + private final PagedCallSettings.Builder< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, + ListStoredInfoTypesPagedResponse> + listStoredInfoTypesSettings; + private final UnaryCallSettings.Builder + deleteStoredInfoTypeSettings; + private final UnaryCallSettings.Builder + hybridInspectDlpJobSettings; + private final UnaryCallSettings.Builder finishDlpJobSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + inspectContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + redactImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deidentifyContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + reidentifyContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listInfoTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInspectTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInspectTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getInspectTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listInspectTemplatesSettings = + PagedCallSettings.newBuilder(LIST_INSPECT_TEMPLATES_PAGE_STR_FACT); + deleteInspectTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDeidentifyTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDeidentifyTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getDeidentifyTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDeidentifyTemplatesSettings = + PagedCallSettings.newBuilder(LIST_DEIDENTIFY_TEMPLATES_PAGE_STR_FACT); + deleteDeidentifyTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + hybridInspectJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listJobTriggersSettings = PagedCallSettings.newBuilder(LIST_JOB_TRIGGERS_PAGE_STR_FACT); + deleteJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + activateJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDlpJobsSettings = PagedCallSettings.newBuilder(LIST_DLP_JOBS_PAGE_STR_FACT); + getDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + cancelDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createStoredInfoTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateStoredInfoTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getStoredInfoTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listStoredInfoTypesSettings = + PagedCallSettings.newBuilder(LIST_STORED_INFO_TYPES_PAGE_STR_FACT); + deleteStoredInfoTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + hybridInspectDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + finishDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + inspectContentSettings, + redactImageSettings, + deidentifyContentSettings, + reidentifyContentSettings, + listInfoTypesSettings, + createInspectTemplateSettings, + updateInspectTemplateSettings, + getInspectTemplateSettings, + listInspectTemplatesSettings, + deleteInspectTemplateSettings, + createDeidentifyTemplateSettings, + updateDeidentifyTemplateSettings, + getDeidentifyTemplateSettings, + listDeidentifyTemplatesSettings, + deleteDeidentifyTemplateSettings, + createJobTriggerSettings, + updateJobTriggerSettings, + hybridInspectJobTriggerSettings, + getJobTriggerSettings, + listJobTriggersSettings, + deleteJobTriggerSettings, + activateJobTriggerSettings, + createDlpJobSettings, + listDlpJobsSettings, + getDlpJobSettings, + deleteDlpJobSettings, + cancelDlpJobSettings, + createStoredInfoTypeSettings, + updateStoredInfoTypeSettings, + getStoredInfoTypeSettings, + listStoredInfoTypesSettings, + deleteStoredInfoTypeSettings, + hybridInspectDlpJobSettings, + finishDlpJobSettings); + initDefaults(this); + } + + protected Builder(DlpServiceStubSettings settings) { + super(settings); + + inspectContentSettings = settings.inspectContentSettings.toBuilder(); + redactImageSettings = settings.redactImageSettings.toBuilder(); + deidentifyContentSettings = settings.deidentifyContentSettings.toBuilder(); + reidentifyContentSettings = settings.reidentifyContentSettings.toBuilder(); + listInfoTypesSettings = settings.listInfoTypesSettings.toBuilder(); + createInspectTemplateSettings = settings.createInspectTemplateSettings.toBuilder(); + updateInspectTemplateSettings = settings.updateInspectTemplateSettings.toBuilder(); + getInspectTemplateSettings = settings.getInspectTemplateSettings.toBuilder(); + listInspectTemplatesSettings = settings.listInspectTemplatesSettings.toBuilder(); + deleteInspectTemplateSettings = settings.deleteInspectTemplateSettings.toBuilder(); + createDeidentifyTemplateSettings = settings.createDeidentifyTemplateSettings.toBuilder(); + updateDeidentifyTemplateSettings = settings.updateDeidentifyTemplateSettings.toBuilder(); + getDeidentifyTemplateSettings = settings.getDeidentifyTemplateSettings.toBuilder(); + listDeidentifyTemplatesSettings = settings.listDeidentifyTemplatesSettings.toBuilder(); + deleteDeidentifyTemplateSettings = settings.deleteDeidentifyTemplateSettings.toBuilder(); + createJobTriggerSettings = settings.createJobTriggerSettings.toBuilder(); + updateJobTriggerSettings = settings.updateJobTriggerSettings.toBuilder(); + hybridInspectJobTriggerSettings = settings.hybridInspectJobTriggerSettings.toBuilder(); + getJobTriggerSettings = settings.getJobTriggerSettings.toBuilder(); + listJobTriggersSettings = settings.listJobTriggersSettings.toBuilder(); + deleteJobTriggerSettings = settings.deleteJobTriggerSettings.toBuilder(); + activateJobTriggerSettings = settings.activateJobTriggerSettings.toBuilder(); + createDlpJobSettings = settings.createDlpJobSettings.toBuilder(); + listDlpJobsSettings = settings.listDlpJobsSettings.toBuilder(); + getDlpJobSettings = settings.getDlpJobSettings.toBuilder(); + deleteDlpJobSettings = settings.deleteDlpJobSettings.toBuilder(); + cancelDlpJobSettings = settings.cancelDlpJobSettings.toBuilder(); + createStoredInfoTypeSettings = settings.createStoredInfoTypeSettings.toBuilder(); + updateStoredInfoTypeSettings = settings.updateStoredInfoTypeSettings.toBuilder(); + getStoredInfoTypeSettings = settings.getStoredInfoTypeSettings.toBuilder(); + listStoredInfoTypesSettings = settings.listStoredInfoTypesSettings.toBuilder(); + deleteStoredInfoTypeSettings = settings.deleteStoredInfoTypeSettings.toBuilder(); + hybridInspectDlpJobSettings = settings.hybridInspectDlpJobSettings.toBuilder(); + finishDlpJobSettings = settings.finishDlpJobSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + inspectContentSettings, + redactImageSettings, + deidentifyContentSettings, + reidentifyContentSettings, + listInfoTypesSettings, + createInspectTemplateSettings, + updateInspectTemplateSettings, + getInspectTemplateSettings, + listInspectTemplatesSettings, + deleteInspectTemplateSettings, + createDeidentifyTemplateSettings, + updateDeidentifyTemplateSettings, + getDeidentifyTemplateSettings, + listDeidentifyTemplatesSettings, + deleteDeidentifyTemplateSettings, + createJobTriggerSettings, + updateJobTriggerSettings, + hybridInspectJobTriggerSettings, + getJobTriggerSettings, + listJobTriggersSettings, + deleteJobTriggerSettings, + activateJobTriggerSettings, + createDlpJobSettings, + listDlpJobsSettings, + getDlpJobSettings, + deleteDlpJobSettings, + cancelDlpJobSettings, + createStoredInfoTypeSettings, + updateStoredInfoTypeSettings, + getStoredInfoTypeSettings, + listStoredInfoTypesSettings, + deleteStoredInfoTypeSettings, + hybridInspectDlpJobSettings, + finishDlpJobSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .inspectContentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .redactImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deidentifyContentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .reidentifyContentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listInfoTypesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createInspectTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateInspectTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getInspectTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listInspectTemplatesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteInspectTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDeidentifyTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateDeidentifyTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getDeidentifyTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listDeidentifyTemplatesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteDeidentifyTemplateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createJobTriggerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateJobTriggerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .hybridInspectJobTriggerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getJobTriggerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listJobTriggersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteJobTriggerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .activateJobTriggerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createDlpJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listDlpJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDlpJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteDlpJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .cancelDlpJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createStoredInfoTypeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateStoredInfoTypeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getStoredInfoTypeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listStoredInfoTypesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteStoredInfoTypeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .hybridInspectDlpJobSettings() + .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("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to inspectContent. */ + public UnaryCallSettings.Builder + inspectContentSettings() { + return inspectContentSettings; + } + + /** Returns the builder for the settings used for calls to redactImage. */ + public UnaryCallSettings.Builder + redactImageSettings() { + return redactImageSettings; + } + + /** Returns the builder for the settings used for calls to deidentifyContent. */ + public UnaryCallSettings.Builder + deidentifyContentSettings() { + return deidentifyContentSettings; + } + + /** Returns the builder for the settings used for calls to reidentifyContent. */ + public UnaryCallSettings.Builder + reidentifyContentSettings() { + return reidentifyContentSettings; + } + + /** Returns the builder for the settings used for calls to listInfoTypes. */ + public UnaryCallSettings.Builder + listInfoTypesSettings() { + return listInfoTypesSettings; + } + + /** Returns the builder for the settings used for calls to createInspectTemplate. */ + public UnaryCallSettings.Builder + createInspectTemplateSettings() { + return createInspectTemplateSettings; + } + + /** Returns the builder for the settings used for calls to updateInspectTemplate. */ + public UnaryCallSettings.Builder + updateInspectTemplateSettings() { + return updateInspectTemplateSettings; + } + + /** Returns the builder for the settings used for calls to getInspectTemplate. */ + public UnaryCallSettings.Builder + getInspectTemplateSettings() { + return getInspectTemplateSettings; + } + + /** Returns the builder for the settings used for calls to listInspectTemplates. */ + public PagedCallSettings.Builder< + ListInspectTemplatesRequest, ListInspectTemplatesResponse, + ListInspectTemplatesPagedResponse> + listInspectTemplatesSettings() { + return listInspectTemplatesSettings; + } + + /** Returns the builder for the settings used for calls to deleteInspectTemplate. */ + public UnaryCallSettings.Builder + deleteInspectTemplateSettings() { + return deleteInspectTemplateSettings; + } + + /** Returns the builder for the settings used for calls to createDeidentifyTemplate. */ + public UnaryCallSettings.Builder + createDeidentifyTemplateSettings() { + return createDeidentifyTemplateSettings; + } + + /** Returns the builder for the settings used for calls to updateDeidentifyTemplate. */ + public UnaryCallSettings.Builder + updateDeidentifyTemplateSettings() { + return updateDeidentifyTemplateSettings; + } + + /** Returns the builder for the settings used for calls to getDeidentifyTemplate. */ + public UnaryCallSettings.Builder + getDeidentifyTemplateSettings() { + return getDeidentifyTemplateSettings; + } + + /** Returns the builder for the settings used for calls to listDeidentifyTemplates. */ + public PagedCallSettings.Builder< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, + ListDeidentifyTemplatesPagedResponse> + listDeidentifyTemplatesSettings() { + return listDeidentifyTemplatesSettings; + } + + /** Returns the builder for the settings used for calls to deleteDeidentifyTemplate. */ + public UnaryCallSettings.Builder + deleteDeidentifyTemplateSettings() { + return deleteDeidentifyTemplateSettings; + } + + /** Returns the builder for the settings used for calls to createJobTrigger. */ + public UnaryCallSettings.Builder + createJobTriggerSettings() { + return createJobTriggerSettings; + } + + /** Returns the builder for the settings used for calls to updateJobTrigger. */ + public UnaryCallSettings.Builder + updateJobTriggerSettings() { + return updateJobTriggerSettings; + } + + /** Returns the builder for the settings used for calls to hybridInspectJobTrigger. */ + public UnaryCallSettings.Builder + hybridInspectJobTriggerSettings() { + return hybridInspectJobTriggerSettings; + } + + /** Returns the builder for the settings used for calls to getJobTrigger. */ + public UnaryCallSettings.Builder getJobTriggerSettings() { + return getJobTriggerSettings; + } + + /** Returns the builder for the settings used for calls to listJobTriggers. */ + public PagedCallSettings.Builder< + ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> + listJobTriggersSettings() { + return listJobTriggersSettings; + } + + /** Returns the builder for the settings used for calls to deleteJobTrigger. */ + public UnaryCallSettings.Builder deleteJobTriggerSettings() { + return deleteJobTriggerSettings; + } + + /** Returns the builder for the settings used for calls to activateJobTrigger. */ + public UnaryCallSettings.Builder + activateJobTriggerSettings() { + return activateJobTriggerSettings; + } + + /** Returns the builder for the settings used for calls to createDlpJob. */ + public UnaryCallSettings.Builder createDlpJobSettings() { + return createDlpJobSettings; + } + + /** Returns the builder for the settings used for calls to listDlpJobs. */ + public PagedCallSettings.Builder< + ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse> + listDlpJobsSettings() { + return listDlpJobsSettings; + } + + /** Returns the builder for the settings used for calls to getDlpJob. */ + public UnaryCallSettings.Builder getDlpJobSettings() { + return getDlpJobSettings; + } + + /** Returns the builder for the settings used for calls to deleteDlpJob. */ + public UnaryCallSettings.Builder deleteDlpJobSettings() { + return deleteDlpJobSettings; + } + + /** Returns the builder for the settings used for calls to cancelDlpJob. */ + public UnaryCallSettings.Builder cancelDlpJobSettings() { + return cancelDlpJobSettings; + } + + /** Returns the builder for the settings used for calls to createStoredInfoType. */ + public UnaryCallSettings.Builder + createStoredInfoTypeSettings() { + return createStoredInfoTypeSettings; + } + + /** Returns the builder for the settings used for calls to updateStoredInfoType. */ + public UnaryCallSettings.Builder + updateStoredInfoTypeSettings() { + return updateStoredInfoTypeSettings; + } + + /** Returns the builder for the settings used for calls to getStoredInfoType. */ + public UnaryCallSettings.Builder + getStoredInfoTypeSettings() { + return getStoredInfoTypeSettings; + } + + /** Returns the builder for the settings used for calls to listStoredInfoTypes. */ + public PagedCallSettings.Builder< + ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, + ListStoredInfoTypesPagedResponse> + listStoredInfoTypesSettings() { + return listStoredInfoTypesSettings; + } + + /** Returns the builder for the settings used for calls to deleteStoredInfoType. */ + public UnaryCallSettings.Builder + deleteStoredInfoTypeSettings() { + return deleteStoredInfoTypeSettings; + } + + /** Returns the builder for the settings used for calls to hybridInspectDlpJob. */ + public UnaryCallSettings.Builder + hybridInspectDlpJobSettings() { + return hybridInspectDlpJobSettings; + } + + /** Returns the builder for the settings used for calls to finishDlpJob. */ + public UnaryCallSettings.Builder finishDlpJobSettings() { + return finishDlpJobSettings; + } + + @Override + public DlpServiceStubSettings build() throws IOException { + return new DlpServiceStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceCallableFactory.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceCallableFactory.java new file mode 100644 index 000000000000..3ca44b42c58c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the DlpService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDlpServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java new file mode 100644 index 000000000000..d50ba9f2b9c0 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java @@ -0,0 +1,1323 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2.stub; + +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; +import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FinishDlpJobRequest; +import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.GetInspectTemplateRequest; +import com.google.privacy.dlp.v2.GetJobTriggerRequest; +import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; +import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; +import com.google.privacy.dlp.v2.HybridInspectResponse; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ListDlpJobsResponse; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ListJobTriggersResponse; +import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; +import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; +import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; +import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DlpService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDlpServiceStub extends DlpServiceStub { + private static final MethodDescriptor + inspectContentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/InspectContent") + .setRequestMarshaller( + ProtoUtils.marshaller(InspectContentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(InspectContentResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + redactImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/RedactImage") + .setRequestMarshaller(ProtoUtils.marshaller(RedactImageRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RedactImageResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deidentifyContentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeidentifyContent") + .setRequestMarshaller( + ProtoUtils.marshaller(DeidentifyContentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DeidentifyContentResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + reidentifyContentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/ReidentifyContent") + .setRequestMarshaller( + ProtoUtils.marshaller(ReidentifyContentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ReidentifyContentResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listInfoTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListInfoTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInfoTypesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInfoTypesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createInspectTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateInspectTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInspectTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(InspectTemplate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateInspectTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateInspectTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateInspectTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(InspectTemplate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getInspectTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetInspectTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(GetInspectTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(InspectTemplate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listInspectTemplatesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListInspectTemplates") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInspectTemplatesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInspectTemplatesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteInspectTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteInspectTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInspectTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDeidentifyTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateDeidentifyTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDeidentifyTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DeidentifyTemplate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDeidentifyTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateDeidentifyTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDeidentifyTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DeidentifyTemplate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDeidentifyTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetDeidentifyTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDeidentifyTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DeidentifyTemplate.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse> + listDeidentifyTemplatesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListDeidentifyTemplates") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDeidentifyTemplatesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDeidentifyTemplatesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDeidentifyTemplateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteDeidentifyTemplate") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDeidentifyTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createJobTriggerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateJobTrigger") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(JobTrigger.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateJobTriggerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateJobTrigger") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(JobTrigger.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + hybridInspectJobTriggerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/HybridInspectJobTrigger") + .setRequestMarshaller( + ProtoUtils.marshaller(HybridInspectJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(HybridInspectResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getJobTriggerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetJobTrigger") + .setRequestMarshaller( + ProtoUtils.marshaller(GetJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(JobTrigger.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listJobTriggersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListJobTriggers") + .setRequestMarshaller( + ProtoUtils.marshaller(ListJobTriggersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListJobTriggersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteJobTriggerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteJobTrigger") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + activateJobTriggerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/ActivateJobTrigger") + .setRequestMarshaller( + ProtoUtils.marshaller(ActivateJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DlpJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createDlpJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateDlpJob") + .setRequestMarshaller(ProtoUtils.marshaller(CreateDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DlpJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDlpJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListDlpJobs") + .setRequestMarshaller(ProtoUtils.marshaller(ListDlpJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDlpJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getDlpJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetDlpJob") + .setRequestMarshaller(ProtoUtils.marshaller(GetDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DlpJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteDlpJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteDlpJob") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor cancelDlpJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/CancelDlpJob") + .setRequestMarshaller(ProtoUtils.marshaller(CancelDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createStoredInfoTypeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateStoredInfoType") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateStoredInfoTypeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(StoredInfoType.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateStoredInfoTypeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateStoredInfoType") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateStoredInfoTypeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(StoredInfoType.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getStoredInfoTypeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetStoredInfoType") + .setRequestMarshaller( + ProtoUtils.marshaller(GetStoredInfoTypeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(StoredInfoType.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listStoredInfoTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListStoredInfoTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListStoredInfoTypesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListStoredInfoTypesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteStoredInfoTypeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteStoredInfoType") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteStoredInfoTypeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + hybridInspectDlpJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/HybridInspectDlpJob") + .setRequestMarshaller( + ProtoUtils.marshaller(HybridInspectDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(HybridInspectResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor finishDlpJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.privacy.dlp.v2.DlpService/FinishDlpJob") + .setRequestMarshaller(ProtoUtils.marshaller(FinishDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final UnaryCallable inspectContentCallable; + private final UnaryCallable redactImageCallable; + private final UnaryCallable + deidentifyContentCallable; + private final UnaryCallable + reidentifyContentCallable; + private final UnaryCallable listInfoTypesCallable; + private final UnaryCallable + createInspectTemplateCallable; + private final UnaryCallable + updateInspectTemplateCallable; + private final UnaryCallable + getInspectTemplateCallable; + private final UnaryCallable + listInspectTemplatesCallable; + private final UnaryCallable + listInspectTemplatesPagedCallable; + private final UnaryCallable deleteInspectTemplateCallable; + private final UnaryCallable + createDeidentifyTemplateCallable; + private final UnaryCallable + updateDeidentifyTemplateCallable; + private final UnaryCallable + getDeidentifyTemplateCallable; + private final UnaryCallable + listDeidentifyTemplatesCallable; + private final UnaryCallable + listDeidentifyTemplatesPagedCallable; + private final UnaryCallable + deleteDeidentifyTemplateCallable; + private final UnaryCallable createJobTriggerCallable; + private final UnaryCallable updateJobTriggerCallable; + private final UnaryCallable + hybridInspectJobTriggerCallable; + private final UnaryCallable getJobTriggerCallable; + private final UnaryCallable + listJobTriggersCallable; + private final UnaryCallable + listJobTriggersPagedCallable; + private final UnaryCallable deleteJobTriggerCallable; + private final UnaryCallable activateJobTriggerCallable; + private final UnaryCallable createDlpJobCallable; + private final UnaryCallable listDlpJobsCallable; + private final UnaryCallable + listDlpJobsPagedCallable; + private final UnaryCallable getDlpJobCallable; + private final UnaryCallable deleteDlpJobCallable; + private final UnaryCallable cancelDlpJobCallable; + private final UnaryCallable + createStoredInfoTypeCallable; + private final UnaryCallable + updateStoredInfoTypeCallable; + private final UnaryCallable getStoredInfoTypeCallable; + private final UnaryCallable + listStoredInfoTypesCallable; + private final UnaryCallable + listStoredInfoTypesPagedCallable; + private final UnaryCallable deleteStoredInfoTypeCallable; + private final UnaryCallable + hybridInspectDlpJobCallable; + private final UnaryCallable finishDlpJobCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDlpServiceStub create(DlpServiceStubSettings settings) + throws IOException { + return new GrpcDlpServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDlpServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcDlpServiceStub(DlpServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDlpServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDlpServiceStub( + DlpServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDlpServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDlpServiceStub(DlpServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDlpServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDlpServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcDlpServiceStub( + DlpServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + inspectContentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(inspectContentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings redactImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(redactImageMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + deidentifyContentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deidentifyContentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + reidentifyContentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(reidentifyContentMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings listInfoTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInfoTypesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + createInspectTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInspectTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateInspectTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateInspectTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + getInspectTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInspectTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listInspectTemplatesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInspectTemplatesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteInspectTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInspectTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createDeidentifyTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDeidentifyTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateDeidentifyTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDeidentifyTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + getDeidentifyTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDeidentifyTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listDeidentifyTemplatesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listDeidentifyTemplatesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + deleteDeidentifyTemplateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDeidentifyTemplateMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createJobTriggerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createJobTriggerMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateJobTriggerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateJobTriggerMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + hybridInspectJobTriggerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(hybridInspectJobTriggerMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getJobTriggerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getJobTriggerMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listJobTriggersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listJobTriggersMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteJobTriggerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteJobTriggerMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings activateJobTriggerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(activateJobTriggerMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings createDlpJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDlpJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings listDlpJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDlpJobsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getDlpJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDlpJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteDlpJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDlpJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings cancelDlpJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelDlpJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createStoredInfoTypeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createStoredInfoTypeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateStoredInfoTypeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateStoredInfoTypeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getStoredInfoTypeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getStoredInfoTypeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listStoredInfoTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listStoredInfoTypesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteStoredInfoTypeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteStoredInfoTypeMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + hybridInspectDlpJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(hybridInspectDlpJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings finishDlpJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(finishDlpJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.inspectContentCallable = + callableFactory.createUnaryCallable( + inspectContentTransportSettings, settings.inspectContentSettings(), clientContext); + this.redactImageCallable = + callableFactory.createUnaryCallable( + redactImageTransportSettings, settings.redactImageSettings(), clientContext); + this.deidentifyContentCallable = + callableFactory.createUnaryCallable( + deidentifyContentTransportSettings, + settings.deidentifyContentSettings(), + clientContext); + this.reidentifyContentCallable = + callableFactory.createUnaryCallable( + reidentifyContentTransportSettings, + settings.reidentifyContentSettings(), + clientContext); + this.listInfoTypesCallable = + callableFactory.createUnaryCallable( + listInfoTypesTransportSettings, settings.listInfoTypesSettings(), clientContext); + this.createInspectTemplateCallable = + callableFactory.createUnaryCallable( + createInspectTemplateTransportSettings, + settings.createInspectTemplateSettings(), + clientContext); + this.updateInspectTemplateCallable = + callableFactory.createUnaryCallable( + updateInspectTemplateTransportSettings, + settings.updateInspectTemplateSettings(), + clientContext); + this.getInspectTemplateCallable = + callableFactory.createUnaryCallable( + getInspectTemplateTransportSettings, + settings.getInspectTemplateSettings(), + clientContext); + this.listInspectTemplatesCallable = + callableFactory.createUnaryCallable( + listInspectTemplatesTransportSettings, + settings.listInspectTemplatesSettings(), + clientContext); + this.listInspectTemplatesPagedCallable = + callableFactory.createPagedCallable( + listInspectTemplatesTransportSettings, + settings.listInspectTemplatesSettings(), + clientContext); + this.deleteInspectTemplateCallable = + callableFactory.createUnaryCallable( + deleteInspectTemplateTransportSettings, + settings.deleteInspectTemplateSettings(), + clientContext); + this.createDeidentifyTemplateCallable = + callableFactory.createUnaryCallable( + createDeidentifyTemplateTransportSettings, + settings.createDeidentifyTemplateSettings(), + clientContext); + this.updateDeidentifyTemplateCallable = + callableFactory.createUnaryCallable( + updateDeidentifyTemplateTransportSettings, + settings.updateDeidentifyTemplateSettings(), + clientContext); + this.getDeidentifyTemplateCallable = + callableFactory.createUnaryCallable( + getDeidentifyTemplateTransportSettings, + settings.getDeidentifyTemplateSettings(), + clientContext); + this.listDeidentifyTemplatesCallable = + callableFactory.createUnaryCallable( + listDeidentifyTemplatesTransportSettings, + settings.listDeidentifyTemplatesSettings(), + clientContext); + this.listDeidentifyTemplatesPagedCallable = + callableFactory.createPagedCallable( + listDeidentifyTemplatesTransportSettings, + settings.listDeidentifyTemplatesSettings(), + clientContext); + this.deleteDeidentifyTemplateCallable = + callableFactory.createUnaryCallable( + deleteDeidentifyTemplateTransportSettings, + settings.deleteDeidentifyTemplateSettings(), + clientContext); + this.createJobTriggerCallable = + callableFactory.createUnaryCallable( + createJobTriggerTransportSettings, settings.createJobTriggerSettings(), clientContext); + this.updateJobTriggerCallable = + callableFactory.createUnaryCallable( + updateJobTriggerTransportSettings, settings.updateJobTriggerSettings(), clientContext); + this.hybridInspectJobTriggerCallable = + callableFactory.createUnaryCallable( + hybridInspectJobTriggerTransportSettings, + settings.hybridInspectJobTriggerSettings(), + clientContext); + this.getJobTriggerCallable = + callableFactory.createUnaryCallable( + getJobTriggerTransportSettings, settings.getJobTriggerSettings(), clientContext); + this.listJobTriggersCallable = + callableFactory.createUnaryCallable( + listJobTriggersTransportSettings, settings.listJobTriggersSettings(), clientContext); + this.listJobTriggersPagedCallable = + callableFactory.createPagedCallable( + listJobTriggersTransportSettings, settings.listJobTriggersSettings(), clientContext); + this.deleteJobTriggerCallable = + callableFactory.createUnaryCallable( + deleteJobTriggerTransportSettings, settings.deleteJobTriggerSettings(), clientContext); + this.activateJobTriggerCallable = + callableFactory.createUnaryCallable( + activateJobTriggerTransportSettings, + settings.activateJobTriggerSettings(), + clientContext); + this.createDlpJobCallable = + callableFactory.createUnaryCallable( + createDlpJobTransportSettings, settings.createDlpJobSettings(), clientContext); + this.listDlpJobsCallable = + callableFactory.createUnaryCallable( + listDlpJobsTransportSettings, settings.listDlpJobsSettings(), clientContext); + this.listDlpJobsPagedCallable = + callableFactory.createPagedCallable( + listDlpJobsTransportSettings, settings.listDlpJobsSettings(), clientContext); + this.getDlpJobCallable = + callableFactory.createUnaryCallable( + getDlpJobTransportSettings, settings.getDlpJobSettings(), clientContext); + this.deleteDlpJobCallable = + callableFactory.createUnaryCallable( + deleteDlpJobTransportSettings, settings.deleteDlpJobSettings(), clientContext); + this.cancelDlpJobCallable = + callableFactory.createUnaryCallable( + cancelDlpJobTransportSettings, settings.cancelDlpJobSettings(), clientContext); + this.createStoredInfoTypeCallable = + callableFactory.createUnaryCallable( + createStoredInfoTypeTransportSettings, + settings.createStoredInfoTypeSettings(), + clientContext); + this.updateStoredInfoTypeCallable = + callableFactory.createUnaryCallable( + updateStoredInfoTypeTransportSettings, + settings.updateStoredInfoTypeSettings(), + clientContext); + this.getStoredInfoTypeCallable = + callableFactory.createUnaryCallable( + getStoredInfoTypeTransportSettings, + settings.getStoredInfoTypeSettings(), + clientContext); + this.listStoredInfoTypesCallable = + callableFactory.createUnaryCallable( + listStoredInfoTypesTransportSettings, + settings.listStoredInfoTypesSettings(), + clientContext); + this.listStoredInfoTypesPagedCallable = + callableFactory.createPagedCallable( + listStoredInfoTypesTransportSettings, + settings.listStoredInfoTypesSettings(), + clientContext); + this.deleteStoredInfoTypeCallable = + callableFactory.createUnaryCallable( + deleteStoredInfoTypeTransportSettings, + settings.deleteStoredInfoTypeSettings(), + clientContext); + this.hybridInspectDlpJobCallable = + callableFactory.createUnaryCallable( + hybridInspectDlpJobTransportSettings, + settings.hybridInspectDlpJobSettings(), + clientContext); + this.finishDlpJobCallable = + callableFactory.createUnaryCallable( + finishDlpJobTransportSettings, settings.finishDlpJobSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable inspectContentCallable() { + return inspectContentCallable; + } + + @Override + public UnaryCallable redactImageCallable() { + return redactImageCallable; + } + + @Override + public UnaryCallable + deidentifyContentCallable() { + return deidentifyContentCallable; + } + + @Override + public UnaryCallable + reidentifyContentCallable() { + return reidentifyContentCallable; + } + + @Override + public UnaryCallable listInfoTypesCallable() { + return listInfoTypesCallable; + } + + @Override + public UnaryCallable + createInspectTemplateCallable() { + return createInspectTemplateCallable; + } + + @Override + public UnaryCallable + updateInspectTemplateCallable() { + return updateInspectTemplateCallable; + } + + @Override + public UnaryCallable getInspectTemplateCallable() { + return getInspectTemplateCallable; + } + + @Override + public UnaryCallable + listInspectTemplatesCallable() { + return listInspectTemplatesCallable; + } + + @Override + public UnaryCallable + listInspectTemplatesPagedCallable() { + return listInspectTemplatesPagedCallable; + } + + @Override + public UnaryCallable deleteInspectTemplateCallable() { + return deleteInspectTemplateCallable; + } + + @Override + public UnaryCallable + createDeidentifyTemplateCallable() { + return createDeidentifyTemplateCallable; + } + + @Override + public UnaryCallable + updateDeidentifyTemplateCallable() { + return updateDeidentifyTemplateCallable; + } + + @Override + public UnaryCallable + getDeidentifyTemplateCallable() { + return getDeidentifyTemplateCallable; + } + + @Override + public UnaryCallable + listDeidentifyTemplatesCallable() { + return listDeidentifyTemplatesCallable; + } + + @Override + public UnaryCallable + listDeidentifyTemplatesPagedCallable() { + return listDeidentifyTemplatesPagedCallable; + } + + @Override + public UnaryCallable deleteDeidentifyTemplateCallable() { + return deleteDeidentifyTemplateCallable; + } + + @Override + public UnaryCallable createJobTriggerCallable() { + return createJobTriggerCallable; + } + + @Override + public UnaryCallable updateJobTriggerCallable() { + return updateJobTriggerCallable; + } + + @Override + public UnaryCallable + hybridInspectJobTriggerCallable() { + return hybridInspectJobTriggerCallable; + } + + @Override + public UnaryCallable getJobTriggerCallable() { + return getJobTriggerCallable; + } + + @Override + public UnaryCallable listJobTriggersCallable() { + return listJobTriggersCallable; + } + + @Override + public UnaryCallable + listJobTriggersPagedCallable() { + return listJobTriggersPagedCallable; + } + + @Override + public UnaryCallable deleteJobTriggerCallable() { + return deleteJobTriggerCallable; + } + + @Override + public UnaryCallable activateJobTriggerCallable() { + return activateJobTriggerCallable; + } + + @Override + public UnaryCallable createDlpJobCallable() { + return createDlpJobCallable; + } + + @Override + public UnaryCallable listDlpJobsCallable() { + return listDlpJobsCallable; + } + + @Override + public UnaryCallable listDlpJobsPagedCallable() { + return listDlpJobsPagedCallable; + } + + @Override + public UnaryCallable getDlpJobCallable() { + return getDlpJobCallable; + } + + @Override + public UnaryCallable deleteDlpJobCallable() { + return deleteDlpJobCallable; + } + + @Override + public UnaryCallable cancelDlpJobCallable() { + return cancelDlpJobCallable; + } + + @Override + public UnaryCallable createStoredInfoTypeCallable() { + return createStoredInfoTypeCallable; + } + + @Override + public UnaryCallable updateStoredInfoTypeCallable() { + return updateStoredInfoTypeCallable; + } + + @Override + public UnaryCallable getStoredInfoTypeCallable() { + return getStoredInfoTypeCallable; + } + + @Override + public UnaryCallable + listStoredInfoTypesCallable() { + return listStoredInfoTypesCallable; + } + + @Override + public UnaryCallable + listStoredInfoTypesPagedCallable() { + return listStoredInfoTypesPagedCallable; + } + + @Override + public UnaryCallable deleteStoredInfoTypeCallable() { + return deleteStoredInfoTypeCallable; + } + + @Override + public UnaryCallable + hybridInspectDlpJobCallable() { + return hybridInspectDlpJobCallable; + } + + @Override + public UnaryCallable finishDlpJobCallable() { + return finishDlpJobCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceCallableFactory.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceCallableFactory.java new file mode 100644 index 000000000000..65d19fac3652 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the DlpService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonDlpServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceStub.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceStub.java new file mode 100644 index 000000000000..627f54d01a15 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceStub.java @@ -0,0 +1,2157 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2.stub; + +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; +import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.FinishDlpJobRequest; +import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.GetInspectTemplateRequest; +import com.google.privacy.dlp.v2.GetJobTriggerRequest; +import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; +import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; +import com.google.privacy.dlp.v2.HybridInspectResponse; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ListDlpJobsResponse; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ListJobTriggersResponse; +import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; +import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; +import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; +import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DlpService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonDlpServiceStub extends DlpServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + inspectContentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/InspectContent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*}/content:inspect", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/content:inspect") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(InspectContentResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + redactImageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/RedactImage") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*}/image:redact", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/image:redact") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RedactImageResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deidentifyContentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeidentifyContent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*}/content:deidentify", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/content:deidentify") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DeidentifyContentResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + reidentifyContentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/ReidentifyContent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*}/content:reidentify", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/content:reidentify") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReidentifyContentResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listInfoTypesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListInfoTypes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/infoTypes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths("/v2/{parent=locations/*}/infoTypes") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam( + fields, "languageCode", request.getLanguageCode()); + serializer.putQueryParam(fields, "locationId", request.getLocationId()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListInfoTypesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createInspectTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateInspectTemplate") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/inspectTemplates", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/locations/*}/inspectTemplates", + "/v2/{parent=projects/*}/inspectTemplates", + "/v2/{parent=projects/*/locations/*}/inspectTemplates") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(InspectTemplate.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateInspectTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateInspectTemplate") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/inspectTemplates/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/inspectTemplates/*}", + "/v2/{name=projects/*/inspectTemplates/*}", + "/v2/{name=projects/*/locations/*/inspectTemplates/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(InspectTemplate.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getInspectTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetInspectTemplate") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/inspectTemplates/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/inspectTemplates/*}", + "/v2/{name=projects/*/inspectTemplates/*}", + "/v2/{name=projects/*/locations/*/inspectTemplates/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(InspectTemplate.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListInspectTemplatesRequest, ListInspectTemplatesResponse> + listInspectTemplatesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListInspectTemplates") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/inspectTemplates", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/locations/*}/inspectTemplates", + "/v2/{parent=projects/*}/inspectTemplates", + "/v2/{parent=projects/*/locations/*}/inspectTemplates") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "locationId", request.getLocationId()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListInspectTemplatesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteInspectTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteInspectTemplate") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/inspectTemplates/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/inspectTemplates/*}", + "/v2/{name=projects/*/inspectTemplates/*}", + "/v2/{name=projects/*/locations/*/inspectTemplates/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDeidentifyTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateDeidentifyTemplate") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/deidentifyTemplates", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates", + "/v2/{parent=projects/*}/deidentifyTemplates", + "/v2/{parent=projects/*/locations/*}/deidentifyTemplates") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DeidentifyTemplate.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateDeidentifyTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateDeidentifyTemplate") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/deidentifyTemplates/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}", + "/v2/{name=projects/*/deidentifyTemplates/*}", + "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DeidentifyTemplate.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDeidentifyTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetDeidentifyTemplate") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/deidentifyTemplates/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}", + "/v2/{name=projects/*/deidentifyTemplates/*}", + "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DeidentifyTemplate.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse> + listDeidentifyTemplatesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListDeidentifyTemplates") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/deidentifyTemplates", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates", + "/v2/{parent=projects/*}/deidentifyTemplates", + "/v2/{parent=projects/*/locations/*}/deidentifyTemplates") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "locationId", request.getLocationId()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDeidentifyTemplatesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteDeidentifyTemplateMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteDeidentifyTemplate") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/deidentifyTemplates/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}", + "/v2/{name=projects/*/deidentifyTemplates/*}", + "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createJobTriggerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateJobTrigger") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*}/jobTriggers", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=projects/*/locations/*}/jobTriggers", + "/v2/{parent=organizations/*/locations/*}/jobTriggers") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(JobTrigger.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateJobTriggerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateJobTrigger") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/jobTriggers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=projects/*/locations/*/jobTriggers/*}", + "/v2/{name=organizations/*/locations/*/jobTriggers/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(JobTrigger.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + hybridInspectJobTriggerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/HybridInspectJobTrigger") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(HybridInspectResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getJobTriggerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetJobTrigger") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/jobTriggers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=projects/*/locations/*/jobTriggers/*}", + "/v2/{name=organizations/*/locations/*/jobTriggers/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(JobTrigger.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listJobTriggersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListJobTriggers") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*}/jobTriggers", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=projects/*/locations/*}/jobTriggers", + "/v2/{parent=organizations/*/locations/*}/jobTriggers") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "locationId", request.getLocationId()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "type", request.getType()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListJobTriggersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteJobTriggerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteJobTrigger") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/jobTriggers/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=projects/*/locations/*/jobTriggers/*}", + "/v2/{name=organizations/*/locations/*/jobTriggers/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + activateJobTriggerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/ActivateJobTrigger") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/jobTriggers/*}:activate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=projects/*/locations/*/jobTriggers/*}:activate") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DlpJob.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDlpJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateDlpJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*}/dlpJobs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/dlpJobs") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DlpJob.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listDlpJobsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListDlpJobs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=projects/*}/dlpJobs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=projects/*/locations/*}/dlpJobs", + "/v2/{parent=organizations/*/locations/*}/dlpJobs") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "locationId", request.getLocationId()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "type", request.getType()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDlpJobsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getDlpJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetDlpJob") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/dlpJobs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths("/v2/{name=projects/*/locations/*/dlpJobs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DlpJob.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteDlpJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteDlpJob") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/dlpJobs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths("/v2/{name=projects/*/locations/*/dlpJobs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + cancelDlpJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/CancelDlpJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/dlpJobs/*}:cancel", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths("/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createStoredInfoTypeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateStoredInfoType") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/storedInfoTypes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/locations/*}/storedInfoTypes", + "/v2/{parent=projects/*}/storedInfoTypes", + "/v2/{parent=projects/*/locations/*}/storedInfoTypes") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(StoredInfoType.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateStoredInfoTypeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateStoredInfoType") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/storedInfoTypes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}", + "/v2/{name=projects/*/storedInfoTypes/*}", + "/v2/{name=projects/*/locations/*/storedInfoTypes/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(StoredInfoType.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getStoredInfoTypeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/GetStoredInfoType") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/storedInfoTypes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}", + "/v2/{name=projects/*/storedInfoTypes/*}", + "/v2/{name=projects/*/locations/*/storedInfoTypes/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(StoredInfoType.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listStoredInfoTypesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/ListStoredInfoTypes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{parent=organizations/*}/storedInfoTypes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v2/{parent=organizations/*/locations/*}/storedInfoTypes", + "/v2/{parent=projects/*}/storedInfoTypes", + "/v2/{parent=projects/*/locations/*}/storedInfoTypes") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "locationId", request.getLocationId()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListStoredInfoTypesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteStoredInfoTypeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteStoredInfoType") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=organizations/*/storedInfoTypes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}", + "/v2/{name=projects/*/storedInfoTypes/*}", + "/v2/{name=projects/*/locations/*/storedInfoTypes/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + hybridInspectDlpJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/HybridInspectDlpJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(HybridInspectResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + finishDlpJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.privacy.dlp.v2.DlpService/FinishDlpJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable inspectContentCallable; + private final UnaryCallable redactImageCallable; + private final UnaryCallable + deidentifyContentCallable; + private final UnaryCallable + reidentifyContentCallable; + private final UnaryCallable listInfoTypesCallable; + private final UnaryCallable + createInspectTemplateCallable; + private final UnaryCallable + updateInspectTemplateCallable; + private final UnaryCallable + getInspectTemplateCallable; + private final UnaryCallable + listInspectTemplatesCallable; + private final UnaryCallable + listInspectTemplatesPagedCallable; + private final UnaryCallable deleteInspectTemplateCallable; + private final UnaryCallable + createDeidentifyTemplateCallable; + private final UnaryCallable + updateDeidentifyTemplateCallable; + private final UnaryCallable + getDeidentifyTemplateCallable; + private final UnaryCallable + listDeidentifyTemplatesCallable; + private final UnaryCallable + listDeidentifyTemplatesPagedCallable; + private final UnaryCallable + deleteDeidentifyTemplateCallable; + private final UnaryCallable createJobTriggerCallable; + private final UnaryCallable updateJobTriggerCallable; + private final UnaryCallable + hybridInspectJobTriggerCallable; + private final UnaryCallable getJobTriggerCallable; + private final UnaryCallable + listJobTriggersCallable; + private final UnaryCallable + listJobTriggersPagedCallable; + private final UnaryCallable deleteJobTriggerCallable; + private final UnaryCallable activateJobTriggerCallable; + private final UnaryCallable createDlpJobCallable; + private final UnaryCallable listDlpJobsCallable; + private final UnaryCallable + listDlpJobsPagedCallable; + private final UnaryCallable getDlpJobCallable; + private final UnaryCallable deleteDlpJobCallable; + private final UnaryCallable cancelDlpJobCallable; + private final UnaryCallable + createStoredInfoTypeCallable; + private final UnaryCallable + updateStoredInfoTypeCallable; + private final UnaryCallable getStoredInfoTypeCallable; + private final UnaryCallable + listStoredInfoTypesCallable; + private final UnaryCallable + listStoredInfoTypesPagedCallable; + private final UnaryCallable deleteStoredInfoTypeCallable; + private final UnaryCallable + hybridInspectDlpJobCallable; + private final UnaryCallable finishDlpJobCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDlpServiceStub create(DlpServiceStubSettings settings) + throws IOException { + return new HttpJsonDlpServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDlpServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDlpServiceStub( + DlpServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDlpServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDlpServiceStub( + DlpServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonDlpServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonDlpServiceStub(DlpServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonDlpServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDlpServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonDlpServiceStub( + DlpServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + inspectContentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(inspectContentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings redactImageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(redactImageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + deidentifyContentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deidentifyContentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + reidentifyContentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(reidentifyContentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listInfoTypesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listInfoTypesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createInspectTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createInspectTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateInspectTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateInspectTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getInspectTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getInspectTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listInspectTemplatesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listInspectTemplatesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + deleteInspectTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteInspectTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createDeidentifyTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDeidentifyTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateDeidentifyTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDeidentifyTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getDeidentifyTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDeidentifyTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listDeidentifyTemplatesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listDeidentifyTemplatesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + deleteDeidentifyTemplateTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDeidentifyTemplateMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createJobTriggerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createJobTriggerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateJobTriggerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateJobTriggerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + hybridInspectJobTriggerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(hybridInspectJobTriggerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getJobTriggerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getJobTriggerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listJobTriggersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listJobTriggersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteJobTriggerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteJobTriggerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings activateJobTriggerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(activateJobTriggerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createDlpJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDlpJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listDlpJobsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDlpJobsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getDlpJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDlpJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteDlpJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDlpJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings cancelDlpJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(cancelDlpJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createStoredInfoTypeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createStoredInfoTypeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateStoredInfoTypeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateStoredInfoTypeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getStoredInfoTypeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getStoredInfoTypeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listStoredInfoTypesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listStoredInfoTypesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteStoredInfoTypeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteStoredInfoTypeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + hybridInspectDlpJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(hybridInspectDlpJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings finishDlpJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(finishDlpJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.inspectContentCallable = + callableFactory.createUnaryCallable( + inspectContentTransportSettings, settings.inspectContentSettings(), clientContext); + this.redactImageCallable = + callableFactory.createUnaryCallable( + redactImageTransportSettings, settings.redactImageSettings(), clientContext); + this.deidentifyContentCallable = + callableFactory.createUnaryCallable( + deidentifyContentTransportSettings, + settings.deidentifyContentSettings(), + clientContext); + this.reidentifyContentCallable = + callableFactory.createUnaryCallable( + reidentifyContentTransportSettings, + settings.reidentifyContentSettings(), + clientContext); + this.listInfoTypesCallable = + callableFactory.createUnaryCallable( + listInfoTypesTransportSettings, settings.listInfoTypesSettings(), clientContext); + this.createInspectTemplateCallable = + callableFactory.createUnaryCallable( + createInspectTemplateTransportSettings, + settings.createInspectTemplateSettings(), + clientContext); + this.updateInspectTemplateCallable = + callableFactory.createUnaryCallable( + updateInspectTemplateTransportSettings, + settings.updateInspectTemplateSettings(), + clientContext); + this.getInspectTemplateCallable = + callableFactory.createUnaryCallable( + getInspectTemplateTransportSettings, + settings.getInspectTemplateSettings(), + clientContext); + this.listInspectTemplatesCallable = + callableFactory.createUnaryCallable( + listInspectTemplatesTransportSettings, + settings.listInspectTemplatesSettings(), + clientContext); + this.listInspectTemplatesPagedCallable = + callableFactory.createPagedCallable( + listInspectTemplatesTransportSettings, + settings.listInspectTemplatesSettings(), + clientContext); + this.deleteInspectTemplateCallable = + callableFactory.createUnaryCallable( + deleteInspectTemplateTransportSettings, + settings.deleteInspectTemplateSettings(), + clientContext); + this.createDeidentifyTemplateCallable = + callableFactory.createUnaryCallable( + createDeidentifyTemplateTransportSettings, + settings.createDeidentifyTemplateSettings(), + clientContext); + this.updateDeidentifyTemplateCallable = + callableFactory.createUnaryCallable( + updateDeidentifyTemplateTransportSettings, + settings.updateDeidentifyTemplateSettings(), + clientContext); + this.getDeidentifyTemplateCallable = + callableFactory.createUnaryCallable( + getDeidentifyTemplateTransportSettings, + settings.getDeidentifyTemplateSettings(), + clientContext); + this.listDeidentifyTemplatesCallable = + callableFactory.createUnaryCallable( + listDeidentifyTemplatesTransportSettings, + settings.listDeidentifyTemplatesSettings(), + clientContext); + this.listDeidentifyTemplatesPagedCallable = + callableFactory.createPagedCallable( + listDeidentifyTemplatesTransportSettings, + settings.listDeidentifyTemplatesSettings(), + clientContext); + this.deleteDeidentifyTemplateCallable = + callableFactory.createUnaryCallable( + deleteDeidentifyTemplateTransportSettings, + settings.deleteDeidentifyTemplateSettings(), + clientContext); + this.createJobTriggerCallable = + callableFactory.createUnaryCallable( + createJobTriggerTransportSettings, settings.createJobTriggerSettings(), clientContext); + this.updateJobTriggerCallable = + callableFactory.createUnaryCallable( + updateJobTriggerTransportSettings, settings.updateJobTriggerSettings(), clientContext); + this.hybridInspectJobTriggerCallable = + callableFactory.createUnaryCallable( + hybridInspectJobTriggerTransportSettings, + settings.hybridInspectJobTriggerSettings(), + clientContext); + this.getJobTriggerCallable = + callableFactory.createUnaryCallable( + getJobTriggerTransportSettings, settings.getJobTriggerSettings(), clientContext); + this.listJobTriggersCallable = + callableFactory.createUnaryCallable( + listJobTriggersTransportSettings, settings.listJobTriggersSettings(), clientContext); + this.listJobTriggersPagedCallable = + callableFactory.createPagedCallable( + listJobTriggersTransportSettings, settings.listJobTriggersSettings(), clientContext); + this.deleteJobTriggerCallable = + callableFactory.createUnaryCallable( + deleteJobTriggerTransportSettings, settings.deleteJobTriggerSettings(), clientContext); + this.activateJobTriggerCallable = + callableFactory.createUnaryCallable( + activateJobTriggerTransportSettings, + settings.activateJobTriggerSettings(), + clientContext); + this.createDlpJobCallable = + callableFactory.createUnaryCallable( + createDlpJobTransportSettings, settings.createDlpJobSettings(), clientContext); + this.listDlpJobsCallable = + callableFactory.createUnaryCallable( + listDlpJobsTransportSettings, settings.listDlpJobsSettings(), clientContext); + this.listDlpJobsPagedCallable = + callableFactory.createPagedCallable( + listDlpJobsTransportSettings, settings.listDlpJobsSettings(), clientContext); + this.getDlpJobCallable = + callableFactory.createUnaryCallable( + getDlpJobTransportSettings, settings.getDlpJobSettings(), clientContext); + this.deleteDlpJobCallable = + callableFactory.createUnaryCallable( + deleteDlpJobTransportSettings, settings.deleteDlpJobSettings(), clientContext); + this.cancelDlpJobCallable = + callableFactory.createUnaryCallable( + cancelDlpJobTransportSettings, settings.cancelDlpJobSettings(), clientContext); + this.createStoredInfoTypeCallable = + callableFactory.createUnaryCallable( + createStoredInfoTypeTransportSettings, + settings.createStoredInfoTypeSettings(), + clientContext); + this.updateStoredInfoTypeCallable = + callableFactory.createUnaryCallable( + updateStoredInfoTypeTransportSettings, + settings.updateStoredInfoTypeSettings(), + clientContext); + this.getStoredInfoTypeCallable = + callableFactory.createUnaryCallable( + getStoredInfoTypeTransportSettings, + settings.getStoredInfoTypeSettings(), + clientContext); + this.listStoredInfoTypesCallable = + callableFactory.createUnaryCallable( + listStoredInfoTypesTransportSettings, + settings.listStoredInfoTypesSettings(), + clientContext); + this.listStoredInfoTypesPagedCallable = + callableFactory.createPagedCallable( + listStoredInfoTypesTransportSettings, + settings.listStoredInfoTypesSettings(), + clientContext); + this.deleteStoredInfoTypeCallable = + callableFactory.createUnaryCallable( + deleteStoredInfoTypeTransportSettings, + settings.deleteStoredInfoTypeSettings(), + clientContext); + this.hybridInspectDlpJobCallable = + callableFactory.createUnaryCallable( + hybridInspectDlpJobTransportSettings, + settings.hybridInspectDlpJobSettings(), + clientContext); + this.finishDlpJobCallable = + callableFactory.createUnaryCallable( + finishDlpJobTransportSettings, settings.finishDlpJobSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(inspectContentMethodDescriptor); + methodDescriptors.add(redactImageMethodDescriptor); + methodDescriptors.add(deidentifyContentMethodDescriptor); + methodDescriptors.add(reidentifyContentMethodDescriptor); + methodDescriptors.add(listInfoTypesMethodDescriptor); + methodDescriptors.add(createInspectTemplateMethodDescriptor); + methodDescriptors.add(updateInspectTemplateMethodDescriptor); + methodDescriptors.add(getInspectTemplateMethodDescriptor); + methodDescriptors.add(listInspectTemplatesMethodDescriptor); + methodDescriptors.add(deleteInspectTemplateMethodDescriptor); + methodDescriptors.add(createDeidentifyTemplateMethodDescriptor); + methodDescriptors.add(updateDeidentifyTemplateMethodDescriptor); + methodDescriptors.add(getDeidentifyTemplateMethodDescriptor); + methodDescriptors.add(listDeidentifyTemplatesMethodDescriptor); + methodDescriptors.add(deleteDeidentifyTemplateMethodDescriptor); + methodDescriptors.add(createJobTriggerMethodDescriptor); + methodDescriptors.add(updateJobTriggerMethodDescriptor); + methodDescriptors.add(hybridInspectJobTriggerMethodDescriptor); + methodDescriptors.add(getJobTriggerMethodDescriptor); + methodDescriptors.add(listJobTriggersMethodDescriptor); + methodDescriptors.add(deleteJobTriggerMethodDescriptor); + methodDescriptors.add(activateJobTriggerMethodDescriptor); + methodDescriptors.add(createDlpJobMethodDescriptor); + methodDescriptors.add(listDlpJobsMethodDescriptor); + methodDescriptors.add(getDlpJobMethodDescriptor); + methodDescriptors.add(deleteDlpJobMethodDescriptor); + methodDescriptors.add(cancelDlpJobMethodDescriptor); + methodDescriptors.add(createStoredInfoTypeMethodDescriptor); + methodDescriptors.add(updateStoredInfoTypeMethodDescriptor); + methodDescriptors.add(getStoredInfoTypeMethodDescriptor); + methodDescriptors.add(listStoredInfoTypesMethodDescriptor); + methodDescriptors.add(deleteStoredInfoTypeMethodDescriptor); + methodDescriptors.add(hybridInspectDlpJobMethodDescriptor); + methodDescriptors.add(finishDlpJobMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable inspectContentCallable() { + return inspectContentCallable; + } + + @Override + public UnaryCallable redactImageCallable() { + return redactImageCallable; + } + + @Override + public UnaryCallable + deidentifyContentCallable() { + return deidentifyContentCallable; + } + + @Override + public UnaryCallable + reidentifyContentCallable() { + return reidentifyContentCallable; + } + + @Override + public UnaryCallable listInfoTypesCallable() { + return listInfoTypesCallable; + } + + @Override + public UnaryCallable + createInspectTemplateCallable() { + return createInspectTemplateCallable; + } + + @Override + public UnaryCallable + updateInspectTemplateCallable() { + return updateInspectTemplateCallable; + } + + @Override + public UnaryCallable getInspectTemplateCallable() { + return getInspectTemplateCallable; + } + + @Override + public UnaryCallable + listInspectTemplatesCallable() { + return listInspectTemplatesCallable; + } + + @Override + public UnaryCallable + listInspectTemplatesPagedCallable() { + return listInspectTemplatesPagedCallable; + } + + @Override + public UnaryCallable deleteInspectTemplateCallable() { + return deleteInspectTemplateCallable; + } + + @Override + public UnaryCallable + createDeidentifyTemplateCallable() { + return createDeidentifyTemplateCallable; + } + + @Override + public UnaryCallable + updateDeidentifyTemplateCallable() { + return updateDeidentifyTemplateCallable; + } + + @Override + public UnaryCallable + getDeidentifyTemplateCallable() { + return getDeidentifyTemplateCallable; + } + + @Override + public UnaryCallable + listDeidentifyTemplatesCallable() { + return listDeidentifyTemplatesCallable; + } + + @Override + public UnaryCallable + listDeidentifyTemplatesPagedCallable() { + return listDeidentifyTemplatesPagedCallable; + } + + @Override + public UnaryCallable deleteDeidentifyTemplateCallable() { + return deleteDeidentifyTemplateCallable; + } + + @Override + public UnaryCallable createJobTriggerCallable() { + return createJobTriggerCallable; + } + + @Override + public UnaryCallable updateJobTriggerCallable() { + return updateJobTriggerCallable; + } + + @Override + public UnaryCallable + hybridInspectJobTriggerCallable() { + return hybridInspectJobTriggerCallable; + } + + @Override + public UnaryCallable getJobTriggerCallable() { + return getJobTriggerCallable; + } + + @Override + public UnaryCallable listJobTriggersCallable() { + return listJobTriggersCallable; + } + + @Override + public UnaryCallable + listJobTriggersPagedCallable() { + return listJobTriggersPagedCallable; + } + + @Override + public UnaryCallable deleteJobTriggerCallable() { + return deleteJobTriggerCallable; + } + + @Override + public UnaryCallable activateJobTriggerCallable() { + return activateJobTriggerCallable; + } + + @Override + public UnaryCallable createDlpJobCallable() { + return createDlpJobCallable; + } + + @Override + public UnaryCallable listDlpJobsCallable() { + return listDlpJobsCallable; + } + + @Override + public UnaryCallable listDlpJobsPagedCallable() { + return listDlpJobsPagedCallable; + } + + @Override + public UnaryCallable getDlpJobCallable() { + return getDlpJobCallable; + } + + @Override + public UnaryCallable deleteDlpJobCallable() { + return deleteDlpJobCallable; + } + + @Override + public UnaryCallable cancelDlpJobCallable() { + return cancelDlpJobCallable; + } + + @Override + public UnaryCallable createStoredInfoTypeCallable() { + return createStoredInfoTypeCallable; + } + + @Override + public UnaryCallable updateStoredInfoTypeCallable() { + return updateStoredInfoTypeCallable; + } + + @Override + public UnaryCallable getStoredInfoTypeCallable() { + return getStoredInfoTypeCallable; + } + + @Override + public UnaryCallable + listStoredInfoTypesCallable() { + return listStoredInfoTypesCallable; + } + + @Override + public UnaryCallable + listStoredInfoTypesPagedCallable() { + return listStoredInfoTypesPagedCallable; + } + + @Override + public UnaryCallable deleteStoredInfoTypeCallable() { + return deleteStoredInfoTypeCallable; + } + + @Override + public UnaryCallable + hybridInspectDlpJobCallable() { + return hybridInspectDlpJobCallable; + } + + @Override + public UnaryCallable finishDlpJobCallable() { + return finishDlpJobCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientHttpJsonTest.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..deeff4d39358 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientHttpJsonTest.java @@ -0,0 +1,4449 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2; + +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.dlp.v2.stub.HttpJsonDlpServiceStub; +import com.google.common.collect.Lists; +import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeidentifyTemplateName; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.DlpJobName; +import com.google.privacy.dlp.v2.DlpJobType; +import com.google.privacy.dlp.v2.Error; +import com.google.privacy.dlp.v2.FinishDlpJobRequest; +import com.google.privacy.dlp.v2.HybridInspectResponse; +import com.google.privacy.dlp.v2.InfoTypeDescription; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.InspectResult; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.InspectTemplateName; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.JobTriggerName; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; +import com.google.privacy.dlp.v2.ListDlpJobsResponse; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ListJobTriggersResponse; +import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.OrganizationLocationName; +import com.google.privacy.dlp.v2.OrganizationName; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; +import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.StoredInfoTypeConfig; +import com.google.privacy.dlp.v2.StoredInfoTypeName; +import com.google.privacy.dlp.v2.StoredInfoTypeVersion; +import com.google.privacy.dlp.v2.TransformationOverview; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DlpServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static DlpServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDlpServiceStub.getMethodDescriptors(), DlpServiceSettings.getDefaultEndpoint()); + DlpServiceSettings settings = + DlpServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DlpServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DlpServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void inspectContentTest() throws Exception { + InspectContentResponse expectedResponse = + InspectContentResponse.newBuilder().setResult(InspectResult.newBuilder().build()).build(); + mockService.addResponse(expectedResponse); + + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setLocationId("locationId1541836720") + .build(); + + InspectContentResponse actualResponse = client.inspectContent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void inspectContentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setLocationId("locationId1541836720") + .build(); + client.inspectContent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void redactImageTest() throws Exception { + RedactImageResponse expectedResponse = + RedactImageResponse.newBuilder() + .setRedactedImage(ByteString.EMPTY) + .setExtractedText("extractedText-106686931") + .setInspectResult(InspectResult.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + RedactImageRequest request = + RedactImageRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setLocationId("locationId1541836720") + .setInspectConfig(InspectConfig.newBuilder().build()) + .addAllImageRedactionConfigs(new ArrayList()) + .setIncludeFindings(true) + .setByteItem(ByteContentItem.newBuilder().build()) + .build(); + + RedactImageResponse actualResponse = client.redactImage(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void redactImageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RedactImageRequest request = + RedactImageRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setLocationId("locationId1541836720") + .setInspectConfig(InspectConfig.newBuilder().build()) + .addAllImageRedactionConfigs(new ArrayList()) + .setIncludeFindings(true) + .setByteItem(ByteContentItem.newBuilder().build()) + .build(); + client.redactImage(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deidentifyContentTest() throws Exception { + DeidentifyContentResponse expectedResponse = + DeidentifyContentResponse.newBuilder() + .setItem(ContentItem.newBuilder().build()) + .setOverview(TransformationOverview.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setDeidentifyTemplateName("deidentifyTemplateName-1374666414") + .setLocationId("locationId1541836720") + .build(); + + DeidentifyContentResponse actualResponse = client.deidentifyContent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deidentifyContentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setDeidentifyTemplateName("deidentifyTemplateName-1374666414") + .setLocationId("locationId1541836720") + .build(); + client.deidentifyContent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void reidentifyContentTest() throws Exception { + ReidentifyContentResponse expectedResponse = + ReidentifyContentResponse.newBuilder() + .setItem(ContentItem.newBuilder().build()) + .setOverview(TransformationOverview.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ReidentifyContentRequest request = + ReidentifyContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setReidentifyConfig(DeidentifyConfig.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setReidentifyTemplateName("reidentifyTemplateName157316612") + .setLocationId("locationId1541836720") + .build(); + + ReidentifyContentResponse actualResponse = client.reidentifyContent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void reidentifyContentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReidentifyContentRequest request = + ReidentifyContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setReidentifyConfig(DeidentifyConfig.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setReidentifyTemplateName("reidentifyTemplateName157316612") + .setLocationId("locationId1541836720") + .build(); + client.reidentifyContent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInfoTypesTest() throws Exception { + ListInfoTypesResponse expectedResponse = + ListInfoTypesResponse.newBuilder() + .addAllInfoTypes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInfoTypesResponse actualResponse = client.listInfoTypes(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInfoTypesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createInspectTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest2() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createInspectTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest3() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createInspectTemplateExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest4() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createInspectTemplateExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest5() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createInspectTemplateExceptionTest5() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateInspectTemplateTest() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + InspectTemplate actualResponse = + client.updateInspectTemplate(name, inspectTemplate, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateInspectTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateInspectTemplate(name, inspectTemplate, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateInspectTemplateTest2() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + InspectTemplate actualResponse = + client.updateInspectTemplate(name, inspectTemplate, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateInspectTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateInspectTemplate(name, inspectTemplate, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInspectTemplateTest() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + + InspectTemplate actualResponse = client.getInspectTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInspectTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + client.getInspectTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInspectTemplateTest2() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; + + InspectTemplate actualResponse = client.getInspectTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getInspectTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; + client.getInspectTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInspectTemplatesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest2() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInspectTemplatesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest3() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInspectTemplatesExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest4() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInspectTemplatesExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest5() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listInspectTemplatesExceptionTest5() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteInspectTemplateTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + + client.deleteInspectTemplate(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteInspectTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + client.deleteInspectTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteInspectTemplateTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; + + client.deleteInspectTemplate(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteInspectTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; + client.deleteInspectTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDeidentifyTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest2() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDeidentifyTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest3() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDeidentifyTemplateExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest4() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDeidentifyTemplateExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest5() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDeidentifyTemplateExceptionTest5() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDeidentifyTemplateTest() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DeidentifyTemplate actualResponse = + client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDeidentifyTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDeidentifyTemplateTest2() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DeidentifyTemplate actualResponse = + client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDeidentifyTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeidentifyTemplateTest() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + + DeidentifyTemplate actualResponse = client.getDeidentifyTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDeidentifyTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + client.getDeidentifyTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeidentifyTemplateTest2() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; + + DeidentifyTemplate actualResponse = client.getDeidentifyTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDeidentifyTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; + client.getDeidentifyTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDeidentifyTemplatesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest2() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDeidentifyTemplatesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest3() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDeidentifyTemplatesExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest4() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDeidentifyTemplatesExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest5() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDeidentifyTemplatesExceptionTest5() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDeidentifyTemplateTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + + client.deleteDeidentifyTemplate(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDeidentifyTemplateExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + client.deleteDeidentifyTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDeidentifyTemplateTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; + + client.deleteDeidentifyTemplate(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDeidentifyTemplateExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; + client.deleteDeidentifyTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createJobTriggerTest() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + + JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createJobTriggerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + client.createJobTrigger(parent, jobTrigger); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createJobTriggerTest2() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + + JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createJobTriggerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + client.createJobTrigger(parent, jobTrigger); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createJobTriggerTest3() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + + JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createJobTriggerExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + client.createJobTrigger(parent, jobTrigger); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateJobTriggerTest() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + JobTrigger actualResponse = client.updateJobTrigger(name, jobTrigger, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateJobTriggerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateJobTrigger(name, jobTrigger, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateJobTriggerTest2() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + JobTrigger actualResponse = client.updateJobTrigger(name, jobTrigger, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateJobTriggerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateJobTrigger(name, jobTrigger, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void hybridInspectJobTriggerTest() throws Exception { + HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + JobTriggerName name = + JobTriggerName.ofProjectLocationJobTriggerName("[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]"); + + HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void hybridInspectJobTriggerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + JobTriggerName name = + JobTriggerName.ofProjectLocationJobTriggerName( + "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]"); + client.hybridInspectJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void hybridInspectJobTriggerTest2() throws Exception { + HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-6030/locations/location-6030/jobTriggers/jobTrigger-6030"; + + HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void hybridInspectJobTriggerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-6030/locations/location-6030/jobTriggers/jobTrigger-6030"; + client.hybridInspectJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobTriggerTest() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + + JobTrigger actualResponse = client.getJobTrigger(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getJobTriggerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + client.getJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobTriggerTest2() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; + + JobTrigger actualResponse = client.getJobTrigger(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getJobTriggerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; + client.getJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobTriggersTest() throws Exception { + JobTrigger responsesElement = JobTrigger.newBuilder().build(); + ListJobTriggersResponse expectedResponse = + ListJobTriggersResponse.newBuilder() + .setNextPageToken("") + .addAllJobTriggers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listJobTriggersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listJobTriggers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobTriggersTest2() throws Exception { + JobTrigger responsesElement = JobTrigger.newBuilder().build(); + ListJobTriggersResponse expectedResponse = + ListJobTriggersResponse.newBuilder() + .setNextPageToken("") + .addAllJobTriggers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listJobTriggersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listJobTriggers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobTriggersTest3() throws Exception { + JobTrigger responsesElement = JobTrigger.newBuilder().build(); + ListJobTriggersResponse expectedResponse = + ListJobTriggersResponse.newBuilder() + .setNextPageToken("") + .addAllJobTriggers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + + ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listJobTriggersExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + client.listJobTriggers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteJobTriggerTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + + client.deleteJobTrigger(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteJobTriggerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + client.deleteJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteJobTriggerTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; + + client.deleteJobTrigger(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteJobTriggerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; + client.deleteJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void activateJobTriggerTest() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ActivateJobTriggerRequest request = + ActivateJobTriggerRequest.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .build(); + + DlpJob actualResponse = client.activateJobTrigger(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void activateJobTriggerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ActivateJobTriggerRequest request = + ActivateJobTriggerRequest.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .build(); + client.activateJobTrigger(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, inspectJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDlpJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + client.createDlpJob(parent, inspectJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest2() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, riskJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDlpJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + client.createDlpJob(parent, riskJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest3() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, inspectJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDlpJobExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + client.createDlpJob(parent, inspectJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest4() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, riskJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDlpJobExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + client.createDlpJob(parent, riskJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest5() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, inspectJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDlpJobExceptionTest5() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + client.createDlpJob(parent, inspectJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest6() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, riskJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDlpJobExceptionTest6() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + client.createDlpJob(parent, riskJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDlpJobsTest() throws Exception { + DlpJob responsesElement = DlpJob.newBuilder().build(); + ListDlpJobsResponse expectedResponse = + ListDlpJobsResponse.newBuilder() + .setNextPageToken("") + .addAllJobs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDlpJobsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDlpJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDlpJobsTest2() throws Exception { + DlpJob responsesElement = DlpJob.newBuilder().build(); + ListDlpJobsResponse expectedResponse = + ListDlpJobsResponse.newBuilder() + .setNextPageToken("") + .addAllJobs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDlpJobsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listDlpJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDlpJobsTest3() throws Exception { + DlpJob responsesElement = DlpJob.newBuilder().build(); + ListDlpJobsResponse expectedResponse = + ListDlpJobsResponse.newBuilder() + .setNextPageToken("") + .addAllJobs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + + ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDlpJobsExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + client.listDlpJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDlpJobTest() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); + + DlpJob actualResponse = client.getDlpJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDlpJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); + client.getDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDlpJobTest2() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2726/dlpJobs/dlpJob-2726"; + + DlpJob actualResponse = client.getDlpJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDlpJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2726/dlpJobs/dlpJob-2726"; + client.getDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDlpJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); + + client.deleteDlpJob(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDlpJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); + client.deleteDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDlpJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2726/dlpJobs/dlpJob-2726"; + + client.deleteDlpJob(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteDlpJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2726/dlpJobs/dlpJob-2726"; + client.deleteDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelDlpJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + CancelDlpJobRequest request = + CancelDlpJobRequest.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .build(); + + client.cancelDlpJob(request); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void cancelDlpJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CancelDlpJobRequest request = + CancelDlpJobRequest.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .build(); + client.cancelDlpJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createStoredInfoTypeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest2() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createStoredInfoTypeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest3() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createStoredInfoTypeExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest4() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createStoredInfoTypeExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest5() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createStoredInfoTypeExceptionTest5() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateStoredInfoTypeTest() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + StoredInfoType actualResponse = client.updateStoredInfoType(name, config, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateStoredInfoTypeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateStoredInfoType(name, config, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateStoredInfoTypeTest2() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + StoredInfoType actualResponse = client.updateStoredInfoType(name, config, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateStoredInfoTypeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateStoredInfoType(name, config, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStoredInfoTypeTest() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); + + StoredInfoType actualResponse = client.getStoredInfoType(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getStoredInfoTypeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]"); + client.getStoredInfoType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStoredInfoTypeTest2() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; + + StoredInfoType actualResponse = client.getStoredInfoType(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getStoredInfoTypeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; + client.getStoredInfoType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listStoredInfoTypesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest2() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listStoredInfoTypesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest3() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listStoredInfoTypesExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest4() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listStoredInfoTypesExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest5() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "organizations/organization-8287"; + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listStoredInfoTypesExceptionTest5() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "organizations/organization-8287"; + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteStoredInfoTypeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); + + client.deleteStoredInfoType(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteStoredInfoTypeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]"); + client.deleteStoredInfoType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteStoredInfoTypeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; + + client.deleteStoredInfoType(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteStoredInfoTypeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; + client.deleteStoredInfoType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void hybridInspectDlpJobTest() throws Exception { + HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + DlpJobName name = + DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]"); + + HybridInspectResponse actualResponse = client.hybridInspectDlpJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void hybridInspectDlpJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DlpJobName name = + DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]"); + client.hybridInspectDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void hybridInspectDlpJobTest2() throws Exception { + HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7036/locations/location-7036/dlpJobs/dlpJob-7036"; + + HybridInspectResponse actualResponse = client.hybridInspectDlpJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void hybridInspectDlpJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7036/locations/location-7036/dlpJobs/dlpJob-7036"; + client.hybridInspectDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void finishDlpJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + FinishDlpJobRequest request = + FinishDlpJobRequest.newBuilder() + .setName( + DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]") + .toString()) + .build(); + + client.finishDlpJob(request); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void finishDlpJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FinishDlpJobRequest request = + FinishDlpJobRequest.newBuilder() + .setName( + DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]") + .toString()) + .build(); + client.finishDlpJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientTest.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientTest.java new file mode 100644 index 000000000000..62090829c3e1 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientTest.java @@ -0,0 +1,4075 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2; + +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; +import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; +import com.google.privacy.dlp.v2.ByteContentItem; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; +import com.google.privacy.dlp.v2.ContentItem; +import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DeidentifyConfig; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeidentifyTemplateName; +import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.DlpJobName; +import com.google.privacy.dlp.v2.DlpJobType; +import com.google.privacy.dlp.v2.Error; +import com.google.privacy.dlp.v2.FinishDlpJobRequest; +import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.GetInspectTemplateRequest; +import com.google.privacy.dlp.v2.GetJobTriggerRequest; +import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; +import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; +import com.google.privacy.dlp.v2.HybridInspectResponse; +import com.google.privacy.dlp.v2.InfoTypeDescription; +import com.google.privacy.dlp.v2.InspectConfig; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectJobConfig; +import com.google.privacy.dlp.v2.InspectResult; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.InspectTemplateName; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.JobTriggerName; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ListDlpJobsResponse; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ListJobTriggersResponse; +import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; +import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.OrganizationLocationName; +import com.google.privacy.dlp.v2.OrganizationName; +import com.google.privacy.dlp.v2.ProjectName; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; +import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.StoredInfoTypeConfig; +import com.google.privacy.dlp.v2.StoredInfoTypeName; +import com.google.privacy.dlp.v2.StoredInfoTypeVersion; +import com.google.privacy.dlp.v2.TransformationOverview; +import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; +import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; +import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DlpServiceClientTest { + private static MockDlpService mockDlpService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DlpServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDlpService = new MockDlpService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDlpService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DlpServiceSettings settings = + DlpServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DlpServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void inspectContentTest() throws Exception { + InspectContentResponse expectedResponse = + InspectContentResponse.newBuilder().setResult(InspectResult.newBuilder().build()).build(); + mockDlpService.addResponse(expectedResponse); + + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setLocationId("locationId1541836720") + .build(); + + InspectContentResponse actualResponse = client.inspectContent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + InspectContentRequest actualRequest = ((InspectContentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getInspectConfig(), actualRequest.getInspectConfig()); + Assert.assertEquals(request.getItem(), actualRequest.getItem()); + Assert.assertEquals(request.getInspectTemplateName(), actualRequest.getInspectTemplateName()); + Assert.assertEquals(request.getLocationId(), actualRequest.getLocationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void inspectContentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + InspectContentRequest request = + InspectContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setLocationId("locationId1541836720") + .build(); + client.inspectContent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void redactImageTest() throws Exception { + RedactImageResponse expectedResponse = + RedactImageResponse.newBuilder() + .setRedactedImage(ByteString.EMPTY) + .setExtractedText("extractedText-106686931") + .setInspectResult(InspectResult.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + RedactImageRequest request = + RedactImageRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setLocationId("locationId1541836720") + .setInspectConfig(InspectConfig.newBuilder().build()) + .addAllImageRedactionConfigs(new ArrayList()) + .setIncludeFindings(true) + .setByteItem(ByteContentItem.newBuilder().build()) + .build(); + + RedactImageResponse actualResponse = client.redactImage(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RedactImageRequest actualRequest = ((RedactImageRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getLocationId(), actualRequest.getLocationId()); + Assert.assertEquals(request.getInspectConfig(), actualRequest.getInspectConfig()); + Assert.assertEquals( + request.getImageRedactionConfigsList(), actualRequest.getImageRedactionConfigsList()); + Assert.assertEquals(request.getIncludeFindings(), actualRequest.getIncludeFindings()); + Assert.assertEquals(request.getByteItem(), actualRequest.getByteItem()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void redactImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + RedactImageRequest request = + RedactImageRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setLocationId("locationId1541836720") + .setInspectConfig(InspectConfig.newBuilder().build()) + .addAllImageRedactionConfigs(new ArrayList()) + .setIncludeFindings(true) + .setByteItem(ByteContentItem.newBuilder().build()) + .build(); + client.redactImage(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deidentifyContentTest() throws Exception { + DeidentifyContentResponse expectedResponse = + DeidentifyContentResponse.newBuilder() + .setItem(ContentItem.newBuilder().build()) + .setOverview(TransformationOverview.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setDeidentifyTemplateName("deidentifyTemplateName-1374666414") + .setLocationId("locationId1541836720") + .build(); + + DeidentifyContentResponse actualResponse = client.deidentifyContent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeidentifyContentRequest actualRequest = ((DeidentifyContentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getDeidentifyConfig(), actualRequest.getDeidentifyConfig()); + Assert.assertEquals(request.getInspectConfig(), actualRequest.getInspectConfig()); + Assert.assertEquals(request.getItem(), actualRequest.getItem()); + Assert.assertEquals(request.getInspectTemplateName(), actualRequest.getInspectTemplateName()); + Assert.assertEquals( + request.getDeidentifyTemplateName(), actualRequest.getDeidentifyTemplateName()); + Assert.assertEquals(request.getLocationId(), actualRequest.getLocationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deidentifyContentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + DeidentifyContentRequest request = + DeidentifyContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setDeidentifyTemplateName("deidentifyTemplateName-1374666414") + .setLocationId("locationId1541836720") + .build(); + client.deidentifyContent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void reidentifyContentTest() throws Exception { + ReidentifyContentResponse expectedResponse = + ReidentifyContentResponse.newBuilder() + .setItem(ContentItem.newBuilder().build()) + .setOverview(TransformationOverview.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + ReidentifyContentRequest request = + ReidentifyContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setReidentifyConfig(DeidentifyConfig.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setReidentifyTemplateName("reidentifyTemplateName157316612") + .setLocationId("locationId1541836720") + .build(); + + ReidentifyContentResponse actualResponse = client.reidentifyContent(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReidentifyContentRequest actualRequest = ((ReidentifyContentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getReidentifyConfig(), actualRequest.getReidentifyConfig()); + Assert.assertEquals(request.getInspectConfig(), actualRequest.getInspectConfig()); + Assert.assertEquals(request.getItem(), actualRequest.getItem()); + Assert.assertEquals(request.getInspectTemplateName(), actualRequest.getInspectTemplateName()); + Assert.assertEquals( + request.getReidentifyTemplateName(), actualRequest.getReidentifyTemplateName()); + Assert.assertEquals(request.getLocationId(), actualRequest.getLocationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void reidentifyContentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ReidentifyContentRequest request = + ReidentifyContentRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setReidentifyConfig(DeidentifyConfig.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .setItem(ContentItem.newBuilder().build()) + .setInspectTemplateName("inspectTemplateName1828857433") + .setReidentifyTemplateName("reidentifyTemplateName157316612") + .setLocationId("locationId1541836720") + .build(); + client.reidentifyContent(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInfoTypesTest() throws Exception { + ListInfoTypesResponse expectedResponse = + ListInfoTypesResponse.newBuilder() + .addAllInfoTypes(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInfoTypesResponse actualResponse = client.listInfoTypes(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInfoTypesRequest actualRequest = ((ListInfoTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInfoTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInspectTemplateRequest actualRequest = + ((CreateInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInspectTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest2() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInspectTemplateRequest actualRequest = + ((CreateInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInspectTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest3() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInspectTemplateRequest actualRequest = + ((CreateInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInspectTemplateExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest4() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInspectTemplateRequest actualRequest = + ((CreateInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInspectTemplateExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInspectTemplateTest5() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + + InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInspectTemplateRequest actualRequest = + ((CreateInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInspectTemplateExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + client.createInspectTemplate(parent, inspectTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateInspectTemplateTest() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + InspectTemplate actualResponse = + client.updateInspectTemplate(name, inspectTemplate, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateInspectTemplateRequest actualRequest = + ((UpdateInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateInspectTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateInspectTemplate(name, inspectTemplate, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateInspectTemplateTest2() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + InspectTemplate actualResponse = + client.updateInspectTemplate(name, inspectTemplate, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateInspectTemplateRequest actualRequest = + ((UpdateInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateInspectTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateInspectTemplate(name, inspectTemplate, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInspectTemplateTest() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + + InspectTemplate actualResponse = client.getInspectTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInspectTemplateRequest actualRequest = ((GetInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInspectTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + client.getInspectTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInspectTemplateTest2() throws Exception { + InspectTemplate expectedResponse = + InspectTemplate.newBuilder() + .setName( + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInspectConfig(InspectConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + InspectTemplate actualResponse = client.getInspectTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInspectTemplateRequest actualRequest = ((GetInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInspectTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.getInspectTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInspectTemplatesRequest actualRequest = + ((ListInspectTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInspectTemplatesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest2() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInspectTemplatesRequest actualRequest = + ((ListInspectTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInspectTemplatesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest3() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInspectTemplatesRequest actualRequest = + ((ListInspectTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInspectTemplatesExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest4() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInspectTemplatesRequest actualRequest = + ((ListInspectTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInspectTemplatesExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInspectTemplatesTest5() throws Exception { + InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); + ListInspectTemplatesResponse expectedResponse = + ListInspectTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllInspectTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInspectTemplatesRequest actualRequest = + ((ListInspectTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInspectTemplatesExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInspectTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteInspectTemplateTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + + client.deleteInspectTemplate(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInspectTemplateRequest actualRequest = + ((DeleteInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInspectTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + InspectTemplateName name = + InspectTemplateName.ofOrganizationInspectTemplateName( + "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); + client.deleteInspectTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteInspectTemplateTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteInspectTemplate(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInspectTemplateRequest actualRequest = + ((DeleteInspectTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInspectTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.deleteInspectTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeidentifyTemplateRequest actualRequest = + ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeidentifyTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest2() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeidentifyTemplateRequest actualRequest = + ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeidentifyTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest3() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeidentifyTemplateRequest actualRequest = + ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeidentifyTemplateExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest4() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeidentifyTemplateRequest actualRequest = + ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeidentifyTemplateExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDeidentifyTemplateTest5() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + + DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeidentifyTemplateRequest actualRequest = + ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeidentifyTemplateExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + client.createDeidentifyTemplate(parent, deidentifyTemplate); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDeidentifyTemplateTest() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DeidentifyTemplate actualResponse = + client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDeidentifyTemplateRequest actualRequest = + ((UpdateDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDeidentifyTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDeidentifyTemplateTest2() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DeidentifyTemplate actualResponse = + client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDeidentifyTemplateRequest actualRequest = + ((UpdateDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDeidentifyTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeidentifyTemplateTest() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + + DeidentifyTemplate actualResponse = client.getDeidentifyTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeidentifyTemplateRequest actualRequest = + ((GetDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeidentifyTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + client.getDeidentifyTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeidentifyTemplateTest2() throws Exception { + DeidentifyTemplate expectedResponse = + DeidentifyTemplate.newBuilder() + .setName( + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + DeidentifyTemplate actualResponse = client.getDeidentifyTemplate(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeidentifyTemplateRequest actualRequest = + ((GetDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeidentifyTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.getDeidentifyTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeidentifyTemplatesRequest actualRequest = + ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeidentifyTemplatesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest2() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeidentifyTemplatesRequest actualRequest = + ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeidentifyTemplatesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest3() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeidentifyTemplatesRequest actualRequest = + ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeidentifyTemplatesExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest4() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeidentifyTemplatesRequest actualRequest = + ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeidentifyTemplatesExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeidentifyTemplatesTest5() throws Exception { + DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); + ListDeidentifyTemplatesResponse expectedResponse = + ListDeidentifyTemplatesResponse.newBuilder() + .setNextPageToken("") + .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeidentifyTemplatesRequest actualRequest = + ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeidentifyTemplatesExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDeidentifyTemplates(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDeidentifyTemplateTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + + client.deleteDeidentifyTemplate(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDeidentifyTemplateRequest actualRequest = + ((DeleteDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDeidentifyTemplateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + DeidentifyTemplateName name = + DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( + "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); + client.deleteDeidentifyTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDeidentifyTemplateTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteDeidentifyTemplate(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDeidentifyTemplateRequest actualRequest = + ((DeleteDeidentifyTemplateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDeidentifyTemplateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDeidentifyTemplate(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createJobTriggerTest() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + + JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateJobTriggerRequest actualRequest = ((CreateJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createJobTriggerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + client.createJobTrigger(parent, jobTrigger); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createJobTriggerTest2() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + + JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateJobTriggerRequest actualRequest = ((CreateJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createJobTriggerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + client.createJobTrigger(parent, jobTrigger); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createJobTriggerTest3() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + + JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateJobTriggerRequest actualRequest = ((CreateJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createJobTriggerExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + client.createJobTrigger(parent, jobTrigger); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateJobTriggerTest() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + JobTrigger actualResponse = client.updateJobTrigger(name, jobTrigger, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateJobTriggerRequest actualRequest = ((UpdateJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateJobTriggerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateJobTrigger(name, jobTrigger, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateJobTriggerTest2() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + JobTrigger actualResponse = client.updateJobTrigger(name, jobTrigger, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateJobTriggerRequest actualRequest = ((UpdateJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateJobTriggerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + JobTrigger jobTrigger = JobTrigger.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateJobTrigger(name, jobTrigger, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void hybridInspectJobTriggerTest() throws Exception { + HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + JobTriggerName name = + JobTriggerName.ofProjectLocationJobTriggerName("[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]"); + + HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + HybridInspectJobTriggerRequest actualRequest = + ((HybridInspectJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void hybridInspectJobTriggerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + JobTriggerName name = + JobTriggerName.ofProjectLocationJobTriggerName( + "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]"); + client.hybridInspectJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void hybridInspectJobTriggerTest2() throws Exception { + HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + HybridInspectJobTriggerRequest actualRequest = + ((HybridInspectJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void hybridInspectJobTriggerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.hybridInspectJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobTriggerTest() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + + JobTrigger actualResponse = client.getJobTrigger(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetJobTriggerRequest actualRequest = ((GetJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getJobTriggerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + client.getJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobTriggerTest2() throws Exception { + JobTrigger expectedResponse = + JobTrigger.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllTriggers(new ArrayList()) + .addAllErrors(new ArrayList()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastRunTime(Timestamp.newBuilder().build()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + JobTrigger actualResponse = client.getJobTrigger(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetJobTriggerRequest actualRequest = ((GetJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getJobTriggerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.getJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobTriggersTest() throws Exception { + JobTrigger responsesElement = JobTrigger.newBuilder().build(); + ListJobTriggersResponse expectedResponse = + ListJobTriggersResponse.newBuilder() + .setNextPageToken("") + .addAllJobTriggers(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListJobTriggersRequest actualRequest = ((ListJobTriggersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listJobTriggersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listJobTriggers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobTriggersTest2() throws Exception { + JobTrigger responsesElement = JobTrigger.newBuilder().build(); + ListJobTriggersResponse expectedResponse = + ListJobTriggersResponse.newBuilder() + .setNextPageToken("") + .addAllJobTriggers(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListJobTriggersRequest actualRequest = ((ListJobTriggersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listJobTriggersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listJobTriggers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobTriggersTest3() throws Exception { + JobTrigger responsesElement = JobTrigger.newBuilder().build(); + ListJobTriggersResponse expectedResponse = + ListJobTriggersResponse.newBuilder() + .setNextPageToken("") + .addAllJobTriggers(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListJobTriggersRequest actualRequest = ((ListJobTriggersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listJobTriggersExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listJobTriggers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteJobTriggerTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + + client.deleteJobTrigger(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteJobTriggerRequest actualRequest = ((DeleteJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteJobTriggerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); + client.deleteJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteJobTriggerTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteJobTrigger(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteJobTriggerRequest actualRequest = ((DeleteJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteJobTriggerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.deleteJobTrigger(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void activateJobTriggerTest() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + ActivateJobTriggerRequest request = + ActivateJobTriggerRequest.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .build(); + + DlpJob actualResponse = client.activateJobTrigger(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ActivateJobTriggerRequest actualRequest = ((ActivateJobTriggerRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void activateJobTriggerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ActivateJobTriggerRequest request = + ActivateJobTriggerRequest.newBuilder() + .setName( + JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) + .build(); + client.activateJobTrigger(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, inspectJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(inspectJob, actualRequest.getInspectJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDlpJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + client.createDlpJob(parent, inspectJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest2() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, riskJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(riskJob, actualRequest.getRiskJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDlpJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + client.createDlpJob(parent, riskJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest3() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, inspectJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(inspectJob, actualRequest.getInspectJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDlpJobExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + client.createDlpJob(parent, inspectJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest4() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, riskJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(riskJob, actualRequest.getRiskJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDlpJobExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + client.createDlpJob(parent, riskJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest5() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, inspectJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(inspectJob, actualRequest.getInspectJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDlpJobExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); + client.createDlpJob(parent, inspectJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDlpJobTest6() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + + DlpJob actualResponse = client.createDlpJob(parent, riskJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(riskJob, actualRequest.getRiskJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDlpJobExceptionTest6() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); + client.createDlpJob(parent, riskJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDlpJobsTest() throws Exception { + DlpJob responsesElement = DlpJob.newBuilder().build(); + ListDlpJobsResponse expectedResponse = + ListDlpJobsResponse.newBuilder() + .setNextPageToken("") + .addAllJobs(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDlpJobsRequest actualRequest = ((ListDlpJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDlpJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDlpJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDlpJobsTest2() throws Exception { + DlpJob responsesElement = DlpJob.newBuilder().build(); + ListDlpJobsResponse expectedResponse = + ListDlpJobsResponse.newBuilder() + .setNextPageToken("") + .addAllJobs(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDlpJobsRequest actualRequest = ((ListDlpJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDlpJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listDlpJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDlpJobsTest3() throws Exception { + DlpJob responsesElement = DlpJob.newBuilder().build(); + ListDlpJobsResponse expectedResponse = + ListDlpJobsResponse.newBuilder() + .setNextPageToken("") + .addAllJobs(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDlpJobsRequest actualRequest = ((ListDlpJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDlpJobsExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDlpJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDlpJobTest() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); + + DlpJob actualResponse = client.getDlpJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDlpJobRequest actualRequest = ((GetDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDlpJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); + client.getDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDlpJobTest2() throws Exception { + DlpJob expectedResponse = + DlpJob.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .setType(DlpJobType.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setJobTriggerName("jobTriggerName494333030") + .addAllErrors(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + DlpJob actualResponse = client.getDlpJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDlpJobRequest actualRequest = ((GetDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDlpJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.getDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDlpJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); + + client.deleteDlpJob(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDlpJobRequest actualRequest = ((DeleteDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDlpJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); + client.deleteDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDlpJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteDlpJob(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDlpJobRequest actualRequest = ((DeleteDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDlpJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelDlpJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + CancelDlpJobRequest request = + CancelDlpJobRequest.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .build(); + + client.cancelDlpJob(request); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelDlpJobRequest actualRequest = ((CancelDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelDlpJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + CancelDlpJobRequest request = + CancelDlpJobRequest.newBuilder() + .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) + .build(); + client.cancelDlpJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateStoredInfoTypeRequest actualRequest = + ((CreateStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(config, actualRequest.getConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createStoredInfoTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest2() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateStoredInfoTypeRequest actualRequest = + ((CreateStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(config, actualRequest.getConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createStoredInfoTypeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest3() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateStoredInfoTypeRequest actualRequest = + ((CreateStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(config, actualRequest.getConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createStoredInfoTypeExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest4() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateStoredInfoTypeRequest actualRequest = + ((CreateStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(config, actualRequest.getConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createStoredInfoTypeExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createStoredInfoTypeTest5() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + + StoredInfoType actualResponse = client.createStoredInfoType(parent, config); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateStoredInfoTypeRequest actualRequest = + ((CreateStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(config, actualRequest.getConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createStoredInfoTypeExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + client.createStoredInfoType(parent, config); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateStoredInfoTypeTest() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + StoredInfoType actualResponse = client.updateStoredInfoType(name, config, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateStoredInfoTypeRequest actualRequest = + ((UpdateStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(config, actualRequest.getConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateStoredInfoTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]"); + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateStoredInfoType(name, config, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateStoredInfoTypeTest2() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + StoredInfoType actualResponse = client.updateStoredInfoType(name, config, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateStoredInfoTypeRequest actualRequest = + ((UpdateStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(config, actualRequest.getConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateStoredInfoTypeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateStoredInfoType(name, config, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStoredInfoTypeTest() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); + + StoredInfoType actualResponse = client.getStoredInfoType(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetStoredInfoTypeRequest actualRequest = ((GetStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getStoredInfoTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]"); + client.getStoredInfoType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStoredInfoTypeTest2() throws Exception { + StoredInfoType expectedResponse = + StoredInfoType.newBuilder() + .setName( + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]") + .toString()) + .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) + .addAllPendingVersions(new ArrayList()) + .build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + StoredInfoType actualResponse = client.getStoredInfoType(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetStoredInfoTypeRequest actualRequest = ((GetStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getStoredInfoTypeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.getStoredInfoType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listStoredInfoTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest2() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listStoredInfoTypesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest3() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listStoredInfoTypesExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest4() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listStoredInfoTypesExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listStoredInfoTypesTest5() throws Exception { + StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); + ListStoredInfoTypesResponse expectedResponse = + ListStoredInfoTypesResponse.newBuilder() + .setNextPageToken("") + .addAllStoredInfoTypes(Arrays.asList(responsesElement)) + .build(); + mockDlpService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listStoredInfoTypesExceptionTest5() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listStoredInfoTypes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteStoredInfoTypeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); + + client.deleteStoredInfoType(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteStoredInfoTypeRequest actualRequest = + ((DeleteStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteStoredInfoTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + StoredInfoTypeName name = + StoredInfoTypeName.ofOrganizationStoredInfoTypeName( + "[ORGANIZATION]", "[STORED_INFO_TYPE]"); + client.deleteStoredInfoType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteStoredInfoTypeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteStoredInfoType(name); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteStoredInfoTypeRequest actualRequest = + ((DeleteStoredInfoTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteStoredInfoTypeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.deleteStoredInfoType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void hybridInspectDlpJobTest() throws Exception { + HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + DlpJobName name = + DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]"); + + HybridInspectResponse actualResponse = client.hybridInspectDlpJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + HybridInspectDlpJobRequest actualRequest = ((HybridInspectDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void hybridInspectDlpJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + DlpJobName name = + DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]"); + client.hybridInspectDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void hybridInspectDlpJobTest2() throws Exception { + HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + String name = "name3373707"; + + HybridInspectResponse actualResponse = client.hybridInspectDlpJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + HybridInspectDlpJobRequest actualRequest = ((HybridInspectDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void hybridInspectDlpJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + String name = "name3373707"; + client.hybridInspectDlpJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void finishDlpJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockDlpService.addResponse(expectedResponse); + + FinishDlpJobRequest request = + FinishDlpJobRequest.newBuilder() + .setName( + DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]") + .toString()) + .build(); + + client.finishDlpJob(request); + + List actualRequests = mockDlpService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FinishDlpJobRequest actualRequest = ((FinishDlpJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void finishDlpJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDlpService.addException(exception); + + try { + FinishDlpJobRequest request = + FinishDlpJobRequest.newBuilder() + .setName( + DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]") + .toString()) + .build(); + client.finishDlpJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpService.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpService.java new file mode 100644 index 000000000000..c6070b99e2eb --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDlpService implements MockGrpcService { + private final MockDlpServiceImpl serviceImpl; + + public MockDlpService() { + serviceImpl = new MockDlpServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpServiceImpl.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpServiceImpl.java new file mode 100644 index 000000000000..9bc133f0b16a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpServiceImpl.java @@ -0,0 +1,828 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dlp.v2; + +import com.google.api.core.BetaApi; +import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; +import com.google.privacy.dlp.v2.CancelDlpJobRequest; +import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.CreateDlpJobRequest; +import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; +import com.google.privacy.dlp.v2.CreateJobTriggerRequest; +import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DeidentifyContentRequest; +import com.google.privacy.dlp.v2.DeidentifyContentResponse; +import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.DeleteDlpJobRequest; +import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; +import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; +import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.DlpServiceGrpc.DlpServiceImplBase; +import com.google.privacy.dlp.v2.FinishDlpJobRequest; +import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.GetDlpJobRequest; +import com.google.privacy.dlp.v2.GetInspectTemplateRequest; +import com.google.privacy.dlp.v2.GetJobTriggerRequest; +import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; +import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; +import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; +import com.google.privacy.dlp.v2.HybridInspectResponse; +import com.google.privacy.dlp.v2.InspectContentRequest; +import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; +import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; +import com.google.privacy.dlp.v2.ListDlpJobsRequest; +import com.google.privacy.dlp.v2.ListDlpJobsResponse; +import com.google.privacy.dlp.v2.ListInfoTypesRequest; +import com.google.privacy.dlp.v2.ListInfoTypesResponse; +import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; +import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; +import com.google.privacy.dlp.v2.ListJobTriggersRequest; +import com.google.privacy.dlp.v2.ListJobTriggersResponse; +import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; +import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.RedactImageRequest; +import com.google.privacy.dlp.v2.RedactImageResponse; +import com.google.privacy.dlp.v2.ReidentifyContentRequest; +import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; +import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; +import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; +import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDlpServiceImpl extends DlpServiceImplBase { + private List requests; + private Queue responses; + + public MockDlpServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void inspectContent( + InspectContentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof InspectContentResponse) { + requests.add(request); + responseObserver.onNext(((InspectContentResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method InspectContent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + InspectContentResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void redactImage( + RedactImageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RedactImageResponse) { + requests.add(request); + responseObserver.onNext(((RedactImageResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RedactImage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RedactImageResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deidentifyContent( + DeidentifyContentRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DeidentifyContentResponse) { + requests.add(request); + responseObserver.onNext(((DeidentifyContentResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeidentifyContent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DeidentifyContentResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void reidentifyContent( + ReidentifyContentRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReidentifyContentResponse) { + requests.add(request); + responseObserver.onNext(((ReidentifyContentResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ReidentifyContent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReidentifyContentResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInfoTypes( + ListInfoTypesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInfoTypesResponse) { + requests.add(request); + responseObserver.onNext(((ListInfoTypesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInfoTypes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInfoTypesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createInspectTemplate( + CreateInspectTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof InspectTemplate) { + requests.add(request); + responseObserver.onNext(((InspectTemplate) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateInspectTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + InspectTemplate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateInspectTemplate( + UpdateInspectTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof InspectTemplate) { + requests.add(request); + responseObserver.onNext(((InspectTemplate) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateInspectTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + InspectTemplate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInspectTemplate( + GetInspectTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof InspectTemplate) { + requests.add(request); + responseObserver.onNext(((InspectTemplate) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInspectTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + InspectTemplate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInspectTemplates( + ListInspectTemplatesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInspectTemplatesResponse) { + requests.add(request); + responseObserver.onNext(((ListInspectTemplatesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInspectTemplates, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInspectTemplatesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInspectTemplate( + DeleteInspectTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteInspectTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDeidentifyTemplate( + CreateDeidentifyTemplateRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DeidentifyTemplate) { + requests.add(request); + responseObserver.onNext(((DeidentifyTemplate) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDeidentifyTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DeidentifyTemplate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDeidentifyTemplate( + UpdateDeidentifyTemplateRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DeidentifyTemplate) { + requests.add(request); + responseObserver.onNext(((DeidentifyTemplate) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateDeidentifyTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DeidentifyTemplate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDeidentifyTemplate( + GetDeidentifyTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DeidentifyTemplate) { + requests.add(request); + responseObserver.onNext(((DeidentifyTemplate) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDeidentifyTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DeidentifyTemplate.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDeidentifyTemplates( + ListDeidentifyTemplatesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDeidentifyTemplatesResponse) { + requests.add(request); + responseObserver.onNext(((ListDeidentifyTemplatesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDeidentifyTemplates, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDeidentifyTemplatesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDeidentifyTemplate( + DeleteDeidentifyTemplateRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteDeidentifyTemplate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createJobTrigger( + CreateJobTriggerRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof JobTrigger) { + requests.add(request); + responseObserver.onNext(((JobTrigger) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateJobTrigger, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + JobTrigger.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateJobTrigger( + UpdateJobTriggerRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof JobTrigger) { + requests.add(request); + responseObserver.onNext(((JobTrigger) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateJobTrigger, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + JobTrigger.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void hybridInspectJobTrigger( + HybridInspectJobTriggerRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof HybridInspectResponse) { + requests.add(request); + responseObserver.onNext(((HybridInspectResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method HybridInspectJobTrigger, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + HybridInspectResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getJobTrigger( + GetJobTriggerRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof JobTrigger) { + requests.add(request); + responseObserver.onNext(((JobTrigger) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetJobTrigger, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + JobTrigger.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listJobTriggers( + ListJobTriggersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListJobTriggersResponse) { + requests.add(request); + responseObserver.onNext(((ListJobTriggersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListJobTriggers, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListJobTriggersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteJobTrigger( + DeleteJobTriggerRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteJobTrigger, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void activateJobTrigger( + ActivateJobTriggerRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DlpJob) { + requests.add(request); + responseObserver.onNext(((DlpJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ActivateJobTrigger, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DlpJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDlpJob(CreateDlpJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DlpJob) { + requests.add(request); + responseObserver.onNext(((DlpJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDlpJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DlpJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDlpJobs( + ListDlpJobsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDlpJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListDlpJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDlpJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDlpJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDlpJob(GetDlpJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DlpJob) { + requests.add(request); + responseObserver.onNext(((DlpJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDlpJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DlpJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDlpJob(DeleteDlpJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteDlpJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void cancelDlpJob(CancelDlpJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelDlpJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createStoredInfoType( + CreateStoredInfoTypeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof StoredInfoType) { + requests.add(request); + responseObserver.onNext(((StoredInfoType) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateStoredInfoType, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StoredInfoType.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateStoredInfoType( + UpdateStoredInfoTypeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof StoredInfoType) { + requests.add(request); + responseObserver.onNext(((StoredInfoType) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateStoredInfoType, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StoredInfoType.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getStoredInfoType( + GetStoredInfoTypeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof StoredInfoType) { + requests.add(request); + responseObserver.onNext(((StoredInfoType) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetStoredInfoType, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StoredInfoType.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listStoredInfoTypes( + ListStoredInfoTypesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListStoredInfoTypesResponse) { + requests.add(request); + responseObserver.onNext(((ListStoredInfoTypesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListStoredInfoTypes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListStoredInfoTypesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteStoredInfoType( + DeleteStoredInfoTypeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteStoredInfoType, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void hybridInspectDlpJob( + HybridInspectDlpJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof HybridInspectResponse) { + requests.add(request); + responseObserver.onNext(((HybridInspectResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method HybridInspectDlpJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + HybridInspectResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void finishDlpJob(FinishDlpJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method FinishDlpJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java b/owl-bot-staging/java-dlp/v2/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java new file mode 100644 index 000000000000..b513b785c61e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java @@ -0,0 +1,3496 @@ +package com.google.privacy.dlp.v2; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
+ * to detect the presence of Personally Identifiable Information (PII) and other
+ * privacy-sensitive data in user-supplied, unstructured data streams, like text
+ * blocks or images.
+ * The service also includes methods for sensitive data redaction and
+ * scheduling of data scans on Google Cloud Platform based data sets.
+ * To learn more about concepts and find how-to guides see
+ * https://cloud.google.com/dlp/docs/.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/privacy/dlp/v2/dlp.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DlpServiceGrpc { + + private DlpServiceGrpc() {} + + public static final String SERVICE_NAME = "google.privacy.dlp.v2.DlpService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getInspectContentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "InspectContent", + requestType = com.google.privacy.dlp.v2.InspectContentRequest.class, + responseType = com.google.privacy.dlp.v2.InspectContentResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getInspectContentMethod() { + io.grpc.MethodDescriptor getInspectContentMethod; + if ((getInspectContentMethod = DlpServiceGrpc.getInspectContentMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getInspectContentMethod = DlpServiceGrpc.getInspectContentMethod) == null) { + DlpServiceGrpc.getInspectContentMethod = getInspectContentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "InspectContent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.InspectContentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.InspectContentResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("InspectContent")) + .build(); + } + } + } + return getInspectContentMethod; + } + + private static volatile io.grpc.MethodDescriptor getRedactImageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RedactImage", + requestType = com.google.privacy.dlp.v2.RedactImageRequest.class, + responseType = com.google.privacy.dlp.v2.RedactImageResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRedactImageMethod() { + io.grpc.MethodDescriptor getRedactImageMethod; + if ((getRedactImageMethod = DlpServiceGrpc.getRedactImageMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getRedactImageMethod = DlpServiceGrpc.getRedactImageMethod) == null) { + DlpServiceGrpc.getRedactImageMethod = getRedactImageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RedactImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.RedactImageResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("RedactImage")) + .build(); + } + } + } + return getRedactImageMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeidentifyContentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeidentifyContent", + requestType = com.google.privacy.dlp.v2.DeidentifyContentRequest.class, + responseType = com.google.privacy.dlp.v2.DeidentifyContentResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeidentifyContentMethod() { + io.grpc.MethodDescriptor getDeidentifyContentMethod; + if ((getDeidentifyContentMethod = DlpServiceGrpc.getDeidentifyContentMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getDeidentifyContentMethod = DlpServiceGrpc.getDeidentifyContentMethod) == null) { + DlpServiceGrpc.getDeidentifyContentMethod = getDeidentifyContentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeidentifyContent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeidentifyContentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeidentifyContentResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeidentifyContent")) + .build(); + } + } + } + return getDeidentifyContentMethod; + } + + private static volatile io.grpc.MethodDescriptor getReidentifyContentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReidentifyContent", + requestType = com.google.privacy.dlp.v2.ReidentifyContentRequest.class, + responseType = com.google.privacy.dlp.v2.ReidentifyContentResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getReidentifyContentMethod() { + io.grpc.MethodDescriptor getReidentifyContentMethod; + if ((getReidentifyContentMethod = DlpServiceGrpc.getReidentifyContentMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getReidentifyContentMethod = DlpServiceGrpc.getReidentifyContentMethod) == null) { + DlpServiceGrpc.getReidentifyContentMethod = getReidentifyContentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReidentifyContent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ReidentifyContentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ReidentifyContentResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ReidentifyContent")) + .build(); + } + } + } + return getReidentifyContentMethod; + } + + private static volatile io.grpc.MethodDescriptor getListInfoTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInfoTypes", + requestType = com.google.privacy.dlp.v2.ListInfoTypesRequest.class, + responseType = com.google.privacy.dlp.v2.ListInfoTypesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListInfoTypesMethod() { + io.grpc.MethodDescriptor getListInfoTypesMethod; + if ((getListInfoTypesMethod = DlpServiceGrpc.getListInfoTypesMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getListInfoTypesMethod = DlpServiceGrpc.getListInfoTypesMethod) == null) { + DlpServiceGrpc.getListInfoTypesMethod = getListInfoTypesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInfoTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListInfoTypesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListInfoTypesResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListInfoTypes")) + .build(); + } + } + } + return getListInfoTypesMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateInspectTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateInspectTemplate", + requestType = com.google.privacy.dlp.v2.CreateInspectTemplateRequest.class, + responseType = com.google.privacy.dlp.v2.InspectTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateInspectTemplateMethod() { + io.grpc.MethodDescriptor getCreateInspectTemplateMethod; + if ((getCreateInspectTemplateMethod = DlpServiceGrpc.getCreateInspectTemplateMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getCreateInspectTemplateMethod = DlpServiceGrpc.getCreateInspectTemplateMethod) == null) { + DlpServiceGrpc.getCreateInspectTemplateMethod = getCreateInspectTemplateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInspectTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.CreateInspectTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateInspectTemplate")) + .build(); + } + } + } + return getCreateInspectTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateInspectTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateInspectTemplate", + requestType = com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.class, + responseType = com.google.privacy.dlp.v2.InspectTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateInspectTemplateMethod() { + io.grpc.MethodDescriptor getUpdateInspectTemplateMethod; + if ((getUpdateInspectTemplateMethod = DlpServiceGrpc.getUpdateInspectTemplateMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getUpdateInspectTemplateMethod = DlpServiceGrpc.getUpdateInspectTemplateMethod) == null) { + DlpServiceGrpc.getUpdateInspectTemplateMethod = getUpdateInspectTemplateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInspectTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("UpdateInspectTemplate")) + .build(); + } + } + } + return getUpdateInspectTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetInspectTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInspectTemplate", + requestType = com.google.privacy.dlp.v2.GetInspectTemplateRequest.class, + responseType = com.google.privacy.dlp.v2.InspectTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetInspectTemplateMethod() { + io.grpc.MethodDescriptor getGetInspectTemplateMethod; + if ((getGetInspectTemplateMethod = DlpServiceGrpc.getGetInspectTemplateMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getGetInspectTemplateMethod = DlpServiceGrpc.getGetInspectTemplateMethod) == null) { + DlpServiceGrpc.getGetInspectTemplateMethod = getGetInspectTemplateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInspectTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.GetInspectTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetInspectTemplate")) + .build(); + } + } + } + return getGetInspectTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor getListInspectTemplatesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInspectTemplates", + requestType = com.google.privacy.dlp.v2.ListInspectTemplatesRequest.class, + responseType = com.google.privacy.dlp.v2.ListInspectTemplatesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListInspectTemplatesMethod() { + io.grpc.MethodDescriptor getListInspectTemplatesMethod; + if ((getListInspectTemplatesMethod = DlpServiceGrpc.getListInspectTemplatesMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getListInspectTemplatesMethod = DlpServiceGrpc.getListInspectTemplatesMethod) == null) { + DlpServiceGrpc.getListInspectTemplatesMethod = getListInspectTemplatesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInspectTemplates")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListInspectTemplatesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListInspectTemplatesResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListInspectTemplates")) + .build(); + } + } + } + return getListInspectTemplatesMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteInspectTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInspectTemplate", + requestType = com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteInspectTemplateMethod() { + io.grpc.MethodDescriptor getDeleteInspectTemplateMethod; + if ((getDeleteInspectTemplateMethod = DlpServiceGrpc.getDeleteInspectTemplateMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getDeleteInspectTemplateMethod = DlpServiceGrpc.getDeleteInspectTemplateMethod) == null) { + DlpServiceGrpc.getDeleteInspectTemplateMethod = getDeleteInspectTemplateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInspectTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteInspectTemplate")) + .build(); + } + } + } + return getDeleteInspectTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateDeidentifyTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDeidentifyTemplate", + requestType = com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.class, + responseType = com.google.privacy.dlp.v2.DeidentifyTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateDeidentifyTemplateMethod() { + io.grpc.MethodDescriptor getCreateDeidentifyTemplateMethod; + if ((getCreateDeidentifyTemplateMethod = DlpServiceGrpc.getCreateDeidentifyTemplateMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getCreateDeidentifyTemplateMethod = DlpServiceGrpc.getCreateDeidentifyTemplateMethod) == null) { + DlpServiceGrpc.getCreateDeidentifyTemplateMethod = getCreateDeidentifyTemplateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDeidentifyTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateDeidentifyTemplate")) + .build(); + } + } + } + return getCreateDeidentifyTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateDeidentifyTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDeidentifyTemplate", + requestType = com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.class, + responseType = com.google.privacy.dlp.v2.DeidentifyTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateDeidentifyTemplateMethod() { + io.grpc.MethodDescriptor getUpdateDeidentifyTemplateMethod; + if ((getUpdateDeidentifyTemplateMethod = DlpServiceGrpc.getUpdateDeidentifyTemplateMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getUpdateDeidentifyTemplateMethod = DlpServiceGrpc.getUpdateDeidentifyTemplateMethod) == null) { + DlpServiceGrpc.getUpdateDeidentifyTemplateMethod = getUpdateDeidentifyTemplateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDeidentifyTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("UpdateDeidentifyTemplate")) + .build(); + } + } + } + return getUpdateDeidentifyTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetDeidentifyTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDeidentifyTemplate", + requestType = com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.class, + responseType = com.google.privacy.dlp.v2.DeidentifyTemplate.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetDeidentifyTemplateMethod() { + io.grpc.MethodDescriptor getGetDeidentifyTemplateMethod; + if ((getGetDeidentifyTemplateMethod = DlpServiceGrpc.getGetDeidentifyTemplateMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getGetDeidentifyTemplateMethod = DlpServiceGrpc.getGetDeidentifyTemplateMethod) == null) { + DlpServiceGrpc.getGetDeidentifyTemplateMethod = getGetDeidentifyTemplateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDeidentifyTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetDeidentifyTemplate")) + .build(); + } + } + } + return getGetDeidentifyTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor getListDeidentifyTemplatesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDeidentifyTemplates", + requestType = com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.class, + responseType = com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListDeidentifyTemplatesMethod() { + io.grpc.MethodDescriptor getListDeidentifyTemplatesMethod; + if ((getListDeidentifyTemplatesMethod = DlpServiceGrpc.getListDeidentifyTemplatesMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getListDeidentifyTemplatesMethod = DlpServiceGrpc.getListDeidentifyTemplatesMethod) == null) { + DlpServiceGrpc.getListDeidentifyTemplatesMethod = getListDeidentifyTemplatesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDeidentifyTemplates")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListDeidentifyTemplates")) + .build(); + } + } + } + return getListDeidentifyTemplatesMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteDeidentifyTemplateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDeidentifyTemplate", + requestType = com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteDeidentifyTemplateMethod() { + io.grpc.MethodDescriptor getDeleteDeidentifyTemplateMethod; + if ((getDeleteDeidentifyTemplateMethod = DlpServiceGrpc.getDeleteDeidentifyTemplateMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getDeleteDeidentifyTemplateMethod = DlpServiceGrpc.getDeleteDeidentifyTemplateMethod) == null) { + DlpServiceGrpc.getDeleteDeidentifyTemplateMethod = getDeleteDeidentifyTemplateMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDeidentifyTemplate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteDeidentifyTemplate")) + .build(); + } + } + } + return getDeleteDeidentifyTemplateMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateJobTriggerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateJobTrigger", + requestType = com.google.privacy.dlp.v2.CreateJobTriggerRequest.class, + responseType = com.google.privacy.dlp.v2.JobTrigger.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateJobTriggerMethod() { + io.grpc.MethodDescriptor getCreateJobTriggerMethod; + if ((getCreateJobTriggerMethod = DlpServiceGrpc.getCreateJobTriggerMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getCreateJobTriggerMethod = DlpServiceGrpc.getCreateJobTriggerMethod) == null) { + DlpServiceGrpc.getCreateJobTriggerMethod = getCreateJobTriggerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateJobTrigger")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.CreateJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateJobTrigger")) + .build(); + } + } + } + return getCreateJobTriggerMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateJobTriggerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateJobTrigger", + requestType = com.google.privacy.dlp.v2.UpdateJobTriggerRequest.class, + responseType = com.google.privacy.dlp.v2.JobTrigger.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateJobTriggerMethod() { + io.grpc.MethodDescriptor getUpdateJobTriggerMethod; + if ((getUpdateJobTriggerMethod = DlpServiceGrpc.getUpdateJobTriggerMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getUpdateJobTriggerMethod = DlpServiceGrpc.getUpdateJobTriggerMethod) == null) { + DlpServiceGrpc.getUpdateJobTriggerMethod = getUpdateJobTriggerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateJobTrigger")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.UpdateJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("UpdateJobTrigger")) + .build(); + } + } + } + return getUpdateJobTriggerMethod; + } + + private static volatile io.grpc.MethodDescriptor getHybridInspectJobTriggerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "HybridInspectJobTrigger", + requestType = com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.class, + responseType = com.google.privacy.dlp.v2.HybridInspectResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getHybridInspectJobTriggerMethod() { + io.grpc.MethodDescriptor getHybridInspectJobTriggerMethod; + if ((getHybridInspectJobTriggerMethod = DlpServiceGrpc.getHybridInspectJobTriggerMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getHybridInspectJobTriggerMethod = DlpServiceGrpc.getHybridInspectJobTriggerMethod) == null) { + DlpServiceGrpc.getHybridInspectJobTriggerMethod = getHybridInspectJobTriggerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "HybridInspectJobTrigger")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.HybridInspectResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("HybridInspectJobTrigger")) + .build(); + } + } + } + return getHybridInspectJobTriggerMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetJobTriggerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetJobTrigger", + requestType = com.google.privacy.dlp.v2.GetJobTriggerRequest.class, + responseType = com.google.privacy.dlp.v2.JobTrigger.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetJobTriggerMethod() { + io.grpc.MethodDescriptor getGetJobTriggerMethod; + if ((getGetJobTriggerMethod = DlpServiceGrpc.getGetJobTriggerMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getGetJobTriggerMethod = DlpServiceGrpc.getGetJobTriggerMethod) == null) { + DlpServiceGrpc.getGetJobTriggerMethod = getGetJobTriggerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetJobTrigger")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.GetJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetJobTrigger")) + .build(); + } + } + } + return getGetJobTriggerMethod; + } + + private static volatile io.grpc.MethodDescriptor getListJobTriggersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListJobTriggers", + requestType = com.google.privacy.dlp.v2.ListJobTriggersRequest.class, + responseType = com.google.privacy.dlp.v2.ListJobTriggersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListJobTriggersMethod() { + io.grpc.MethodDescriptor getListJobTriggersMethod; + if ((getListJobTriggersMethod = DlpServiceGrpc.getListJobTriggersMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getListJobTriggersMethod = DlpServiceGrpc.getListJobTriggersMethod) == null) { + DlpServiceGrpc.getListJobTriggersMethod = getListJobTriggersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListJobTriggers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListJobTriggersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListJobTriggersResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListJobTriggers")) + .build(); + } + } + } + return getListJobTriggersMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteJobTriggerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteJobTrigger", + requestType = com.google.privacy.dlp.v2.DeleteJobTriggerRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteJobTriggerMethod() { + io.grpc.MethodDescriptor getDeleteJobTriggerMethod; + if ((getDeleteJobTriggerMethod = DlpServiceGrpc.getDeleteJobTriggerMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getDeleteJobTriggerMethod = DlpServiceGrpc.getDeleteJobTriggerMethod) == null) { + DlpServiceGrpc.getDeleteJobTriggerMethod = getDeleteJobTriggerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteJobTrigger")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeleteJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteJobTrigger")) + .build(); + } + } + } + return getDeleteJobTriggerMethod; + } + + private static volatile io.grpc.MethodDescriptor getActivateJobTriggerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ActivateJobTrigger", + requestType = com.google.privacy.dlp.v2.ActivateJobTriggerRequest.class, + responseType = com.google.privacy.dlp.v2.DlpJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getActivateJobTriggerMethod() { + io.grpc.MethodDescriptor getActivateJobTriggerMethod; + if ((getActivateJobTriggerMethod = DlpServiceGrpc.getActivateJobTriggerMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getActivateJobTriggerMethod = DlpServiceGrpc.getActivateJobTriggerMethod) == null) { + DlpServiceGrpc.getActivateJobTriggerMethod = getActivateJobTriggerMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ActivateJobTrigger")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ActivateJobTriggerRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DlpJob.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ActivateJobTrigger")) + .build(); + } + } + } + return getActivateJobTriggerMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateDlpJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDlpJob", + requestType = com.google.privacy.dlp.v2.CreateDlpJobRequest.class, + responseType = com.google.privacy.dlp.v2.DlpJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateDlpJobMethod() { + io.grpc.MethodDescriptor getCreateDlpJobMethod; + if ((getCreateDlpJobMethod = DlpServiceGrpc.getCreateDlpJobMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getCreateDlpJobMethod = DlpServiceGrpc.getCreateDlpJobMethod) == null) { + DlpServiceGrpc.getCreateDlpJobMethod = getCreateDlpJobMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDlpJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.CreateDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DlpJob.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateDlpJob")) + .build(); + } + } + } + return getCreateDlpJobMethod; + } + + private static volatile io.grpc.MethodDescriptor getListDlpJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDlpJobs", + requestType = com.google.privacy.dlp.v2.ListDlpJobsRequest.class, + responseType = com.google.privacy.dlp.v2.ListDlpJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListDlpJobsMethod() { + io.grpc.MethodDescriptor getListDlpJobsMethod; + if ((getListDlpJobsMethod = DlpServiceGrpc.getListDlpJobsMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getListDlpJobsMethod = DlpServiceGrpc.getListDlpJobsMethod) == null) { + DlpServiceGrpc.getListDlpJobsMethod = getListDlpJobsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDlpJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListDlpJobsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListDlpJobsResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListDlpJobs")) + .build(); + } + } + } + return getListDlpJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetDlpJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDlpJob", + requestType = com.google.privacy.dlp.v2.GetDlpJobRequest.class, + responseType = com.google.privacy.dlp.v2.DlpJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetDlpJobMethod() { + io.grpc.MethodDescriptor getGetDlpJobMethod; + if ((getGetDlpJobMethod = DlpServiceGrpc.getGetDlpJobMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getGetDlpJobMethod = DlpServiceGrpc.getGetDlpJobMethod) == null) { + DlpServiceGrpc.getGetDlpJobMethod = getGetDlpJobMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDlpJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.GetDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DlpJob.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetDlpJob")) + .build(); + } + } + } + return getGetDlpJobMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteDlpJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDlpJob", + requestType = com.google.privacy.dlp.v2.DeleteDlpJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteDlpJobMethod() { + io.grpc.MethodDescriptor getDeleteDlpJobMethod; + if ((getDeleteDlpJobMethod = DlpServiceGrpc.getDeleteDlpJobMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getDeleteDlpJobMethod = DlpServiceGrpc.getDeleteDlpJobMethod) == null) { + DlpServiceGrpc.getDeleteDlpJobMethod = getDeleteDlpJobMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDlpJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeleteDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteDlpJob")) + .build(); + } + } + } + return getDeleteDlpJobMethod; + } + + private static volatile io.grpc.MethodDescriptor getCancelDlpJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelDlpJob", + requestType = com.google.privacy.dlp.v2.CancelDlpJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCancelDlpJobMethod() { + io.grpc.MethodDescriptor getCancelDlpJobMethod; + if ((getCancelDlpJobMethod = DlpServiceGrpc.getCancelDlpJobMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getCancelDlpJobMethod = DlpServiceGrpc.getCancelDlpJobMethod) == null) { + DlpServiceGrpc.getCancelDlpJobMethod = getCancelDlpJobMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelDlpJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.CancelDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CancelDlpJob")) + .build(); + } + } + } + return getCancelDlpJobMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateStoredInfoTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateStoredInfoType", + requestType = com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.class, + responseType = com.google.privacy.dlp.v2.StoredInfoType.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateStoredInfoTypeMethod() { + io.grpc.MethodDescriptor getCreateStoredInfoTypeMethod; + if ((getCreateStoredInfoTypeMethod = DlpServiceGrpc.getCreateStoredInfoTypeMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getCreateStoredInfoTypeMethod = DlpServiceGrpc.getCreateStoredInfoTypeMethod) == null) { + DlpServiceGrpc.getCreateStoredInfoTypeMethod = getCreateStoredInfoTypeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateStoredInfoType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateStoredInfoType")) + .build(); + } + } + } + return getCreateStoredInfoTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateStoredInfoTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateStoredInfoType", + requestType = com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.class, + responseType = com.google.privacy.dlp.v2.StoredInfoType.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateStoredInfoTypeMethod() { + io.grpc.MethodDescriptor getUpdateStoredInfoTypeMethod; + if ((getUpdateStoredInfoTypeMethod = DlpServiceGrpc.getUpdateStoredInfoTypeMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getUpdateStoredInfoTypeMethod = DlpServiceGrpc.getUpdateStoredInfoTypeMethod) == null) { + DlpServiceGrpc.getUpdateStoredInfoTypeMethod = getUpdateStoredInfoTypeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateStoredInfoType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("UpdateStoredInfoType")) + .build(); + } + } + } + return getUpdateStoredInfoTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetStoredInfoTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetStoredInfoType", + requestType = com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.class, + responseType = com.google.privacy.dlp.v2.StoredInfoType.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetStoredInfoTypeMethod() { + io.grpc.MethodDescriptor getGetStoredInfoTypeMethod; + if ((getGetStoredInfoTypeMethod = DlpServiceGrpc.getGetStoredInfoTypeMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getGetStoredInfoTypeMethod = DlpServiceGrpc.getGetStoredInfoTypeMethod) == null) { + DlpServiceGrpc.getGetStoredInfoTypeMethod = getGetStoredInfoTypeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStoredInfoType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetStoredInfoType")) + .build(); + } + } + } + return getGetStoredInfoTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor getListStoredInfoTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListStoredInfoTypes", + requestType = com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.class, + responseType = com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListStoredInfoTypesMethod() { + io.grpc.MethodDescriptor getListStoredInfoTypesMethod; + if ((getListStoredInfoTypesMethod = DlpServiceGrpc.getListStoredInfoTypesMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getListStoredInfoTypesMethod = DlpServiceGrpc.getListStoredInfoTypesMethod) == null) { + DlpServiceGrpc.getListStoredInfoTypesMethod = getListStoredInfoTypesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListStoredInfoTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListStoredInfoTypes")) + .build(); + } + } + } + return getListStoredInfoTypesMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteStoredInfoTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteStoredInfoType", + requestType = com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteStoredInfoTypeMethod() { + io.grpc.MethodDescriptor getDeleteStoredInfoTypeMethod; + if ((getDeleteStoredInfoTypeMethod = DlpServiceGrpc.getDeleteStoredInfoTypeMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getDeleteStoredInfoTypeMethod = DlpServiceGrpc.getDeleteStoredInfoTypeMethod) == null) { + DlpServiceGrpc.getDeleteStoredInfoTypeMethod = getDeleteStoredInfoTypeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteStoredInfoType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteStoredInfoType")) + .build(); + } + } + } + return getDeleteStoredInfoTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor getHybridInspectDlpJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "HybridInspectDlpJob", + requestType = com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.class, + responseType = com.google.privacy.dlp.v2.HybridInspectResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getHybridInspectDlpJobMethod() { + io.grpc.MethodDescriptor getHybridInspectDlpJobMethod; + if ((getHybridInspectDlpJobMethod = DlpServiceGrpc.getHybridInspectDlpJobMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getHybridInspectDlpJobMethod = DlpServiceGrpc.getHybridInspectDlpJobMethod) == null) { + DlpServiceGrpc.getHybridInspectDlpJobMethod = getHybridInspectDlpJobMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "HybridInspectDlpJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.HybridInspectResponse.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("HybridInspectDlpJob")) + .build(); + } + } + } + return getHybridInspectDlpJobMethod; + } + + private static volatile io.grpc.MethodDescriptor getFinishDlpJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FinishDlpJob", + requestType = com.google.privacy.dlp.v2.FinishDlpJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getFinishDlpJobMethod() { + io.grpc.MethodDescriptor getFinishDlpJobMethod; + if ((getFinishDlpJobMethod = DlpServiceGrpc.getFinishDlpJobMethod) == null) { + synchronized (DlpServiceGrpc.class) { + if ((getFinishDlpJobMethod = DlpServiceGrpc.getFinishDlpJobMethod) == null) { + DlpServiceGrpc.getFinishDlpJobMethod = getFinishDlpJobMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FinishDlpJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.privacy.dlp.v2.FinishDlpJobRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("FinishDlpJob")) + .build(); + } + } + } + return getFinishDlpJobMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static DlpServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DlpServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DlpServiceStub(channel, callOptions); + } + }; + return DlpServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DlpServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DlpServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DlpServiceBlockingStub(channel, callOptions); + } + }; + return DlpServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DlpServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DlpServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DlpServiceFutureStub(channel, callOptions); + } + }; + return DlpServiceFutureStub.newStub(factory, channel); + } + + /** + *
+   * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
+   * to detect the presence of Personally Identifiable Information (PII) and other
+   * privacy-sensitive data in user-supplied, unstructured data streams, like text
+   * blocks or images.
+   * The service also includes methods for sensitive data redaction and
+   * scheduling of data scans on Google Cloud Platform based data sets.
+   * To learn more about concepts and find how-to guides see
+   * https://cloud.google.com/dlp/docs/.
+   * 
+ */ + public static abstract class DlpServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * Finds potentially sensitive info in content.
+     * This method has limits on input size, processing time, and output size.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
+     * and https://cloud.google.com/dlp/docs/inspecting-text,
+     * 
+ */ + public void inspectContent(com.google.privacy.dlp.v2.InspectContentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getInspectContentMethod(), responseObserver); + } + + /** + *
+     * Redacts potentially sensitive info from an image.
+     * This method has limits on input size, processing time, and output size.
+     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public void redactImage(com.google.privacy.dlp.v2.RedactImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRedactImageMethod(), responseObserver); + } + + /** + *
+     * De-identifies potentially sensitive info from a ContentItem.
+     * This method has limits on input size and output size.
+     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public void deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeidentifyContentMethod(), responseObserver); + } + + /** + *
+     * Re-identifies content that has been de-identified.
+     * See
+     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
+     * to learn more.
+     * 
+ */ + public void reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReidentifyContentMethod(), responseObserver); + } + + /** + *
+     * Returns a list of the sensitive information types that DLP API
+     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
+     * learn more.
+     * 
+ */ + public void listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListInfoTypesMethod(), responseObserver); + } + + /** + *
+     * Creates an InspectTemplate for reusing frequently used configuration
+     * for inspecting content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateInspectTemplateMethod(), responseObserver); + } + + /** + *
+     * Updates the InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateInspectTemplateMethod(), responseObserver); + } + + /** + *
+     * Gets an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInspectTemplateMethod(), responseObserver); + } + + /** + *
+     * Lists InspectTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListInspectTemplatesMethod(), responseObserver); + } + + /** + *
+     * Deletes an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteInspectTemplateMethod(), responseObserver); + } + + /** + *
+     * Creates a DeidentifyTemplate for reusing frequently used configuration
+     * for de-identifying content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateDeidentifyTemplateMethod(), responseObserver); + } + + /** + *
+     * Updates the DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateDeidentifyTemplateMethod(), responseObserver); + } + + /** + *
+     * Gets a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeidentifyTemplateMethod(), responseObserver); + } + + /** + *
+     * Lists DeidentifyTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDeidentifyTemplatesMethod(), responseObserver); + } + + /** + *
+     * Deletes a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDeidentifyTemplateMethod(), responseObserver); + } + + /** + *
+     * Creates a job trigger to run DLP actions such as scanning storage for
+     * sensitive information on a set schedule.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateJobTriggerMethod(), responseObserver); + } + + /** + *
+     * Updates a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateJobTriggerMethod(), responseObserver); + } + + /** + *
+     * Inspect hybrid content and store findings to a trigger. The inspection
+     * will be processed asynchronously. To review the findings monitor the
+     * jobs within the trigger.
+     * 
+ */ + public void hybridInspectJobTrigger(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHybridInspectJobTriggerMethod(), responseObserver); + } + + /** + *
+     * Gets a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetJobTriggerMethod(), responseObserver); + } + + /** + *
+     * Lists job triggers.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListJobTriggersMethod(), responseObserver); + } + + /** + *
+     * Deletes a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteJobTriggerMethod(), responseObserver); + } + + /** + *
+     * Activate a job trigger. Causes the immediate execute of a trigger
+     * instead of waiting on the trigger event to occur.
+     * 
+ */ + public void activateJobTrigger(com.google.privacy.dlp.v2.ActivateJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getActivateJobTriggerMethod(), responseObserver); + } + + /** + *
+     * Creates a new job to inspect storage or calculate risk metrics.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public void createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateDlpJobMethod(), responseObserver); + } + + /** + *
+     * Lists DlpJobs that match the specified filter in the request.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public void listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDlpJobsMethod(), responseObserver); + } + + /** + *
+     * Gets the latest state of a long-running DlpJob.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public void getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDlpJobMethod(), responseObserver); + } + + /** + *
+     * Deletes a long-running DlpJob. This method indicates that the client is
+     * no longer interested in the DlpJob result. The job will be canceled if
+     * possible.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public void deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDlpJobMethod(), responseObserver); + } + + /** + *
+     * Starts asynchronous cancellation on a long-running DlpJob. The server
+     * makes a best effort to cancel the DlpJob, but success is not
+     * guaranteed.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public void cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCancelDlpJobMethod(), responseObserver); + } + + /** + *
+     * Creates a pre-built stored infoType to be used for inspection.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void createStoredInfoType(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateStoredInfoTypeMethod(), responseObserver); + } + + /** + *
+     * Updates the stored infoType by creating a new version. The existing version
+     * will continue to be used until the new version is ready.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void updateStoredInfoType(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateStoredInfoTypeMethod(), responseObserver); + } + + /** + *
+     * Gets a stored infoType.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void getStoredInfoType(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStoredInfoTypeMethod(), responseObserver); + } + + /** + *
+     * Lists stored infoTypes.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void listStoredInfoTypes(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListStoredInfoTypesMethod(), responseObserver); + } + + /** + *
+     * Deletes a stored infoType.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void deleteStoredInfoType(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteStoredInfoTypeMethod(), responseObserver); + } + + /** + *
+     * Inspect hybrid content and store findings to a job.
+     * To review the findings, inspect the job. Inspection will occur
+     * asynchronously.
+     * 
+ */ + public void hybridInspectDlpJob(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHybridInspectDlpJobMethod(), responseObserver); + } + + /** + *
+     * Finish a running hybrid DlpJob. Triggers the finalization steps and running
+     * of any enabled actions that have not yet run.
+     * 
+ */ + public void finishDlpJob(com.google.privacy.dlp.v2.FinishDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFinishDlpJobMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getInspectContentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.InspectContentRequest, + com.google.privacy.dlp.v2.InspectContentResponse>( + this, METHODID_INSPECT_CONTENT))) + .addMethod( + getRedactImageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.RedactImageRequest, + com.google.privacy.dlp.v2.RedactImageResponse>( + this, METHODID_REDACT_IMAGE))) + .addMethod( + getDeidentifyContentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.DeidentifyContentRequest, + com.google.privacy.dlp.v2.DeidentifyContentResponse>( + this, METHODID_DEIDENTIFY_CONTENT))) + .addMethod( + getReidentifyContentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.ReidentifyContentRequest, + com.google.privacy.dlp.v2.ReidentifyContentResponse>( + this, METHODID_REIDENTIFY_CONTENT))) + .addMethod( + getListInfoTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.ListInfoTypesRequest, + com.google.privacy.dlp.v2.ListInfoTypesResponse>( + this, METHODID_LIST_INFO_TYPES))) + .addMethod( + getCreateInspectTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.CreateInspectTemplateRequest, + com.google.privacy.dlp.v2.InspectTemplate>( + this, METHODID_CREATE_INSPECT_TEMPLATE))) + .addMethod( + getUpdateInspectTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.UpdateInspectTemplateRequest, + com.google.privacy.dlp.v2.InspectTemplate>( + this, METHODID_UPDATE_INSPECT_TEMPLATE))) + .addMethod( + getGetInspectTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.GetInspectTemplateRequest, + com.google.privacy.dlp.v2.InspectTemplate>( + this, METHODID_GET_INSPECT_TEMPLATE))) + .addMethod( + getListInspectTemplatesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.ListInspectTemplatesRequest, + com.google.privacy.dlp.v2.ListInspectTemplatesResponse>( + this, METHODID_LIST_INSPECT_TEMPLATES))) + .addMethod( + getDeleteInspectTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.DeleteInspectTemplateRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_INSPECT_TEMPLATE))) + .addMethod( + getCreateDeidentifyTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest, + com.google.privacy.dlp.v2.DeidentifyTemplate>( + this, METHODID_CREATE_DEIDENTIFY_TEMPLATE))) + .addMethod( + getUpdateDeidentifyTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest, + com.google.privacy.dlp.v2.DeidentifyTemplate>( + this, METHODID_UPDATE_DEIDENTIFY_TEMPLATE))) + .addMethod( + getGetDeidentifyTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest, + com.google.privacy.dlp.v2.DeidentifyTemplate>( + this, METHODID_GET_DEIDENTIFY_TEMPLATE))) + .addMethod( + getListDeidentifyTemplatesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest, + com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse>( + this, METHODID_LIST_DEIDENTIFY_TEMPLATES))) + .addMethod( + getDeleteDeidentifyTemplateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_DEIDENTIFY_TEMPLATE))) + .addMethod( + getCreateJobTriggerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.CreateJobTriggerRequest, + com.google.privacy.dlp.v2.JobTrigger>( + this, METHODID_CREATE_JOB_TRIGGER))) + .addMethod( + getUpdateJobTriggerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.UpdateJobTriggerRequest, + com.google.privacy.dlp.v2.JobTrigger>( + this, METHODID_UPDATE_JOB_TRIGGER))) + .addMethod( + getHybridInspectJobTriggerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest, + com.google.privacy.dlp.v2.HybridInspectResponse>( + this, METHODID_HYBRID_INSPECT_JOB_TRIGGER))) + .addMethod( + getGetJobTriggerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.GetJobTriggerRequest, + com.google.privacy.dlp.v2.JobTrigger>( + this, METHODID_GET_JOB_TRIGGER))) + .addMethod( + getListJobTriggersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.ListJobTriggersRequest, + com.google.privacy.dlp.v2.ListJobTriggersResponse>( + this, METHODID_LIST_JOB_TRIGGERS))) + .addMethod( + getDeleteJobTriggerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.DeleteJobTriggerRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_JOB_TRIGGER))) + .addMethod( + getActivateJobTriggerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.ActivateJobTriggerRequest, + com.google.privacy.dlp.v2.DlpJob>( + this, METHODID_ACTIVATE_JOB_TRIGGER))) + .addMethod( + getCreateDlpJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.CreateDlpJobRequest, + com.google.privacy.dlp.v2.DlpJob>( + this, METHODID_CREATE_DLP_JOB))) + .addMethod( + getListDlpJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.ListDlpJobsRequest, + com.google.privacy.dlp.v2.ListDlpJobsResponse>( + this, METHODID_LIST_DLP_JOBS))) + .addMethod( + getGetDlpJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.GetDlpJobRequest, + com.google.privacy.dlp.v2.DlpJob>( + this, METHODID_GET_DLP_JOB))) + .addMethod( + getDeleteDlpJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.DeleteDlpJobRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_DLP_JOB))) + .addMethod( + getCancelDlpJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.CancelDlpJobRequest, + com.google.protobuf.Empty>( + this, METHODID_CANCEL_DLP_JOB))) + .addMethod( + getCreateStoredInfoTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest, + com.google.privacy.dlp.v2.StoredInfoType>( + this, METHODID_CREATE_STORED_INFO_TYPE))) + .addMethod( + getUpdateStoredInfoTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest, + com.google.privacy.dlp.v2.StoredInfoType>( + this, METHODID_UPDATE_STORED_INFO_TYPE))) + .addMethod( + getGetStoredInfoTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.GetStoredInfoTypeRequest, + com.google.privacy.dlp.v2.StoredInfoType>( + this, METHODID_GET_STORED_INFO_TYPE))) + .addMethod( + getListStoredInfoTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.ListStoredInfoTypesRequest, + com.google.privacy.dlp.v2.ListStoredInfoTypesResponse>( + this, METHODID_LIST_STORED_INFO_TYPES))) + .addMethod( + getDeleteStoredInfoTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_STORED_INFO_TYPE))) + .addMethod( + getHybridInspectDlpJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.HybridInspectDlpJobRequest, + com.google.privacy.dlp.v2.HybridInspectResponse>( + this, METHODID_HYBRID_INSPECT_DLP_JOB))) + .addMethod( + getFinishDlpJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.privacy.dlp.v2.FinishDlpJobRequest, + com.google.protobuf.Empty>( + this, METHODID_FINISH_DLP_JOB))) + .build(); + } + } + + /** + *
+   * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
+   * to detect the presence of Personally Identifiable Information (PII) and other
+   * privacy-sensitive data in user-supplied, unstructured data streams, like text
+   * blocks or images.
+   * The service also includes methods for sensitive data redaction and
+   * scheduling of data scans on Google Cloud Platform based data sets.
+   * To learn more about concepts and find how-to guides see
+   * https://cloud.google.com/dlp/docs/.
+   * 
+ */ + public static final class DlpServiceStub extends io.grpc.stub.AbstractAsyncStub { + private DlpServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DlpServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DlpServiceStub(channel, callOptions); + } + + /** + *
+     * Finds potentially sensitive info in content.
+     * This method has limits on input size, processing time, and output size.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
+     * and https://cloud.google.com/dlp/docs/inspecting-text,
+     * 
+ */ + public void inspectContent(com.google.privacy.dlp.v2.InspectContentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getInspectContentMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Redacts potentially sensitive info from an image.
+     * This method has limits on input size, processing time, and output size.
+     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public void redactImage(com.google.privacy.dlp.v2.RedactImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRedactImageMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * De-identifies potentially sensitive info from a ContentItem.
+     * This method has limits on input size and output size.
+     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public void deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeidentifyContentMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Re-identifies content that has been de-identified.
+     * See
+     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
+     * to learn more.
+     * 
+ */ + public void reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReidentifyContentMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns a list of the sensitive information types that DLP API
+     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
+     * learn more.
+     * 
+ */ + public void listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInfoTypesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates an InspectTemplate for reusing frequently used configuration
+     * for inspecting content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInspectTemplateMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateInspectTemplateMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInspectTemplateMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists InspectTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInspectTemplatesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public void deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInspectTemplateMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a DeidentifyTemplate for reusing frequently used configuration
+     * for de-identifying content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDeidentifyTemplateMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDeidentifyTemplateMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDeidentifyTemplateMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists DeidentifyTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDeidentifyTemplatesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public void deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDeidentifyTemplateMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a job trigger to run DLP actions such as scanning storage for
+     * sensitive information on a set schedule.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateJobTriggerMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateJobTriggerMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Inspect hybrid content and store findings to a trigger. The inspection
+     * will be processed asynchronously. To review the findings monitor the
+     * jobs within the trigger.
+     * 
+ */ + public void hybridInspectJobTrigger(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getHybridInspectJobTriggerMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetJobTriggerMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists job triggers.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListJobTriggersMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public void deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteJobTriggerMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Activate a job trigger. Causes the immediate execute of a trigger
+     * instead of waiting on the trigger event to occur.
+     * 
+ */ + public void activateJobTrigger(com.google.privacy.dlp.v2.ActivateJobTriggerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getActivateJobTriggerMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a new job to inspect storage or calculate risk metrics.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public void createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDlpJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists DlpJobs that match the specified filter in the request.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public void listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDlpJobsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the latest state of a long-running DlpJob.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public void getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDlpJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a long-running DlpJob. This method indicates that the client is
+     * no longer interested in the DlpJob result. The job will be canceled if
+     * possible.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public void deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDlpJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Starts asynchronous cancellation on a long-running DlpJob. The server
+     * makes a best effort to cancel the DlpJob, but success is not
+     * guaranteed.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public void cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCancelDlpJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a pre-built stored infoType to be used for inspection.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void createStoredInfoType(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateStoredInfoTypeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates the stored infoType by creating a new version. The existing version
+     * will continue to be used until the new version is ready.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void updateStoredInfoType(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateStoredInfoTypeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets a stored infoType.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void getStoredInfoType(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetStoredInfoTypeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists stored infoTypes.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void listStoredInfoTypes(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListStoredInfoTypesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a stored infoType.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public void deleteStoredInfoType(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteStoredInfoTypeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Inspect hybrid content and store findings to a job.
+     * To review the findings, inspect the job. Inspection will occur
+     * asynchronously.
+     * 
+ */ + public void hybridInspectDlpJob(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getHybridInspectDlpJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Finish a running hybrid DlpJob. Triggers the finalization steps and running
+     * of any enabled actions that have not yet run.
+     * 
+ */ + public void finishDlpJob(com.google.privacy.dlp.v2.FinishDlpJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFinishDlpJobMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
+   * to detect the presence of Personally Identifiable Information (PII) and other
+   * privacy-sensitive data in user-supplied, unstructured data streams, like text
+   * blocks or images.
+   * The service also includes methods for sensitive data redaction and
+   * scheduling of data scans on Google Cloud Platform based data sets.
+   * To learn more about concepts and find how-to guides see
+   * https://cloud.google.com/dlp/docs/.
+   * 
+ */ + public static final class DlpServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private DlpServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DlpServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DlpServiceBlockingStub(channel, callOptions); + } + + /** + *
+     * Finds potentially sensitive info in content.
+     * This method has limits on input size, processing time, and output size.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
+     * and https://cloud.google.com/dlp/docs/inspecting-text,
+     * 
+ */ + public com.google.privacy.dlp.v2.InspectContentResponse inspectContent(com.google.privacy.dlp.v2.InspectContentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getInspectContentMethod(), getCallOptions(), request); + } + + /** + *
+     * Redacts potentially sensitive info from an image.
+     * This method has limits on input size, processing time, and output size.
+     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public com.google.privacy.dlp.v2.RedactImageResponse redactImage(com.google.privacy.dlp.v2.RedactImageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRedactImageMethod(), getCallOptions(), request); + } + + /** + *
+     * De-identifies potentially sensitive info from a ContentItem.
+     * This method has limits on input size and output size.
+     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public com.google.privacy.dlp.v2.DeidentifyContentResponse deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeidentifyContentMethod(), getCallOptions(), request); + } + + /** + *
+     * Re-identifies content that has been de-identified.
+     * See
+     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
+     * to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.ReidentifyContentResponse reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReidentifyContentMethod(), getCallOptions(), request); + } + + /** + *
+     * Returns a list of the sensitive information types that DLP API
+     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
+     * learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.ListInfoTypesResponse listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInfoTypesMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates an InspectTemplate for reusing frequently used configuration
+     * for inspecting content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.InspectTemplate createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInspectTemplateMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.InspectTemplate updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateInspectTemplateMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInspectTemplateMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists InspectTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.ListInspectTemplatesResponse listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInspectTemplatesMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.protobuf.Empty deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInspectTemplateMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a DeidentifyTemplate for reusing frequently used configuration
+     * for de-identifying content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.privacy.dlp.v2.DeidentifyTemplate createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDeidentifyTemplateMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.privacy.dlp.v2.DeidentifyTemplate updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDeidentifyTemplateMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDeidentifyTemplateMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists DeidentifyTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDeidentifyTemplatesMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.protobuf.Empty deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDeidentifyTemplateMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a job trigger to run DLP actions such as scanning storage for
+     * sensitive information on a set schedule.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.JobTrigger createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateJobTriggerMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.JobTrigger updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateJobTriggerMethod(), getCallOptions(), request); + } + + /** + *
+     * Inspect hybrid content and store findings to a trigger. The inspection
+     * will be processed asynchronously. To review the findings monitor the
+     * jobs within the trigger.
+     * 
+ */ + public com.google.privacy.dlp.v2.HybridInspectResponse hybridInspectJobTrigger(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getHybridInspectJobTriggerMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.JobTrigger getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetJobTriggerMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists job triggers.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.ListJobTriggersResponse listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListJobTriggersMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.protobuf.Empty deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteJobTriggerMethod(), getCallOptions(), request); + } + + /** + *
+     * Activate a job trigger. Causes the immediate execute of a trigger
+     * instead of waiting on the trigger event to occur.
+     * 
+ */ + public com.google.privacy.dlp.v2.DlpJob activateJobTrigger(com.google.privacy.dlp.v2.ActivateJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getActivateJobTriggerMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a new job to inspect storage or calculate risk metrics.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public com.google.privacy.dlp.v2.DlpJob createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDlpJobMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists DlpJobs that match the specified filter in the request.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.ListDlpJobsResponse listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDlpJobsMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets the latest state of a long-running DlpJob.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.DlpJob getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDlpJobMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a long-running DlpJob. This method indicates that the client is
+     * no longer interested in the DlpJob result. The job will be canceled if
+     * possible.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public com.google.protobuf.Empty deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDlpJobMethod(), getCallOptions(), request); + } + + /** + *
+     * Starts asynchronous cancellation on a long-running DlpJob. The server
+     * makes a best effort to cancel the DlpJob, but success is not
+     * guaranteed.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public com.google.protobuf.Empty cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCancelDlpJobMethod(), getCallOptions(), request); + } + + /** + *
+     * Creates a pre-built stored infoType to be used for inspection.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.StoredInfoType createStoredInfoType(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateStoredInfoTypeMethod(), getCallOptions(), request); + } + + /** + *
+     * Updates the stored infoType by creating a new version. The existing version
+     * will continue to be used until the new version is ready.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.StoredInfoType updateStoredInfoType(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateStoredInfoTypeMethod(), getCallOptions(), request); + } + + /** + *
+     * Gets a stored infoType.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.StoredInfoType getStoredInfoType(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetStoredInfoTypeMethod(), getCallOptions(), request); + } + + /** + *
+     * Lists stored infoTypes.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse listStoredInfoTypes(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListStoredInfoTypesMethod(), getCallOptions(), request); + } + + /** + *
+     * Deletes a stored infoType.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.protobuf.Empty deleteStoredInfoType(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteStoredInfoTypeMethod(), getCallOptions(), request); + } + + /** + *
+     * Inspect hybrid content and store findings to a job.
+     * To review the findings, inspect the job. Inspection will occur
+     * asynchronously.
+     * 
+ */ + public com.google.privacy.dlp.v2.HybridInspectResponse hybridInspectDlpJob(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getHybridInspectDlpJobMethod(), getCallOptions(), request); + } + + /** + *
+     * Finish a running hybrid DlpJob. Triggers the finalization steps and running
+     * of any enabled actions that have not yet run.
+     * 
+ */ + public com.google.protobuf.Empty finishDlpJob(com.google.privacy.dlp.v2.FinishDlpJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFinishDlpJobMethod(), getCallOptions(), request); + } + } + + /** + *
+   * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
+   * to detect the presence of Personally Identifiable Information (PII) and other
+   * privacy-sensitive data in user-supplied, unstructured data streams, like text
+   * blocks or images.
+   * The service also includes methods for sensitive data redaction and
+   * scheduling of data scans on Google Cloud Platform based data sets.
+   * To learn more about concepts and find how-to guides see
+   * https://cloud.google.com/dlp/docs/.
+   * 
+ */ + public static final class DlpServiceFutureStub extends io.grpc.stub.AbstractFutureStub { + private DlpServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DlpServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DlpServiceFutureStub(channel, callOptions); + } + + /** + *
+     * Finds potentially sensitive info in content.
+     * This method has limits on input size, processing time, and output size.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
+     * and https://cloud.google.com/dlp/docs/inspecting-text,
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture inspectContent( + com.google.privacy.dlp.v2.InspectContentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getInspectContentMethod(), getCallOptions()), request); + } + + /** + *
+     * Redacts potentially sensitive info from an image.
+     * This method has limits on input size, processing time, and output size.
+     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture redactImage( + com.google.privacy.dlp.v2.RedactImageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRedactImageMethod(), getCallOptions()), request); + } + + /** + *
+     * De-identifies potentially sensitive info from a ContentItem.
+     * This method has limits on input size and output size.
+     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deidentifyContent( + com.google.privacy.dlp.v2.DeidentifyContentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeidentifyContentMethod(), getCallOptions()), request); + } + + /** + *
+     * Re-identifies content that has been de-identified.
+     * See
+     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
+     * to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture reidentifyContent( + com.google.privacy.dlp.v2.ReidentifyContentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReidentifyContentMethod(), getCallOptions()), request); + } + + /** + *
+     * Returns a list of the sensitive information types that DLP API
+     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
+     * learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listInfoTypes( + com.google.privacy.dlp.v2.ListInfoTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInfoTypesMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates an InspectTemplate for reusing frequently used configuration
+     * for inspecting content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createInspectTemplate( + com.google.privacy.dlp.v2.CreateInspectTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateInspectTemplateMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateInspectTemplate( + com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateInspectTemplateMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getInspectTemplate( + com.google.privacy.dlp.v2.GetInspectTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInspectTemplateMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists InspectTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listInspectTemplates( + com.google.privacy.dlp.v2.ListInspectTemplatesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInspectTemplatesMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteInspectTemplate( + com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInspectTemplateMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a DeidentifyTemplate for reusing frequently used configuration
+     * for de-identifying content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createDeidentifyTemplate( + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDeidentifyTemplateMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateDeidentifyTemplate( + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDeidentifyTemplateMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getDeidentifyTemplate( + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDeidentifyTemplateMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists DeidentifyTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listDeidentifyTemplates( + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDeidentifyTemplatesMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteDeidentifyTemplate( + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDeidentifyTemplateMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a job trigger to run DLP actions such as scanning storage for
+     * sensitive information on a set schedule.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createJobTrigger( + com.google.privacy.dlp.v2.CreateJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateJobTriggerMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateJobTrigger( + com.google.privacy.dlp.v2.UpdateJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateJobTriggerMethod(), getCallOptions()), request); + } + + /** + *
+     * Inspect hybrid content and store findings to a trigger. The inspection
+     * will be processed asynchronously. To review the findings monitor the
+     * jobs within the trigger.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture hybridInspectJobTrigger( + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getHybridInspectJobTriggerMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getJobTrigger( + com.google.privacy.dlp.v2.GetJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetJobTriggerMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists job triggers.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listJobTriggers( + com.google.privacy.dlp.v2.ListJobTriggersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListJobTriggersMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteJobTrigger( + com.google.privacy.dlp.v2.DeleteJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteJobTriggerMethod(), getCallOptions()), request); + } + + /** + *
+     * Activate a job trigger. Causes the immediate execute of a trigger
+     * instead of waiting on the trigger event to occur.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture activateJobTrigger( + com.google.privacy.dlp.v2.ActivateJobTriggerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getActivateJobTriggerMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a new job to inspect storage or calculate risk metrics.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createDlpJob( + com.google.privacy.dlp.v2.CreateDlpJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDlpJobMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists DlpJobs that match the specified filter in the request.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listDlpJobs( + com.google.privacy.dlp.v2.ListDlpJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDlpJobsMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets the latest state of a long-running DlpJob.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getDlpJob( + com.google.privacy.dlp.v2.GetDlpJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDlpJobMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a long-running DlpJob. This method indicates that the client is
+     * no longer interested in the DlpJob result. The job will be canceled if
+     * possible.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteDlpJob( + com.google.privacy.dlp.v2.DeleteDlpJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDlpJobMethod(), getCallOptions()), request); + } + + /** + *
+     * Starts asynchronous cancellation on a long-running DlpJob. The server
+     * makes a best effort to cancel the DlpJob, but success is not
+     * guaranteed.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture cancelDlpJob( + com.google.privacy.dlp.v2.CancelDlpJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCancelDlpJobMethod(), getCallOptions()), request); + } + + /** + *
+     * Creates a pre-built stored infoType to be used for inspection.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createStoredInfoType( + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateStoredInfoTypeMethod(), getCallOptions()), request); + } + + /** + *
+     * Updates the stored infoType by creating a new version. The existing version
+     * will continue to be used until the new version is ready.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateStoredInfoType( + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateStoredInfoTypeMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets a stored infoType.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getStoredInfoType( + com.google.privacy.dlp.v2.GetStoredInfoTypeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetStoredInfoTypeMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists stored infoTypes.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listStoredInfoTypes( + com.google.privacy.dlp.v2.ListStoredInfoTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListStoredInfoTypesMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a stored infoType.
+     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+     * learn more.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteStoredInfoType( + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteStoredInfoTypeMethod(), getCallOptions()), request); + } + + /** + *
+     * Inspect hybrid content and store findings to a job.
+     * To review the findings, inspect the job. Inspection will occur
+     * asynchronously.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture hybridInspectDlpJob( + com.google.privacy.dlp.v2.HybridInspectDlpJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getHybridInspectDlpJobMethod(), getCallOptions()), request); + } + + /** + *
+     * Finish a running hybrid DlpJob. Triggers the finalization steps and running
+     * of any enabled actions that have not yet run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture finishDlpJob( + com.google.privacy.dlp.v2.FinishDlpJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFinishDlpJobMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_INSPECT_CONTENT = 0; + private static final int METHODID_REDACT_IMAGE = 1; + private static final int METHODID_DEIDENTIFY_CONTENT = 2; + private static final int METHODID_REIDENTIFY_CONTENT = 3; + private static final int METHODID_LIST_INFO_TYPES = 4; + private static final int METHODID_CREATE_INSPECT_TEMPLATE = 5; + private static final int METHODID_UPDATE_INSPECT_TEMPLATE = 6; + private static final int METHODID_GET_INSPECT_TEMPLATE = 7; + private static final int METHODID_LIST_INSPECT_TEMPLATES = 8; + private static final int METHODID_DELETE_INSPECT_TEMPLATE = 9; + private static final int METHODID_CREATE_DEIDENTIFY_TEMPLATE = 10; + private static final int METHODID_UPDATE_DEIDENTIFY_TEMPLATE = 11; + private static final int METHODID_GET_DEIDENTIFY_TEMPLATE = 12; + private static final int METHODID_LIST_DEIDENTIFY_TEMPLATES = 13; + private static final int METHODID_DELETE_DEIDENTIFY_TEMPLATE = 14; + private static final int METHODID_CREATE_JOB_TRIGGER = 15; + private static final int METHODID_UPDATE_JOB_TRIGGER = 16; + private static final int METHODID_HYBRID_INSPECT_JOB_TRIGGER = 17; + private static final int METHODID_GET_JOB_TRIGGER = 18; + private static final int METHODID_LIST_JOB_TRIGGERS = 19; + private static final int METHODID_DELETE_JOB_TRIGGER = 20; + private static final int METHODID_ACTIVATE_JOB_TRIGGER = 21; + private static final int METHODID_CREATE_DLP_JOB = 22; + private static final int METHODID_LIST_DLP_JOBS = 23; + private static final int METHODID_GET_DLP_JOB = 24; + private static final int METHODID_DELETE_DLP_JOB = 25; + private static final int METHODID_CANCEL_DLP_JOB = 26; + private static final int METHODID_CREATE_STORED_INFO_TYPE = 27; + private static final int METHODID_UPDATE_STORED_INFO_TYPE = 28; + private static final int METHODID_GET_STORED_INFO_TYPE = 29; + private static final int METHODID_LIST_STORED_INFO_TYPES = 30; + private static final int METHODID_DELETE_STORED_INFO_TYPE = 31; + private static final int METHODID_HYBRID_INSPECT_DLP_JOB = 32; + private static final int METHODID_FINISH_DLP_JOB = 33; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DlpServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DlpServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_INSPECT_CONTENT: + serviceImpl.inspectContent((com.google.privacy.dlp.v2.InspectContentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REDACT_IMAGE: + serviceImpl.redactImage((com.google.privacy.dlp.v2.RedactImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DEIDENTIFY_CONTENT: + serviceImpl.deidentifyContent((com.google.privacy.dlp.v2.DeidentifyContentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REIDENTIFY_CONTENT: + serviceImpl.reidentifyContent((com.google.privacy.dlp.v2.ReidentifyContentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_INFO_TYPES: + serviceImpl.listInfoTypes((com.google.privacy.dlp.v2.ListInfoTypesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_INSPECT_TEMPLATE: + serviceImpl.createInspectTemplate((com.google.privacy.dlp.v2.CreateInspectTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_INSPECT_TEMPLATE: + serviceImpl.updateInspectTemplate((com.google.privacy.dlp.v2.UpdateInspectTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INSPECT_TEMPLATE: + serviceImpl.getInspectTemplate((com.google.privacy.dlp.v2.GetInspectTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_INSPECT_TEMPLATES: + serviceImpl.listInspectTemplates((com.google.privacy.dlp.v2.ListInspectTemplatesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INSPECT_TEMPLATE: + serviceImpl.deleteInspectTemplate((com.google.privacy.dlp.v2.DeleteInspectTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_DEIDENTIFY_TEMPLATE: + serviceImpl.createDeidentifyTemplate((com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DEIDENTIFY_TEMPLATE: + serviceImpl.updateDeidentifyTemplate((com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DEIDENTIFY_TEMPLATE: + serviceImpl.getDeidentifyTemplate((com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DEIDENTIFY_TEMPLATES: + serviceImpl.listDeidentifyTemplates((com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DEIDENTIFY_TEMPLATE: + serviceImpl.deleteDeidentifyTemplate((com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_JOB_TRIGGER: + serviceImpl.createJobTrigger((com.google.privacy.dlp.v2.CreateJobTriggerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_JOB_TRIGGER: + serviceImpl.updateJobTrigger((com.google.privacy.dlp.v2.UpdateJobTriggerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_HYBRID_INSPECT_JOB_TRIGGER: + serviceImpl.hybridInspectJobTrigger((com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_JOB_TRIGGER: + serviceImpl.getJobTrigger((com.google.privacy.dlp.v2.GetJobTriggerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_JOB_TRIGGERS: + serviceImpl.listJobTriggers((com.google.privacy.dlp.v2.ListJobTriggersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_JOB_TRIGGER: + serviceImpl.deleteJobTrigger((com.google.privacy.dlp.v2.DeleteJobTriggerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ACTIVATE_JOB_TRIGGER: + serviceImpl.activateJobTrigger((com.google.privacy.dlp.v2.ActivateJobTriggerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_DLP_JOB: + serviceImpl.createDlpJob((com.google.privacy.dlp.v2.CreateDlpJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DLP_JOBS: + serviceImpl.listDlpJobs((com.google.privacy.dlp.v2.ListDlpJobsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DLP_JOB: + serviceImpl.getDlpJob((com.google.privacy.dlp.v2.GetDlpJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DLP_JOB: + serviceImpl.deleteDlpJob((com.google.privacy.dlp.v2.DeleteDlpJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_DLP_JOB: + serviceImpl.cancelDlpJob((com.google.privacy.dlp.v2.CancelDlpJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_STORED_INFO_TYPE: + serviceImpl.createStoredInfoType((com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_STORED_INFO_TYPE: + serviceImpl.updateStoredInfoType((com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_STORED_INFO_TYPE: + serviceImpl.getStoredInfoType((com.google.privacy.dlp.v2.GetStoredInfoTypeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_STORED_INFO_TYPES: + serviceImpl.listStoredInfoTypes((com.google.privacy.dlp.v2.ListStoredInfoTypesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_STORED_INFO_TYPE: + serviceImpl.deleteStoredInfoType((com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_HYBRID_INSPECT_DLP_JOB: + serviceImpl.hybridInspectDlpJob((com.google.privacy.dlp.v2.HybridInspectDlpJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FINISH_DLP_JOB: + serviceImpl.finishDlpJob((com.google.privacy.dlp.v2.FinishDlpJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class DlpServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DlpServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DlpService"); + } + } + + private static final class DlpServiceFileDescriptorSupplier + extends DlpServiceBaseDescriptorSupplier { + DlpServiceFileDescriptorSupplier() {} + } + + private static final class DlpServiceMethodDescriptorSupplier + extends DlpServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DlpServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DlpServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DlpServiceFileDescriptorSupplier()) + .addMethod(getInspectContentMethod()) + .addMethod(getRedactImageMethod()) + .addMethod(getDeidentifyContentMethod()) + .addMethod(getReidentifyContentMethod()) + .addMethod(getListInfoTypesMethod()) + .addMethod(getCreateInspectTemplateMethod()) + .addMethod(getUpdateInspectTemplateMethod()) + .addMethod(getGetInspectTemplateMethod()) + .addMethod(getListInspectTemplatesMethod()) + .addMethod(getDeleteInspectTemplateMethod()) + .addMethod(getCreateDeidentifyTemplateMethod()) + .addMethod(getUpdateDeidentifyTemplateMethod()) + .addMethod(getGetDeidentifyTemplateMethod()) + .addMethod(getListDeidentifyTemplatesMethod()) + .addMethod(getDeleteDeidentifyTemplateMethod()) + .addMethod(getCreateJobTriggerMethod()) + .addMethod(getUpdateJobTriggerMethod()) + .addMethod(getHybridInspectJobTriggerMethod()) + .addMethod(getGetJobTriggerMethod()) + .addMethod(getListJobTriggersMethod()) + .addMethod(getDeleteJobTriggerMethod()) + .addMethod(getActivateJobTriggerMethod()) + .addMethod(getCreateDlpJobMethod()) + .addMethod(getListDlpJobsMethod()) + .addMethod(getGetDlpJobMethod()) + .addMethod(getDeleteDlpJobMethod()) + .addMethod(getCancelDlpJobMethod()) + .addMethod(getCreateStoredInfoTypeMethod()) + .addMethod(getUpdateStoredInfoTypeMethod()) + .addMethod(getGetStoredInfoTypeMethod()) + .addMethod(getListStoredInfoTypesMethod()) + .addMethod(getDeleteStoredInfoTypeMethod()) + .addMethod(getHybridInspectDlpJobMethod()) + .addMethod(getFinishDlpJobMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java new file mode 100644 index 000000000000..65f4eeca3e68 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java @@ -0,0 +1,7431 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A task to execute on the completion of a job.
+ * See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action} + */ +public final class Action extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action) + ActionOrBuilder { +private static final long serialVersionUID = 0L; + // Use Action.newBuilder() to construct. + private Action(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Action() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Action(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Action( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Action.SaveFindings.Builder subBuilder = null; + if (actionCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.Action.SaveFindings) action_).toBuilder(); + } + action_ = + input.readMessage(com.google.privacy.dlp.v2.Action.SaveFindings.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.SaveFindings) action_); + action_ = subBuilder.buildPartial(); + } + actionCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder subBuilder = null; + if (actionCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.Action.PublishToPubSub) action_).toBuilder(); + } + action_ = + input.readMessage(com.google.privacy.dlp.v2.Action.PublishToPubSub.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.PublishToPubSub) action_); + action_ = subBuilder.buildPartial(); + } + actionCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder subBuilder = null; + if (actionCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_).toBuilder(); + } + action_ = + input.readMessage(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_); + action_ = subBuilder.buildPartial(); + } + actionCase_ = 3; + break; + } + case 42: { + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder subBuilder = null; + if (actionCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_).toBuilder(); + } + action_ = + input.readMessage(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_); + action_ = subBuilder.buildPartial(); + } + actionCase_ = 5; + break; + } + case 58: { + com.google.privacy.dlp.v2.Action.Deidentify.Builder subBuilder = null; + if (actionCase_ == 7) { + subBuilder = ((com.google.privacy.dlp.v2.Action.Deidentify) action_).toBuilder(); + } + action_ = + input.readMessage(com.google.privacy.dlp.v2.Action.Deidentify.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.Deidentify) action_); + action_ = subBuilder.buildPartial(); + } + actionCase_ = 7; + break; + } + case 66: { + com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder subBuilder = null; + if (actionCase_ == 8) { + subBuilder = ((com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_).toBuilder(); + } + action_ = + input.readMessage(com.google.privacy.dlp.v2.Action.JobNotificationEmails.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_); + action_ = subBuilder.buildPartial(); + } + actionCase_ = 8; + break; + } + case 74: { + com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder subBuilder = null; + if (actionCase_ == 9) { + subBuilder = ((com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_).toBuilder(); + } + action_ = + input.readMessage(com.google.privacy.dlp.v2.Action.PublishToStackdriver.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_); + action_ = subBuilder.buildPartial(); + } + actionCase_ = 9; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.class, com.google.privacy.dlp.v2.Action.Builder.class); + } + + public interface SaveFindingsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.SaveFindings) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Location to store findings outside of DLP.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+     * Location to store findings outside of DLP.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + * @return The outputConfig. + */ + com.google.privacy.dlp.v2.OutputStorageConfig getOutputConfig(); + /** + *
+     * Location to store findings outside of DLP.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + */ + com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder getOutputConfigOrBuilder(); + } + /** + *
+   * If set, the detailed findings will be persisted to the specified
+   * OutputStorageConfig. Only a single instance of this action can be
+   * specified.
+   * Compatible with: Inspect, Risk
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.SaveFindings} + */ + public static final class SaveFindings extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.SaveFindings) + SaveFindingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SaveFindings.newBuilder() to construct. + private SaveFindings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SaveFindings() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SaveFindings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SaveFindings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.OutputStorageConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.privacy.dlp.v2.OutputStorageConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.SaveFindings.class, com.google.privacy.dlp.v2.Action.SaveFindings.Builder.class); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.OutputStorageConfig outputConfig_; + /** + *
+     * Location to store findings outside of DLP.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+     * Location to store findings outside of DLP.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.OutputStorageConfig getOutputConfig() { + return outputConfig_ == null ? com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+     * Location to store findings outside of DLP.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (outputConfig_ != null) { + output.writeMessage(1, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Action.SaveFindings)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Action.SaveFindings other = (com.google.privacy.dlp.v2.Action.SaveFindings) obj; + + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Action.SaveFindings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * If set, the detailed findings will be persisted to the specified
+     * OutputStorageConfig. Only a single instance of this action can be
+     * specified.
+     * Compatible with: Inspect, Risk
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.SaveFindings} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.SaveFindings) + com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.SaveFindings.class, com.google.privacy.dlp.v2.Action.SaveFindings.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Action.SaveFindings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.SaveFindings getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.SaveFindings build() { + com.google.privacy.dlp.v2.Action.SaveFindings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.SaveFindings buildPartial() { + com.google.privacy.dlp.v2.Action.SaveFindings result = new com.google.privacy.dlp.v2.Action.SaveFindings(this); + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Action.SaveFindings) { + return mergeFrom((com.google.privacy.dlp.v2.Action.SaveFindings)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Action.SaveFindings other) { + if (other == com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance()) return this; + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action.SaveFindings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Action.SaveFindings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.OutputStorageConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.OutputStorageConfig, com.google.privacy.dlp.v2.OutputStorageConfig.Builder, com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder> outputConfigBuilder_; + /** + *
+       * Location to store findings outside of DLP.
+       * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+       * Location to store findings outside of DLP.
+       * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + * @return The outputConfig. + */ + public com.google.privacy.dlp.v2.OutputStorageConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+       * Location to store findings outside of DLP.
+       * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + */ + public Builder setOutputConfig(com.google.privacy.dlp.v2.OutputStorageConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Location to store findings outside of DLP.
+       * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + */ + public Builder setOutputConfig( + com.google.privacy.dlp.v2.OutputStorageConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Location to store findings outside of DLP.
+       * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + */ + public Builder mergeOutputConfig(com.google.privacy.dlp.v2.OutputStorageConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.privacy.dlp.v2.OutputStorageConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Location to store findings outside of DLP.
+       * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+       * Location to store findings outside of DLP.
+       * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + */ + public com.google.privacy.dlp.v2.OutputStorageConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+       * Location to store findings outside of DLP.
+       * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + */ + public com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+       * Location to store findings outside of DLP.
+       * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.OutputStorageConfig, com.google.privacy.dlp.v2.OutputStorageConfig.Builder, com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.OutputStorageConfig, com.google.privacy.dlp.v2.OutputStorageConfig.Builder, com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.SaveFindings) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.SaveFindings) + private static final com.google.privacy.dlp.v2.Action.SaveFindings DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.SaveFindings(); + } + + public static com.google.privacy.dlp.v2.Action.SaveFindings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SaveFindings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SaveFindings(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.SaveFindings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PublishToPubSubOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.PublishToPubSub) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Cloud Pub/Sub topic to send notifications to. The topic must have given
+     * publishing access rights to the DLP API service account executing
+     * the long running DlpJob sending the notifications.
+     * Format is projects/{project}/topics/{topic}.
+     * 
+ * + * string topic = 1; + * @return The topic. + */ + java.lang.String getTopic(); + /** + *
+     * Cloud Pub/Sub topic to send notifications to. The topic must have given
+     * publishing access rights to the DLP API service account executing
+     * the long running DlpJob sending the notifications.
+     * Format is projects/{project}/topics/{topic}.
+     * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + com.google.protobuf.ByteString + getTopicBytes(); + } + /** + *
+   * Publish a message into a given Pub/Sub topic when DlpJob has completed. The
+   * message contains a single field, `DlpJobName`, which is equal to the
+   * finished job's
+   * [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob).
+   * Compatible with: Inspect, Risk
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.PublishToPubSub} + */ + public static final class PublishToPubSub extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.PublishToPubSub) + PublishToPubSubOrBuilder { + private static final long serialVersionUID = 0L; + // Use PublishToPubSub.newBuilder() to construct. + private PublishToPubSub(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PublishToPubSub() { + topic_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublishToPubSub(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PublishToPubSub( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + topic_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.PublishToPubSub.class, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder.class); + } + + public static final int TOPIC_FIELD_NUMBER = 1; + private volatile java.lang.Object topic_; + /** + *
+     * Cloud Pub/Sub topic to send notifications to. The topic must have given
+     * publishing access rights to the DLP API service account executing
+     * the long running DlpJob sending the notifications.
+     * Format is projects/{project}/topics/{topic}.
+     * 
+ * + * string topic = 1; + * @return The topic. + */ + @java.lang.Override + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } + } + /** + *
+     * Cloud Pub/Sub topic to send notifications to. The topic must have given
+     * publishing access rights to the DLP API service account executing
+     * the long running DlpJob sending the notifications.
+     * Format is projects/{project}/topics/{topic}.
+     * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Action.PublishToPubSub)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Action.PublishToPubSub other = (com.google.privacy.dlp.v2.Action.PublishToPubSub) obj; + + if (!getTopic() + .equals(other.getTopic())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Action.PublishToPubSub prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Publish a message into a given Pub/Sub topic when DlpJob has completed. The
+     * message contains a single field, `DlpJobName`, which is equal to the
+     * finished job's
+     * [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob).
+     * Compatible with: Inspect, Risk
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.PublishToPubSub} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.PublishToPubSub) + com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.PublishToPubSub.class, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Action.PublishToPubSub.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + topic_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToPubSub getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToPubSub build() { + com.google.privacy.dlp.v2.Action.PublishToPubSub result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToPubSub buildPartial() { + com.google.privacy.dlp.v2.Action.PublishToPubSub result = new com.google.privacy.dlp.v2.Action.PublishToPubSub(this); + result.topic_ = topic_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Action.PublishToPubSub) { + return mergeFrom((com.google.privacy.dlp.v2.Action.PublishToPubSub)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Action.PublishToPubSub other) { + if (other == com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance()) return this; + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action.PublishToPubSub parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Action.PublishToPubSub) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object topic_ = ""; + /** + *
+       * Cloud Pub/Sub topic to send notifications to. The topic must have given
+       * publishing access rights to the DLP API service account executing
+       * the long running DlpJob sending the notifications.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @return The topic. + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Cloud Pub/Sub topic to send notifications to. The topic must have given
+       * publishing access rights to the DLP API service account executing
+       * the long running DlpJob sending the notifications.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Cloud Pub/Sub topic to send notifications to. The topic must have given
+       * publishing access rights to the DLP API service account executing
+       * the long running DlpJob sending the notifications.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @param value The topic to set. + * @return This builder for chaining. + */ + public Builder setTopic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + topic_ = value; + onChanged(); + return this; + } + /** + *
+       * Cloud Pub/Sub topic to send notifications to. The topic must have given
+       * publishing access rights to the DLP API service account executing
+       * the long running DlpJob sending the notifications.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @return This builder for chaining. + */ + public Builder clearTopic() { + + topic_ = getDefaultInstance().getTopic(); + onChanged(); + return this; + } + /** + *
+       * Cloud Pub/Sub topic to send notifications to. The topic must have given
+       * publishing access rights to the DLP API service account executing
+       * the long running DlpJob sending the notifications.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @param value The bytes for topic to set. + * @return This builder for chaining. + */ + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + topic_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishToPubSub) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishToPubSub) + private static final com.google.privacy.dlp.v2.Action.PublishToPubSub DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishToPubSub(); + } + + public static com.google.privacy.dlp.v2.Action.PublishToPubSub getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublishToPubSub parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PublishToPubSub(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToPubSub getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PublishSummaryToCsccOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.PublishSummaryToCscc) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Publish the result summary of a DlpJob to the Cloud Security
+   * Command Center (CSCC Alpha).
+   * This action is only available for projects which are parts of
+   * an organization and whitelisted for the alpha Cloud Security Command
+   * Center.
+   * The action will publish the count of finding instances and their info
+   * types. The summary of findings will be persisted in CSCC and are governed
+   * by CSCC service-specific policy, see
+   * https://cloud.google.com/terms/service-terms Only a single instance of this
+   * action can be specified. Compatible with: Inspect
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.PublishSummaryToCscc} + */ + public static final class PublishSummaryToCscc extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.PublishSummaryToCscc) + PublishSummaryToCsccOrBuilder { + private static final long serialVersionUID = 0L; + // Use PublishSummaryToCscc.newBuilder() to construct. + private PublishSummaryToCscc(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PublishSummaryToCscc() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublishSummaryToCscc(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PublishSummaryToCscc( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.class, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Action.PublishSummaryToCscc)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc other = (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Publish the result summary of a DlpJob to the Cloud Security
+     * Command Center (CSCC Alpha).
+     * This action is only available for projects which are parts of
+     * an organization and whitelisted for the alpha Cloud Security Command
+     * Center.
+     * The action will publish the count of finding instances and their info
+     * types. The summary of findings will be persisted in CSCC and are governed
+     * by CSCC service-specific policy, see
+     * https://cloud.google.com/terms/service-terms Only a single instance of this
+     * action can be specified. Compatible with: Inspect
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.PublishSummaryToCscc} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.PublishSummaryToCscc) + com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.class, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc build() { + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc buildPartial() { + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc result = new com.google.privacy.dlp.v2.Action.PublishSummaryToCscc(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) { + return mergeFrom((com.google.privacy.dlp.v2.Action.PublishSummaryToCscc)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc other) { + if (other == com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishSummaryToCscc) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishSummaryToCscc) + private static final com.google.privacy.dlp.v2.Action.PublishSummaryToCscc DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishSummaryToCscc(); + } + + public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublishSummaryToCscc parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PublishSummaryToCscc(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PublishFindingsToCloudDataCatalogOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag
+   * templates are applied to the resource that Cloud DLP scanned. Data
+   * Catalog tag templates are stored in the same project and region where the
+   * BigQuery table exists. For Cloud DLP to create and apply the tag template,
+   * the Cloud DLP service agent must have the
+   * `roles/datacatalog.tagTemplateOwner` permission on the project. The tag
+   * template contains fields summarizing the results of the DlpJob. Any field
+   * values previously written by another DlpJob are deleted. [InfoType naming
+   * patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using
+   * this feature.
+   * Findings are persisted in Data Catalog storage and are governed by
+   * service-specific policies for Data Catalog. For more information, see
+   * [Service Specific Terms](https://cloud.google.com/terms/service-terms).
+   * Only a single instance of this action can be specified. This action is
+   * allowed only if all resources being scanned are BigQuery tables.
+   * Compatible with: Inspect
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog} + */ + public static final class PublishFindingsToCloudDataCatalog extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + PublishFindingsToCloudDataCatalogOrBuilder { + private static final long serialVersionUID = 0L; + // Use PublishFindingsToCloudDataCatalog.newBuilder() to construct. + private PublishFindingsToCloudDataCatalog(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PublishFindingsToCloudDataCatalog() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublishFindingsToCloudDataCatalog(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PublishFindingsToCloudDataCatalog( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.class, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog other = (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag
+     * templates are applied to the resource that Cloud DLP scanned. Data
+     * Catalog tag templates are stored in the same project and region where the
+     * BigQuery table exists. For Cloud DLP to create and apply the tag template,
+     * the Cloud DLP service agent must have the
+     * `roles/datacatalog.tagTemplateOwner` permission on the project. The tag
+     * template contains fields summarizing the results of the DlpJob. Any field
+     * values previously written by another DlpJob are deleted. [InfoType naming
+     * patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using
+     * this feature.
+     * Findings are persisted in Data Catalog storage and are governed by
+     * service-specific policies for Data Catalog. For more information, see
+     * [Service Specific Terms](https://cloud.google.com/terms/service-terms).
+     * Only a single instance of this action can be specified. This action is
+     * allowed only if all resources being scanned are BigQuery tables.
+     * Compatible with: Inspect
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.class, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog build() { + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog buildPartial() { + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog result = new com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) { + return mergeFrom((com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog other) { + if (other == com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + private static final com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog(); + } + + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublishFindingsToCloudDataCatalog parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PublishFindingsToCloudDataCatalog(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeidentifyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.Deidentify) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * @return Whether the transformationConfig field is set. + */ + boolean hasTransformationConfig(); + /** + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * @return The transformationConfig. + */ + com.google.privacy.dlp.v2.TransformationConfig getTransformationConfig(); + /** + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + com.google.privacy.dlp.v2.TransformationConfigOrBuilder getTransformationConfigOrBuilder(); + + /** + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * @return Whether the transformationDetailsStorageConfig field is set. + */ + boolean hasTransformationDetailsStorageConfig(); + /** + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * @return The transformationDetailsStorageConfig. + */ + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getTransformationDetailsStorageConfig(); + /** + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + */ + com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder getTransformationDetailsStorageConfigOrBuilder(); + + /** + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the cloudStorageOutput field is set. + */ + boolean hasCloudStorageOutput(); + /** + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return The cloudStorageOutput. + */ + java.lang.String getCloudStorageOutput(); + /** + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cloudStorageOutput. + */ + com.google.protobuf.ByteString + getCloudStorageOutputBytes(); + + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return A list containing the fileTypesToTransform. + */ + java.util.List getFileTypesToTransformList(); + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return The count of fileTypesToTransform. + */ + int getFileTypesToTransformCount(); + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param index The index of the element to return. + * @return The fileTypesToTransform at the given index. + */ + com.google.privacy.dlp.v2.FileType getFileTypesToTransform(int index); + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return A list containing the enum numeric values on the wire for fileTypesToTransform. + */ + java.util.List + getFileTypesToTransformValueList(); + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fileTypesToTransform at the given index. + */ + int getFileTypesToTransformValue(int index); + + public com.google.privacy.dlp.v2.Action.Deidentify.OutputCase getOutputCase(); + } + /** + *
+   * Create a de-identified copy of the requested table or files.
+   * A TransformationDetail will be created for each transformation.
+   * If any rows in BigQuery are skipped during de-identification
+   * (transformation errors or row size exceeds BigQuery insert API limits) they
+   * are placed in the failure output table. If the original row exceeds
+   * the BigQuery insert API limit it will be truncated when written to the
+   * failure output table. The failure output table can be set in the
+   * action.deidentify.output.big_query_output.deidentified_failure_output_table
+   * field, if no table is set, a table will be automatically created in the
+   * same project and dataset as the original table.
+   * Compatible with: Inspect
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.Deidentify} + */ + public static final class Deidentify extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.Deidentify) + DeidentifyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Deidentify.newBuilder() to construct. + private Deidentify(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Deidentify() { + fileTypesToTransform_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Deidentify(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Deidentify( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: { + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder subBuilder = null; + if (transformationDetailsStorageConfig_ != null) { + subBuilder = transformationDetailsStorageConfig_.toBuilder(); + } + transformationDetailsStorageConfig_ = input.readMessage(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transformationDetailsStorageConfig_); + transformationDetailsStorageConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.privacy.dlp.v2.TransformationConfig.Builder subBuilder = null; + if (transformationConfig_ != null) { + subBuilder = transformationConfig_.toBuilder(); + } + transformationConfig_ = input.readMessage(com.google.privacy.dlp.v2.TransformationConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transformationConfig_); + transformationConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 64: { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fileTypesToTransform_.add(rawValue); + break; + } + case 66: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fileTypesToTransform_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + outputCase_ = 9; + output_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = java.util.Collections.unmodifiableList(fileTypesToTransform_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.Deidentify.class, com.google.privacy.dlp.v2.Action.Deidentify.Builder.class); + } + + private int outputCase_ = 0; + private java.lang.Object output_; + public enum OutputCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_STORAGE_OUTPUT(9), + OUTPUT_NOT_SET(0); + private final int value; + private OutputCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OutputCase valueOf(int value) { + return forNumber(value); + } + + public static OutputCase forNumber(int value) { + switch (value) { + case 9: return CLOUD_STORAGE_OUTPUT; + case 0: return OUTPUT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public OutputCase + getOutputCase() { + return OutputCase.forNumber( + outputCase_); + } + + public static final int TRANSFORMATION_CONFIG_FIELD_NUMBER = 7; + private com.google.privacy.dlp.v2.TransformationConfig transformationConfig_; + /** + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * @return Whether the transformationConfig field is set. + */ + @java.lang.Override + public boolean hasTransformationConfig() { + return transformationConfig_ != null; + } + /** + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * @return The transformationConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationConfig getTransformationConfig() { + return transformationConfig_ == null ? com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance() : transformationConfig_; + } + /** + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationConfigOrBuilder getTransformationConfigOrBuilder() { + return getTransformationConfig(); + } + + public static final int TRANSFORMATION_DETAILS_STORAGE_CONFIG_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.TransformationDetailsStorageConfig transformationDetailsStorageConfig_; + /** + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * @return Whether the transformationDetailsStorageConfig field is set. + */ + @java.lang.Override + public boolean hasTransformationDetailsStorageConfig() { + return transformationDetailsStorageConfig_ != null; + } + /** + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * @return The transformationDetailsStorageConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getTransformationDetailsStorageConfig() { + return transformationDetailsStorageConfig_ == null ? com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance() : transformationDetailsStorageConfig_; + } + /** + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder getTransformationDetailsStorageConfigOrBuilder() { + return getTransformationDetailsStorageConfig(); + } + + public static final int CLOUD_STORAGE_OUTPUT_FIELD_NUMBER = 9; + /** + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the cloudStorageOutput field is set. + */ + public boolean hasCloudStorageOutput() { + return outputCase_ == 9; + } + /** + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return The cloudStorageOutput. + */ + public java.lang.String getCloudStorageOutput() { + java.lang.Object ref = ""; + if (outputCase_ == 9) { + ref = output_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (outputCase_ == 9) { + output_ = s; + } + return s; + } + } + /** + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cloudStorageOutput. + */ + public com.google.protobuf.ByteString + getCloudStorageOutputBytes() { + java.lang.Object ref = ""; + if (outputCase_ == 9) { + ref = output_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (outputCase_ == 9) { + output_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_TYPES_TO_TRANSFORM_FIELD_NUMBER = 8; + private java.util.List fileTypesToTransform_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType> fileTypesToTransform_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType>() { + public com.google.privacy.dlp.v2.FileType convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.FileType result = com.google.privacy.dlp.v2.FileType.valueOf(from); + return result == null ? com.google.privacy.dlp.v2.FileType.UNRECOGNIZED : result; + } + }; + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return A list containing the fileTypesToTransform. + */ + @java.lang.Override + public java.util.List getFileTypesToTransformList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypesToTransform_, fileTypesToTransform_converter_); + } + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return The count of fileTypesToTransform. + */ + @java.lang.Override + public int getFileTypesToTransformCount() { + return fileTypesToTransform_.size(); + } + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param index The index of the element to return. + * @return The fileTypesToTransform at the given index. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FileType getFileTypesToTransform(int index) { + return fileTypesToTransform_converter_.convert(fileTypesToTransform_.get(index)); + } + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return A list containing the enum numeric values on the wire for fileTypesToTransform. + */ + @java.lang.Override + public java.util.List + getFileTypesToTransformValueList() { + return fileTypesToTransform_; + } + /** + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fileTypesToTransform at the given index. + */ + @java.lang.Override + public int getFileTypesToTransformValue(int index) { + return fileTypesToTransform_.get(index); + } + private int fileTypesToTransformMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (transformationDetailsStorageConfig_ != null) { + output.writeMessage(3, getTransformationDetailsStorageConfig()); + } + if (transformationConfig_ != null) { + output.writeMessage(7, getTransformationConfig()); + } + if (getFileTypesToTransformList().size() > 0) { + output.writeUInt32NoTag(66); + output.writeUInt32NoTag(fileTypesToTransformMemoizedSerializedSize); + } + for (int i = 0; i < fileTypesToTransform_.size(); i++) { + output.writeEnumNoTag(fileTypesToTransform_.get(i)); + } + if (outputCase_ == 9) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, output_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transformationDetailsStorageConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTransformationDetailsStorageConfig()); + } + if (transformationConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getTransformationConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < fileTypesToTransform_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(fileTypesToTransform_.get(i)); + } + size += dataSize; + if (!getFileTypesToTransformList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }fileTypesToTransformMemoizedSerializedSize = dataSize; + } + if (outputCase_ == 9) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, output_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Action.Deidentify)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Action.Deidentify other = (com.google.privacy.dlp.v2.Action.Deidentify) obj; + + if (hasTransformationConfig() != other.hasTransformationConfig()) return false; + if (hasTransformationConfig()) { + if (!getTransformationConfig() + .equals(other.getTransformationConfig())) return false; + } + if (hasTransformationDetailsStorageConfig() != other.hasTransformationDetailsStorageConfig()) return false; + if (hasTransformationDetailsStorageConfig()) { + if (!getTransformationDetailsStorageConfig() + .equals(other.getTransformationDetailsStorageConfig())) return false; + } + if (!fileTypesToTransform_.equals(other.fileTypesToTransform_)) return false; + if (!getOutputCase().equals(other.getOutputCase())) return false; + switch (outputCase_) { + case 9: + if (!getCloudStorageOutput() + .equals(other.getCloudStorageOutput())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTransformationConfig()) { + hash = (37 * hash) + TRANSFORMATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTransformationConfig().hashCode(); + } + if (hasTransformationDetailsStorageConfig()) { + hash = (37 * hash) + TRANSFORMATION_DETAILS_STORAGE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTransformationDetailsStorageConfig().hashCode(); + } + if (getFileTypesToTransformCount() > 0) { + hash = (37 * hash) + FILE_TYPES_TO_TRANSFORM_FIELD_NUMBER; + hash = (53 * hash) + fileTypesToTransform_.hashCode(); + } + switch (outputCase_) { + case 9: + hash = (37 * hash) + CLOUD_STORAGE_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getCloudStorageOutput().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Action.Deidentify prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Create a de-identified copy of the requested table or files.
+     * A TransformationDetail will be created for each transformation.
+     * If any rows in BigQuery are skipped during de-identification
+     * (transformation errors or row size exceeds BigQuery insert API limits) they
+     * are placed in the failure output table. If the original row exceeds
+     * the BigQuery insert API limit it will be truncated when written to the
+     * failure output table. The failure output table can be set in the
+     * action.deidentify.output.big_query_output.deidentified_failure_output_table
+     * field, if no table is set, a table will be automatically created in the
+     * same project and dataset as the original table.
+     * Compatible with: Inspect
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.Deidentify} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.Deidentify) + com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.Deidentify.class, com.google.privacy.dlp.v2.Action.Deidentify.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Action.Deidentify.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (transformationConfigBuilder_ == null) { + transformationConfig_ = null; + } else { + transformationConfig_ = null; + transformationConfigBuilder_ = null; + } + if (transformationDetailsStorageConfigBuilder_ == null) { + transformationDetailsStorageConfig_ = null; + } else { + transformationDetailsStorageConfig_ = null; + transformationDetailsStorageConfigBuilder_ = null; + } + fileTypesToTransform_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + outputCase_ = 0; + output_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify build() { + com.google.privacy.dlp.v2.Action.Deidentify result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify buildPartial() { + com.google.privacy.dlp.v2.Action.Deidentify result = new com.google.privacy.dlp.v2.Action.Deidentify(this); + int from_bitField0_ = bitField0_; + if (transformationConfigBuilder_ == null) { + result.transformationConfig_ = transformationConfig_; + } else { + result.transformationConfig_ = transformationConfigBuilder_.build(); + } + if (transformationDetailsStorageConfigBuilder_ == null) { + result.transformationDetailsStorageConfig_ = transformationDetailsStorageConfig_; + } else { + result.transformationDetailsStorageConfig_ = transformationDetailsStorageConfigBuilder_.build(); + } + if (outputCase_ == 9) { + result.output_ = output_; + } + if (((bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = java.util.Collections.unmodifiableList(fileTypesToTransform_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fileTypesToTransform_ = fileTypesToTransform_; + result.outputCase_ = outputCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Action.Deidentify) { + return mergeFrom((com.google.privacy.dlp.v2.Action.Deidentify)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Action.Deidentify other) { + if (other == com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance()) return this; + if (other.hasTransformationConfig()) { + mergeTransformationConfig(other.getTransformationConfig()); + } + if (other.hasTransformationDetailsStorageConfig()) { + mergeTransformationDetailsStorageConfig(other.getTransformationDetailsStorageConfig()); + } + if (!other.fileTypesToTransform_.isEmpty()) { + if (fileTypesToTransform_.isEmpty()) { + fileTypesToTransform_ = other.fileTypesToTransform_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.addAll(other.fileTypesToTransform_); + } + onChanged(); + } + switch (other.getOutputCase()) { + case CLOUD_STORAGE_OUTPUT: { + outputCase_ = 9; + output_ = other.output_; + onChanged(); + break; + } + case OUTPUT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action.Deidentify parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Action.Deidentify) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int outputCase_ = 0; + private java.lang.Object output_; + public OutputCase + getOutputCase() { + return OutputCase.forNumber( + outputCase_); + } + + public Builder clearOutput() { + outputCase_ = 0; + output_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.privacy.dlp.v2.TransformationConfig transformationConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationConfig, com.google.privacy.dlp.v2.TransformationConfig.Builder, com.google.privacy.dlp.v2.TransformationConfigOrBuilder> transformationConfigBuilder_; + /** + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * @return Whether the transformationConfig field is set. + */ + public boolean hasTransformationConfig() { + return transformationConfigBuilder_ != null || transformationConfig_ != null; + } + /** + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * @return The transformationConfig. + */ + public com.google.privacy.dlp.v2.TransformationConfig getTransformationConfig() { + if (transformationConfigBuilder_ == null) { + return transformationConfig_ == null ? com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance() : transformationConfig_; + } else { + return transformationConfigBuilder_.getMessage(); + } + } + /** + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public Builder setTransformationConfig(com.google.privacy.dlp.v2.TransformationConfig value) { + if (transformationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationConfig_ = value; + onChanged(); + } else { + transformationConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public Builder setTransformationConfig( + com.google.privacy.dlp.v2.TransformationConfig.Builder builderForValue) { + if (transformationConfigBuilder_ == null) { + transformationConfig_ = builderForValue.build(); + onChanged(); + } else { + transformationConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public Builder mergeTransformationConfig(com.google.privacy.dlp.v2.TransformationConfig value) { + if (transformationConfigBuilder_ == null) { + if (transformationConfig_ != null) { + transformationConfig_ = + com.google.privacy.dlp.v2.TransformationConfig.newBuilder(transformationConfig_).mergeFrom(value).buildPartial(); + } else { + transformationConfig_ = value; + } + onChanged(); + } else { + transformationConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public Builder clearTransformationConfig() { + if (transformationConfigBuilder_ == null) { + transformationConfig_ = null; + onChanged(); + } else { + transformationConfig_ = null; + transformationConfigBuilder_ = null; + } + + return this; + } + /** + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public com.google.privacy.dlp.v2.TransformationConfig.Builder getTransformationConfigBuilder() { + + onChanged(); + return getTransformationConfigFieldBuilder().getBuilder(); + } + /** + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public com.google.privacy.dlp.v2.TransformationConfigOrBuilder getTransformationConfigOrBuilder() { + if (transformationConfigBuilder_ != null) { + return transformationConfigBuilder_.getMessageOrBuilder(); + } else { + return transformationConfig_ == null ? + com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance() : transformationConfig_; + } + } + /** + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationConfig, com.google.privacy.dlp.v2.TransformationConfig.Builder, com.google.privacy.dlp.v2.TransformationConfigOrBuilder> + getTransformationConfigFieldBuilder() { + if (transformationConfigBuilder_ == null) { + transformationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationConfig, com.google.privacy.dlp.v2.TransformationConfig.Builder, com.google.privacy.dlp.v2.TransformationConfigOrBuilder>( + getTransformationConfig(), + getParentForChildren(), + isClean()); + transformationConfig_ = null; + } + return transformationConfigBuilder_; + } + + private com.google.privacy.dlp.v2.TransformationDetailsStorageConfig transformationDetailsStorageConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder, com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder> transformationDetailsStorageConfigBuilder_; + /** + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * @return Whether the transformationDetailsStorageConfig field is set. + */ + public boolean hasTransformationDetailsStorageConfig() { + return transformationDetailsStorageConfigBuilder_ != null || transformationDetailsStorageConfig_ != null; + } + /** + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * @return The transformationDetailsStorageConfig. + */ + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getTransformationDetailsStorageConfig() { + if (transformationDetailsStorageConfigBuilder_ == null) { + return transformationDetailsStorageConfig_ == null ? com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance() : transformationDetailsStorageConfig_; + } else { + return transformationDetailsStorageConfigBuilder_.getMessage(); + } + } + /** + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + */ + public Builder setTransformationDetailsStorageConfig(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig value) { + if (transformationDetailsStorageConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetailsStorageConfig_ = value; + onChanged(); + } else { + transformationDetailsStorageConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + */ + public Builder setTransformationDetailsStorageConfig( + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder builderForValue) { + if (transformationDetailsStorageConfigBuilder_ == null) { + transformationDetailsStorageConfig_ = builderForValue.build(); + onChanged(); + } else { + transformationDetailsStorageConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + */ + public Builder mergeTransformationDetailsStorageConfig(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig value) { + if (transformationDetailsStorageConfigBuilder_ == null) { + if (transformationDetailsStorageConfig_ != null) { + transformationDetailsStorageConfig_ = + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.newBuilder(transformationDetailsStorageConfig_).mergeFrom(value).buildPartial(); + } else { + transformationDetailsStorageConfig_ = value; + } + onChanged(); + } else { + transformationDetailsStorageConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + */ + public Builder clearTransformationDetailsStorageConfig() { + if (transformationDetailsStorageConfigBuilder_ == null) { + transformationDetailsStorageConfig_ = null; + onChanged(); + } else { + transformationDetailsStorageConfig_ = null; + transformationDetailsStorageConfigBuilder_ = null; + } + + return this; + } + /** + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + */ + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder getTransformationDetailsStorageConfigBuilder() { + + onChanged(); + return getTransformationDetailsStorageConfigFieldBuilder().getBuilder(); + } + /** + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + */ + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder getTransformationDetailsStorageConfigOrBuilder() { + if (transformationDetailsStorageConfigBuilder_ != null) { + return transformationDetailsStorageConfigBuilder_.getMessageOrBuilder(); + } else { + return transformationDetailsStorageConfig_ == null ? + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance() : transformationDetailsStorageConfig_; + } + } + /** + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder, com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder> + getTransformationDetailsStorageConfigFieldBuilder() { + if (transformationDetailsStorageConfigBuilder_ == null) { + transformationDetailsStorageConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder, com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder>( + getTransformationDetailsStorageConfig(), + getParentForChildren(), + isClean()); + transformationDetailsStorageConfig_ = null; + } + return transformationDetailsStorageConfigBuilder_; + } + + /** + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the cloudStorageOutput field is set. + */ + @java.lang.Override + public boolean hasCloudStorageOutput() { + return outputCase_ == 9; + } + /** + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return The cloudStorageOutput. + */ + @java.lang.Override + public java.lang.String getCloudStorageOutput() { + java.lang.Object ref = ""; + if (outputCase_ == 9) { + ref = output_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (outputCase_ == 9) { + output_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cloudStorageOutput. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCloudStorageOutputBytes() { + java.lang.Object ref = ""; + if (outputCase_ == 9) { + ref = output_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (outputCase_ == 9) { + output_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param value The cloudStorageOutput to set. + * @return This builder for chaining. + */ + public Builder setCloudStorageOutput( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputCase_ = 9; + output_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearCloudStorageOutput() { + if (outputCase_ == 9) { + outputCase_ = 0; + output_ = null; + onChanged(); + } + return this; + } + /** + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for cloudStorageOutput to set. + * @return This builder for chaining. + */ + public Builder setCloudStorageOutputBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputCase_ = 9; + output_ = value; + onChanged(); + return this; + } + + private java.util.List fileTypesToTransform_ = + java.util.Collections.emptyList(); + private void ensureFileTypesToTransformIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = new java.util.ArrayList(fileTypesToTransform_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return A list containing the fileTypesToTransform. + */ + public java.util.List getFileTypesToTransformList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypesToTransform_, fileTypesToTransform_converter_); + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return The count of fileTypesToTransform. + */ + public int getFileTypesToTransformCount() { + return fileTypesToTransform_.size(); + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param index The index of the element to return. + * @return The fileTypesToTransform at the given index. + */ + public com.google.privacy.dlp.v2.FileType getFileTypesToTransform(int index) { + return fileTypesToTransform_converter_.convert(fileTypesToTransform_.get(index)); + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param index The index to set the value at. + * @param value The fileTypesToTransform to set. + * @return This builder for chaining. + */ + public Builder setFileTypesToTransform( + int index, com.google.privacy.dlp.v2.FileType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param value The fileTypesToTransform to add. + * @return This builder for chaining. + */ + public Builder addFileTypesToTransform(com.google.privacy.dlp.v2.FileType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.add(value.getNumber()); + onChanged(); + return this; + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param values The fileTypesToTransform to add. + * @return This builder for chaining. + */ + public Builder addAllFileTypesToTransform( + java.lang.Iterable values) { + ensureFileTypesToTransformIsMutable(); + for (com.google.privacy.dlp.v2.FileType value : values) { + fileTypesToTransform_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return This builder for chaining. + */ + public Builder clearFileTypesToTransform() { + fileTypesToTransform_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @return A list containing the enum numeric values on the wire for fileTypesToTransform. + */ + public java.util.List + getFileTypesToTransformValueList() { + return java.util.Collections.unmodifiableList(fileTypesToTransform_); + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fileTypesToTransform at the given index. + */ + public int getFileTypesToTransformValue(int index) { + return fileTypesToTransform_.get(index); + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for fileTypesToTransform to set. + * @return This builder for chaining. + */ + public Builder setFileTypesToTransformValue( + int index, int value) { + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param value The enum numeric value on the wire for fileTypesToTransform to add. + * @return This builder for chaining. + */ + public Builder addFileTypesToTransformValue(int value) { + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.add(value); + onChanged(); + return this; + } + /** + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * @param values The enum numeric values on the wire for fileTypesToTransform to add. + * @return This builder for chaining. + */ + public Builder addAllFileTypesToTransformValue( + java.lang.Iterable values) { + ensureFileTypesToTransformIsMutable(); + for (int value : values) { + fileTypesToTransform_.add(value); + } + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.Deidentify) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.Deidentify) + private static final com.google.privacy.dlp.v2.Action.Deidentify DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.Deidentify(); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Deidentify parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Deidentify(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface JobNotificationEmailsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.JobNotificationEmails) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Sends an email when the job completes. The email goes to IAM project owners
+   * and technical [Essential
+   * Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.JobNotificationEmails} + */ + public static final class JobNotificationEmails extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.JobNotificationEmails) + JobNotificationEmailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use JobNotificationEmails.newBuilder() to construct. + private JobNotificationEmails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JobNotificationEmails() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JobNotificationEmails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private JobNotificationEmails( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.JobNotificationEmails.class, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Action.JobNotificationEmails)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Action.JobNotificationEmails other = (com.google.privacy.dlp.v2.Action.JobNotificationEmails) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Action.JobNotificationEmails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Sends an email when the job completes. The email goes to IAM project owners
+     * and technical [Essential
+     * Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.JobNotificationEmails} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.JobNotificationEmails) + com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.JobNotificationEmails.class, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Action.JobNotificationEmails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.JobNotificationEmails getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.JobNotificationEmails build() { + com.google.privacy.dlp.v2.Action.JobNotificationEmails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.JobNotificationEmails buildPartial() { + com.google.privacy.dlp.v2.Action.JobNotificationEmails result = new com.google.privacy.dlp.v2.Action.JobNotificationEmails(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Action.JobNotificationEmails) { + return mergeFrom((com.google.privacy.dlp.v2.Action.JobNotificationEmails)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Action.JobNotificationEmails other) { + if (other == com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action.JobNotificationEmails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Action.JobNotificationEmails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.JobNotificationEmails) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.JobNotificationEmails) + private static final com.google.privacy.dlp.v2.Action.JobNotificationEmails DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.JobNotificationEmails(); + } + + public static com.google.privacy.dlp.v2.Action.JobNotificationEmails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JobNotificationEmails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JobNotificationEmails(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.JobNotificationEmails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PublishToStackdriverOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.PublishToStackdriver) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Enable Stackdriver metric dlp.googleapis.com/finding_count. This
+   * will publish a metric to stack driver on each infotype requested and
+   * how many findings were found for it. CustomDetectors will be bucketed
+   * as 'Custom' under the Stackdriver label 'info_type'.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.PublishToStackdriver} + */ + public static final class PublishToStackdriver extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.PublishToStackdriver) + PublishToStackdriverOrBuilder { + private static final long serialVersionUID = 0L; + // Use PublishToStackdriver.newBuilder() to construct. + private PublishToStackdriver(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PublishToStackdriver() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublishToStackdriver(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PublishToStackdriver( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.PublishToStackdriver.class, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Action.PublishToStackdriver)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Action.PublishToStackdriver other = (com.google.privacy.dlp.v2.Action.PublishToStackdriver) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Action.PublishToStackdriver prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count. This
+     * will publish a metric to stack driver on each infotype requested and
+     * how many findings were found for it. CustomDetectors will be bucketed
+     * as 'Custom' under the Stackdriver label 'info_type'.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.PublishToStackdriver} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.PublishToStackdriver) + com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.PublishToStackdriver.class, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Action.PublishToStackdriver.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToStackdriver getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToStackdriver build() { + com.google.privacy.dlp.v2.Action.PublishToStackdriver result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToStackdriver buildPartial() { + com.google.privacy.dlp.v2.Action.PublishToStackdriver result = new com.google.privacy.dlp.v2.Action.PublishToStackdriver(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Action.PublishToStackdriver) { + return mergeFrom((com.google.privacy.dlp.v2.Action.PublishToStackdriver)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Action.PublishToStackdriver other) { + if (other == com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action.PublishToStackdriver parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Action.PublishToStackdriver) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishToStackdriver) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishToStackdriver) + private static final com.google.privacy.dlp.v2.Action.PublishToStackdriver DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishToStackdriver(); + } + + public static com.google.privacy.dlp.v2.Action.PublishToStackdriver getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublishToStackdriver parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PublishToStackdriver(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToStackdriver getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int actionCase_ = 0; + private java.lang.Object action_; + public enum ActionCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SAVE_FINDINGS(1), + PUB_SUB(2), + PUBLISH_SUMMARY_TO_CSCC(3), + PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG(5), + DEIDENTIFY(7), + JOB_NOTIFICATION_EMAILS(8), + PUBLISH_TO_STACKDRIVER(9), + ACTION_NOT_SET(0); + private final int value; + private ActionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 1: return SAVE_FINDINGS; + case 2: return PUB_SUB; + case 3: return PUBLISH_SUMMARY_TO_CSCC; + case 5: return PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG; + case 7: return DEIDENTIFY; + case 8: return JOB_NOTIFICATION_EMAILS; + case 9: return PUBLISH_TO_STACKDRIVER; + case 0: return ACTION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ActionCase + getActionCase() { + return ActionCase.forNumber( + actionCase_); + } + + public static final int SAVE_FINDINGS_FIELD_NUMBER = 1; + /** + *
+   * Save resulting findings in a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + * @return Whether the saveFindings field is set. + */ + @java.lang.Override + public boolean hasSaveFindings() { + return actionCase_ == 1; + } + /** + *
+   * Save resulting findings in a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + * @return The saveFindings. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.SaveFindings getSaveFindings() { + if (actionCase_ == 1) { + return (com.google.privacy.dlp.v2.Action.SaveFindings) action_; + } + return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); + } + /** + *
+   * Save resulting findings in a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder getSaveFindingsOrBuilder() { + if (actionCase_ == 1) { + return (com.google.privacy.dlp.v2.Action.SaveFindings) action_; + } + return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); + } + + public static final int PUB_SUB_FIELD_NUMBER = 2; + /** + *
+   * Publish a notification to a Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + * @return Whether the pubSub field is set. + */ + @java.lang.Override + public boolean hasPubSub() { + return actionCase_ == 2; + } + /** + *
+   * Publish a notification to a Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + * @return The pubSub. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToPubSub getPubSub() { + if (actionCase_ == 2) { + return (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_; + } + return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); + } + /** + *
+   * Publish a notification to a Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder getPubSubOrBuilder() { + if (actionCase_ == 2) { + return (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_; + } + return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); + } + + public static final int PUBLISH_SUMMARY_TO_CSCC_FIELD_NUMBER = 3; + /** + *
+   * Publish summary to Cloud Security Command Center (Alpha).
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + * @return Whether the publishSummaryToCscc field is set. + */ + @java.lang.Override + public boolean hasPublishSummaryToCscc() { + return actionCase_ == 3; + } + /** + *
+   * Publish summary to Cloud Security Command Center (Alpha).
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + * @return The publishSummaryToCscc. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getPublishSummaryToCscc() { + if (actionCase_ == 3) { + return (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_; + } + return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); + } + /** + *
+   * Publish summary to Cloud Security Command Center (Alpha).
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder getPublishSummaryToCsccOrBuilder() { + if (actionCase_ == 3) { + return (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_; + } + return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); + } + + public static final int PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG_FIELD_NUMBER = 5; + /** + *
+   * Publish findings to Cloud Datahub.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + * @return Whether the publishFindingsToCloudDataCatalog field is set. + */ + @java.lang.Override + public boolean hasPublishFindingsToCloudDataCatalog() { + return actionCase_ == 5; + } + /** + *
+   * Publish findings to Cloud Datahub.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + * @return The publishFindingsToCloudDataCatalog. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getPublishFindingsToCloudDataCatalog() { + if (actionCase_ == 5) { + return (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_; + } + return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); + } + /** + *
+   * Publish findings to Cloud Datahub.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder getPublishFindingsToCloudDataCatalogOrBuilder() { + if (actionCase_ == 5) { + return (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_; + } + return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); + } + + public static final int DEIDENTIFY_FIELD_NUMBER = 7; + /** + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * @return Whether the deidentify field is set. + */ + @java.lang.Override + public boolean hasDeidentify() { + return actionCase_ == 7; + } + /** + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * @return The deidentify. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify getDeidentify() { + if (actionCase_ == 7) { + return (com.google.privacy.dlp.v2.Action.Deidentify) action_; + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + /** + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder getDeidentifyOrBuilder() { + if (actionCase_ == 7) { + return (com.google.privacy.dlp.v2.Action.Deidentify) action_; + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + + public static final int JOB_NOTIFICATION_EMAILS_FIELD_NUMBER = 8; + /** + *
+   * Enable email notification for project owners and editors on job's
+   * completion/failure.
+   * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + * @return Whether the jobNotificationEmails field is set. + */ + @java.lang.Override + public boolean hasJobNotificationEmails() { + return actionCase_ == 8; + } + /** + *
+   * Enable email notification for project owners and editors on job's
+   * completion/failure.
+   * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + * @return The jobNotificationEmails. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.JobNotificationEmails getJobNotificationEmails() { + if (actionCase_ == 8) { + return (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_; + } + return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); + } + /** + *
+   * Enable email notification for project owners and editors on job's
+   * completion/failure.
+   * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder getJobNotificationEmailsOrBuilder() { + if (actionCase_ == 8) { + return (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_; + } + return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); + } + + public static final int PUBLISH_TO_STACKDRIVER_FIELD_NUMBER = 9; + /** + *
+   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + * @return Whether the publishToStackdriver field is set. + */ + @java.lang.Override + public boolean hasPublishToStackdriver() { + return actionCase_ == 9; + } + /** + *
+   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + * @return The publishToStackdriver. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToStackdriver getPublishToStackdriver() { + if (actionCase_ == 9) { + return (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_; + } + return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); + } + /** + *
+   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder getPublishToStackdriverOrBuilder() { + if (actionCase_ == 9) { + return (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_; + } + return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (actionCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.Action.SaveFindings) action_); + } + if (actionCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_); + } + if (actionCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_); + } + if (actionCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_); + } + if (actionCase_ == 7) { + output.writeMessage(7, (com.google.privacy.dlp.v2.Action.Deidentify) action_); + } + if (actionCase_ == 8) { + output.writeMessage(8, (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_); + } + if (actionCase_ == 9) { + output.writeMessage(9, (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.Action.SaveFindings) action_); + } + if (actionCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_); + } + if (actionCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_); + } + if (actionCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_); + } + if (actionCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.google.privacy.dlp.v2.Action.Deidentify) action_); + } + if (actionCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_); + } + if (actionCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Action)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Action other = (com.google.privacy.dlp.v2.Action) obj; + + if (!getActionCase().equals(other.getActionCase())) return false; + switch (actionCase_) { + case 1: + if (!getSaveFindings() + .equals(other.getSaveFindings())) return false; + break; + case 2: + if (!getPubSub() + .equals(other.getPubSub())) return false; + break; + case 3: + if (!getPublishSummaryToCscc() + .equals(other.getPublishSummaryToCscc())) return false; + break; + case 5: + if (!getPublishFindingsToCloudDataCatalog() + .equals(other.getPublishFindingsToCloudDataCatalog())) return false; + break; + case 7: + if (!getDeidentify() + .equals(other.getDeidentify())) return false; + break; + case 8: + if (!getJobNotificationEmails() + .equals(other.getJobNotificationEmails())) return false; + break; + case 9: + if (!getPublishToStackdriver() + .equals(other.getPublishToStackdriver())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (actionCase_) { + case 1: + hash = (37 * hash) + SAVE_FINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getSaveFindings().hashCode(); + break; + case 2: + hash = (37 * hash) + PUB_SUB_FIELD_NUMBER; + hash = (53 * hash) + getPubSub().hashCode(); + break; + case 3: + hash = (37 * hash) + PUBLISH_SUMMARY_TO_CSCC_FIELD_NUMBER; + hash = (53 * hash) + getPublishSummaryToCscc().hashCode(); + break; + case 5: + hash = (37 * hash) + PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG_FIELD_NUMBER; + hash = (53 * hash) + getPublishFindingsToCloudDataCatalog().hashCode(); + break; + case 7: + hash = (37 * hash) + DEIDENTIFY_FIELD_NUMBER; + hash = (53 * hash) + getDeidentify().hashCode(); + break; + case 8: + hash = (37 * hash) + JOB_NOTIFICATION_EMAILS_FIELD_NUMBER; + hash = (53 * hash) + getJobNotificationEmails().hashCode(); + break; + case 9: + hash = (37 * hash) + PUBLISH_TO_STACKDRIVER_FIELD_NUMBER; + hash = (53 * hash) + getPublishToStackdriver().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Action parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Action parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Action parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Action parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Action prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A task to execute on the completion of a job.
+   * See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action) + com.google.privacy.dlp.v2.ActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.class, com.google.privacy.dlp.v2.Action.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Action.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Action.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action build() { + com.google.privacy.dlp.v2.Action result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action buildPartial() { + com.google.privacy.dlp.v2.Action result = new com.google.privacy.dlp.v2.Action(this); + if (actionCase_ == 1) { + if (saveFindingsBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = saveFindingsBuilder_.build(); + } + } + if (actionCase_ == 2) { + if (pubSubBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = pubSubBuilder_.build(); + } + } + if (actionCase_ == 3) { + if (publishSummaryToCsccBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = publishSummaryToCsccBuilder_.build(); + } + } + if (actionCase_ == 5) { + if (publishFindingsToCloudDataCatalogBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = publishFindingsToCloudDataCatalogBuilder_.build(); + } + } + if (actionCase_ == 7) { + if (deidentifyBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = deidentifyBuilder_.build(); + } + } + if (actionCase_ == 8) { + if (jobNotificationEmailsBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = jobNotificationEmailsBuilder_.build(); + } + } + if (actionCase_ == 9) { + if (publishToStackdriverBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = publishToStackdriverBuilder_.build(); + } + } + result.actionCase_ = actionCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Action) { + return mergeFrom((com.google.privacy.dlp.v2.Action)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Action other) { + if (other == com.google.privacy.dlp.v2.Action.getDefaultInstance()) return this; + switch (other.getActionCase()) { + case SAVE_FINDINGS: { + mergeSaveFindings(other.getSaveFindings()); + break; + } + case PUB_SUB: { + mergePubSub(other.getPubSub()); + break; + } + case PUBLISH_SUMMARY_TO_CSCC: { + mergePublishSummaryToCscc(other.getPublishSummaryToCscc()); + break; + } + case PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG: { + mergePublishFindingsToCloudDataCatalog(other.getPublishFindingsToCloudDataCatalog()); + break; + } + case DEIDENTIFY: { + mergeDeidentify(other.getDeidentify()); + break; + } + case JOB_NOTIFICATION_EMAILS: { + mergeJobNotificationEmails(other.getJobNotificationEmails()); + break; + } + case PUBLISH_TO_STACKDRIVER: { + mergePublishToStackdriver(other.getPublishToStackdriver()); + break; + } + case ACTION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Action) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int actionCase_ = 0; + private java.lang.Object action_; + public ActionCase + getActionCase() { + return ActionCase.forNumber( + actionCase_); + } + + public Builder clearAction() { + actionCase_ = 0; + action_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.SaveFindings, com.google.privacy.dlp.v2.Action.SaveFindings.Builder, com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder> saveFindingsBuilder_; + /** + *
+     * Save resulting findings in a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + * @return Whether the saveFindings field is set. + */ + @java.lang.Override + public boolean hasSaveFindings() { + return actionCase_ == 1; + } + /** + *
+     * Save resulting findings in a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + * @return The saveFindings. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.SaveFindings getSaveFindings() { + if (saveFindingsBuilder_ == null) { + if (actionCase_ == 1) { + return (com.google.privacy.dlp.v2.Action.SaveFindings) action_; + } + return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); + } else { + if (actionCase_ == 1) { + return saveFindingsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); + } + } + /** + *
+     * Save resulting findings in a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + */ + public Builder setSaveFindings(com.google.privacy.dlp.v2.Action.SaveFindings value) { + if (saveFindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + saveFindingsBuilder_.setMessage(value); + } + actionCase_ = 1; + return this; + } + /** + *
+     * Save resulting findings in a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + */ + public Builder setSaveFindings( + com.google.privacy.dlp.v2.Action.SaveFindings.Builder builderForValue) { + if (saveFindingsBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + saveFindingsBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 1; + return this; + } + /** + *
+     * Save resulting findings in a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + */ + public Builder mergeSaveFindings(com.google.privacy.dlp.v2.Action.SaveFindings value) { + if (saveFindingsBuilder_ == null) { + if (actionCase_ == 1 && + action_ != com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance()) { + action_ = com.google.privacy.dlp.v2.Action.SaveFindings.newBuilder((com.google.privacy.dlp.v2.Action.SaveFindings) action_) + .mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 1) { + saveFindingsBuilder_.mergeFrom(value); + } else { + saveFindingsBuilder_.setMessage(value); + } + } + actionCase_ = 1; + return this; + } + /** + *
+     * Save resulting findings in a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + */ + public Builder clearSaveFindings() { + if (saveFindingsBuilder_ == null) { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + } + saveFindingsBuilder_.clear(); + } + return this; + } + /** + *
+     * Save resulting findings in a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + */ + public com.google.privacy.dlp.v2.Action.SaveFindings.Builder getSaveFindingsBuilder() { + return getSaveFindingsFieldBuilder().getBuilder(); + } + /** + *
+     * Save resulting findings in a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder getSaveFindingsOrBuilder() { + if ((actionCase_ == 1) && (saveFindingsBuilder_ != null)) { + return saveFindingsBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 1) { + return (com.google.privacy.dlp.v2.Action.SaveFindings) action_; + } + return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); + } + } + /** + *
+     * Save resulting findings in a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.SaveFindings, com.google.privacy.dlp.v2.Action.SaveFindings.Builder, com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder> + getSaveFindingsFieldBuilder() { + if (saveFindingsBuilder_ == null) { + if (!(actionCase_ == 1)) { + action_ = com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); + } + saveFindingsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.SaveFindings, com.google.privacy.dlp.v2.Action.SaveFindings.Builder, com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder>( + (com.google.privacy.dlp.v2.Action.SaveFindings) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 1; + onChanged();; + return saveFindingsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishToPubSub, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder, com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder> pubSubBuilder_; + /** + *
+     * Publish a notification to a Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + * @return Whether the pubSub field is set. + */ + @java.lang.Override + public boolean hasPubSub() { + return actionCase_ == 2; + } + /** + *
+     * Publish a notification to a Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + * @return The pubSub. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToPubSub getPubSub() { + if (pubSubBuilder_ == null) { + if (actionCase_ == 2) { + return (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_; + } + return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); + } else { + if (actionCase_ == 2) { + return pubSubBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); + } + } + /** + *
+     * Publish a notification to a Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + */ + public Builder setPubSub(com.google.privacy.dlp.v2.Action.PublishToPubSub value) { + if (pubSubBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + pubSubBuilder_.setMessage(value); + } + actionCase_ = 2; + return this; + } + /** + *
+     * Publish a notification to a Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + */ + public Builder setPubSub( + com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder builderForValue) { + if (pubSubBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + pubSubBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 2; + return this; + } + /** + *
+     * Publish a notification to a Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + */ + public Builder mergePubSub(com.google.privacy.dlp.v2.Action.PublishToPubSub value) { + if (pubSubBuilder_ == null) { + if (actionCase_ == 2 && + action_ != com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance()) { + action_ = com.google.privacy.dlp.v2.Action.PublishToPubSub.newBuilder((com.google.privacy.dlp.v2.Action.PublishToPubSub) action_) + .mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 2) { + pubSubBuilder_.mergeFrom(value); + } else { + pubSubBuilder_.setMessage(value); + } + } + actionCase_ = 2; + return this; + } + /** + *
+     * Publish a notification to a Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + */ + public Builder clearPubSub() { + if (pubSubBuilder_ == null) { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + } + pubSubBuilder_.clear(); + } + return this; + } + /** + *
+     * Publish a notification to a Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + */ + public com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder getPubSubBuilder() { + return getPubSubFieldBuilder().getBuilder(); + } + /** + *
+     * Publish a notification to a Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder getPubSubOrBuilder() { + if ((actionCase_ == 2) && (pubSubBuilder_ != null)) { + return pubSubBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 2) { + return (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_; + } + return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); + } + } + /** + *
+     * Publish a notification to a Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishToPubSub, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder, com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder> + getPubSubFieldBuilder() { + if (pubSubBuilder_ == null) { + if (!(actionCase_ == 2)) { + action_ = com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); + } + pubSubBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishToPubSub, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder, com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder>( + (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 2; + onChanged();; + return pubSubBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder, com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder> publishSummaryToCsccBuilder_; + /** + *
+     * Publish summary to Cloud Security Command Center (Alpha).
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + * @return Whether the publishSummaryToCscc field is set. + */ + @java.lang.Override + public boolean hasPublishSummaryToCscc() { + return actionCase_ == 3; + } + /** + *
+     * Publish summary to Cloud Security Command Center (Alpha).
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + * @return The publishSummaryToCscc. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getPublishSummaryToCscc() { + if (publishSummaryToCsccBuilder_ == null) { + if (actionCase_ == 3) { + return (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_; + } + return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); + } else { + if (actionCase_ == 3) { + return publishSummaryToCsccBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); + } + } + /** + *
+     * Publish summary to Cloud Security Command Center (Alpha).
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + */ + public Builder setPublishSummaryToCscc(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc value) { + if (publishSummaryToCsccBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + publishSummaryToCsccBuilder_.setMessage(value); + } + actionCase_ = 3; + return this; + } + /** + *
+     * Publish summary to Cloud Security Command Center (Alpha).
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + */ + public Builder setPublishSummaryToCscc( + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder builderForValue) { + if (publishSummaryToCsccBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + publishSummaryToCsccBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 3; + return this; + } + /** + *
+     * Publish summary to Cloud Security Command Center (Alpha).
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + */ + public Builder mergePublishSummaryToCscc(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc value) { + if (publishSummaryToCsccBuilder_ == null) { + if (actionCase_ == 3 && + action_ != com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance()) { + action_ = com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.newBuilder((com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_) + .mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 3) { + publishSummaryToCsccBuilder_.mergeFrom(value); + } else { + publishSummaryToCsccBuilder_.setMessage(value); + } + } + actionCase_ = 3; + return this; + } + /** + *
+     * Publish summary to Cloud Security Command Center (Alpha).
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + */ + public Builder clearPublishSummaryToCscc() { + if (publishSummaryToCsccBuilder_ == null) { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + } + publishSummaryToCsccBuilder_.clear(); + } + return this; + } + /** + *
+     * Publish summary to Cloud Security Command Center (Alpha).
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + */ + public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder getPublishSummaryToCsccBuilder() { + return getPublishSummaryToCsccFieldBuilder().getBuilder(); + } + /** + *
+     * Publish summary to Cloud Security Command Center (Alpha).
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder getPublishSummaryToCsccOrBuilder() { + if ((actionCase_ == 3) && (publishSummaryToCsccBuilder_ != null)) { + return publishSummaryToCsccBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 3) { + return (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_; + } + return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); + } + } + /** + *
+     * Publish summary to Cloud Security Command Center (Alpha).
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder, com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder> + getPublishSummaryToCsccFieldBuilder() { + if (publishSummaryToCsccBuilder_ == null) { + if (!(actionCase_ == 3)) { + action_ = com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); + } + publishSummaryToCsccBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder, com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder>( + (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 3; + onChanged();; + return publishSummaryToCsccBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder> publishFindingsToCloudDataCatalogBuilder_; + /** + *
+     * Publish findings to Cloud Datahub.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + * @return Whether the publishFindingsToCloudDataCatalog field is set. + */ + @java.lang.Override + public boolean hasPublishFindingsToCloudDataCatalog() { + return actionCase_ == 5; + } + /** + *
+     * Publish findings to Cloud Datahub.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + * @return The publishFindingsToCloudDataCatalog. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getPublishFindingsToCloudDataCatalog() { + if (publishFindingsToCloudDataCatalogBuilder_ == null) { + if (actionCase_ == 5) { + return (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_; + } + return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); + } else { + if (actionCase_ == 5) { + return publishFindingsToCloudDataCatalogBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); + } + } + /** + *
+     * Publish findings to Cloud Datahub.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + */ + public Builder setPublishFindingsToCloudDataCatalog(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog value) { + if (publishFindingsToCloudDataCatalogBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + publishFindingsToCloudDataCatalogBuilder_.setMessage(value); + } + actionCase_ = 5; + return this; + } + /** + *
+     * Publish findings to Cloud Datahub.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + */ + public Builder setPublishFindingsToCloudDataCatalog( + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder builderForValue) { + if (publishFindingsToCloudDataCatalogBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + publishFindingsToCloudDataCatalogBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 5; + return this; + } + /** + *
+     * Publish findings to Cloud Datahub.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + */ + public Builder mergePublishFindingsToCloudDataCatalog(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog value) { + if (publishFindingsToCloudDataCatalogBuilder_ == null) { + if (actionCase_ == 5 && + action_ != com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance()) { + action_ = com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.newBuilder((com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_) + .mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 5) { + publishFindingsToCloudDataCatalogBuilder_.mergeFrom(value); + } else { + publishFindingsToCloudDataCatalogBuilder_.setMessage(value); + } + } + actionCase_ = 5; + return this; + } + /** + *
+     * Publish findings to Cloud Datahub.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + */ + public Builder clearPublishFindingsToCloudDataCatalog() { + if (publishFindingsToCloudDataCatalogBuilder_ == null) { + if (actionCase_ == 5) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 5) { + actionCase_ = 0; + action_ = null; + } + publishFindingsToCloudDataCatalogBuilder_.clear(); + } + return this; + } + /** + *
+     * Publish findings to Cloud Datahub.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + */ + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder getPublishFindingsToCloudDataCatalogBuilder() { + return getPublishFindingsToCloudDataCatalogFieldBuilder().getBuilder(); + } + /** + *
+     * Publish findings to Cloud Datahub.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder getPublishFindingsToCloudDataCatalogOrBuilder() { + if ((actionCase_ == 5) && (publishFindingsToCloudDataCatalogBuilder_ != null)) { + return publishFindingsToCloudDataCatalogBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 5) { + return (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_; + } + return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); + } + } + /** + *
+     * Publish findings to Cloud Datahub.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder> + getPublishFindingsToCloudDataCatalogFieldBuilder() { + if (publishFindingsToCloudDataCatalogBuilder_ == null) { + if (!(actionCase_ == 5)) { + action_ = com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); + } + publishFindingsToCloudDataCatalogBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder>( + (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 5; + onChanged();; + return publishFindingsToCloudDataCatalogBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.Deidentify, com.google.privacy.dlp.v2.Action.Deidentify.Builder, com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder> deidentifyBuilder_; + /** + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * @return Whether the deidentify field is set. + */ + @java.lang.Override + public boolean hasDeidentify() { + return actionCase_ == 7; + } + /** + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * @return The deidentify. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify getDeidentify() { + if (deidentifyBuilder_ == null) { + if (actionCase_ == 7) { + return (com.google.privacy.dlp.v2.Action.Deidentify) action_; + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } else { + if (actionCase_ == 7) { + return deidentifyBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + } + /** + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public Builder setDeidentify(com.google.privacy.dlp.v2.Action.Deidentify value) { + if (deidentifyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + deidentifyBuilder_.setMessage(value); + } + actionCase_ = 7; + return this; + } + /** + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public Builder setDeidentify( + com.google.privacy.dlp.v2.Action.Deidentify.Builder builderForValue) { + if (deidentifyBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + deidentifyBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 7; + return this; + } + /** + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public Builder mergeDeidentify(com.google.privacy.dlp.v2.Action.Deidentify value) { + if (deidentifyBuilder_ == null) { + if (actionCase_ == 7 && + action_ != com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance()) { + action_ = com.google.privacy.dlp.v2.Action.Deidentify.newBuilder((com.google.privacy.dlp.v2.Action.Deidentify) action_) + .mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 7) { + deidentifyBuilder_.mergeFrom(value); + } else { + deidentifyBuilder_.setMessage(value); + } + } + actionCase_ = 7; + return this; + } + /** + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public Builder clearDeidentify() { + if (deidentifyBuilder_ == null) { + if (actionCase_ == 7) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 7) { + actionCase_ = 0; + action_ = null; + } + deidentifyBuilder_.clear(); + } + return this; + } + /** + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public com.google.privacy.dlp.v2.Action.Deidentify.Builder getDeidentifyBuilder() { + return getDeidentifyFieldBuilder().getBuilder(); + } + /** + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder getDeidentifyOrBuilder() { + if ((actionCase_ == 7) && (deidentifyBuilder_ != null)) { + return deidentifyBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 7) { + return (com.google.privacy.dlp.v2.Action.Deidentify) action_; + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + } + /** + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.Deidentify, com.google.privacy.dlp.v2.Action.Deidentify.Builder, com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder> + getDeidentifyFieldBuilder() { + if (deidentifyBuilder_ == null) { + if (!(actionCase_ == 7)) { + action_ = com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + deidentifyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.Deidentify, com.google.privacy.dlp.v2.Action.Deidentify.Builder, com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder>( + (com.google.privacy.dlp.v2.Action.Deidentify) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 7; + onChanged();; + return deidentifyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.JobNotificationEmails, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder, com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder> jobNotificationEmailsBuilder_; + /** + *
+     * Enable email notification for project owners and editors on job's
+     * completion/failure.
+     * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + * @return Whether the jobNotificationEmails field is set. + */ + @java.lang.Override + public boolean hasJobNotificationEmails() { + return actionCase_ == 8; + } + /** + *
+     * Enable email notification for project owners and editors on job's
+     * completion/failure.
+     * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + * @return The jobNotificationEmails. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.JobNotificationEmails getJobNotificationEmails() { + if (jobNotificationEmailsBuilder_ == null) { + if (actionCase_ == 8) { + return (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_; + } + return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); + } else { + if (actionCase_ == 8) { + return jobNotificationEmailsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); + } + } + /** + *
+     * Enable email notification for project owners and editors on job's
+     * completion/failure.
+     * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + */ + public Builder setJobNotificationEmails(com.google.privacy.dlp.v2.Action.JobNotificationEmails value) { + if (jobNotificationEmailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + jobNotificationEmailsBuilder_.setMessage(value); + } + actionCase_ = 8; + return this; + } + /** + *
+     * Enable email notification for project owners and editors on job's
+     * completion/failure.
+     * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + */ + public Builder setJobNotificationEmails( + com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder builderForValue) { + if (jobNotificationEmailsBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + jobNotificationEmailsBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 8; + return this; + } + /** + *
+     * Enable email notification for project owners and editors on job's
+     * completion/failure.
+     * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + */ + public Builder mergeJobNotificationEmails(com.google.privacy.dlp.v2.Action.JobNotificationEmails value) { + if (jobNotificationEmailsBuilder_ == null) { + if (actionCase_ == 8 && + action_ != com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance()) { + action_ = com.google.privacy.dlp.v2.Action.JobNotificationEmails.newBuilder((com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_) + .mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 8) { + jobNotificationEmailsBuilder_.mergeFrom(value); + } else { + jobNotificationEmailsBuilder_.setMessage(value); + } + } + actionCase_ = 8; + return this; + } + /** + *
+     * Enable email notification for project owners and editors on job's
+     * completion/failure.
+     * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + */ + public Builder clearJobNotificationEmails() { + if (jobNotificationEmailsBuilder_ == null) { + if (actionCase_ == 8) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 8) { + actionCase_ = 0; + action_ = null; + } + jobNotificationEmailsBuilder_.clear(); + } + return this; + } + /** + *
+     * Enable email notification for project owners and editors on job's
+     * completion/failure.
+     * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + */ + public com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder getJobNotificationEmailsBuilder() { + return getJobNotificationEmailsFieldBuilder().getBuilder(); + } + /** + *
+     * Enable email notification for project owners and editors on job's
+     * completion/failure.
+     * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder getJobNotificationEmailsOrBuilder() { + if ((actionCase_ == 8) && (jobNotificationEmailsBuilder_ != null)) { + return jobNotificationEmailsBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 8) { + return (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_; + } + return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); + } + } + /** + *
+     * Enable email notification for project owners and editors on job's
+     * completion/failure.
+     * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.JobNotificationEmails, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder, com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder> + getJobNotificationEmailsFieldBuilder() { + if (jobNotificationEmailsBuilder_ == null) { + if (!(actionCase_ == 8)) { + action_ = com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); + } + jobNotificationEmailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.JobNotificationEmails, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder, com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder>( + (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 8; + onChanged();; + return jobNotificationEmailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishToStackdriver, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder, com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder> publishToStackdriverBuilder_; + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + * @return Whether the publishToStackdriver field is set. + */ + @java.lang.Override + public boolean hasPublishToStackdriver() { + return actionCase_ == 9; + } + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + * @return The publishToStackdriver. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToStackdriver getPublishToStackdriver() { + if (publishToStackdriverBuilder_ == null) { + if (actionCase_ == 9) { + return (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_; + } + return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); + } else { + if (actionCase_ == 9) { + return publishToStackdriverBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); + } + } + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + */ + public Builder setPublishToStackdriver(com.google.privacy.dlp.v2.Action.PublishToStackdriver value) { + if (publishToStackdriverBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + publishToStackdriverBuilder_.setMessage(value); + } + actionCase_ = 9; + return this; + } + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + */ + public Builder setPublishToStackdriver( + com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder builderForValue) { + if (publishToStackdriverBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + publishToStackdriverBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 9; + return this; + } + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + */ + public Builder mergePublishToStackdriver(com.google.privacy.dlp.v2.Action.PublishToStackdriver value) { + if (publishToStackdriverBuilder_ == null) { + if (actionCase_ == 9 && + action_ != com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance()) { + action_ = com.google.privacy.dlp.v2.Action.PublishToStackdriver.newBuilder((com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_) + .mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 9) { + publishToStackdriverBuilder_.mergeFrom(value); + } else { + publishToStackdriverBuilder_.setMessage(value); + } + } + actionCase_ = 9; + return this; + } + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + */ + public Builder clearPublishToStackdriver() { + if (publishToStackdriverBuilder_ == null) { + if (actionCase_ == 9) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 9) { + actionCase_ = 0; + action_ = null; + } + publishToStackdriverBuilder_.clear(); + } + return this; + } + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + */ + public com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder getPublishToStackdriverBuilder() { + return getPublishToStackdriverFieldBuilder().getBuilder(); + } + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder getPublishToStackdriverOrBuilder() { + if ((actionCase_ == 9) && (publishToStackdriverBuilder_ != null)) { + return publishToStackdriverBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 9) { + return (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_; + } + return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); + } + } + /** + *
+     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+     * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishToStackdriver, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder, com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder> + getPublishToStackdriverFieldBuilder() { + if (publishToStackdriverBuilder_ == null) { + if (!(actionCase_ == 9)) { + action_ = com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); + } + publishToStackdriverBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.PublishToStackdriver, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder, com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder>( + (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 9; + onChanged();; + return publishToStackdriverBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action) + private static final com.google.privacy.dlp.v2.Action DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action(); + } + + public static com.google.privacy.dlp.v2.Action getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Action parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Action(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java new file mode 100644 index 000000000000..4afee7fcd5f6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java @@ -0,0 +1,203 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ActionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Save resulting findings in a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + * @return Whether the saveFindings field is set. + */ + boolean hasSaveFindings(); + /** + *
+   * Save resulting findings in a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + * @return The saveFindings. + */ + com.google.privacy.dlp.v2.Action.SaveFindings getSaveFindings(); + /** + *
+   * Save resulting findings in a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; + */ + com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder getSaveFindingsOrBuilder(); + + /** + *
+   * Publish a notification to a Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + * @return Whether the pubSub field is set. + */ + boolean hasPubSub(); + /** + *
+   * Publish a notification to a Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + * @return The pubSub. + */ + com.google.privacy.dlp.v2.Action.PublishToPubSub getPubSub(); + /** + *
+   * Publish a notification to a Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; + */ + com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder getPubSubOrBuilder(); + + /** + *
+   * Publish summary to Cloud Security Command Center (Alpha).
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + * @return Whether the publishSummaryToCscc field is set. + */ + boolean hasPublishSummaryToCscc(); + /** + *
+   * Publish summary to Cloud Security Command Center (Alpha).
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + * @return The publishSummaryToCscc. + */ + com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getPublishSummaryToCscc(); + /** + *
+   * Publish summary to Cloud Security Command Center (Alpha).
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; + */ + com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder getPublishSummaryToCsccOrBuilder(); + + /** + *
+   * Publish findings to Cloud Datahub.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + * @return Whether the publishFindingsToCloudDataCatalog field is set. + */ + boolean hasPublishFindingsToCloudDataCatalog(); + /** + *
+   * Publish findings to Cloud Datahub.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + * @return The publishFindingsToCloudDataCatalog. + */ + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getPublishFindingsToCloudDataCatalog(); + /** + *
+   * Publish findings to Cloud Datahub.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + */ + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder getPublishFindingsToCloudDataCatalogOrBuilder(); + + /** + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * @return Whether the deidentify field is set. + */ + boolean hasDeidentify(); + /** + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * @return The deidentify. + */ + com.google.privacy.dlp.v2.Action.Deidentify getDeidentify(); + /** + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder getDeidentifyOrBuilder(); + + /** + *
+   * Enable email notification for project owners and editors on job's
+   * completion/failure.
+   * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + * @return Whether the jobNotificationEmails field is set. + */ + boolean hasJobNotificationEmails(); + /** + *
+   * Enable email notification for project owners and editors on job's
+   * completion/failure.
+   * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + * @return The jobNotificationEmails. + */ + com.google.privacy.dlp.v2.Action.JobNotificationEmails getJobNotificationEmails(); + /** + *
+   * Enable email notification for project owners and editors on job's
+   * completion/failure.
+   * 
+ * + * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; + */ + com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder getJobNotificationEmailsOrBuilder(); + + /** + *
+   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + * @return Whether the publishToStackdriver field is set. + */ + boolean hasPublishToStackdriver(); + /** + *
+   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + * @return The publishToStackdriver. + */ + com.google.privacy.dlp.v2.Action.PublishToStackdriver getPublishToStackdriver(); + /** + *
+   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
+   * 
+ * + * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; + */ + com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder getPublishToStackdriverOrBuilder(); + + public com.google.privacy.dlp.v2.Action.ActionCase getActionCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequest.java new file mode 100644 index 000000000000..d1384c4308be --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for ActivateJobTrigger.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ActivateJobTriggerRequest} + */ +public final class ActivateJobTriggerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ActivateJobTriggerRequest) + ActivateJobTriggerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ActivateJobTriggerRequest.newBuilder() to construct. + private ActivateJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ActivateJobTriggerRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ActivateJobTriggerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ActivateJobTriggerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ActivateJobTriggerRequest.class, com.google.privacy.dlp.v2.ActivateJobTriggerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the trigger to activate, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the trigger to activate, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ActivateJobTriggerRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ActivateJobTriggerRequest other = (com.google.privacy.dlp.v2.ActivateJobTriggerRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ActivateJobTriggerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ActivateJobTrigger.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ActivateJobTriggerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ActivateJobTriggerRequest) + com.google.privacy.dlp.v2.ActivateJobTriggerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ActivateJobTriggerRequest.class, com.google.privacy.dlp.v2.ActivateJobTriggerRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ActivateJobTriggerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ActivateJobTriggerRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ActivateJobTriggerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ActivateJobTriggerRequest build() { + com.google.privacy.dlp.v2.ActivateJobTriggerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ActivateJobTriggerRequest buildPartial() { + com.google.privacy.dlp.v2.ActivateJobTriggerRequest result = new com.google.privacy.dlp.v2.ActivateJobTriggerRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ActivateJobTriggerRequest) { + return mergeFrom((com.google.privacy.dlp.v2.ActivateJobTriggerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ActivateJobTriggerRequest other) { + if (other == com.google.privacy.dlp.v2.ActivateJobTriggerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ActivateJobTriggerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ActivateJobTriggerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the trigger to activate, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the trigger to activate, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the trigger to activate, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the trigger to activate, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the trigger to activate, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ActivateJobTriggerRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ActivateJobTriggerRequest) + private static final com.google.privacy.dlp.v2.ActivateJobTriggerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ActivateJobTriggerRequest(); + } + + public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActivateJobTriggerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ActivateJobTriggerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ActivateJobTriggerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequestOrBuilder.java new file mode 100644 index 000000000000..0b4eeaa439bf --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ActivateJobTriggerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ActivateJobTriggerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the trigger to activate, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the trigger to activate, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java new file mode 100644 index 000000000000..9ef5f2a3a20a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java @@ -0,0 +1,21216 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Result of a risk analysis operation request.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails} + */ +public final class AnalyzeDataSourceRiskDetails extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) + AnalyzeDataSourceRiskDetailsOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnalyzeDataSourceRiskDetails.newBuilder() to construct. + private AnalyzeDataSourceRiskDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalyzeDataSourceRiskDetails() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalyzeDataSourceRiskDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnalyzeDataSourceRiskDetails( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.PrivacyMetric.Builder subBuilder = null; + if (requestedPrivacyMetric_ != null) { + subBuilder = requestedPrivacyMetric_.toBuilder(); + } + requestedPrivacyMetric_ = input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(requestedPrivacyMetric_); + requestedPrivacyMetric_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (requestedSourceTable_ != null) { + subBuilder = requestedSourceTable_.toBuilder(); + } + requestedSourceTable_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(requestedSourceTable_); + requestedSourceTable_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder subBuilder = null; + if (resultCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 3; + break; + } + case 34: { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder subBuilder = null; + if (resultCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 4; + break; + } + case 42: { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder subBuilder = null; + if (resultCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 5; + break; + } + case 50: { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder subBuilder = null; + if (resultCase_ == 6) { + subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 6; + break; + } + case 58: { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder subBuilder = null; + if (resultCase_ == 7) { + subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 7; + break; + } + case 74: { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder subBuilder = null; + if (resultCase_ == 9) { + subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 9; + break; + } + case 82: { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder subBuilder = null; + if (requestedOptions_ != null) { + subBuilder = requestedOptions_.toBuilder(); + } + requestedOptions_ = input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(requestedOptions_); + requestedOptions_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder.class); + } + + public interface NumericalStatsResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Minimum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + * @return Whether the minValue field is set. + */ + boolean hasMinValue(); + /** + *
+     * Minimum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + * @return The minValue. + */ + com.google.privacy.dlp.v2.Value getMinValue(); + /** + *
+     * Minimum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getMinValueOrBuilder(); + + /** + *
+     * Maximum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + * @return Whether the maxValue field is set. + */ + boolean hasMaxValue(); + /** + *
+     * Maximum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + * @return The maxValue. + */ + com.google.privacy.dlp.v2.Value getMaxValue(); + /** + *
+     * Maximum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getMaxValueOrBuilder(); + + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + java.util.List + getQuantileValuesList(); + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + com.google.privacy.dlp.v2.Value getQuantileValues(int index); + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + int getQuantileValuesCount(); + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + java.util.List + getQuantileValuesOrBuilderList(); + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getQuantileValuesOrBuilder( + int index); + } + /** + *
+   * Result of the numerical stats computation.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult} + */ + public static final class NumericalStatsResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) + NumericalStatsResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use NumericalStatsResult.newBuilder() to construct. + private NumericalStatsResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NumericalStatsResult() { + quantileValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NumericalStatsResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NumericalStatsResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (minValue_ != null) { + subBuilder = minValue_.toBuilder(); + } + minValue_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minValue_); + minValue_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (maxValue_ != null) { + subBuilder = maxValue_.toBuilder(); + } + maxValue_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxValue_); + maxValue_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quantileValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quantileValues_.add( + input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quantileValues_ = java.util.Collections.unmodifiableList(quantileValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder.class); + } + + public static final int MIN_VALUE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.Value minValue_; + /** + *
+     * Minimum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + * @return Whether the minValue field is set. + */ + @java.lang.Override + public boolean hasMinValue() { + return minValue_ != null; + } + /** + *
+     * Minimum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + * @return The minValue. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getMinValue() { + return minValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : minValue_; + } + /** + *
+     * Minimum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getMinValueOrBuilder() { + return getMinValue(); + } + + public static final int MAX_VALUE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.Value maxValue_; + /** + *
+     * Maximum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + * @return Whether the maxValue field is set. + */ + @java.lang.Override + public boolean hasMaxValue() { + return maxValue_ != null; + } + /** + *
+     * Maximum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + * @return The maxValue. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getMaxValue() { + return maxValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : maxValue_; + } + /** + *
+     * Maximum value appearing in the column.
+     * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getMaxValueOrBuilder() { + return getMaxValue(); + } + + public static final int QUANTILE_VALUES_FIELD_NUMBER = 4; + private java.util.List quantileValues_; + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + @java.lang.Override + public java.util.List getQuantileValuesList() { + return quantileValues_; + } + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + @java.lang.Override + public java.util.List + getQuantileValuesOrBuilderList() { + return quantileValues_; + } + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + @java.lang.Override + public int getQuantileValuesCount() { + return quantileValues_.size(); + } + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getQuantileValues(int index) { + return quantileValues_.get(index); + } + /** + *
+     * List of 99 values that partition the set of field values into 100 equal
+     * sized buckets.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getQuantileValuesOrBuilder( + int index) { + return quantileValues_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minValue_ != null) { + output.writeMessage(1, getMinValue()); + } + if (maxValue_ != null) { + output.writeMessage(2, getMaxValue()); + } + for (int i = 0; i < quantileValues_.size(); i++) { + output.writeMessage(4, quantileValues_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMinValue()); + } + if (maxValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMaxValue()); + } + for (int i = 0; i < quantileValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, quantileValues_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) obj; + + if (hasMinValue() != other.hasMinValue()) return false; + if (hasMinValue()) { + if (!getMinValue() + .equals(other.getMinValue())) return false; + } + if (hasMaxValue() != other.hasMaxValue()) return false; + if (hasMaxValue()) { + if (!getMaxValue() + .equals(other.getMaxValue())) return false; + } + if (!getQuantileValuesList() + .equals(other.getQuantileValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinValue()) { + hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMinValue().hashCode(); + } + if (hasMaxValue()) { + hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMaxValue().hashCode(); + } + if (getQuantileValuesCount() > 0) { + hash = (37 * hash) + QUANTILE_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getQuantileValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Result of the numerical stats computation.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuantileValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (minValueBuilder_ == null) { + minValue_ = null; + } else { + minValue_ = null; + minValueBuilder_ = null; + } + if (maxValueBuilder_ == null) { + maxValue_ = null; + } else { + maxValue_ = null; + maxValueBuilder_ = null; + } + if (quantileValuesBuilder_ == null) { + quantileValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quantileValuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult(this); + int from_bitField0_ = bitField0_; + if (minValueBuilder_ == null) { + result.minValue_ = minValue_; + } else { + result.minValue_ = minValueBuilder_.build(); + } + if (maxValueBuilder_ == null) { + result.maxValue_ = maxValue_; + } else { + result.maxValue_ = maxValueBuilder_.build(); + } + if (quantileValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quantileValues_ = java.util.Collections.unmodifiableList(quantileValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quantileValues_ = quantileValues_; + } else { + result.quantileValues_ = quantileValuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance()) return this; + if (other.hasMinValue()) { + mergeMinValue(other.getMinValue()); + } + if (other.hasMaxValue()) { + mergeMaxValue(other.getMaxValue()); + } + if (quantileValuesBuilder_ == null) { + if (!other.quantileValues_.isEmpty()) { + if (quantileValues_.isEmpty()) { + quantileValues_ = other.quantileValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuantileValuesIsMutable(); + quantileValues_.addAll(other.quantileValues_); + } + onChanged(); + } + } else { + if (!other.quantileValues_.isEmpty()) { + if (quantileValuesBuilder_.isEmpty()) { + quantileValuesBuilder_.dispose(); + quantileValuesBuilder_ = null; + quantileValues_ = other.quantileValues_; + bitField0_ = (bitField0_ & ~0x00000001); + quantileValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuantileValuesFieldBuilder() : null; + } else { + quantileValuesBuilder_.addAllMessages(other.quantileValues_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.Value minValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> minValueBuilder_; + /** + *
+       * Minimum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + * @return Whether the minValue field is set. + */ + public boolean hasMinValue() { + return minValueBuilder_ != null || minValue_ != null; + } + /** + *
+       * Minimum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + * @return The minValue. + */ + public com.google.privacy.dlp.v2.Value getMinValue() { + if (minValueBuilder_ == null) { + return minValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : minValue_; + } else { + return minValueBuilder_.getMessage(); + } + } + /** + *
+       * Minimum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + */ + public Builder setMinValue(com.google.privacy.dlp.v2.Value value) { + if (minValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minValue_ = value; + onChanged(); + } else { + minValueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Minimum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + */ + public Builder setMinValue( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (minValueBuilder_ == null) { + minValue_ = builderForValue.build(); + onChanged(); + } else { + minValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Minimum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + */ + public Builder mergeMinValue(com.google.privacy.dlp.v2.Value value) { + if (minValueBuilder_ == null) { + if (minValue_ != null) { + minValue_ = + com.google.privacy.dlp.v2.Value.newBuilder(minValue_).mergeFrom(value).buildPartial(); + } else { + minValue_ = value; + } + onChanged(); + } else { + minValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Minimum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + */ + public Builder clearMinValue() { + if (minValueBuilder_ == null) { + minValue_ = null; + onChanged(); + } else { + minValue_ = null; + minValueBuilder_ = null; + } + + return this; + } + /** + *
+       * Minimum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getMinValueBuilder() { + + onChanged(); + return getMinValueFieldBuilder().getBuilder(); + } + /** + *
+       * Minimum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getMinValueOrBuilder() { + if (minValueBuilder_ != null) { + return minValueBuilder_.getMessageOrBuilder(); + } else { + return minValue_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : minValue_; + } + } + /** + *
+       * Minimum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value min_value = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getMinValueFieldBuilder() { + if (minValueBuilder_ == null) { + minValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getMinValue(), + getParentForChildren(), + isClean()); + minValue_ = null; + } + return minValueBuilder_; + } + + private com.google.privacy.dlp.v2.Value maxValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> maxValueBuilder_; + /** + *
+       * Maximum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + * @return Whether the maxValue field is set. + */ + public boolean hasMaxValue() { + return maxValueBuilder_ != null || maxValue_ != null; + } + /** + *
+       * Maximum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + * @return The maxValue. + */ + public com.google.privacy.dlp.v2.Value getMaxValue() { + if (maxValueBuilder_ == null) { + return maxValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : maxValue_; + } else { + return maxValueBuilder_.getMessage(); + } + } + /** + *
+       * Maximum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + */ + public Builder setMaxValue(com.google.privacy.dlp.v2.Value value) { + if (maxValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxValue_ = value; + onChanged(); + } else { + maxValueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Maximum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + */ + public Builder setMaxValue( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (maxValueBuilder_ == null) { + maxValue_ = builderForValue.build(); + onChanged(); + } else { + maxValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Maximum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + */ + public Builder mergeMaxValue(com.google.privacy.dlp.v2.Value value) { + if (maxValueBuilder_ == null) { + if (maxValue_ != null) { + maxValue_ = + com.google.privacy.dlp.v2.Value.newBuilder(maxValue_).mergeFrom(value).buildPartial(); + } else { + maxValue_ = value; + } + onChanged(); + } else { + maxValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Maximum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + */ + public Builder clearMaxValue() { + if (maxValueBuilder_ == null) { + maxValue_ = null; + onChanged(); + } else { + maxValue_ = null; + maxValueBuilder_ = null; + } + + return this; + } + /** + *
+       * Maximum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + */ + public com.google.privacy.dlp.v2.Value.Builder getMaxValueBuilder() { + + onChanged(); + return getMaxValueFieldBuilder().getBuilder(); + } + /** + *
+       * Maximum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getMaxValueOrBuilder() { + if (maxValueBuilder_ != null) { + return maxValueBuilder_.getMessageOrBuilder(); + } else { + return maxValue_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : maxValue_; + } + } + /** + *
+       * Maximum value appearing in the column.
+       * 
+ * + * .google.privacy.dlp.v2.Value max_value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getMaxValueFieldBuilder() { + if (maxValueBuilder_ == null) { + maxValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getMaxValue(), + getParentForChildren(), + isClean()); + maxValue_ = null; + } + return maxValueBuilder_; + } + + private java.util.List quantileValues_ = + java.util.Collections.emptyList(); + private void ensureQuantileValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quantileValues_ = new java.util.ArrayList(quantileValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quantileValuesBuilder_; + + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public java.util.List getQuantileValuesList() { + if (quantileValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(quantileValues_); + } else { + return quantileValuesBuilder_.getMessageList(); + } + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public int getQuantileValuesCount() { + if (quantileValuesBuilder_ == null) { + return quantileValues_.size(); + } else { + return quantileValuesBuilder_.getCount(); + } + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public com.google.privacy.dlp.v2.Value getQuantileValues(int index) { + if (quantileValuesBuilder_ == null) { + return quantileValues_.get(index); + } else { + return quantileValuesBuilder_.getMessage(index); + } + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public Builder setQuantileValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quantileValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuantileValuesIsMutable(); + quantileValues_.set(index, value); + onChanged(); + } else { + quantileValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public Builder setQuantileValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quantileValuesBuilder_ == null) { + ensureQuantileValuesIsMutable(); + quantileValues_.set(index, builderForValue.build()); + onChanged(); + } else { + quantileValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public Builder addQuantileValues(com.google.privacy.dlp.v2.Value value) { + if (quantileValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuantileValuesIsMutable(); + quantileValues_.add(value); + onChanged(); + } else { + quantileValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public Builder addQuantileValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quantileValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuantileValuesIsMutable(); + quantileValues_.add(index, value); + onChanged(); + } else { + quantileValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public Builder addQuantileValues( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quantileValuesBuilder_ == null) { + ensureQuantileValuesIsMutable(); + quantileValues_.add(builderForValue.build()); + onChanged(); + } else { + quantileValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public Builder addQuantileValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quantileValuesBuilder_ == null) { + ensureQuantileValuesIsMutable(); + quantileValues_.add(index, builderForValue.build()); + onChanged(); + } else { + quantileValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public Builder addAllQuantileValues( + java.lang.Iterable values) { + if (quantileValuesBuilder_ == null) { + ensureQuantileValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quantileValues_); + onChanged(); + } else { + quantileValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public Builder clearQuantileValues() { + if (quantileValuesBuilder_ == null) { + quantileValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quantileValuesBuilder_.clear(); + } + return this; + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public Builder removeQuantileValues(int index) { + if (quantileValuesBuilder_ == null) { + ensureQuantileValuesIsMutable(); + quantileValues_.remove(index); + onChanged(); + } else { + quantileValuesBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public com.google.privacy.dlp.v2.Value.Builder getQuantileValuesBuilder( + int index) { + return getQuantileValuesFieldBuilder().getBuilder(index); + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getQuantileValuesOrBuilder( + int index) { + if (quantileValuesBuilder_ == null) { + return quantileValues_.get(index); } else { + return quantileValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public java.util.List + getQuantileValuesOrBuilderList() { + if (quantileValuesBuilder_ != null) { + return quantileValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quantileValues_); + } + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuantileValuesBuilder() { + return getQuantileValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuantileValuesBuilder( + int index) { + return getQuantileValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+       * List of 99 values that partition the set of field values into 100 equal
+       * sized buckets.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quantile_values = 4; + */ + public java.util.List + getQuantileValuesBuilderList() { + return getQuantileValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getQuantileValuesFieldBuilder() { + if (quantileValuesBuilder_ == null) { + quantileValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + quantileValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quantileValues_ = null; + } + return quantileValuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NumericalStatsResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NumericalStatsResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CategoricalStatsResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + java.util.List + getValueFrequencyHistogramBucketsList(); + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getValueFrequencyHistogramBuckets(int index); + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + int getValueFrequencyHistogramBucketsCount(); + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + java.util.List + getValueFrequencyHistogramBucketsOrBuilderList(); + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder getValueFrequencyHistogramBucketsOrBuilder( + int index); + } + /** + *
+   * Result of the categorical stats computation.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult} + */ + public static final class CategoricalStatsResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) + CategoricalStatsResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use CategoricalStatsResult.newBuilder() to construct. + private CategoricalStatsResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CategoricalStatsResult() { + valueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CategoricalStatsResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CategoricalStatsResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + valueFrequencyHistogramBuckets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + valueFrequencyHistogramBuckets_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + valueFrequencyHistogramBuckets_ = java.util.Collections.unmodifiableList(valueFrequencyHistogramBuckets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder.class); + } + + public interface CategoricalStatsHistogramBucketOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Lower bound on the value frequency of the values in this bucket.
+       * 
+ * + * int64 value_frequency_lower_bound = 1; + * @return The valueFrequencyLowerBound. + */ + long getValueFrequencyLowerBound(); + + /** + *
+       * Upper bound on the value frequency of the values in this bucket.
+       * 
+ * + * int64 value_frequency_upper_bound = 2; + * @return The valueFrequencyUpperBound. + */ + long getValueFrequencyUpperBound(); + + /** + *
+       * Total number of values in this bucket.
+       * 
+ * + * int64 bucket_size = 3; + * @return The bucketSize. + */ + long getBucketSize(); + + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + java.util.List + getBucketValuesList(); + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + com.google.privacy.dlp.v2.ValueFrequency getBucketValues(int index); + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + int getBucketValuesCount(); + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + java.util.List + getBucketValuesOrBuilderList(); + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getBucketValuesOrBuilder( + int index); + + /** + *
+       * Total number of distinct values in this bucket.
+       * 
+ * + * int64 bucket_value_count = 5; + * @return The bucketValueCount. + */ + long getBucketValueCount(); + } + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket} + */ + public static final class CategoricalStatsHistogramBucket extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) + CategoricalStatsHistogramBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use CategoricalStatsHistogramBucket.newBuilder() to construct. + private CategoricalStatsHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CategoricalStatsHistogramBucket() { + bucketValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CategoricalStatsHistogramBucket(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CategoricalStatsHistogramBucket( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + valueFrequencyLowerBound_ = input.readInt64(); + break; + } + case 16: { + + valueFrequencyUpperBound_ = input.readInt64(); + break; + } + case 24: { + + bucketSize_ = input.readInt64(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + bucketValues_.add( + input.readMessage(com.google.privacy.dlp.v2.ValueFrequency.parser(), extensionRegistry)); + break; + } + case 40: { + + bucketValueCount_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder.class); + } + + public static final int VALUE_FREQUENCY_LOWER_BOUND_FIELD_NUMBER = 1; + private long valueFrequencyLowerBound_; + /** + *
+       * Lower bound on the value frequency of the values in this bucket.
+       * 
+ * + * int64 value_frequency_lower_bound = 1; + * @return The valueFrequencyLowerBound. + */ + @java.lang.Override + public long getValueFrequencyLowerBound() { + return valueFrequencyLowerBound_; + } + + public static final int VALUE_FREQUENCY_UPPER_BOUND_FIELD_NUMBER = 2; + private long valueFrequencyUpperBound_; + /** + *
+       * Upper bound on the value frequency of the values in this bucket.
+       * 
+ * + * int64 value_frequency_upper_bound = 2; + * @return The valueFrequencyUpperBound. + */ + @java.lang.Override + public long getValueFrequencyUpperBound() { + return valueFrequencyUpperBound_; + } + + public static final int BUCKET_SIZE_FIELD_NUMBER = 3; + private long bucketSize_; + /** + *
+       * Total number of values in this bucket.
+       * 
+ * + * int64 bucket_size = 3; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + + public static final int BUCKET_VALUES_FIELD_NUMBER = 4; + private java.util.List bucketValues_; + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + @java.lang.Override + public java.util.List getBucketValuesList() { + return bucketValues_; + } + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + @java.lang.Override + public java.util.List + getBucketValuesOrBuilderList() { + return bucketValues_; + } + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + @java.lang.Override + public int getBucketValuesCount() { + return bucketValues_.size(); + } + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueFrequency getBucketValues(int index) { + return bucketValues_.get(index); + } + /** + *
+       * Sample of value frequencies in this bucket. The total number of
+       * values returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getBucketValuesOrBuilder( + int index) { + return bucketValues_.get(index); + } + + public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 5; + private long bucketValueCount_; + /** + *
+       * Total number of distinct values in this bucket.
+       * 
+ * + * int64 bucket_value_count = 5; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueFrequencyLowerBound_ != 0L) { + output.writeInt64(1, valueFrequencyLowerBound_); + } + if (valueFrequencyUpperBound_ != 0L) { + output.writeInt64(2, valueFrequencyUpperBound_); + } + if (bucketSize_ != 0L) { + output.writeInt64(3, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + output.writeMessage(4, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + output.writeInt64(5, bucketValueCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueFrequencyLowerBound_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, valueFrequencyLowerBound_); + } + if (valueFrequencyUpperBound_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, valueFrequencyUpperBound_); + } + if (bucketSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, bucketValueCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) obj; + + if (getValueFrequencyLowerBound() + != other.getValueFrequencyLowerBound()) return false; + if (getValueFrequencyUpperBound() + != other.getValueFrequencyUpperBound()) return false; + if (getBucketSize() + != other.getBucketSize()) return false; + if (!getBucketValuesList() + .equals(other.getBucketValuesList())) return false; + if (getBucketValueCount() + != other.getBucketValueCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALUE_FREQUENCY_LOWER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getValueFrequencyLowerBound()); + hash = (37 * hash) + VALUE_FREQUENCY_UPPER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getValueFrequencyUpperBound()); + hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketSize()); + if (getBucketValuesCount() > 0) { + hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getBucketValuesList().hashCode(); + } + hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketValueCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBucketValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueFrequencyLowerBound_ = 0L; + + valueFrequencyUpperBound_ = 0L; + + bucketSize_ = 0L; + + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bucketValuesBuilder_.clear(); + } + bucketValueCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket(this); + int from_bitField0_ = bitField0_; + result.valueFrequencyLowerBound_ = valueFrequencyLowerBound_; + result.valueFrequencyUpperBound_ = valueFrequencyUpperBound_; + result.bucketSize_ = bucketSize_; + if (bucketValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bucketValues_ = bucketValues_; + } else { + result.bucketValues_ = bucketValuesBuilder_.build(); + } + result.bucketValueCount_ = bucketValueCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.getDefaultInstance()) return this; + if (other.getValueFrequencyLowerBound() != 0L) { + setValueFrequencyLowerBound(other.getValueFrequencyLowerBound()); + } + if (other.getValueFrequencyUpperBound() != 0L) { + setValueFrequencyUpperBound(other.getValueFrequencyUpperBound()); + } + if (other.getBucketSize() != 0L) { + setBucketSize(other.getBucketSize()); + } + if (bucketValuesBuilder_ == null) { + if (!other.bucketValues_.isEmpty()) { + if (bucketValues_.isEmpty()) { + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketValuesIsMutable(); + bucketValues_.addAll(other.bucketValues_); + } + onChanged(); + } + } else { + if (!other.bucketValues_.isEmpty()) { + if (bucketValuesBuilder_.isEmpty()) { + bucketValuesBuilder_.dispose(); + bucketValuesBuilder_ = null; + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBucketValuesFieldBuilder() : null; + } else { + bucketValuesBuilder_.addAllMessages(other.bucketValues_); + } + } + } + if (other.getBucketValueCount() != 0L) { + setBucketValueCount(other.getBucketValueCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long valueFrequencyLowerBound_ ; + /** + *
+         * Lower bound on the value frequency of the values in this bucket.
+         * 
+ * + * int64 value_frequency_lower_bound = 1; + * @return The valueFrequencyLowerBound. + */ + @java.lang.Override + public long getValueFrequencyLowerBound() { + return valueFrequencyLowerBound_; + } + /** + *
+         * Lower bound on the value frequency of the values in this bucket.
+         * 
+ * + * int64 value_frequency_lower_bound = 1; + * @param value The valueFrequencyLowerBound to set. + * @return This builder for chaining. + */ + public Builder setValueFrequencyLowerBound(long value) { + + valueFrequencyLowerBound_ = value; + onChanged(); + return this; + } + /** + *
+         * Lower bound on the value frequency of the values in this bucket.
+         * 
+ * + * int64 value_frequency_lower_bound = 1; + * @return This builder for chaining. + */ + public Builder clearValueFrequencyLowerBound() { + + valueFrequencyLowerBound_ = 0L; + onChanged(); + return this; + } + + private long valueFrequencyUpperBound_ ; + /** + *
+         * Upper bound on the value frequency of the values in this bucket.
+         * 
+ * + * int64 value_frequency_upper_bound = 2; + * @return The valueFrequencyUpperBound. + */ + @java.lang.Override + public long getValueFrequencyUpperBound() { + return valueFrequencyUpperBound_; + } + /** + *
+         * Upper bound on the value frequency of the values in this bucket.
+         * 
+ * + * int64 value_frequency_upper_bound = 2; + * @param value The valueFrequencyUpperBound to set. + * @return This builder for chaining. + */ + public Builder setValueFrequencyUpperBound(long value) { + + valueFrequencyUpperBound_ = value; + onChanged(); + return this; + } + /** + *
+         * Upper bound on the value frequency of the values in this bucket.
+         * 
+ * + * int64 value_frequency_upper_bound = 2; + * @return This builder for chaining. + */ + public Builder clearValueFrequencyUpperBound() { + + valueFrequencyUpperBound_ = 0L; + onChanged(); + return this; + } + + private long bucketSize_ ; + /** + *
+         * Total number of values in this bucket.
+         * 
+ * + * int64 bucket_size = 3; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + /** + *
+         * Total number of values in this bucket.
+         * 
+ * + * int64 bucket_size = 3; + * @param value The bucketSize to set. + * @return This builder for chaining. + */ + public Builder setBucketSize(long value) { + + bucketSize_ = value; + onChanged(); + return this; + } + /** + *
+         * Total number of values in this bucket.
+         * 
+ * + * int64 bucket_size = 3; + * @return This builder for chaining. + */ + public Builder clearBucketSize() { + + bucketSize_ = 0L; + onChanged(); + return this; + } + + private java.util.List bucketValues_ = + java.util.Collections.emptyList(); + private void ensureBucketValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(bucketValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder> bucketValuesBuilder_; + + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public java.util.List getBucketValuesList() { + if (bucketValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bucketValues_); + } else { + return bucketValuesBuilder_.getMessageList(); + } + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public int getBucketValuesCount() { + if (bucketValuesBuilder_ == null) { + return bucketValues_.size(); + } else { + return bucketValuesBuilder_.getCount(); + } + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequency getBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); + } else { + return bucketValuesBuilder_.getMessage(index); + } + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.ValueFrequency value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.set(index, value); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public Builder addBucketValues(com.google.privacy.dlp.v2.ValueFrequency value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.ValueFrequency value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(index, value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public Builder addBucketValues( + com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public Builder addAllBucketValues( + java.lang.Iterable values) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucketValues_); + onChanged(); + } else { + bucketValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public Builder clearBucketValues() { + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public Builder removeBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.remove(index); + onChanged(); + } else { + bucketValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequency.Builder getBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getBucketValuesOrBuilder( + int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); } else { + return bucketValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public java.util.List + getBucketValuesOrBuilderList() { + if (bucketValuesBuilder_ != null) { + return bucketValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bucketValues_); + } + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequency.Builder addBucketValuesBuilder() { + return getBucketValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()); + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequency.Builder addBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()); + } + /** + *
+         * Sample of value frequencies in this bucket. The total number of
+         * values returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; + */ + public java.util.List + getBucketValuesBuilderList() { + return getBucketValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder> + getBucketValuesFieldBuilder() { + if (bucketValuesBuilder_ == null) { + bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder>( + bucketValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bucketValues_ = null; + } + return bucketValuesBuilder_; + } + + private long bucketValueCount_ ; + /** + *
+         * Total number of distinct values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 5; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + /** + *
+         * Total number of distinct values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 5; + * @param value The bucketValueCount to set. + * @return This builder for chaining. + */ + public Builder setBucketValueCount(long value) { + + bucketValueCount_ = value; + onChanged(); + return this; + } + /** + *
+         * Total number of distinct values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 5; + * @return This builder for chaining. + */ + public Builder clearBucketValueCount() { + + bucketValueCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoricalStatsHistogramBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CategoricalStatsHistogramBucket(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int VALUE_FREQUENCY_HISTOGRAM_BUCKETS_FIELD_NUMBER = 5; + private java.util.List valueFrequencyHistogramBuckets_; + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public java.util.List getValueFrequencyHistogramBucketsList() { + return valueFrequencyHistogramBuckets_; + } + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public java.util.List + getValueFrequencyHistogramBucketsOrBuilderList() { + return valueFrequencyHistogramBuckets_; + } + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public int getValueFrequencyHistogramBucketsCount() { + return valueFrequencyHistogramBuckets_.size(); + } + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getValueFrequencyHistogramBuckets(int index) { + return valueFrequencyHistogramBuckets_.get(index); + } + /** + *
+     * Histogram of value frequencies in the column.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder getValueFrequencyHistogramBucketsOrBuilder( + int index) { + return valueFrequencyHistogramBuckets_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < valueFrequencyHistogramBuckets_.size(); i++) { + output.writeMessage(5, valueFrequencyHistogramBuckets_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < valueFrequencyHistogramBuckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, valueFrequencyHistogramBuckets_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) obj; + + if (!getValueFrequencyHistogramBucketsList() + .equals(other.getValueFrequencyHistogramBucketsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValueFrequencyHistogramBucketsCount() > 0) { + hash = (37 * hash) + VALUE_FREQUENCY_HISTOGRAM_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getValueFrequencyHistogramBucketsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Result of the categorical stats computation.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValueFrequencyHistogramBucketsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (valueFrequencyHistogramBucketsBuilder_ == null) { + valueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valueFrequencyHistogramBucketsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult(this); + int from_bitField0_ = bitField0_; + if (valueFrequencyHistogramBucketsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + valueFrequencyHistogramBuckets_ = java.util.Collections.unmodifiableList(valueFrequencyHistogramBuckets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.valueFrequencyHistogramBuckets_ = valueFrequencyHistogramBuckets_; + } else { + result.valueFrequencyHistogramBuckets_ = valueFrequencyHistogramBucketsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance()) return this; + if (valueFrequencyHistogramBucketsBuilder_ == null) { + if (!other.valueFrequencyHistogramBuckets_.isEmpty()) { + if (valueFrequencyHistogramBuckets_.isEmpty()) { + valueFrequencyHistogramBuckets_ = other.valueFrequencyHistogramBuckets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValueFrequencyHistogramBucketsIsMutable(); + valueFrequencyHistogramBuckets_.addAll(other.valueFrequencyHistogramBuckets_); + } + onChanged(); + } + } else { + if (!other.valueFrequencyHistogramBuckets_.isEmpty()) { + if (valueFrequencyHistogramBucketsBuilder_.isEmpty()) { + valueFrequencyHistogramBucketsBuilder_.dispose(); + valueFrequencyHistogramBucketsBuilder_ = null; + valueFrequencyHistogramBuckets_ = other.valueFrequencyHistogramBuckets_; + bitField0_ = (bitField0_ & ~0x00000001); + valueFrequencyHistogramBucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValueFrequencyHistogramBucketsFieldBuilder() : null; + } else { + valueFrequencyHistogramBucketsBuilder_.addAllMessages(other.valueFrequencyHistogramBuckets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List valueFrequencyHistogramBuckets_ = + java.util.Collections.emptyList(); + private void ensureValueFrequencyHistogramBucketsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + valueFrequencyHistogramBuckets_ = new java.util.ArrayList(valueFrequencyHistogramBuckets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder> valueFrequencyHistogramBucketsBuilder_; + + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public java.util.List getValueFrequencyHistogramBucketsList() { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(valueFrequencyHistogramBuckets_); + } else { + return valueFrequencyHistogramBucketsBuilder_.getMessageList(); + } + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public int getValueFrequencyHistogramBucketsCount() { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + return valueFrequencyHistogramBuckets_.size(); + } else { + return valueFrequencyHistogramBucketsBuilder_.getCount(); + } + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getValueFrequencyHistogramBuckets(int index) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + return valueFrequencyHistogramBuckets_.get(index); + } else { + return valueFrequencyHistogramBucketsBuilder_.getMessage(index); + } + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public Builder setValueFrequencyHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueFrequencyHistogramBucketsIsMutable(); + valueFrequencyHistogramBuckets_.set(index, value); + onChanged(); + } else { + valueFrequencyHistogramBucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public Builder setValueFrequencyHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder builderForValue) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + ensureValueFrequencyHistogramBucketsIsMutable(); + valueFrequencyHistogramBuckets_.set(index, builderForValue.build()); + onChanged(); + } else { + valueFrequencyHistogramBucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public Builder addValueFrequencyHistogramBuckets(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueFrequencyHistogramBucketsIsMutable(); + valueFrequencyHistogramBuckets_.add(value); + onChanged(); + } else { + valueFrequencyHistogramBucketsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public Builder addValueFrequencyHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValueFrequencyHistogramBucketsIsMutable(); + valueFrequencyHistogramBuckets_.add(index, value); + onChanged(); + } else { + valueFrequencyHistogramBucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public Builder addValueFrequencyHistogramBuckets( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder builderForValue) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + ensureValueFrequencyHistogramBucketsIsMutable(); + valueFrequencyHistogramBuckets_.add(builderForValue.build()); + onChanged(); + } else { + valueFrequencyHistogramBucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public Builder addValueFrequencyHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder builderForValue) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + ensureValueFrequencyHistogramBucketsIsMutable(); + valueFrequencyHistogramBuckets_.add(index, builderForValue.build()); + onChanged(); + } else { + valueFrequencyHistogramBucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public Builder addAllValueFrequencyHistogramBuckets( + java.lang.Iterable values) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + ensureValueFrequencyHistogramBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, valueFrequencyHistogramBuckets_); + onChanged(); + } else { + valueFrequencyHistogramBucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public Builder clearValueFrequencyHistogramBuckets() { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + valueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valueFrequencyHistogramBucketsBuilder_.clear(); + } + return this; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public Builder removeValueFrequencyHistogramBuckets(int index) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + ensureValueFrequencyHistogramBucketsIsMutable(); + valueFrequencyHistogramBuckets_.remove(index); + onChanged(); + } else { + valueFrequencyHistogramBucketsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder getValueFrequencyHistogramBucketsBuilder( + int index) { + return getValueFrequencyHistogramBucketsFieldBuilder().getBuilder(index); + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder getValueFrequencyHistogramBucketsOrBuilder( + int index) { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + return valueFrequencyHistogramBuckets_.get(index); } else { + return valueFrequencyHistogramBucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public java.util.List + getValueFrequencyHistogramBucketsOrBuilderList() { + if (valueFrequencyHistogramBucketsBuilder_ != null) { + return valueFrequencyHistogramBucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(valueFrequencyHistogramBuckets_); + } + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder addValueFrequencyHistogramBucketsBuilder() { + return getValueFrequencyHistogramBucketsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.getDefaultInstance()); + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder addValueFrequencyHistogramBucketsBuilder( + int index) { + return getValueFrequencyHistogramBucketsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.getDefaultInstance()); + } + /** + *
+       * Histogram of value frequencies in the column.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + */ + public java.util.List + getValueFrequencyHistogramBucketsBuilderList() { + return getValueFrequencyHistogramBucketsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder> + getValueFrequencyHistogramBucketsFieldBuilder() { + if (valueFrequencyHistogramBucketsBuilder_ == null) { + valueFrequencyHistogramBucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder>( + valueFrequencyHistogramBuckets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + valueFrequencyHistogramBuckets_ = null; + } + return valueFrequencyHistogramBucketsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoricalStatsResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CategoricalStatsResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface KAnonymityResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + java.util.List + getEquivalenceClassHistogramBucketsList(); + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getEquivalenceClassHistogramBuckets(int index); + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + int getEquivalenceClassHistogramBucketsCount(); + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + java.util.List + getEquivalenceClassHistogramBucketsOrBuilderList(); + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder getEquivalenceClassHistogramBucketsOrBuilder( + int index); + } + /** + *
+   * Result of the k-anonymity computation.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult} + */ + public static final class KAnonymityResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) + KAnonymityResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use KAnonymityResult.newBuilder() to construct. + private KAnonymityResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KAnonymityResult() { + equivalenceClassHistogramBuckets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KAnonymityResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KAnonymityResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + equivalenceClassHistogramBuckets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + equivalenceClassHistogramBuckets_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + equivalenceClassHistogramBuckets_ = java.util.Collections.unmodifiableList(equivalenceClassHistogramBuckets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder.class); + } + + public interface KAnonymityEquivalenceClassOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesList(); + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index); + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + int getQuasiIdsValuesCount(); + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesOrBuilderList(); + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index); + + /** + *
+       * Size of the equivalence class, for example number of rows with the
+       * above set of values.
+       * 
+ * + * int64 equivalence_class_size = 2; + * @return The equivalenceClassSize. + */ + long getEquivalenceClassSize(); + } + /** + *
+     * The set of columns' values that share the same ldiversity value
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass} + */ + public static final class KAnonymityEquivalenceClass extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) + KAnonymityEquivalenceClassOrBuilder { + private static final long serialVersionUID = 0L; + // Use KAnonymityEquivalenceClass.newBuilder() to construct. + private KAnonymityEquivalenceClass(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KAnonymityEquivalenceClass() { + quasiIdsValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KAnonymityEquivalenceClass(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KAnonymityEquivalenceClass( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIdsValues_.add( + input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); + break; + } + case 16: { + + equivalenceClassSize_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder.class); + } + + public static final int QUASI_IDS_VALUES_FIELD_NUMBER = 1; + private java.util.List quasiIdsValues_; + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public java.util.List getQuasiIdsValuesList() { + return quasiIdsValues_; + } + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public java.util.List + getQuasiIdsValuesOrBuilderList() { + return quasiIdsValues_; + } + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public int getQuasiIdsValuesCount() { + return quasiIdsValues_.size(); + } + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + return quasiIdsValues_.get(index); + } + /** + *
+       * Set of values defining the equivalence class. One value per
+       * quasi-identifier column in the original KAnonymity metric message.
+       * The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + return quasiIdsValues_.get(index); + } + + public static final int EQUIVALENCE_CLASS_SIZE_FIELD_NUMBER = 2; + private long equivalenceClassSize_; + /** + *
+       * Size of the equivalence class, for example number of rows with the
+       * above set of values.
+       * 
+ * + * int64 equivalence_class_size = 2; + * @return The equivalenceClassSize. + */ + @java.lang.Override + public long getEquivalenceClassSize() { + return equivalenceClassSize_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIdsValues_.size(); i++) { + output.writeMessage(1, quasiIdsValues_.get(i)); + } + if (equivalenceClassSize_ != 0L) { + output.writeInt64(2, equivalenceClassSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIdsValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIdsValues_.get(i)); + } + if (equivalenceClassSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, equivalenceClassSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) obj; + + if (!getQuasiIdsValuesList() + .equals(other.getQuasiIdsValuesList())) return false; + if (getEquivalenceClassSize() + != other.getEquivalenceClassSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsValuesCount() > 0) { + hash = (37 * hash) + QUASI_IDS_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsValuesList().hashCode(); + } + hash = (37 * hash) + EQUIVALENCE_CLASS_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEquivalenceClassSize()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * The set of columns' values that share the same ldiversity value
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsValuesBuilder_.clear(); + } + equivalenceClassSize_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass(this); + int from_bitField0_ = bitField0_; + if (quasiIdsValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIdsValues_ = quasiIdsValues_; + } else { + result.quasiIdsValues_ = quasiIdsValuesBuilder_.build(); + } + result.equivalenceClassSize_ = equivalenceClassSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.getDefaultInstance()) return this; + if (quasiIdsValuesBuilder_ == null) { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValues_.isEmpty()) { + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.addAll(other.quasiIdsValues_); + } + onChanged(); + } + } else { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValuesBuilder_.isEmpty()) { + quasiIdsValuesBuilder_.dispose(); + quasiIdsValuesBuilder_ = null; + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsValuesFieldBuilder() : null; + } else { + quasiIdsValuesBuilder_.addAllMessages(other.quasiIdsValues_); + } + } + } + if (other.getEquivalenceClassSize() != 0L) { + setEquivalenceClassSize(other.getEquivalenceClassSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIdsValues_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = new java.util.ArrayList(quasiIdsValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quasiIdsValuesBuilder_; + + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List getQuasiIdsValuesList() { + if (quasiIdsValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } else { + return quasiIdsValuesBuilder_.getMessageList(); + } + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public int getQuasiIdsValuesCount() { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.size(); + } else { + return quasiIdsValuesBuilder_.getCount(); + } + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); + } else { + return quasiIdsValuesBuilder_.getMessage(index); + } + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues(com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addAllQuasiIdsValues( + java.lang.Iterable values) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIdsValues_); + onChanged(); + } else { + quasiIdsValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder clearQuasiIdsValues() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder removeQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.remove(index); + onChanged(); + } else { + quasiIdsValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); } else { + return quasiIdsValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesOrBuilderList() { + if (quasiIdsValuesBuilder_ != null) { + return quasiIdsValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder() { + return getQuasiIdsValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * Set of values defining the equivalence class. One value per
+         * quasi-identifier column in the original KAnonymity metric message.
+         * The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesBuilderList() { + return getQuasiIdsValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getQuasiIdsValuesFieldBuilder() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + quasiIdsValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIdsValues_ = null; + } + return quasiIdsValuesBuilder_; + } + + private long equivalenceClassSize_ ; + /** + *
+         * Size of the equivalence class, for example number of rows with the
+         * above set of values.
+         * 
+ * + * int64 equivalence_class_size = 2; + * @return The equivalenceClassSize. + */ + @java.lang.Override + public long getEquivalenceClassSize() { + return equivalenceClassSize_; + } + /** + *
+         * Size of the equivalence class, for example number of rows with the
+         * above set of values.
+         * 
+ * + * int64 equivalence_class_size = 2; + * @param value The equivalenceClassSize to set. + * @return This builder for chaining. + */ + public Builder setEquivalenceClassSize(long value) { + + equivalenceClassSize_ = value; + onChanged(); + return this; + } + /** + *
+         * Size of the equivalence class, for example number of rows with the
+         * above set of values.
+         * 
+ * + * int64 equivalence_class_size = 2; + * @return This builder for chaining. + */ + public Builder clearEquivalenceClassSize() { + + equivalenceClassSize_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KAnonymityEquivalenceClass parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KAnonymityEquivalenceClass(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface KAnonymityHistogramBucketOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Lower bound on the size of the equivalence classes in this bucket.
+       * 
+ * + * int64 equivalence_class_size_lower_bound = 1; + * @return The equivalenceClassSizeLowerBound. + */ + long getEquivalenceClassSizeLowerBound(); + + /** + *
+       * Upper bound on the size of the equivalence classes in this bucket.
+       * 
+ * + * int64 equivalence_class_size_upper_bound = 2; + * @return The equivalenceClassSizeUpperBound. + */ + long getEquivalenceClassSizeUpperBound(); + + /** + *
+       * Total number of equivalence classes in this bucket.
+       * 
+ * + * int64 bucket_size = 3; + * @return The bucketSize. + */ + long getBucketSize(); + + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + java.util.List + getBucketValuesList(); + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getBucketValues(int index); + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + int getBucketValuesCount(); + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + java.util.List + getBucketValuesOrBuilderList(); + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder getBucketValuesOrBuilder( + int index); + + /** + *
+       * Total number of distinct equivalence classes in this bucket.
+       * 
+ * + * int64 bucket_value_count = 5; + * @return The bucketValueCount. + */ + long getBucketValueCount(); + } + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket} + */ + public static final class KAnonymityHistogramBucket extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) + KAnonymityHistogramBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use KAnonymityHistogramBucket.newBuilder() to construct. + private KAnonymityHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KAnonymityHistogramBucket() { + bucketValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KAnonymityHistogramBucket(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KAnonymityHistogramBucket( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + equivalenceClassSizeLowerBound_ = input.readInt64(); + break; + } + case 16: { + + equivalenceClassSizeUpperBound_ = input.readInt64(); + break; + } + case 24: { + + bucketSize_ = input.readInt64(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + bucketValues_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.parser(), extensionRegistry)); + break; + } + case 40: { + + bucketValueCount_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder.class); + } + + public static final int EQUIVALENCE_CLASS_SIZE_LOWER_BOUND_FIELD_NUMBER = 1; + private long equivalenceClassSizeLowerBound_; + /** + *
+       * Lower bound on the size of the equivalence classes in this bucket.
+       * 
+ * + * int64 equivalence_class_size_lower_bound = 1; + * @return The equivalenceClassSizeLowerBound. + */ + @java.lang.Override + public long getEquivalenceClassSizeLowerBound() { + return equivalenceClassSizeLowerBound_; + } + + public static final int EQUIVALENCE_CLASS_SIZE_UPPER_BOUND_FIELD_NUMBER = 2; + private long equivalenceClassSizeUpperBound_; + /** + *
+       * Upper bound on the size of the equivalence classes in this bucket.
+       * 
+ * + * int64 equivalence_class_size_upper_bound = 2; + * @return The equivalenceClassSizeUpperBound. + */ + @java.lang.Override + public long getEquivalenceClassSizeUpperBound() { + return equivalenceClassSizeUpperBound_; + } + + public static final int BUCKET_SIZE_FIELD_NUMBER = 3; + private long bucketSize_; + /** + *
+       * Total number of equivalence classes in this bucket.
+       * 
+ * + * int64 bucket_size = 3; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + + public static final int BUCKET_VALUES_FIELD_NUMBER = 4; + private java.util.List bucketValues_; + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public java.util.List getBucketValuesList() { + return bucketValues_; + } + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public java.util.List + getBucketValuesOrBuilderList() { + return bucketValues_; + } + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public int getBucketValuesCount() { + return bucketValues_.size(); + } + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getBucketValues(int index) { + return bucketValues_.get(index); + } + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder getBucketValuesOrBuilder( + int index) { + return bucketValues_.get(index); + } + + public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 5; + private long bucketValueCount_; + /** + *
+       * Total number of distinct equivalence classes in this bucket.
+       * 
+ * + * int64 bucket_value_count = 5; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (equivalenceClassSizeLowerBound_ != 0L) { + output.writeInt64(1, equivalenceClassSizeLowerBound_); + } + if (equivalenceClassSizeUpperBound_ != 0L) { + output.writeInt64(2, equivalenceClassSizeUpperBound_); + } + if (bucketSize_ != 0L) { + output.writeInt64(3, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + output.writeMessage(4, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + output.writeInt64(5, bucketValueCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (equivalenceClassSizeLowerBound_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, equivalenceClassSizeLowerBound_); + } + if (equivalenceClassSizeUpperBound_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, equivalenceClassSizeUpperBound_); + } + if (bucketSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, bucketValueCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) obj; + + if (getEquivalenceClassSizeLowerBound() + != other.getEquivalenceClassSizeLowerBound()) return false; + if (getEquivalenceClassSizeUpperBound() + != other.getEquivalenceClassSizeUpperBound()) return false; + if (getBucketSize() + != other.getBucketSize()) return false; + if (!getBucketValuesList() + .equals(other.getBucketValuesList())) return false; + if (getBucketValueCount() + != other.getBucketValueCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EQUIVALENCE_CLASS_SIZE_LOWER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEquivalenceClassSizeLowerBound()); + hash = (37 * hash) + EQUIVALENCE_CLASS_SIZE_UPPER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEquivalenceClassSizeUpperBound()); + hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketSize()); + if (getBucketValuesCount() > 0) { + hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getBucketValuesList().hashCode(); + } + hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketValueCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBucketValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + equivalenceClassSizeLowerBound_ = 0L; + + equivalenceClassSizeUpperBound_ = 0L; + + bucketSize_ = 0L; + + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bucketValuesBuilder_.clear(); + } + bucketValueCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket(this); + int from_bitField0_ = bitField0_; + result.equivalenceClassSizeLowerBound_ = equivalenceClassSizeLowerBound_; + result.equivalenceClassSizeUpperBound_ = equivalenceClassSizeUpperBound_; + result.bucketSize_ = bucketSize_; + if (bucketValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bucketValues_ = bucketValues_; + } else { + result.bucketValues_ = bucketValuesBuilder_.build(); + } + result.bucketValueCount_ = bucketValueCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.getDefaultInstance()) return this; + if (other.getEquivalenceClassSizeLowerBound() != 0L) { + setEquivalenceClassSizeLowerBound(other.getEquivalenceClassSizeLowerBound()); + } + if (other.getEquivalenceClassSizeUpperBound() != 0L) { + setEquivalenceClassSizeUpperBound(other.getEquivalenceClassSizeUpperBound()); + } + if (other.getBucketSize() != 0L) { + setBucketSize(other.getBucketSize()); + } + if (bucketValuesBuilder_ == null) { + if (!other.bucketValues_.isEmpty()) { + if (bucketValues_.isEmpty()) { + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketValuesIsMutable(); + bucketValues_.addAll(other.bucketValues_); + } + onChanged(); + } + } else { + if (!other.bucketValues_.isEmpty()) { + if (bucketValuesBuilder_.isEmpty()) { + bucketValuesBuilder_.dispose(); + bucketValuesBuilder_ = null; + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBucketValuesFieldBuilder() : null; + } else { + bucketValuesBuilder_.addAllMessages(other.bucketValues_); + } + } + } + if (other.getBucketValueCount() != 0L) { + setBucketValueCount(other.getBucketValueCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long equivalenceClassSizeLowerBound_ ; + /** + *
+         * Lower bound on the size of the equivalence classes in this bucket.
+         * 
+ * + * int64 equivalence_class_size_lower_bound = 1; + * @return The equivalenceClassSizeLowerBound. + */ + @java.lang.Override + public long getEquivalenceClassSizeLowerBound() { + return equivalenceClassSizeLowerBound_; + } + /** + *
+         * Lower bound on the size of the equivalence classes in this bucket.
+         * 
+ * + * int64 equivalence_class_size_lower_bound = 1; + * @param value The equivalenceClassSizeLowerBound to set. + * @return This builder for chaining. + */ + public Builder setEquivalenceClassSizeLowerBound(long value) { + + equivalenceClassSizeLowerBound_ = value; + onChanged(); + return this; + } + /** + *
+         * Lower bound on the size of the equivalence classes in this bucket.
+         * 
+ * + * int64 equivalence_class_size_lower_bound = 1; + * @return This builder for chaining. + */ + public Builder clearEquivalenceClassSizeLowerBound() { + + equivalenceClassSizeLowerBound_ = 0L; + onChanged(); + return this; + } + + private long equivalenceClassSizeUpperBound_ ; + /** + *
+         * Upper bound on the size of the equivalence classes in this bucket.
+         * 
+ * + * int64 equivalence_class_size_upper_bound = 2; + * @return The equivalenceClassSizeUpperBound. + */ + @java.lang.Override + public long getEquivalenceClassSizeUpperBound() { + return equivalenceClassSizeUpperBound_; + } + /** + *
+         * Upper bound on the size of the equivalence classes in this bucket.
+         * 
+ * + * int64 equivalence_class_size_upper_bound = 2; + * @param value The equivalenceClassSizeUpperBound to set. + * @return This builder for chaining. + */ + public Builder setEquivalenceClassSizeUpperBound(long value) { + + equivalenceClassSizeUpperBound_ = value; + onChanged(); + return this; + } + /** + *
+         * Upper bound on the size of the equivalence classes in this bucket.
+         * 
+ * + * int64 equivalence_class_size_upper_bound = 2; + * @return This builder for chaining. + */ + public Builder clearEquivalenceClassSizeUpperBound() { + + equivalenceClassSizeUpperBound_ = 0L; + onChanged(); + return this; + } + + private long bucketSize_ ; + /** + *
+         * Total number of equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_size = 3; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + /** + *
+         * Total number of equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_size = 3; + * @param value The bucketSize to set. + * @return This builder for chaining. + */ + public Builder setBucketSize(long value) { + + bucketSize_ = value; + onChanged(); + return this; + } + /** + *
+         * Total number of equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_size = 3; + * @return This builder for chaining. + */ + public Builder clearBucketSize() { + + bucketSize_ = 0L; + onChanged(); + return this; + } + + private java.util.List bucketValues_ = + java.util.Collections.emptyList(); + private void ensureBucketValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(bucketValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder> bucketValuesBuilder_; + + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public java.util.List getBucketValuesList() { + if (bucketValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bucketValues_); + } else { + return bucketValuesBuilder_.getMessageList(); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public int getBucketValuesCount() { + if (bucketValuesBuilder_ == null) { + return bucketValues_.size(); + } else { + return bucketValuesBuilder_.getCount(); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); + } else { + return bucketValuesBuilder_.getMessage(index); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.set(index, value); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public Builder addBucketValues(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(index, value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public Builder addBucketValues( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public Builder addAllBucketValues( + java.lang.Iterable values) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucketValues_); + onChanged(); + } else { + bucketValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public Builder clearBucketValues() { + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public Builder removeBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.remove(index); + onChanged(); + } else { + bucketValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder getBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder getBucketValuesOrBuilder( + int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); } else { + return bucketValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public java.util.List + getBucketValuesOrBuilderList() { + if (bucketValuesBuilder_ != null) { + return bucketValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bucketValues_); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder addBucketValuesBuilder() { + return getBucketValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.getDefaultInstance()); + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder addBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.getDefaultInstance()); + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; + */ + public java.util.List + getBucketValuesBuilderList() { + return getBucketValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder> + getBucketValuesFieldBuilder() { + if (bucketValuesBuilder_ == null) { + bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder>( + bucketValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bucketValues_ = null; + } + return bucketValuesBuilder_; + } + + private long bucketValueCount_ ; + /** + *
+         * Total number of distinct equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_value_count = 5; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + /** + *
+         * Total number of distinct equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_value_count = 5; + * @param value The bucketValueCount to set. + * @return This builder for chaining. + */ + public Builder setBucketValueCount(long value) { + + bucketValueCount_ = value; + onChanged(); + return this; + } + /** + *
+         * Total number of distinct equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_value_count = 5; + * @return This builder for chaining. + */ + public Builder clearBucketValueCount() { + + bucketValueCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KAnonymityHistogramBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KAnonymityHistogramBucket(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int EQUIVALENCE_CLASS_HISTOGRAM_BUCKETS_FIELD_NUMBER = 5; + private java.util.List equivalenceClassHistogramBuckets_; + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + @java.lang.Override + public java.util.List getEquivalenceClassHistogramBucketsList() { + return equivalenceClassHistogramBuckets_; + } + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + @java.lang.Override + public java.util.List + getEquivalenceClassHistogramBucketsOrBuilderList() { + return equivalenceClassHistogramBuckets_; + } + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + @java.lang.Override + public int getEquivalenceClassHistogramBucketsCount() { + return equivalenceClassHistogramBuckets_.size(); + } + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getEquivalenceClassHistogramBuckets(int index) { + return equivalenceClassHistogramBuckets_.get(index); + } + /** + *
+     * Histogram of k-anonymity equivalence classes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder getEquivalenceClassHistogramBucketsOrBuilder( + int index) { + return equivalenceClassHistogramBuckets_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < equivalenceClassHistogramBuckets_.size(); i++) { + output.writeMessage(5, equivalenceClassHistogramBuckets_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < equivalenceClassHistogramBuckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, equivalenceClassHistogramBuckets_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) obj; + + if (!getEquivalenceClassHistogramBucketsList() + .equals(other.getEquivalenceClassHistogramBucketsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEquivalenceClassHistogramBucketsCount() > 0) { + hash = (37 * hash) + EQUIVALENCE_CLASS_HISTOGRAM_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getEquivalenceClassHistogramBucketsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Result of the k-anonymity computation.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getEquivalenceClassHistogramBucketsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (equivalenceClassHistogramBucketsBuilder_ == null) { + equivalenceClassHistogramBuckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + equivalenceClassHistogramBucketsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult(this); + int from_bitField0_ = bitField0_; + if (equivalenceClassHistogramBucketsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + equivalenceClassHistogramBuckets_ = java.util.Collections.unmodifiableList(equivalenceClassHistogramBuckets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.equivalenceClassHistogramBuckets_ = equivalenceClassHistogramBuckets_; + } else { + result.equivalenceClassHistogramBuckets_ = equivalenceClassHistogramBucketsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance()) return this; + if (equivalenceClassHistogramBucketsBuilder_ == null) { + if (!other.equivalenceClassHistogramBuckets_.isEmpty()) { + if (equivalenceClassHistogramBuckets_.isEmpty()) { + equivalenceClassHistogramBuckets_ = other.equivalenceClassHistogramBuckets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEquivalenceClassHistogramBucketsIsMutable(); + equivalenceClassHistogramBuckets_.addAll(other.equivalenceClassHistogramBuckets_); + } + onChanged(); + } + } else { + if (!other.equivalenceClassHistogramBuckets_.isEmpty()) { + if (equivalenceClassHistogramBucketsBuilder_.isEmpty()) { + equivalenceClassHistogramBucketsBuilder_.dispose(); + equivalenceClassHistogramBucketsBuilder_ = null; + equivalenceClassHistogramBuckets_ = other.equivalenceClassHistogramBuckets_; + bitField0_ = (bitField0_ & ~0x00000001); + equivalenceClassHistogramBucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEquivalenceClassHistogramBucketsFieldBuilder() : null; + } else { + equivalenceClassHistogramBucketsBuilder_.addAllMessages(other.equivalenceClassHistogramBuckets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List equivalenceClassHistogramBuckets_ = + java.util.Collections.emptyList(); + private void ensureEquivalenceClassHistogramBucketsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + equivalenceClassHistogramBuckets_ = new java.util.ArrayList(equivalenceClassHistogramBuckets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder> equivalenceClassHistogramBucketsBuilder_; + + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public java.util.List getEquivalenceClassHistogramBucketsList() { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(equivalenceClassHistogramBuckets_); + } else { + return equivalenceClassHistogramBucketsBuilder_.getMessageList(); + } + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public int getEquivalenceClassHistogramBucketsCount() { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + return equivalenceClassHistogramBuckets_.size(); + } else { + return equivalenceClassHistogramBucketsBuilder_.getCount(); + } + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getEquivalenceClassHistogramBuckets(int index) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + return equivalenceClassHistogramBuckets_.get(index); + } else { + return equivalenceClassHistogramBucketsBuilder_.getMessage(index); + } + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public Builder setEquivalenceClassHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket value) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEquivalenceClassHistogramBucketsIsMutable(); + equivalenceClassHistogramBuckets_.set(index, value); + onChanged(); + } else { + equivalenceClassHistogramBucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public Builder setEquivalenceClassHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder builderForValue) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + ensureEquivalenceClassHistogramBucketsIsMutable(); + equivalenceClassHistogramBuckets_.set(index, builderForValue.build()); + onChanged(); + } else { + equivalenceClassHistogramBucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public Builder addEquivalenceClassHistogramBuckets(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket value) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEquivalenceClassHistogramBucketsIsMutable(); + equivalenceClassHistogramBuckets_.add(value); + onChanged(); + } else { + equivalenceClassHistogramBucketsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public Builder addEquivalenceClassHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket value) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEquivalenceClassHistogramBucketsIsMutable(); + equivalenceClassHistogramBuckets_.add(index, value); + onChanged(); + } else { + equivalenceClassHistogramBucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public Builder addEquivalenceClassHistogramBuckets( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder builderForValue) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + ensureEquivalenceClassHistogramBucketsIsMutable(); + equivalenceClassHistogramBuckets_.add(builderForValue.build()); + onChanged(); + } else { + equivalenceClassHistogramBucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public Builder addEquivalenceClassHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder builderForValue) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + ensureEquivalenceClassHistogramBucketsIsMutable(); + equivalenceClassHistogramBuckets_.add(index, builderForValue.build()); + onChanged(); + } else { + equivalenceClassHistogramBucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public Builder addAllEquivalenceClassHistogramBuckets( + java.lang.Iterable values) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + ensureEquivalenceClassHistogramBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, equivalenceClassHistogramBuckets_); + onChanged(); + } else { + equivalenceClassHistogramBucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public Builder clearEquivalenceClassHistogramBuckets() { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + equivalenceClassHistogramBuckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + equivalenceClassHistogramBucketsBuilder_.clear(); + } + return this; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public Builder removeEquivalenceClassHistogramBuckets(int index) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + ensureEquivalenceClassHistogramBucketsIsMutable(); + equivalenceClassHistogramBuckets_.remove(index); + onChanged(); + } else { + equivalenceClassHistogramBucketsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder getEquivalenceClassHistogramBucketsBuilder( + int index) { + return getEquivalenceClassHistogramBucketsFieldBuilder().getBuilder(index); + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder getEquivalenceClassHistogramBucketsOrBuilder( + int index) { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + return equivalenceClassHistogramBuckets_.get(index); } else { + return equivalenceClassHistogramBucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public java.util.List + getEquivalenceClassHistogramBucketsOrBuilderList() { + if (equivalenceClassHistogramBucketsBuilder_ != null) { + return equivalenceClassHistogramBucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(equivalenceClassHistogramBuckets_); + } + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder addEquivalenceClassHistogramBucketsBuilder() { + return getEquivalenceClassHistogramBucketsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.getDefaultInstance()); + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder addEquivalenceClassHistogramBucketsBuilder( + int index) { + return getEquivalenceClassHistogramBucketsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.getDefaultInstance()); + } + /** + *
+       * Histogram of k-anonymity equivalence classes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + */ + public java.util.List + getEquivalenceClassHistogramBucketsBuilderList() { + return getEquivalenceClassHistogramBucketsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder> + getEquivalenceClassHistogramBucketsFieldBuilder() { + if (equivalenceClassHistogramBucketsBuilder_ == null) { + equivalenceClassHistogramBucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder>( + equivalenceClassHistogramBuckets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + equivalenceClassHistogramBuckets_ = null; + } + return equivalenceClassHistogramBucketsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KAnonymityResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KAnonymityResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LDiversityResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + java.util.List + getSensitiveValueFrequencyHistogramBucketsList(); + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getSensitiveValueFrequencyHistogramBuckets(int index); + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + int getSensitiveValueFrequencyHistogramBucketsCount(); + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + java.util.List + getSensitiveValueFrequencyHistogramBucketsOrBuilderList(); + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder getSensitiveValueFrequencyHistogramBucketsOrBuilder( + int index); + } + /** + *
+   * Result of the l-diversity computation.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult} + */ + public static final class LDiversityResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) + LDiversityResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use LDiversityResult.newBuilder() to construct. + private LDiversityResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LDiversityResult() { + sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LDiversityResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LDiversityResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + sensitiveValueFrequencyHistogramBuckets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + sensitiveValueFrequencyHistogramBuckets_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.unmodifiableList(sensitiveValueFrequencyHistogramBuckets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder.class); + } + + public interface LDiversityEquivalenceClassOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesList(); + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index); + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + int getQuasiIdsValuesCount(); + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesOrBuilderList(); + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index); + + /** + *
+       * Size of the k-anonymity equivalence class.
+       * 
+ * + * int64 equivalence_class_size = 2; + * @return The equivalenceClassSize. + */ + long getEquivalenceClassSize(); + + /** + *
+       * Number of distinct sensitive values in this equivalence class.
+       * 
+ * + * int64 num_distinct_sensitive_values = 3; + * @return The numDistinctSensitiveValues. + */ + long getNumDistinctSensitiveValues(); + + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + java.util.List + getTopSensitiveValuesList(); + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + com.google.privacy.dlp.v2.ValueFrequency getTopSensitiveValues(int index); + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + int getTopSensitiveValuesCount(); + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + java.util.List + getTopSensitiveValuesOrBuilderList(); + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getTopSensitiveValuesOrBuilder( + int index); + } + /** + *
+     * The set of columns' values that share the same ldiversity value.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass} + */ + public static final class LDiversityEquivalenceClass extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) + LDiversityEquivalenceClassOrBuilder { + private static final long serialVersionUID = 0L; + // Use LDiversityEquivalenceClass.newBuilder() to construct. + private LDiversityEquivalenceClass(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LDiversityEquivalenceClass() { + quasiIdsValues_ = java.util.Collections.emptyList(); + topSensitiveValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LDiversityEquivalenceClass(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LDiversityEquivalenceClass( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIdsValues_.add( + input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); + break; + } + case 16: { + + equivalenceClassSize_ = input.readInt64(); + break; + } + case 24: { + + numDistinctSensitiveValues_ = input.readInt64(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + topSensitiveValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + topSensitiveValues_.add( + input.readMessage(com.google.privacy.dlp.v2.ValueFrequency.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + topSensitiveValues_ = java.util.Collections.unmodifiableList(topSensitiveValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder.class); + } + + public static final int QUASI_IDS_VALUES_FIELD_NUMBER = 1; + private java.util.List quasiIdsValues_; + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public java.util.List getQuasiIdsValuesList() { + return quasiIdsValues_; + } + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public java.util.List + getQuasiIdsValuesOrBuilderList() { + return quasiIdsValues_; + } + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public int getQuasiIdsValuesCount() { + return quasiIdsValues_.size(); + } + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + return quasiIdsValues_.get(index); + } + /** + *
+       * Quasi-identifier values defining the k-anonymity equivalence
+       * class. The order is always the same as the original request.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + return quasiIdsValues_.get(index); + } + + public static final int EQUIVALENCE_CLASS_SIZE_FIELD_NUMBER = 2; + private long equivalenceClassSize_; + /** + *
+       * Size of the k-anonymity equivalence class.
+       * 
+ * + * int64 equivalence_class_size = 2; + * @return The equivalenceClassSize. + */ + @java.lang.Override + public long getEquivalenceClassSize() { + return equivalenceClassSize_; + } + + public static final int NUM_DISTINCT_SENSITIVE_VALUES_FIELD_NUMBER = 3; + private long numDistinctSensitiveValues_; + /** + *
+       * Number of distinct sensitive values in this equivalence class.
+       * 
+ * + * int64 num_distinct_sensitive_values = 3; + * @return The numDistinctSensitiveValues. + */ + @java.lang.Override + public long getNumDistinctSensitiveValues() { + return numDistinctSensitiveValues_; + } + + public static final int TOP_SENSITIVE_VALUES_FIELD_NUMBER = 4; + private java.util.List topSensitiveValues_; + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + @java.lang.Override + public java.util.List getTopSensitiveValuesList() { + return topSensitiveValues_; + } + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + @java.lang.Override + public java.util.List + getTopSensitiveValuesOrBuilderList() { + return topSensitiveValues_; + } + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + @java.lang.Override + public int getTopSensitiveValuesCount() { + return topSensitiveValues_.size(); + } + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueFrequency getTopSensitiveValues(int index) { + return topSensitiveValues_.get(index); + } + /** + *
+       * Estimated frequencies of top sensitive values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getTopSensitiveValuesOrBuilder( + int index) { + return topSensitiveValues_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIdsValues_.size(); i++) { + output.writeMessage(1, quasiIdsValues_.get(i)); + } + if (equivalenceClassSize_ != 0L) { + output.writeInt64(2, equivalenceClassSize_); + } + if (numDistinctSensitiveValues_ != 0L) { + output.writeInt64(3, numDistinctSensitiveValues_); + } + for (int i = 0; i < topSensitiveValues_.size(); i++) { + output.writeMessage(4, topSensitiveValues_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIdsValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIdsValues_.get(i)); + } + if (equivalenceClassSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, equivalenceClassSize_); + } + if (numDistinctSensitiveValues_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, numDistinctSensitiveValues_); + } + for (int i = 0; i < topSensitiveValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, topSensitiveValues_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) obj; + + if (!getQuasiIdsValuesList() + .equals(other.getQuasiIdsValuesList())) return false; + if (getEquivalenceClassSize() + != other.getEquivalenceClassSize()) return false; + if (getNumDistinctSensitiveValues() + != other.getNumDistinctSensitiveValues()) return false; + if (!getTopSensitiveValuesList() + .equals(other.getTopSensitiveValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsValuesCount() > 0) { + hash = (37 * hash) + QUASI_IDS_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsValuesList().hashCode(); + } + hash = (37 * hash) + EQUIVALENCE_CLASS_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEquivalenceClassSize()); + hash = (37 * hash) + NUM_DISTINCT_SENSITIVE_VALUES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNumDistinctSensitiveValues()); + if (getTopSensitiveValuesCount() > 0) { + hash = (37 * hash) + TOP_SENSITIVE_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getTopSensitiveValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * The set of columns' values that share the same ldiversity value.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsValuesFieldBuilder(); + getTopSensitiveValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsValuesBuilder_.clear(); + } + equivalenceClassSize_ = 0L; + + numDistinctSensitiveValues_ = 0L; + + if (topSensitiveValuesBuilder_ == null) { + topSensitiveValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + topSensitiveValuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass(this); + int from_bitField0_ = bitField0_; + if (quasiIdsValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIdsValues_ = quasiIdsValues_; + } else { + result.quasiIdsValues_ = quasiIdsValuesBuilder_.build(); + } + result.equivalenceClassSize_ = equivalenceClassSize_; + result.numDistinctSensitiveValues_ = numDistinctSensitiveValues_; + if (topSensitiveValuesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + topSensitiveValues_ = java.util.Collections.unmodifiableList(topSensitiveValues_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.topSensitiveValues_ = topSensitiveValues_; + } else { + result.topSensitiveValues_ = topSensitiveValuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.getDefaultInstance()) return this; + if (quasiIdsValuesBuilder_ == null) { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValues_.isEmpty()) { + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.addAll(other.quasiIdsValues_); + } + onChanged(); + } + } else { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValuesBuilder_.isEmpty()) { + quasiIdsValuesBuilder_.dispose(); + quasiIdsValuesBuilder_ = null; + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsValuesFieldBuilder() : null; + } else { + quasiIdsValuesBuilder_.addAllMessages(other.quasiIdsValues_); + } + } + } + if (other.getEquivalenceClassSize() != 0L) { + setEquivalenceClassSize(other.getEquivalenceClassSize()); + } + if (other.getNumDistinctSensitiveValues() != 0L) { + setNumDistinctSensitiveValues(other.getNumDistinctSensitiveValues()); + } + if (topSensitiveValuesBuilder_ == null) { + if (!other.topSensitiveValues_.isEmpty()) { + if (topSensitiveValues_.isEmpty()) { + topSensitiveValues_ = other.topSensitiveValues_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTopSensitiveValuesIsMutable(); + topSensitiveValues_.addAll(other.topSensitiveValues_); + } + onChanged(); + } + } else { + if (!other.topSensitiveValues_.isEmpty()) { + if (topSensitiveValuesBuilder_.isEmpty()) { + topSensitiveValuesBuilder_.dispose(); + topSensitiveValuesBuilder_ = null; + topSensitiveValues_ = other.topSensitiveValues_; + bitField0_ = (bitField0_ & ~0x00000002); + topSensitiveValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTopSensitiveValuesFieldBuilder() : null; + } else { + topSensitiveValuesBuilder_.addAllMessages(other.topSensitiveValues_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIdsValues_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = new java.util.ArrayList(quasiIdsValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quasiIdsValuesBuilder_; + + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List getQuasiIdsValuesList() { + if (quasiIdsValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } else { + return quasiIdsValuesBuilder_.getMessageList(); + } + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public int getQuasiIdsValuesCount() { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.size(); + } else { + return quasiIdsValuesBuilder_.getCount(); + } + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); + } else { + return quasiIdsValuesBuilder_.getMessage(index); + } + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues(com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addAllQuasiIdsValues( + java.lang.Iterable values) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIdsValues_); + onChanged(); + } else { + quasiIdsValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder clearQuasiIdsValues() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder removeQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.remove(index); + onChanged(); + } else { + quasiIdsValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); } else { + return quasiIdsValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesOrBuilderList() { + if (quasiIdsValuesBuilder_ != null) { + return quasiIdsValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder() { + return getQuasiIdsValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * Quasi-identifier values defining the k-anonymity equivalence
+         * class. The order is always the same as the original request.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesBuilderList() { + return getQuasiIdsValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getQuasiIdsValuesFieldBuilder() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + quasiIdsValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIdsValues_ = null; + } + return quasiIdsValuesBuilder_; + } + + private long equivalenceClassSize_ ; + /** + *
+         * Size of the k-anonymity equivalence class.
+         * 
+ * + * int64 equivalence_class_size = 2; + * @return The equivalenceClassSize. + */ + @java.lang.Override + public long getEquivalenceClassSize() { + return equivalenceClassSize_; + } + /** + *
+         * Size of the k-anonymity equivalence class.
+         * 
+ * + * int64 equivalence_class_size = 2; + * @param value The equivalenceClassSize to set. + * @return This builder for chaining. + */ + public Builder setEquivalenceClassSize(long value) { + + equivalenceClassSize_ = value; + onChanged(); + return this; + } + /** + *
+         * Size of the k-anonymity equivalence class.
+         * 
+ * + * int64 equivalence_class_size = 2; + * @return This builder for chaining. + */ + public Builder clearEquivalenceClassSize() { + + equivalenceClassSize_ = 0L; + onChanged(); + return this; + } + + private long numDistinctSensitiveValues_ ; + /** + *
+         * Number of distinct sensitive values in this equivalence class.
+         * 
+ * + * int64 num_distinct_sensitive_values = 3; + * @return The numDistinctSensitiveValues. + */ + @java.lang.Override + public long getNumDistinctSensitiveValues() { + return numDistinctSensitiveValues_; + } + /** + *
+         * Number of distinct sensitive values in this equivalence class.
+         * 
+ * + * int64 num_distinct_sensitive_values = 3; + * @param value The numDistinctSensitiveValues to set. + * @return This builder for chaining. + */ + public Builder setNumDistinctSensitiveValues(long value) { + + numDistinctSensitiveValues_ = value; + onChanged(); + return this; + } + /** + *
+         * Number of distinct sensitive values in this equivalence class.
+         * 
+ * + * int64 num_distinct_sensitive_values = 3; + * @return This builder for chaining. + */ + public Builder clearNumDistinctSensitiveValues() { + + numDistinctSensitiveValues_ = 0L; + onChanged(); + return this; + } + + private java.util.List topSensitiveValues_ = + java.util.Collections.emptyList(); + private void ensureTopSensitiveValuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + topSensitiveValues_ = new java.util.ArrayList(topSensitiveValues_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder> topSensitiveValuesBuilder_; + + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public java.util.List getTopSensitiveValuesList() { + if (topSensitiveValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(topSensitiveValues_); + } else { + return topSensitiveValuesBuilder_.getMessageList(); + } + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public int getTopSensitiveValuesCount() { + if (topSensitiveValuesBuilder_ == null) { + return topSensitiveValues_.size(); + } else { + return topSensitiveValuesBuilder_.getCount(); + } + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequency getTopSensitiveValues(int index) { + if (topSensitiveValuesBuilder_ == null) { + return topSensitiveValues_.get(index); + } else { + return topSensitiveValuesBuilder_.getMessage(index); + } + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public Builder setTopSensitiveValues( + int index, com.google.privacy.dlp.v2.ValueFrequency value) { + if (topSensitiveValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopSensitiveValuesIsMutable(); + topSensitiveValues_.set(index, value); + onChanged(); + } else { + topSensitiveValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public Builder setTopSensitiveValues( + int index, com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { + if (topSensitiveValuesBuilder_ == null) { + ensureTopSensitiveValuesIsMutable(); + topSensitiveValues_.set(index, builderForValue.build()); + onChanged(); + } else { + topSensitiveValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public Builder addTopSensitiveValues(com.google.privacy.dlp.v2.ValueFrequency value) { + if (topSensitiveValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopSensitiveValuesIsMutable(); + topSensitiveValues_.add(value); + onChanged(); + } else { + topSensitiveValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public Builder addTopSensitiveValues( + int index, com.google.privacy.dlp.v2.ValueFrequency value) { + if (topSensitiveValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopSensitiveValuesIsMutable(); + topSensitiveValues_.add(index, value); + onChanged(); + } else { + topSensitiveValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public Builder addTopSensitiveValues( + com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { + if (topSensitiveValuesBuilder_ == null) { + ensureTopSensitiveValuesIsMutable(); + topSensitiveValues_.add(builderForValue.build()); + onChanged(); + } else { + topSensitiveValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public Builder addTopSensitiveValues( + int index, com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { + if (topSensitiveValuesBuilder_ == null) { + ensureTopSensitiveValuesIsMutable(); + topSensitiveValues_.add(index, builderForValue.build()); + onChanged(); + } else { + topSensitiveValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public Builder addAllTopSensitiveValues( + java.lang.Iterable values) { + if (topSensitiveValuesBuilder_ == null) { + ensureTopSensitiveValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, topSensitiveValues_); + onChanged(); + } else { + topSensitiveValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public Builder clearTopSensitiveValues() { + if (topSensitiveValuesBuilder_ == null) { + topSensitiveValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + topSensitiveValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public Builder removeTopSensitiveValues(int index) { + if (topSensitiveValuesBuilder_ == null) { + ensureTopSensitiveValuesIsMutable(); + topSensitiveValues_.remove(index); + onChanged(); + } else { + topSensitiveValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequency.Builder getTopSensitiveValuesBuilder( + int index) { + return getTopSensitiveValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getTopSensitiveValuesOrBuilder( + int index) { + if (topSensitiveValuesBuilder_ == null) { + return topSensitiveValues_.get(index); } else { + return topSensitiveValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public java.util.List + getTopSensitiveValuesOrBuilderList() { + if (topSensitiveValuesBuilder_ != null) { + return topSensitiveValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(topSensitiveValues_); + } + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequency.Builder addTopSensitiveValuesBuilder() { + return getTopSensitiveValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()); + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public com.google.privacy.dlp.v2.ValueFrequency.Builder addTopSensitiveValuesBuilder( + int index) { + return getTopSensitiveValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()); + } + /** + *
+         * Estimated frequencies of top sensitive values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; + */ + public java.util.List + getTopSensitiveValuesBuilderList() { + return getTopSensitiveValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder> + getTopSensitiveValuesFieldBuilder() { + if (topSensitiveValuesBuilder_ == null) { + topSensitiveValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder>( + topSensitiveValues_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + topSensitiveValues_ = null; + } + return topSensitiveValuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LDiversityEquivalenceClass parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LDiversityEquivalenceClass(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LDiversityHistogramBucketOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Lower bound on the sensitive value frequencies of the equivalence
+       * classes in this bucket.
+       * 
+ * + * int64 sensitive_value_frequency_lower_bound = 1; + * @return The sensitiveValueFrequencyLowerBound. + */ + long getSensitiveValueFrequencyLowerBound(); + + /** + *
+       * Upper bound on the sensitive value frequencies of the equivalence
+       * classes in this bucket.
+       * 
+ * + * int64 sensitive_value_frequency_upper_bound = 2; + * @return The sensitiveValueFrequencyUpperBound. + */ + long getSensitiveValueFrequencyUpperBound(); + + /** + *
+       * Total number of equivalence classes in this bucket.
+       * 
+ * + * int64 bucket_size = 3; + * @return The bucketSize. + */ + long getBucketSize(); + + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + java.util.List + getBucketValuesList(); + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getBucketValues(int index); + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + int getBucketValuesCount(); + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + java.util.List + getBucketValuesOrBuilderList(); + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder getBucketValuesOrBuilder( + int index); + + /** + *
+       * Total number of distinct equivalence classes in this bucket.
+       * 
+ * + * int64 bucket_value_count = 5; + * @return The bucketValueCount. + */ + long getBucketValueCount(); + } + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket} + */ + public static final class LDiversityHistogramBucket extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) + LDiversityHistogramBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use LDiversityHistogramBucket.newBuilder() to construct. + private LDiversityHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LDiversityHistogramBucket() { + bucketValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LDiversityHistogramBucket(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LDiversityHistogramBucket( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + sensitiveValueFrequencyLowerBound_ = input.readInt64(); + break; + } + case 16: { + + sensitiveValueFrequencyUpperBound_ = input.readInt64(); + break; + } + case 24: { + + bucketSize_ = input.readInt64(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + bucketValues_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.parser(), extensionRegistry)); + break; + } + case 40: { + + bucketValueCount_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder.class); + } + + public static final int SENSITIVE_VALUE_FREQUENCY_LOWER_BOUND_FIELD_NUMBER = 1; + private long sensitiveValueFrequencyLowerBound_; + /** + *
+       * Lower bound on the sensitive value frequencies of the equivalence
+       * classes in this bucket.
+       * 
+ * + * int64 sensitive_value_frequency_lower_bound = 1; + * @return The sensitiveValueFrequencyLowerBound. + */ + @java.lang.Override + public long getSensitiveValueFrequencyLowerBound() { + return sensitiveValueFrequencyLowerBound_; + } + + public static final int SENSITIVE_VALUE_FREQUENCY_UPPER_BOUND_FIELD_NUMBER = 2; + private long sensitiveValueFrequencyUpperBound_; + /** + *
+       * Upper bound on the sensitive value frequencies of the equivalence
+       * classes in this bucket.
+       * 
+ * + * int64 sensitive_value_frequency_upper_bound = 2; + * @return The sensitiveValueFrequencyUpperBound. + */ + @java.lang.Override + public long getSensitiveValueFrequencyUpperBound() { + return sensitiveValueFrequencyUpperBound_; + } + + public static final int BUCKET_SIZE_FIELD_NUMBER = 3; + private long bucketSize_; + /** + *
+       * Total number of equivalence classes in this bucket.
+       * 
+ * + * int64 bucket_size = 3; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + + public static final int BUCKET_VALUES_FIELD_NUMBER = 4; + private java.util.List bucketValues_; + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public java.util.List getBucketValuesList() { + return bucketValues_; + } + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public java.util.List + getBucketValuesOrBuilderList() { + return bucketValues_; + } + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public int getBucketValuesCount() { + return bucketValues_.size(); + } + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getBucketValues(int index) { + return bucketValues_.get(index); + } + /** + *
+       * Sample of equivalence classes in this bucket. The total number of
+       * classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder getBucketValuesOrBuilder( + int index) { + return bucketValues_.get(index); + } + + public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 5; + private long bucketValueCount_; + /** + *
+       * Total number of distinct equivalence classes in this bucket.
+       * 
+ * + * int64 bucket_value_count = 5; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (sensitiveValueFrequencyLowerBound_ != 0L) { + output.writeInt64(1, sensitiveValueFrequencyLowerBound_); + } + if (sensitiveValueFrequencyUpperBound_ != 0L) { + output.writeInt64(2, sensitiveValueFrequencyUpperBound_); + } + if (bucketSize_ != 0L) { + output.writeInt64(3, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + output.writeMessage(4, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + output.writeInt64(5, bucketValueCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sensitiveValueFrequencyLowerBound_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, sensitiveValueFrequencyLowerBound_); + } + if (sensitiveValueFrequencyUpperBound_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, sensitiveValueFrequencyUpperBound_); + } + if (bucketSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, bucketValueCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) obj; + + if (getSensitiveValueFrequencyLowerBound() + != other.getSensitiveValueFrequencyLowerBound()) return false; + if (getSensitiveValueFrequencyUpperBound() + != other.getSensitiveValueFrequencyUpperBound()) return false; + if (getBucketSize() + != other.getBucketSize()) return false; + if (!getBucketValuesList() + .equals(other.getBucketValuesList())) return false; + if (getBucketValueCount() + != other.getBucketValueCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SENSITIVE_VALUE_FREQUENCY_LOWER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSensitiveValueFrequencyLowerBound()); + hash = (37 * hash) + SENSITIVE_VALUE_FREQUENCY_UPPER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSensitiveValueFrequencyUpperBound()); + hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketSize()); + if (getBucketValuesCount() > 0) { + hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getBucketValuesList().hashCode(); + } + hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketValueCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBucketValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + sensitiveValueFrequencyLowerBound_ = 0L; + + sensitiveValueFrequencyUpperBound_ = 0L; + + bucketSize_ = 0L; + + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bucketValuesBuilder_.clear(); + } + bucketValueCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket(this); + int from_bitField0_ = bitField0_; + result.sensitiveValueFrequencyLowerBound_ = sensitiveValueFrequencyLowerBound_; + result.sensitiveValueFrequencyUpperBound_ = sensitiveValueFrequencyUpperBound_; + result.bucketSize_ = bucketSize_; + if (bucketValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bucketValues_ = bucketValues_; + } else { + result.bucketValues_ = bucketValuesBuilder_.build(); + } + result.bucketValueCount_ = bucketValueCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.getDefaultInstance()) return this; + if (other.getSensitiveValueFrequencyLowerBound() != 0L) { + setSensitiveValueFrequencyLowerBound(other.getSensitiveValueFrequencyLowerBound()); + } + if (other.getSensitiveValueFrequencyUpperBound() != 0L) { + setSensitiveValueFrequencyUpperBound(other.getSensitiveValueFrequencyUpperBound()); + } + if (other.getBucketSize() != 0L) { + setBucketSize(other.getBucketSize()); + } + if (bucketValuesBuilder_ == null) { + if (!other.bucketValues_.isEmpty()) { + if (bucketValues_.isEmpty()) { + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketValuesIsMutable(); + bucketValues_.addAll(other.bucketValues_); + } + onChanged(); + } + } else { + if (!other.bucketValues_.isEmpty()) { + if (bucketValuesBuilder_.isEmpty()) { + bucketValuesBuilder_.dispose(); + bucketValuesBuilder_ = null; + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBucketValuesFieldBuilder() : null; + } else { + bucketValuesBuilder_.addAllMessages(other.bucketValues_); + } + } + } + if (other.getBucketValueCount() != 0L) { + setBucketValueCount(other.getBucketValueCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long sensitiveValueFrequencyLowerBound_ ; + /** + *
+         * Lower bound on the sensitive value frequencies of the equivalence
+         * classes in this bucket.
+         * 
+ * + * int64 sensitive_value_frequency_lower_bound = 1; + * @return The sensitiveValueFrequencyLowerBound. + */ + @java.lang.Override + public long getSensitiveValueFrequencyLowerBound() { + return sensitiveValueFrequencyLowerBound_; + } + /** + *
+         * Lower bound on the sensitive value frequencies of the equivalence
+         * classes in this bucket.
+         * 
+ * + * int64 sensitive_value_frequency_lower_bound = 1; + * @param value The sensitiveValueFrequencyLowerBound to set. + * @return This builder for chaining. + */ + public Builder setSensitiveValueFrequencyLowerBound(long value) { + + sensitiveValueFrequencyLowerBound_ = value; + onChanged(); + return this; + } + /** + *
+         * Lower bound on the sensitive value frequencies of the equivalence
+         * classes in this bucket.
+         * 
+ * + * int64 sensitive_value_frequency_lower_bound = 1; + * @return This builder for chaining. + */ + public Builder clearSensitiveValueFrequencyLowerBound() { + + sensitiveValueFrequencyLowerBound_ = 0L; + onChanged(); + return this; + } + + private long sensitiveValueFrequencyUpperBound_ ; + /** + *
+         * Upper bound on the sensitive value frequencies of the equivalence
+         * classes in this bucket.
+         * 
+ * + * int64 sensitive_value_frequency_upper_bound = 2; + * @return The sensitiveValueFrequencyUpperBound. + */ + @java.lang.Override + public long getSensitiveValueFrequencyUpperBound() { + return sensitiveValueFrequencyUpperBound_; + } + /** + *
+         * Upper bound on the sensitive value frequencies of the equivalence
+         * classes in this bucket.
+         * 
+ * + * int64 sensitive_value_frequency_upper_bound = 2; + * @param value The sensitiveValueFrequencyUpperBound to set. + * @return This builder for chaining. + */ + public Builder setSensitiveValueFrequencyUpperBound(long value) { + + sensitiveValueFrequencyUpperBound_ = value; + onChanged(); + return this; + } + /** + *
+         * Upper bound on the sensitive value frequencies of the equivalence
+         * classes in this bucket.
+         * 
+ * + * int64 sensitive_value_frequency_upper_bound = 2; + * @return This builder for chaining. + */ + public Builder clearSensitiveValueFrequencyUpperBound() { + + sensitiveValueFrequencyUpperBound_ = 0L; + onChanged(); + return this; + } + + private long bucketSize_ ; + /** + *
+         * Total number of equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_size = 3; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + /** + *
+         * Total number of equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_size = 3; + * @param value The bucketSize to set. + * @return This builder for chaining. + */ + public Builder setBucketSize(long value) { + + bucketSize_ = value; + onChanged(); + return this; + } + /** + *
+         * Total number of equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_size = 3; + * @return This builder for chaining. + */ + public Builder clearBucketSize() { + + bucketSize_ = 0L; + onChanged(); + return this; + } + + private java.util.List bucketValues_ = + java.util.Collections.emptyList(); + private void ensureBucketValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(bucketValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder> bucketValuesBuilder_; + + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public java.util.List getBucketValuesList() { + if (bucketValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bucketValues_); + } else { + return bucketValuesBuilder_.getMessageList(); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public int getBucketValuesCount() { + if (bucketValuesBuilder_ == null) { + return bucketValues_.size(); + } else { + return bucketValuesBuilder_.getCount(); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); + } else { + return bucketValuesBuilder_.getMessage(index); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.set(index, value); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public Builder addBucketValues(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(index, value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public Builder addBucketValues( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public Builder addAllBucketValues( + java.lang.Iterable values) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucketValues_); + onChanged(); + } else { + bucketValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public Builder clearBucketValues() { + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public Builder removeBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.remove(index); + onChanged(); + } else { + bucketValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder getBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder getBucketValuesOrBuilder( + int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); } else { + return bucketValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public java.util.List + getBucketValuesOrBuilderList() { + if (bucketValuesBuilder_ != null) { + return bucketValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bucketValues_); + } + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder addBucketValuesBuilder() { + return getBucketValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.getDefaultInstance()); + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder addBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.getDefaultInstance()); + } + /** + *
+         * Sample of equivalence classes in this bucket. The total number of
+         * classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; + */ + public java.util.List + getBucketValuesBuilderList() { + return getBucketValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder> + getBucketValuesFieldBuilder() { + if (bucketValuesBuilder_ == null) { + bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder>( + bucketValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bucketValues_ = null; + } + return bucketValuesBuilder_; + } + + private long bucketValueCount_ ; + /** + *
+         * Total number of distinct equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_value_count = 5; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + /** + *
+         * Total number of distinct equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_value_count = 5; + * @param value The bucketValueCount to set. + * @return This builder for chaining. + */ + public Builder setBucketValueCount(long value) { + + bucketValueCount_ = value; + onChanged(); + return this; + } + /** + *
+         * Total number of distinct equivalence classes in this bucket.
+         * 
+ * + * int64 bucket_value_count = 5; + * @return This builder for chaining. + */ + public Builder clearBucketValueCount() { + + bucketValueCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LDiversityHistogramBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LDiversityHistogramBucket(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int SENSITIVE_VALUE_FREQUENCY_HISTOGRAM_BUCKETS_FIELD_NUMBER = 5; + private java.util.List sensitiveValueFrequencyHistogramBuckets_; + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public java.util.List getSensitiveValueFrequencyHistogramBucketsList() { + return sensitiveValueFrequencyHistogramBuckets_; + } + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public java.util.List + getSensitiveValueFrequencyHistogramBucketsOrBuilderList() { + return sensitiveValueFrequencyHistogramBuckets_; + } + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public int getSensitiveValueFrequencyHistogramBucketsCount() { + return sensitiveValueFrequencyHistogramBuckets_.size(); + } + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getSensitiveValueFrequencyHistogramBuckets(int index) { + return sensitiveValueFrequencyHistogramBuckets_.get(index); + } + /** + *
+     * Histogram of l-diversity equivalence class sensitive value frequencies.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder getSensitiveValueFrequencyHistogramBucketsOrBuilder( + int index) { + return sensitiveValueFrequencyHistogramBuckets_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < sensitiveValueFrequencyHistogramBuckets_.size(); i++) { + output.writeMessage(5, sensitiveValueFrequencyHistogramBuckets_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < sensitiveValueFrequencyHistogramBuckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, sensitiveValueFrequencyHistogramBuckets_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) obj; + + if (!getSensitiveValueFrequencyHistogramBucketsList() + .equals(other.getSensitiveValueFrequencyHistogramBucketsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSensitiveValueFrequencyHistogramBucketsCount() > 0) { + hash = (37 * hash) + SENSITIVE_VALUE_FREQUENCY_HISTOGRAM_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getSensitiveValueFrequencyHistogramBucketsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Result of the l-diversity computation.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSensitiveValueFrequencyHistogramBucketsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult(this); + int from_bitField0_ = bitField0_; + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.unmodifiableList(sensitiveValueFrequencyHistogramBuckets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sensitiveValueFrequencyHistogramBuckets_ = sensitiveValueFrequencyHistogramBuckets_; + } else { + result.sensitiveValueFrequencyHistogramBuckets_ = sensitiveValueFrequencyHistogramBucketsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance()) return this; + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + if (!other.sensitiveValueFrequencyHistogramBuckets_.isEmpty()) { + if (sensitiveValueFrequencyHistogramBuckets_.isEmpty()) { + sensitiveValueFrequencyHistogramBuckets_ = other.sensitiveValueFrequencyHistogramBuckets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); + sensitiveValueFrequencyHistogramBuckets_.addAll(other.sensitiveValueFrequencyHistogramBuckets_); + } + onChanged(); + } + } else { + if (!other.sensitiveValueFrequencyHistogramBuckets_.isEmpty()) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_.isEmpty()) { + sensitiveValueFrequencyHistogramBucketsBuilder_.dispose(); + sensitiveValueFrequencyHistogramBucketsBuilder_ = null; + sensitiveValueFrequencyHistogramBuckets_ = other.sensitiveValueFrequencyHistogramBuckets_; + bitField0_ = (bitField0_ & ~0x00000001); + sensitiveValueFrequencyHistogramBucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSensitiveValueFrequencyHistogramBucketsFieldBuilder() : null; + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.addAllMessages(other.sensitiveValueFrequencyHistogramBuckets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List sensitiveValueFrequencyHistogramBuckets_ = + java.util.Collections.emptyList(); + private void ensureSensitiveValueFrequencyHistogramBucketsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + sensitiveValueFrequencyHistogramBuckets_ = new java.util.ArrayList(sensitiveValueFrequencyHistogramBuckets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder> sensitiveValueFrequencyHistogramBucketsBuilder_; + + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public java.util.List getSensitiveValueFrequencyHistogramBucketsList() { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(sensitiveValueFrequencyHistogramBuckets_); + } else { + return sensitiveValueFrequencyHistogramBucketsBuilder_.getMessageList(); + } + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public int getSensitiveValueFrequencyHistogramBucketsCount() { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + return sensitiveValueFrequencyHistogramBuckets_.size(); + } else { + return sensitiveValueFrequencyHistogramBucketsBuilder_.getCount(); + } + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getSensitiveValueFrequencyHistogramBuckets(int index) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + return sensitiveValueFrequencyHistogramBuckets_.get(index); + } else { + return sensitiveValueFrequencyHistogramBucketsBuilder_.getMessage(index); + } + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public Builder setSensitiveValueFrequencyHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket value) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); + sensitiveValueFrequencyHistogramBuckets_.set(index, value); + onChanged(); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public Builder setSensitiveValueFrequencyHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder builderForValue) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); + sensitiveValueFrequencyHistogramBuckets_.set(index, builderForValue.build()); + onChanged(); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public Builder addSensitiveValueFrequencyHistogramBuckets(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket value) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); + sensitiveValueFrequencyHistogramBuckets_.add(value); + onChanged(); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public Builder addSensitiveValueFrequencyHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket value) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); + sensitiveValueFrequencyHistogramBuckets_.add(index, value); + onChanged(); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public Builder addSensitiveValueFrequencyHistogramBuckets( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder builderForValue) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); + sensitiveValueFrequencyHistogramBuckets_.add(builderForValue.build()); + onChanged(); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public Builder addSensitiveValueFrequencyHistogramBuckets( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder builderForValue) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); + sensitiveValueFrequencyHistogramBuckets_.add(index, builderForValue.build()); + onChanged(); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public Builder addAllSensitiveValueFrequencyHistogramBuckets( + java.lang.Iterable values) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, sensitiveValueFrequencyHistogramBuckets_); + onChanged(); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public Builder clearSensitiveValueFrequencyHistogramBuckets() { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.clear(); + } + return this; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public Builder removeSensitiveValueFrequencyHistogramBuckets(int index) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); + sensitiveValueFrequencyHistogramBuckets_.remove(index); + onChanged(); + } else { + sensitiveValueFrequencyHistogramBucketsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder getSensitiveValueFrequencyHistogramBucketsBuilder( + int index) { + return getSensitiveValueFrequencyHistogramBucketsFieldBuilder().getBuilder(index); + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder getSensitiveValueFrequencyHistogramBucketsOrBuilder( + int index) { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + return sensitiveValueFrequencyHistogramBuckets_.get(index); } else { + return sensitiveValueFrequencyHistogramBucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public java.util.List + getSensitiveValueFrequencyHistogramBucketsOrBuilderList() { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ != null) { + return sensitiveValueFrequencyHistogramBucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sensitiveValueFrequencyHistogramBuckets_); + } + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder addSensitiveValueFrequencyHistogramBucketsBuilder() { + return getSensitiveValueFrequencyHistogramBucketsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.getDefaultInstance()); + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder addSensitiveValueFrequencyHistogramBucketsBuilder( + int index) { + return getSensitiveValueFrequencyHistogramBucketsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.getDefaultInstance()); + } + /** + *
+       * Histogram of l-diversity equivalence class sensitive value frequencies.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + */ + public java.util.List + getSensitiveValueFrequencyHistogramBucketsBuilderList() { + return getSensitiveValueFrequencyHistogramBucketsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder> + getSensitiveValueFrequencyHistogramBucketsFieldBuilder() { + if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { + sensitiveValueFrequencyHistogramBucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder>( + sensitiveValueFrequencyHistogramBuckets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + sensitiveValueFrequencyHistogramBuckets_ = null; + } + return sensitiveValueFrequencyHistogramBucketsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LDiversityResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LDiversityResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface KMapEstimationResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + java.util.List + getKMapEstimationHistogramList(); + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getKMapEstimationHistogram(int index); + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + int getKMapEstimationHistogramCount(); + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + java.util.List + getKMapEstimationHistogramOrBuilderList(); + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder getKMapEstimationHistogramOrBuilder( + int index); + } + /** + *
+   * Result of the reidentifiability analysis. Note that these results are an
+   * estimation, not exact values.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult} + */ + public static final class KMapEstimationResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) + KMapEstimationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use KMapEstimationResult.newBuilder() to construct. + private KMapEstimationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KMapEstimationResult() { + kMapEstimationHistogram_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KMapEstimationResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KMapEstimationResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + kMapEstimationHistogram_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + kMapEstimationHistogram_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + kMapEstimationHistogram_ = java.util.Collections.unmodifiableList(kMapEstimationHistogram_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder.class); + } + + public interface KMapEstimationQuasiIdValuesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesList(); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + int getQuasiIdsValuesCount(); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesOrBuilderList(); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index); + + /** + *
+       * The estimated anonymity for these quasi-identifier values.
+       * 
+ * + * int64 estimated_anonymity = 2; + * @return The estimatedAnonymity. + */ + long getEstimatedAnonymity(); + } + /** + *
+     * A tuple of values for the quasi-identifier columns.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues} + */ + public static final class KMapEstimationQuasiIdValues extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) + KMapEstimationQuasiIdValuesOrBuilder { + private static final long serialVersionUID = 0L; + // Use KMapEstimationQuasiIdValues.newBuilder() to construct. + private KMapEstimationQuasiIdValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KMapEstimationQuasiIdValues() { + quasiIdsValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KMapEstimationQuasiIdValues(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KMapEstimationQuasiIdValues( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIdsValues_.add( + input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); + break; + } + case 16: { + + estimatedAnonymity_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder.class); + } + + public static final int QUASI_IDS_VALUES_FIELD_NUMBER = 1; + private java.util.List quasiIdsValues_; + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public java.util.List getQuasiIdsValuesList() { + return quasiIdsValues_; + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public java.util.List + getQuasiIdsValuesOrBuilderList() { + return quasiIdsValues_; + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public int getQuasiIdsValuesCount() { + return quasiIdsValues_.size(); + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + return quasiIdsValues_.get(index); + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + return quasiIdsValues_.get(index); + } + + public static final int ESTIMATED_ANONYMITY_FIELD_NUMBER = 2; + private long estimatedAnonymity_; + /** + *
+       * The estimated anonymity for these quasi-identifier values.
+       * 
+ * + * int64 estimated_anonymity = 2; + * @return The estimatedAnonymity. + */ + @java.lang.Override + public long getEstimatedAnonymity() { + return estimatedAnonymity_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIdsValues_.size(); i++) { + output.writeMessage(1, quasiIdsValues_.get(i)); + } + if (estimatedAnonymity_ != 0L) { + output.writeInt64(2, estimatedAnonymity_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIdsValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIdsValues_.get(i)); + } + if (estimatedAnonymity_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, estimatedAnonymity_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) obj; + + if (!getQuasiIdsValuesList() + .equals(other.getQuasiIdsValuesList())) return false; + if (getEstimatedAnonymity() + != other.getEstimatedAnonymity()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsValuesCount() > 0) { + hash = (37 * hash) + QUASI_IDS_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsValuesList().hashCode(); + } + hash = (37 * hash) + ESTIMATED_ANONYMITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEstimatedAnonymity()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * A tuple of values for the quasi-identifier columns.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsValuesBuilder_.clear(); + } + estimatedAnonymity_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues(this); + int from_bitField0_ = bitField0_; + if (quasiIdsValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIdsValues_ = quasiIdsValues_; + } else { + result.quasiIdsValues_ = quasiIdsValuesBuilder_.build(); + } + result.estimatedAnonymity_ = estimatedAnonymity_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.getDefaultInstance()) return this; + if (quasiIdsValuesBuilder_ == null) { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValues_.isEmpty()) { + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.addAll(other.quasiIdsValues_); + } + onChanged(); + } + } else { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValuesBuilder_.isEmpty()) { + quasiIdsValuesBuilder_.dispose(); + quasiIdsValuesBuilder_ = null; + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsValuesFieldBuilder() : null; + } else { + quasiIdsValuesBuilder_.addAllMessages(other.quasiIdsValues_); + } + } + } + if (other.getEstimatedAnonymity() != 0L) { + setEstimatedAnonymity(other.getEstimatedAnonymity()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIdsValues_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = new java.util.ArrayList(quasiIdsValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quasiIdsValuesBuilder_; + + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List getQuasiIdsValuesList() { + if (quasiIdsValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } else { + return quasiIdsValuesBuilder_.getMessageList(); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public int getQuasiIdsValuesCount() { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.size(); + } else { + return quasiIdsValuesBuilder_.getCount(); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); + } else { + return quasiIdsValuesBuilder_.getMessage(index); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues(com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addAllQuasiIdsValues( + java.lang.Iterable values) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIdsValues_); + onChanged(); + } else { + quasiIdsValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder clearQuasiIdsValues() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder removeQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.remove(index); + onChanged(); + } else { + quasiIdsValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); } else { + return quasiIdsValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesOrBuilderList() { + if (quasiIdsValuesBuilder_ != null) { + return quasiIdsValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder() { + return getQuasiIdsValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesBuilderList() { + return getQuasiIdsValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getQuasiIdsValuesFieldBuilder() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + quasiIdsValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIdsValues_ = null; + } + return quasiIdsValuesBuilder_; + } + + private long estimatedAnonymity_ ; + /** + *
+         * The estimated anonymity for these quasi-identifier values.
+         * 
+ * + * int64 estimated_anonymity = 2; + * @return The estimatedAnonymity. + */ + @java.lang.Override + public long getEstimatedAnonymity() { + return estimatedAnonymity_; + } + /** + *
+         * The estimated anonymity for these quasi-identifier values.
+         * 
+ * + * int64 estimated_anonymity = 2; + * @param value The estimatedAnonymity to set. + * @return This builder for chaining. + */ + public Builder setEstimatedAnonymity(long value) { + + estimatedAnonymity_ = value; + onChanged(); + return this; + } + /** + *
+         * The estimated anonymity for these quasi-identifier values.
+         * 
+ * + * int64 estimated_anonymity = 2; + * @return This builder for chaining. + */ + public Builder clearEstimatedAnonymity() { + + estimatedAnonymity_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KMapEstimationQuasiIdValues parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KMapEstimationQuasiIdValues(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface KMapEstimationHistogramBucketOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Always positive.
+       * 
+ * + * int64 min_anonymity = 1; + * @return The minAnonymity. + */ + long getMinAnonymity(); + + /** + *
+       * Always greater than or equal to min_anonymity.
+       * 
+ * + * int64 max_anonymity = 2; + * @return The maxAnonymity. + */ + long getMaxAnonymity(); + + /** + *
+       * Number of records within these anonymity bounds.
+       * 
+ * + * int64 bucket_size = 5; + * @return The bucketSize. + */ + long getBucketSize(); + + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + java.util.List + getBucketValuesList(); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getBucketValues(int index); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + int getBucketValuesCount(); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + java.util.List + getBucketValuesOrBuilderList(); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( + int index); + + /** + *
+       * Total number of distinct quasi-identifier tuple values in this bucket.
+       * 
+ * + * int64 bucket_value_count = 7; + * @return The bucketValueCount. + */ + long getBucketValueCount(); + } + /** + *
+     * A KMapEstimationHistogramBucket message with the following values:
+     *   min_anonymity: 3
+     *   max_anonymity: 5
+     *   frequency: 42
+     * means that there are 42 records whose quasi-identifier values correspond
+     * to 3, 4 or 5 people in the overlying population. An important particular
+     * case is when min_anonymity = max_anonymity = 1: the frequency field then
+     * corresponds to the number of uniquely identifiable records.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket} + */ + public static final class KMapEstimationHistogramBucket extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) + KMapEstimationHistogramBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use KMapEstimationHistogramBucket.newBuilder() to construct. + private KMapEstimationHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KMapEstimationHistogramBucket() { + bucketValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KMapEstimationHistogramBucket(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KMapEstimationHistogramBucket( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + minAnonymity_ = input.readInt64(); + break; + } + case 16: { + + maxAnonymity_ = input.readInt64(); + break; + } + case 40: { + + bucketSize_ = input.readInt64(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + bucketValues_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.parser(), extensionRegistry)); + break; + } + case 56: { + + bucketValueCount_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder.class); + } + + public static final int MIN_ANONYMITY_FIELD_NUMBER = 1; + private long minAnonymity_; + /** + *
+       * Always positive.
+       * 
+ * + * int64 min_anonymity = 1; + * @return The minAnonymity. + */ + @java.lang.Override + public long getMinAnonymity() { + return minAnonymity_; + } + + public static final int MAX_ANONYMITY_FIELD_NUMBER = 2; + private long maxAnonymity_; + /** + *
+       * Always greater than or equal to min_anonymity.
+       * 
+ * + * int64 max_anonymity = 2; + * @return The maxAnonymity. + */ + @java.lang.Override + public long getMaxAnonymity() { + return maxAnonymity_; + } + + public static final int BUCKET_SIZE_FIELD_NUMBER = 5; + private long bucketSize_; + /** + *
+       * Number of records within these anonymity bounds.
+       * 
+ * + * int64 bucket_size = 5; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + + public static final int BUCKET_VALUES_FIELD_NUMBER = 6; + private java.util.List bucketValues_; + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public java.util.List getBucketValuesList() { + return bucketValues_; + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public java.util.List + getBucketValuesOrBuilderList() { + return bucketValues_; + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public int getBucketValuesCount() { + return bucketValues_.size(); + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getBucketValues(int index) { + return bucketValues_.get(index); + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( + int index) { + return bucketValues_.get(index); + } + + public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 7; + private long bucketValueCount_; + /** + *
+       * Total number of distinct quasi-identifier tuple values in this bucket.
+       * 
+ * + * int64 bucket_value_count = 7; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minAnonymity_ != 0L) { + output.writeInt64(1, minAnonymity_); + } + if (maxAnonymity_ != 0L) { + output.writeInt64(2, maxAnonymity_); + } + if (bucketSize_ != 0L) { + output.writeInt64(5, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + output.writeMessage(6, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + output.writeInt64(7, bucketValueCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minAnonymity_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, minAnonymity_); + } + if (maxAnonymity_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, maxAnonymity_); + } + if (bucketSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, bucketValueCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) obj; + + if (getMinAnonymity() + != other.getMinAnonymity()) return false; + if (getMaxAnonymity() + != other.getMaxAnonymity()) return false; + if (getBucketSize() + != other.getBucketSize()) return false; + if (!getBucketValuesList() + .equals(other.getBucketValuesList())) return false; + if (getBucketValueCount() + != other.getBucketValueCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MIN_ANONYMITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinAnonymity()); + hash = (37 * hash) + MAX_ANONYMITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxAnonymity()); + hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketSize()); + if (getBucketValuesCount() > 0) { + hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getBucketValuesList().hashCode(); + } + hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketValueCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * A KMapEstimationHistogramBucket message with the following values:
+       *   min_anonymity: 3
+       *   max_anonymity: 5
+       *   frequency: 42
+       * means that there are 42 records whose quasi-identifier values correspond
+       * to 3, 4 or 5 people in the overlying population. An important particular
+       * case is when min_anonymity = max_anonymity = 1: the frequency field then
+       * corresponds to the number of uniquely identifiable records.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBucketValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + minAnonymity_ = 0L; + + maxAnonymity_ = 0L; + + bucketSize_ = 0L; + + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bucketValuesBuilder_.clear(); + } + bucketValueCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket(this); + int from_bitField0_ = bitField0_; + result.minAnonymity_ = minAnonymity_; + result.maxAnonymity_ = maxAnonymity_; + result.bucketSize_ = bucketSize_; + if (bucketValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bucketValues_ = bucketValues_; + } else { + result.bucketValues_ = bucketValuesBuilder_.build(); + } + result.bucketValueCount_ = bucketValueCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.getDefaultInstance()) return this; + if (other.getMinAnonymity() != 0L) { + setMinAnonymity(other.getMinAnonymity()); + } + if (other.getMaxAnonymity() != 0L) { + setMaxAnonymity(other.getMaxAnonymity()); + } + if (other.getBucketSize() != 0L) { + setBucketSize(other.getBucketSize()); + } + if (bucketValuesBuilder_ == null) { + if (!other.bucketValues_.isEmpty()) { + if (bucketValues_.isEmpty()) { + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketValuesIsMutable(); + bucketValues_.addAll(other.bucketValues_); + } + onChanged(); + } + } else { + if (!other.bucketValues_.isEmpty()) { + if (bucketValuesBuilder_.isEmpty()) { + bucketValuesBuilder_.dispose(); + bucketValuesBuilder_ = null; + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBucketValuesFieldBuilder() : null; + } else { + bucketValuesBuilder_.addAllMessages(other.bucketValues_); + } + } + } + if (other.getBucketValueCount() != 0L) { + setBucketValueCount(other.getBucketValueCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long minAnonymity_ ; + /** + *
+         * Always positive.
+         * 
+ * + * int64 min_anonymity = 1; + * @return The minAnonymity. + */ + @java.lang.Override + public long getMinAnonymity() { + return minAnonymity_; + } + /** + *
+         * Always positive.
+         * 
+ * + * int64 min_anonymity = 1; + * @param value The minAnonymity to set. + * @return This builder for chaining. + */ + public Builder setMinAnonymity(long value) { + + minAnonymity_ = value; + onChanged(); + return this; + } + /** + *
+         * Always positive.
+         * 
+ * + * int64 min_anonymity = 1; + * @return This builder for chaining. + */ + public Builder clearMinAnonymity() { + + minAnonymity_ = 0L; + onChanged(); + return this; + } + + private long maxAnonymity_ ; + /** + *
+         * Always greater than or equal to min_anonymity.
+         * 
+ * + * int64 max_anonymity = 2; + * @return The maxAnonymity. + */ + @java.lang.Override + public long getMaxAnonymity() { + return maxAnonymity_; + } + /** + *
+         * Always greater than or equal to min_anonymity.
+         * 
+ * + * int64 max_anonymity = 2; + * @param value The maxAnonymity to set. + * @return This builder for chaining. + */ + public Builder setMaxAnonymity(long value) { + + maxAnonymity_ = value; + onChanged(); + return this; + } + /** + *
+         * Always greater than or equal to min_anonymity.
+         * 
+ * + * int64 max_anonymity = 2; + * @return This builder for chaining. + */ + public Builder clearMaxAnonymity() { + + maxAnonymity_ = 0L; + onChanged(); + return this; + } + + private long bucketSize_ ; + /** + *
+         * Number of records within these anonymity bounds.
+         * 
+ * + * int64 bucket_size = 5; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + /** + *
+         * Number of records within these anonymity bounds.
+         * 
+ * + * int64 bucket_size = 5; + * @param value The bucketSize to set. + * @return This builder for chaining. + */ + public Builder setBucketSize(long value) { + + bucketSize_ = value; + onChanged(); + return this; + } + /** + *
+         * Number of records within these anonymity bounds.
+         * 
+ * + * int64 bucket_size = 5; + * @return This builder for chaining. + */ + public Builder clearBucketSize() { + + bucketSize_ = 0L; + onChanged(); + return this; + } + + private java.util.List bucketValues_ = + java.util.Collections.emptyList(); + private void ensureBucketValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(bucketValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder> bucketValuesBuilder_; + + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List getBucketValuesList() { + if (bucketValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bucketValues_); + } else { + return bucketValuesBuilder_.getMessageList(); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public int getBucketValuesCount() { + if (bucketValuesBuilder_ == null) { + return bucketValues_.size(); + } else { + return bucketValuesBuilder_.getCount(); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); + } else { + return bucketValuesBuilder_.getMessage(index); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.set(index, value); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(index, value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addAllBucketValues( + java.lang.Iterable values) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucketValues_); + onChanged(); + } else { + bucketValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public Builder clearBucketValues() { + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public Builder removeBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.remove(index); + onChanged(); + } else { + bucketValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder getBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( + int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); } else { + return bucketValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List + getBucketValuesOrBuilderList() { + if (bucketValuesBuilder_ != null) { + return bucketValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bucketValues_); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder addBucketValuesBuilder() { + return getBucketValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.getDefaultInstance()); + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder addBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.getDefaultInstance()); + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List + getBucketValuesBuilderList() { + return getBucketValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder> + getBucketValuesFieldBuilder() { + if (bucketValuesBuilder_ == null) { + bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder>( + bucketValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bucketValues_ = null; + } + return bucketValuesBuilder_; + } + + private long bucketValueCount_ ; + /** + *
+         * Total number of distinct quasi-identifier tuple values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 7; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + /** + *
+         * Total number of distinct quasi-identifier tuple values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 7; + * @param value The bucketValueCount to set. + * @return This builder for chaining. + */ + public Builder setBucketValueCount(long value) { + + bucketValueCount_ = value; + onChanged(); + return this; + } + /** + *
+         * Total number of distinct quasi-identifier tuple values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 7; + * @return This builder for chaining. + */ + public Builder clearBucketValueCount() { + + bucketValueCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KMapEstimationHistogramBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KMapEstimationHistogramBucket(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int K_MAP_ESTIMATION_HISTOGRAM_FIELD_NUMBER = 1; + private java.util.List kMapEstimationHistogram_; + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + @java.lang.Override + public java.util.List getKMapEstimationHistogramList() { + return kMapEstimationHistogram_; + } + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + @java.lang.Override + public java.util.List + getKMapEstimationHistogramOrBuilderList() { + return kMapEstimationHistogram_; + } + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + @java.lang.Override + public int getKMapEstimationHistogramCount() { + return kMapEstimationHistogram_.size(); + } + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getKMapEstimationHistogram(int index) { + return kMapEstimationHistogram_.get(index); + } + /** + *
+     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+     * doesn't correspond to any such interval, the associated frequency is
+     * zero. For example, the following records:
+     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+     * mean that there are no record with an estimated anonymity of 4, 5, or
+     * larger than 10.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder getKMapEstimationHistogramOrBuilder( + int index) { + return kMapEstimationHistogram_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < kMapEstimationHistogram_.size(); i++) { + output.writeMessage(1, kMapEstimationHistogram_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < kMapEstimationHistogram_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, kMapEstimationHistogram_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) obj; + + if (!getKMapEstimationHistogramList() + .equals(other.getKMapEstimationHistogramList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getKMapEstimationHistogramCount() > 0) { + hash = (37 * hash) + K_MAP_ESTIMATION_HISTOGRAM_FIELD_NUMBER; + hash = (53 * hash) + getKMapEstimationHistogramList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Result of the reidentifiability analysis. Note that these results are an
+     * estimation, not exact values.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getKMapEstimationHistogramFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (kMapEstimationHistogramBuilder_ == null) { + kMapEstimationHistogram_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + kMapEstimationHistogramBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult(this); + int from_bitField0_ = bitField0_; + if (kMapEstimationHistogramBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + kMapEstimationHistogram_ = java.util.Collections.unmodifiableList(kMapEstimationHistogram_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.kMapEstimationHistogram_ = kMapEstimationHistogram_; + } else { + result.kMapEstimationHistogram_ = kMapEstimationHistogramBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance()) return this; + if (kMapEstimationHistogramBuilder_ == null) { + if (!other.kMapEstimationHistogram_.isEmpty()) { + if (kMapEstimationHistogram_.isEmpty()) { + kMapEstimationHistogram_ = other.kMapEstimationHistogram_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureKMapEstimationHistogramIsMutable(); + kMapEstimationHistogram_.addAll(other.kMapEstimationHistogram_); + } + onChanged(); + } + } else { + if (!other.kMapEstimationHistogram_.isEmpty()) { + if (kMapEstimationHistogramBuilder_.isEmpty()) { + kMapEstimationHistogramBuilder_.dispose(); + kMapEstimationHistogramBuilder_ = null; + kMapEstimationHistogram_ = other.kMapEstimationHistogram_; + bitField0_ = (bitField0_ & ~0x00000001); + kMapEstimationHistogramBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getKMapEstimationHistogramFieldBuilder() : null; + } else { + kMapEstimationHistogramBuilder_.addAllMessages(other.kMapEstimationHistogram_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List kMapEstimationHistogram_ = + java.util.Collections.emptyList(); + private void ensureKMapEstimationHistogramIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + kMapEstimationHistogram_ = new java.util.ArrayList(kMapEstimationHistogram_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder> kMapEstimationHistogramBuilder_; + + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public java.util.List getKMapEstimationHistogramList() { + if (kMapEstimationHistogramBuilder_ == null) { + return java.util.Collections.unmodifiableList(kMapEstimationHistogram_); + } else { + return kMapEstimationHistogramBuilder_.getMessageList(); + } + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public int getKMapEstimationHistogramCount() { + if (kMapEstimationHistogramBuilder_ == null) { + return kMapEstimationHistogram_.size(); + } else { + return kMapEstimationHistogramBuilder_.getCount(); + } + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getKMapEstimationHistogram(int index) { + if (kMapEstimationHistogramBuilder_ == null) { + return kMapEstimationHistogram_.get(index); + } else { + return kMapEstimationHistogramBuilder_.getMessage(index); + } + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public Builder setKMapEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket value) { + if (kMapEstimationHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKMapEstimationHistogramIsMutable(); + kMapEstimationHistogram_.set(index, value); + onChanged(); + } else { + kMapEstimationHistogramBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public Builder setKMapEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder builderForValue) { + if (kMapEstimationHistogramBuilder_ == null) { + ensureKMapEstimationHistogramIsMutable(); + kMapEstimationHistogram_.set(index, builderForValue.build()); + onChanged(); + } else { + kMapEstimationHistogramBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public Builder addKMapEstimationHistogram(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket value) { + if (kMapEstimationHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKMapEstimationHistogramIsMutable(); + kMapEstimationHistogram_.add(value); + onChanged(); + } else { + kMapEstimationHistogramBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public Builder addKMapEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket value) { + if (kMapEstimationHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureKMapEstimationHistogramIsMutable(); + kMapEstimationHistogram_.add(index, value); + onChanged(); + } else { + kMapEstimationHistogramBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public Builder addKMapEstimationHistogram( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder builderForValue) { + if (kMapEstimationHistogramBuilder_ == null) { + ensureKMapEstimationHistogramIsMutable(); + kMapEstimationHistogram_.add(builderForValue.build()); + onChanged(); + } else { + kMapEstimationHistogramBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public Builder addKMapEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder builderForValue) { + if (kMapEstimationHistogramBuilder_ == null) { + ensureKMapEstimationHistogramIsMutable(); + kMapEstimationHistogram_.add(index, builderForValue.build()); + onChanged(); + } else { + kMapEstimationHistogramBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public Builder addAllKMapEstimationHistogram( + java.lang.Iterable values) { + if (kMapEstimationHistogramBuilder_ == null) { + ensureKMapEstimationHistogramIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, kMapEstimationHistogram_); + onChanged(); + } else { + kMapEstimationHistogramBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public Builder clearKMapEstimationHistogram() { + if (kMapEstimationHistogramBuilder_ == null) { + kMapEstimationHistogram_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + kMapEstimationHistogramBuilder_.clear(); + } + return this; + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public Builder removeKMapEstimationHistogram(int index) { + if (kMapEstimationHistogramBuilder_ == null) { + ensureKMapEstimationHistogramIsMutable(); + kMapEstimationHistogram_.remove(index); + onChanged(); + } else { + kMapEstimationHistogramBuilder_.remove(index); + } + return this; + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder getKMapEstimationHistogramBuilder( + int index) { + return getKMapEstimationHistogramFieldBuilder().getBuilder(index); + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder getKMapEstimationHistogramOrBuilder( + int index) { + if (kMapEstimationHistogramBuilder_ == null) { + return kMapEstimationHistogram_.get(index); } else { + return kMapEstimationHistogramBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public java.util.List + getKMapEstimationHistogramOrBuilderList() { + if (kMapEstimationHistogramBuilder_ != null) { + return kMapEstimationHistogramBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(kMapEstimationHistogram_); + } + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder addKMapEstimationHistogramBuilder() { + return getKMapEstimationHistogramFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.getDefaultInstance()); + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder addKMapEstimationHistogramBuilder( + int index) { + return getKMapEstimationHistogramFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.getDefaultInstance()); + } + /** + *
+       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
+       * doesn't correspond to any such interval, the associated frequency is
+       * zero. For example, the following records:
+       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
+       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
+       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
+       * mean that there are no record with an estimated anonymity of 4, 5, or
+       * larger than 10.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + */ + public java.util.List + getKMapEstimationHistogramBuilderList() { + return getKMapEstimationHistogramFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder> + getKMapEstimationHistogramFieldBuilder() { + if (kMapEstimationHistogramBuilder_ == null) { + kMapEstimationHistogramBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder>( + kMapEstimationHistogram_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + kMapEstimationHistogram_ = null; + } + return kMapEstimationHistogramBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KMapEstimationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KMapEstimationResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeltaPresenceEstimationResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + java.util.List + getDeltaPresenceEstimationHistogramList(); + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDeltaPresenceEstimationHistogram(int index); + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + int getDeltaPresenceEstimationHistogramCount(); + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + java.util.List + getDeltaPresenceEstimationHistogramOrBuilderList(); + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder getDeltaPresenceEstimationHistogramOrBuilder( + int index); + } + /** + *
+   * Result of the δ-presence computation. Note that these results are an
+   * estimation, not exact values.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} + */ + public static final class DeltaPresenceEstimationResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + DeltaPresenceEstimationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeltaPresenceEstimationResult.newBuilder() to construct. + private DeltaPresenceEstimationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeltaPresenceEstimationResult() { + deltaPresenceEstimationHistogram_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeltaPresenceEstimationResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeltaPresenceEstimationResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deltaPresenceEstimationHistogram_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deltaPresenceEstimationHistogram_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deltaPresenceEstimationHistogram_ = java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder.class); + } + + public interface DeltaPresenceEstimationQuasiIdValuesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesList(); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + int getQuasiIdsValuesCount(); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesOrBuilderList(); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index); + + /** + *
+       * The estimated probability that a given individual sharing these
+       * quasi-identifier values is in the dataset. This value, typically
+       * called δ, is the ratio between the number of records in the dataset
+       * with these quasi-identifier values, and the total number of individuals
+       * (inside *and* outside the dataset) with these quasi-identifier values.
+       * For example, if there are 15 individuals in the dataset who share the
+       * same quasi-identifier values, and an estimated 100 people in the entire
+       * population with these values, then δ is 0.15.
+       * 
+ * + * double estimated_probability = 2; + * @return The estimatedProbability. + */ + double getEstimatedProbability(); + } + /** + *
+     * A tuple of values for the quasi-identifier columns.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} + */ + public static final class DeltaPresenceEstimationQuasiIdValues extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + DeltaPresenceEstimationQuasiIdValuesOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeltaPresenceEstimationQuasiIdValues.newBuilder() to construct. + private DeltaPresenceEstimationQuasiIdValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeltaPresenceEstimationQuasiIdValues() { + quasiIdsValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeltaPresenceEstimationQuasiIdValues(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeltaPresenceEstimationQuasiIdValues( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIdsValues_.add( + input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); + break; + } + case 17: { + + estimatedProbability_ = input.readDouble(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder.class); + } + + public static final int QUASI_IDS_VALUES_FIELD_NUMBER = 1; + private java.util.List quasiIdsValues_; + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public java.util.List getQuasiIdsValuesList() { + return quasiIdsValues_; + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public java.util.List + getQuasiIdsValuesOrBuilderList() { + return quasiIdsValues_; + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public int getQuasiIdsValuesCount() { + return quasiIdsValues_.size(); + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + return quasiIdsValues_.get(index); + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + return quasiIdsValues_.get(index); + } + + public static final int ESTIMATED_PROBABILITY_FIELD_NUMBER = 2; + private double estimatedProbability_; + /** + *
+       * The estimated probability that a given individual sharing these
+       * quasi-identifier values is in the dataset. This value, typically
+       * called δ, is the ratio between the number of records in the dataset
+       * with these quasi-identifier values, and the total number of individuals
+       * (inside *and* outside the dataset) with these quasi-identifier values.
+       * For example, if there are 15 individuals in the dataset who share the
+       * same quasi-identifier values, and an estimated 100 people in the entire
+       * population with these values, then δ is 0.15.
+       * 
+ * + * double estimated_probability = 2; + * @return The estimatedProbability. + */ + @java.lang.Override + public double getEstimatedProbability() { + return estimatedProbability_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIdsValues_.size(); i++) { + output.writeMessage(1, quasiIdsValues_.get(i)); + } + if (java.lang.Double.doubleToRawLongBits(estimatedProbability_) != 0) { + output.writeDouble(2, estimatedProbability_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIdsValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIdsValues_.get(i)); + } + if (java.lang.Double.doubleToRawLongBits(estimatedProbability_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, estimatedProbability_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) obj; + + if (!getQuasiIdsValuesList() + .equals(other.getQuasiIdsValuesList())) return false; + if (java.lang.Double.doubleToLongBits(getEstimatedProbability()) + != java.lang.Double.doubleToLongBits( + other.getEstimatedProbability())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsValuesCount() > 0) { + hash = (37 * hash) + QUASI_IDS_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsValuesList().hashCode(); + } + hash = (37 * hash) + ESTIMATED_PROBABILITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getEstimatedProbability())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * A tuple of values for the quasi-identifier columns.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsValuesBuilder_.clear(); + } + estimatedProbability_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues(this); + int from_bitField0_ = bitField0_; + if (quasiIdsValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIdsValues_ = quasiIdsValues_; + } else { + result.quasiIdsValues_ = quasiIdsValuesBuilder_.build(); + } + result.estimatedProbability_ = estimatedProbability_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance()) return this; + if (quasiIdsValuesBuilder_ == null) { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValues_.isEmpty()) { + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.addAll(other.quasiIdsValues_); + } + onChanged(); + } + } else { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValuesBuilder_.isEmpty()) { + quasiIdsValuesBuilder_.dispose(); + quasiIdsValuesBuilder_ = null; + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsValuesFieldBuilder() : null; + } else { + quasiIdsValuesBuilder_.addAllMessages(other.quasiIdsValues_); + } + } + } + if (other.getEstimatedProbability() != 0D) { + setEstimatedProbability(other.getEstimatedProbability()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIdsValues_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIdsValues_ = new java.util.ArrayList(quasiIdsValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quasiIdsValuesBuilder_; + + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List getQuasiIdsValuesList() { + if (quasiIdsValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } else { + return quasiIdsValuesBuilder_.getMessageList(); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public int getQuasiIdsValuesCount() { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.size(); + } else { + return quasiIdsValuesBuilder_.getCount(); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); + } else { + return quasiIdsValuesBuilder_.getMessage(index); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues(com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addAllQuasiIdsValues( + java.lang.Iterable values) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIdsValues_); + onChanged(); + } else { + quasiIdsValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder clearQuasiIdsValues() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder removeQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.remove(index); + onChanged(); + } else { + quasiIdsValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); } else { + return quasiIdsValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesOrBuilderList() { + if (quasiIdsValuesBuilder_ != null) { + return quasiIdsValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder() { + return getQuasiIdsValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesBuilderList() { + return getQuasiIdsValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getQuasiIdsValuesFieldBuilder() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + quasiIdsValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIdsValues_ = null; + } + return quasiIdsValuesBuilder_; + } + + private double estimatedProbability_ ; + /** + *
+         * The estimated probability that a given individual sharing these
+         * quasi-identifier values is in the dataset. This value, typically
+         * called δ, is the ratio between the number of records in the dataset
+         * with these quasi-identifier values, and the total number of individuals
+         * (inside *and* outside the dataset) with these quasi-identifier values.
+         * For example, if there are 15 individuals in the dataset who share the
+         * same quasi-identifier values, and an estimated 100 people in the entire
+         * population with these values, then δ is 0.15.
+         * 
+ * + * double estimated_probability = 2; + * @return The estimatedProbability. + */ + @java.lang.Override + public double getEstimatedProbability() { + return estimatedProbability_; + } + /** + *
+         * The estimated probability that a given individual sharing these
+         * quasi-identifier values is in the dataset. This value, typically
+         * called δ, is the ratio between the number of records in the dataset
+         * with these quasi-identifier values, and the total number of individuals
+         * (inside *and* outside the dataset) with these quasi-identifier values.
+         * For example, if there are 15 individuals in the dataset who share the
+         * same quasi-identifier values, and an estimated 100 people in the entire
+         * population with these values, then δ is 0.15.
+         * 
+ * + * double estimated_probability = 2; + * @param value The estimatedProbability to set. + * @return This builder for chaining. + */ + public Builder setEstimatedProbability(double value) { + + estimatedProbability_ = value; + onChanged(); + return this; + } + /** + *
+         * The estimated probability that a given individual sharing these
+         * quasi-identifier values is in the dataset. This value, typically
+         * called δ, is the ratio between the number of records in the dataset
+         * with these quasi-identifier values, and the total number of individuals
+         * (inside *and* outside the dataset) with these quasi-identifier values.
+         * For example, if there are 15 individuals in the dataset who share the
+         * same quasi-identifier values, and an estimated 100 people in the entire
+         * population with these values, then δ is 0.15.
+         * 
+ * + * double estimated_probability = 2; + * @return This builder for chaining. + */ + public Builder clearEstimatedProbability() { + + estimatedProbability_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeltaPresenceEstimationQuasiIdValues parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeltaPresenceEstimationQuasiIdValues(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeltaPresenceEstimationHistogramBucketOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Between 0 and 1.
+       * 
+ * + * double min_probability = 1; + * @return The minProbability. + */ + double getMinProbability(); + + /** + *
+       * Always greater than or equal to min_probability.
+       * 
+ * + * double max_probability = 2; + * @return The maxProbability. + */ + double getMaxProbability(); + + /** + *
+       * Number of records within these probability bounds.
+       * 
+ * + * int64 bucket_size = 5; + * @return The bucketSize. + */ + long getBucketSize(); + + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + java.util.List + getBucketValuesList(); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getBucketValues(int index); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + int getBucketValuesCount(); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + java.util.List + getBucketValuesOrBuilderList(); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( + int index); + + /** + *
+       * Total number of distinct quasi-identifier tuple values in this bucket.
+       * 
+ * + * int64 bucket_value_count = 7; + * @return The bucketValueCount. + */ + long getBucketValueCount(); + } + /** + *
+     * A DeltaPresenceEstimationHistogramBucket message with the following
+     * values:
+     *   min_probability: 0.1
+     *   max_probability: 0.2
+     *   frequency: 42
+     * means that there are 42 records for which δ is in [0.1, 0.2). An
+     * important particular case is when min_probability = max_probability = 1:
+     * then, every individual who shares this quasi-identifier combination is in
+     * the dataset.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} + */ + public static final class DeltaPresenceEstimationHistogramBucket extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + DeltaPresenceEstimationHistogramBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeltaPresenceEstimationHistogramBucket.newBuilder() to construct. + private DeltaPresenceEstimationHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeltaPresenceEstimationHistogramBucket() { + bucketValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeltaPresenceEstimationHistogramBucket(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeltaPresenceEstimationHistogramBucket( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + + minProbability_ = input.readDouble(); + break; + } + case 17: { + + maxProbability_ = input.readDouble(); + break; + } + case 40: { + + bucketSize_ = input.readInt64(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + bucketValues_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.parser(), extensionRegistry)); + break; + } + case 56: { + + bucketValueCount_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder.class); + } + + public static final int MIN_PROBABILITY_FIELD_NUMBER = 1; + private double minProbability_; + /** + *
+       * Between 0 and 1.
+       * 
+ * + * double min_probability = 1; + * @return The minProbability. + */ + @java.lang.Override + public double getMinProbability() { + return minProbability_; + } + + public static final int MAX_PROBABILITY_FIELD_NUMBER = 2; + private double maxProbability_; + /** + *
+       * Always greater than or equal to min_probability.
+       * 
+ * + * double max_probability = 2; + * @return The maxProbability. + */ + @java.lang.Override + public double getMaxProbability() { + return maxProbability_; + } + + public static final int BUCKET_SIZE_FIELD_NUMBER = 5; + private long bucketSize_; + /** + *
+       * Number of records within these probability bounds.
+       * 
+ * + * int64 bucket_size = 5; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + + public static final int BUCKET_VALUES_FIELD_NUMBER = 6; + private java.util.List bucketValues_; + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public java.util.List getBucketValuesList() { + return bucketValues_; + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public java.util.List + getBucketValuesOrBuilderList() { + return bucketValues_; + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public int getBucketValuesCount() { + return bucketValues_.size(); + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getBucketValues(int index) { + return bucketValues_.get(index); + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( + int index) { + return bucketValues_.get(index); + } + + public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 7; + private long bucketValueCount_; + /** + *
+       * Total number of distinct quasi-identifier tuple values in this bucket.
+       * 
+ * + * int64 bucket_value_count = 7; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(minProbability_) != 0) { + output.writeDouble(1, minProbability_); + } + if (java.lang.Double.doubleToRawLongBits(maxProbability_) != 0) { + output.writeDouble(2, maxProbability_); + } + if (bucketSize_ != 0L) { + output.writeInt64(5, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + output.writeMessage(6, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + output.writeInt64(7, bucketValueCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(minProbability_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, minProbability_); + } + if (java.lang.Double.doubleToRawLongBits(maxProbability_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, maxProbability_); + } + if (bucketSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, bucketValueCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) obj; + + if (java.lang.Double.doubleToLongBits(getMinProbability()) + != java.lang.Double.doubleToLongBits( + other.getMinProbability())) return false; + if (java.lang.Double.doubleToLongBits(getMaxProbability()) + != java.lang.Double.doubleToLongBits( + other.getMaxProbability())) return false; + if (getBucketSize() + != other.getBucketSize()) return false; + if (!getBucketValuesList() + .equals(other.getBucketValuesList())) return false; + if (getBucketValueCount() + != other.getBucketValueCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MIN_PROBABILITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinProbability())); + hash = (37 * hash) + MAX_PROBABILITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaxProbability())); + hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketSize()); + if (getBucketValuesCount() > 0) { + hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getBucketValuesList().hashCode(); + } + hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketValueCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * A DeltaPresenceEstimationHistogramBucket message with the following
+       * values:
+       *   min_probability: 0.1
+       *   max_probability: 0.2
+       *   frequency: 42
+       * means that there are 42 records for which δ is in [0.1, 0.2). An
+       * important particular case is when min_probability = max_probability = 1:
+       * then, every individual who shares this quasi-identifier combination is in
+       * the dataset.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBucketValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + minProbability_ = 0D; + + maxProbability_ = 0D; + + bucketSize_ = 0L; + + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bucketValuesBuilder_.clear(); + } + bucketValueCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket(this); + int from_bitField0_ = bitField0_; + result.minProbability_ = minProbability_; + result.maxProbability_ = maxProbability_; + result.bucketSize_ = bucketSize_; + if (bucketValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bucketValues_ = bucketValues_; + } else { + result.bucketValues_ = bucketValuesBuilder_.build(); + } + result.bucketValueCount_ = bucketValueCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance()) return this; + if (other.getMinProbability() != 0D) { + setMinProbability(other.getMinProbability()); + } + if (other.getMaxProbability() != 0D) { + setMaxProbability(other.getMaxProbability()); + } + if (other.getBucketSize() != 0L) { + setBucketSize(other.getBucketSize()); + } + if (bucketValuesBuilder_ == null) { + if (!other.bucketValues_.isEmpty()) { + if (bucketValues_.isEmpty()) { + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketValuesIsMutable(); + bucketValues_.addAll(other.bucketValues_); + } + onChanged(); + } + } else { + if (!other.bucketValues_.isEmpty()) { + if (bucketValuesBuilder_.isEmpty()) { + bucketValuesBuilder_.dispose(); + bucketValuesBuilder_ = null; + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBucketValuesFieldBuilder() : null; + } else { + bucketValuesBuilder_.addAllMessages(other.bucketValues_); + } + } + } + if (other.getBucketValueCount() != 0L) { + setBucketValueCount(other.getBucketValueCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private double minProbability_ ; + /** + *
+         * Between 0 and 1.
+         * 
+ * + * double min_probability = 1; + * @return The minProbability. + */ + @java.lang.Override + public double getMinProbability() { + return minProbability_; + } + /** + *
+         * Between 0 and 1.
+         * 
+ * + * double min_probability = 1; + * @param value The minProbability to set. + * @return This builder for chaining. + */ + public Builder setMinProbability(double value) { + + minProbability_ = value; + onChanged(); + return this; + } + /** + *
+         * Between 0 and 1.
+         * 
+ * + * double min_probability = 1; + * @return This builder for chaining. + */ + public Builder clearMinProbability() { + + minProbability_ = 0D; + onChanged(); + return this; + } + + private double maxProbability_ ; + /** + *
+         * Always greater than or equal to min_probability.
+         * 
+ * + * double max_probability = 2; + * @return The maxProbability. + */ + @java.lang.Override + public double getMaxProbability() { + return maxProbability_; + } + /** + *
+         * Always greater than or equal to min_probability.
+         * 
+ * + * double max_probability = 2; + * @param value The maxProbability to set. + * @return This builder for chaining. + */ + public Builder setMaxProbability(double value) { + + maxProbability_ = value; + onChanged(); + return this; + } + /** + *
+         * Always greater than or equal to min_probability.
+         * 
+ * + * double max_probability = 2; + * @return This builder for chaining. + */ + public Builder clearMaxProbability() { + + maxProbability_ = 0D; + onChanged(); + return this; + } + + private long bucketSize_ ; + /** + *
+         * Number of records within these probability bounds.
+         * 
+ * + * int64 bucket_size = 5; + * @return The bucketSize. + */ + @java.lang.Override + public long getBucketSize() { + return bucketSize_; + } + /** + *
+         * Number of records within these probability bounds.
+         * 
+ * + * int64 bucket_size = 5; + * @param value The bucketSize to set. + * @return This builder for chaining. + */ + public Builder setBucketSize(long value) { + + bucketSize_ = value; + onChanged(); + return this; + } + /** + *
+         * Number of records within these probability bounds.
+         * 
+ * + * int64 bucket_size = 5; + * @return This builder for chaining. + */ + public Builder clearBucketSize() { + + bucketSize_ = 0L; + onChanged(); + return this; + } + + private java.util.List bucketValues_ = + java.util.Collections.emptyList(); + private void ensureBucketValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bucketValues_ = new java.util.ArrayList(bucketValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder> bucketValuesBuilder_; + + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List getBucketValuesList() { + if (bucketValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bucketValues_); + } else { + return bucketValuesBuilder_.getMessageList(); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public int getBucketValuesCount() { + if (bucketValuesBuilder_ == null) { + return bucketValues_.size(); + } else { + return bucketValuesBuilder_.getCount(); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); + } else { + return bucketValuesBuilder_.getMessage(index); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.set(index, value); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(index, value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addAllBucketValues( + java.lang.Iterable values) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucketValues_); + onChanged(); + } else { + bucketValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder clearBucketValues() { + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder removeBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.remove(index); + onChanged(); + } else { + bucketValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder getBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( + int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); } else { + return bucketValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List + getBucketValuesOrBuilderList() { + if (bucketValuesBuilder_ != null) { + return bucketValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bucketValues_); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder addBucketValuesBuilder() { + return getBucketValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance()); + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder addBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance()); + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List + getBucketValuesBuilderList() { + return getBucketValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder> + getBucketValuesFieldBuilder() { + if (bucketValuesBuilder_ == null) { + bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder>( + bucketValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bucketValues_ = null; + } + return bucketValuesBuilder_; + } + + private long bucketValueCount_ ; + /** + *
+         * Total number of distinct quasi-identifier tuple values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 7; + * @return The bucketValueCount. + */ + @java.lang.Override + public long getBucketValueCount() { + return bucketValueCount_; + } + /** + *
+         * Total number of distinct quasi-identifier tuple values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 7; + * @param value The bucketValueCount to set. + * @return This builder for chaining. + */ + public Builder setBucketValueCount(long value) { + + bucketValueCount_ = value; + onChanged(); + return this; + } + /** + *
+         * Total number of distinct quasi-identifier tuple values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 7; + * @return This builder for chaining. + */ + public Builder clearBucketValueCount() { + + bucketValueCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeltaPresenceEstimationHistogramBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeltaPresenceEstimationHistogramBucket(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int DELTA_PRESENCE_ESTIMATION_HISTOGRAM_FIELD_NUMBER = 1; + private java.util.List deltaPresenceEstimationHistogram_; + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + @java.lang.Override + public java.util.List getDeltaPresenceEstimationHistogramList() { + return deltaPresenceEstimationHistogram_; + } + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + @java.lang.Override + public java.util.List + getDeltaPresenceEstimationHistogramOrBuilderList() { + return deltaPresenceEstimationHistogram_; + } + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + @java.lang.Override + public int getDeltaPresenceEstimationHistogramCount() { + return deltaPresenceEstimationHistogram_.size(); + } + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDeltaPresenceEstimationHistogram(int index) { + return deltaPresenceEstimationHistogram_.get(index); + } + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder getDeltaPresenceEstimationHistogramOrBuilder( + int index) { + return deltaPresenceEstimationHistogram_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < deltaPresenceEstimationHistogram_.size(); i++) { + output.writeMessage(1, deltaPresenceEstimationHistogram_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < deltaPresenceEstimationHistogram_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, deltaPresenceEstimationHistogram_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) obj; + + if (!getDeltaPresenceEstimationHistogramList() + .equals(other.getDeltaPresenceEstimationHistogramList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeltaPresenceEstimationHistogramCount() > 0) { + hash = (37 * hash) + DELTA_PRESENCE_ESTIMATION_HISTOGRAM_FIELD_NUMBER; + hash = (53 * hash) + getDeltaPresenceEstimationHistogramList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Result of the δ-presence computation. Note that these results are an
+     * estimation, not exact values.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDeltaPresenceEstimationHistogramFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (deltaPresenceEstimationHistogramBuilder_ == null) { + deltaPresenceEstimationHistogram_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deltaPresenceEstimationHistogramBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult(this); + int from_bitField0_ = bitField0_; + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deltaPresenceEstimationHistogram_ = java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deltaPresenceEstimationHistogram_ = deltaPresenceEstimationHistogram_; + } else { + result.deltaPresenceEstimationHistogram_ = deltaPresenceEstimationHistogramBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance()) return this; + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (!other.deltaPresenceEstimationHistogram_.isEmpty()) { + if (deltaPresenceEstimationHistogram_.isEmpty()) { + deltaPresenceEstimationHistogram_ = other.deltaPresenceEstimationHistogram_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.addAll(other.deltaPresenceEstimationHistogram_); + } + onChanged(); + } + } else { + if (!other.deltaPresenceEstimationHistogram_.isEmpty()) { + if (deltaPresenceEstimationHistogramBuilder_.isEmpty()) { + deltaPresenceEstimationHistogramBuilder_.dispose(); + deltaPresenceEstimationHistogramBuilder_ = null; + deltaPresenceEstimationHistogram_ = other.deltaPresenceEstimationHistogram_; + bitField0_ = (bitField0_ & ~0x00000001); + deltaPresenceEstimationHistogramBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDeltaPresenceEstimationHistogramFieldBuilder() : null; + } else { + deltaPresenceEstimationHistogramBuilder_.addAllMessages(other.deltaPresenceEstimationHistogram_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List deltaPresenceEstimationHistogram_ = + java.util.Collections.emptyList(); + private void ensureDeltaPresenceEstimationHistogramIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deltaPresenceEstimationHistogram_ = new java.util.ArrayList(deltaPresenceEstimationHistogram_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder> deltaPresenceEstimationHistogramBuilder_; + + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public java.util.List getDeltaPresenceEstimationHistogramList() { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + return java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); + } else { + return deltaPresenceEstimationHistogramBuilder_.getMessageList(); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public int getDeltaPresenceEstimationHistogramCount() { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + return deltaPresenceEstimationHistogram_.size(); + } else { + return deltaPresenceEstimationHistogramBuilder_.getCount(); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDeltaPresenceEstimationHistogram(int index) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + return deltaPresenceEstimationHistogram_.get(index); + } else { + return deltaPresenceEstimationHistogramBuilder_.getMessage(index); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder setDeltaPresenceEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket value) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.set(index, value); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder setDeltaPresenceEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder builderForValue) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.set(index, builderForValue.build()); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addDeltaPresenceEstimationHistogram(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket value) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.add(value); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addDeltaPresenceEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket value) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.add(index, value); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addDeltaPresenceEstimationHistogram( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder builderForValue) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.add(builderForValue.build()); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addDeltaPresenceEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder builderForValue) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.add(index, builderForValue.build()); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addAllDeltaPresenceEstimationHistogram( + java.lang.Iterable values) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, deltaPresenceEstimationHistogram_); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder clearDeltaPresenceEstimationHistogram() { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + deltaPresenceEstimationHistogram_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.clear(); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder removeDeltaPresenceEstimationHistogram(int index) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.remove(index); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.remove(index); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder getDeltaPresenceEstimationHistogramBuilder( + int index) { + return getDeltaPresenceEstimationHistogramFieldBuilder().getBuilder(index); + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder getDeltaPresenceEstimationHistogramOrBuilder( + int index) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + return deltaPresenceEstimationHistogram_.get(index); } else { + return deltaPresenceEstimationHistogramBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public java.util.List + getDeltaPresenceEstimationHistogramOrBuilderList() { + if (deltaPresenceEstimationHistogramBuilder_ != null) { + return deltaPresenceEstimationHistogramBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder addDeltaPresenceEstimationHistogramBuilder() { + return getDeltaPresenceEstimationHistogramFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance()); + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder addDeltaPresenceEstimationHistogramBuilder( + int index) { + return getDeltaPresenceEstimationHistogramFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance()); + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public java.util.List + getDeltaPresenceEstimationHistogramBuilderList() { + return getDeltaPresenceEstimationHistogramFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder> + getDeltaPresenceEstimationHistogramFieldBuilder() { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + deltaPresenceEstimationHistogramBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder>( + deltaPresenceEstimationHistogram_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + deltaPresenceEstimationHistogram_ = null; + } + return deltaPresenceEstimationHistogramBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeltaPresenceEstimationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeltaPresenceEstimationResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RequestedRiskAnalysisOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The job config for the risk job.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + * @return Whether the jobConfig field is set. + */ + boolean hasJobConfig(); + /** + *
+     * The job config for the risk job.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + * @return The jobConfig. + */ + com.google.privacy.dlp.v2.RiskAnalysisJobConfig getJobConfig(); + /** + *
+     * The job config for the risk job.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + */ + com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getJobConfigOrBuilder(); + } + /** + *
+   * Risk analysis options.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions} + */ + public static final class RequestedRiskAnalysisOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) + RequestedRiskAnalysisOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestedRiskAnalysisOptions.newBuilder() to construct. + private RequestedRiskAnalysisOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RequestedRiskAnalysisOptions() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RequestedRiskAnalysisOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RequestedRiskAnalysisOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder subBuilder = null; + if (jobConfig_ != null) { + subBuilder = jobConfig_.toBuilder(); + } + jobConfig_ = input.readMessage(com.google.privacy.dlp.v2.RiskAnalysisJobConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobConfig_); + jobConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder.class); + } + + public static final int JOB_CONFIG_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.RiskAnalysisJobConfig jobConfig_; + /** + *
+     * The job config for the risk job.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + * @return Whether the jobConfig field is set. + */ + @java.lang.Override + public boolean hasJobConfig() { + return jobConfig_ != null; + } + /** + *
+     * The job config for the risk job.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + * @return The jobConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getJobConfig() { + return jobConfig_ == null ? com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance() : jobConfig_; + } + /** + *
+     * The job config for the risk job.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getJobConfigOrBuilder() { + return getJobConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (jobConfig_ != null) { + output.writeMessage(1, getJobConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (jobConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getJobConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) obj; + + if (hasJobConfig() != other.hasJobConfig()) return false; + if (hasJobConfig()) { + if (!getJobConfig() + .equals(other.getJobConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasJobConfig()) { + hash = (37 * hash) + JOB_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getJobConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Risk analysis options.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobConfigBuilder_ == null) { + jobConfig_ = null; + } else { + jobConfig_ = null; + jobConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions(this); + if (jobConfigBuilder_ == null) { + result.jobConfig_ = jobConfig_; + } else { + result.jobConfig_ = jobConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance()) return this; + if (other.hasJobConfig()) { + mergeJobConfig(other.getJobConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.RiskAnalysisJobConfig jobConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> jobConfigBuilder_; + /** + *
+       * The job config for the risk job.
+       * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + * @return Whether the jobConfig field is set. + */ + public boolean hasJobConfig() { + return jobConfigBuilder_ != null || jobConfig_ != null; + } + /** + *
+       * The job config for the risk job.
+       * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + * @return The jobConfig. + */ + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getJobConfig() { + if (jobConfigBuilder_ == null) { + return jobConfig_ == null ? com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance() : jobConfig_; + } else { + return jobConfigBuilder_.getMessage(); + } + } + /** + *
+       * The job config for the risk job.
+       * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + */ + public Builder setJobConfig(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) { + if (jobConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobConfig_ = value; + onChanged(); + } else { + jobConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The job config for the risk job.
+       * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + */ + public Builder setJobConfig( + com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder builderForValue) { + if (jobConfigBuilder_ == null) { + jobConfig_ = builderForValue.build(); + onChanged(); + } else { + jobConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The job config for the risk job.
+       * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + */ + public Builder mergeJobConfig(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) { + if (jobConfigBuilder_ == null) { + if (jobConfig_ != null) { + jobConfig_ = + com.google.privacy.dlp.v2.RiskAnalysisJobConfig.newBuilder(jobConfig_).mergeFrom(value).buildPartial(); + } else { + jobConfig_ = value; + } + onChanged(); + } else { + jobConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The job config for the risk job.
+       * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + */ + public Builder clearJobConfig() { + if (jobConfigBuilder_ == null) { + jobConfig_ = null; + onChanged(); + } else { + jobConfig_ = null; + jobConfigBuilder_ = null; + } + + return this; + } + /** + *
+       * The job config for the risk job.
+       * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + */ + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder getJobConfigBuilder() { + + onChanged(); + return getJobConfigFieldBuilder().getBuilder(); + } + /** + *
+       * The job config for the risk job.
+       * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + */ + public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getJobConfigOrBuilder() { + if (jobConfigBuilder_ != null) { + return jobConfigBuilder_.getMessageOrBuilder(); + } else { + return jobConfig_ == null ? + com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance() : jobConfig_; + } + } + /** + *
+       * The job config for the risk job.
+       * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> + getJobConfigFieldBuilder() { + if (jobConfigBuilder_ == null) { + jobConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder>( + getJobConfig(), + getParentForChildren(), + isClean()); + jobConfig_ = null; + } + return jobConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestedRiskAnalysisOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RequestedRiskAnalysisOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int resultCase_ = 0; + private java.lang.Object result_; + public enum ResultCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + NUMERICAL_STATS_RESULT(3), + CATEGORICAL_STATS_RESULT(4), + K_ANONYMITY_RESULT(5), + L_DIVERSITY_RESULT(6), + K_MAP_ESTIMATION_RESULT(7), + DELTA_PRESENCE_ESTIMATION_RESULT(9), + RESULT_NOT_SET(0); + private final int value; + private ResultCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 3: return NUMERICAL_STATS_RESULT; + case 4: return CATEGORICAL_STATS_RESULT; + case 5: return K_ANONYMITY_RESULT; + case 6: return L_DIVERSITY_RESULT; + case 7: return K_MAP_ESTIMATION_RESULT; + case 9: return DELTA_PRESENCE_ESTIMATION_RESULT; + case 0: return RESULT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResultCase + getResultCase() { + return ResultCase.forNumber( + resultCase_); + } + + public static final int REQUESTED_PRIVACY_METRIC_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.PrivacyMetric requestedPrivacyMetric_; + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + * @return Whether the requestedPrivacyMetric field is set. + */ + @java.lang.Override + public boolean hasRequestedPrivacyMetric() { + return requestedPrivacyMetric_ != null; + } + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + * @return The requestedPrivacyMetric. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric getRequestedPrivacyMetric() { + return requestedPrivacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : requestedPrivacyMetric_; + } + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getRequestedPrivacyMetricOrBuilder() { + return getRequestedPrivacyMetric(); + } + + public static final int REQUESTED_SOURCE_TABLE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.BigQueryTable requestedSourceTable_; + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + * @return Whether the requestedSourceTable field is set. + */ + @java.lang.Override + public boolean hasRequestedSourceTable() { + return requestedSourceTable_ != null; + } + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + * @return The requestedSourceTable. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getRequestedSourceTable() { + return requestedSourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : requestedSourceTable_; + } + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getRequestedSourceTableOrBuilder() { + return getRequestedSourceTable(); + } + + public static final int NUMERICAL_STATS_RESULT_FIELD_NUMBER = 3; + /** + *
+   * Numerical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + * @return Whether the numericalStatsResult field is set. + */ + @java.lang.Override + public boolean hasNumericalStatsResult() { + return resultCase_ == 3; + } + /** + *
+   * Numerical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + * @return The numericalStatsResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getNumericalStatsResult() { + if (resultCase_ == 3) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); + } + /** + *
+   * Numerical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder getNumericalStatsResultOrBuilder() { + if (resultCase_ == 3) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); + } + + public static final int CATEGORICAL_STATS_RESULT_FIELD_NUMBER = 4; + /** + *
+   * Categorical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + * @return Whether the categoricalStatsResult field is set. + */ + @java.lang.Override + public boolean hasCategoricalStatsResult() { + return resultCase_ == 4; + } + /** + *
+   * Categorical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + * @return The categoricalStatsResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getCategoricalStatsResult() { + if (resultCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); + } + /** + *
+   * Categorical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder getCategoricalStatsResultOrBuilder() { + if (resultCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); + } + + public static final int K_ANONYMITY_RESULT_FIELD_NUMBER = 5; + /** + *
+   * K-anonymity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + * @return Whether the kAnonymityResult field is set. + */ + @java.lang.Override + public boolean hasKAnonymityResult() { + return resultCase_ == 5; + } + /** + *
+   * K-anonymity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + * @return The kAnonymityResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getKAnonymityResult() { + if (resultCase_ == 5) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); + } + /** + *
+   * K-anonymity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder getKAnonymityResultOrBuilder() { + if (resultCase_ == 5) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); + } + + public static final int L_DIVERSITY_RESULT_FIELD_NUMBER = 6; + /** + *
+   * L-divesity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + * @return Whether the lDiversityResult field is set. + */ + @java.lang.Override + public boolean hasLDiversityResult() { + return resultCase_ == 6; + } + /** + *
+   * L-divesity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + * @return The lDiversityResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getLDiversityResult() { + if (resultCase_ == 6) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); + } + /** + *
+   * L-divesity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder getLDiversityResultOrBuilder() { + if (resultCase_ == 6) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); + } + + public static final int K_MAP_ESTIMATION_RESULT_FIELD_NUMBER = 7; + /** + *
+   * K-map result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + * @return Whether the kMapEstimationResult field is set. + */ + @java.lang.Override + public boolean hasKMapEstimationResult() { + return resultCase_ == 7; + } + /** + *
+   * K-map result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + * @return The kMapEstimationResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getKMapEstimationResult() { + if (resultCase_ == 7) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); + } + /** + *
+   * K-map result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder getKMapEstimationResultOrBuilder() { + if (resultCase_ == 7) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); + } + + public static final int DELTA_PRESENCE_ESTIMATION_RESULT_FIELD_NUMBER = 9; + /** + *
+   * Delta-presence result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + * @return Whether the deltaPresenceEstimationResult field is set. + */ + @java.lang.Override + public boolean hasDeltaPresenceEstimationResult() { + return resultCase_ == 9; + } + /** + *
+   * Delta-presence result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + * @return The deltaPresenceEstimationResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDeltaPresenceEstimationResult() { + if (resultCase_ == 9) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + /** + *
+   * Delta-presence result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder getDeltaPresenceEstimationResultOrBuilder() { + if (resultCase_ == 9) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + + public static final int REQUESTED_OPTIONS_FIELD_NUMBER = 10; + private com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requestedOptions_; + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + * @return Whether the requestedOptions field is set. + */ + @java.lang.Override + public boolean hasRequestedOptions() { + return requestedOptions_ != null; + } + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + * @return The requestedOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getRequestedOptions() { + return requestedOptions_ == null ? com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance() : requestedOptions_; + } + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder getRequestedOptionsOrBuilder() { + return getRequestedOptions(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (requestedPrivacyMetric_ != null) { + output.writeMessage(1, getRequestedPrivacyMetric()); + } + if (requestedSourceTable_ != null) { + output.writeMessage(2, getRequestedSourceTable()); + } + if (resultCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_); + } + if (resultCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_); + } + if (resultCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_); + } + if (resultCase_ == 6) { + output.writeMessage(6, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_); + } + if (resultCase_ == 7) { + output.writeMessage(7, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_); + } + if (resultCase_ == 9) { + output.writeMessage(9, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_); + } + if (requestedOptions_ != null) { + output.writeMessage(10, getRequestedOptions()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (requestedPrivacyMetric_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRequestedPrivacyMetric()); + } + if (requestedSourceTable_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRequestedSourceTable()); + } + if (resultCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_); + } + if (resultCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_); + } + if (resultCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_); + } + if (resultCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_); + } + if (resultCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_); + } + if (resultCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_); + } + if (requestedOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getRequestedOptions()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) obj; + + if (hasRequestedPrivacyMetric() != other.hasRequestedPrivacyMetric()) return false; + if (hasRequestedPrivacyMetric()) { + if (!getRequestedPrivacyMetric() + .equals(other.getRequestedPrivacyMetric())) return false; + } + if (hasRequestedSourceTable() != other.hasRequestedSourceTable()) return false; + if (hasRequestedSourceTable()) { + if (!getRequestedSourceTable() + .equals(other.getRequestedSourceTable())) return false; + } + if (hasRequestedOptions() != other.hasRequestedOptions()) return false; + if (hasRequestedOptions()) { + if (!getRequestedOptions() + .equals(other.getRequestedOptions())) return false; + } + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 3: + if (!getNumericalStatsResult() + .equals(other.getNumericalStatsResult())) return false; + break; + case 4: + if (!getCategoricalStatsResult() + .equals(other.getCategoricalStatsResult())) return false; + break; + case 5: + if (!getKAnonymityResult() + .equals(other.getKAnonymityResult())) return false; + break; + case 6: + if (!getLDiversityResult() + .equals(other.getLDiversityResult())) return false; + break; + case 7: + if (!getKMapEstimationResult() + .equals(other.getKMapEstimationResult())) return false; + break; + case 9: + if (!getDeltaPresenceEstimationResult() + .equals(other.getDeltaPresenceEstimationResult())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRequestedPrivacyMetric()) { + hash = (37 * hash) + REQUESTED_PRIVACY_METRIC_FIELD_NUMBER; + hash = (53 * hash) + getRequestedPrivacyMetric().hashCode(); + } + if (hasRequestedSourceTable()) { + hash = (37 * hash) + REQUESTED_SOURCE_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getRequestedSourceTable().hashCode(); + } + if (hasRequestedOptions()) { + hash = (37 * hash) + REQUESTED_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRequestedOptions().hashCode(); + } + switch (resultCase_) { + case 3: + hash = (37 * hash) + NUMERICAL_STATS_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getNumericalStatsResult().hashCode(); + break; + case 4: + hash = (37 * hash) + CATEGORICAL_STATS_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getCategoricalStatsResult().hashCode(); + break; + case 5: + hash = (37 * hash) + K_ANONYMITY_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getKAnonymityResult().hashCode(); + break; + case 6: + hash = (37 * hash) + L_DIVERSITY_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getLDiversityResult().hashCode(); + break; + case 7: + hash = (37 * hash) + K_MAP_ESTIMATION_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getKMapEstimationResult().hashCode(); + break; + case 9: + hash = (37 * hash) + DELTA_PRESENCE_ESTIMATION_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getDeltaPresenceEstimationResult().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Result of a risk analysis operation request.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestedPrivacyMetricBuilder_ == null) { + requestedPrivacyMetric_ = null; + } else { + requestedPrivacyMetric_ = null; + requestedPrivacyMetricBuilder_ = null; + } + if (requestedSourceTableBuilder_ == null) { + requestedSourceTable_ = null; + } else { + requestedSourceTable_ = null; + requestedSourceTableBuilder_ = null; + } + if (requestedOptionsBuilder_ == null) { + requestedOptions_ = null; + } else { + requestedOptions_ = null; + requestedOptionsBuilder_ = null; + } + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails(this); + if (requestedPrivacyMetricBuilder_ == null) { + result.requestedPrivacyMetric_ = requestedPrivacyMetric_; + } else { + result.requestedPrivacyMetric_ = requestedPrivacyMetricBuilder_.build(); + } + if (requestedSourceTableBuilder_ == null) { + result.requestedSourceTable_ = requestedSourceTable_; + } else { + result.requestedSourceTable_ = requestedSourceTableBuilder_.build(); + } + if (resultCase_ == 3) { + if (numericalStatsResultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = numericalStatsResultBuilder_.build(); + } + } + if (resultCase_ == 4) { + if (categoricalStatsResultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = categoricalStatsResultBuilder_.build(); + } + } + if (resultCase_ == 5) { + if (kAnonymityResultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = kAnonymityResultBuilder_.build(); + } + } + if (resultCase_ == 6) { + if (lDiversityResultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = lDiversityResultBuilder_.build(); + } + } + if (resultCase_ == 7) { + if (kMapEstimationResultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = kMapEstimationResultBuilder_.build(); + } + } + if (resultCase_ == 9) { + if (deltaPresenceEstimationResultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = deltaPresenceEstimationResultBuilder_.build(); + } + } + if (requestedOptionsBuilder_ == null) { + result.requestedOptions_ = requestedOptions_; + } else { + result.requestedOptions_ = requestedOptionsBuilder_.build(); + } + result.resultCase_ = resultCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance()) return this; + if (other.hasRequestedPrivacyMetric()) { + mergeRequestedPrivacyMetric(other.getRequestedPrivacyMetric()); + } + if (other.hasRequestedSourceTable()) { + mergeRequestedSourceTable(other.getRequestedSourceTable()); + } + if (other.hasRequestedOptions()) { + mergeRequestedOptions(other.getRequestedOptions()); + } + switch (other.getResultCase()) { + case NUMERICAL_STATS_RESULT: { + mergeNumericalStatsResult(other.getNumericalStatsResult()); + break; + } + case CATEGORICAL_STATS_RESULT: { + mergeCategoricalStatsResult(other.getCategoricalStatsResult()); + break; + } + case K_ANONYMITY_RESULT: { + mergeKAnonymityResult(other.getKAnonymityResult()); + break; + } + case L_DIVERSITY_RESULT: { + mergeLDiversityResult(other.getLDiversityResult()); + break; + } + case K_MAP_ESTIMATION_RESULT: { + mergeKMapEstimationResult(other.getKMapEstimationResult()); + break; + } + case DELTA_PRESENCE_ESTIMATION_RESULT: { + mergeDeltaPresenceEstimationResult(other.getDeltaPresenceEstimationResult()); + break; + } + case RESULT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int resultCase_ = 0; + private java.lang.Object result_; + public ResultCase + getResultCase() { + return ResultCase.forNumber( + resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + + private com.google.privacy.dlp.v2.PrivacyMetric requestedPrivacyMetric_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder> requestedPrivacyMetricBuilder_; + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + * @return Whether the requestedPrivacyMetric field is set. + */ + public boolean hasRequestedPrivacyMetric() { + return requestedPrivacyMetricBuilder_ != null || requestedPrivacyMetric_ != null; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + * @return The requestedPrivacyMetric. + */ + public com.google.privacy.dlp.v2.PrivacyMetric getRequestedPrivacyMetric() { + if (requestedPrivacyMetricBuilder_ == null) { + return requestedPrivacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : requestedPrivacyMetric_; + } else { + return requestedPrivacyMetricBuilder_.getMessage(); + } + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + public Builder setRequestedPrivacyMetric(com.google.privacy.dlp.v2.PrivacyMetric value) { + if (requestedPrivacyMetricBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestedPrivacyMetric_ = value; + onChanged(); + } else { + requestedPrivacyMetricBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + public Builder setRequestedPrivacyMetric( + com.google.privacy.dlp.v2.PrivacyMetric.Builder builderForValue) { + if (requestedPrivacyMetricBuilder_ == null) { + requestedPrivacyMetric_ = builderForValue.build(); + onChanged(); + } else { + requestedPrivacyMetricBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + public Builder mergeRequestedPrivacyMetric(com.google.privacy.dlp.v2.PrivacyMetric value) { + if (requestedPrivacyMetricBuilder_ == null) { + if (requestedPrivacyMetric_ != null) { + requestedPrivacyMetric_ = + com.google.privacy.dlp.v2.PrivacyMetric.newBuilder(requestedPrivacyMetric_).mergeFrom(value).buildPartial(); + } else { + requestedPrivacyMetric_ = value; + } + onChanged(); + } else { + requestedPrivacyMetricBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + public Builder clearRequestedPrivacyMetric() { + if (requestedPrivacyMetricBuilder_ == null) { + requestedPrivacyMetric_ = null; + onChanged(); + } else { + requestedPrivacyMetric_ = null; + requestedPrivacyMetricBuilder_ = null; + } + + return this; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.Builder getRequestedPrivacyMetricBuilder() { + + onChanged(); + return getRequestedPrivacyMetricFieldBuilder().getBuilder(); + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getRequestedPrivacyMetricOrBuilder() { + if (requestedPrivacyMetricBuilder_ != null) { + return requestedPrivacyMetricBuilder_.getMessageOrBuilder(); + } else { + return requestedPrivacyMetric_ == null ? + com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : requestedPrivacyMetric_; + } + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder> + getRequestedPrivacyMetricFieldBuilder() { + if (requestedPrivacyMetricBuilder_ == null) { + requestedPrivacyMetricBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder>( + getRequestedPrivacyMetric(), + getParentForChildren(), + isClean()); + requestedPrivacyMetric_ = null; + } + return requestedPrivacyMetricBuilder_; + } + + private com.google.privacy.dlp.v2.BigQueryTable requestedSourceTable_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> requestedSourceTableBuilder_; + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + * @return Whether the requestedSourceTable field is set. + */ + public boolean hasRequestedSourceTable() { + return requestedSourceTableBuilder_ != null || requestedSourceTable_ != null; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + * @return The requestedSourceTable. + */ + public com.google.privacy.dlp.v2.BigQueryTable getRequestedSourceTable() { + if (requestedSourceTableBuilder_ == null) { + return requestedSourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : requestedSourceTable_; + } else { + return requestedSourceTableBuilder_.getMessage(); + } + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + public Builder setRequestedSourceTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (requestedSourceTableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestedSourceTable_ = value; + onChanged(); + } else { + requestedSourceTableBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + public Builder setRequestedSourceTable( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (requestedSourceTableBuilder_ == null) { + requestedSourceTable_ = builderForValue.build(); + onChanged(); + } else { + requestedSourceTableBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + public Builder mergeRequestedSourceTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (requestedSourceTableBuilder_ == null) { + if (requestedSourceTable_ != null) { + requestedSourceTable_ = + com.google.privacy.dlp.v2.BigQueryTable.newBuilder(requestedSourceTable_).mergeFrom(value).buildPartial(); + } else { + requestedSourceTable_ = value; + } + onChanged(); + } else { + requestedSourceTableBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + public Builder clearRequestedSourceTable() { + if (requestedSourceTableBuilder_ == null) { + requestedSourceTable_ = null; + onChanged(); + } else { + requestedSourceTable_ = null; + requestedSourceTableBuilder_ = null; + } + + return this; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getRequestedSourceTableBuilder() { + + onChanged(); + return getRequestedSourceTableFieldBuilder().getBuilder(); + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getRequestedSourceTableOrBuilder() { + if (requestedSourceTableBuilder_ != null) { + return requestedSourceTableBuilder_.getMessageOrBuilder(); + } else { + return requestedSourceTable_ == null ? + com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : requestedSourceTable_; + } + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getRequestedSourceTableFieldBuilder() { + if (requestedSourceTableBuilder_ == null) { + requestedSourceTableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + getRequestedSourceTable(), + getParentForChildren(), + isClean()); + requestedSourceTable_ = null; + } + return requestedSourceTableBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder> numericalStatsResultBuilder_; + /** + *
+     * Numerical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + * @return Whether the numericalStatsResult field is set. + */ + @java.lang.Override + public boolean hasNumericalStatsResult() { + return resultCase_ == 3; + } + /** + *
+     * Numerical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + * @return The numericalStatsResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getNumericalStatsResult() { + if (numericalStatsResultBuilder_ == null) { + if (resultCase_ == 3) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); + } else { + if (resultCase_ == 3) { + return numericalStatsResultBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); + } + } + /** + *
+     * Numerical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + public Builder setNumericalStatsResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult value) { + if (numericalStatsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + numericalStatsResultBuilder_.setMessage(value); + } + resultCase_ = 3; + return this; + } + /** + *
+     * Numerical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + public Builder setNumericalStatsResult( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder builderForValue) { + if (numericalStatsResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + numericalStatsResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 3; + return this; + } + /** + *
+     * Numerical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + public Builder mergeNumericalStatsResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult value) { + if (numericalStatsResultBuilder_ == null) { + if (resultCase_ == 3 && + result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance()) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 3) { + numericalStatsResultBuilder_.mergeFrom(value); + } else { + numericalStatsResultBuilder_.setMessage(value); + } + } + resultCase_ = 3; + return this; + } + /** + *
+     * Numerical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + public Builder clearNumericalStatsResult() { + if (numericalStatsResultBuilder_ == null) { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + } + numericalStatsResultBuilder_.clear(); + } + return this; + } + /** + *
+     * Numerical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder getNumericalStatsResultBuilder() { + return getNumericalStatsResultFieldBuilder().getBuilder(); + } + /** + *
+     * Numerical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder getNumericalStatsResultOrBuilder() { + if ((resultCase_ == 3) && (numericalStatsResultBuilder_ != null)) { + return numericalStatsResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 3) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); + } + } + /** + *
+     * Numerical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder> + getNumericalStatsResultFieldBuilder() { + if (numericalStatsResultBuilder_ == null) { + if (!(resultCase_ == 3)) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); + } + numericalStatsResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder>( + (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 3; + onChanged();; + return numericalStatsResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder> categoricalStatsResultBuilder_; + /** + *
+     * Categorical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + * @return Whether the categoricalStatsResult field is set. + */ + @java.lang.Override + public boolean hasCategoricalStatsResult() { + return resultCase_ == 4; + } + /** + *
+     * Categorical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + * @return The categoricalStatsResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getCategoricalStatsResult() { + if (categoricalStatsResultBuilder_ == null) { + if (resultCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); + } else { + if (resultCase_ == 4) { + return categoricalStatsResultBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); + } + } + /** + *
+     * Categorical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + public Builder setCategoricalStatsResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult value) { + if (categoricalStatsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + categoricalStatsResultBuilder_.setMessage(value); + } + resultCase_ = 4; + return this; + } + /** + *
+     * Categorical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + public Builder setCategoricalStatsResult( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder builderForValue) { + if (categoricalStatsResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + categoricalStatsResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 4; + return this; + } + /** + *
+     * Categorical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + public Builder mergeCategoricalStatsResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult value) { + if (categoricalStatsResultBuilder_ == null) { + if (resultCase_ == 4 && + result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance()) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 4) { + categoricalStatsResultBuilder_.mergeFrom(value); + } else { + categoricalStatsResultBuilder_.setMessage(value); + } + } + resultCase_ = 4; + return this; + } + /** + *
+     * Categorical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + public Builder clearCategoricalStatsResult() { + if (categoricalStatsResultBuilder_ == null) { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + } + categoricalStatsResultBuilder_.clear(); + } + return this; + } + /** + *
+     * Categorical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder getCategoricalStatsResultBuilder() { + return getCategoricalStatsResultFieldBuilder().getBuilder(); + } + /** + *
+     * Categorical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder getCategoricalStatsResultOrBuilder() { + if ((resultCase_ == 4) && (categoricalStatsResultBuilder_ != null)) { + return categoricalStatsResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); + } + } + /** + *
+     * Categorical stats result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder> + getCategoricalStatsResultFieldBuilder() { + if (categoricalStatsResultBuilder_ == null) { + if (!(resultCase_ == 4)) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); + } + categoricalStatsResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder>( + (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 4; + onChanged();; + return categoricalStatsResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder> kAnonymityResultBuilder_; + /** + *
+     * K-anonymity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + * @return Whether the kAnonymityResult field is set. + */ + @java.lang.Override + public boolean hasKAnonymityResult() { + return resultCase_ == 5; + } + /** + *
+     * K-anonymity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + * @return The kAnonymityResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getKAnonymityResult() { + if (kAnonymityResultBuilder_ == null) { + if (resultCase_ == 5) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); + } else { + if (resultCase_ == 5) { + return kAnonymityResultBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); + } + } + /** + *
+     * K-anonymity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + public Builder setKAnonymityResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult value) { + if (kAnonymityResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + kAnonymityResultBuilder_.setMessage(value); + } + resultCase_ = 5; + return this; + } + /** + *
+     * K-anonymity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + public Builder setKAnonymityResult( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder builderForValue) { + if (kAnonymityResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + kAnonymityResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 5; + return this; + } + /** + *
+     * K-anonymity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + public Builder mergeKAnonymityResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult value) { + if (kAnonymityResultBuilder_ == null) { + if (resultCase_ == 5 && + result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance()) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 5) { + kAnonymityResultBuilder_.mergeFrom(value); + } else { + kAnonymityResultBuilder_.setMessage(value); + } + } + resultCase_ = 5; + return this; + } + /** + *
+     * K-anonymity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + public Builder clearKAnonymityResult() { + if (kAnonymityResultBuilder_ == null) { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + } + kAnonymityResultBuilder_.clear(); + } + return this; + } + /** + *
+     * K-anonymity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder getKAnonymityResultBuilder() { + return getKAnonymityResultFieldBuilder().getBuilder(); + } + /** + *
+     * K-anonymity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder getKAnonymityResultOrBuilder() { + if ((resultCase_ == 5) && (kAnonymityResultBuilder_ != null)) { + return kAnonymityResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 5) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); + } + } + /** + *
+     * K-anonymity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder> + getKAnonymityResultFieldBuilder() { + if (kAnonymityResultBuilder_ == null) { + if (!(resultCase_ == 5)) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); + } + kAnonymityResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder>( + (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 5; + onChanged();; + return kAnonymityResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder> lDiversityResultBuilder_; + /** + *
+     * L-divesity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + * @return Whether the lDiversityResult field is set. + */ + @java.lang.Override + public boolean hasLDiversityResult() { + return resultCase_ == 6; + } + /** + *
+     * L-divesity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + * @return The lDiversityResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getLDiversityResult() { + if (lDiversityResultBuilder_ == null) { + if (resultCase_ == 6) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); + } else { + if (resultCase_ == 6) { + return lDiversityResultBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); + } + } + /** + *
+     * L-divesity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + */ + public Builder setLDiversityResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult value) { + if (lDiversityResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + lDiversityResultBuilder_.setMessage(value); + } + resultCase_ = 6; + return this; + } + /** + *
+     * L-divesity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + */ + public Builder setLDiversityResult( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder builderForValue) { + if (lDiversityResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + lDiversityResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 6; + return this; + } + /** + *
+     * L-divesity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + */ + public Builder mergeLDiversityResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult value) { + if (lDiversityResultBuilder_ == null) { + if (resultCase_ == 6 && + result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance()) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 6) { + lDiversityResultBuilder_.mergeFrom(value); + } else { + lDiversityResultBuilder_.setMessage(value); + } + } + resultCase_ = 6; + return this; + } + /** + *
+     * L-divesity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + */ + public Builder clearLDiversityResult() { + if (lDiversityResultBuilder_ == null) { + if (resultCase_ == 6) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 6) { + resultCase_ = 0; + result_ = null; + } + lDiversityResultBuilder_.clear(); + } + return this; + } + /** + *
+     * L-divesity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder getLDiversityResultBuilder() { + return getLDiversityResultFieldBuilder().getBuilder(); + } + /** + *
+     * L-divesity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder getLDiversityResultOrBuilder() { + if ((resultCase_ == 6) && (lDiversityResultBuilder_ != null)) { + return lDiversityResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 6) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); + } + } + /** + *
+     * L-divesity result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder> + getLDiversityResultFieldBuilder() { + if (lDiversityResultBuilder_ == null) { + if (!(resultCase_ == 6)) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); + } + lDiversityResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder>( + (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 6; + onChanged();; + return lDiversityResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder> kMapEstimationResultBuilder_; + /** + *
+     * K-map result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + * @return Whether the kMapEstimationResult field is set. + */ + @java.lang.Override + public boolean hasKMapEstimationResult() { + return resultCase_ == 7; + } + /** + *
+     * K-map result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + * @return The kMapEstimationResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getKMapEstimationResult() { + if (kMapEstimationResultBuilder_ == null) { + if (resultCase_ == 7) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); + } else { + if (resultCase_ == 7) { + return kMapEstimationResultBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); + } + } + /** + *
+     * K-map result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + */ + public Builder setKMapEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult value) { + if (kMapEstimationResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + kMapEstimationResultBuilder_.setMessage(value); + } + resultCase_ = 7; + return this; + } + /** + *
+     * K-map result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + */ + public Builder setKMapEstimationResult( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder builderForValue) { + if (kMapEstimationResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + kMapEstimationResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 7; + return this; + } + /** + *
+     * K-map result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + */ + public Builder mergeKMapEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult value) { + if (kMapEstimationResultBuilder_ == null) { + if (resultCase_ == 7 && + result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance()) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 7) { + kMapEstimationResultBuilder_.mergeFrom(value); + } else { + kMapEstimationResultBuilder_.setMessage(value); + } + } + resultCase_ = 7; + return this; + } + /** + *
+     * K-map result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + */ + public Builder clearKMapEstimationResult() { + if (kMapEstimationResultBuilder_ == null) { + if (resultCase_ == 7) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 7) { + resultCase_ = 0; + result_ = null; + } + kMapEstimationResultBuilder_.clear(); + } + return this; + } + /** + *
+     * K-map result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder getKMapEstimationResultBuilder() { + return getKMapEstimationResultFieldBuilder().getBuilder(); + } + /** + *
+     * K-map result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder getKMapEstimationResultOrBuilder() { + if ((resultCase_ == 7) && (kMapEstimationResultBuilder_ != null)) { + return kMapEstimationResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 7) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); + } + } + /** + *
+     * K-map result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder> + getKMapEstimationResultFieldBuilder() { + if (kMapEstimationResultBuilder_ == null) { + if (!(resultCase_ == 7)) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); + } + kMapEstimationResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder>( + (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 7; + onChanged();; + return kMapEstimationResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder> deltaPresenceEstimationResultBuilder_; + /** + *
+     * Delta-presence result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + * @return Whether the deltaPresenceEstimationResult field is set. + */ + @java.lang.Override + public boolean hasDeltaPresenceEstimationResult() { + return resultCase_ == 9; + } + /** + *
+     * Delta-presence result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + * @return The deltaPresenceEstimationResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDeltaPresenceEstimationResult() { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (resultCase_ == 9) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } else { + if (resultCase_ == 9) { + return deltaPresenceEstimationResultBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + } + /** + *
+     * Delta-presence result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public Builder setDeltaPresenceEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult value) { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + deltaPresenceEstimationResultBuilder_.setMessage(value); + } + resultCase_ = 9; + return this; + } + /** + *
+     * Delta-presence result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public Builder setDeltaPresenceEstimationResult( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder builderForValue) { + if (deltaPresenceEstimationResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + deltaPresenceEstimationResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 9; + return this; + } + /** + *
+     * Delta-presence result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public Builder mergeDeltaPresenceEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult value) { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (resultCase_ == 9 && + result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance()) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 9) { + deltaPresenceEstimationResultBuilder_.mergeFrom(value); + } else { + deltaPresenceEstimationResultBuilder_.setMessage(value); + } + } + resultCase_ = 9; + return this; + } + /** + *
+     * Delta-presence result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public Builder clearDeltaPresenceEstimationResult() { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (resultCase_ == 9) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 9) { + resultCase_ = 0; + result_ = null; + } + deltaPresenceEstimationResultBuilder_.clear(); + } + return this; + } + /** + *
+     * Delta-presence result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder getDeltaPresenceEstimationResultBuilder() { + return getDeltaPresenceEstimationResultFieldBuilder().getBuilder(); + } + /** + *
+     * Delta-presence result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder getDeltaPresenceEstimationResultOrBuilder() { + if ((resultCase_ == 9) && (deltaPresenceEstimationResultBuilder_ != null)) { + return deltaPresenceEstimationResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 9) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + } + /** + *
+     * Delta-presence result
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder> + getDeltaPresenceEstimationResultFieldBuilder() { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (!(resultCase_ == 9)) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + deltaPresenceEstimationResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder>( + (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 9; + onChanged();; + return deltaPresenceEstimationResultBuilder_; + } + + private com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requestedOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder> requestedOptionsBuilder_; + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + * @return Whether the requestedOptions field is set. + */ + public boolean hasRequestedOptions() { + return requestedOptionsBuilder_ != null || requestedOptions_ != null; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + * @return The requestedOptions. + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getRequestedOptions() { + if (requestedOptionsBuilder_ == null) { + return requestedOptions_ == null ? com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance() : requestedOptions_; + } else { + return requestedOptionsBuilder_.getMessage(); + } + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + */ + public Builder setRequestedOptions(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions value) { + if (requestedOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestedOptions_ = value; + onChanged(); + } else { + requestedOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + */ + public Builder setRequestedOptions( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder builderForValue) { + if (requestedOptionsBuilder_ == null) { + requestedOptions_ = builderForValue.build(); + onChanged(); + } else { + requestedOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + */ + public Builder mergeRequestedOptions(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions value) { + if (requestedOptionsBuilder_ == null) { + if (requestedOptions_ != null) { + requestedOptions_ = + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.newBuilder(requestedOptions_).mergeFrom(value).buildPartial(); + } else { + requestedOptions_ = value; + } + onChanged(); + } else { + requestedOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + */ + public Builder clearRequestedOptions() { + if (requestedOptionsBuilder_ == null) { + requestedOptions_ = null; + onChanged(); + } else { + requestedOptions_ = null; + requestedOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder getRequestedOptionsBuilder() { + + onChanged(); + return getRequestedOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder getRequestedOptionsOrBuilder() { + if (requestedOptionsBuilder_ != null) { + return requestedOptionsBuilder_.getMessageOrBuilder(); + } else { + return requestedOptions_ == null ? + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance() : requestedOptions_; + } + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder> + getRequestedOptionsFieldBuilder() { + if (requestedOptionsBuilder_ == null) { + requestedOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder>( + getRequestedOptions(), + getParentForChildren(), + isClean()); + requestedOptions_ = null; + } + return requestedOptionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeDataSourceRiskDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeDataSourceRiskDetails(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java new file mode 100644 index 000000000000..b1515cacf5bb --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java @@ -0,0 +1,254 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface AnalyzeDataSourceRiskDetailsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + * @return Whether the requestedPrivacyMetric field is set. + */ + boolean hasRequestedPrivacyMetric(); + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + * @return The requestedPrivacyMetric. + */ + com.google.privacy.dlp.v2.PrivacyMetric getRequestedPrivacyMetric(); + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getRequestedPrivacyMetricOrBuilder(); + + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + * @return Whether the requestedSourceTable field is set. + */ + boolean hasRequestedSourceTable(); + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + * @return The requestedSourceTable. + */ + com.google.privacy.dlp.v2.BigQueryTable getRequestedSourceTable(); + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getRequestedSourceTableOrBuilder(); + + /** + *
+   * Numerical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + * @return Whether the numericalStatsResult field is set. + */ + boolean hasNumericalStatsResult(); + /** + *
+   * Numerical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + * @return The numericalStatsResult. + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getNumericalStatsResult(); + /** + *
+   * Numerical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder getNumericalStatsResultOrBuilder(); + + /** + *
+   * Categorical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + * @return Whether the categoricalStatsResult field is set. + */ + boolean hasCategoricalStatsResult(); + /** + *
+   * Categorical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + * @return The categoricalStatsResult. + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getCategoricalStatsResult(); + /** + *
+   * Categorical stats result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder getCategoricalStatsResultOrBuilder(); + + /** + *
+   * K-anonymity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + * @return Whether the kAnonymityResult field is set. + */ + boolean hasKAnonymityResult(); + /** + *
+   * K-anonymity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + * @return The kAnonymityResult. + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getKAnonymityResult(); + /** + *
+   * K-anonymity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder getKAnonymityResultOrBuilder(); + + /** + *
+   * L-divesity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + * @return Whether the lDiversityResult field is set. + */ + boolean hasLDiversityResult(); + /** + *
+   * L-divesity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + * @return The lDiversityResult. + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getLDiversityResult(); + /** + *
+   * L-divesity result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder getLDiversityResultOrBuilder(); + + /** + *
+   * K-map result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + * @return Whether the kMapEstimationResult field is set. + */ + boolean hasKMapEstimationResult(); + /** + *
+   * K-map result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + * @return The kMapEstimationResult. + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getKMapEstimationResult(); + /** + *
+   * K-map result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder getKMapEstimationResultOrBuilder(); + + /** + *
+   * Delta-presence result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + * @return Whether the deltaPresenceEstimationResult field is set. + */ + boolean hasDeltaPresenceEstimationResult(); + /** + *
+   * Delta-presence result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + * @return The deltaPresenceEstimationResult. + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDeltaPresenceEstimationResult(); + /** + *
+   * Delta-presence result
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder getDeltaPresenceEstimationResultOrBuilder(); + + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + * @return Whether the requestedOptions field is set. + */ + boolean hasRequestedOptions(); + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + * @return The requestedOptions. + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getRequestedOptions(); + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder getRequestedOptionsOrBuilder(); + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ResultCase getResultCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryField.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryField.java new file mode 100644 index 000000000000..9e8eee0a9580 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryField.java @@ -0,0 +1,901 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Message defining a field of a BigQuery table.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BigQueryField} + */ +public final class BigQueryField extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BigQueryField) + BigQueryFieldOrBuilder { +private static final long serialVersionUID = 0L; + // Use BigQueryField.newBuilder() to construct. + private BigQueryField(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BigQueryField() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BigQueryField(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BigQueryField( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (table_ != null) { + subBuilder = table_.toBuilder(); + } + table_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(table_); + table_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BigQueryField.class, com.google.privacy.dlp.v2.BigQueryField.Builder.class); + } + + public static final int TABLE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.BigQueryTable table_; + /** + *
+   * Source table of the field.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return table_ != null; + } + /** + *
+   * Source table of the field.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return The table. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } + /** + *
+   * Source table of the field.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + return getTable(); + } + + public static final int FIELD_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+   * Designated field in the BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+   * Designated field in the BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+   * Designated field in the BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (table_ != null) { + output.writeMessage(1, getTable()); + } + if (field_ != null) { + output.writeMessage(2, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (table_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTable()); + } + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.BigQueryField)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.BigQueryField other = (com.google.privacy.dlp.v2.BigQueryField) obj; + + if (hasTable() != other.hasTable()) return false; + if (hasTable()) { + if (!getTable() + .equals(other.getTable())) return false; + } + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTable()) { + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + } + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.BigQueryField parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryField parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryField parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryField parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryField parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryField parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryField parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryField parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryField parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryField parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.BigQueryField prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Message defining a field of a BigQuery table.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BigQueryField} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BigQueryField) + com.google.privacy.dlp.v2.BigQueryFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BigQueryField.class, com.google.privacy.dlp.v2.BigQueryField.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.BigQueryField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (tableBuilder_ == null) { + table_ = null; + } else { + table_ = null; + tableBuilder_ = null; + } + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryField getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryField build() { + com.google.privacy.dlp.v2.BigQueryField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryField buildPartial() { + com.google.privacy.dlp.v2.BigQueryField result = new com.google.privacy.dlp.v2.BigQueryField(this); + if (tableBuilder_ == null) { + result.table_ = table_; + } else { + result.table_ = tableBuilder_.build(); + } + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.BigQueryField) { + return mergeFrom((com.google.privacy.dlp.v2.BigQueryField)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.BigQueryField other) { + if (other == com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance()) return this; + if (other.hasTable()) { + mergeTable(other.getTable()); + } + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.BigQueryField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.BigQueryField) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.BigQueryTable table_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; + /** + *
+     * Source table of the field.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return Whether the table field is set. + */ + public boolean hasTable() { + return tableBuilder_ != null || table_ != null; + } + /** + *
+     * Source table of the field.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return The table. + */ + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + if (tableBuilder_ == null) { + return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } else { + return tableBuilder_.getMessage(); + } + } + /** + *
+     * Source table of the field.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + onChanged(); + } else { + tableBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Source table of the field.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder setTable( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (tableBuilder_ == null) { + table_ = builderForValue.build(); + onChanged(); + } else { + tableBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Source table of the field.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (table_ != null) { + table_ = + com.google.privacy.dlp.v2.BigQueryTable.newBuilder(table_).mergeFrom(value).buildPartial(); + } else { + table_ = value; + } + onChanged(); + } else { + tableBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Source table of the field.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + table_ = null; + onChanged(); + } else { + table_ = null; + tableBuilder_ = null; + } + + return this; + } + /** + *
+     * Source table of the field.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { + + onChanged(); + return getTableFieldBuilder().getBuilder(); + } + /** + *
+     * Source table of the field.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + if (tableBuilder_ != null) { + return tableBuilder_.getMessageOrBuilder(); + } else { + return table_ == null ? + com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } + } + /** + *
+     * Source table of the field.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + getTable(), + getParentForChildren(), + isClean()); + table_ = null; + } + return tableBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+     * Designated field in the BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+     * Designated field in the BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+     * Designated field in the BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Designated field in the BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Designated field in the BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Designated field in the BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+     * Designated field in the BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+     * Designated field in the BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+     * Designated field in the BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BigQueryField) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BigQueryField) + private static final com.google.privacy.dlp.v2.BigQueryField DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BigQueryField(); + } + + public static com.google.privacy.dlp.v2.BigQueryField getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryField(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryField getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryFieldOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryFieldOrBuilder.java new file mode 100644 index 000000000000..3bac01196021 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryFieldOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface BigQueryFieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BigQueryField) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Source table of the field.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return Whether the table field is set. + */ + boolean hasTable(); + /** + *
+   * Source table of the field.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return The table. + */ + com.google.privacy.dlp.v2.BigQueryTable getTable(); + /** + *
+   * Source table of the field.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); + + /** + *
+   * Designated field in the BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+   * Designated field in the BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+   * Designated field in the BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKey.java new file mode 100644 index 000000000000..375b48cb7d1c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKey.java @@ -0,0 +1,762 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Row key for identifying a record in BigQuery table.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BigQueryKey} + */ +public final class BigQueryKey extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BigQueryKey) + BigQueryKeyOrBuilder { +private static final long serialVersionUID = 0L; + // Use BigQueryKey.newBuilder() to construct. + private BigQueryKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BigQueryKey() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BigQueryKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BigQueryKey( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (tableReference_ != null) { + subBuilder = tableReference_.toBuilder(); + } + tableReference_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableReference_); + tableReference_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + rowNumber_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BigQueryKey.class, com.google.privacy.dlp.v2.BigQueryKey.Builder.class); + } + + public static final int TABLE_REFERENCE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.BigQueryTable tableReference_; + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return Whether the tableReference field is set. + */ + @java.lang.Override + public boolean hasTableReference() { + return tableReference_ != null; + } + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return The tableReference. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getTableReference() { + return tableReference_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; + } + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder() { + return getTableReference(); + } + + public static final int ROW_NUMBER_FIELD_NUMBER = 2; + private long rowNumber_; + /** + *
+   * Row number inferred at the time the table was scanned. This value is
+   * nondeterministic, cannot be queried, and may be null for inspection
+   * jobs. To locate findings within a table, specify
+   * `inspect_job.storage_config.big_query_options.identifying_fields` in
+   * `CreateDlpJobRequest`.
+   * 
+ * + * int64 row_number = 2; + * @return The rowNumber. + */ + @java.lang.Override + public long getRowNumber() { + return rowNumber_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (tableReference_ != null) { + output.writeMessage(1, getTableReference()); + } + if (rowNumber_ != 0L) { + output.writeInt64(2, rowNumber_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tableReference_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTableReference()); + } + if (rowNumber_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, rowNumber_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.BigQueryKey)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.BigQueryKey other = (com.google.privacy.dlp.v2.BigQueryKey) obj; + + if (hasTableReference() != other.hasTableReference()) return false; + if (hasTableReference()) { + if (!getTableReference() + .equals(other.getTableReference())) return false; + } + if (getRowNumber() + != other.getRowNumber()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTableReference()) { + hash = (37 * hash) + TABLE_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getTableReference().hashCode(); + } + hash = (37 * hash) + ROW_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRowNumber()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.BigQueryKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Row key for identifying a record in BigQuery table.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BigQueryKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BigQueryKey) + com.google.privacy.dlp.v2.BigQueryKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BigQueryKey.class, com.google.privacy.dlp.v2.BigQueryKey.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.BigQueryKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (tableReferenceBuilder_ == null) { + tableReference_ = null; + } else { + tableReference_ = null; + tableReferenceBuilder_ = null; + } + rowNumber_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryKey getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryKey build() { + com.google.privacy.dlp.v2.BigQueryKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryKey buildPartial() { + com.google.privacy.dlp.v2.BigQueryKey result = new com.google.privacy.dlp.v2.BigQueryKey(this); + if (tableReferenceBuilder_ == null) { + result.tableReference_ = tableReference_; + } else { + result.tableReference_ = tableReferenceBuilder_.build(); + } + result.rowNumber_ = rowNumber_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.BigQueryKey) { + return mergeFrom((com.google.privacy.dlp.v2.BigQueryKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.BigQueryKey other) { + if (other == com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance()) return this; + if (other.hasTableReference()) { + mergeTableReference(other.getTableReference()); + } + if (other.getRowNumber() != 0L) { + setRowNumber(other.getRowNumber()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.BigQueryKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.BigQueryKey) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.BigQueryTable tableReference_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableReferenceBuilder_; + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return Whether the tableReference field is set. + */ + public boolean hasTableReference() { + return tableReferenceBuilder_ != null || tableReference_ != null; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return The tableReference. + */ + public com.google.privacy.dlp.v2.BigQueryTable getTableReference() { + if (tableReferenceBuilder_ == null) { + return tableReference_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; + } else { + return tableReferenceBuilder_.getMessage(); + } + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public Builder setTableReference(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableReferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableReference_ = value; + onChanged(); + } else { + tableReferenceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public Builder setTableReference( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (tableReferenceBuilder_ == null) { + tableReference_ = builderForValue.build(); + onChanged(); + } else { + tableReferenceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public Builder mergeTableReference(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableReferenceBuilder_ == null) { + if (tableReference_ != null) { + tableReference_ = + com.google.privacy.dlp.v2.BigQueryTable.newBuilder(tableReference_).mergeFrom(value).buildPartial(); + } else { + tableReference_ = value; + } + onChanged(); + } else { + tableReferenceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public Builder clearTableReference() { + if (tableReferenceBuilder_ == null) { + tableReference_ = null; + onChanged(); + } else { + tableReference_ = null; + tableReferenceBuilder_ = null; + } + + return this; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableReferenceBuilder() { + + onChanged(); + return getTableReferenceFieldBuilder().getBuilder(); + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder() { + if (tableReferenceBuilder_ != null) { + return tableReferenceBuilder_.getMessageOrBuilder(); + } else { + return tableReference_ == null ? + com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; + } + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getTableReferenceFieldBuilder() { + if (tableReferenceBuilder_ == null) { + tableReferenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + getTableReference(), + getParentForChildren(), + isClean()); + tableReference_ = null; + } + return tableReferenceBuilder_; + } + + private long rowNumber_ ; + /** + *
+     * Row number inferred at the time the table was scanned. This value is
+     * nondeterministic, cannot be queried, and may be null for inspection
+     * jobs. To locate findings within a table, specify
+     * `inspect_job.storage_config.big_query_options.identifying_fields` in
+     * `CreateDlpJobRequest`.
+     * 
+ * + * int64 row_number = 2; + * @return The rowNumber. + */ + @java.lang.Override + public long getRowNumber() { + return rowNumber_; + } + /** + *
+     * Row number inferred at the time the table was scanned. This value is
+     * nondeterministic, cannot be queried, and may be null for inspection
+     * jobs. To locate findings within a table, specify
+     * `inspect_job.storage_config.big_query_options.identifying_fields` in
+     * `CreateDlpJobRequest`.
+     * 
+ * + * int64 row_number = 2; + * @param value The rowNumber to set. + * @return This builder for chaining. + */ + public Builder setRowNumber(long value) { + + rowNumber_ = value; + onChanged(); + return this; + } + /** + *
+     * Row number inferred at the time the table was scanned. This value is
+     * nondeterministic, cannot be queried, and may be null for inspection
+     * jobs. To locate findings within a table, specify
+     * `inspect_job.storage_config.big_query_options.identifying_fields` in
+     * `CreateDlpJobRequest`.
+     * 
+ * + * int64 row_number = 2; + * @return This builder for chaining. + */ + public Builder clearRowNumber() { + + rowNumber_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BigQueryKey) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BigQueryKey) + private static final com.google.privacy.dlp.v2.BigQueryKey DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BigQueryKey(); + } + + public static com.google.privacy.dlp.v2.BigQueryKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKeyOrBuilder.java new file mode 100644 index 000000000000..57154373582b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKeyOrBuilder.java @@ -0,0 +1,50 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface BigQueryKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BigQueryKey) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return Whether the tableReference field is set. + */ + boolean hasTableReference(); + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return The tableReference. + */ + com.google.privacy.dlp.v2.BigQueryTable getTableReference(); + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder(); + + /** + *
+   * Row number inferred at the time the table was scanned. This value is
+   * nondeterministic, cannot be queried, and may be null for inspection
+   * jobs. To locate findings within a table, specify
+   * `inspect_job.storage_config.big_query_options.identifying_fields` in
+   * `CreateDlpJobRequest`.
+   * 
+ * + * int64 row_number = 2; + * @return The rowNumber. + */ + long getRowNumber(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptions.java new file mode 100644 index 000000000000..5e7e84619f60 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptions.java @@ -0,0 +1,2531 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Options defining BigQuery table and row identifiers.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BigQueryOptions} + */ +public final class BigQueryOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BigQueryOptions) + BigQueryOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use BigQueryOptions.newBuilder() to construct. + private BigQueryOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BigQueryOptions() { + identifyingFields_ = java.util.Collections.emptyList(); + sampleMethod_ = 0; + excludedFields_ = java.util.Collections.emptyList(); + includedFields_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BigQueryOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BigQueryOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (tableReference_ != null) { + subBuilder = tableReference_.toBuilder(); + } + tableReference_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableReference_); + tableReference_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + identifyingFields_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + identifyingFields_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); + break; + } + case 24: { + + rowsLimit_ = input.readInt64(); + break; + } + case 32: { + int rawValue = input.readEnum(); + + sampleMethod_ = rawValue; + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + excludedFields_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + excludedFields_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); + break; + } + case 48: { + + rowsLimitPercent_ = input.readInt32(); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + includedFields_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + includedFields_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + identifyingFields_ = java.util.Collections.unmodifiableList(identifyingFields_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + excludedFields_ = java.util.Collections.unmodifiableList(excludedFields_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + includedFields_ = java.util.Collections.unmodifiableList(includedFields_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BigQueryOptions.class, com.google.privacy.dlp.v2.BigQueryOptions.Builder.class); + } + + /** + *
+   * How to sample rows if not all rows are scanned. Meaningful only when used
+   * in conjunction with either rows_limit or rows_limit_percent. If not
+   * specified, rows are scanned in the order BigQuery reads them.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.BigQueryOptions.SampleMethod} + */ + public enum SampleMethod + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SAMPLE_METHOD_UNSPECIFIED = 0; + */ + SAMPLE_METHOD_UNSPECIFIED(0), + /** + *
+     * Scan groups of rows in the order BigQuery provides (default). Multiple
+     * groups of rows may be scanned in parallel, so results may not appear in
+     * the same order the rows are read.
+     * 
+ * + * TOP = 1; + */ + TOP(1), + /** + *
+     * Randomly pick groups of rows to scan.
+     * 
+ * + * RANDOM_START = 2; + */ + RANDOM_START(2), + UNRECOGNIZED(-1), + ; + + /** + * SAMPLE_METHOD_UNSPECIFIED = 0; + */ + public static final int SAMPLE_METHOD_UNSPECIFIED_VALUE = 0; + /** + *
+     * Scan groups of rows in the order BigQuery provides (default). Multiple
+     * groups of rows may be scanned in parallel, so results may not appear in
+     * the same order the rows are read.
+     * 
+ * + * TOP = 1; + */ + public static final int TOP_VALUE = 1; + /** + *
+     * Randomly pick groups of rows to scan.
+     * 
+ * + * RANDOM_START = 2; + */ + public static final int RANDOM_START_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SampleMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SampleMethod forNumber(int value) { + switch (value) { + case 0: return SAMPLE_METHOD_UNSPECIFIED; + case 1: return TOP; + case 2: return RANDOM_START; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SampleMethod> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SampleMethod findValueByNumber(int number) { + return SampleMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.BigQueryOptions.getDescriptor().getEnumTypes().get(0); + } + + private static final SampleMethod[] VALUES = values(); + + public static SampleMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SampleMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.BigQueryOptions.SampleMethod) + } + + public static final int TABLE_REFERENCE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.BigQueryTable tableReference_; + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return Whether the tableReference field is set. + */ + @java.lang.Override + public boolean hasTableReference() { + return tableReference_ != null; + } + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return The tableReference. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getTableReference() { + return tableReference_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; + } + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder() { + return getTableReference(); + } + + public static final int IDENTIFYING_FIELDS_FIELD_NUMBER = 2; + private java.util.List identifyingFields_; + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + @java.lang.Override + public java.util.List getIdentifyingFieldsList() { + return identifyingFields_; + } + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + @java.lang.Override + public java.util.List + getIdentifyingFieldsOrBuilderList() { + return identifyingFields_; + } + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + @java.lang.Override + public int getIdentifyingFieldsCount() { + return identifyingFields_.size(); + } + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index) { + return identifyingFields_.get(index); + } + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( + int index) { + return identifyingFields_.get(index); + } + + public static final int ROWS_LIMIT_FIELD_NUMBER = 3; + private long rowsLimit_; + /** + *
+   * Max number of rows to scan. If the table has more rows than this value, the
+   * rest of the rows are omitted. If not set, or if set to 0, all rows will be
+   * scanned. Only one of rows_limit and rows_limit_percent can be specified.
+   * Cannot be used in conjunction with TimespanConfig.
+   * 
+ * + * int64 rows_limit = 3; + * @return The rowsLimit. + */ + @java.lang.Override + public long getRowsLimit() { + return rowsLimit_; + } + + public static final int ROWS_LIMIT_PERCENT_FIELD_NUMBER = 6; + private int rowsLimitPercent_; + /** + *
+   * Max percentage of rows to scan. The rest are omitted. The number of rows
+   * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
+   * 100 means no limit. Defaults to 0. Only one of rows_limit and
+   * rows_limit_percent can be specified. Cannot be used in conjunction with
+   * TimespanConfig.
+   * 
+ * + * int32 rows_limit_percent = 6; + * @return The rowsLimitPercent. + */ + @java.lang.Override + public int getRowsLimitPercent() { + return rowsLimitPercent_; + } + + public static final int SAMPLE_METHOD_FIELD_NUMBER = 4; + private int sampleMethod_; + /** + * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; + * @return The enum numeric value on the wire for sampleMethod. + */ + @java.lang.Override public int getSampleMethodValue() { + return sampleMethod_; + } + /** + * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; + * @return The sampleMethod. + */ + @java.lang.Override public com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod getSampleMethod() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod result = com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.valueOf(sampleMethod_); + return result == null ? com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.UNRECOGNIZED : result; + } + + public static final int EXCLUDED_FIELDS_FIELD_NUMBER = 5; + private java.util.List excludedFields_; + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + @java.lang.Override + public java.util.List getExcludedFieldsList() { + return excludedFields_; + } + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + @java.lang.Override + public java.util.List + getExcludedFieldsOrBuilderList() { + return excludedFields_; + } + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + @java.lang.Override + public int getExcludedFieldsCount() { + return excludedFields_.size(); + } + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getExcludedFields(int index) { + return excludedFields_.get(index); + } + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getExcludedFieldsOrBuilder( + int index) { + return excludedFields_.get(index); + } + + public static final int INCLUDED_FIELDS_FIELD_NUMBER = 7; + private java.util.List includedFields_; + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + @java.lang.Override + public java.util.List getIncludedFieldsList() { + return includedFields_; + } + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + @java.lang.Override + public java.util.List + getIncludedFieldsOrBuilderList() { + return includedFields_; + } + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + @java.lang.Override + public int getIncludedFieldsCount() { + return includedFields_.size(); + } + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getIncludedFields(int index) { + return includedFields_.get(index); + } + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getIncludedFieldsOrBuilder( + int index) { + return includedFields_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (tableReference_ != null) { + output.writeMessage(1, getTableReference()); + } + for (int i = 0; i < identifyingFields_.size(); i++) { + output.writeMessage(2, identifyingFields_.get(i)); + } + if (rowsLimit_ != 0L) { + output.writeInt64(3, rowsLimit_); + } + if (sampleMethod_ != com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED.getNumber()) { + output.writeEnum(4, sampleMethod_); + } + for (int i = 0; i < excludedFields_.size(); i++) { + output.writeMessage(5, excludedFields_.get(i)); + } + if (rowsLimitPercent_ != 0) { + output.writeInt32(6, rowsLimitPercent_); + } + for (int i = 0; i < includedFields_.size(); i++) { + output.writeMessage(7, includedFields_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tableReference_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTableReference()); + } + for (int i = 0; i < identifyingFields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, identifyingFields_.get(i)); + } + if (rowsLimit_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, rowsLimit_); + } + if (sampleMethod_ != com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, sampleMethod_); + } + for (int i = 0; i < excludedFields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, excludedFields_.get(i)); + } + if (rowsLimitPercent_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, rowsLimitPercent_); + } + for (int i = 0; i < includedFields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, includedFields_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.BigQueryOptions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.BigQueryOptions other = (com.google.privacy.dlp.v2.BigQueryOptions) obj; + + if (hasTableReference() != other.hasTableReference()) return false; + if (hasTableReference()) { + if (!getTableReference() + .equals(other.getTableReference())) return false; + } + if (!getIdentifyingFieldsList() + .equals(other.getIdentifyingFieldsList())) return false; + if (getRowsLimit() + != other.getRowsLimit()) return false; + if (getRowsLimitPercent() + != other.getRowsLimitPercent()) return false; + if (sampleMethod_ != other.sampleMethod_) return false; + if (!getExcludedFieldsList() + .equals(other.getExcludedFieldsList())) return false; + if (!getIncludedFieldsList() + .equals(other.getIncludedFieldsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTableReference()) { + hash = (37 * hash) + TABLE_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getTableReference().hashCode(); + } + if (getIdentifyingFieldsCount() > 0) { + hash = (37 * hash) + IDENTIFYING_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getIdentifyingFieldsList().hashCode(); + } + hash = (37 * hash) + ROWS_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRowsLimit()); + hash = (37 * hash) + ROWS_LIMIT_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getRowsLimitPercent(); + hash = (37 * hash) + SAMPLE_METHOD_FIELD_NUMBER; + hash = (53 * hash) + sampleMethod_; + if (getExcludedFieldsCount() > 0) { + hash = (37 * hash) + EXCLUDED_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getExcludedFieldsList().hashCode(); + } + if (getIncludedFieldsCount() > 0) { + hash = (37 * hash) + INCLUDED_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getIncludedFieldsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.BigQueryOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Options defining BigQuery table and row identifiers.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BigQueryOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BigQueryOptions) + com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BigQueryOptions.class, com.google.privacy.dlp.v2.BigQueryOptions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.BigQueryOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getIdentifyingFieldsFieldBuilder(); + getExcludedFieldsFieldBuilder(); + getIncludedFieldsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (tableReferenceBuilder_ == null) { + tableReference_ = null; + } else { + tableReference_ = null; + tableReferenceBuilder_ = null; + } + if (identifyingFieldsBuilder_ == null) { + identifyingFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + identifyingFieldsBuilder_.clear(); + } + rowsLimit_ = 0L; + + rowsLimitPercent_ = 0; + + sampleMethod_ = 0; + + if (excludedFieldsBuilder_ == null) { + excludedFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + excludedFieldsBuilder_.clear(); + } + if (includedFieldsBuilder_ == null) { + includedFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + includedFieldsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryOptions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryOptions build() { + com.google.privacy.dlp.v2.BigQueryOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryOptions buildPartial() { + com.google.privacy.dlp.v2.BigQueryOptions result = new com.google.privacy.dlp.v2.BigQueryOptions(this); + int from_bitField0_ = bitField0_; + if (tableReferenceBuilder_ == null) { + result.tableReference_ = tableReference_; + } else { + result.tableReference_ = tableReferenceBuilder_.build(); + } + if (identifyingFieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + identifyingFields_ = java.util.Collections.unmodifiableList(identifyingFields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.identifyingFields_ = identifyingFields_; + } else { + result.identifyingFields_ = identifyingFieldsBuilder_.build(); + } + result.rowsLimit_ = rowsLimit_; + result.rowsLimitPercent_ = rowsLimitPercent_; + result.sampleMethod_ = sampleMethod_; + if (excludedFieldsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + excludedFields_ = java.util.Collections.unmodifiableList(excludedFields_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.excludedFields_ = excludedFields_; + } else { + result.excludedFields_ = excludedFieldsBuilder_.build(); + } + if (includedFieldsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + includedFields_ = java.util.Collections.unmodifiableList(includedFields_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.includedFields_ = includedFields_; + } else { + result.includedFields_ = includedFieldsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.BigQueryOptions) { + return mergeFrom((com.google.privacy.dlp.v2.BigQueryOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.BigQueryOptions other) { + if (other == com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance()) return this; + if (other.hasTableReference()) { + mergeTableReference(other.getTableReference()); + } + if (identifyingFieldsBuilder_ == null) { + if (!other.identifyingFields_.isEmpty()) { + if (identifyingFields_.isEmpty()) { + identifyingFields_ = other.identifyingFields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.addAll(other.identifyingFields_); + } + onChanged(); + } + } else { + if (!other.identifyingFields_.isEmpty()) { + if (identifyingFieldsBuilder_.isEmpty()) { + identifyingFieldsBuilder_.dispose(); + identifyingFieldsBuilder_ = null; + identifyingFields_ = other.identifyingFields_; + bitField0_ = (bitField0_ & ~0x00000001); + identifyingFieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getIdentifyingFieldsFieldBuilder() : null; + } else { + identifyingFieldsBuilder_.addAllMessages(other.identifyingFields_); + } + } + } + if (other.getRowsLimit() != 0L) { + setRowsLimit(other.getRowsLimit()); + } + if (other.getRowsLimitPercent() != 0) { + setRowsLimitPercent(other.getRowsLimitPercent()); + } + if (other.sampleMethod_ != 0) { + setSampleMethodValue(other.getSampleMethodValue()); + } + if (excludedFieldsBuilder_ == null) { + if (!other.excludedFields_.isEmpty()) { + if (excludedFields_.isEmpty()) { + excludedFields_ = other.excludedFields_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureExcludedFieldsIsMutable(); + excludedFields_.addAll(other.excludedFields_); + } + onChanged(); + } + } else { + if (!other.excludedFields_.isEmpty()) { + if (excludedFieldsBuilder_.isEmpty()) { + excludedFieldsBuilder_.dispose(); + excludedFieldsBuilder_ = null; + excludedFields_ = other.excludedFields_; + bitField0_ = (bitField0_ & ~0x00000002); + excludedFieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getExcludedFieldsFieldBuilder() : null; + } else { + excludedFieldsBuilder_.addAllMessages(other.excludedFields_); + } + } + } + if (includedFieldsBuilder_ == null) { + if (!other.includedFields_.isEmpty()) { + if (includedFields_.isEmpty()) { + includedFields_ = other.includedFields_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureIncludedFieldsIsMutable(); + includedFields_.addAll(other.includedFields_); + } + onChanged(); + } + } else { + if (!other.includedFields_.isEmpty()) { + if (includedFieldsBuilder_.isEmpty()) { + includedFieldsBuilder_.dispose(); + includedFieldsBuilder_ = null; + includedFields_ = other.includedFields_; + bitField0_ = (bitField0_ & ~0x00000004); + includedFieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getIncludedFieldsFieldBuilder() : null; + } else { + includedFieldsBuilder_.addAllMessages(other.includedFields_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.BigQueryOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.BigQueryOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.BigQueryTable tableReference_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableReferenceBuilder_; + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return Whether the tableReference field is set. + */ + public boolean hasTableReference() { + return tableReferenceBuilder_ != null || tableReference_ != null; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return The tableReference. + */ + public com.google.privacy.dlp.v2.BigQueryTable getTableReference() { + if (tableReferenceBuilder_ == null) { + return tableReference_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; + } else { + return tableReferenceBuilder_.getMessage(); + } + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public Builder setTableReference(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableReferenceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableReference_ = value; + onChanged(); + } else { + tableReferenceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public Builder setTableReference( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (tableReferenceBuilder_ == null) { + tableReference_ = builderForValue.build(); + onChanged(); + } else { + tableReferenceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public Builder mergeTableReference(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableReferenceBuilder_ == null) { + if (tableReference_ != null) { + tableReference_ = + com.google.privacy.dlp.v2.BigQueryTable.newBuilder(tableReference_).mergeFrom(value).buildPartial(); + } else { + tableReference_ = value; + } + onChanged(); + } else { + tableReferenceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public Builder clearTableReference() { + if (tableReferenceBuilder_ == null) { + tableReference_ = null; + onChanged(); + } else { + tableReference_ = null; + tableReferenceBuilder_ = null; + } + + return this; + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableReferenceBuilder() { + + onChanged(); + return getTableReferenceFieldBuilder().getBuilder(); + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder() { + if (tableReferenceBuilder_ != null) { + return tableReferenceBuilder_.getMessageOrBuilder(); + } else { + return tableReference_ == null ? + com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; + } + } + /** + *
+     * Complete BigQuery table reference.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getTableReferenceFieldBuilder() { + if (tableReferenceBuilder_ == null) { + tableReferenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + getTableReference(), + getParentForChildren(), + isClean()); + tableReference_ = null; + } + return tableReferenceBuilder_; + } + + private java.util.List identifyingFields_ = + java.util.Collections.emptyList(); + private void ensureIdentifyingFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + identifyingFields_ = new java.util.ArrayList(identifyingFields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> identifyingFieldsBuilder_; + + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public java.util.List getIdentifyingFieldsList() { + if (identifyingFieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(identifyingFields_); + } else { + return identifyingFieldsBuilder_.getMessageList(); + } + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public int getIdentifyingFieldsCount() { + if (identifyingFieldsBuilder_ == null) { + return identifyingFields_.size(); + } else { + return identifyingFieldsBuilder_.getCount(); + } + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index) { + if (identifyingFieldsBuilder_ == null) { + return identifyingFields_.get(index); + } else { + return identifyingFieldsBuilder_.getMessage(index); + } + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public Builder setIdentifyingFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (identifyingFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.set(index, value); + onChanged(); + } else { + identifyingFieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public Builder setIdentifyingFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.set(index, builderForValue.build()); + onChanged(); + } else { + identifyingFieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public Builder addIdentifyingFields(com.google.privacy.dlp.v2.FieldId value) { + if (identifyingFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.add(value); + onChanged(); + } else { + identifyingFieldsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public Builder addIdentifyingFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (identifyingFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.add(index, value); + onChanged(); + } else { + identifyingFieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public Builder addIdentifyingFields( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.add(builderForValue.build()); + onChanged(); + } else { + identifyingFieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public Builder addIdentifyingFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.add(index, builderForValue.build()); + onChanged(); + } else { + identifyingFieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public Builder addAllIdentifyingFields( + java.lang.Iterable values) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, identifyingFields_); + onChanged(); + } else { + identifyingFieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public Builder clearIdentifyingFields() { + if (identifyingFieldsBuilder_ == null) { + identifyingFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + identifyingFieldsBuilder_.clear(); + } + return this; + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public Builder removeIdentifyingFields(int index) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.remove(index); + onChanged(); + } else { + identifyingFieldsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getIdentifyingFieldsBuilder( + int index) { + return getIdentifyingFieldsFieldBuilder().getBuilder(index); + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( + int index) { + if (identifyingFieldsBuilder_ == null) { + return identifyingFields_.get(index); } else { + return identifyingFieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public java.util.List + getIdentifyingFieldsOrBuilderList() { + if (identifyingFieldsBuilder_ != null) { + return identifyingFieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identifyingFields_); + } + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addIdentifyingFieldsBuilder() { + return getIdentifyingFieldsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addIdentifyingFieldsBuilder( + int index) { + return getIdentifyingFieldsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * Table fields that may uniquely identify a row within the table. When
+     * `actions.saveFindings.outputConfig.table` is specified, the values of
+     * columns specified here are available in the output table under
+     * `location.content_locations.record_location.record_key.id_values`. Nested
+     * fields such as `person.birthdate.year` are allowed.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + public java.util.List + getIdentifyingFieldsBuilderList() { + return getIdentifyingFieldsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getIdentifyingFieldsFieldBuilder() { + if (identifyingFieldsBuilder_ == null) { + identifyingFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + identifyingFields_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + identifyingFields_ = null; + } + return identifyingFieldsBuilder_; + } + + private long rowsLimit_ ; + /** + *
+     * Max number of rows to scan. If the table has more rows than this value, the
+     * rest of the rows are omitted. If not set, or if set to 0, all rows will be
+     * scanned. Only one of rows_limit and rows_limit_percent can be specified.
+     * Cannot be used in conjunction with TimespanConfig.
+     * 
+ * + * int64 rows_limit = 3; + * @return The rowsLimit. + */ + @java.lang.Override + public long getRowsLimit() { + return rowsLimit_; + } + /** + *
+     * Max number of rows to scan. If the table has more rows than this value, the
+     * rest of the rows are omitted. If not set, or if set to 0, all rows will be
+     * scanned. Only one of rows_limit and rows_limit_percent can be specified.
+     * Cannot be used in conjunction with TimespanConfig.
+     * 
+ * + * int64 rows_limit = 3; + * @param value The rowsLimit to set. + * @return This builder for chaining. + */ + public Builder setRowsLimit(long value) { + + rowsLimit_ = value; + onChanged(); + return this; + } + /** + *
+     * Max number of rows to scan. If the table has more rows than this value, the
+     * rest of the rows are omitted. If not set, or if set to 0, all rows will be
+     * scanned. Only one of rows_limit and rows_limit_percent can be specified.
+     * Cannot be used in conjunction with TimespanConfig.
+     * 
+ * + * int64 rows_limit = 3; + * @return This builder for chaining. + */ + public Builder clearRowsLimit() { + + rowsLimit_ = 0L; + onChanged(); + return this; + } + + private int rowsLimitPercent_ ; + /** + *
+     * Max percentage of rows to scan. The rest are omitted. The number of rows
+     * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
+     * 100 means no limit. Defaults to 0. Only one of rows_limit and
+     * rows_limit_percent can be specified. Cannot be used in conjunction with
+     * TimespanConfig.
+     * 
+ * + * int32 rows_limit_percent = 6; + * @return The rowsLimitPercent. + */ + @java.lang.Override + public int getRowsLimitPercent() { + return rowsLimitPercent_; + } + /** + *
+     * Max percentage of rows to scan. The rest are omitted. The number of rows
+     * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
+     * 100 means no limit. Defaults to 0. Only one of rows_limit and
+     * rows_limit_percent can be specified. Cannot be used in conjunction with
+     * TimespanConfig.
+     * 
+ * + * int32 rows_limit_percent = 6; + * @param value The rowsLimitPercent to set. + * @return This builder for chaining. + */ + public Builder setRowsLimitPercent(int value) { + + rowsLimitPercent_ = value; + onChanged(); + return this; + } + /** + *
+     * Max percentage of rows to scan. The rest are omitted. The number of rows
+     * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
+     * 100 means no limit. Defaults to 0. Only one of rows_limit and
+     * rows_limit_percent can be specified. Cannot be used in conjunction with
+     * TimespanConfig.
+     * 
+ * + * int32 rows_limit_percent = 6; + * @return This builder for chaining. + */ + public Builder clearRowsLimitPercent() { + + rowsLimitPercent_ = 0; + onChanged(); + return this; + } + + private int sampleMethod_ = 0; + /** + * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; + * @return The enum numeric value on the wire for sampleMethod. + */ + @java.lang.Override public int getSampleMethodValue() { + return sampleMethod_; + } + /** + * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; + * @param value The enum numeric value on the wire for sampleMethod to set. + * @return This builder for chaining. + */ + public Builder setSampleMethodValue(int value) { + + sampleMethod_ = value; + onChanged(); + return this; + } + /** + * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; + * @return The sampleMethod. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod getSampleMethod() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod result = com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.valueOf(sampleMethod_); + return result == null ? com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.UNRECOGNIZED : result; + } + /** + * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; + * @param value The sampleMethod to set. + * @return This builder for chaining. + */ + public Builder setSampleMethod(com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod value) { + if (value == null) { + throw new NullPointerException(); + } + + sampleMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; + * @return This builder for chaining. + */ + public Builder clearSampleMethod() { + + sampleMethod_ = 0; + onChanged(); + return this; + } + + private java.util.List excludedFields_ = + java.util.Collections.emptyList(); + private void ensureExcludedFieldsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + excludedFields_ = new java.util.ArrayList(excludedFields_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> excludedFieldsBuilder_; + + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public java.util.List getExcludedFieldsList() { + if (excludedFieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(excludedFields_); + } else { + return excludedFieldsBuilder_.getMessageList(); + } + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public int getExcludedFieldsCount() { + if (excludedFieldsBuilder_ == null) { + return excludedFields_.size(); + } else { + return excludedFieldsBuilder_.getCount(); + } + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public com.google.privacy.dlp.v2.FieldId getExcludedFields(int index) { + if (excludedFieldsBuilder_ == null) { + return excludedFields_.get(index); + } else { + return excludedFieldsBuilder_.getMessage(index); + } + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public Builder setExcludedFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (excludedFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedFieldsIsMutable(); + excludedFields_.set(index, value); + onChanged(); + } else { + excludedFieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public Builder setExcludedFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (excludedFieldsBuilder_ == null) { + ensureExcludedFieldsIsMutable(); + excludedFields_.set(index, builderForValue.build()); + onChanged(); + } else { + excludedFieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public Builder addExcludedFields(com.google.privacy.dlp.v2.FieldId value) { + if (excludedFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedFieldsIsMutable(); + excludedFields_.add(value); + onChanged(); + } else { + excludedFieldsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public Builder addExcludedFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (excludedFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludedFieldsIsMutable(); + excludedFields_.add(index, value); + onChanged(); + } else { + excludedFieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public Builder addExcludedFields( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (excludedFieldsBuilder_ == null) { + ensureExcludedFieldsIsMutable(); + excludedFields_.add(builderForValue.build()); + onChanged(); + } else { + excludedFieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public Builder addExcludedFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (excludedFieldsBuilder_ == null) { + ensureExcludedFieldsIsMutable(); + excludedFields_.add(index, builderForValue.build()); + onChanged(); + } else { + excludedFieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public Builder addAllExcludedFields( + java.lang.Iterable values) { + if (excludedFieldsBuilder_ == null) { + ensureExcludedFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, excludedFields_); + onChanged(); + } else { + excludedFieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public Builder clearExcludedFields() { + if (excludedFieldsBuilder_ == null) { + excludedFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + excludedFieldsBuilder_.clear(); + } + return this; + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public Builder removeExcludedFields(int index) { + if (excludedFieldsBuilder_ == null) { + ensureExcludedFieldsIsMutable(); + excludedFields_.remove(index); + onChanged(); + } else { + excludedFieldsBuilder_.remove(index); + } + return this; + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getExcludedFieldsBuilder( + int index) { + return getExcludedFieldsFieldBuilder().getBuilder(index); + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getExcludedFieldsOrBuilder( + int index) { + if (excludedFieldsBuilder_ == null) { + return excludedFields_.get(index); } else { + return excludedFieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public java.util.List + getExcludedFieldsOrBuilderList() { + if (excludedFieldsBuilder_ != null) { + return excludedFieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(excludedFields_); + } + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addExcludedFieldsBuilder() { + return getExcludedFieldsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addExcludedFieldsBuilder( + int index) { + return getExcludedFieldsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * References to fields excluded from scanning. This allows you to skip
+     * inspection of entire columns which you know have no findings.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + public java.util.List + getExcludedFieldsBuilderList() { + return getExcludedFieldsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getExcludedFieldsFieldBuilder() { + if (excludedFieldsBuilder_ == null) { + excludedFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + excludedFields_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + excludedFields_ = null; + } + return excludedFieldsBuilder_; + } + + private java.util.List includedFields_ = + java.util.Collections.emptyList(); + private void ensureIncludedFieldsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + includedFields_ = new java.util.ArrayList(includedFields_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> includedFieldsBuilder_; + + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public java.util.List getIncludedFieldsList() { + if (includedFieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(includedFields_); + } else { + return includedFieldsBuilder_.getMessageList(); + } + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public int getIncludedFieldsCount() { + if (includedFieldsBuilder_ == null) { + return includedFields_.size(); + } else { + return includedFieldsBuilder_.getCount(); + } + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public com.google.privacy.dlp.v2.FieldId getIncludedFields(int index) { + if (includedFieldsBuilder_ == null) { + return includedFields_.get(index); + } else { + return includedFieldsBuilder_.getMessage(index); + } + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public Builder setIncludedFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (includedFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludedFieldsIsMutable(); + includedFields_.set(index, value); + onChanged(); + } else { + includedFieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public Builder setIncludedFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (includedFieldsBuilder_ == null) { + ensureIncludedFieldsIsMutable(); + includedFields_.set(index, builderForValue.build()); + onChanged(); + } else { + includedFieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public Builder addIncludedFields(com.google.privacy.dlp.v2.FieldId value) { + if (includedFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludedFieldsIsMutable(); + includedFields_.add(value); + onChanged(); + } else { + includedFieldsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public Builder addIncludedFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (includedFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludedFieldsIsMutable(); + includedFields_.add(index, value); + onChanged(); + } else { + includedFieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public Builder addIncludedFields( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (includedFieldsBuilder_ == null) { + ensureIncludedFieldsIsMutable(); + includedFields_.add(builderForValue.build()); + onChanged(); + } else { + includedFieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public Builder addIncludedFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (includedFieldsBuilder_ == null) { + ensureIncludedFieldsIsMutable(); + includedFields_.add(index, builderForValue.build()); + onChanged(); + } else { + includedFieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public Builder addAllIncludedFields( + java.lang.Iterable values) { + if (includedFieldsBuilder_ == null) { + ensureIncludedFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, includedFields_); + onChanged(); + } else { + includedFieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public Builder clearIncludedFields() { + if (includedFieldsBuilder_ == null) { + includedFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + includedFieldsBuilder_.clear(); + } + return this; + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public Builder removeIncludedFields(int index) { + if (includedFieldsBuilder_ == null) { + ensureIncludedFieldsIsMutable(); + includedFields_.remove(index); + onChanged(); + } else { + includedFieldsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getIncludedFieldsBuilder( + int index) { + return getIncludedFieldsFieldBuilder().getBuilder(index); + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getIncludedFieldsOrBuilder( + int index) { + if (includedFieldsBuilder_ == null) { + return includedFields_.get(index); } else { + return includedFieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public java.util.List + getIncludedFieldsOrBuilderList() { + if (includedFieldsBuilder_ != null) { + return includedFieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(includedFields_); + } + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addIncludedFieldsBuilder() { + return getIncludedFieldsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addIncludedFieldsBuilder( + int index) { + return getIncludedFieldsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * Limit scanning only to these fields.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + public java.util.List + getIncludedFieldsBuilderList() { + return getIncludedFieldsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getIncludedFieldsFieldBuilder() { + if (includedFieldsBuilder_ == null) { + includedFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + includedFields_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + includedFields_ = null; + } + return includedFieldsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BigQueryOptions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BigQueryOptions) + private static final com.google.privacy.dlp.v2.BigQueryOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BigQueryOptions(); + } + + public static com.google.privacy.dlp.v2.BigQueryOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptionsOrBuilder.java new file mode 100644 index 000000000000..6b5cb5f22552 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptionsOrBuilder.java @@ -0,0 +1,231 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface BigQueryOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BigQueryOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return Whether the tableReference field is set. + */ + boolean hasTableReference(); + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + * @return The tableReference. + */ + com.google.privacy.dlp.v2.BigQueryTable getTableReference(); + /** + *
+   * Complete BigQuery table reference.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder(); + + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + java.util.List + getIdentifyingFieldsList(); + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index); + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + int getIdentifyingFieldsCount(); + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + java.util.List + getIdentifyingFieldsOrBuilderList(); + /** + *
+   * Table fields that may uniquely identify a row within the table. When
+   * `actions.saveFindings.outputConfig.table` is specified, the values of
+   * columns specified here are available in the output table under
+   * `location.content_locations.record_location.record_key.id_values`. Nested
+   * fields such as `person.birthdate.year` are allowed.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( + int index); + + /** + *
+   * Max number of rows to scan. If the table has more rows than this value, the
+   * rest of the rows are omitted. If not set, or if set to 0, all rows will be
+   * scanned. Only one of rows_limit and rows_limit_percent can be specified.
+   * Cannot be used in conjunction with TimespanConfig.
+   * 
+ * + * int64 rows_limit = 3; + * @return The rowsLimit. + */ + long getRowsLimit(); + + /** + *
+   * Max percentage of rows to scan. The rest are omitted. The number of rows
+   * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
+   * 100 means no limit. Defaults to 0. Only one of rows_limit and
+   * rows_limit_percent can be specified. Cannot be used in conjunction with
+   * TimespanConfig.
+   * 
+ * + * int32 rows_limit_percent = 6; + * @return The rowsLimitPercent. + */ + int getRowsLimitPercent(); + + /** + * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; + * @return The enum numeric value on the wire for sampleMethod. + */ + int getSampleMethodValue(); + /** + * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; + * @return The sampleMethod. + */ + com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod getSampleMethod(); + + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + java.util.List + getExcludedFieldsList(); + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + com.google.privacy.dlp.v2.FieldId getExcludedFields(int index); + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + int getExcludedFieldsCount(); + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + java.util.List + getExcludedFieldsOrBuilderList(); + /** + *
+   * References to fields excluded from scanning. This allows you to skip
+   * inspection of entire columns which you know have no findings.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getExcludedFieldsOrBuilder( + int index); + + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + java.util.List + getIncludedFieldsList(); + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + com.google.privacy.dlp.v2.FieldId getIncludedFields(int index); + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + int getIncludedFieldsCount(); + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + java.util.List + getIncludedFieldsOrBuilderList(); + /** + *
+   * Limit scanning only to these fields.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getIncludedFieldsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTable.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTable.java new file mode 100644 index 000000000000..e41dbab7ed31 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTable.java @@ -0,0 +1,942 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Message defining the location of a BigQuery table. A table is uniquely
+ * identified  by its project_id, dataset_id, and table_name. Within a query
+ * a table is often referenced with a string in the format of:
+ * `<project_id>:<dataset_id>.<table_id>` or
+ * `<project_id>.<dataset_id>.<table_id>`.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BigQueryTable} + */ +public final class BigQueryTable extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BigQueryTable) + BigQueryTableOrBuilder { +private static final long serialVersionUID = 0L; + // Use BigQueryTable.newBuilder() to construct. + private BigQueryTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BigQueryTable() { + projectId_ = ""; + datasetId_ = ""; + tableId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BigQueryTable(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BigQueryTable( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + datasetId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + tableId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BigQueryTable.class, com.google.privacy.dlp.v2.BigQueryTable.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object projectId_; + /** + *
+   * The Google Cloud Platform project ID of the project containing the table.
+   * If omitted, project ID is inferred from the API call.
+   * 
+ * + * string project_id = 1; + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + *
+   * The Google Cloud Platform project ID of the project containing the table.
+   * If omitted, project ID is inferred from the API call.
+   * 
+ * + * string project_id = 1; + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object datasetId_; + /** + *
+   * Dataset ID of the table.
+   * 
+ * + * string dataset_id = 2; + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } + } + /** + *
+   * Dataset ID of the table.
+   * 
+ * + * string dataset_id = 2; + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object tableId_; + /** + *
+   * Name of the table.
+   * 
+ * + * string table_id = 3; + * @return The tableId. + */ + @java.lang.Override + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } + } + /** + *
+   * Name of the table.
+   * 
+ * + * string table_id = 3; + * @return The bytes for tableId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.BigQueryTable)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.BigQueryTable other = (com.google.privacy.dlp.v2.BigQueryTable) obj; + + if (!getProjectId() + .equals(other.getProjectId())) return false; + if (!getDatasetId() + .equals(other.getDatasetId())) return false; + if (!getTableId() + .equals(other.getTableId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.BigQueryTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Message defining the location of a BigQuery table. A table is uniquely
+   * identified  by its project_id, dataset_id, and table_name. Within a query
+   * a table is often referenced with a string in the format of:
+   * `<project_id>:<dataset_id>.<table_id>` or
+   * `<project_id>.<dataset_id>.<table_id>`.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BigQueryTable} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BigQueryTable) + com.google.privacy.dlp.v2.BigQueryTableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BigQueryTable.class, com.google.privacy.dlp.v2.BigQueryTable.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.BigQueryTable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + projectId_ = ""; + + datasetId_ = ""; + + tableId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable build() { + com.google.privacy.dlp.v2.BigQueryTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable buildPartial() { + com.google.privacy.dlp.v2.BigQueryTable result = new com.google.privacy.dlp.v2.BigQueryTable(this); + result.projectId_ = projectId_; + result.datasetId_ = datasetId_; + result.tableId_ = tableId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.BigQueryTable) { + return mergeFrom((com.google.privacy.dlp.v2.BigQueryTable)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.BigQueryTable other) { + if (other == com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance()) return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.BigQueryTable parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.BigQueryTable) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object projectId_ = ""; + /** + *
+     * The Google Cloud Platform project ID of the project containing the table.
+     * If omitted, project ID is inferred from the API call.
+     * 
+ * + * string project_id = 1; + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Google Cloud Platform project ID of the project containing the table.
+     * If omitted, project ID is inferred from the API call.
+     * 
+ * + * string project_id = 1; + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Google Cloud Platform project ID of the project containing the table.
+     * If omitted, project ID is inferred from the API call.
+     * 
+ * + * string project_id = 1; + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + *
+     * The Google Cloud Platform project ID of the project containing the table.
+     * If omitted, project ID is inferred from the API call.
+     * 
+ * + * string project_id = 1; + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + *
+     * The Google Cloud Platform project ID of the project containing the table.
+     * If omitted, project ID is inferred from the API call.
+     * 
+ * + * string project_id = 1; + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private java.lang.Object datasetId_ = ""; + /** + *
+     * Dataset ID of the table.
+     * 
+ * + * string dataset_id = 2; + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Dataset ID of the table.
+     * 
+ * + * string dataset_id = 2; + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString + getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Dataset ID of the table.
+     * 
+ * + * string dataset_id = 2; + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetId_ = value; + onChanged(); + return this; + } + /** + *
+     * Dataset ID of the table.
+     * 
+ * + * string dataset_id = 2; + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + + datasetId_ = getDefaultInstance().getDatasetId(); + onChanged(); + return this; + } + /** + *
+     * Dataset ID of the table.
+     * 
+ * + * string dataset_id = 2; + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetId_ = value; + onChanged(); + return this; + } + + private java.lang.Object tableId_ = ""; + /** + *
+     * Name of the table.
+     * 
+ * + * string table_id = 3; + * @return The tableId. + */ + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the table.
+     * 
+ * + * string table_id = 3; + * @return The bytes for tableId. + */ + public com.google.protobuf.ByteString + getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the table.
+     * 
+ * + * string table_id = 3; + * @param value The tableId to set. + * @return This builder for chaining. + */ + public Builder setTableId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tableId_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the table.
+     * 
+ * + * string table_id = 3; + * @return This builder for chaining. + */ + public Builder clearTableId() { + + tableId_ = getDefaultInstance().getTableId(); + onChanged(); + return this; + } + /** + *
+     * Name of the table.
+     * 
+ * + * string table_id = 3; + * @param value The bytes for tableId to set. + * @return This builder for chaining. + */ + public Builder setTableIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tableId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BigQueryTable) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BigQueryTable) + private static final com.google.privacy.dlp.v2.BigQueryTable DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BigQueryTable(); + } + + public static com.google.privacy.dlp.v2.BigQueryTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryTable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryTable(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTableOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTableOrBuilder.java new file mode 100644 index 000000000000..98f790241772 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTableOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface BigQueryTableOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BigQueryTable) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google Cloud Platform project ID of the project containing the table.
+   * If omitted, project ID is inferred from the API call.
+   * 
+ * + * string project_id = 1; + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + *
+   * The Google Cloud Platform project ID of the project containing the table.
+   * If omitted, project ID is inferred from the API call.
+   * 
+ * + * string project_id = 1; + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString + getProjectIdBytes(); + + /** + *
+   * Dataset ID of the table.
+   * 
+ * + * string dataset_id = 2; + * @return The datasetId. + */ + java.lang.String getDatasetId(); + /** + *
+   * Dataset ID of the table.
+   * 
+ * + * string dataset_id = 2; + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString + getDatasetIdBytes(); + + /** + *
+   * Name of the table.
+   * 
+ * + * string table_id = 3; + * @return The tableId. + */ + java.lang.String getTableId(); + /** + *
+   * Name of the table.
+   * 
+ * + * string table_id = 3; + * @return The bytes for tableId. + */ + com.google.protobuf.ByteString + getTableIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBox.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBox.java new file mode 100644 index 000000000000..ad27898ef3ec --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBox.java @@ -0,0 +1,749 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Bounding box encompassing detected text within an image.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BoundingBox} + */ +public final class BoundingBox extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BoundingBox) + BoundingBoxOrBuilder { +private static final long serialVersionUID = 0L; + // Use BoundingBox.newBuilder() to construct. + private BoundingBox(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoundingBox() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoundingBox(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoundingBox( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + top_ = input.readInt32(); + break; + } + case 16: { + + left_ = input.readInt32(); + break; + } + case 24: { + + width_ = input.readInt32(); + break; + } + case 32: { + + height_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BoundingBox.class, com.google.privacy.dlp.v2.BoundingBox.Builder.class); + } + + public static final int TOP_FIELD_NUMBER = 1; + private int top_; + /** + *
+   * Top coordinate of the bounding box. (0,0) is upper left.
+   * 
+ * + * int32 top = 1; + * @return The top. + */ + @java.lang.Override + public int getTop() { + return top_; + } + + public static final int LEFT_FIELD_NUMBER = 2; + private int left_; + /** + *
+   * Left coordinate of the bounding box. (0,0) is upper left.
+   * 
+ * + * int32 left = 2; + * @return The left. + */ + @java.lang.Override + public int getLeft() { + return left_; + } + + public static final int WIDTH_FIELD_NUMBER = 3; + private int width_; + /** + *
+   * Width of the bounding box in pixels.
+   * 
+ * + * int32 width = 3; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 4; + private int height_; + /** + *
+   * Height of the bounding box in pixels.
+   * 
+ * + * int32 height = 4; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (top_ != 0) { + output.writeInt32(1, top_); + } + if (left_ != 0) { + output.writeInt32(2, left_); + } + if (width_ != 0) { + output.writeInt32(3, width_); + } + if (height_ != 0) { + output.writeInt32(4, height_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (top_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, top_); + } + if (left_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, left_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, height_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.BoundingBox)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.BoundingBox other = (com.google.privacy.dlp.v2.BoundingBox) obj; + + if (getTop() + != other.getTop()) return false; + if (getLeft() + != other.getLeft()) return false; + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOP_FIELD_NUMBER; + hash = (53 * hash) + getTop(); + hash = (37 * hash) + LEFT_FIELD_NUMBER; + hash = (53 * hash) + getLeft(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.BoundingBox parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BoundingBox parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BoundingBox parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BoundingBox parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BoundingBox parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BoundingBox parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BoundingBox parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BoundingBox parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BoundingBox parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BoundingBox parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BoundingBox parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BoundingBox parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.BoundingBox prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Bounding box encompassing detected text within an image.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BoundingBox} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BoundingBox) + com.google.privacy.dlp.v2.BoundingBoxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BoundingBox.class, com.google.privacy.dlp.v2.BoundingBox.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.BoundingBox.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + top_ = 0; + + left_ = 0; + + width_ = 0; + + height_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BoundingBox getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BoundingBox build() { + com.google.privacy.dlp.v2.BoundingBox result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BoundingBox buildPartial() { + com.google.privacy.dlp.v2.BoundingBox result = new com.google.privacy.dlp.v2.BoundingBox(this); + result.top_ = top_; + result.left_ = left_; + result.width_ = width_; + result.height_ = height_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.BoundingBox) { + return mergeFrom((com.google.privacy.dlp.v2.BoundingBox)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.BoundingBox other) { + if (other == com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance()) return this; + if (other.getTop() != 0) { + setTop(other.getTop()); + } + if (other.getLeft() != 0) { + setLeft(other.getLeft()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.BoundingBox parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.BoundingBox) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int top_ ; + /** + *
+     * Top coordinate of the bounding box. (0,0) is upper left.
+     * 
+ * + * int32 top = 1; + * @return The top. + */ + @java.lang.Override + public int getTop() { + return top_; + } + /** + *
+     * Top coordinate of the bounding box. (0,0) is upper left.
+     * 
+ * + * int32 top = 1; + * @param value The top to set. + * @return This builder for chaining. + */ + public Builder setTop(int value) { + + top_ = value; + onChanged(); + return this; + } + /** + *
+     * Top coordinate of the bounding box. (0,0) is upper left.
+     * 
+ * + * int32 top = 1; + * @return This builder for chaining. + */ + public Builder clearTop() { + + top_ = 0; + onChanged(); + return this; + } + + private int left_ ; + /** + *
+     * Left coordinate of the bounding box. (0,0) is upper left.
+     * 
+ * + * int32 left = 2; + * @return The left. + */ + @java.lang.Override + public int getLeft() { + return left_; + } + /** + *
+     * Left coordinate of the bounding box. (0,0) is upper left.
+     * 
+ * + * int32 left = 2; + * @param value The left to set. + * @return This builder for chaining. + */ + public Builder setLeft(int value) { + + left_ = value; + onChanged(); + return this; + } + /** + *
+     * Left coordinate of the bounding box. (0,0) is upper left.
+     * 
+ * + * int32 left = 2; + * @return This builder for chaining. + */ + public Builder clearLeft() { + + left_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + *
+     * Width of the bounding box in pixels.
+     * 
+ * + * int32 width = 3; + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + *
+     * Width of the bounding box in pixels.
+     * 
+ * + * int32 width = 3; + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + onChanged(); + return this; + } + /** + *
+     * Width of the bounding box in pixels.
+     * 
+ * + * int32 width = 3; + * @return This builder for chaining. + */ + public Builder clearWidth() { + + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+     * Height of the bounding box in pixels.
+     * 
+ * + * int32 height = 4; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+     * Height of the bounding box in pixels.
+     * 
+ * + * int32 height = 4; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+     * Height of the bounding box in pixels.
+     * 
+ * + * int32 height = 4; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BoundingBox) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BoundingBox) + private static final com.google.privacy.dlp.v2.BoundingBox DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BoundingBox(); + } + + public static com.google.privacy.dlp.v2.BoundingBox getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoundingBox parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoundingBox(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BoundingBox getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBoxOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBoxOrBuilder.java new file mode 100644 index 000000000000..ffe253695939 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBoxOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface BoundingBoxOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BoundingBox) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Top coordinate of the bounding box. (0,0) is upper left.
+   * 
+ * + * int32 top = 1; + * @return The top. + */ + int getTop(); + + /** + *
+   * Left coordinate of the bounding box. (0,0) is upper left.
+   * 
+ * + * int32 left = 2; + * @return The left. + */ + int getLeft(); + + /** + *
+   * Width of the bounding box in pixels.
+   * 
+ * + * int32 width = 3; + * @return The width. + */ + int getWidth(); + + /** + *
+   * Height of the bounding box in pixels.
+   * 
+ * + * int32 height = 4; + * @return The height. + */ + int getHeight(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java new file mode 100644 index 000000000000..feadd3089d00 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java @@ -0,0 +1,2120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Generalization function that buckets values based on ranges. The ranges and
+ * replacement values are dynamically provided by the user for custom behavior,
+ * such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
+ * This can be used on
+ * data of type: number, long, string, timestamp.
+ * If the bound `Value` type differs from the type of data being transformed, we
+ * will first attempt converting the type of the data to be transformed to match
+ * the type of the bound before comparing.
+ * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig} + */ +public final class BucketingConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BucketingConfig) + BucketingConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use BucketingConfig.newBuilder() to construct. + private BucketingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BucketingConfig() { + buckets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BucketingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BucketingConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + buckets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + buckets_.add( + input.readMessage(com.google.privacy.dlp.v2.BucketingConfig.Bucket.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BucketingConfig.class, com.google.privacy.dlp.v2.BucketingConfig.Builder.class); + } + + public interface BucketOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BucketingConfig.Bucket) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Lower bound of the range, inclusive. Type should be the same as max if
+     * used.
+     * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + * @return Whether the min field is set. + */ + boolean hasMin(); + /** + *
+     * Lower bound of the range, inclusive. Type should be the same as max if
+     * used.
+     * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + * @return The min. + */ + com.google.privacy.dlp.v2.Value getMin(); + /** + *
+     * Lower bound of the range, inclusive. Type should be the same as max if
+     * used.
+     * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getMinOrBuilder(); + + /** + *
+     * Upper bound of the range, exclusive; type must match min.
+     * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + * @return Whether the max field is set. + */ + boolean hasMax(); + /** + *
+     * Upper bound of the range, exclusive; type must match min.
+     * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + * @return The max. + */ + com.google.privacy.dlp.v2.Value getMax(); + /** + *
+     * Upper bound of the range, exclusive; type must match min.
+     * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getMaxOrBuilder(); + + /** + *
+     * Required. Replacement value for this bucket.
+     * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the replacementValue field is set. + */ + boolean hasReplacementValue(); + /** + *
+     * Required. Replacement value for this bucket.
+     * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The replacementValue. + */ + com.google.privacy.dlp.v2.Value getReplacementValue(); + /** + *
+     * Required. Replacement value for this bucket.
+     * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder(); + } + /** + *
+   * Bucket is represented as a range, along with replacement values.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig.Bucket} + */ + public static final class Bucket extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BucketingConfig.Bucket) + BucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use Bucket.newBuilder() to construct. + private Bucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Bucket() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Bucket(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Bucket( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (min_ != null) { + subBuilder = min_.toBuilder(); + } + min_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(min_); + min_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (max_ != null) { + subBuilder = max_.toBuilder(); + } + max_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(max_); + max_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (replacementValue_ != null) { + subBuilder = replacementValue_.toBuilder(); + } + replacementValue_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(replacementValue_); + replacementValue_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BucketingConfig.Bucket.class, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder.class); + } + + public static final int MIN_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.Value min_; + /** + *
+     * Lower bound of the range, inclusive. Type should be the same as max if
+     * used.
+     * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + * @return Whether the min field is set. + */ + @java.lang.Override + public boolean hasMin() { + return min_ != null; + } + /** + *
+     * Lower bound of the range, inclusive. Type should be the same as max if
+     * used.
+     * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + * @return The min. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getMin() { + return min_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : min_; + } + /** + *
+     * Lower bound of the range, inclusive. Type should be the same as max if
+     * used.
+     * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getMinOrBuilder() { + return getMin(); + } + + public static final int MAX_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.Value max_; + /** + *
+     * Upper bound of the range, exclusive; type must match min.
+     * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + * @return Whether the max field is set. + */ + @java.lang.Override + public boolean hasMax() { + return max_ != null; + } + /** + *
+     * Upper bound of the range, exclusive; type must match min.
+     * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + * @return The max. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getMax() { + return max_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : max_; + } + /** + *
+     * Upper bound of the range, exclusive; type must match min.
+     * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getMaxOrBuilder() { + return getMax(); + } + + public static final int REPLACEMENT_VALUE_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.Value replacementValue_; + /** + *
+     * Required. Replacement value for this bucket.
+     * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the replacementValue field is set. + */ + @java.lang.Override + public boolean hasReplacementValue() { + return replacementValue_ != null; + } + /** + *
+     * Required. Replacement value for this bucket.
+     * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The replacementValue. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getReplacementValue() { + return replacementValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : replacementValue_; + } + /** + *
+     * Required. Replacement value for this bucket.
+     * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder() { + return getReplacementValue(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (min_ != null) { + output.writeMessage(1, getMin()); + } + if (max_ != null) { + output.writeMessage(2, getMax()); + } + if (replacementValue_ != null) { + output.writeMessage(3, getReplacementValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (min_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMin()); + } + if (max_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMax()); + } + if (replacementValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getReplacementValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.BucketingConfig.Bucket)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.BucketingConfig.Bucket other = (com.google.privacy.dlp.v2.BucketingConfig.Bucket) obj; + + if (hasMin() != other.hasMin()) return false; + if (hasMin()) { + if (!getMin() + .equals(other.getMin())) return false; + } + if (hasMax() != other.hasMax()) return false; + if (hasMax()) { + if (!getMax() + .equals(other.getMax())) return false; + } + if (hasReplacementValue() != other.hasReplacementValue()) return false; + if (hasReplacementValue()) { + if (!getReplacementValue() + .equals(other.getReplacementValue())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMin()) { + hash = (37 * hash) + MIN_FIELD_NUMBER; + hash = (53 * hash) + getMin().hashCode(); + } + if (hasMax()) { + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = (53 * hash) + getMax().hashCode(); + } + if (hasReplacementValue()) { + hash = (37 * hash) + REPLACEMENT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getReplacementValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.BucketingConfig.Bucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Bucket is represented as a range, along with replacement values.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig.Bucket} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BucketingConfig.Bucket) + com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BucketingConfig.Bucket.class, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.BucketingConfig.Bucket.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (minBuilder_ == null) { + min_ = null; + } else { + min_ = null; + minBuilder_ = null; + } + if (maxBuilder_ == null) { + max_ = null; + } else { + max_ = null; + maxBuilder_ = null; + } + if (replacementValueBuilder_ == null) { + replacementValue_ = null; + } else { + replacementValue_ = null; + replacementValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig.Bucket getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.BucketingConfig.Bucket.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig.Bucket build() { + com.google.privacy.dlp.v2.BucketingConfig.Bucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig.Bucket buildPartial() { + com.google.privacy.dlp.v2.BucketingConfig.Bucket result = new com.google.privacy.dlp.v2.BucketingConfig.Bucket(this); + if (minBuilder_ == null) { + result.min_ = min_; + } else { + result.min_ = minBuilder_.build(); + } + if (maxBuilder_ == null) { + result.max_ = max_; + } else { + result.max_ = maxBuilder_.build(); + } + if (replacementValueBuilder_ == null) { + result.replacementValue_ = replacementValue_; + } else { + result.replacementValue_ = replacementValueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.BucketingConfig.Bucket) { + return mergeFrom((com.google.privacy.dlp.v2.BucketingConfig.Bucket)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.BucketingConfig.Bucket other) { + if (other == com.google.privacy.dlp.v2.BucketingConfig.Bucket.getDefaultInstance()) return this; + if (other.hasMin()) { + mergeMin(other.getMin()); + } + if (other.hasMax()) { + mergeMax(other.getMax()); + } + if (other.hasReplacementValue()) { + mergeReplacementValue(other.getReplacementValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.BucketingConfig.Bucket parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.BucketingConfig.Bucket) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.Value min_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> minBuilder_; + /** + *
+       * Lower bound of the range, inclusive. Type should be the same as max if
+       * used.
+       * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + * @return Whether the min field is set. + */ + public boolean hasMin() { + return minBuilder_ != null || min_ != null; + } + /** + *
+       * Lower bound of the range, inclusive. Type should be the same as max if
+       * used.
+       * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + * @return The min. + */ + public com.google.privacy.dlp.v2.Value getMin() { + if (minBuilder_ == null) { + return min_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : min_; + } else { + return minBuilder_.getMessage(); + } + } + /** + *
+       * Lower bound of the range, inclusive. Type should be the same as max if
+       * used.
+       * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + */ + public Builder setMin(com.google.privacy.dlp.v2.Value value) { + if (minBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + min_ = value; + onChanged(); + } else { + minBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Lower bound of the range, inclusive. Type should be the same as max if
+       * used.
+       * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + */ + public Builder setMin( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (minBuilder_ == null) { + min_ = builderForValue.build(); + onChanged(); + } else { + minBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Lower bound of the range, inclusive. Type should be the same as max if
+       * used.
+       * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + */ + public Builder mergeMin(com.google.privacy.dlp.v2.Value value) { + if (minBuilder_ == null) { + if (min_ != null) { + min_ = + com.google.privacy.dlp.v2.Value.newBuilder(min_).mergeFrom(value).buildPartial(); + } else { + min_ = value; + } + onChanged(); + } else { + minBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Lower bound of the range, inclusive. Type should be the same as max if
+       * used.
+       * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + */ + public Builder clearMin() { + if (minBuilder_ == null) { + min_ = null; + onChanged(); + } else { + min_ = null; + minBuilder_ = null; + } + + return this; + } + /** + *
+       * Lower bound of the range, inclusive. Type should be the same as max if
+       * used.
+       * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getMinBuilder() { + + onChanged(); + return getMinFieldBuilder().getBuilder(); + } + /** + *
+       * Lower bound of the range, inclusive. Type should be the same as max if
+       * used.
+       * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getMinOrBuilder() { + if (minBuilder_ != null) { + return minBuilder_.getMessageOrBuilder(); + } else { + return min_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : min_; + } + } + /** + *
+       * Lower bound of the range, inclusive. Type should be the same as max if
+       * used.
+       * 
+ * + * .google.privacy.dlp.v2.Value min = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getMinFieldBuilder() { + if (minBuilder_ == null) { + minBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getMin(), + getParentForChildren(), + isClean()); + min_ = null; + } + return minBuilder_; + } + + private com.google.privacy.dlp.v2.Value max_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> maxBuilder_; + /** + *
+       * Upper bound of the range, exclusive; type must match min.
+       * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + * @return Whether the max field is set. + */ + public boolean hasMax() { + return maxBuilder_ != null || max_ != null; + } + /** + *
+       * Upper bound of the range, exclusive; type must match min.
+       * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + * @return The max. + */ + public com.google.privacy.dlp.v2.Value getMax() { + if (maxBuilder_ == null) { + return max_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : max_; + } else { + return maxBuilder_.getMessage(); + } + } + /** + *
+       * Upper bound of the range, exclusive; type must match min.
+       * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + */ + public Builder setMax(com.google.privacy.dlp.v2.Value value) { + if (maxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + max_ = value; + onChanged(); + } else { + maxBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Upper bound of the range, exclusive; type must match min.
+       * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + */ + public Builder setMax( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (maxBuilder_ == null) { + max_ = builderForValue.build(); + onChanged(); + } else { + maxBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Upper bound of the range, exclusive; type must match min.
+       * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + */ + public Builder mergeMax(com.google.privacy.dlp.v2.Value value) { + if (maxBuilder_ == null) { + if (max_ != null) { + max_ = + com.google.privacy.dlp.v2.Value.newBuilder(max_).mergeFrom(value).buildPartial(); + } else { + max_ = value; + } + onChanged(); + } else { + maxBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Upper bound of the range, exclusive; type must match min.
+       * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + */ + public Builder clearMax() { + if (maxBuilder_ == null) { + max_ = null; + onChanged(); + } else { + max_ = null; + maxBuilder_ = null; + } + + return this; + } + /** + *
+       * Upper bound of the range, exclusive; type must match min.
+       * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + */ + public com.google.privacy.dlp.v2.Value.Builder getMaxBuilder() { + + onChanged(); + return getMaxFieldBuilder().getBuilder(); + } + /** + *
+       * Upper bound of the range, exclusive; type must match min.
+       * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getMaxOrBuilder() { + if (maxBuilder_ != null) { + return maxBuilder_.getMessageOrBuilder(); + } else { + return max_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : max_; + } + } + /** + *
+       * Upper bound of the range, exclusive; type must match min.
+       * 
+ * + * .google.privacy.dlp.v2.Value max = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getMaxFieldBuilder() { + if (maxBuilder_ == null) { + maxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getMax(), + getParentForChildren(), + isClean()); + max_ = null; + } + return maxBuilder_; + } + + private com.google.privacy.dlp.v2.Value replacementValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> replacementValueBuilder_; + /** + *
+       * Required. Replacement value for this bucket.
+       * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the replacementValue field is set. + */ + public boolean hasReplacementValue() { + return replacementValueBuilder_ != null || replacementValue_ != null; + } + /** + *
+       * Required. Replacement value for this bucket.
+       * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The replacementValue. + */ + public com.google.privacy.dlp.v2.Value getReplacementValue() { + if (replacementValueBuilder_ == null) { + return replacementValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : replacementValue_; + } else { + return replacementValueBuilder_.getMessage(); + } + } + /** + *
+       * Required. Replacement value for this bucket.
+       * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setReplacementValue(com.google.privacy.dlp.v2.Value value) { + if (replacementValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + replacementValue_ = value; + onChanged(); + } else { + replacementValueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Required. Replacement value for this bucket.
+       * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setReplacementValue( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (replacementValueBuilder_ == null) { + replacementValue_ = builderForValue.build(); + onChanged(); + } else { + replacementValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Required. Replacement value for this bucket.
+       * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeReplacementValue(com.google.privacy.dlp.v2.Value value) { + if (replacementValueBuilder_ == null) { + if (replacementValue_ != null) { + replacementValue_ = + com.google.privacy.dlp.v2.Value.newBuilder(replacementValue_).mergeFrom(value).buildPartial(); + } else { + replacementValue_ = value; + } + onChanged(); + } else { + replacementValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Required. Replacement value for this bucket.
+       * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearReplacementValue() { + if (replacementValueBuilder_ == null) { + replacementValue_ = null; + onChanged(); + } else { + replacementValue_ = null; + replacementValueBuilder_ = null; + } + + return this; + } + /** + *
+       * Required. Replacement value for this bucket.
+       * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.Value.Builder getReplacementValueBuilder() { + + onChanged(); + return getReplacementValueFieldBuilder().getBuilder(); + } + /** + *
+       * Required. Replacement value for this bucket.
+       * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder() { + if (replacementValueBuilder_ != null) { + return replacementValueBuilder_.getMessageOrBuilder(); + } else { + return replacementValue_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : replacementValue_; + } + } + /** + *
+       * Required. Replacement value for this bucket.
+       * 
+ * + * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getReplacementValueFieldBuilder() { + if (replacementValueBuilder_ == null) { + replacementValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getReplacementValue(), + getParentForChildren(), + isClean()); + replacementValue_ = null; + } + return replacementValueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BucketingConfig.Bucket) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BucketingConfig.Bucket) + private static final com.google.privacy.dlp.v2.BucketingConfig.Bucket DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BucketingConfig.Bucket(); + } + + public static com.google.privacy.dlp.v2.BucketingConfig.Bucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Bucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Bucket(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig.Bucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BUCKETS_FIELD_NUMBER = 1; + private java.util.List buckets_; + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + @java.lang.Override + public java.util.List getBucketsList() { + return buckets_; + } + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + @java.lang.Override + public java.util.List + getBucketsOrBuilderList() { + return buckets_; + } + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + @java.lang.Override + public int getBucketsCount() { + return buckets_.size(); + } + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig.Bucket getBuckets(int index) { + return buckets_.get(index); + } + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder getBucketsOrBuilder( + int index) { + return buckets_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < buckets_.size(); i++) { + output.writeMessage(1, buckets_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < buckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, buckets_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.BucketingConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.BucketingConfig other = (com.google.privacy.dlp.v2.BucketingConfig) obj; + + if (!getBucketsList() + .equals(other.getBucketsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBucketsCount() > 0) { + hash = (37 * hash) + BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getBucketsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.BucketingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Generalization function that buckets values based on ranges. The ranges and
+   * replacement values are dynamically provided by the user for custom behavior,
+   * such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
+   * This can be used on
+   * data of type: number, long, string, timestamp.
+   * If the bound `Value` type differs from the type of data being transformed, we
+   * will first attempt converting the type of the data to be transformed to match
+   * the type of the bound before comparing.
+   * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BucketingConfig) + com.google.privacy.dlp.v2.BucketingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.BucketingConfig.class, com.google.privacy.dlp.v2.BucketingConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.BucketingConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBucketsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bucketsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig build() { + com.google.privacy.dlp.v2.BucketingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig buildPartial() { + com.google.privacy.dlp.v2.BucketingConfig result = new com.google.privacy.dlp.v2.BucketingConfig(this); + int from_bitField0_ = bitField0_; + if (bucketsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.buckets_ = buckets_; + } else { + result.buckets_ = bucketsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.BucketingConfig) { + return mergeFrom((com.google.privacy.dlp.v2.BucketingConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.BucketingConfig other) { + if (other == com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance()) return this; + if (bucketsBuilder_ == null) { + if (!other.buckets_.isEmpty()) { + if (buckets_.isEmpty()) { + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketsIsMutable(); + buckets_.addAll(other.buckets_); + } + onChanged(); + } + } else { + if (!other.buckets_.isEmpty()) { + if (bucketsBuilder_.isEmpty()) { + bucketsBuilder_.dispose(); + bucketsBuilder_ = null; + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBucketsFieldBuilder() : null; + } else { + bucketsBuilder_.addAllMessages(other.buckets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.BucketingConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.BucketingConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List buckets_ = + java.util.Collections.emptyList(); + private void ensureBucketsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + buckets_ = new java.util.ArrayList(buckets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.BucketingConfig.Bucket, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder, com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder> bucketsBuilder_; + + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public java.util.List getBucketsList() { + if (bucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(buckets_); + } else { + return bucketsBuilder_.getMessageList(); + } + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public int getBucketsCount() { + if (bucketsBuilder_ == null) { + return buckets_.size(); + } else { + return bucketsBuilder_.getCount(); + } + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public com.google.privacy.dlp.v2.BucketingConfig.Bucket getBuckets(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessage(index); + } + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public Builder setBuckets( + int index, com.google.privacy.dlp.v2.BucketingConfig.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.set(index, value); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public Builder setBuckets( + int index, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public Builder addBuckets(com.google.privacy.dlp.v2.BucketingConfig.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(value); + onChanged(); + } else { + bucketsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public Builder addBuckets( + int index, com.google.privacy.dlp.v2.BucketingConfig.Bucket value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(index, value); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public Builder addBuckets( + com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public Builder addBuckets( + int index, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public Builder addAllBuckets( + java.lang.Iterable values) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, buckets_); + onChanged(); + } else { + bucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public Builder clearBuckets() { + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketsBuilder_.clear(); + } + return this; + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public Builder removeBuckets(int index) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.remove(index); + onChanged(); + } else { + bucketsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder getBucketsBuilder( + int index) { + return getBucketsFieldBuilder().getBuilder(index); + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder getBucketsOrBuilder( + int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); } else { + return bucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public java.util.List + getBucketsOrBuilderList() { + if (bucketsBuilder_ != null) { + return bucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(buckets_); + } + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder addBucketsBuilder() { + return getBucketsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.BucketingConfig.Bucket.getDefaultInstance()); + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder addBucketsBuilder( + int index) { + return getBucketsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.BucketingConfig.Bucket.getDefaultInstance()); + } + /** + *
+     * Set of buckets. Ranges must be non-overlapping.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + public java.util.List + getBucketsBuilderList() { + return getBucketsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.BucketingConfig.Bucket, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder, com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder> + getBucketsFieldBuilder() { + if (bucketsBuilder_ == null) { + bucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.BucketingConfig.Bucket, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder, com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder>( + buckets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + buckets_ = null; + } + return bucketsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BucketingConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BucketingConfig) + private static final com.google.privacy.dlp.v2.BucketingConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BucketingConfig(); + } + + public static com.google.privacy.dlp.v2.BucketingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BucketingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BucketingConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfigOrBuilder.java new file mode 100644 index 000000000000..1a8650db7b30 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfigOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface BucketingConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BucketingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + java.util.List + getBucketsList(); + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + com.google.privacy.dlp.v2.BucketingConfig.Bucket getBuckets(int index); + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + int getBucketsCount(); + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + java.util.List + getBucketsOrBuilderList(); + /** + *
+   * Set of buckets. Ranges must be non-overlapping.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; + */ + com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder getBucketsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java new file mode 100644 index 000000000000..9c67fc150179 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java @@ -0,0 +1,971 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Container for bytes to inspect or redact.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ByteContentItem} + */ +public final class ByteContentItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ByteContentItem) + ByteContentItemOrBuilder { +private static final long serialVersionUID = 0L; + // Use ByteContentItem.newBuilder() to construct. + private ByteContentItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ByteContentItem() { + type_ = 0; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ByteContentItem(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ByteContentItem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: { + + data_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ByteContentItem.class, com.google.privacy.dlp.v2.ByteContentItem.Builder.class); + } + + /** + *
+   * The type of data being sent for inspection. To learn more, see
+   * [Supported file
+   * types](https://cloud.google.com/dlp/docs/supported-file-types).
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.ByteContentItem.BytesType} + */ + public enum BytesType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused
+     * 
+ * + * BYTES_TYPE_UNSPECIFIED = 0; + */ + BYTES_TYPE_UNSPECIFIED(0), + /** + *
+     * Any image type.
+     * 
+ * + * IMAGE = 6; + */ + IMAGE(6), + /** + *
+     * jpeg
+     * 
+ * + * IMAGE_JPEG = 1; + */ + IMAGE_JPEG(1), + /** + *
+     * bmp
+     * 
+ * + * IMAGE_BMP = 2; + */ + IMAGE_BMP(2), + /** + *
+     * png
+     * 
+ * + * IMAGE_PNG = 3; + */ + IMAGE_PNG(3), + /** + *
+     * svg
+     * 
+ * + * IMAGE_SVG = 4; + */ + IMAGE_SVG(4), + /** + *
+     * plain text
+     * 
+ * + * TEXT_UTF8 = 5; + */ + TEXT_UTF8(5), + /** + *
+     * docx, docm, dotx, dotm
+     * 
+ * + * WORD_DOCUMENT = 7; + */ + WORD_DOCUMENT(7), + /** + *
+     * pdf
+     * 
+ * + * PDF = 8; + */ + PDF(8), + /** + *
+     * pptx, pptm, potx, potm, pot
+     * 
+ * + * POWERPOINT_DOCUMENT = 9; + */ + POWERPOINT_DOCUMENT(9), + /** + *
+     * xlsx, xlsm, xltx, xltm
+     * 
+ * + * EXCEL_DOCUMENT = 10; + */ + EXCEL_DOCUMENT(10), + /** + *
+     * avro
+     * 
+ * + * AVRO = 11; + */ + AVRO(11), + /** + *
+     * csv
+     * 
+ * + * CSV = 12; + */ + CSV(12), + /** + *
+     * tsv
+     * 
+ * + * TSV = 13; + */ + TSV(13), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused
+     * 
+ * + * BYTES_TYPE_UNSPECIFIED = 0; + */ + public static final int BYTES_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Any image type.
+     * 
+ * + * IMAGE = 6; + */ + public static final int IMAGE_VALUE = 6; + /** + *
+     * jpeg
+     * 
+ * + * IMAGE_JPEG = 1; + */ + public static final int IMAGE_JPEG_VALUE = 1; + /** + *
+     * bmp
+     * 
+ * + * IMAGE_BMP = 2; + */ + public static final int IMAGE_BMP_VALUE = 2; + /** + *
+     * png
+     * 
+ * + * IMAGE_PNG = 3; + */ + public static final int IMAGE_PNG_VALUE = 3; + /** + *
+     * svg
+     * 
+ * + * IMAGE_SVG = 4; + */ + public static final int IMAGE_SVG_VALUE = 4; + /** + *
+     * plain text
+     * 
+ * + * TEXT_UTF8 = 5; + */ + public static final int TEXT_UTF8_VALUE = 5; + /** + *
+     * docx, docm, dotx, dotm
+     * 
+ * + * WORD_DOCUMENT = 7; + */ + public static final int WORD_DOCUMENT_VALUE = 7; + /** + *
+     * pdf
+     * 
+ * + * PDF = 8; + */ + public static final int PDF_VALUE = 8; + /** + *
+     * pptx, pptm, potx, potm, pot
+     * 
+ * + * POWERPOINT_DOCUMENT = 9; + */ + public static final int POWERPOINT_DOCUMENT_VALUE = 9; + /** + *
+     * xlsx, xlsm, xltx, xltm
+     * 
+ * + * EXCEL_DOCUMENT = 10; + */ + public static final int EXCEL_DOCUMENT_VALUE = 10; + /** + *
+     * avro
+     * 
+ * + * AVRO = 11; + */ + public static final int AVRO_VALUE = 11; + /** + *
+     * csv
+     * 
+ * + * CSV = 12; + */ + public static final int CSV_VALUE = 12; + /** + *
+     * tsv
+     * 
+ * + * TSV = 13; + */ + public static final int TSV_VALUE = 13; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BytesType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BytesType forNumber(int value) { + switch (value) { + case 0: return BYTES_TYPE_UNSPECIFIED; + case 6: return IMAGE; + case 1: return IMAGE_JPEG; + case 2: return IMAGE_BMP; + case 3: return IMAGE_PNG; + case 4: return IMAGE_SVG; + case 5: return TEXT_UTF8; + case 7: return WORD_DOCUMENT; + case 8: return PDF; + case 9: return POWERPOINT_DOCUMENT; + case 10: return EXCEL_DOCUMENT; + case 11: return AVRO; + case 12: return CSV; + case 13: return TSV; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BytesType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BytesType findValueByNumber(int number) { + return BytesType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.ByteContentItem.getDescriptor().getEnumTypes().get(0); + } + + private static final BytesType[] VALUES = values(); + + public static BytesType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BytesType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.ByteContentItem.BytesType) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+   * The type of data stored in the bytes string. Default will be TEXT_UTF8.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The type of data stored in the bytes string. Default will be TEXT_UTF8.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; + * @return The type. + */ + @java.lang.Override public com.google.privacy.dlp.v2.ByteContentItem.BytesType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.ByteContentItem.BytesType result = com.google.privacy.dlp.v2.ByteContentItem.BytesType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.ByteContentItem.BytesType.UNRECOGNIZED : result; + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_; + /** + *
+   * Content data to inspect or redact.
+   * 
+ * + * bytes data = 2; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.privacy.dlp.v2.ByteContentItem.BytesType.BYTES_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.privacy.dlp.v2.ByteContentItem.BytesType.BYTES_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, data_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ByteContentItem)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ByteContentItem other = (com.google.privacy.dlp.v2.ByteContentItem) obj; + + if (type_ != other.type_) return false; + if (!getData() + .equals(other.getData())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ByteContentItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Container for bytes to inspect or redact.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ByteContentItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ByteContentItem) + com.google.privacy.dlp.v2.ByteContentItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ByteContentItem.class, com.google.privacy.dlp.v2.ByteContentItem.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ByteContentItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + data_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItem getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItem build() { + com.google.privacy.dlp.v2.ByteContentItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItem buildPartial() { + com.google.privacy.dlp.v2.ByteContentItem result = new com.google.privacy.dlp.v2.ByteContentItem(this); + result.type_ = type_; + result.data_ = data_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ByteContentItem) { + return mergeFrom((com.google.privacy.dlp.v2.ByteContentItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ByteContentItem other) { + if (other == com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ByteContentItem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ByteContentItem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItem.BytesType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.ByteContentItem.BytesType result = com.google.privacy.dlp.v2.ByteContentItem.BytesType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.ByteContentItem.BytesType.UNRECOGNIZED : result; + } + /** + *
+     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.privacy.dlp.v2.ByteContentItem.BytesType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Content data to inspect or redact.
+     * 
+ * + * bytes data = 2; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+     * Content data to inspect or redact.
+     * 
+ * + * bytes data = 2; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+     * Content data to inspect or redact.
+     * 
+ * + * bytes data = 2; + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ByteContentItem) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ByteContentItem) + private static final com.google.privacy.dlp.v2.ByteContentItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ByteContentItem(); + } + + public static com.google.privacy.dlp.v2.ByteContentItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ByteContentItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ByteContentItem(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItemOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItemOrBuilder.java new file mode 100644 index 000000000000..f5da115d9bc2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItemOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ByteContentItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ByteContentItem) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The type of data stored in the bytes string. Default will be TEXT_UTF8.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The type of data stored in the bytes string. Default will be TEXT_UTF8.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; + * @return The type. + */ + com.google.privacy.dlp.v2.ByteContentItem.BytesType getType(); + + /** + *
+   * Content data to inspect or redact.
+   * 
+ * + * bytes data = 2; + * @return The data. + */ + com.google.protobuf.ByteString getData(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequest.java new file mode 100644 index 000000000000..fb70439eea70 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequest.java @@ -0,0 +1,595 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The request message for canceling a DLP job.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CancelDlpJobRequest} + */ +public final class CancelDlpJobRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CancelDlpJobRequest) + CancelDlpJobRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CancelDlpJobRequest.newBuilder() to construct. + private CancelDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CancelDlpJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CancelDlpJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CancelDlpJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CancelDlpJobRequest.class, com.google.privacy.dlp.v2.CancelDlpJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the DlpJob resource to be cancelled.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the DlpJob resource to be cancelled.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CancelDlpJobRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CancelDlpJobRequest other = (com.google.privacy.dlp.v2.CancelDlpJobRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CancelDlpJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The request message for canceling a DLP job.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CancelDlpJobRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CancelDlpJobRequest) + com.google.privacy.dlp.v2.CancelDlpJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CancelDlpJobRequest.class, com.google.privacy.dlp.v2.CancelDlpJobRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CancelDlpJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CancelDlpJobRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CancelDlpJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CancelDlpJobRequest build() { + com.google.privacy.dlp.v2.CancelDlpJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CancelDlpJobRequest buildPartial() { + com.google.privacy.dlp.v2.CancelDlpJobRequest result = new com.google.privacy.dlp.v2.CancelDlpJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CancelDlpJobRequest) { + return mergeFrom((com.google.privacy.dlp.v2.CancelDlpJobRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CancelDlpJobRequest other) { + if (other == com.google.privacy.dlp.v2.CancelDlpJobRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CancelDlpJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CancelDlpJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CancelDlpJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CancelDlpJobRequest) + private static final com.google.privacy.dlp.v2.CancelDlpJobRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CancelDlpJobRequest(); + } + + public static com.google.privacy.dlp.v2.CancelDlpJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelDlpJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelDlpJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CancelDlpJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequestOrBuilder.java new file mode 100644 index 000000000000..79d40840e09c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CancelDlpJobRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CancelDlpJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the DlpJob resource to be cancelled.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the DlpJob resource to be cancelled.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java new file mode 100644 index 000000000000..da14a99d764a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java @@ -0,0 +1,1367 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Partially mask a string by replacing a given number of characters with a
+ * fixed character. Masking can start from the beginning or end of the string.
+ * This can be used on data of any type (numbers, longs, and so on) and when
+ * de-identifying structured data we'll attempt to preserve the original data's
+ * type. (This allows you to take a long like 123 and modify it to a string like
+ * **3.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CharacterMaskConfig} + */ +public final class CharacterMaskConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CharacterMaskConfig) + CharacterMaskConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use CharacterMaskConfig.newBuilder() to construct. + private CharacterMaskConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CharacterMaskConfig() { + maskingCharacter_ = ""; + charactersToIgnore_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CharacterMaskConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CharacterMaskConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + maskingCharacter_ = s; + break; + } + case 16: { + + numberToMask_ = input.readInt32(); + break; + } + case 24: { + + reverseOrder_ = input.readBool(); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + charactersToIgnore_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + charactersToIgnore_.add( + input.readMessage(com.google.privacy.dlp.v2.CharsToIgnore.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + charactersToIgnore_ = java.util.Collections.unmodifiableList(charactersToIgnore_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CharacterMaskConfig.class, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder.class); + } + + public static final int MASKING_CHARACTER_FIELD_NUMBER = 1; + private volatile java.lang.Object maskingCharacter_; + /** + *
+   * Character to use to mask the sensitive values&mdash;for example, `*` for an
+   * alphabetic string such as a name, or `0` for a numeric string such as ZIP
+   * code or credit card number. This string must have a length of 1. If not
+   * supplied, this value defaults to `*` for strings, and `0` for digits.
+   * 
+ * + * string masking_character = 1; + * @return The maskingCharacter. + */ + @java.lang.Override + public java.lang.String getMaskingCharacter() { + java.lang.Object ref = maskingCharacter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maskingCharacter_ = s; + return s; + } + } + /** + *
+   * Character to use to mask the sensitive values&mdash;for example, `*` for an
+   * alphabetic string such as a name, or `0` for a numeric string such as ZIP
+   * code or credit card number. This string must have a length of 1. If not
+   * supplied, this value defaults to `*` for strings, and `0` for digits.
+   * 
+ * + * string masking_character = 1; + * @return The bytes for maskingCharacter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMaskingCharacterBytes() { + java.lang.Object ref = maskingCharacter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maskingCharacter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NUMBER_TO_MASK_FIELD_NUMBER = 2; + private int numberToMask_; + /** + *
+   * Number of characters to mask. If not set, all matching chars will be
+   * masked. Skipped characters do not count towards this tally.
+   * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+   * masks all but a number of characters.
+   * For example, suppose you have the following values:
+   * - `masking_character` is `*`
+   * - `number_to_mask` is `-4`
+   * - `reverse_order` is `false`
+   * - `CharsToIgnore` includes `-`
+   * - Input string is `1234-5678-9012-3456`
+   * The resulting de-identified string is
+   * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+   * If `reverse_order` is `true`, all but the first four characters are masked
+   * as `1234-****-****-****`.
+   * 
+ * + * int32 number_to_mask = 2; + * @return The numberToMask. + */ + @java.lang.Override + public int getNumberToMask() { + return numberToMask_; + } + + public static final int REVERSE_ORDER_FIELD_NUMBER = 3; + private boolean reverseOrder_; + /** + *
+   * Mask characters in reverse order. For example, if `masking_character` is
+   * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
+   * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
+   * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
+   * is `true`, then the string `12345` is masked as `12***`.
+   * 
+ * + * bool reverse_order = 3; + * @return The reverseOrder. + */ + @java.lang.Override + public boolean getReverseOrder() { + return reverseOrder_; + } + + public static final int CHARACTERS_TO_IGNORE_FIELD_NUMBER = 4; + private java.util.List charactersToIgnore_; + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + @java.lang.Override + public java.util.List getCharactersToIgnoreList() { + return charactersToIgnore_; + } + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + @java.lang.Override + public java.util.List + getCharactersToIgnoreOrBuilderList() { + return charactersToIgnore_; + } + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + @java.lang.Override + public int getCharactersToIgnoreCount() { + return charactersToIgnore_.size(); + } + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CharsToIgnore getCharactersToIgnore(int index) { + return charactersToIgnore_.get(index); + } + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder getCharactersToIgnoreOrBuilder( + int index) { + return charactersToIgnore_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maskingCharacter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, maskingCharacter_); + } + if (numberToMask_ != 0) { + output.writeInt32(2, numberToMask_); + } + if (reverseOrder_ != false) { + output.writeBool(3, reverseOrder_); + } + for (int i = 0; i < charactersToIgnore_.size(); i++) { + output.writeMessage(4, charactersToIgnore_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maskingCharacter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, maskingCharacter_); + } + if (numberToMask_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, numberToMask_); + } + if (reverseOrder_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, reverseOrder_); + } + for (int i = 0; i < charactersToIgnore_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, charactersToIgnore_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CharacterMaskConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CharacterMaskConfig other = (com.google.privacy.dlp.v2.CharacterMaskConfig) obj; + + if (!getMaskingCharacter() + .equals(other.getMaskingCharacter())) return false; + if (getNumberToMask() + != other.getNumberToMask()) return false; + if (getReverseOrder() + != other.getReverseOrder()) return false; + if (!getCharactersToIgnoreList() + .equals(other.getCharactersToIgnoreList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MASKING_CHARACTER_FIELD_NUMBER; + hash = (53 * hash) + getMaskingCharacter().hashCode(); + hash = (37 * hash) + NUMBER_TO_MASK_FIELD_NUMBER; + hash = (53 * hash) + getNumberToMask(); + hash = (37 * hash) + REVERSE_ORDER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReverseOrder()); + if (getCharactersToIgnoreCount() > 0) { + hash = (37 * hash) + CHARACTERS_TO_IGNORE_FIELD_NUMBER; + hash = (53 * hash) + getCharactersToIgnoreList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CharacterMaskConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Partially mask a string by replacing a given number of characters with a
+   * fixed character. Masking can start from the beginning or end of the string.
+   * This can be used on data of any type (numbers, longs, and so on) and when
+   * de-identifying structured data we'll attempt to preserve the original data's
+   * type. (This allows you to take a long like 123 and modify it to a string like
+   * **3.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CharacterMaskConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CharacterMaskConfig) + com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CharacterMaskConfig.class, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CharacterMaskConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getCharactersToIgnoreFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + maskingCharacter_ = ""; + + numberToMask_ = 0; + + reverseOrder_ = false; + + if (charactersToIgnoreBuilder_ == null) { + charactersToIgnore_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + charactersToIgnoreBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CharacterMaskConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CharacterMaskConfig build() { + com.google.privacy.dlp.v2.CharacterMaskConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CharacterMaskConfig buildPartial() { + com.google.privacy.dlp.v2.CharacterMaskConfig result = new com.google.privacy.dlp.v2.CharacterMaskConfig(this); + int from_bitField0_ = bitField0_; + result.maskingCharacter_ = maskingCharacter_; + result.numberToMask_ = numberToMask_; + result.reverseOrder_ = reverseOrder_; + if (charactersToIgnoreBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + charactersToIgnore_ = java.util.Collections.unmodifiableList(charactersToIgnore_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.charactersToIgnore_ = charactersToIgnore_; + } else { + result.charactersToIgnore_ = charactersToIgnoreBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CharacterMaskConfig) { + return mergeFrom((com.google.privacy.dlp.v2.CharacterMaskConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CharacterMaskConfig other) { + if (other == com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance()) return this; + if (!other.getMaskingCharacter().isEmpty()) { + maskingCharacter_ = other.maskingCharacter_; + onChanged(); + } + if (other.getNumberToMask() != 0) { + setNumberToMask(other.getNumberToMask()); + } + if (other.getReverseOrder() != false) { + setReverseOrder(other.getReverseOrder()); + } + if (charactersToIgnoreBuilder_ == null) { + if (!other.charactersToIgnore_.isEmpty()) { + if (charactersToIgnore_.isEmpty()) { + charactersToIgnore_ = other.charactersToIgnore_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCharactersToIgnoreIsMutable(); + charactersToIgnore_.addAll(other.charactersToIgnore_); + } + onChanged(); + } + } else { + if (!other.charactersToIgnore_.isEmpty()) { + if (charactersToIgnoreBuilder_.isEmpty()) { + charactersToIgnoreBuilder_.dispose(); + charactersToIgnoreBuilder_ = null; + charactersToIgnore_ = other.charactersToIgnore_; + bitField0_ = (bitField0_ & ~0x00000001); + charactersToIgnoreBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCharactersToIgnoreFieldBuilder() : null; + } else { + charactersToIgnoreBuilder_.addAllMessages(other.charactersToIgnore_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CharacterMaskConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CharacterMaskConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object maskingCharacter_ = ""; + /** + *
+     * Character to use to mask the sensitive values&mdash;for example, `*` for an
+     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
+     * code or credit card number. This string must have a length of 1. If not
+     * supplied, this value defaults to `*` for strings, and `0` for digits.
+     * 
+ * + * string masking_character = 1; + * @return The maskingCharacter. + */ + public java.lang.String getMaskingCharacter() { + java.lang.Object ref = maskingCharacter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maskingCharacter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Character to use to mask the sensitive values&mdash;for example, `*` for an
+     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
+     * code or credit card number. This string must have a length of 1. If not
+     * supplied, this value defaults to `*` for strings, and `0` for digits.
+     * 
+ * + * string masking_character = 1; + * @return The bytes for maskingCharacter. + */ + public com.google.protobuf.ByteString + getMaskingCharacterBytes() { + java.lang.Object ref = maskingCharacter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maskingCharacter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Character to use to mask the sensitive values&mdash;for example, `*` for an
+     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
+     * code or credit card number. This string must have a length of 1. If not
+     * supplied, this value defaults to `*` for strings, and `0` for digits.
+     * 
+ * + * string masking_character = 1; + * @param value The maskingCharacter to set. + * @return This builder for chaining. + */ + public Builder setMaskingCharacter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + maskingCharacter_ = value; + onChanged(); + return this; + } + /** + *
+     * Character to use to mask the sensitive values&mdash;for example, `*` for an
+     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
+     * code or credit card number. This string must have a length of 1. If not
+     * supplied, this value defaults to `*` for strings, and `0` for digits.
+     * 
+ * + * string masking_character = 1; + * @return This builder for chaining. + */ + public Builder clearMaskingCharacter() { + + maskingCharacter_ = getDefaultInstance().getMaskingCharacter(); + onChanged(); + return this; + } + /** + *
+     * Character to use to mask the sensitive values&mdash;for example, `*` for an
+     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
+     * code or credit card number. This string must have a length of 1. If not
+     * supplied, this value defaults to `*` for strings, and `0` for digits.
+     * 
+ * + * string masking_character = 1; + * @param value The bytes for maskingCharacter to set. + * @return This builder for chaining. + */ + public Builder setMaskingCharacterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + maskingCharacter_ = value; + onChanged(); + return this; + } + + private int numberToMask_ ; + /** + *
+     * Number of characters to mask. If not set, all matching chars will be
+     * masked. Skipped characters do not count towards this tally.
+     * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+     * masks all but a number of characters.
+     * For example, suppose you have the following values:
+     * - `masking_character` is `*`
+     * - `number_to_mask` is `-4`
+     * - `reverse_order` is `false`
+     * - `CharsToIgnore` includes `-`
+     * - Input string is `1234-5678-9012-3456`
+     * The resulting de-identified string is
+     * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+     * If `reverse_order` is `true`, all but the first four characters are masked
+     * as `1234-****-****-****`.
+     * 
+ * + * int32 number_to_mask = 2; + * @return The numberToMask. + */ + @java.lang.Override + public int getNumberToMask() { + return numberToMask_; + } + /** + *
+     * Number of characters to mask. If not set, all matching chars will be
+     * masked. Skipped characters do not count towards this tally.
+     * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+     * masks all but a number of characters.
+     * For example, suppose you have the following values:
+     * - `masking_character` is `*`
+     * - `number_to_mask` is `-4`
+     * - `reverse_order` is `false`
+     * - `CharsToIgnore` includes `-`
+     * - Input string is `1234-5678-9012-3456`
+     * The resulting de-identified string is
+     * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+     * If `reverse_order` is `true`, all but the first four characters are masked
+     * as `1234-****-****-****`.
+     * 
+ * + * int32 number_to_mask = 2; + * @param value The numberToMask to set. + * @return This builder for chaining. + */ + public Builder setNumberToMask(int value) { + + numberToMask_ = value; + onChanged(); + return this; + } + /** + *
+     * Number of characters to mask. If not set, all matching chars will be
+     * masked. Skipped characters do not count towards this tally.
+     * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+     * masks all but a number of characters.
+     * For example, suppose you have the following values:
+     * - `masking_character` is `*`
+     * - `number_to_mask` is `-4`
+     * - `reverse_order` is `false`
+     * - `CharsToIgnore` includes `-`
+     * - Input string is `1234-5678-9012-3456`
+     * The resulting de-identified string is
+     * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+     * If `reverse_order` is `true`, all but the first four characters are masked
+     * as `1234-****-****-****`.
+     * 
+ * + * int32 number_to_mask = 2; + * @return This builder for chaining. + */ + public Builder clearNumberToMask() { + + numberToMask_ = 0; + onChanged(); + return this; + } + + private boolean reverseOrder_ ; + /** + *
+     * Mask characters in reverse order. For example, if `masking_character` is
+     * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
+     * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
+     * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
+     * is `true`, then the string `12345` is masked as `12***`.
+     * 
+ * + * bool reverse_order = 3; + * @return The reverseOrder. + */ + @java.lang.Override + public boolean getReverseOrder() { + return reverseOrder_; + } + /** + *
+     * Mask characters in reverse order. For example, if `masking_character` is
+     * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
+     * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
+     * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
+     * is `true`, then the string `12345` is masked as `12***`.
+     * 
+ * + * bool reverse_order = 3; + * @param value The reverseOrder to set. + * @return This builder for chaining. + */ + public Builder setReverseOrder(boolean value) { + + reverseOrder_ = value; + onChanged(); + return this; + } + /** + *
+     * Mask characters in reverse order. For example, if `masking_character` is
+     * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
+     * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
+     * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
+     * is `true`, then the string `12345` is masked as `12***`.
+     * 
+ * + * bool reverse_order = 3; + * @return This builder for chaining. + */ + public Builder clearReverseOrder() { + + reverseOrder_ = false; + onChanged(); + return this; + } + + private java.util.List charactersToIgnore_ = + java.util.Collections.emptyList(); + private void ensureCharactersToIgnoreIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + charactersToIgnore_ = new java.util.ArrayList(charactersToIgnore_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.CharsToIgnore, com.google.privacy.dlp.v2.CharsToIgnore.Builder, com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder> charactersToIgnoreBuilder_; + + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public java.util.List getCharactersToIgnoreList() { + if (charactersToIgnoreBuilder_ == null) { + return java.util.Collections.unmodifiableList(charactersToIgnore_); + } else { + return charactersToIgnoreBuilder_.getMessageList(); + } + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public int getCharactersToIgnoreCount() { + if (charactersToIgnoreBuilder_ == null) { + return charactersToIgnore_.size(); + } else { + return charactersToIgnoreBuilder_.getCount(); + } + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public com.google.privacy.dlp.v2.CharsToIgnore getCharactersToIgnore(int index) { + if (charactersToIgnoreBuilder_ == null) { + return charactersToIgnore_.get(index); + } else { + return charactersToIgnoreBuilder_.getMessage(index); + } + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public Builder setCharactersToIgnore( + int index, com.google.privacy.dlp.v2.CharsToIgnore value) { + if (charactersToIgnoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCharactersToIgnoreIsMutable(); + charactersToIgnore_.set(index, value); + onChanged(); + } else { + charactersToIgnoreBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public Builder setCharactersToIgnore( + int index, com.google.privacy.dlp.v2.CharsToIgnore.Builder builderForValue) { + if (charactersToIgnoreBuilder_ == null) { + ensureCharactersToIgnoreIsMutable(); + charactersToIgnore_.set(index, builderForValue.build()); + onChanged(); + } else { + charactersToIgnoreBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public Builder addCharactersToIgnore(com.google.privacy.dlp.v2.CharsToIgnore value) { + if (charactersToIgnoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCharactersToIgnoreIsMutable(); + charactersToIgnore_.add(value); + onChanged(); + } else { + charactersToIgnoreBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public Builder addCharactersToIgnore( + int index, com.google.privacy.dlp.v2.CharsToIgnore value) { + if (charactersToIgnoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCharactersToIgnoreIsMutable(); + charactersToIgnore_.add(index, value); + onChanged(); + } else { + charactersToIgnoreBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public Builder addCharactersToIgnore( + com.google.privacy.dlp.v2.CharsToIgnore.Builder builderForValue) { + if (charactersToIgnoreBuilder_ == null) { + ensureCharactersToIgnoreIsMutable(); + charactersToIgnore_.add(builderForValue.build()); + onChanged(); + } else { + charactersToIgnoreBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public Builder addCharactersToIgnore( + int index, com.google.privacy.dlp.v2.CharsToIgnore.Builder builderForValue) { + if (charactersToIgnoreBuilder_ == null) { + ensureCharactersToIgnoreIsMutable(); + charactersToIgnore_.add(index, builderForValue.build()); + onChanged(); + } else { + charactersToIgnoreBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public Builder addAllCharactersToIgnore( + java.lang.Iterable values) { + if (charactersToIgnoreBuilder_ == null) { + ensureCharactersToIgnoreIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, charactersToIgnore_); + onChanged(); + } else { + charactersToIgnoreBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public Builder clearCharactersToIgnore() { + if (charactersToIgnoreBuilder_ == null) { + charactersToIgnore_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + charactersToIgnoreBuilder_.clear(); + } + return this; + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public Builder removeCharactersToIgnore(int index) { + if (charactersToIgnoreBuilder_ == null) { + ensureCharactersToIgnoreIsMutable(); + charactersToIgnore_.remove(index); + onChanged(); + } else { + charactersToIgnoreBuilder_.remove(index); + } + return this; + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public com.google.privacy.dlp.v2.CharsToIgnore.Builder getCharactersToIgnoreBuilder( + int index) { + return getCharactersToIgnoreFieldBuilder().getBuilder(index); + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder getCharactersToIgnoreOrBuilder( + int index) { + if (charactersToIgnoreBuilder_ == null) { + return charactersToIgnore_.get(index); } else { + return charactersToIgnoreBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public java.util.List + getCharactersToIgnoreOrBuilderList() { + if (charactersToIgnoreBuilder_ != null) { + return charactersToIgnoreBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(charactersToIgnore_); + } + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public com.google.privacy.dlp.v2.CharsToIgnore.Builder addCharactersToIgnoreBuilder() { + return getCharactersToIgnoreFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.CharsToIgnore.getDefaultInstance()); + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public com.google.privacy.dlp.v2.CharsToIgnore.Builder addCharactersToIgnoreBuilder( + int index) { + return getCharactersToIgnoreFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.CharsToIgnore.getDefaultInstance()); + } + /** + *
+     * When masking a string, items in this list will be skipped when replacing
+     * characters. For example, if the input string is `555-555-5555` and you
+     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+     * returns `***-**5-5555`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + public java.util.List + getCharactersToIgnoreBuilderList() { + return getCharactersToIgnoreFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.CharsToIgnore, com.google.privacy.dlp.v2.CharsToIgnore.Builder, com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder> + getCharactersToIgnoreFieldBuilder() { + if (charactersToIgnoreBuilder_ == null) { + charactersToIgnoreBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.CharsToIgnore, com.google.privacy.dlp.v2.CharsToIgnore.Builder, com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder>( + charactersToIgnore_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + charactersToIgnore_ = null; + } + return charactersToIgnoreBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CharacterMaskConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CharacterMaskConfig) + private static final com.google.privacy.dlp.v2.CharacterMaskConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CharacterMaskConfig(); + } + + public static com.google.privacy.dlp.v2.CharacterMaskConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CharacterMaskConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CharacterMaskConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CharacterMaskConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java new file mode 100644 index 000000000000..1024f9f0ec49 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CharacterMaskConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CharacterMaskConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Character to use to mask the sensitive values&mdash;for example, `*` for an
+   * alphabetic string such as a name, or `0` for a numeric string such as ZIP
+   * code or credit card number. This string must have a length of 1. If not
+   * supplied, this value defaults to `*` for strings, and `0` for digits.
+   * 
+ * + * string masking_character = 1; + * @return The maskingCharacter. + */ + java.lang.String getMaskingCharacter(); + /** + *
+   * Character to use to mask the sensitive values&mdash;for example, `*` for an
+   * alphabetic string such as a name, or `0` for a numeric string such as ZIP
+   * code or credit card number. This string must have a length of 1. If not
+   * supplied, this value defaults to `*` for strings, and `0` for digits.
+   * 
+ * + * string masking_character = 1; + * @return The bytes for maskingCharacter. + */ + com.google.protobuf.ByteString + getMaskingCharacterBytes(); + + /** + *
+   * Number of characters to mask. If not set, all matching chars will be
+   * masked. Skipped characters do not count towards this tally.
+   * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+   * masks all but a number of characters.
+   * For example, suppose you have the following values:
+   * - `masking_character` is `*`
+   * - `number_to_mask` is `-4`
+   * - `reverse_order` is `false`
+   * - `CharsToIgnore` includes `-`
+   * - Input string is `1234-5678-9012-3456`
+   * The resulting de-identified string is
+   * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+   * If `reverse_order` is `true`, all but the first four characters are masked
+   * as `1234-****-****-****`.
+   * 
+ * + * int32 number_to_mask = 2; + * @return The numberToMask. + */ + int getNumberToMask(); + + /** + *
+   * Mask characters in reverse order. For example, if `masking_character` is
+   * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
+   * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
+   * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
+   * is `true`, then the string `12345` is masked as `12***`.
+   * 
+ * + * bool reverse_order = 3; + * @return The reverseOrder. + */ + boolean getReverseOrder(); + + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + java.util.List + getCharactersToIgnoreList(); + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + com.google.privacy.dlp.v2.CharsToIgnore getCharactersToIgnore(int index); + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + int getCharactersToIgnoreCount(); + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + java.util.List + getCharactersToIgnoreOrBuilderList(); + /** + *
+   * When masking a string, items in this list will be skipped when replacing
+   * characters. For example, if the input string is `555-555-5555` and you
+   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
+   * returns `***-**5-5555`.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; + */ + com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder getCharactersToIgnoreOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java new file mode 100644 index 000000000000..9017a87346f2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java @@ -0,0 +1,1090 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Characters to skip when doing deidentification of a value. These will be left
+ * alone and skipped.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CharsToIgnore} + */ +public final class CharsToIgnore extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CharsToIgnore) + CharsToIgnoreOrBuilder { +private static final long serialVersionUID = 0L; + // Use CharsToIgnore.newBuilder() to construct. + private CharsToIgnore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CharsToIgnore() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CharsToIgnore(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CharsToIgnore( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + charactersCase_ = 1; + characters_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + charactersCase_ = 2; + characters_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CharsToIgnore.class, com.google.privacy.dlp.v2.CharsToIgnore.Builder.class); + } + + /** + *
+   * Convenience enum for indicating common characters to not transform.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore} + */ + public enum CommonCharsToIgnore + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0; + */ + COMMON_CHARS_TO_IGNORE_UNSPECIFIED(0), + /** + *
+     * 0-9
+     * 
+ * + * NUMERIC = 1; + */ + NUMERIC(1), + /** + *
+     * A-Z
+     * 
+ * + * ALPHA_UPPER_CASE = 2; + */ + ALPHA_UPPER_CASE(2), + /** + *
+     * a-z
+     * 
+ * + * ALPHA_LOWER_CASE = 3; + */ + ALPHA_LOWER_CASE(3), + /** + *
+     * US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
+     * 
+ * + * PUNCTUATION = 4; + */ + PUNCTUATION(4), + /** + *
+     * Whitespace character, one of [ \t\n\x0B\f\r]
+     * 
+ * + * WHITESPACE = 5; + */ + WHITESPACE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0; + */ + public static final int COMMON_CHARS_TO_IGNORE_UNSPECIFIED_VALUE = 0; + /** + *
+     * 0-9
+     * 
+ * + * NUMERIC = 1; + */ + public static final int NUMERIC_VALUE = 1; + /** + *
+     * A-Z
+     * 
+ * + * ALPHA_UPPER_CASE = 2; + */ + public static final int ALPHA_UPPER_CASE_VALUE = 2; + /** + *
+     * a-z
+     * 
+ * + * ALPHA_LOWER_CASE = 3; + */ + public static final int ALPHA_LOWER_CASE_VALUE = 3; + /** + *
+     * US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
+     * 
+ * + * PUNCTUATION = 4; + */ + public static final int PUNCTUATION_VALUE = 4; + /** + *
+     * Whitespace character, one of [ \t\n\x0B\f\r]
+     * 
+ * + * WHITESPACE = 5; + */ + public static final int WHITESPACE_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CommonCharsToIgnore valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CommonCharsToIgnore forNumber(int value) { + switch (value) { + case 0: return COMMON_CHARS_TO_IGNORE_UNSPECIFIED; + case 1: return NUMERIC; + case 2: return ALPHA_UPPER_CASE; + case 3: return ALPHA_LOWER_CASE; + case 4: return PUNCTUATION; + case 5: return WHITESPACE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + CommonCharsToIgnore> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CommonCharsToIgnore findValueByNumber(int number) { + return CommonCharsToIgnore.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.CharsToIgnore.getDescriptor().getEnumTypes().get(0); + } + + private static final CommonCharsToIgnore[] VALUES = values(); + + public static CommonCharsToIgnore valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CommonCharsToIgnore(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore) + } + + private int charactersCase_ = 0; + private java.lang.Object characters_; + public enum CharactersCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CHARACTERS_TO_SKIP(1), + COMMON_CHARACTERS_TO_IGNORE(2), + CHARACTERS_NOT_SET(0); + private final int value; + private CharactersCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CharactersCase valueOf(int value) { + return forNumber(value); + } + + public static CharactersCase forNumber(int value) { + switch (value) { + case 1: return CHARACTERS_TO_SKIP; + case 2: return COMMON_CHARACTERS_TO_IGNORE; + case 0: return CHARACTERS_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public CharactersCase + getCharactersCase() { + return CharactersCase.forNumber( + charactersCase_); + } + + public static final int CHARACTERS_TO_SKIP_FIELD_NUMBER = 1; + /** + *
+   * Characters to not transform when masking.
+   * 
+ * + * string characters_to_skip = 1; + * @return Whether the charactersToSkip field is set. + */ + public boolean hasCharactersToSkip() { + return charactersCase_ == 1; + } + /** + *
+   * Characters to not transform when masking.
+   * 
+ * + * string characters_to_skip = 1; + * @return The charactersToSkip. + */ + public java.lang.String getCharactersToSkip() { + java.lang.Object ref = ""; + if (charactersCase_ == 1) { + ref = characters_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (charactersCase_ == 1) { + characters_ = s; + } + return s; + } + } + /** + *
+   * Characters to not transform when masking.
+   * 
+ * + * string characters_to_skip = 1; + * @return The bytes for charactersToSkip. + */ + public com.google.protobuf.ByteString + getCharactersToSkipBytes() { + java.lang.Object ref = ""; + if (charactersCase_ == 1) { + ref = characters_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (charactersCase_ == 1) { + characters_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMON_CHARACTERS_TO_IGNORE_FIELD_NUMBER = 2; + /** + *
+   * Common characters to not transform when masking. Useful to avoid removing
+   * punctuation.
+   * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return Whether the commonCharactersToIgnore field is set. + */ + public boolean hasCommonCharactersToIgnore() { + return charactersCase_ == 2; + } + /** + *
+   * Common characters to not transform when masking. Useful to avoid removing
+   * punctuation.
+   * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return The enum numeric value on the wire for commonCharactersToIgnore. + */ + public int getCommonCharactersToIgnoreValue() { + if (charactersCase_ == 2) { + return (java.lang.Integer) characters_; + } + return 0; + } + /** + *
+   * Common characters to not transform when masking. Useful to avoid removing
+   * punctuation.
+   * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return The commonCharactersToIgnore. + */ + public com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore getCommonCharactersToIgnore() { + if (charactersCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore result = com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.valueOf( + (java.lang.Integer) characters_); + return result == null ? com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.COMMON_CHARS_TO_IGNORE_UNSPECIFIED; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (charactersCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, characters_); + } + if (charactersCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) characters_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (charactersCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, characters_); + } + if (charactersCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, ((java.lang.Integer) characters_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CharsToIgnore)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CharsToIgnore other = (com.google.privacy.dlp.v2.CharsToIgnore) obj; + + if (!getCharactersCase().equals(other.getCharactersCase())) return false; + switch (charactersCase_) { + case 1: + if (!getCharactersToSkip() + .equals(other.getCharactersToSkip())) return false; + break; + case 2: + if (getCommonCharactersToIgnoreValue() + != other.getCommonCharactersToIgnoreValue()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (charactersCase_) { + case 1: + hash = (37 * hash) + CHARACTERS_TO_SKIP_FIELD_NUMBER; + hash = (53 * hash) + getCharactersToSkip().hashCode(); + break; + case 2: + hash = (37 * hash) + COMMON_CHARACTERS_TO_IGNORE_FIELD_NUMBER; + hash = (53 * hash) + getCommonCharactersToIgnoreValue(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CharsToIgnore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Characters to skip when doing deidentification of a value. These will be left
+   * alone and skipped.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CharsToIgnore} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CharsToIgnore) + com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CharsToIgnore.class, com.google.privacy.dlp.v2.CharsToIgnore.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CharsToIgnore.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + charactersCase_ = 0; + characters_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CharsToIgnore getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CharsToIgnore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CharsToIgnore build() { + com.google.privacy.dlp.v2.CharsToIgnore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CharsToIgnore buildPartial() { + com.google.privacy.dlp.v2.CharsToIgnore result = new com.google.privacy.dlp.v2.CharsToIgnore(this); + if (charactersCase_ == 1) { + result.characters_ = characters_; + } + if (charactersCase_ == 2) { + result.characters_ = characters_; + } + result.charactersCase_ = charactersCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CharsToIgnore) { + return mergeFrom((com.google.privacy.dlp.v2.CharsToIgnore)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CharsToIgnore other) { + if (other == com.google.privacy.dlp.v2.CharsToIgnore.getDefaultInstance()) return this; + switch (other.getCharactersCase()) { + case CHARACTERS_TO_SKIP: { + charactersCase_ = 1; + characters_ = other.characters_; + onChanged(); + break; + } + case COMMON_CHARACTERS_TO_IGNORE: { + setCommonCharactersToIgnoreValue(other.getCommonCharactersToIgnoreValue()); + break; + } + case CHARACTERS_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CharsToIgnore parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CharsToIgnore) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int charactersCase_ = 0; + private java.lang.Object characters_; + public CharactersCase + getCharactersCase() { + return CharactersCase.forNumber( + charactersCase_); + } + + public Builder clearCharacters() { + charactersCase_ = 0; + characters_ = null; + onChanged(); + return this; + } + + + /** + *
+     * Characters to not transform when masking.
+     * 
+ * + * string characters_to_skip = 1; + * @return Whether the charactersToSkip field is set. + */ + @java.lang.Override + public boolean hasCharactersToSkip() { + return charactersCase_ == 1; + } + /** + *
+     * Characters to not transform when masking.
+     * 
+ * + * string characters_to_skip = 1; + * @return The charactersToSkip. + */ + @java.lang.Override + public java.lang.String getCharactersToSkip() { + java.lang.Object ref = ""; + if (charactersCase_ == 1) { + ref = characters_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (charactersCase_ == 1) { + characters_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Characters to not transform when masking.
+     * 
+ * + * string characters_to_skip = 1; + * @return The bytes for charactersToSkip. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCharactersToSkipBytes() { + java.lang.Object ref = ""; + if (charactersCase_ == 1) { + ref = characters_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (charactersCase_ == 1) { + characters_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Characters to not transform when masking.
+     * 
+ * + * string characters_to_skip = 1; + * @param value The charactersToSkip to set. + * @return This builder for chaining. + */ + public Builder setCharactersToSkip( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + charactersCase_ = 1; + characters_ = value; + onChanged(); + return this; + } + /** + *
+     * Characters to not transform when masking.
+     * 
+ * + * string characters_to_skip = 1; + * @return This builder for chaining. + */ + public Builder clearCharactersToSkip() { + if (charactersCase_ == 1) { + charactersCase_ = 0; + characters_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Characters to not transform when masking.
+     * 
+ * + * string characters_to_skip = 1; + * @param value The bytes for charactersToSkip to set. + * @return This builder for chaining. + */ + public Builder setCharactersToSkipBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + charactersCase_ = 1; + characters_ = value; + onChanged(); + return this; + } + + /** + *
+     * Common characters to not transform when masking. Useful to avoid removing
+     * punctuation.
+     * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return Whether the commonCharactersToIgnore field is set. + */ + @java.lang.Override + public boolean hasCommonCharactersToIgnore() { + return charactersCase_ == 2; + } + /** + *
+     * Common characters to not transform when masking. Useful to avoid removing
+     * punctuation.
+     * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return The enum numeric value on the wire for commonCharactersToIgnore. + */ + @java.lang.Override + public int getCommonCharactersToIgnoreValue() { + if (charactersCase_ == 2) { + return ((java.lang.Integer) characters_).intValue(); + } + return 0; + } + /** + *
+     * Common characters to not transform when masking. Useful to avoid removing
+     * punctuation.
+     * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @param value The enum numeric value on the wire for commonCharactersToIgnore to set. + * @return This builder for chaining. + */ + public Builder setCommonCharactersToIgnoreValue(int value) { + charactersCase_ = 2; + characters_ = value; + onChanged(); + return this; + } + /** + *
+     * Common characters to not transform when masking. Useful to avoid removing
+     * punctuation.
+     * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return The commonCharactersToIgnore. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore getCommonCharactersToIgnore() { + if (charactersCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore result = com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.valueOf( + (java.lang.Integer) characters_); + return result == null ? com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.COMMON_CHARS_TO_IGNORE_UNSPECIFIED; + } + /** + *
+     * Common characters to not transform when masking. Useful to avoid removing
+     * punctuation.
+     * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @param value The commonCharactersToIgnore to set. + * @return This builder for chaining. + */ + public Builder setCommonCharactersToIgnore(com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore value) { + if (value == null) { + throw new NullPointerException(); + } + charactersCase_ = 2; + characters_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Common characters to not transform when masking. Useful to avoid removing
+     * punctuation.
+     * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return This builder for chaining. + */ + public Builder clearCommonCharactersToIgnore() { + if (charactersCase_ == 2) { + charactersCase_ = 0; + characters_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CharsToIgnore) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CharsToIgnore) + private static final com.google.privacy.dlp.v2.CharsToIgnore DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CharsToIgnore(); + } + + public static com.google.privacy.dlp.v2.CharsToIgnore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CharsToIgnore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CharsToIgnore(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CharsToIgnore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnoreOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnoreOrBuilder.java new file mode 100644 index 000000000000..83336c081cf2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnoreOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CharsToIgnoreOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CharsToIgnore) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Characters to not transform when masking.
+   * 
+ * + * string characters_to_skip = 1; + * @return Whether the charactersToSkip field is set. + */ + boolean hasCharactersToSkip(); + /** + *
+   * Characters to not transform when masking.
+   * 
+ * + * string characters_to_skip = 1; + * @return The charactersToSkip. + */ + java.lang.String getCharactersToSkip(); + /** + *
+   * Characters to not transform when masking.
+   * 
+ * + * string characters_to_skip = 1; + * @return The bytes for charactersToSkip. + */ + com.google.protobuf.ByteString + getCharactersToSkipBytes(); + + /** + *
+   * Common characters to not transform when masking. Useful to avoid removing
+   * punctuation.
+   * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return Whether the commonCharactersToIgnore field is set. + */ + boolean hasCommonCharactersToIgnore(); + /** + *
+   * Common characters to not transform when masking. Useful to avoid removing
+   * punctuation.
+   * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return The enum numeric value on the wire for commonCharactersToIgnore. + */ + int getCommonCharactersToIgnoreValue(); + /** + *
+   * Common characters to not transform when masking. Useful to avoid removing
+   * punctuation.
+   * 
+ * + * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; + * @return The commonCharactersToIgnore. + */ + com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore getCommonCharactersToIgnore(); + + public com.google.privacy.dlp.v2.CharsToIgnore.CharactersCase getCharactersCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSet.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSet.java new file mode 100644 index 000000000000..3920225df85d --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSet.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Message representing a set of files in Cloud Storage.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStorageFileSet} + */ +public final class CloudStorageFileSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageFileSet) + CloudStorageFileSetOrBuilder { +private static final long serialVersionUID = 0L; + // Use CloudStorageFileSet.newBuilder() to construct. + private CloudStorageFileSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CloudStorageFileSet() { + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CloudStorageFileSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CloudStorageFileSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStorageFileSet.class, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+   * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+   * path is allowed.
+   * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+   * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+   * path is allowed.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageFileSet)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CloudStorageFileSet other = (com.google.privacy.dlp.v2.CloudStorageFileSet) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStorageFileSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Message representing a set of files in Cloud Storage.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStorageFileSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageFileSet) + com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStorageFileSet.class, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CloudStorageFileSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageFileSet getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageFileSet build() { + com.google.privacy.dlp.v2.CloudStorageFileSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageFileSet buildPartial() { + com.google.privacy.dlp.v2.CloudStorageFileSet result = new com.google.privacy.dlp.v2.CloudStorageFileSet(this); + result.url_ = url_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CloudStorageFileSet) { + return mergeFrom((com.google.privacy.dlp.v2.CloudStorageFileSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageFileSet other) { + if (other == com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CloudStorageFileSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CloudStorageFileSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+     * path is allowed.
+     * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+     * path is allowed.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+     * path is allowed.
+     * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+     * path is allowed.
+     * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+     * path is allowed.
+     * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageFileSet) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageFileSet) + private static final com.google.privacy.dlp.v2.CloudStorageFileSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageFileSet(); + } + + public static com.google.privacy.dlp.v2.CloudStorageFileSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudStorageFileSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudStorageFileSet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageFileSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSetOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSetOrBuilder.java new file mode 100644 index 000000000000..53a34ad8d59e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSetOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface CloudStorageFileSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStorageFileSet) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+   * path is allowed.
+   * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+   * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
+   * path is allowed.
+   * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java new file mode 100644 index 000000000000..e679a90d182e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java @@ -0,0 +1,2576 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Options defining a file or a set of files within a Cloud Storage
+ * bucket.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions} + */ +public final class CloudStorageOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageOptions) + CloudStorageOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use CloudStorageOptions.newBuilder() to construct. + private CloudStorageOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CloudStorageOptions() { + fileTypes_ = java.util.Collections.emptyList(); + sampleMethod_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CloudStorageOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CloudStorageOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder subBuilder = null; + if (fileSet_ != null) { + subBuilder = fileSet_.toBuilder(); + } + fileSet_ = input.readMessage(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fileSet_); + fileSet_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + + bytesLimitPerFile_ = input.readInt64(); + break; + } + case 40: { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fileTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fileTypes_.add(rawValue); + break; + } + case 42: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fileTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fileTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 48: { + int rawValue = input.readEnum(); + + sampleMethod_ = rawValue; + break; + } + case 56: { + + filesLimitPercent_ = input.readInt32(); + break; + } + case 64: { + + bytesLimitPerFilePercent_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fileTypes_ = java.util.Collections.unmodifiableList(fileTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStorageOptions.class, com.google.privacy.dlp.v2.CloudStorageOptions.Builder.class); + } + + /** + *
+   * How to sample bytes if not all bytes are scanned. Meaningful only when used
+   * in conjunction with bytes_limit_per_file. If not specified, scanning would
+   * start from the top.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.CloudStorageOptions.SampleMethod} + */ + public enum SampleMethod + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SAMPLE_METHOD_UNSPECIFIED = 0; + */ + SAMPLE_METHOD_UNSPECIFIED(0), + /** + *
+     * Scan from the top (default).
+     * 
+ * + * TOP = 1; + */ + TOP(1), + /** + *
+     * For each file larger than bytes_limit_per_file, randomly pick the offset
+     * to start scanning. The scanned bytes are contiguous.
+     * 
+ * + * RANDOM_START = 2; + */ + RANDOM_START(2), + UNRECOGNIZED(-1), + ; + + /** + * SAMPLE_METHOD_UNSPECIFIED = 0; + */ + public static final int SAMPLE_METHOD_UNSPECIFIED_VALUE = 0; + /** + *
+     * Scan from the top (default).
+     * 
+ * + * TOP = 1; + */ + public static final int TOP_VALUE = 1; + /** + *
+     * For each file larger than bytes_limit_per_file, randomly pick the offset
+     * to start scanning. The scanned bytes are contiguous.
+     * 
+ * + * RANDOM_START = 2; + */ + public static final int RANDOM_START_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SampleMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SampleMethod forNumber(int value) { + switch (value) { + case 0: return SAMPLE_METHOD_UNSPECIFIED; + case 1: return TOP; + case 2: return RANDOM_START; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SampleMethod> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SampleMethod findValueByNumber(int number) { + return SampleMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.CloudStorageOptions.getDescriptor().getEnumTypes().get(0); + } + + private static final SampleMethod[] VALUES = values(); + + public static SampleMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SampleMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CloudStorageOptions.SampleMethod) + } + + public interface FileSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStorageOptions.FileSet) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The Cloud Storage url of the file(s) to scan, in the format
+     * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+     * If the url ends in a trailing slash, the bucket or directory represented
+     * by the url will be scanned non-recursively (content in sub-directories
+     * will not be scanned). This means that `gs://mybucket/` is equivalent to
+     * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+     * `gs://mybucket/directory/*`.
+     * Exactly one of `url` or `regex_file_set` must be set.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The Cloud Storage url of the file(s) to scan, in the format
+     * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+     * If the url ends in a trailing slash, the bucket or directory represented
+     * by the url will be scanned non-recursively (content in sub-directories
+     * will not be scanned). This means that `gs://mybucket/` is equivalent to
+     * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+     * `gs://mybucket/directory/*`.
+     * Exactly one of `url` or `regex_file_set` must be set.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * The regex-filtered set of files to scan. Exactly one of `url` or
+     * `regex_file_set` must be set.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + * @return Whether the regexFileSet field is set. + */ + boolean hasRegexFileSet(); + /** + *
+     * The regex-filtered set of files to scan. Exactly one of `url` or
+     * `regex_file_set` must be set.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + * @return The regexFileSet. + */ + com.google.privacy.dlp.v2.CloudStorageRegexFileSet getRegexFileSet(); + /** + *
+     * The regex-filtered set of files to scan. Exactly one of `url` or
+     * `regex_file_set` must be set.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + */ + com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder getRegexFileSetOrBuilder(); + } + /** + *
+   * Set of files to scan.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions.FileSet} + */ + public static final class FileSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageOptions.FileSet) + FileSetOrBuilder { + private static final long serialVersionUID = 0L; + // Use FileSet.newBuilder() to construct. + private FileSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FileSet() { + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FileSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FileSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder subBuilder = null; + if (regexFileSet_ != null) { + subBuilder = regexFileSet_.toBuilder(); + } + regexFileSet_ = input.readMessage(com.google.privacy.dlp.v2.CloudStorageRegexFileSet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(regexFileSet_); + regexFileSet_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.class, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * The Cloud Storage url of the file(s) to scan, in the format
+     * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+     * If the url ends in a trailing slash, the bucket or directory represented
+     * by the url will be scanned non-recursively (content in sub-directories
+     * will not be scanned). This means that `gs://mybucket/` is equivalent to
+     * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+     * `gs://mybucket/directory/*`.
+     * Exactly one of `url` or `regex_file_set` must be set.
+     * 
+ * + * string url = 1; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + *
+     * The Cloud Storage url of the file(s) to scan, in the format
+     * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+     * If the url ends in a trailing slash, the bucket or directory represented
+     * by the url will be scanned non-recursively (content in sub-directories
+     * will not be scanned). This means that `gs://mybucket/` is equivalent to
+     * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+     * `gs://mybucket/directory/*`.
+     * Exactly one of `url` or `regex_file_set` must be set.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGEX_FILE_SET_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.CloudStorageRegexFileSet regexFileSet_; + /** + *
+     * The regex-filtered set of files to scan. Exactly one of `url` or
+     * `regex_file_set` must be set.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + * @return Whether the regexFileSet field is set. + */ + @java.lang.Override + public boolean hasRegexFileSet() { + return regexFileSet_ != null; + } + /** + *
+     * The regex-filtered set of files to scan. Exactly one of `url` or
+     * `regex_file_set` must be set.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + * @return The regexFileSet. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getRegexFileSet() { + return regexFileSet_ == null ? com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance() : regexFileSet_; + } + /** + *
+     * The regex-filtered set of files to scan. Exactly one of `url` or
+     * `regex_file_set` must be set.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder getRegexFileSetOrBuilder() { + return getRegexFileSet(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (regexFileSet_ != null) { + output.writeMessage(2, getRegexFileSet()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (regexFileSet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRegexFileSet()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageOptions.FileSet)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet other = (com.google.privacy.dlp.v2.CloudStorageOptions.FileSet) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (hasRegexFileSet() != other.hasRegexFileSet()) return false; + if (hasRegexFileSet()) { + if (!getRegexFileSet() + .equals(other.getRegexFileSet())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + if (hasRegexFileSet()) { + hash = (37 * hash) + REGEX_FILE_SET_FIELD_NUMBER; + hash = (53 * hash) + getRegexFileSet().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Set of files to scan.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions.FileSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageOptions.FileSet) + com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.class, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + if (regexFileSetBuilder_ == null) { + regexFileSet_ = null; + } else { + regexFileSet_ = null; + regexFileSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet build() { + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet buildPartial() { + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet result = new com.google.privacy.dlp.v2.CloudStorageOptions.FileSet(this); + result.url_ = url_; + if (regexFileSetBuilder_ == null) { + result.regexFileSet_ = regexFileSet_; + } else { + result.regexFileSet_ = regexFileSetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CloudStorageOptions.FileSet) { + return mergeFrom((com.google.privacy.dlp.v2.CloudStorageOptions.FileSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet other) { + if (other == com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.hasRegexFileSet()) { + mergeRegexFileSet(other.getRegexFileSet()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CloudStorageOptions.FileSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * The Cloud Storage url of the file(s) to scan, in the format
+       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+       * If the url ends in a trailing slash, the bucket or directory represented
+       * by the url will be scanned non-recursively (content in sub-directories
+       * will not be scanned). This means that `gs://mybucket/` is equivalent to
+       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+       * `gs://mybucket/directory/*`.
+       * Exactly one of `url` or `regex_file_set` must be set.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The Cloud Storage url of the file(s) to scan, in the format
+       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+       * If the url ends in a trailing slash, the bucket or directory represented
+       * by the url will be scanned non-recursively (content in sub-directories
+       * will not be scanned). This means that `gs://mybucket/` is equivalent to
+       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+       * `gs://mybucket/directory/*`.
+       * Exactly one of `url` or `regex_file_set` must be set.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The Cloud Storage url of the file(s) to scan, in the format
+       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+       * If the url ends in a trailing slash, the bucket or directory represented
+       * by the url will be scanned non-recursively (content in sub-directories
+       * will not be scanned). This means that `gs://mybucket/` is equivalent to
+       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+       * `gs://mybucket/directory/*`.
+       * Exactly one of `url` or `regex_file_set` must be set.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The Cloud Storage url of the file(s) to scan, in the format
+       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+       * If the url ends in a trailing slash, the bucket or directory represented
+       * by the url will be scanned non-recursively (content in sub-directories
+       * will not be scanned). This means that `gs://mybucket/` is equivalent to
+       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+       * `gs://mybucket/directory/*`.
+       * Exactly one of `url` or `regex_file_set` must be set.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The Cloud Storage url of the file(s) to scan, in the format
+       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
+       * If the url ends in a trailing slash, the bucket or directory represented
+       * by the url will be scanned non-recursively (content in sub-directories
+       * will not be scanned). This means that `gs://mybucket/` is equivalent to
+       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
+       * `gs://mybucket/directory/*`.
+       * Exactly one of `url` or `regex_file_set` must be set.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.CloudStorageRegexFileSet regexFileSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageRegexFileSet, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder> regexFileSetBuilder_; + /** + *
+       * The regex-filtered set of files to scan. Exactly one of `url` or
+       * `regex_file_set` must be set.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + * @return Whether the regexFileSet field is set. + */ + public boolean hasRegexFileSet() { + return regexFileSetBuilder_ != null || regexFileSet_ != null; + } + /** + *
+       * The regex-filtered set of files to scan. Exactly one of `url` or
+       * `regex_file_set` must be set.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + * @return The regexFileSet. + */ + public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getRegexFileSet() { + if (regexFileSetBuilder_ == null) { + return regexFileSet_ == null ? com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance() : regexFileSet_; + } else { + return regexFileSetBuilder_.getMessage(); + } + } + /** + *
+       * The regex-filtered set of files to scan. Exactly one of `url` or
+       * `regex_file_set` must be set.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + */ + public Builder setRegexFileSet(com.google.privacy.dlp.v2.CloudStorageRegexFileSet value) { + if (regexFileSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + regexFileSet_ = value; + onChanged(); + } else { + regexFileSetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The regex-filtered set of files to scan. Exactly one of `url` or
+       * `regex_file_set` must be set.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + */ + public Builder setRegexFileSet( + com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder builderForValue) { + if (regexFileSetBuilder_ == null) { + regexFileSet_ = builderForValue.build(); + onChanged(); + } else { + regexFileSetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The regex-filtered set of files to scan. Exactly one of `url` or
+       * `regex_file_set` must be set.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + */ + public Builder mergeRegexFileSet(com.google.privacy.dlp.v2.CloudStorageRegexFileSet value) { + if (regexFileSetBuilder_ == null) { + if (regexFileSet_ != null) { + regexFileSet_ = + com.google.privacy.dlp.v2.CloudStorageRegexFileSet.newBuilder(regexFileSet_).mergeFrom(value).buildPartial(); + } else { + regexFileSet_ = value; + } + onChanged(); + } else { + regexFileSetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The regex-filtered set of files to scan. Exactly one of `url` or
+       * `regex_file_set` must be set.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + */ + public Builder clearRegexFileSet() { + if (regexFileSetBuilder_ == null) { + regexFileSet_ = null; + onChanged(); + } else { + regexFileSet_ = null; + regexFileSetBuilder_ = null; + } + + return this; + } + /** + *
+       * The regex-filtered set of files to scan. Exactly one of `url` or
+       * `regex_file_set` must be set.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + */ + public com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder getRegexFileSetBuilder() { + + onChanged(); + return getRegexFileSetFieldBuilder().getBuilder(); + } + /** + *
+       * The regex-filtered set of files to scan. Exactly one of `url` or
+       * `regex_file_set` must be set.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + */ + public com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder getRegexFileSetOrBuilder() { + if (regexFileSetBuilder_ != null) { + return regexFileSetBuilder_.getMessageOrBuilder(); + } else { + return regexFileSet_ == null ? + com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance() : regexFileSet_; + } + } + /** + *
+       * The regex-filtered set of files to scan. Exactly one of `url` or
+       * `regex_file_set` must be set.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageRegexFileSet, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder> + getRegexFileSetFieldBuilder() { + if (regexFileSetBuilder_ == null) { + regexFileSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageRegexFileSet, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder>( + getRegexFileSet(), + getParentForChildren(), + isClean()); + regexFileSet_ = null; + } + return regexFileSetBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageOptions.FileSet) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageOptions.FileSet) + private static final com.google.privacy.dlp.v2.CloudStorageOptions.FileSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageOptions.FileSet(); + } + + public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FileSet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FILE_SET_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.CloudStorageOptions.FileSet fileSet_; + /** + *
+   * The set of one or more files to scan.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + * @return Whether the fileSet field is set. + */ + @java.lang.Override + public boolean hasFileSet() { + return fileSet_ != null; + } + /** + *
+   * The set of one or more files to scan.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + * @return The fileSet. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getFileSet() { + return fileSet_ == null ? com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance() : fileSet_; + } + /** + *
+   * The set of one or more files to scan.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder getFileSetOrBuilder() { + return getFileSet(); + } + + public static final int BYTES_LIMIT_PER_FILE_FIELD_NUMBER = 4; + private long bytesLimitPerFile_; + /** + *
+   * Max number of bytes to scan from a file. If a scanned file's size is bigger
+   * than this value then the rest of the bytes are omitted. Only one
+   * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+   * Cannot be set if de-identification is requested.
+   * 
+ * + * int64 bytes_limit_per_file = 4; + * @return The bytesLimitPerFile. + */ + @java.lang.Override + public long getBytesLimitPerFile() { + return bytesLimitPerFile_; + } + + public static final int BYTES_LIMIT_PER_FILE_PERCENT_FIELD_NUMBER = 8; + private int bytesLimitPerFilePercent_; + /** + *
+   * Max percentage of bytes to scan from a file. The rest are omitted. The
+   * number of bytes scanned is rounded down. Must be between 0 and 100,
+   * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
+   * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+   * Cannot be set if de-identification is requested.
+   * 
+ * + * int32 bytes_limit_per_file_percent = 8; + * @return The bytesLimitPerFilePercent. + */ + @java.lang.Override + public int getBytesLimitPerFilePercent() { + return bytesLimitPerFilePercent_; + } + + public static final int FILE_TYPES_FIELD_NUMBER = 5; + private java.util.List fileTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType> fileTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType>() { + public com.google.privacy.dlp.v2.FileType convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.FileType result = com.google.privacy.dlp.v2.FileType.valueOf(from); + return result == null ? com.google.privacy.dlp.v2.FileType.UNRECOGNIZED : result; + } + }; + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return A list containing the fileTypes. + */ + @java.lang.Override + public java.util.List getFileTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypes_, fileTypes_converter_); + } + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return The count of fileTypes. + */ + @java.lang.Override + public int getFileTypesCount() { + return fileTypes_.size(); + } + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param index The index of the element to return. + * @return The fileTypes at the given index. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FileType getFileTypes(int index) { + return fileTypes_converter_.convert(fileTypes_.get(index)); + } + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return A list containing the enum numeric values on the wire for fileTypes. + */ + @java.lang.Override + public java.util.List + getFileTypesValueList() { + return fileTypes_; + } + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fileTypes at the given index. + */ + @java.lang.Override + public int getFileTypesValue(int index) { + return fileTypes_.get(index); + } + private int fileTypesMemoizedSerializedSize; + + public static final int SAMPLE_METHOD_FIELD_NUMBER = 6; + private int sampleMethod_; + /** + * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; + * @return The enum numeric value on the wire for sampleMethod. + */ + @java.lang.Override public int getSampleMethodValue() { + return sampleMethod_; + } + /** + * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; + * @return The sampleMethod. + */ + @java.lang.Override public com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod getSampleMethod() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod result = com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.valueOf(sampleMethod_); + return result == null ? com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.UNRECOGNIZED : result; + } + + public static final int FILES_LIMIT_PERCENT_FIELD_NUMBER = 7; + private int filesLimitPercent_; + /** + *
+   * Limits the number of files to scan to this percentage of the input FileSet.
+   * Number of files scanned is rounded down. Must be between 0 and 100,
+   * inclusively. Both 0 and 100 means no limit. Defaults to 0.
+   * 
+ * + * int32 files_limit_percent = 7; + * @return The filesLimitPercent. + */ + @java.lang.Override + public int getFilesLimitPercent() { + return filesLimitPercent_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (fileSet_ != null) { + output.writeMessage(1, getFileSet()); + } + if (bytesLimitPerFile_ != 0L) { + output.writeInt64(4, bytesLimitPerFile_); + } + if (getFileTypesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(fileTypesMemoizedSerializedSize); + } + for (int i = 0; i < fileTypes_.size(); i++) { + output.writeEnumNoTag(fileTypes_.get(i)); + } + if (sampleMethod_ != com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED.getNumber()) { + output.writeEnum(6, sampleMethod_); + } + if (filesLimitPercent_ != 0) { + output.writeInt32(7, filesLimitPercent_); + } + if (bytesLimitPerFilePercent_ != 0) { + output.writeInt32(8, bytesLimitPerFilePercent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fileSet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFileSet()); + } + if (bytesLimitPerFile_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, bytesLimitPerFile_); + } + { + int dataSize = 0; + for (int i = 0; i < fileTypes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(fileTypes_.get(i)); + } + size += dataSize; + if (!getFileTypesList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }fileTypesMemoizedSerializedSize = dataSize; + } + if (sampleMethod_ != com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, sampleMethod_); + } + if (filesLimitPercent_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, filesLimitPercent_); + } + if (bytesLimitPerFilePercent_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, bytesLimitPerFilePercent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageOptions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CloudStorageOptions other = (com.google.privacy.dlp.v2.CloudStorageOptions) obj; + + if (hasFileSet() != other.hasFileSet()) return false; + if (hasFileSet()) { + if (!getFileSet() + .equals(other.getFileSet())) return false; + } + if (getBytesLimitPerFile() + != other.getBytesLimitPerFile()) return false; + if (getBytesLimitPerFilePercent() + != other.getBytesLimitPerFilePercent()) return false; + if (!fileTypes_.equals(other.fileTypes_)) return false; + if (sampleMethod_ != other.sampleMethod_) return false; + if (getFilesLimitPercent() + != other.getFilesLimitPercent()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFileSet()) { + hash = (37 * hash) + FILE_SET_FIELD_NUMBER; + hash = (53 * hash) + getFileSet().hashCode(); + } + hash = (37 * hash) + BYTES_LIMIT_PER_FILE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBytesLimitPerFile()); + hash = (37 * hash) + BYTES_LIMIT_PER_FILE_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getBytesLimitPerFilePercent(); + if (getFileTypesCount() > 0) { + hash = (37 * hash) + FILE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + fileTypes_.hashCode(); + } + hash = (37 * hash) + SAMPLE_METHOD_FIELD_NUMBER; + hash = (53 * hash) + sampleMethod_; + hash = (37 * hash) + FILES_LIMIT_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getFilesLimitPercent(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStorageOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Options defining a file or a set of files within a Cloud Storage
+   * bucket.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageOptions) + com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStorageOptions.class, com.google.privacy.dlp.v2.CloudStorageOptions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CloudStorageOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fileSetBuilder_ == null) { + fileSet_ = null; + } else { + fileSet_ = null; + fileSetBuilder_ = null; + } + bytesLimitPerFile_ = 0L; + + bytesLimitPerFilePercent_ = 0; + + fileTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + sampleMethod_ = 0; + + filesLimitPercent_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions build() { + com.google.privacy.dlp.v2.CloudStorageOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions buildPartial() { + com.google.privacy.dlp.v2.CloudStorageOptions result = new com.google.privacy.dlp.v2.CloudStorageOptions(this); + int from_bitField0_ = bitField0_; + if (fileSetBuilder_ == null) { + result.fileSet_ = fileSet_; + } else { + result.fileSet_ = fileSetBuilder_.build(); + } + result.bytesLimitPerFile_ = bytesLimitPerFile_; + result.bytesLimitPerFilePercent_ = bytesLimitPerFilePercent_; + if (((bitField0_ & 0x00000001) != 0)) { + fileTypes_ = java.util.Collections.unmodifiableList(fileTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fileTypes_ = fileTypes_; + result.sampleMethod_ = sampleMethod_; + result.filesLimitPercent_ = filesLimitPercent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CloudStorageOptions) { + return mergeFrom((com.google.privacy.dlp.v2.CloudStorageOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageOptions other) { + if (other == com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance()) return this; + if (other.hasFileSet()) { + mergeFileSet(other.getFileSet()); + } + if (other.getBytesLimitPerFile() != 0L) { + setBytesLimitPerFile(other.getBytesLimitPerFile()); + } + if (other.getBytesLimitPerFilePercent() != 0) { + setBytesLimitPerFilePercent(other.getBytesLimitPerFilePercent()); + } + if (!other.fileTypes_.isEmpty()) { + if (fileTypes_.isEmpty()) { + fileTypes_ = other.fileTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFileTypesIsMutable(); + fileTypes_.addAll(other.fileTypes_); + } + onChanged(); + } + if (other.sampleMethod_ != 0) { + setSampleMethodValue(other.getSampleMethodValue()); + } + if (other.getFilesLimitPercent() != 0) { + setFilesLimitPercent(other.getFilesLimitPercent()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CloudStorageOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CloudStorageOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.CloudStorageOptions.FileSet fileSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder, com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder> fileSetBuilder_; + /** + *
+     * The set of one or more files to scan.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + * @return Whether the fileSet field is set. + */ + public boolean hasFileSet() { + return fileSetBuilder_ != null || fileSet_ != null; + } + /** + *
+     * The set of one or more files to scan.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + * @return The fileSet. + */ + public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getFileSet() { + if (fileSetBuilder_ == null) { + return fileSet_ == null ? com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance() : fileSet_; + } else { + return fileSetBuilder_.getMessage(); + } + } + /** + *
+     * The set of one or more files to scan.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + */ + public Builder setFileSet(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet value) { + if (fileSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fileSet_ = value; + onChanged(); + } else { + fileSetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The set of one or more files to scan.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + */ + public Builder setFileSet( + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder builderForValue) { + if (fileSetBuilder_ == null) { + fileSet_ = builderForValue.build(); + onChanged(); + } else { + fileSetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The set of one or more files to scan.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + */ + public Builder mergeFileSet(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet value) { + if (fileSetBuilder_ == null) { + if (fileSet_ != null) { + fileSet_ = + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.newBuilder(fileSet_).mergeFrom(value).buildPartial(); + } else { + fileSet_ = value; + } + onChanged(); + } else { + fileSetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The set of one or more files to scan.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + */ + public Builder clearFileSet() { + if (fileSetBuilder_ == null) { + fileSet_ = null; + onChanged(); + } else { + fileSet_ = null; + fileSetBuilder_ = null; + } + + return this; + } + /** + *
+     * The set of one or more files to scan.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + */ + public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder getFileSetBuilder() { + + onChanged(); + return getFileSetFieldBuilder().getBuilder(); + } + /** + *
+     * The set of one or more files to scan.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + */ + public com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder getFileSetOrBuilder() { + if (fileSetBuilder_ != null) { + return fileSetBuilder_.getMessageOrBuilder(); + } else { + return fileSet_ == null ? + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance() : fileSet_; + } + } + /** + *
+     * The set of one or more files to scan.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder, com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder> + getFileSetFieldBuilder() { + if (fileSetBuilder_ == null) { + fileSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder, com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder>( + getFileSet(), + getParentForChildren(), + isClean()); + fileSet_ = null; + } + return fileSetBuilder_; + } + + private long bytesLimitPerFile_ ; + /** + *
+     * Max number of bytes to scan from a file. If a scanned file's size is bigger
+     * than this value then the rest of the bytes are omitted. Only one
+     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+     * Cannot be set if de-identification is requested.
+     * 
+ * + * int64 bytes_limit_per_file = 4; + * @return The bytesLimitPerFile. + */ + @java.lang.Override + public long getBytesLimitPerFile() { + return bytesLimitPerFile_; + } + /** + *
+     * Max number of bytes to scan from a file. If a scanned file's size is bigger
+     * than this value then the rest of the bytes are omitted. Only one
+     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+     * Cannot be set if de-identification is requested.
+     * 
+ * + * int64 bytes_limit_per_file = 4; + * @param value The bytesLimitPerFile to set. + * @return This builder for chaining. + */ + public Builder setBytesLimitPerFile(long value) { + + bytesLimitPerFile_ = value; + onChanged(); + return this; + } + /** + *
+     * Max number of bytes to scan from a file. If a scanned file's size is bigger
+     * than this value then the rest of the bytes are omitted. Only one
+     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+     * Cannot be set if de-identification is requested.
+     * 
+ * + * int64 bytes_limit_per_file = 4; + * @return This builder for chaining. + */ + public Builder clearBytesLimitPerFile() { + + bytesLimitPerFile_ = 0L; + onChanged(); + return this; + } + + private int bytesLimitPerFilePercent_ ; + /** + *
+     * Max percentage of bytes to scan from a file. The rest are omitted. The
+     * number of bytes scanned is rounded down. Must be between 0 and 100,
+     * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
+     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+     * Cannot be set if de-identification is requested.
+     * 
+ * + * int32 bytes_limit_per_file_percent = 8; + * @return The bytesLimitPerFilePercent. + */ + @java.lang.Override + public int getBytesLimitPerFilePercent() { + return bytesLimitPerFilePercent_; + } + /** + *
+     * Max percentage of bytes to scan from a file. The rest are omitted. The
+     * number of bytes scanned is rounded down. Must be between 0 and 100,
+     * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
+     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+     * Cannot be set if de-identification is requested.
+     * 
+ * + * int32 bytes_limit_per_file_percent = 8; + * @param value The bytesLimitPerFilePercent to set. + * @return This builder for chaining. + */ + public Builder setBytesLimitPerFilePercent(int value) { + + bytesLimitPerFilePercent_ = value; + onChanged(); + return this; + } + /** + *
+     * Max percentage of bytes to scan from a file. The rest are omitted. The
+     * number of bytes scanned is rounded down. Must be between 0 and 100,
+     * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
+     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+     * Cannot be set if de-identification is requested.
+     * 
+ * + * int32 bytes_limit_per_file_percent = 8; + * @return This builder for chaining. + */ + public Builder clearBytesLimitPerFilePercent() { + + bytesLimitPerFilePercent_ = 0; + onChanged(); + return this; + } + + private java.util.List fileTypes_ = + java.util.Collections.emptyList(); + private void ensureFileTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fileTypes_ = new java.util.ArrayList(fileTypes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return A list containing the fileTypes. + */ + public java.util.List getFileTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypes_, fileTypes_converter_); + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return The count of fileTypes. + */ + public int getFileTypesCount() { + return fileTypes_.size(); + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param index The index of the element to return. + * @return The fileTypes at the given index. + */ + public com.google.privacy.dlp.v2.FileType getFileTypes(int index) { + return fileTypes_converter_.convert(fileTypes_.get(index)); + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param index The index to set the value at. + * @param value The fileTypes to set. + * @return This builder for chaining. + */ + public Builder setFileTypes( + int index, com.google.privacy.dlp.v2.FileType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileTypesIsMutable(); + fileTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param value The fileTypes to add. + * @return This builder for chaining. + */ + public Builder addFileTypes(com.google.privacy.dlp.v2.FileType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileTypesIsMutable(); + fileTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param values The fileTypes to add. + * @return This builder for chaining. + */ + public Builder addAllFileTypes( + java.lang.Iterable values) { + ensureFileTypesIsMutable(); + for (com.google.privacy.dlp.v2.FileType value : values) { + fileTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return This builder for chaining. + */ + public Builder clearFileTypes() { + fileTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return A list containing the enum numeric values on the wire for fileTypes. + */ + public java.util.List + getFileTypesValueList() { + return java.util.Collections.unmodifiableList(fileTypes_); + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fileTypes at the given index. + */ + public int getFileTypesValue(int index) { + return fileTypes_.get(index); + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for fileTypes to set. + * @return This builder for chaining. + */ + public Builder setFileTypesValue( + int index, int value) { + ensureFileTypesIsMutable(); + fileTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param value The enum numeric value on the wire for fileTypes to add. + * @return This builder for chaining. + */ + public Builder addFileTypesValue(int value) { + ensureFileTypesIsMutable(); + fileTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * List of file type groups to include in the scan.
+     * 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'.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param values The enum numeric values on the wire for fileTypes to add. + * @return This builder for chaining. + */ + public Builder addAllFileTypesValue( + java.lang.Iterable values) { + ensureFileTypesIsMutable(); + for (int value : values) { + fileTypes_.add(value); + } + onChanged(); + return this; + } + + private int sampleMethod_ = 0; + /** + * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; + * @return The enum numeric value on the wire for sampleMethod. + */ + @java.lang.Override public int getSampleMethodValue() { + return sampleMethod_; + } + /** + * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; + * @param value The enum numeric value on the wire for sampleMethod to set. + * @return This builder for chaining. + */ + public Builder setSampleMethodValue(int value) { + + sampleMethod_ = value; + onChanged(); + return this; + } + /** + * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; + * @return The sampleMethod. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod getSampleMethod() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod result = com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.valueOf(sampleMethod_); + return result == null ? com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.UNRECOGNIZED : result; + } + /** + * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; + * @param value The sampleMethod to set. + * @return This builder for chaining. + */ + public Builder setSampleMethod(com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod value) { + if (value == null) { + throw new NullPointerException(); + } + + sampleMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; + * @return This builder for chaining. + */ + public Builder clearSampleMethod() { + + sampleMethod_ = 0; + onChanged(); + return this; + } + + private int filesLimitPercent_ ; + /** + *
+     * Limits the number of files to scan to this percentage of the input FileSet.
+     * Number of files scanned is rounded down. Must be between 0 and 100,
+     * inclusively. Both 0 and 100 means no limit. Defaults to 0.
+     * 
+ * + * int32 files_limit_percent = 7; + * @return The filesLimitPercent. + */ + @java.lang.Override + public int getFilesLimitPercent() { + return filesLimitPercent_; + } + /** + *
+     * Limits the number of files to scan to this percentage of the input FileSet.
+     * Number of files scanned is rounded down. Must be between 0 and 100,
+     * inclusively. Both 0 and 100 means no limit. Defaults to 0.
+     * 
+ * + * int32 files_limit_percent = 7; + * @param value The filesLimitPercent to set. + * @return This builder for chaining. + */ + public Builder setFilesLimitPercent(int value) { + + filesLimitPercent_ = value; + onChanged(); + return this; + } + /** + *
+     * Limits the number of files to scan to this percentage of the input FileSet.
+     * Number of files scanned is rounded down. Must be between 0 and 100,
+     * inclusively. Both 0 and 100 means no limit. Defaults to 0.
+     * 
+ * + * int32 files_limit_percent = 7; + * @return This builder for chaining. + */ + public Builder clearFilesLimitPercent() { + + filesLimitPercent_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageOptions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageOptions) + private static final com.google.privacy.dlp.v2.CloudStorageOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageOptions(); + } + + public static com.google.privacy.dlp.v2.CloudStorageOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudStorageOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudStorageOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java new file mode 100644 index 000000000000..18e0a6a76e0e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java @@ -0,0 +1,165 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface CloudStorageOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStorageOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The set of one or more files to scan.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + * @return Whether the fileSet field is set. + */ + boolean hasFileSet(); + /** + *
+   * The set of one or more files to scan.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + * @return The fileSet. + */ + com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getFileSet(); + /** + *
+   * The set of one or more files to scan.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; + */ + com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder getFileSetOrBuilder(); + + /** + *
+   * Max number of bytes to scan from a file. If a scanned file's size is bigger
+   * than this value then the rest of the bytes are omitted. Only one
+   * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+   * Cannot be set if de-identification is requested.
+   * 
+ * + * int64 bytes_limit_per_file = 4; + * @return The bytesLimitPerFile. + */ + long getBytesLimitPerFile(); + + /** + *
+   * Max percentage of bytes to scan from a file. The rest are omitted. The
+   * number of bytes scanned is rounded down. Must be between 0 and 100,
+   * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
+   * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
+   * Cannot be set if de-identification is requested.
+   * 
+ * + * int32 bytes_limit_per_file_percent = 8; + * @return The bytesLimitPerFilePercent. + */ + int getBytesLimitPerFilePercent(); + + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return A list containing the fileTypes. + */ + java.util.List getFileTypesList(); + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return The count of fileTypes. + */ + int getFileTypesCount(); + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param index The index of the element to return. + * @return The fileTypes at the given index. + */ + com.google.privacy.dlp.v2.FileType getFileTypes(int index); + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @return A list containing the enum numeric values on the wire for fileTypes. + */ + java.util.List + getFileTypesValueList(); + /** + *
+   * List of file type groups to include in the scan.
+   * 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'.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types = 5; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fileTypes at the given index. + */ + int getFileTypesValue(int index); + + /** + * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; + * @return The enum numeric value on the wire for sampleMethod. + */ + int getSampleMethodValue(); + /** + * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; + * @return The sampleMethod. + */ + com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod getSampleMethod(); + + /** + *
+   * Limits the number of files to scan to this percentage of the input FileSet.
+   * Number of files scanned is rounded down. Must be between 0 and 100,
+   * inclusively. Both 0 and 100 means no limit. Defaults to 0.
+   * 
+ * + * int32 files_limit_percent = 7; + * @return The filesLimitPercent. + */ + int getFilesLimitPercent(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java new file mode 100644 index 000000000000..8e97e3cb40d0 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Message representing a single file or path in Cloud Storage.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStoragePath} + */ +public final class CloudStoragePath extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStoragePath) + CloudStoragePathOrBuilder { +private static final long serialVersionUID = 0L; + // Use CloudStoragePath.newBuilder() to construct. + private CloudStoragePath(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CloudStoragePath() { + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CloudStoragePath(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CloudStoragePath( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStoragePath.class, com.google.privacy.dlp.v2.CloudStoragePath.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object path_; + /** + *
+   * A url representing a file or path (no wildcards) in Cloud Storage.
+   * Example: gs://[BUCKET_NAME]/dictionary.txt
+   * 
+ * + * string path = 1; + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + *
+   * A url representing a file or path (no wildcards) in Cloud Storage.
+   * Example: gs://[BUCKET_NAME]/dictionary.txt
+   * 
+ * + * string path = 1; + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CloudStoragePath)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CloudStoragePath other = (com.google.privacy.dlp.v2.CloudStoragePath) obj; + + if (!getPath() + .equals(other.getPath())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStoragePath prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Message representing a single file or path in Cloud Storage.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStoragePath} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStoragePath) + com.google.privacy.dlp.v2.CloudStoragePathOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStoragePath.class, com.google.privacy.dlp.v2.CloudStoragePath.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CloudStoragePath.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + path_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePath getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePath build() { + com.google.privacy.dlp.v2.CloudStoragePath result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePath buildPartial() { + com.google.privacy.dlp.v2.CloudStoragePath result = new com.google.privacy.dlp.v2.CloudStoragePath(this); + result.path_ = path_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CloudStoragePath) { + return mergeFrom((com.google.privacy.dlp.v2.CloudStoragePath)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStoragePath other) { + if (other == com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CloudStoragePath parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CloudStoragePath) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object path_ = ""; + /** + *
+     * A url representing a file or path (no wildcards) in Cloud Storage.
+     * Example: gs://[BUCKET_NAME]/dictionary.txt
+     * 
+ * + * string path = 1; + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A url representing a file or path (no wildcards) in Cloud Storage.
+     * Example: gs://[BUCKET_NAME]/dictionary.txt
+     * 
+ * + * string path = 1; + * @return The bytes for path. + */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A url representing a file or path (no wildcards) in Cloud Storage.
+     * Example: gs://[BUCKET_NAME]/dictionary.txt
+     * 
+ * + * string path = 1; + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + *
+     * A url representing a file or path (no wildcards) in Cloud Storage.
+     * Example: gs://[BUCKET_NAME]/dictionary.txt
+     * 
+ * + * string path = 1; + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + *
+     * A url representing a file or path (no wildcards) in Cloud Storage.
+     * Example: gs://[BUCKET_NAME]/dictionary.txt
+     * 
+ * + * string path = 1; + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStoragePath) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStoragePath) + private static final com.google.privacy.dlp.v2.CloudStoragePath DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStoragePath(); + } + + public static com.google.privacy.dlp.v2.CloudStoragePath getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudStoragePath parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudStoragePath(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePath getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePathOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePathOrBuilder.java new file mode 100644 index 000000000000..b3e4adb31d67 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePathOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface CloudStoragePathOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStoragePath) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A url representing a file or path (no wildcards) in Cloud Storage.
+   * Example: gs://[BUCKET_NAME]/dictionary.txt
+   * 
+ * + * string path = 1; + * @return The path. + */ + java.lang.String getPath(); + /** + *
+   * A url representing a file or path (no wildcards) in Cloud Storage.
+   * Example: gs://[BUCKET_NAME]/dictionary.txt
+   * 
+ * + * string path = 1; + * @return The bytes for path. + */ + com.google.protobuf.ByteString + getPathBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSet.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSet.java new file mode 100644 index 000000000000..eb7247ed7ca0 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSet.java @@ -0,0 +1,1292 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Message representing a set of files in a Cloud Storage bucket. Regular
+ * expressions are used to allow fine-grained control over which files in the
+ * bucket to include.
+ * Included files are those that match at least one item in `include_regex` and
+ * do not match any items in `exclude_regex`. Note that a file that matches
+ * items from both lists will _not_ be included. For a match to occur, the
+ * entire file path (i.e., everything in the url after the bucket name) must
+ * match the regular expression.
+ * For example, given the input `{bucket_name: "mybucket", include_regex:
+ * ["directory1/.*"], exclude_regex:
+ * ["directory1/excluded.*"]}`:
+ * * `gs://mybucket/directory1/myfile` will be included
+ * * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches
+ * across `/`)
+ * * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the
+ * full path doesn't match any items in `include_regex`)
+ * * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path
+ * matches an item in `exclude_regex`)
+ * If `include_regex` is left empty, it will match all files by default
+ * (this is equivalent to setting `include_regex: [".*"]`).
+ * Some other common use cases:
+ * * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all
+ * files in `mybucket` except for .pdf files
+ * * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will
+ * include all files directly under `gs://mybucket/directory/`, without matching
+ * across `/`
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStorageRegexFileSet} + */ +public final class CloudStorageRegexFileSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageRegexFileSet) + CloudStorageRegexFileSetOrBuilder { +private static final long serialVersionUID = 0L; + // Use CloudStorageRegexFileSet.newBuilder() to construct. + private CloudStorageRegexFileSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CloudStorageRegexFileSet() { + bucketName_ = ""; + includeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; + excludeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CloudStorageRegexFileSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CloudStorageRegexFileSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + bucketName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + includeRegex_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + includeRegex_.add(s); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + excludeRegex_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + excludeRegex_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + includeRegex_ = includeRegex_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + excludeRegex_ = excludeRegex_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStorageRegexFileSet.class, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder.class); + } + + public static final int BUCKET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object bucketName_; + /** + *
+   * The name of a Cloud Storage bucket. Required.
+   * 
+ * + * string bucket_name = 1; + * @return The bucketName. + */ + @java.lang.Override + public java.lang.String getBucketName() { + java.lang.Object ref = bucketName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketName_ = s; + return s; + } + } + /** + *
+   * The name of a Cloud Storage bucket. Required.
+   * 
+ * + * string bucket_name = 1; + * @return The bytes for bucketName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBucketNameBytes() { + java.lang.Object ref = bucketName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bucketName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCLUDE_REGEX_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList includeRegex_; + /** + *
+   * A list of regular expressions matching file paths to include. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * included in the set of files, except for those that also match an item in
+   * `exclude_regex`. Leaving this field empty will match all files by default
+   * (this is equivalent to including `.*` in the list).
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string include_regex = 2; + * @return A list containing the includeRegex. + */ + public com.google.protobuf.ProtocolStringList + getIncludeRegexList() { + return includeRegex_; + } + /** + *
+   * A list of regular expressions matching file paths to include. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * included in the set of files, except for those that also match an item in
+   * `exclude_regex`. Leaving this field empty will match all files by default
+   * (this is equivalent to including `.*` in the list).
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string include_regex = 2; + * @return The count of includeRegex. + */ + public int getIncludeRegexCount() { + return includeRegex_.size(); + } + /** + *
+   * A list of regular expressions matching file paths to include. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * included in the set of files, except for those that also match an item in
+   * `exclude_regex`. Leaving this field empty will match all files by default
+   * (this is equivalent to including `.*` in the list).
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string include_regex = 2; + * @param index The index of the element to return. + * @return The includeRegex at the given index. + */ + public java.lang.String getIncludeRegex(int index) { + return includeRegex_.get(index); + } + /** + *
+   * A list of regular expressions matching file paths to include. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * included in the set of files, except for those that also match an item in
+   * `exclude_regex`. Leaving this field empty will match all files by default
+   * (this is equivalent to including `.*` in the list).
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string include_regex = 2; + * @param index The index of the value to return. + * @return The bytes of the includeRegex at the given index. + */ + public com.google.protobuf.ByteString + getIncludeRegexBytes(int index) { + return includeRegex_.getByteString(index); + } + + public static final int EXCLUDE_REGEX_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList excludeRegex_; + /** + *
+   * A list of regular expressions matching file paths to exclude. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * excluded from the scan.
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string exclude_regex = 3; + * @return A list containing the excludeRegex. + */ + public com.google.protobuf.ProtocolStringList + getExcludeRegexList() { + return excludeRegex_; + } + /** + *
+   * A list of regular expressions matching file paths to exclude. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * excluded from the scan.
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string exclude_regex = 3; + * @return The count of excludeRegex. + */ + public int getExcludeRegexCount() { + return excludeRegex_.size(); + } + /** + *
+   * A list of regular expressions matching file paths to exclude. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * excluded from the scan.
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string exclude_regex = 3; + * @param index The index of the element to return. + * @return The excludeRegex at the given index. + */ + public java.lang.String getExcludeRegex(int index) { + return excludeRegex_.get(index); + } + /** + *
+   * A list of regular expressions matching file paths to exclude. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * excluded from the scan.
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string exclude_regex = 3; + * @param index The index of the value to return. + * @return The bytes of the excludeRegex at the given index. + */ + public com.google.protobuf.ByteString + getExcludeRegexBytes(int index) { + return excludeRegex_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucketName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bucketName_); + } + for (int i = 0; i < includeRegex_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, includeRegex_.getRaw(i)); + } + for (int i = 0; i < excludeRegex_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, excludeRegex_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucketName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bucketName_); + } + { + int dataSize = 0; + for (int i = 0; i < includeRegex_.size(); i++) { + dataSize += computeStringSizeNoTag(includeRegex_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludeRegexList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < excludeRegex_.size(); i++) { + dataSize += computeStringSizeNoTag(excludeRegex_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludeRegexList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageRegexFileSet)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CloudStorageRegexFileSet other = (com.google.privacy.dlp.v2.CloudStorageRegexFileSet) obj; + + if (!getBucketName() + .equals(other.getBucketName())) return false; + if (!getIncludeRegexList() + .equals(other.getIncludeRegexList())) return false; + if (!getExcludeRegexList() + .equals(other.getExcludeRegexList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUCKET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBucketName().hashCode(); + if (getIncludeRegexCount() > 0) { + hash = (37 * hash) + INCLUDE_REGEX_FIELD_NUMBER; + hash = (53 * hash) + getIncludeRegexList().hashCode(); + } + if (getExcludeRegexCount() > 0) { + hash = (37 * hash) + EXCLUDE_REGEX_FIELD_NUMBER; + hash = (53 * hash) + getExcludeRegexList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStorageRegexFileSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Message representing a set of files in a Cloud Storage bucket. Regular
+   * expressions are used to allow fine-grained control over which files in the
+   * bucket to include.
+   * Included files are those that match at least one item in `include_regex` and
+   * do not match any items in `exclude_regex`. Note that a file that matches
+   * items from both lists will _not_ be included. For a match to occur, the
+   * entire file path (i.e., everything in the url after the bucket name) must
+   * match the regular expression.
+   * For example, given the input `{bucket_name: "mybucket", include_regex:
+   * ["directory1/.*"], exclude_regex:
+   * ["directory1/excluded.*"]}`:
+   * * `gs://mybucket/directory1/myfile` will be included
+   * * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches
+   * across `/`)
+   * * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the
+   * full path doesn't match any items in `include_regex`)
+   * * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path
+   * matches an item in `exclude_regex`)
+   * If `include_regex` is left empty, it will match all files by default
+   * (this is equivalent to setting `include_regex: [".*"]`).
+   * Some other common use cases:
+   * * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all
+   * files in `mybucket` except for .pdf files
+   * * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will
+   * include all files directly under `gs://mybucket/directory/`, without matching
+   * across `/`
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CloudStorageRegexFileSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageRegexFileSet) + com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CloudStorageRegexFileSet.class, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CloudStorageRegexFileSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bucketName_ = ""; + + includeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + excludeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageRegexFileSet build() { + com.google.privacy.dlp.v2.CloudStorageRegexFileSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageRegexFileSet buildPartial() { + com.google.privacy.dlp.v2.CloudStorageRegexFileSet result = new com.google.privacy.dlp.v2.CloudStorageRegexFileSet(this); + int from_bitField0_ = bitField0_; + result.bucketName_ = bucketName_; + if (((bitField0_ & 0x00000001) != 0)) { + includeRegex_ = includeRegex_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.includeRegex_ = includeRegex_; + if (((bitField0_ & 0x00000002) != 0)) { + excludeRegex_ = excludeRegex_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.excludeRegex_ = excludeRegex_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CloudStorageRegexFileSet) { + return mergeFrom((com.google.privacy.dlp.v2.CloudStorageRegexFileSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageRegexFileSet other) { + if (other == com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance()) return this; + if (!other.getBucketName().isEmpty()) { + bucketName_ = other.bucketName_; + onChanged(); + } + if (!other.includeRegex_.isEmpty()) { + if (includeRegex_.isEmpty()) { + includeRegex_ = other.includeRegex_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIncludeRegexIsMutable(); + includeRegex_.addAll(other.includeRegex_); + } + onChanged(); + } + if (!other.excludeRegex_.isEmpty()) { + if (excludeRegex_.isEmpty()) { + excludeRegex_ = other.excludeRegex_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureExcludeRegexIsMutable(); + excludeRegex_.addAll(other.excludeRegex_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CloudStorageRegexFileSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CloudStorageRegexFileSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object bucketName_ = ""; + /** + *
+     * The name of a Cloud Storage bucket. Required.
+     * 
+ * + * string bucket_name = 1; + * @return The bucketName. + */ + public java.lang.String getBucketName() { + java.lang.Object ref = bucketName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of a Cloud Storage bucket. Required.
+     * 
+ * + * string bucket_name = 1; + * @return The bytes for bucketName. + */ + public com.google.protobuf.ByteString + getBucketNameBytes() { + java.lang.Object ref = bucketName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bucketName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of a Cloud Storage bucket. Required.
+     * 
+ * + * string bucket_name = 1; + * @param value The bucketName to set. + * @return This builder for chaining. + */ + public Builder setBucketName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bucketName_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of a Cloud Storage bucket. Required.
+     * 
+ * + * string bucket_name = 1; + * @return This builder for chaining. + */ + public Builder clearBucketName() { + + bucketName_ = getDefaultInstance().getBucketName(); + onChanged(); + return this; + } + /** + *
+     * The name of a Cloud Storage bucket. Required.
+     * 
+ * + * string bucket_name = 1; + * @param value The bytes for bucketName to set. + * @return This builder for chaining. + */ + public Builder setBucketNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bucketName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList includeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureIncludeRegexIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + includeRegex_ = new com.google.protobuf.LazyStringArrayList(includeRegex_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of regular expressions matching file paths to include. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * included in the set of files, except for those that also match an item in
+     * `exclude_regex`. Leaving this field empty will match all files by default
+     * (this is equivalent to including `.*` in the list).
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string include_regex = 2; + * @return A list containing the includeRegex. + */ + public com.google.protobuf.ProtocolStringList + getIncludeRegexList() { + return includeRegex_.getUnmodifiableView(); + } + /** + *
+     * A list of regular expressions matching file paths to include. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * included in the set of files, except for those that also match an item in
+     * `exclude_regex`. Leaving this field empty will match all files by default
+     * (this is equivalent to including `.*` in the list).
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string include_regex = 2; + * @return The count of includeRegex. + */ + public int getIncludeRegexCount() { + return includeRegex_.size(); + } + /** + *
+     * A list of regular expressions matching file paths to include. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * included in the set of files, except for those that also match an item in
+     * `exclude_regex`. Leaving this field empty will match all files by default
+     * (this is equivalent to including `.*` in the list).
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string include_regex = 2; + * @param index The index of the element to return. + * @return The includeRegex at the given index. + */ + public java.lang.String getIncludeRegex(int index) { + return includeRegex_.get(index); + } + /** + *
+     * A list of regular expressions matching file paths to include. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * included in the set of files, except for those that also match an item in
+     * `exclude_regex`. Leaving this field empty will match all files by default
+     * (this is equivalent to including `.*` in the list).
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string include_regex = 2; + * @param index The index of the value to return. + * @return The bytes of the includeRegex at the given index. + */ + public com.google.protobuf.ByteString + getIncludeRegexBytes(int index) { + return includeRegex_.getByteString(index); + } + /** + *
+     * A list of regular expressions matching file paths to include. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * included in the set of files, except for those that also match an item in
+     * `exclude_regex`. Leaving this field empty will match all files by default
+     * (this is equivalent to including `.*` in the list).
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string include_regex = 2; + * @param index The index to set the value at. + * @param value The includeRegex to set. + * @return This builder for chaining. + */ + public Builder setIncludeRegex( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeRegexIsMutable(); + includeRegex_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of regular expressions matching file paths to include. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * included in the set of files, except for those that also match an item in
+     * `exclude_regex`. Leaving this field empty will match all files by default
+     * (this is equivalent to including `.*` in the list).
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string include_regex = 2; + * @param value The includeRegex to add. + * @return This builder for chaining. + */ + public Builder addIncludeRegex( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeRegexIsMutable(); + includeRegex_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of regular expressions matching file paths to include. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * included in the set of files, except for those that also match an item in
+     * `exclude_regex`. Leaving this field empty will match all files by default
+     * (this is equivalent to including `.*` in the list).
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string include_regex = 2; + * @param values The includeRegex to add. + * @return This builder for chaining. + */ + public Builder addAllIncludeRegex( + java.lang.Iterable values) { + ensureIncludeRegexIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, includeRegex_); + onChanged(); + return this; + } + /** + *
+     * A list of regular expressions matching file paths to include. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * included in the set of files, except for those that also match an item in
+     * `exclude_regex`. Leaving this field empty will match all files by default
+     * (this is equivalent to including `.*` in the list).
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string include_regex = 2; + * @return This builder for chaining. + */ + public Builder clearIncludeRegex() { + includeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of regular expressions matching file paths to include. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * included in the set of files, except for those that also match an item in
+     * `exclude_regex`. Leaving this field empty will match all files by default
+     * (this is equivalent to including `.*` in the list).
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string include_regex = 2; + * @param value The bytes of the includeRegex to add. + * @return This builder for chaining. + */ + public Builder addIncludeRegexBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludeRegexIsMutable(); + includeRegex_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList excludeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureExcludeRegexIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + excludeRegex_ = new com.google.protobuf.LazyStringArrayList(excludeRegex_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * A list of regular expressions matching file paths to exclude. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * excluded from the scan.
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string exclude_regex = 3; + * @return A list containing the excludeRegex. + */ + public com.google.protobuf.ProtocolStringList + getExcludeRegexList() { + return excludeRegex_.getUnmodifiableView(); + } + /** + *
+     * A list of regular expressions matching file paths to exclude. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * excluded from the scan.
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string exclude_regex = 3; + * @return The count of excludeRegex. + */ + public int getExcludeRegexCount() { + return excludeRegex_.size(); + } + /** + *
+     * A list of regular expressions matching file paths to exclude. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * excluded from the scan.
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string exclude_regex = 3; + * @param index The index of the element to return. + * @return The excludeRegex at the given index. + */ + public java.lang.String getExcludeRegex(int index) { + return excludeRegex_.get(index); + } + /** + *
+     * A list of regular expressions matching file paths to exclude. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * excluded from the scan.
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string exclude_regex = 3; + * @param index The index of the value to return. + * @return The bytes of the excludeRegex at the given index. + */ + public com.google.protobuf.ByteString + getExcludeRegexBytes(int index) { + return excludeRegex_.getByteString(index); + } + /** + *
+     * A list of regular expressions matching file paths to exclude. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * excluded from the scan.
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string exclude_regex = 3; + * @param index The index to set the value at. + * @param value The excludeRegex to set. + * @return This builder for chaining. + */ + public Builder setExcludeRegex( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeRegexIsMutable(); + excludeRegex_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of regular expressions matching file paths to exclude. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * excluded from the scan.
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string exclude_regex = 3; + * @param value The excludeRegex to add. + * @return This builder for chaining. + */ + public Builder addExcludeRegex( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeRegexIsMutable(); + excludeRegex_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of regular expressions matching file paths to exclude. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * excluded from the scan.
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string exclude_regex = 3; + * @param values The excludeRegex to add. + * @return This builder for chaining. + */ + public Builder addAllExcludeRegex( + java.lang.Iterable values) { + ensureExcludeRegexIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, excludeRegex_); + onChanged(); + return this; + } + /** + *
+     * A list of regular expressions matching file paths to exclude. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * excluded from the scan.
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string exclude_regex = 3; + * @return This builder for chaining. + */ + public Builder clearExcludeRegex() { + excludeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A list of regular expressions matching file paths to exclude. All files in
+     * the bucket that match at least one of these regular expressions will be
+     * excluded from the scan.
+     * Regular expressions use RE2
+     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+     * under the google/re2 repository on GitHub.
+     * 
+ * + * repeated string exclude_regex = 3; + * @param value The bytes of the excludeRegex to add. + * @return This builder for chaining. + */ + public Builder addExcludeRegexBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludeRegexIsMutable(); + excludeRegex_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageRegexFileSet) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageRegexFileSet) + private static final com.google.privacy.dlp.v2.CloudStorageRegexFileSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageRegexFileSet(); + } + + public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudStorageRegexFileSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudStorageRegexFileSet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSetOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSetOrBuilder.java new file mode 100644 index 000000000000..2e045cc960b0 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSetOrBuilder.java @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface CloudStorageRegexFileSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStorageRegexFileSet) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of a Cloud Storage bucket. Required.
+   * 
+ * + * string bucket_name = 1; + * @return The bucketName. + */ + java.lang.String getBucketName(); + /** + *
+   * The name of a Cloud Storage bucket. Required.
+   * 
+ * + * string bucket_name = 1; + * @return The bytes for bucketName. + */ + com.google.protobuf.ByteString + getBucketNameBytes(); + + /** + *
+   * A list of regular expressions matching file paths to include. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * included in the set of files, except for those that also match an item in
+   * `exclude_regex`. Leaving this field empty will match all files by default
+   * (this is equivalent to including `.*` in the list).
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string include_regex = 2; + * @return A list containing the includeRegex. + */ + java.util.List + getIncludeRegexList(); + /** + *
+   * A list of regular expressions matching file paths to include. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * included in the set of files, except for those that also match an item in
+   * `exclude_regex`. Leaving this field empty will match all files by default
+   * (this is equivalent to including `.*` in the list).
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string include_regex = 2; + * @return The count of includeRegex. + */ + int getIncludeRegexCount(); + /** + *
+   * A list of regular expressions matching file paths to include. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * included in the set of files, except for those that also match an item in
+   * `exclude_regex`. Leaving this field empty will match all files by default
+   * (this is equivalent to including `.*` in the list).
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string include_regex = 2; + * @param index The index of the element to return. + * @return The includeRegex at the given index. + */ + java.lang.String getIncludeRegex(int index); + /** + *
+   * A list of regular expressions matching file paths to include. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * included in the set of files, except for those that also match an item in
+   * `exclude_regex`. Leaving this field empty will match all files by default
+   * (this is equivalent to including `.*` in the list).
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string include_regex = 2; + * @param index The index of the value to return. + * @return The bytes of the includeRegex at the given index. + */ + com.google.protobuf.ByteString + getIncludeRegexBytes(int index); + + /** + *
+   * A list of regular expressions matching file paths to exclude. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * excluded from the scan.
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string exclude_regex = 3; + * @return A list containing the excludeRegex. + */ + java.util.List + getExcludeRegexList(); + /** + *
+   * A list of regular expressions matching file paths to exclude. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * excluded from the scan.
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string exclude_regex = 3; + * @return The count of excludeRegex. + */ + int getExcludeRegexCount(); + /** + *
+   * A list of regular expressions matching file paths to exclude. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * excluded from the scan.
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string exclude_regex = 3; + * @param index The index of the element to return. + * @return The excludeRegex at the given index. + */ + java.lang.String getExcludeRegex(int index); + /** + *
+   * A list of regular expressions matching file paths to exclude. All files in
+   * the bucket that match at least one of these regular expressions will be
+   * excluded from the scan.
+   * Regular expressions use RE2
+   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
+   * under the google/re2 repository on GitHub.
+   * 
+ * + * repeated string exclude_regex = 3; + * @param index The index of the value to return. + * @return The bytes of the excludeRegex at the given index. + */ + com.google.protobuf.ByteString + getExcludeRegexBytes(int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Color.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Color.java new file mode 100644 index 000000000000..519c4b27e046 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Color.java @@ -0,0 +1,675 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Represents a color in the RGB color space.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Color} + */ +public final class Color extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Color) + ColorOrBuilder { +private static final long serialVersionUID = 0L; + // Use Color.newBuilder() to construct. + private Color(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Color() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Color(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Color( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + + red_ = input.readFloat(); + break; + } + case 21: { + + green_ = input.readFloat(); + break; + } + case 29: { + + blue_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Color.class, com.google.privacy.dlp.v2.Color.Builder.class); + } + + public static final int RED_FIELD_NUMBER = 1; + private float red_; + /** + *
+   * The amount of red in the color as a value in the interval [0, 1].
+   * 
+ * + * float red = 1; + * @return The red. + */ + @java.lang.Override + public float getRed() { + return red_; + } + + public static final int GREEN_FIELD_NUMBER = 2; + private float green_; + /** + *
+   * The amount of green in the color as a value in the interval [0, 1].
+   * 
+ * + * float green = 2; + * @return The green. + */ + @java.lang.Override + public float getGreen() { + return green_; + } + + public static final int BLUE_FIELD_NUMBER = 3; + private float blue_; + /** + *
+   * The amount of blue in the color as a value in the interval [0, 1].
+   * 
+ * + * float blue = 3; + * @return The blue. + */ + @java.lang.Override + public float getBlue() { + return blue_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(red_) != 0) { + output.writeFloat(1, red_); + } + if (java.lang.Float.floatToRawIntBits(green_) != 0) { + output.writeFloat(2, green_); + } + if (java.lang.Float.floatToRawIntBits(blue_) != 0) { + output.writeFloat(3, blue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(red_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, red_); + } + if (java.lang.Float.floatToRawIntBits(green_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, green_); + } + if (java.lang.Float.floatToRawIntBits(blue_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, blue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Color)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Color other = (com.google.privacy.dlp.v2.Color) obj; + + if (java.lang.Float.floatToIntBits(getRed()) + != java.lang.Float.floatToIntBits( + other.getRed())) return false; + if (java.lang.Float.floatToIntBits(getGreen()) + != java.lang.Float.floatToIntBits( + other.getGreen())) return false; + if (java.lang.Float.floatToIntBits(getBlue()) + != java.lang.Float.floatToIntBits( + other.getBlue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RED_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getRed()); + hash = (37 * hash) + GREEN_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getGreen()); + hash = (37 * hash) + BLUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getBlue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Color parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Color parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Color parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Color parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Color parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Color parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Color parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Color parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Color parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Color parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Color parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Color parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Color prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a color in the RGB color space.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Color} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Color) + com.google.privacy.dlp.v2.ColorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Color.class, com.google.privacy.dlp.v2.Color.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Color.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + red_ = 0F; + + green_ = 0F; + + blue_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Color getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Color.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Color build() { + com.google.privacy.dlp.v2.Color result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Color buildPartial() { + com.google.privacy.dlp.v2.Color result = new com.google.privacy.dlp.v2.Color(this); + result.red_ = red_; + result.green_ = green_; + result.blue_ = blue_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Color) { + return mergeFrom((com.google.privacy.dlp.v2.Color)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Color other) { + if (other == com.google.privacy.dlp.v2.Color.getDefaultInstance()) return this; + if (other.getRed() != 0F) { + setRed(other.getRed()); + } + if (other.getGreen() != 0F) { + setGreen(other.getGreen()); + } + if (other.getBlue() != 0F) { + setBlue(other.getBlue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Color parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Color) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float red_ ; + /** + *
+     * The amount of red in the color as a value in the interval [0, 1].
+     * 
+ * + * float red = 1; + * @return The red. + */ + @java.lang.Override + public float getRed() { + return red_; + } + /** + *
+     * The amount of red in the color as a value in the interval [0, 1].
+     * 
+ * + * float red = 1; + * @param value The red to set. + * @return This builder for chaining. + */ + public Builder setRed(float value) { + + red_ = value; + onChanged(); + return this; + } + /** + *
+     * The amount of red in the color as a value in the interval [0, 1].
+     * 
+ * + * float red = 1; + * @return This builder for chaining. + */ + public Builder clearRed() { + + red_ = 0F; + onChanged(); + return this; + } + + private float green_ ; + /** + *
+     * The amount of green in the color as a value in the interval [0, 1].
+     * 
+ * + * float green = 2; + * @return The green. + */ + @java.lang.Override + public float getGreen() { + return green_; + } + /** + *
+     * The amount of green in the color as a value in the interval [0, 1].
+     * 
+ * + * float green = 2; + * @param value The green to set. + * @return This builder for chaining. + */ + public Builder setGreen(float value) { + + green_ = value; + onChanged(); + return this; + } + /** + *
+     * The amount of green in the color as a value in the interval [0, 1].
+     * 
+ * + * float green = 2; + * @return This builder for chaining. + */ + public Builder clearGreen() { + + green_ = 0F; + onChanged(); + return this; + } + + private float blue_ ; + /** + *
+     * The amount of blue in the color as a value in the interval [0, 1].
+     * 
+ * + * float blue = 3; + * @return The blue. + */ + @java.lang.Override + public float getBlue() { + return blue_; + } + /** + *
+     * The amount of blue in the color as a value in the interval [0, 1].
+     * 
+ * + * float blue = 3; + * @param value The blue to set. + * @return This builder for chaining. + */ + public Builder setBlue(float value) { + + blue_ = value; + onChanged(); + return this; + } + /** + *
+     * The amount of blue in the color as a value in the interval [0, 1].
+     * 
+ * + * float blue = 3; + * @return This builder for chaining. + */ + public Builder clearBlue() { + + blue_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Color) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Color) + private static final com.google.privacy.dlp.v2.Color DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Color(); + } + + public static com.google.privacy.dlp.v2.Color getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Color parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Color(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Color getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ColorOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ColorOrBuilder.java new file mode 100644 index 000000000000..56c96b2cbc9c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ColorOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ColorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Color) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The amount of red in the color as a value in the interval [0, 1].
+   * 
+ * + * float red = 1; + * @return The red. + */ + float getRed(); + + /** + *
+   * The amount of green in the color as a value in the interval [0, 1].
+   * 
+ * + * float green = 2; + * @return The green. + */ + float getGreen(); + + /** + *
+   * The amount of blue in the color as a value in the interval [0, 1].
+   * 
+ * + * float blue = 3; + * @return The blue. + */ + float getBlue(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java new file mode 100644 index 000000000000..b5ff2fa2bdf5 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java @@ -0,0 +1,1804 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Represents a container that may contain DLP findings.
+ * Examples of a container include a file, table, or database record.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Container} + */ +public final class Container extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Container) + ContainerOrBuilder { +private static final long serialVersionUID = 0L; + // Use Container.newBuilder() to construct. + private Container(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Container() { + type_ = ""; + projectId_ = ""; + fullPath_ = ""; + rootPath_ = ""; + relativePath_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Container(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Container( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + fullPath_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + rootPath_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + relativePath_ = s; + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Container.class, com.google.privacy.dlp.v2.Container.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object type_; + /** + *
+   * Container type, for example BigQuery or Cloud Storage.
+   * 
+ * + * string type = 1; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * Container type, for example BigQuery or Cloud Storage.
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object projectId_; + /** + *
+   * Project where the finding was found.
+   * Can be different from the project that owns the finding.
+   * 
+ * + * string project_id = 2; + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + *
+   * Project where the finding was found.
+   * Can be different from the project that owns the finding.
+   * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_PATH_FIELD_NUMBER = 3; + private volatile java.lang.Object fullPath_; + /** + *
+   * A string representation of the full container name.
+   * Examples:
+   * - BigQuery: 'Project:DataSetId.TableId'
+   * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
+   * 
+ * + * string full_path = 3; + * @return The fullPath. + */ + @java.lang.Override + public java.lang.String getFullPath() { + java.lang.Object ref = fullPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullPath_ = s; + return s; + } + } + /** + *
+   * A string representation of the full container name.
+   * Examples:
+   * - BigQuery: 'Project:DataSetId.TableId'
+   * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
+   * 
+ * + * string full_path = 3; + * @return The bytes for fullPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullPathBytes() { + java.lang.Object ref = fullPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROOT_PATH_FIELD_NUMBER = 4; + private volatile java.lang.Object rootPath_; + /** + *
+   * The root of the container.
+   * Examples:
+   * - For BigQuery table `project_id:dataset_id.table_id`, the root is
+   *  `dataset_id`
+   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+   *  is `gs://bucket`
+   * 
+ * + * string root_path = 4; + * @return The rootPath. + */ + @java.lang.Override + public java.lang.String getRootPath() { + java.lang.Object ref = rootPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rootPath_ = s; + return s; + } + } + /** + *
+   * The root of the container.
+   * Examples:
+   * - For BigQuery table `project_id:dataset_id.table_id`, the root is
+   *  `dataset_id`
+   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+   *  is `gs://bucket`
+   * 
+ * + * string root_path = 4; + * @return The bytes for rootPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRootPathBytes() { + java.lang.Object ref = rootPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rootPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATIVE_PATH_FIELD_NUMBER = 5; + private volatile java.lang.Object relativePath_; + /** + *
+   * The rest of the path after the root.
+   * Examples:
+   * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
+   *  `table_id`
+   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+   *  path is `folder/filename.txt`
+   * 
+ * + * string relative_path = 5; + * @return The relativePath. + */ + @java.lang.Override + public java.lang.String getRelativePath() { + java.lang.Object ref = relativePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relativePath_ = s; + return s; + } + } + /** + *
+   * The rest of the path after the root.
+   * Examples:
+   * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
+   *  `table_id`
+   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+   *  path is `folder/filename.txt`
+   * 
+ * + * string relative_path = 5; + * @return The bytes for relativePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRelativePathBytes() { + java.lang.Object ref = relativePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relativePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object version_; + /** + *
+   * Findings container version, if available
+   * ("generation" for Cloud Storage).
+   * 
+ * + * string version = 7; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Findings container version, if available
+   * ("generation" for Cloud Storage).
+   * 
+ * + * string version = 7; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fullPath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rootPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, rootPath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, relativePath_); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, fullPath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rootPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, rootPath_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, relativePath_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Container)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Container other = (com.google.privacy.dlp.v2.Container) obj; + + if (!getType() + .equals(other.getType())) return false; + if (!getProjectId() + .equals(other.getProjectId())) return false; + if (!getFullPath() + .equals(other.getFullPath())) return false; + if (!getRootPath() + .equals(other.getRootPath())) return false; + if (!getRelativePath() + .equals(other.getRelativePath())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + FULL_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFullPath().hashCode(); + hash = (37 * hash) + ROOT_PATH_FIELD_NUMBER; + hash = (53 * hash) + getRootPath().hashCode(); + hash = (37 * hash) + RELATIVE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getRelativePath().hashCode(); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Container parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Container parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Container parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Container parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Container parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Container parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Container parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Container parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Container parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Container parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Container parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Container parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Container prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a container that may contain DLP findings.
+   * Examples of a container include a file, table, or database record.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Container} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Container) + com.google.privacy.dlp.v2.ContainerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Container.class, com.google.privacy.dlp.v2.Container.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Container.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + projectId_ = ""; + + fullPath_ = ""; + + rootPath_ = ""; + + relativePath_ = ""; + + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Container getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Container.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Container build() { + com.google.privacy.dlp.v2.Container result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Container buildPartial() { + com.google.privacy.dlp.v2.Container result = new com.google.privacy.dlp.v2.Container(this); + result.type_ = type_; + result.projectId_ = projectId_; + result.fullPath_ = fullPath_; + result.rootPath_ = rootPath_; + result.relativePath_ = relativePath_; + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Container) { + return mergeFrom((com.google.privacy.dlp.v2.Container)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Container other) { + if (other == com.google.privacy.dlp.v2.Container.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (!other.getFullPath().isEmpty()) { + fullPath_ = other.fullPath_; + onChanged(); + } + if (!other.getRootPath().isEmpty()) { + rootPath_ = other.rootPath_; + onChanged(); + } + if (!other.getRelativePath().isEmpty()) { + relativePath_ = other.relativePath_; + onChanged(); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Container parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Container) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object type_ = ""; + /** + *
+     * Container type, for example BigQuery or Cloud Storage.
+     * 
+ * + * string type = 1; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Container type, for example BigQuery or Cloud Storage.
+     * 
+ * + * string type = 1; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Container type, for example BigQuery or Cloud Storage.
+     * 
+ * + * string type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * Container type, for example BigQuery or Cloud Storage.
+     * 
+ * + * string type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + *
+     * Container type, for example BigQuery or Cloud Storage.
+     * 
+ * + * string type = 1; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + *
+     * Project where the finding was found.
+     * Can be different from the project that owns the finding.
+     * 
+ * + * string project_id = 2; + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Project where the finding was found.
+     * Can be different from the project that owns the finding.
+     * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Project where the finding was found.
+     * Can be different from the project that owns the finding.
+     * 
+ * + * string project_id = 2; + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + *
+     * Project where the finding was found.
+     * Can be different from the project that owns the finding.
+     * 
+ * + * string project_id = 2; + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + *
+     * Project where the finding was found.
+     * Can be different from the project that owns the finding.
+     * 
+ * + * string project_id = 2; + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private java.lang.Object fullPath_ = ""; + /** + *
+     * A string representation of the full container name.
+     * Examples:
+     * - BigQuery: 'Project:DataSetId.TableId'
+     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
+     * 
+ * + * string full_path = 3; + * @return The fullPath. + */ + public java.lang.String getFullPath() { + java.lang.Object ref = fullPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A string representation of the full container name.
+     * Examples:
+     * - BigQuery: 'Project:DataSetId.TableId'
+     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
+     * 
+ * + * string full_path = 3; + * @return The bytes for fullPath. + */ + public com.google.protobuf.ByteString + getFullPathBytes() { + java.lang.Object ref = fullPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A string representation of the full container name.
+     * Examples:
+     * - BigQuery: 'Project:DataSetId.TableId'
+     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
+     * 
+ * + * string full_path = 3; + * @param value The fullPath to set. + * @return This builder for chaining. + */ + public Builder setFullPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullPath_ = value; + onChanged(); + return this; + } + /** + *
+     * A string representation of the full container name.
+     * Examples:
+     * - BigQuery: 'Project:DataSetId.TableId'
+     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
+     * 
+ * + * string full_path = 3; + * @return This builder for chaining. + */ + public Builder clearFullPath() { + + fullPath_ = getDefaultInstance().getFullPath(); + onChanged(); + return this; + } + /** + *
+     * A string representation of the full container name.
+     * Examples:
+     * - BigQuery: 'Project:DataSetId.TableId'
+     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
+     * 
+ * + * string full_path = 3; + * @param value The bytes for fullPath to set. + * @return This builder for chaining. + */ + public Builder setFullPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object rootPath_ = ""; + /** + *
+     * The root of the container.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
+     *  `dataset_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+     *  is `gs://bucket`
+     * 
+ * + * string root_path = 4; + * @return The rootPath. + */ + public java.lang.String getRootPath() { + java.lang.Object ref = rootPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rootPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The root of the container.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
+     *  `dataset_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+     *  is `gs://bucket`
+     * 
+ * + * string root_path = 4; + * @return The bytes for rootPath. + */ + public com.google.protobuf.ByteString + getRootPathBytes() { + java.lang.Object ref = rootPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rootPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The root of the container.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
+     *  `dataset_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+     *  is `gs://bucket`
+     * 
+ * + * string root_path = 4; + * @param value The rootPath to set. + * @return This builder for chaining. + */ + public Builder setRootPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rootPath_ = value; + onChanged(); + return this; + } + /** + *
+     * The root of the container.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
+     *  `dataset_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+     *  is `gs://bucket`
+     * 
+ * + * string root_path = 4; + * @return This builder for chaining. + */ + public Builder clearRootPath() { + + rootPath_ = getDefaultInstance().getRootPath(); + onChanged(); + return this; + } + /** + *
+     * The root of the container.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
+     *  `dataset_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+     *  is `gs://bucket`
+     * 
+ * + * string root_path = 4; + * @param value The bytes for rootPath to set. + * @return This builder for chaining. + */ + public Builder setRootPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rootPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object relativePath_ = ""; + /** + *
+     * The rest of the path after the root.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
+     *  `table_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+     *  path is `folder/filename.txt`
+     * 
+ * + * string relative_path = 5; + * @return The relativePath. + */ + public java.lang.String getRelativePath() { + java.lang.Object ref = relativePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relativePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The rest of the path after the root.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
+     *  `table_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+     *  path is `folder/filename.txt`
+     * 
+ * + * string relative_path = 5; + * @return The bytes for relativePath. + */ + public com.google.protobuf.ByteString + getRelativePathBytes() { + java.lang.Object ref = relativePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relativePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The rest of the path after the root.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
+     *  `table_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+     *  path is `folder/filename.txt`
+     * 
+ * + * string relative_path = 5; + * @param value The relativePath to set. + * @return This builder for chaining. + */ + public Builder setRelativePath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + relativePath_ = value; + onChanged(); + return this; + } + /** + *
+     * The rest of the path after the root.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
+     *  `table_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+     *  path is `folder/filename.txt`
+     * 
+ * + * string relative_path = 5; + * @return This builder for chaining. + */ + public Builder clearRelativePath() { + + relativePath_ = getDefaultInstance().getRelativePath(); + onChanged(); + return this; + } + /** + *
+     * The rest of the path after the root.
+     * Examples:
+     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
+     *  `table_id`
+     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+     *  path is `folder/filename.txt`
+     * 
+ * + * string relative_path = 5; + * @param value The bytes for relativePath to set. + * @return This builder for chaining. + */ + public Builder setRelativePathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + relativePath_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object version_ = ""; + /** + *
+     * Findings container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string version = 7; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Findings container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string version = 7; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Findings container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string version = 7; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * Findings container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string version = 7; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * Findings container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string version = 7; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Container) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Container) + private static final com.google.privacy.dlp.v2.Container DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Container(); + } + + public static com.google.privacy.dlp.v2.Container getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Container parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Container(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Container getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java new file mode 100644 index 000000000000..6f9a1e30d0a8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java @@ -0,0 +1,195 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ContainerOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Container) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Container type, for example BigQuery or Cloud Storage.
+   * 
+ * + * string type = 1; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * Container type, for example BigQuery or Cloud Storage.
+   * 
+ * + * string type = 1; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * Project where the finding was found.
+   * Can be different from the project that owns the finding.
+   * 
+ * + * string project_id = 2; + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + *
+   * Project where the finding was found.
+   * Can be different from the project that owns the finding.
+   * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString + getProjectIdBytes(); + + /** + *
+   * A string representation of the full container name.
+   * Examples:
+   * - BigQuery: 'Project:DataSetId.TableId'
+   * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
+   * 
+ * + * string full_path = 3; + * @return The fullPath. + */ + java.lang.String getFullPath(); + /** + *
+   * A string representation of the full container name.
+   * Examples:
+   * - BigQuery: 'Project:DataSetId.TableId'
+   * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
+   * 
+ * + * string full_path = 3; + * @return The bytes for fullPath. + */ + com.google.protobuf.ByteString + getFullPathBytes(); + + /** + *
+   * The root of the container.
+   * Examples:
+   * - For BigQuery table `project_id:dataset_id.table_id`, the root is
+   *  `dataset_id`
+   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+   *  is `gs://bucket`
+   * 
+ * + * string root_path = 4; + * @return The rootPath. + */ + java.lang.String getRootPath(); + /** + *
+   * The root of the container.
+   * Examples:
+   * - For BigQuery table `project_id:dataset_id.table_id`, the root is
+   *  `dataset_id`
+   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
+   *  is `gs://bucket`
+   * 
+ * + * string root_path = 4; + * @return The bytes for rootPath. + */ + com.google.protobuf.ByteString + getRootPathBytes(); + + /** + *
+   * The rest of the path after the root.
+   * Examples:
+   * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
+   *  `table_id`
+   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+   *  path is `folder/filename.txt`
+   * 
+ * + * string relative_path = 5; + * @return The relativePath. + */ + java.lang.String getRelativePath(); + /** + *
+   * The rest of the path after the root.
+   * Examples:
+   * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
+   *  `table_id`
+   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
+   *  path is `folder/filename.txt`
+   * 
+ * + * string relative_path = 5; + * @return The bytes for relativePath. + */ + com.google.protobuf.ByteString + getRelativePathBytes(); + + /** + *
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Findings container version, if available
+   * ("generation" for Cloud Storage).
+   * 
+ * + * string version = 7; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Findings container version, if available
+   * ("generation" for Cloud Storage).
+   * 
+ * + * string version = 7; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java new file mode 100644 index 000000000000..e480782c6064 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java @@ -0,0 +1,1264 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Container structure for the content to inspect.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ContentItem} + */ +public final class ContentItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ContentItem) + ContentItemOrBuilder { +private static final long serialVersionUID = 0L; + // Use ContentItem.newBuilder() to construct. + private ContentItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ContentItem() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ContentItem(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ContentItem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + dataItemCase_ = 3; + dataItem_ = s; + break; + } + case 34: { + com.google.privacy.dlp.v2.Table.Builder subBuilder = null; + if (dataItemCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.Table) dataItem_).toBuilder(); + } + dataItem_ = + input.readMessage(com.google.privacy.dlp.v2.Table.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Table) dataItem_); + dataItem_ = subBuilder.buildPartial(); + } + dataItemCase_ = 4; + break; + } + case 42: { + com.google.privacy.dlp.v2.ByteContentItem.Builder subBuilder = null; + if (dataItemCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.ByteContentItem) dataItem_).toBuilder(); + } + dataItem_ = + input.readMessage(com.google.privacy.dlp.v2.ByteContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ByteContentItem) dataItem_); + dataItem_ = subBuilder.buildPartial(); + } + dataItemCase_ = 5; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ContentItem.class, com.google.privacy.dlp.v2.ContentItem.Builder.class); + } + + private int dataItemCase_ = 0; + private java.lang.Object dataItem_; + public enum DataItemCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VALUE(3), + TABLE(4), + BYTE_ITEM(5), + DATAITEM_NOT_SET(0); + private final int value; + private DataItemCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataItemCase valueOf(int value) { + return forNumber(value); + } + + public static DataItemCase forNumber(int value) { + switch (value) { + case 3: return VALUE; + case 4: return TABLE; + case 5: return BYTE_ITEM; + case 0: return DATAITEM_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DataItemCase + getDataItemCase() { + return DataItemCase.forNumber( + dataItemCase_); + } + + public static final int VALUE_FIELD_NUMBER = 3; + /** + *
+   * String data to inspect or redact.
+   * 
+ * + * string value = 3; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return dataItemCase_ == 3; + } + /** + *
+   * String data to inspect or redact.
+   * 
+ * + * string value = 3; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = ""; + if (dataItemCase_ == 3) { + ref = dataItem_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (dataItemCase_ == 3) { + dataItem_ = s; + } + return s; + } + } + /** + *
+   * String data to inspect or redact.
+   * 
+ * + * string value = 3; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = ""; + if (dataItemCase_ == 3) { + ref = dataItem_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (dataItemCase_ == 3) { + dataItem_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_FIELD_NUMBER = 4; + /** + *
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return dataItemCase_ == 4; + } + /** + *
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + * @return The table. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Table getTable() { + if (dataItemCase_ == 4) { + return (com.google.privacy.dlp.v2.Table) dataItem_; + } + return com.google.privacy.dlp.v2.Table.getDefaultInstance(); + } + /** + *
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableOrBuilder getTableOrBuilder() { + if (dataItemCase_ == 4) { + return (com.google.privacy.dlp.v2.Table) dataItem_; + } + return com.google.privacy.dlp.v2.Table.getDefaultInstance(); + } + + public static final int BYTE_ITEM_FIELD_NUMBER = 5; + /** + *
+   * Content data to inspect or redact. Replaces `type` and `data`.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + * @return Whether the byteItem field is set. + */ + @java.lang.Override + public boolean hasByteItem() { + return dataItemCase_ == 5; + } + /** + *
+   * Content data to inspect or redact. Replaces `type` and `data`.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + * @return The byteItem. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItem getByteItem() { + if (dataItemCase_ == 5) { + return (com.google.privacy.dlp.v2.ByteContentItem) dataItem_; + } + return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); + } + /** + *
+   * Content data to inspect or redact. Replaces `type` and `data`.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() { + if (dataItemCase_ == 5) { + return (com.google.privacy.dlp.v2.ByteContentItem) dataItem_; + } + return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dataItemCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dataItem_); + } + if (dataItemCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.Table) dataItem_); + } + if (dataItemCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.ByteContentItem) dataItem_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataItemCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dataItem_); + } + if (dataItemCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.Table) dataItem_); + } + if (dataItemCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.ByteContentItem) dataItem_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ContentItem)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ContentItem other = (com.google.privacy.dlp.v2.ContentItem) obj; + + if (!getDataItemCase().equals(other.getDataItemCase())) return false; + switch (dataItemCase_) { + case 3: + if (!getValue() + .equals(other.getValue())) return false; + break; + case 4: + if (!getTable() + .equals(other.getTable())) return false; + break; + case 5: + if (!getByteItem() + .equals(other.getByteItem())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (dataItemCase_) { + case 3: + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + break; + case 4: + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + break; + case 5: + hash = (37 * hash) + BYTE_ITEM_FIELD_NUMBER; + hash = (53 * hash) + getByteItem().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ContentItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ContentItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ContentItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ContentItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ContentItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ContentItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ContentItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ContentItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Container structure for the content to inspect.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ContentItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ContentItem) + com.google.privacy.dlp.v2.ContentItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ContentItem.class, com.google.privacy.dlp.v2.ContentItem.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ContentItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dataItemCase_ = 0; + dataItem_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ContentItem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem build() { + com.google.privacy.dlp.v2.ContentItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem buildPartial() { + com.google.privacy.dlp.v2.ContentItem result = new com.google.privacy.dlp.v2.ContentItem(this); + if (dataItemCase_ == 3) { + result.dataItem_ = dataItem_; + } + if (dataItemCase_ == 4) { + if (tableBuilder_ == null) { + result.dataItem_ = dataItem_; + } else { + result.dataItem_ = tableBuilder_.build(); + } + } + if (dataItemCase_ == 5) { + if (byteItemBuilder_ == null) { + result.dataItem_ = dataItem_; + } else { + result.dataItem_ = byteItemBuilder_.build(); + } + } + result.dataItemCase_ = dataItemCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ContentItem) { + return mergeFrom((com.google.privacy.dlp.v2.ContentItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ContentItem other) { + if (other == com.google.privacy.dlp.v2.ContentItem.getDefaultInstance()) return this; + switch (other.getDataItemCase()) { + case VALUE: { + dataItemCase_ = 3; + dataItem_ = other.dataItem_; + onChanged(); + break; + } + case TABLE: { + mergeTable(other.getTable()); + break; + } + case BYTE_ITEM: { + mergeByteItem(other.getByteItem()); + break; + } + case DATAITEM_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ContentItem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ContentItem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int dataItemCase_ = 0; + private java.lang.Object dataItem_; + public DataItemCase + getDataItemCase() { + return DataItemCase.forNumber( + dataItemCase_); + } + + public Builder clearDataItem() { + dataItemCase_ = 0; + dataItem_ = null; + onChanged(); + return this; + } + + + /** + *
+     * String data to inspect or redact.
+     * 
+ * + * string value = 3; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return dataItemCase_ == 3; + } + /** + *
+     * String data to inspect or redact.
+     * 
+ * + * string value = 3; + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = ""; + if (dataItemCase_ == 3) { + ref = dataItem_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (dataItemCase_ == 3) { + dataItem_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * String data to inspect or redact.
+     * 
+ * + * string value = 3; + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = ""; + if (dataItemCase_ == 3) { + ref = dataItem_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (dataItemCase_ == 3) { + dataItem_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * String data to inspect or redact.
+     * 
+ * + * string value = 3; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataItemCase_ = 3; + dataItem_ = value; + onChanged(); + return this; + } + /** + *
+     * String data to inspect or redact.
+     * 
+ * + * string value = 3; + * @return This builder for chaining. + */ + public Builder clearValue() { + if (dataItemCase_ == 3) { + dataItemCase_ = 0; + dataItem_ = null; + onChanged(); + } + return this; + } + /** + *
+     * String data to inspect or redact.
+     * 
+ * + * string value = 3; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataItemCase_ = 3; + dataItem_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Table, com.google.privacy.dlp.v2.Table.Builder, com.google.privacy.dlp.v2.TableOrBuilder> tableBuilder_; + /** + *
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return dataItemCase_ == 4; + } + /** + *
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + * @return The table. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Table getTable() { + if (tableBuilder_ == null) { + if (dataItemCase_ == 4) { + return (com.google.privacy.dlp.v2.Table) dataItem_; + } + return com.google.privacy.dlp.v2.Table.getDefaultInstance(); + } else { + if (dataItemCase_ == 4) { + return tableBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Table.getDefaultInstance(); + } + } + /** + *
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + */ + public Builder setTable(com.google.privacy.dlp.v2.Table value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataItem_ = value; + onChanged(); + } else { + tableBuilder_.setMessage(value); + } + dataItemCase_ = 4; + return this; + } + /** + *
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + */ + public Builder setTable( + com.google.privacy.dlp.v2.Table.Builder builderForValue) { + if (tableBuilder_ == null) { + dataItem_ = builderForValue.build(); + onChanged(); + } else { + tableBuilder_.setMessage(builderForValue.build()); + } + dataItemCase_ = 4; + return this; + } + /** + *
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + */ + public Builder mergeTable(com.google.privacy.dlp.v2.Table value) { + if (tableBuilder_ == null) { + if (dataItemCase_ == 4 && + dataItem_ != com.google.privacy.dlp.v2.Table.getDefaultInstance()) { + dataItem_ = com.google.privacy.dlp.v2.Table.newBuilder((com.google.privacy.dlp.v2.Table) dataItem_) + .mergeFrom(value).buildPartial(); + } else { + dataItem_ = value; + } + onChanged(); + } else { + if (dataItemCase_ == 4) { + tableBuilder_.mergeFrom(value); + } else { + tableBuilder_.setMessage(value); + } + } + dataItemCase_ = 4; + return this; + } + /** + *
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + if (dataItemCase_ == 4) { + dataItemCase_ = 0; + dataItem_ = null; + onChanged(); + } + } else { + if (dataItemCase_ == 4) { + dataItemCase_ = 0; + dataItem_ = null; + } + tableBuilder_.clear(); + } + return this; + } + /** + *
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + */ + public com.google.privacy.dlp.v2.Table.Builder getTableBuilder() { + return getTableFieldBuilder().getBuilder(); + } + /** + *
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableOrBuilder getTableOrBuilder() { + if ((dataItemCase_ == 4) && (tableBuilder_ != null)) { + return tableBuilder_.getMessageOrBuilder(); + } else { + if (dataItemCase_ == 4) { + return (com.google.privacy.dlp.v2.Table) dataItem_; + } + return com.google.privacy.dlp.v2.Table.getDefaultInstance(); + } + } + /** + *
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Table, com.google.privacy.dlp.v2.Table.Builder, com.google.privacy.dlp.v2.TableOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + if (!(dataItemCase_ == 4)) { + dataItem_ = com.google.privacy.dlp.v2.Table.getDefaultInstance(); + } + tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Table, com.google.privacy.dlp.v2.Table.Builder, com.google.privacy.dlp.v2.TableOrBuilder>( + (com.google.privacy.dlp.v2.Table) dataItem_, + getParentForChildren(), + isClean()); + dataItem_ = null; + } + dataItemCase_ = 4; + onChanged();; + return tableBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> byteItemBuilder_; + /** + *
+     * Content data to inspect or redact. Replaces `type` and `data`.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + * @return Whether the byteItem field is set. + */ + @java.lang.Override + public boolean hasByteItem() { + return dataItemCase_ == 5; + } + /** + *
+     * Content data to inspect or redact. Replaces `type` and `data`.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + * @return The byteItem. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItem getByteItem() { + if (byteItemBuilder_ == null) { + if (dataItemCase_ == 5) { + return (com.google.privacy.dlp.v2.ByteContentItem) dataItem_; + } + return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); + } else { + if (dataItemCase_ == 5) { + return byteItemBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); + } + } + /** + *
+     * Content data to inspect or redact. Replaces `type` and `data`.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + */ + public Builder setByteItem(com.google.privacy.dlp.v2.ByteContentItem value) { + if (byteItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataItem_ = value; + onChanged(); + } else { + byteItemBuilder_.setMessage(value); + } + dataItemCase_ = 5; + return this; + } + /** + *
+     * Content data to inspect or redact. Replaces `type` and `data`.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + */ + public Builder setByteItem( + com.google.privacy.dlp.v2.ByteContentItem.Builder builderForValue) { + if (byteItemBuilder_ == null) { + dataItem_ = builderForValue.build(); + onChanged(); + } else { + byteItemBuilder_.setMessage(builderForValue.build()); + } + dataItemCase_ = 5; + return this; + } + /** + *
+     * Content data to inspect or redact. Replaces `type` and `data`.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + */ + public Builder mergeByteItem(com.google.privacy.dlp.v2.ByteContentItem value) { + if (byteItemBuilder_ == null) { + if (dataItemCase_ == 5 && + dataItem_ != com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance()) { + dataItem_ = com.google.privacy.dlp.v2.ByteContentItem.newBuilder((com.google.privacy.dlp.v2.ByteContentItem) dataItem_) + .mergeFrom(value).buildPartial(); + } else { + dataItem_ = value; + } + onChanged(); + } else { + if (dataItemCase_ == 5) { + byteItemBuilder_.mergeFrom(value); + } else { + byteItemBuilder_.setMessage(value); + } + } + dataItemCase_ = 5; + return this; + } + /** + *
+     * Content data to inspect or redact. Replaces `type` and `data`.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + */ + public Builder clearByteItem() { + if (byteItemBuilder_ == null) { + if (dataItemCase_ == 5) { + dataItemCase_ = 0; + dataItem_ = null; + onChanged(); + } + } else { + if (dataItemCase_ == 5) { + dataItemCase_ = 0; + dataItem_ = null; + } + byteItemBuilder_.clear(); + } + return this; + } + /** + *
+     * Content data to inspect or redact. Replaces `type` and `data`.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + */ + public com.google.privacy.dlp.v2.ByteContentItem.Builder getByteItemBuilder() { + return getByteItemFieldBuilder().getBuilder(); + } + /** + *
+     * Content data to inspect or redact. Replaces `type` and `data`.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() { + if ((dataItemCase_ == 5) && (byteItemBuilder_ != null)) { + return byteItemBuilder_.getMessageOrBuilder(); + } else { + if (dataItemCase_ == 5) { + return (com.google.privacy.dlp.v2.ByteContentItem) dataItem_; + } + return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); + } + } + /** + *
+     * Content data to inspect or redact. Replaces `type` and `data`.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> + getByteItemFieldBuilder() { + if (byteItemBuilder_ == null) { + if (!(dataItemCase_ == 5)) { + dataItem_ = com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); + } + byteItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder>( + (com.google.privacy.dlp.v2.ByteContentItem) dataItem_, + getParentForChildren(), + isClean()); + dataItem_ = null; + } + dataItemCase_ = 5; + onChanged();; + return byteItemBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ContentItem) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ContentItem) + private static final com.google.privacy.dlp.v2.ContentItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ContentItem(); + } + + public static com.google.privacy.dlp.v2.ContentItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContentItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContentItem(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java new file mode 100644 index 000000000000..09fa56eab258 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java @@ -0,0 +1,100 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ContentItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ContentItem) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * String data to inspect or redact.
+   * 
+ * + * string value = 3; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + *
+   * String data to inspect or redact.
+   * 
+ * + * string value = 3; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+   * String data to inspect or redact.
+   * 
+ * + * string value = 3; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + * @return Whether the table field is set. + */ + boolean hasTable(); + /** + *
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + * @return The table. + */ + com.google.privacy.dlp.v2.Table getTable(); + /** + *
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Table table = 4; + */ + com.google.privacy.dlp.v2.TableOrBuilder getTableOrBuilder(); + + /** + *
+   * Content data to inspect or redact. Replaces `type` and `data`.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + * @return Whether the byteItem field is set. + */ + boolean hasByteItem(); + /** + *
+   * Content data to inspect or redact. Replaces `type` and `data`.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + * @return The byteItem. + */ + com.google.privacy.dlp.v2.ByteContentItem getByteItem(); + /** + *
+   * Content data to inspect or redact. Replaces `type` and `data`.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; + */ + com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder(); + + public com.google.privacy.dlp.v2.ContentItem.DataItemCase getDataItemCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java new file mode 100644 index 000000000000..edd6fa3cd09b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java @@ -0,0 +1,2212 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Precise location of the finding within a document, record, image, or metadata
+ * container.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ContentLocation} + */ +public final class ContentLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ContentLocation) + ContentLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use ContentLocation.newBuilder() to construct. + private ContentLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ContentLocation() { + containerName_ = ""; + containerVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ContentLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ContentLocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + containerName_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.RecordLocation.Builder subBuilder = null; + if (locationCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.RecordLocation) location_).toBuilder(); + } + location_ = + input.readMessage(com.google.privacy.dlp.v2.RecordLocation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.RecordLocation) location_); + location_ = subBuilder.buildPartial(); + } + locationCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.ImageLocation.Builder subBuilder = null; + if (locationCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.ImageLocation) location_).toBuilder(); + } + location_ = + input.readMessage(com.google.privacy.dlp.v2.ImageLocation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageLocation) location_); + location_ = subBuilder.buildPartial(); + } + locationCase_ = 3; + break; + } + case 42: { + com.google.privacy.dlp.v2.DocumentLocation.Builder subBuilder = null; + if (locationCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.DocumentLocation) location_).toBuilder(); + } + location_ = + input.readMessage(com.google.privacy.dlp.v2.DocumentLocation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.DocumentLocation) location_); + location_ = subBuilder.buildPartial(); + } + locationCase_ = 5; + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (containerTimestamp_ != null) { + subBuilder = containerTimestamp_.toBuilder(); + } + containerTimestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(containerTimestamp_); + containerTimestamp_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + containerVersion_ = s; + break; + } + case 66: { + com.google.privacy.dlp.v2.MetadataLocation.Builder subBuilder = null; + if (locationCase_ == 8) { + subBuilder = ((com.google.privacy.dlp.v2.MetadataLocation) location_).toBuilder(); + } + location_ = + input.readMessage(com.google.privacy.dlp.v2.MetadataLocation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.MetadataLocation) location_); + location_ = subBuilder.buildPartial(); + } + locationCase_ = 8; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ContentLocation.class, com.google.privacy.dlp.v2.ContentLocation.Builder.class); + } + + private int locationCase_ = 0; + private java.lang.Object location_; + public enum LocationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RECORD_LOCATION(2), + IMAGE_LOCATION(3), + DOCUMENT_LOCATION(5), + METADATA_LOCATION(8), + LOCATION_NOT_SET(0); + private final int value; + private LocationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LocationCase valueOf(int value) { + return forNumber(value); + } + + public static LocationCase forNumber(int value) { + switch (value) { + case 2: return RECORD_LOCATION; + case 3: return IMAGE_LOCATION; + case 5: return DOCUMENT_LOCATION; + case 8: return METADATA_LOCATION; + case 0: return LOCATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LocationCase + getLocationCase() { + return LocationCase.forNumber( + locationCase_); + } + + public static final int CONTAINER_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object containerName_; + /** + *
+   * Name of the container where the finding is located.
+   * The top level name is the source file name or table name. Names of some
+   * common storage containers are formatted as follows:
+   * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
+   * * Cloud Storage files: `gs://{bucket}/{path}`
+   * * Datastore namespace: {namespace}
+   * Nested names could be absent if the embedded object has no string
+   * identifier (for example, an image contained within a document).
+   * 
+ * + * string container_name = 1; + * @return The containerName. + */ + @java.lang.Override + public java.lang.String getContainerName() { + java.lang.Object ref = containerName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerName_ = s; + return s; + } + } + /** + *
+   * Name of the container where the finding is located.
+   * The top level name is the source file name or table name. Names of some
+   * common storage containers are formatted as follows:
+   * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
+   * * Cloud Storage files: `gs://{bucket}/{path}`
+   * * Datastore namespace: {namespace}
+   * Nested names could be absent if the embedded object has no string
+   * identifier (for example, an image contained within a document).
+   * 
+ * + * string container_name = 1; + * @return The bytes for containerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerNameBytes() { + java.lang.Object ref = containerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECORD_LOCATION_FIELD_NUMBER = 2; + /** + *
+   * Location within a row or record of a database table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + * @return Whether the recordLocation field is set. + */ + @java.lang.Override + public boolean hasRecordLocation() { + return locationCase_ == 2; + } + /** + *
+   * Location within a row or record of a database table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + * @return The recordLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordLocation getRecordLocation() { + if (locationCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordLocation) location_; + } + return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); + } + /** + *
+   * Location within a row or record of a database table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordLocationOrBuilder getRecordLocationOrBuilder() { + if (locationCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordLocation) location_; + } + return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); + } + + public static final int IMAGE_LOCATION_FIELD_NUMBER = 3; + /** + *
+   * Location within an image's pixels.
+   * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + * @return Whether the imageLocation field is set. + */ + @java.lang.Override + public boolean hasImageLocation() { + return locationCase_ == 3; + } + /** + *
+   * Location within an image's pixels.
+   * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + * @return The imageLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageLocation getImageLocation() { + if (locationCase_ == 3) { + return (com.google.privacy.dlp.v2.ImageLocation) location_; + } + return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); + } + /** + *
+   * Location within an image's pixels.
+   * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageLocationOrBuilder getImageLocationOrBuilder() { + if (locationCase_ == 3) { + return (com.google.privacy.dlp.v2.ImageLocation) location_; + } + return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); + } + + public static final int DOCUMENT_LOCATION_FIELD_NUMBER = 5; + /** + *
+   * Location data for document files.
+   * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + * @return Whether the documentLocation field is set. + */ + @java.lang.Override + public boolean hasDocumentLocation() { + return locationCase_ == 5; + } + /** + *
+   * Location data for document files.
+   * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + * @return The documentLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DocumentLocation getDocumentLocation() { + if (locationCase_ == 5) { + return (com.google.privacy.dlp.v2.DocumentLocation) location_; + } + return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); + } + /** + *
+   * Location data for document files.
+   * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DocumentLocationOrBuilder getDocumentLocationOrBuilder() { + if (locationCase_ == 5) { + return (com.google.privacy.dlp.v2.DocumentLocation) location_; + } + return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); + } + + public static final int METADATA_LOCATION_FIELD_NUMBER = 8; + /** + *
+   * Location within the metadata for inspected content.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + * @return Whether the metadataLocation field is set. + */ + @java.lang.Override + public boolean hasMetadataLocation() { + return locationCase_ == 8; + } + /** + *
+   * Location within the metadata for inspected content.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + * @return The metadataLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.MetadataLocation getMetadataLocation() { + if (locationCase_ == 8) { + return (com.google.privacy.dlp.v2.MetadataLocation) location_; + } + return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); + } + /** + *
+   * Location within the metadata for inspected content.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOrBuilder() { + if (locationCase_ == 8) { + return (com.google.privacy.dlp.v2.MetadataLocation) location_; + } + return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); + } + + public static final int CONTAINER_TIMESTAMP_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp containerTimestamp_; + /** + *
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + * @return Whether the containerTimestamp field is set. + */ + @java.lang.Override + public boolean hasContainerTimestamp() { + return containerTimestamp_ != null; + } + /** + *
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + * @return The containerTimestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getContainerTimestamp() { + return containerTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; + } + /** + *
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { + return getContainerTimestamp(); + } + + public static final int CONTAINER_VERSION_FIELD_NUMBER = 7; + private volatile java.lang.Object containerVersion_; + /** + *
+   * Finding container version, if available
+   * ("generation" for Cloud Storage).
+   * 
+ * + * string container_version = 7; + * @return The containerVersion. + */ + @java.lang.Override + public java.lang.String getContainerVersion() { + java.lang.Object ref = containerVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerVersion_ = s; + return s; + } + } + /** + *
+   * Finding container version, if available
+   * ("generation" for Cloud Storage).
+   * 
+ * + * string container_version = 7; + * @return The bytes for containerVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerVersionBytes() { + java.lang.Object ref = containerVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containerName_); + } + if (locationCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.RecordLocation) location_); + } + if (locationCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.ImageLocation) location_); + } + if (locationCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.DocumentLocation) location_); + } + if (containerTimestamp_ != null) { + output.writeMessage(6, getContainerTimestamp()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, containerVersion_); + } + if (locationCase_ == 8) { + output.writeMessage(8, (com.google.privacy.dlp.v2.MetadataLocation) location_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containerName_); + } + if (locationCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.RecordLocation) location_); + } + if (locationCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.ImageLocation) location_); + } + if (locationCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.DocumentLocation) location_); + } + if (containerTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getContainerTimestamp()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, containerVersion_); + } + if (locationCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.privacy.dlp.v2.MetadataLocation) location_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ContentLocation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ContentLocation other = (com.google.privacy.dlp.v2.ContentLocation) obj; + + if (!getContainerName() + .equals(other.getContainerName())) return false; + if (hasContainerTimestamp() != other.hasContainerTimestamp()) return false; + if (hasContainerTimestamp()) { + if (!getContainerTimestamp() + .equals(other.getContainerTimestamp())) return false; + } + if (!getContainerVersion() + .equals(other.getContainerVersion())) return false; + if (!getLocationCase().equals(other.getLocationCase())) return false; + switch (locationCase_) { + case 2: + if (!getRecordLocation() + .equals(other.getRecordLocation())) return false; + break; + case 3: + if (!getImageLocation() + .equals(other.getImageLocation())) return false; + break; + case 5: + if (!getDocumentLocation() + .equals(other.getDocumentLocation())) return false; + break; + case 8: + if (!getMetadataLocation() + .equals(other.getMetadataLocation())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTAINER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getContainerName().hashCode(); + if (hasContainerTimestamp()) { + hash = (37 * hash) + CONTAINER_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getContainerTimestamp().hashCode(); + } + hash = (37 * hash) + CONTAINER_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getContainerVersion().hashCode(); + switch (locationCase_) { + case 2: + hash = (37 * hash) + RECORD_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getRecordLocation().hashCode(); + break; + case 3: + hash = (37 * hash) + IMAGE_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getImageLocation().hashCode(); + break; + case 5: + hash = (37 * hash) + DOCUMENT_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getDocumentLocation().hashCode(); + break; + case 8: + hash = (37 * hash) + METADATA_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getMetadataLocation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ContentLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ContentLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ContentLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ContentLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ContentLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ContentLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ContentLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ContentLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ContentLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Precise location of the finding within a document, record, image, or metadata
+   * container.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ContentLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ContentLocation) + com.google.privacy.dlp.v2.ContentLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ContentLocation.class, com.google.privacy.dlp.v2.ContentLocation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ContentLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + containerName_ = ""; + + if (containerTimestampBuilder_ == null) { + containerTimestamp_ = null; + } else { + containerTimestamp_ = null; + containerTimestampBuilder_ = null; + } + containerVersion_ = ""; + + locationCase_ = 0; + location_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ContentLocation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ContentLocation build() { + com.google.privacy.dlp.v2.ContentLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ContentLocation buildPartial() { + com.google.privacy.dlp.v2.ContentLocation result = new com.google.privacy.dlp.v2.ContentLocation(this); + result.containerName_ = containerName_; + if (locationCase_ == 2) { + if (recordLocationBuilder_ == null) { + result.location_ = location_; + } else { + result.location_ = recordLocationBuilder_.build(); + } + } + if (locationCase_ == 3) { + if (imageLocationBuilder_ == null) { + result.location_ = location_; + } else { + result.location_ = imageLocationBuilder_.build(); + } + } + if (locationCase_ == 5) { + if (documentLocationBuilder_ == null) { + result.location_ = location_; + } else { + result.location_ = documentLocationBuilder_.build(); + } + } + if (locationCase_ == 8) { + if (metadataLocationBuilder_ == null) { + result.location_ = location_; + } else { + result.location_ = metadataLocationBuilder_.build(); + } + } + if (containerTimestampBuilder_ == null) { + result.containerTimestamp_ = containerTimestamp_; + } else { + result.containerTimestamp_ = containerTimestampBuilder_.build(); + } + result.containerVersion_ = containerVersion_; + result.locationCase_ = locationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ContentLocation) { + return mergeFrom((com.google.privacy.dlp.v2.ContentLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ContentLocation other) { + if (other == com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance()) return this; + if (!other.getContainerName().isEmpty()) { + containerName_ = other.containerName_; + onChanged(); + } + if (other.hasContainerTimestamp()) { + mergeContainerTimestamp(other.getContainerTimestamp()); + } + if (!other.getContainerVersion().isEmpty()) { + containerVersion_ = other.containerVersion_; + onChanged(); + } + switch (other.getLocationCase()) { + case RECORD_LOCATION: { + mergeRecordLocation(other.getRecordLocation()); + break; + } + case IMAGE_LOCATION: { + mergeImageLocation(other.getImageLocation()); + break; + } + case DOCUMENT_LOCATION: { + mergeDocumentLocation(other.getDocumentLocation()); + break; + } + case METADATA_LOCATION: { + mergeMetadataLocation(other.getMetadataLocation()); + break; + } + case LOCATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ContentLocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ContentLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int locationCase_ = 0; + private java.lang.Object location_; + public LocationCase + getLocationCase() { + return LocationCase.forNumber( + locationCase_); + } + + public Builder clearLocation() { + locationCase_ = 0; + location_ = null; + onChanged(); + return this; + } + + + private java.lang.Object containerName_ = ""; + /** + *
+     * Name of the container where the finding is located.
+     * The top level name is the source file name or table name. Names of some
+     * common storage containers are formatted as follows:
+     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
+     * * Cloud Storage files: `gs://{bucket}/{path}`
+     * * Datastore namespace: {namespace}
+     * Nested names could be absent if the embedded object has no string
+     * identifier (for example, an image contained within a document).
+     * 
+ * + * string container_name = 1; + * @return The containerName. + */ + public java.lang.String getContainerName() { + java.lang.Object ref = containerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the container where the finding is located.
+     * The top level name is the source file name or table name. Names of some
+     * common storage containers are formatted as follows:
+     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
+     * * Cloud Storage files: `gs://{bucket}/{path}`
+     * * Datastore namespace: {namespace}
+     * Nested names could be absent if the embedded object has no string
+     * identifier (for example, an image contained within a document).
+     * 
+ * + * string container_name = 1; + * @return The bytes for containerName. + */ + public com.google.protobuf.ByteString + getContainerNameBytes() { + java.lang.Object ref = containerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the container where the finding is located.
+     * The top level name is the source file name or table name. Names of some
+     * common storage containers are formatted as follows:
+     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
+     * * Cloud Storage files: `gs://{bucket}/{path}`
+     * * Datastore namespace: {namespace}
+     * Nested names could be absent if the embedded object has no string
+     * identifier (for example, an image contained within a document).
+     * 
+ * + * string container_name = 1; + * @param value The containerName to set. + * @return This builder for chaining. + */ + public Builder setContainerName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerName_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the container where the finding is located.
+     * The top level name is the source file name or table name. Names of some
+     * common storage containers are formatted as follows:
+     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
+     * * Cloud Storage files: `gs://{bucket}/{path}`
+     * * Datastore namespace: {namespace}
+     * Nested names could be absent if the embedded object has no string
+     * identifier (for example, an image contained within a document).
+     * 
+ * + * string container_name = 1; + * @return This builder for chaining. + */ + public Builder clearContainerName() { + + containerName_ = getDefaultInstance().getContainerName(); + onChanged(); + return this; + } + /** + *
+     * Name of the container where the finding is located.
+     * The top level name is the source file name or table name. Names of some
+     * common storage containers are formatted as follows:
+     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
+     * * Cloud Storage files: `gs://{bucket}/{path}`
+     * * Datastore namespace: {namespace}
+     * Nested names could be absent if the embedded object has no string
+     * identifier (for example, an image contained within a document).
+     * 
+ * + * string container_name = 1; + * @param value The bytes for containerName to set. + * @return This builder for chaining. + */ + public Builder setContainerNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordLocation, com.google.privacy.dlp.v2.RecordLocation.Builder, com.google.privacy.dlp.v2.RecordLocationOrBuilder> recordLocationBuilder_; + /** + *
+     * Location within a row or record of a database table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + * @return Whether the recordLocation field is set. + */ + @java.lang.Override + public boolean hasRecordLocation() { + return locationCase_ == 2; + } + /** + *
+     * Location within a row or record of a database table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + * @return The recordLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordLocation getRecordLocation() { + if (recordLocationBuilder_ == null) { + if (locationCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordLocation) location_; + } + return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); + } else { + if (locationCase_ == 2) { + return recordLocationBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); + } + } + /** + *
+     * Location within a row or record of a database table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + */ + public Builder setRecordLocation(com.google.privacy.dlp.v2.RecordLocation value) { + if (recordLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + recordLocationBuilder_.setMessage(value); + } + locationCase_ = 2; + return this; + } + /** + *
+     * Location within a row or record of a database table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + */ + public Builder setRecordLocation( + com.google.privacy.dlp.v2.RecordLocation.Builder builderForValue) { + if (recordLocationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + recordLocationBuilder_.setMessage(builderForValue.build()); + } + locationCase_ = 2; + return this; + } + /** + *
+     * Location within a row or record of a database table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + */ + public Builder mergeRecordLocation(com.google.privacy.dlp.v2.RecordLocation value) { + if (recordLocationBuilder_ == null) { + if (locationCase_ == 2 && + location_ != com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance()) { + location_ = com.google.privacy.dlp.v2.RecordLocation.newBuilder((com.google.privacy.dlp.v2.RecordLocation) location_) + .mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + if (locationCase_ == 2) { + recordLocationBuilder_.mergeFrom(value); + } else { + recordLocationBuilder_.setMessage(value); + } + } + locationCase_ = 2; + return this; + } + /** + *
+     * Location within a row or record of a database table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + */ + public Builder clearRecordLocation() { + if (recordLocationBuilder_ == null) { + if (locationCase_ == 2) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + } else { + if (locationCase_ == 2) { + locationCase_ = 0; + location_ = null; + } + recordLocationBuilder_.clear(); + } + return this; + } + /** + *
+     * Location within a row or record of a database table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + */ + public com.google.privacy.dlp.v2.RecordLocation.Builder getRecordLocationBuilder() { + return getRecordLocationFieldBuilder().getBuilder(); + } + /** + *
+     * Location within a row or record of a database table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordLocationOrBuilder getRecordLocationOrBuilder() { + if ((locationCase_ == 2) && (recordLocationBuilder_ != null)) { + return recordLocationBuilder_.getMessageOrBuilder(); + } else { + if (locationCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordLocation) location_; + } + return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); + } + } + /** + *
+     * Location within a row or record of a database table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordLocation, com.google.privacy.dlp.v2.RecordLocation.Builder, com.google.privacy.dlp.v2.RecordLocationOrBuilder> + getRecordLocationFieldBuilder() { + if (recordLocationBuilder_ == null) { + if (!(locationCase_ == 2)) { + location_ = com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); + } + recordLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordLocation, com.google.privacy.dlp.v2.RecordLocation.Builder, com.google.privacy.dlp.v2.RecordLocationOrBuilder>( + (com.google.privacy.dlp.v2.RecordLocation) location_, + getParentForChildren(), + isClean()); + location_ = null; + } + locationCase_ = 2; + onChanged();; + return recordLocationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageLocation, com.google.privacy.dlp.v2.ImageLocation.Builder, com.google.privacy.dlp.v2.ImageLocationOrBuilder> imageLocationBuilder_; + /** + *
+     * Location within an image's pixels.
+     * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + * @return Whether the imageLocation field is set. + */ + @java.lang.Override + public boolean hasImageLocation() { + return locationCase_ == 3; + } + /** + *
+     * Location within an image's pixels.
+     * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + * @return The imageLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageLocation getImageLocation() { + if (imageLocationBuilder_ == null) { + if (locationCase_ == 3) { + return (com.google.privacy.dlp.v2.ImageLocation) location_; + } + return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); + } else { + if (locationCase_ == 3) { + return imageLocationBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); + } + } + /** + *
+     * Location within an image's pixels.
+     * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + */ + public Builder setImageLocation(com.google.privacy.dlp.v2.ImageLocation value) { + if (imageLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + imageLocationBuilder_.setMessage(value); + } + locationCase_ = 3; + return this; + } + /** + *
+     * Location within an image's pixels.
+     * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + */ + public Builder setImageLocation( + com.google.privacy.dlp.v2.ImageLocation.Builder builderForValue) { + if (imageLocationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + imageLocationBuilder_.setMessage(builderForValue.build()); + } + locationCase_ = 3; + return this; + } + /** + *
+     * Location within an image's pixels.
+     * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + */ + public Builder mergeImageLocation(com.google.privacy.dlp.v2.ImageLocation value) { + if (imageLocationBuilder_ == null) { + if (locationCase_ == 3 && + location_ != com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance()) { + location_ = com.google.privacy.dlp.v2.ImageLocation.newBuilder((com.google.privacy.dlp.v2.ImageLocation) location_) + .mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + if (locationCase_ == 3) { + imageLocationBuilder_.mergeFrom(value); + } else { + imageLocationBuilder_.setMessage(value); + } + } + locationCase_ = 3; + return this; + } + /** + *
+     * Location within an image's pixels.
+     * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + */ + public Builder clearImageLocation() { + if (imageLocationBuilder_ == null) { + if (locationCase_ == 3) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + } else { + if (locationCase_ == 3) { + locationCase_ = 0; + location_ = null; + } + imageLocationBuilder_.clear(); + } + return this; + } + /** + *
+     * Location within an image's pixels.
+     * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + */ + public com.google.privacy.dlp.v2.ImageLocation.Builder getImageLocationBuilder() { + return getImageLocationFieldBuilder().getBuilder(); + } + /** + *
+     * Location within an image's pixels.
+     * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageLocationOrBuilder getImageLocationOrBuilder() { + if ((locationCase_ == 3) && (imageLocationBuilder_ != null)) { + return imageLocationBuilder_.getMessageOrBuilder(); + } else { + if (locationCase_ == 3) { + return (com.google.privacy.dlp.v2.ImageLocation) location_; + } + return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); + } + } + /** + *
+     * Location within an image's pixels.
+     * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageLocation, com.google.privacy.dlp.v2.ImageLocation.Builder, com.google.privacy.dlp.v2.ImageLocationOrBuilder> + getImageLocationFieldBuilder() { + if (imageLocationBuilder_ == null) { + if (!(locationCase_ == 3)) { + location_ = com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); + } + imageLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageLocation, com.google.privacy.dlp.v2.ImageLocation.Builder, com.google.privacy.dlp.v2.ImageLocationOrBuilder>( + (com.google.privacy.dlp.v2.ImageLocation) location_, + getParentForChildren(), + isClean()); + location_ = null; + } + locationCase_ = 3; + onChanged();; + return imageLocationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DocumentLocation, com.google.privacy.dlp.v2.DocumentLocation.Builder, com.google.privacy.dlp.v2.DocumentLocationOrBuilder> documentLocationBuilder_; + /** + *
+     * Location data for document files.
+     * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + * @return Whether the documentLocation field is set. + */ + @java.lang.Override + public boolean hasDocumentLocation() { + return locationCase_ == 5; + } + /** + *
+     * Location data for document files.
+     * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + * @return The documentLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DocumentLocation getDocumentLocation() { + if (documentLocationBuilder_ == null) { + if (locationCase_ == 5) { + return (com.google.privacy.dlp.v2.DocumentLocation) location_; + } + return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); + } else { + if (locationCase_ == 5) { + return documentLocationBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); + } + } + /** + *
+     * Location data for document files.
+     * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + */ + public Builder setDocumentLocation(com.google.privacy.dlp.v2.DocumentLocation value) { + if (documentLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + documentLocationBuilder_.setMessage(value); + } + locationCase_ = 5; + return this; + } + /** + *
+     * Location data for document files.
+     * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + */ + public Builder setDocumentLocation( + com.google.privacy.dlp.v2.DocumentLocation.Builder builderForValue) { + if (documentLocationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + documentLocationBuilder_.setMessage(builderForValue.build()); + } + locationCase_ = 5; + return this; + } + /** + *
+     * Location data for document files.
+     * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + */ + public Builder mergeDocumentLocation(com.google.privacy.dlp.v2.DocumentLocation value) { + if (documentLocationBuilder_ == null) { + if (locationCase_ == 5 && + location_ != com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance()) { + location_ = com.google.privacy.dlp.v2.DocumentLocation.newBuilder((com.google.privacy.dlp.v2.DocumentLocation) location_) + .mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + if (locationCase_ == 5) { + documentLocationBuilder_.mergeFrom(value); + } else { + documentLocationBuilder_.setMessage(value); + } + } + locationCase_ = 5; + return this; + } + /** + *
+     * Location data for document files.
+     * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + */ + public Builder clearDocumentLocation() { + if (documentLocationBuilder_ == null) { + if (locationCase_ == 5) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + } else { + if (locationCase_ == 5) { + locationCase_ = 0; + location_ = null; + } + documentLocationBuilder_.clear(); + } + return this; + } + /** + *
+     * Location data for document files.
+     * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + */ + public com.google.privacy.dlp.v2.DocumentLocation.Builder getDocumentLocationBuilder() { + return getDocumentLocationFieldBuilder().getBuilder(); + } + /** + *
+     * Location data for document files.
+     * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DocumentLocationOrBuilder getDocumentLocationOrBuilder() { + if ((locationCase_ == 5) && (documentLocationBuilder_ != null)) { + return documentLocationBuilder_.getMessageOrBuilder(); + } else { + if (locationCase_ == 5) { + return (com.google.privacy.dlp.v2.DocumentLocation) location_; + } + return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); + } + } + /** + *
+     * Location data for document files.
+     * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DocumentLocation, com.google.privacy.dlp.v2.DocumentLocation.Builder, com.google.privacy.dlp.v2.DocumentLocationOrBuilder> + getDocumentLocationFieldBuilder() { + if (documentLocationBuilder_ == null) { + if (!(locationCase_ == 5)) { + location_ = com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); + } + documentLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DocumentLocation, com.google.privacy.dlp.v2.DocumentLocation.Builder, com.google.privacy.dlp.v2.DocumentLocationOrBuilder>( + (com.google.privacy.dlp.v2.DocumentLocation) location_, + getParentForChildren(), + isClean()); + location_ = null; + } + locationCase_ = 5; + onChanged();; + return documentLocationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.MetadataLocation, com.google.privacy.dlp.v2.MetadataLocation.Builder, com.google.privacy.dlp.v2.MetadataLocationOrBuilder> metadataLocationBuilder_; + /** + *
+     * Location within the metadata for inspected content.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + * @return Whether the metadataLocation field is set. + */ + @java.lang.Override + public boolean hasMetadataLocation() { + return locationCase_ == 8; + } + /** + *
+     * Location within the metadata for inspected content.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + * @return The metadataLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.MetadataLocation getMetadataLocation() { + if (metadataLocationBuilder_ == null) { + if (locationCase_ == 8) { + return (com.google.privacy.dlp.v2.MetadataLocation) location_; + } + return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); + } else { + if (locationCase_ == 8) { + return metadataLocationBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); + } + } + /** + *
+     * Location within the metadata for inspected content.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + */ + public Builder setMetadataLocation(com.google.privacy.dlp.v2.MetadataLocation value) { + if (metadataLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + metadataLocationBuilder_.setMessage(value); + } + locationCase_ = 8; + return this; + } + /** + *
+     * Location within the metadata for inspected content.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + */ + public Builder setMetadataLocation( + com.google.privacy.dlp.v2.MetadataLocation.Builder builderForValue) { + if (metadataLocationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + metadataLocationBuilder_.setMessage(builderForValue.build()); + } + locationCase_ = 8; + return this; + } + /** + *
+     * Location within the metadata for inspected content.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + */ + public Builder mergeMetadataLocation(com.google.privacy.dlp.v2.MetadataLocation value) { + if (metadataLocationBuilder_ == null) { + if (locationCase_ == 8 && + location_ != com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance()) { + location_ = com.google.privacy.dlp.v2.MetadataLocation.newBuilder((com.google.privacy.dlp.v2.MetadataLocation) location_) + .mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + if (locationCase_ == 8) { + metadataLocationBuilder_.mergeFrom(value); + } else { + metadataLocationBuilder_.setMessage(value); + } + } + locationCase_ = 8; + return this; + } + /** + *
+     * Location within the metadata for inspected content.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + */ + public Builder clearMetadataLocation() { + if (metadataLocationBuilder_ == null) { + if (locationCase_ == 8) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + } else { + if (locationCase_ == 8) { + locationCase_ = 0; + location_ = null; + } + metadataLocationBuilder_.clear(); + } + return this; + } + /** + *
+     * Location within the metadata for inspected content.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + */ + public com.google.privacy.dlp.v2.MetadataLocation.Builder getMetadataLocationBuilder() { + return getMetadataLocationFieldBuilder().getBuilder(); + } + /** + *
+     * Location within the metadata for inspected content.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOrBuilder() { + if ((locationCase_ == 8) && (metadataLocationBuilder_ != null)) { + return metadataLocationBuilder_.getMessageOrBuilder(); + } else { + if (locationCase_ == 8) { + return (com.google.privacy.dlp.v2.MetadataLocation) location_; + } + return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); + } + } + /** + *
+     * Location within the metadata for inspected content.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.MetadataLocation, com.google.privacy.dlp.v2.MetadataLocation.Builder, com.google.privacy.dlp.v2.MetadataLocationOrBuilder> + getMetadataLocationFieldBuilder() { + if (metadataLocationBuilder_ == null) { + if (!(locationCase_ == 8)) { + location_ = com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); + } + metadataLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.MetadataLocation, com.google.privacy.dlp.v2.MetadataLocation.Builder, com.google.privacy.dlp.v2.MetadataLocationOrBuilder>( + (com.google.privacy.dlp.v2.MetadataLocation) location_, + getParentForChildren(), + isClean()); + location_ = null; + } + locationCase_ = 8; + onChanged();; + return metadataLocationBuilder_; + } + + private com.google.protobuf.Timestamp containerTimestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> containerTimestampBuilder_; + /** + *
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + * @return Whether the containerTimestamp field is set. + */ + public boolean hasContainerTimestamp() { + return containerTimestampBuilder_ != null || containerTimestamp_ != null; + } + /** + *
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + * @return The containerTimestamp. + */ + public com.google.protobuf.Timestamp getContainerTimestamp() { + if (containerTimestampBuilder_ == null) { + return containerTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; + } else { + return containerTimestampBuilder_.getMessage(); + } + } + /** + *
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + */ + public Builder setContainerTimestamp(com.google.protobuf.Timestamp value) { + if (containerTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + containerTimestamp_ = value; + onChanged(); + } else { + containerTimestampBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + */ + public Builder setContainerTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (containerTimestampBuilder_ == null) { + containerTimestamp_ = builderForValue.build(); + onChanged(); + } else { + containerTimestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + */ + public Builder mergeContainerTimestamp(com.google.protobuf.Timestamp value) { + if (containerTimestampBuilder_ == null) { + if (containerTimestamp_ != null) { + containerTimestamp_ = + com.google.protobuf.Timestamp.newBuilder(containerTimestamp_).mergeFrom(value).buildPartial(); + } else { + containerTimestamp_ = value; + } + onChanged(); + } else { + containerTimestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + */ + public Builder clearContainerTimestamp() { + if (containerTimestampBuilder_ == null) { + containerTimestamp_ = null; + onChanged(); + } else { + containerTimestamp_ = null; + containerTimestampBuilder_ = null; + } + + return this; + } + /** + *
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + */ + public com.google.protobuf.Timestamp.Builder getContainerTimestampBuilder() { + + onChanged(); + return getContainerTimestampFieldBuilder().getBuilder(); + } + /** + *
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + */ + public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { + if (containerTimestampBuilder_ != null) { + return containerTimestampBuilder_.getMessageOrBuilder(); + } else { + return containerTimestamp_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; + } + } + /** + *
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getContainerTimestampFieldBuilder() { + if (containerTimestampBuilder_ == null) { + containerTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getContainerTimestamp(), + getParentForChildren(), + isClean()); + containerTimestamp_ = null; + } + return containerTimestampBuilder_; + } + + private java.lang.Object containerVersion_ = ""; + /** + *
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 7; + * @return The containerVersion. + */ + public java.lang.String getContainerVersion() { + java.lang.Object ref = containerVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 7; + * @return The bytes for containerVersion. + */ + public com.google.protobuf.ByteString + getContainerVersionBytes() { + java.lang.Object ref = containerVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 7; + * @param value The containerVersion to set. + * @return This builder for chaining. + */ + public Builder setContainerVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerVersion_ = value; + onChanged(); + return this; + } + /** + *
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 7; + * @return This builder for chaining. + */ + public Builder clearContainerVersion() { + + containerVersion_ = getDefaultInstance().getContainerVersion(); + onChanged(); + return this; + } + /** + *
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 7; + * @param value The bytes for containerVersion to set. + * @return This builder for chaining. + */ + public Builder setContainerVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerVersion_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ContentLocation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ContentLocation) + private static final com.google.privacy.dlp.v2.ContentLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ContentLocation(); + } + + public static com.google.privacy.dlp.v2.ContentLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContentLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContentLocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ContentLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java new file mode 100644 index 000000000000..7516580a2572 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java @@ -0,0 +1,211 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ContentLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ContentLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the container where the finding is located.
+   * The top level name is the source file name or table name. Names of some
+   * common storage containers are formatted as follows:
+   * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
+   * * Cloud Storage files: `gs://{bucket}/{path}`
+   * * Datastore namespace: {namespace}
+   * Nested names could be absent if the embedded object has no string
+   * identifier (for example, an image contained within a document).
+   * 
+ * + * string container_name = 1; + * @return The containerName. + */ + java.lang.String getContainerName(); + /** + *
+   * Name of the container where the finding is located.
+   * The top level name is the source file name or table name. Names of some
+   * common storage containers are formatted as follows:
+   * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
+   * * Cloud Storage files: `gs://{bucket}/{path}`
+   * * Datastore namespace: {namespace}
+   * Nested names could be absent if the embedded object has no string
+   * identifier (for example, an image contained within a document).
+   * 
+ * + * string container_name = 1; + * @return The bytes for containerName. + */ + com.google.protobuf.ByteString + getContainerNameBytes(); + + /** + *
+   * Location within a row or record of a database table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + * @return Whether the recordLocation field is set. + */ + boolean hasRecordLocation(); + /** + *
+   * Location within a row or record of a database table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + * @return The recordLocation. + */ + com.google.privacy.dlp.v2.RecordLocation getRecordLocation(); + /** + *
+   * Location within a row or record of a database table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordLocation record_location = 2; + */ + com.google.privacy.dlp.v2.RecordLocationOrBuilder getRecordLocationOrBuilder(); + + /** + *
+   * Location within an image's pixels.
+   * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + * @return Whether the imageLocation field is set. + */ + boolean hasImageLocation(); + /** + *
+   * Location within an image's pixels.
+   * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + * @return The imageLocation. + */ + com.google.privacy.dlp.v2.ImageLocation getImageLocation(); + /** + *
+   * Location within an image's pixels.
+   * 
+ * + * .google.privacy.dlp.v2.ImageLocation image_location = 3; + */ + com.google.privacy.dlp.v2.ImageLocationOrBuilder getImageLocationOrBuilder(); + + /** + *
+   * Location data for document files.
+   * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + * @return Whether the documentLocation field is set. + */ + boolean hasDocumentLocation(); + /** + *
+   * Location data for document files.
+   * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + * @return The documentLocation. + */ + com.google.privacy.dlp.v2.DocumentLocation getDocumentLocation(); + /** + *
+   * Location data for document files.
+   * 
+ * + * .google.privacy.dlp.v2.DocumentLocation document_location = 5; + */ + com.google.privacy.dlp.v2.DocumentLocationOrBuilder getDocumentLocationOrBuilder(); + + /** + *
+   * Location within the metadata for inspected content.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + * @return Whether the metadataLocation field is set. + */ + boolean hasMetadataLocation(); + /** + *
+   * Location within the metadata for inspected content.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + * @return The metadataLocation. + */ + com.google.privacy.dlp.v2.MetadataLocation getMetadataLocation(); + /** + *
+   * Location within the metadata for inspected content.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; + */ + com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOrBuilder(); + + /** + *
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + * @return Whether the containerTimestamp field is set. + */ + boolean hasContainerTimestamp(); + /** + *
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + * @return The containerTimestamp. + */ + com.google.protobuf.Timestamp getContainerTimestamp(); + /** + *
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 6; + */ + com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder(); + + /** + *
+   * Finding container version, if available
+   * ("generation" for Cloud Storage).
+   * 
+ * + * string container_version = 7; + * @return The containerVersion. + */ + java.lang.String getContainerVersion(); + /** + *
+   * Finding container version, if available
+   * ("generation" for Cloud Storage).
+   * 
+ * + * string container_version = 7; + * @return The bytes for containerVersion. + */ + com.google.protobuf.ByteString + getContainerVersionBytes(); + + public com.google.privacy.dlp.v2.ContentLocation.LocationCase getLocationCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java new file mode 100644 index 000000000000..c6a8b7f541c5 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Deprecated and unused.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.ContentOption} + */ +public enum ContentOption + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Includes entire content of a file or a data stream.
+   * 
+ * + * CONTENT_UNSPECIFIED = 0; + */ + CONTENT_UNSPECIFIED(0), + /** + *
+   * Text content within the data, excluding any metadata.
+   * 
+ * + * CONTENT_TEXT = 1; + */ + CONTENT_TEXT(1), + /** + *
+   * Images found in the data.
+   * 
+ * + * CONTENT_IMAGE = 2; + */ + CONTENT_IMAGE(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Includes entire content of a file or a data stream.
+   * 
+ * + * CONTENT_UNSPECIFIED = 0; + */ + public static final int CONTENT_UNSPECIFIED_VALUE = 0; + /** + *
+   * Text content within the data, excluding any metadata.
+   * 
+ * + * CONTENT_TEXT = 1; + */ + public static final int CONTENT_TEXT_VALUE = 1; + /** + *
+   * Images found in the data.
+   * 
+ * + * CONTENT_IMAGE = 2; + */ + public static final int CONTENT_IMAGE_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ContentOption forNumber(int value) { + switch (value) { + case 0: return CONTENT_UNSPECIFIED; + case 1: return CONTENT_TEXT; + case 2: return CONTENT_IMAGE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ContentOption> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ContentOption findValueByNumber(int number) { + return ContentOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(5); + } + + private static final ContentOption[] VALUES = values(); + + public static ContentOption valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ContentOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.ContentOption) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java new file mode 100644 index 000000000000..fcb273fc0265 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java @@ -0,0 +1,1289 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for CreateDeidentifyTemplate.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} + */ +public final class CreateDeidentifyTemplateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) + CreateDeidentifyTemplateRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateDeidentifyTemplateRequest.newBuilder() to construct. + private CreateDeidentifyTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateDeidentifyTemplateRequest() { + parent_ = ""; + templateId_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateDeidentifyTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateDeidentifyTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.DeidentifyTemplate.Builder subBuilder = null; + if (deidentifyTemplate_ != null) { + subBuilder = deidentifyTemplate_.toBuilder(); + } + deidentifyTemplate_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyTemplate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deidentifyTemplate_); + deidentifyTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + templateId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEIDENTIFY_TEMPLATE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.DeidentifyTemplate deidentifyTemplate_; + /** + *
+   * Required. The DeidentifyTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the deidentifyTemplate field is set. + */ + @java.lang.Override + public boolean hasDeidentifyTemplate() { + return deidentifyTemplate_ != null; + } + /** + *
+   * Required. The DeidentifyTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The deidentifyTemplate. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate() { + return deidentifyTemplate_ == null ? com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; + } + /** + *
+   * Required. The DeidentifyTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder() { + return getDeidentifyTemplate(); + } + + public static final int TEMPLATE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object templateId_; + /** + *
+   * The template id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string template_id = 3; + * @return The templateId. + */ + @java.lang.Override + public java.lang.String getTemplateId() { + java.lang.Object ref = templateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + templateId_ = s; + return s; + } + } + /** + *
+   * The template id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string template_id = 3; + * @return The bytes for templateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTemplateIdBytes() { + java.lang.Object ref = templateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + templateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (deidentifyTemplate_ != null) { + output.writeMessage(2, getDeidentifyTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, templateId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (deidentifyTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDeidentifyTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, templateId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest other = (com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasDeidentifyTemplate() != other.hasDeidentifyTemplate()) return false; + if (hasDeidentifyTemplate()) { + if (!getDeidentifyTemplate() + .equals(other.getDeidentifyTemplate())) return false; + } + if (!getTemplateId() + .equals(other.getTemplateId())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDeidentifyTemplate()) { + hash = (37 * hash) + DEIDENTIFY_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getDeidentifyTemplate().hashCode(); + } + hash = (37 * hash) + TEMPLATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTemplateId().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateDeidentifyTemplate.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (deidentifyTemplateBuilder_ == null) { + deidentifyTemplate_ = null; + } else { + deidentifyTemplate_ = null; + deidentifyTemplateBuilder_ = null; + } + templateId_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest build() { + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest buildPartial() { + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest result = new com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(this); + result.parent_ = parent_; + if (deidentifyTemplateBuilder_ == null) { + result.deidentifyTemplate_ = deidentifyTemplate_; + } else { + result.deidentifyTemplate_ = deidentifyTemplateBuilder_.build(); + } + result.templateId_ = templateId_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) { + return mergeFrom((com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest other) { + if (other == com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDeidentifyTemplate()) { + mergeDeidentifyTemplate(other.getDeidentifyTemplate()); + } + if (!other.getTemplateId().isEmpty()) { + templateId_ = other.templateId_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.DeidentifyTemplate deidentifyTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> deidentifyTemplateBuilder_; + /** + *
+     * Required. The DeidentifyTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the deidentifyTemplate field is set. + */ + public boolean hasDeidentifyTemplate() { + return deidentifyTemplateBuilder_ != null || deidentifyTemplate_ != null; + } + /** + *
+     * Required. The DeidentifyTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The deidentifyTemplate. + */ + public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate() { + if (deidentifyTemplateBuilder_ == null) { + return deidentifyTemplate_ == null ? com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; + } else { + return deidentifyTemplateBuilder_.getMessage(); + } + } + /** + *
+     * Required. The DeidentifyTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate value) { + if (deidentifyTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deidentifyTemplate_ = value; + onChanged(); + } else { + deidentifyTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The DeidentifyTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDeidentifyTemplate( + com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { + if (deidentifyTemplateBuilder_ == null) { + deidentifyTemplate_ = builderForValue.build(); + onChanged(); + } else { + deidentifyTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The DeidentifyTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate value) { + if (deidentifyTemplateBuilder_ == null) { + if (deidentifyTemplate_ != null) { + deidentifyTemplate_ = + com.google.privacy.dlp.v2.DeidentifyTemplate.newBuilder(deidentifyTemplate_).mergeFrom(value).buildPartial(); + } else { + deidentifyTemplate_ = value; + } + onChanged(); + } else { + deidentifyTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The DeidentifyTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDeidentifyTemplate() { + if (deidentifyTemplateBuilder_ == null) { + deidentifyTemplate_ = null; + onChanged(); + } else { + deidentifyTemplate_ = null; + deidentifyTemplateBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The DeidentifyTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder getDeidentifyTemplateBuilder() { + + onChanged(); + return getDeidentifyTemplateFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The DeidentifyTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder() { + if (deidentifyTemplateBuilder_ != null) { + return deidentifyTemplateBuilder_.getMessageOrBuilder(); + } else { + return deidentifyTemplate_ == null ? + com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; + } + } + /** + *
+     * Required. The DeidentifyTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> + getDeidentifyTemplateFieldBuilder() { + if (deidentifyTemplateBuilder_ == null) { + deidentifyTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder>( + getDeidentifyTemplate(), + getParentForChildren(), + isClean()); + deidentifyTemplate_ = null; + } + return deidentifyTemplateBuilder_; + } + + private java.lang.Object templateId_ = ""; + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @return The templateId. + */ + public java.lang.String getTemplateId() { + java.lang.Object ref = templateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + templateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @return The bytes for templateId. + */ + public com.google.protobuf.ByteString + getTemplateIdBytes() { + java.lang.Object ref = templateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + templateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @param value The templateId to set. + * @return This builder for chaining. + */ + public Builder setTemplateId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + templateId_ = value; + onChanged(); + return this; + } + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @return This builder for chaining. + */ + public Builder clearTemplateId() { + + templateId_ = getDefaultInstance().getTemplateId(); + onChanged(); + return this; + } + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @param value The bytes for templateId to set. + * @return This builder for chaining. + */ + public Builder setTemplateIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + templateId_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) + private static final com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(); + } + + public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDeidentifyTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDeidentifyTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..1aa65a923edd --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CreateDeidentifyTemplateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The DeidentifyTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the deidentifyTemplate field is set. + */ + boolean hasDeidentifyTemplate(); + /** + *
+   * Required. The DeidentifyTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The deidentifyTemplate. + */ + com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate(); + /** + *
+   * Required. The DeidentifyTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder(); + + /** + *
+   * The template id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string template_id = 3; + * @return The templateId. + */ + java.lang.String getTemplateId(); + /** + *
+   * The template id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string template_id = 3; + * @return The bytes for templateId. + */ + com.google.protobuf.ByteString + getTemplateIdBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java new file mode 100644 index 000000000000..4cc05576f3a9 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java @@ -0,0 +1,1636 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for CreateDlpJobRequest. Used to initiate long running
+ * jobs such as calculating risk metrics or inspecting Google Cloud
+ * Storage.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateDlpJobRequest} + */ +public final class CreateDlpJobRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateDlpJobRequest) + CreateDlpJobRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateDlpJobRequest.newBuilder() to construct. + private CreateDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateDlpJobRequest() { + parent_ = ""; + jobId_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateDlpJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateDlpJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.InspectJobConfig.Builder subBuilder = null; + if (jobCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.InspectJobConfig) job_).toBuilder(); + } + job_ = + input.readMessage(com.google.privacy.dlp.v2.InspectJobConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.InspectJobConfig) job_); + job_ = subBuilder.buildPartial(); + } + jobCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder subBuilder = null; + if (jobCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_).toBuilder(); + } + job_ = + input.readMessage(com.google.privacy.dlp.v2.RiskAnalysisJobConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_); + job_ = subBuilder.buildPartial(); + } + jobCase_ = 3; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + jobId_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateDlpJobRequest.class, com.google.privacy.dlp.v2.CreateDlpJobRequest.Builder.class); + } + + private int jobCase_ = 0; + private java.lang.Object job_; + public enum JobCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSPECT_JOB(2), + RISK_JOB(3), + JOB_NOT_SET(0); + private final int value; + private JobCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobCase valueOf(int value) { + return forNumber(value); + } + + public static JobCase forNumber(int value) { + switch (value) { + case 2: return INSPECT_JOB; + case 3: return RISK_JOB; + case 0: return JOB_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public JobCase + getJobCase() { + return JobCase.forNumber( + jobCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSPECT_JOB_FIELD_NUMBER = 2; + /** + *
+   * An inspection job scans a storage repository for InfoTypes.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + * @return Whether the inspectJob field is set. + */ + @java.lang.Override + public boolean hasInspectJob() { + return jobCase_ == 2; + } + /** + *
+   * An inspection job scans a storage repository for InfoTypes.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + * @return The inspectJob. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() { + if (jobCase_ == 2) { + return (com.google.privacy.dlp.v2.InspectJobConfig) job_; + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + /** + *
+   * An inspection job scans a storage repository for InfoTypes.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() { + if (jobCase_ == 2) { + return (com.google.privacy.dlp.v2.InspectJobConfig) job_; + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + + public static final int RISK_JOB_FIELD_NUMBER = 3; + /** + *
+   * A risk analysis job calculates re-identification risk metrics for a
+   * BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + * @return Whether the riskJob field is set. + */ + @java.lang.Override + public boolean hasRiskJob() { + return jobCase_ == 3; + } + /** + *
+   * A risk analysis job calculates re-identification risk metrics for a
+   * BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + * @return The riskJob. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getRiskJob() { + if (jobCase_ == 3) { + return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_; + } + return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); + } + /** + *
+   * A risk analysis job calculates re-identification risk metrics for a
+   * BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getRiskJobOrBuilder() { + if (jobCase_ == 3) { + return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_; + } + return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); + } + + public static final int JOB_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object jobId_; + /** + *
+   * The job id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string job_id = 4; + * @return The jobId. + */ + @java.lang.Override + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobId_ = s; + return s; + } + } + /** + *
+   * The job id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string job_id = 4; + * @return The bytes for jobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (jobCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.InspectJobConfig) job_); + } + if (jobCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jobId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (jobCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.InspectJobConfig) job_); + } + if (jobCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, jobId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CreateDlpJobRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CreateDlpJobRequest other = (com.google.privacy.dlp.v2.CreateDlpJobRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getJobId() + .equals(other.getJobId())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!getJobCase().equals(other.getJobCase())) return false; + switch (jobCase_) { + case 2: + if (!getInspectJob() + .equals(other.getInspectJob())) return false; + break; + case 3: + if (!getRiskJob() + .equals(other.getRiskJob())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getJobId().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + switch (jobCase_) { + case 2: + hash = (37 * hash) + INSPECT_JOB_FIELD_NUMBER; + hash = (53 * hash) + getInspectJob().hashCode(); + break; + case 3: + hash = (37 * hash) + RISK_JOB_FIELD_NUMBER; + hash = (53 * hash) + getRiskJob().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CreateDlpJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateDlpJobRequest. Used to initiate long running
+   * jobs such as calculating risk metrics or inspecting Google Cloud
+   * Storage.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateDlpJobRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateDlpJobRequest) + com.google.privacy.dlp.v2.CreateDlpJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateDlpJobRequest.class, com.google.privacy.dlp.v2.CreateDlpJobRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CreateDlpJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + jobId_ = ""; + + locationId_ = ""; + + jobCase_ = 0; + job_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateDlpJobRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CreateDlpJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateDlpJobRequest build() { + com.google.privacy.dlp.v2.CreateDlpJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateDlpJobRequest buildPartial() { + com.google.privacy.dlp.v2.CreateDlpJobRequest result = new com.google.privacy.dlp.v2.CreateDlpJobRequest(this); + result.parent_ = parent_; + if (jobCase_ == 2) { + if (inspectJobBuilder_ == null) { + result.job_ = job_; + } else { + result.job_ = inspectJobBuilder_.build(); + } + } + if (jobCase_ == 3) { + if (riskJobBuilder_ == null) { + result.job_ = job_; + } else { + result.job_ = riskJobBuilder_.build(); + } + } + result.jobId_ = jobId_; + result.locationId_ = locationId_; + result.jobCase_ = jobCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CreateDlpJobRequest) { + return mergeFrom((com.google.privacy.dlp.v2.CreateDlpJobRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CreateDlpJobRequest other) { + if (other == com.google.privacy.dlp.v2.CreateDlpJobRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getJobId().isEmpty()) { + jobId_ = other.jobId_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + switch (other.getJobCase()) { + case INSPECT_JOB: { + mergeInspectJob(other.getInspectJob()); + break; + } + case RISK_JOB: { + mergeRiskJob(other.getRiskJob()); + break; + } + case JOB_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CreateDlpJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CreateDlpJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int jobCase_ = 0; + private java.lang.Object job_; + public JobCase + getJobCase() { + return JobCase.forNumber( + jobCase_); + } + + public Builder clearJob() { + jobCase_ = 0; + job_ = null; + onChanged(); + return this; + } + + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> inspectJobBuilder_; + /** + *
+     * An inspection job scans a storage repository for InfoTypes.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + * @return Whether the inspectJob field is set. + */ + @java.lang.Override + public boolean hasInspectJob() { + return jobCase_ == 2; + } + /** + *
+     * An inspection job scans a storage repository for InfoTypes.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + * @return The inspectJob. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() { + if (inspectJobBuilder_ == null) { + if (jobCase_ == 2) { + return (com.google.privacy.dlp.v2.InspectJobConfig) job_; + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } else { + if (jobCase_ == 2) { + return inspectJobBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + } + /** + *
+     * An inspection job scans a storage repository for InfoTypes.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + */ + public Builder setInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) { + if (inspectJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + job_ = value; + onChanged(); + } else { + inspectJobBuilder_.setMessage(value); + } + jobCase_ = 2; + return this; + } + /** + *
+     * An inspection job scans a storage repository for InfoTypes.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + */ + public Builder setInspectJob( + com.google.privacy.dlp.v2.InspectJobConfig.Builder builderForValue) { + if (inspectJobBuilder_ == null) { + job_ = builderForValue.build(); + onChanged(); + } else { + inspectJobBuilder_.setMessage(builderForValue.build()); + } + jobCase_ = 2; + return this; + } + /** + *
+     * An inspection job scans a storage repository for InfoTypes.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + */ + public Builder mergeInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) { + if (inspectJobBuilder_ == null) { + if (jobCase_ == 2 && + job_ != com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance()) { + job_ = com.google.privacy.dlp.v2.InspectJobConfig.newBuilder((com.google.privacy.dlp.v2.InspectJobConfig) job_) + .mergeFrom(value).buildPartial(); + } else { + job_ = value; + } + onChanged(); + } else { + if (jobCase_ == 2) { + inspectJobBuilder_.mergeFrom(value); + } else { + inspectJobBuilder_.setMessage(value); + } + } + jobCase_ = 2; + return this; + } + /** + *
+     * An inspection job scans a storage repository for InfoTypes.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + */ + public Builder clearInspectJob() { + if (inspectJobBuilder_ == null) { + if (jobCase_ == 2) { + jobCase_ = 0; + job_ = null; + onChanged(); + } + } else { + if (jobCase_ == 2) { + jobCase_ = 0; + job_ = null; + } + inspectJobBuilder_.clear(); + } + return this; + } + /** + *
+     * An inspection job scans a storage repository for InfoTypes.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + */ + public com.google.privacy.dlp.v2.InspectJobConfig.Builder getInspectJobBuilder() { + return getInspectJobFieldBuilder().getBuilder(); + } + /** + *
+     * An inspection job scans a storage repository for InfoTypes.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() { + if ((jobCase_ == 2) && (inspectJobBuilder_ != null)) { + return inspectJobBuilder_.getMessageOrBuilder(); + } else { + if (jobCase_ == 2) { + return (com.google.privacy.dlp.v2.InspectJobConfig) job_; + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + } + /** + *
+     * An inspection job scans a storage repository for InfoTypes.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> + getInspectJobFieldBuilder() { + if (inspectJobBuilder_ == null) { + if (!(jobCase_ == 2)) { + job_ = com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + inspectJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder>( + (com.google.privacy.dlp.v2.InspectJobConfig) job_, + getParentForChildren(), + isClean()); + job_ = null; + } + jobCase_ = 2; + onChanged();; + return inspectJobBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> riskJobBuilder_; + /** + *
+     * A risk analysis job calculates re-identification risk metrics for a
+     * BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + * @return Whether the riskJob field is set. + */ + @java.lang.Override + public boolean hasRiskJob() { + return jobCase_ == 3; + } + /** + *
+     * A risk analysis job calculates re-identification risk metrics for a
+     * BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + * @return The riskJob. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getRiskJob() { + if (riskJobBuilder_ == null) { + if (jobCase_ == 3) { + return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_; + } + return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); + } else { + if (jobCase_ == 3) { + return riskJobBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); + } + } + /** + *
+     * A risk analysis job calculates re-identification risk metrics for a
+     * BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + */ + public Builder setRiskJob(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) { + if (riskJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + job_ = value; + onChanged(); + } else { + riskJobBuilder_.setMessage(value); + } + jobCase_ = 3; + return this; + } + /** + *
+     * A risk analysis job calculates re-identification risk metrics for a
+     * BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + */ + public Builder setRiskJob( + com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder builderForValue) { + if (riskJobBuilder_ == null) { + job_ = builderForValue.build(); + onChanged(); + } else { + riskJobBuilder_.setMessage(builderForValue.build()); + } + jobCase_ = 3; + return this; + } + /** + *
+     * A risk analysis job calculates re-identification risk metrics for a
+     * BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + */ + public Builder mergeRiskJob(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) { + if (riskJobBuilder_ == null) { + if (jobCase_ == 3 && + job_ != com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance()) { + job_ = com.google.privacy.dlp.v2.RiskAnalysisJobConfig.newBuilder((com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_) + .mergeFrom(value).buildPartial(); + } else { + job_ = value; + } + onChanged(); + } else { + if (jobCase_ == 3) { + riskJobBuilder_.mergeFrom(value); + } else { + riskJobBuilder_.setMessage(value); + } + } + jobCase_ = 3; + return this; + } + /** + *
+     * A risk analysis job calculates re-identification risk metrics for a
+     * BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + */ + public Builder clearRiskJob() { + if (riskJobBuilder_ == null) { + if (jobCase_ == 3) { + jobCase_ = 0; + job_ = null; + onChanged(); + } + } else { + if (jobCase_ == 3) { + jobCase_ = 0; + job_ = null; + } + riskJobBuilder_.clear(); + } + return this; + } + /** + *
+     * A risk analysis job calculates re-identification risk metrics for a
+     * BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + */ + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder getRiskJobBuilder() { + return getRiskJobFieldBuilder().getBuilder(); + } + /** + *
+     * A risk analysis job calculates re-identification risk metrics for a
+     * BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getRiskJobOrBuilder() { + if ((jobCase_ == 3) && (riskJobBuilder_ != null)) { + return riskJobBuilder_.getMessageOrBuilder(); + } else { + if (jobCase_ == 3) { + return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_; + } + return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); + } + } + /** + *
+     * A risk analysis job calculates re-identification risk metrics for a
+     * BigQuery table.
+     * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> + getRiskJobFieldBuilder() { + if (riskJobBuilder_ == null) { + if (!(jobCase_ == 3)) { + job_ = com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); + } + riskJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder>( + (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_, + getParentForChildren(), + isClean()); + job_ = null; + } + jobCase_ = 3; + onChanged();; + return riskJobBuilder_; + } + + private java.lang.Object jobId_ = ""; + /** + *
+     * The job id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string job_id = 4; + * @return The jobId. + */ + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The job id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string job_id = 4; + * @return The bytes for jobId. + */ + public com.google.protobuf.ByteString + getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The job id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string job_id = 4; + * @param value The jobId to set. + * @return This builder for chaining. + */ + public Builder setJobId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobId_ = value; + onChanged(); + return this; + } + /** + *
+     * The job id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string job_id = 4; + * @return This builder for chaining. + */ + public Builder clearJobId() { + + jobId_ = getDefaultInstance().getJobId(); + onChanged(); + return this; + } + /** + *
+     * The job id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string job_id = 4; + * @param value The bytes for jobId to set. + * @return This builder for chaining. + */ + public Builder setJobIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobId_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateDlpJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateDlpJobRequest) + private static final com.google.privacy.dlp.v2.CreateDlpJobRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateDlpJobRequest(); + } + + public static com.google.privacy.dlp.v2.CreateDlpJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDlpJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDlpJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateDlpJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java new file mode 100644 index 000000000000..11637913266b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java @@ -0,0 +1,156 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CreateDlpJobRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateDlpJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * An inspection job scans a storage repository for InfoTypes.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + * @return Whether the inspectJob field is set. + */ + boolean hasInspectJob(); + /** + *
+   * An inspection job scans a storage repository for InfoTypes.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + * @return The inspectJob. + */ + com.google.privacy.dlp.v2.InspectJobConfig getInspectJob(); + /** + *
+   * An inspection job scans a storage repository for InfoTypes.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; + */ + com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder(); + + /** + *
+   * A risk analysis job calculates re-identification risk metrics for a
+   * BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + * @return Whether the riskJob field is set. + */ + boolean hasRiskJob(); + /** + *
+   * A risk analysis job calculates re-identification risk metrics for a
+   * BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + * @return The riskJob. + */ + com.google.privacy.dlp.v2.RiskAnalysisJobConfig getRiskJob(); + /** + *
+   * A risk analysis job calculates re-identification risk metrics for a
+   * BigQuery table.
+   * 
+ * + * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; + */ + com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getRiskJobOrBuilder(); + + /** + *
+   * The job id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string job_id = 4; + * @return The jobId. + */ + java.lang.String getJobId(); + /** + *
+   * The job id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string job_id = 4; + * @return The bytes for jobId. + */ + com.google.protobuf.ByteString + getJobIdBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); + + public com.google.privacy.dlp.v2.CreateDlpJobRequest.JobCase getJobCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java new file mode 100644 index 000000000000..42ae2412d437 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java @@ -0,0 +1,1289 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for CreateInspectTemplate.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateInspectTemplateRequest} + */ +public final class CreateInspectTemplateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateInspectTemplateRequest) + CreateInspectTemplateRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateInspectTemplateRequest.newBuilder() to construct. + private CreateInspectTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateInspectTemplateRequest() { + parent_ = ""; + templateId_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateInspectTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateInspectTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.InspectTemplate.Builder subBuilder = null; + if (inspectTemplate_ != null) { + subBuilder = inspectTemplate_.toBuilder(); + } + inspectTemplate_ = input.readMessage(com.google.privacy.dlp.v2.InspectTemplate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectTemplate_); + inspectTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + templateId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateInspectTemplateRequest.class, com.google.privacy.dlp.v2.CreateInspectTemplateRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSPECT_TEMPLATE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.InspectTemplate inspectTemplate_; + /** + *
+   * Required. The InspectTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inspectTemplate field is set. + */ + @java.lang.Override + public boolean hasInspectTemplate() { + return inspectTemplate_ != null; + } + /** + *
+   * Required. The InspectTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inspectTemplate. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate() { + return inspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; + } + /** + *
+   * Required. The InspectTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder() { + return getInspectTemplate(); + } + + public static final int TEMPLATE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object templateId_; + /** + *
+   * The template id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string template_id = 3; + * @return The templateId. + */ + @java.lang.Override + public java.lang.String getTemplateId() { + java.lang.Object ref = templateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + templateId_ = s; + return s; + } + } + /** + *
+   * The template id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string template_id = 3; + * @return The bytes for templateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTemplateIdBytes() { + java.lang.Object ref = templateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + templateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (inspectTemplate_ != null) { + output.writeMessage(2, getInspectTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, templateId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (inspectTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInspectTemplate()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, templateId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CreateInspectTemplateRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CreateInspectTemplateRequest other = (com.google.privacy.dlp.v2.CreateInspectTemplateRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasInspectTemplate() != other.hasInspectTemplate()) return false; + if (hasInspectTemplate()) { + if (!getInspectTemplate() + .equals(other.getInspectTemplate())) return false; + } + if (!getTemplateId() + .equals(other.getTemplateId())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasInspectTemplate()) { + hash = (37 * hash) + INSPECT_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getInspectTemplate().hashCode(); + } + hash = (37 * hash) + TEMPLATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTemplateId().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CreateInspectTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateInspectTemplate.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateInspectTemplateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateInspectTemplateRequest) + com.google.privacy.dlp.v2.CreateInspectTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateInspectTemplateRequest.class, com.google.privacy.dlp.v2.CreateInspectTemplateRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CreateInspectTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (inspectTemplateBuilder_ == null) { + inspectTemplate_ = null; + } else { + inspectTemplate_ = null; + inspectTemplateBuilder_ = null; + } + templateId_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateInspectTemplateRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CreateInspectTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateInspectTemplateRequest build() { + com.google.privacy.dlp.v2.CreateInspectTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateInspectTemplateRequest buildPartial() { + com.google.privacy.dlp.v2.CreateInspectTemplateRequest result = new com.google.privacy.dlp.v2.CreateInspectTemplateRequest(this); + result.parent_ = parent_; + if (inspectTemplateBuilder_ == null) { + result.inspectTemplate_ = inspectTemplate_; + } else { + result.inspectTemplate_ = inspectTemplateBuilder_.build(); + } + result.templateId_ = templateId_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CreateInspectTemplateRequest) { + return mergeFrom((com.google.privacy.dlp.v2.CreateInspectTemplateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CreateInspectTemplateRequest other) { + if (other == com.google.privacy.dlp.v2.CreateInspectTemplateRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasInspectTemplate()) { + mergeInspectTemplate(other.getInspectTemplate()); + } + if (!other.getTemplateId().isEmpty()) { + templateId_ = other.templateId_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CreateInspectTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CreateInspectTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.InspectTemplate inspectTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> inspectTemplateBuilder_; + /** + *
+     * Required. The InspectTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inspectTemplate field is set. + */ + public boolean hasInspectTemplate() { + return inspectTemplateBuilder_ != null || inspectTemplate_ != null; + } + /** + *
+     * Required. The InspectTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inspectTemplate. + */ + public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate() { + if (inspectTemplateBuilder_ == null) { + return inspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; + } else { + return inspectTemplateBuilder_.getMessage(); + } + } + /** + *
+     * Required. The InspectTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { + if (inspectTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectTemplate_ = value; + onChanged(); + } else { + inspectTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The InspectTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInspectTemplate( + com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { + if (inspectTemplateBuilder_ == null) { + inspectTemplate_ = builderForValue.build(); + onChanged(); + } else { + inspectTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The InspectTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { + if (inspectTemplateBuilder_ == null) { + if (inspectTemplate_ != null) { + inspectTemplate_ = + com.google.privacy.dlp.v2.InspectTemplate.newBuilder(inspectTemplate_).mergeFrom(value).buildPartial(); + } else { + inspectTemplate_ = value; + } + onChanged(); + } else { + inspectTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The InspectTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearInspectTemplate() { + if (inspectTemplateBuilder_ == null) { + inspectTemplate_ = null; + onChanged(); + } else { + inspectTemplate_ = null; + inspectTemplateBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The InspectTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InspectTemplate.Builder getInspectTemplateBuilder() { + + onChanged(); + return getInspectTemplateFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The InspectTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder() { + if (inspectTemplateBuilder_ != null) { + return inspectTemplateBuilder_.getMessageOrBuilder(); + } else { + return inspectTemplate_ == null ? + com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; + } + } + /** + *
+     * Required. The InspectTemplate to create.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> + getInspectTemplateFieldBuilder() { + if (inspectTemplateBuilder_ == null) { + inspectTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder>( + getInspectTemplate(), + getParentForChildren(), + isClean()); + inspectTemplate_ = null; + } + return inspectTemplateBuilder_; + } + + private java.lang.Object templateId_ = ""; + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @return The templateId. + */ + public java.lang.String getTemplateId() { + java.lang.Object ref = templateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + templateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @return The bytes for templateId. + */ + public com.google.protobuf.ByteString + getTemplateIdBytes() { + java.lang.Object ref = templateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + templateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @param value The templateId to set. + * @return This builder for chaining. + */ + public Builder setTemplateId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + templateId_ = value; + onChanged(); + return this; + } + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @return This builder for chaining. + */ + public Builder clearTemplateId() { + + templateId_ = getDefaultInstance().getTemplateId(); + onChanged(); + return this; + } + /** + *
+     * The template id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string template_id = 3; + * @param value The bytes for templateId to set. + * @return This builder for chaining. + */ + public Builder setTemplateIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + templateId_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateInspectTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateInspectTemplateRequest) + private static final com.google.privacy.dlp.v2.CreateInspectTemplateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateInspectTemplateRequest(); + } + + public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInspectTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateInspectTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateInspectTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..22c9b64fbb12 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CreateInspectTemplateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateInspectTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The InspectTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the inspectTemplate field is set. + */ + boolean hasInspectTemplate(); + /** + *
+   * Required. The InspectTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The inspectTemplate. + */ + com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate(); + /** + *
+   * Required. The InspectTemplate to create.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder(); + + /** + *
+   * The template id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string template_id = 3; + * @return The templateId. + */ + java.lang.String getTemplateId(); + /** + *
+   * The template id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string template_id = 3; + * @return The bytes for templateId. + */ + com.google.protobuf.ByteString + getTemplateIdBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java new file mode 100644 index 000000000000..100f45d0bb32 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java @@ -0,0 +1,1261 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for CreateJobTrigger.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateJobTriggerRequest} + */ +public final class CreateJobTriggerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateJobTriggerRequest) + CreateJobTriggerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateJobTriggerRequest.newBuilder() to construct. + private CreateJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateJobTriggerRequest() { + parent_ = ""; + triggerId_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateJobTriggerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateJobTriggerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.JobTrigger.Builder subBuilder = null; + if (jobTrigger_ != null) { + subBuilder = jobTrigger_.toBuilder(); + } + jobTrigger_ = input.readMessage(com.google.privacy.dlp.v2.JobTrigger.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobTrigger_); + jobTrigger_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + triggerId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateJobTriggerRequest.class, com.google.privacy.dlp.v2.CreateJobTriggerRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_TRIGGER_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.JobTrigger jobTrigger_; + /** + *
+   * Required. The JobTrigger to create.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the jobTrigger field is set. + */ + @java.lang.Override + public boolean hasJobTrigger() { + return jobTrigger_ != null; + } + /** + *
+   * Required. The JobTrigger to create.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The jobTrigger. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger getJobTrigger() { + return jobTrigger_ == null ? com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; + } + /** + *
+   * Required. The JobTrigger to create.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder() { + return getJobTrigger(); + } + + public static final int TRIGGER_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object triggerId_; + /** + *
+   * The trigger id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string trigger_id = 3; + * @return The triggerId. + */ + @java.lang.Override + public java.lang.String getTriggerId() { + java.lang.Object ref = triggerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerId_ = s; + return s; + } + } + /** + *
+   * The trigger id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string trigger_id = 3; + * @return The bytes for triggerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTriggerIdBytes() { + java.lang.Object ref = triggerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + triggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (jobTrigger_ != null) { + output.writeMessage(2, getJobTrigger()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, triggerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (jobTrigger_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getJobTrigger()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, triggerId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CreateJobTriggerRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CreateJobTriggerRequest other = (com.google.privacy.dlp.v2.CreateJobTriggerRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasJobTrigger() != other.hasJobTrigger()) return false; + if (hasJobTrigger()) { + if (!getJobTrigger() + .equals(other.getJobTrigger())) return false; + } + if (!getTriggerId() + .equals(other.getTriggerId())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasJobTrigger()) { + hash = (37 * hash) + JOB_TRIGGER_FIELD_NUMBER; + hash = (53 * hash) + getJobTrigger().hashCode(); + } + hash = (37 * hash) + TRIGGER_ID_FIELD_NUMBER; + hash = (53 * hash) + getTriggerId().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CreateJobTriggerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateJobTrigger.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateJobTriggerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateJobTriggerRequest) + com.google.privacy.dlp.v2.CreateJobTriggerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateJobTriggerRequest.class, com.google.privacy.dlp.v2.CreateJobTriggerRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CreateJobTriggerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (jobTriggerBuilder_ == null) { + jobTrigger_ = null; + } else { + jobTrigger_ = null; + jobTriggerBuilder_ = null; + } + triggerId_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateJobTriggerRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CreateJobTriggerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateJobTriggerRequest build() { + com.google.privacy.dlp.v2.CreateJobTriggerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateJobTriggerRequest buildPartial() { + com.google.privacy.dlp.v2.CreateJobTriggerRequest result = new com.google.privacy.dlp.v2.CreateJobTriggerRequest(this); + result.parent_ = parent_; + if (jobTriggerBuilder_ == null) { + result.jobTrigger_ = jobTrigger_; + } else { + result.jobTrigger_ = jobTriggerBuilder_.build(); + } + result.triggerId_ = triggerId_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CreateJobTriggerRequest) { + return mergeFrom((com.google.privacy.dlp.v2.CreateJobTriggerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CreateJobTriggerRequest other) { + if (other == com.google.privacy.dlp.v2.CreateJobTriggerRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasJobTrigger()) { + mergeJobTrigger(other.getJobTrigger()); + } + if (!other.getTriggerId().isEmpty()) { + triggerId_ = other.triggerId_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CreateJobTriggerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CreateJobTriggerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.JobTrigger jobTrigger_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> jobTriggerBuilder_; + /** + *
+     * Required. The JobTrigger to create.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the jobTrigger field is set. + */ + public boolean hasJobTrigger() { + return jobTriggerBuilder_ != null || jobTrigger_ != null; + } + /** + *
+     * Required. The JobTrigger to create.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The jobTrigger. + */ + public com.google.privacy.dlp.v2.JobTrigger getJobTrigger() { + if (jobTriggerBuilder_ == null) { + return jobTrigger_ == null ? com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; + } else { + return jobTriggerBuilder_.getMessage(); + } + } + /** + *
+     * Required. The JobTrigger to create.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setJobTrigger(com.google.privacy.dlp.v2.JobTrigger value) { + if (jobTriggerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobTrigger_ = value; + onChanged(); + } else { + jobTriggerBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The JobTrigger to create.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setJobTrigger( + com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { + if (jobTriggerBuilder_ == null) { + jobTrigger_ = builderForValue.build(); + onChanged(); + } else { + jobTriggerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The JobTrigger to create.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeJobTrigger(com.google.privacy.dlp.v2.JobTrigger value) { + if (jobTriggerBuilder_ == null) { + if (jobTrigger_ != null) { + jobTrigger_ = + com.google.privacy.dlp.v2.JobTrigger.newBuilder(jobTrigger_).mergeFrom(value).buildPartial(); + } else { + jobTrigger_ = value; + } + onChanged(); + } else { + jobTriggerBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The JobTrigger to create.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearJobTrigger() { + if (jobTriggerBuilder_ == null) { + jobTrigger_ = null; + onChanged(); + } else { + jobTrigger_ = null; + jobTriggerBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The JobTrigger to create.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.JobTrigger.Builder getJobTriggerBuilder() { + + onChanged(); + return getJobTriggerFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The JobTrigger to create.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder() { + if (jobTriggerBuilder_ != null) { + return jobTriggerBuilder_.getMessageOrBuilder(); + } else { + return jobTrigger_ == null ? + com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; + } + } + /** + *
+     * Required. The JobTrigger to create.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> + getJobTriggerFieldBuilder() { + if (jobTriggerBuilder_ == null) { + jobTriggerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder>( + getJobTrigger(), + getParentForChildren(), + isClean()); + jobTrigger_ = null; + } + return jobTriggerBuilder_; + } + + private java.lang.Object triggerId_ = ""; + /** + *
+     * The trigger id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string trigger_id = 3; + * @return The triggerId. + */ + public java.lang.String getTriggerId() { + java.lang.Object ref = triggerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The trigger id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string trigger_id = 3; + * @return The bytes for triggerId. + */ + public com.google.protobuf.ByteString + getTriggerIdBytes() { + java.lang.Object ref = triggerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + triggerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The trigger id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string trigger_id = 3; + * @param value The triggerId to set. + * @return This builder for chaining. + */ + public Builder setTriggerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + triggerId_ = value; + onChanged(); + return this; + } + /** + *
+     * The trigger id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string trigger_id = 3; + * @return This builder for chaining. + */ + public Builder clearTriggerId() { + + triggerId_ = getDefaultInstance().getTriggerId(); + onChanged(); + return this; + } + /** + *
+     * The trigger id can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string trigger_id = 3; + * @param value The bytes for triggerId to set. + * @return This builder for chaining. + */ + public Builder setTriggerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + triggerId_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateJobTriggerRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateJobTriggerRequest) + private static final com.google.privacy.dlp.v2.CreateJobTriggerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateJobTriggerRequest(); + } + + public static com.google.privacy.dlp.v2.CreateJobTriggerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateJobTriggerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateJobTriggerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateJobTriggerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java new file mode 100644 index 000000000000..facd33bed230 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java @@ -0,0 +1,124 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CreateJobTriggerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateJobTriggerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The JobTrigger to create.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the jobTrigger field is set. + */ + boolean hasJobTrigger(); + /** + *
+   * Required. The JobTrigger to create.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The jobTrigger. + */ + com.google.privacy.dlp.v2.JobTrigger getJobTrigger(); + /** + *
+   * Required. The JobTrigger to create.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder(); + + /** + *
+   * The trigger id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string trigger_id = 3; + * @return The triggerId. + */ + java.lang.String getTriggerId(); + /** + *
+   * The trigger id can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string trigger_id = 3; + * @return The bytes for triggerId. + */ + com.google.protobuf.ByteString + getTriggerIdBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java new file mode 100644 index 000000000000..81e415e15b18 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java @@ -0,0 +1,1289 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for CreateStoredInfoType.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateStoredInfoTypeRequest} + */ +public final class CreateStoredInfoTypeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) + CreateStoredInfoTypeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateStoredInfoTypeRequest.newBuilder() to construct. + private CreateStoredInfoTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateStoredInfoTypeRequest() { + parent_ = ""; + storedInfoTypeId_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateStoredInfoTypeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateStoredInfoTypeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder subBuilder = null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + storedInfoTypeId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; + /** + *
+   * Required. Configuration of the storedInfoType to create.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + *
+   * Required. Configuration of the storedInfoType to create.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The config. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { + return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; + } + /** + *
+   * Required. Configuration of the storedInfoType to create.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { + return getConfig(); + } + + public static final int STORED_INFO_TYPE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object storedInfoTypeId_; + /** + *
+   * The storedInfoType ID can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string stored_info_type_id = 3; + * @return The storedInfoTypeId. + */ + @java.lang.Override + public java.lang.String getStoredInfoTypeId() { + java.lang.Object ref = storedInfoTypeId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storedInfoTypeId_ = s; + return s; + } + } + /** + *
+   * The storedInfoType ID can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string stored_info_type_id = 3; + * @return The bytes for storedInfoTypeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStoredInfoTypeIdBytes() { + java.lang.Object ref = storedInfoTypeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + storedInfoTypeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (config_ != null) { + output.writeMessage(2, getConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storedInfoTypeId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, storedInfoTypeId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (config_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storedInfoTypeId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, storedInfoTypeId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest other = (com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig() + .equals(other.getConfig())) return false; + } + if (!getStoredInfoTypeId() + .equals(other.getStoredInfoTypeId())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + hash = (37 * hash) + STORED_INFO_TYPE_ID_FIELD_NUMBER; + hash = (53 * hash) + getStoredInfoTypeId().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for CreateStoredInfoType.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CreateStoredInfoTypeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + storedInfoTypeId_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest build() { + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest buildPartial() { + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest result = new com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(this); + result.parent_ = parent_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + result.storedInfoTypeId_ = storedInfoTypeId_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) { + return mergeFrom((com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest other) { + if (other == com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (!other.getStoredInfoTypeId().isEmpty()) { + storedInfoTypeId_ = other.storedInfoTypeId_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> configBuilder_; + /** + *
+     * Required. Configuration of the storedInfoType to create.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + *
+     * Required. Configuration of the storedInfoType to create.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The config. + */ + public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + *
+     * Required. Configuration of the storedInfoType to create.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Configuration of the storedInfoType to create.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setConfig( + com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Configuration of the storedInfoType to create.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.privacy.dlp.v2.StoredInfoTypeConfig.newBuilder(config_).mergeFrom(value).buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Configuration of the storedInfoType to create.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Configuration of the storedInfoType to create.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Configuration of the storedInfoType to create.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null ? + com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; + } + } + /** + *
+     * Required. Configuration of the storedInfoType to create.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder>( + getConfig(), + getParentForChildren(), + isClean()); + config_ = null; + } + return configBuilder_; + } + + private java.lang.Object storedInfoTypeId_ = ""; + /** + *
+     * The storedInfoType ID can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string stored_info_type_id = 3; + * @return The storedInfoTypeId. + */ + public java.lang.String getStoredInfoTypeId() { + java.lang.Object ref = storedInfoTypeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storedInfoTypeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The storedInfoType ID can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string stored_info_type_id = 3; + * @return The bytes for storedInfoTypeId. + */ + public com.google.protobuf.ByteString + getStoredInfoTypeIdBytes() { + java.lang.Object ref = storedInfoTypeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + storedInfoTypeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The storedInfoType ID can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string stored_info_type_id = 3; + * @param value The storedInfoTypeId to set. + * @return This builder for chaining. + */ + public Builder setStoredInfoTypeId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + storedInfoTypeId_ = value; + onChanged(); + return this; + } + /** + *
+     * The storedInfoType ID can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string stored_info_type_id = 3; + * @return This builder for chaining. + */ + public Builder clearStoredInfoTypeId() { + + storedInfoTypeId_ = getDefaultInstance().getStoredInfoTypeId(); + onChanged(); + return this; + } + /** + *
+     * The storedInfoType ID can contain uppercase and lowercase letters,
+     * numbers, and hyphens; that is, it must match the regular
+     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+     * characters. Can be empty to allow the system to generate one.
+     * 
+ * + * string stored_info_type_id = 3; + * @param value The bytes for storedInfoTypeId to set. + * @return This builder for chaining. + */ + public Builder setStoredInfoTypeIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + storedInfoTypeId_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 4; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) + private static final com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(); + } + + public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateStoredInfoTypeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateStoredInfoTypeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java new file mode 100644 index 000000000000..44c40f523f3b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CreateStoredInfoTypeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. Configuration of the storedInfoType to create.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + *
+   * Required. Configuration of the storedInfoType to create.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The config. + */ + com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig(); + /** + *
+   * Required. Configuration of the storedInfoType to create.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder(); + + /** + *
+   * The storedInfoType ID can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string stored_info_type_id = 3; + * @return The storedInfoTypeId. + */ + java.lang.String getStoredInfoTypeId(); + /** + *
+   * The storedInfoType ID can contain uppercase and lowercase letters,
+   * numbers, and hyphens; that is, it must match the regular
+   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
+   * characters. Can be empty to allow the system to generate one.
+   * 
+ * + * string stored_info_type_id = 3; + * @return The bytes for storedInfoTypeId. + */ + com.google.protobuf.ByteString + getStoredInfoTypeIdBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 4; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java new file mode 100644 index 000000000000..f4f672f6b49c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java @@ -0,0 +1,1621 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Pseudonymization method that generates deterministic encryption for the given
+ * input. Outputs a base64 encoded representation of the encrypted output.
+ * Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CryptoDeterministicConfig} + */ +public final class CryptoDeterministicConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CryptoDeterministicConfig) + CryptoDeterministicConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use CryptoDeterministicConfig.newBuilder() to construct. + private CryptoDeterministicConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CryptoDeterministicConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CryptoDeterministicConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CryptoDeterministicConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CryptoKey.Builder subBuilder = null; + if (cryptoKey_ != null) { + subBuilder = cryptoKey_.toBuilder(); + } + cryptoKey_ = input.readMessage(com.google.privacy.dlp.v2.CryptoKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cryptoKey_); + cryptoKey_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (surrogateInfoType_ != null) { + subBuilder = surrogateInfoType_.toBuilder(); + } + surrogateInfoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(surrogateInfoType_); + surrogateInfoType_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CryptoDeterministicConfig.class, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder.class); + } + + public static final int CRYPTO_KEY_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; + /** + *
+   * The key used by the encryption function. For deterministic encryption
+   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+   * use.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return Whether the cryptoKey field is set. + */ + @java.lang.Override + public boolean hasCryptoKey() { + return cryptoKey_ != null; + } + /** + *
+   * The key used by the encryption function. For deterministic encryption
+   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+   * use.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return The cryptoKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { + return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; + } + /** + *
+   * The key used by the encryption function. For deterministic encryption
+   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+   * use.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { + return getCryptoKey(); + } + + public static final int SURROGATE_INFO_TYPE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.InfoType surrogateInfoType_; + /** + *
+   * The custom info type to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom info type followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: {info type name}({surrogate character count}):{surrogate}
+   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom info type 'Surrogate'. This facilitates reversal of the
+   * surrogate when it occurs in free text.
+   * Note: For record transformations where the entire cell in a table is being
+   * transformed, surrogates are not mandatory. Surrogates are used to denote
+   * the location of the token and are necessary for re-identification in free
+   * form text.
+   * In order for inspection to work properly, the name of this info type must
+   * not occur naturally anywhere in your data; otherwise, inspection may either
+   * - reverse a surrogate that does not correspond to an actual identifier
+   * - be unable to parse the surrogate and result in an error
+   * Therefore, choose your custom info type name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + * @return Whether the surrogateInfoType field is set. + */ + @java.lang.Override + public boolean hasSurrogateInfoType() { + return surrogateInfoType_ != null; + } + /** + *
+   * The custom info type to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom info type followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: {info type name}({surrogate character count}):{surrogate}
+   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom info type 'Surrogate'. This facilitates reversal of the
+   * surrogate when it occurs in free text.
+   * Note: For record transformations where the entire cell in a table is being
+   * transformed, surrogates are not mandatory. Surrogates are used to denote
+   * the location of the token and are necessary for re-identification in free
+   * form text.
+   * In order for inspection to work properly, the name of this info type must
+   * not occur naturally anywhere in your data; otherwise, inspection may either
+   * - reverse a surrogate that does not correspond to an actual identifier
+   * - be unable to parse the surrogate and result in an error
+   * Therefore, choose your custom info type name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + * @return The surrogateInfoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getSurrogateInfoType() { + return surrogateInfoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; + } + /** + *
+   * The custom info type to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom info type followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: {info type name}({surrogate character count}):{surrogate}
+   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom info type 'Surrogate'. This facilitates reversal of the
+   * surrogate when it occurs in free text.
+   * Note: For record transformations where the entire cell in a table is being
+   * transformed, surrogates are not mandatory. Surrogates are used to denote
+   * the location of the token and are necessary for re-identification in free
+   * form text.
+   * In order for inspection to work properly, the name of this info type must
+   * not occur naturally anywhere in your data; otherwise, inspection may either
+   * - reverse a surrogate that does not correspond to an actual identifier
+   * - be unable to parse the surrogate and result in an error
+   * Therefore, choose your custom info type name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder() { + return getSurrogateInfoType(); + } + + public static final int CONTEXT_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.FieldId context_; + /** + *
+   * A context may be used for higher security and maintaining
+   * referential integrity such that the same identifier in two different
+   * contexts will be given a distinct surrogate. The context is appended to
+   * plaintext value being encrypted. On decryption the provided context is
+   * validated against the value used during encryption. If a context was
+   * provided during encryption, same context must be provided during decryption
+   * as well.
+   * If the context is not set, plaintext would be used as is for encryption.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 2. the field is not present when transforming a given value,
+   * plaintext would be used as is for encryption.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * A context may be used for higher security and maintaining
+   * referential integrity such that the same identifier in two different
+   * contexts will be given a distinct surrogate. The context is appended to
+   * plaintext value being encrypted. On decryption the provided context is
+   * validated against the value used during encryption. If a context was
+   * provided during encryption, same context must be provided during decryption
+   * as well.
+   * If the context is not set, plaintext would be used as is for encryption.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 2. the field is not present when transforming a given value,
+   * plaintext would be used as is for encryption.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return The context. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getContext() { + return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; + } + /** + *
+   * A context may be used for higher security and maintaining
+   * referential integrity such that the same identifier in two different
+   * contexts will be given a distinct surrogate. The context is appended to
+   * plaintext value being encrypted. On decryption the provided context is
+   * validated against the value used during encryption. If a context was
+   * provided during encryption, same context must be provided during decryption
+   * as well.
+   * If the context is not set, plaintext would be used as is for encryption.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 2. the field is not present when transforming a given value,
+   * plaintext would be used as is for encryption.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { + return getContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (cryptoKey_ != null) { + output.writeMessage(1, getCryptoKey()); + } + if (surrogateInfoType_ != null) { + output.writeMessage(2, getSurrogateInfoType()); + } + if (context_ != null) { + output.writeMessage(3, getContext()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cryptoKey_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCryptoKey()); + } + if (surrogateInfoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSurrogateInfoType()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getContext()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CryptoDeterministicConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CryptoDeterministicConfig other = (com.google.privacy.dlp.v2.CryptoDeterministicConfig) obj; + + if (hasCryptoKey() != other.hasCryptoKey()) return false; + if (hasCryptoKey()) { + if (!getCryptoKey() + .equals(other.getCryptoKey())) return false; + } + if (hasSurrogateInfoType() != other.hasSurrogateInfoType()) return false; + if (hasSurrogateInfoType()) { + if (!getSurrogateInfoType() + .equals(other.getSurrogateInfoType())) return false; + } + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCryptoKey()) { + hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; + hash = (53 * hash) + getCryptoKey().hashCode(); + } + if (hasSurrogateInfoType()) { + hash = (37 * hash) + SURROGATE_INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSurrogateInfoType().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CryptoDeterministicConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Pseudonymization method that generates deterministic encryption for the given
+   * input. Outputs a base64 encoded representation of the encrypted output.
+   * Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CryptoDeterministicConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CryptoDeterministicConfig) + com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CryptoDeterministicConfig.class, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CryptoDeterministicConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (cryptoKeyBuilder_ == null) { + cryptoKey_ = null; + } else { + cryptoKey_ = null; + cryptoKeyBuilder_ = null; + } + if (surrogateInfoTypeBuilder_ == null) { + surrogateInfoType_ = null; + } else { + surrogateInfoType_ = null; + surrogateInfoTypeBuilder_ = null; + } + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoDeterministicConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoDeterministicConfig build() { + com.google.privacy.dlp.v2.CryptoDeterministicConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoDeterministicConfig buildPartial() { + com.google.privacy.dlp.v2.CryptoDeterministicConfig result = new com.google.privacy.dlp.v2.CryptoDeterministicConfig(this); + if (cryptoKeyBuilder_ == null) { + result.cryptoKey_ = cryptoKey_; + } else { + result.cryptoKey_ = cryptoKeyBuilder_.build(); + } + if (surrogateInfoTypeBuilder_ == null) { + result.surrogateInfoType_ = surrogateInfoType_; + } else { + result.surrogateInfoType_ = surrogateInfoTypeBuilder_.build(); + } + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CryptoDeterministicConfig) { + return mergeFrom((com.google.privacy.dlp.v2.CryptoDeterministicConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CryptoDeterministicConfig other) { + if (other == com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance()) return this; + if (other.hasCryptoKey()) { + mergeCryptoKey(other.getCryptoKey()); + } + if (other.hasSurrogateInfoType()) { + mergeSurrogateInfoType(other.getSurrogateInfoType()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CryptoDeterministicConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CryptoDeterministicConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> cryptoKeyBuilder_; + /** + *
+     * The key used by the encryption function. For deterministic encryption
+     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+     * use.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return Whether the cryptoKey field is set. + */ + public boolean hasCryptoKey() { + return cryptoKeyBuilder_ != null || cryptoKey_ != null; + } + /** + *
+     * The key used by the encryption function. For deterministic encryption
+     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+     * use.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return The cryptoKey. + */ + public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { + if (cryptoKeyBuilder_ == null) { + return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; + } else { + return cryptoKeyBuilder_.getMessage(); + } + } + /** + *
+     * The key used by the encryption function. For deterministic encryption
+     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+     * use.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public Builder setCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { + if (cryptoKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cryptoKey_ = value; + onChanged(); + } else { + cryptoKeyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The key used by the encryption function. For deterministic encryption
+     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+     * use.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public Builder setCryptoKey( + com.google.privacy.dlp.v2.CryptoKey.Builder builderForValue) { + if (cryptoKeyBuilder_ == null) { + cryptoKey_ = builderForValue.build(); + onChanged(); + } else { + cryptoKeyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The key used by the encryption function. For deterministic encryption
+     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+     * use.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public Builder mergeCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { + if (cryptoKeyBuilder_ == null) { + if (cryptoKey_ != null) { + cryptoKey_ = + com.google.privacy.dlp.v2.CryptoKey.newBuilder(cryptoKey_).mergeFrom(value).buildPartial(); + } else { + cryptoKey_ = value; + } + onChanged(); + } else { + cryptoKeyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The key used by the encryption function. For deterministic encryption
+     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+     * use.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public Builder clearCryptoKey() { + if (cryptoKeyBuilder_ == null) { + cryptoKey_ = null; + onChanged(); + } else { + cryptoKey_ = null; + cryptoKeyBuilder_ = null; + } + + return this; + } + /** + *
+     * The key used by the encryption function. For deterministic encryption
+     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+     * use.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public com.google.privacy.dlp.v2.CryptoKey.Builder getCryptoKeyBuilder() { + + onChanged(); + return getCryptoKeyFieldBuilder().getBuilder(); + } + /** + *
+     * The key used by the encryption function. For deterministic encryption
+     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+     * use.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { + if (cryptoKeyBuilder_ != null) { + return cryptoKeyBuilder_.getMessageOrBuilder(); + } else { + return cryptoKey_ == null ? + com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; + } + } + /** + *
+     * The key used by the encryption function. For deterministic encryption
+     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+     * use.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> + getCryptoKeyFieldBuilder() { + if (cryptoKeyBuilder_ == null) { + cryptoKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder>( + getCryptoKey(), + getParentForChildren(), + isClean()); + cryptoKey_ = null; + } + return cryptoKeyBuilder_; + } + + private com.google.privacy.dlp.v2.InfoType surrogateInfoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> surrogateInfoTypeBuilder_; + /** + *
+     * The custom info type to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom info type followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: {info type name}({surrogate character count}):{surrogate}
+     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom info type 'Surrogate'. This facilitates reversal of the
+     * surrogate when it occurs in free text.
+     * Note: For record transformations where the entire cell in a table is being
+     * transformed, surrogates are not mandatory. Surrogates are used to denote
+     * the location of the token and are necessary for re-identification in free
+     * form text.
+     * In order for inspection to work properly, the name of this info type must
+     * not occur naturally anywhere in your data; otherwise, inspection may either
+     * - reverse a surrogate that does not correspond to an actual identifier
+     * - be unable to parse the surrogate and result in an error
+     * Therefore, choose your custom info type name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + * @return Whether the surrogateInfoType field is set. + */ + public boolean hasSurrogateInfoType() { + return surrogateInfoTypeBuilder_ != null || surrogateInfoType_ != null; + } + /** + *
+     * The custom info type to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom info type followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: {info type name}({surrogate character count}):{surrogate}
+     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom info type 'Surrogate'. This facilitates reversal of the
+     * surrogate when it occurs in free text.
+     * Note: For record transformations where the entire cell in a table is being
+     * transformed, surrogates are not mandatory. Surrogates are used to denote
+     * the location of the token and are necessary for re-identification in free
+     * form text.
+     * In order for inspection to work properly, the name of this info type must
+     * not occur naturally anywhere in your data; otherwise, inspection may either
+     * - reverse a surrogate that does not correspond to an actual identifier
+     * - be unable to parse the surrogate and result in an error
+     * Therefore, choose your custom info type name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + * @return The surrogateInfoType. + */ + public com.google.privacy.dlp.v2.InfoType getSurrogateInfoType() { + if (surrogateInfoTypeBuilder_ == null) { + return surrogateInfoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; + } else { + return surrogateInfoTypeBuilder_.getMessage(); + } + } + /** + *
+     * The custom info type to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom info type followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: {info type name}({surrogate character count}):{surrogate}
+     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom info type 'Surrogate'. This facilitates reversal of the
+     * surrogate when it occurs in free text.
+     * Note: For record transformations where the entire cell in a table is being
+     * transformed, surrogates are not mandatory. Surrogates are used to denote
+     * the location of the token and are necessary for re-identification in free
+     * form text.
+     * In order for inspection to work properly, the name of this info type must
+     * not occur naturally anywhere in your data; otherwise, inspection may either
+     * - reverse a surrogate that does not correspond to an actual identifier
+     * - be unable to parse the surrogate and result in an error
+     * Therefore, choose your custom info type name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + */ + public Builder setSurrogateInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (surrogateInfoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + surrogateInfoType_ = value; + onChanged(); + } else { + surrogateInfoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The custom info type to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom info type followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: {info type name}({surrogate character count}):{surrogate}
+     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom info type 'Surrogate'. This facilitates reversal of the
+     * surrogate when it occurs in free text.
+     * Note: For record transformations where the entire cell in a table is being
+     * transformed, surrogates are not mandatory. Surrogates are used to denote
+     * the location of the token and are necessary for re-identification in free
+     * form text.
+     * In order for inspection to work properly, the name of this info type must
+     * not occur naturally anywhere in your data; otherwise, inspection may either
+     * - reverse a surrogate that does not correspond to an actual identifier
+     * - be unable to parse the surrogate and result in an error
+     * Therefore, choose your custom info type name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + */ + public Builder setSurrogateInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (surrogateInfoTypeBuilder_ == null) { + surrogateInfoType_ = builderForValue.build(); + onChanged(); + } else { + surrogateInfoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The custom info type to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom info type followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: {info type name}({surrogate character count}):{surrogate}
+     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom info type 'Surrogate'. This facilitates reversal of the
+     * surrogate when it occurs in free text.
+     * Note: For record transformations where the entire cell in a table is being
+     * transformed, surrogates are not mandatory. Surrogates are used to denote
+     * the location of the token and are necessary for re-identification in free
+     * form text.
+     * In order for inspection to work properly, the name of this info type must
+     * not occur naturally anywhere in your data; otherwise, inspection may either
+     * - reverse a surrogate that does not correspond to an actual identifier
+     * - be unable to parse the surrogate and result in an error
+     * Therefore, choose your custom info type name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + */ + public Builder mergeSurrogateInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (surrogateInfoTypeBuilder_ == null) { + if (surrogateInfoType_ != null) { + surrogateInfoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(surrogateInfoType_).mergeFrom(value).buildPartial(); + } else { + surrogateInfoType_ = value; + } + onChanged(); + } else { + surrogateInfoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The custom info type to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom info type followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: {info type name}({surrogate character count}):{surrogate}
+     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom info type 'Surrogate'. This facilitates reversal of the
+     * surrogate when it occurs in free text.
+     * Note: For record transformations where the entire cell in a table is being
+     * transformed, surrogates are not mandatory. Surrogates are used to denote
+     * the location of the token and are necessary for re-identification in free
+     * form text.
+     * In order for inspection to work properly, the name of this info type must
+     * not occur naturally anywhere in your data; otherwise, inspection may either
+     * - reverse a surrogate that does not correspond to an actual identifier
+     * - be unable to parse the surrogate and result in an error
+     * Therefore, choose your custom info type name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + */ + public Builder clearSurrogateInfoType() { + if (surrogateInfoTypeBuilder_ == null) { + surrogateInfoType_ = null; + onChanged(); + } else { + surrogateInfoType_ = null; + surrogateInfoTypeBuilder_ = null; + } + + return this; + } + /** + *
+     * The custom info type to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom info type followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: {info type name}({surrogate character count}):{surrogate}
+     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom info type 'Surrogate'. This facilitates reversal of the
+     * surrogate when it occurs in free text.
+     * Note: For record transformations where the entire cell in a table is being
+     * transformed, surrogates are not mandatory. Surrogates are used to denote
+     * the location of the token and are necessary for re-identification in free
+     * form text.
+     * In order for inspection to work properly, the name of this info type must
+     * not occur naturally anywhere in your data; otherwise, inspection may either
+     * - reverse a surrogate that does not correspond to an actual identifier
+     * - be unable to parse the surrogate and result in an error
+     * Therefore, choose your custom info type name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getSurrogateInfoTypeBuilder() { + + onChanged(); + return getSurrogateInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * The custom info type to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom info type followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: {info type name}({surrogate character count}):{surrogate}
+     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom info type 'Surrogate'. This facilitates reversal of the
+     * surrogate when it occurs in free text.
+     * Note: For record transformations where the entire cell in a table is being
+     * transformed, surrogates are not mandatory. Surrogates are used to denote
+     * the location of the token and are necessary for re-identification in free
+     * form text.
+     * In order for inspection to work properly, the name of this info type must
+     * not occur naturally anywhere in your data; otherwise, inspection may either
+     * - reverse a surrogate that does not correspond to an actual identifier
+     * - be unable to parse the surrogate and result in an error
+     * Therefore, choose your custom info type name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder() { + if (surrogateInfoTypeBuilder_ != null) { + return surrogateInfoTypeBuilder_.getMessageOrBuilder(); + } else { + return surrogateInfoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; + } + } + /** + *
+     * The custom info type to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom info type followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: {info type name}({surrogate character count}):{surrogate}
+     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom info type 'Surrogate'. This facilitates reversal of the
+     * surrogate when it occurs in free text.
+     * Note: For record transformations where the entire cell in a table is being
+     * transformed, surrogates are not mandatory. Surrogates are used to denote
+     * the location of the token and are necessary for re-identification in free
+     * form text.
+     * In order for inspection to work properly, the name of this info type must
+     * not occur naturally anywhere in your data; otherwise, inspection may either
+     * - reverse a surrogate that does not correspond to an actual identifier
+     * - be unable to parse the surrogate and result in an error
+     * Therefore, choose your custom info type name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getSurrogateInfoTypeFieldBuilder() { + if (surrogateInfoTypeBuilder_ == null) { + surrogateInfoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getSurrogateInfoType(), + getParentForChildren(), + isClean()); + surrogateInfoType_ = null; + } + return surrogateInfoTypeBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> contextBuilder_; + /** + *
+     * A context may be used for higher security and maintaining
+     * referential integrity such that the same identifier in two different
+     * contexts will be given a distinct surrogate. The context is appended to
+     * plaintext value being encrypted. On decryption the provided context is
+     * validated against the value used during encryption. If a context was
+     * provided during encryption, same context must be provided during decryption
+     * as well.
+     * If the context is not set, plaintext would be used as is for encryption.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 2. the field is not present when transforming a given value,
+     * plaintext would be used as is for encryption.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + *
+     * A context may be used for higher security and maintaining
+     * referential integrity such that the same identifier in two different
+     * contexts will be given a distinct surrogate. The context is appended to
+     * plaintext value being encrypted. On decryption the provided context is
+     * validated against the value used during encryption. If a context was
+     * provided during encryption, same context must be provided during decryption
+     * as well.
+     * If the context is not set, plaintext would be used as is for encryption.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 2. the field is not present when transforming a given value,
+     * plaintext would be used as is for encryption.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return The context. + */ + public com.google.privacy.dlp.v2.FieldId getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + *
+     * A context may be used for higher security and maintaining
+     * referential integrity such that the same identifier in two different
+     * contexts will be given a distinct surrogate. The context is appended to
+     * plaintext value being encrypted. On decryption the provided context is
+     * validated against the value used during encryption. If a context was
+     * provided during encryption, same context must be provided during decryption
+     * as well.
+     * If the context is not set, plaintext would be used as is for encryption.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 2. the field is not present when transforming a given value,
+     * plaintext would be used as is for encryption.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public Builder setContext(com.google.privacy.dlp.v2.FieldId value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A context may be used for higher security and maintaining
+     * referential integrity such that the same identifier in two different
+     * contexts will be given a distinct surrogate. The context is appended to
+     * plaintext value being encrypted. On decryption the provided context is
+     * validated against the value used during encryption. If a context was
+     * provided during encryption, same context must be provided during decryption
+     * as well.
+     * If the context is not set, plaintext would be used as is for encryption.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 2. the field is not present when transforming a given value,
+     * plaintext would be used as is for encryption.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public Builder setContext( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A context may be used for higher security and maintaining
+     * referential integrity such that the same identifier in two different
+     * contexts will be given a distinct surrogate. The context is appended to
+     * plaintext value being encrypted. On decryption the provided context is
+     * validated against the value used during encryption. If a context was
+     * provided during encryption, same context must be provided during decryption
+     * as well.
+     * If the context is not set, plaintext would be used as is for encryption.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 2. the field is not present when transforming a given value,
+     * plaintext would be used as is for encryption.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public Builder mergeContext(com.google.privacy.dlp.v2.FieldId value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A context may be used for higher security and maintaining
+     * referential integrity such that the same identifier in two different
+     * contexts will be given a distinct surrogate. The context is appended to
+     * plaintext value being encrypted. On decryption the provided context is
+     * validated against the value used during encryption. If a context was
+     * provided during encryption, same context must be provided during decryption
+     * as well.
+     * If the context is not set, plaintext would be used as is for encryption.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 2. the field is not present when transforming a given value,
+     * plaintext would be used as is for encryption.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + *
+     * A context may be used for higher security and maintaining
+     * referential integrity such that the same identifier in two different
+     * contexts will be given a distinct surrogate. The context is appended to
+     * plaintext value being encrypted. On decryption the provided context is
+     * validated against the value used during encryption. If a context was
+     * provided during encryption, same context must be provided during decryption
+     * as well.
+     * If the context is not set, plaintext would be used as is for encryption.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 2. the field is not present when transforming a given value,
+     * plaintext would be used as is for encryption.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * A context may be used for higher security and maintaining
+     * referential integrity such that the same identifier in two different
+     * contexts will be given a distinct surrogate. The context is appended to
+     * plaintext value being encrypted. On decryption the provided context is
+     * validated against the value used during encryption. If a context was
+     * provided during encryption, same context must be provided during decryption
+     * as well.
+     * If the context is not set, plaintext would be used as is for encryption.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 2. the field is not present when transforming a given value,
+     * plaintext would be used as is for encryption.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; + } + } + /** + *
+     * A context may be used for higher security and maintaining
+     * referential integrity such that the same identifier in two different
+     * contexts will be given a distinct surrogate. The context is appended to
+     * plaintext value being encrypted. On decryption the provided context is
+     * validated against the value used during encryption. If a context was
+     * provided during encryption, same context must be provided during decryption
+     * as well.
+     * If the context is not set, plaintext would be used as is for encryption.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 2. the field is not present when transforming a given value,
+     * plaintext would be used as is for encryption.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CryptoDeterministicConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CryptoDeterministicConfig) + private static final com.google.privacy.dlp.v2.CryptoDeterministicConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CryptoDeterministicConfig(); + } + + public static com.google.privacy.dlp.v2.CryptoDeterministicConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CryptoDeterministicConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CryptoDeterministicConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoDeterministicConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java new file mode 100644 index 000000000000..073fd88c4c63 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java @@ -0,0 +1,210 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CryptoDeterministicConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CryptoDeterministicConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The key used by the encryption function. For deterministic encryption
+   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+   * use.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return Whether the cryptoKey field is set. + */ + boolean hasCryptoKey(); + /** + *
+   * The key used by the encryption function. For deterministic encryption
+   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+   * use.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return The cryptoKey. + */ + com.google.privacy.dlp.v2.CryptoKey getCryptoKey(); + /** + *
+   * The key used by the encryption function. For deterministic encryption
+   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
+   * use.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder(); + + /** + *
+   * The custom info type to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom info type followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: {info type name}({surrogate character count}):{surrogate}
+   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom info type 'Surrogate'. This facilitates reversal of the
+   * surrogate when it occurs in free text.
+   * Note: For record transformations where the entire cell in a table is being
+   * transformed, surrogates are not mandatory. Surrogates are used to denote
+   * the location of the token and are necessary for re-identification in free
+   * form text.
+   * In order for inspection to work properly, the name of this info type must
+   * not occur naturally anywhere in your data; otherwise, inspection may either
+   * - reverse a surrogate that does not correspond to an actual identifier
+   * - be unable to parse the surrogate and result in an error
+   * Therefore, choose your custom info type name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + * @return Whether the surrogateInfoType field is set. + */ + boolean hasSurrogateInfoType(); + /** + *
+   * The custom info type to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom info type followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: {info type name}({surrogate character count}):{surrogate}
+   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom info type 'Surrogate'. This facilitates reversal of the
+   * surrogate when it occurs in free text.
+   * Note: For record transformations where the entire cell in a table is being
+   * transformed, surrogates are not mandatory. Surrogates are used to denote
+   * the location of the token and are necessary for re-identification in free
+   * form text.
+   * In order for inspection to work properly, the name of this info type must
+   * not occur naturally anywhere in your data; otherwise, inspection may either
+   * - reverse a surrogate that does not correspond to an actual identifier
+   * - be unable to parse the surrogate and result in an error
+   * Therefore, choose your custom info type name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + * @return The surrogateInfoType. + */ + com.google.privacy.dlp.v2.InfoType getSurrogateInfoType(); + /** + *
+   * The custom info type to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom info type followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: {info type name}({surrogate character count}):{surrogate}
+   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom info type 'Surrogate'. This facilitates reversal of the
+   * surrogate when it occurs in free text.
+   * Note: For record transformations where the entire cell in a table is being
+   * transformed, surrogates are not mandatory. Surrogates are used to denote
+   * the location of the token and are necessary for re-identification in free
+   * form text.
+   * In order for inspection to work properly, the name of this info type must
+   * not occur naturally anywhere in your data; otherwise, inspection may either
+   * - reverse a surrogate that does not correspond to an actual identifier
+   * - be unable to parse the surrogate and result in an error
+   * Therefore, choose your custom info type name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder(); + + /** + *
+   * A context may be used for higher security and maintaining
+   * referential integrity such that the same identifier in two different
+   * contexts will be given a distinct surrogate. The context is appended to
+   * plaintext value being encrypted. On decryption the provided context is
+   * validated against the value used during encryption. If a context was
+   * provided during encryption, same context must be provided during decryption
+   * as well.
+   * If the context is not set, plaintext would be used as is for encryption.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 2. the field is not present when transforming a given value,
+   * plaintext would be used as is for encryption.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * A context may be used for higher security and maintaining
+   * referential integrity such that the same identifier in two different
+   * contexts will be given a distinct surrogate. The context is appended to
+   * plaintext value being encrypted. On decryption the provided context is
+   * validated against the value used during encryption. If a context was
+   * provided during encryption, same context must be provided during decryption
+   * as well.
+   * If the context is not set, plaintext would be used as is for encryption.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 2. the field is not present when transforming a given value,
+   * plaintext would be used as is for encryption.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return The context. + */ + com.google.privacy.dlp.v2.FieldId getContext(); + /** + *
+   * A context may be used for higher security and maintaining
+   * referential integrity such that the same identifier in two different
+   * contexts will be given a distinct surrogate. The context is appended to
+   * plaintext value being encrypted. On decryption the provided context is
+   * validated against the value used during encryption. If a context was
+   * provided during encryption, same context must be provided during decryption
+   * as well.
+   * If the context is not set, plaintext would be used as is for encryption.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 2. the field is not present when transforming a given value,
+   * plaintext would be used as is for encryption.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfig.java new file mode 100644 index 000000000000..cf7526502eb2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfig.java @@ -0,0 +1,677 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Pseudonymization method that generates surrogates via cryptographic hashing.
+ * Uses SHA-256.
+ * The key size must be either 32 or 64 bytes.
+ * Outputs a base64 encoded representation of the hashed output
+ * (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=).
+ * Currently, only string and integer values can be hashed.
+ * See https://cloud.google.com/dlp/docs/pseudonymization to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CryptoHashConfig} + */ +public final class CryptoHashConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CryptoHashConfig) + CryptoHashConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use CryptoHashConfig.newBuilder() to construct. + private CryptoHashConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CryptoHashConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CryptoHashConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CryptoHashConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CryptoKey.Builder subBuilder = null; + if (cryptoKey_ != null) { + subBuilder = cryptoKey_.toBuilder(); + } + cryptoKey_ = input.readMessage(com.google.privacy.dlp.v2.CryptoKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cryptoKey_); + cryptoKey_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CryptoHashConfig.class, com.google.privacy.dlp.v2.CryptoHashConfig.Builder.class); + } + + public static final int CRYPTO_KEY_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; + /** + *
+   * The key used by the hash function.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return Whether the cryptoKey field is set. + */ + @java.lang.Override + public boolean hasCryptoKey() { + return cryptoKey_ != null; + } + /** + *
+   * The key used by the hash function.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return The cryptoKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { + return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; + } + /** + *
+   * The key used by the hash function.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { + return getCryptoKey(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (cryptoKey_ != null) { + output.writeMessage(1, getCryptoKey()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cryptoKey_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCryptoKey()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CryptoHashConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CryptoHashConfig other = (com.google.privacy.dlp.v2.CryptoHashConfig) obj; + + if (hasCryptoKey() != other.hasCryptoKey()) return false; + if (hasCryptoKey()) { + if (!getCryptoKey() + .equals(other.getCryptoKey())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCryptoKey()) { + hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; + hash = (53 * hash) + getCryptoKey().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CryptoHashConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Pseudonymization method that generates surrogates via cryptographic hashing.
+   * Uses SHA-256.
+   * The key size must be either 32 or 64 bytes.
+   * Outputs a base64 encoded representation of the hashed output
+   * (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=).
+   * Currently, only string and integer values can be hashed.
+   * See https://cloud.google.com/dlp/docs/pseudonymization to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CryptoHashConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CryptoHashConfig) + com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CryptoHashConfig.class, com.google.privacy.dlp.v2.CryptoHashConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CryptoHashConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (cryptoKeyBuilder_ == null) { + cryptoKey_ = null; + } else { + cryptoKey_ = null; + cryptoKeyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoHashConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoHashConfig build() { + com.google.privacy.dlp.v2.CryptoHashConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoHashConfig buildPartial() { + com.google.privacy.dlp.v2.CryptoHashConfig result = new com.google.privacy.dlp.v2.CryptoHashConfig(this); + if (cryptoKeyBuilder_ == null) { + result.cryptoKey_ = cryptoKey_; + } else { + result.cryptoKey_ = cryptoKeyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CryptoHashConfig) { + return mergeFrom((com.google.privacy.dlp.v2.CryptoHashConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CryptoHashConfig other) { + if (other == com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance()) return this; + if (other.hasCryptoKey()) { + mergeCryptoKey(other.getCryptoKey()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CryptoHashConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CryptoHashConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> cryptoKeyBuilder_; + /** + *
+     * The key used by the hash function.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return Whether the cryptoKey field is set. + */ + public boolean hasCryptoKey() { + return cryptoKeyBuilder_ != null || cryptoKey_ != null; + } + /** + *
+     * The key used by the hash function.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return The cryptoKey. + */ + public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { + if (cryptoKeyBuilder_ == null) { + return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; + } else { + return cryptoKeyBuilder_.getMessage(); + } + } + /** + *
+     * The key used by the hash function.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public Builder setCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { + if (cryptoKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cryptoKey_ = value; + onChanged(); + } else { + cryptoKeyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The key used by the hash function.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public Builder setCryptoKey( + com.google.privacy.dlp.v2.CryptoKey.Builder builderForValue) { + if (cryptoKeyBuilder_ == null) { + cryptoKey_ = builderForValue.build(); + onChanged(); + } else { + cryptoKeyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The key used by the hash function.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public Builder mergeCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { + if (cryptoKeyBuilder_ == null) { + if (cryptoKey_ != null) { + cryptoKey_ = + com.google.privacy.dlp.v2.CryptoKey.newBuilder(cryptoKey_).mergeFrom(value).buildPartial(); + } else { + cryptoKey_ = value; + } + onChanged(); + } else { + cryptoKeyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The key used by the hash function.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public Builder clearCryptoKey() { + if (cryptoKeyBuilder_ == null) { + cryptoKey_ = null; + onChanged(); + } else { + cryptoKey_ = null; + cryptoKeyBuilder_ = null; + } + + return this; + } + /** + *
+     * The key used by the hash function.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public com.google.privacy.dlp.v2.CryptoKey.Builder getCryptoKeyBuilder() { + + onChanged(); + return getCryptoKeyFieldBuilder().getBuilder(); + } + /** + *
+     * The key used by the hash function.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { + if (cryptoKeyBuilder_ != null) { + return cryptoKeyBuilder_.getMessageOrBuilder(); + } else { + return cryptoKey_ == null ? + com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; + } + } + /** + *
+     * The key used by the hash function.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> + getCryptoKeyFieldBuilder() { + if (cryptoKeyBuilder_ == null) { + cryptoKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder>( + getCryptoKey(), + getParentForChildren(), + isClean()); + cryptoKey_ = null; + } + return cryptoKeyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CryptoHashConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CryptoHashConfig) + private static final com.google.privacy.dlp.v2.CryptoHashConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CryptoHashConfig(); + } + + public static com.google.privacy.dlp.v2.CryptoHashConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CryptoHashConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CryptoHashConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoHashConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfigOrBuilder.java new file mode 100644 index 000000000000..325b7849a6a0 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfigOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CryptoHashConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CryptoHashConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The key used by the hash function.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return Whether the cryptoKey field is set. + */ + boolean hasCryptoKey(); + /** + *
+   * The key used by the hash function.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + * @return The cryptoKey. + */ + com.google.privacy.dlp.v2.CryptoKey getCryptoKey(); + /** + *
+   * The key used by the hash function.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; + */ + com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKey.java new file mode 100644 index 000000000000..9e4b088b5b4f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKey.java @@ -0,0 +1,1297 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * This is a data encryption key (DEK) (as opposed to
+ * a key encryption key (KEK) stored by Cloud Key Management Service
+ * (Cloud KMS).
+ * When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate
+ * IAM policy on the KEK to ensure an attacker cannot
+ * unwrap the DEK.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CryptoKey} + */ +public final class CryptoKey extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CryptoKey) + CryptoKeyOrBuilder { +private static final long serialVersionUID = 0L; + // Use CryptoKey.newBuilder() to construct. + private CryptoKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CryptoKey() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CryptoKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CryptoKey( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.TransientCryptoKey.Builder subBuilder = null; + if (sourceCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.TransientCryptoKey) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.privacy.dlp.v2.TransientCryptoKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.TransientCryptoKey) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder subBuilder = null; + if (sourceCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.privacy.dlp.v2.UnwrappedCryptoKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder subBuilder = null; + if (sourceCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.privacy.dlp.v2.KmsWrappedCryptoKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 3; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CryptoKey.class, com.google.privacy.dlp.v2.CryptoKey.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + public enum SourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TRANSIENT(1), + UNWRAPPED(2), + KMS_WRAPPED(3), + SOURCE_NOT_SET(0); + private final int value; + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: return TRANSIENT; + case 2: return UNWRAPPED; + case 3: return KMS_WRAPPED; + case 0: return SOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public static final int TRANSIENT_FIELD_NUMBER = 1; + /** + *
+   * Transient crypto key
+   * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + * @return Whether the transient field is set. + */ + @java.lang.Override + public boolean hasTransient() { + return sourceCase_ == 1; + } + /** + *
+   * Transient crypto key
+   * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + * @return The transient. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransientCryptoKey getTransient() { + if (sourceCase_ == 1) { + return (com.google.privacy.dlp.v2.TransientCryptoKey) source_; + } + return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); + } + /** + *
+   * Transient crypto key
+   * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder getTransientOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.privacy.dlp.v2.TransientCryptoKey) source_; + } + return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); + } + + public static final int UNWRAPPED_FIELD_NUMBER = 2; + /** + *
+   * Unwrapped crypto key
+   * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + * @return Whether the unwrapped field is set. + */ + @java.lang.Override + public boolean hasUnwrapped() { + return sourceCase_ == 2; + } + /** + *
+   * Unwrapped crypto key
+   * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + * @return The unwrapped. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.UnwrappedCryptoKey getUnwrapped() { + if (sourceCase_ == 2) { + return (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_; + } + return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); + } + /** + *
+   * Unwrapped crypto key
+   * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_; + } + return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); + } + + public static final int KMS_WRAPPED_FIELD_NUMBER = 3; + /** + *
+   * Key wrapped using Cloud KMS
+   * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + * @return Whether the kmsWrapped field is set. + */ + @java.lang.Override + public boolean hasKmsWrapped() { + return sourceCase_ == 3; + } + /** + *
+   * Key wrapped using Cloud KMS
+   * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + * @return The kmsWrapped. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.KmsWrappedCryptoKey getKmsWrapped() { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_; + } + return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); + } + /** + *
+   * Key wrapped using Cloud KMS
+   * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder() { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_; + } + return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (sourceCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.TransientCryptoKey) source_); + } + if (sourceCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_); + } + if (sourceCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.TransientCryptoKey) source_); + } + if (sourceCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_); + } + if (sourceCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CryptoKey)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CryptoKey other = (com.google.privacy.dlp.v2.CryptoKey) obj; + + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getTransient() + .equals(other.getTransient())) return false; + break; + case 2: + if (!getUnwrapped() + .equals(other.getUnwrapped())) return false; + break; + case 3: + if (!getKmsWrapped() + .equals(other.getKmsWrapped())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + TRANSIENT_FIELD_NUMBER; + hash = (53 * hash) + getTransient().hashCode(); + break; + case 2: + hash = (37 * hash) + UNWRAPPED_FIELD_NUMBER; + hash = (53 * hash) + getUnwrapped().hashCode(); + break; + case 3: + hash = (37 * hash) + KMS_WRAPPED_FIELD_NUMBER; + hash = (53 * hash) + getKmsWrapped().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CryptoKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CryptoKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * This is a data encryption key (DEK) (as opposed to
+   * a key encryption key (KEK) stored by Cloud Key Management Service
+   * (Cloud KMS).
+   * When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate
+   * IAM policy on the KEK to ensure an attacker cannot
+   * unwrap the DEK.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CryptoKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CryptoKey) + com.google.privacy.dlp.v2.CryptoKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CryptoKey.class, com.google.privacy.dlp.v2.CryptoKey.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CryptoKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKey getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKey build() { + com.google.privacy.dlp.v2.CryptoKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKey buildPartial() { + com.google.privacy.dlp.v2.CryptoKey result = new com.google.privacy.dlp.v2.CryptoKey(this); + if (sourceCase_ == 1) { + if (transientBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = transientBuilder_.build(); + } + } + if (sourceCase_ == 2) { + if (unwrappedBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = unwrappedBuilder_.build(); + } + } + if (sourceCase_ == 3) { + if (kmsWrappedBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = kmsWrappedBuilder_.build(); + } + } + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CryptoKey) { + return mergeFrom((com.google.privacy.dlp.v2.CryptoKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CryptoKey other) { + if (other == com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance()) return this; + switch (other.getSourceCase()) { + case TRANSIENT: { + mergeTransient(other.getTransient()); + break; + } + case UNWRAPPED: { + mergeUnwrapped(other.getUnwrapped()); + break; + } + case KMS_WRAPPED: { + mergeKmsWrapped(other.getKmsWrapped()); + break; + } + case SOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CryptoKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CryptoKey) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int sourceCase_ = 0; + private java.lang.Object source_; + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransientCryptoKey, com.google.privacy.dlp.v2.TransientCryptoKey.Builder, com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder> transientBuilder_; + /** + *
+     * Transient crypto key
+     * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + * @return Whether the transient field is set. + */ + @java.lang.Override + public boolean hasTransient() { + return sourceCase_ == 1; + } + /** + *
+     * Transient crypto key
+     * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + * @return The transient. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransientCryptoKey getTransient() { + if (transientBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.privacy.dlp.v2.TransientCryptoKey) source_; + } + return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return transientBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); + } + } + /** + *
+     * Transient crypto key
+     * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + */ + public Builder setTransient(com.google.privacy.dlp.v2.TransientCryptoKey value) { + if (transientBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + transientBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + *
+     * Transient crypto key
+     * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + */ + public Builder setTransient( + com.google.privacy.dlp.v2.TransientCryptoKey.Builder builderForValue) { + if (transientBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + transientBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + /** + *
+     * Transient crypto key
+     * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + */ + public Builder mergeTransient(com.google.privacy.dlp.v2.TransientCryptoKey value) { + if (transientBuilder_ == null) { + if (sourceCase_ == 1 && + source_ != com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance()) { + source_ = com.google.privacy.dlp.v2.TransientCryptoKey.newBuilder((com.google.privacy.dlp.v2.TransientCryptoKey) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + transientBuilder_.mergeFrom(value); + } else { + transientBuilder_.setMessage(value); + } + } + sourceCase_ = 1; + return this; + } + /** + *
+     * Transient crypto key
+     * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + */ + public Builder clearTransient() { + if (transientBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + transientBuilder_.clear(); + } + return this; + } + /** + *
+     * Transient crypto key
+     * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + */ + public com.google.privacy.dlp.v2.TransientCryptoKey.Builder getTransientBuilder() { + return getTransientFieldBuilder().getBuilder(); + } + /** + *
+     * Transient crypto key
+     * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder getTransientOrBuilder() { + if ((sourceCase_ == 1) && (transientBuilder_ != null)) { + return transientBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.privacy.dlp.v2.TransientCryptoKey) source_; + } + return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); + } + } + /** + *
+     * Transient crypto key
+     * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransientCryptoKey, com.google.privacy.dlp.v2.TransientCryptoKey.Builder, com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder> + getTransientFieldBuilder() { + if (transientBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); + } + transientBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransientCryptoKey, com.google.privacy.dlp.v2.TransientCryptoKey.Builder, com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder>( + (com.google.privacy.dlp.v2.TransientCryptoKey) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged();; + return transientBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.UnwrappedCryptoKey, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder, com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder> unwrappedBuilder_; + /** + *
+     * Unwrapped crypto key
+     * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + * @return Whether the unwrapped field is set. + */ + @java.lang.Override + public boolean hasUnwrapped() { + return sourceCase_ == 2; + } + /** + *
+     * Unwrapped crypto key
+     * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + * @return The unwrapped. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.UnwrappedCryptoKey getUnwrapped() { + if (unwrappedBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_; + } + return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return unwrappedBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); + } + } + /** + *
+     * Unwrapped crypto key
+     * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + */ + public Builder setUnwrapped(com.google.privacy.dlp.v2.UnwrappedCryptoKey value) { + if (unwrappedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + unwrappedBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + *
+     * Unwrapped crypto key
+     * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + */ + public Builder setUnwrapped( + com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder builderForValue) { + if (unwrappedBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + unwrappedBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + /** + *
+     * Unwrapped crypto key
+     * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + */ + public Builder mergeUnwrapped(com.google.privacy.dlp.v2.UnwrappedCryptoKey value) { + if (unwrappedBuilder_ == null) { + if (sourceCase_ == 2 && + source_ != com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance()) { + source_ = com.google.privacy.dlp.v2.UnwrappedCryptoKey.newBuilder((com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + unwrappedBuilder_.mergeFrom(value); + } else { + unwrappedBuilder_.setMessage(value); + } + } + sourceCase_ = 2; + return this; + } + /** + *
+     * Unwrapped crypto key
+     * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + */ + public Builder clearUnwrapped() { + if (unwrappedBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + unwrappedBuilder_.clear(); + } + return this; + } + /** + *
+     * Unwrapped crypto key
+     * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + */ + public com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder getUnwrappedBuilder() { + return getUnwrappedFieldBuilder().getBuilder(); + } + /** + *
+     * Unwrapped crypto key
+     * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder() { + if ((sourceCase_ == 2) && (unwrappedBuilder_ != null)) { + return unwrappedBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_; + } + return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); + } + } + /** + *
+     * Unwrapped crypto key
+     * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.UnwrappedCryptoKey, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder, com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder> + getUnwrappedFieldBuilder() { + if (unwrappedBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); + } + unwrappedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.UnwrappedCryptoKey, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder, com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder>( + (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged();; + return unwrappedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.KmsWrappedCryptoKey, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder, com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder> kmsWrappedBuilder_; + /** + *
+     * Key wrapped using Cloud KMS
+     * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + * @return Whether the kmsWrapped field is set. + */ + @java.lang.Override + public boolean hasKmsWrapped() { + return sourceCase_ == 3; + } + /** + *
+     * Key wrapped using Cloud KMS
+     * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + * @return The kmsWrapped. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.KmsWrappedCryptoKey getKmsWrapped() { + if (kmsWrappedBuilder_ == null) { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_; + } + return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); + } else { + if (sourceCase_ == 3) { + return kmsWrappedBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); + } + } + /** + *
+     * Key wrapped using Cloud KMS
+     * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + */ + public Builder setKmsWrapped(com.google.privacy.dlp.v2.KmsWrappedCryptoKey value) { + if (kmsWrappedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + kmsWrappedBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + *
+     * Key wrapped using Cloud KMS
+     * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + */ + public Builder setKmsWrapped( + com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder builderForValue) { + if (kmsWrappedBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + kmsWrappedBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 3; + return this; + } + /** + *
+     * Key wrapped using Cloud KMS
+     * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + */ + public Builder mergeKmsWrapped(com.google.privacy.dlp.v2.KmsWrappedCryptoKey value) { + if (kmsWrappedBuilder_ == null) { + if (sourceCase_ == 3 && + source_ != com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance()) { + source_ = com.google.privacy.dlp.v2.KmsWrappedCryptoKey.newBuilder((com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 3) { + kmsWrappedBuilder_.mergeFrom(value); + } else { + kmsWrappedBuilder_.setMessage(value); + } + } + sourceCase_ = 3; + return this; + } + /** + *
+     * Key wrapped using Cloud KMS
+     * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + */ + public Builder clearKmsWrapped() { + if (kmsWrappedBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + kmsWrappedBuilder_.clear(); + } + return this; + } + /** + *
+     * Key wrapped using Cloud KMS
+     * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + */ + public com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder getKmsWrappedBuilder() { + return getKmsWrappedFieldBuilder().getBuilder(); + } + /** + *
+     * Key wrapped using Cloud KMS
+     * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder() { + if ((sourceCase_ == 3) && (kmsWrappedBuilder_ != null)) { + return kmsWrappedBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_; + } + return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); + } + } + /** + *
+     * Key wrapped using Cloud KMS
+     * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.KmsWrappedCryptoKey, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder, com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder> + getKmsWrappedFieldBuilder() { + if (kmsWrappedBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); + } + kmsWrappedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.KmsWrappedCryptoKey, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder, com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder>( + (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; + onChanged();; + return kmsWrappedBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CryptoKey) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CryptoKey) + private static final com.google.privacy.dlp.v2.CryptoKey DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CryptoKey(); + } + + public static com.google.privacy.dlp.v2.CryptoKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CryptoKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CryptoKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKeyOrBuilder.java new file mode 100644 index 000000000000..8dbe769f2435 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKeyOrBuilder.java @@ -0,0 +1,92 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CryptoKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CryptoKey) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Transient crypto key
+   * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + * @return Whether the transient field is set. + */ + boolean hasTransient(); + /** + *
+   * Transient crypto key
+   * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + * @return The transient. + */ + com.google.privacy.dlp.v2.TransientCryptoKey getTransient(); + /** + *
+   * Transient crypto key
+   * 
+ * + * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; + */ + com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder getTransientOrBuilder(); + + /** + *
+   * Unwrapped crypto key
+   * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + * @return Whether the unwrapped field is set. + */ + boolean hasUnwrapped(); + /** + *
+   * Unwrapped crypto key
+   * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + * @return The unwrapped. + */ + com.google.privacy.dlp.v2.UnwrappedCryptoKey getUnwrapped(); + /** + *
+   * Unwrapped crypto key
+   * 
+ * + * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; + */ + com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder(); + + /** + *
+   * Key wrapped using Cloud KMS
+   * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + * @return Whether the kmsWrapped field is set. + */ + boolean hasKmsWrapped(); + /** + *
+   * Key wrapped using Cloud KMS
+   * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + * @return The kmsWrapped. + */ + com.google.privacy.dlp.v2.KmsWrappedCryptoKey getKmsWrapped(); + /** + *
+   * Key wrapped using Cloud KMS
+   * 
+ * + * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; + */ + com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder(); + + public com.google.privacy.dlp.v2.CryptoKey.SourceCase getSourceCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java new file mode 100644 index 000000000000..9ab2cb66d752 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java @@ -0,0 +1,2400 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Replaces an identifier with a surrogate using Format Preserving Encryption
+ * (FPE) with the FFX mode of operation; however when used in the
+ * `ReidentifyContent` API method, it serves the opposite function by reversing
+ * the surrogate back into the original identifier. The identifier must be
+ * encoded as ASCII. For a given crypto key and context, the same identifier
+ * will be replaced with the same surrogate. Identifiers must be at least two
+ * characters long. In the case that the identifier is the empty string, it will
+ * be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn
+ * more.
+ * Note: We recommend using  CryptoDeterministicConfig for all use cases which
+ * do not require preserving the input alphabet space and size, plus warrant
+ * referential integrity.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} + */ +public final class CryptoReplaceFfxFpeConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) + CryptoReplaceFfxFpeConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use CryptoReplaceFfxFpeConfig.newBuilder() to construct. + private CryptoReplaceFfxFpeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CryptoReplaceFfxFpeConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CryptoReplaceFfxFpeConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CryptoReplaceFfxFpeConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CryptoKey.Builder subBuilder = null; + if (cryptoKey_ != null) { + subBuilder = cryptoKey_.toBuilder(); + } + cryptoKey_ = input.readMessage(com.google.privacy.dlp.v2.CryptoKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cryptoKey_); + cryptoKey_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + int rawValue = input.readEnum(); + alphabetCase_ = 4; + alphabet_ = rawValue; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + alphabetCase_ = 5; + alphabet_ = s; + break; + } + case 48: { + alphabet_ = input.readInt32(); + alphabetCase_ = 6; + break; + } + case 66: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (surrogateInfoType_ != null) { + subBuilder = surrogateInfoType_.toBuilder(); + } + surrogateInfoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(surrogateInfoType_); + surrogateInfoType_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.class, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder.class); + } + + /** + *
+   * These are commonly used subsets of the alphabet that the FFX mode
+   * natively supports. In the algorithm, the alphabet is selected using
+   * the "radix". Therefore each corresponds to a particular radix.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet} + */ + public enum FfxCommonNativeAlphabet + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; + */ + FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED(0), + /** + *
+     * `[0-9]` (radix of 10)
+     * 
+ * + * NUMERIC = 1; + */ + NUMERIC(1), + /** + *
+     * `[0-9A-F]` (radix of 16)
+     * 
+ * + * HEXADECIMAL = 2; + */ + HEXADECIMAL(2), + /** + *
+     * `[0-9A-Z]` (radix of 36)
+     * 
+ * + * UPPER_CASE_ALPHA_NUMERIC = 3; + */ + UPPER_CASE_ALPHA_NUMERIC(3), + /** + *
+     * `[0-9A-Za-z]` (radix of 62)
+     * 
+ * + * ALPHA_NUMERIC = 4; + */ + ALPHA_NUMERIC(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; + */ + public static final int FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED_VALUE = 0; + /** + *
+     * `[0-9]` (radix of 10)
+     * 
+ * + * NUMERIC = 1; + */ + public static final int NUMERIC_VALUE = 1; + /** + *
+     * `[0-9A-F]` (radix of 16)
+     * 
+ * + * HEXADECIMAL = 2; + */ + public static final int HEXADECIMAL_VALUE = 2; + /** + *
+     * `[0-9A-Z]` (radix of 36)
+     * 
+ * + * UPPER_CASE_ALPHA_NUMERIC = 3; + */ + public static final int UPPER_CASE_ALPHA_NUMERIC_VALUE = 3; + /** + *
+     * `[0-9A-Za-z]` (radix of 62)
+     * 
+ * + * ALPHA_NUMERIC = 4; + */ + public static final int ALPHA_NUMERIC_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FfxCommonNativeAlphabet valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FfxCommonNativeAlphabet forNumber(int value) { + switch (value) { + case 0: return FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED; + case 1: return NUMERIC; + case 2: return HEXADECIMAL; + case 3: return UPPER_CASE_ALPHA_NUMERIC; + case 4: return ALPHA_NUMERIC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + FfxCommonNativeAlphabet> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FfxCommonNativeAlphabet findValueByNumber(int number) { + return FfxCommonNativeAlphabet.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final FfxCommonNativeAlphabet[] VALUES = values(); + + public static FfxCommonNativeAlphabet valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FfxCommonNativeAlphabet(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet) + } + + private int alphabetCase_ = 0; + private java.lang.Object alphabet_; + public enum AlphabetCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COMMON_ALPHABET(4), + CUSTOM_ALPHABET(5), + RADIX(6), + ALPHABET_NOT_SET(0); + private final int value; + private AlphabetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AlphabetCase valueOf(int value) { + return forNumber(value); + } + + public static AlphabetCase forNumber(int value) { + switch (value) { + case 4: return COMMON_ALPHABET; + case 5: return CUSTOM_ALPHABET; + case 6: return RADIX; + case 0: return ALPHABET_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public AlphabetCase + getAlphabetCase() { + return AlphabetCase.forNumber( + alphabetCase_); + } + + public static final int CRYPTO_KEY_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; + /** + *
+   * Required. The key used by the encryption algorithm.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the cryptoKey field is set. + */ + @java.lang.Override + public boolean hasCryptoKey() { + return cryptoKey_ != null; + } + /** + *
+   * Required. The key used by the encryption algorithm.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The cryptoKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { + return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; + } + /** + *
+   * Required. The key used by the encryption algorithm.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { + return getCryptoKey(); + } + + public static final int CONTEXT_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.FieldId context_; + /** + *
+   * The 'tweak', a context may be used for higher security since the same
+   * identifier in two different contexts won't be given the same surrogate. If
+   * the context is not set, a default tweak will be used.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 1. the field is not present when transforming a given value,
+   * a default tweak will be used.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * Currently, the referenced field may be of value type integer or string.
+   * The tweak is constructed as a sequence of bytes in big endian byte order
+   * such that:
+   * - a 64 bit integer is encoded followed by a single byte of value 1
+   * - a string is encoded in UTF-8 format followed by a single byte of value 2
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * The 'tweak', a context may be used for higher security since the same
+   * identifier in two different contexts won't be given the same surrogate. If
+   * the context is not set, a default tweak will be used.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 1. the field is not present when transforming a given value,
+   * a default tweak will be used.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * Currently, the referenced field may be of value type integer or string.
+   * The tweak is constructed as a sequence of bytes in big endian byte order
+   * such that:
+   * - a 64 bit integer is encoded followed by a single byte of value 1
+   * - a string is encoded in UTF-8 format followed by a single byte of value 2
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + * @return The context. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getContext() { + return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; + } + /** + *
+   * The 'tweak', a context may be used for higher security since the same
+   * identifier in two different contexts won't be given the same surrogate. If
+   * the context is not set, a default tweak will be used.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 1. the field is not present when transforming a given value,
+   * a default tweak will be used.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * Currently, the referenced field may be of value type integer or string.
+   * The tweak is constructed as a sequence of bytes in big endian byte order
+   * such that:
+   * - a 64 bit integer is encoded followed by a single byte of value 1
+   * - a string is encoded in UTF-8 format followed by a single byte of value 2
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { + return getContext(); + } + + public static final int COMMON_ALPHABET_FIELD_NUMBER = 4; + /** + *
+   * Common alphabets.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return Whether the commonAlphabet field is set. + */ + public boolean hasCommonAlphabet() { + return alphabetCase_ == 4; + } + /** + *
+   * Common alphabets.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return The enum numeric value on the wire for commonAlphabet. + */ + public int getCommonAlphabetValue() { + if (alphabetCase_ == 4) { + return (java.lang.Integer) alphabet_; + } + return 0; + } + /** + *
+   * Common alphabets.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return The commonAlphabet. + */ + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet getCommonAlphabet() { + if (alphabetCase_ == 4) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet result = com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.valueOf( + (java.lang.Integer) alphabet_); + return result == null ? com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED; + } + + public static final int CUSTOM_ALPHABET_FIELD_NUMBER = 5; + /** + *
+   * This is supported by mapping these to the alphanumeric characters
+   * that the FFX mode natively supports. This happens before/after
+   * encryption/decryption.
+   * Each character listed must appear only once.
+   * Number of characters must be in the range [2, 95].
+   * This must be encoded as ASCII.
+   * The order of characters does not matter.
+   * The full list of allowed characters is:
+   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+   * 
+ * + * string custom_alphabet = 5; + * @return Whether the customAlphabet field is set. + */ + public boolean hasCustomAlphabet() { + return alphabetCase_ == 5; + } + /** + *
+   * This is supported by mapping these to the alphanumeric characters
+   * that the FFX mode natively supports. This happens before/after
+   * encryption/decryption.
+   * Each character listed must appear only once.
+   * Number of characters must be in the range [2, 95].
+   * This must be encoded as ASCII.
+   * The order of characters does not matter.
+   * The full list of allowed characters is:
+   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+   * 
+ * + * string custom_alphabet = 5; + * @return The customAlphabet. + */ + public java.lang.String getCustomAlphabet() { + java.lang.Object ref = ""; + if (alphabetCase_ == 5) { + ref = alphabet_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (alphabetCase_ == 5) { + alphabet_ = s; + } + return s; + } + } + /** + *
+   * This is supported by mapping these to the alphanumeric characters
+   * that the FFX mode natively supports. This happens before/after
+   * encryption/decryption.
+   * Each character listed must appear only once.
+   * Number of characters must be in the range [2, 95].
+   * This must be encoded as ASCII.
+   * The order of characters does not matter.
+   * The full list of allowed characters is:
+   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+   * 
+ * + * string custom_alphabet = 5; + * @return The bytes for customAlphabet. + */ + public com.google.protobuf.ByteString + getCustomAlphabetBytes() { + java.lang.Object ref = ""; + if (alphabetCase_ == 5) { + ref = alphabet_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (alphabetCase_ == 5) { + alphabet_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RADIX_FIELD_NUMBER = 6; + /** + *
+   * The native way to select the alphabet. Must be in the range [2, 95].
+   * 
+ * + * int32 radix = 6; + * @return Whether the radix field is set. + */ + @java.lang.Override + public boolean hasRadix() { + return alphabetCase_ == 6; + } + /** + *
+   * The native way to select the alphabet. Must be in the range [2, 95].
+   * 
+ * + * int32 radix = 6; + * @return The radix. + */ + @java.lang.Override + public int getRadix() { + if (alphabetCase_ == 6) { + return (java.lang.Integer) alphabet_; + } + return 0; + } + + public static final int SURROGATE_INFO_TYPE_FIELD_NUMBER = 8; + private com.google.privacy.dlp.v2.InfoType surrogateInfoType_; + /** + *
+   * The custom infoType to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom infoType followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: info_type_name(surrogate_character_count):surrogate
+   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom infoType
+   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+   * This facilitates reversal of the surrogate when it occurs in free text.
+   * In order for inspection to work properly, the name of this infoType must
+   * not occur naturally anywhere in your data; otherwise, inspection may
+   * find a surrogate that does not correspond to an actual identifier.
+   * Therefore, choose your custom infoType name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + * @return Whether the surrogateInfoType field is set. + */ + @java.lang.Override + public boolean hasSurrogateInfoType() { + return surrogateInfoType_ != null; + } + /** + *
+   * The custom infoType to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom infoType followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: info_type_name(surrogate_character_count):surrogate
+   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom infoType
+   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+   * This facilitates reversal of the surrogate when it occurs in free text.
+   * In order for inspection to work properly, the name of this infoType must
+   * not occur naturally anywhere in your data; otherwise, inspection may
+   * find a surrogate that does not correspond to an actual identifier.
+   * Therefore, choose your custom infoType name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + * @return The surrogateInfoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getSurrogateInfoType() { + return surrogateInfoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; + } + /** + *
+   * The custom infoType to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom infoType followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: info_type_name(surrogate_character_count):surrogate
+   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom infoType
+   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+   * This facilitates reversal of the surrogate when it occurs in free text.
+   * In order for inspection to work properly, the name of this infoType must
+   * not occur naturally anywhere in your data; otherwise, inspection may
+   * find a surrogate that does not correspond to an actual identifier.
+   * Therefore, choose your custom infoType name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder() { + return getSurrogateInfoType(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (cryptoKey_ != null) { + output.writeMessage(1, getCryptoKey()); + } + if (context_ != null) { + output.writeMessage(2, getContext()); + } + if (alphabetCase_ == 4) { + output.writeEnum(4, ((java.lang.Integer) alphabet_)); + } + if (alphabetCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, alphabet_); + } + if (alphabetCase_ == 6) { + output.writeInt32( + 6, (int)((java.lang.Integer) alphabet_)); + } + if (surrogateInfoType_ != null) { + output.writeMessage(8, getSurrogateInfoType()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cryptoKey_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCryptoKey()); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getContext()); + } + if (alphabetCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, ((java.lang.Integer) alphabet_)); + } + if (alphabetCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, alphabet_); + } + if (alphabetCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size( + 6, (int)((java.lang.Integer) alphabet_)); + } + if (surrogateInfoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getSurrogateInfoType()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig other = (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) obj; + + if (hasCryptoKey() != other.hasCryptoKey()) return false; + if (hasCryptoKey()) { + if (!getCryptoKey() + .equals(other.getCryptoKey())) return false; + } + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (hasSurrogateInfoType() != other.hasSurrogateInfoType()) return false; + if (hasSurrogateInfoType()) { + if (!getSurrogateInfoType() + .equals(other.getSurrogateInfoType())) return false; + } + if (!getAlphabetCase().equals(other.getAlphabetCase())) return false; + switch (alphabetCase_) { + case 4: + if (getCommonAlphabetValue() + != other.getCommonAlphabetValue()) return false; + break; + case 5: + if (!getCustomAlphabet() + .equals(other.getCustomAlphabet())) return false; + break; + case 6: + if (getRadix() + != other.getRadix()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCryptoKey()) { + hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; + hash = (53 * hash) + getCryptoKey().hashCode(); + } + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + if (hasSurrogateInfoType()) { + hash = (37 * hash) + SURROGATE_INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSurrogateInfoType().hashCode(); + } + switch (alphabetCase_) { + case 4: + hash = (37 * hash) + COMMON_ALPHABET_FIELD_NUMBER; + hash = (53 * hash) + getCommonAlphabetValue(); + break; + case 5: + hash = (37 * hash) + CUSTOM_ALPHABET_FIELD_NUMBER; + hash = (53 * hash) + getCustomAlphabet().hashCode(); + break; + case 6: + hash = (37 * hash) + RADIX_FIELD_NUMBER; + hash = (53 * hash) + getRadix(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Replaces an identifier with a surrogate using Format Preserving Encryption
+   * (FPE) with the FFX mode of operation; however when used in the
+   * `ReidentifyContent` API method, it serves the opposite function by reversing
+   * the surrogate back into the original identifier. The identifier must be
+   * encoded as ASCII. For a given crypto key and context, the same identifier
+   * will be replaced with the same surrogate. Identifiers must be at least two
+   * characters long. In the case that the identifier is the empty string, it will
+   * be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn
+   * more.
+   * Note: We recommend using  CryptoDeterministicConfig for all use cases which
+   * do not require preserving the input alphabet space and size, plus warrant
+   * referential integrity.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.class, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (cryptoKeyBuilder_ == null) { + cryptoKey_ = null; + } else { + cryptoKey_ = null; + cryptoKeyBuilder_ = null; + } + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + if (surrogateInfoTypeBuilder_ == null) { + surrogateInfoType_ = null; + } else { + surrogateInfoType_ = null; + surrogateInfoTypeBuilder_ = null; + } + alphabetCase_ = 0; + alphabet_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig build() { + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig buildPartial() { + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig result = new com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig(this); + if (cryptoKeyBuilder_ == null) { + result.cryptoKey_ = cryptoKey_; + } else { + result.cryptoKey_ = cryptoKeyBuilder_.build(); + } + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + if (alphabetCase_ == 4) { + result.alphabet_ = alphabet_; + } + if (alphabetCase_ == 5) { + result.alphabet_ = alphabet_; + } + if (alphabetCase_ == 6) { + result.alphabet_ = alphabet_; + } + if (surrogateInfoTypeBuilder_ == null) { + result.surrogateInfoType_ = surrogateInfoType_; + } else { + result.surrogateInfoType_ = surrogateInfoTypeBuilder_.build(); + } + result.alphabetCase_ = alphabetCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) { + return mergeFrom((com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig other) { + if (other == com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance()) return this; + if (other.hasCryptoKey()) { + mergeCryptoKey(other.getCryptoKey()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + if (other.hasSurrogateInfoType()) { + mergeSurrogateInfoType(other.getSurrogateInfoType()); + } + switch (other.getAlphabetCase()) { + case COMMON_ALPHABET: { + setCommonAlphabetValue(other.getCommonAlphabetValue()); + break; + } + case CUSTOM_ALPHABET: { + alphabetCase_ = 5; + alphabet_ = other.alphabet_; + onChanged(); + break; + } + case RADIX: { + setRadix(other.getRadix()); + break; + } + case ALPHABET_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int alphabetCase_ = 0; + private java.lang.Object alphabet_; + public AlphabetCase + getAlphabetCase() { + return AlphabetCase.forNumber( + alphabetCase_); + } + + public Builder clearAlphabet() { + alphabetCase_ = 0; + alphabet_ = null; + onChanged(); + return this; + } + + + private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> cryptoKeyBuilder_; + /** + *
+     * Required. The key used by the encryption algorithm.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the cryptoKey field is set. + */ + public boolean hasCryptoKey() { + return cryptoKeyBuilder_ != null || cryptoKey_ != null; + } + /** + *
+     * Required. The key used by the encryption algorithm.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The cryptoKey. + */ + public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { + if (cryptoKeyBuilder_ == null) { + return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; + } else { + return cryptoKeyBuilder_.getMessage(); + } + } + /** + *
+     * Required. The key used by the encryption algorithm.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { + if (cryptoKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cryptoKey_ = value; + onChanged(); + } else { + cryptoKeyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The key used by the encryption algorithm.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setCryptoKey( + com.google.privacy.dlp.v2.CryptoKey.Builder builderForValue) { + if (cryptoKeyBuilder_ == null) { + cryptoKey_ = builderForValue.build(); + onChanged(); + } else { + cryptoKeyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The key used by the encryption algorithm.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { + if (cryptoKeyBuilder_ == null) { + if (cryptoKey_ != null) { + cryptoKey_ = + com.google.privacy.dlp.v2.CryptoKey.newBuilder(cryptoKey_).mergeFrom(value).buildPartial(); + } else { + cryptoKey_ = value; + } + onChanged(); + } else { + cryptoKeyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The key used by the encryption algorithm.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearCryptoKey() { + if (cryptoKeyBuilder_ == null) { + cryptoKey_ = null; + onChanged(); + } else { + cryptoKey_ = null; + cryptoKeyBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The key used by the encryption algorithm.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.CryptoKey.Builder getCryptoKeyBuilder() { + + onChanged(); + return getCryptoKeyFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The key used by the encryption algorithm.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { + if (cryptoKeyBuilder_ != null) { + return cryptoKeyBuilder_.getMessageOrBuilder(); + } else { + return cryptoKey_ == null ? + com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; + } + } + /** + *
+     * Required. The key used by the encryption algorithm.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> + getCryptoKeyFieldBuilder() { + if (cryptoKeyBuilder_ == null) { + cryptoKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder>( + getCryptoKey(), + getParentForChildren(), + isClean()); + cryptoKey_ = null; + } + return cryptoKeyBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> contextBuilder_; + /** + *
+     * The 'tweak', a context may be used for higher security since the same
+     * identifier in two different contexts won't be given the same surrogate. If
+     * the context is not set, a default tweak will be used.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 1. the field is not present when transforming a given value,
+     * a default tweak will be used.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * Currently, the referenced field may be of value type integer or string.
+     * The tweak is constructed as a sequence of bytes in big endian byte order
+     * such that:
+     * - a 64 bit integer is encoded followed by a single byte of value 1
+     * - a string is encoded in UTF-8 format followed by a single byte of value 2
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + *
+     * The 'tweak', a context may be used for higher security since the same
+     * identifier in two different contexts won't be given the same surrogate. If
+     * the context is not set, a default tweak will be used.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 1. the field is not present when transforming a given value,
+     * a default tweak will be used.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * Currently, the referenced field may be of value type integer or string.
+     * The tweak is constructed as a sequence of bytes in big endian byte order
+     * such that:
+     * - a 64 bit integer is encoded followed by a single byte of value 1
+     * - a string is encoded in UTF-8 format followed by a single byte of value 2
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + * @return The context. + */ + public com.google.privacy.dlp.v2.FieldId getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + *
+     * The 'tweak', a context may be used for higher security since the same
+     * identifier in two different contexts won't be given the same surrogate. If
+     * the context is not set, a default tweak will be used.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 1. the field is not present when transforming a given value,
+     * a default tweak will be used.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * Currently, the referenced field may be of value type integer or string.
+     * The tweak is constructed as a sequence of bytes in big endian byte order
+     * such that:
+     * - a 64 bit integer is encoded followed by a single byte of value 1
+     * - a string is encoded in UTF-8 format followed by a single byte of value 2
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + */ + public Builder setContext(com.google.privacy.dlp.v2.FieldId value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The 'tweak', a context may be used for higher security since the same
+     * identifier in two different contexts won't be given the same surrogate. If
+     * the context is not set, a default tweak will be used.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 1. the field is not present when transforming a given value,
+     * a default tweak will be used.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * Currently, the referenced field may be of value type integer or string.
+     * The tweak is constructed as a sequence of bytes in big endian byte order
+     * such that:
+     * - a 64 bit integer is encoded followed by a single byte of value 1
+     * - a string is encoded in UTF-8 format followed by a single byte of value 2
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + */ + public Builder setContext( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The 'tweak', a context may be used for higher security since the same
+     * identifier in two different contexts won't be given the same surrogate. If
+     * the context is not set, a default tweak will be used.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 1. the field is not present when transforming a given value,
+     * a default tweak will be used.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * Currently, the referenced field may be of value type integer or string.
+     * The tweak is constructed as a sequence of bytes in big endian byte order
+     * such that:
+     * - a 64 bit integer is encoded followed by a single byte of value 1
+     * - a string is encoded in UTF-8 format followed by a single byte of value 2
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + */ + public Builder mergeContext(com.google.privacy.dlp.v2.FieldId value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The 'tweak', a context may be used for higher security since the same
+     * identifier in two different contexts won't be given the same surrogate. If
+     * the context is not set, a default tweak will be used.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 1. the field is not present when transforming a given value,
+     * a default tweak will be used.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * Currently, the referenced field may be of value type integer or string.
+     * The tweak is constructed as a sequence of bytes in big endian byte order
+     * such that:
+     * - a 64 bit integer is encoded followed by a single byte of value 1
+     * - a string is encoded in UTF-8 format followed by a single byte of value 2
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + *
+     * The 'tweak', a context may be used for higher security since the same
+     * identifier in two different contexts won't be given the same surrogate. If
+     * the context is not set, a default tweak will be used.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 1. the field is not present when transforming a given value,
+     * a default tweak will be used.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * Currently, the referenced field may be of value type integer or string.
+     * The tweak is constructed as a sequence of bytes in big endian byte order
+     * such that:
+     * - a 64 bit integer is encoded followed by a single byte of value 1
+     * - a string is encoded in UTF-8 format followed by a single byte of value 2
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * The 'tweak', a context may be used for higher security since the same
+     * identifier in two different contexts won't be given the same surrogate. If
+     * the context is not set, a default tweak will be used.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 1. the field is not present when transforming a given value,
+     * a default tweak will be used.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * Currently, the referenced field may be of value type integer or string.
+     * The tweak is constructed as a sequence of bytes in big endian byte order
+     * such that:
+     * - a 64 bit integer is encoded followed by a single byte of value 1
+     * - a string is encoded in UTF-8 format followed by a single byte of value 2
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; + } + } + /** + *
+     * The 'tweak', a context may be used for higher security since the same
+     * identifier in two different contexts won't be given the same surrogate. If
+     * the context is not set, a default tweak will be used.
+     * If the context is set but:
+     * 1. there is no record present when transforming a given value or
+     * 1. the field is not present when transforming a given value,
+     * a default tweak will be used.
+     * Note that case (1) is expected when an `InfoTypeTransformation` is
+     * applied to both structured and unstructured `ContentItem`s.
+     * Currently, the referenced field may be of value type integer or string.
+     * The tweak is constructed as a sequence of bytes in big endian byte order
+     * such that:
+     * - a 64 bit integer is encoded followed by a single byte of value 1
+     * - a string is encoded in UTF-8 format followed by a single byte of value 2
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + + /** + *
+     * Common alphabets.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return Whether the commonAlphabet field is set. + */ + @java.lang.Override + public boolean hasCommonAlphabet() { + return alphabetCase_ == 4; + } + /** + *
+     * Common alphabets.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return The enum numeric value on the wire for commonAlphabet. + */ + @java.lang.Override + public int getCommonAlphabetValue() { + if (alphabetCase_ == 4) { + return ((java.lang.Integer) alphabet_).intValue(); + } + return 0; + } + /** + *
+     * Common alphabets.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @param value The enum numeric value on the wire for commonAlphabet to set. + * @return This builder for chaining. + */ + public Builder setCommonAlphabetValue(int value) { + alphabetCase_ = 4; + alphabet_ = value; + onChanged(); + return this; + } + /** + *
+     * Common alphabets.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return The commonAlphabet. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet getCommonAlphabet() { + if (alphabetCase_ == 4) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet result = com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.valueOf( + (java.lang.Integer) alphabet_); + return result == null ? com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED; + } + /** + *
+     * Common alphabets.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @param value The commonAlphabet to set. + * @return This builder for chaining. + */ + public Builder setCommonAlphabet(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet value) { + if (value == null) { + throw new NullPointerException(); + } + alphabetCase_ = 4; + alphabet_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Common alphabets.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return This builder for chaining. + */ + public Builder clearCommonAlphabet() { + if (alphabetCase_ == 4) { + alphabetCase_ = 0; + alphabet_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * This is supported by mapping these to the alphanumeric characters
+     * that the FFX mode natively supports. This happens before/after
+     * encryption/decryption.
+     * Each character listed must appear only once.
+     * Number of characters must be in the range [2, 95].
+     * This must be encoded as ASCII.
+     * The order of characters does not matter.
+     * The full list of allowed characters is:
+     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+     * 
+ * + * string custom_alphabet = 5; + * @return Whether the customAlphabet field is set. + */ + @java.lang.Override + public boolean hasCustomAlphabet() { + return alphabetCase_ == 5; + } + /** + *
+     * This is supported by mapping these to the alphanumeric characters
+     * that the FFX mode natively supports. This happens before/after
+     * encryption/decryption.
+     * Each character listed must appear only once.
+     * Number of characters must be in the range [2, 95].
+     * This must be encoded as ASCII.
+     * The order of characters does not matter.
+     * The full list of allowed characters is:
+     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+     * 
+ * + * string custom_alphabet = 5; + * @return The customAlphabet. + */ + @java.lang.Override + public java.lang.String getCustomAlphabet() { + java.lang.Object ref = ""; + if (alphabetCase_ == 5) { + ref = alphabet_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (alphabetCase_ == 5) { + alphabet_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * This is supported by mapping these to the alphanumeric characters
+     * that the FFX mode natively supports. This happens before/after
+     * encryption/decryption.
+     * Each character listed must appear only once.
+     * Number of characters must be in the range [2, 95].
+     * This must be encoded as ASCII.
+     * The order of characters does not matter.
+     * The full list of allowed characters is:
+     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+     * 
+ * + * string custom_alphabet = 5; + * @return The bytes for customAlphabet. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCustomAlphabetBytes() { + java.lang.Object ref = ""; + if (alphabetCase_ == 5) { + ref = alphabet_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (alphabetCase_ == 5) { + alphabet_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * This is supported by mapping these to the alphanumeric characters
+     * that the FFX mode natively supports. This happens before/after
+     * encryption/decryption.
+     * Each character listed must appear only once.
+     * Number of characters must be in the range [2, 95].
+     * This must be encoded as ASCII.
+     * The order of characters does not matter.
+     * The full list of allowed characters is:
+     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+     * 
+ * + * string custom_alphabet = 5; + * @param value The customAlphabet to set. + * @return This builder for chaining. + */ + public Builder setCustomAlphabet( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + alphabetCase_ = 5; + alphabet_ = value; + onChanged(); + return this; + } + /** + *
+     * This is supported by mapping these to the alphanumeric characters
+     * that the FFX mode natively supports. This happens before/after
+     * encryption/decryption.
+     * Each character listed must appear only once.
+     * Number of characters must be in the range [2, 95].
+     * This must be encoded as ASCII.
+     * The order of characters does not matter.
+     * The full list of allowed characters is:
+     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+     * 
+ * + * string custom_alphabet = 5; + * @return This builder for chaining. + */ + public Builder clearCustomAlphabet() { + if (alphabetCase_ == 5) { + alphabetCase_ = 0; + alphabet_ = null; + onChanged(); + } + return this; + } + /** + *
+     * This is supported by mapping these to the alphanumeric characters
+     * that the FFX mode natively supports. This happens before/after
+     * encryption/decryption.
+     * Each character listed must appear only once.
+     * Number of characters must be in the range [2, 95].
+     * This must be encoded as ASCII.
+     * The order of characters does not matter.
+     * The full list of allowed characters is:
+     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+     * 
+ * + * string custom_alphabet = 5; + * @param value The bytes for customAlphabet to set. + * @return This builder for chaining. + */ + public Builder setCustomAlphabetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + alphabetCase_ = 5; + alphabet_ = value; + onChanged(); + return this; + } + + /** + *
+     * The native way to select the alphabet. Must be in the range [2, 95].
+     * 
+ * + * int32 radix = 6; + * @return Whether the radix field is set. + */ + public boolean hasRadix() { + return alphabetCase_ == 6; + } + /** + *
+     * The native way to select the alphabet. Must be in the range [2, 95].
+     * 
+ * + * int32 radix = 6; + * @return The radix. + */ + public int getRadix() { + if (alphabetCase_ == 6) { + return (java.lang.Integer) alphabet_; + } + return 0; + } + /** + *
+     * The native way to select the alphabet. Must be in the range [2, 95].
+     * 
+ * + * int32 radix = 6; + * @param value The radix to set. + * @return This builder for chaining. + */ + public Builder setRadix(int value) { + alphabetCase_ = 6; + alphabet_ = value; + onChanged(); + return this; + } + /** + *
+     * The native way to select the alphabet. Must be in the range [2, 95].
+     * 
+ * + * int32 radix = 6; + * @return This builder for chaining. + */ + public Builder clearRadix() { + if (alphabetCase_ == 6) { + alphabetCase_ = 0; + alphabet_ = null; + onChanged(); + } + return this; + } + + private com.google.privacy.dlp.v2.InfoType surrogateInfoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> surrogateInfoTypeBuilder_; + /** + *
+     * The custom infoType to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom infoType followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: info_type_name(surrogate_character_count):surrogate
+     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom infoType
+     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+     * This facilitates reversal of the surrogate when it occurs in free text.
+     * In order for inspection to work properly, the name of this infoType must
+     * not occur naturally anywhere in your data; otherwise, inspection may
+     * find a surrogate that does not correspond to an actual identifier.
+     * Therefore, choose your custom infoType name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + * @return Whether the surrogateInfoType field is set. + */ + public boolean hasSurrogateInfoType() { + return surrogateInfoTypeBuilder_ != null || surrogateInfoType_ != null; + } + /** + *
+     * The custom infoType to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom infoType followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: info_type_name(surrogate_character_count):surrogate
+     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom infoType
+     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+     * This facilitates reversal of the surrogate when it occurs in free text.
+     * In order for inspection to work properly, the name of this infoType must
+     * not occur naturally anywhere in your data; otherwise, inspection may
+     * find a surrogate that does not correspond to an actual identifier.
+     * Therefore, choose your custom infoType name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + * @return The surrogateInfoType. + */ + public com.google.privacy.dlp.v2.InfoType getSurrogateInfoType() { + if (surrogateInfoTypeBuilder_ == null) { + return surrogateInfoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; + } else { + return surrogateInfoTypeBuilder_.getMessage(); + } + } + /** + *
+     * The custom infoType to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom infoType followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: info_type_name(surrogate_character_count):surrogate
+     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom infoType
+     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+     * This facilitates reversal of the surrogate when it occurs in free text.
+     * In order for inspection to work properly, the name of this infoType must
+     * not occur naturally anywhere in your data; otherwise, inspection may
+     * find a surrogate that does not correspond to an actual identifier.
+     * Therefore, choose your custom infoType name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + */ + public Builder setSurrogateInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (surrogateInfoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + surrogateInfoType_ = value; + onChanged(); + } else { + surrogateInfoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The custom infoType to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom infoType followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: info_type_name(surrogate_character_count):surrogate
+     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom infoType
+     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+     * This facilitates reversal of the surrogate when it occurs in free text.
+     * In order for inspection to work properly, the name of this infoType must
+     * not occur naturally anywhere in your data; otherwise, inspection may
+     * find a surrogate that does not correspond to an actual identifier.
+     * Therefore, choose your custom infoType name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + */ + public Builder setSurrogateInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (surrogateInfoTypeBuilder_ == null) { + surrogateInfoType_ = builderForValue.build(); + onChanged(); + } else { + surrogateInfoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The custom infoType to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom infoType followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: info_type_name(surrogate_character_count):surrogate
+     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom infoType
+     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+     * This facilitates reversal of the surrogate when it occurs in free text.
+     * In order for inspection to work properly, the name of this infoType must
+     * not occur naturally anywhere in your data; otherwise, inspection may
+     * find a surrogate that does not correspond to an actual identifier.
+     * Therefore, choose your custom infoType name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + */ + public Builder mergeSurrogateInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (surrogateInfoTypeBuilder_ == null) { + if (surrogateInfoType_ != null) { + surrogateInfoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(surrogateInfoType_).mergeFrom(value).buildPartial(); + } else { + surrogateInfoType_ = value; + } + onChanged(); + } else { + surrogateInfoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The custom infoType to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom infoType followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: info_type_name(surrogate_character_count):surrogate
+     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom infoType
+     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+     * This facilitates reversal of the surrogate when it occurs in free text.
+     * In order for inspection to work properly, the name of this infoType must
+     * not occur naturally anywhere in your data; otherwise, inspection may
+     * find a surrogate that does not correspond to an actual identifier.
+     * Therefore, choose your custom infoType name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + */ + public Builder clearSurrogateInfoType() { + if (surrogateInfoTypeBuilder_ == null) { + surrogateInfoType_ = null; + onChanged(); + } else { + surrogateInfoType_ = null; + surrogateInfoTypeBuilder_ = null; + } + + return this; + } + /** + *
+     * The custom infoType to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom infoType followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: info_type_name(surrogate_character_count):surrogate
+     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom infoType
+     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+     * This facilitates reversal of the surrogate when it occurs in free text.
+     * In order for inspection to work properly, the name of this infoType must
+     * not occur naturally anywhere in your data; otherwise, inspection may
+     * find a surrogate that does not correspond to an actual identifier.
+     * Therefore, choose your custom infoType name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getSurrogateInfoTypeBuilder() { + + onChanged(); + return getSurrogateInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * The custom infoType to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom infoType followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: info_type_name(surrogate_character_count):surrogate
+     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom infoType
+     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+     * This facilitates reversal of the surrogate when it occurs in free text.
+     * In order for inspection to work properly, the name of this infoType must
+     * not occur naturally anywhere in your data; otherwise, inspection may
+     * find a surrogate that does not correspond to an actual identifier.
+     * Therefore, choose your custom infoType name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder() { + if (surrogateInfoTypeBuilder_ != null) { + return surrogateInfoTypeBuilder_.getMessageOrBuilder(); + } else { + return surrogateInfoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; + } + } + /** + *
+     * The custom infoType to annotate the surrogate with.
+     * This annotation will be applied to the surrogate by prefixing it with
+     * the name of the custom infoType followed by the number of
+     * characters comprising the surrogate. The following scheme defines the
+     * format: info_type_name(surrogate_character_count):surrogate
+     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+     * the surrogate is 'abc', the full replacement value
+     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+     * This annotation identifies the surrogate when inspecting content using the
+     * custom infoType
+     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+     * This facilitates reversal of the surrogate when it occurs in free text.
+     * In order for inspection to work properly, the name of this infoType must
+     * not occur naturally anywhere in your data; otherwise, inspection may
+     * find a surrogate that does not correspond to an actual identifier.
+     * Therefore, choose your custom infoType name carefully after considering
+     * what your data looks like. One way to select a name that has a high chance
+     * of yielding reliable detection is to include one or more unicode characters
+     * that are highly improbable to exist in your data.
+     * For example, assuming your data is entered from a regular ASCII keyboard,
+     * the symbol with the hex code point 29DD might be used like so:
+     * ⧝MY_TOKEN_TYPE
+     * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getSurrogateInfoTypeFieldBuilder() { + if (surrogateInfoTypeBuilder_ == null) { + surrogateInfoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getSurrogateInfoType(), + getParentForChildren(), + isClean()); + surrogateInfoType_ = null; + } + return surrogateInfoTypeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) + private static final com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig(); + } + + public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CryptoReplaceFfxFpeConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CryptoReplaceFfxFpeConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java new file mode 100644 index 000000000000..248d1bcbb4c7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java @@ -0,0 +1,297 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface CryptoReplaceFfxFpeConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The key used by the encryption algorithm.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the cryptoKey field is set. + */ + boolean hasCryptoKey(); + /** + *
+   * Required. The key used by the encryption algorithm.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The cryptoKey. + */ + com.google.privacy.dlp.v2.CryptoKey getCryptoKey(); + /** + *
+   * Required. The key used by the encryption algorithm.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder(); + + /** + *
+   * The 'tweak', a context may be used for higher security since the same
+   * identifier in two different contexts won't be given the same surrogate. If
+   * the context is not set, a default tweak will be used.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 1. the field is not present when transforming a given value,
+   * a default tweak will be used.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * Currently, the referenced field may be of value type integer or string.
+   * The tweak is constructed as a sequence of bytes in big endian byte order
+   * such that:
+   * - a 64 bit integer is encoded followed by a single byte of value 1
+   * - a string is encoded in UTF-8 format followed by a single byte of value 2
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * The 'tweak', a context may be used for higher security since the same
+   * identifier in two different contexts won't be given the same surrogate. If
+   * the context is not set, a default tweak will be used.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 1. the field is not present when transforming a given value,
+   * a default tweak will be used.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * Currently, the referenced field may be of value type integer or string.
+   * The tweak is constructed as a sequence of bytes in big endian byte order
+   * such that:
+   * - a 64 bit integer is encoded followed by a single byte of value 1
+   * - a string is encoded in UTF-8 format followed by a single byte of value 2
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + * @return The context. + */ + com.google.privacy.dlp.v2.FieldId getContext(); + /** + *
+   * The 'tweak', a context may be used for higher security since the same
+   * identifier in two different contexts won't be given the same surrogate. If
+   * the context is not set, a default tweak will be used.
+   * If the context is set but:
+   * 1. there is no record present when transforming a given value or
+   * 1. the field is not present when transforming a given value,
+   * a default tweak will be used.
+   * Note that case (1) is expected when an `InfoTypeTransformation` is
+   * applied to both structured and unstructured `ContentItem`s.
+   * Currently, the referenced field may be of value type integer or string.
+   * The tweak is constructed as a sequence of bytes in big endian byte order
+   * such that:
+   * - a 64 bit integer is encoded followed by a single byte of value 1
+   * - a string is encoded in UTF-8 format followed by a single byte of value 2
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 2; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder(); + + /** + *
+   * Common alphabets.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return Whether the commonAlphabet field is set. + */ + boolean hasCommonAlphabet(); + /** + *
+   * Common alphabets.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return The enum numeric value on the wire for commonAlphabet. + */ + int getCommonAlphabetValue(); + /** + *
+   * Common alphabets.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; + * @return The commonAlphabet. + */ + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet getCommonAlphabet(); + + /** + *
+   * This is supported by mapping these to the alphanumeric characters
+   * that the FFX mode natively supports. This happens before/after
+   * encryption/decryption.
+   * Each character listed must appear only once.
+   * Number of characters must be in the range [2, 95].
+   * This must be encoded as ASCII.
+   * The order of characters does not matter.
+   * The full list of allowed characters is:
+   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+   * 
+ * + * string custom_alphabet = 5; + * @return Whether the customAlphabet field is set. + */ + boolean hasCustomAlphabet(); + /** + *
+   * This is supported by mapping these to the alphanumeric characters
+   * that the FFX mode natively supports. This happens before/after
+   * encryption/decryption.
+   * Each character listed must appear only once.
+   * Number of characters must be in the range [2, 95].
+   * This must be encoded as ASCII.
+   * The order of characters does not matter.
+   * The full list of allowed characters is:
+   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+   * 
+ * + * string custom_alphabet = 5; + * @return The customAlphabet. + */ + java.lang.String getCustomAlphabet(); + /** + *
+   * This is supported by mapping these to the alphanumeric characters
+   * that the FFX mode natively supports. This happens before/after
+   * encryption/decryption.
+   * Each character listed must appear only once.
+   * Number of characters must be in the range [2, 95].
+   * This must be encoded as ASCII.
+   * The order of characters does not matter.
+   * The full list of allowed characters is:
+   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
+   * 
+ * + * string custom_alphabet = 5; + * @return The bytes for customAlphabet. + */ + com.google.protobuf.ByteString + getCustomAlphabetBytes(); + + /** + *
+   * The native way to select the alphabet. Must be in the range [2, 95].
+   * 
+ * + * int32 radix = 6; + * @return Whether the radix field is set. + */ + boolean hasRadix(); + /** + *
+   * The native way to select the alphabet. Must be in the range [2, 95].
+   * 
+ * + * int32 radix = 6; + * @return The radix. + */ + int getRadix(); + + /** + *
+   * The custom infoType to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom infoType followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: info_type_name(surrogate_character_count):surrogate
+   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom infoType
+   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+   * This facilitates reversal of the surrogate when it occurs in free text.
+   * In order for inspection to work properly, the name of this infoType must
+   * not occur naturally anywhere in your data; otherwise, inspection may
+   * find a surrogate that does not correspond to an actual identifier.
+   * Therefore, choose your custom infoType name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + * @return Whether the surrogateInfoType field is set. + */ + boolean hasSurrogateInfoType(); + /** + *
+   * The custom infoType to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom infoType followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: info_type_name(surrogate_character_count):surrogate
+   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom infoType
+   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+   * This facilitates reversal of the surrogate when it occurs in free text.
+   * In order for inspection to work properly, the name of this infoType must
+   * not occur naturally anywhere in your data; otherwise, inspection may
+   * find a surrogate that does not correspond to an actual identifier.
+   * Therefore, choose your custom infoType name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + * @return The surrogateInfoType. + */ + com.google.privacy.dlp.v2.InfoType getSurrogateInfoType(); + /** + *
+   * The custom infoType to annotate the surrogate with.
+   * This annotation will be applied to the surrogate by prefixing it with
+   * the name of the custom infoType followed by the number of
+   * characters comprising the surrogate. The following scheme defines the
+   * format: info_type_name(surrogate_character_count):surrogate
+   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
+   * the surrogate is 'abc', the full replacement value
+   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
+   * This annotation identifies the surrogate when inspecting content using the
+   * custom infoType
+   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
+   * This facilitates reversal of the surrogate when it occurs in free text.
+   * In order for inspection to work properly, the name of this infoType must
+   * not occur naturally anywhere in your data; otherwise, inspection may
+   * find a surrogate that does not correspond to an actual identifier.
+   * Therefore, choose your custom infoType name carefully after considering
+   * what your data looks like. One way to select a name that has a high chance
+   * of yielding reliable detection is to include one or more unicode characters
+   * that are highly improbable to exist in your data.
+   * For example, assuming your data is entered from a regular ASCII keyboard,
+   * the symbol with the hex code point 29DD might be used like so:
+   * ⧝MY_TOKEN_TYPE
+   * 
+ * + * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder(); + + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.AlphabetCase getAlphabetCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java new file mode 100644 index 000000000000..6ab039fca74e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java @@ -0,0 +1,9675 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Custom information type provided by the user. Used to find domain-specific
+ * sensitive information configurable to the data in question.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType} + */ +public final class CustomInfoType extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType) + CustomInfoTypeOrBuilder { +private static final long serialVersionUID = 0L; + // Use CustomInfoType.newBuilder() to construct. + private CustomInfoType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CustomInfoType() { + likelihood_ = 0; + detectionRules_ = java.util.Collections.emptyList(); + exclusionType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CustomInfoType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CustomInfoType( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (infoType_ != null) { + subBuilder = infoType_.toBuilder(); + } + infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(infoType_); + infoType_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder subBuilder = null; + if (typeCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null; + if (typeCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 3; + break; + } + case 34: { + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder subBuilder = null; + if (typeCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 4; + break; + } + case 42: { + com.google.privacy.dlp.v2.StoredType.Builder subBuilder = null; + if (typeCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.StoredType) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.StoredType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.StoredType) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 5; + break; + } + case 48: { + int rawValue = input.readEnum(); + + likelihood_ = rawValue; + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + detectionRules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + detectionRules_.add( + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.parser(), extensionRegistry)); + break; + } + case 64: { + int rawValue = input.readEnum(); + + exclusionType_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + detectionRules_ = java.util.Collections.unmodifiableList(detectionRules_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.class, com.google.privacy.dlp.v2.CustomInfoType.Builder.class); + } + + /** + * Protobuf enum {@code google.privacy.dlp.v2.CustomInfoType.ExclusionType} + */ + public enum ExclusionType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * A finding of this custom info type will not be excluded from results.
+     * 
+ * + * EXCLUSION_TYPE_UNSPECIFIED = 0; + */ + EXCLUSION_TYPE_UNSPECIFIED(0), + /** + *
+     * A finding of this custom info type will be excluded from final results,
+     * but can still affect rule execution.
+     * 
+ * + * EXCLUSION_TYPE_EXCLUDE = 1; + */ + EXCLUSION_TYPE_EXCLUDE(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     * A finding of this custom info type will not be excluded from results.
+     * 
+ * + * EXCLUSION_TYPE_UNSPECIFIED = 0; + */ + public static final int EXCLUSION_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * A finding of this custom info type will be excluded from final results,
+     * but can still affect rule execution.
+     * 
+ * + * EXCLUSION_TYPE_EXCLUDE = 1; + */ + public static final int EXCLUSION_TYPE_EXCLUDE_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ExclusionType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ExclusionType forNumber(int value) { + switch (value) { + case 0: return EXCLUSION_TYPE_UNSPECIFIED; + case 1: return EXCLUSION_TYPE_EXCLUDE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ExclusionType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ExclusionType findValueByNumber(int number) { + return ExclusionType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.CustomInfoType.getDescriptor().getEnumTypes().get(0); + } + + private static final ExclusionType[] VALUES = values(); + + public static ExclusionType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ExclusionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CustomInfoType.ExclusionType) + } + + public interface DictionaryOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Dictionary) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * List of words or phrases to search for.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return Whether the wordList field is set. + */ + boolean hasWordList(); + /** + *
+     * List of words or phrases to search for.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return The wordList. + */ + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList(); + /** + *
+     * List of words or phrases to search for.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder(); + + /** + *
+     * Newline-delimited file of words in Cloud Storage. Only a single file
+     * is accepted.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + * @return Whether the cloudStoragePath field is set. + */ + boolean hasCloudStoragePath(); + /** + *
+     * Newline-delimited file of words in Cloud Storage. Only a single file
+     * is accepted.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + * @return The cloudStoragePath. + */ + com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath(); + /** + *
+     * Newline-delimited file of words in Cloud Storage. Only a single file
+     * is accepted.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + */ + com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder(); + + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.SourceCase getSourceCase(); + } + /** + *
+   * Custom information type based on a dictionary of words or phrases. This can
+   * be used to match sensitive information specific to the data, such as a list
+   * of employee IDs or job titles.
+   * Dictionary words are case-insensitive and all characters other than letters
+   * and digits in the unicode [Basic Multilingual
+   * Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
+   * will be replaced with whitespace when scanning for matches, so the
+   * dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
+   * "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
+   * surrounding any match must be of a different type than the adjacent
+   * characters within the word, so letters must be next to non-letters and
+   * digits next to non-digits. For example, the dictionary word "jen" will
+   * match the first three letters of the text "jen123" but will return no
+   * matches for "jennifer".
+   * Dictionary words containing a large number of characters that are not
+   * letters or digits may result in unexpected findings because such characters
+   * are treated as whitespace. The
+   * [limits](https://cloud.google.com/dlp/limits) page contains details about
+   * the size limits of dictionaries. For dictionaries that do not fit within
+   * these constraints, consider using `LargeCustomDictionaryConfig` in the
+   * `StoredInfoType` API.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary} + */ + public static final class Dictionary extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary) + DictionaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Dictionary.newBuilder() to construct. + private Dictionary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Dictionary() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Dictionary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Dictionary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder subBuilder = null; + if (sourceCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + case 26: { + com.google.privacy.dlp.v2.CloudStoragePath.Builder subBuilder = null; + if (sourceCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.CloudStoragePath) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.privacy.dlp.v2.CloudStoragePath.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CloudStoragePath) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 3; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.class, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder.class); + } + + public interface WordListOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Words or phrases defining the dictionary. The dictionary must contain
+       * at least one phrase and every phrase must contain at least 2 characters
+       * that are letters or digits. [required]
+       * 
+ * + * repeated string words = 1; + * @return A list containing the words. + */ + java.util.List + getWordsList(); + /** + *
+       * Words or phrases defining the dictionary. The dictionary must contain
+       * at least one phrase and every phrase must contain at least 2 characters
+       * that are letters or digits. [required]
+       * 
+ * + * repeated string words = 1; + * @return The count of words. + */ + int getWordsCount(); + /** + *
+       * Words or phrases defining the dictionary. The dictionary must contain
+       * at least one phrase and every phrase must contain at least 2 characters
+       * that are letters or digits. [required]
+       * 
+ * + * repeated string words = 1; + * @param index The index of the element to return. + * @return The words at the given index. + */ + java.lang.String getWords(int index); + /** + *
+       * Words or phrases defining the dictionary. The dictionary must contain
+       * at least one phrase and every phrase must contain at least 2 characters
+       * that are letters or digits. [required]
+       * 
+ * + * repeated string words = 1; + * @param index The index of the value to return. + * @return The bytes of the words at the given index. + */ + com.google.protobuf.ByteString + getWordsBytes(int index); + } + /** + *
+     * Message defining a list of words or phrases to search for in the data.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList} + */ + public static final class WordList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) + WordListOrBuilder { + private static final long serialVersionUID = 0L; + // Use WordList.newBuilder() to construct. + private WordList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WordList() { + words_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WordList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WordList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + words_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + words_ = words_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.class, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder.class); + } + + public static final int WORDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList words_; + /** + *
+       * Words or phrases defining the dictionary. The dictionary must contain
+       * at least one phrase and every phrase must contain at least 2 characters
+       * that are letters or digits. [required]
+       * 
+ * + * repeated string words = 1; + * @return A list containing the words. + */ + public com.google.protobuf.ProtocolStringList + getWordsList() { + return words_; + } + /** + *
+       * Words or phrases defining the dictionary. The dictionary must contain
+       * at least one phrase and every phrase must contain at least 2 characters
+       * that are letters or digits. [required]
+       * 
+ * + * repeated string words = 1; + * @return The count of words. + */ + public int getWordsCount() { + return words_.size(); + } + /** + *
+       * Words or phrases defining the dictionary. The dictionary must contain
+       * at least one phrase and every phrase must contain at least 2 characters
+       * that are letters or digits. [required]
+       * 
+ * + * repeated string words = 1; + * @param index The index of the element to return. + * @return The words at the given index. + */ + public java.lang.String getWords(int index) { + return words_.get(index); + } + /** + *
+       * Words or phrases defining the dictionary. The dictionary must contain
+       * at least one phrase and every phrase must contain at least 2 characters
+       * that are letters or digits. [required]
+       * 
+ * + * repeated string words = 1; + * @param index The index of the value to return. + * @return The bytes of the words at the given index. + */ + public com.google.protobuf.ByteString + getWordsBytes(int index) { + return words_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < words_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, words_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < words_.size(); i++) { + dataSize += computeStringSizeNoTag(words_.getRaw(i)); + } + size += dataSize; + size += 1 * getWordsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList other = (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) obj; + + if (!getWordsList() + .equals(other.getWordsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getWordsCount() > 0) { + hash = (37 * hash) + WORDS_FIELD_NUMBER; + hash = (53 * hash) + getWordsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Message defining a list of words or phrases to search for in the data.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.class, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + words_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList build() { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList buildPartial() { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + words_ = words_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.words_ = words_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) { + return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList other) { + if (other == com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance()) return this; + if (!other.words_.isEmpty()) { + if (words_.isEmpty()) { + words_ = other.words_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWordsIsMutable(); + words_.addAll(other.words_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList words_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureWordsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + words_ = new com.google.protobuf.LazyStringArrayList(words_); + bitField0_ |= 0x00000001; + } + } + /** + *
+         * Words or phrases defining the dictionary. The dictionary must contain
+         * at least one phrase and every phrase must contain at least 2 characters
+         * that are letters or digits. [required]
+         * 
+ * + * repeated string words = 1; + * @return A list containing the words. + */ + public com.google.protobuf.ProtocolStringList + getWordsList() { + return words_.getUnmodifiableView(); + } + /** + *
+         * Words or phrases defining the dictionary. The dictionary must contain
+         * at least one phrase and every phrase must contain at least 2 characters
+         * that are letters or digits. [required]
+         * 
+ * + * repeated string words = 1; + * @return The count of words. + */ + public int getWordsCount() { + return words_.size(); + } + /** + *
+         * Words or phrases defining the dictionary. The dictionary must contain
+         * at least one phrase and every phrase must contain at least 2 characters
+         * that are letters or digits. [required]
+         * 
+ * + * repeated string words = 1; + * @param index The index of the element to return. + * @return The words at the given index. + */ + public java.lang.String getWords(int index) { + return words_.get(index); + } + /** + *
+         * Words or phrases defining the dictionary. The dictionary must contain
+         * at least one phrase and every phrase must contain at least 2 characters
+         * that are letters or digits. [required]
+         * 
+ * + * repeated string words = 1; + * @param index The index of the value to return. + * @return The bytes of the words at the given index. + */ + public com.google.protobuf.ByteString + getWordsBytes(int index) { + return words_.getByteString(index); + } + /** + *
+         * Words or phrases defining the dictionary. The dictionary must contain
+         * at least one phrase and every phrase must contain at least 2 characters
+         * that are letters or digits. [required]
+         * 
+ * + * repeated string words = 1; + * @param index The index to set the value at. + * @param value The words to set. + * @return This builder for chaining. + */ + public Builder setWords( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.set(index, value); + onChanged(); + return this; + } + /** + *
+         * Words or phrases defining the dictionary. The dictionary must contain
+         * at least one phrase and every phrase must contain at least 2 characters
+         * that are letters or digits. [required]
+         * 
+ * + * repeated string words = 1; + * @param value The words to add. + * @return This builder for chaining. + */ + public Builder addWords( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWordsIsMutable(); + words_.add(value); + onChanged(); + return this; + } + /** + *
+         * Words or phrases defining the dictionary. The dictionary must contain
+         * at least one phrase and every phrase must contain at least 2 characters
+         * that are letters or digits. [required]
+         * 
+ * + * repeated string words = 1; + * @param values The words to add. + * @return This builder for chaining. + */ + public Builder addAllWords( + java.lang.Iterable values) { + ensureWordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, words_); + onChanged(); + return this; + } + /** + *
+         * Words or phrases defining the dictionary. The dictionary must contain
+         * at least one phrase and every phrase must contain at least 2 characters
+         * that are letters or digits. [required]
+         * 
+ * + * repeated string words = 1; + * @return This builder for chaining. + */ + public Builder clearWords() { + words_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+         * Words or phrases defining the dictionary. The dictionary must contain
+         * at least one phrase and every phrase must contain at least 2 characters
+         * that are letters or digits. [required]
+         * 
+ * + * repeated string words = 1; + * @param value The bytes of the words to add. + * @return This builder for chaining. + */ + public Builder addWordsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWordsIsMutable(); + words_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) + private static final com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList(); + } + + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WordList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WordList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + public enum SourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + WORD_LIST(1), + CLOUD_STORAGE_PATH(3), + SOURCE_NOT_SET(0); + private final int value; + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: return WORD_LIST; + case 3: return CLOUD_STORAGE_PATH; + case 0: return SOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public static final int WORD_LIST_FIELD_NUMBER = 1; + /** + *
+     * List of words or phrases to search for.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return Whether the wordList field is set. + */ + @java.lang.Override + public boolean hasWordList() { + return sourceCase_ == 1; + } + /** + *
+     * List of words or phrases to search for.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return The wordList. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() { + if (sourceCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + /** + *
+     * List of words or phrases to search for.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + + public static final int CLOUD_STORAGE_PATH_FIELD_NUMBER = 3; + /** + *
+     * Newline-delimited file of words in Cloud Storage. Only a single file
+     * is accepted.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + * @return Whether the cloudStoragePath field is set. + */ + @java.lang.Override + public boolean hasCloudStoragePath() { + return sourceCase_ == 3; + } + /** + *
+     * Newline-delimited file of words in Cloud Storage. Only a single file
+     * is accepted.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + * @return The cloudStoragePath. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath() { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.CloudStoragePath) source_; + } + return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); + } + /** + *
+     * Newline-delimited file of words in Cloud Storage. Only a single file
+     * is accepted.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder() { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.CloudStoragePath) source_; + } + return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (sourceCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_); + } + if (sourceCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.CloudStoragePath) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_); + } + if (sourceCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.CloudStoragePath) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CustomInfoType.Dictionary other = (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) obj; + + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getWordList() + .equals(other.getWordList())) return false; + break; + case 3: + if (!getCloudStoragePath() + .equals(other.getCloudStoragePath())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + WORD_LIST_FIELD_NUMBER; + hash = (53 * hash) + getWordList().hashCode(); + break; + case 3: + hash = (37 * hash) + CLOUD_STORAGE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getCloudStoragePath().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.Dictionary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Custom information type based on a dictionary of words or phrases. This can
+     * be used to match sensitive information specific to the data, such as a list
+     * of employee IDs or job titles.
+     * Dictionary words are case-insensitive and all characters other than letters
+     * and digits in the unicode [Basic Multilingual
+     * Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
+     * will be replaced with whitespace when scanning for matches, so the
+     * dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
+     * "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
+     * surrounding any match must be of a different type than the adjacent
+     * characters within the word, so letters must be next to non-letters and
+     * digits next to non-digits. For example, the dictionary word "jen" will
+     * match the first three letters of the text "jen123" but will return no
+     * matches for "jennifer".
+     * Dictionary words containing a large number of characters that are not
+     * letters or digits may result in unexpected findings because such characters
+     * are treated as whitespace. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries. For dictionaries that do not fit within
+     * these constraints, consider using `LargeCustomDictionaryConfig` in the
+     * `StoredInfoType` API.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary) + com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.class, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary build() { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary buildPartial() { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary result = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary(this); + if (sourceCase_ == 1) { + if (wordListBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = wordListBuilder_.build(); + } + } + if (sourceCase_ == 3) { + if (cloudStoragePathBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = cloudStoragePathBuilder_.build(); + } + } + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary) { + return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Dictionary other) { + if (other == com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) return this; + switch (other.getSourceCase()) { + case WORD_LIST: { + mergeWordList(other.getWordList()); + break; + } + case CLOUD_STORAGE_PATH: { + mergeCloudStoragePath(other.getCloudStoragePath()); + break; + } + case SOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int sourceCase_ = 0; + private java.lang.Object source_; + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder> wordListBuilder_; + /** + *
+       * List of words or phrases to search for.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return Whether the wordList field is set. + */ + @java.lang.Override + public boolean hasWordList() { + return sourceCase_ == 1; + } + /** + *
+       * List of words or phrases to search for.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return The wordList. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() { + if (wordListBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return wordListBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + } + /** + *
+       * List of words or phrases to search for.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public Builder setWordList(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) { + if (wordListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + wordListBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + *
+       * List of words or phrases to search for.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public Builder setWordList( + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder builderForValue) { + if (wordListBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + wordListBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + /** + *
+       * List of words or phrases to search for.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public Builder mergeWordList(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) { + if (wordListBuilder_ == null) { + if (sourceCase_ == 1 && + source_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance()) { + source_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + wordListBuilder_.mergeFrom(value); + } else { + wordListBuilder_.setMessage(value); + } + } + sourceCase_ = 1; + return this; + } + /** + *
+       * List of words or phrases to search for.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public Builder clearWordList() { + if (wordListBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + wordListBuilder_.clear(); + } + return this; + } + /** + *
+       * List of words or phrases to search for.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder getWordListBuilder() { + return getWordListFieldBuilder().getBuilder(); + } + /** + *
+       * List of words or phrases to search for.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder() { + if ((sourceCase_ == 1) && (wordListBuilder_ != null)) { + return wordListBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + } + /** + *
+       * List of words or phrases to search for.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder> + getWordListFieldBuilder() { + if (wordListBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + wordListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged();; + return wordListBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> cloudStoragePathBuilder_; + /** + *
+       * Newline-delimited file of words in Cloud Storage. Only a single file
+       * is accepted.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + * @return Whether the cloudStoragePath field is set. + */ + @java.lang.Override + public boolean hasCloudStoragePath() { + return sourceCase_ == 3; + } + /** + *
+       * Newline-delimited file of words in Cloud Storage. Only a single file
+       * is accepted.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + * @return The cloudStoragePath. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath() { + if (cloudStoragePathBuilder_ == null) { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.CloudStoragePath) source_; + } + return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); + } else { + if (sourceCase_ == 3) { + return cloudStoragePathBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); + } + } + /** + *
+       * Newline-delimited file of words in Cloud Storage. Only a single file
+       * is accepted.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + */ + public Builder setCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value) { + if (cloudStoragePathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + cloudStoragePathBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + *
+       * Newline-delimited file of words in Cloud Storage. Only a single file
+       * is accepted.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + */ + public Builder setCloudStoragePath( + com.google.privacy.dlp.v2.CloudStoragePath.Builder builderForValue) { + if (cloudStoragePathBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + cloudStoragePathBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 3; + return this; + } + /** + *
+       * Newline-delimited file of words in Cloud Storage. Only a single file
+       * is accepted.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + */ + public Builder mergeCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value) { + if (cloudStoragePathBuilder_ == null) { + if (sourceCase_ == 3 && + source_ != com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance()) { + source_ = com.google.privacy.dlp.v2.CloudStoragePath.newBuilder((com.google.privacy.dlp.v2.CloudStoragePath) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 3) { + cloudStoragePathBuilder_.mergeFrom(value); + } else { + cloudStoragePathBuilder_.setMessage(value); + } + } + sourceCase_ = 3; + return this; + } + /** + *
+       * Newline-delimited file of words in Cloud Storage. Only a single file
+       * is accepted.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + */ + public Builder clearCloudStoragePath() { + if (cloudStoragePathBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + cloudStoragePathBuilder_.clear(); + } + return this; + } + /** + *
+       * Newline-delimited file of words in Cloud Storage. Only a single file
+       * is accepted.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + */ + public com.google.privacy.dlp.v2.CloudStoragePath.Builder getCloudStoragePathBuilder() { + return getCloudStoragePathFieldBuilder().getBuilder(); + } + /** + *
+       * Newline-delimited file of words in Cloud Storage. Only a single file
+       * is accepted.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder() { + if ((sourceCase_ == 3) && (cloudStoragePathBuilder_ != null)) { + return cloudStoragePathBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.CloudStoragePath) source_; + } + return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); + } + } + /** + *
+       * Newline-delimited file of words in Cloud Storage. Only a single file
+       * is accepted.
+       * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> + getCloudStoragePathFieldBuilder() { + if (cloudStoragePathBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); + } + cloudStoragePathBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>( + (com.google.privacy.dlp.v2.CloudStoragePath) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; + onChanged();; + return cloudStoragePathBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary) + private static final com.google.privacy.dlp.v2.CustomInfoType.Dictionary DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary(); + } + + public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Dictionary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Dictionary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RegexOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Regex) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Pattern defining the regular expression. Its syntax
+     * (https://github.com/google/re2/wiki/Syntax) can be found under the
+     * google/re2 repository on GitHub.
+     * 
+ * + * string pattern = 1; + * @return The pattern. + */ + java.lang.String getPattern(); + /** + *
+     * Pattern defining the regular expression. Its syntax
+     * (https://github.com/google/re2/wiki/Syntax) can be found under the
+     * google/re2 repository on GitHub.
+     * 
+ * + * string pattern = 1; + * @return The bytes for pattern. + */ + com.google.protobuf.ByteString + getPatternBytes(); + + /** + *
+     * The index of the submatch to extract as findings. When not
+     * specified, the entire match is returned. No more than 3 may be included.
+     * 
+ * + * repeated int32 group_indexes = 2; + * @return A list containing the groupIndexes. + */ + java.util.List getGroupIndexesList(); + /** + *
+     * The index of the submatch to extract as findings. When not
+     * specified, the entire match is returned. No more than 3 may be included.
+     * 
+ * + * repeated int32 group_indexes = 2; + * @return The count of groupIndexes. + */ + int getGroupIndexesCount(); + /** + *
+     * The index of the submatch to extract as findings. When not
+     * specified, the entire match is returned. No more than 3 may be included.
+     * 
+ * + * repeated int32 group_indexes = 2; + * @param index The index of the element to return. + * @return The groupIndexes at the given index. + */ + int getGroupIndexes(int index); + } + /** + *
+   * Message defining a custom regular expression.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Regex} + */ + public static final class Regex extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Regex) + RegexOrBuilder { + private static final long serialVersionUID = 0L; + // Use Regex.newBuilder() to construct. + private Regex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Regex() { + pattern_ = ""; + groupIndexes_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Regex(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Regex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + pattern_ = s; + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + groupIndexes_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + groupIndexes_.addInt(input.readInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + groupIndexes_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + groupIndexes_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + groupIndexes_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.Regex.class, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder.class); + } + + public static final int PATTERN_FIELD_NUMBER = 1; + private volatile java.lang.Object pattern_; + /** + *
+     * Pattern defining the regular expression. Its syntax
+     * (https://github.com/google/re2/wiki/Syntax) can be found under the
+     * google/re2 repository on GitHub.
+     * 
+ * + * string pattern = 1; + * @return The pattern. + */ + @java.lang.Override + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } + } + /** + *
+     * Pattern defining the regular expression. Its syntax
+     * (https://github.com/google/re2/wiki/Syntax) can be found under the
+     * google/re2 repository on GitHub.
+     * 
+ * + * string pattern = 1; + * @return The bytes for pattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_INDEXES_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.IntList groupIndexes_; + /** + *
+     * The index of the submatch to extract as findings. When not
+     * specified, the entire match is returned. No more than 3 may be included.
+     * 
+ * + * repeated int32 group_indexes = 2; + * @return A list containing the groupIndexes. + */ + @java.lang.Override + public java.util.List + getGroupIndexesList() { + return groupIndexes_; + } + /** + *
+     * The index of the submatch to extract as findings. When not
+     * specified, the entire match is returned. No more than 3 may be included.
+     * 
+ * + * repeated int32 group_indexes = 2; + * @return The count of groupIndexes. + */ + public int getGroupIndexesCount() { + return groupIndexes_.size(); + } + /** + *
+     * The index of the submatch to extract as findings. When not
+     * specified, the entire match is returned. No more than 3 may be included.
+     * 
+ * + * repeated int32 group_indexes = 2; + * @param index The index of the element to return. + * @return The groupIndexes at the given index. + */ + public int getGroupIndexes(int index) { + return groupIndexes_.getInt(index); + } + private int groupIndexesMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pattern_); + } + if (getGroupIndexesList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(groupIndexesMemoizedSerializedSize); + } + for (int i = 0; i < groupIndexes_.size(); i++) { + output.writeInt32NoTag(groupIndexes_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pattern_); + } + { + int dataSize = 0; + for (int i = 0; i < groupIndexes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(groupIndexes_.getInt(i)); + } + size += dataSize; + if (!getGroupIndexesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + groupIndexesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Regex)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CustomInfoType.Regex other = (com.google.privacy.dlp.v2.CustomInfoType.Regex) obj; + + if (!getPattern() + .equals(other.getPattern())) return false; + if (!getGroupIndexesList() + .equals(other.getGroupIndexesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getPattern().hashCode(); + if (getGroupIndexesCount() > 0) { + hash = (37 * hash) + GROUP_INDEXES_FIELD_NUMBER; + hash = (53 * hash) + getGroupIndexesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.Regex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message defining a custom regular expression.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Regex} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Regex) + com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.Regex.class, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + pattern_ = ""; + + groupIndexes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex build() { + com.google.privacy.dlp.v2.CustomInfoType.Regex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex buildPartial() { + com.google.privacy.dlp.v2.CustomInfoType.Regex result = new com.google.privacy.dlp.v2.CustomInfoType.Regex(this); + int from_bitField0_ = bitField0_; + result.pattern_ = pattern_; + if (((bitField0_ & 0x00000001) != 0)) { + groupIndexes_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupIndexes_ = groupIndexes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Regex) { + return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Regex other) { + if (other == com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) return this; + if (!other.getPattern().isEmpty()) { + pattern_ = other.pattern_; + onChanged(); + } + if (!other.groupIndexes_.isEmpty()) { + if (groupIndexes_.isEmpty()) { + groupIndexes_ = other.groupIndexes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupIndexesIsMutable(); + groupIndexes_.addAll(other.groupIndexes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CustomInfoType.Regex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.Regex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object pattern_ = ""; + /** + *
+       * Pattern defining the regular expression. Its syntax
+       * (https://github.com/google/re2/wiki/Syntax) can be found under the
+       * google/re2 repository on GitHub.
+       * 
+ * + * string pattern = 1; + * @return The pattern. + */ + public java.lang.String getPattern() { + java.lang.Object ref = pattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Pattern defining the regular expression. Its syntax
+       * (https://github.com/google/re2/wiki/Syntax) can be found under the
+       * google/re2 repository on GitHub.
+       * 
+ * + * string pattern = 1; + * @return The bytes for pattern. + */ + public com.google.protobuf.ByteString + getPatternBytes() { + java.lang.Object ref = pattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Pattern defining the regular expression. Its syntax
+       * (https://github.com/google/re2/wiki/Syntax) can be found under the
+       * google/re2 repository on GitHub.
+       * 
+ * + * string pattern = 1; + * @param value The pattern to set. + * @return This builder for chaining. + */ + public Builder setPattern( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pattern_ = value; + onChanged(); + return this; + } + /** + *
+       * Pattern defining the regular expression. Its syntax
+       * (https://github.com/google/re2/wiki/Syntax) can be found under the
+       * google/re2 repository on GitHub.
+       * 
+ * + * string pattern = 1; + * @return This builder for chaining. + */ + public Builder clearPattern() { + + pattern_ = getDefaultInstance().getPattern(); + onChanged(); + return this; + } + /** + *
+       * Pattern defining the regular expression. Its syntax
+       * (https://github.com/google/re2/wiki/Syntax) can be found under the
+       * google/re2 repository on GitHub.
+       * 
+ * + * string pattern = 1; + * @param value The bytes for pattern to set. + * @return This builder for chaining. + */ + public Builder setPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pattern_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList groupIndexes_ = emptyIntList(); + private void ensureGroupIndexesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + groupIndexes_ = mutableCopy(groupIndexes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * The index of the submatch to extract as findings. When not
+       * specified, the entire match is returned. No more than 3 may be included.
+       * 
+ * + * repeated int32 group_indexes = 2; + * @return A list containing the groupIndexes. + */ + public java.util.List + getGroupIndexesList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(groupIndexes_) : groupIndexes_; + } + /** + *
+       * The index of the submatch to extract as findings. When not
+       * specified, the entire match is returned. No more than 3 may be included.
+       * 
+ * + * repeated int32 group_indexes = 2; + * @return The count of groupIndexes. + */ + public int getGroupIndexesCount() { + return groupIndexes_.size(); + } + /** + *
+       * The index of the submatch to extract as findings. When not
+       * specified, the entire match is returned. No more than 3 may be included.
+       * 
+ * + * repeated int32 group_indexes = 2; + * @param index The index of the element to return. + * @return The groupIndexes at the given index. + */ + public int getGroupIndexes(int index) { + return groupIndexes_.getInt(index); + } + /** + *
+       * The index of the submatch to extract as findings. When not
+       * specified, the entire match is returned. No more than 3 may be included.
+       * 
+ * + * repeated int32 group_indexes = 2; + * @param index The index to set the value at. + * @param value The groupIndexes to set. + * @return This builder for chaining. + */ + public Builder setGroupIndexes( + int index, int value) { + ensureGroupIndexesIsMutable(); + groupIndexes_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+       * The index of the submatch to extract as findings. When not
+       * specified, the entire match is returned. No more than 3 may be included.
+       * 
+ * + * repeated int32 group_indexes = 2; + * @param value The groupIndexes to add. + * @return This builder for chaining. + */ + public Builder addGroupIndexes(int value) { + ensureGroupIndexesIsMutable(); + groupIndexes_.addInt(value); + onChanged(); + return this; + } + /** + *
+       * The index of the submatch to extract as findings. When not
+       * specified, the entire match is returned. No more than 3 may be included.
+       * 
+ * + * repeated int32 group_indexes = 2; + * @param values The groupIndexes to add. + * @return This builder for chaining. + */ + public Builder addAllGroupIndexes( + java.lang.Iterable values) { + ensureGroupIndexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupIndexes_); + onChanged(); + return this; + } + /** + *
+       * The index of the submatch to extract as findings. When not
+       * specified, the entire match is returned. No more than 3 may be included.
+       * 
+ * + * repeated int32 group_indexes = 2; + * @return This builder for chaining. + */ + public Builder clearGroupIndexes() { + groupIndexes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Regex) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Regex) + private static final com.google.privacy.dlp.v2.CustomInfoType.Regex DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Regex(); + } + + public static com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Regex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Regex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SurrogateTypeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.SurrogateType) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Message for detecting output from deidentification transformations
+   * such as
+   * [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
+   * These types of transformations are
+   * those that perform pseudonymization, thereby producing a "surrogate" as
+   * output. This should be used in conjunction with a field on the
+   * transformation such as `surrogate_info_type`. This CustomInfoType does
+   * not support the use of `detection_rules`.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.SurrogateType} + */ + public static final class SurrogateType extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.SurrogateType) + SurrogateTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use SurrogateType.newBuilder() to construct. + private SurrogateType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SurrogateType() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SurrogateType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SurrogateType( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.class, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.SurrogateType)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType other = (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message for detecting output from deidentification transformations
+     * such as
+     * [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
+     * These types of transformations are
+     * those that perform pseudonymization, thereby producing a "surrogate" as
+     * output. This should be used in conjunction with a field on the
+     * transformation such as `surrogate_info_type`. This CustomInfoType does
+     * not support the use of `detection_rules`.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.SurrogateType} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.SurrogateType) + com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.class, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType build() { + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType buildPartial() { + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType result = new com.google.privacy.dlp.v2.CustomInfoType.SurrogateType(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) { + return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType other) { + if (other == com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.SurrogateType) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.SurrogateType) + private static final com.google.privacy.dlp.v2.CustomInfoType.SurrogateType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.SurrogateType(); + } + + public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SurrogateType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SurrogateType(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetectionRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return Whether the hotwordRule field is set. + */ + boolean hasHotwordRule(); + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return The hotwordRule. + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule(); + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder(); + + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.TypeCase getTypeCase(); + } + /** + *
+   * Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
+   * `CustomInfoType` to alter behavior under certain circumstances, depending
+   * on the specific details of the rule. Not supported for the `surrogate_type`
+   * custom infoType.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule} + */ + public static final class DetectionRule extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule) + DetectionRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectionRule.newBuilder() to construct. + private DetectionRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectionRule() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectionRule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectionRule( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder subBuilder = null; + if (typeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder.class); + } + + public interface ProximityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Number of characters before the finding to consider. For tabular data,
+       * if you want to modify the likelihood of an entire column of findngs,
+       * set this to 1. For more information, see
+       * [Hotword example: Set the match likelihood of a table column]
+       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+       * 
+ * + * int32 window_before = 1; + * @return The windowBefore. + */ + int getWindowBefore(); + + /** + *
+       * Number of characters after the finding to consider.
+       * 
+ * + * int32 window_after = 2; + * @return The windowAfter. + */ + int getWindowAfter(); + } + /** + *
+     * Message for specifying a window around a finding to apply a detection
+     * rule.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity} + */ + public static final class Proximity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) + ProximityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Proximity.newBuilder() to construct. + private Proximity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Proximity() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Proximity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Proximity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + windowBefore_ = input.readInt32(); + break; + } + case 16: { + + windowAfter_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder.class); + } + + public static final int WINDOW_BEFORE_FIELD_NUMBER = 1; + private int windowBefore_; + /** + *
+       * Number of characters before the finding to consider. For tabular data,
+       * if you want to modify the likelihood of an entire column of findngs,
+       * set this to 1. For more information, see
+       * [Hotword example: Set the match likelihood of a table column]
+       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+       * 
+ * + * int32 window_before = 1; + * @return The windowBefore. + */ + @java.lang.Override + public int getWindowBefore() { + return windowBefore_; + } + + public static final int WINDOW_AFTER_FIELD_NUMBER = 2; + private int windowAfter_; + /** + *
+       * Number of characters after the finding to consider.
+       * 
+ * + * int32 window_after = 2; + * @return The windowAfter. + */ + @java.lang.Override + public int getWindowAfter() { + return windowAfter_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (windowBefore_ != 0) { + output.writeInt32(1, windowBefore_); + } + if (windowAfter_ != 0) { + output.writeInt32(2, windowAfter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (windowBefore_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, windowBefore_); + } + if (windowAfter_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, windowAfter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity other = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) obj; + + if (getWindowBefore() + != other.getWindowBefore()) return false; + if (getWindowAfter() + != other.getWindowAfter()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WINDOW_BEFORE_FIELD_NUMBER; + hash = (53 * hash) + getWindowBefore(); + hash = (37 * hash) + WINDOW_AFTER_FIELD_NUMBER; + hash = (53 * hash) + getWindowAfter(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Message for specifying a window around a finding to apply a detection
+       * rule.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + windowBefore_ = 0; + + windowAfter_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity build() { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity buildPartial() { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity(this); + result.windowBefore_ = windowBefore_; + result.windowAfter_ = windowAfter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) { + return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity other) { + if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance()) return this; + if (other.getWindowBefore() != 0) { + setWindowBefore(other.getWindowBefore()); + } + if (other.getWindowAfter() != 0) { + setWindowAfter(other.getWindowAfter()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int windowBefore_ ; + /** + *
+         * Number of characters before the finding to consider. For tabular data,
+         * if you want to modify the likelihood of an entire column of findngs,
+         * set this to 1. For more information, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * int32 window_before = 1; + * @return The windowBefore. + */ + @java.lang.Override + public int getWindowBefore() { + return windowBefore_; + } + /** + *
+         * Number of characters before the finding to consider. For tabular data,
+         * if you want to modify the likelihood of an entire column of findngs,
+         * set this to 1. For more information, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * int32 window_before = 1; + * @param value The windowBefore to set. + * @return This builder for chaining. + */ + public Builder setWindowBefore(int value) { + + windowBefore_ = value; + onChanged(); + return this; + } + /** + *
+         * Number of characters before the finding to consider. For tabular data,
+         * if you want to modify the likelihood of an entire column of findngs,
+         * set this to 1. For more information, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * int32 window_before = 1; + * @return This builder for chaining. + */ + public Builder clearWindowBefore() { + + windowBefore_ = 0; + onChanged(); + return this; + } + + private int windowAfter_ ; + /** + *
+         * Number of characters after the finding to consider.
+         * 
+ * + * int32 window_after = 2; + * @return The windowAfter. + */ + @java.lang.Override + public int getWindowAfter() { + return windowAfter_; + } + /** + *
+         * Number of characters after the finding to consider.
+         * 
+ * + * int32 window_after = 2; + * @param value The windowAfter to set. + * @return This builder for chaining. + */ + public Builder setWindowAfter(int value) { + + windowAfter_ = value; + onChanged(); + return this; + } + /** + *
+         * Number of characters after the finding to consider.
+         * 
+ * + * int32 window_after = 2; + * @return This builder for chaining. + */ + public Builder clearWindowAfter() { + + windowAfter_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) + private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity(); + } + + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Proximity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Proximity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LikelihoodAdjustmentOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Set the likelihood of a finding to a fixed value.
+       * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return Whether the fixedLikelihood field is set. + */ + boolean hasFixedLikelihood(); + /** + *
+       * Set the likelihood of a finding to a fixed value.
+       * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return The enum numeric value on the wire for fixedLikelihood. + */ + int getFixedLikelihoodValue(); + /** + *
+       * Set the likelihood of a finding to a fixed value.
+       * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return The fixedLikelihood. + */ + com.google.privacy.dlp.v2.Likelihood getFixedLikelihood(); + + /** + *
+       * Increase or decrease the likelihood by the specified number of
+       * levels. For example, if a finding would be `POSSIBLE` without the
+       * detection rule and `relative_likelihood` is 1, then it is upgraded to
+       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
+       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
+       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
+       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
+       * a final likelihood of `LIKELY`.
+       * 
+ * + * int32 relative_likelihood = 2; + * @return Whether the relativeLikelihood field is set. + */ + boolean hasRelativeLikelihood(); + /** + *
+       * Increase or decrease the likelihood by the specified number of
+       * levels. For example, if a finding would be `POSSIBLE` without the
+       * detection rule and `relative_likelihood` is 1, then it is upgraded to
+       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
+       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
+       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
+       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
+       * a final likelihood of `LIKELY`.
+       * 
+ * + * int32 relative_likelihood = 2; + * @return The relativeLikelihood. + */ + int getRelativeLikelihood(); + + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.AdjustmentCase getAdjustmentCase(); + } + /** + *
+     * Message for specifying an adjustment to the likelihood of a finding as
+     * part of a detection rule.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment} + */ + public static final class LikelihoodAdjustment extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) + LikelihoodAdjustmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use LikelihoodAdjustment.newBuilder() to construct. + private LikelihoodAdjustment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LikelihoodAdjustment() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LikelihoodAdjustment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LikelihoodAdjustment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + adjustmentCase_ = 1; + adjustment_ = rawValue; + break; + } + case 16: { + adjustment_ = input.readInt32(); + adjustmentCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder.class); + } + + private int adjustmentCase_ = 0; + private java.lang.Object adjustment_; + public enum AdjustmentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FIXED_LIKELIHOOD(1), + RELATIVE_LIKELIHOOD(2), + ADJUSTMENT_NOT_SET(0); + private final int value; + private AdjustmentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AdjustmentCase valueOf(int value) { + return forNumber(value); + } + + public static AdjustmentCase forNumber(int value) { + switch (value) { + case 1: return FIXED_LIKELIHOOD; + case 2: return RELATIVE_LIKELIHOOD; + case 0: return ADJUSTMENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public AdjustmentCase + getAdjustmentCase() { + return AdjustmentCase.forNumber( + adjustmentCase_); + } + + public static final int FIXED_LIKELIHOOD_FIELD_NUMBER = 1; + /** + *
+       * Set the likelihood of a finding to a fixed value.
+       * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return Whether the fixedLikelihood field is set. + */ + public boolean hasFixedLikelihood() { + return adjustmentCase_ == 1; + } + /** + *
+       * Set the likelihood of a finding to a fixed value.
+       * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return The enum numeric value on the wire for fixedLikelihood. + */ + public int getFixedLikelihoodValue() { + if (adjustmentCase_ == 1) { + return (java.lang.Integer) adjustment_; + } + return 0; + } + /** + *
+       * Set the likelihood of a finding to a fixed value.
+       * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return The fixedLikelihood. + */ + public com.google.privacy.dlp.v2.Likelihood getFixedLikelihood() { + if (adjustmentCase_ == 1) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf( + (java.lang.Integer) adjustment_); + return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED; + } + + public static final int RELATIVE_LIKELIHOOD_FIELD_NUMBER = 2; + /** + *
+       * Increase or decrease the likelihood by the specified number of
+       * levels. For example, if a finding would be `POSSIBLE` without the
+       * detection rule and `relative_likelihood` is 1, then it is upgraded to
+       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
+       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
+       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
+       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
+       * a final likelihood of `LIKELY`.
+       * 
+ * + * int32 relative_likelihood = 2; + * @return Whether the relativeLikelihood field is set. + */ + @java.lang.Override + public boolean hasRelativeLikelihood() { + return adjustmentCase_ == 2; + } + /** + *
+       * Increase or decrease the likelihood by the specified number of
+       * levels. For example, if a finding would be `POSSIBLE` without the
+       * detection rule and `relative_likelihood` is 1, then it is upgraded to
+       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
+       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
+       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
+       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
+       * a final likelihood of `LIKELY`.
+       * 
+ * + * int32 relative_likelihood = 2; + * @return The relativeLikelihood. + */ + @java.lang.Override + public int getRelativeLikelihood() { + if (adjustmentCase_ == 2) { + return (java.lang.Integer) adjustment_; + } + return 0; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (adjustmentCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) adjustment_)); + } + if (adjustmentCase_ == 2) { + output.writeInt32( + 2, (int)((java.lang.Integer) adjustment_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (adjustmentCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, ((java.lang.Integer) adjustment_)); + } + if (adjustmentCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size( + 2, (int)((java.lang.Integer) adjustment_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment other = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) obj; + + if (!getAdjustmentCase().equals(other.getAdjustmentCase())) return false; + switch (adjustmentCase_) { + case 1: + if (getFixedLikelihoodValue() + != other.getFixedLikelihoodValue()) return false; + break; + case 2: + if (getRelativeLikelihood() + != other.getRelativeLikelihood()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (adjustmentCase_) { + case 1: + hash = (37 * hash) + FIXED_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + getFixedLikelihoodValue(); + break; + case 2: + hash = (37 * hash) + RELATIVE_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + getRelativeLikelihood(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Message for specifying an adjustment to the likelihood of a finding as
+       * part of a detection rule.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + adjustmentCase_ = 0; + adjustment_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment build() { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment buildPartial() { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment(this); + if (adjustmentCase_ == 1) { + result.adjustment_ = adjustment_; + } + if (adjustmentCase_ == 2) { + result.adjustment_ = adjustment_; + } + result.adjustmentCase_ = adjustmentCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) { + return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment other) { + if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance()) return this; + switch (other.getAdjustmentCase()) { + case FIXED_LIKELIHOOD: { + setFixedLikelihoodValue(other.getFixedLikelihoodValue()); + break; + } + case RELATIVE_LIKELIHOOD: { + setRelativeLikelihood(other.getRelativeLikelihood()); + break; + } + case ADJUSTMENT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int adjustmentCase_ = 0; + private java.lang.Object adjustment_; + public AdjustmentCase + getAdjustmentCase() { + return AdjustmentCase.forNumber( + adjustmentCase_); + } + + public Builder clearAdjustment() { + adjustmentCase_ = 0; + adjustment_ = null; + onChanged(); + return this; + } + + + /** + *
+         * Set the likelihood of a finding to a fixed value.
+         * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return Whether the fixedLikelihood field is set. + */ + @java.lang.Override + public boolean hasFixedLikelihood() { + return adjustmentCase_ == 1; + } + /** + *
+         * Set the likelihood of a finding to a fixed value.
+         * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return The enum numeric value on the wire for fixedLikelihood. + */ + @java.lang.Override + public int getFixedLikelihoodValue() { + if (adjustmentCase_ == 1) { + return ((java.lang.Integer) adjustment_).intValue(); + } + return 0; + } + /** + *
+         * Set the likelihood of a finding to a fixed value.
+         * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @param value The enum numeric value on the wire for fixedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setFixedLikelihoodValue(int value) { + adjustmentCase_ = 1; + adjustment_ = value; + onChanged(); + return this; + } + /** + *
+         * Set the likelihood of a finding to a fixed value.
+         * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return The fixedLikelihood. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Likelihood getFixedLikelihood() { + if (adjustmentCase_ == 1) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf( + (java.lang.Integer) adjustment_); + return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED; + } + /** + *
+         * Set the likelihood of a finding to a fixed value.
+         * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @param value The fixedLikelihood to set. + * @return This builder for chaining. + */ + public Builder setFixedLikelihood(com.google.privacy.dlp.v2.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + adjustmentCase_ = 1; + adjustment_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+         * Set the likelihood of a finding to a fixed value.
+         * 
+ * + * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; + * @return This builder for chaining. + */ + public Builder clearFixedLikelihood() { + if (adjustmentCase_ == 1) { + adjustmentCase_ = 0; + adjustment_ = null; + onChanged(); + } + return this; + } + + /** + *
+         * Increase or decrease the likelihood by the specified number of
+         * levels. For example, if a finding would be `POSSIBLE` without the
+         * detection rule and `relative_likelihood` is 1, then it is upgraded to
+         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
+         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
+         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
+         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
+         * a final likelihood of `LIKELY`.
+         * 
+ * + * int32 relative_likelihood = 2; + * @return Whether the relativeLikelihood field is set. + */ + public boolean hasRelativeLikelihood() { + return adjustmentCase_ == 2; + } + /** + *
+         * Increase or decrease the likelihood by the specified number of
+         * levels. For example, if a finding would be `POSSIBLE` without the
+         * detection rule and `relative_likelihood` is 1, then it is upgraded to
+         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
+         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
+         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
+         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
+         * a final likelihood of `LIKELY`.
+         * 
+ * + * int32 relative_likelihood = 2; + * @return The relativeLikelihood. + */ + public int getRelativeLikelihood() { + if (adjustmentCase_ == 2) { + return (java.lang.Integer) adjustment_; + } + return 0; + } + /** + *
+         * Increase or decrease the likelihood by the specified number of
+         * levels. For example, if a finding would be `POSSIBLE` without the
+         * detection rule and `relative_likelihood` is 1, then it is upgraded to
+         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
+         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
+         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
+         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
+         * a final likelihood of `LIKELY`.
+         * 
+ * + * int32 relative_likelihood = 2; + * @param value The relativeLikelihood to set. + * @return This builder for chaining. + */ + public Builder setRelativeLikelihood(int value) { + adjustmentCase_ = 2; + adjustment_ = value; + onChanged(); + return this; + } + /** + *
+         * Increase or decrease the likelihood by the specified number of
+         * levels. For example, if a finding would be `POSSIBLE` without the
+         * detection rule and `relative_likelihood` is 1, then it is upgraded to
+         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
+         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
+         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
+         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
+         * a final likelihood of `LIKELY`.
+         * 
+ * + * int32 relative_likelihood = 2; + * @return This builder for chaining. + */ + public Builder clearRelativeLikelihood() { + if (adjustmentCase_ == 2) { + adjustmentCase_ = 0; + adjustment_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) + private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment(); + } + + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LikelihoodAdjustment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LikelihoodAdjustment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HotwordRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Regular expression pattern defining what qualifies as a hotword.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + * @return Whether the hotwordRegex field is set. + */ + boolean hasHotwordRegex(); + /** + *
+       * Regular expression pattern defining what qualifies as a hotword.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + * @return The hotwordRegex. + */ + com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex(); + /** + *
+       * Regular expression pattern defining what qualifies as a hotword.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + */ + com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder(); + + /** + *
+       * Range of characters within which the entire hotword must reside.
+       * The total length of the window cannot exceed 1000 characters.
+       * The finding itself will be included in the window, so that hotwords can
+       * be used to match substrings of the finding itself. Suppose you
+       * want Cloud DLP to promote the likelihood of the phone number
+       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+       * area code of a company's office. In this case, use the hotword regex
+       * "\(xxx\)", where "xxx" is the area code in question.
+       * For tabular data, if you want to modify the likelihood of an entire
+       * column of findngs, see
+       * [Hotword example: Set the match likelihood of a table column]
+       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + * @return Whether the proximity field is set. + */ + boolean hasProximity(); + /** + *
+       * Range of characters within which the entire hotword must reside.
+       * The total length of the window cannot exceed 1000 characters.
+       * The finding itself will be included in the window, so that hotwords can
+       * be used to match substrings of the finding itself. Suppose you
+       * want Cloud DLP to promote the likelihood of the phone number
+       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+       * area code of a company's office. In this case, use the hotword regex
+       * "\(xxx\)", where "xxx" is the area code in question.
+       * For tabular data, if you want to modify the likelihood of an entire
+       * column of findngs, see
+       * [Hotword example: Set the match likelihood of a table column]
+       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + * @return The proximity. + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity(); + /** + *
+       * Range of characters within which the entire hotword must reside.
+       * The total length of the window cannot exceed 1000 characters.
+       * The finding itself will be included in the window, so that hotwords can
+       * be used to match substrings of the finding itself. Suppose you
+       * want Cloud DLP to promote the likelihood of the phone number
+       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+       * area code of a company's office. In this case, use the hotword regex
+       * "\(xxx\)", where "xxx" is the area code in question.
+       * For tabular data, if you want to modify the likelihood of an entire
+       * column of findngs, see
+       * [Hotword example: Set the match likelihood of a table column]
+       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder getProximityOrBuilder(); + + /** + *
+       * Likelihood adjustment to apply to all matching findings.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + * @return Whether the likelihoodAdjustment field is set. + */ + boolean hasLikelihoodAdjustment(); + /** + *
+       * Likelihood adjustment to apply to all matching findings.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + * @return The likelihoodAdjustment. + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getLikelihoodAdjustment(); + /** + *
+       * Likelihood adjustment to apply to all matching findings.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder getLikelihoodAdjustmentOrBuilder(); + } + /** + *
+     * The rule that adjusts the likelihood of findings within a certain
+     * proximity of hotwords.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule} + */ + public static final class HotwordRule extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) + HotwordRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use HotwordRule.newBuilder() to construct. + private HotwordRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HotwordRule() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HotwordRule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HotwordRule( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null; + if (hotwordRegex_ != null) { + subBuilder = hotwordRegex_.toBuilder(); + } + hotwordRegex_ = input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hotwordRegex_); + hotwordRegex_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder subBuilder = null; + if (proximity_ != null) { + subBuilder = proximity_.toBuilder(); + } + proximity_ = input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(proximity_); + proximity_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder subBuilder = null; + if (likelihoodAdjustment_ != null) { + subBuilder = likelihoodAdjustment_.toBuilder(); + } + likelihoodAdjustment_ = input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(likelihoodAdjustment_); + likelihoodAdjustment_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder.class); + } + + public static final int HOTWORD_REGEX_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.CustomInfoType.Regex hotwordRegex_; + /** + *
+       * Regular expression pattern defining what qualifies as a hotword.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + * @return Whether the hotwordRegex field is set. + */ + @java.lang.Override + public boolean hasHotwordRegex() { + return hotwordRegex_ != null; + } + /** + *
+       * Regular expression pattern defining what qualifies as a hotword.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + * @return The hotwordRegex. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() { + return hotwordRegex_ == null ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance() : hotwordRegex_; + } + /** + *
+       * Regular expression pattern defining what qualifies as a hotword.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder() { + return getHotwordRegex(); + } + + public static final int PROXIMITY_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity_; + /** + *
+       * Range of characters within which the entire hotword must reside.
+       * The total length of the window cannot exceed 1000 characters.
+       * The finding itself will be included in the window, so that hotwords can
+       * be used to match substrings of the finding itself. Suppose you
+       * want Cloud DLP to promote the likelihood of the phone number
+       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+       * area code of a company's office. In this case, use the hotword regex
+       * "\(xxx\)", where "xxx" is the area code in question.
+       * For tabular data, if you want to modify the likelihood of an entire
+       * column of findngs, see
+       * [Hotword example: Set the match likelihood of a table column]
+       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + * @return Whether the proximity field is set. + */ + @java.lang.Override + public boolean hasProximity() { + return proximity_ != null; + } + /** + *
+       * Range of characters within which the entire hotword must reside.
+       * The total length of the window cannot exceed 1000 characters.
+       * The finding itself will be included in the window, so that hotwords can
+       * be used to match substrings of the finding itself. Suppose you
+       * want Cloud DLP to promote the likelihood of the phone number
+       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+       * area code of a company's office. In this case, use the hotword regex
+       * "\(xxx\)", where "xxx" is the area code in question.
+       * For tabular data, if you want to modify the likelihood of an entire
+       * column of findngs, see
+       * [Hotword example: Set the match likelihood of a table column]
+       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + * @return The proximity. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity() { + return proximity_ == null ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance() : proximity_; + } + /** + *
+       * Range of characters within which the entire hotword must reside.
+       * The total length of the window cannot exceed 1000 characters.
+       * The finding itself will be included in the window, so that hotwords can
+       * be used to match substrings of the finding itself. Suppose you
+       * want Cloud DLP to promote the likelihood of the phone number
+       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+       * area code of a company's office. In this case, use the hotword regex
+       * "\(xxx\)", where "xxx" is the area code in question.
+       * For tabular data, if you want to modify the likelihood of an entire
+       * column of findngs, see
+       * [Hotword example: Set the match likelihood of a table column]
+       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder getProximityOrBuilder() { + return getProximity(); + } + + public static final int LIKELIHOOD_ADJUSTMENT_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihoodAdjustment_; + /** + *
+       * Likelihood adjustment to apply to all matching findings.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + * @return Whether the likelihoodAdjustment field is set. + */ + @java.lang.Override + public boolean hasLikelihoodAdjustment() { + return likelihoodAdjustment_ != null; + } + /** + *
+       * Likelihood adjustment to apply to all matching findings.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + * @return The likelihoodAdjustment. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getLikelihoodAdjustment() { + return likelihoodAdjustment_ == null ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance() : likelihoodAdjustment_; + } + /** + *
+       * Likelihood adjustment to apply to all matching findings.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder getLikelihoodAdjustmentOrBuilder() { + return getLikelihoodAdjustment(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (hotwordRegex_ != null) { + output.writeMessage(1, getHotwordRegex()); + } + if (proximity_ != null) { + output.writeMessage(2, getProximity()); + } + if (likelihoodAdjustment_ != null) { + output.writeMessage(3, getLikelihoodAdjustment()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (hotwordRegex_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getHotwordRegex()); + } + if (proximity_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getProximity()); + } + if (likelihoodAdjustment_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLikelihoodAdjustment()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule other = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) obj; + + if (hasHotwordRegex() != other.hasHotwordRegex()) return false; + if (hasHotwordRegex()) { + if (!getHotwordRegex() + .equals(other.getHotwordRegex())) return false; + } + if (hasProximity() != other.hasProximity()) return false; + if (hasProximity()) { + if (!getProximity() + .equals(other.getProximity())) return false; + } + if (hasLikelihoodAdjustment() != other.hasLikelihoodAdjustment()) return false; + if (hasLikelihoodAdjustment()) { + if (!getLikelihoodAdjustment() + .equals(other.getLikelihoodAdjustment())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHotwordRegex()) { + hash = (37 * hash) + HOTWORD_REGEX_FIELD_NUMBER; + hash = (53 * hash) + getHotwordRegex().hashCode(); + } + if (hasProximity()) { + hash = (37 * hash) + PROXIMITY_FIELD_NUMBER; + hash = (53 * hash) + getProximity().hashCode(); + } + if (hasLikelihoodAdjustment()) { + hash = (37 * hash) + LIKELIHOOD_ADJUSTMENT_FIELD_NUMBER; + hash = (53 * hash) + getLikelihoodAdjustment().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * The rule that adjusts the likelihood of findings within a certain
+       * proximity of hotwords.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (hotwordRegexBuilder_ == null) { + hotwordRegex_ = null; + } else { + hotwordRegex_ = null; + hotwordRegexBuilder_ = null; + } + if (proximityBuilder_ == null) { + proximity_ = null; + } else { + proximity_ = null; + proximityBuilder_ = null; + } + if (likelihoodAdjustmentBuilder_ == null) { + likelihoodAdjustment_ = null; + } else { + likelihoodAdjustment_ = null; + likelihoodAdjustmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule build() { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule buildPartial() { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule(this); + if (hotwordRegexBuilder_ == null) { + result.hotwordRegex_ = hotwordRegex_; + } else { + result.hotwordRegex_ = hotwordRegexBuilder_.build(); + } + if (proximityBuilder_ == null) { + result.proximity_ = proximity_; + } else { + result.proximity_ = proximityBuilder_.build(); + } + if (likelihoodAdjustmentBuilder_ == null) { + result.likelihoodAdjustment_ = likelihoodAdjustment_; + } else { + result.likelihoodAdjustment_ = likelihoodAdjustmentBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) { + return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule other) { + if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance()) return this; + if (other.hasHotwordRegex()) { + mergeHotwordRegex(other.getHotwordRegex()); + } + if (other.hasProximity()) { + mergeProximity(other.getProximity()); + } + if (other.hasLikelihoodAdjustment()) { + mergeLikelihoodAdjustment(other.getLikelihoodAdjustment()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.CustomInfoType.Regex hotwordRegex_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> hotwordRegexBuilder_; + /** + *
+         * Regular expression pattern defining what qualifies as a hotword.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + * @return Whether the hotwordRegex field is set. + */ + public boolean hasHotwordRegex() { + return hotwordRegexBuilder_ != null || hotwordRegex_ != null; + } + /** + *
+         * Regular expression pattern defining what qualifies as a hotword.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + * @return The hotwordRegex. + */ + public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() { + if (hotwordRegexBuilder_ == null) { + return hotwordRegex_ == null ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance() : hotwordRegex_; + } else { + return hotwordRegexBuilder_.getMessage(); + } + } + /** + *
+         * Regular expression pattern defining what qualifies as a hotword.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + */ + public Builder setHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { + if (hotwordRegexBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hotwordRegex_ = value; + onChanged(); + } else { + hotwordRegexBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * Regular expression pattern defining what qualifies as a hotword.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + */ + public Builder setHotwordRegex( + com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) { + if (hotwordRegexBuilder_ == null) { + hotwordRegex_ = builderForValue.build(); + onChanged(); + } else { + hotwordRegexBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * Regular expression pattern defining what qualifies as a hotword.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + */ + public Builder mergeHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { + if (hotwordRegexBuilder_ == null) { + if (hotwordRegex_ != null) { + hotwordRegex_ = + com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder(hotwordRegex_).mergeFrom(value).buildPartial(); + } else { + hotwordRegex_ = value; + } + onChanged(); + } else { + hotwordRegexBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * Regular expression pattern defining what qualifies as a hotword.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + */ + public Builder clearHotwordRegex() { + if (hotwordRegexBuilder_ == null) { + hotwordRegex_ = null; + onChanged(); + } else { + hotwordRegex_ = null; + hotwordRegexBuilder_ = null; + } + + return this; + } + /** + *
+         * Regular expression pattern defining what qualifies as a hotword.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getHotwordRegexBuilder() { + + onChanged(); + return getHotwordRegexFieldBuilder().getBuilder(); + } + /** + *
+         * Regular expression pattern defining what qualifies as a hotword.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + */ + public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder() { + if (hotwordRegexBuilder_ != null) { + return hotwordRegexBuilder_.getMessageOrBuilder(); + } else { + return hotwordRegex_ == null ? + com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance() : hotwordRegex_; + } + } + /** + *
+         * Regular expression pattern defining what qualifies as a hotword.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> + getHotwordRegexFieldBuilder() { + if (hotwordRegexBuilder_ == null) { + hotwordRegexBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>( + getHotwordRegex(), + getParentForChildren(), + isClean()); + hotwordRegex_ = null; + } + return hotwordRegexBuilder_; + } + + private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder> proximityBuilder_; + /** + *
+         * Range of characters within which the entire hotword must reside.
+         * The total length of the window cannot exceed 1000 characters.
+         * The finding itself will be included in the window, so that hotwords can
+         * be used to match substrings of the finding itself. Suppose you
+         * want Cloud DLP to promote the likelihood of the phone number
+         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+         * area code of a company's office. In this case, use the hotword regex
+         * "\(xxx\)", where "xxx" is the area code in question.
+         * For tabular data, if you want to modify the likelihood of an entire
+         * column of findngs, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + * @return Whether the proximity field is set. + */ + public boolean hasProximity() { + return proximityBuilder_ != null || proximity_ != null; + } + /** + *
+         * Range of characters within which the entire hotword must reside.
+         * The total length of the window cannot exceed 1000 characters.
+         * The finding itself will be included in the window, so that hotwords can
+         * be used to match substrings of the finding itself. Suppose you
+         * want Cloud DLP to promote the likelihood of the phone number
+         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+         * area code of a company's office. In this case, use the hotword regex
+         * "\(xxx\)", where "xxx" is the area code in question.
+         * For tabular data, if you want to modify the likelihood of an entire
+         * column of findngs, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + * @return The proximity. + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity() { + if (proximityBuilder_ == null) { + return proximity_ == null ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance() : proximity_; + } else { + return proximityBuilder_.getMessage(); + } + } + /** + *
+         * Range of characters within which the entire hotword must reside.
+         * The total length of the window cannot exceed 1000 characters.
+         * The finding itself will be included in the window, so that hotwords can
+         * be used to match substrings of the finding itself. Suppose you
+         * want Cloud DLP to promote the likelihood of the phone number
+         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+         * area code of a company's office. In this case, use the hotword regex
+         * "\(xxx\)", where "xxx" is the area code in question.
+         * For tabular data, if you want to modify the likelihood of an entire
+         * column of findngs, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + */ + public Builder setProximity(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value) { + if (proximityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proximity_ = value; + onChanged(); + } else { + proximityBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * Range of characters within which the entire hotword must reside.
+         * The total length of the window cannot exceed 1000 characters.
+         * The finding itself will be included in the window, so that hotwords can
+         * be used to match substrings of the finding itself. Suppose you
+         * want Cloud DLP to promote the likelihood of the phone number
+         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+         * area code of a company's office. In this case, use the hotword regex
+         * "\(xxx\)", where "xxx" is the area code in question.
+         * For tabular data, if you want to modify the likelihood of an entire
+         * column of findngs, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + */ + public Builder setProximity( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder builderForValue) { + if (proximityBuilder_ == null) { + proximity_ = builderForValue.build(); + onChanged(); + } else { + proximityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * Range of characters within which the entire hotword must reside.
+         * The total length of the window cannot exceed 1000 characters.
+         * The finding itself will be included in the window, so that hotwords can
+         * be used to match substrings of the finding itself. Suppose you
+         * want Cloud DLP to promote the likelihood of the phone number
+         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+         * area code of a company's office. In this case, use the hotword regex
+         * "\(xxx\)", where "xxx" is the area code in question.
+         * For tabular data, if you want to modify the likelihood of an entire
+         * column of findngs, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + */ + public Builder mergeProximity(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value) { + if (proximityBuilder_ == null) { + if (proximity_ != null) { + proximity_ = + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.newBuilder(proximity_).mergeFrom(value).buildPartial(); + } else { + proximity_ = value; + } + onChanged(); + } else { + proximityBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * Range of characters within which the entire hotword must reside.
+         * The total length of the window cannot exceed 1000 characters.
+         * The finding itself will be included in the window, so that hotwords can
+         * be used to match substrings of the finding itself. Suppose you
+         * want Cloud DLP to promote the likelihood of the phone number
+         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+         * area code of a company's office. In this case, use the hotword regex
+         * "\(xxx\)", where "xxx" is the area code in question.
+         * For tabular data, if you want to modify the likelihood of an entire
+         * column of findngs, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + */ + public Builder clearProximity() { + if (proximityBuilder_ == null) { + proximity_ = null; + onChanged(); + } else { + proximity_ = null; + proximityBuilder_ = null; + } + + return this; + } + /** + *
+         * Range of characters within which the entire hotword must reside.
+         * The total length of the window cannot exceed 1000 characters.
+         * The finding itself will be included in the window, so that hotwords can
+         * be used to match substrings of the finding itself. Suppose you
+         * want Cloud DLP to promote the likelihood of the phone number
+         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+         * area code of a company's office. In this case, use the hotword regex
+         * "\(xxx\)", where "xxx" is the area code in question.
+         * For tabular data, if you want to modify the likelihood of an entire
+         * column of findngs, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder getProximityBuilder() { + + onChanged(); + return getProximityFieldBuilder().getBuilder(); + } + /** + *
+         * Range of characters within which the entire hotword must reside.
+         * The total length of the window cannot exceed 1000 characters.
+         * The finding itself will be included in the window, so that hotwords can
+         * be used to match substrings of the finding itself. Suppose you
+         * want Cloud DLP to promote the likelihood of the phone number
+         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+         * area code of a company's office. In this case, use the hotword regex
+         * "\(xxx\)", where "xxx" is the area code in question.
+         * For tabular data, if you want to modify the likelihood of an entire
+         * column of findngs, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder getProximityOrBuilder() { + if (proximityBuilder_ != null) { + return proximityBuilder_.getMessageOrBuilder(); + } else { + return proximity_ == null ? + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance() : proximity_; + } + } + /** + *
+         * Range of characters within which the entire hotword must reside.
+         * The total length of the window cannot exceed 1000 characters.
+         * The finding itself will be included in the window, so that hotwords can
+         * be used to match substrings of the finding itself. Suppose you
+         * want Cloud DLP to promote the likelihood of the phone number
+         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
+         * area code of a company's office. In this case, use the hotword regex
+         * "\(xxx\)", where "xxx" is the area code in question.
+         * For tabular data, if you want to modify the likelihood of an entire
+         * column of findngs, see
+         * [Hotword example: Set the match likelihood of a table column]
+         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder> + getProximityFieldBuilder() { + if (proximityBuilder_ == null) { + proximityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder>( + getProximity(), + getParentForChildren(), + isClean()); + proximity_ = null; + } + return proximityBuilder_; + } + + private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihoodAdjustment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder> likelihoodAdjustmentBuilder_; + /** + *
+         * Likelihood adjustment to apply to all matching findings.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + * @return Whether the likelihoodAdjustment field is set. + */ + public boolean hasLikelihoodAdjustment() { + return likelihoodAdjustmentBuilder_ != null || likelihoodAdjustment_ != null; + } + /** + *
+         * Likelihood adjustment to apply to all matching findings.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + * @return The likelihoodAdjustment. + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getLikelihoodAdjustment() { + if (likelihoodAdjustmentBuilder_ == null) { + return likelihoodAdjustment_ == null ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance() : likelihoodAdjustment_; + } else { + return likelihoodAdjustmentBuilder_.getMessage(); + } + } + /** + *
+         * Likelihood adjustment to apply to all matching findings.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + */ + public Builder setLikelihoodAdjustment(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value) { + if (likelihoodAdjustmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + likelihoodAdjustment_ = value; + onChanged(); + } else { + likelihoodAdjustmentBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * Likelihood adjustment to apply to all matching findings.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + */ + public Builder setLikelihoodAdjustment( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder builderForValue) { + if (likelihoodAdjustmentBuilder_ == null) { + likelihoodAdjustment_ = builderForValue.build(); + onChanged(); + } else { + likelihoodAdjustmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * Likelihood adjustment to apply to all matching findings.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + */ + public Builder mergeLikelihoodAdjustment(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value) { + if (likelihoodAdjustmentBuilder_ == null) { + if (likelihoodAdjustment_ != null) { + likelihoodAdjustment_ = + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.newBuilder(likelihoodAdjustment_).mergeFrom(value).buildPartial(); + } else { + likelihoodAdjustment_ = value; + } + onChanged(); + } else { + likelihoodAdjustmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * Likelihood adjustment to apply to all matching findings.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + */ + public Builder clearLikelihoodAdjustment() { + if (likelihoodAdjustmentBuilder_ == null) { + likelihoodAdjustment_ = null; + onChanged(); + } else { + likelihoodAdjustment_ = null; + likelihoodAdjustmentBuilder_ = null; + } + + return this; + } + /** + *
+         * Likelihood adjustment to apply to all matching findings.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder getLikelihoodAdjustmentBuilder() { + + onChanged(); + return getLikelihoodAdjustmentFieldBuilder().getBuilder(); + } + /** + *
+         * Likelihood adjustment to apply to all matching findings.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder getLikelihoodAdjustmentOrBuilder() { + if (likelihoodAdjustmentBuilder_ != null) { + return likelihoodAdjustmentBuilder_.getMessageOrBuilder(); + } else { + return likelihoodAdjustment_ == null ? + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance() : likelihoodAdjustment_; + } + } + /** + *
+         * Likelihood adjustment to apply to all matching findings.
+         * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder> + getLikelihoodAdjustmentFieldBuilder() { + if (likelihoodAdjustmentBuilder_ == null) { + likelihoodAdjustmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder>( + getLikelihoodAdjustment(), + getParentForChildren(), + isClean()); + likelihoodAdjustment_ = null; + } + return likelihoodAdjustmentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) + private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule(); + } + + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HotwordRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HotwordRule(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + HOTWORD_RULE(1), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return HOTWORD_RULE; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int HOTWORD_RULE_FIELD_NUMBER = 1; + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return Whether the hotwordRule field is set. + */ + @java.lang.Override + public boolean hasHotwordRule() { + return typeCase_ == 1; + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return The hotwordRule. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule other = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getHotwordRule() + .equals(other.getHotwordRule())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + HOTWORD_RULE_FIELD_NUMBER; + hash = (53 * hash) + getHotwordRule().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
+     * `CustomInfoType` to alter behavior under certain circumstances, depending
+     * on the specific details of the rule. Not supported for the `surrogate_type`
+     * custom infoType.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule) + com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule build() { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule buildPartial() { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule(this); + if (typeCase_ == 1) { + if (hotwordRuleBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = hotwordRuleBuilder_.build(); + } + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) { + return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule other) { + if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance()) return this; + switch (other.getTypeCase()) { + case HOTWORD_RULE: { + mergeHotwordRule(other.getHotwordRule()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder> hotwordRuleBuilder_; + /** + *
+       * Hotword-based detection rule.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return Whether the hotwordRule field is set. + */ + @java.lang.Override + public boolean hasHotwordRule() { + return typeCase_ == 1; + } + /** + *
+       * Hotword-based detection rule.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return The hotwordRule. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() { + if (hotwordRuleBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return hotwordRuleBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + } + /** + *
+       * Hotword-based detection rule.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public Builder setHotwordRule(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) { + if (hotwordRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + hotwordRuleBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + *
+       * Hotword-based detection rule.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public Builder setHotwordRule( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder builderForValue) { + if (hotwordRuleBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + hotwordRuleBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + *
+       * Hotword-based detection rule.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public Builder mergeHotwordRule(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) { + if (hotwordRuleBuilder_ == null) { + if (typeCase_ == 1 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + hotwordRuleBuilder_.mergeFrom(value); + } else { + hotwordRuleBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + *
+       * Hotword-based detection rule.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public Builder clearHotwordRule() { + if (hotwordRuleBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + hotwordRuleBuilder_.clear(); + } + return this; + } + /** + *
+       * Hotword-based detection rule.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder getHotwordRuleBuilder() { + return getHotwordRuleFieldBuilder().getBuilder(); + } + /** + *
+       * Hotword-based detection rule.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder() { + if ((typeCase_ == 1) && (hotwordRuleBuilder_ != null)) { + return hotwordRuleBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + } + /** + *
+       * Hotword-based detection rule.
+       * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder> + getHotwordRuleFieldBuilder() { + if (hotwordRuleBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + hotwordRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged();; + return hotwordRuleBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule) + private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule(); + } + + public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectionRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectionRule(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DICTIONARY(2), + REGEX(3), + SURROGATE_TYPE(4), + STORED_TYPE(5), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 2: return DICTIONARY; + case 3: return REGEX; + case 4: return SURROGATE_TYPE; + case 5: return STORED_TYPE; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int INFO_TYPE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.InfoType infoType_; + /** + *
+   * CustomInfoType can either be a new infoType, or an extension of built-in
+   * infoType, when the name matches one of existing infoTypes and that infoType
+   * is specified in `InspectContent.info_types` field. Specifying the latter
+   * adds findings to the one detected by the system. If built-in info type is
+   * not specified in `InspectContent.info_types` list then the name is treated
+   * as a custom info type.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return infoType_ != null; + } + /** + *
+   * CustomInfoType can either be a new infoType, or an extension of built-in
+   * infoType, when the name matches one of existing infoTypes and that infoType
+   * is specified in `InspectContent.info_types` field. Specifying the latter
+   * adds findings to the one detected by the system. If built-in info type is
+   * not specified in `InspectContent.info_types` list then the name is treated
+   * as a custom info type.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + /** + *
+   * CustomInfoType can either be a new infoType, or an extension of built-in
+   * infoType, when the name matches one of existing infoTypes and that infoType
+   * is specified in `InspectContent.info_types` field. Specifying the latter
+   * adds findings to the one detected by the system. If built-in info type is
+   * not specified in `InspectContent.info_types` list then the name is treated
+   * as a custom info type.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + return getInfoType(); + } + + public static final int LIKELIHOOD_FIELD_NUMBER = 6; + private int likelihood_; + /** + *
+   * Likelihood to return for this CustomInfoType. This base value can be
+   * altered by a detection rule if the finding meets the criteria specified by
+   * the rule. Defaults to `VERY_LIKELY` if not specified.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 6; + * @return The enum numeric value on the wire for likelihood. + */ + @java.lang.Override public int getLikelihoodValue() { + return likelihood_; + } + /** + *
+   * Likelihood to return for this CustomInfoType. This base value can be
+   * altered by a detection rule if the finding meets the criteria specified by
+   * the rule. Defaults to `VERY_LIKELY` if not specified.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 6; + * @return The likelihood. + */ + @java.lang.Override public com.google.privacy.dlp.v2.Likelihood getLikelihood() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_); + return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; + } + + public static final int DICTIONARY_FIELD_NUMBER = 2; + /** + *
+   * A list of phrases to detect as a CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + * @return Whether the dictionary field is set. + */ + @java.lang.Override + public boolean hasDictionary() { + return typeCase_ == 2; + } + /** + *
+   * A list of phrases to detect as a CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + * @return The dictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + /** + *
+   * A list of phrases to detect as a CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + + public static final int REGEX_FIELD_NUMBER = 3; + /** + *
+   * Regular expression based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + * @return Whether the regex field is set. + */ + @java.lang.Override + public boolean hasRegex() { + return typeCase_ == 3; + } + /** + *
+   * Regular expression based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + * @return The regex. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + /** + *
+   * Regular expression based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + + public static final int SURROGATE_TYPE_FIELD_NUMBER = 4; + /** + *
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + * @return Whether the surrogateType field is set. + */ + @java.lang.Override + public boolean hasSurrogateType() { + return typeCase_ == 4; + } + /** + *
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + * @return The surrogateType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); + } + /** + *
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder getSurrogateTypeOrBuilder() { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); + } + + public static final int STORED_TYPE_FIELD_NUMBER = 5; + /** + *
+   * Load an existing `StoredInfoType` resource for use in
+   * `InspectDataSource`. Not currently supported in `InspectContent`.
+   * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + * @return Whether the storedType field is set. + */ + @java.lang.Override + public boolean hasStoredType() { + return typeCase_ == 5; + } + /** + *
+   * Load an existing `StoredInfoType` resource for use in
+   * `InspectDataSource`. Not currently supported in `InspectContent`.
+   * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + * @return The storedType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredType getStoredType() { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.StoredType) type_; + } + return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); + } + /** + *
+   * Load an existing `StoredInfoType` resource for use in
+   * `InspectDataSource`. Not currently supported in `InspectContent`.
+   * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder() { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.StoredType) type_; + } + return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); + } + + public static final int DETECTION_RULES_FIELD_NUMBER = 7; + private java.util.List detectionRules_; + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + @java.lang.Override + public java.util.List getDetectionRulesList() { + return detectionRules_; + } + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + @java.lang.Override + public java.util.List + getDetectionRulesOrBuilderList() { + return detectionRules_; + } + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + @java.lang.Override + public int getDetectionRulesCount() { + return detectionRules_.size(); + } + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index) { + return detectionRules_.get(index); + } + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetectionRulesOrBuilder( + int index) { + return detectionRules_.get(index); + } + + public static final int EXCLUSION_TYPE_FIELD_NUMBER = 8; + private int exclusionType_; + /** + *
+   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+   * to be returned. It still can be used for rules matching.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; + * @return The enum numeric value on the wire for exclusionType. + */ + @java.lang.Override public int getExclusionTypeValue() { + return exclusionType_; + } + /** + *
+   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+   * to be returned. It still can be used for rules matching.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; + * @return The exclusionType. + */ + @java.lang.Override public com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.CustomInfoType.ExclusionType result = com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.valueOf(exclusionType_); + return result == null ? com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (infoType_ != null) { + output.writeMessage(1, getInfoType()); + } + if (typeCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); + } + if (typeCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); + } + if (typeCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_); + } + if (typeCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.StoredType) type_); + } + if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { + output.writeEnum(6, likelihood_); + } + for (int i = 0; i < detectionRules_.size(); i++) { + output.writeMessage(7, detectionRules_.get(i)); + } + if (exclusionType_ != com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.EXCLUSION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(8, exclusionType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (infoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInfoType()); + } + if (typeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); + } + if (typeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); + } + if (typeCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_); + } + if (typeCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.StoredType) type_); + } + if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, likelihood_); + } + for (int i = 0; i < detectionRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, detectionRules_.get(i)); + } + if (exclusionType_ != com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.EXCLUSION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, exclusionType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.CustomInfoType other = (com.google.privacy.dlp.v2.CustomInfoType) obj; + + if (hasInfoType() != other.hasInfoType()) return false; + if (hasInfoType()) { + if (!getInfoType() + .equals(other.getInfoType())) return false; + } + if (likelihood_ != other.likelihood_) return false; + if (!getDetectionRulesList() + .equals(other.getDetectionRulesList())) return false; + if (exclusionType_ != other.exclusionType_) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 2: + if (!getDictionary() + .equals(other.getDictionary())) return false; + break; + case 3: + if (!getRegex() + .equals(other.getRegex())) return false; + break; + case 4: + if (!getSurrogateType() + .equals(other.getSurrogateType())) return false; + break; + case 5: + if (!getStoredType() + .equals(other.getStoredType())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInfoType()) { + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + } + hash = (37 * hash) + LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + likelihood_; + if (getDetectionRulesCount() > 0) { + hash = (37 * hash) + DETECTION_RULES_FIELD_NUMBER; + hash = (53 * hash) + getDetectionRulesList().hashCode(); + } + hash = (37 * hash) + EXCLUSION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + exclusionType_; + switch (typeCase_) { + case 2: + hash = (37 * hash) + DICTIONARY_FIELD_NUMBER; + hash = (53 * hash) + getDictionary().hashCode(); + break; + case 3: + hash = (37 * hash) + REGEX_FIELD_NUMBER; + hash = (53 * hash) + getRegex().hashCode(); + break; + case 4: + hash = (37 * hash) + SURROGATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSurrogateType().hashCode(); + break; + case 5: + hash = (37 * hash) + STORED_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getStoredType().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Custom information type provided by the user. Used to find domain-specific
+   * sensitive information configurable to the data in question.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType) + com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.CustomInfoType.class, com.google.privacy.dlp.v2.CustomInfoType.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.CustomInfoType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDetectionRulesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypeBuilder_ == null) { + infoType_ = null; + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + likelihood_ = 0; + + if (detectionRulesBuilder_ == null) { + detectionRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + detectionRulesBuilder_.clear(); + } + exclusionType_ = 0; + + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType build() { + com.google.privacy.dlp.v2.CustomInfoType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType buildPartial() { + com.google.privacy.dlp.v2.CustomInfoType result = new com.google.privacy.dlp.v2.CustomInfoType(this); + int from_bitField0_ = bitField0_; + if (infoTypeBuilder_ == null) { + result.infoType_ = infoType_; + } else { + result.infoType_ = infoTypeBuilder_.build(); + } + result.likelihood_ = likelihood_; + if (typeCase_ == 2) { + if (dictionaryBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = dictionaryBuilder_.build(); + } + } + if (typeCase_ == 3) { + if (regexBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = regexBuilder_.build(); + } + } + if (typeCase_ == 4) { + if (surrogateTypeBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = surrogateTypeBuilder_.build(); + } + } + if (typeCase_ == 5) { + if (storedTypeBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = storedTypeBuilder_.build(); + } + } + if (detectionRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + detectionRules_ = java.util.Collections.unmodifiableList(detectionRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.detectionRules_ = detectionRules_; + } else { + result.detectionRules_ = detectionRulesBuilder_.build(); + } + result.exclusionType_ = exclusionType_; + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.CustomInfoType) { + return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType other) { + if (other == com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()) return this; + if (other.hasInfoType()) { + mergeInfoType(other.getInfoType()); + } + if (other.likelihood_ != 0) { + setLikelihoodValue(other.getLikelihoodValue()); + } + if (detectionRulesBuilder_ == null) { + if (!other.detectionRules_.isEmpty()) { + if (detectionRules_.isEmpty()) { + detectionRules_ = other.detectionRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDetectionRulesIsMutable(); + detectionRules_.addAll(other.detectionRules_); + } + onChanged(); + } + } else { + if (!other.detectionRules_.isEmpty()) { + if (detectionRulesBuilder_.isEmpty()) { + detectionRulesBuilder_.dispose(); + detectionRulesBuilder_ = null; + detectionRules_ = other.detectionRules_; + bitField0_ = (bitField0_ & ~0x00000001); + detectionRulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDetectionRulesFieldBuilder() : null; + } else { + detectionRulesBuilder_.addAllMessages(other.detectionRules_); + } + } + } + if (other.exclusionType_ != 0) { + setExclusionTypeValue(other.getExclusionTypeValue()); + } + switch (other.getTypeCase()) { + case DICTIONARY: { + mergeDictionary(other.getDictionary()); + break; + } + case REGEX: { + mergeRegex(other.getRegex()); + break; + } + case SURROGATE_TYPE: { + mergeSurrogateType(other.getSurrogateType()); + break; + } + case STORED_TYPE: { + mergeStoredType(other.getStoredType()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.CustomInfoType parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.privacy.dlp.v2.InfoType infoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+     * CustomInfoType can either be a new infoType, or an extension of built-in
+     * infoType, when the name matches one of existing infoTypes and that infoType
+     * is specified in `InspectContent.info_types` field. Specifying the latter
+     * adds findings to the one detected by the system. If built-in info type is
+     * not specified in `InspectContent.info_types` list then the name is treated
+     * as a custom info type.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + public boolean hasInfoType() { + return infoTypeBuilder_ != null || infoType_ != null; + } + /** + *
+     * CustomInfoType can either be a new infoType, or an extension of built-in
+     * infoType, when the name matches one of existing infoTypes and that infoType
+     * is specified in `InspectContent.info_types` field. Specifying the latter
+     * adds findings to the one detected by the system. If built-in info type is
+     * not specified in `InspectContent.info_types` list then the name is treated
+     * as a custom info type.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } else { + return infoTypeBuilder_.getMessage(); + } + } + /** + *
+     * CustomInfoType can either be a new infoType, or an extension of built-in
+     * infoType, when the name matches one of existing infoTypes and that infoType
+     * is specified in `InspectContent.info_types` field. Specifying the latter
+     * adds findings to the one detected by the system. If built-in info type is
+     * not specified in `InspectContent.info_types` list then the name is treated
+     * as a custom info type.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infoType_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * CustomInfoType can either be a new infoType, or an extension of built-in
+     * infoType, when the name matches one of existing infoTypes and that infoType
+     * is specified in `InspectContent.info_types` field. Specifying the latter
+     * adds findings to the one detected by the system. If built-in info type is
+     * not specified in `InspectContent.info_types` list then the name is treated
+     * as a custom info type.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + infoType_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * CustomInfoType can either be a new infoType, or an extension of built-in
+     * infoType, when the name matches one of existing infoTypes and that infoType
+     * is specified in `InspectContent.info_types` field. Specifying the latter
+     * adds findings to the one detected by the system. If built-in info type is
+     * not specified in `InspectContent.info_types` list then the name is treated
+     * as a custom info type.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (infoType_ != null) { + infoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); + } else { + infoType_ = value; + } + onChanged(); + } else { + infoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * CustomInfoType can either be a new infoType, or an extension of built-in
+     * infoType, when the name matches one of existing infoTypes and that infoType
+     * is specified in `InspectContent.info_types` field. Specifying the latter
+     * adds findings to the one detected by the system. If built-in info type is
+     * not specified in `InspectContent.info_types` list then the name is treated
+     * as a custom info type.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + infoType_ = null; + onChanged(); + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + + return this; + } + /** + *
+     * CustomInfoType can either be a new infoType, or an extension of built-in
+     * infoType, when the name matches one of existing infoTypes and that infoType
+     * is specified in `InspectContent.info_types` field. Specifying the latter
+     * adds findings to the one detected by the system. If built-in info type is
+     * not specified in `InspectContent.info_types` list then the name is treated
+     * as a custom info type.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + + onChanged(); + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * CustomInfoType can either be a new infoType, or an extension of built-in
+     * infoType, when the name matches one of existing infoTypes and that infoType
+     * is specified in `InspectContent.info_types` field. Specifying the latter
+     * adds findings to the one detected by the system. If built-in info type is
+     * not specified in `InspectContent.info_types` list then the name is treated
+     * as a custom info type.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (infoTypeBuilder_ != null) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + return infoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + } + /** + *
+     * CustomInfoType can either be a new infoType, or an extension of built-in
+     * infoType, when the name matches one of existing infoTypes and that infoType
+     * is specified in `InspectContent.info_types` field. Specifying the latter
+     * adds findings to the one detected by the system. If built-in info type is
+     * not specified in `InspectContent.info_types` list then the name is treated
+     * as a custom info type.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getInfoType(), + getParentForChildren(), + isClean()); + infoType_ = null; + } + return infoTypeBuilder_; + } + + private int likelihood_ = 0; + /** + *
+     * Likelihood to return for this CustomInfoType. This base value can be
+     * altered by a detection rule if the finding meets the criteria specified by
+     * the rule. Defaults to `VERY_LIKELY` if not specified.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 6; + * @return The enum numeric value on the wire for likelihood. + */ + @java.lang.Override public int getLikelihoodValue() { + return likelihood_; + } + /** + *
+     * Likelihood to return for this CustomInfoType. This base value can be
+     * altered by a detection rule if the finding meets the criteria specified by
+     * the rule. Defaults to `VERY_LIKELY` if not specified.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 6; + * @param value The enum numeric value on the wire for likelihood to set. + * @return This builder for chaining. + */ + public Builder setLikelihoodValue(int value) { + + likelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Likelihood to return for this CustomInfoType. This base value can be
+     * altered by a detection rule if the finding meets the criteria specified by
+     * the rule. Defaults to `VERY_LIKELY` if not specified.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 6; + * @return The likelihood. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Likelihood getLikelihood() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_); + return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Likelihood to return for this CustomInfoType. This base value can be
+     * altered by a detection rule if the finding meets the criteria specified by
+     * the rule. Defaults to `VERY_LIKELY` if not specified.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 6; + * @param value The likelihood to set. + * @return This builder for chaining. + */ + public Builder setLikelihood(com.google.privacy.dlp.v2.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + likelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Likelihood to return for this CustomInfoType. This base value can be
+     * altered by a detection rule if the finding meets the criteria specified by
+     * the rule. Defaults to `VERY_LIKELY` if not specified.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 6; + * @return This builder for chaining. + */ + public Builder clearLikelihood() { + + likelihood_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> dictionaryBuilder_; + /** + *
+     * A list of phrases to detect as a CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + * @return Whether the dictionary field is set. + */ + @java.lang.Override + public boolean hasDictionary() { + return typeCase_ == 2; + } + /** + *
+     * A list of phrases to detect as a CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + * @return The dictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { + if (dictionaryBuilder_ == null) { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } else { + if (typeCase_ == 2) { + return dictionaryBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + } + /** + *
+     * A list of phrases to detect as a CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + */ + public Builder setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { + if (dictionaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + dictionaryBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + /** + *
+     * A list of phrases to detect as a CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + */ + public Builder setDictionary( + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder builderForValue) { + if (dictionaryBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + dictionaryBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 2; + return this; + } + /** + *
+     * A list of phrases to detect as a CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + */ + public Builder mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { + if (dictionaryBuilder_ == null) { + if (typeCase_ == 2 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 2) { + dictionaryBuilder_.mergeFrom(value); + } else { + dictionaryBuilder_.setMessage(value); + } + } + typeCase_ = 2; + return this; + } + /** + *
+     * A list of phrases to detect as a CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + */ + public Builder clearDictionary() { + if (dictionaryBuilder_ == null) { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + } + dictionaryBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of phrases to detect as a CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder getDictionaryBuilder() { + return getDictionaryFieldBuilder().getBuilder(); + } + /** + *
+     * A list of phrases to detect as a CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { + if ((typeCase_ == 2) && (dictionaryBuilder_ != null)) { + return dictionaryBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + } + /** + *
+     * A list of phrases to detect as a CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> + getDictionaryFieldBuilder() { + if (dictionaryBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + dictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 2; + onChanged();; + return dictionaryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> regexBuilder_; + /** + *
+     * Regular expression based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + * @return Whether the regex field is set. + */ + @java.lang.Override + public boolean hasRegex() { + return typeCase_ == 3; + } + /** + *
+     * Regular expression based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + * @return The regex. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { + if (regexBuilder_ == null) { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } else { + if (typeCase_ == 3) { + return regexBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + } + /** + *
+     * Regular expression based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + */ + public Builder setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { + if (regexBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + regexBuilder_.setMessage(value); + } + typeCase_ = 3; + return this; + } + /** + *
+     * Regular expression based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + */ + public Builder setRegex( + com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) { + if (regexBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + regexBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 3; + return this; + } + /** + *
+     * Regular expression based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + */ + public Builder mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { + if (regexBuilder_ == null) { + if (typeCase_ == 3 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 3) { + regexBuilder_.mergeFrom(value); + } else { + regexBuilder_.setMessage(value); + } + } + typeCase_ = 3; + return this; + } + /** + *
+     * Regular expression based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + */ + public Builder clearRegex() { + if (regexBuilder_ == null) { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + } + regexBuilder_.clear(); + } + return this; + } + /** + *
+     * Regular expression based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getRegexBuilder() { + return getRegexFieldBuilder().getBuilder(); + } + /** + *
+     * Regular expression based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { + if ((typeCase_ == 3) && (regexBuilder_ != null)) { + return regexBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + } + /** + *
+     * Regular expression based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> + getRegexFieldBuilder() { + if (regexBuilder_ == null) { + if (!(typeCase_ == 3)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + regexBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 3; + onChanged();; + return regexBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder, com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder> surrogateTypeBuilder_; + /** + *
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + * @return Whether the surrogateType field is set. + */ + @java.lang.Override + public boolean hasSurrogateType() { + return typeCase_ == 4; + } + /** + *
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + * @return The surrogateType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() { + if (surrogateTypeBuilder_ == null) { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); + } else { + if (typeCase_ == 4) { + return surrogateTypeBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); + } + } + /** + *
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + */ + public Builder setSurrogateType(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value) { + if (surrogateTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + surrogateTypeBuilder_.setMessage(value); + } + typeCase_ = 4; + return this; + } + /** + *
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + */ + public Builder setSurrogateType( + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder builderForValue) { + if (surrogateTypeBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + surrogateTypeBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 4; + return this; + } + /** + *
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + */ + public Builder mergeSurrogateType(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value) { + if (surrogateTypeBuilder_ == null) { + if (typeCase_ == 4 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 4) { + surrogateTypeBuilder_.mergeFrom(value); + } else { + surrogateTypeBuilder_.setMessage(value); + } + } + typeCase_ = 4; + return this; + } + /** + *
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + */ + public Builder clearSurrogateType() { + if (surrogateTypeBuilder_ == null) { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + } + surrogateTypeBuilder_.clear(); + } + return this; + } + /** + *
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + */ + public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder getSurrogateTypeBuilder() { + return getSurrogateTypeFieldBuilder().getBuilder(); + } + /** + *
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder getSurrogateTypeOrBuilder() { + if ((typeCase_ == 4) && (surrogateTypeBuilder_ != null)) { + return surrogateTypeBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); + } + } + /** + *
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder, com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder> + getSurrogateTypeFieldBuilder() { + if (surrogateTypeBuilder_ == null) { + if (!(typeCase_ == 4)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); + } + surrogateTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder, com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 4; + onChanged();; + return surrogateTypeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredType, com.google.privacy.dlp.v2.StoredType.Builder, com.google.privacy.dlp.v2.StoredTypeOrBuilder> storedTypeBuilder_; + /** + *
+     * Load an existing `StoredInfoType` resource for use in
+     * `InspectDataSource`. Not currently supported in `InspectContent`.
+     * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + * @return Whether the storedType field is set. + */ + @java.lang.Override + public boolean hasStoredType() { + return typeCase_ == 5; + } + /** + *
+     * Load an existing `StoredInfoType` resource for use in
+     * `InspectDataSource`. Not currently supported in `InspectContent`.
+     * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + * @return The storedType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredType getStoredType() { + if (storedTypeBuilder_ == null) { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.StoredType) type_; + } + return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); + } else { + if (typeCase_ == 5) { + return storedTypeBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); + } + } + /** + *
+     * Load an existing `StoredInfoType` resource for use in
+     * `InspectDataSource`. Not currently supported in `InspectContent`.
+     * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + */ + public Builder setStoredType(com.google.privacy.dlp.v2.StoredType value) { + if (storedTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + storedTypeBuilder_.setMessage(value); + } + typeCase_ = 5; + return this; + } + /** + *
+     * Load an existing `StoredInfoType` resource for use in
+     * `InspectDataSource`. Not currently supported in `InspectContent`.
+     * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + */ + public Builder setStoredType( + com.google.privacy.dlp.v2.StoredType.Builder builderForValue) { + if (storedTypeBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + storedTypeBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 5; + return this; + } + /** + *
+     * Load an existing `StoredInfoType` resource for use in
+     * `InspectDataSource`. Not currently supported in `InspectContent`.
+     * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + */ + public Builder mergeStoredType(com.google.privacy.dlp.v2.StoredType value) { + if (storedTypeBuilder_ == null) { + if (typeCase_ == 5 && + type_ != com.google.privacy.dlp.v2.StoredType.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.StoredType.newBuilder((com.google.privacy.dlp.v2.StoredType) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 5) { + storedTypeBuilder_.mergeFrom(value); + } else { + storedTypeBuilder_.setMessage(value); + } + } + typeCase_ = 5; + return this; + } + /** + *
+     * Load an existing `StoredInfoType` resource for use in
+     * `InspectDataSource`. Not currently supported in `InspectContent`.
+     * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + */ + public Builder clearStoredType() { + if (storedTypeBuilder_ == null) { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + } + storedTypeBuilder_.clear(); + } + return this; + } + /** + *
+     * Load an existing `StoredInfoType` resource for use in
+     * `InspectDataSource`. Not currently supported in `InspectContent`.
+     * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + */ + public com.google.privacy.dlp.v2.StoredType.Builder getStoredTypeBuilder() { + return getStoredTypeFieldBuilder().getBuilder(); + } + /** + *
+     * Load an existing `StoredInfoType` resource for use in
+     * `InspectDataSource`. Not currently supported in `InspectContent`.
+     * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder() { + if ((typeCase_ == 5) && (storedTypeBuilder_ != null)) { + return storedTypeBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.StoredType) type_; + } + return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); + } + } + /** + *
+     * Load an existing `StoredInfoType` resource for use in
+     * `InspectDataSource`. Not currently supported in `InspectContent`.
+     * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredType, com.google.privacy.dlp.v2.StoredType.Builder, com.google.privacy.dlp.v2.StoredTypeOrBuilder> + getStoredTypeFieldBuilder() { + if (storedTypeBuilder_ == null) { + if (!(typeCase_ == 5)) { + type_ = com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); + } + storedTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredType, com.google.privacy.dlp.v2.StoredType.Builder, com.google.privacy.dlp.v2.StoredTypeOrBuilder>( + (com.google.privacy.dlp.v2.StoredType) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 5; + onChanged();; + return storedTypeBuilder_; + } + + private java.util.List detectionRules_ = + java.util.Collections.emptyList(); + private void ensureDetectionRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + detectionRules_ = new java.util.ArrayList(detectionRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder> detectionRulesBuilder_; + + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public java.util.List getDetectionRulesList() { + if (detectionRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(detectionRules_); + } else { + return detectionRulesBuilder_.getMessageList(); + } + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public int getDetectionRulesCount() { + if (detectionRulesBuilder_ == null) { + return detectionRules_.size(); + } else { + return detectionRulesBuilder_.getCount(); + } + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index) { + if (detectionRulesBuilder_ == null) { + return detectionRules_.get(index); + } else { + return detectionRulesBuilder_.getMessage(index); + } + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public Builder setDetectionRules( + int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) { + if (detectionRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectionRulesIsMutable(); + detectionRules_.set(index, value); + onChanged(); + } else { + detectionRulesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public Builder setDetectionRules( + int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) { + if (detectionRulesBuilder_ == null) { + ensureDetectionRulesIsMutable(); + detectionRules_.set(index, builderForValue.build()); + onChanged(); + } else { + detectionRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public Builder addDetectionRules(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) { + if (detectionRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectionRulesIsMutable(); + detectionRules_.add(value); + onChanged(); + } else { + detectionRulesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public Builder addDetectionRules( + int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) { + if (detectionRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectionRulesIsMutable(); + detectionRules_.add(index, value); + onChanged(); + } else { + detectionRulesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public Builder addDetectionRules( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) { + if (detectionRulesBuilder_ == null) { + ensureDetectionRulesIsMutable(); + detectionRules_.add(builderForValue.build()); + onChanged(); + } else { + detectionRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public Builder addDetectionRules( + int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) { + if (detectionRulesBuilder_ == null) { + ensureDetectionRulesIsMutable(); + detectionRules_.add(index, builderForValue.build()); + onChanged(); + } else { + detectionRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public Builder addAllDetectionRules( + java.lang.Iterable values) { + if (detectionRulesBuilder_ == null) { + ensureDetectionRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, detectionRules_); + onChanged(); + } else { + detectionRulesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public Builder clearDetectionRules() { + if (detectionRulesBuilder_ == null) { + detectionRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + detectionRulesBuilder_.clear(); + } + return this; + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public Builder removeDetectionRules(int index) { + if (detectionRulesBuilder_ == null) { + ensureDetectionRulesIsMutable(); + detectionRules_.remove(index); + onChanged(); + } else { + detectionRulesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder getDetectionRulesBuilder( + int index) { + return getDetectionRulesFieldBuilder().getBuilder(index); + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetectionRulesOrBuilder( + int index) { + if (detectionRulesBuilder_ == null) { + return detectionRules_.get(index); } else { + return detectionRulesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public java.util.List + getDetectionRulesOrBuilderList() { + if (detectionRulesBuilder_ != null) { + return detectionRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detectionRules_); + } + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder addDetectionRulesBuilder() { + return getDetectionRulesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance()); + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder addDetectionRulesBuilder( + int index) { + return getDetectionRulesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance()); + } + /** + *
+     * Set of detection rules to apply to all findings of this CustomInfoType.
+     * Rules are applied in order that they are specified. Not supported for the
+     * `surrogate_type` CustomInfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + public java.util.List + getDetectionRulesBuilderList() { + return getDetectionRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder> + getDetectionRulesFieldBuilder() { + if (detectionRulesBuilder_ == null) { + detectionRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>( + detectionRules_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + detectionRules_ = null; + } + return detectionRulesBuilder_; + } + + private int exclusionType_ = 0; + /** + *
+     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+     * to be returned. It still can be used for rules matching.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; + * @return The enum numeric value on the wire for exclusionType. + */ + @java.lang.Override public int getExclusionTypeValue() { + return exclusionType_; + } + /** + *
+     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+     * to be returned. It still can be used for rules matching.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; + * @param value The enum numeric value on the wire for exclusionType to set. + * @return This builder for chaining. + */ + public Builder setExclusionTypeValue(int value) { + + exclusionType_ = value; + onChanged(); + return this; + } + /** + *
+     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+     * to be returned. It still can be used for rules matching.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; + * @return The exclusionType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.CustomInfoType.ExclusionType result = com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.valueOf(exclusionType_); + return result == null ? com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.UNRECOGNIZED : result; + } + /** + *
+     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+     * to be returned. It still can be used for rules matching.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; + * @param value The exclusionType to set. + * @return This builder for chaining. + */ + public Builder setExclusionType(com.google.privacy.dlp.v2.CustomInfoType.ExclusionType value) { + if (value == null) { + throw new NullPointerException(); + } + + exclusionType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+     * to be returned. It still can be used for rules matching.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; + * @return This builder for chaining. + */ + public Builder clearExclusionType() { + + exclusionType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType) + private static final com.google.privacy.dlp.v2.CustomInfoType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType(); + } + + public static com.google.privacy.dlp.v2.CustomInfoType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomInfoType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomInfoType(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java new file mode 100644 index 000000000000..f0a7f5de5363 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java @@ -0,0 +1,265 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface CustomInfoTypeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * CustomInfoType can either be a new infoType, or an extension of built-in
+   * infoType, when the name matches one of existing infoTypes and that infoType
+   * is specified in `InspectContent.info_types` field. Specifying the latter
+   * adds findings to the one detected by the system. If built-in info type is
+   * not specified in `InspectContent.info_types` list then the name is treated
+   * as a custom info type.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+   * CustomInfoType can either be a new infoType, or an extension of built-in
+   * infoType, when the name matches one of existing infoTypes and that infoType
+   * is specified in `InspectContent.info_types` field. Specifying the latter
+   * adds findings to the one detected by the system. If built-in info type is
+   * not specified in `InspectContent.info_types` list then the name is treated
+   * as a custom info type.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+   * CustomInfoType can either be a new infoType, or an extension of built-in
+   * infoType, when the name matches one of existing infoTypes and that infoType
+   * is specified in `InspectContent.info_types` field. Specifying the latter
+   * adds findings to the one detected by the system. If built-in info type is
+   * not specified in `InspectContent.info_types` list then the name is treated
+   * as a custom info type.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+   * Likelihood to return for this CustomInfoType. This base value can be
+   * altered by a detection rule if the finding meets the criteria specified by
+   * the rule. Defaults to `VERY_LIKELY` if not specified.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 6; + * @return The enum numeric value on the wire for likelihood. + */ + int getLikelihoodValue(); + /** + *
+   * Likelihood to return for this CustomInfoType. This base value can be
+   * altered by a detection rule if the finding meets the criteria specified by
+   * the rule. Defaults to `VERY_LIKELY` if not specified.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 6; + * @return The likelihood. + */ + com.google.privacy.dlp.v2.Likelihood getLikelihood(); + + /** + *
+   * A list of phrases to detect as a CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + * @return Whether the dictionary field is set. + */ + boolean hasDictionary(); + /** + *
+   * A list of phrases to detect as a CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + * @return The dictionary. + */ + com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary(); + /** + *
+   * A list of phrases to detect as a CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; + */ + com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder(); + + /** + *
+   * Regular expression based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + * @return Whether the regex field is set. + */ + boolean hasRegex(); + /** + *
+   * Regular expression based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + * @return The regex. + */ + com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex(); + /** + *
+   * Regular expression based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; + */ + com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder(); + + /** + *
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + * @return Whether the surrogateType field is set. + */ + boolean hasSurrogateType(); + /** + *
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + * @return The surrogateType. + */ + com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType(); + /** + *
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; + */ + com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder getSurrogateTypeOrBuilder(); + + /** + *
+   * Load an existing `StoredInfoType` resource for use in
+   * `InspectDataSource`. Not currently supported in `InspectContent`.
+   * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + * @return Whether the storedType field is set. + */ + boolean hasStoredType(); + /** + *
+   * Load an existing `StoredInfoType` resource for use in
+   * `InspectDataSource`. Not currently supported in `InspectContent`.
+   * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + * @return The storedType. + */ + com.google.privacy.dlp.v2.StoredType getStoredType(); + /** + *
+   * Load an existing `StoredInfoType` resource for use in
+   * `InspectDataSource`. Not currently supported in `InspectContent`.
+   * 
+ * + * .google.privacy.dlp.v2.StoredType stored_type = 5; + */ + com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder(); + + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + java.util.List + getDetectionRulesList(); + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index); + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + int getDetectionRulesCount(); + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + java.util.List + getDetectionRulesOrBuilderList(); + /** + *
+   * Set of detection rules to apply to all findings of this CustomInfoType.
+   * Rules are applied in order that they are specified. Not supported for the
+   * `surrogate_type` CustomInfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetectionRulesOrBuilder( + int index); + + /** + *
+   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+   * to be returned. It still can be used for rules matching.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; + * @return The enum numeric value on the wire for exclusionType. + */ + int getExclusionTypeValue(); + /** + *
+   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
+   * to be returned. It still can be used for rules matching.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; + * @return The exclusionType. + */ + com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType(); + + public com.google.privacy.dlp.v2.CustomInfoType.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileAction.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileAction.java new file mode 100644 index 000000000000..699a1956be81 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileAction.java @@ -0,0 +1,3301 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A task to execute when a data profile has been generated.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction} + */ +public final class DataProfileAction extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileAction) + DataProfileActionOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataProfileAction.newBuilder() to construct. + private DataProfileAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataProfileAction() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataProfileAction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DataProfileAction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.DataProfileAction.Export.Builder subBuilder = null; + if (actionCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.DataProfileAction.Export) action_).toBuilder(); + } + action_ = + input.readMessage(com.google.privacy.dlp.v2.DataProfileAction.Export.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.DataProfileAction.Export) action_); + action_ = subBuilder.buildPartial(); + } + actionCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder subBuilder = null; + if (actionCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_).toBuilder(); + } + action_ = + input.readMessage(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_); + action_ = subBuilder.buildPartial(); + } + actionCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileAction.class, com.google.privacy.dlp.v2.DataProfileAction.Builder.class); + } + + /** + *
+   * Types of event that can trigger an action.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.DataProfileAction.EventType} + */ + public enum EventType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * EVENT_TYPE_UNSPECIFIED = 0; + */ + EVENT_TYPE_UNSPECIFIED(0), + /** + *
+     * New profile (not a re-profile).
+     * 
+ * + * NEW_PROFILE = 1; + */ + NEW_PROFILE(1), + /** + *
+     * Changed one of the following profile metrics:
+     * * Table data risk score
+     * * Table sensitivity score
+     * * Table resource visibility
+     * * Table encryption type
+     * * Table predicted infoTypes
+     * * Table other infoTypes
+     * 
+ * + * CHANGED_PROFILE = 2; + */ + CHANGED_PROFILE(2), + /** + *
+     * Table data risk score or sensitivity score increased.
+     * 
+ * + * SCORE_INCREASED = 3; + */ + SCORE_INCREASED(3), + /** + *
+     * A user (non-internal) error occurred.
+     * 
+ * + * ERROR_CHANGED = 4; + */ + ERROR_CHANGED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * EVENT_TYPE_UNSPECIFIED = 0; + */ + public static final int EVENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * New profile (not a re-profile).
+     * 
+ * + * NEW_PROFILE = 1; + */ + public static final int NEW_PROFILE_VALUE = 1; + /** + *
+     * Changed one of the following profile metrics:
+     * * Table data risk score
+     * * Table sensitivity score
+     * * Table resource visibility
+     * * Table encryption type
+     * * Table predicted infoTypes
+     * * Table other infoTypes
+     * 
+ * + * CHANGED_PROFILE = 2; + */ + public static final int CHANGED_PROFILE_VALUE = 2; + /** + *
+     * Table data risk score or sensitivity score increased.
+     * 
+ * + * SCORE_INCREASED = 3; + */ + public static final int SCORE_INCREASED_VALUE = 3; + /** + *
+     * A user (non-internal) error occurred.
+     * 
+ * + * ERROR_CHANGED = 4; + */ + public static final int ERROR_CHANGED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EventType forNumber(int value) { + switch (value) { + case 0: return EVENT_TYPE_UNSPECIFIED; + case 1: return NEW_PROFILE; + case 2: return CHANGED_PROFILE; + case 3: return SCORE_INCREASED; + case 4: return ERROR_CHANGED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + EventType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EventType findValueByNumber(int number) { + return EventType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DataProfileAction.getDescriptor().getEnumTypes().get(0); + } + + private static final EventType[] VALUES = values(); + + public static EventType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EventType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataProfileAction.EventType) + } + + public interface ExportOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileAction.Export) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Store all table and column profiles in an existing table or a new table
+     * in an existing dataset. Each re-generation will result in a new row in
+     * BigQuery.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + * @return Whether the profileTable field is set. + */ + boolean hasProfileTable(); + /** + *
+     * Store all table and column profiles in an existing table or a new table
+     * in an existing dataset. Each re-generation will result in a new row in
+     * BigQuery.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + * @return The profileTable. + */ + com.google.privacy.dlp.v2.BigQueryTable getProfileTable(); + /** + *
+     * Store all table and column profiles in an existing table or a new table
+     * in an existing dataset. Each re-generation will result in a new row in
+     * BigQuery.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getProfileTableOrBuilder(); + } + /** + *
+   * If set, the detailed data profiles will be persisted to the location
+   * of your choice whenever updated.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction.Export} + */ + public static final class Export extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileAction.Export) + ExportOrBuilder { + private static final long serialVersionUID = 0L; + // Use Export.newBuilder() to construct. + private Export(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Export() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Export(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Export( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (profileTable_ != null) { + subBuilder = profileTable_.toBuilder(); + } + profileTable_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profileTable_); + profileTable_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileAction.Export.class, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder.class); + } + + public static final int PROFILE_TABLE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.BigQueryTable profileTable_; + /** + *
+     * Store all table and column profiles in an existing table or a new table
+     * in an existing dataset. Each re-generation will result in a new row in
+     * BigQuery.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + * @return Whether the profileTable field is set. + */ + @java.lang.Override + public boolean hasProfileTable() { + return profileTable_ != null; + } + /** + *
+     * Store all table and column profiles in an existing table or a new table
+     * in an existing dataset. Each re-generation will result in a new row in
+     * BigQuery.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + * @return The profileTable. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getProfileTable() { + return profileTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : profileTable_; + } + /** + *
+     * Store all table and column profiles in an existing table or a new table
+     * in an existing dataset. Each re-generation will result in a new row in
+     * BigQuery.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getProfileTableOrBuilder() { + return getProfileTable(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profileTable_ != null) { + output.writeMessage(1, getProfileTable()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profileTable_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProfileTable()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileAction.Export)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfileAction.Export other = (com.google.privacy.dlp.v2.DataProfileAction.Export) obj; + + if (hasProfileTable() != other.hasProfileTable()) return false; + if (hasProfileTable()) { + if (!getProfileTable() + .equals(other.getProfileTable())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfileTable()) { + hash = (37 * hash) + PROFILE_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getProfileTable().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileAction.Export prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * If set, the detailed data profiles will be persisted to the location
+     * of your choice whenever updated.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction.Export} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileAction.Export) + com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileAction.Export.class, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfileAction.Export.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (profileTableBuilder_ == null) { + profileTable_ = null; + } else { + profileTable_ = null; + profileTableBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.Export getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.Export build() { + com.google.privacy.dlp.v2.DataProfileAction.Export result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.Export buildPartial() { + com.google.privacy.dlp.v2.DataProfileAction.Export result = new com.google.privacy.dlp.v2.DataProfileAction.Export(this); + if (profileTableBuilder_ == null) { + result.profileTable_ = profileTable_; + } else { + result.profileTable_ = profileTableBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfileAction.Export) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfileAction.Export)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileAction.Export other) { + if (other == com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance()) return this; + if (other.hasProfileTable()) { + mergeProfileTable(other.getProfileTable()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfileAction.Export parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfileAction.Export) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.BigQueryTable profileTable_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> profileTableBuilder_; + /** + *
+       * Store all table and column profiles in an existing table or a new table
+       * in an existing dataset. Each re-generation will result in a new row in
+       * BigQuery.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + * @return Whether the profileTable field is set. + */ + public boolean hasProfileTable() { + return profileTableBuilder_ != null || profileTable_ != null; + } + /** + *
+       * Store all table and column profiles in an existing table or a new table
+       * in an existing dataset. Each re-generation will result in a new row in
+       * BigQuery.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + * @return The profileTable. + */ + public com.google.privacy.dlp.v2.BigQueryTable getProfileTable() { + if (profileTableBuilder_ == null) { + return profileTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : profileTable_; + } else { + return profileTableBuilder_.getMessage(); + } + } + /** + *
+       * Store all table and column profiles in an existing table or a new table
+       * in an existing dataset. Each re-generation will result in a new row in
+       * BigQuery.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + */ + public Builder setProfileTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (profileTableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profileTable_ = value; + onChanged(); + } else { + profileTableBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Store all table and column profiles in an existing table or a new table
+       * in an existing dataset. Each re-generation will result in a new row in
+       * BigQuery.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + */ + public Builder setProfileTable( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (profileTableBuilder_ == null) { + profileTable_ = builderForValue.build(); + onChanged(); + } else { + profileTableBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Store all table and column profiles in an existing table or a new table
+       * in an existing dataset. Each re-generation will result in a new row in
+       * BigQuery.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + */ + public Builder mergeProfileTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (profileTableBuilder_ == null) { + if (profileTable_ != null) { + profileTable_ = + com.google.privacy.dlp.v2.BigQueryTable.newBuilder(profileTable_).mergeFrom(value).buildPartial(); + } else { + profileTable_ = value; + } + onChanged(); + } else { + profileTableBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Store all table and column profiles in an existing table or a new table
+       * in an existing dataset. Each re-generation will result in a new row in
+       * BigQuery.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + */ + public Builder clearProfileTable() { + if (profileTableBuilder_ == null) { + profileTable_ = null; + onChanged(); + } else { + profileTable_ = null; + profileTableBuilder_ = null; + } + + return this; + } + /** + *
+       * Store all table and column profiles in an existing table or a new table
+       * in an existing dataset. Each re-generation will result in a new row in
+       * BigQuery.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getProfileTableBuilder() { + + onChanged(); + return getProfileTableFieldBuilder().getBuilder(); + } + /** + *
+       * Store all table and column profiles in an existing table or a new table
+       * in an existing dataset. Each re-generation will result in a new row in
+       * BigQuery.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getProfileTableOrBuilder() { + if (profileTableBuilder_ != null) { + return profileTableBuilder_.getMessageOrBuilder(); + } else { + return profileTable_ == null ? + com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : profileTable_; + } + } + /** + *
+       * Store all table and column profiles in an existing table or a new table
+       * in an existing dataset. Each re-generation will result in a new row in
+       * BigQuery.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getProfileTableFieldBuilder() { + if (profileTableBuilder_ == null) { + profileTableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + getProfileTable(), + getParentForChildren(), + isClean()); + profileTable_ = null; + } + return profileTableBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileAction.Export) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileAction.Export) + private static final com.google.privacy.dlp.v2.DataProfileAction.Export DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileAction.Export(); + } + + public static com.google.privacy.dlp.v2.DataProfileAction.Export getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Export parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Export(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.Export getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PubSubNotificationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Cloud Pub/Sub topic to send notifications to.
+     * Format is projects/{project}/topics/{topic}.
+     * 
+ * + * string topic = 1; + * @return The topic. + */ + java.lang.String getTopic(); + /** + *
+     * Cloud Pub/Sub topic to send notifications to.
+     * Format is projects/{project}/topics/{topic}.
+     * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + com.google.protobuf.ByteString + getTopicBytes(); + + /** + *
+     * The type of event that triggers a Pub/Sub. At most one
+     * `PubSubNotification` per EventType is permitted.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The enum numeric value on the wire for event. + */ + int getEventValue(); + /** + *
+     * The type of event that triggers a Pub/Sub. At most one
+     * `PubSubNotification` per EventType is permitted.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The event. + */ + com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent(); + + /** + *
+     * Conditions (e.g., data risk or sensitivity level) for triggering a
+     * Pub/Sub.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + * @return Whether the pubsubCondition field is set. + */ + boolean hasPubsubCondition(); + /** + *
+     * Conditions (e.g., data risk or sensitivity level) for triggering a
+     * Pub/Sub.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + * @return The pubsubCondition. + */ + com.google.privacy.dlp.v2.DataProfilePubSubCondition getPubsubCondition(); + /** + *
+     * Conditions (e.g., data risk or sensitivity level) for triggering a
+     * Pub/Sub.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + */ + com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder getPubsubConditionOrBuilder(); + + /** + *
+     * How much data to include in the Pub/Sub message. If the user wishes to
+     * limit the size of the message, they can use resource_name and fetch the
+     * profile fields they wish to. Per table profile (not per column).
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; + * @return The enum numeric value on the wire for detailOfMessage. + */ + int getDetailOfMessageValue(); + /** + *
+     * How much data to include in the Pub/Sub message. If the user wishes to
+     * limit the size of the message, they can use resource_name and fetch the
+     * profile fields they wish to. Per table profile (not per column).
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; + * @return The detailOfMessage. + */ + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel getDetailOfMessage(); + } + /** + *
+   * Send a Pub/Sub message into the given Pub/Sub topic to connect other
+   * systems to data profile generation. The message payload data will
+   * be the byte serialization of `DataProfilePubSubMessage`.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction.PubSubNotification} + */ + public static final class PubSubNotification extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) + PubSubNotificationOrBuilder { + private static final long serialVersionUID = 0L; + // Use PubSubNotification.newBuilder() to construct. + private PubSubNotification(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PubSubNotification() { + topic_ = ""; + event_ = 0; + detailOfMessage_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PubSubNotification(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PubSubNotification( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + topic_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + event_ = rawValue; + break; + } + case 26: { + com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder subBuilder = null; + if (pubsubCondition_ != null) { + subBuilder = pubsubCondition_.toBuilder(); + } + pubsubCondition_ = input.readMessage(com.google.privacy.dlp.v2.DataProfilePubSubCondition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pubsubCondition_); + pubsubCondition_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + int rawValue = input.readEnum(); + + detailOfMessage_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.class, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder.class); + } + + /** + *
+     * The levels of detail that can be included in the Pub/Sub message.
+     * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel} + */ + public enum DetailLevel + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unused.
+       * 
+ * + * DETAIL_LEVEL_UNSPECIFIED = 0; + */ + DETAIL_LEVEL_UNSPECIFIED(0), + /** + *
+       * The full table data profile.
+       * 
+ * + * TABLE_PROFILE = 1; + */ + TABLE_PROFILE(1), + /** + *
+       * The resource name of the table.
+       * 
+ * + * RESOURCE_NAME = 2; + */ + RESOURCE_NAME(2), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unused.
+       * 
+ * + * DETAIL_LEVEL_UNSPECIFIED = 0; + */ + public static final int DETAIL_LEVEL_UNSPECIFIED_VALUE = 0; + /** + *
+       * The full table data profile.
+       * 
+ * + * TABLE_PROFILE = 1; + */ + public static final int TABLE_PROFILE_VALUE = 1; + /** + *
+       * The resource name of the table.
+       * 
+ * + * RESOURCE_NAME = 2; + */ + public static final int RESOURCE_NAME_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DetailLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DetailLevel forNumber(int value) { + switch (value) { + case 0: return DETAIL_LEVEL_UNSPECIFIED; + case 1: return TABLE_PROFILE; + case 2: return RESOURCE_NAME; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DetailLevel> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DetailLevel findValueByNumber(int number) { + return DetailLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDescriptor().getEnumTypes().get(0); + } + + private static final DetailLevel[] VALUES = values(); + + public static DetailLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DetailLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel) + } + + public static final int TOPIC_FIELD_NUMBER = 1; + private volatile java.lang.Object topic_; + /** + *
+     * Cloud Pub/Sub topic to send notifications to.
+     * Format is projects/{project}/topics/{topic}.
+     * 
+ * + * string topic = 1; + * @return The topic. + */ + @java.lang.Override + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } + } + /** + *
+     * Cloud Pub/Sub topic to send notifications to.
+     * Format is projects/{project}/topics/{topic}.
+     * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_FIELD_NUMBER = 2; + private int event_; + /** + *
+     * The type of event that triggers a Pub/Sub. At most one
+     * `PubSubNotification` per EventType is permitted.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The enum numeric value on the wire for event. + */ + @java.lang.Override public int getEventValue() { + return event_; + } + /** + *
+     * The type of event that triggers a Pub/Sub. At most one
+     * `PubSubNotification` per EventType is permitted.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The event. + */ + @java.lang.Override public com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfileAction.EventType result = com.google.privacy.dlp.v2.DataProfileAction.EventType.valueOf(event_); + return result == null ? com.google.privacy.dlp.v2.DataProfileAction.EventType.UNRECOGNIZED : result; + } + + public static final int PUBSUB_CONDITION_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.DataProfilePubSubCondition pubsubCondition_; + /** + *
+     * Conditions (e.g., data risk or sensitivity level) for triggering a
+     * Pub/Sub.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + * @return Whether the pubsubCondition field is set. + */ + @java.lang.Override + public boolean hasPubsubCondition() { + return pubsubCondition_ != null; + } + /** + *
+     * Conditions (e.g., data risk or sensitivity level) for triggering a
+     * Pub/Sub.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + * @return The pubsubCondition. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition getPubsubCondition() { + return pubsubCondition_ == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance() : pubsubCondition_; + } + /** + *
+     * Conditions (e.g., data risk or sensitivity level) for triggering a
+     * Pub/Sub.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder getPubsubConditionOrBuilder() { + return getPubsubCondition(); + } + + public static final int DETAIL_OF_MESSAGE_FIELD_NUMBER = 4; + private int detailOfMessage_; + /** + *
+     * How much data to include in the Pub/Sub message. If the user wishes to
+     * limit the size of the message, they can use resource_name and fetch the
+     * profile fields they wish to. Per table profile (not per column).
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; + * @return The enum numeric value on the wire for detailOfMessage. + */ + @java.lang.Override public int getDetailOfMessageValue() { + return detailOfMessage_; + } + /** + *
+     * How much data to include in the Pub/Sub message. If the user wishes to
+     * limit the size of the message, they can use resource_name and fetch the
+     * profile fields they wish to. Per table profile (not per column).
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; + * @return The detailOfMessage. + */ + @java.lang.Override public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel getDetailOfMessage() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel result = com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.valueOf(detailOfMessage_); + return result == null ? com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + } + if (event_ != com.google.privacy.dlp.v2.DataProfileAction.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, event_); + } + if (pubsubCondition_ != null) { + output.writeMessage(3, getPubsubCondition()); + } + if (detailOfMessage_ != com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.DETAIL_LEVEL_UNSPECIFIED.getNumber()) { + output.writeEnum(4, detailOfMessage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + } + if (event_ != com.google.privacy.dlp.v2.DataProfileAction.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, event_); + } + if (pubsubCondition_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPubsubCondition()); + } + if (detailOfMessage_ != com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.DETAIL_LEVEL_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, detailOfMessage_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification other = (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) obj; + + if (!getTopic() + .equals(other.getTopic())) return false; + if (event_ != other.event_) return false; + if (hasPubsubCondition() != other.hasPubsubCondition()) return false; + if (hasPubsubCondition()) { + if (!getPubsubCondition() + .equals(other.getPubsubCondition())) return false; + } + if (detailOfMessage_ != other.detailOfMessage_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + event_; + if (hasPubsubCondition()) { + hash = (37 * hash) + PUBSUB_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getPubsubCondition().hashCode(); + } + hash = (37 * hash) + DETAIL_OF_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + detailOfMessage_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Send a Pub/Sub message into the given Pub/Sub topic to connect other
+     * systems to data profile generation. The message payload data will
+     * be the byte serialization of `DataProfilePubSubMessage`.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction.PubSubNotification} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.class, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + topic_ = ""; + + event_ = 0; + + if (pubsubConditionBuilder_ == null) { + pubsubCondition_ = null; + } else { + pubsubCondition_ = null; + pubsubConditionBuilder_ = null; + } + detailOfMessage_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification build() { + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification buildPartial() { + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification result = new com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification(this); + result.topic_ = topic_; + result.event_ = event_; + if (pubsubConditionBuilder_ == null) { + result.pubsubCondition_ = pubsubCondition_; + } else { + result.pubsubCondition_ = pubsubConditionBuilder_.build(); + } + result.detailOfMessage_ = detailOfMessage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification other) { + if (other == com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance()) return this; + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + onChanged(); + } + if (other.event_ != 0) { + setEventValue(other.getEventValue()); + } + if (other.hasPubsubCondition()) { + mergePubsubCondition(other.getPubsubCondition()); + } + if (other.detailOfMessage_ != 0) { + setDetailOfMessageValue(other.getDetailOfMessageValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object topic_ = ""; + /** + *
+       * Cloud Pub/Sub topic to send notifications to.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @return The topic. + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Cloud Pub/Sub topic to send notifications to.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Cloud Pub/Sub topic to send notifications to.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @param value The topic to set. + * @return This builder for chaining. + */ + public Builder setTopic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + topic_ = value; + onChanged(); + return this; + } + /** + *
+       * Cloud Pub/Sub topic to send notifications to.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @return This builder for chaining. + */ + public Builder clearTopic() { + + topic_ = getDefaultInstance().getTopic(); + onChanged(); + return this; + } + /** + *
+       * Cloud Pub/Sub topic to send notifications to.
+       * Format is projects/{project}/topics/{topic}.
+       * 
+ * + * string topic = 1; + * @param value The bytes for topic to set. + * @return This builder for chaining. + */ + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + topic_ = value; + onChanged(); + return this; + } + + private int event_ = 0; + /** + *
+       * The type of event that triggers a Pub/Sub. At most one
+       * `PubSubNotification` per EventType is permitted.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The enum numeric value on the wire for event. + */ + @java.lang.Override public int getEventValue() { + return event_; + } + /** + *
+       * The type of event that triggers a Pub/Sub. At most one
+       * `PubSubNotification` per EventType is permitted.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @param value The enum numeric value on the wire for event to set. + * @return This builder for chaining. + */ + public Builder setEventValue(int value) { + + event_ = value; + onChanged(); + return this; + } + /** + *
+       * The type of event that triggers a Pub/Sub. At most one
+       * `PubSubNotification` per EventType is permitted.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The event. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfileAction.EventType result = com.google.privacy.dlp.v2.DataProfileAction.EventType.valueOf(event_); + return result == null ? com.google.privacy.dlp.v2.DataProfileAction.EventType.UNRECOGNIZED : result; + } + /** + *
+       * The type of event that triggers a Pub/Sub. At most one
+       * `PubSubNotification` per EventType is permitted.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @param value The event to set. + * @return This builder for chaining. + */ + public Builder setEvent(com.google.privacy.dlp.v2.DataProfileAction.EventType value) { + if (value == null) { + throw new NullPointerException(); + } + + event_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The type of event that triggers a Pub/Sub. At most one
+       * `PubSubNotification` per EventType is permitted.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return This builder for chaining. + */ + public Builder clearEvent() { + + event_ = 0; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.DataProfilePubSubCondition pubsubCondition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfilePubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder> pubsubConditionBuilder_; + /** + *
+       * Conditions (e.g., data risk or sensitivity level) for triggering a
+       * Pub/Sub.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + * @return Whether the pubsubCondition field is set. + */ + public boolean hasPubsubCondition() { + return pubsubConditionBuilder_ != null || pubsubCondition_ != null; + } + /** + *
+       * Conditions (e.g., data risk or sensitivity level) for triggering a
+       * Pub/Sub.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + * @return The pubsubCondition. + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition getPubsubCondition() { + if (pubsubConditionBuilder_ == null) { + return pubsubCondition_ == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance() : pubsubCondition_; + } else { + return pubsubConditionBuilder_.getMessage(); + } + } + /** + *
+       * Conditions (e.g., data risk or sensitivity level) for triggering a
+       * Pub/Sub.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + */ + public Builder setPubsubCondition(com.google.privacy.dlp.v2.DataProfilePubSubCondition value) { + if (pubsubConditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pubsubCondition_ = value; + onChanged(); + } else { + pubsubConditionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Conditions (e.g., data risk or sensitivity level) for triggering a
+       * Pub/Sub.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + */ + public Builder setPubsubCondition( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder builderForValue) { + if (pubsubConditionBuilder_ == null) { + pubsubCondition_ = builderForValue.build(); + onChanged(); + } else { + pubsubConditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Conditions (e.g., data risk or sensitivity level) for triggering a
+       * Pub/Sub.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + */ + public Builder mergePubsubCondition(com.google.privacy.dlp.v2.DataProfilePubSubCondition value) { + if (pubsubConditionBuilder_ == null) { + if (pubsubCondition_ != null) { + pubsubCondition_ = + com.google.privacy.dlp.v2.DataProfilePubSubCondition.newBuilder(pubsubCondition_).mergeFrom(value).buildPartial(); + } else { + pubsubCondition_ = value; + } + onChanged(); + } else { + pubsubConditionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Conditions (e.g., data risk or sensitivity level) for triggering a
+       * Pub/Sub.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + */ + public Builder clearPubsubCondition() { + if (pubsubConditionBuilder_ == null) { + pubsubCondition_ = null; + onChanged(); + } else { + pubsubCondition_ = null; + pubsubConditionBuilder_ = null; + } + + return this; + } + /** + *
+       * Conditions (e.g., data risk or sensitivity level) for triggering a
+       * Pub/Sub.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder getPubsubConditionBuilder() { + + onChanged(); + return getPubsubConditionFieldBuilder().getBuilder(); + } + /** + *
+       * Conditions (e.g., data risk or sensitivity level) for triggering a
+       * Pub/Sub.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + */ + public com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder getPubsubConditionOrBuilder() { + if (pubsubConditionBuilder_ != null) { + return pubsubConditionBuilder_.getMessageOrBuilder(); + } else { + return pubsubCondition_ == null ? + com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance() : pubsubCondition_; + } + } + /** + *
+       * Conditions (e.g., data risk or sensitivity level) for triggering a
+       * Pub/Sub.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfilePubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder> + getPubsubConditionFieldBuilder() { + if (pubsubConditionBuilder_ == null) { + pubsubConditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfilePubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder>( + getPubsubCondition(), + getParentForChildren(), + isClean()); + pubsubCondition_ = null; + } + return pubsubConditionBuilder_; + } + + private int detailOfMessage_ = 0; + /** + *
+       * How much data to include in the Pub/Sub message. If the user wishes to
+       * limit the size of the message, they can use resource_name and fetch the
+       * profile fields they wish to. Per table profile (not per column).
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; + * @return The enum numeric value on the wire for detailOfMessage. + */ + @java.lang.Override public int getDetailOfMessageValue() { + return detailOfMessage_; + } + /** + *
+       * How much data to include in the Pub/Sub message. If the user wishes to
+       * limit the size of the message, they can use resource_name and fetch the
+       * profile fields they wish to. Per table profile (not per column).
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; + * @param value The enum numeric value on the wire for detailOfMessage to set. + * @return This builder for chaining. + */ + public Builder setDetailOfMessageValue(int value) { + + detailOfMessage_ = value; + onChanged(); + return this; + } + /** + *
+       * How much data to include in the Pub/Sub message. If the user wishes to
+       * limit the size of the message, they can use resource_name and fetch the
+       * profile fields they wish to. Per table profile (not per column).
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; + * @return The detailOfMessage. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel getDetailOfMessage() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel result = com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.valueOf(detailOfMessage_); + return result == null ? com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.UNRECOGNIZED : result; + } + /** + *
+       * How much data to include in the Pub/Sub message. If the user wishes to
+       * limit the size of the message, they can use resource_name and fetch the
+       * profile fields they wish to. Per table profile (not per column).
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; + * @param value The detailOfMessage to set. + * @return This builder for chaining. + */ + public Builder setDetailOfMessage(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + detailOfMessage_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * How much data to include in the Pub/Sub message. If the user wishes to
+       * limit the size of the message, they can use resource_name and fetch the
+       * profile fields they wish to. Per table profile (not per column).
+       * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; + * @return This builder for chaining. + */ + public Builder clearDetailOfMessage() { + + detailOfMessage_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) + private static final com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification(); + } + + public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PubSubNotification parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PubSubNotification(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int actionCase_ = 0; + private java.lang.Object action_; + public enum ActionCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EXPORT_DATA(1), + PUB_SUB_NOTIFICATION(2), + ACTION_NOT_SET(0); + private final int value; + private ActionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 1: return EXPORT_DATA; + case 2: return PUB_SUB_NOTIFICATION; + case 0: return ACTION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ActionCase + getActionCase() { + return ActionCase.forNumber( + actionCase_); + } + + public static final int EXPORT_DATA_FIELD_NUMBER = 1; + /** + *
+   * Export data profiles into a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + * @return Whether the exportData field is set. + */ + @java.lang.Override + public boolean hasExportData() { + return actionCase_ == 1; + } + /** + *
+   * Export data profiles into a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + * @return The exportData. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.Export getExportData() { + if (actionCase_ == 1) { + return (com.google.privacy.dlp.v2.DataProfileAction.Export) action_; + } + return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); + } + /** + *
+   * Export data profiles into a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder getExportDataOrBuilder() { + if (actionCase_ == 1) { + return (com.google.privacy.dlp.v2.DataProfileAction.Export) action_; + } + return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); + } + + public static final int PUB_SUB_NOTIFICATION_FIELD_NUMBER = 2; + /** + *
+   * Publish a message into the Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + * @return Whether the pubSubNotification field is set. + */ + @java.lang.Override + public boolean hasPubSubNotification() { + return actionCase_ == 2; + } + /** + *
+   * Publish a message into the Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + * @return The pubSubNotification. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getPubSubNotification() { + if (actionCase_ == 2) { + return (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_; + } + return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); + } + /** + *
+   * Publish a message into the Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder getPubSubNotificationOrBuilder() { + if (actionCase_ == 2) { + return (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_; + } + return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (actionCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.DataProfileAction.Export) action_); + } + if (actionCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.DataProfileAction.Export) action_); + } + if (actionCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileAction)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfileAction other = (com.google.privacy.dlp.v2.DataProfileAction) obj; + + if (!getActionCase().equals(other.getActionCase())) return false; + switch (actionCase_) { + case 1: + if (!getExportData() + .equals(other.getExportData())) return false; + break; + case 2: + if (!getPubSubNotification() + .equals(other.getPubSubNotification())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (actionCase_) { + case 1: + hash = (37 * hash) + EXPORT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getExportData().hashCode(); + break; + case 2: + hash = (37 * hash) + PUB_SUB_NOTIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getPubSubNotification().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileAction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A task to execute when a data profile has been generated.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileAction) + com.google.privacy.dlp.v2.DataProfileActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileAction.class, com.google.privacy.dlp.v2.DataProfileAction.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfileAction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfileAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction build() { + com.google.privacy.dlp.v2.DataProfileAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction buildPartial() { + com.google.privacy.dlp.v2.DataProfileAction result = new com.google.privacy.dlp.v2.DataProfileAction(this); + if (actionCase_ == 1) { + if (exportDataBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = exportDataBuilder_.build(); + } + } + if (actionCase_ == 2) { + if (pubSubNotificationBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = pubSubNotificationBuilder_.build(); + } + } + result.actionCase_ = actionCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfileAction) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfileAction)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileAction other) { + if (other == com.google.privacy.dlp.v2.DataProfileAction.getDefaultInstance()) return this; + switch (other.getActionCase()) { + case EXPORT_DATA: { + mergeExportData(other.getExportData()); + break; + } + case PUB_SUB_NOTIFICATION: { + mergePubSubNotification(other.getPubSubNotification()); + break; + } + case ACTION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfileAction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfileAction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int actionCase_ = 0; + private java.lang.Object action_; + public ActionCase + getActionCase() { + return ActionCase.forNumber( + actionCase_); + } + + public Builder clearAction() { + actionCase_ = 0; + action_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileAction.Export, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder, com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder> exportDataBuilder_; + /** + *
+     * Export data profiles into a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + * @return Whether the exportData field is set. + */ + @java.lang.Override + public boolean hasExportData() { + return actionCase_ == 1; + } + /** + *
+     * Export data profiles into a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + * @return The exportData. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.Export getExportData() { + if (exportDataBuilder_ == null) { + if (actionCase_ == 1) { + return (com.google.privacy.dlp.v2.DataProfileAction.Export) action_; + } + return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); + } else { + if (actionCase_ == 1) { + return exportDataBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); + } + } + /** + *
+     * Export data profiles into a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + */ + public Builder setExportData(com.google.privacy.dlp.v2.DataProfileAction.Export value) { + if (exportDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + exportDataBuilder_.setMessage(value); + } + actionCase_ = 1; + return this; + } + /** + *
+     * Export data profiles into a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + */ + public Builder setExportData( + com.google.privacy.dlp.v2.DataProfileAction.Export.Builder builderForValue) { + if (exportDataBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + exportDataBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 1; + return this; + } + /** + *
+     * Export data profiles into a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + */ + public Builder mergeExportData(com.google.privacy.dlp.v2.DataProfileAction.Export value) { + if (exportDataBuilder_ == null) { + if (actionCase_ == 1 && + action_ != com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance()) { + action_ = com.google.privacy.dlp.v2.DataProfileAction.Export.newBuilder((com.google.privacy.dlp.v2.DataProfileAction.Export) action_) + .mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 1) { + exportDataBuilder_.mergeFrom(value); + } else { + exportDataBuilder_.setMessage(value); + } + } + actionCase_ = 1; + return this; + } + /** + *
+     * Export data profiles into a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + */ + public Builder clearExportData() { + if (exportDataBuilder_ == null) { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + } + exportDataBuilder_.clear(); + } + return this; + } + /** + *
+     * Export data profiles into a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + */ + public com.google.privacy.dlp.v2.DataProfileAction.Export.Builder getExportDataBuilder() { + return getExportDataFieldBuilder().getBuilder(); + } + /** + *
+     * Export data profiles into a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder getExportDataOrBuilder() { + if ((actionCase_ == 1) && (exportDataBuilder_ != null)) { + return exportDataBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 1) { + return (com.google.privacy.dlp.v2.DataProfileAction.Export) action_; + } + return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); + } + } + /** + *
+     * Export data profiles into a provided location.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileAction.Export, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder, com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder> + getExportDataFieldBuilder() { + if (exportDataBuilder_ == null) { + if (!(actionCase_ == 1)) { + action_ = com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); + } + exportDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileAction.Export, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder, com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder>( + (com.google.privacy.dlp.v2.DataProfileAction.Export) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 1; + onChanged();; + return exportDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder> pubSubNotificationBuilder_; + /** + *
+     * Publish a message into the Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + * @return Whether the pubSubNotification field is set. + */ + @java.lang.Override + public boolean hasPubSubNotification() { + return actionCase_ == 2; + } + /** + *
+     * Publish a message into the Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + * @return The pubSubNotification. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getPubSubNotification() { + if (pubSubNotificationBuilder_ == null) { + if (actionCase_ == 2) { + return (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_; + } + return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); + } else { + if (actionCase_ == 2) { + return pubSubNotificationBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); + } + } + /** + *
+     * Publish a message into the Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + */ + public Builder setPubSubNotification(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification value) { + if (pubSubNotificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + pubSubNotificationBuilder_.setMessage(value); + } + actionCase_ = 2; + return this; + } + /** + *
+     * Publish a message into the Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + */ + public Builder setPubSubNotification( + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder builderForValue) { + if (pubSubNotificationBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + pubSubNotificationBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 2; + return this; + } + /** + *
+     * Publish a message into the Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + */ + public Builder mergePubSubNotification(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification value) { + if (pubSubNotificationBuilder_ == null) { + if (actionCase_ == 2 && + action_ != com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance()) { + action_ = com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.newBuilder((com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_) + .mergeFrom(value).buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 2) { + pubSubNotificationBuilder_.mergeFrom(value); + } else { + pubSubNotificationBuilder_.setMessage(value); + } + } + actionCase_ = 2; + return this; + } + /** + *
+     * Publish a message into the Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + */ + public Builder clearPubSubNotification() { + if (pubSubNotificationBuilder_ == null) { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + } + pubSubNotificationBuilder_.clear(); + } + return this; + } + /** + *
+     * Publish a message into the Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + */ + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder getPubSubNotificationBuilder() { + return getPubSubNotificationFieldBuilder().getBuilder(); + } + /** + *
+     * Publish a message into the Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder getPubSubNotificationOrBuilder() { + if ((actionCase_ == 2) && (pubSubNotificationBuilder_ != null)) { + return pubSubNotificationBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 2) { + return (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_; + } + return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); + } + } + /** + *
+     * Publish a message into the Pub/Sub topic.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder> + getPubSubNotificationFieldBuilder() { + if (pubSubNotificationBuilder_ == null) { + if (!(actionCase_ == 2)) { + action_ = com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); + } + pubSubNotificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder>( + (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 2; + onChanged();; + return pubSubNotificationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileAction) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileAction) + private static final com.google.privacy.dlp.v2.DataProfileAction DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileAction(); + } + + public static com.google.privacy.dlp.v2.DataProfileAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataProfileAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataProfileAction(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileActionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileActionOrBuilder.java new file mode 100644 index 000000000000..8d80aa9e505a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileActionOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DataProfileActionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileAction) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Export data profiles into a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + * @return Whether the exportData field is set. + */ + boolean hasExportData(); + /** + *
+   * Export data profiles into a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + * @return The exportData. + */ + com.google.privacy.dlp.v2.DataProfileAction.Export getExportData(); + /** + *
+   * Export data profiles into a provided location.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; + */ + com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder getExportDataOrBuilder(); + + /** + *
+   * Publish a message into the Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + * @return Whether the pubSubNotification field is set. + */ + boolean hasPubSubNotification(); + /** + *
+   * Publish a message into the Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + * @return The pubSubNotification. + */ + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getPubSubNotification(); + /** + *
+   * Publish a message into the Pub/Sub topic.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; + */ + com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder getPubSubNotificationOrBuilder(); + + public com.google.privacy.dlp.v2.DataProfileAction.ActionCase getActionCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshot.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshot.java new file mode 100644 index 000000000000..c73e3869d34c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshot.java @@ -0,0 +1,913 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Snapshot of the configurations used to generate the profile.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileConfigSnapshot} + */ +public final class DataProfileConfigSnapshot extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileConfigSnapshot) + DataProfileConfigSnapshotOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataProfileConfigSnapshot.newBuilder() to construct. + private DataProfileConfigSnapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataProfileConfigSnapshot() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataProfileConfigSnapshot(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DataProfileConfigSnapshot( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; + if (inspectConfig_ != null) { + subBuilder = inspectConfig_.toBuilder(); + } + inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectConfig_); + inspectConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.DataProfileJobConfig.Builder subBuilder = null; + if (dataProfileJob_ != null) { + subBuilder = dataProfileJob_.toBuilder(); + } + dataProfileJob_ = input.readMessage(com.google.privacy.dlp.v2.DataProfileJobConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataProfileJob_); + dataProfileJob_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileConfigSnapshot.class, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder.class); + } + + public static final int INSPECT_CONFIG_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + /** + *
+   * A copy of the inspection config used to generate this profile. This
+   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + @java.lang.Override + public boolean hasInspectConfig() { + return inspectConfig_ != null; + } + /** + *
+   * A copy of the inspection config used to generate this profile. This
+   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + /** + *
+   * A copy of the inspection config used to generate this profile. This
+   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + return getInspectConfig(); + } + + public static final int DATA_PROFILE_JOB_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.DataProfileJobConfig dataProfileJob_; + /** + *
+   * A copy of the configuration used to generate this profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + * @return Whether the dataProfileJob field is set. + */ + @java.lang.Override + public boolean hasDataProfileJob() { + return dataProfileJob_ != null; + } + /** + *
+   * A copy of the configuration used to generate this profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + * @return The dataProfileJob. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileJobConfig getDataProfileJob() { + return dataProfileJob_ == null ? com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance() : dataProfileJob_; + } + /** + *
+   * A copy of the configuration used to generate this profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder getDataProfileJobOrBuilder() { + return getDataProfileJob(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (inspectConfig_ != null) { + output.writeMessage(2, getInspectConfig()); + } + if (dataProfileJob_ != null) { + output.writeMessage(3, getDataProfileJob()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (inspectConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInspectConfig()); + } + if (dataProfileJob_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getDataProfileJob()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileConfigSnapshot)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfileConfigSnapshot other = (com.google.privacy.dlp.v2.DataProfileConfigSnapshot) obj; + + if (hasInspectConfig() != other.hasInspectConfig()) return false; + if (hasInspectConfig()) { + if (!getInspectConfig() + .equals(other.getInspectConfig())) return false; + } + if (hasDataProfileJob() != other.hasDataProfileJob()) return false; + if (hasDataProfileJob()) { + if (!getDataProfileJob() + .equals(other.getDataProfileJob())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInspectConfig()) { + hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInspectConfig().hashCode(); + } + if (hasDataProfileJob()) { + hash = (37 * hash) + DATA_PROFILE_JOB_FIELD_NUMBER; + hash = (53 * hash) + getDataProfileJob().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileConfigSnapshot prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Snapshot of the configurations used to generate the profile.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileConfigSnapshot} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileConfigSnapshot) + com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileConfigSnapshot.class, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfileConfigSnapshot.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + if (dataProfileJobBuilder_ == null) { + dataProfileJob_ = null; + } else { + dataProfileJob_ = null; + dataProfileJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileConfigSnapshot getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileConfigSnapshot build() { + com.google.privacy.dlp.v2.DataProfileConfigSnapshot result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileConfigSnapshot buildPartial() { + com.google.privacy.dlp.v2.DataProfileConfigSnapshot result = new com.google.privacy.dlp.v2.DataProfileConfigSnapshot(this); + if (inspectConfigBuilder_ == null) { + result.inspectConfig_ = inspectConfig_; + } else { + result.inspectConfig_ = inspectConfigBuilder_.build(); + } + if (dataProfileJobBuilder_ == null) { + result.dataProfileJob_ = dataProfileJob_; + } else { + result.dataProfileJob_ = dataProfileJobBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfileConfigSnapshot) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfileConfigSnapshot)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileConfigSnapshot other) { + if (other == com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance()) return this; + if (other.hasInspectConfig()) { + mergeInspectConfig(other.getInspectConfig()); + } + if (other.hasDataProfileJob()) { + mergeDataProfileJob(other.getDataProfileJob()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfileConfigSnapshot parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfileConfigSnapshot) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; + /** + *
+     * A copy of the inspection config used to generate this profile. This
+     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + public boolean hasInspectConfig() { + return inspectConfigBuilder_ != null || inspectConfig_ != null; + } + /** + *
+     * A copy of the inspection config used to generate this profile. This
+     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + if (inspectConfigBuilder_ == null) { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } else { + return inspectConfigBuilder_.getMessage(); + } + } + /** + *
+     * A copy of the inspection config used to generate this profile. This
+     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectConfig_ = value; + onChanged(); + } else { + inspectConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A copy of the inspection config used to generate this profile. This
+     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder setInspectConfig( + com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = builderForValue.build(); + onChanged(); + } else { + inspectConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A copy of the inspection config used to generate this profile. This
+     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (inspectConfig_ != null) { + inspectConfig_ = + com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); + } else { + inspectConfig_ = value; + } + onChanged(); + } else { + inspectConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A copy of the inspection config used to generate this profile. This
+     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder clearInspectConfig() { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + onChanged(); + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * A copy of the inspection config used to generate this profile. This
+     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { + + onChanged(); + return getInspectConfigFieldBuilder().getBuilder(); + } + /** + *
+     * A copy of the inspection config used to generate this profile. This
+     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + if (inspectConfigBuilder_ != null) { + return inspectConfigBuilder_.getMessageOrBuilder(); + } else { + return inspectConfig_ == null ? + com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + } + /** + *
+     * A copy of the inspection config used to generate this profile. This
+     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> + getInspectConfigFieldBuilder() { + if (inspectConfigBuilder_ == null) { + inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( + getInspectConfig(), + getParentForChildren(), + isClean()); + inspectConfig_ = null; + } + return inspectConfigBuilder_; + } + + private com.google.privacy.dlp.v2.DataProfileJobConfig dataProfileJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileJobConfig, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder, com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder> dataProfileJobBuilder_; + /** + *
+     * A copy of the configuration used to generate this profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + * @return Whether the dataProfileJob field is set. + */ + public boolean hasDataProfileJob() { + return dataProfileJobBuilder_ != null || dataProfileJob_ != null; + } + /** + *
+     * A copy of the configuration used to generate this profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + * @return The dataProfileJob. + */ + public com.google.privacy.dlp.v2.DataProfileJobConfig getDataProfileJob() { + if (dataProfileJobBuilder_ == null) { + return dataProfileJob_ == null ? com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance() : dataProfileJob_; + } else { + return dataProfileJobBuilder_.getMessage(); + } + } + /** + *
+     * A copy of the configuration used to generate this profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + */ + public Builder setDataProfileJob(com.google.privacy.dlp.v2.DataProfileJobConfig value) { + if (dataProfileJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataProfileJob_ = value; + onChanged(); + } else { + dataProfileJobBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A copy of the configuration used to generate this profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + */ + public Builder setDataProfileJob( + com.google.privacy.dlp.v2.DataProfileJobConfig.Builder builderForValue) { + if (dataProfileJobBuilder_ == null) { + dataProfileJob_ = builderForValue.build(); + onChanged(); + } else { + dataProfileJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A copy of the configuration used to generate this profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + */ + public Builder mergeDataProfileJob(com.google.privacy.dlp.v2.DataProfileJobConfig value) { + if (dataProfileJobBuilder_ == null) { + if (dataProfileJob_ != null) { + dataProfileJob_ = + com.google.privacy.dlp.v2.DataProfileJobConfig.newBuilder(dataProfileJob_).mergeFrom(value).buildPartial(); + } else { + dataProfileJob_ = value; + } + onChanged(); + } else { + dataProfileJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A copy of the configuration used to generate this profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + */ + public Builder clearDataProfileJob() { + if (dataProfileJobBuilder_ == null) { + dataProfileJob_ = null; + onChanged(); + } else { + dataProfileJob_ = null; + dataProfileJobBuilder_ = null; + } + + return this; + } + /** + *
+     * A copy of the configuration used to generate this profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + */ + public com.google.privacy.dlp.v2.DataProfileJobConfig.Builder getDataProfileJobBuilder() { + + onChanged(); + return getDataProfileJobFieldBuilder().getBuilder(); + } + /** + *
+     * A copy of the configuration used to generate this profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + */ + public com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder getDataProfileJobOrBuilder() { + if (dataProfileJobBuilder_ != null) { + return dataProfileJobBuilder_.getMessageOrBuilder(); + } else { + return dataProfileJob_ == null ? + com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance() : dataProfileJob_; + } + } + /** + *
+     * A copy of the configuration used to generate this profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileJobConfig, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder, com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder> + getDataProfileJobFieldBuilder() { + if (dataProfileJobBuilder_ == null) { + dataProfileJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileJobConfig, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder, com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder>( + getDataProfileJob(), + getParentForChildren(), + isClean()); + dataProfileJob_ = null; + } + return dataProfileJobBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileConfigSnapshot) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileConfigSnapshot) + private static final com.google.privacy.dlp.v2.DataProfileConfigSnapshot DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileConfigSnapshot(); + } + + public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataProfileConfigSnapshot parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataProfileConfigSnapshot(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileConfigSnapshot getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshotOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshotOrBuilder.java new file mode 100644 index 000000000000..337522af38b6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshotOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DataProfileConfigSnapshotOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileConfigSnapshot) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A copy of the inspection config used to generate this profile. This
+   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + boolean hasInspectConfig(); + /** + *
+   * A copy of the inspection config used to generate this profile. This
+   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); + /** + *
+   * A copy of the inspection config used to generate this profile. This
+   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); + + /** + *
+   * A copy of the configuration used to generate this profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + * @return Whether the dataProfileJob field is set. + */ + boolean hasDataProfileJob(); + /** + *
+   * A copy of the configuration used to generate this profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + * @return The dataProfileJob. + */ + com.google.privacy.dlp.v2.DataProfileJobConfig getDataProfileJob(); + /** + *
+   * A copy of the configuration used to generate this profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; + */ + com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder getDataProfileJobOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfig.java new file mode 100644 index 000000000000..c3dbffae47e3 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfig.java @@ -0,0 +1,1698 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Configuration for setting up a job to scan resources for profile generation.
+ * Only one data profile configuration may exist per organization, folder,
+ * or project.
+ * The generated data profiles are retained according to the
+ * [data retention policy]
+ * (https://cloud.google.com/dlp/docs/data-profiles#retention).
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileJobConfig} + */ +public final class DataProfileJobConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileJobConfig) + DataProfileJobConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataProfileJobConfig.newBuilder() to construct. + private DataProfileJobConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataProfileJobConfig() { + projectId_ = ""; + inspectTemplates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + dataProfileActions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataProfileJobConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DataProfileJobConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.DataProfileLocation.Builder subBuilder = null; + if (location_ != null) { + subBuilder = location_.toBuilder(); + } + location_ = input.readMessage(com.google.privacy.dlp.v2.DataProfileLocation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(location_); + location_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + dataProfileActions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + dataProfileActions_.add( + input.readMessage(com.google.privacy.dlp.v2.DataProfileAction.parser(), extensionRegistry)); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inspectTemplates_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + inspectTemplates_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + dataProfileActions_ = java.util.Collections.unmodifiableList(dataProfileActions_); + } + if (((mutable_bitField0_ & 0x00000001) != 0)) { + inspectTemplates_ = inspectTemplates_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileJobConfig.class, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder.class); + } + + public static final int LOCATION_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.DataProfileLocation location_; + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return location_ != null; + } + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + * @return The location. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileLocation getLocation() { + return location_ == null ? com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance() : location_; + } + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileLocationOrBuilder getLocationOrBuilder() { + return getLocation(); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object projectId_; + /** + *
+   * The project that will run the scan. The DLP service
+   * account that exists within this project must have access to all resources
+   * that are profiled, and the Cloud DLP API must be enabled.
+   * 
+ * + * string project_id = 5; + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + *
+   * The project that will run the scan. The DLP service
+   * account that exists within this project must have access to all resources
+   * that are profiled, and the Cloud DLP API must be enabled.
+   * 
+ * + * string project_id = 5; + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSPECT_TEMPLATES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList inspectTemplates_; + /** + *
+   * Detection logic for profile generation.
+   * Not all template features are used by profiles. FindingLimits,
+   * include_quote and exclude_info_types have no impact on
+   * data profiling.
+   * Multiple templates may be provided if there is data in multiple regions.
+   * At most one template must be specified per-region (including "global").
+   * Each region is scanned using the applicable template. If no region-specific
+   * template is specified, but a "global" template is specified, it will be
+   * copied to that region and used instead. If no global or region-specific
+   * template is provided for a region with data, that region's data will not be
+   * scanned.
+   * For more information, see
+   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+   * 
+ * + * repeated string inspect_templates = 7; + * @return A list containing the inspectTemplates. + */ + public com.google.protobuf.ProtocolStringList + getInspectTemplatesList() { + return inspectTemplates_; + } + /** + *
+   * Detection logic for profile generation.
+   * Not all template features are used by profiles. FindingLimits,
+   * include_quote and exclude_info_types have no impact on
+   * data profiling.
+   * Multiple templates may be provided if there is data in multiple regions.
+   * At most one template must be specified per-region (including "global").
+   * Each region is scanned using the applicable template. If no region-specific
+   * template is specified, but a "global" template is specified, it will be
+   * copied to that region and used instead. If no global or region-specific
+   * template is provided for a region with data, that region's data will not be
+   * scanned.
+   * For more information, see
+   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+   * 
+ * + * repeated string inspect_templates = 7; + * @return The count of inspectTemplates. + */ + public int getInspectTemplatesCount() { + return inspectTemplates_.size(); + } + /** + *
+   * Detection logic for profile generation.
+   * Not all template features are used by profiles. FindingLimits,
+   * include_quote and exclude_info_types have no impact on
+   * data profiling.
+   * Multiple templates may be provided if there is data in multiple regions.
+   * At most one template must be specified per-region (including "global").
+   * Each region is scanned using the applicable template. If no region-specific
+   * template is specified, but a "global" template is specified, it will be
+   * copied to that region and used instead. If no global or region-specific
+   * template is provided for a region with data, that region's data will not be
+   * scanned.
+   * For more information, see
+   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+   * 
+ * + * repeated string inspect_templates = 7; + * @param index The index of the element to return. + * @return The inspectTemplates at the given index. + */ + public java.lang.String getInspectTemplates(int index) { + return inspectTemplates_.get(index); + } + /** + *
+   * Detection logic for profile generation.
+   * Not all template features are used by profiles. FindingLimits,
+   * include_quote and exclude_info_types have no impact on
+   * data profiling.
+   * Multiple templates may be provided if there is data in multiple regions.
+   * At most one template must be specified per-region (including "global").
+   * Each region is scanned using the applicable template. If no region-specific
+   * template is specified, but a "global" template is specified, it will be
+   * copied to that region and used instead. If no global or region-specific
+   * template is provided for a region with data, that region's data will not be
+   * scanned.
+   * For more information, see
+   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+   * 
+ * + * repeated string inspect_templates = 7; + * @param index The index of the value to return. + * @return The bytes of the inspectTemplates at the given index. + */ + public com.google.protobuf.ByteString + getInspectTemplatesBytes(int index) { + return inspectTemplates_.getByteString(index); + } + + public static final int DATA_PROFILE_ACTIONS_FIELD_NUMBER = 6; + private java.util.List dataProfileActions_; + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + @java.lang.Override + public java.util.List getDataProfileActionsList() { + return dataProfileActions_; + } + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + @java.lang.Override + public java.util.List + getDataProfileActionsOrBuilderList() { + return dataProfileActions_; + } + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + @java.lang.Override + public int getDataProfileActionsCount() { + return dataProfileActions_.size(); + } + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction getDataProfileActions(int index) { + return dataProfileActions_.get(index); + } + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileActionOrBuilder getDataProfileActionsOrBuilder( + int index) { + return dataProfileActions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (location_ != null) { + output.writeMessage(1, getLocation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, projectId_); + } + for (int i = 0; i < dataProfileActions_.size(); i++) { + output.writeMessage(6, dataProfileActions_.get(i)); + } + for (int i = 0; i < inspectTemplates_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, inspectTemplates_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (location_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLocation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, projectId_); + } + for (int i = 0; i < dataProfileActions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, dataProfileActions_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < inspectTemplates_.size(); i++) { + dataSize += computeStringSizeNoTag(inspectTemplates_.getRaw(i)); + } + size += dataSize; + size += 1 * getInspectTemplatesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileJobConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfileJobConfig other = (com.google.privacy.dlp.v2.DataProfileJobConfig) obj; + + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation() + .equals(other.getLocation())) return false; + } + if (!getProjectId() + .equals(other.getProjectId())) return false; + if (!getInspectTemplatesList() + .equals(other.getInspectTemplatesList())) return false; + if (!getDataProfileActionsList() + .equals(other.getDataProfileActionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (getInspectTemplatesCount() > 0) { + hash = (37 * hash) + INSPECT_TEMPLATES_FIELD_NUMBER; + hash = (53 * hash) + getInspectTemplatesList().hashCode(); + } + if (getDataProfileActionsCount() > 0) { + hash = (37 * hash) + DATA_PROFILE_ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDataProfileActionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileJobConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration for setting up a job to scan resources for profile generation.
+   * Only one data profile configuration may exist per organization, folder,
+   * or project.
+   * The generated data profiles are retained according to the
+   * [data retention policy]
+   * (https://cloud.google.com/dlp/docs/data-profiles#retention).
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileJobConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileJobConfig) + com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileJobConfig.class, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfileJobConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDataProfileActionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (locationBuilder_ == null) { + location_ = null; + } else { + location_ = null; + locationBuilder_ = null; + } + projectId_ = ""; + + inspectTemplates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (dataProfileActionsBuilder_ == null) { + dataProfileActions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + dataProfileActionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileJobConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileJobConfig build() { + com.google.privacy.dlp.v2.DataProfileJobConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileJobConfig buildPartial() { + com.google.privacy.dlp.v2.DataProfileJobConfig result = new com.google.privacy.dlp.v2.DataProfileJobConfig(this); + int from_bitField0_ = bitField0_; + if (locationBuilder_ == null) { + result.location_ = location_; + } else { + result.location_ = locationBuilder_.build(); + } + result.projectId_ = projectId_; + if (((bitField0_ & 0x00000001) != 0)) { + inspectTemplates_ = inspectTemplates_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.inspectTemplates_ = inspectTemplates_; + if (dataProfileActionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + dataProfileActions_ = java.util.Collections.unmodifiableList(dataProfileActions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.dataProfileActions_ = dataProfileActions_; + } else { + result.dataProfileActions_ = dataProfileActionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfileJobConfig) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfileJobConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileJobConfig other) { + if (other == com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance()) return this; + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (!other.inspectTemplates_.isEmpty()) { + if (inspectTemplates_.isEmpty()) { + inspectTemplates_ = other.inspectTemplates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInspectTemplatesIsMutable(); + inspectTemplates_.addAll(other.inspectTemplates_); + } + onChanged(); + } + if (dataProfileActionsBuilder_ == null) { + if (!other.dataProfileActions_.isEmpty()) { + if (dataProfileActions_.isEmpty()) { + dataProfileActions_ = other.dataProfileActions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDataProfileActionsIsMutable(); + dataProfileActions_.addAll(other.dataProfileActions_); + } + onChanged(); + } + } else { + if (!other.dataProfileActions_.isEmpty()) { + if (dataProfileActionsBuilder_.isEmpty()) { + dataProfileActionsBuilder_.dispose(); + dataProfileActionsBuilder_ = null; + dataProfileActions_ = other.dataProfileActions_; + bitField0_ = (bitField0_ & ~0x00000002); + dataProfileActionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDataProfileActionsFieldBuilder() : null; + } else { + dataProfileActionsBuilder_.addAllMessages(other.dataProfileActions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfileJobConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfileJobConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.DataProfileLocation location_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileLocation, com.google.privacy.dlp.v2.DataProfileLocation.Builder, com.google.privacy.dlp.v2.DataProfileLocationOrBuilder> locationBuilder_; + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return locationBuilder_ != null || location_ != null; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + * @return The location. + */ + public com.google.privacy.dlp.v2.DataProfileLocation getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + */ + public Builder setLocation(com.google.privacy.dlp.v2.DataProfileLocation value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + locationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + */ + public Builder setLocation( + com.google.privacy.dlp.v2.DataProfileLocation.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + */ + public Builder mergeLocation(com.google.privacy.dlp.v2.DataProfileLocation value) { + if (locationBuilder_ == null) { + if (location_ != null) { + location_ = + com.google.privacy.dlp.v2.DataProfileLocation.newBuilder(location_).mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + locationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + location_ = null; + onChanged(); + } else { + location_ = null; + locationBuilder_ = null; + } + + return this; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + */ + public com.google.privacy.dlp.v2.DataProfileLocation.Builder getLocationBuilder() { + + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + */ + public com.google.privacy.dlp.v2.DataProfileLocationOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? + com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance() : location_; + } + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileLocation, com.google.privacy.dlp.v2.DataProfileLocation.Builder, com.google.privacy.dlp.v2.DataProfileLocationOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileLocation, com.google.privacy.dlp.v2.DataProfileLocation.Builder, com.google.privacy.dlp.v2.DataProfileLocationOrBuilder>( + getLocation(), + getParentForChildren(), + isClean()); + location_ = null; + } + return locationBuilder_; + } + + private java.lang.Object projectId_ = ""; + /** + *
+     * The project that will run the scan. The DLP service
+     * account that exists within this project must have access to all resources
+     * that are profiled, and the Cloud DLP API must be enabled.
+     * 
+ * + * string project_id = 5; + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The project that will run the scan. The DLP service
+     * account that exists within this project must have access to all resources
+     * that are profiled, and the Cloud DLP API must be enabled.
+     * 
+ * + * string project_id = 5; + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The project that will run the scan. The DLP service
+     * account that exists within this project must have access to all resources
+     * that are profiled, and the Cloud DLP API must be enabled.
+     * 
+ * + * string project_id = 5; + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + *
+     * The project that will run the scan. The DLP service
+     * account that exists within this project must have access to all resources
+     * that are profiled, and the Cloud DLP API must be enabled.
+     * 
+ * + * string project_id = 5; + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + *
+     * The project that will run the scan. The DLP service
+     * account that exists within this project must have access to all resources
+     * that are profiled, and the Cloud DLP API must be enabled.
+     * 
+ * + * string project_id = 5; + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList inspectTemplates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureInspectTemplatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + inspectTemplates_ = new com.google.protobuf.LazyStringArrayList(inspectTemplates_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Detection logic for profile generation.
+     * Not all template features are used by profiles. FindingLimits,
+     * include_quote and exclude_info_types have no impact on
+     * data profiling.
+     * Multiple templates may be provided if there is data in multiple regions.
+     * At most one template must be specified per-region (including "global").
+     * Each region is scanned using the applicable template. If no region-specific
+     * template is specified, but a "global" template is specified, it will be
+     * copied to that region and used instead. If no global or region-specific
+     * template is provided for a region with data, that region's data will not be
+     * scanned.
+     * For more information, see
+     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+     * 
+ * + * repeated string inspect_templates = 7; + * @return A list containing the inspectTemplates. + */ + public com.google.protobuf.ProtocolStringList + getInspectTemplatesList() { + return inspectTemplates_.getUnmodifiableView(); + } + /** + *
+     * Detection logic for profile generation.
+     * Not all template features are used by profiles. FindingLimits,
+     * include_quote and exclude_info_types have no impact on
+     * data profiling.
+     * Multiple templates may be provided if there is data in multiple regions.
+     * At most one template must be specified per-region (including "global").
+     * Each region is scanned using the applicable template. If no region-specific
+     * template is specified, but a "global" template is specified, it will be
+     * copied to that region and used instead. If no global or region-specific
+     * template is provided for a region with data, that region's data will not be
+     * scanned.
+     * For more information, see
+     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+     * 
+ * + * repeated string inspect_templates = 7; + * @return The count of inspectTemplates. + */ + public int getInspectTemplatesCount() { + return inspectTemplates_.size(); + } + /** + *
+     * Detection logic for profile generation.
+     * Not all template features are used by profiles. FindingLimits,
+     * include_quote and exclude_info_types have no impact on
+     * data profiling.
+     * Multiple templates may be provided if there is data in multiple regions.
+     * At most one template must be specified per-region (including "global").
+     * Each region is scanned using the applicable template. If no region-specific
+     * template is specified, but a "global" template is specified, it will be
+     * copied to that region and used instead. If no global or region-specific
+     * template is provided for a region with data, that region's data will not be
+     * scanned.
+     * For more information, see
+     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+     * 
+ * + * repeated string inspect_templates = 7; + * @param index The index of the element to return. + * @return The inspectTemplates at the given index. + */ + public java.lang.String getInspectTemplates(int index) { + return inspectTemplates_.get(index); + } + /** + *
+     * Detection logic for profile generation.
+     * Not all template features are used by profiles. FindingLimits,
+     * include_quote and exclude_info_types have no impact on
+     * data profiling.
+     * Multiple templates may be provided if there is data in multiple regions.
+     * At most one template must be specified per-region (including "global").
+     * Each region is scanned using the applicable template. If no region-specific
+     * template is specified, but a "global" template is specified, it will be
+     * copied to that region and used instead. If no global or region-specific
+     * template is provided for a region with data, that region's data will not be
+     * scanned.
+     * For more information, see
+     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+     * 
+ * + * repeated string inspect_templates = 7; + * @param index The index of the value to return. + * @return The bytes of the inspectTemplates at the given index. + */ + public com.google.protobuf.ByteString + getInspectTemplatesBytes(int index) { + return inspectTemplates_.getByteString(index); + } + /** + *
+     * Detection logic for profile generation.
+     * Not all template features are used by profiles. FindingLimits,
+     * include_quote and exclude_info_types have no impact on
+     * data profiling.
+     * Multiple templates may be provided if there is data in multiple regions.
+     * At most one template must be specified per-region (including "global").
+     * Each region is scanned using the applicable template. If no region-specific
+     * template is specified, but a "global" template is specified, it will be
+     * copied to that region and used instead. If no global or region-specific
+     * template is provided for a region with data, that region's data will not be
+     * scanned.
+     * For more information, see
+     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+     * 
+ * + * repeated string inspect_templates = 7; + * @param index The index to set the value at. + * @param value The inspectTemplates to set. + * @return This builder for chaining. + */ + public Builder setInspectTemplates( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInspectTemplatesIsMutable(); + inspectTemplates_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Detection logic for profile generation.
+     * Not all template features are used by profiles. FindingLimits,
+     * include_quote and exclude_info_types have no impact on
+     * data profiling.
+     * Multiple templates may be provided if there is data in multiple regions.
+     * At most one template must be specified per-region (including "global").
+     * Each region is scanned using the applicable template. If no region-specific
+     * template is specified, but a "global" template is specified, it will be
+     * copied to that region and used instead. If no global or region-specific
+     * template is provided for a region with data, that region's data will not be
+     * scanned.
+     * For more information, see
+     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+     * 
+ * + * repeated string inspect_templates = 7; + * @param value The inspectTemplates to add. + * @return This builder for chaining. + */ + public Builder addInspectTemplates( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInspectTemplatesIsMutable(); + inspectTemplates_.add(value); + onChanged(); + return this; + } + /** + *
+     * Detection logic for profile generation.
+     * Not all template features are used by profiles. FindingLimits,
+     * include_quote and exclude_info_types have no impact on
+     * data profiling.
+     * Multiple templates may be provided if there is data in multiple regions.
+     * At most one template must be specified per-region (including "global").
+     * Each region is scanned using the applicable template. If no region-specific
+     * template is specified, but a "global" template is specified, it will be
+     * copied to that region and used instead. If no global or region-specific
+     * template is provided for a region with data, that region's data will not be
+     * scanned.
+     * For more information, see
+     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+     * 
+ * + * repeated string inspect_templates = 7; + * @param values The inspectTemplates to add. + * @return This builder for chaining. + */ + public Builder addAllInspectTemplates( + java.lang.Iterable values) { + ensureInspectTemplatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, inspectTemplates_); + onChanged(); + return this; + } + /** + *
+     * Detection logic for profile generation.
+     * Not all template features are used by profiles. FindingLimits,
+     * include_quote and exclude_info_types have no impact on
+     * data profiling.
+     * Multiple templates may be provided if there is data in multiple regions.
+     * At most one template must be specified per-region (including "global").
+     * Each region is scanned using the applicable template. If no region-specific
+     * template is specified, but a "global" template is specified, it will be
+     * copied to that region and used instead. If no global or region-specific
+     * template is provided for a region with data, that region's data will not be
+     * scanned.
+     * For more information, see
+     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+     * 
+ * + * repeated string inspect_templates = 7; + * @return This builder for chaining. + */ + public Builder clearInspectTemplates() { + inspectTemplates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Detection logic for profile generation.
+     * Not all template features are used by profiles. FindingLimits,
+     * include_quote and exclude_info_types have no impact on
+     * data profiling.
+     * Multiple templates may be provided if there is data in multiple regions.
+     * At most one template must be specified per-region (including "global").
+     * Each region is scanned using the applicable template. If no region-specific
+     * template is specified, but a "global" template is specified, it will be
+     * copied to that region and used instead. If no global or region-specific
+     * template is provided for a region with data, that region's data will not be
+     * scanned.
+     * For more information, see
+     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+     * 
+ * + * repeated string inspect_templates = 7; + * @param value The bytes of the inspectTemplates to add. + * @return This builder for chaining. + */ + public Builder addInspectTemplatesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInspectTemplatesIsMutable(); + inspectTemplates_.add(value); + onChanged(); + return this; + } + + private java.util.List dataProfileActions_ = + java.util.Collections.emptyList(); + private void ensureDataProfileActionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + dataProfileActions_ = new java.util.ArrayList(dataProfileActions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileAction, com.google.privacy.dlp.v2.DataProfileAction.Builder, com.google.privacy.dlp.v2.DataProfileActionOrBuilder> dataProfileActionsBuilder_; + + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public java.util.List getDataProfileActionsList() { + if (dataProfileActionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataProfileActions_); + } else { + return dataProfileActionsBuilder_.getMessageList(); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public int getDataProfileActionsCount() { + if (dataProfileActionsBuilder_ == null) { + return dataProfileActions_.size(); + } else { + return dataProfileActionsBuilder_.getCount(); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public com.google.privacy.dlp.v2.DataProfileAction getDataProfileActions(int index) { + if (dataProfileActionsBuilder_ == null) { + return dataProfileActions_.get(index); + } else { + return dataProfileActionsBuilder_.getMessage(index); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public Builder setDataProfileActions( + int index, com.google.privacy.dlp.v2.DataProfileAction value) { + if (dataProfileActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataProfileActionsIsMutable(); + dataProfileActions_.set(index, value); + onChanged(); + } else { + dataProfileActionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public Builder setDataProfileActions( + int index, com.google.privacy.dlp.v2.DataProfileAction.Builder builderForValue) { + if (dataProfileActionsBuilder_ == null) { + ensureDataProfileActionsIsMutable(); + dataProfileActions_.set(index, builderForValue.build()); + onChanged(); + } else { + dataProfileActionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public Builder addDataProfileActions(com.google.privacy.dlp.v2.DataProfileAction value) { + if (dataProfileActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataProfileActionsIsMutable(); + dataProfileActions_.add(value); + onChanged(); + } else { + dataProfileActionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public Builder addDataProfileActions( + int index, com.google.privacy.dlp.v2.DataProfileAction value) { + if (dataProfileActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataProfileActionsIsMutable(); + dataProfileActions_.add(index, value); + onChanged(); + } else { + dataProfileActionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public Builder addDataProfileActions( + com.google.privacy.dlp.v2.DataProfileAction.Builder builderForValue) { + if (dataProfileActionsBuilder_ == null) { + ensureDataProfileActionsIsMutable(); + dataProfileActions_.add(builderForValue.build()); + onChanged(); + } else { + dataProfileActionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public Builder addDataProfileActions( + int index, com.google.privacy.dlp.v2.DataProfileAction.Builder builderForValue) { + if (dataProfileActionsBuilder_ == null) { + ensureDataProfileActionsIsMutable(); + dataProfileActions_.add(index, builderForValue.build()); + onChanged(); + } else { + dataProfileActionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public Builder addAllDataProfileActions( + java.lang.Iterable values) { + if (dataProfileActionsBuilder_ == null) { + ensureDataProfileActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dataProfileActions_); + onChanged(); + } else { + dataProfileActionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public Builder clearDataProfileActions() { + if (dataProfileActionsBuilder_ == null) { + dataProfileActions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + dataProfileActionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public Builder removeDataProfileActions(int index) { + if (dataProfileActionsBuilder_ == null) { + ensureDataProfileActionsIsMutable(); + dataProfileActions_.remove(index); + onChanged(); + } else { + dataProfileActionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public com.google.privacy.dlp.v2.DataProfileAction.Builder getDataProfileActionsBuilder( + int index) { + return getDataProfileActionsFieldBuilder().getBuilder(index); + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public com.google.privacy.dlp.v2.DataProfileActionOrBuilder getDataProfileActionsOrBuilder( + int index) { + if (dataProfileActionsBuilder_ == null) { + return dataProfileActions_.get(index); } else { + return dataProfileActionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public java.util.List + getDataProfileActionsOrBuilderList() { + if (dataProfileActionsBuilder_ != null) { + return dataProfileActionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataProfileActions_); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public com.google.privacy.dlp.v2.DataProfileAction.Builder addDataProfileActionsBuilder() { + return getDataProfileActionsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.DataProfileAction.getDefaultInstance()); + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public com.google.privacy.dlp.v2.DataProfileAction.Builder addDataProfileActionsBuilder( + int index) { + return getDataProfileActionsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.DataProfileAction.getDefaultInstance()); + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + public java.util.List + getDataProfileActionsBuilderList() { + return getDataProfileActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileAction, com.google.privacy.dlp.v2.DataProfileAction.Builder, com.google.privacy.dlp.v2.DataProfileActionOrBuilder> + getDataProfileActionsFieldBuilder() { + if (dataProfileActionsBuilder_ == null) { + dataProfileActionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileAction, com.google.privacy.dlp.v2.DataProfileAction.Builder, com.google.privacy.dlp.v2.DataProfileActionOrBuilder>( + dataProfileActions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + dataProfileActions_ = null; + } + return dataProfileActionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileJobConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileJobConfig) + private static final com.google.privacy.dlp.v2.DataProfileJobConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileJobConfig(); + } + + public static com.google.privacy.dlp.v2.DataProfileJobConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataProfileJobConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataProfileJobConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileJobConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfigOrBuilder.java new file mode 100644 index 000000000000..76a7c3377234 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfigOrBuilder.java @@ -0,0 +1,193 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DataProfileJobConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileJobConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + * @return Whether the location field is set. + */ + boolean hasLocation(); + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + * @return The location. + */ + com.google.privacy.dlp.v2.DataProfileLocation getLocation(); + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileLocation location = 1; + */ + com.google.privacy.dlp.v2.DataProfileLocationOrBuilder getLocationOrBuilder(); + + /** + *
+   * The project that will run the scan. The DLP service
+   * account that exists within this project must have access to all resources
+   * that are profiled, and the Cloud DLP API must be enabled.
+   * 
+ * + * string project_id = 5; + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + *
+   * The project that will run the scan. The DLP service
+   * account that exists within this project must have access to all resources
+   * that are profiled, and the Cloud DLP API must be enabled.
+   * 
+ * + * string project_id = 5; + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString + getProjectIdBytes(); + + /** + *
+   * Detection logic for profile generation.
+   * Not all template features are used by profiles. FindingLimits,
+   * include_quote and exclude_info_types have no impact on
+   * data profiling.
+   * Multiple templates may be provided if there is data in multiple regions.
+   * At most one template must be specified per-region (including "global").
+   * Each region is scanned using the applicable template. If no region-specific
+   * template is specified, but a "global" template is specified, it will be
+   * copied to that region and used instead. If no global or region-specific
+   * template is provided for a region with data, that region's data will not be
+   * scanned.
+   * For more information, see
+   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+   * 
+ * + * repeated string inspect_templates = 7; + * @return A list containing the inspectTemplates. + */ + java.util.List + getInspectTemplatesList(); + /** + *
+   * Detection logic for profile generation.
+   * Not all template features are used by profiles. FindingLimits,
+   * include_quote and exclude_info_types have no impact on
+   * data profiling.
+   * Multiple templates may be provided if there is data in multiple regions.
+   * At most one template must be specified per-region (including "global").
+   * Each region is scanned using the applicable template. If no region-specific
+   * template is specified, but a "global" template is specified, it will be
+   * copied to that region and used instead. If no global or region-specific
+   * template is provided for a region with data, that region's data will not be
+   * scanned.
+   * For more information, see
+   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+   * 
+ * + * repeated string inspect_templates = 7; + * @return The count of inspectTemplates. + */ + int getInspectTemplatesCount(); + /** + *
+   * Detection logic for profile generation.
+   * Not all template features are used by profiles. FindingLimits,
+   * include_quote and exclude_info_types have no impact on
+   * data profiling.
+   * Multiple templates may be provided if there is data in multiple regions.
+   * At most one template must be specified per-region (including "global").
+   * Each region is scanned using the applicable template. If no region-specific
+   * template is specified, but a "global" template is specified, it will be
+   * copied to that region and used instead. If no global or region-specific
+   * template is provided for a region with data, that region's data will not be
+   * scanned.
+   * For more information, see
+   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+   * 
+ * + * repeated string inspect_templates = 7; + * @param index The index of the element to return. + * @return The inspectTemplates at the given index. + */ + java.lang.String getInspectTemplates(int index); + /** + *
+   * Detection logic for profile generation.
+   * Not all template features are used by profiles. FindingLimits,
+   * include_quote and exclude_info_types have no impact on
+   * data profiling.
+   * Multiple templates may be provided if there is data in multiple regions.
+   * At most one template must be specified per-region (including "global").
+   * Each region is scanned using the applicable template. If no region-specific
+   * template is specified, but a "global" template is specified, it will be
+   * copied to that region and used instead. If no global or region-specific
+   * template is provided for a region with data, that region's data will not be
+   * scanned.
+   * For more information, see
+   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
+   * 
+ * + * repeated string inspect_templates = 7; + * @param index The index of the value to return. + * @return The bytes of the inspectTemplates at the given index. + */ + com.google.protobuf.ByteString + getInspectTemplatesBytes(int index); + + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + java.util.List + getDataProfileActionsList(); + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + com.google.privacy.dlp.v2.DataProfileAction getDataProfileActions(int index); + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + int getDataProfileActionsCount(); + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + java.util.List + getDataProfileActionsOrBuilderList(); + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; + */ + com.google.privacy.dlp.v2.DataProfileActionOrBuilder getDataProfileActionsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocation.java new file mode 100644 index 000000000000..c2a8f62f4c82 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocation.java @@ -0,0 +1,734 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The data that will be profiled.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileLocation} + */ +public final class DataProfileLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileLocation) + DataProfileLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataProfileLocation.newBuilder() to construct. + private DataProfileLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataProfileLocation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataProfileLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DataProfileLocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + location_ = input.readInt64(); + locationCase_ = 1; + break; + } + case 16: { + location_ = input.readInt64(); + locationCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileLocation.class, com.google.privacy.dlp.v2.DataProfileLocation.Builder.class); + } + + private int locationCase_ = 0; + private java.lang.Object location_; + public enum LocationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ORGANIZATION_ID(1), + FOLDER_ID(2), + LOCATION_NOT_SET(0); + private final int value; + private LocationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LocationCase valueOf(int value) { + return forNumber(value); + } + + public static LocationCase forNumber(int value) { + switch (value) { + case 1: return ORGANIZATION_ID; + case 2: return FOLDER_ID; + case 0: return LOCATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LocationCase + getLocationCase() { + return LocationCase.forNumber( + locationCase_); + } + + public static final int ORGANIZATION_ID_FIELD_NUMBER = 1; + /** + *
+   * The ID of an organization to scan.
+   * 
+ * + * int64 organization_id = 1; + * @return Whether the organizationId field is set. + */ + @java.lang.Override + public boolean hasOrganizationId() { + return locationCase_ == 1; + } + /** + *
+   * The ID of an organization to scan.
+   * 
+ * + * int64 organization_id = 1; + * @return The organizationId. + */ + @java.lang.Override + public long getOrganizationId() { + if (locationCase_ == 1) { + return (java.lang.Long) location_; + } + return 0L; + } + + public static final int FOLDER_ID_FIELD_NUMBER = 2; + /** + *
+   * The ID of the Folder within an organization to scan.
+   * 
+ * + * int64 folder_id = 2; + * @return Whether the folderId field is set. + */ + @java.lang.Override + public boolean hasFolderId() { + return locationCase_ == 2; + } + /** + *
+   * The ID of the Folder within an organization to scan.
+   * 
+ * + * int64 folder_id = 2; + * @return The folderId. + */ + @java.lang.Override + public long getFolderId() { + if (locationCase_ == 2) { + return (java.lang.Long) location_; + } + return 0L; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (locationCase_ == 1) { + output.writeInt64( + 1, (long)((java.lang.Long) location_)); + } + if (locationCase_ == 2) { + output.writeInt64( + 2, (long)((java.lang.Long) location_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (locationCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size( + 1, (long)((java.lang.Long) location_)); + } + if (locationCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size( + 2, (long)((java.lang.Long) location_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileLocation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfileLocation other = (com.google.privacy.dlp.v2.DataProfileLocation) obj; + + if (!getLocationCase().equals(other.getLocationCase())) return false; + switch (locationCase_) { + case 1: + if (getOrganizationId() + != other.getOrganizationId()) return false; + break; + case 2: + if (getFolderId() + != other.getFolderId()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (locationCase_) { + case 1: + hash = (37 * hash) + ORGANIZATION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOrganizationId()); + break; + case 2: + hash = (37 * hash) + FOLDER_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFolderId()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The data that will be profiled.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfileLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileLocation) + com.google.privacy.dlp.v2.DataProfileLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfileLocation.class, com.google.privacy.dlp.v2.DataProfileLocation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfileLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + locationCase_ = 0; + location_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileLocation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileLocation build() { + com.google.privacy.dlp.v2.DataProfileLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileLocation buildPartial() { + com.google.privacy.dlp.v2.DataProfileLocation result = new com.google.privacy.dlp.v2.DataProfileLocation(this); + if (locationCase_ == 1) { + result.location_ = location_; + } + if (locationCase_ == 2) { + result.location_ = location_; + } + result.locationCase_ = locationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfileLocation) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfileLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileLocation other) { + if (other == com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance()) return this; + switch (other.getLocationCase()) { + case ORGANIZATION_ID: { + setOrganizationId(other.getOrganizationId()); + break; + } + case FOLDER_ID: { + setFolderId(other.getFolderId()); + break; + } + case LOCATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfileLocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfileLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int locationCase_ = 0; + private java.lang.Object location_; + public LocationCase + getLocationCase() { + return LocationCase.forNumber( + locationCase_); + } + + public Builder clearLocation() { + locationCase_ = 0; + location_ = null; + onChanged(); + return this; + } + + + /** + *
+     * The ID of an organization to scan.
+     * 
+ * + * int64 organization_id = 1; + * @return Whether the organizationId field is set. + */ + public boolean hasOrganizationId() { + return locationCase_ == 1; + } + /** + *
+     * The ID of an organization to scan.
+     * 
+ * + * int64 organization_id = 1; + * @return The organizationId. + */ + public long getOrganizationId() { + if (locationCase_ == 1) { + return (java.lang.Long) location_; + } + return 0L; + } + /** + *
+     * The ID of an organization to scan.
+     * 
+ * + * int64 organization_id = 1; + * @param value The organizationId to set. + * @return This builder for chaining. + */ + public Builder setOrganizationId(long value) { + locationCase_ = 1; + location_ = value; + onChanged(); + return this; + } + /** + *
+     * The ID of an organization to scan.
+     * 
+ * + * int64 organization_id = 1; + * @return This builder for chaining. + */ + public Builder clearOrganizationId() { + if (locationCase_ == 1) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * The ID of the Folder within an organization to scan.
+     * 
+ * + * int64 folder_id = 2; + * @return Whether the folderId field is set. + */ + public boolean hasFolderId() { + return locationCase_ == 2; + } + /** + *
+     * The ID of the Folder within an organization to scan.
+     * 
+ * + * int64 folder_id = 2; + * @return The folderId. + */ + public long getFolderId() { + if (locationCase_ == 2) { + return (java.lang.Long) location_; + } + return 0L; + } + /** + *
+     * The ID of the Folder within an organization to scan.
+     * 
+ * + * int64 folder_id = 2; + * @param value The folderId to set. + * @return This builder for chaining. + */ + public Builder setFolderId(long value) { + locationCase_ = 2; + location_ = value; + onChanged(); + return this; + } + /** + *
+     * The ID of the Folder within an organization to scan.
+     * 
+ * + * int64 folder_id = 2; + * @return This builder for chaining. + */ + public Builder clearFolderId() { + if (locationCase_ == 2) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileLocation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileLocation) + private static final com.google.privacy.dlp.v2.DataProfileLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileLocation(); + } + + public static com.google.privacy.dlp.v2.DataProfileLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataProfileLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataProfileLocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocationOrBuilder.java new file mode 100644 index 000000000000..e9c5aa7a3e5f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocationOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DataProfileLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of an organization to scan.
+   * 
+ * + * int64 organization_id = 1; + * @return Whether the organizationId field is set. + */ + boolean hasOrganizationId(); + /** + *
+   * The ID of an organization to scan.
+   * 
+ * + * int64 organization_id = 1; + * @return The organizationId. + */ + long getOrganizationId(); + + /** + *
+   * The ID of the Folder within an organization to scan.
+   * 
+ * + * int64 folder_id = 2; + * @return Whether the folderId field is set. + */ + boolean hasFolderId(); + /** + *
+   * The ID of the Folder within an organization to scan.
+   * 
+ * + * int64 folder_id = 2; + * @return The folderId. + */ + long getFolderId(); + + public com.google.privacy.dlp.v2.DataProfileLocation.LocationCase getLocationCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java new file mode 100644 index 000000000000..0ad14780d773 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java @@ -0,0 +1,2906 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A condition for determining whether a Pub/Sub should be triggered.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition} + */ +public final class DataProfilePubSubCondition extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfilePubSubCondition) + DataProfilePubSubConditionOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataProfilePubSubCondition.newBuilder() to construct. + private DataProfilePubSubCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataProfilePubSubCondition() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataProfilePubSubCondition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DataProfilePubSubCondition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder subBuilder = null; + if (expressions_ != null) { + subBuilder = expressions_.toBuilder(); + } + expressions_ = input.readMessage(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expressions_); + expressions_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder.class); + } + + /** + *
+   * Various score levels for resources.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket} + */ + public enum ProfileScoreBucket + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * PROFILE_SCORE_BUCKET_UNSPECIFIED = 0; + */ + PROFILE_SCORE_BUCKET_UNSPECIFIED(0), + /** + *
+     * High risk/sensitivity detected.
+     * 
+ * + * HIGH = 1; + */ + HIGH(1), + /** + *
+     * Medium or high risk/sensitivity detected.
+     * 
+ * + * MEDIUM_OR_HIGH = 2; + */ + MEDIUM_OR_HIGH(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * PROFILE_SCORE_BUCKET_UNSPECIFIED = 0; + */ + public static final int PROFILE_SCORE_BUCKET_UNSPECIFIED_VALUE = 0; + /** + *
+     * High risk/sensitivity detected.
+     * 
+ * + * HIGH = 1; + */ + public static final int HIGH_VALUE = 1; + /** + *
+     * Medium or high risk/sensitivity detected.
+     * 
+ * + * MEDIUM_OR_HIGH = 2; + */ + public static final int MEDIUM_OR_HIGH_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProfileScoreBucket valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ProfileScoreBucket forNumber(int value) { + switch (value) { + case 0: return PROFILE_SCORE_BUCKET_UNSPECIFIED; + case 1: return HIGH; + case 2: return MEDIUM_OR_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ProfileScoreBucket> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ProfileScoreBucket findValueByNumber(int number) { + return ProfileScoreBucket.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDescriptor().getEnumTypes().get(0); + } + + private static final ProfileScoreBucket[] VALUES = values(); + + public static ProfileScoreBucket valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ProfileScoreBucket(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket) + } + + public interface PubSubConditionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The minimum data risk score that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return Whether the minimumRiskScore field is set. + */ + boolean hasMinimumRiskScore(); + /** + *
+     * The minimum data risk score that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return The enum numeric value on the wire for minimumRiskScore. + */ + int getMinimumRiskScoreValue(); + /** + *
+     * The minimum data risk score that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return The minimumRiskScore. + */ + com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumRiskScore(); + + /** + *
+     * The minimum sensitivity level that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return Whether the minimumSensitivityScore field is set. + */ + boolean hasMinimumSensitivityScore(); + /** + *
+     * The minimum sensitivity level that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return The enum numeric value on the wire for minimumSensitivityScore. + */ + int getMinimumSensitivityScoreValue(); + /** + *
+     * The minimum sensitivity level that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return The minimumSensitivityScore. + */ + com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumSensitivityScore(); + + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.ValueCase getValueCase(); + } + /** + *
+   * A condition consisting of a value.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition} + */ + public static final class PubSubCondition extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) + PubSubConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PubSubCondition.newBuilder() to construct. + private PubSubCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PubSubCondition() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PubSubCondition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PubSubCondition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + valueCase_ = 1; + value_ = rawValue; + break; + } + case 16: { + int rawValue = input.readEnum(); + valueCase_ = 2; + value_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder.class); + } + + private int valueCase_ = 0; + private java.lang.Object value_; + public enum ValueCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MINIMUM_RISK_SCORE(1), + MINIMUM_SENSITIVITY_SCORE(2), + VALUE_NOT_SET(0); + private final int value; + private ValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 1: return MINIMUM_RISK_SCORE; + case 2: return MINIMUM_SENSITIVITY_SCORE; + case 0: return VALUE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public static final int MINIMUM_RISK_SCORE_FIELD_NUMBER = 1; + /** + *
+     * The minimum data risk score that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return Whether the minimumRiskScore field is set. + */ + public boolean hasMinimumRiskScore() { + return valueCase_ == 1; + } + /** + *
+     * The minimum data risk score that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return The enum numeric value on the wire for minimumRiskScore. + */ + public int getMinimumRiskScoreValue() { + if (valueCase_ == 1) { + return (java.lang.Integer) value_; + } + return 0; + } + /** + *
+     * The minimum data risk score that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return The minimumRiskScore. + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumRiskScore() { + if (valueCase_ == 1) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.valueOf( + (java.lang.Integer) value_); + return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.PROFILE_SCORE_BUCKET_UNSPECIFIED; + } + + public static final int MINIMUM_SENSITIVITY_SCORE_FIELD_NUMBER = 2; + /** + *
+     * The minimum sensitivity level that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return Whether the minimumSensitivityScore field is set. + */ + public boolean hasMinimumSensitivityScore() { + return valueCase_ == 2; + } + /** + *
+     * The minimum sensitivity level that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return The enum numeric value on the wire for minimumSensitivityScore. + */ + public int getMinimumSensitivityScoreValue() { + if (valueCase_ == 2) { + return (java.lang.Integer) value_; + } + return 0; + } + /** + *
+     * The minimum sensitivity level that triggers the condition.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return The minimumSensitivityScore. + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumSensitivityScore() { + if (valueCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.valueOf( + (java.lang.Integer) value_); + return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.PROFILE_SCORE_BUCKET_UNSPECIFIED; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (valueCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) value_)); + } + if (valueCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) value_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, ((java.lang.Integer) value_)); + } + if (valueCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, ((java.lang.Integer) value_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition other = (com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) obj; + + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 1: + if (getMinimumRiskScoreValue() + != other.getMinimumRiskScoreValue()) return false; + break; + case 2: + if (getMinimumSensitivityScoreValue() + != other.getMinimumSensitivityScoreValue()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueCase_) { + case 1: + hash = (37 * hash) + MINIMUM_RISK_SCORE_FIELD_NUMBER; + hash = (53 * hash) + getMinimumRiskScoreValue(); + break; + case 2: + hash = (37 * hash) + MINIMUM_SENSITIVITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + getMinimumSensitivityScoreValue(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A condition consisting of a value.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition build() { + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition buildPartial() { + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition result = new com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition(this); + if (valueCase_ == 1) { + result.value_ = value_; + } + if (valueCase_ == 2) { + result.value_ = value_; + } + result.valueCase_ = valueCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition other) { + if (other == com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.getDefaultInstance()) return this; + switch (other.getValueCase()) { + case MINIMUM_RISK_SCORE: { + setMinimumRiskScoreValue(other.getMinimumRiskScoreValue()); + break; + } + case MINIMUM_SENSITIVITY_SCORE: { + setMinimumSensitivityScoreValue(other.getMinimumSensitivityScoreValue()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int valueCase_ = 0; + private java.lang.Object value_; + public ValueCase + getValueCase() { + return ValueCase.forNumber( + valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + + /** + *
+       * The minimum data risk score that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return Whether the minimumRiskScore field is set. + */ + @java.lang.Override + public boolean hasMinimumRiskScore() { + return valueCase_ == 1; + } + /** + *
+       * The minimum data risk score that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return The enum numeric value on the wire for minimumRiskScore. + */ + @java.lang.Override + public int getMinimumRiskScoreValue() { + if (valueCase_ == 1) { + return ((java.lang.Integer) value_).intValue(); + } + return 0; + } + /** + *
+       * The minimum data risk score that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @param value The enum numeric value on the wire for minimumRiskScore to set. + * @return This builder for chaining. + */ + public Builder setMinimumRiskScoreValue(int value) { + valueCase_ = 1; + value_ = value; + onChanged(); + return this; + } + /** + *
+       * The minimum data risk score that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return The minimumRiskScore. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumRiskScore() { + if (valueCase_ == 1) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.valueOf( + (java.lang.Integer) value_); + return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.PROFILE_SCORE_BUCKET_UNSPECIFIED; + } + /** + *
+       * The minimum data risk score that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @param value The minimumRiskScore to set. + * @return This builder for chaining. + */ + public Builder setMinimumRiskScore(com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 1; + value_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The minimum data risk score that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; + * @return This builder for chaining. + */ + public Builder clearMinimumRiskScore() { + if (valueCase_ == 1) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + + /** + *
+       * The minimum sensitivity level that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return Whether the minimumSensitivityScore field is set. + */ + @java.lang.Override + public boolean hasMinimumSensitivityScore() { + return valueCase_ == 2; + } + /** + *
+       * The minimum sensitivity level that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return The enum numeric value on the wire for minimumSensitivityScore. + */ + @java.lang.Override + public int getMinimumSensitivityScoreValue() { + if (valueCase_ == 2) { + return ((java.lang.Integer) value_).intValue(); + } + return 0; + } + /** + *
+       * The minimum sensitivity level that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @param value The enum numeric value on the wire for minimumSensitivityScore to set. + * @return This builder for chaining. + */ + public Builder setMinimumSensitivityScoreValue(int value) { + valueCase_ = 2; + value_ = value; + onChanged(); + return this; + } + /** + *
+       * The minimum sensitivity level that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return The minimumSensitivityScore. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumSensitivityScore() { + if (valueCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.valueOf( + (java.lang.Integer) value_); + return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.PROFILE_SCORE_BUCKET_UNSPECIFIED; + } + /** + *
+       * The minimum sensitivity level that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @param value The minimumSensitivityScore to set. + * @return This builder for chaining. + */ + public Builder setMinimumSensitivityScore(com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 2; + value_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The minimum sensitivity level that triggers the condition.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; + * @return This builder for chaining. + */ + public Builder clearMinimumSensitivityScore() { + if (valueCase_ == 2) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) + private static final com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition(); + } + + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PubSubCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PubSubCondition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PubSubExpressionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The operator to apply to the collection of conditions.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; + * @return The enum numeric value on the wire for logicalOperator. + */ + int getLogicalOperatorValue(); + /** + *
+     * The operator to apply to the collection of conditions.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; + * @return The logicalOperator. + */ + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator getLogicalOperator(); + + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + java.util.List + getConditionsList(); + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getConditions(int index); + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + int getConditionsCount(); + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + java.util.List + getConditionsOrBuilderList(); + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder getConditionsOrBuilder( + int index); + } + /** + *
+   * An expression, consisting of an operator and conditions.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions} + */ + public static final class PubSubExpressions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) + PubSubExpressionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use PubSubExpressions.newBuilder() to construct. + private PubSubExpressions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PubSubExpressions() { + logicalOperator_ = 0; + conditions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PubSubExpressions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PubSubExpressions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + logicalOperator_ = rawValue; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + conditions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + conditions_.add( + input.readMessage(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + conditions_ = java.util.Collections.unmodifiableList(conditions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder.class); + } + + /** + *
+     * Logical operators for conditional checks.
+     * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator} + */ + public enum PubSubLogicalOperator + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unused.
+       * 
+ * + * LOGICAL_OPERATOR_UNSPECIFIED = 0; + */ + LOGICAL_OPERATOR_UNSPECIFIED(0), + /** + *
+       * Conditional OR.
+       * 
+ * + * OR = 1; + */ + OR(1), + /** + *
+       * Conditional AND.
+       * 
+ * + * AND = 2; + */ + AND(2), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unused.
+       * 
+ * + * LOGICAL_OPERATOR_UNSPECIFIED = 0; + */ + public static final int LOGICAL_OPERATOR_UNSPECIFIED_VALUE = 0; + /** + *
+       * Conditional OR.
+       * 
+ * + * OR = 1; + */ + public static final int OR_VALUE = 1; + /** + *
+       * Conditional AND.
+       * 
+ * + * AND = 2; + */ + public static final int AND_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PubSubLogicalOperator valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PubSubLogicalOperator forNumber(int value) { + switch (value) { + case 0: return LOGICAL_OPERATOR_UNSPECIFIED; + case 1: return OR; + case 2: return AND; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PubSubLogicalOperator> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PubSubLogicalOperator findValueByNumber(int number) { + return PubSubLogicalOperator.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDescriptor().getEnumTypes().get(0); + } + + private static final PubSubLogicalOperator[] VALUES = values(); + + public static PubSubLogicalOperator valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PubSubLogicalOperator(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator) + } + + public static final int LOGICAL_OPERATOR_FIELD_NUMBER = 1; + private int logicalOperator_; + /** + *
+     * The operator to apply to the collection of conditions.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; + * @return The enum numeric value on the wire for logicalOperator. + */ + @java.lang.Override public int getLogicalOperatorValue() { + return logicalOperator_; + } + /** + *
+     * The operator to apply to the collection of conditions.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; + * @return The logicalOperator. + */ + @java.lang.Override public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator getLogicalOperator() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.valueOf(logicalOperator_); + return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.UNRECOGNIZED : result; + } + + public static final int CONDITIONS_FIELD_NUMBER = 2; + private java.util.List conditions_; + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + @java.lang.Override + public java.util.List getConditionsList() { + return conditions_; + } + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + @java.lang.Override + public java.util.List + getConditionsOrBuilderList() { + return conditions_; + } + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + @java.lang.Override + public int getConditionsCount() { + return conditions_.size(); + } + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getConditions(int index) { + return conditions_.get(index); + } + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder getConditionsOrBuilder( + int index) { + return conditions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (logicalOperator_ != com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED.getNumber()) { + output.writeEnum(1, logicalOperator_); + } + for (int i = 0; i < conditions_.size(); i++) { + output.writeMessage(2, conditions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (logicalOperator_ != com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, logicalOperator_); + } + for (int i = 0; i < conditions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, conditions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions other = (com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) obj; + + if (logicalOperator_ != other.logicalOperator_) return false; + if (!getConditionsList() + .equals(other.getConditionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOGICAL_OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + logicalOperator_; + if (getConditionsCount() > 0) { + hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; + hash = (53 * hash) + getConditionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * An expression, consisting of an operator and conditions.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getConditionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + logicalOperator_ = 0; + + if (conditionsBuilder_ == null) { + conditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + conditionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions build() { + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions buildPartial() { + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions result = new com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions(this); + int from_bitField0_ = bitField0_; + result.logicalOperator_ = logicalOperator_; + if (conditionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditions_ = java.util.Collections.unmodifiableList(conditions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditions_ = conditions_; + } else { + result.conditions_ = conditionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions other) { + if (other == com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance()) return this; + if (other.logicalOperator_ != 0) { + setLogicalOperatorValue(other.getLogicalOperatorValue()); + } + if (conditionsBuilder_ == null) { + if (!other.conditions_.isEmpty()) { + if (conditions_.isEmpty()) { + conditions_ = other.conditions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionsIsMutable(); + conditions_.addAll(other.conditions_); + } + onChanged(); + } + } else { + if (!other.conditions_.isEmpty()) { + if (conditionsBuilder_.isEmpty()) { + conditionsBuilder_.dispose(); + conditionsBuilder_ = null; + conditions_ = other.conditions_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConditionsFieldBuilder() : null; + } else { + conditionsBuilder_.addAllMessages(other.conditions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int logicalOperator_ = 0; + /** + *
+       * The operator to apply to the collection of conditions.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; + * @return The enum numeric value on the wire for logicalOperator. + */ + @java.lang.Override public int getLogicalOperatorValue() { + return logicalOperator_; + } + /** + *
+       * The operator to apply to the collection of conditions.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; + * @param value The enum numeric value on the wire for logicalOperator to set. + * @return This builder for chaining. + */ + public Builder setLogicalOperatorValue(int value) { + + logicalOperator_ = value; + onChanged(); + return this; + } + /** + *
+       * The operator to apply to the collection of conditions.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; + * @return The logicalOperator. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator getLogicalOperator() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.valueOf(logicalOperator_); + return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.UNRECOGNIZED : result; + } + /** + *
+       * The operator to apply to the collection of conditions.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; + * @param value The logicalOperator to set. + * @return This builder for chaining. + */ + public Builder setLogicalOperator(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator value) { + if (value == null) { + throw new NullPointerException(); + } + + logicalOperator_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The operator to apply to the collection of conditions.
+       * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; + * @return This builder for chaining. + */ + public Builder clearLogicalOperator() { + + logicalOperator_ = 0; + onChanged(); + return this; + } + + private java.util.List conditions_ = + java.util.Collections.emptyList(); + private void ensureConditionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditions_ = new java.util.ArrayList(conditions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder> conditionsBuilder_; + + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public java.util.List getConditionsList() { + if (conditionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditions_); + } else { + return conditionsBuilder_.getMessageList(); + } + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public int getConditionsCount() { + if (conditionsBuilder_ == null) { + return conditions_.size(); + } else { + return conditionsBuilder_.getCount(); + } + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getConditions(int index) { + if (conditionsBuilder_ == null) { + return conditions_.get(index); + } else { + return conditionsBuilder_.getMessage(index); + } + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public Builder setConditions( + int index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.set(index, value); + onChanged(); + } else { + conditionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public Builder setConditions( + int index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public Builder addConditions(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.add(value); + onChanged(); + } else { + conditionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public Builder addConditions( + int index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.add(index, value); + onChanged(); + } else { + conditionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public Builder addConditions( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public Builder addConditions( + int index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public Builder addAllConditions( + java.lang.Iterable values) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, conditions_); + onChanged(); + } else { + conditionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public Builder clearConditions() { + if (conditionsBuilder_ == null) { + conditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conditionsBuilder_.clear(); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public Builder removeConditions(int index) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.remove(index); + onChanged(); + } else { + conditionsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder getConditionsBuilder( + int index) { + return getConditionsFieldBuilder().getBuilder(index); + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder getConditionsOrBuilder( + int index) { + if (conditionsBuilder_ == null) { + return conditions_.get(index); } else { + return conditionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public java.util.List + getConditionsOrBuilderList() { + if (conditionsBuilder_ != null) { + return conditionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditions_); + } + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder addConditionsBuilder() { + return getConditionsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.getDefaultInstance()); + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder addConditionsBuilder( + int index) { + return getConditionsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.getDefaultInstance()); + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; + */ + public java.util.List + getConditionsBuilderList() { + return getConditionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder> + getConditionsFieldBuilder() { + if (conditionsBuilder_ == null) { + conditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder>( + conditions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conditions_ = null; + } + return conditionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) + private static final com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions(); + } + + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PubSubExpressions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PubSubExpressions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int EXPRESSIONS_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions_; + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + * @return Whether the expressions field is set. + */ + @java.lang.Override + public boolean hasExpressions() { + return expressions_ != null; + } + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + * @return The expressions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getExpressions() { + return expressions_ == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance() : expressions_; + } + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder getExpressionsOrBuilder() { + return getExpressions(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (expressions_ != null) { + output.writeMessage(1, getExpressions()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (expressions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getExpressions()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfilePubSubCondition other = (com.google.privacy.dlp.v2.DataProfilePubSubCondition) obj; + + if (hasExpressions() != other.hasExpressions()) return false; + if (hasExpressions()) { + if (!getExpressions() + .equals(other.getExpressions())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExpressions()) { + hash = (37 * hash) + EXPRESSIONS_FIELD_NUMBER; + hash = (53 * hash) + getExpressions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfilePubSubCondition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A condition for determining whether a Pub/Sub should be triggered.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfilePubSubCondition) + com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfilePubSubCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (expressionsBuilder_ == null) { + expressions_ = null; + } else { + expressions_ = null; + expressionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition build() { + com.google.privacy.dlp.v2.DataProfilePubSubCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition buildPartial() { + com.google.privacy.dlp.v2.DataProfilePubSubCondition result = new com.google.privacy.dlp.v2.DataProfilePubSubCondition(this); + if (expressionsBuilder_ == null) { + result.expressions_ = expressions_; + } else { + result.expressions_ = expressionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfilePubSubCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfilePubSubCondition other) { + if (other == com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance()) return this; + if (other.hasExpressions()) { + mergeExpressions(other.getExpressions()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfilePubSubCondition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfilePubSubCondition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder> expressionsBuilder_; + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + * @return Whether the expressions field is set. + */ + public boolean hasExpressions() { + return expressionsBuilder_ != null || expressions_ != null; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + * @return The expressions. + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getExpressions() { + if (expressionsBuilder_ == null) { + return expressions_ == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance() : expressions_; + } else { + return expressionsBuilder_.getMessage(); + } + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + */ + public Builder setExpressions(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions value) { + if (expressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expressions_ = value; + onChanged(); + } else { + expressionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + */ + public Builder setExpressions( + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder builderForValue) { + if (expressionsBuilder_ == null) { + expressions_ = builderForValue.build(); + onChanged(); + } else { + expressionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + */ + public Builder mergeExpressions(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions value) { + if (expressionsBuilder_ == null) { + if (expressions_ != null) { + expressions_ = + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.newBuilder(expressions_).mergeFrom(value).buildPartial(); + } else { + expressions_ = value; + } + onChanged(); + } else { + expressionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + */ + public Builder clearExpressions() { + if (expressionsBuilder_ == null) { + expressions_ = null; + onChanged(); + } else { + expressions_ = null; + expressionsBuilder_ = null; + } + + return this; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder getExpressionsBuilder() { + + onChanged(); + return getExpressionsFieldBuilder().getBuilder(); + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + */ + public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder getExpressionsOrBuilder() { + if (expressionsBuilder_ != null) { + return expressionsBuilder_.getMessageOrBuilder(); + } else { + return expressions_ == null ? + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance() : expressions_; + } + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder> + getExpressionsFieldBuilder() { + if (expressionsBuilder_ == null) { + expressionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder>( + getExpressions(), + getParentForChildren(), + isClean()); + expressions_ = null; + } + return expressionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfilePubSubCondition) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfilePubSubCondition) + private static final com.google.privacy.dlp.v2.DataProfilePubSubCondition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfilePubSubCondition(); + } + + public static com.google.privacy.dlp.v2.DataProfilePubSubCondition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataProfilePubSubCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataProfilePubSubCondition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubCondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubConditionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubConditionOrBuilder.java new file mode 100644 index 000000000000..fc6d80a15713 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubConditionOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DataProfilePubSubConditionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfilePubSubCondition) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + * @return Whether the expressions field is set. + */ + boolean hasExpressions(); + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + * @return The expressions. + */ + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getExpressions(); + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; + */ + com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder getExpressionsOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java new file mode 100644 index 000000000000..4fc3b7a5253a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java @@ -0,0 +1,817 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Pub/Sub topic message for a DataProfileAction.PubSubNotification event.
+ * To receive a message of protocol buffer schema type, convert the message data
+ * to an object of this proto class.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubMessage} + */ +public final class DataProfilePubSubMessage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfilePubSubMessage) + DataProfilePubSubMessageOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataProfilePubSubMessage.newBuilder() to construct. + private DataProfilePubSubMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataProfilePubSubMessage() { + event_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataProfilePubSubMessage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DataProfilePubSubMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.TableDataProfile.Builder subBuilder = null; + if (profile_ != null) { + subBuilder = profile_.toBuilder(); + } + profile_ = input.readMessage(com.google.privacy.dlp.v2.TableDataProfile.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profile_); + profile_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + event_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfilePubSubMessage.class, com.google.privacy.dlp.v2.DataProfilePubSubMessage.Builder.class); + } + + public static final int PROFILE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.TableDataProfile profile_; + /** + *
+   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+   * `full_resource` will be populated.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + * @return Whether the profile field is set. + */ + @java.lang.Override + public boolean hasProfile() { + return profile_ != null; + } + /** + *
+   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+   * `full_resource` will be populated.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + * @return The profile. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableDataProfile getProfile() { + return profile_ == null ? com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance() : profile_; + } + /** + *
+   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+   * `full_resource` will be populated.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableDataProfileOrBuilder getProfileOrBuilder() { + return getProfile(); + } + + public static final int EVENT_FIELD_NUMBER = 2; + private int event_; + /** + *
+   * The event that caused the Pub/Sub message to be sent.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The enum numeric value on the wire for event. + */ + @java.lang.Override public int getEventValue() { + return event_; + } + /** + *
+   * The event that caused the Pub/Sub message to be sent.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The event. + */ + @java.lang.Override public com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfileAction.EventType result = com.google.privacy.dlp.v2.DataProfileAction.EventType.valueOf(event_); + return result == null ? com.google.privacy.dlp.v2.DataProfileAction.EventType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (profile_ != null) { + output.writeMessage(1, getProfile()); + } + if (event_ != com.google.privacy.dlp.v2.DataProfileAction.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, event_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (profile_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProfile()); + } + if (event_ != com.google.privacy.dlp.v2.DataProfileAction.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, event_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataProfilePubSubMessage)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataProfilePubSubMessage other = (com.google.privacy.dlp.v2.DataProfilePubSubMessage) obj; + + if (hasProfile() != other.hasProfile()) return false; + if (hasProfile()) { + if (!getProfile() + .equals(other.getProfile())) return false; + } + if (event_ != other.event_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + hash = (37 * hash) + EVENT_FIELD_NUMBER; + hash = (53 * hash) + event_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfilePubSubMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Pub/Sub topic message for a DataProfileAction.PubSubNotification event.
+   * To receive a message of protocol buffer schema type, convert the message data
+   * to an object of this proto class.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfilePubSubMessage) + com.google.privacy.dlp.v2.DataProfilePubSubMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataProfilePubSubMessage.class, com.google.privacy.dlp.v2.DataProfilePubSubMessage.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataProfilePubSubMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (profileBuilder_ == null) { + profile_ = null; + } else { + profile_ = null; + profileBuilder_ = null; + } + event_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubMessage getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataProfilePubSubMessage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubMessage build() { + com.google.privacy.dlp.v2.DataProfilePubSubMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubMessage buildPartial() { + com.google.privacy.dlp.v2.DataProfilePubSubMessage result = new com.google.privacy.dlp.v2.DataProfilePubSubMessage(this); + if (profileBuilder_ == null) { + result.profile_ = profile_; + } else { + result.profile_ = profileBuilder_.build(); + } + result.event_ = event_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataProfilePubSubMessage) { + return mergeFrom((com.google.privacy.dlp.v2.DataProfilePubSubMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfilePubSubMessage other) { + if (other == com.google.privacy.dlp.v2.DataProfilePubSubMessage.getDefaultInstance()) return this; + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + if (other.event_ != 0) { + setEventValue(other.getEventValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataProfilePubSubMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataProfilePubSubMessage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.TableDataProfile profile_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableDataProfile, com.google.privacy.dlp.v2.TableDataProfile.Builder, com.google.privacy.dlp.v2.TableDataProfileOrBuilder> profileBuilder_; + /** + *
+     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+     * `full_resource` will be populated.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + * @return Whether the profile field is set. + */ + public boolean hasProfile() { + return profileBuilder_ != null || profile_ != null; + } + /** + *
+     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+     * `full_resource` will be populated.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + * @return The profile. + */ + public com.google.privacy.dlp.v2.TableDataProfile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null ? com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance() : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + /** + *
+     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+     * `full_resource` will be populated.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + */ + public Builder setProfile(com.google.privacy.dlp.v2.TableDataProfile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + onChanged(); + } else { + profileBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+     * `full_resource` will be populated.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + */ + public Builder setProfile( + com.google.privacy.dlp.v2.TableDataProfile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + onChanged(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+     * `full_resource` will be populated.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + */ + public Builder mergeProfile(com.google.privacy.dlp.v2.TableDataProfile value) { + if (profileBuilder_ == null) { + if (profile_ != null) { + profile_ = + com.google.privacy.dlp.v2.TableDataProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); + } else { + profile_ = value; + } + onChanged(); + } else { + profileBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+     * `full_resource` will be populated.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + */ + public Builder clearProfile() { + if (profileBuilder_ == null) { + profile_ = null; + onChanged(); + } else { + profile_ = null; + profileBuilder_ = null; + } + + return this; + } + /** + *
+     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+     * `full_resource` will be populated.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + */ + public com.google.privacy.dlp.v2.TableDataProfile.Builder getProfileBuilder() { + + onChanged(); + return getProfileFieldBuilder().getBuilder(); + } + /** + *
+     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+     * `full_resource` will be populated.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + */ + public com.google.privacy.dlp.v2.TableDataProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null ? + com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance() : profile_; + } + } + /** + *
+     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+     * `full_resource` will be populated.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableDataProfile, com.google.privacy.dlp.v2.TableDataProfile.Builder, com.google.privacy.dlp.v2.TableDataProfileOrBuilder> + getProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableDataProfile, com.google.privacy.dlp.v2.TableDataProfile.Builder, com.google.privacy.dlp.v2.TableDataProfileOrBuilder>( + getProfile(), + getParentForChildren(), + isClean()); + profile_ = null; + } + return profileBuilder_; + } + + private int event_ = 0; + /** + *
+     * The event that caused the Pub/Sub message to be sent.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The enum numeric value on the wire for event. + */ + @java.lang.Override public int getEventValue() { + return event_; + } + /** + *
+     * The event that caused the Pub/Sub message to be sent.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @param value The enum numeric value on the wire for event to set. + * @return This builder for chaining. + */ + public Builder setEventValue(int value) { + + event_ = value; + onChanged(); + return this; + } + /** + *
+     * The event that caused the Pub/Sub message to be sent.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The event. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataProfileAction.EventType result = com.google.privacy.dlp.v2.DataProfileAction.EventType.valueOf(event_); + return result == null ? com.google.privacy.dlp.v2.DataProfileAction.EventType.UNRECOGNIZED : result; + } + /** + *
+     * The event that caused the Pub/Sub message to be sent.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @param value The event to set. + * @return This builder for chaining. + */ + public Builder setEvent(com.google.privacy.dlp.v2.DataProfileAction.EventType value) { + if (value == null) { + throw new NullPointerException(); + } + + event_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The event that caused the Pub/Sub message to be sent.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return This builder for chaining. + */ + public Builder clearEvent() { + + event_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfilePubSubMessage) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfilePubSubMessage) + private static final com.google.privacy.dlp.v2.DataProfilePubSubMessage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfilePubSubMessage(); + } + + public static com.google.privacy.dlp.v2.DataProfilePubSubMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataProfilePubSubMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataProfilePubSubMessage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfilePubSubMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessageOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessageOrBuilder.java new file mode 100644 index 000000000000..4a0867a17c65 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessageOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DataProfilePubSubMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfilePubSubMessage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+   * `full_resource` will be populated.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + * @return Whether the profile field is set. + */ + boolean hasProfile(); + /** + *
+   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+   * `full_resource` will be populated.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + * @return The profile. + */ + com.google.privacy.dlp.v2.TableDataProfile getProfile(); + /** + *
+   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
+   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
+   * `full_resource` will be populated.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile profile = 1; + */ + com.google.privacy.dlp.v2.TableDataProfileOrBuilder getProfileOrBuilder(); + + /** + *
+   * The event that caused the Pub/Sub message to be sent.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The enum numeric value on the wire for event. + */ + int getEventValue(); + /** + *
+   * The event that caused the Pub/Sub message to be sent.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; + * @return The event. + */ + com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java new file mode 100644 index 000000000000..774125c27ca5 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java @@ -0,0 +1,729 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Score is a summary of all elements in the data profile.
+ * A higher number means more risk.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataRiskLevel} + */ +public final class DataRiskLevel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataRiskLevel) + DataRiskLevelOrBuilder { +private static final long serialVersionUID = 0L; + // Use DataRiskLevel.newBuilder() to construct. + private DataRiskLevel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DataRiskLevel() { + score_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DataRiskLevel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DataRiskLevel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + score_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataRiskLevel.class, com.google.privacy.dlp.v2.DataRiskLevel.Builder.class); + } + + /** + *
+   * Various score levels for resources.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore} + */ + public enum DataRiskLevelScore + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * RISK_SCORE_UNSPECIFIED = 0; + */ + RISK_SCORE_UNSPECIFIED(0), + /** + *
+     * Low risk - Lower indication of sensitive data that appears to have
+     * additional access restrictions in place or no indication of sensitive
+     * data found.
+     * 
+ * + * RISK_LOW = 10; + */ + RISK_LOW(10), + /** + *
+     * Medium risk - Sensitive data may be present but additional access or fine
+     * grain access restrictions appear to be present.  Consider limiting
+     * access even further or transform data to mask.
+     * 
+ * + * RISK_MODERATE = 20; + */ + RISK_MODERATE(20), + /** + *
+     * High risk – SPII may be present. Access controls may include public
+     * ACLs. Exfiltration of data may lead to user data loss. Re-identification
+     * of users may be possible. Consider limiting usage and or removing SPII.
+     * 
+ * + * RISK_HIGH = 30; + */ + RISK_HIGH(30), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * RISK_SCORE_UNSPECIFIED = 0; + */ + public static final int RISK_SCORE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Low risk - Lower indication of sensitive data that appears to have
+     * additional access restrictions in place or no indication of sensitive
+     * data found.
+     * 
+ * + * RISK_LOW = 10; + */ + public static final int RISK_LOW_VALUE = 10; + /** + *
+     * Medium risk - Sensitive data may be present but additional access or fine
+     * grain access restrictions appear to be present.  Consider limiting
+     * access even further or transform data to mask.
+     * 
+ * + * RISK_MODERATE = 20; + */ + public static final int RISK_MODERATE_VALUE = 20; + /** + *
+     * High risk – SPII may be present. Access controls may include public
+     * ACLs. Exfiltration of data may lead to user data loss. Re-identification
+     * of users may be possible. Consider limiting usage and or removing SPII.
+     * 
+ * + * RISK_HIGH = 30; + */ + public static final int RISK_HIGH_VALUE = 30; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataRiskLevelScore valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataRiskLevelScore forNumber(int value) { + switch (value) { + case 0: return RISK_SCORE_UNSPECIFIED; + case 10: return RISK_LOW; + case 20: return RISK_MODERATE; + case 30: return RISK_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DataRiskLevelScore> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataRiskLevelScore findValueByNumber(int number) { + return DataRiskLevelScore.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DataRiskLevel.getDescriptor().getEnumTypes().get(0); + } + + private static final DataRiskLevelScore[] VALUES = values(); + + public static DataRiskLevelScore valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataRiskLevelScore(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore) + } + + public static final int SCORE_FIELD_NUMBER = 1; + private int score_; + /** + *
+   * The score applied to the resource.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; + * @return The enum numeric value on the wire for score. + */ + @java.lang.Override public int getScoreValue() { + return score_; + } + /** + *
+   * The score applied to the resource.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; + * @return The score. + */ + @java.lang.Override public com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore getScore() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore result = com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.valueOf(score_); + return result == null ? com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (score_ != com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.RISK_SCORE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (score_ != com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.RISK_SCORE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DataRiskLevel)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DataRiskLevel other = (com.google.privacy.dlp.v2.DataRiskLevel) obj; + + if (score_ != other.score_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + score_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DataRiskLevel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Score is a summary of all elements in the data profile.
+   * A higher number means more risk.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DataRiskLevel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataRiskLevel) + com.google.privacy.dlp.v2.DataRiskLevelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DataRiskLevel.class, com.google.privacy.dlp.v2.DataRiskLevel.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DataRiskLevel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + score_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataRiskLevel getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataRiskLevel build() { + com.google.privacy.dlp.v2.DataRiskLevel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataRiskLevel buildPartial() { + com.google.privacy.dlp.v2.DataRiskLevel result = new com.google.privacy.dlp.v2.DataRiskLevel(this); + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DataRiskLevel) { + return mergeFrom((com.google.privacy.dlp.v2.DataRiskLevel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DataRiskLevel other) { + if (other == com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance()) return this; + if (other.score_ != 0) { + setScoreValue(other.getScoreValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DataRiskLevel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DataRiskLevel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int score_ = 0; + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; + * @return The enum numeric value on the wire for score. + */ + @java.lang.Override public int getScoreValue() { + return score_; + } + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; + * @param value The enum numeric value on the wire for score to set. + * @return This builder for chaining. + */ + public Builder setScoreValue(int value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; + * @return The score. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore getScore() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore result = com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.valueOf(score_); + return result == null ? com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.UNRECOGNIZED : result; + } + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore value) { + if (value == null) { + throw new NullPointerException(); + } + + score_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataRiskLevel) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataRiskLevel) + private static final com.google.privacy.dlp.v2.DataRiskLevel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataRiskLevel(); + } + + public static com.google.privacy.dlp.v2.DataRiskLevel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataRiskLevel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataRiskLevel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DataRiskLevel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevelOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevelOrBuilder.java new file mode 100644 index 000000000000..1c8fa5548d8d --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevelOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DataRiskLevelOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataRiskLevel) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The score applied to the resource.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; + * @return The enum numeric value on the wire for score. + */ + int getScoreValue(); + /** + *
+   * The score applied to the resource.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; + * @return The score. + */ + com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore getScore(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKey.java new file mode 100644 index 000000000000..cf4ff5116600 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKey.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Record key for a finding in Cloud Datastore.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DatastoreKey} + */ +public final class DatastoreKey extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DatastoreKey) + DatastoreKeyOrBuilder { +private static final long serialVersionUID = 0L; + // Use DatastoreKey.newBuilder() to construct. + private DatastoreKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DatastoreKey() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DatastoreKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DatastoreKey( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Key.Builder subBuilder = null; + if (entityKey_ != null) { + subBuilder = entityKey_.toBuilder(); + } + entityKey_ = input.readMessage(com.google.privacy.dlp.v2.Key.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entityKey_); + entityKey_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DatastoreKey.class, com.google.privacy.dlp.v2.DatastoreKey.Builder.class); + } + + public static final int ENTITY_KEY_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.Key entityKey_; + /** + *
+   * Datastore entity key.
+   * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + * @return Whether the entityKey field is set. + */ + @java.lang.Override + public boolean hasEntityKey() { + return entityKey_ != null; + } + /** + *
+   * Datastore entity key.
+   * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + * @return The entityKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Key getEntityKey() { + return entityKey_ == null ? com.google.privacy.dlp.v2.Key.getDefaultInstance() : entityKey_; + } + /** + *
+   * Datastore entity key.
+   * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.KeyOrBuilder getEntityKeyOrBuilder() { + return getEntityKey(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (entityKey_ != null) { + output.writeMessage(1, getEntityKey()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (entityKey_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getEntityKey()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DatastoreKey)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DatastoreKey other = (com.google.privacy.dlp.v2.DatastoreKey) obj; + + if (hasEntityKey() != other.hasEntityKey()) return false; + if (hasEntityKey()) { + if (!getEntityKey() + .equals(other.getEntityKey())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEntityKey()) { + hash = (37 * hash) + ENTITY_KEY_FIELD_NUMBER; + hash = (53 * hash) + getEntityKey().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DatastoreKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Record key for a finding in Cloud Datastore.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DatastoreKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DatastoreKey) + com.google.privacy.dlp.v2.DatastoreKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DatastoreKey.class, com.google.privacy.dlp.v2.DatastoreKey.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DatastoreKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (entityKeyBuilder_ == null) { + entityKey_ = null; + } else { + entityKey_ = null; + entityKeyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreKey getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreKey build() { + com.google.privacy.dlp.v2.DatastoreKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreKey buildPartial() { + com.google.privacy.dlp.v2.DatastoreKey result = new com.google.privacy.dlp.v2.DatastoreKey(this); + if (entityKeyBuilder_ == null) { + result.entityKey_ = entityKey_; + } else { + result.entityKey_ = entityKeyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DatastoreKey) { + return mergeFrom((com.google.privacy.dlp.v2.DatastoreKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DatastoreKey other) { + if (other == com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance()) return this; + if (other.hasEntityKey()) { + mergeEntityKey(other.getEntityKey()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DatastoreKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DatastoreKey) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.Key entityKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Key, com.google.privacy.dlp.v2.Key.Builder, com.google.privacy.dlp.v2.KeyOrBuilder> entityKeyBuilder_; + /** + *
+     * Datastore entity key.
+     * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + * @return Whether the entityKey field is set. + */ + public boolean hasEntityKey() { + return entityKeyBuilder_ != null || entityKey_ != null; + } + /** + *
+     * Datastore entity key.
+     * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + * @return The entityKey. + */ + public com.google.privacy.dlp.v2.Key getEntityKey() { + if (entityKeyBuilder_ == null) { + return entityKey_ == null ? com.google.privacy.dlp.v2.Key.getDefaultInstance() : entityKey_; + } else { + return entityKeyBuilder_.getMessage(); + } + } + /** + *
+     * Datastore entity key.
+     * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + */ + public Builder setEntityKey(com.google.privacy.dlp.v2.Key value) { + if (entityKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entityKey_ = value; + onChanged(); + } else { + entityKeyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Datastore entity key.
+     * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + */ + public Builder setEntityKey( + com.google.privacy.dlp.v2.Key.Builder builderForValue) { + if (entityKeyBuilder_ == null) { + entityKey_ = builderForValue.build(); + onChanged(); + } else { + entityKeyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Datastore entity key.
+     * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + */ + public Builder mergeEntityKey(com.google.privacy.dlp.v2.Key value) { + if (entityKeyBuilder_ == null) { + if (entityKey_ != null) { + entityKey_ = + com.google.privacy.dlp.v2.Key.newBuilder(entityKey_).mergeFrom(value).buildPartial(); + } else { + entityKey_ = value; + } + onChanged(); + } else { + entityKeyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Datastore entity key.
+     * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + */ + public Builder clearEntityKey() { + if (entityKeyBuilder_ == null) { + entityKey_ = null; + onChanged(); + } else { + entityKey_ = null; + entityKeyBuilder_ = null; + } + + return this; + } + /** + *
+     * Datastore entity key.
+     * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + */ + public com.google.privacy.dlp.v2.Key.Builder getEntityKeyBuilder() { + + onChanged(); + return getEntityKeyFieldBuilder().getBuilder(); + } + /** + *
+     * Datastore entity key.
+     * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + */ + public com.google.privacy.dlp.v2.KeyOrBuilder getEntityKeyOrBuilder() { + if (entityKeyBuilder_ != null) { + return entityKeyBuilder_.getMessageOrBuilder(); + } else { + return entityKey_ == null ? + com.google.privacy.dlp.v2.Key.getDefaultInstance() : entityKey_; + } + } + /** + *
+     * Datastore entity key.
+     * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Key, com.google.privacy.dlp.v2.Key.Builder, com.google.privacy.dlp.v2.KeyOrBuilder> + getEntityKeyFieldBuilder() { + if (entityKeyBuilder_ == null) { + entityKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Key, com.google.privacy.dlp.v2.Key.Builder, com.google.privacy.dlp.v2.KeyOrBuilder>( + getEntityKey(), + getParentForChildren(), + isClean()); + entityKey_ = null; + } + return entityKeyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DatastoreKey) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DatastoreKey) + private static final com.google.privacy.dlp.v2.DatastoreKey DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DatastoreKey(); + } + + public static com.google.privacy.dlp.v2.DatastoreKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatastoreKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DatastoreKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKeyOrBuilder.java new file mode 100644 index 000000000000..c7150cbf63ef --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKeyOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface DatastoreKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DatastoreKey) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Datastore entity key.
+   * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + * @return Whether the entityKey field is set. + */ + boolean hasEntityKey(); + /** + *
+   * Datastore entity key.
+   * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + * @return The entityKey. + */ + com.google.privacy.dlp.v2.Key getEntityKey(); + /** + *
+   * Datastore entity key.
+   * 
+ * + * .google.privacy.dlp.v2.Key entity_key = 1; + */ + com.google.privacy.dlp.v2.KeyOrBuilder getEntityKeyOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptions.java new file mode 100644 index 000000000000..4ea4f17bbc99 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptions.java @@ -0,0 +1,913 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Options defining a data set within Google Cloud Datastore.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DatastoreOptions} + */ +public final class DatastoreOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DatastoreOptions) + DatastoreOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use DatastoreOptions.newBuilder() to construct. + private DatastoreOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DatastoreOptions() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DatastoreOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DatastoreOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.PartitionId.Builder subBuilder = null; + if (partitionId_ != null) { + subBuilder = partitionId_.toBuilder(); + } + partitionId_ = input.readMessage(com.google.privacy.dlp.v2.PartitionId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(partitionId_); + partitionId_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.KindExpression.Builder subBuilder = null; + if (kind_ != null) { + subBuilder = kind_.toBuilder(); + } + kind_ = input.readMessage(com.google.privacy.dlp.v2.KindExpression.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kind_); + kind_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DatastoreOptions.class, com.google.privacy.dlp.v2.DatastoreOptions.Builder.class); + } + + public static final int PARTITION_ID_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.PartitionId partitionId_; + /** + *
+   * A partition ID identifies a grouping of entities. The grouping is always
+   * by project and namespace, however the namespace ID may be empty.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return Whether the partitionId field is set. + */ + @java.lang.Override + public boolean hasPartitionId() { + return partitionId_ != null; + } + /** + *
+   * A partition ID identifies a grouping of entities. The grouping is always
+   * by project and namespace, however the namespace ID may be empty.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return The partitionId. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PartitionId getPartitionId() { + return partitionId_ == null ? com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; + } + /** + *
+   * A partition ID identifies a grouping of entities. The grouping is always
+   * by project and namespace, however the namespace ID may be empty.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder() { + return getPartitionId(); + } + + public static final int KIND_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.KindExpression kind_; + /** + *
+   * The kind to process.
+   * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + * @return Whether the kind field is set. + */ + @java.lang.Override + public boolean hasKind() { + return kind_ != null; + } + /** + *
+   * The kind to process.
+   * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + * @return The kind. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.KindExpression getKind() { + return kind_ == null ? com.google.privacy.dlp.v2.KindExpression.getDefaultInstance() : kind_; + } + /** + *
+   * The kind to process.
+   * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.KindExpressionOrBuilder getKindOrBuilder() { + return getKind(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (partitionId_ != null) { + output.writeMessage(1, getPartitionId()); + } + if (kind_ != null) { + output.writeMessage(2, getKind()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partitionId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPartitionId()); + } + if (kind_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getKind()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DatastoreOptions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DatastoreOptions other = (com.google.privacy.dlp.v2.DatastoreOptions) obj; + + if (hasPartitionId() != other.hasPartitionId()) return false; + if (hasPartitionId()) { + if (!getPartitionId() + .equals(other.getPartitionId())) return false; + } + if (hasKind() != other.hasKind()) return false; + if (hasKind()) { + if (!getKind() + .equals(other.getKind())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPartitionId()) { + hash = (37 * hash) + PARTITION_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartitionId().hashCode(); + } + if (hasKind()) { + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DatastoreOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Options defining a data set within Google Cloud Datastore.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DatastoreOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DatastoreOptions) + com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DatastoreOptions.class, com.google.privacy.dlp.v2.DatastoreOptions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DatastoreOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (partitionIdBuilder_ == null) { + partitionId_ = null; + } else { + partitionId_ = null; + partitionIdBuilder_ = null; + } + if (kindBuilder_ == null) { + kind_ = null; + } else { + kind_ = null; + kindBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreOptions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreOptions build() { + com.google.privacy.dlp.v2.DatastoreOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreOptions buildPartial() { + com.google.privacy.dlp.v2.DatastoreOptions result = new com.google.privacy.dlp.v2.DatastoreOptions(this); + if (partitionIdBuilder_ == null) { + result.partitionId_ = partitionId_; + } else { + result.partitionId_ = partitionIdBuilder_.build(); + } + if (kindBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = kindBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DatastoreOptions) { + return mergeFrom((com.google.privacy.dlp.v2.DatastoreOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DatastoreOptions other) { + if (other == com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance()) return this; + if (other.hasPartitionId()) { + mergePartitionId(other.getPartitionId()); + } + if (other.hasKind()) { + mergeKind(other.getKind()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DatastoreOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DatastoreOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.PartitionId partitionId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder> partitionIdBuilder_; + /** + *
+     * A partition ID identifies a grouping of entities. The grouping is always
+     * by project and namespace, however the namespace ID may be empty.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return Whether the partitionId field is set. + */ + public boolean hasPartitionId() { + return partitionIdBuilder_ != null || partitionId_ != null; + } + /** + *
+     * A partition ID identifies a grouping of entities. The grouping is always
+     * by project and namespace, however the namespace ID may be empty.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return The partitionId. + */ + public com.google.privacy.dlp.v2.PartitionId getPartitionId() { + if (partitionIdBuilder_ == null) { + return partitionId_ == null ? com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; + } else { + return partitionIdBuilder_.getMessage(); + } + } + /** + *
+     * A partition ID identifies a grouping of entities. The grouping is always
+     * by project and namespace, however the namespace ID may be empty.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public Builder setPartitionId(com.google.privacy.dlp.v2.PartitionId value) { + if (partitionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partitionId_ = value; + onChanged(); + } else { + partitionIdBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A partition ID identifies a grouping of entities. The grouping is always
+     * by project and namespace, however the namespace ID may be empty.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public Builder setPartitionId( + com.google.privacy.dlp.v2.PartitionId.Builder builderForValue) { + if (partitionIdBuilder_ == null) { + partitionId_ = builderForValue.build(); + onChanged(); + } else { + partitionIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A partition ID identifies a grouping of entities. The grouping is always
+     * by project and namespace, however the namespace ID may be empty.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public Builder mergePartitionId(com.google.privacy.dlp.v2.PartitionId value) { + if (partitionIdBuilder_ == null) { + if (partitionId_ != null) { + partitionId_ = + com.google.privacy.dlp.v2.PartitionId.newBuilder(partitionId_).mergeFrom(value).buildPartial(); + } else { + partitionId_ = value; + } + onChanged(); + } else { + partitionIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A partition ID identifies a grouping of entities. The grouping is always
+     * by project and namespace, however the namespace ID may be empty.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public Builder clearPartitionId() { + if (partitionIdBuilder_ == null) { + partitionId_ = null; + onChanged(); + } else { + partitionId_ = null; + partitionIdBuilder_ = null; + } + + return this; + } + /** + *
+     * A partition ID identifies a grouping of entities. The grouping is always
+     * by project and namespace, however the namespace ID may be empty.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public com.google.privacy.dlp.v2.PartitionId.Builder getPartitionIdBuilder() { + + onChanged(); + return getPartitionIdFieldBuilder().getBuilder(); + } + /** + *
+     * A partition ID identifies a grouping of entities. The grouping is always
+     * by project and namespace, however the namespace ID may be empty.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder() { + if (partitionIdBuilder_ != null) { + return partitionIdBuilder_.getMessageOrBuilder(); + } else { + return partitionId_ == null ? + com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; + } + } + /** + *
+     * A partition ID identifies a grouping of entities. The grouping is always
+     * by project and namespace, however the namespace ID may be empty.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder> + getPartitionIdFieldBuilder() { + if (partitionIdBuilder_ == null) { + partitionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder>( + getPartitionId(), + getParentForChildren(), + isClean()); + partitionId_ = null; + } + return partitionIdBuilder_; + } + + private com.google.privacy.dlp.v2.KindExpression kind_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.KindExpression, com.google.privacy.dlp.v2.KindExpression.Builder, com.google.privacy.dlp.v2.KindExpressionOrBuilder> kindBuilder_; + /** + *
+     * The kind to process.
+     * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + * @return Whether the kind field is set. + */ + public boolean hasKind() { + return kindBuilder_ != null || kind_ != null; + } + /** + *
+     * The kind to process.
+     * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + * @return The kind. + */ + public com.google.privacy.dlp.v2.KindExpression getKind() { + if (kindBuilder_ == null) { + return kind_ == null ? com.google.privacy.dlp.v2.KindExpression.getDefaultInstance() : kind_; + } else { + return kindBuilder_.getMessage(); + } + } + /** + *
+     * The kind to process.
+     * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + */ + public Builder setKind(com.google.privacy.dlp.v2.KindExpression value) { + if (kindBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + kindBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The kind to process.
+     * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + */ + public Builder setKind( + com.google.privacy.dlp.v2.KindExpression.Builder builderForValue) { + if (kindBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + kindBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The kind to process.
+     * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + */ + public Builder mergeKind(com.google.privacy.dlp.v2.KindExpression value) { + if (kindBuilder_ == null) { + if (kind_ != null) { + kind_ = + com.google.privacy.dlp.v2.KindExpression.newBuilder(kind_).mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + kindBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The kind to process.
+     * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + */ + public Builder clearKind() { + if (kindBuilder_ == null) { + kind_ = null; + onChanged(); + } else { + kind_ = null; + kindBuilder_ = null; + } + + return this; + } + /** + *
+     * The kind to process.
+     * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + */ + public com.google.privacy.dlp.v2.KindExpression.Builder getKindBuilder() { + + onChanged(); + return getKindFieldBuilder().getBuilder(); + } + /** + *
+     * The kind to process.
+     * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + */ + public com.google.privacy.dlp.v2.KindExpressionOrBuilder getKindOrBuilder() { + if (kindBuilder_ != null) { + return kindBuilder_.getMessageOrBuilder(); + } else { + return kind_ == null ? + com.google.privacy.dlp.v2.KindExpression.getDefaultInstance() : kind_; + } + } + /** + *
+     * The kind to process.
+     * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.KindExpression, com.google.privacy.dlp.v2.KindExpression.Builder, com.google.privacy.dlp.v2.KindExpressionOrBuilder> + getKindFieldBuilder() { + if (kindBuilder_ == null) { + kindBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.KindExpression, com.google.privacy.dlp.v2.KindExpression.Builder, com.google.privacy.dlp.v2.KindExpressionOrBuilder>( + getKind(), + getParentForChildren(), + isClean()); + kind_ = null; + } + return kindBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DatastoreOptions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DatastoreOptions) + private static final com.google.privacy.dlp.v2.DatastoreOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DatastoreOptions(); + } + + public static com.google.privacy.dlp.v2.DatastoreOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatastoreOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DatastoreOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptionsOrBuilder.java new file mode 100644 index 000000000000..4082178cb95a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptionsOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface DatastoreOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DatastoreOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A partition ID identifies a grouping of entities. The grouping is always
+   * by project and namespace, however the namespace ID may be empty.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return Whether the partitionId field is set. + */ + boolean hasPartitionId(); + /** + *
+   * A partition ID identifies a grouping of entities. The grouping is always
+   * by project and namespace, however the namespace ID may be empty.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return The partitionId. + */ + com.google.privacy.dlp.v2.PartitionId getPartitionId(); + /** + *
+   * A partition ID identifies a grouping of entities. The grouping is always
+   * by project and namespace, however the namespace ID may be empty.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder(); + + /** + *
+   * The kind to process.
+   * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + * @return Whether the kind field is set. + */ + boolean hasKind(); + /** + *
+   * The kind to process.
+   * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + * @return The kind. + */ + com.google.privacy.dlp.v2.KindExpression getKind(); + /** + *
+   * The kind to process.
+   * 
+ * + * .google.privacy.dlp.v2.KindExpression kind = 2; + */ + com.google.privacy.dlp.v2.KindExpressionOrBuilder getKindOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java new file mode 100644 index 000000000000..a24dce55e8f8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java @@ -0,0 +1,1221 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Shifts dates by random number of days, with option to be consistent for the
+ * same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting
+ * to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DateShiftConfig} + */ +public final class DateShiftConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DateShiftConfig) + DateShiftConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use DateShiftConfig.newBuilder() to construct. + private DateShiftConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DateShiftConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DateShiftConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DateShiftConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + upperBoundDays_ = input.readInt32(); + break; + } + case 16: { + + lowerBoundDays_ = input.readInt32(); + break; + } + case 26: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (context_ != null) { + subBuilder = context_.toBuilder(); + } + context_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(context_); + context_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.privacy.dlp.v2.CryptoKey.Builder subBuilder = null; + if (methodCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.CryptoKey) method_).toBuilder(); + } + method_ = + input.readMessage(com.google.privacy.dlp.v2.CryptoKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CryptoKey) method_); + method_ = subBuilder.buildPartial(); + } + methodCase_ = 4; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DateShiftConfig.class, com.google.privacy.dlp.v2.DateShiftConfig.Builder.class); + } + + private int methodCase_ = 0; + private java.lang.Object method_; + public enum MethodCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CRYPTO_KEY(4), + METHOD_NOT_SET(0); + private final int value; + private MethodCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MethodCase valueOf(int value) { + return forNumber(value); + } + + public static MethodCase forNumber(int value) { + switch (value) { + case 4: return CRYPTO_KEY; + case 0: return METHOD_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public MethodCase + getMethodCase() { + return MethodCase.forNumber( + methodCase_); + } + + public static final int UPPER_BOUND_DAYS_FIELD_NUMBER = 1; + private int upperBoundDays_; + /** + *
+   * Required. Range of shift in days. Actual shift will be selected at random within this
+   * range (inclusive ends). Negative means shift to earlier in time. Must not
+   * be more than 365250 days (1000 years) each direction.
+   * For example, 3 means shift date to at most 3 days into the future.
+   * 
+ * + * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The upperBoundDays. + */ + @java.lang.Override + public int getUpperBoundDays() { + return upperBoundDays_; + } + + public static final int LOWER_BOUND_DAYS_FIELD_NUMBER = 2; + private int lowerBoundDays_; + /** + *
+   * Required. For example, -5 means shift date to at most 5 days back in the past.
+   * 
+ * + * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The lowerBoundDays. + */ + @java.lang.Override + public int getLowerBoundDays() { + return lowerBoundDays_; + } + + public static final int CONTEXT_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.FieldId context_; + /** + *
+   * Points to the field that contains the context, for example, an entity id.
+   * If set, must also set cryptoKey. If set, shift will be consistent for the
+   * given context.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return Whether the context field is set. + */ + @java.lang.Override + public boolean hasContext() { + return context_ != null; + } + /** + *
+   * Points to the field that contains the context, for example, an entity id.
+   * If set, must also set cryptoKey. If set, shift will be consistent for the
+   * given context.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return The context. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getContext() { + return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; + } + /** + *
+   * Points to the field that contains the context, for example, an entity id.
+   * If set, must also set cryptoKey. If set, shift will be consistent for the
+   * given context.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { + return getContext(); + } + + public static final int CRYPTO_KEY_FIELD_NUMBER = 4; + /** + *
+   * Causes the shift to be computed based on this key and the context. This
+   * results in the same shift for the same context and crypto_key. If
+   * set, must also set context. Can only be applied to table items.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + * @return Whether the cryptoKey field is set. + */ + @java.lang.Override + public boolean hasCryptoKey() { + return methodCase_ == 4; + } + /** + *
+   * Causes the shift to be computed based on this key and the context. This
+   * results in the same shift for the same context and crypto_key. If
+   * set, must also set context. Can only be applied to table items.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + * @return The cryptoKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { + if (methodCase_ == 4) { + return (com.google.privacy.dlp.v2.CryptoKey) method_; + } + return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); + } + /** + *
+   * Causes the shift to be computed based on this key and the context. This
+   * results in the same shift for the same context and crypto_key. If
+   * set, must also set context. Can only be applied to table items.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { + if (methodCase_ == 4) { + return (com.google.privacy.dlp.v2.CryptoKey) method_; + } + return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (upperBoundDays_ != 0) { + output.writeInt32(1, upperBoundDays_); + } + if (lowerBoundDays_ != 0) { + output.writeInt32(2, lowerBoundDays_); + } + if (context_ != null) { + output.writeMessage(3, getContext()); + } + if (methodCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.CryptoKey) method_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (upperBoundDays_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, upperBoundDays_); + } + if (lowerBoundDays_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, lowerBoundDays_); + } + if (context_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getContext()); + } + if (methodCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.CryptoKey) method_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DateShiftConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DateShiftConfig other = (com.google.privacy.dlp.v2.DateShiftConfig) obj; + + if (getUpperBoundDays() + != other.getUpperBoundDays()) return false; + if (getLowerBoundDays() + != other.getLowerBoundDays()) return false; + if (hasContext() != other.hasContext()) return false; + if (hasContext()) { + if (!getContext() + .equals(other.getContext())) return false; + } + if (!getMethodCase().equals(other.getMethodCase())) return false; + switch (methodCase_) { + case 4: + if (!getCryptoKey() + .equals(other.getCryptoKey())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UPPER_BOUND_DAYS_FIELD_NUMBER; + hash = (53 * hash) + getUpperBoundDays(); + hash = (37 * hash) + LOWER_BOUND_DAYS_FIELD_NUMBER; + hash = (53 * hash) + getLowerBoundDays(); + if (hasContext()) { + hash = (37 * hash) + CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getContext().hashCode(); + } + switch (methodCase_) { + case 4: + hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; + hash = (53 * hash) + getCryptoKey().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DateShiftConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Shifts dates by random number of days, with option to be consistent for the
+   * same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting
+   * to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DateShiftConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DateShiftConfig) + com.google.privacy.dlp.v2.DateShiftConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DateShiftConfig.class, com.google.privacy.dlp.v2.DateShiftConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DateShiftConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + upperBoundDays_ = 0; + + lowerBoundDays_ = 0; + + if (contextBuilder_ == null) { + context_ = null; + } else { + context_ = null; + contextBuilder_ = null; + } + methodCase_ = 0; + method_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateShiftConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateShiftConfig build() { + com.google.privacy.dlp.v2.DateShiftConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateShiftConfig buildPartial() { + com.google.privacy.dlp.v2.DateShiftConfig result = new com.google.privacy.dlp.v2.DateShiftConfig(this); + result.upperBoundDays_ = upperBoundDays_; + result.lowerBoundDays_ = lowerBoundDays_; + if (contextBuilder_ == null) { + result.context_ = context_; + } else { + result.context_ = contextBuilder_.build(); + } + if (methodCase_ == 4) { + if (cryptoKeyBuilder_ == null) { + result.method_ = method_; + } else { + result.method_ = cryptoKeyBuilder_.build(); + } + } + result.methodCase_ = methodCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DateShiftConfig) { + return mergeFrom((com.google.privacy.dlp.v2.DateShiftConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DateShiftConfig other) { + if (other == com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance()) return this; + if (other.getUpperBoundDays() != 0) { + setUpperBoundDays(other.getUpperBoundDays()); + } + if (other.getLowerBoundDays() != 0) { + setLowerBoundDays(other.getLowerBoundDays()); + } + if (other.hasContext()) { + mergeContext(other.getContext()); + } + switch (other.getMethodCase()) { + case CRYPTO_KEY: { + mergeCryptoKey(other.getCryptoKey()); + break; + } + case METHOD_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DateShiftConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DateShiftConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int methodCase_ = 0; + private java.lang.Object method_; + public MethodCase + getMethodCase() { + return MethodCase.forNumber( + methodCase_); + } + + public Builder clearMethod() { + methodCase_ = 0; + method_ = null; + onChanged(); + return this; + } + + + private int upperBoundDays_ ; + /** + *
+     * Required. Range of shift in days. Actual shift will be selected at random within this
+     * range (inclusive ends). Negative means shift to earlier in time. Must not
+     * be more than 365250 days (1000 years) each direction.
+     * For example, 3 means shift date to at most 3 days into the future.
+     * 
+ * + * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The upperBoundDays. + */ + @java.lang.Override + public int getUpperBoundDays() { + return upperBoundDays_; + } + /** + *
+     * Required. Range of shift in days. Actual shift will be selected at random within this
+     * range (inclusive ends). Negative means shift to earlier in time. Must not
+     * be more than 365250 days (1000 years) each direction.
+     * For example, 3 means shift date to at most 3 days into the future.
+     * 
+ * + * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The upperBoundDays to set. + * @return This builder for chaining. + */ + public Builder setUpperBoundDays(int value) { + + upperBoundDays_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Range of shift in days. Actual shift will be selected at random within this
+     * range (inclusive ends). Negative means shift to earlier in time. Must not
+     * be more than 365250 days (1000 years) each direction.
+     * For example, 3 means shift date to at most 3 days into the future.
+     * 
+ * + * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearUpperBoundDays() { + + upperBoundDays_ = 0; + onChanged(); + return this; + } + + private int lowerBoundDays_ ; + /** + *
+     * Required. For example, -5 means shift date to at most 5 days back in the past.
+     * 
+ * + * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The lowerBoundDays. + */ + @java.lang.Override + public int getLowerBoundDays() { + return lowerBoundDays_; + } + /** + *
+     * Required. For example, -5 means shift date to at most 5 days back in the past.
+     * 
+ * + * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The lowerBoundDays to set. + * @return This builder for chaining. + */ + public Builder setLowerBoundDays(int value) { + + lowerBoundDays_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. For example, -5 means shift date to at most 5 days back in the past.
+     * 
+ * + * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearLowerBoundDays() { + + lowerBoundDays_ = 0; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.FieldId context_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> contextBuilder_; + /** + *
+     * Points to the field that contains the context, for example, an entity id.
+     * If set, must also set cryptoKey. If set, shift will be consistent for the
+     * given context.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return Whether the context field is set. + */ + public boolean hasContext() { + return contextBuilder_ != null || context_ != null; + } + /** + *
+     * Points to the field that contains the context, for example, an entity id.
+     * If set, must also set cryptoKey. If set, shift will be consistent for the
+     * given context.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return The context. + */ + public com.google.privacy.dlp.v2.FieldId getContext() { + if (contextBuilder_ == null) { + return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; + } else { + return contextBuilder_.getMessage(); + } + } + /** + *
+     * Points to the field that contains the context, for example, an entity id.
+     * If set, must also set cryptoKey. If set, shift will be consistent for the
+     * given context.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public Builder setContext(com.google.privacy.dlp.v2.FieldId value) { + if (contextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + context_ = value; + onChanged(); + } else { + contextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Points to the field that contains the context, for example, an entity id.
+     * If set, must also set cryptoKey. If set, shift will be consistent for the
+     * given context.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public Builder setContext( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (contextBuilder_ == null) { + context_ = builderForValue.build(); + onChanged(); + } else { + contextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Points to the field that contains the context, for example, an entity id.
+     * If set, must also set cryptoKey. If set, shift will be consistent for the
+     * given context.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public Builder mergeContext(com.google.privacy.dlp.v2.FieldId value) { + if (contextBuilder_ == null) { + if (context_ != null) { + context_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(context_).mergeFrom(value).buildPartial(); + } else { + context_ = value; + } + onChanged(); + } else { + contextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Points to the field that contains the context, for example, an entity id.
+     * If set, must also set cryptoKey. If set, shift will be consistent for the
+     * given context.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public Builder clearContext() { + if (contextBuilder_ == null) { + context_ = null; + onChanged(); + } else { + context_ = null; + contextBuilder_ = null; + } + + return this; + } + /** + *
+     * Points to the field that contains the context, for example, an entity id.
+     * If set, must also set cryptoKey. If set, shift will be consistent for the
+     * given context.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getContextBuilder() { + + onChanged(); + return getContextFieldBuilder().getBuilder(); + } + /** + *
+     * Points to the field that contains the context, for example, an entity id.
+     * If set, must also set cryptoKey. If set, shift will be consistent for the
+     * given context.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { + if (contextBuilder_ != null) { + return contextBuilder_.getMessageOrBuilder(); + } else { + return context_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; + } + } + /** + *
+     * Points to the field that contains the context, for example, an entity id.
+     * If set, must also set cryptoKey. If set, shift will be consistent for the
+     * given context.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getContextFieldBuilder() { + if (contextBuilder_ == null) { + contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getContext(), + getParentForChildren(), + isClean()); + context_ = null; + } + return contextBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> cryptoKeyBuilder_; + /** + *
+     * Causes the shift to be computed based on this key and the context. This
+     * results in the same shift for the same context and crypto_key. If
+     * set, must also set context. Can only be applied to table items.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + * @return Whether the cryptoKey field is set. + */ + @java.lang.Override + public boolean hasCryptoKey() { + return methodCase_ == 4; + } + /** + *
+     * Causes the shift to be computed based on this key and the context. This
+     * results in the same shift for the same context and crypto_key. If
+     * set, must also set context. Can only be applied to table items.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + * @return The cryptoKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { + if (cryptoKeyBuilder_ == null) { + if (methodCase_ == 4) { + return (com.google.privacy.dlp.v2.CryptoKey) method_; + } + return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); + } else { + if (methodCase_ == 4) { + return cryptoKeyBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); + } + } + /** + *
+     * Causes the shift to be computed based on this key and the context. This
+     * results in the same shift for the same context and crypto_key. If
+     * set, must also set context. Can only be applied to table items.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + */ + public Builder setCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { + if (cryptoKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + method_ = value; + onChanged(); + } else { + cryptoKeyBuilder_.setMessage(value); + } + methodCase_ = 4; + return this; + } + /** + *
+     * Causes the shift to be computed based on this key and the context. This
+     * results in the same shift for the same context and crypto_key. If
+     * set, must also set context. Can only be applied to table items.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + */ + public Builder setCryptoKey( + com.google.privacy.dlp.v2.CryptoKey.Builder builderForValue) { + if (cryptoKeyBuilder_ == null) { + method_ = builderForValue.build(); + onChanged(); + } else { + cryptoKeyBuilder_.setMessage(builderForValue.build()); + } + methodCase_ = 4; + return this; + } + /** + *
+     * Causes the shift to be computed based on this key and the context. This
+     * results in the same shift for the same context and crypto_key. If
+     * set, must also set context. Can only be applied to table items.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + */ + public Builder mergeCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { + if (cryptoKeyBuilder_ == null) { + if (methodCase_ == 4 && + method_ != com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance()) { + method_ = com.google.privacy.dlp.v2.CryptoKey.newBuilder((com.google.privacy.dlp.v2.CryptoKey) method_) + .mergeFrom(value).buildPartial(); + } else { + method_ = value; + } + onChanged(); + } else { + if (methodCase_ == 4) { + cryptoKeyBuilder_.mergeFrom(value); + } else { + cryptoKeyBuilder_.setMessage(value); + } + } + methodCase_ = 4; + return this; + } + /** + *
+     * Causes the shift to be computed based on this key and the context. This
+     * results in the same shift for the same context and crypto_key. If
+     * set, must also set context. Can only be applied to table items.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + */ + public Builder clearCryptoKey() { + if (cryptoKeyBuilder_ == null) { + if (methodCase_ == 4) { + methodCase_ = 0; + method_ = null; + onChanged(); + } + } else { + if (methodCase_ == 4) { + methodCase_ = 0; + method_ = null; + } + cryptoKeyBuilder_.clear(); + } + return this; + } + /** + *
+     * Causes the shift to be computed based on this key and the context. This
+     * results in the same shift for the same context and crypto_key. If
+     * set, must also set context. Can only be applied to table items.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + */ + public com.google.privacy.dlp.v2.CryptoKey.Builder getCryptoKeyBuilder() { + return getCryptoKeyFieldBuilder().getBuilder(); + } + /** + *
+     * Causes the shift to be computed based on this key and the context. This
+     * results in the same shift for the same context and crypto_key. If
+     * set, must also set context. Can only be applied to table items.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { + if ((methodCase_ == 4) && (cryptoKeyBuilder_ != null)) { + return cryptoKeyBuilder_.getMessageOrBuilder(); + } else { + if (methodCase_ == 4) { + return (com.google.privacy.dlp.v2.CryptoKey) method_; + } + return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); + } + } + /** + *
+     * Causes the shift to be computed based on this key and the context. This
+     * results in the same shift for the same context and crypto_key. If
+     * set, must also set context. Can only be applied to table items.
+     * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> + getCryptoKeyFieldBuilder() { + if (cryptoKeyBuilder_ == null) { + if (!(methodCase_ == 4)) { + method_ = com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); + } + cryptoKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder>( + (com.google.privacy.dlp.v2.CryptoKey) method_, + getParentForChildren(), + isClean()); + method_ = null; + } + methodCase_ = 4; + onChanged();; + return cryptoKeyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DateShiftConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DateShiftConfig) + private static final com.google.privacy.dlp.v2.DateShiftConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DateShiftConfig(); + } + + public static com.google.privacy.dlp.v2.DateShiftConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DateShiftConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DateShiftConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateShiftConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java new file mode 100644 index 000000000000..e4888a2e3f92 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java @@ -0,0 +1,100 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DateShiftConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DateShiftConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Range of shift in days. Actual shift will be selected at random within this
+   * range (inclusive ends). Negative means shift to earlier in time. Must not
+   * be more than 365250 days (1000 years) each direction.
+   * For example, 3 means shift date to at most 3 days into the future.
+   * 
+ * + * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The upperBoundDays. + */ + int getUpperBoundDays(); + + /** + *
+   * Required. For example, -5 means shift date to at most 5 days back in the past.
+   * 
+ * + * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The lowerBoundDays. + */ + int getLowerBoundDays(); + + /** + *
+   * Points to the field that contains the context, for example, an entity id.
+   * If set, must also set cryptoKey. If set, shift will be consistent for the
+   * given context.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return Whether the context field is set. + */ + boolean hasContext(); + /** + *
+   * Points to the field that contains the context, for example, an entity id.
+   * If set, must also set cryptoKey. If set, shift will be consistent for the
+   * given context.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + * @return The context. + */ + com.google.privacy.dlp.v2.FieldId getContext(); + /** + *
+   * Points to the field that contains the context, for example, an entity id.
+   * If set, must also set cryptoKey. If set, shift will be consistent for the
+   * given context.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId context = 3; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder(); + + /** + *
+   * Causes the shift to be computed based on this key and the context. This
+   * results in the same shift for the same context and crypto_key. If
+   * set, must also set context. Can only be applied to table items.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + * @return Whether the cryptoKey field is set. + */ + boolean hasCryptoKey(); + /** + *
+   * Causes the shift to be computed based on this key and the context. This
+   * results in the same shift for the same context and crypto_key. If
+   * set, must also set context. Can only be applied to table items.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + * @return The cryptoKey. + */ + com.google.privacy.dlp.v2.CryptoKey getCryptoKey(); + /** + *
+   * Causes the shift to be computed based on this key and the context. This
+   * results in the same shift for the same context and crypto_key. If
+   * set, must also set context. Can only be applied to table items.
+   * 
+ * + * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; + */ + com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder(); + + public com.google.privacy.dlp.v2.DateShiftConfig.MethodCase getMethodCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTime.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTime.java new file mode 100644 index 000000000000..672116d33714 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTime.java @@ -0,0 +1,1798 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Message for a date time object.
+ * e.g. 2018-01-01, 5th August.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DateTime} + */ +public final class DateTime extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DateTime) + DateTimeOrBuilder { +private static final long serialVersionUID = 0L; + // Use DateTime.newBuilder() to construct. + private DateTime(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DateTime() { + dayOfWeek_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DateTime(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DateTime( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.type.Date.Builder subBuilder = null; + if (date_ != null) { + subBuilder = date_.toBuilder(); + } + date_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(date_); + date_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + int rawValue = input.readEnum(); + + dayOfWeek_ = rawValue; + break; + } + case 26: { + com.google.type.TimeOfDay.Builder subBuilder = null; + if (time_ != null) { + subBuilder = time_.toBuilder(); + } + time_ = input.readMessage(com.google.type.TimeOfDay.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(time_); + time_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.privacy.dlp.v2.DateTime.TimeZone.Builder subBuilder = null; + if (timeZone_ != null) { + subBuilder = timeZone_.toBuilder(); + } + timeZone_ = input.readMessage(com.google.privacy.dlp.v2.DateTime.TimeZone.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeZone_); + timeZone_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DateTime.class, com.google.privacy.dlp.v2.DateTime.Builder.class); + } + + public interface TimeZoneOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DateTime.TimeZone) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Set only if the offset can be determined. Positive for time ahead of UTC.
+     * E.g. For "UTC-9", this value is -540.
+     * 
+ * + * int32 offset_minutes = 1; + * @return The offsetMinutes. + */ + int getOffsetMinutes(); + } + /** + *
+   * Time zone of the date time object.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DateTime.TimeZone} + */ + public static final class TimeZone extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DateTime.TimeZone) + TimeZoneOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimeZone.newBuilder() to construct. + private TimeZone(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TimeZone() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TimeZone(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TimeZone( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + offsetMinutes_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DateTime.TimeZone.class, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder.class); + } + + public static final int OFFSET_MINUTES_FIELD_NUMBER = 1; + private int offsetMinutes_; + /** + *
+     * Set only if the offset can be determined. Positive for time ahead of UTC.
+     * E.g. For "UTC-9", this value is -540.
+     * 
+ * + * int32 offset_minutes = 1; + * @return The offsetMinutes. + */ + @java.lang.Override + public int getOffsetMinutes() { + return offsetMinutes_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (offsetMinutes_ != 0) { + output.writeInt32(1, offsetMinutes_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (offsetMinutes_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, offsetMinutes_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DateTime.TimeZone)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DateTime.TimeZone other = (com.google.privacy.dlp.v2.DateTime.TimeZone) obj; + + if (getOffsetMinutes() + != other.getOffsetMinutes()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OFFSET_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getOffsetMinutes(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DateTime.TimeZone prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Time zone of the date time object.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DateTime.TimeZone} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DateTime.TimeZone) + com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DateTime.TimeZone.class, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DateTime.TimeZone.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + offsetMinutes_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime.TimeZone getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime.TimeZone build() { + com.google.privacy.dlp.v2.DateTime.TimeZone result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime.TimeZone buildPartial() { + com.google.privacy.dlp.v2.DateTime.TimeZone result = new com.google.privacy.dlp.v2.DateTime.TimeZone(this); + result.offsetMinutes_ = offsetMinutes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DateTime.TimeZone) { + return mergeFrom((com.google.privacy.dlp.v2.DateTime.TimeZone)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DateTime.TimeZone other) { + if (other == com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance()) return this; + if (other.getOffsetMinutes() != 0) { + setOffsetMinutes(other.getOffsetMinutes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DateTime.TimeZone parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DateTime.TimeZone) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int offsetMinutes_ ; + /** + *
+       * Set only if the offset can be determined. Positive for time ahead of UTC.
+       * E.g. For "UTC-9", this value is -540.
+       * 
+ * + * int32 offset_minutes = 1; + * @return The offsetMinutes. + */ + @java.lang.Override + public int getOffsetMinutes() { + return offsetMinutes_; + } + /** + *
+       * Set only if the offset can be determined. Positive for time ahead of UTC.
+       * E.g. For "UTC-9", this value is -540.
+       * 
+ * + * int32 offset_minutes = 1; + * @param value The offsetMinutes to set. + * @return This builder for chaining. + */ + public Builder setOffsetMinutes(int value) { + + offsetMinutes_ = value; + onChanged(); + return this; + } + /** + *
+       * Set only if the offset can be determined. Positive for time ahead of UTC.
+       * E.g. For "UTC-9", this value is -540.
+       * 
+ * + * int32 offset_minutes = 1; + * @return This builder for chaining. + */ + public Builder clearOffsetMinutes() { + + offsetMinutes_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DateTime.TimeZone) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DateTime.TimeZone) + private static final com.google.privacy.dlp.v2.DateTime.TimeZone DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DateTime.TimeZone(); + } + + public static com.google.privacy.dlp.v2.DateTime.TimeZone getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeZone parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimeZone(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime.TimeZone getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int DATE_FIELD_NUMBER = 1; + private com.google.type.Date date_; + /** + *
+   * One or more of the following must be set.
+   * Must be a valid date or time value.
+   * 
+ * + * .google.type.Date date = 1; + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return date_ != null; + } + /** + *
+   * One or more of the following must be set.
+   * Must be a valid date or time value.
+   * 
+ * + * .google.type.Date date = 1; + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + /** + *
+   * One or more of the following must be set.
+   * Must be a valid date or time value.
+   * 
+ * + * .google.type.Date date = 1; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return getDate(); + } + + public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; + private int dayOfWeek_; + /** + *
+   * Day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + *
+   * Day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + @java.lang.Override public com.google.type.DayOfWeek getDayOfWeek() { + @SuppressWarnings("deprecation") + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + + public static final int TIME_FIELD_NUMBER = 3; + private com.google.type.TimeOfDay time_; + /** + *
+   * Time of day
+   * 
+ * + * .google.type.TimeOfDay time = 3; + * @return Whether the time field is set. + */ + @java.lang.Override + public boolean hasTime() { + return time_ != null; + } + /** + *
+   * Time of day
+   * 
+ * + * .google.type.TimeOfDay time = 3; + * @return The time. + */ + @java.lang.Override + public com.google.type.TimeOfDay getTime() { + return time_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : time_; + } + /** + *
+   * Time of day
+   * 
+ * + * .google.type.TimeOfDay time = 3; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getTimeOrBuilder() { + return getTime(); + } + + public static final int TIME_ZONE_FIELD_NUMBER = 4; + private com.google.privacy.dlp.v2.DateTime.TimeZone timeZone_; + /** + *
+   * Time zone
+   * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + * @return Whether the timeZone field is set. + */ + @java.lang.Override + public boolean hasTimeZone() { + return timeZone_ != null; + } + /** + *
+   * Time zone
+   * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + * @return The timeZone. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime.TimeZone getTimeZone() { + return timeZone_ == null ? com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance() : timeZone_; + } + /** + *
+   * Time zone
+   * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder getTimeZoneOrBuilder() { + return getTimeZone(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (date_ != null) { + output.writeMessage(1, getDate()); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + output.writeEnum(2, dayOfWeek_); + } + if (time_ != null) { + output.writeMessage(3, getTime()); + } + if (timeZone_ != null) { + output.writeMessage(4, getTimeZone()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (date_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDate()); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, dayOfWeek_); + } + if (time_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTime()); + } + if (timeZone_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getTimeZone()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DateTime)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DateTime other = (com.google.privacy.dlp.v2.DateTime) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate() + .equals(other.getDate())) return false; + } + if (dayOfWeek_ != other.dayOfWeek_) return false; + if (hasTime() != other.hasTime()) return false; + if (hasTime()) { + if (!getTime() + .equals(other.getTime())) return false; + } + if (hasTimeZone() != other.hasTimeZone()) return false; + if (hasTimeZone()) { + if (!getTimeZone() + .equals(other.getTimeZone())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; + hash = (53 * hash) + dayOfWeek_; + if (hasTime()) { + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + getTime().hashCode(); + } + if (hasTimeZone()) { + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DateTime parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DateTime parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DateTime parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DateTime parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DateTime parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DateTime parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DateTime parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DateTime parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DateTime prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Message for a date time object.
+   * e.g. 2018-01-01, 5th August.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DateTime} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DateTime) + com.google.privacy.dlp.v2.DateTimeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DateTime.class, com.google.privacy.dlp.v2.DateTime.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DateTime.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (dateBuilder_ == null) { + date_ = null; + } else { + date_ = null; + dateBuilder_ = null; + } + dayOfWeek_ = 0; + + if (timeBuilder_ == null) { + time_ = null; + } else { + time_ = null; + timeBuilder_ = null; + } + if (timeZoneBuilder_ == null) { + timeZone_ = null; + } else { + timeZone_ = null; + timeZoneBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime build() { + com.google.privacy.dlp.v2.DateTime result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime buildPartial() { + com.google.privacy.dlp.v2.DateTime result = new com.google.privacy.dlp.v2.DateTime(this); + if (dateBuilder_ == null) { + result.date_ = date_; + } else { + result.date_ = dateBuilder_.build(); + } + result.dayOfWeek_ = dayOfWeek_; + if (timeBuilder_ == null) { + result.time_ = time_; + } else { + result.time_ = timeBuilder_.build(); + } + if (timeZoneBuilder_ == null) { + result.timeZone_ = timeZone_; + } else { + result.timeZone_ = timeZoneBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DateTime) { + return mergeFrom((com.google.privacy.dlp.v2.DateTime)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DateTime other) { + if (other == com.google.privacy.dlp.v2.DateTime.getDefaultInstance()) return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (other.dayOfWeek_ != 0) { + setDayOfWeekValue(other.getDayOfWeekValue()); + } + if (other.hasTime()) { + mergeTime(other.getTime()); + } + if (other.hasTimeZone()) { + mergeTimeZone(other.getTimeZone()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DateTime parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DateTime) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> dateBuilder_; + /** + *
+     * One or more of the following must be set.
+     * Must be a valid date or time value.
+     * 
+ * + * .google.type.Date date = 1; + * @return Whether the date field is set. + */ + public boolean hasDate() { + return dateBuilder_ != null || date_ != null; + } + /** + *
+     * One or more of the following must be set.
+     * Must be a valid date or time value.
+     * 
+ * + * .google.type.Date date = 1; + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + /** + *
+     * One or more of the following must be set.
+     * Must be a valid date or time value.
+     * 
+ * + * .google.type.Date date = 1; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + onChanged(); + } else { + dateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * One or more of the following must be set.
+     * Must be a valid date or time value.
+     * 
+ * + * .google.type.Date date = 1; + */ + public Builder setDate( + com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + onChanged(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * One or more of the following must be set.
+     * Must be a valid date or time value.
+     * 
+ * + * .google.type.Date date = 1; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (date_ != null) { + date_ = + com.google.type.Date.newBuilder(date_).mergeFrom(value).buildPartial(); + } else { + date_ = value; + } + onChanged(); + } else { + dateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * One or more of the following must be set.
+     * Must be a valid date or time value.
+     * 
+ * + * .google.type.Date date = 1; + */ + public Builder clearDate() { + if (dateBuilder_ == null) { + date_ = null; + onChanged(); + } else { + date_ = null; + dateBuilder_ = null; + } + + return this; + } + /** + *
+     * One or more of the following must be set.
+     * Must be a valid date or time value.
+     * 
+ * + * .google.type.Date date = 1; + */ + public com.google.type.Date.Builder getDateBuilder() { + + onChanged(); + return getDateFieldBuilder().getBuilder(); + } + /** + *
+     * One or more of the following must be set.
+     * Must be a valid date or time value.
+     * 
+ * + * .google.type.Date date = 1; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? + com.google.type.Date.getDefaultInstance() : date_; + } + } + /** + *
+     * One or more of the following must be set.
+     * Must be a valid date or time value.
+     * 
+ * + * .google.type.Date date = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), + getParentForChildren(), + isClean()); + date_ = null; + } + return dateBuilder_; + } + + private int dayOfWeek_ = 0; + /** + *
+     * Day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override public int getDayOfWeekValue() { + return dayOfWeek_; + } + /** + *
+     * Day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @param value The enum numeric value on the wire for dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeekValue(int value) { + + dayOfWeek_ = value; + onChanged(); + return this; + } + /** + *
+     * Day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + @java.lang.Override + public com.google.type.DayOfWeek getDayOfWeek() { + @SuppressWarnings("deprecation") + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + /** + *
+     * Day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @param value The dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeek(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + + dayOfWeek_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return This builder for chaining. + */ + public Builder clearDayOfWeek() { + + dayOfWeek_ = 0; + onChanged(); + return this; + } + + private com.google.type.TimeOfDay time_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> timeBuilder_; + /** + *
+     * Time of day
+     * 
+ * + * .google.type.TimeOfDay time = 3; + * @return Whether the time field is set. + */ + public boolean hasTime() { + return timeBuilder_ != null || time_ != null; + } + /** + *
+     * Time of day
+     * 
+ * + * .google.type.TimeOfDay time = 3; + * @return The time. + */ + public com.google.type.TimeOfDay getTime() { + if (timeBuilder_ == null) { + return time_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : time_; + } else { + return timeBuilder_.getMessage(); + } + } + /** + *
+     * Time of day
+     * 
+ * + * .google.type.TimeOfDay time = 3; + */ + public Builder setTime(com.google.type.TimeOfDay value) { + if (timeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + time_ = value; + onChanged(); + } else { + timeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time of day
+     * 
+ * + * .google.type.TimeOfDay time = 3; + */ + public Builder setTime( + com.google.type.TimeOfDay.Builder builderForValue) { + if (timeBuilder_ == null) { + time_ = builderForValue.build(); + onChanged(); + } else { + timeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time of day
+     * 
+ * + * .google.type.TimeOfDay time = 3; + */ + public Builder mergeTime(com.google.type.TimeOfDay value) { + if (timeBuilder_ == null) { + if (time_ != null) { + time_ = + com.google.type.TimeOfDay.newBuilder(time_).mergeFrom(value).buildPartial(); + } else { + time_ = value; + } + onChanged(); + } else { + timeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time of day
+     * 
+ * + * .google.type.TimeOfDay time = 3; + */ + public Builder clearTime() { + if (timeBuilder_ == null) { + time_ = null; + onChanged(); + } else { + time_ = null; + timeBuilder_ = null; + } + + return this; + } + /** + *
+     * Time of day
+     * 
+ * + * .google.type.TimeOfDay time = 3; + */ + public com.google.type.TimeOfDay.Builder getTimeBuilder() { + + onChanged(); + return getTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time of day
+     * 
+ * + * .google.type.TimeOfDay time = 3; + */ + public com.google.type.TimeOfDayOrBuilder getTimeOrBuilder() { + if (timeBuilder_ != null) { + return timeBuilder_.getMessageOrBuilder(); + } else { + return time_ == null ? + com.google.type.TimeOfDay.getDefaultInstance() : time_; + } + } + /** + *
+     * Time of day
+     * 
+ * + * .google.type.TimeOfDay time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> + getTimeFieldBuilder() { + if (timeBuilder_ == null) { + timeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder>( + getTime(), + getParentForChildren(), + isClean()); + time_ = null; + } + return timeBuilder_; + } + + private com.google.privacy.dlp.v2.DateTime.TimeZone timeZone_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DateTime.TimeZone, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder, com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder> timeZoneBuilder_; + /** + *
+     * Time zone
+     * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + * @return Whether the timeZone field is set. + */ + public boolean hasTimeZone() { + return timeZoneBuilder_ != null || timeZone_ != null; + } + /** + *
+     * Time zone
+     * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + * @return The timeZone. + */ + public com.google.privacy.dlp.v2.DateTime.TimeZone getTimeZone() { + if (timeZoneBuilder_ == null) { + return timeZone_ == null ? com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance() : timeZone_; + } else { + return timeZoneBuilder_.getMessage(); + } + } + /** + *
+     * Time zone
+     * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + */ + public Builder setTimeZone(com.google.privacy.dlp.v2.DateTime.TimeZone value) { + if (timeZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + onChanged(); + } else { + timeZoneBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time zone
+     * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + */ + public Builder setTimeZone( + com.google.privacy.dlp.v2.DateTime.TimeZone.Builder builderForValue) { + if (timeZoneBuilder_ == null) { + timeZone_ = builderForValue.build(); + onChanged(); + } else { + timeZoneBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time zone
+     * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + */ + public Builder mergeTimeZone(com.google.privacy.dlp.v2.DateTime.TimeZone value) { + if (timeZoneBuilder_ == null) { + if (timeZone_ != null) { + timeZone_ = + com.google.privacy.dlp.v2.DateTime.TimeZone.newBuilder(timeZone_).mergeFrom(value).buildPartial(); + } else { + timeZone_ = value; + } + onChanged(); + } else { + timeZoneBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time zone
+     * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + */ + public Builder clearTimeZone() { + if (timeZoneBuilder_ == null) { + timeZone_ = null; + onChanged(); + } else { + timeZone_ = null; + timeZoneBuilder_ = null; + } + + return this; + } + /** + *
+     * Time zone
+     * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + */ + public com.google.privacy.dlp.v2.DateTime.TimeZone.Builder getTimeZoneBuilder() { + + onChanged(); + return getTimeZoneFieldBuilder().getBuilder(); + } + /** + *
+     * Time zone
+     * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + */ + public com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder getTimeZoneOrBuilder() { + if (timeZoneBuilder_ != null) { + return timeZoneBuilder_.getMessageOrBuilder(); + } else { + return timeZone_ == null ? + com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance() : timeZone_; + } + } + /** + *
+     * Time zone
+     * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DateTime.TimeZone, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder, com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder> + getTimeZoneFieldBuilder() { + if (timeZoneBuilder_ == null) { + timeZoneBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DateTime.TimeZone, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder, com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder>( + getTimeZone(), + getParentForChildren(), + isClean()); + timeZone_ = null; + } + return timeZoneBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DateTime) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DateTime) + private static final com.google.privacy.dlp.v2.DateTime DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DateTime(); + } + + public static com.google.privacy.dlp.v2.DateTime getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DateTime parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DateTime(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTimeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTimeOrBuilder.java new file mode 100644 index 000000000000..b13feff22907 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTimeOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DateTimeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DateTime) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * One or more of the following must be set.
+   * Must be a valid date or time value.
+   * 
+ * + * .google.type.Date date = 1; + * @return Whether the date field is set. + */ + boolean hasDate(); + /** + *
+   * One or more of the following must be set.
+   * Must be a valid date or time value.
+   * 
+ * + * .google.type.Date date = 1; + * @return The date. + */ + com.google.type.Date getDate(); + /** + *
+   * One or more of the following must be set.
+   * Must be a valid date or time value.
+   * 
+ * + * .google.type.Date date = 1; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + *
+   * Day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The enum numeric value on the wire for dayOfWeek. + */ + int getDayOfWeekValue(); + /** + *
+   * Day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2; + * @return The dayOfWeek. + */ + com.google.type.DayOfWeek getDayOfWeek(); + + /** + *
+   * Time of day
+   * 
+ * + * .google.type.TimeOfDay time = 3; + * @return Whether the time field is set. + */ + boolean hasTime(); + /** + *
+   * Time of day
+   * 
+ * + * .google.type.TimeOfDay time = 3; + * @return The time. + */ + com.google.type.TimeOfDay getTime(); + /** + *
+   * Time of day
+   * 
+ * + * .google.type.TimeOfDay time = 3; + */ + com.google.type.TimeOfDayOrBuilder getTimeOrBuilder(); + + /** + *
+   * Time zone
+   * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + * @return Whether the timeZone field is set. + */ + boolean hasTimeZone(); + /** + *
+   * Time zone
+   * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + * @return The timeZone. + */ + com.google.privacy.dlp.v2.DateTime.TimeZone getTimeZone(); + /** + *
+   * Time zone
+   * 
+ * + * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; + */ + com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder getTimeZoneOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java new file mode 100644 index 000000000000..1592a12f2679 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java @@ -0,0 +1,1571 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The configuration that controls how the data will change.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeidentifyConfig} + */ +public final class DeidentifyConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyConfig) + DeidentifyConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeidentifyConfig.newBuilder() to construct. + private DeidentifyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeidentifyConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeidentifyConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeidentifyConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InfoTypeTransformations.Builder subBuilder = null; + if (transformationCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.InfoTypeTransformations.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.RecordTransformations.Builder subBuilder = null; + if (transformationCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.RecordTransformations) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.RecordTransformations.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.RecordTransformations) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.TransformationErrorHandling.Builder subBuilder = null; + if (transformationErrorHandling_ != null) { + subBuilder = transformationErrorHandling_.toBuilder(); + } + transformationErrorHandling_ = input.readMessage(com.google.privacy.dlp.v2.TransformationErrorHandling.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transformationErrorHandling_); + transformationErrorHandling_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.privacy.dlp.v2.ImageTransformations.Builder subBuilder = null; + if (transformationCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.ImageTransformations) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageTransformations) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 4; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeidentifyConfig.class, com.google.privacy.dlp.v2.DeidentifyConfig.Builder.class); + } + + private int transformationCase_ = 0; + private java.lang.Object transformation_; + public enum TransformationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INFO_TYPE_TRANSFORMATIONS(1), + RECORD_TRANSFORMATIONS(2), + IMAGE_TRANSFORMATIONS(4), + TRANSFORMATION_NOT_SET(0); + private final int value; + private TransformationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformationCase valueOf(int value) { + return forNumber(value); + } + + public static TransformationCase forNumber(int value) { + switch (value) { + case 1: return INFO_TYPE_TRANSFORMATIONS; + case 2: return RECORD_TRANSFORMATIONS; + case 4: return IMAGE_TRANSFORMATIONS; + case 0: return TRANSFORMATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TransformationCase + getTransformationCase() { + return TransformationCase.forNumber( + transformationCase_); + } + + public static final int INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER = 1; + /** + *
+   * Treat the dataset as free-form text and apply the same free text
+   * transformation everywhere.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + * @return Whether the infoTypeTransformations field is set. + */ + @java.lang.Override + public boolean hasInfoTypeTransformations() { + return transformationCase_ == 1; + } + /** + *
+   * Treat the dataset as free-form text and apply the same free text
+   * transformation everywhere.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + * @return The infoTypeTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() { + if (transformationCase_ == 1) { + return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + /** + *
+   * Treat the dataset as free-form text and apply the same free text
+   * transformation everywhere.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder() { + if (transformationCase_ == 1) { + return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + + public static final int RECORD_TRANSFORMATIONS_FIELD_NUMBER = 2; + /** + *
+   * Treat the dataset as structured. Transformations can be applied to
+   * specific locations within structured datasets, such as transforming
+   * a column within a table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + * @return Whether the recordTransformations field is set. + */ + @java.lang.Override + public boolean hasRecordTransformations() { + return transformationCase_ == 2; + } + /** + *
+   * Treat the dataset as structured. Transformations can be applied to
+   * specific locations within structured datasets, such as transforming
+   * a column within a table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + * @return The recordTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformations getRecordTransformations() { + if (transformationCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordTransformations) transformation_; + } + return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); + } + /** + *
+   * Treat the dataset as structured. Transformations can be applied to
+   * specific locations within structured datasets, such as transforming
+   * a column within a table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformationsOrBuilder getRecordTransformationsOrBuilder() { + if (transformationCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordTransformations) transformation_; + } + return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); + } + + public static final int IMAGE_TRANSFORMATIONS_FIELD_NUMBER = 4; + /** + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * @return Whether the imageTransformations field is set. + */ + @java.lang.Override + public boolean hasImageTransformations() { + return transformationCase_ == 4; + } + /** + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * @return The imageTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations getImageTransformations() { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + /** + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformationsOrBuilder getImageTransformationsOrBuilder() { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + + public static final int TRANSFORMATION_ERROR_HANDLING_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.TransformationErrorHandling transformationErrorHandling_; + /** + *
+   * Mode for handling transformation errors. If left unspecified, the default
+   * mode is `TransformationErrorHandling.ThrowError`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + * @return Whether the transformationErrorHandling field is set. + */ + @java.lang.Override + public boolean hasTransformationErrorHandling() { + return transformationErrorHandling_ != null; + } + /** + *
+   * Mode for handling transformation errors. If left unspecified, the default
+   * mode is `TransformationErrorHandling.ThrowError`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + * @return The transformationErrorHandling. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling getTransformationErrorHandling() { + return transformationErrorHandling_ == null ? com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance() : transformationErrorHandling_; + } + /** + *
+   * Mode for handling transformation errors. If left unspecified, the default
+   * mode is `TransformationErrorHandling.ThrowError`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder getTransformationErrorHandlingOrBuilder() { + return getTransformationErrorHandling(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (transformationCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); + } + if (transformationCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.RecordTransformations) transformation_); + } + if (transformationErrorHandling_ != null) { + output.writeMessage(3, getTransformationErrorHandling()); + } + if (transformationCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.ImageTransformations) transformation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transformationCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); + } + if (transformationCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.RecordTransformations) transformation_); + } + if (transformationErrorHandling_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTransformationErrorHandling()); + } + if (transformationCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.ImageTransformations) transformation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DeidentifyConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DeidentifyConfig other = (com.google.privacy.dlp.v2.DeidentifyConfig) obj; + + if (hasTransformationErrorHandling() != other.hasTransformationErrorHandling()) return false; + if (hasTransformationErrorHandling()) { + if (!getTransformationErrorHandling() + .equals(other.getTransformationErrorHandling())) return false; + } + if (!getTransformationCase().equals(other.getTransformationCase())) return false; + switch (transformationCase_) { + case 1: + if (!getInfoTypeTransformations() + .equals(other.getInfoTypeTransformations())) return false; + break; + case 2: + if (!getRecordTransformations() + .equals(other.getRecordTransformations())) return false; + break; + case 4: + if (!getImageTransformations() + .equals(other.getImageTransformations())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTransformationErrorHandling()) { + hash = (37 * hash) + TRANSFORMATION_ERROR_HANDLING_FIELD_NUMBER; + hash = (53 * hash) + getTransformationErrorHandling().hashCode(); + } + switch (transformationCase_) { + case 1: + hash = (37 * hash) + INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getInfoTypeTransformations().hashCode(); + break; + case 2: + hash = (37 * hash) + RECORD_TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getRecordTransformations().hashCode(); + break; + case 4: + hash = (37 * hash) + IMAGE_TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getImageTransformations().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The configuration that controls how the data will change.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeidentifyConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyConfig) + com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeidentifyConfig.class, com.google.privacy.dlp.v2.DeidentifyConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DeidentifyConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (transformationErrorHandlingBuilder_ == null) { + transformationErrorHandling_ = null; + } else { + transformationErrorHandling_ = null; + transformationErrorHandlingBuilder_ = null; + } + transformationCase_ = 0; + transformation_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfig build() { + com.google.privacy.dlp.v2.DeidentifyConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfig buildPartial() { + com.google.privacy.dlp.v2.DeidentifyConfig result = new com.google.privacy.dlp.v2.DeidentifyConfig(this); + if (transformationCase_ == 1) { + if (infoTypeTransformationsBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = infoTypeTransformationsBuilder_.build(); + } + } + if (transformationCase_ == 2) { + if (recordTransformationsBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = recordTransformationsBuilder_.build(); + } + } + if (transformationCase_ == 4) { + if (imageTransformationsBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = imageTransformationsBuilder_.build(); + } + } + if (transformationErrorHandlingBuilder_ == null) { + result.transformationErrorHandling_ = transformationErrorHandling_; + } else { + result.transformationErrorHandling_ = transformationErrorHandlingBuilder_.build(); + } + result.transformationCase_ = transformationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DeidentifyConfig) { + return mergeFrom((com.google.privacy.dlp.v2.DeidentifyConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyConfig other) { + if (other == com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance()) return this; + if (other.hasTransformationErrorHandling()) { + mergeTransformationErrorHandling(other.getTransformationErrorHandling()); + } + switch (other.getTransformationCase()) { + case INFO_TYPE_TRANSFORMATIONS: { + mergeInfoTypeTransformations(other.getInfoTypeTransformations()); + break; + } + case RECORD_TRANSFORMATIONS: { + mergeRecordTransformations(other.getRecordTransformations()); + break; + } + case IMAGE_TRANSFORMATIONS: { + mergeImageTransformations(other.getImageTransformations()); + break; + } + case TRANSFORMATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DeidentifyConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DeidentifyConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int transformationCase_ = 0; + private java.lang.Object transformation_; + public TransformationCase + getTransformationCase() { + return TransformationCase.forNumber( + transformationCase_); + } + + public Builder clearTransformation() { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder> infoTypeTransformationsBuilder_; + /** + *
+     * Treat the dataset as free-form text and apply the same free text
+     * transformation everywhere.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + * @return Whether the infoTypeTransformations field is set. + */ + @java.lang.Override + public boolean hasInfoTypeTransformations() { + return transformationCase_ == 1; + } + /** + *
+     * Treat the dataset as free-form text and apply the same free text
+     * transformation everywhere.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + * @return The infoTypeTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() { + if (infoTypeTransformationsBuilder_ == null) { + if (transformationCase_ == 1) { + return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } else { + if (transformationCase_ == 1) { + return infoTypeTransformationsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + } + /** + *
+     * Treat the dataset as free-form text and apply the same free text
+     * transformation everywhere.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + */ + public Builder setInfoTypeTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations value) { + if (infoTypeTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + infoTypeTransformationsBuilder_.setMessage(value); + } + transformationCase_ = 1; + return this; + } + /** + *
+     * Treat the dataset as free-form text and apply the same free text
+     * transformation everywhere.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + */ + public Builder setInfoTypeTransformations( + com.google.privacy.dlp.v2.InfoTypeTransformations.Builder builderForValue) { + if (infoTypeTransformationsBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + infoTypeTransformationsBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 1; + return this; + } + /** + *
+     * Treat the dataset as free-form text and apply the same free text
+     * transformation everywhere.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + */ + public Builder mergeInfoTypeTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations value) { + if (infoTypeTransformationsBuilder_ == null) { + if (transformationCase_ == 1 && + transformation_ != com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.InfoTypeTransformations.newBuilder((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 1) { + infoTypeTransformationsBuilder_.mergeFrom(value); + } else { + infoTypeTransformationsBuilder_.setMessage(value); + } + } + transformationCase_ = 1; + return this; + } + /** + *
+     * Treat the dataset as free-form text and apply the same free text
+     * transformation everywhere.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + */ + public Builder clearInfoTypeTransformations() { + if (infoTypeTransformationsBuilder_ == null) { + if (transformationCase_ == 1) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 1) { + transformationCase_ = 0; + transformation_ = null; + } + infoTypeTransformationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Treat the dataset as free-form text and apply the same free text
+     * transformation everywhere.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeTransformations.Builder getInfoTypeTransformationsBuilder() { + return getInfoTypeTransformationsFieldBuilder().getBuilder(); + } + /** + *
+     * Treat the dataset as free-form text and apply the same free text
+     * transformation everywhere.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder() { + if ((transformationCase_ == 1) && (infoTypeTransformationsBuilder_ != null)) { + return infoTypeTransformationsBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 1) { + return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + } + /** + *
+     * Treat the dataset as free-form text and apply the same free text
+     * transformation everywhere.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder> + getInfoTypeTransformationsFieldBuilder() { + if (infoTypeTransformationsBuilder_ == null) { + if (!(transformationCase_ == 1)) { + transformation_ = com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + infoTypeTransformationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder>( + (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 1; + onChanged();; + return infoTypeTransformationsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordTransformations, com.google.privacy.dlp.v2.RecordTransformations.Builder, com.google.privacy.dlp.v2.RecordTransformationsOrBuilder> recordTransformationsBuilder_; + /** + *
+     * Treat the dataset as structured. Transformations can be applied to
+     * specific locations within structured datasets, such as transforming
+     * a column within a table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + * @return Whether the recordTransformations field is set. + */ + @java.lang.Override + public boolean hasRecordTransformations() { + return transformationCase_ == 2; + } + /** + *
+     * Treat the dataset as structured. Transformations can be applied to
+     * specific locations within structured datasets, such as transforming
+     * a column within a table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + * @return The recordTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformations getRecordTransformations() { + if (recordTransformationsBuilder_ == null) { + if (transformationCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordTransformations) transformation_; + } + return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); + } else { + if (transformationCase_ == 2) { + return recordTransformationsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); + } + } + /** + *
+     * Treat the dataset as structured. Transformations can be applied to
+     * specific locations within structured datasets, such as transforming
+     * a column within a table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + */ + public Builder setRecordTransformations(com.google.privacy.dlp.v2.RecordTransformations value) { + if (recordTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + recordTransformationsBuilder_.setMessage(value); + } + transformationCase_ = 2; + return this; + } + /** + *
+     * Treat the dataset as structured. Transformations can be applied to
+     * specific locations within structured datasets, such as transforming
+     * a column within a table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + */ + public Builder setRecordTransformations( + com.google.privacy.dlp.v2.RecordTransformations.Builder builderForValue) { + if (recordTransformationsBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + recordTransformationsBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 2; + return this; + } + /** + *
+     * Treat the dataset as structured. Transformations can be applied to
+     * specific locations within structured datasets, such as transforming
+     * a column within a table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + */ + public Builder mergeRecordTransformations(com.google.privacy.dlp.v2.RecordTransformations value) { + if (recordTransformationsBuilder_ == null) { + if (transformationCase_ == 2 && + transformation_ != com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.RecordTransformations.newBuilder((com.google.privacy.dlp.v2.RecordTransformations) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 2) { + recordTransformationsBuilder_.mergeFrom(value); + } else { + recordTransformationsBuilder_.setMessage(value); + } + } + transformationCase_ = 2; + return this; + } + /** + *
+     * Treat the dataset as structured. Transformations can be applied to
+     * specific locations within structured datasets, such as transforming
+     * a column within a table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + */ + public Builder clearRecordTransformations() { + if (recordTransformationsBuilder_ == null) { + if (transformationCase_ == 2) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 2) { + transformationCase_ = 0; + transformation_ = null; + } + recordTransformationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Treat the dataset as structured. Transformations can be applied to
+     * specific locations within structured datasets, such as transforming
+     * a column within a table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + */ + public com.google.privacy.dlp.v2.RecordTransformations.Builder getRecordTransformationsBuilder() { + return getRecordTransformationsFieldBuilder().getBuilder(); + } + /** + *
+     * Treat the dataset as structured. Transformations can be applied to
+     * specific locations within structured datasets, such as transforming
+     * a column within a table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformationsOrBuilder getRecordTransformationsOrBuilder() { + if ((transformationCase_ == 2) && (recordTransformationsBuilder_ != null)) { + return recordTransformationsBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordTransformations) transformation_; + } + return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); + } + } + /** + *
+     * Treat the dataset as structured. Transformations can be applied to
+     * specific locations within structured datasets, such as transforming
+     * a column within a table.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordTransformations, com.google.privacy.dlp.v2.RecordTransformations.Builder, com.google.privacy.dlp.v2.RecordTransformationsOrBuilder> + getRecordTransformationsFieldBuilder() { + if (recordTransformationsBuilder_ == null) { + if (!(transformationCase_ == 2)) { + transformation_ = com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); + } + recordTransformationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordTransformations, com.google.privacy.dlp.v2.RecordTransformations.Builder, com.google.privacy.dlp.v2.RecordTransformationsOrBuilder>( + (com.google.privacy.dlp.v2.RecordTransformations) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 2; + onChanged();; + return recordTransformationsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations, com.google.privacy.dlp.v2.ImageTransformations.Builder, com.google.privacy.dlp.v2.ImageTransformationsOrBuilder> imageTransformationsBuilder_; + /** + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * @return Whether the imageTransformations field is set. + */ + @java.lang.Override + public boolean hasImageTransformations() { + return transformationCase_ == 4; + } + /** + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * @return The imageTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations getImageTransformations() { + if (imageTransformationsBuilder_ == null) { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } else { + if (transformationCase_ == 4) { + return imageTransformationsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + } + /** + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public Builder setImageTransformations(com.google.privacy.dlp.v2.ImageTransformations value) { + if (imageTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + imageTransformationsBuilder_.setMessage(value); + } + transformationCase_ = 4; + return this; + } + /** + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public Builder setImageTransformations( + com.google.privacy.dlp.v2.ImageTransformations.Builder builderForValue) { + if (imageTransformationsBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + imageTransformationsBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 4; + return this; + } + /** + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public Builder mergeImageTransformations(com.google.privacy.dlp.v2.ImageTransformations value) { + if (imageTransformationsBuilder_ == null) { + if (transformationCase_ == 4 && + transformation_ != com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.ImageTransformations.newBuilder((com.google.privacy.dlp.v2.ImageTransformations) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 4) { + imageTransformationsBuilder_.mergeFrom(value); + } else { + imageTransformationsBuilder_.setMessage(value); + } + } + transformationCase_ = 4; + return this; + } + /** + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public Builder clearImageTransformations() { + if (imageTransformationsBuilder_ == null) { + if (transformationCase_ == 4) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 4) { + transformationCase_ = 0; + transformation_ = null; + } + imageTransformationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public com.google.privacy.dlp.v2.ImageTransformations.Builder getImageTransformationsBuilder() { + return getImageTransformationsFieldBuilder().getBuilder(); + } + /** + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformationsOrBuilder getImageTransformationsOrBuilder() { + if ((transformationCase_ == 4) && (imageTransformationsBuilder_ != null)) { + return imageTransformationsBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + } + /** + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations, com.google.privacy.dlp.v2.ImageTransformations.Builder, com.google.privacy.dlp.v2.ImageTransformationsOrBuilder> + getImageTransformationsFieldBuilder() { + if (imageTransformationsBuilder_ == null) { + if (!(transformationCase_ == 4)) { + transformation_ = com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + imageTransformationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations, com.google.privacy.dlp.v2.ImageTransformations.Builder, com.google.privacy.dlp.v2.ImageTransformationsOrBuilder>( + (com.google.privacy.dlp.v2.ImageTransformations) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 4; + onChanged();; + return imageTransformationsBuilder_; + } + + private com.google.privacy.dlp.v2.TransformationErrorHandling transformationErrorHandling_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationErrorHandling, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder, com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder> transformationErrorHandlingBuilder_; + /** + *
+     * Mode for handling transformation errors. If left unspecified, the default
+     * mode is `TransformationErrorHandling.ThrowError`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + * @return Whether the transformationErrorHandling field is set. + */ + public boolean hasTransformationErrorHandling() { + return transformationErrorHandlingBuilder_ != null || transformationErrorHandling_ != null; + } + /** + *
+     * Mode for handling transformation errors. If left unspecified, the default
+     * mode is `TransformationErrorHandling.ThrowError`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + * @return The transformationErrorHandling. + */ + public com.google.privacy.dlp.v2.TransformationErrorHandling getTransformationErrorHandling() { + if (transformationErrorHandlingBuilder_ == null) { + return transformationErrorHandling_ == null ? com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance() : transformationErrorHandling_; + } else { + return transformationErrorHandlingBuilder_.getMessage(); + } + } + /** + *
+     * Mode for handling transformation errors. If left unspecified, the default
+     * mode is `TransformationErrorHandling.ThrowError`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + */ + public Builder setTransformationErrorHandling(com.google.privacy.dlp.v2.TransformationErrorHandling value) { + if (transformationErrorHandlingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationErrorHandling_ = value; + onChanged(); + } else { + transformationErrorHandlingBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Mode for handling transformation errors. If left unspecified, the default
+     * mode is `TransformationErrorHandling.ThrowError`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + */ + public Builder setTransformationErrorHandling( + com.google.privacy.dlp.v2.TransformationErrorHandling.Builder builderForValue) { + if (transformationErrorHandlingBuilder_ == null) { + transformationErrorHandling_ = builderForValue.build(); + onChanged(); + } else { + transformationErrorHandlingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Mode for handling transformation errors. If left unspecified, the default
+     * mode is `TransformationErrorHandling.ThrowError`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + */ + public Builder mergeTransformationErrorHandling(com.google.privacy.dlp.v2.TransformationErrorHandling value) { + if (transformationErrorHandlingBuilder_ == null) { + if (transformationErrorHandling_ != null) { + transformationErrorHandling_ = + com.google.privacy.dlp.v2.TransformationErrorHandling.newBuilder(transformationErrorHandling_).mergeFrom(value).buildPartial(); + } else { + transformationErrorHandling_ = value; + } + onChanged(); + } else { + transformationErrorHandlingBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Mode for handling transformation errors. If left unspecified, the default
+     * mode is `TransformationErrorHandling.ThrowError`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + */ + public Builder clearTransformationErrorHandling() { + if (transformationErrorHandlingBuilder_ == null) { + transformationErrorHandling_ = null; + onChanged(); + } else { + transformationErrorHandling_ = null; + transformationErrorHandlingBuilder_ = null; + } + + return this; + } + /** + *
+     * Mode for handling transformation errors. If left unspecified, the default
+     * mode is `TransformationErrorHandling.ThrowError`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + */ + public com.google.privacy.dlp.v2.TransformationErrorHandling.Builder getTransformationErrorHandlingBuilder() { + + onChanged(); + return getTransformationErrorHandlingFieldBuilder().getBuilder(); + } + /** + *
+     * Mode for handling transformation errors. If left unspecified, the default
+     * mode is `TransformationErrorHandling.ThrowError`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + */ + public com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder getTransformationErrorHandlingOrBuilder() { + if (transformationErrorHandlingBuilder_ != null) { + return transformationErrorHandlingBuilder_.getMessageOrBuilder(); + } else { + return transformationErrorHandling_ == null ? + com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance() : transformationErrorHandling_; + } + } + /** + *
+     * Mode for handling transformation errors. If left unspecified, the default
+     * mode is `TransformationErrorHandling.ThrowError`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationErrorHandling, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder, com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder> + getTransformationErrorHandlingFieldBuilder() { + if (transformationErrorHandlingBuilder_ == null) { + transformationErrorHandlingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationErrorHandling, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder, com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder>( + getTransformationErrorHandling(), + getParentForChildren(), + isClean()); + transformationErrorHandling_ = null; + } + return transformationErrorHandlingBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeidentifyConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeidentifyConfig) + private static final com.google.privacy.dlp.v2.DeidentifyConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeidentifyConfig(); + } + + public static com.google.privacy.dlp.v2.DeidentifyConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeidentifyConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeidentifyConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java new file mode 100644 index 000000000000..fb6b263e9a4e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DeidentifyConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeidentifyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Treat the dataset as free-form text and apply the same free text
+   * transformation everywhere.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + * @return Whether the infoTypeTransformations field is set. + */ + boolean hasInfoTypeTransformations(); + /** + *
+   * Treat the dataset as free-form text and apply the same free text
+   * transformation everywhere.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + * @return The infoTypeTransformations. + */ + com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations(); + /** + *
+   * Treat the dataset as free-form text and apply the same free text
+   * transformation everywhere.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; + */ + com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder(); + + /** + *
+   * Treat the dataset as structured. Transformations can be applied to
+   * specific locations within structured datasets, such as transforming
+   * a column within a table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + * @return Whether the recordTransformations field is set. + */ + boolean hasRecordTransformations(); + /** + *
+   * Treat the dataset as structured. Transformations can be applied to
+   * specific locations within structured datasets, such as transforming
+   * a column within a table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + * @return The recordTransformations. + */ + com.google.privacy.dlp.v2.RecordTransformations getRecordTransformations(); + /** + *
+   * Treat the dataset as structured. Transformations can be applied to
+   * specific locations within structured datasets, such as transforming
+   * a column within a table.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; + */ + com.google.privacy.dlp.v2.RecordTransformationsOrBuilder getRecordTransformationsOrBuilder(); + + /** + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * @return Whether the imageTransformations field is set. + */ + boolean hasImageTransformations(); + /** + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * @return The imageTransformations. + */ + com.google.privacy.dlp.v2.ImageTransformations getImageTransformations(); + /** + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + com.google.privacy.dlp.v2.ImageTransformationsOrBuilder getImageTransformationsOrBuilder(); + + /** + *
+   * Mode for handling transformation errors. If left unspecified, the default
+   * mode is `TransformationErrorHandling.ThrowError`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + * @return Whether the transformationErrorHandling field is set. + */ + boolean hasTransformationErrorHandling(); + /** + *
+   * Mode for handling transformation errors. If left unspecified, the default
+   * mode is `TransformationErrorHandling.ThrowError`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + * @return The transformationErrorHandling. + */ + com.google.privacy.dlp.v2.TransformationErrorHandling getTransformationErrorHandling(); + /** + *
+   * Mode for handling transformation errors. If left unspecified, the default
+   * mode is `TransformationErrorHandling.ThrowError`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; + */ + com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder getTransformationErrorHandlingOrBuilder(); + + public com.google.privacy.dlp.v2.DeidentifyConfig.TransformationCase getTransformationCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java new file mode 100644 index 000000000000..6ba689fcf1bd --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java @@ -0,0 +1,1982 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request to de-identify a ContentItem.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentRequest} + */ +public final class DeidentifyContentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyContentRequest) + DeidentifyContentRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeidentifyContentRequest.newBuilder() to construct. + private DeidentifyContentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeidentifyContentRequest() { + parent_ = ""; + inspectTemplateName_ = ""; + deidentifyTemplateName_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeidentifyContentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeidentifyContentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.DeidentifyConfig.Builder subBuilder = null; + if (deidentifyConfig_ != null) { + subBuilder = deidentifyConfig_.toBuilder(); + } + deidentifyConfig_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deidentifyConfig_); + deidentifyConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; + if (inspectConfig_ != null) { + subBuilder = inspectConfig_.toBuilder(); + } + inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectConfig_); + inspectConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; + if (item_ != null) { + subBuilder = item_.toBuilder(); + } + item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(item_); + item_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + inspectTemplateName_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + deidentifyTemplateName_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeidentifyContentRequest.class, com.google.privacy.dlp.v2.DeidentifyContentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEIDENTIFY_CONFIG_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; + /** + *
+   * Configuration for the de-identification of the content item.
+   * Items specified here will override the template referenced by the
+   * deidentify_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + * @return Whether the deidentifyConfig field is set. + */ + @java.lang.Override + public boolean hasDeidentifyConfig() { + return deidentifyConfig_ != null; + } + /** + *
+   * Configuration for the de-identification of the content item.
+   * Items specified here will override the template referenced by the
+   * deidentify_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + * @return The deidentifyConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { + return deidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; + } + /** + *
+   * Configuration for the de-identification of the content item.
+   * Items specified here will override the template referenced by the
+   * deidentify_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { + return getDeidentifyConfig(); + } + + public static final int INSPECT_CONFIG_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + /** + *
+   * Configuration for the inspector.
+   * Items specified here will override the template referenced by the
+   * inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return Whether the inspectConfig field is set. + */ + @java.lang.Override + public boolean hasInspectConfig() { + return inspectConfig_ != null; + } + /** + *
+   * Configuration for the inspector.
+   * Items specified here will override the template referenced by the
+   * inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return The inspectConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + /** + *
+   * Configuration for the inspector.
+   * Items specified here will override the template referenced by the
+   * inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + return getInspectConfig(); + } + + public static final int ITEM_FIELD_NUMBER = 4; + private com.google.privacy.dlp.v2.ContentItem item_; + /** + *
+   * The item to de-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return item_ != null; + } + /** + *
+   * The item to de-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return The item. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem getItem() { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + /** + *
+   * The item to de-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + return getItem(); + } + + public static final int INSPECT_TEMPLATE_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object inspectTemplateName_; + /** + *
+   * Template to use. Any configuration directly specified in
+   * inspect_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 5; + * @return The inspectTemplateName. + */ + @java.lang.Override + public java.lang.String getInspectTemplateName() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inspectTemplateName_ = s; + return s; + } + } + /** + *
+   * Template to use. Any configuration directly specified in
+   * inspect_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 5; + * @return The bytes for inspectTemplateName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInspectTemplateNameBytes() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + inspectTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object deidentifyTemplateName_; + /** + *
+   * Template to use. Any configuration directly specified in
+   * deidentify_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string deidentify_template_name = 6; + * @return The deidentifyTemplateName. + */ + @java.lang.Override + public java.lang.String getDeidentifyTemplateName() { + java.lang.Object ref = deidentifyTemplateName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deidentifyTemplateName_ = s; + return s; + } + } + /** + *
+   * Template to use. Any configuration directly specified in
+   * deidentify_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string deidentify_template_name = 6; + * @return The bytes for deidentifyTemplateName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeidentifyTemplateNameBytes() { + java.lang.Object ref = deidentifyTemplateName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deidentifyTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (deidentifyConfig_ != null) { + output.writeMessage(2, getDeidentifyConfig()); + } + if (inspectConfig_ != null) { + output.writeMessage(3, getInspectConfig()); + } + if (item_ != null) { + output.writeMessage(4, getItem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, inspectTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deidentifyTemplateName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, deidentifyTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (deidentifyConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDeidentifyConfig()); + } + if (inspectConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getInspectConfig()); + } + if (item_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getItem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, inspectTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deidentifyTemplateName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, deidentifyTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DeidentifyContentRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DeidentifyContentRequest other = (com.google.privacy.dlp.v2.DeidentifyContentRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasDeidentifyConfig() != other.hasDeidentifyConfig()) return false; + if (hasDeidentifyConfig()) { + if (!getDeidentifyConfig() + .equals(other.getDeidentifyConfig())) return false; + } + if (hasInspectConfig() != other.hasInspectConfig()) return false; + if (hasInspectConfig()) { + if (!getInspectConfig() + .equals(other.getInspectConfig())) return false; + } + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem() + .equals(other.getItem())) return false; + } + if (!getInspectTemplateName() + .equals(other.getInspectTemplateName())) return false; + if (!getDeidentifyTemplateName() + .equals(other.getDeidentifyTemplateName())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDeidentifyConfig()) { + hash = (37 * hash) + DEIDENTIFY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeidentifyConfig().hashCode(); + } + if (hasInspectConfig()) { + hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInspectConfig().hashCode(); + } + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + hash = (37 * hash) + INSPECT_TEMPLATE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getInspectTemplateName().hashCode(); + hash = (37 * hash) + DEIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeidentifyTemplateName().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyContentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to de-identify a ContentItem.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyContentRequest) + com.google.privacy.dlp.v2.DeidentifyContentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeidentifyContentRequest.class, com.google.privacy.dlp.v2.DeidentifyContentRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DeidentifyContentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (deidentifyConfigBuilder_ == null) { + deidentifyConfig_ = null; + } else { + deidentifyConfig_ = null; + deidentifyConfigBuilder_ = null; + } + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + if (itemBuilder_ == null) { + item_ = null; + } else { + item_ = null; + itemBuilder_ = null; + } + inspectTemplateName_ = ""; + + deidentifyTemplateName_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyContentRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DeidentifyContentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyContentRequest build() { + com.google.privacy.dlp.v2.DeidentifyContentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyContentRequest buildPartial() { + com.google.privacy.dlp.v2.DeidentifyContentRequest result = new com.google.privacy.dlp.v2.DeidentifyContentRequest(this); + result.parent_ = parent_; + if (deidentifyConfigBuilder_ == null) { + result.deidentifyConfig_ = deidentifyConfig_; + } else { + result.deidentifyConfig_ = deidentifyConfigBuilder_.build(); + } + if (inspectConfigBuilder_ == null) { + result.inspectConfig_ = inspectConfig_; + } else { + result.inspectConfig_ = inspectConfigBuilder_.build(); + } + if (itemBuilder_ == null) { + result.item_ = item_; + } else { + result.item_ = itemBuilder_.build(); + } + result.inspectTemplateName_ = inspectTemplateName_; + result.deidentifyTemplateName_ = deidentifyTemplateName_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DeidentifyContentRequest) { + return mergeFrom((com.google.privacy.dlp.v2.DeidentifyContentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyContentRequest other) { + if (other == com.google.privacy.dlp.v2.DeidentifyContentRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDeidentifyConfig()) { + mergeDeidentifyConfig(other.getDeidentifyConfig()); + } + if (other.hasInspectConfig()) { + mergeInspectConfig(other.getInspectConfig()); + } + if (other.hasItem()) { + mergeItem(other.getItem()); + } + if (!other.getInspectTemplateName().isEmpty()) { + inspectTemplateName_ = other.inspectTemplateName_; + onChanged(); + } + if (!other.getDeidentifyTemplateName().isEmpty()) { + deidentifyTemplateName_ = other.deidentifyTemplateName_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DeidentifyContentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DeidentifyContentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> deidentifyConfigBuilder_; + /** + *
+     * Configuration for the de-identification of the content item.
+     * Items specified here will override the template referenced by the
+     * deidentify_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + * @return Whether the deidentifyConfig field is set. + */ + public boolean hasDeidentifyConfig() { + return deidentifyConfigBuilder_ != null || deidentifyConfig_ != null; + } + /** + *
+     * Configuration for the de-identification of the content item.
+     * Items specified here will override the template referenced by the
+     * deidentify_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + * @return The deidentifyConfig. + */ + public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { + if (deidentifyConfigBuilder_ == null) { + return deidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; + } else { + return deidentifyConfigBuilder_.getMessage(); + } + } + /** + *
+     * Configuration for the de-identification of the content item.
+     * Items specified here will override the template referenced by the
+     * deidentify_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + */ + public Builder setDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { + if (deidentifyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deidentifyConfig_ = value; + onChanged(); + } else { + deidentifyConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Configuration for the de-identification of the content item.
+     * Items specified here will override the template referenced by the
+     * deidentify_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + */ + public Builder setDeidentifyConfig( + com.google.privacy.dlp.v2.DeidentifyConfig.Builder builderForValue) { + if (deidentifyConfigBuilder_ == null) { + deidentifyConfig_ = builderForValue.build(); + onChanged(); + } else { + deidentifyConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Configuration for the de-identification of the content item.
+     * Items specified here will override the template referenced by the
+     * deidentify_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + */ + public Builder mergeDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { + if (deidentifyConfigBuilder_ == null) { + if (deidentifyConfig_ != null) { + deidentifyConfig_ = + com.google.privacy.dlp.v2.DeidentifyConfig.newBuilder(deidentifyConfig_).mergeFrom(value).buildPartial(); + } else { + deidentifyConfig_ = value; + } + onChanged(); + } else { + deidentifyConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Configuration for the de-identification of the content item.
+     * Items specified here will override the template referenced by the
+     * deidentify_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + */ + public Builder clearDeidentifyConfig() { + if (deidentifyConfigBuilder_ == null) { + deidentifyConfig_ = null; + onChanged(); + } else { + deidentifyConfig_ = null; + deidentifyConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Configuration for the de-identification of the content item.
+     * Items specified here will override the template referenced by the
+     * deidentify_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + */ + public com.google.privacy.dlp.v2.DeidentifyConfig.Builder getDeidentifyConfigBuilder() { + + onChanged(); + return getDeidentifyConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration for the de-identification of the content item.
+     * Items specified here will override the template referenced by the
+     * deidentify_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + */ + public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { + if (deidentifyConfigBuilder_ != null) { + return deidentifyConfigBuilder_.getMessageOrBuilder(); + } else { + return deidentifyConfig_ == null ? + com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; + } + } + /** + *
+     * Configuration for the de-identification of the content item.
+     * Items specified here will override the template referenced by the
+     * deidentify_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> + getDeidentifyConfigFieldBuilder() { + if (deidentifyConfigBuilder_ == null) { + deidentifyConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>( + getDeidentifyConfig(), + getParentForChildren(), + isClean()); + deidentifyConfig_ = null; + } + return deidentifyConfigBuilder_; + } + + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; + /** + *
+     * Configuration for the inspector.
+     * Items specified here will override the template referenced by the
+     * inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return Whether the inspectConfig field is set. + */ + public boolean hasInspectConfig() { + return inspectConfigBuilder_ != null || inspectConfig_ != null; + } + /** + *
+     * Configuration for the inspector.
+     * Items specified here will override the template referenced by the
+     * inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return The inspectConfig. + */ + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + if (inspectConfigBuilder_ == null) { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } else { + return inspectConfigBuilder_.getMessage(); + } + } + /** + *
+     * Configuration for the inspector.
+     * Items specified here will override the template referenced by the
+     * inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectConfig_ = value; + onChanged(); + } else { + inspectConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * Items specified here will override the template referenced by the
+     * inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public Builder setInspectConfig( + com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = builderForValue.build(); + onChanged(); + } else { + inspectConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * Items specified here will override the template referenced by the
+     * inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (inspectConfig_ != null) { + inspectConfig_ = + com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); + } else { + inspectConfig_ = value; + } + onChanged(); + } else { + inspectConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * Items specified here will override the template referenced by the
+     * inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public Builder clearInspectConfig() { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + onChanged(); + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * Items specified here will override the template referenced by the
+     * inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { + + onChanged(); + return getInspectConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration for the inspector.
+     * Items specified here will override the template referenced by the
+     * inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + if (inspectConfigBuilder_ != null) { + return inspectConfigBuilder_.getMessageOrBuilder(); + } else { + return inspectConfig_ == null ? + com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + } + /** + *
+     * Configuration for the inspector.
+     * Items specified here will override the template referenced by the
+     * inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> + getInspectConfigFieldBuilder() { + if (inspectConfigBuilder_ == null) { + inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( + getInspectConfig(), + getParentForChildren(), + isClean()); + inspectConfig_ = null; + } + return inspectConfigBuilder_; + } + + private com.google.privacy.dlp.v2.ContentItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; + /** + *
+     * The item to de-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return Whether the item field is set. + */ + public boolean hasItem() { + return itemBuilder_ != null || item_ != null; + } + /** + *
+     * The item to de-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return The item. + */ + public com.google.privacy.dlp.v2.ContentItem getItem() { + if (itemBuilder_ == null) { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + *
+     * The item to de-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + onChanged(); + } else { + itemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The item to de-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public Builder setItem( + com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + onChanged(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The item to de-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (item_ != null) { + item_ = + com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); + } else { + item_ = value; + } + onChanged(); + } else { + itemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The item to de-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public Builder clearItem() { + if (itemBuilder_ == null) { + item_ = null; + onChanged(); + } else { + item_ = null; + itemBuilder_ = null; + } + + return this; + } + /** + *
+     * The item to de-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { + + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + *
+     * The item to de-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null ? + com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + } + /** + *
+     * The item to de-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( + getItem(), + getParentForChildren(), + isClean()); + item_ = null; + } + return itemBuilder_; + } + + private java.lang.Object inspectTemplateName_ = ""; + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @return The inspectTemplateName. + */ + public java.lang.String getInspectTemplateName() { + java.lang.Object ref = inspectTemplateName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inspectTemplateName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @return The bytes for inspectTemplateName. + */ + public com.google.protobuf.ByteString + getInspectTemplateNameBytes() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + inspectTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @param value The inspectTemplateName to set. + * @return This builder for chaining. + */ + public Builder setInspectTemplateName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inspectTemplateName_ = value; + onChanged(); + return this; + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @return This builder for chaining. + */ + public Builder clearInspectTemplateName() { + + inspectTemplateName_ = getDefaultInstance().getInspectTemplateName(); + onChanged(); + return this; + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @param value The bytes for inspectTemplateName to set. + * @return This builder for chaining. + */ + public Builder setInspectTemplateNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inspectTemplateName_ = value; + onChanged(); + return this; + } + + private java.lang.Object deidentifyTemplateName_ = ""; + /** + *
+     * Template to use. Any configuration directly specified in
+     * deidentify_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string deidentify_template_name = 6; + * @return The deidentifyTemplateName. + */ + public java.lang.String getDeidentifyTemplateName() { + java.lang.Object ref = deidentifyTemplateName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deidentifyTemplateName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * deidentify_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string deidentify_template_name = 6; + * @return The bytes for deidentifyTemplateName. + */ + public com.google.protobuf.ByteString + getDeidentifyTemplateNameBytes() { + java.lang.Object ref = deidentifyTemplateName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deidentifyTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * deidentify_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string deidentify_template_name = 6; + * @param value The deidentifyTemplateName to set. + * @return This builder for chaining. + */ + public Builder setDeidentifyTemplateName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deidentifyTemplateName_ = value; + onChanged(); + return this; + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * deidentify_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string deidentify_template_name = 6; + * @return This builder for chaining. + */ + public Builder clearDeidentifyTemplateName() { + + deidentifyTemplateName_ = getDefaultInstance().getDeidentifyTemplateName(); + onChanged(); + return this; + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * deidentify_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string deidentify_template_name = 6; + * @param value The bytes for deidentifyTemplateName to set. + * @return This builder for chaining. + */ + public Builder setDeidentifyTemplateNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deidentifyTemplateName_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeidentifyContentRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeidentifyContentRequest) + private static final com.google.privacy.dlp.v2.DeidentifyContentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeidentifyContentRequest(); + } + + public static com.google.privacy.dlp.v2.DeidentifyContentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeidentifyContentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeidentifyContentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyContentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java new file mode 100644 index 000000000000..b176154d48f7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java @@ -0,0 +1,220 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DeidentifyContentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeidentifyContentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Configuration for the de-identification of the content item.
+   * Items specified here will override the template referenced by the
+   * deidentify_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + * @return Whether the deidentifyConfig field is set. + */ + boolean hasDeidentifyConfig(); + /** + *
+   * Configuration for the de-identification of the content item.
+   * Items specified here will override the template referenced by the
+   * deidentify_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + * @return The deidentifyConfig. + */ + com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig(); + /** + *
+   * Configuration for the de-identification of the content item.
+   * Items specified here will override the template referenced by the
+   * deidentify_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; + */ + com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder(); + + /** + *
+   * Configuration for the inspector.
+   * Items specified here will override the template referenced by the
+   * inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return Whether the inspectConfig field is set. + */ + boolean hasInspectConfig(); + /** + *
+   * Configuration for the inspector.
+   * Items specified here will override the template referenced by the
+   * inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return The inspectConfig. + */ + com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); + /** + *
+   * Configuration for the inspector.
+   * Items specified here will override the template referenced by the
+   * inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); + + /** + *
+   * The item to de-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + *
+   * The item to de-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return The item. + */ + com.google.privacy.dlp.v2.ContentItem getItem(); + /** + *
+   * The item to de-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); + + /** + *
+   * Template to use. Any configuration directly specified in
+   * inspect_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 5; + * @return The inspectTemplateName. + */ + java.lang.String getInspectTemplateName(); + /** + *
+   * Template to use. Any configuration directly specified in
+   * inspect_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 5; + * @return The bytes for inspectTemplateName. + */ + com.google.protobuf.ByteString + getInspectTemplateNameBytes(); + + /** + *
+   * Template to use. Any configuration directly specified in
+   * deidentify_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string deidentify_template_name = 6; + * @return The deidentifyTemplateName. + */ + java.lang.String getDeidentifyTemplateName(); + /** + *
+   * Template to use. Any configuration directly specified in
+   * deidentify_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string deidentify_template_name = 6; + * @return The bytes for deidentifyTemplateName. + */ + com.google.protobuf.ByteString + getDeidentifyTemplateNameBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponse.java new file mode 100644 index 000000000000..b4d2d9186161 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponse.java @@ -0,0 +1,901 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Results of de-identifying a ContentItem.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentResponse} + */ +public final class DeidentifyContentResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyContentResponse) + DeidentifyContentResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeidentifyContentResponse.newBuilder() to construct. + private DeidentifyContentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeidentifyContentResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeidentifyContentResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeidentifyContentResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; + if (item_ != null) { + subBuilder = item_.toBuilder(); + } + item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(item_); + item_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.TransformationOverview.Builder subBuilder = null; + if (overview_ != null) { + subBuilder = overview_.toBuilder(); + } + overview_ = input.readMessage(com.google.privacy.dlp.v2.TransformationOverview.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(overview_); + overview_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeidentifyContentResponse.class, com.google.privacy.dlp.v2.DeidentifyContentResponse.Builder.class); + } + + public static final int ITEM_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.ContentItem item_; + /** + *
+   * The de-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return item_ != null; + } + /** + *
+   * The de-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return The item. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem getItem() { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + /** + *
+   * The de-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + return getItem(); + } + + public static final int OVERVIEW_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.TransformationOverview overview_; + /** + *
+   * An overview of the changes that were made on the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return Whether the overview field is set. + */ + @java.lang.Override + public boolean hasOverview() { + return overview_ != null; + } + /** + *
+   * An overview of the changes that were made on the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return The overview. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationOverview getOverview() { + return overview_ == null ? com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; + } + /** + *
+   * An overview of the changes that were made on the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder() { + return getOverview(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (item_ != null) { + output.writeMessage(1, getItem()); + } + if (overview_ != null) { + output.writeMessage(2, getOverview()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (item_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getItem()); + } + if (overview_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOverview()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DeidentifyContentResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DeidentifyContentResponse other = (com.google.privacy.dlp.v2.DeidentifyContentResponse) obj; + + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem() + .equals(other.getItem())) return false; + } + if (hasOverview() != other.hasOverview()) return false; + if (hasOverview()) { + if (!getOverview() + .equals(other.getOverview())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + if (hasOverview()) { + hash = (37 * hash) + OVERVIEW_FIELD_NUMBER; + hash = (53 * hash) + getOverview().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyContentResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Results of de-identifying a ContentItem.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyContentResponse) + com.google.privacy.dlp.v2.DeidentifyContentResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeidentifyContentResponse.class, com.google.privacy.dlp.v2.DeidentifyContentResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DeidentifyContentResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (itemBuilder_ == null) { + item_ = null; + } else { + item_ = null; + itemBuilder_ = null; + } + if (overviewBuilder_ == null) { + overview_ = null; + } else { + overview_ = null; + overviewBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyContentResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DeidentifyContentResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyContentResponse build() { + com.google.privacy.dlp.v2.DeidentifyContentResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyContentResponse buildPartial() { + com.google.privacy.dlp.v2.DeidentifyContentResponse result = new com.google.privacy.dlp.v2.DeidentifyContentResponse(this); + if (itemBuilder_ == null) { + result.item_ = item_; + } else { + result.item_ = itemBuilder_.build(); + } + if (overviewBuilder_ == null) { + result.overview_ = overview_; + } else { + result.overview_ = overviewBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DeidentifyContentResponse) { + return mergeFrom((com.google.privacy.dlp.v2.DeidentifyContentResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyContentResponse other) { + if (other == com.google.privacy.dlp.v2.DeidentifyContentResponse.getDefaultInstance()) return this; + if (other.hasItem()) { + mergeItem(other.getItem()); + } + if (other.hasOverview()) { + mergeOverview(other.getOverview()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DeidentifyContentResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DeidentifyContentResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.ContentItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; + /** + *
+     * The de-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return Whether the item field is set. + */ + public boolean hasItem() { + return itemBuilder_ != null || item_ != null; + } + /** + *
+     * The de-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return The item. + */ + public com.google.privacy.dlp.v2.ContentItem getItem() { + if (itemBuilder_ == null) { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + *
+     * The de-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + onChanged(); + } else { + itemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The de-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder setItem( + com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + onChanged(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The de-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (item_ != null) { + item_ = + com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); + } else { + item_ = value; + } + onChanged(); + } else { + itemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The de-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder clearItem() { + if (itemBuilder_ == null) { + item_ = null; + onChanged(); + } else { + item_ = null; + itemBuilder_ = null; + } + + return this; + } + /** + *
+     * The de-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { + + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + *
+     * The de-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null ? + com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + } + /** + *
+     * The de-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( + getItem(), + getParentForChildren(), + isClean()); + item_ = null; + } + return itemBuilder_; + } + + private com.google.privacy.dlp.v2.TransformationOverview overview_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder> overviewBuilder_; + /** + *
+     * An overview of the changes that were made on the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return Whether the overview field is set. + */ + public boolean hasOverview() { + return overviewBuilder_ != null || overview_ != null; + } + /** + *
+     * An overview of the changes that were made on the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return The overview. + */ + public com.google.privacy.dlp.v2.TransformationOverview getOverview() { + if (overviewBuilder_ == null) { + return overview_ == null ? com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; + } else { + return overviewBuilder_.getMessage(); + } + } + /** + *
+     * An overview of the changes that were made on the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public Builder setOverview(com.google.privacy.dlp.v2.TransformationOverview value) { + if (overviewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + overview_ = value; + onChanged(); + } else { + overviewBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * An overview of the changes that were made on the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public Builder setOverview( + com.google.privacy.dlp.v2.TransformationOverview.Builder builderForValue) { + if (overviewBuilder_ == null) { + overview_ = builderForValue.build(); + onChanged(); + } else { + overviewBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * An overview of the changes that were made on the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public Builder mergeOverview(com.google.privacy.dlp.v2.TransformationOverview value) { + if (overviewBuilder_ == null) { + if (overview_ != null) { + overview_ = + com.google.privacy.dlp.v2.TransformationOverview.newBuilder(overview_).mergeFrom(value).buildPartial(); + } else { + overview_ = value; + } + onChanged(); + } else { + overviewBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * An overview of the changes that were made on the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public Builder clearOverview() { + if (overviewBuilder_ == null) { + overview_ = null; + onChanged(); + } else { + overview_ = null; + overviewBuilder_ = null; + } + + return this; + } + /** + *
+     * An overview of the changes that were made on the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public com.google.privacy.dlp.v2.TransformationOverview.Builder getOverviewBuilder() { + + onChanged(); + return getOverviewFieldBuilder().getBuilder(); + } + /** + *
+     * An overview of the changes that were made on the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder() { + if (overviewBuilder_ != null) { + return overviewBuilder_.getMessageOrBuilder(); + } else { + return overview_ == null ? + com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; + } + } + /** + *
+     * An overview of the changes that were made on the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder> + getOverviewFieldBuilder() { + if (overviewBuilder_ == null) { + overviewBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder>( + getOverview(), + getParentForChildren(), + isClean()); + overview_ = null; + } + return overviewBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeidentifyContentResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeidentifyContentResponse) + private static final com.google.privacy.dlp.v2.DeidentifyContentResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeidentifyContentResponse(); + } + + public static com.google.privacy.dlp.v2.DeidentifyContentResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeidentifyContentResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeidentifyContentResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyContentResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponseOrBuilder.java new file mode 100644 index 000000000000..7bdf8e1c38d3 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponseOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DeidentifyContentResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeidentifyContentResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The de-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + *
+   * The de-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return The item. + */ + com.google.privacy.dlp.v2.ContentItem getItem(); + /** + *
+   * The de-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); + + /** + *
+   * An overview of the changes that were made on the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return Whether the overview field is set. + */ + boolean hasOverview(); + /** + *
+   * An overview of the changes that were made on the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return The overview. + */ + com.google.privacy.dlp.v2.TransformationOverview getOverview(); + /** + *
+   * An overview of the changes that were made on the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java new file mode 100644 index 000000000000..5ac874fd51e4 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java @@ -0,0 +1,1658 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * DeidentifyTemplates contains instructions on how to de-identify content.
+ * See https://cloud.google.com/dlp/docs/concepts-templates to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeidentifyTemplate} + */ +public final class DeidentifyTemplate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyTemplate) + DeidentifyTemplateOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeidentifyTemplate.newBuilder() to construct. + private DeidentifyTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeidentifyTemplate() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeidentifyTemplate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeidentifyTemplate( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.privacy.dlp.v2.DeidentifyConfig.Builder subBuilder = null; + if (deidentifyConfig_ != null) { + subBuilder = deidentifyConfig_.toBuilder(); + } + deidentifyConfig_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deidentifyConfig_); + deidentifyConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeidentifyTemplate.class, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Output only. The template name.
+   * The template will have one of the following formats:
+   * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+   * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Output only. The template name.
+   * The template will have one of the following formats:
+   * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+   * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * Display name (max 256 chars).
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * Display name (max 256 chars).
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * Short description (max 256 chars).
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Short description (max 256 chars).
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int DEIDENTIFY_CONFIG_FIELD_NUMBER = 6; + private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; + /** + *
+   * The core content of the template.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + * @return Whether the deidentifyConfig field is set. + */ + @java.lang.Override + public boolean hasDeidentifyConfig() { + return deidentifyConfig_ != null; + } + /** + *
+   * The core content of the template.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + * @return The deidentifyConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { + return deidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; + } + /** + *
+   * The core content of the template.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { + return getDeidentifyConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (deidentifyConfig_ != null) { + output.writeMessage(6, getDeidentifyConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getUpdateTime()); + } + if (deidentifyConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getDeidentifyConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DeidentifyTemplate)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DeidentifyTemplate other = (com.google.privacy.dlp.v2.DeidentifyTemplate) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasDeidentifyConfig() != other.hasDeidentifyConfig()) return false; + if (hasDeidentifyConfig()) { + if (!getDeidentifyConfig() + .equals(other.getDeidentifyConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasDeidentifyConfig()) { + hash = (37 * hash) + DEIDENTIFY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeidentifyConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyTemplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * DeidentifyTemplates contains instructions on how to de-identify content.
+   * See https://cloud.google.com/dlp/docs/concepts-templates to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeidentifyTemplate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyTemplate) + com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeidentifyTemplate.class, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DeidentifyTemplate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (deidentifyConfigBuilder_ == null) { + deidentifyConfig_ = null; + } else { + deidentifyConfig_ = null; + deidentifyConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplate getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplate build() { + com.google.privacy.dlp.v2.DeidentifyTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplate buildPartial() { + com.google.privacy.dlp.v2.DeidentifyTemplate result = new com.google.privacy.dlp.v2.DeidentifyTemplate(this); + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (deidentifyConfigBuilder_ == null) { + result.deidentifyConfig_ = deidentifyConfig_; + } else { + result.deidentifyConfig_ = deidentifyConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DeidentifyTemplate) { + return mergeFrom((com.google.privacy.dlp.v2.DeidentifyTemplate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyTemplate other) { + if (other == com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasDeidentifyConfig()) { + mergeDeidentifyConfig(other.getDeidentifyConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DeidentifyTemplate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DeidentifyTemplate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> deidentifyConfigBuilder_; + /** + *
+     * The core content of the template.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + * @return Whether the deidentifyConfig field is set. + */ + public boolean hasDeidentifyConfig() { + return deidentifyConfigBuilder_ != null || deidentifyConfig_ != null; + } + /** + *
+     * The core content of the template.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + * @return The deidentifyConfig. + */ + public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { + if (deidentifyConfigBuilder_ == null) { + return deidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; + } else { + return deidentifyConfigBuilder_.getMessage(); + } + } + /** + *
+     * The core content of the template.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + */ + public Builder setDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { + if (deidentifyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deidentifyConfig_ = value; + onChanged(); + } else { + deidentifyConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The core content of the template.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + */ + public Builder setDeidentifyConfig( + com.google.privacy.dlp.v2.DeidentifyConfig.Builder builderForValue) { + if (deidentifyConfigBuilder_ == null) { + deidentifyConfig_ = builderForValue.build(); + onChanged(); + } else { + deidentifyConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The core content of the template.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + */ + public Builder mergeDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { + if (deidentifyConfigBuilder_ == null) { + if (deidentifyConfig_ != null) { + deidentifyConfig_ = + com.google.privacy.dlp.v2.DeidentifyConfig.newBuilder(deidentifyConfig_).mergeFrom(value).buildPartial(); + } else { + deidentifyConfig_ = value; + } + onChanged(); + } else { + deidentifyConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The core content of the template.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + */ + public Builder clearDeidentifyConfig() { + if (deidentifyConfigBuilder_ == null) { + deidentifyConfig_ = null; + onChanged(); + } else { + deidentifyConfig_ = null; + deidentifyConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The core content of the template.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + */ + public com.google.privacy.dlp.v2.DeidentifyConfig.Builder getDeidentifyConfigBuilder() { + + onChanged(); + return getDeidentifyConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The core content of the template.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + */ + public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { + if (deidentifyConfigBuilder_ != null) { + return deidentifyConfigBuilder_.getMessageOrBuilder(); + } else { + return deidentifyConfig_ == null ? + com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; + } + } + /** + *
+     * The core content of the template.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> + getDeidentifyConfigFieldBuilder() { + if (deidentifyConfigBuilder_ == null) { + deidentifyConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>( + getDeidentifyConfig(), + getParentForChildren(), + isClean()); + deidentifyConfig_ = null; + } + return deidentifyConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeidentifyTemplate) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeidentifyTemplate) + private static final com.google.privacy.dlp.v2.DeidentifyTemplate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeidentifyTemplate(); + } + + public static com.google.privacy.dlp.v2.DeidentifyTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeidentifyTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeidentifyTemplate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateName.java new file mode 100644 index 000000000000..2962a16c063c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateName.java @@ -0,0 +1,512 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DeidentifyTemplateName implements ResourceName { + private static final PathTemplate ORGANIZATION_DEIDENTIFY_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/deidentifyTemplates/{deidentify_template}"); + private static final PathTemplate PROJECT_DEIDENTIFY_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/deidentifyTemplates/{deidentify_template}"); + private static final PathTemplate ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}"); + private static final PathTemplate PROJECT_LOCATION_DEIDENTIFY_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String organization; + private final String deidentifyTemplate; + private final String project; + private final String location; + + @Deprecated + protected DeidentifyTemplateName() { + organization = null; + deidentifyTemplate = null; + project = null; + location = null; + } + + private DeidentifyTemplateName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + deidentifyTemplate = Preconditions.checkNotNull(builder.getDeidentifyTemplate()); + project = null; + location = null; + pathTemplate = ORGANIZATION_DEIDENTIFY_TEMPLATE; + } + + private DeidentifyTemplateName(ProjectDeidentifyTemplateBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + deidentifyTemplate = Preconditions.checkNotNull(builder.getDeidentifyTemplate()); + organization = null; + location = null; + pathTemplate = PROJECT_DEIDENTIFY_TEMPLATE; + } + + private DeidentifyTemplateName(OrganizationLocationDeidentifyTemplateBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + deidentifyTemplate = Preconditions.checkNotNull(builder.getDeidentifyTemplate()); + project = null; + pathTemplate = ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE; + } + + private DeidentifyTemplateName(ProjectLocationDeidentifyTemplateBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deidentifyTemplate = Preconditions.checkNotNull(builder.getDeidentifyTemplate()); + organization = null; + pathTemplate = PROJECT_LOCATION_DEIDENTIFY_TEMPLATE; + } + + public String getOrganization() { + return organization; + } + + public String getDeidentifyTemplate() { + return deidentifyTemplate; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newOrganizationDeidentifyTemplateBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectDeidentifyTemplateBuilder newProjectDeidentifyTemplateBuilder() { + return new ProjectDeidentifyTemplateBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationLocationDeidentifyTemplateBuilder + newOrganizationLocationDeidentifyTemplateBuilder() { + return new OrganizationLocationDeidentifyTemplateBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationDeidentifyTemplateBuilder + newProjectLocationDeidentifyTemplateBuilder() { + return new ProjectLocationDeidentifyTemplateBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DeidentifyTemplateName of(String organization, String deidentifyTemplate) { + return newBuilder() + .setOrganization(organization) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DeidentifyTemplateName ofOrganizationDeidentifyTemplateName( + String organization, String deidentifyTemplate) { + return newBuilder() + .setOrganization(organization) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DeidentifyTemplateName ofProjectDeidentifyTemplateName( + String project, String deidentifyTemplate) { + return newProjectDeidentifyTemplateBuilder() + .setProject(project) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DeidentifyTemplateName ofOrganizationLocationDeidentifyTemplateName( + String organization, String location, String deidentifyTemplate) { + return newOrganizationLocationDeidentifyTemplateBuilder() + .setOrganization(organization) + .setLocation(location) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DeidentifyTemplateName ofProjectLocationDeidentifyTemplateName( + String project, String location, String deidentifyTemplate) { + return newProjectLocationDeidentifyTemplateBuilder() + .setProject(project) + .setLocation(location) + .setDeidentifyTemplate(deidentifyTemplate) + .build(); + } + + public static String format(String organization, String deidentifyTemplate) { + return newBuilder() + .setOrganization(organization) + .setDeidentifyTemplate(deidentifyTemplate) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationDeidentifyTemplateName( + String organization, String deidentifyTemplate) { + return newBuilder() + .setOrganization(organization) + .setDeidentifyTemplate(deidentifyTemplate) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectDeidentifyTemplateName( + String project, String deidentifyTemplate) { + return newProjectDeidentifyTemplateBuilder() + .setProject(project) + .setDeidentifyTemplate(deidentifyTemplate) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationLocationDeidentifyTemplateName( + String organization, String location, String deidentifyTemplate) { + return newOrganizationLocationDeidentifyTemplateBuilder() + .setOrganization(organization) + .setLocation(location) + .setDeidentifyTemplate(deidentifyTemplate) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationDeidentifyTemplateName( + String project, String location, String deidentifyTemplate) { + return newProjectLocationDeidentifyTemplateBuilder() + .setProject(project) + .setLocation(location) + .setDeidentifyTemplate(deidentifyTemplate) + .build() + .toString(); + } + + public static DeidentifyTemplateName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (ORGANIZATION_DEIDENTIFY_TEMPLATE.matches(formattedString)) { + Map matchMap = ORGANIZATION_DEIDENTIFY_TEMPLATE.match(formattedString); + return ofOrganizationDeidentifyTemplateName( + matchMap.get("organization"), matchMap.get("deidentify_template")); + } else if (PROJECT_DEIDENTIFY_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_DEIDENTIFY_TEMPLATE.match(formattedString); + return ofProjectDeidentifyTemplateName( + matchMap.get("project"), matchMap.get("deidentify_template")); + } else if (ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE.matches(formattedString)) { + Map matchMap = + ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE.match(formattedString); + return ofOrganizationLocationDeidentifyTemplateName( + matchMap.get("organization"), + matchMap.get("location"), + matchMap.get("deidentify_template")); + } else if (PROJECT_LOCATION_DEIDENTIFY_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_DEIDENTIFY_TEMPLATE.match(formattedString); + return ofProjectLocationDeidentifyTemplateName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("deidentify_template")); + } + throw new ValidationException( + "DeidentifyTemplateName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DeidentifyTemplateName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_DEIDENTIFY_TEMPLATE.matches(formattedString) + || PROJECT_DEIDENTIFY_TEMPLATE.matches(formattedString) + || ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE.matches(formattedString) + || PROJECT_LOCATION_DEIDENTIFY_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (deidentifyTemplate != null) { + fieldMapBuilder.put("deidentify_template", deidentifyTemplate); + } + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DeidentifyTemplateName that = ((DeidentifyTemplateName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.deidentifyTemplate, that.deidentifyTemplate) + && Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(deidentifyTemplate); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for organizations/{organization}/deidentifyTemplates/{deidentify_template}. */ + public static class Builder { + private String organization; + private String deidentifyTemplate; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getDeidentifyTemplate() { + return deidentifyTemplate; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setDeidentifyTemplate(String deidentifyTemplate) { + this.deidentifyTemplate = deidentifyTemplate; + return this; + } + + private Builder(DeidentifyTemplateName deidentifyTemplateName) { + Preconditions.checkArgument( + Objects.equals(deidentifyTemplateName.pathTemplate, ORGANIZATION_DEIDENTIFY_TEMPLATE), + "toBuilder is only supported when DeidentifyTemplateName has the pattern of organizations/{organization}/deidentifyTemplates/{deidentify_template}"); + this.organization = deidentifyTemplateName.organization; + this.deidentifyTemplate = deidentifyTemplateName.deidentifyTemplate; + } + + public DeidentifyTemplateName build() { + return new DeidentifyTemplateName(this); + } + } + + /** Builder for projects/{project}/deidentifyTemplates/{deidentify_template}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectDeidentifyTemplateBuilder { + private String project; + private String deidentifyTemplate; + + protected ProjectDeidentifyTemplateBuilder() {} + + public String getProject() { + return project; + } + + public String getDeidentifyTemplate() { + return deidentifyTemplate; + } + + public ProjectDeidentifyTemplateBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectDeidentifyTemplateBuilder setDeidentifyTemplate(String deidentifyTemplate) { + this.deidentifyTemplate = deidentifyTemplate; + return this; + } + + public DeidentifyTemplateName build() { + return new DeidentifyTemplateName(this); + } + } + + /** + * Builder for + * organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationLocationDeidentifyTemplateBuilder { + private String organization; + private String location; + private String deidentifyTemplate; + + protected OrganizationLocationDeidentifyTemplateBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getDeidentifyTemplate() { + return deidentifyTemplate; + } + + public OrganizationLocationDeidentifyTemplateBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationLocationDeidentifyTemplateBuilder setLocation(String location) { + this.location = location; + return this; + } + + public OrganizationLocationDeidentifyTemplateBuilder setDeidentifyTemplate( + String deidentifyTemplate) { + this.deidentifyTemplate = deidentifyTemplate; + return this; + } + + public DeidentifyTemplateName build() { + return new DeidentifyTemplateName(this); + } + } + + /** + * Builder for projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationDeidentifyTemplateBuilder { + private String project; + private String location; + private String deidentifyTemplate; + + protected ProjectLocationDeidentifyTemplateBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeidentifyTemplate() { + return deidentifyTemplate; + } + + public ProjectLocationDeidentifyTemplateBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationDeidentifyTemplateBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationDeidentifyTemplateBuilder setDeidentifyTemplate( + String deidentifyTemplate) { + this.deidentifyTemplate = deidentifyTemplate; + return this; + } + + public DeidentifyTemplateName build() { + return new DeidentifyTemplateName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateOrBuilder.java new file mode 100644 index 000000000000..814d6573128d --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateOrBuilder.java @@ -0,0 +1,156 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DeidentifyTemplateOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeidentifyTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The template name.
+   * The template will have one of the following formats:
+   * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+   * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Output only. The template name.
+   * The template will have one of the following formats:
+   * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
+   * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Display name (max 256 chars).
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * Display name (max 256 chars).
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * Short description (max 256 chars).
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Short description (max 256 chars).
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * The core content of the template.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + * @return Whether the deidentifyConfig field is set. + */ + boolean hasDeidentifyConfig(); + /** + *
+   * The core content of the template.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + * @return The deidentifyConfig. + */ + com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig(); + /** + *
+   * The core content of the template.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; + */ + com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java new file mode 100644 index 000000000000..c9dc19088569 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for DeleteDeidentifyTemplate.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} + */ +public final class DeleteDeidentifyTemplateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) + DeleteDeidentifyTemplateRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteDeidentifyTemplateRequest.newBuilder() to construct. + private DeleteDeidentifyTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteDeidentifyTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteDeidentifyTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteDeidentifyTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the organization and deidentify template to be deleted,
+   * for example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the organization and deidentify template to be deleted,
+   * for example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest other = (com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteDeidentifyTemplate.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest build() { + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest buildPartial() { + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest result = new com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) { + return mergeFrom((com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest other) { + if (other == com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the organization and deidentify template to be deleted,
+     * for example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the organization and deidentify template to be deleted,
+     * for example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the organization and deidentify template to be deleted,
+     * for example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and deidentify template to be deleted,
+     * for example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and deidentify template to be deleted,
+     * for example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) + private static final com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(); + } + + public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDeidentifyTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDeidentifyTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..1b8be445505a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DeleteDeidentifyTemplateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the organization and deidentify template to be deleted,
+   * for example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the organization and deidentify template to be deleted,
+   * for example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequest.java new file mode 100644 index 000000000000..f67d450a44aa --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequest.java @@ -0,0 +1,595 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The request message for deleting a DLP job.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteDlpJobRequest} + */ +public final class DeleteDlpJobRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteDlpJobRequest) + DeleteDlpJobRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteDlpJobRequest.newBuilder() to construct. + private DeleteDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteDlpJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteDlpJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteDlpJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteDlpJobRequest.class, com.google.privacy.dlp.v2.DeleteDlpJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the DlpJob resource to be deleted.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the DlpJob resource to be deleted.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DeleteDlpJobRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DeleteDlpJobRequest other = (com.google.privacy.dlp.v2.DeleteDlpJobRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteDlpJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The request message for deleting a DLP job.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteDlpJobRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteDlpJobRequest) + com.google.privacy.dlp.v2.DeleteDlpJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteDlpJobRequest.class, com.google.privacy.dlp.v2.DeleteDlpJobRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DeleteDlpJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteDlpJobRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DeleteDlpJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteDlpJobRequest build() { + com.google.privacy.dlp.v2.DeleteDlpJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteDlpJobRequest buildPartial() { + com.google.privacy.dlp.v2.DeleteDlpJobRequest result = new com.google.privacy.dlp.v2.DeleteDlpJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DeleteDlpJobRequest) { + return mergeFrom((com.google.privacy.dlp.v2.DeleteDlpJobRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteDlpJobRequest other) { + if (other == com.google.privacy.dlp.v2.DeleteDlpJobRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DeleteDlpJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DeleteDlpJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the DlpJob resource to be deleted.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the DlpJob resource to be deleted.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the DlpJob resource to be deleted.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the DlpJob resource to be deleted.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the DlpJob resource to be deleted.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteDlpJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteDlpJobRequest) + private static final com.google.privacy.dlp.v2.DeleteDlpJobRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteDlpJobRequest(); + } + + public static com.google.privacy.dlp.v2.DeleteDlpJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDlpJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDlpJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteDlpJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequestOrBuilder.java new file mode 100644 index 000000000000..655cc3ba8f3f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DeleteDlpJobRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteDlpJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the DlpJob resource to be deleted.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the DlpJob resource to be deleted.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java new file mode 100644 index 000000000000..e6f1fa32f42c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for DeleteInspectTemplate.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteInspectTemplateRequest} + */ +public final class DeleteInspectTemplateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteInspectTemplateRequest) + DeleteInspectTemplateRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteInspectTemplateRequest.newBuilder() to construct. + private DeleteInspectTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteInspectTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteInspectTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteInspectTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.class, com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the organization and inspectTemplate to be deleted, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the organization and inspectTemplate to be deleted, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DeleteInspectTemplateRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DeleteInspectTemplateRequest other = (com.google.privacy.dlp.v2.DeleteInspectTemplateRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteInspectTemplate.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteInspectTemplateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteInspectTemplateRequest) + com.google.privacy.dlp.v2.DeleteInspectTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.class, com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteInspectTemplateRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteInspectTemplateRequest build() { + com.google.privacy.dlp.v2.DeleteInspectTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteInspectTemplateRequest buildPartial() { + com.google.privacy.dlp.v2.DeleteInspectTemplateRequest result = new com.google.privacy.dlp.v2.DeleteInspectTemplateRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DeleteInspectTemplateRequest) { + return mergeFrom((com.google.privacy.dlp.v2.DeleteInspectTemplateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest other) { + if (other == com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DeleteInspectTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be deleted, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be deleted, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be deleted, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be deleted, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be deleted, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteInspectTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteInspectTemplateRequest) + private static final com.google.privacy.dlp.v2.DeleteInspectTemplateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteInspectTemplateRequest(); + } + + public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInspectTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteInspectTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteInspectTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..abe05e45927a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DeleteInspectTemplateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteInspectTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the organization and inspectTemplate to be deleted, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the organization and inspectTemplate to be deleted, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequest.java new file mode 100644 index 000000000000..a27627d77610 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for DeleteJobTrigger.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteJobTriggerRequest} + */ +public final class DeleteJobTriggerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteJobTriggerRequest) + DeleteJobTriggerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteJobTriggerRequest.newBuilder() to construct. + private DeleteJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteJobTriggerRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteJobTriggerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteJobTriggerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteJobTriggerRequest.class, com.google.privacy.dlp.v2.DeleteJobTriggerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DeleteJobTriggerRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DeleteJobTriggerRequest other = (com.google.privacy.dlp.v2.DeleteJobTriggerRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteJobTriggerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteJobTrigger.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteJobTriggerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteJobTriggerRequest) + com.google.privacy.dlp.v2.DeleteJobTriggerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteJobTriggerRequest.class, com.google.privacy.dlp.v2.DeleteJobTriggerRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DeleteJobTriggerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteJobTriggerRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DeleteJobTriggerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteJobTriggerRequest build() { + com.google.privacy.dlp.v2.DeleteJobTriggerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteJobTriggerRequest buildPartial() { + com.google.privacy.dlp.v2.DeleteJobTriggerRequest result = new com.google.privacy.dlp.v2.DeleteJobTriggerRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DeleteJobTriggerRequest) { + return mergeFrom((com.google.privacy.dlp.v2.DeleteJobTriggerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteJobTriggerRequest other) { + if (other == com.google.privacy.dlp.v2.DeleteJobTriggerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DeleteJobTriggerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DeleteJobTriggerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteJobTriggerRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteJobTriggerRequest) + private static final com.google.privacy.dlp.v2.DeleteJobTriggerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteJobTriggerRequest(); + } + + public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteJobTriggerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteJobTriggerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteJobTriggerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequestOrBuilder.java new file mode 100644 index 000000000000..7e1cba4cd1a7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DeleteJobTriggerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteJobTriggerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java new file mode 100644 index 000000000000..1ae63f6fc644 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for DeleteStoredInfoType.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} + */ +public final class DeleteStoredInfoTypeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) + DeleteStoredInfoTypeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteStoredInfoTypeRequest.newBuilder() to construct. + private DeleteStoredInfoTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteStoredInfoTypeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteStoredInfoTypeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteStoredInfoTypeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the organization and storedInfoType to be deleted, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the organization and storedInfoType to be deleted, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest other = (com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for DeleteStoredInfoType.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest build() { + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest buildPartial() { + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest result = new com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) { + return mergeFrom((com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest other) { + if (other == com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the organization and storedInfoType to be deleted, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the organization and storedInfoType to be deleted, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the organization and storedInfoType to be deleted, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and storedInfoType to be deleted, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and storedInfoType to be deleted, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) + private static final com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(); + } + + public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteStoredInfoTypeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteStoredInfoTypeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java new file mode 100644 index 000000000000..0eb61dfcec4c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DeleteStoredInfoTypeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the organization and storedInfoType to be deleted, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the organization and storedInfoType to be deleted, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpContentName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpContentName.java new file mode 100644 index 000000000000..fee890831a50 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpContentName.java @@ -0,0 +1,264 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DlpContentName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}/dlpContent"); + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/dlpContent"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + + @Deprecated + protected DlpContentName() { + project = null; + location = null; + } + + private DlpContentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = null; + pathTemplate = PROJECT; + } + + private DlpContentName(ProjectLocationBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + pathTemplate = PROJECT_LOCATION; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationBuilder newProjectLocationBuilder() { + return new ProjectLocationBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DlpContentName of(String project) { + return newBuilder().setProject(project).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DlpContentName ofProjectName(String project) { + return newBuilder().setProject(project).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DlpContentName ofProjectLocationName(String project, String location) { + return newProjectLocationBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectName(String project) { + return newBuilder().setProject(project).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationName(String project, String location) { + return newProjectLocationBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static DlpContentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT.matches(formattedString)) { + Map matchMap = PROJECT.match(formattedString); + return ofProjectName(matchMap.get("project")); + } else if (PROJECT_LOCATION.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION.match(formattedString); + return ofProjectLocationName(matchMap.get("project"), matchMap.get("location")); + } + throw new ValidationException("DlpContentName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DlpContentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.matches(formattedString) || PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DlpContentName that = ((DlpContentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/dlpContent. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(DlpContentName dlpContentName) { + Preconditions.checkArgument( + Objects.equals(dlpContentName.pathTemplate, PROJECT), + "toBuilder is only supported when DlpContentName has the pattern of projects/{project}/dlpContent"); + this.project = dlpContentName.project; + } + + public DlpContentName build() { + return new DlpContentName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/dlpContent. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationBuilder { + private String project; + private String location; + + protected ProjectLocationBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public ProjectLocationBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationBuilder setLocation(String location) { + this.location = location; + return this; + } + + public DlpContentName build() { + return new DlpContentName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java new file mode 100644 index 000000000000..06e845e81b5d --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java @@ -0,0 +1,2983 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Combines all of the information about a DLP job.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DlpJob} + */ +public final class DlpJob extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DlpJob) + DlpJobOrBuilder { +private static final long serialVersionUID = 0L; + // Use DlpJob.newBuilder() to construct. + private DlpJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DlpJob() { + name_ = ""; + type_ = 0; + state_ = 0; + jobTriggerName_ = ""; + errors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DlpJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DlpJob( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 24: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 34: { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder subBuilder = null; + if (detailsCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_).toBuilder(); + } + details_ = + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 4; + break; + } + case 42: { + com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder subBuilder = null; + if (detailsCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.InspectDataSourceDetails) details_).toBuilder(); + } + details_ = + input.readMessage(com.google.privacy.dlp.v2.InspectDataSourceDetails.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.InspectDataSourceDetails) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 5; + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + jobTriggerName_ = s; + break; + } + case 90: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + errors_.add( + input.readMessage(com.google.privacy.dlp.v2.Error.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DlpJob.class, com.google.privacy.dlp.v2.DlpJob.Builder.class); + } + + /** + *
+   * Possible states of a job. New items may be added.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.DlpJob.JobState} + */ + public enum JobState + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * JOB_STATE_UNSPECIFIED = 0; + */ + JOB_STATE_UNSPECIFIED(0), + /** + *
+     * The job has not yet started.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + *
+     * The job is currently running. Once a job has finished it will transition
+     * to FAILED or DONE.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + *
+     * The job is no longer running.
+     * 
+ * + * DONE = 3; + */ + DONE(3), + /** + *
+     * The job was canceled before it could be completed.
+     * 
+ * + * CANCELED = 4; + */ + CANCELED(4), + /** + *
+     * The job had an error and did not complete.
+     * 
+ * + * FAILED = 5; + */ + FAILED(5), + /** + *
+     * The job is currently accepting findings via hybridInspect.
+     * A hybrid job in ACTIVE state may continue to have findings added to it
+     * through the calling of hybridInspect. After the job has finished no more
+     * calls to hybridInspect may be made. ACTIVE jobs can transition to DONE.
+     * 
+ * + * ACTIVE = 6; + */ + ACTIVE(6), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * JOB_STATE_UNSPECIFIED = 0; + */ + public static final int JOB_STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The job has not yet started.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + *
+     * The job is currently running. Once a job has finished it will transition
+     * to FAILED or DONE.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + *
+     * The job is no longer running.
+     * 
+ * + * DONE = 3; + */ + public static final int DONE_VALUE = 3; + /** + *
+     * The job was canceled before it could be completed.
+     * 
+ * + * CANCELED = 4; + */ + public static final int CANCELED_VALUE = 4; + /** + *
+     * The job had an error and did not complete.
+     * 
+ * + * FAILED = 5; + */ + public static final int FAILED_VALUE = 5; + /** + *
+     * The job is currently accepting findings via hybridInspect.
+     * A hybrid job in ACTIVE state may continue to have findings added to it
+     * through the calling of hybridInspect. After the job has finished no more
+     * calls to hybridInspect may be made. ACTIVE jobs can transition to DONE.
+     * 
+ * + * ACTIVE = 6; + */ + public static final int ACTIVE_VALUE = 6; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static JobState forNumber(int value) { + switch (value) { + case 0: return JOB_STATE_UNSPECIFIED; + case 1: return PENDING; + case 2: return RUNNING; + case 3: return DONE; + case 4: return CANCELED; + case 5: return FAILED; + case 6: return ACTIVE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + JobState> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JobState findValueByNumber(int number) { + return JobState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpJob.getDescriptor().getEnumTypes().get(0); + } + + private static final JobState[] VALUES = values(); + + public static JobState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private JobState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DlpJob.JobState) + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + public enum DetailsCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RISK_DETAILS(4), + INSPECT_DETAILS(5), + DETAILS_NOT_SET(0); + private final int value; + private DetailsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DetailsCase valueOf(int value) { + return forNumber(value); + } + + public static DetailsCase forNumber(int value) { + switch (value) { + case 4: return RISK_DETAILS; + case 5: return INSPECT_DETAILS; + case 0: return DETAILS_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DetailsCase + getDetailsCase() { + return DetailsCase.forNumber( + detailsCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The server-assigned name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The server-assigned name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + *
+   * The type of job.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 2; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The type of job.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 2; + * @return The type. + */ + @java.lang.Override public com.google.privacy.dlp.v2.DlpJobType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + *
+   * State of a job.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJob.JobState state = 3; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * State of a job.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJob.JobState state = 3; + * @return The state. + */ + @java.lang.Override public com.google.privacy.dlp.v2.DlpJob.JobState getState() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DlpJob.JobState result = com.google.privacy.dlp.v2.DlpJob.JobState.valueOf(state_); + return result == null ? com.google.privacy.dlp.v2.DlpJob.JobState.UNRECOGNIZED : result; + } + + public static final int RISK_DETAILS_FIELD_NUMBER = 4; + /** + *
+   * Results from analyzing risk of a data source.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + * @return Whether the riskDetails field is set. + */ + @java.lang.Override + public boolean hasRiskDetails() { + return detailsCase_ == 4; + } + /** + *
+   * Results from analyzing risk of a data source.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + * @return The riskDetails. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getRiskDetails() { + if (detailsCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); + } + /** + *
+   * Results from analyzing risk of a data source.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder getRiskDetailsOrBuilder() { + if (detailsCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); + } + + public static final int INSPECT_DETAILS_FIELD_NUMBER = 5; + /** + *
+   * Results from inspecting a data source.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + * @return Whether the inspectDetails field is set. + */ + @java.lang.Override + public boolean hasInspectDetails() { + return detailsCase_ == 5; + } + /** + *
+   * Results from inspecting a data source.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + * @return The inspectDetails. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails getInspectDetails() { + if (detailsCase_ == 5) { + return (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_; + } + return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); + } + /** + *
+   * Results from inspecting a data source.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder getInspectDetailsOrBuilder() { + if (detailsCase_ == 5) { + return (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_; + } + return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Time when the job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Time when the job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Time when the job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Time when the job started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Time when the job started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Time when the job started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * Time when the job finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * Time when the job finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * Time when the job finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int JOB_TRIGGER_NAME_FIELD_NUMBER = 10; + private volatile java.lang.Object jobTriggerName_; + /** + *
+   * If created by a job trigger, the resource name of the trigger that
+   * instantiated the job.
+   * 
+ * + * string job_trigger_name = 10; + * @return The jobTriggerName. + */ + @java.lang.Override + public java.lang.String getJobTriggerName() { + java.lang.Object ref = jobTriggerName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobTriggerName_ = s; + return s; + } + } + /** + *
+   * If created by a job trigger, the resource name of the trigger that
+   * instantiated the job.
+   * 
+ * + * string job_trigger_name = 10; + * @return The bytes for jobTriggerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getJobTriggerNameBytes() { + java.lang.Object ref = jobTriggerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobTriggerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERRORS_FIELD_NUMBER = 11; + private java.util.List errors_; + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + @java.lang.Override + public java.util.List + getErrorsOrBuilderList() { + return errors_; + } + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Error getErrors(int index) { + return errors_.get(index); + } + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( + int index) { + return errors_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, type_); + } + if (state_ != com.google.privacy.dlp.v2.DlpJob.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (detailsCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_); + } + if (detailsCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(7, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(8, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobTriggerName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, jobTriggerName_); + } + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(11, errors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_); + } + if (state_ != com.google.privacy.dlp.v2.DlpJob.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, state_); + } + if (detailsCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_); + } + if (detailsCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobTriggerName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, jobTriggerName_); + } + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, errors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DlpJob)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DlpJob other = (com.google.privacy.dlp.v2.DlpJob) obj; + + if (!getName() + .equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!getJobTriggerName() + .equals(other.getJobTriggerName())) return false; + if (!getErrorsList() + .equals(other.getErrorsList())) return false; + if (!getDetailsCase().equals(other.getDetailsCase())) return false; + switch (detailsCase_) { + case 4: + if (!getRiskDetails() + .equals(other.getRiskDetails())) return false; + break; + case 5: + if (!getInspectDetails() + .equals(other.getInspectDetails())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + JOB_TRIGGER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getJobTriggerName().hashCode(); + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + switch (detailsCase_) { + case 4: + hash = (37 * hash) + RISK_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getRiskDetails().hashCode(); + break; + case 5: + hash = (37 * hash) + INSPECT_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getInspectDetails().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DlpJob parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DlpJob parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DlpJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DlpJob parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DlpJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DlpJob parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DlpJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DlpJob parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DlpJob parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DlpJob parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DlpJob parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DlpJob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DlpJob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Combines all of the information about a DLP job.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DlpJob} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DlpJob) + com.google.privacy.dlp.v2.DlpJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DlpJob.class, com.google.privacy.dlp.v2.DlpJob.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DlpJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getErrorsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + type_ = 0; + + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + jobTriggerName_ = ""; + + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + errorsBuilder_.clear(); + } + detailsCase_ = 0; + details_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJob getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DlpJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJob build() { + com.google.privacy.dlp.v2.DlpJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJob buildPartial() { + com.google.privacy.dlp.v2.DlpJob result = new com.google.privacy.dlp.v2.DlpJob(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.type_ = type_; + result.state_ = state_; + if (detailsCase_ == 4) { + if (riskDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = riskDetailsBuilder_.build(); + } + } + if (detailsCase_ == 5) { + if (inspectDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = inspectDetailsBuilder_.build(); + } + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.jobTriggerName_ = jobTriggerName_; + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + result.detailsCase_ = detailsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DlpJob) { + return mergeFrom((com.google.privacy.dlp.v2.DlpJob)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DlpJob other) { + if (other == com.google.privacy.dlp.v2.DlpJob.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getJobTriggerName().isEmpty()) { + jobTriggerName_ = other.jobTriggerName_; + onChanged(); + } + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getErrorsFieldBuilder() : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + switch (other.getDetailsCase()) { + case RISK_DETAILS: { + mergeRiskDetails(other.getRiskDetails()); + break; + } + case INSPECT_DETAILS: { + mergeInspectDetails(other.getInspectDetails()); + break; + } + case DETAILS_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DlpJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DlpJob) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int detailsCase_ = 0; + private java.lang.Object details_; + public DetailsCase + getDetailsCase() { + return DetailsCase.forNumber( + detailsCase_); + } + + public Builder clearDetails() { + detailsCase_ = 0; + details_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The server-assigned name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The server-assigned name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The server-assigned name.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The server-assigned name.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The server-assigned name.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+     * The type of job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 2; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The type of job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 2; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 2; + * @return The type. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJobType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; + } + /** + *
+     * The type of job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 2; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.privacy.dlp.v2.DlpJobType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The type of job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 2; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + /** + *
+     * State of a job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJob.JobState state = 3; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * State of a job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJob.JobState state = 3; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * State of a job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJob.JobState state = 3; + * @return The state. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJob.JobState getState() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DlpJob.JobState result = com.google.privacy.dlp.v2.DlpJob.JobState.valueOf(state_); + return result == null ? com.google.privacy.dlp.v2.DlpJob.JobState.UNRECOGNIZED : result; + } + /** + *
+     * State of a job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJob.JobState state = 3; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.privacy.dlp.v2.DlpJob.JobState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * State of a job.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJob.JobState state = 3; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder> riskDetailsBuilder_; + /** + *
+     * Results from analyzing risk of a data source.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + * @return Whether the riskDetails field is set. + */ + @java.lang.Override + public boolean hasRiskDetails() { + return detailsCase_ == 4; + } + /** + *
+     * Results from analyzing risk of a data source.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + * @return The riskDetails. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getRiskDetails() { + if (riskDetailsBuilder_ == null) { + if (detailsCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); + } else { + if (detailsCase_ == 4) { + return riskDetailsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); + } + } + /** + *
+     * Results from analyzing risk of a data source.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + */ + public Builder setRiskDetails(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails value) { + if (riskDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + riskDetailsBuilder_.setMessage(value); + } + detailsCase_ = 4; + return this; + } + /** + *
+     * Results from analyzing risk of a data source.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + */ + public Builder setRiskDetails( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder builderForValue) { + if (riskDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + riskDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 4; + return this; + } + /** + *
+     * Results from analyzing risk of a data source.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + */ + public Builder mergeRiskDetails(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails value) { + if (riskDetailsBuilder_ == null) { + if (detailsCase_ == 4 && + details_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance()) { + details_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 4) { + riskDetailsBuilder_.mergeFrom(value); + } else { + riskDetailsBuilder_.setMessage(value); + } + } + detailsCase_ = 4; + return this; + } + /** + *
+     * Results from analyzing risk of a data source.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + */ + public Builder clearRiskDetails() { + if (riskDetailsBuilder_ == null) { + if (detailsCase_ == 4) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 4) { + detailsCase_ = 0; + details_ = null; + } + riskDetailsBuilder_.clear(); + } + return this; + } + /** + *
+     * Results from analyzing risk of a data source.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder getRiskDetailsBuilder() { + return getRiskDetailsFieldBuilder().getBuilder(); + } + /** + *
+     * Results from analyzing risk of a data source.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder getRiskDetailsOrBuilder() { + if ((detailsCase_ == 4) && (riskDetailsBuilder_ != null)) { + return riskDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); + } + } + /** + *
+     * Results from analyzing risk of a data source.
+     * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder> + getRiskDetailsFieldBuilder() { + if (riskDetailsBuilder_ == null) { + if (!(detailsCase_ == 4)) { + details_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); + } + riskDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder>( + (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 4; + onChanged();; + return riskDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectDataSourceDetails, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder> inspectDetailsBuilder_; + /** + *
+     * Results from inspecting a data source.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + * @return Whether the inspectDetails field is set. + */ + @java.lang.Override + public boolean hasInspectDetails() { + return detailsCase_ == 5; + } + /** + *
+     * Results from inspecting a data source.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + * @return The inspectDetails. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails getInspectDetails() { + if (inspectDetailsBuilder_ == null) { + if (detailsCase_ == 5) { + return (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_; + } + return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); + } else { + if (detailsCase_ == 5) { + return inspectDetailsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); + } + } + /** + *
+     * Results from inspecting a data source.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + */ + public Builder setInspectDetails(com.google.privacy.dlp.v2.InspectDataSourceDetails value) { + if (inspectDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + inspectDetailsBuilder_.setMessage(value); + } + detailsCase_ = 5; + return this; + } + /** + *
+     * Results from inspecting a data source.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + */ + public Builder setInspectDetails( + com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder builderForValue) { + if (inspectDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + inspectDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 5; + return this; + } + /** + *
+     * Results from inspecting a data source.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + */ + public Builder mergeInspectDetails(com.google.privacy.dlp.v2.InspectDataSourceDetails value) { + if (inspectDetailsBuilder_ == null) { + if (detailsCase_ == 5 && + details_ != com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance()) { + details_ = com.google.privacy.dlp.v2.InspectDataSourceDetails.newBuilder((com.google.privacy.dlp.v2.InspectDataSourceDetails) details_) + .mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 5) { + inspectDetailsBuilder_.mergeFrom(value); + } else { + inspectDetailsBuilder_.setMessage(value); + } + } + detailsCase_ = 5; + return this; + } + /** + *
+     * Results from inspecting a data source.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + */ + public Builder clearInspectDetails() { + if (inspectDetailsBuilder_ == null) { + if (detailsCase_ == 5) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 5) { + detailsCase_ = 0; + details_ = null; + } + inspectDetailsBuilder_.clear(); + } + return this; + } + /** + *
+     * Results from inspecting a data source.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + */ + public com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder getInspectDetailsBuilder() { + return getInspectDetailsFieldBuilder().getBuilder(); + } + /** + *
+     * Results from inspecting a data source.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder getInspectDetailsOrBuilder() { + if ((detailsCase_ == 5) && (inspectDetailsBuilder_ != null)) { + return inspectDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 5) { + return (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_; + } + return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); + } + } + /** + *
+     * Results from inspecting a data source.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectDataSourceDetails, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder> + getInspectDetailsFieldBuilder() { + if (inspectDetailsBuilder_ == null) { + if (!(detailsCase_ == 5)) { + details_ = com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); + } + inspectDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectDataSourceDetails, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder>( + (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 5; + onChanged();; + return inspectDetailsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Time when the job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Time when the job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time when the job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time when the job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time when the job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time when the job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Time when the job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time when the job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Time when the job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Time when the job started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + *
+     * Time when the job started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time when the job started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time when the job started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time when the job started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time when the job started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Time when the job started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time when the job started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Time when the job started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * Time when the job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + *
+     * Time when the job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time when the job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time when the job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time when the job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time when the job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Time when the job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time when the job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * Time when the job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object jobTriggerName_ = ""; + /** + *
+     * If created by a job trigger, the resource name of the trigger that
+     * instantiated the job.
+     * 
+ * + * string job_trigger_name = 10; + * @return The jobTriggerName. + */ + public java.lang.String getJobTriggerName() { + java.lang.Object ref = jobTriggerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobTriggerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If created by a job trigger, the resource name of the trigger that
+     * instantiated the job.
+     * 
+ * + * string job_trigger_name = 10; + * @return The bytes for jobTriggerName. + */ + public com.google.protobuf.ByteString + getJobTriggerNameBytes() { + java.lang.Object ref = jobTriggerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobTriggerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If created by a job trigger, the resource name of the trigger that
+     * instantiated the job.
+     * 
+ * + * string job_trigger_name = 10; + * @param value The jobTriggerName to set. + * @return This builder for chaining. + */ + public Builder setJobTriggerName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobTriggerName_ = value; + onChanged(); + return this; + } + /** + *
+     * If created by a job trigger, the resource name of the trigger that
+     * instantiated the job.
+     * 
+ * + * string job_trigger_name = 10; + * @return This builder for chaining. + */ + public Builder clearJobTriggerName() { + + jobTriggerName_ = getDefaultInstance().getJobTriggerName(); + onChanged(); + return this; + } + /** + *
+     * If created by a job trigger, the resource name of the trigger that
+     * instantiated the job.
+     * 
+ * + * string job_trigger_name = 10; + * @param value The bytes for jobTriggerName to set. + * @return This builder for chaining. + */ + public Builder setJobTriggerNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobTriggerName_ = value; + onChanged(); + return this; + } + + private java.util.List errors_ = + java.util.Collections.emptyList(); + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errors_ = new java.util.ArrayList(errors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> errorsBuilder_; + + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public com.google.privacy.dlp.v2.Error getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public Builder setErrors( + int index, com.google.privacy.dlp.v2.Error value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public Builder setErrors( + int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public Builder addErrors(com.google.privacy.dlp.v2.Error value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public Builder addErrors( + int index, com.google.privacy.dlp.v2.Error value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public Builder addErrors( + com.google.privacy.dlp.v2.Error.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public Builder addErrors( + int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public Builder addAllErrors( + java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public com.google.privacy.dlp.v2.Error.Builder getErrorsBuilder( + int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( + int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public java.util.List + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder() { + return getErrorsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Error.getDefaultInstance()); + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder( + int index) { + return getErrorsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Error.getDefaultInstance()); + } + /** + *
+     * A stream of errors encountered running the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + public java.util.List + getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder>( + errors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + errors_ = null; + } + return errorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DlpJob) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DlpJob) + private static final com.google.privacy.dlp.v2.DlpJob DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DlpJob(); + } + + public static com.google.privacy.dlp.v2.DlpJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DlpJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DlpJob(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobName.java new file mode 100644 index 000000000000..be179c5f9631 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobName.java @@ -0,0 +1,313 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DlpJobName implements ResourceName { + private static final PathTemplate PROJECT_DLP_JOB = + PathTemplate.createWithoutUrlEncoding("projects/{project}/dlpJobs/{dlp_job}"); + private static final PathTemplate PROJECT_LOCATION_DLP_JOB = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dlpJobs/{dlp_job}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String dlpJob; + private final String location; + + @Deprecated + protected DlpJobName() { + project = null; + dlpJob = null; + location = null; + } + + private DlpJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + dlpJob = Preconditions.checkNotNull(builder.getDlpJob()); + location = null; + pathTemplate = PROJECT_DLP_JOB; + } + + private DlpJobName(ProjectLocationDlpJobBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dlpJob = Preconditions.checkNotNull(builder.getDlpJob()); + pathTemplate = PROJECT_LOCATION_DLP_JOB; + } + + public String getProject() { + return project; + } + + public String getDlpJob() { + return dlpJob; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectDlpJobBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationDlpJobBuilder newProjectLocationDlpJobBuilder() { + return new ProjectLocationDlpJobBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DlpJobName of(String project, String dlpJob) { + return newBuilder().setProject(project).setDlpJob(dlpJob).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DlpJobName ofProjectDlpJobName(String project, String dlpJob) { + return newBuilder().setProject(project).setDlpJob(dlpJob).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static DlpJobName ofProjectLocationDlpJobName( + String project, String location, String dlpJob) { + return newProjectLocationDlpJobBuilder() + .setProject(project) + .setLocation(location) + .setDlpJob(dlpJob) + .build(); + } + + public static String format(String project, String dlpJob) { + return newBuilder().setProject(project).setDlpJob(dlpJob).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectDlpJobName(String project, String dlpJob) { + return newBuilder().setProject(project).setDlpJob(dlpJob).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationDlpJobName( + String project, String location, String dlpJob) { + return newProjectLocationDlpJobBuilder() + .setProject(project) + .setLocation(location) + .setDlpJob(dlpJob) + .build() + .toString(); + } + + public static DlpJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_DLP_JOB.matches(formattedString)) { + Map matchMap = PROJECT_DLP_JOB.match(formattedString); + return ofProjectDlpJobName(matchMap.get("project"), matchMap.get("dlp_job")); + } else if (PROJECT_LOCATION_DLP_JOB.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_DLP_JOB.match(formattedString); + return ofProjectLocationDlpJobName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("dlp_job")); + } + throw new ValidationException("DlpJobName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DlpJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_DLP_JOB.matches(formattedString) + || PROJECT_LOCATION_DLP_JOB.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (dlpJob != null) { + fieldMapBuilder.put("dlp_job", dlpJob); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DlpJobName that = ((DlpJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.dlpJob, that.dlpJob) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(dlpJob); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/dlpJobs/{dlp_job}. */ + public static class Builder { + private String project; + private String dlpJob; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getDlpJob() { + return dlpJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDlpJob(String dlpJob) { + this.dlpJob = dlpJob; + return this; + } + + private Builder(DlpJobName dlpJobName) { + Preconditions.checkArgument( + Objects.equals(dlpJobName.pathTemplate, PROJECT_DLP_JOB), + "toBuilder is only supported when DlpJobName has the pattern of projects/{project}/dlpJobs/{dlp_job}"); + this.project = dlpJobName.project; + this.dlpJob = dlpJobName.dlpJob; + } + + public DlpJobName build() { + return new DlpJobName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/dlpJobs/{dlp_job}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationDlpJobBuilder { + private String project; + private String location; + private String dlpJob; + + protected ProjectLocationDlpJobBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDlpJob() { + return dlpJob; + } + + public ProjectLocationDlpJobBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationDlpJobBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationDlpJobBuilder setDlpJob(String dlpJob) { + this.dlpJob = dlpJob; + return this; + } + + public DlpJobName build() { + return new DlpJobName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobOrBuilder.java new file mode 100644 index 000000000000..87191b5f0038 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobOrBuilder.java @@ -0,0 +1,270 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DlpJobOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DlpJob) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The server-assigned name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The server-assigned name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The type of job.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 2; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The type of job.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 2; + * @return The type. + */ + com.google.privacy.dlp.v2.DlpJobType getType(); + + /** + *
+   * State of a job.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJob.JobState state = 3; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * State of a job.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJob.JobState state = 3; + * @return The state. + */ + com.google.privacy.dlp.v2.DlpJob.JobState getState(); + + /** + *
+   * Results from analyzing risk of a data source.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + * @return Whether the riskDetails field is set. + */ + boolean hasRiskDetails(); + /** + *
+   * Results from analyzing risk of a data source.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + * @return The riskDetails. + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getRiskDetails(); + /** + *
+   * Results from analyzing risk of a data source.
+   * 
+ * + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder getRiskDetailsOrBuilder(); + + /** + *
+   * Results from inspecting a data source.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + * @return Whether the inspectDetails field is set. + */ + boolean hasInspectDetails(); + /** + *
+   * Results from inspecting a data source.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + * @return The inspectDetails. + */ + com.google.privacy.dlp.v2.InspectDataSourceDetails getInspectDetails(); + /** + *
+   * Results from inspecting a data source.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; + */ + com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder getInspectDetailsOrBuilder(); + + /** + *
+   * Time when the job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Time when the job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Time when the job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Time when the job started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Time when the job started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Time when the job started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * Time when the job finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * Time when the job finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * Time when the job finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+   * If created by a job trigger, the resource name of the trigger that
+   * instantiated the job.
+   * 
+ * + * string job_trigger_name = 10; + * @return The jobTriggerName. + */ + java.lang.String getJobTriggerName(); + /** + *
+   * If created by a job trigger, the resource name of the trigger that
+   * instantiated the job.
+   * 
+ * + * string job_trigger_name = 10; + * @return The bytes for jobTriggerName. + */ + com.google.protobuf.ByteString + getJobTriggerNameBytes(); + + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + java.util.List + getErrorsList(); + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + com.google.privacy.dlp.v2.Error getErrors(int index); + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + int getErrorsCount(); + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + java.util.List + getErrorsOrBuilderList(); + /** + *
+   * A stream of errors encountered running the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 11; + */ + com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( + int index); + + public com.google.privacy.dlp.v2.DlpJob.DetailsCase getDetailsCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java new file mode 100644 index 000000000000..6c012a85217b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * An enum to represent the various types of DLP jobs.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.DlpJobType} + */ +public enum DlpJobType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Defaults to INSPECT_JOB.
+   * 
+ * + * DLP_JOB_TYPE_UNSPECIFIED = 0; + */ + DLP_JOB_TYPE_UNSPECIFIED(0), + /** + *
+   * The job inspected Google Cloud for sensitive data.
+   * 
+ * + * INSPECT_JOB = 1; + */ + INSPECT_JOB(1), + /** + *
+   * The job executed a Risk Analysis computation.
+   * 
+ * + * RISK_ANALYSIS_JOB = 2; + */ + RISK_ANALYSIS_JOB(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Defaults to INSPECT_JOB.
+   * 
+ * + * DLP_JOB_TYPE_UNSPECIFIED = 0; + */ + public static final int DLP_JOB_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * The job inspected Google Cloud for sensitive data.
+   * 
+ * + * INSPECT_JOB = 1; + */ + public static final int INSPECT_JOB_VALUE = 1; + /** + *
+   * The job executed a Risk Analysis computation.
+   * 
+ * + * RISK_ANALYSIS_JOB = 2; + */ + public static final int RISK_ANALYSIS_JOB_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DlpJobType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DlpJobType forNumber(int value) { + switch (value) { + case 0: return DLP_JOB_TYPE_UNSPECIFIED; + case 1: return INSPECT_JOB; + case 2: return RISK_ANALYSIS_JOB; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DlpJobType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DlpJobType findValueByNumber(int number) { + return DlpJobType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(8); + } + + private static final DlpJobType[] VALUES = values(); + + public static DlpJobType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DlpJobType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DlpJobType) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java new file mode 100644 index 000000000000..9b76576e5966 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java @@ -0,0 +1,3641 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public final class DlpProto { + private DlpProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ExclusionRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectionRule_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectionRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectionRuleSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ByteContentItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ContentItem_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ContentItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Table_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Table_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Table_Row_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Table_Row_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Finding_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Finding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Location_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Location_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_MetadataLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StorageMetadataLabel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DocumentLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TableLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TableLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Container_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Container_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Range_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Range_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_BoundingBox_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_BoundingBox_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Color_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Color_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RedactImageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectContentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectContentResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_OutputStorageConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InfoTypeStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_HybridInspectStatistics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InfoTypeDescription_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InfoTypeCategory_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_QuasiId_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Value_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DateTime_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DateTime_TimeZone_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RedactConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CryptoKey_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordCondition_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordCondition_Condition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Schedule_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Manual_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Manual_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Error_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_JobTrigger_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Action_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Action_SaveFindings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfileAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfileAction_Export_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfileJobConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfileLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DlpJob_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StoredInfoType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_HybridContentItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_HybridFindingDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataRiskLevel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TableDataProfile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ProfileStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InfoTypeSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\037google/privacy/dlp/v2/dlp.proto\022\025googl" + + "e.privacy.dlp.v2\032\034google/api/annotations" + + ".proto\032\027google/api/client.proto\032\037google/" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\032#google/privacy/dlp/v2/stora" + + "ge.proto\032\036google/protobuf/duration.proto" + + "\032\033google/protobuf/empty.proto\032 google/pr" + + "otobuf/field_mask.proto\032\037google/protobuf" + + "/timestamp.proto\032\027google/rpc/status.prot" + + "o\032\026google/type/date.proto\032\033google/type/d" + + "ayofweek.proto\032\033google/type/timeofday.pr" + + "oto\"G\n\020ExcludeInfoTypes\0223\n\ninfo_types\030\001 " + + "\003(\0132\037.google.privacy.dlp.v2.InfoType\"\240\002\n" + + "\rExclusionRule\022F\n\ndictionary\030\001 \001(\01320.goo" + + "gle.privacy.dlp.v2.CustomInfoType.Dictio" + + "naryH\000\022<\n\005regex\030\002 \001(\0132+.google.privacy.d" + + "lp.v2.CustomInfoType.RegexH\000\022E\n\022exclude_" + + "info_types\030\003 \001(\0132\'.google.privacy.dlp.v2" + + ".ExcludeInfoTypesH\000\022:\n\rmatching_type\030\004 \001" + + "(\0162#.google.privacy.dlp.v2.MatchingTypeB" + + "\006\n\004type\"\261\001\n\016InspectionRule\022W\n\014hotword_ru" + + "le\030\001 \001(\0132?.google.privacy.dlp.v2.CustomI" + + "nfoType.DetectionRule.HotwordRuleH\000\022>\n\016e" + + "xclusion_rule\030\002 \001(\0132$.google.privacy.dlp" + + ".v2.ExclusionRuleH\000B\006\n\004type\"~\n\021Inspectio" + + "nRuleSet\0223\n\ninfo_types\030\001 \003(\0132\037.google.pr" + + "ivacy.dlp.v2.InfoType\0224\n\005rules\030\002 \003(\0132%.g" + + "oogle.privacy.dlp.v2.InspectionRule\"\307\005\n\r" + + "InspectConfig\0223\n\ninfo_types\030\001 \003(\0132\037.goog" + + "le.privacy.dlp.v2.InfoType\0229\n\016min_likeli" + + "hood\030\002 \001(\0162!.google.privacy.dlp.v2.Likel" + + "ihood\022B\n\006limits\030\003 \001(\01322.google.privacy.d" + + "lp.v2.InspectConfig.FindingLimits\022\025\n\rinc" + + "lude_quote\030\004 \001(\010\022\032\n\022exclude_info_types\030\005" + + " \001(\010\022@\n\021custom_info_types\030\006 \003(\0132%.google" + + ".privacy.dlp.v2.CustomInfoType\022=\n\017conten" + + "t_options\030\010 \003(\0162$.google.privacy.dlp.v2." + + "ContentOption\022:\n\010rule_set\030\n \003(\0132(.google" + + ".privacy.dlp.v2.InspectionRuleSet\032\221\002\n\rFi" + + "ndingLimits\022\035\n\025max_findings_per_item\030\001 \001" + + "(\005\022 \n\030max_findings_per_request\030\002 \001(\005\022d\n\032" + + "max_findings_per_info_type\030\003 \003(\0132@.googl" + + "e.privacy.dlp.v2.InspectConfig.FindingLi" + + "mits.InfoTypeLimit\032Y\n\rInfoTypeLimit\0222\n\ti" + + "nfo_type\030\001 \001(\0132\037.google.privacy.dlp.v2.I" + + "nfoType\022\024\n\014max_findings\030\002 \001(\005\"\305\002\n\017ByteCo" + + "ntentItem\022>\n\004type\030\001 \001(\01620.google.privacy" + + ".dlp.v2.ByteContentItem.BytesType\022\014\n\004dat" + + "a\030\002 \001(\014\"\343\001\n\tBytesType\022\032\n\026BYTES_TYPE_UNSP" + + "ECIFIED\020\000\022\t\n\005IMAGE\020\006\022\016\n\nIMAGE_JPEG\020\001\022\r\n\t" + + "IMAGE_BMP\020\002\022\r\n\tIMAGE_PNG\020\003\022\r\n\tIMAGE_SVG\020" + + "\004\022\r\n\tTEXT_UTF8\020\005\022\021\n\rWORD_DOCUMENT\020\007\022\007\n\003P" + + "DF\020\010\022\027\n\023POWERPOINT_DOCUMENT\020\t\022\022\n\016EXCEL_D" + + "OCUMENT\020\n\022\010\n\004AVRO\020\013\022\007\n\003CSV\020\014\022\007\n\003TSV\020\r\"\227\001" + + "\n\013ContentItem\022\017\n\005value\030\003 \001(\tH\000\022-\n\005table\030" + + "\004 \001(\0132\034.google.privacy.dlp.v2.TableH\000\022;\n" + + "\tbyte_item\030\005 \001(\0132&.google.privacy.dlp.v2" + + ".ByteContentItemH\000B\013\n\tdata_item\"\235\001\n\005Tabl" + + "e\022/\n\007headers\030\001 \003(\0132\036.google.privacy.dlp." + + "v2.FieldId\022.\n\004rows\030\002 \003(\0132 .google.privac" + + "y.dlp.v2.Table.Row\0323\n\003Row\022,\n\006values\030\001 \003(" + + "\0132\034.google.privacy.dlp.v2.Value\"]\n\rInspe" + + "ctResult\0220\n\010findings\030\001 \003(\0132\036.google.priv" + + "acy.dlp.v2.Finding\022\032\n\022findings_truncated" + + "\030\002 \001(\010\"\337\005\n\007Finding\022\014\n\004name\030\016 \001(\t\022\r\n\005quot" + + "e\030\001 \001(\t\0222\n\tinfo_type\030\002 \001(\0132\037.google.priv" + + "acy.dlp.v2.InfoType\0225\n\nlikelihood\030\003 \001(\0162" + + "!.google.privacy.dlp.v2.Likelihood\0221\n\010lo" + + "cation\030\004 \001(\0132\037.google.privacy.dlp.v2.Loc" + + "ation\022/\n\013create_time\030\006 \001(\0132\032.google.prot" + + "obuf.Timestamp\0224\n\nquote_info\030\007 \001(\0132 .goo" + + "gle.privacy.dlp.v2.QuoteInfo\0225\n\rresource" + + "_name\030\010 \001(\tB\036\372A\033\n\031dlp.googleapis.com/Dlp" + + "Job\0228\n\014trigger_name\030\t \001(\tB\"\372A\037\n\035dlp.goog" + + "leapis.com/JobTrigger\022:\n\006labels\030\n \003(\0132*." + + "google.privacy.dlp.v2.Finding.LabelsEntr" + + "y\0223\n\017job_create_time\030\013 \001(\0132\032.google.prot" + + "obuf.Timestamp\0220\n\010job_name\030\r \001(\tB\036\372A\033\n\031d" + + "lp.googleapis.com/DlpJob\022\022\n\nfinding_id\030\017" + + " \001(\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001:[\352AX\n\032dlp.googleapis.com/Fin" + + "ding\022:projects/{project}/locations/{loca" + + "tion}/findings/{finding}\"\353\001\n\010Location\0220\n" + + "\nbyte_range\030\001 \001(\0132\034.google.privacy.dlp.v" + + "2.Range\0225\n\017codepoint_range\030\002 \001(\0132\034.googl" + + "e.privacy.dlp.v2.Range\022A\n\021content_locati" + + "ons\030\007 \003(\0132&.google.privacy.dlp.v2.Conten" + + "tLocation\0223\n\tcontainer\030\010 \001(\0132 .google.pr" + + "ivacy.dlp.v2.Container\"\227\003\n\017ContentLocati" + + "on\022\026\n\016container_name\030\001 \001(\t\022@\n\017record_loc" + + "ation\030\002 \001(\0132%.google.privacy.dlp.v2.Reco" + + "rdLocationH\000\022>\n\016image_location\030\003 \001(\0132$.g" + + "oogle.privacy.dlp.v2.ImageLocationH\000\022D\n\021" + + "document_location\030\005 \001(\0132\'.google.privacy" + + ".dlp.v2.DocumentLocationH\000\022D\n\021metadata_l" + + "ocation\030\010 \001(\0132\'.google.privacy.dlp.v2.Me" + + "tadataLocationH\000\0227\n\023container_timestamp\030" + + "\006 \001(\0132\032.google.protobuf.Timestamp\022\031\n\021con" + + "tainer_version\030\007 \001(\tB\n\n\010location\"\224\001\n\020Met" + + "adataLocation\0221\n\004type\030\001 \001(\0162#.google.pri" + + "vacy.dlp.v2.MetadataType\022D\n\rstorage_labe" + + "l\030\003 \001(\0132+.google.privacy.dlp.v2.StorageM" + + "etadataLabelH\000B\007\n\005label\"#\n\024StorageMetada" + + "taLabel\022\013\n\003key\030\001 \001(\t\"\'\n\020DocumentLocation" + + "\022\023\n\013file_offset\030\001 \001(\003\"\266\001\n\016RecordLocation" + + "\0224\n\nrecord_key\030\001 \001(\0132 .google.privacy.dl" + + "p.v2.RecordKey\0220\n\010field_id\030\002 \001(\0132\036.googl" + + "e.privacy.dlp.v2.FieldId\022<\n\016table_locati" + + "on\030\003 \001(\0132$.google.privacy.dlp.v2.TableLo" + + "cation\"\"\n\rTableLocation\022\021\n\trow_index\030\001 \001" + + "(\003\"\254\001\n\tContainer\022\014\n\004type\030\001 \001(\t\022\022\n\nprojec" + + "t_id\030\002 \001(\t\022\021\n\tfull_path\030\003 \001(\t\022\021\n\troot_pa" + + "th\030\004 \001(\t\022\025\n\rrelative_path\030\005 \001(\t\022/\n\013updat" + + "e_time\030\006 \001(\0132\032.google.protobuf.Timestamp" + + "\022\017\n\007version\030\007 \001(\t\"#\n\005Range\022\r\n\005start\030\001 \001(" + + "\003\022\013\n\003end\030\002 \001(\003\"K\n\rImageLocation\022:\n\016bound" + + "ing_boxes\030\001 \003(\0132\".google.privacy.dlp.v2." + + "BoundingBox\"G\n\013BoundingBox\022\013\n\003top\030\001 \001(\005\022" + + "\014\n\004left\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\022\016\n\006height\030\004" + + " \001(\005\"\374\003\n\022RedactImageRequest\0222\n\006parent\030\001 " + + "\001(\tB\"\372A\037\022\035dlp.googleapis.com/DlpContent\022" + + "\023\n\013location_id\030\010 \001(\t\022<\n\016inspect_config\030\002" + + " \001(\0132$.google.privacy.dlp.v2.InspectConf" + + "ig\022_\n\027image_redaction_configs\030\005 \003(\0132>.go" + + "ogle.privacy.dlp.v2.RedactImageRequest.I" + + "mageRedactionConfig\022\030\n\020include_findings\030" + + "\006 \001(\010\0229\n\tbyte_item\030\007 \001(\0132&.google.privac" + + "y.dlp.v2.ByteContentItem\032\250\001\n\024ImageRedact" + + "ionConfig\0224\n\tinfo_type\030\001 \001(\0132\037.google.pr" + + "ivacy.dlp.v2.InfoTypeH\000\022\031\n\017redact_all_te" + + "xt\030\002 \001(\010H\000\0225\n\017redaction_color\030\003 \001(\0132\034.go" + + "ogle.privacy.dlp.v2.ColorB\010\n\006target\"1\n\005C" + + "olor\022\013\n\003red\030\001 \001(\002\022\r\n\005green\030\002 \001(\002\022\014\n\004blue" + + "\030\003 \001(\002\"\203\001\n\023RedactImageResponse\022\026\n\016redact" + + "ed_image\030\001 \001(\014\022\026\n\016extracted_text\030\002 \001(\t\022<" + + "\n\016inspect_result\030\003 \001(\0132$.google.privacy." + + "dlp.v2.InspectResult\"\330\002\n\030DeidentifyConte" + + "ntRequest\0222\n\006parent\030\001 \001(\tB\"\372A\037\022\035dlp.goog" + + "leapis.com/DlpContent\022B\n\021deidentify_conf" + + "ig\030\002 \001(\0132\'.google.privacy.dlp.v2.Deident" + + "ifyConfig\022<\n\016inspect_config\030\003 \001(\0132$.goog" + + "le.privacy.dlp.v2.InspectConfig\0220\n\004item\030" + + "\004 \001(\0132\".google.privacy.dlp.v2.ContentIte" + + "m\022\035\n\025inspect_template_name\030\005 \001(\t\022 \n\030deid" + + "entify_template_name\030\006 \001(\t\022\023\n\013location_i" + + "d\030\007 \001(\t\"\216\001\n\031DeidentifyContentResponse\0220\n" + + "\004item\030\001 \001(\0132\".google.privacy.dlp.v2.Cont" + + "entItem\022?\n\010overview\030\002 \001(\0132-.google.priva" + + "cy.dlp.v2.TransformationOverview\"\333\002\n\030Rei" + + "dentifyContentRequest\0225\n\006parent\030\001 \001(\tB%\340" + + "A\002\372A\037\022\035dlp.googleapis.com/DlpContent\022B\n\021" + + "reidentify_config\030\002 \001(\0132\'.google.privacy" + + ".dlp.v2.DeidentifyConfig\022<\n\016inspect_conf" + + "ig\030\003 \001(\0132$.google.privacy.dlp.v2.Inspect" + + "Config\0220\n\004item\030\004 \001(\0132\".google.privacy.dl" + + "p.v2.ContentItem\022\035\n\025inspect_template_nam" + + "e\030\005 \001(\t\022 \n\030reidentify_template_name\030\006 \001(" + + "\t\022\023\n\013location_id\030\007 \001(\t\"\216\001\n\031ReidentifyCon" + + "tentResponse\0220\n\004item\030\001 \001(\0132\".google.priv" + + "acy.dlp.v2.ContentItem\022?\n\010overview\030\002 \001(\013" + + "2-.google.privacy.dlp.v2.TransformationO" + + "verview\"\357\001\n\025InspectContentRequest\0222\n\006par" + + "ent\030\001 \001(\tB\"\372A\037\022\035dlp.googleapis.com/DlpCo" + + "ntent\022<\n\016inspect_config\030\002 \001(\0132$.google.p" + + "rivacy.dlp.v2.InspectConfig\0220\n\004item\030\003 \001(" + + "\0132\".google.privacy.dlp.v2.ContentItem\022\035\n" + + "\025inspect_template_name\030\004 \001(\t\022\023\n\013location" + + "_id\030\005 \001(\t\"N\n\026InspectContentResponse\0224\n\006r" + + "esult\030\001 \001(\0132$.google.privacy.dlp.v2.Insp" + + "ectResult\"\267\002\n\023OutputStorageConfig\0225\n\005tab" + + "le\030\001 \001(\0132$.google.privacy.dlp.v2.BigQuer" + + "yTableH\000\022N\n\routput_schema\030\003 \001(\01627.google" + + ".privacy.dlp.v2.OutputStorageConfig.Outp" + + "utSchema\"\220\001\n\014OutputSchema\022\035\n\031OUTPUT_SCHE" + + "MA_UNSPECIFIED\020\000\022\021\n\rBASIC_COLUMNS\020\001\022\017\n\013G" + + "CS_COLUMNS\020\002\022\025\n\021DATASTORE_COLUMNS\020\003\022\025\n\021B" + + "IG_QUERY_COLUMNS\020\004\022\017\n\013ALL_COLUMNS\020\005B\006\n\004t" + + "ype\"R\n\rInfoTypeStats\0222\n\tinfo_type\030\001 \001(\0132" + + "\037.google.privacy.dlp.v2.InfoType\022\r\n\005coun" + + "t\030\002 \001(\003\"\244\004\n\030InspectDataSourceDetails\022[\n\021" + + "requested_options\030\002 \001(\0132@.google.privacy" + + ".dlp.v2.InspectDataSourceDetails.Request" + + "edOptions\022F\n\006result\030\003 \001(\01326.google.priva" + + "cy.dlp.v2.InspectDataSourceDetails.Resul" + + "t\032\232\001\n\020RequestedOptions\022I\n\031snapshot_inspe" + + "ct_template\030\001 \001(\0132&.google.privacy.dlp.v" + + "2.InspectTemplate\022;\n\njob_config\030\003 \001(\0132\'." + + "google.privacy.dlp.v2.InspectJobConfig\032\305" + + "\001\n\006Result\022\027\n\017processed_bytes\030\001 \001(\003\022\035\n\025to" + + "tal_estimated_bytes\030\002 \001(\003\022=\n\017info_type_s" + + "tats\030\003 \003(\0132$.google.privacy.dlp.v2.InfoT" + + "ypeStats\022D\n\014hybrid_stats\030\007 \001(\0132..google." + + "privacy.dlp.v2.HybridInspectStatistics\"`" + + "\n\027HybridInspectStatistics\022\027\n\017processed_c" + + "ount\030\001 \001(\003\022\025\n\raborted_count\030\002 \001(\003\022\025\n\rpen" + + "ding_count\030\003 \001(\003\"\212\002\n\023InfoTypeDescription" + + "\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022@\n\014" + + "supported_by\030\003 \003(\0162*.google.privacy.dlp." + + "v2.InfoTypeSupportedBy\022\023\n\013description\030\004 " + + "\001(\t\022;\n\010versions\030\t \003(\0132).google.privacy.d" + + "lp.v2.VersionDescription\022;\n\ncategories\030\n" + + " \003(\0132\'.google.privacy.dlp.v2.InfoTypeCat" + + "egory\"\330\010\n\020InfoTypeCategory\022U\n\021location_c" + + "ategory\030\001 \001(\01628.google.privacy.dlp.v2.In" + + "foTypeCategory.LocationCategoryH\000\022U\n\021ind" + + "ustry_category\030\002 \001(\01628.google.privacy.dl" + + "p.v2.InfoTypeCategory.IndustryCategoryH\000" + + "\022M\n\rtype_category\030\003 \001(\01624.google.privacy" + + ".dlp.v2.InfoTypeCategory.TypeCategoryH\000\"" + + "\303\004\n\020LocationCategory\022\030\n\024LOCATION_UNSPECI" + + "FIED\020\000\022\n\n\006GLOBAL\020\001\022\r\n\tARGENTINA\020\002\022\r\n\tAUS" + + "TRALIA\020\003\022\013\n\007BELGIUM\020\004\022\n\n\006BRAZIL\020\005\022\n\n\006CAN" + + "ADA\020\006\022\t\n\005CHILE\020\007\022\t\n\005CHINA\020\010\022\014\n\010COLOMBIA\020" + + "\t\022\013\n\007DENMARK\020\n\022\n\n\006FRANCE\020\013\022\013\n\007FINLAND\020\014\022" + + "\013\n\007GERMANY\020\r\022\r\n\tHONG_KONG\020\016\022\t\n\005INDIA\020\017\022\r" + + "\n\tINDONESIA\020\020\022\013\n\007IRELAND\020\021\022\n\n\006ISRAEL\020\022\022\t" + + "\n\005ITALY\020\023\022\t\n\005JAPAN\020\024\022\t\n\005KOREA\020\025\022\n\n\006MEXIC" + + "O\020\026\022\023\n\017THE_NETHERLANDS\020\027\022\n\n\006NORWAY\020\030\022\014\n\010" + + "PARAGUAY\020\031\022\010\n\004PERU\020\032\022\n\n\006POLAND\020\033\022\014\n\010PORT" + + "UGAL\020\034\022\r\n\tSINGAPORE\020\035\022\020\n\014SOUTH_AFRICA\020\036\022" + + "\t\n\005SPAIN\020\037\022\n\n\006SWEDEN\020 \022\n\n\006TAIWAN\020!\022\014\n\010TH" + + "AILAND\020\"\022\n\n\006TURKEY\020#\022\022\n\016UNITED_KINGDOM\020$" + + "\022\021\n\rUNITED_STATES\020%\022\013\n\007URUGUAY\020&\022\r\n\tVENE" + + "ZUELA\020\'\022\014\n\010INTERNAL\020(\"]\n\020IndustryCategor" + + "y\022\030\n\024INDUSTRY_UNSPECIFIED\020\000\022\013\n\007FINANCE\020\001" + + "\022\n\n\006HEALTH\020\002\022\026\n\022TELECOMMUNICATIONS\020\003\"\225\001\n" + + "\014TypeCategory\022\024\n\020TYPE_UNSPECIFIED\020\000\022\007\n\003P" + + "II\020\001\022\010\n\004SPII\020\002\022\017\n\013DEMOGRAPHIC\020\003\022\016\n\nCREDE" + + "NTIAL\020\004\022\021\n\rGOVERNMENT_ID\020\005\022\014\n\010DOCUMENT\020\006" + + "\022\032\n\026CONTEXTUAL_INFORMATION\020\007B\n\n\010category" + + "\":\n\022VersionDescription\022\017\n\007version\030\001 \001(\t\022" + + "\023\n\013description\030\002 \001(\t\"b\n\024ListInfoTypesReq" + + "uest\022\016\n\006parent\030\004 \001(\t\022\025\n\rlanguage_code\030\001 " + + "\001(\t\022\016\n\006filter\030\002 \001(\t\022\023\n\013location_id\030\003 \001(\t" + + "\"W\n\025ListInfoTypesResponse\022>\n\ninfo_types\030" + + "\001 \003(\0132*.google.privacy.dlp.v2.InfoTypeDe" + + "scription\"\301\001\n\025RiskAnalysisJobConfig\022<\n\016p" + + "rivacy_metric\030\001 \001(\0132$.google.privacy.dlp" + + ".v2.PrivacyMetric\022:\n\014source_table\030\002 \001(\0132" + + "$.google.privacy.dlp.v2.BigQueryTable\022.\n" + + "\007actions\030\003 \003(\0132\035.google.privacy.dlp.v2.A" + + "ction\"\274\001\n\007QuasiId\0222\n\005field\030\001 \001(\0132\036.googl" + + "e.privacy.dlp.v2.FieldIdB\003\340A\002\0224\n\tinfo_ty" + + "pe\030\002 \001(\0132\037.google.privacy.dlp.v2.InfoTyp" + + "eH\000\022\024\n\ncustom_tag\030\003 \001(\tH\000\022*\n\010inferred\030\004 " + + "\001(\0132\026.google.protobuf.EmptyH\000B\005\n\003tag\"\276\002\n" + + "\020StatisticalTable\0228\n\005table\030\003 \001(\0132$.googl" + + "e.privacy.dlp.v2.BigQueryTableB\003\340A\002\022T\n\tq" + + "uasi_ids\030\001 \003(\0132<.google.privacy.dlp.v2.S" + + "tatisticalTable.QuasiIdentifierFieldB\003\340A" + + "\002\022?\n\022relative_frequency\030\002 \001(\0132\036.google.p" + + "rivacy.dlp.v2.FieldIdB\003\340A\002\032Y\n\024QuasiIdent" + + "ifierField\022-\n\005field\030\001 \001(\0132\036.google.priva" + + "cy.dlp.v2.FieldId\022\022\n\ncustom_tag\030\002 \001(\t\"\223\017" + + "\n\rPrivacyMetric\022[\n\026numerical_stats_confi" + + "g\030\001 \001(\01329.google.privacy.dlp.v2.PrivacyM" + + "etric.NumericalStatsConfigH\000\022_\n\030categori" + + "cal_stats_config\030\002 \001(\0132;.google.privacy." + + "dlp.v2.PrivacyMetric.CategoricalStatsCon" + + "figH\000\022S\n\022k_anonymity_config\030\003 \001(\01325.goog" + + "le.privacy.dlp.v2.PrivacyMetric.KAnonymi" + + "tyConfigH\000\022S\n\022l_diversity_config\030\004 \001(\01325" + + ".google.privacy.dlp.v2.PrivacyMetric.LDi" + + "versityConfigH\000\022\\\n\027k_map_estimation_conf" + + "ig\030\005 \001(\01329.google.privacy.dlp.v2.Privacy" + + "Metric.KMapEstimationConfigH\000\022n\n delta_p" + + "resence_estimation_config\030\006 \001(\0132B.google" + + ".privacy.dlp.v2.PrivacyMetric.DeltaPrese" + + "nceEstimationConfigH\000\032E\n\024NumericalStatsC" + + "onfig\022-\n\005field\030\001 \001(\0132\036.google.privacy.dl" + + "p.v2.FieldId\032G\n\026CategoricalStatsConfig\022-" + + "\n\005field\030\001 \001(\0132\036.google.privacy.dlp.v2.Fi" + + "eldId\032y\n\020KAnonymityConfig\0221\n\tquasi_ids\030\001" + + " \003(\0132\036.google.privacy.dlp.v2.FieldId\0222\n\t" + + "entity_id\030\002 \001(\0132\037.google.privacy.dlp.v2." + + "EntityId\032\202\001\n\020LDiversityConfig\0221\n\tquasi_i" + + "ds\030\001 \003(\0132\036.google.privacy.dlp.v2.FieldId" + + "\022;\n\023sensitive_attribute\030\002 \001(\0132\036.google.p" + + "rivacy.dlp.v2.FieldId\032\201\006\n\024KMapEstimation" + + "Config\022]\n\tquasi_ids\030\001 \003(\0132E.google.priva" + + "cy.dlp.v2.PrivacyMetric.KMapEstimationCo" + + "nfig.TaggedFieldB\003\340A\002\022\023\n\013region_code\030\002 \001" + + "(\t\022b\n\020auxiliary_tables\030\003 \003(\0132H.google.pr" + + "ivacy.dlp.v2.PrivacyMetric.KMapEstimatio" + + "nConfig.AuxiliaryTable\032\300\001\n\013TaggedField\0222" + + "\n\005field\030\001 \001(\0132\036.google.privacy.dlp.v2.Fi" + + "eldIdB\003\340A\002\0224\n\tinfo_type\030\002 \001(\0132\037.google.p" + + "rivacy.dlp.v2.InfoTypeH\000\022\024\n\ncustom_tag\030\003" + + " \001(\tH\000\022*\n\010inferred\030\004 \001(\0132\026.google.protob" + + "uf.EmptyH\000B\005\n\003tag\032\315\002\n\016AuxiliaryTable\0228\n\005" + + "table\030\003 \001(\0132$.google.privacy.dlp.v2.BigQ" + + "ueryTableB\003\340A\002\022m\n\tquasi_ids\030\001 \003(\0132U.goog" + + "le.privacy.dlp.v2.PrivacyMetric.KMapEsti" + + "mationConfig.AuxiliaryTable.QuasiIdField" + + "B\003\340A\002\022?\n\022relative_frequency\030\002 \001(\0132\036.goog" + + "le.privacy.dlp.v2.FieldIdB\003\340A\002\032Q\n\014QuasiI" + + "dField\022-\n\005field\030\001 \001(\0132\036.google.privacy.d" + + "lp.v2.FieldId\022\022\n\ncustom_tag\030\002 \001(\t\032\257\001\n\035De" + + "ltaPresenceEstimationConfig\0226\n\tquasi_ids" + + "\030\001 \003(\0132\036.google.privacy.dlp.v2.QuasiIdB\003" + + "\340A\002\022\023\n\013region_code\030\002 \001(\t\022A\n\020auxiliary_ta" + + "bles\030\003 \003(\0132\'.google.privacy.dlp.v2.Stati" + + "sticalTableB\006\n\004type\"\301\037\n\034AnalyzeDataSourc" + + "eRiskDetails\022F\n\030requested_privacy_metric" + + "\030\001 \001(\0132$.google.privacy.dlp.v2.PrivacyMe" + + "tric\022D\n\026requested_source_table\030\002 \001(\0132$.g" + + "oogle.privacy.dlp.v2.BigQueryTable\022j\n\026nu" + + "merical_stats_result\030\003 \001(\0132H.google.priv" + + "acy.dlp.v2.AnalyzeDataSourceRiskDetails." + + "NumericalStatsResultH\000\022n\n\030categorical_st" + + "ats_result\030\004 \001(\0132J.google.privacy.dlp.v2" + + ".AnalyzeDataSourceRiskDetails.Categorica" + + "lStatsResultH\000\022b\n\022k_anonymity_result\030\005 \001" + + "(\0132D.google.privacy.dlp.v2.AnalyzeDataSo" + + "urceRiskDetails.KAnonymityResultH\000\022b\n\022l_" + + "diversity_result\030\006 \001(\0132D.google.privacy." + + "dlp.v2.AnalyzeDataSourceRiskDetails.LDiv" + + "ersityResultH\000\022k\n\027k_map_estimation_resul" + + "t\030\007 \001(\0132H.google.privacy.dlp.v2.AnalyzeD" + + "ataSourceRiskDetails.KMapEstimationResul" + + "tH\000\022}\n delta_presence_estimation_result\030" + + "\t \001(\0132Q.google.privacy.dlp.v2.AnalyzeDat" + + "aSourceRiskDetails.DeltaPresenceEstimati" + + "onResultH\000\022k\n\021requested_options\030\n \001(\0132P." + + "google.privacy.dlp.v2.AnalyzeDataSourceR" + + "iskDetails.RequestedRiskAnalysisOptions\032" + + "\257\001\n\024NumericalStatsResult\022/\n\tmin_value\030\001 " + + "\001(\0132\034.google.privacy.dlp.v2.Value\022/\n\tmax" + + "_value\030\002 \001(\0132\034.google.privacy.dlp.v2.Val" + + "ue\0225\n\017quantile_values\030\004 \003(\0132\034.google.pri" + + "vacy.dlp.v2.Value\032\215\003\n\026CategoricalStatsRe" + + "sult\022\225\001\n!value_frequency_histogram_bucke" + + "ts\030\005 \003(\0132j.google.privacy.dlp.v2.Analyze" + + "DataSourceRiskDetails.CategoricalStatsRe" + + "sult.CategoricalStatsHistogramBucket\032\332\001\n" + + "\037CategoricalStatsHistogramBucket\022#\n\033valu" + + "e_frequency_lower_bound\030\001 \001(\003\022#\n\033value_f" + + "requency_upper_bound\030\002 \001(\003\022\023\n\013bucket_siz" + + "e\030\003 \001(\003\022<\n\rbucket_values\030\004 \003(\0132%.google." + + "privacy.dlp.v2.ValueFrequency\022\032\n\022bucket_" + + "value_count\030\005 \001(\003\032\265\004\n\020KAnonymityResult\022\213" + + "\001\n#equivalence_class_histogram_buckets\030\005" + + " \003(\0132^.google.privacy.dlp.v2.AnalyzeData" + + "SourceRiskDetails.KAnonymityResult.KAnon" + + "ymityHistogramBucket\032t\n\032KAnonymityEquiva" + + "lenceClass\0226\n\020quasi_ids_values\030\001 \003(\0132\034.g" + + "oogle.privacy.dlp.v2.Value\022\036\n\026equivalenc" + + "e_class_size\030\002 \001(\003\032\234\002\n\031KAnonymityHistogr" + + "amBucket\022*\n\"equivalence_class_size_lower" + + "_bound\030\001 \001(\003\022*\n\"equivalence_class_size_u" + + "pper_bound\030\002 \001(\003\022\023\n\013bucket_size\030\003 \001(\003\022v\n" + + "\rbucket_values\030\004 \003(\0132_.google.privacy.dl" + + "p.v2.AnalyzeDataSourceRiskDetails.KAnony" + + "mityResult.KAnonymityEquivalenceClass\022\032\n" + + "\022bucket_value_count\030\005 \001(\003\032\260\005\n\020LDiversity" + + "Result\022\223\001\n+sensitive_value_frequency_his" + + "togram_buckets\030\005 \003(\0132^.google.privacy.dl" + + "p.v2.AnalyzeDataSourceRiskDetails.LDiver" + + "sityResult.LDiversityHistogramBucket\032\340\001\n" + + "\032LDiversityEquivalenceClass\0226\n\020quasi_ids" + + "_values\030\001 \003(\0132\034.google.privacy.dlp.v2.Va" + + "lue\022\036\n\026equivalence_class_size\030\002 \001(\003\022%\n\035n" + + "um_distinct_sensitive_values\030\003 \001(\003\022C\n\024to" + + "p_sensitive_values\030\004 \003(\0132%.google.privac" + + "y.dlp.v2.ValueFrequency\032\242\002\n\031LDiversityHi" + + "stogramBucket\022-\n%sensitive_value_frequen" + + "cy_lower_bound\030\001 \001(\003\022-\n%sensitive_value_" + + "frequency_upper_bound\030\002 \001(\003\022\023\n\013bucket_si" + + "ze\030\003 \001(\003\022v\n\rbucket_values\030\004 \003(\0132_.google" + + ".privacy.dlp.v2.AnalyzeDataSourceRiskDet" + + "ails.LDiversityResult.LDiversityEquivale" + + "nceClass\022\032\n\022bucket_value_count\030\005 \001(\003\032\225\004\n" + + "\024KMapEstimationResult\022\212\001\n\032k_map_estimati" + + "on_histogram\030\001 \003(\0132f.google.privacy.dlp." + + "v2.AnalyzeDataSourceRiskDetails.KMapEsti" + + "mationResult.KMapEstimationHistogramBuck" + + "et\032r\n\033KMapEstimationQuasiIdValues\0226\n\020qua" + + "si_ids_values\030\001 \003(\0132\034.google.privacy.dlp" + + ".v2.Value\022\033\n\023estimated_anonymity\030\002 \001(\003\032\373" + + "\001\n\035KMapEstimationHistogramBucket\022\025\n\rmin_" + + "anonymity\030\001 \001(\003\022\025\n\rmax_anonymity\030\002 \001(\003\022\023" + + "\n\013bucket_size\030\005 \001(\003\022{\n\rbucket_values\030\006 \003" + + "(\0132d.google.privacy.dlp.v2.AnalyzeDataSo" + + "urceRiskDetails.KMapEstimationResult.KMa" + + "pEstimationQuasiIdValues\022\032\n\022bucket_value" + + "_count\030\007 \001(\003\032\344\004\n\035DeltaPresenceEstimation" + + "Result\022\245\001\n#delta_presence_estimation_his" + + "togram\030\001 \003(\0132x.google.privacy.dlp.v2.Ana" + + "lyzeDataSourceRiskDetails.DeltaPresenceE" + + "stimationResult.DeltaPresenceEstimationH" + + "istogramBucket\032}\n$DeltaPresenceEstimatio" + + "nQuasiIdValues\0226\n\020quasi_ids_values\030\001 \003(\013" + + "2\034.google.privacy.dlp.v2.Value\022\035\n\025estima" + + "ted_probability\030\002 \001(\001\032\233\002\n&DeltaPresenceE" + + "stimationHistogramBucket\022\027\n\017min_probabil" + + "ity\030\001 \001(\001\022\027\n\017max_probability\030\002 \001(\001\022\023\n\013bu" + + "cket_size\030\005 \001(\003\022\215\001\n\rbucket_values\030\006 \003(\0132" + + "v.google.privacy.dlp.v2.AnalyzeDataSourc" + + "eRiskDetails.DeltaPresenceEstimationResu" + + "lt.DeltaPresenceEstimationQuasiIdValues\022", + "\032\n\022bucket_value_count\030\007 \001(\003\032`\n\034Requested" + + "RiskAnalysisOptions\022@\n\njob_config\030\001 \001(\0132" + + ",.google.privacy.dlp.v2.RiskAnalysisJobC" + + "onfigB\010\n\006result\"L\n\016ValueFrequency\022+\n\005val" + + "ue\030\001 \001(\0132\034.google.privacy.dlp.v2.Value\022\r" + + "\n\005count\030\002 \001(\003\"\263\002\n\005Value\022\027\n\rinteger_value" + + "\030\001 \001(\003H\000\022\025\n\013float_value\030\002 \001(\001H\000\022\026\n\014strin" + + "g_value\030\003 \001(\tH\000\022\027\n\rboolean_value\030\004 \001(\010H\000" + + "\0225\n\017timestamp_value\030\005 \001(\0132\032.google.proto" + + "buf.TimestampH\000\022,\n\ntime_value\030\006 \001(\0132\026.go" + + "ogle.type.TimeOfDayH\000\022\'\n\ndate_value\030\007 \001(" + + "\0132\021.google.type.DateH\000\0223\n\021day_of_week_va" + + "lue\030\010 \001(\0162\026.google.type.DayOfWeekH\000B\006\n\004t" + + "ype\"Q\n\tQuoteInfo\0224\n\tdate_time\030\002 \001(\0132\037.go" + + "ogle.privacy.dlp.v2.DateTimeH\000B\016\n\014parsed" + + "_quote\"\337\001\n\010DateTime\022\037\n\004date\030\001 \001(\0132\021.goog" + + "le.type.Date\022+\n\013day_of_week\030\002 \001(\0162\026.goog" + + "le.type.DayOfWeek\022$\n\004time\030\003 \001(\0132\026.google" + + ".type.TimeOfDay\022;\n\ttime_zone\030\004 \001(\0132(.goo" + + "gle.privacy.dlp.v2.DateTime.TimeZone\032\"\n\010" + + "TimeZone\022\026\n\016offset_minutes\030\001 \001(\005\"\362\002\n\020Dei" + + "dentifyConfig\022S\n\031info_type_transformatio" + + "ns\030\001 \001(\0132..google.privacy.dlp.v2.InfoTyp" + + "eTransformationsH\000\022N\n\026record_transformat" + + "ions\030\002 \001(\0132,.google.privacy.dlp.v2.Recor" + + "dTransformationsH\000\022L\n\025image_transformati" + + "ons\030\004 \001(\0132+.google.privacy.dlp.v2.ImageT" + + "ransformationsH\000\022Y\n\035transformation_error" + + "_handling\030\003 \001(\01322.google.privacy.dlp.v2." + + "TransformationErrorHandlingB\020\n\016transform" + + "ation\"\345\004\n\024ImageTransformations\022S\n\ntransf" + + "orms\030\002 \003(\0132?.google.privacy.dlp.v2.Image" + + "Transformations.ImageTransformation\032\367\003\n\023" + + "ImageTransformation\022p\n\023selected_info_typ" + + "es\030\004 \001(\0132Q.google.privacy.dlp.v2.ImageTr" + + "ansformations.ImageTransformation.Select" + + "edInfoTypesH\000\022f\n\016all_info_types\030\005 \001(\0132L." + + "google.privacy.dlp.v2.ImageTransformatio" + + "ns.ImageTransformation.AllInfoTypesH\000\022[\n" + + "\010all_text\030\006 \001(\0132G.google.privacy.dlp.v2." + + "ImageTransformations.ImageTransformation" + + ".AllTextH\000\0225\n\017redaction_color\030\003 \001(\0132\034.go" + + "ogle.privacy.dlp.v2.Color\032M\n\021SelectedInf" + + "oTypes\0228\n\ninfo_types\030\005 \003(\0132\037.google.priv" + + "acy.dlp.v2.InfoTypeB\003\340A\002\032\016\n\014AllInfoTypes" + + "\032\t\n\007AllTextB\010\n\006target\"\205\002\n\033Transformation" + + "ErrorHandling\022T\n\013throw_error\030\001 \001(\0132=.goo" + + "gle.privacy.dlp.v2.TransformationErrorHa" + + "ndling.ThrowErrorH\000\022d\n\023leave_untransform" + + "ed\030\002 \001(\0132E.google.privacy.dlp.v2.Transfo" + + "rmationErrorHandling.LeaveUntransformedH" + + "\000\032\014\n\nThrowError\032\024\n\022LeaveUntransformedB\006\n" + + "\004mode\"\312\007\n\027PrimitiveTransformation\022C\n\016rep" + + "lace_config\030\001 \001(\0132).google.privacy.dlp.v" + + "2.ReplaceValueConfigH\000\022<\n\rredact_config\030" + + "\002 \001(\0132#.google.privacy.dlp.v2.RedactConf" + + "igH\000\022K\n\025character_mask_config\030\003 \001(\0132*.go" + + "ogle.privacy.dlp.v2.CharacterMaskConfigH" + + "\000\022Y\n\035crypto_replace_ffx_fpe_config\030\004 \001(\013" + + "20.google.privacy.dlp.v2.CryptoReplaceFf" + + "xFpeConfigH\000\022V\n\033fixed_size_bucketing_con" + + "fig\030\005 \001(\0132/.google.privacy.dlp.v2.FixedS" + + "izeBucketingConfigH\000\022B\n\020bucketing_config" + + "\030\006 \001(\0132&.google.privacy.dlp.v2.Bucketing" + + "ConfigH\000\022Y\n\035replace_with_info_type_confi" + + "g\030\007 \001(\01320.google.privacy.dlp.v2.ReplaceW" + + "ithInfoTypeConfigH\000\022A\n\020time_part_config\030" + + "\010 \001(\0132%.google.privacy.dlp.v2.TimePartCo" + + "nfigH\000\022E\n\022crypto_hash_config\030\t \001(\0132\'.goo" + + "gle.privacy.dlp.v2.CryptoHashConfigH\000\022C\n" + + "\021date_shift_config\030\013 \001(\0132&.google.privac" + + "y.dlp.v2.DateShiftConfigH\000\022W\n\033crypto_det" + + "erministic_config\030\014 \001(\01320.google.privacy" + + ".dlp.v2.CryptoDeterministicConfigH\000\022S\n\031r" + + "eplace_dictionary_config\030\r \001(\0132..google." + + "privacy.dlp.v2.ReplaceDictionaryConfigH\000" + + "B\020\n\016transformation\"\334\001\n\016TimePartConfig\022G\n" + + "\017part_to_extract\030\001 \001(\0162..google.privacy." + + "dlp.v2.TimePartConfig.TimePart\"\200\001\n\010TimeP" + + "art\022\031\n\025TIME_PART_UNSPECIFIED\020\000\022\010\n\004YEAR\020\001" + + "\022\t\n\005MONTH\020\002\022\020\n\014DAY_OF_MONTH\020\003\022\017\n\013DAY_OF_" + + "WEEK\020\004\022\020\n\014WEEK_OF_YEAR\020\005\022\017\n\013HOUR_OF_DAY\020" + + "\006\"H\n\020CryptoHashConfig\0224\n\ncrypto_key\030\001 \001(" + + "\0132 .google.privacy.dlp.v2.CryptoKey\"\300\001\n\031" + + "CryptoDeterministicConfig\0224\n\ncrypto_key\030" + + "\001 \001(\0132 .google.privacy.dlp.v2.CryptoKey\022" + + "<\n\023surrogate_info_type\030\002 \001(\0132\037.google.pr" + + "ivacy.dlp.v2.InfoType\022/\n\007context\030\003 \001(\0132\036" + + ".google.privacy.dlp.v2.FieldId\"E\n\022Replac" + + "eValueConfig\022/\n\tnew_value\030\001 \001(\0132\034.google" + + ".privacy.dlp.v2.Value\"q\n\027ReplaceDictiona" + + "ryConfig\022N\n\tword_list\030\001 \001(\01329.google.pri" + + "vacy.dlp.v2.CustomInfoType.Dictionary.Wo" + + "rdListH\000B\006\n\004type\"\033\n\031ReplaceWithInfoTypeC" + + "onfig\"\016\n\014RedactConfig\"\266\002\n\rCharsToIgnore\022" + + "\034\n\022characters_to_skip\030\001 \001(\tH\000\022_\n\033common_" + + "characters_to_ignore\030\002 \001(\01628.google.priv" + + "acy.dlp.v2.CharsToIgnore.CommonCharsToIg" + + "noreH\000\"\227\001\n\023CommonCharsToIgnore\022&\n\"COMMON" + + "_CHARS_TO_IGNORE_UNSPECIFIED\020\000\022\013\n\007NUMERI" + + "C\020\001\022\024\n\020ALPHA_UPPER_CASE\020\002\022\024\n\020ALPHA_LOWER" + + "_CASE\020\003\022\017\n\013PUNCTUATION\020\004\022\016\n\nWHITESPACE\020\005" + + "B\014\n\ncharacters\"\243\001\n\023CharacterMaskConfig\022\031" + + "\n\021masking_character\030\001 \001(\t\022\026\n\016number_to_m" + + "ask\030\002 \001(\005\022\025\n\rreverse_order\030\003 \001(\010\022B\n\024char" + + "acters_to_ignore\030\004 \003(\0132$.google.privacy." + + "dlp.v2.CharsToIgnore\"\244\001\n\030FixedSizeBucket" + + "ingConfig\0226\n\013lower_bound\030\001 \001(\0132\034.google." + + "privacy.dlp.v2.ValueB\003\340A\002\0226\n\013upper_bound" + + "\030\002 \001(\0132\034.google.privacy.dlp.v2.ValueB\003\340A" + + "\002\022\030\n\013bucket_size\030\003 \001(\001B\003\340A\002\"\360\001\n\017Bucketin" + + "gConfig\022>\n\007buckets\030\001 \003(\0132-.google.privac" + + "y.dlp.v2.BucketingConfig.Bucket\032\234\001\n\006Buck" + + "et\022)\n\003min\030\001 \001(\0132\034.google.privacy.dlp.v2." + + "Value\022)\n\003max\030\002 \001(\0132\034.google.privacy.dlp." + + "v2.Value\022<\n\021replacement_value\030\003 \001(\0132\034.go" + + "ogle.privacy.dlp.v2.ValueB\003\340A\002\"\371\003\n\031Crypt" + + "oReplaceFfxFpeConfig\0229\n\ncrypto_key\030\001 \001(\013" + + "2 .google.privacy.dlp.v2.CryptoKeyB\003\340A\002\022" + + "/\n\007context\030\002 \001(\0132\036.google.privacy.dlp.v2" + + ".FieldId\022c\n\017common_alphabet\030\004 \001(\0162H.goog" + + "le.privacy.dlp.v2.CryptoReplaceFfxFpeCon" + + "fig.FfxCommonNativeAlphabetH\000\022\031\n\017custom_" + + "alphabet\030\005 \001(\tH\000\022\017\n\005radix\030\006 \001(\005H\000\022<\n\023sur" + + "rogate_info_type\030\010 \001(\0132\037.google.privacy." + + "dlp.v2.InfoType\"\224\001\n\027FfxCommonNativeAlpha" + + "bet\022*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPEC" + + "IFIED\020\000\022\013\n\007NUMERIC\020\001\022\017\n\013HEXADECIMAL\020\002\022\034\n" + + "\030UPPER_CASE_ALPHA_NUMERIC\020\003\022\021\n\rALPHA_NUM" + + "ERIC\020\004B\n\n\010alphabet\"\330\001\n\tCryptoKey\022>\n\ttran" + + "sient\030\001 \001(\0132).google.privacy.dlp.v2.Tran" + + "sientCryptoKeyH\000\022>\n\tunwrapped\030\002 \001(\0132).go" + + "ogle.privacy.dlp.v2.UnwrappedCryptoKeyH\000" + + "\022A\n\013kms_wrapped\030\003 \001(\0132*.google.privacy.d" + + "lp.v2.KmsWrappedCryptoKeyH\000B\010\n\006source\"\'\n" + + "\022TransientCryptoKey\022\021\n\004name\030\001 \001(\tB\003\340A\002\"&" + + "\n\022UnwrappedCryptoKey\022\020\n\003key\030\001 \001(\014B\003\340A\002\"M" + + "\n\023KmsWrappedCryptoKey\022\030\n\013wrapped_key\030\001 \001" + + "(\014B\003\340A\002\022\034\n\017crypto_key_name\030\002 \001(\tB\003\340A\002\"\302\001" + + "\n\017DateShiftConfig\022\035\n\020upper_bound_days\030\001 " + + "\001(\005B\003\340A\002\022\035\n\020lower_bound_days\030\002 \001(\005B\003\340A\002\022" + + "/\n\007context\030\003 \001(\0132\036.google.privacy.dlp.v2" + + ".FieldId\0226\n\ncrypto_key\030\004 \001(\0132 .google.pr" + + "ivacy.dlp.v2.CryptoKeyH\000B\010\n\006method\"\245\002\n\027I" + + "nfoTypeTransformations\022c\n\017transformation" + + "s\030\001 \003(\0132E.google.privacy.dlp.v2.InfoType" + + "Transformations.InfoTypeTransformationB\003" + + "\340A\002\032\244\001\n\026InfoTypeTransformation\0223\n\ninfo_t" + + "ypes\030\001 \003(\0132\037.google.privacy.dlp.v2.InfoT" + + "ype\022U\n\030primitive_transformation\030\002 \001(\0132.." + + "google.privacy.dlp.v2.PrimitiveTransform" + + "ationB\003\340A\002\"\300\002\n\023FieldTransformation\0223\n\006fi" + + "elds\030\001 \003(\0132\036.google.privacy.dlp.v2.Field" + + "IdB\003\340A\002\0229\n\tcondition\030\003 \001(\0132&.google.priv" + + "acy.dlp.v2.RecordCondition\022R\n\030primitive_" + + "transformation\030\004 \001(\0132..google.privacy.dl" + + "p.v2.PrimitiveTransformationH\000\022S\n\031info_t" + + "ype_transformations\030\005 \001(\0132..google.priva" + + "cy.dlp.v2.InfoTypeTransformationsH\000B\020\n\016t" + + "ransformation\"\251\001\n\025RecordTransformations\022" + + "I\n\025field_transformations\030\001 \003(\0132*.google." + + "privacy.dlp.v2.FieldTransformation\022E\n\023re" + + "cord_suppressions\030\002 \003(\0132(.google.privacy" + + ".dlp.v2.RecordSuppression\"N\n\021RecordSuppr" + + "ession\0229\n\tcondition\030\001 \001(\0132&.google.priva" + + "cy.dlp.v2.RecordCondition\"\334\004\n\017RecordCond" + + "ition\022G\n\013expressions\030\003 \001(\01322.google.priv" + + "acy.dlp.v2.RecordCondition.Expressions\032\256" + + "\001\n\tCondition\0222\n\005field\030\001 \001(\0132\036.google.pri" + + "vacy.dlp.v2.FieldIdB\003\340A\002\022@\n\010operator\030\003 \001" + + "(\0162).google.privacy.dlp.v2.RelationalOpe" + + "ratorB\003\340A\002\022+\n\005value\030\004 \001(\0132\034.google.priva" + + "cy.dlp.v2.Value\032R\n\nConditions\022D\n\nconditi" + + "ons\030\001 \003(\01320.google.privacy.dlp.v2.Record" + + "Condition.Condition\032\372\001\n\013Expressions\022\\\n\020l" + + "ogical_operator\030\001 \001(\0162B.google.privacy.d" + + "lp.v2.RecordCondition.Expressions.Logica" + + "lOperator\022G\n\nconditions\030\003 \001(\01321.google.p" + + "rivacy.dlp.v2.RecordCondition.Conditions" + + "H\000\"<\n\017LogicalOperator\022 \n\034LOGICAL_OPERATO" + + "R_UNSPECIFIED\020\000\022\007\n\003AND\020\001B\006\n\004type\"\203\001\n\026Tra" + + "nsformationOverview\022\031\n\021transformed_bytes" + + "\030\002 \001(\003\022N\n\030transformation_summaries\030\003 \003(\013" + + "2,.google.privacy.dlp.v2.TransformationS" + + "ummary\"\237\005\n\025TransformationSummary\0222\n\tinfo" + + "_type\030\001 \001(\0132\037.google.privacy.dlp.v2.Info" + + "Type\022-\n\005field\030\002 \001(\0132\036.google.privacy.dlp" + + ".v2.FieldId\022F\n\016transformation\030\003 \001(\0132..go" + + "ogle.privacy.dlp.v2.PrimitiveTransformat" + + "ion\022I\n\025field_transformations\030\005 \003(\0132*.goo" + + "gle.privacy.dlp.v2.FieldTransformation\022A" + + "\n\017record_suppress\030\006 \001(\0132(.google.privacy" + + ".dlp.v2.RecordSuppression\022K\n\007results\030\004 \003" + + "(\0132:.google.privacy.dlp.v2.Transformatio" + + "nSummary.SummaryResult\022\031\n\021transformed_by" + + "tes\030\007 \001(\003\032\204\001\n\rSummaryResult\022\r\n\005count\030\001 \001" + + "(\003\022S\n\004code\030\002 \001(\0162E.google.privacy.dlp.v2" + + ".TransformationSummary.TransformationRes" + + "ultCode\022\017\n\007details\030\003 \001(\t\"^\n\030Transformati" + + "onResultCode\022*\n&TRANSFORMATION_RESULT_CO" + + "DE_UNSPECIFIED\020\000\022\013\n\007SUCCESS\020\001\022\t\n\005ERROR\020\002" + + "\"\260\001\n\031TransformationDescription\0227\n\004type\030\001" + + " \001(\0162).google.privacy.dlp.v2.Transformat" + + "ionType\022\023\n\013description\030\002 \001(\t\022\021\n\tconditio" + + "n\030\003 \001(\t\0222\n\tinfo_type\030\004 \001(\0132\037.google.priv" + + "acy.dlp.v2.InfoType\"\306\002\n\025TransformationDe" + + "tails\022\025\n\rresource_name\030\001 \001(\t\022\026\n\016containe" + + "r_name\030\002 \001(\t\022H\n\016transformation\030\003 \003(\01320.g" + + "oogle.privacy.dlp.v2.TransformationDescr" + + "iption\022I\n\016status_details\030\004 \001(\01321.google." + + "privacy.dlp.v2.TransformationResultStatu" + + "s\022\031\n\021transformed_bytes\030\005 \001(\003\022N\n\027transfor" + + "mation_location\030\006 \001(\0132-.google.privacy.d" + + "lp.v2.TransformationLocation\"\331\001\n\026Transfo" + + "rmationLocation\022\024\n\nfinding_id\030\001 \001(\tH\000\022L\n" + + "\025record_transformation\030\002 \001(\0132+.google.pr" + + "ivacy.dlp.v2.RecordTransformationH\000\022J\n\016c" + + "ontainer_type\030\003 \001(\01622.google.privacy.dlp" + + ".v2.TransformationContainerTypeB\017\n\rlocat" + + "ion_type\"\234\001\n\024RecordTransformation\0220\n\010fie" + + "ld_id\030\001 \001(\0132\036.google.privacy.dlp.v2.Fiel" + + "dId\0227\n\023container_timestamp\030\002 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022\031\n\021container_versio" + + "n\030\003 \001(\t\"\224\001\n\032TransformationResultStatus\022Q" + + "\n\022result_status_type\030\001 \001(\01625.google.priv" + + "acy.dlp.v2.TransformationResultStatusTyp" + + "e\022#\n\007details\030\002 \001(\0132\022.google.rpc.Status\"c" + + "\n\"TransformationDetailsStorageConfig\0225\n\005" + + "table\030\001 \001(\0132$.google.privacy.dlp.v2.BigQ" + + "ueryTableH\000B\006\n\004type\"U\n\010Schedule\022?\n\032recur" + + "rence_period_duration\030\001 \001(\0132\031.google.pro" + + "tobuf.DurationH\000B\010\n\006option\"\010\n\006Manual\"\302\004\n" + + "\017InspectTemplate\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014d" + + "isplay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\0224" + + "\n\013create_time\030\004 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\0224\n\013update_time\030\005 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\022<\n\016inspect_co" + + "nfig\030\006 \001(\0132$.google.privacy.dlp.v2.Inspe" + + "ctConfig:\306\002\352A\302\002\n\"dlp.googleapis.com/Insp" + + "ectTemplate\022@organizations/{organization" + + "}/inspectTemplates/{inspect_template}\0226p" + + "rojects/{project}/inspectTemplates/{insp" + + "ect_template}\022Uorganizations/{organizati" + + "on}/locations/{location}/inspectTemplate" + + "s/{inspect_template}\022Kprojects/{project}" + + "/locations/{location}/inspectTemplates/{" + + "inspect_template}\"\346\004\n\022DeidentifyTemplate" + + "\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014display_name\030\002 \001(" + + "\t\022\023\n\013description\030\003 \001(\t\0224\n\013create_time\030\004 " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013" + + "update_time\030\005 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\022B\n\021deidentify_config\030\006 \001(\0132\'." + + "google.privacy.dlp.v2.DeidentifyConfig:\341" + + "\002\352A\335\002\n%dlp.googleapis.com/DeidentifyTemp" + + "late\022Forganizations/{organization}/deide" + + "ntifyTemplates/{deidentify_template}\022\n\013inspect_job\030\004 \001(\0132\'.google.privacy.d" + + "lp.v2.InspectJobConfigH\000\022;\n\010triggers\030\005 \003" + + "(\0132).google.privacy.dlp.v2.JobTrigger.Tr" + + "igger\0221\n\006errors\030\006 \003(\0132\034.google.privacy.d" + + "lp.v2.ErrorB\003\340A\003\0224\n\013create_time\030\007 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\0224\n\013update" + + "_time\030\010 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\0226\n\rlast_run_time\030\t \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022=\n\006status\030\n \001(\0162(.g" + + "oogle.privacy.dlp.v2.JobTrigger.StatusB\003" + + "\340A\002\032z\n\007Trigger\0223\n\010schedule\030\001 \001(\0132\037.googl" + + "e.privacy.dlp.v2.ScheduleH\000\022/\n\006manual\030\002 " + + "\001(\0132\035.google.privacy.dlp.v2.ManualH\000B\t\n\007" + + "trigger\"H\n\006Status\022\026\n\022STATUS_UNSPECIFIED\020" + + "\000\022\013\n\007HEALTHY\020\001\022\n\n\006PAUSED\020\002\022\r\n\tCANCELLED\020" + + "\003:\224\001\352A\220\001\n\035dlp.googleapis.com/JobTrigger\022" + + ",projects/{project}/jobTriggers/{job_tri" + + "gger}\022Aprojects/{project}/locations/{loc" + + "ation}/jobTriggers/{job_trigger}B\005\n\003job\"" + + "\352\010\n\006Action\022C\n\rsave_findings\030\001 \001(\0132*.goog" + + "le.privacy.dlp.v2.Action.SaveFindingsH\000\022" + + "@\n\007pub_sub\030\002 \001(\0132-.google.privacy.dlp.v2" + + ".Action.PublishToPubSubH\000\022U\n\027publish_sum" + + "mary_to_cscc\030\003 \001(\01322.google.privacy.dlp." + + "v2.Action.PublishSummaryToCsccH\000\022q\n&publ" + + "ish_findings_to_cloud_data_catalog\030\005 \001(\013" + + "2?.google.privacy.dlp.v2.Action.PublishF" + + "indingsToCloudDataCatalogH\000\022>\n\ndeidentif" + + "y\030\007 \001(\0132(.google.privacy.dlp.v2.Action.D" + + "eidentifyH\000\022V\n\027job_notification_emails\030\010" + + " \001(\01323.google.privacy.dlp.v2.Action.JobN" + + "otificationEmailsH\000\022T\n\026publish_to_stackd" + + "river\030\t \001(\01322.google.privacy.dlp.v2.Acti" + + "on.PublishToStackdriverH\000\032Q\n\014SaveFinding" + + "s\022A\n\routput_config\030\001 \001(\0132*.google.privac" + + "y.dlp.v2.OutputStorageConfig\032 \n\017PublishT" + + "oPubSub\022\r\n\005topic\030\001 \001(\t\032\026\n\024PublishSummary" + + "ToCscc\032#\n!PublishFindingsToCloudDataCata" + + "log\032\263\002\n\nDeidentify\022J\n\025transformation_con" + + "fig\030\007 \001(\0132+.google.privacy.dlp.v2.Transf" + + "ormationConfig\022h\n%transformation_details" + + "_storage_config\030\003 \001(\01329.google.privacy.d" + + "lp.v2.TransformationDetailsStorageConfig" + + "\022#\n\024cloud_storage_output\030\t \001(\tB\003\340A\002H\000\022@\n" + + "\027file_types_to_transform\030\010 \003(\0162\037.google." + + "privacy.dlp.v2.FileTypeB\010\n\006output\032\027\n\025Job" + + "NotificationEmails\032\026\n\024PublishToStackdriv" + + "erB\010\n\006action\"z\n\024TransformationConfig\022\033\n\023" + + "deidentify_template\030\001 \001(\t\022&\n\036structured_" + + "deidentify_template\030\002 \001(\t\022\035\n\025image_redac" + + "t_template\030\004 \001(\t\"\313\001\n\034CreateInspectTempla" + + "teRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dlp.g" + + "oogleapis.com/InspectTemplate\022E\n\020inspect" + + "_template\030\002 \001(\0132&.google.privacy.dlp.v2." + + "InspectTemplateB\003\340A\002\022\023\n\013template_id\030\003 \001(" + + "\t\022\023\n\013location_id\030\004 \001(\t\"\313\001\n\034UpdateInspect" + + "TemplateRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"d" + + "lp.googleapis.com/InspectTemplate\022@\n\020ins" + + "pect_template\030\002 \001(\0132&.google.privacy.dlp" + + ".v2.InspectTemplate\022/\n\013update_mask\030\003 \001(\013" + + "2\032.google.protobuf.FieldMask\"U\n\031GetInspe" + + "ctTemplateRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"dlp.googleapis.com/InspectTemplate\"\247\001\n\033" + + "ListInspectTemplatesRequest\022:\n\006parent\030\001 " + + "\001(\tB*\340A\002\372A$\022\"dlp.googleapis.com/InspectT" + + "emplate\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size" + + "\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013location_id\030" + + "\005 \001(\t\"z\n\034ListInspectTemplatesResponse\022A\n" + + "\021inspect_templates\030\001 \003(\0132&.google.privac" + + "y.dlp.v2.InspectTemplate\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\"X\n\034DeleteInspectTemplateReques" + + "t\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dlp.googleapis." + + "com/InspectTemplate\"\266\001\n\027CreateJobTrigger" + + "Request\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\022\035dlp.goo" + + "gleapis.com/JobTrigger\022;\n\013job_trigger\030\002 " + + "\001(\0132!.google.privacy.dlp.v2.JobTriggerB\003" + + "\340A\002\022\022\n\ntrigger_id\030\003 \001(\t\022\023\n\013location_id\030\004" + + " \001(\t\"P\n\031ActivateJobTriggerRequest\0223\n\004nam" + + "e\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleapis.com/JobT" + + "rigger\"\267\001\n\027UpdateJobTriggerRequest\0223\n\004na" + + "me\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleapis.com/Job" + + "Trigger\0226\n\013job_trigger\030\002 \001(\0132!.google.pr" + + "ivacy.dlp.v2.JobTrigger\022/\n\013update_mask\030\003" + + " \001(\0132\032.google.protobuf.FieldMask\"K\n\024GetJ" + + "obTriggerRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035" + + "dlp.googleapis.com/JobTrigger\"\366\001\n\023Create" + + "DlpJobRequest\0221\n\006parent\030\001 \001(\tB!\340A\002\372A\033\022\031d" + + "lp.googleapis.com/DlpJob\022>\n\013inspect_job\030" + + "\002 \001(\0132\'.google.privacy.dlp.v2.InspectJob" + + "ConfigH\000\022@\n\010risk_job\030\003 \001(\0132,.google.priv" + + "acy.dlp.v2.RiskAnalysisJobConfigH\000\022\016\n\006jo" + + "b_id\030\004 \001(\t\022\023\n\013location_id\030\005 \001(\tB\005\n\003job\"\336" + + "\001\n\026ListJobTriggersRequest\0225\n\006parent\030\001 \001(" + + "\tB%\340A\002\372A\037\022\035dlp.googleapis.com/JobTrigger" + + "\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022" + + "\020\n\010order_by\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t\022/\n\004typ" + + "e\030\006 \001(\0162!.google.privacy.dlp.v2.DlpJobTy" + + "pe\022\023\n\013location_id\030\007 \001(\t\"k\n\027ListJobTrigge" + + "rsResponse\0227\n\014job_triggers\030\001 \003(\0132!.googl" + + "e.privacy.dlp.v2.JobTrigger\022\027\n\017next_page" + + "_token\030\002 \001(\t\"N\n\027DeleteJobTriggerRequest\022" + + "3\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleapis.co" + + "m/JobTrigger\"\335\001\n\020InspectJobConfig\022<\n\016sto" + + "rage_config\030\001 \001(\0132$.google.privacy.dlp.v" + + "2.StorageConfig\022<\n\016inspect_config\030\002 \001(\0132" + + "$.google.privacy.dlp.v2.InspectConfig\022\035\n" + + "\025inspect_template_name\030\003 \001(\t\022.\n\007actions\030" + + "\004 \003(\0132\035.google.privacy.dlp.v2.Action\"\355\005\n" + + "\021DataProfileAction\022F\n\013export_data\030\001 \001(\0132" + + "/.google.privacy.dlp.v2.DataProfileActio" + + "n.ExportH\000\022[\n\024pub_sub_notification\030\002 \001(\013" + + "2;.google.privacy.dlp.v2.DataProfileActi" + + "on.PubSubNotificationH\000\032E\n\006Export\022;\n\rpro" + + "file_table\030\001 \001(\0132$.google.privacy.dlp.v2" + + ".BigQueryTable\032\352\002\n\022PubSubNotification\022\r\n" + + "\005topic\030\001 \001(\t\022A\n\005event\030\002 \001(\01622.google.pri" + + "vacy.dlp.v2.DataProfileAction.EventType\022" + + "K\n\020pubsub_condition\030\003 \001(\01321.google.priva" + + "cy.dlp.v2.DataProfilePubSubCondition\022b\n\021" + + "detail_of_message\030\004 \001(\0162G.google.privacy" + + ".dlp.v2.DataProfileAction.PubSubNotifica" + + "tion.DetailLevel\"Q\n\013DetailLevel\022\034\n\030DETAI" + + "L_LEVEL_UNSPECIFIED\020\000\022\021\n\rTABLE_PROFILE\020\001" + + "\022\021\n\rRESOURCE_NAME\020\002\"u\n\tEventType\022\032\n\026EVEN" + + "T_TYPE_UNSPECIFIED\020\000\022\017\n\013NEW_PROFILE\020\001\022\023\n" + + "\017CHANGED_PROFILE\020\002\022\023\n\017SCORE_INCREASED\020\003\022" + + "\021\n\rERROR_CHANGED\020\004B\010\n\006action\"\313\001\n\024DataPro" + + "fileJobConfig\022<\n\010location\030\001 \001(\0132*.google" + + ".privacy.dlp.v2.DataProfileLocation\022\022\n\np" + + "roject_id\030\005 \001(\t\022\031\n\021inspect_templates\030\007 \003" + + "(\t\022F\n\024data_profile_actions\030\006 \003(\0132(.googl" + + "e.privacy.dlp.v2.DataProfileAction\"Q\n\023Da" + + "taProfileLocation\022\031\n\017organization_id\030\001 \001" + + "(\003H\000\022\023\n\tfolder_id\030\002 \001(\003H\000B\n\n\010location\"\353\005", + "\n\006DlpJob\022\014\n\004name\030\001 \001(\t\022/\n\004type\030\002 \001(\0162!.g" + + "oogle.privacy.dlp.v2.DlpJobType\0225\n\005state" + + "\030\003 \001(\0162&.google.privacy.dlp.v2.DlpJob.Jo" + + "bState\022K\n\014risk_details\030\004 \001(\01323.google.pr" + + "ivacy.dlp.v2.AnalyzeDataSourceRiskDetail" + + "sH\000\022J\n\017inspect_details\030\005 \001(\0132/.google.pr" + + "ivacy.dlp.v2.InspectDataSourceDetailsH\000\022" + + "/\n\013create_time\030\006 \001(\0132\032.google.protobuf.T" + + "imestamp\022.\n\nstart_time\030\007 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022,\n\010end_time\030\010 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022\030\n\020job_trigger_na" + + "me\030\n \001(\t\022,\n\006errors\030\013 \003(\0132\034.google.privac" + + "y.dlp.v2.Error\"o\n\010JobState\022\031\n\025JOB_STATE_" + + "UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022" + + "\010\n\004DONE\020\003\022\014\n\010CANCELED\020\004\022\n\n\006FAILED\020\005\022\n\n\006A" + + "CTIVE\020\006:\177\352A|\n\031dlp.googleapis.com/DlpJob\022" + + "$projects/{project}/dlpJobs/{dlp_job}\0229p" + + "rojects/{project}/locations/{location}/d" + + "lpJobs/{dlp_job}B\t\n\007details\"C\n\020GetDlpJob" + + "Request\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.googl" + + "eapis.com/DlpJob\"\326\001\n\022ListDlpJobsRequest\022" + + "1\n\006parent\030\004 \001(\tB!\340A\002\372A\033\022\031dlp.googleapis." + + "com/DlpJob\022\016\n\006filter\030\001 \001(\t\022\021\n\tpage_size\030" + + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022/\n\004type\030\005 \001(\0162" + + "!.google.privacy.dlp.v2.DlpJobType\022\020\n\010or" + + "der_by\030\006 \001(\t\022\023\n\013location_id\030\007 \001(\t\"[\n\023Lis" + + "tDlpJobsResponse\022+\n\004jobs\030\001 \003(\0132\035.google." + + "privacy.dlp.v2.DlpJob\022\027\n\017next_page_token" + + "\030\002 \001(\t\"F\n\023CancelDlpJobRequest\022/\n\004name\030\001 " + + "\001(\tB!\340A\002\372A\033\n\031dlp.googleapis.com/DlpJob\"F" + + "\n\023FinishDlpJobRequest\022/\n\004name\030\001 \001(\tB!\340A\002" + + "\372A\033\n\031dlp.googleapis.com/DlpJob\"F\n\023Delete" + + "DlpJobRequest\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp" + + ".googleapis.com/DlpJob\"\327\001\n\037CreateDeident" + + "ifyTemplateRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372" + + "A\'\022%dlp.googleapis.com/DeidentifyTemplat" + + "e\022K\n\023deidentify_template\030\002 \001(\0132).google." + + "privacy.dlp.v2.DeidentifyTemplateB\003\340A\002\022\023" + + "\n\013template_id\030\003 \001(\t\022\023\n\013location_id\030\004 \001(\t" + + "\"\327\001\n\037UpdateDeidentifyTemplateRequest\022;\n\004" + + "name\030\001 \001(\tB-\340A\002\372A\'\n%dlp.googleapis.com/D" + + "eidentifyTemplate\022F\n\023deidentify_template" + + "\030\002 \001(\0132).google.privacy.dlp.v2.Deidentif" + + "yTemplate\022/\n\013update_mask\030\003 \001(\0132\032.google." + + "protobuf.FieldMask\"[\n\034GetDeidentifyTempl" + + "ateRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dlp.go" + + "ogleapis.com/DeidentifyTemplate\"\255\001\n\036List" + + "DeidentifyTemplatesRequest\022=\n\006parent\030\001 \001" + + "(\tB-\340A\002\372A\'\022%dlp.googleapis.com/Deidentif" + + "yTemplate\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_si" + + "ze\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013location_i" + + "d\030\005 \001(\t\"\203\001\n\037ListDeidentifyTemplatesRespo" + + "nse\022G\n\024deidentify_templates\030\001 \003(\0132).goog" + + "le.privacy.dlp.v2.DeidentifyTemplate\022\027\n\017" + + "next_page_token\030\002 \001(\t\"^\n\037DeleteDeidentif" + + "yTemplateRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%" + + "dlp.googleapis.com/DeidentifyTemplate\"\364\001" + + "\n\033LargeCustomDictionaryConfig\022<\n\013output_" + + "path\030\001 \001(\0132\'.google.privacy.dlp.v2.Cloud" + + "StoragePath\022L\n\026cloud_storage_file_set\030\002 " + + "\001(\0132*.google.privacy.dlp.v2.CloudStorage" + + "FileSetH\000\022?\n\017big_query_field\030\003 \001(\0132$.goo" + + "gle.privacy.dlp.v2.BigQueryFieldH\000B\010\n\006so" + + "urce\"8\n\032LargeCustomDictionaryStats\022\032\n\022ap" + + "prox_num_phrases\030\001 \001(\003\"\246\002\n\024StoredInfoTyp" + + "eConfig\022\024\n\014display_name\030\001 \001(\t\022\023\n\013descrip" + + "tion\030\002 \001(\t\022U\n\027large_custom_dictionary\030\003 " + + "\001(\01322.google.privacy.dlp.v2.LargeCustomD" + + "ictionaryConfigH\000\022F\n\ndictionary\030\004 \001(\01320." + + "google.privacy.dlp.v2.CustomInfoType.Dic" + + "tionaryH\000\022<\n\005regex\030\005 \001(\0132+.google.privac" + + "y.dlp.v2.CustomInfoType.RegexH\000B\006\n\004type\"" + + "s\n\023StoredInfoTypeStats\022T\n\027large_custom_d" + + "ictionary\030\001 \001(\01321.google.privacy.dlp.v2." + + "LargeCustomDictionaryStatsH\000B\006\n\004type\"\251\002\n" + + "\025StoredInfoTypeVersion\022;\n\006config\030\001 \001(\0132+" + + ".google.privacy.dlp.v2.StoredInfoTypeCon" + + "fig\022/\n\013create_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\0229\n\005state\030\003 \001(\0162*.google.pri" + + "vacy.dlp.v2.StoredInfoTypeState\022,\n\006error" + + "s\030\004 \003(\0132\034.google.privacy.dlp.v2.Error\0229\n" + + "\005stats\030\005 \001(\0132*.google.privacy.dlp.v2.Sto" + + "redInfoTypeStats\"\361\003\n\016StoredInfoType\022\014\n\004n" + + "ame\030\001 \001(\t\022E\n\017current_version\030\002 \001(\0132,.goo" + + "gle.privacy.dlp.v2.StoredInfoTypeVersion" + + "\022F\n\020pending_versions\030\003 \003(\0132,.google.priv" + + "acy.dlp.v2.StoredInfoTypeVersion:\301\002\352A\275\002\n" + + "!dlp.googleapis.com/StoredInfoType\022?orga" + + "nizations/{organization}/storedInfoTypes" + + "/{stored_info_type}\0225projects/{project}/" + + "storedInfoTypes/{stored_info_type}\022Torga" + + "nizations/{organization}/locations/{loca" + + "tion}/storedInfoTypes/{stored_info_type}" + + "\022Jprojects/{project}/locations/{location" + + "}/storedInfoTypes/{stored_info_type}\"\314\001\n" + + "\033CreateStoredInfoTypeRequest\0229\n\006parent\030\001" + + " \001(\tB)\340A\002\372A#\022!dlp.googleapis.com/StoredI" + + "nfoType\022@\n\006config\030\002 \001(\0132+.google.privacy" + + ".dlp.v2.StoredInfoTypeConfigB\003\340A\002\022\033\n\023sto" + + "red_info_type_id\030\003 \001(\t\022\023\n\013location_id\030\004 " + + "\001(\t\"\304\001\n\033UpdateStoredInfoTypeRequest\0227\n\004n" + + "ame\030\001 \001(\tB)\340A\002\372A#\n!dlp.googleapis.com/St" + + "oredInfoType\022;\n\006config\030\002 \001(\0132+.google.pr" + + "ivacy.dlp.v2.StoredInfoTypeConfig\022/\n\013upd" + + "ate_mask\030\003 \001(\0132\032.google.protobuf.FieldMa" + + "sk\"S\n\030GetStoredInfoTypeRequest\0227\n\004name\030\001" + + " \001(\tB)\340A\002\372A#\n!dlp.googleapis.com/StoredI" + + "nfoType\"\245\001\n\032ListStoredInfoTypesRequest\0229" + + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!dlp.googleapis.c" + + "om/StoredInfoType\022\022\n\npage_token\030\002 \001(\t\022\021\n" + + "\tpage_size\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013lo" + + "cation_id\030\005 \001(\t\"x\n\033ListStoredInfoTypesRe" + + "sponse\022@\n\021stored_info_types\030\001 \003(\0132%.goog" + + "le.privacy.dlp.v2.StoredInfoType\022\027\n\017next" + + "_page_token\030\002 \001(\t\"V\n\033DeleteStoredInfoTyp" + + "eRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!dlp.goog" + + "leapis.com/StoredInfoType\"\224\001\n\036HybridInsp" + + "ectJobTriggerRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372" + + "A\037\n\035dlp.googleapis.com/JobTrigger\022=\n\013hyb" + + "rid_item\030\003 \001(\0132(.google.privacy.dlp.v2.H" + + "ybridContentItem\"\214\001\n\032HybridInspectDlpJob" + + "Request\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.googl" + + "eapis.com/DlpJob\022=\n\013hybrid_item\030\003 \001(\0132(." + + "google.privacy.dlp.v2.HybridContentItem\"" + + "\213\001\n\021HybridContentItem\0220\n\004item\030\001 \001(\0132\".go" + + "ogle.privacy.dlp.v2.ContentItem\022D\n\017findi" + + "ng_details\030\002 \001(\0132+.google.privacy.dlp.v2" + + ".HybridFindingDetails\"\260\002\n\024HybridFindingD" + + "etails\022;\n\021container_details\030\001 \001(\0132 .goog" + + "le.privacy.dlp.v2.Container\022\023\n\013file_offs" + + "et\030\002 \001(\003\022\022\n\nrow_offset\030\003 \001(\003\022:\n\rtable_op" + + "tions\030\004 \001(\0132#.google.privacy.dlp.v2.Tabl" + + "eOptions\022G\n\006labels\030\005 \003(\01327.google.privac" + + "y.dlp.v2.HybridFindingDetails.LabelsEntr" + + "y\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"\027\n\025HybridInspectResponse\"\271\001\n\rDa" + + "taRiskLevel\022F\n\005score\030\001 \001(\01627.google.priv" + + "acy.dlp.v2.DataRiskLevel.DataRiskLevelSc" + + "ore\"`\n\022DataRiskLevelScore\022\032\n\026RISK_SCORE_" + + "UNSPECIFIED\020\000\022\014\n\010RISK_LOW\020\n\022\021\n\rRISK_MODE" + + "RATE\020\024\022\r\n\tRISK_HIGH\020\036\"\240\001\n\031DataProfileCon" + + "figSnapshot\022<\n\016inspect_config\030\002 \001(\0132$.go" + + "ogle.privacy.dlp.v2.InspectConfig\022E\n\020dat" + + "a_profile_job\030\003 \001(\0132+.google.privacy.dlp" + + ".v2.DataProfileJobConfig\"\232\n\n\020TableDataPr" + + "ofile\022\014\n\004name\030\001 \001(\t\022\034\n\024project_data_prof" + + "ile\030\002 \001(\t\022\032\n\022dataset_project_id\030\030 \001(\t\022\030\n" + + "\020dataset_location\030\035 \001(\t\022\022\n\ndataset_id\030\031 " + + "\001(\t\022\020\n\010table_id\030\032 \001(\t\022\025\n\rfull_resource\030\003" + + " \001(\t\022<\n\016profile_status\030\025 \001(\0132$.google.pr" + + "ivacy.dlp.v2.ProfileStatus\022<\n\005state\030\026 \001(" + + "\0162-.google.privacy.dlp.v2.TableDataProfi" + + "le.State\022B\n\021sensitivity_score\030\005 \001(\0132\'.go" + + "ogle.privacy.dlp.v2.SensitivityScore\022=\n\017" + + "data_risk_level\030\006 \001(\0132$.google.privacy.d" + + "lp.v2.DataRiskLevel\022D\n\024predicted_info_ty" + + "pes\030\033 \003(\0132&.google.privacy.dlp.v2.InfoTy" + + "peSummary\022E\n\020other_info_types\030\034 \003(\0132+.go" + + "ogle.privacy.dlp.v2.OtherInfoTypeSummary" + + "\022I\n\017config_snapshot\030\007 \001(\01320.google.priva" + + "cy.dlp.v2.DataProfileConfigSnapshot\0226\n\022l" + + "ast_modified_time\030\010 \001(\0132\032.google.protobu" + + "f.Timestamp\0223\n\017expiration_time\030\t \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022\034\n\024scanned_colu" + + "mn_count\030\n \001(\003\022\033\n\023failed_column_count\030\013 " + + "\001(\003\022\030\n\020table_size_bytes\030\014 \001(\003\022\021\n\trow_cou" + + "nt\030\r \001(\003\022B\n\021encryption_status\030\016 \001(\0162\'.go" + + "ogle.privacy.dlp.v2.EncryptionStatus\022F\n\023" + + "resource_visibility\030\017 \001(\0162).google.priva" + + "cy.dlp.v2.ResourceVisibility\022:\n\026profile_" + + "last_generated\030\020 \001(\0132\032.google.protobuf.T" + + "imestamp\022T\n\017resource_labels\030\021 \003(\0132;.goog" + + "le.privacy.dlp.v2.TableDataProfile.Resou" + + "rceLabelsEntry\022/\n\013create_time\030\027 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\0325\n\023ResourceLabel" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"5" + + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNIN" + + "G\020\001\022\010\n\004DONE\020\002\"b\n\rProfileStatus\022\"\n\006status" + + "\030\001 \001(\0132\022.google.rpc.Status\022-\n\ttimestamp\030" + + "\003 \001(\0132\032.google.protobuf.Timestamp\"c\n\017Inf" + + "oTypeSummary\0222\n\tinfo_type\030\001 \001(\0132\037.google" + + ".privacy.dlp.v2.InfoType\022\034\n\024estimated_pr" + + "evalence\030\002 \001(\005\"h\n\024OtherInfoTypeSummary\0222" + + "\n\tinfo_type\030\001 \001(\0132\037.google.privacy.dlp.v" + + "2.InfoType\022\034\n\024estimated_prevalence\030\002 \001(\005" + + "\"\352\005\n\032DataProfilePubSubCondition\022X\n\013expre" + + "ssions\030\001 \001(\0132C.google.privacy.dlp.v2.Dat" + + "aProfilePubSubCondition.PubSubExpression" + + "s\032\351\001\n\017PubSubCondition\022b\n\022minimum_risk_sc" + + "ore\030\001 \001(\0162D.google.privacy.dlp.v2.DataPr" + + "ofilePubSubCondition.ProfileScoreBucketH" + + "\000\022i\n\031minimum_sensitivity_score\030\002 \001(\0162D.g" + + "oogle.privacy.dlp.v2.DataProfilePubSubCo" + + "ndition.ProfileScoreBucketH\000B\007\n\005value\032\253\002" + + "\n\021PubSubExpressions\022s\n\020logical_operator\030" + + "\001 \001(\0162Y.google.privacy.dlp.v2.DataProfil" + + "ePubSubCondition.PubSubExpressions.PubSu" + + "bLogicalOperator\022U\n\nconditions\030\002 \003(\0132A.g" + + "oogle.privacy.dlp.v2.DataProfilePubSubCo" + + "ndition.PubSubCondition\"J\n\025PubSubLogical" + + "Operator\022 \n\034LOGICAL_OPERATOR_UNSPECIFIED" + + "\020\000\022\006\n\002OR\020\001\022\007\n\003AND\020\002\"X\n\022ProfileScoreBucke" + + "t\022$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\020\000\022" + + "\010\n\004HIGH\020\001\022\022\n\016MEDIUM_OR_HIGH\020\002\"\227\001\n\030DataPr" + + "ofilePubSubMessage\0228\n\007profile\030\001 \001(\0132\'.go" + + "ogle.privacy.dlp.v2.TableDataProfile\022A\n\005" + + "event\030\002 \001(\01622.google.privacy.dlp.v2.Data" + + "ProfileAction.EventType*\240\001\n\036Transformati" + + "onResultStatusType\022\032\n\026STATE_TYPE_UNSPECI" + + "FIED\020\000\022\025\n\021INVALID_TRANSFORM\020\001\022\"\n\036BIGQUER" + + "Y_MAX_ROW_SIZE_EXCEEDED\020\002\022\032\n\026METADATA_UN" + + "RETRIEVABLE\020\003\022\013\n\007SUCCESS\020\004*\177\n\033Transforma" + + "tionContainerType\022\037\n\033TRANSFORM_UNKNOWN_C" + + "ONTAINER\020\000\022\022\n\016TRANSFORM_BODY\020\001\022\026\n\022TRANSF" + + "ORM_METADATA\020\002\022\023\n\017TRANSFORM_TABLE\020\003*\340\002\n\022" + + "TransformationType\022#\n\037TRANSFORMATION_TYP" + + "E_UNSPECIFIED\020\000\022\026\n\022RECORD_SUPPRESSION\020\001\022" + + "\021\n\rREPLACE_VALUE\020\002\022\026\n\022REPLACE_DICTIONARY" + + "\020\017\022\n\n\006REDACT\020\003\022\022\n\016CHARACTER_MASK\020\004\022\032\n\026CR" + + "YPTO_REPLACE_FFX_FPE\020\005\022\030\n\024FIXED_SIZE_BUC" + + "KETING\020\006\022\r\n\tBUCKETING\020\007\022\032\n\026REPLACE_WITH_" + + "INFO_TYPE\020\010\022\r\n\tTIME_PART\020\t\022\017\n\013CRYPTO_HAS" + + "H\020\n\022\016\n\nDATE_SHIFT\020\014\022\037\n\033CRYPTO_DETERMINIS" + + "TIC_CONFIG\020\r\022\020\n\014REDACT_IMAGE\020\016*\273\001\n\022Relat" + + "ionalOperator\022#\n\037RELATIONAL_OPERATOR_UNS" + + "PECIFIED\020\000\022\014\n\010EQUAL_TO\020\001\022\020\n\014NOT_EQUAL_TO" + + "\020\002\022\020\n\014GREATER_THAN\020\003\022\r\n\tLESS_THAN\020\004\022\032\n\026G" + + "REATER_THAN_OR_EQUALS\020\005\022\027\n\023LESS_THAN_OR_" + + "EQUALS\020\006\022\n\n\006EXISTS\020\007*\215\001\n\014MatchingType\022\035\n" + + "\031MATCHING_TYPE_UNSPECIFIED\020\000\022\034\n\030MATCHING" + + "_TYPE_FULL_MATCH\020\001\022\037\n\033MATCHING_TYPE_PART" + + "IAL_MATCH\020\002\022\037\n\033MATCHING_TYPE_INVERSE_MAT" + + "CH\020\003*M\n\rContentOption\022\027\n\023CONTENT_UNSPECI" + + "FIED\020\000\022\020\n\014CONTENT_TEXT\020\001\022\021\n\rCONTENT_IMAG" + + "E\020\002*B\n\014MetadataType\022\034\n\030METADATATYPE_UNSP" + + "ECIFIED\020\000\022\024\n\020STORAGE_METADATA\020\002*P\n\023InfoT" + + "ypeSupportedBy\022\031\n\025ENUM_TYPE_UNSPECIFIED\020" + + "\000\022\013\n\007INSPECT\020\001\022\021\n\rRISK_ANALYSIS\020\002*R\n\nDlp" + + "JobType\022\034\n\030DLP_JOB_TYPE_UNSPECIFIED\020\000\022\017\n" + + "\013INSPECT_JOB\020\001\022\025\n\021RISK_ANALYSIS_JOB\020\002*n\n" + + "\023StoredInfoTypeState\022&\n\"STORED_INFO_TYPE" + + "_STATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\t\n\005REA" + + "DY\020\002\022\n\n\006FAILED\020\003\022\013\n\007INVALID\020\004*}\n\022Resourc" + + "eVisibility\022#\n\037RESOURCE_VISIBILITY_UNSPE" + + "CIFIED\020\000\022\036\n\032RESOURCE_VISIBILITY_PUBLIC\020\n" + + "\022\"\n\036RESOURCE_VISIBILITY_RESTRICTED\020\024*u\n\020" + + "EncryptionStatus\022!\n\035ENCRYPTION_STATUS_UN" + + "SPECIFIED\020\000\022\035\n\031ENCRYPTION_GOOGLE_MANAGED" + + "\020\001\022\037\n\033ENCRYPTION_CUSTOMER_MANAGED\020\0022\240L\n\n" + + "DlpService\022\333\001\n\016InspectContent\022,.google.p" + + "rivacy.dlp.v2.InspectContentRequest\032-.go" + + "ogle.privacy.dlp.v2.InspectContentRespon" + + "se\"l\202\323\344\223\002f\"\'/v2/{parent=projects/*}/cont" + + "ent:inspect:\001*Z8\"3/v2/{parent=projects/*" + + "/locations/*}/content:inspect:\001*\022\314\001\n\013Red" + + "actImage\022).google.privacy.dlp.v2.RedactI" + + "mageRequest\032*.google.privacy.dlp.v2.Reda" + + "ctImageResponse\"f\202\323\344\223\002`\"$/v2/{parent=pro" + + "jects/*}/image:redact:\001*Z5\"0/v2/{parent=" + + "projects/*/locations/*}/image:redact:\001*\022" + + "\352\001\n\021DeidentifyContent\022/.google.privacy.d" + + "lp.v2.DeidentifyContentRequest\0320.google." + + "privacy.dlp.v2.DeidentifyContentResponse" + + "\"r\202\323\344\223\002l\"*/v2/{parent=projects/*}/conten" + + "t:deidentify:\001*Z;\"6/v2/{parent=projects/" + + "*/locations/*}/content:deidentify:\001*\022\352\001\n" + + "\021ReidentifyContent\022/.google.privacy.dlp." + + "v2.ReidentifyContentRequest\0320.google.pri" + + "vacy.dlp.v2.ReidentifyContentResponse\"r\202" + + "\323\344\223\002l\"*/v2/{parent=projects/*}/content:r" + + "eidentify:\001*Z;\"6/v2/{parent=projects/*/l" + + "ocations/*}/content:reidentify:\001*\022\260\001\n\rLi" + + "stInfoTypes\022+.google.privacy.dlp.v2.List" + + "InfoTypesRequest\032,.google.privacy.dlp.v2" + + ".ListInfoTypesResponse\"D\202\323\344\223\0025\022\r/v2/info" + + "TypesZ$\022\"/v2/{parent=locations/*}/infoTy" + + "pes\332A\006parent\022\364\002\n\025CreateInspectTemplate\0223" + + ".google.privacy.dlp.v2.CreateInspectTemp" + + "lateRequest\032&.google.privacy.dlp.v2.Insp" + + "ectTemplate\"\375\001\202\323\344\223\002\334\001\"-/v2/{parent=organ" + + "izations/*}/inspectTemplates:\001*Z>\"9/v2/{" + + "parent=organizations/*/locations/*}/insp" + + "ectTemplates:\001*Z-\"(/v2/{parent=projects/" + + "*}/inspectTemplates:\001*Z9\"4/v2/{parent=pr" + + "ojects/*/locations/*}/inspectTemplates:\001" + + "*\332A\027parent,inspect_template\022\376\002\n\025UpdateIn" + + "spectTemplate\0223.google.privacy.dlp.v2.Up" + + "dateInspectTemplateRequest\032&.google.priv" + + "acy.dlp.v2.InspectTemplate\"\207\002\202\323\344\223\002\334\0012-/v" + + "2/{name=organizations/*/inspectTemplates" + + "/*}:\001*Z>29/v2/{name=organizations/*/loca" + + "tions/*/inspectTemplates/*}:\001*Z-2(/v2/{n" + + "ame=projects/*/inspectTemplates/*}:\001*Z92" + + "4/v2/{name=projects/*/locations/*/inspec" + + "tTemplates/*}:\001*\332A!name,inspect_template" + + ",update_mask\022\317\002\n\022GetInspectTemplate\0220.go" + + "ogle.privacy.dlp.v2.GetInspectTemplateRe" + + "quest\032&.google.privacy.dlp.v2.InspectTem" + + "plate\"\336\001\202\323\344\223\002\320\001\022-/v2/{name=organizations" + + "/*/inspectTemplates/*}Z;\0229/v2/{name=orga" + + "nizations/*/locations/*/inspectTemplates" + + "/*}Z*\022(/v2/{name=projects/*/inspectTempl" + + "ates/*}Z6\0224/v2/{name=projects/*/location" + + "s/*/inspectTemplates/*}\332A\004name\022\342\002\n\024ListI" + + "nspectTemplates\0222.google.privacy.dlp.v2." + + "ListInspectTemplatesRequest\0323.google.pri" + + "vacy.dlp.v2.ListInspectTemplatesResponse" + + "\"\340\001\202\323\344\223\002\320\001\022-/v2/{parent=organizations/*}" + + "/inspectTemplatesZ;\0229/v2/{parent=organiz" + + "ations/*/locations/*}/inspectTemplatesZ*" + + "\022(/v2/{parent=projects/*}/inspectTemplat" + + "esZ6\0224/v2/{parent=projects/*/locations/*" + + "}/inspectTemplates\332A\006parent\022\305\002\n\025DeleteIn" + + "spectTemplate\0223.google.privacy.dlp.v2.De" + + "leteInspectTemplateRequest\032\026.google.prot" + + "obuf.Empty\"\336\001\202\323\344\223\002\320\001*-/v2/{name=organiza" + + "tions/*/inspectTemplates/*}Z;*9/v2/{name" + + "=organizations/*/locations/*/inspectTemp" + + "lates/*}Z**(/v2/{name=projects/*/inspect" + + "Templates/*}Z6*4/v2/{name=projects/*/loc" + + "ations/*/inspectTemplates/*}\332A\004name\022\214\003\n\030" + + "CreateDeidentifyTemplate\0226.google.privac" + + "y.dlp.v2.CreateDeidentifyTemplateRequest" + + "\032).google.privacy.dlp.v2.DeidentifyTempl" + + "ate\"\214\002\202\323\344\223\002\350\001\"0/v2/{parent=organizations" + + "/*}/deidentifyTemplates:\001*ZA\"\022\022*\"9/v2/{name" + + "=projects/*/locations/*/dlpJobs/*}:hybri" + + "dInspect:\001*\332A\004name\022\221\001\n\014FinishDlpJob\022*.go" + + "ogle.privacy.dlp.v2.FinishDlpJobRequest\032" + + "\026.google.protobuf.Empty\"=\202\323\344\223\0027\"2/v2/{na" + + "me=projects/*/locations/*/dlpJobs/*}:fin" + + "ish:\001*\032F\312A\022dlp.googleapis.com\322A.https://" + + "www.googleapis.com/auth/cloud-platformB\372" + + "\002\n\031com.google.privacy.dlp.v2B\010DlpProtoP\001" + + "Z8google.golang.org/genproto/googleapis/" + + "privacy/dlp/v2;dlp\252\002\023Google.Cloud.Dlp.V2" + + "\312\002\023Google\\Cloud\\Dlp\\V2\352\002\026Google::Cloud::" + + "Dlp::V2\352Ar\n\035dlp.googleapis.com/DlpConten" + + "t\022\035projects/{project}/dlpContent\0222projec" + + "ts/{project}/locations/{location}/dlpCon" + + "tent\352A\\\n\'dlp.googleapis.com/Organization" + + "Location\0221organizations/{organization}/l" + + "ocations/{location}b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.privacy.dlp.v2.DlpStorage.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + com.google.type.DayOfWeekProto.getDescriptor(), + com.google.type.TimeOfDayProto.getDescriptor(), + }); + internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor, + new java.lang.String[] { "InfoTypes", }); + internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_privacy_dlp_v2_ExclusionRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor, + new java.lang.String[] { "Dictionary", "Regex", "ExcludeInfoTypes", "MatchingType", "Type", }); + internal_static_google_privacy_dlp_v2_InspectionRule_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_privacy_dlp_v2_InspectionRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectionRule_descriptor, + new java.lang.String[] { "HotwordRule", "ExclusionRule", "Type", }); + internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_privacy_dlp_v2_InspectionRuleSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor, + new java.lang.String[] { "InfoTypes", "Rules", }); + internal_static_google_privacy_dlp_v2_InspectConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectConfig_descriptor, + new java.lang.String[] { "InfoTypes", "MinLikelihood", "Limits", "IncludeQuote", "ExcludeInfoTypes", "CustomInfoTypes", "ContentOptions", "RuleSet", }); + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor = + internal_static_google_privacy_dlp_v2_InspectConfig_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor, + new java.lang.String[] { "MaxFindingsPerItem", "MaxFindingsPerRequest", "MaxFindingsPerInfoType", }); + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor = + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor, + new java.lang.String[] { "InfoType", "MaxFindings", }); + internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_privacy_dlp_v2_ByteContentItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor, + new java.lang.String[] { "Type", "Data", }); + internal_static_google_privacy_dlp_v2_ContentItem_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_privacy_dlp_v2_ContentItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ContentItem_descriptor, + new java.lang.String[] { "Value", "Table", "ByteItem", "DataItem", }); + internal_static_google_privacy_dlp_v2_Table_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_privacy_dlp_v2_Table_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Table_descriptor, + new java.lang.String[] { "Headers", "Rows", }); + internal_static_google_privacy_dlp_v2_Table_Row_descriptor = + internal_static_google_privacy_dlp_v2_Table_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_Table_Row_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Table_Row_descriptor, + new java.lang.String[] { "Values", }); + internal_static_google_privacy_dlp_v2_InspectResult_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_privacy_dlp_v2_InspectResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectResult_descriptor, + new java.lang.String[] { "Findings", "FindingsTruncated", }); + internal_static_google_privacy_dlp_v2_Finding_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_privacy_dlp_v2_Finding_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Finding_descriptor, + new java.lang.String[] { "Name", "Quote", "InfoType", "Likelihood", "Location", "CreateTime", "QuoteInfo", "ResourceName", "TriggerName", "Labels", "JobCreateTime", "JobName", "FindingId", }); + internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_descriptor = + internal_static_google_privacy_dlp_v2_Finding_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_privacy_dlp_v2_Location_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_privacy_dlp_v2_Location_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Location_descriptor, + new java.lang.String[] { "ByteRange", "CodepointRange", "ContentLocations", "Container", }); + internal_static_google_privacy_dlp_v2_ContentLocation_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ContentLocation_descriptor, + new java.lang.String[] { "ContainerName", "RecordLocation", "ImageLocation", "DocumentLocation", "MetadataLocation", "ContainerTimestamp", "ContainerVersion", "Location", }); + internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_privacy_dlp_v2_MetadataLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor, + new java.lang.String[] { "Type", "StorageLabel", "Label", }); + internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_privacy_dlp_v2_StorageMetadataLabel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor, + new java.lang.String[] { "Key", }); + internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_privacy_dlp_v2_DocumentLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor, + new java.lang.String[] { "FileOffset", }); + internal_static_google_privacy_dlp_v2_RecordLocation_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_privacy_dlp_v2_RecordLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordLocation_descriptor, + new java.lang.String[] { "RecordKey", "FieldId", "TableLocation", }); + internal_static_google_privacy_dlp_v2_TableLocation_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_privacy_dlp_v2_TableLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TableLocation_descriptor, + new java.lang.String[] { "RowIndex", }); + internal_static_google_privacy_dlp_v2_Container_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_privacy_dlp_v2_Container_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Container_descriptor, + new java.lang.String[] { "Type", "ProjectId", "FullPath", "RootPath", "RelativePath", "UpdateTime", "Version", }); + internal_static_google_privacy_dlp_v2_Range_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_privacy_dlp_v2_Range_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Range_descriptor, + new java.lang.String[] { "Start", "End", }); + internal_static_google_privacy_dlp_v2_ImageLocation_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageLocation_descriptor, + new java.lang.String[] { "BoundingBoxes", }); + internal_static_google_privacy_dlp_v2_BoundingBox_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_privacy_dlp_v2_BoundingBox_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_BoundingBox_descriptor, + new java.lang.String[] { "Top", "Left", "Width", "Height", }); + internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor, + new java.lang.String[] { "Parent", "LocationId", "InspectConfig", "ImageRedactionConfigs", "IncludeFindings", "ByteItem", }); + internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor = + internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor, + new java.lang.String[] { "InfoType", "RedactAllText", "RedactionColor", "Target", }); + internal_static_google_privacy_dlp_v2_Color_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_privacy_dlp_v2_Color_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Color_descriptor, + new java.lang.String[] { "Red", "Green", "Blue", }); + internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_privacy_dlp_v2_RedactImageResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor, + new java.lang.String[] { "RedactedImage", "ExtractedText", "InspectResult", }); + internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor, + new java.lang.String[] { "Parent", "DeidentifyConfig", "InspectConfig", "Item", "InspectTemplateName", "DeidentifyTemplateName", "LocationId", }); + internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor, + new java.lang.String[] { "Item", "Overview", }); + internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor, + new java.lang.String[] { "Parent", "ReidentifyConfig", "InspectConfig", "Item", "InspectTemplateName", "ReidentifyTemplateName", "LocationId", }); + internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor, + new java.lang.String[] { "Item", "Overview", }); + internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_privacy_dlp_v2_InspectContentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor, + new java.lang.String[] { "Parent", "InspectConfig", "Item", "InspectTemplateName", "LocationId", }); + internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_privacy_dlp_v2_InspectContentResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor, + new java.lang.String[] { "Result", }); + internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_privacy_dlp_v2_OutputStorageConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor, + new java.lang.String[] { "Table", "OutputSchema", "Type", }); + internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_privacy_dlp_v2_InfoTypeStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor, + new java.lang.String[] { "InfoType", "Count", }); + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor, + new java.lang.String[] { "RequestedOptions", "Result", }); + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor = + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor, + new java.lang.String[] { "SnapshotInspectTemplate", "JobConfig", }); + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor = + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor, + new java.lang.String[] { "ProcessedBytes", "TotalEstimatedBytes", "InfoTypeStats", "HybridStats", }); + internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_privacy_dlp_v2_HybridInspectStatistics_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor, + new java.lang.String[] { "ProcessedCount", "AbortedCount", "PendingCount", }); + internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_privacy_dlp_v2_InfoTypeDescription_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor, + new java.lang.String[] { "Name", "DisplayName", "SupportedBy", "Description", "Versions", "Categories", }); + internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_privacy_dlp_v2_InfoTypeCategory_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor, + new java.lang.String[] { "LocationCategory", "IndustryCategory", "TypeCategory", "Category", }); + internal_static_google_privacy_dlp_v2_VersionDescription_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_VersionDescription_descriptor, + new java.lang.String[] { "Version", "Description", }); + internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor, + new java.lang.String[] { "Parent", "LanguageCode", "Filter", "LocationId", }); + internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor, + new java.lang.String[] { "InfoTypes", }); + internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor, + new java.lang.String[] { "PrivacyMetric", "SourceTable", "Actions", }); + internal_static_google_privacy_dlp_v2_QuasiId_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_QuasiId_descriptor, + new java.lang.String[] { "Field", "InfoType", "CustomTag", "Inferred", "Tag", }); + internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor, + new java.lang.String[] { "Table", "QuasiIds", "RelativeFrequency", }); + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor = + internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor, + new java.lang.String[] { "Field", "CustomTag", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor, + new java.lang.String[] { "NumericalStatsConfig", "CategoricalStatsConfig", "KAnonymityConfig", "LDiversityConfig", "KMapEstimationConfig", "DeltaPresenceEstimationConfig", "Type", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor, + new java.lang.String[] { "Field", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor, + new java.lang.String[] { "Field", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(2); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor, + new java.lang.String[] { "QuasiIds", "EntityId", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(3); + internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor, + new java.lang.String[] { "QuasiIds", "SensitiveAttribute", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(4); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor, + new java.lang.String[] { "QuasiIds", "RegionCode", "AuxiliaryTables", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor, + new java.lang.String[] { "Field", "InfoType", "CustomTag", "Inferred", "Tag", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor, + new java.lang.String[] { "Table", "QuasiIds", "RelativeFrequency", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor, + new java.lang.String[] { "Field", "CustomTag", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(5); + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor, + new java.lang.String[] { "QuasiIds", "RegionCode", "AuxiliaryTables", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor, + new java.lang.String[] { "RequestedPrivacyMetric", "RequestedSourceTable", "NumericalStatsResult", "CategoricalStatsResult", "KAnonymityResult", "LDiversityResult", "KMapEstimationResult", "DeltaPresenceEstimationResult", "RequestedOptions", "Result", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor, + new java.lang.String[] { "MinValue", "MaxValue", "QuantileValues", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor, + new java.lang.String[] { "ValueFrequencyHistogramBuckets", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor, + new java.lang.String[] { "ValueFrequencyLowerBound", "ValueFrequencyUpperBound", "BucketSize", "BucketValues", "BucketValueCount", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(2); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor, + new java.lang.String[] { "EquivalenceClassHistogramBuckets", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor, + new java.lang.String[] { "QuasiIdsValues", "EquivalenceClassSize", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor, + new java.lang.String[] { "EquivalenceClassSizeLowerBound", "EquivalenceClassSizeUpperBound", "BucketSize", "BucketValues", "BucketValueCount", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(3); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor, + new java.lang.String[] { "SensitiveValueFrequencyHistogramBuckets", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor, + new java.lang.String[] { "QuasiIdsValues", "EquivalenceClassSize", "NumDistinctSensitiveValues", "TopSensitiveValues", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor, + new java.lang.String[] { "SensitiveValueFrequencyLowerBound", "SensitiveValueFrequencyUpperBound", "BucketSize", "BucketValues", "BucketValueCount", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(4); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor, + new java.lang.String[] { "KMapEstimationHistogram", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor, + new java.lang.String[] { "QuasiIdsValues", "EstimatedAnonymity", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor, + new java.lang.String[] { "MinAnonymity", "MaxAnonymity", "BucketSize", "BucketValues", "BucketValueCount", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(5); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor, + new java.lang.String[] { "DeltaPresenceEstimationHistogram", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor, + new java.lang.String[] { "QuasiIdsValues", "EstimatedProbability", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor, + new java.lang.String[] { "MinProbability", "MaxProbability", "BucketSize", "BucketValues", "BucketValueCount", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(6); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor, + new java.lang.String[] { "JobConfig", }); + internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor, + new java.lang.String[] { "Value", "Count", }); + internal_static_google_privacy_dlp_v2_Value_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Value_descriptor, + new java.lang.String[] { "IntegerValue", "FloatValue", "StringValue", "BooleanValue", "TimestampValue", "TimeValue", "DateValue", "DayOfWeekValue", "Type", }); + internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor, + new java.lang.String[] { "DateTime", "ParsedQuote", }); + internal_static_google_privacy_dlp_v2_DateTime_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DateTime_descriptor, + new java.lang.String[] { "Date", "DayOfWeek", "Time", "TimeZone", }); + internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor = + internal_static_google_privacy_dlp_v2_DateTime_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_DateTime_TimeZone_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor, + new java.lang.String[] { "OffsetMinutes", }); + internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor, + new java.lang.String[] { "InfoTypeTransformations", "RecordTransformations", "ImageTransformations", "TransformationErrorHandling", "Transformation", }); + internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor, + new java.lang.String[] { "Transforms", }); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor = + internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor, + new java.lang.String[] { "SelectedInfoTypes", "AllInfoTypes", "AllText", "RedactionColor", "Target", }); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor = + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor, + new java.lang.String[] { "InfoTypes", }); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor = + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor = + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor.getNestedTypes().get(2); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor = + getDescriptor().getMessageTypes().get(50); + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor, + new java.lang.String[] { "ThrowError", "LeaveUntransformed", "Mode", }); + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor = + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor = + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor, + new java.lang.String[] { "ReplaceConfig", "RedactConfig", "CharacterMaskConfig", "CryptoReplaceFfxFpeConfig", "FixedSizeBucketingConfig", "BucketingConfig", "ReplaceWithInfoTypeConfig", "TimePartConfig", "CryptoHashConfig", "DateShiftConfig", "CryptoDeterministicConfig", "ReplaceDictionaryConfig", "Transformation", }); + internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor = + getDescriptor().getMessageTypes().get(52); + internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor, + new java.lang.String[] { "PartToExtract", }); + internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor, + new java.lang.String[] { "CryptoKey", }); + internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor = + getDescriptor().getMessageTypes().get(54); + internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor, + new java.lang.String[] { "CryptoKey", "SurrogateInfoType", "Context", }); + internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor = + getDescriptor().getMessageTypes().get(55); + internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor, + new java.lang.String[] { "NewValue", }); + internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor = + getDescriptor().getMessageTypes().get(56); + internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor, + new java.lang.String[] { "WordList", "Type", }); + internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor = + getDescriptor().getMessageTypes().get(57); + internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_RedactConfig_descriptor = + getDescriptor().getMessageTypes().get(58); + internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RedactConfig_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor = + getDescriptor().getMessageTypes().get(59); + internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor, + new java.lang.String[] { "CharactersToSkip", "CommonCharactersToIgnore", "Characters", }); + internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor = + getDescriptor().getMessageTypes().get(60); + internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor, + new java.lang.String[] { "MaskingCharacter", "NumberToMask", "ReverseOrder", "CharactersToIgnore", }); + internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor = + getDescriptor().getMessageTypes().get(61); + internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor, + new java.lang.String[] { "LowerBound", "UpperBound", "BucketSize", }); + internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor = + getDescriptor().getMessageTypes().get(62); + internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor, + new java.lang.String[] { "Buckets", }); + internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor = + internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor, + new java.lang.String[] { "Min", "Max", "ReplacementValue", }); + internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor = + getDescriptor().getMessageTypes().get(63); + internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor, + new java.lang.String[] { "CryptoKey", "Context", "CommonAlphabet", "CustomAlphabet", "Radix", "SurrogateInfoType", "Alphabet", }); + internal_static_google_privacy_dlp_v2_CryptoKey_descriptor = + getDescriptor().getMessageTypes().get(64); + internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CryptoKey_descriptor, + new java.lang.String[] { "Transient", "Unwrapped", "KmsWrapped", "Source", }); + internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor = + getDescriptor().getMessageTypes().get(65); + internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor = + getDescriptor().getMessageTypes().get(66); + internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor, + new java.lang.String[] { "Key", }); + internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor = + getDescriptor().getMessageTypes().get(67); + internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor, + new java.lang.String[] { "WrappedKey", "CryptoKeyName", }); + internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor = + getDescriptor().getMessageTypes().get(68); + internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor, + new java.lang.String[] { "UpperBoundDays", "LowerBoundDays", "Context", "CryptoKey", "Method", }); + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor = + getDescriptor().getMessageTypes().get(69); + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor, + new java.lang.String[] { "Transformations", }); + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor = + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor, + new java.lang.String[] { "InfoTypes", "PrimitiveTransformation", }); + internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor = + getDescriptor().getMessageTypes().get(70); + internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor, + new java.lang.String[] { "Fields", "Condition", "PrimitiveTransformation", "InfoTypeTransformations", "Transformation", }); + internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor = + getDescriptor().getMessageTypes().get(71); + internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor, + new java.lang.String[] { "FieldTransformations", "RecordSuppressions", }); + internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor = + getDescriptor().getMessageTypes().get(72); + internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor, + new java.lang.String[] { "Condition", }); + internal_static_google_privacy_dlp_v2_RecordCondition_descriptor = + getDescriptor().getMessageTypes().get(73); + internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordCondition_descriptor, + new java.lang.String[] { "Expressions", }); + internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor = + internal_static_google_privacy_dlp_v2_RecordCondition_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_RecordCondition_Condition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor, + new java.lang.String[] { "Field", "Operator", "Value", }); + internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor = + internal_static_google_privacy_dlp_v2_RecordCondition_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor, + new java.lang.String[] { "Conditions", }); + internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor = + internal_static_google_privacy_dlp_v2_RecordCondition_descriptor.getNestedTypes().get(2); + internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor, + new java.lang.String[] { "LogicalOperator", "Conditions", "Type", }); + internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor = + getDescriptor().getMessageTypes().get(74); + internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor, + new java.lang.String[] { "TransformedBytes", "TransformationSummaries", }); + internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor = + getDescriptor().getMessageTypes().get(75); + internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor, + new java.lang.String[] { "InfoType", "Field", "Transformation", "FieldTransformations", "RecordSuppress", "Results", "TransformedBytes", }); + internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor = + internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor, + new java.lang.String[] { "Count", "Code", "Details", }); + internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor = + getDescriptor().getMessageTypes().get(76); + internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor, + new java.lang.String[] { "Type", "Description", "Condition", "InfoType", }); + internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor = + getDescriptor().getMessageTypes().get(77); + internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor, + new java.lang.String[] { "ResourceName", "ContainerName", "Transformation", "StatusDetails", "TransformedBytes", "TransformationLocation", }); + internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor = + getDescriptor().getMessageTypes().get(78); + internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor, + new java.lang.String[] { "FindingId", "RecordTransformation", "ContainerType", "LocationType", }); + internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor = + getDescriptor().getMessageTypes().get(79); + internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor, + new java.lang.String[] { "FieldId", "ContainerTimestamp", "ContainerVersion", }); + internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor = + getDescriptor().getMessageTypes().get(80); + internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor, + new java.lang.String[] { "ResultStatusType", "Details", }); + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor = + getDescriptor().getMessageTypes().get(81); + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor, + new java.lang.String[] { "Table", "Type", }); + internal_static_google_privacy_dlp_v2_Schedule_descriptor = + getDescriptor().getMessageTypes().get(82); + internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Schedule_descriptor, + new java.lang.String[] { "RecurrencePeriodDuration", "Option", }); + internal_static_google_privacy_dlp_v2_Manual_descriptor = + getDescriptor().getMessageTypes().get(83); + internal_static_google_privacy_dlp_v2_Manual_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Manual_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor = + getDescriptor().getMessageTypes().get(84); + internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor, + new java.lang.String[] { "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", "InspectConfig", }); + internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor = + getDescriptor().getMessageTypes().get(85); + internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor, + new java.lang.String[] { "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", "DeidentifyConfig", }); + internal_static_google_privacy_dlp_v2_Error_descriptor = + getDescriptor().getMessageTypes().get(86); + internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Error_descriptor, + new java.lang.String[] { "Details", "Timestamps", }); + internal_static_google_privacy_dlp_v2_JobTrigger_descriptor = + getDescriptor().getMessageTypes().get(87); + internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_JobTrigger_descriptor, + new java.lang.String[] { "Name", "DisplayName", "Description", "InspectJob", "Triggers", "Errors", "CreateTime", "UpdateTime", "LastRunTime", "Status", "Job", }); + internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor = + internal_static_google_privacy_dlp_v2_JobTrigger_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor, + new java.lang.String[] { "Schedule", "Manual", "Trigger", }); + internal_static_google_privacy_dlp_v2_Action_descriptor = + getDescriptor().getMessageTypes().get(88); + internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Action_descriptor, + new java.lang.String[] { "SaveFindings", "PubSub", "PublishSummaryToCscc", "PublishFindingsToCloudDataCatalog", "Deidentify", "JobNotificationEmails", "PublishToStackdriver", "Action", }); + internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor = + internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_Action_SaveFindings_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor, + new java.lang.String[] { "OutputConfig", }); + internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor = + internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor, + new java.lang.String[] { "Topic", }); + internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor = + internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(2); + internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor = + internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(3); + internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor = + internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(4); + internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor, + new java.lang.String[] { "TransformationConfig", "TransformationDetailsStorageConfig", "CloudStorageOutput", "FileTypesToTransform", "Output", }); + internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor = + internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(5); + internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor = + internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(6); + internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor = + getDescriptor().getMessageTypes().get(89); + internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor, + new java.lang.String[] { "DeidentifyTemplate", "StructuredDeidentifyTemplate", "ImageRedactTemplate", }); + internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(90); + internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor, + new java.lang.String[] { "Parent", "InspectTemplate", "TemplateId", "LocationId", }); + internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(91); + internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor, + new java.lang.String[] { "Name", "InspectTemplate", "UpdateMask", }); + internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(92); + internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor = + getDescriptor().getMessageTypes().get(93); + internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor, + new java.lang.String[] { "Parent", "PageToken", "PageSize", "OrderBy", "LocationId", }); + internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor = + getDescriptor().getMessageTypes().get(94); + internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor, + new java.lang.String[] { "InspectTemplates", "NextPageToken", }); + internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(95); + internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor = + getDescriptor().getMessageTypes().get(96); + internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor, + new java.lang.String[] { "Parent", "JobTrigger", "TriggerId", "LocationId", }); + internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor = + getDescriptor().getMessageTypes().get(97); + internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor = + getDescriptor().getMessageTypes().get(98); + internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor, + new java.lang.String[] { "Name", "JobTrigger", "UpdateMask", }); + internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor = + getDescriptor().getMessageTypes().get(99); + internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor = + getDescriptor().getMessageTypes().get(100); + internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor, + new java.lang.String[] { "Parent", "InspectJob", "RiskJob", "JobId", "LocationId", "Job", }); + internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor = + getDescriptor().getMessageTypes().get(101); + internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor, + new java.lang.String[] { "Parent", "PageToken", "PageSize", "OrderBy", "Filter", "Type", "LocationId", }); + internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor = + getDescriptor().getMessageTypes().get(102); + internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor, + new java.lang.String[] { "JobTriggers", "NextPageToken", }); + internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor = + getDescriptor().getMessageTypes().get(103); + internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor = + getDescriptor().getMessageTypes().get(104); + internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor, + new java.lang.String[] { "StorageConfig", "InspectConfig", "InspectTemplateName", "Actions", }); + internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor = + getDescriptor().getMessageTypes().get(105); + internal_static_google_privacy_dlp_v2_DataProfileAction_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor, + new java.lang.String[] { "ExportData", "PubSubNotification", "Action", }); + internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor = + internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_DataProfileAction_Export_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor, + new java.lang.String[] { "ProfileTable", }); + internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor = + internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor, + new java.lang.String[] { "Topic", "Event", "PubsubCondition", "DetailOfMessage", }); + internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor = + getDescriptor().getMessageTypes().get(106); + internal_static_google_privacy_dlp_v2_DataProfileJobConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor, + new java.lang.String[] { "Location", "ProjectId", "InspectTemplates", "DataProfileActions", }); + internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor = + getDescriptor().getMessageTypes().get(107); + internal_static_google_privacy_dlp_v2_DataProfileLocation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor, + new java.lang.String[] { "OrganizationId", "FolderId", "Location", }); + internal_static_google_privacy_dlp_v2_DlpJob_descriptor = + getDescriptor().getMessageTypes().get(108); + internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DlpJob_descriptor, + new java.lang.String[] { "Name", "Type", "State", "RiskDetails", "InspectDetails", "CreateTime", "StartTime", "EndTime", "JobTriggerName", "Errors", "Details", }); + internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor = + getDescriptor().getMessageTypes().get(109); + internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(110); + internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor, + new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", "Type", "OrderBy", "LocationId", }); + internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(111); + internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor, + new java.lang.String[] { "Jobs", "NextPageToken", }); + internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor = + getDescriptor().getMessageTypes().get(112); + internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor = + getDescriptor().getMessageTypes().get(113); + internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor = + getDescriptor().getMessageTypes().get(114); + internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(115); + internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor, + new java.lang.String[] { "Parent", "DeidentifyTemplate", "TemplateId", "LocationId", }); + internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(116); + internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor, + new java.lang.String[] { "Name", "DeidentifyTemplate", "UpdateMask", }); + internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(117); + internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor = + getDescriptor().getMessageTypes().get(118); + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor, + new java.lang.String[] { "Parent", "PageToken", "PageSize", "OrderBy", "LocationId", }); + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor = + getDescriptor().getMessageTypes().get(119); + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor, + new java.lang.String[] { "DeidentifyTemplates", "NextPageToken", }); + internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor = + getDescriptor().getMessageTypes().get(120); + internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor = + getDescriptor().getMessageTypes().get(121); + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor, + new java.lang.String[] { "OutputPath", "CloudStorageFileSet", "BigQueryField", "Source", }); + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor = + getDescriptor().getMessageTypes().get(122); + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor, + new java.lang.String[] { "ApproxNumPhrases", }); + internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor = + getDescriptor().getMessageTypes().get(123); + internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor, + new java.lang.String[] { "DisplayName", "Description", "LargeCustomDictionary", "Dictionary", "Regex", "Type", }); + internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor = + getDescriptor().getMessageTypes().get(124); + internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor, + new java.lang.String[] { "LargeCustomDictionary", "Type", }); + internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor = + getDescriptor().getMessageTypes().get(125); + internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor, + new java.lang.String[] { "Config", "CreateTime", "State", "Errors", "Stats", }); + internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor = + getDescriptor().getMessageTypes().get(126); + internal_static_google_privacy_dlp_v2_StoredInfoType_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor, + new java.lang.String[] { "Name", "CurrentVersion", "PendingVersions", }); + internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor = + getDescriptor().getMessageTypes().get(127); + internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor, + new java.lang.String[] { "Parent", "Config", "StoredInfoTypeId", "LocationId", }); + internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor = + getDescriptor().getMessageTypes().get(128); + internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor, + new java.lang.String[] { "Name", "Config", "UpdateMask", }); + internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor = + getDescriptor().getMessageTypes().get(129); + internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor = + getDescriptor().getMessageTypes().get(130); + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor, + new java.lang.String[] { "Parent", "PageToken", "PageSize", "OrderBy", "LocationId", }); + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor = + getDescriptor().getMessageTypes().get(131); + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor, + new java.lang.String[] { "StoredInfoTypes", "NextPageToken", }); + internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor = + getDescriptor().getMessageTypes().get(132); + internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor = + getDescriptor().getMessageTypes().get(133); + internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor, + new java.lang.String[] { "Name", "HybridItem", }); + internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor = + getDescriptor().getMessageTypes().get(134); + internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor, + new java.lang.String[] { "Name", "HybridItem", }); + internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor = + getDescriptor().getMessageTypes().get(135); + internal_static_google_privacy_dlp_v2_HybridContentItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor, + new java.lang.String[] { "Item", "FindingDetails", }); + internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor = + getDescriptor().getMessageTypes().get(136); + internal_static_google_privacy_dlp_v2_HybridFindingDetails_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor, + new java.lang.String[] { "ContainerDetails", "FileOffset", "RowOffset", "TableOptions", "Labels", }); + internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_descriptor = + internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor = + getDescriptor().getMessageTypes().get(137); + internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor = + getDescriptor().getMessageTypes().get(138); + internal_static_google_privacy_dlp_v2_DataRiskLevel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor, + new java.lang.String[] { "Score", }); + internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor = + getDescriptor().getMessageTypes().get(139); + internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor, + new java.lang.String[] { "InspectConfig", "DataProfileJob", }); + internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor = + getDescriptor().getMessageTypes().get(140); + internal_static_google_privacy_dlp_v2_TableDataProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor, + new java.lang.String[] { "Name", "ProjectDataProfile", "DatasetProjectId", "DatasetLocation", "DatasetId", "TableId", "FullResource", "ProfileStatus", "State", "SensitivityScore", "DataRiskLevel", "PredictedInfoTypes", "OtherInfoTypes", "ConfigSnapshot", "LastModifiedTime", "ExpirationTime", "ScannedColumnCount", "FailedColumnCount", "TableSizeBytes", "RowCount", "EncryptionStatus", "ResourceVisibility", "ProfileLastGenerated", "ResourceLabels", "CreateTime", }); + internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_descriptor = + internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor = + getDescriptor().getMessageTypes().get(141); + internal_static_google_privacy_dlp_v2_ProfileStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor, + new java.lang.String[] { "Status", "Timestamp", }); + internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor = + getDescriptor().getMessageTypes().get(142); + internal_static_google_privacy_dlp_v2_InfoTypeSummary_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor, + new java.lang.String[] { "InfoType", "EstimatedPrevalence", }); + internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor = + getDescriptor().getMessageTypes().get(143); + internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor, + new java.lang.String[] { "InfoType", "EstimatedPrevalence", }); + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor = + getDescriptor().getMessageTypes().get(144); + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor, + new java.lang.String[] { "Expressions", }); + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor = + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor, + new java.lang.String[] { "MinimumRiskScore", "MinimumSensitivityScore", "Value", }); + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor = + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor, + new java.lang.String[] { "LogicalOperator", "Conditions", }); + internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor = + getDescriptor().getMessageTypes().get(145); + internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor, + new java.lang.String[] { "Profile", "Event", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.privacy.dlp.v2.DlpStorage.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.type.DayOfWeekProto.getDescriptor(); + com.google.type.TimeOfDayProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java new file mode 100644 index 000000000000..618d008b2164 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java @@ -0,0 +1,560 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public final class DlpStorage { + private DlpStorage() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_InfoType_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_InfoType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StoredType_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StoredType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_FieldId_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_FieldId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PartitionId_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PartitionId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_KindExpression_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_KindExpression_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DatastoreOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CloudStorageFileSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_BigQueryOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StorageConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StorageConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_HybridOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_BigQueryKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_DatastoreKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Key_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Key_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Key_PathElement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordKey_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_BigQueryTable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_BigQueryField_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_BigQueryField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_EntityId_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_EntityId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TableOptions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TableOptions_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n#google/privacy/dlp/v2/storage.proto\022\025g" + + "oogle.privacy.dlp.v2\032\031google/api/resourc" + + "e.proto\032\037google/protobuf/timestamp.proto" + + "\")\n\010InfoType\022\014\n\004name\030\001 \001(\t\022\017\n\007version\030\002 " + + "\001(\t\"\341\001\n\020SensitivityScore\022L\n\005score\030\001 \001(\0162" + + "=.google.privacy.dlp.v2.SensitivityScore" + + ".SensitivityScoreLevel\"\177\n\025SensitivitySco" + + "reLevel\022!\n\035SENSITIVITY_SCORE_UNSPECIFIED" + + "\020\000\022\023\n\017SENSITIVITY_LOW\020\n\022\030\n\024SENSITIVITY_M" + + "ODERATE\020\024\022\024\n\020SENSITIVITY_HIGH\020\036\"K\n\nStore" + + "dType\022\014\n\004name\030\001 \001(\t\022/\n\013create_time\030\002 \001(\013" + + "2\032.google.protobuf.Timestamp\"\310\013\n\016CustomI" + + "nfoType\0222\n\tinfo_type\030\001 \001(\0132\037.google.priv" + + "acy.dlp.v2.InfoType\0225\n\nlikelihood\030\006 \001(\0162" + + "!.google.privacy.dlp.v2.Likelihood\022F\n\ndi" + + "ctionary\030\002 \001(\01320.google.privacy.dlp.v2.C" + + "ustomInfoType.DictionaryH\000\022<\n\005regex\030\003 \001(" + + "\0132+.google.privacy.dlp.v2.CustomInfoType" + + ".RegexH\000\022M\n\016surrogate_type\030\004 \001(\01323.googl" + + "e.privacy.dlp.v2.CustomInfoType.Surrogat" + + "eTypeH\000\0228\n\013stored_type\030\005 \001(\0132!.google.pr" + + "ivacy.dlp.v2.StoredTypeH\000\022L\n\017detection_r" + + "ules\030\007 \003(\01323.google.privacy.dlp.v2.Custo" + + "mInfoType.DetectionRule\022K\n\016exclusion_typ" + + "e\030\010 \001(\01623.google.privacy.dlp.v2.CustomIn" + + "foType.ExclusionType\032\310\001\n\nDictionary\022N\n\tw" + + "ord_list\030\001 \001(\01329.google.privacy.dlp.v2.C" + + "ustomInfoType.Dictionary.WordListH\000\022E\n\022c" + + "loud_storage_path\030\003 \001(\0132\'.google.privacy" + + ".dlp.v2.CloudStoragePathH\000\032\031\n\010WordList\022\r" + + "\n\005words\030\001 \003(\tB\010\n\006source\032/\n\005Regex\022\017\n\007patt" + + "ern\030\001 \001(\t\022\025\n\rgroup_indexes\030\002 \003(\005\032\017\n\rSurr" + + "ogateType\032\276\004\n\rDetectionRule\022W\n\014hotword_r" + + "ule\030\001 \001(\0132?.google.privacy.dlp.v2.Custom" + + "InfoType.DetectionRule.HotwordRuleH\000\0328\n\t" + + "Proximity\022\025\n\rwindow_before\030\001 \001(\005\022\024\n\014wind" + + "ow_after\030\002 \001(\005\032\202\001\n\024LikelihoodAdjustment\022" + + "=\n\020fixed_likelihood\030\001 \001(\0162!.google.priva" + + "cy.dlp.v2.LikelihoodH\000\022\035\n\023relative_likel" + + "ihood\030\002 \001(\005H\000B\014\n\nadjustment\032\214\002\n\013HotwordR" + + "ule\022B\n\rhotword_regex\030\001 \001(\0132+.google.priv" + + "acy.dlp.v2.CustomInfoType.Regex\022P\n\tproxi" + + "mity\030\002 \001(\0132=.google.privacy.dlp.v2.Custo" + + "mInfoType.DetectionRule.Proximity\022g\n\025lik" + + "elihood_adjustment\030\003 \001(\0132H.google.privac" + + "y.dlp.v2.CustomInfoType.DetectionRule.Li" + + "kelihoodAdjustmentB\006\n\004type\"K\n\rExclusionT" + + "ype\022\036\n\032EXCLUSION_TYPE_UNSPECIFIED\020\000\022\032\n\026E" + + "XCLUSION_TYPE_EXCLUDE\020\001B\006\n\004type\"\027\n\007Field" + + "Id\022\014\n\004name\030\001 \001(\t\"7\n\013PartitionId\022\022\n\nproje" + + "ct_id\030\002 \001(\t\022\024\n\014namespace_id\030\004 \001(\t\"\036\n\016Kin" + + "dExpression\022\014\n\004name\030\001 \001(\t\"\201\001\n\020DatastoreO" + + "ptions\0228\n\014partition_id\030\001 \001(\0132\".google.pr" + + "ivacy.dlp.v2.PartitionId\0223\n\004kind\030\002 \001(\0132%" + + ".google.privacy.dlp.v2.KindExpression\"]\n" + + "\030CloudStorageRegexFileSet\022\023\n\013bucket_name" + + "\030\001 \001(\t\022\025\n\rinclude_regex\030\002 \003(\t\022\025\n\rexclude" + + "_regex\030\003 \003(\t\"\354\003\n\023CloudStorageOptions\022D\n\010" + + "file_set\030\001 \001(\01322.google.privacy.dlp.v2.C" + + "loudStorageOptions.FileSet\022\034\n\024bytes_limi" + + "t_per_file\030\004 \001(\003\022$\n\034bytes_limit_per_file" + + "_percent\030\010 \001(\005\0223\n\nfile_types\030\005 \003(\0162\037.goo" + + "gle.privacy.dlp.v2.FileType\022N\n\rsample_me" + + "thod\030\006 \001(\01627.google.privacy.dlp.v2.Cloud" + + "StorageOptions.SampleMethod\022\033\n\023files_lim" + + "it_percent\030\007 \001(\005\032_\n\007FileSet\022\013\n\003url\030\001 \001(\t" + + "\022G\n\016regex_file_set\030\002 \001(\0132/.google.privac" + + "y.dlp.v2.CloudStorageRegexFileSet\"H\n\014Sam" + + "pleMethod\022\035\n\031SAMPLE_METHOD_UNSPECIFIED\020\000" + + "\022\007\n\003TOP\020\001\022\020\n\014RANDOM_START\020\002\"\"\n\023CloudStor" + + "ageFileSet\022\013\n\003url\030\001 \001(\t\" \n\020CloudStorageP" + + "ath\022\014\n\004path\030\001 \001(\t\"\304\003\n\017BigQueryOptions\022=\n" + + "\017table_reference\030\001 \001(\0132$.google.privacy." + + "dlp.v2.BigQueryTable\022:\n\022identifying_fiel" + + "ds\030\002 \003(\0132\036.google.privacy.dlp.v2.FieldId" + + "\022\022\n\nrows_limit\030\003 \001(\003\022\032\n\022rows_limit_perce" + + "nt\030\006 \001(\005\022J\n\rsample_method\030\004 \001(\01623.google" + + ".privacy.dlp.v2.BigQueryOptions.SampleMe" + + "thod\0227\n\017excluded_fields\030\005 \003(\0132\036.google.p" + + "rivacy.dlp.v2.FieldId\0227\n\017included_fields" + + "\030\007 \003(\0132\036.google.privacy.dlp.v2.FieldId\"H" + + "\n\014SampleMethod\022\035\n\031SAMPLE_METHOD_UNSPECIF" + + "IED\020\000\022\007\n\003TOP\020\001\022\020\n\014RANDOM_START\020\002\"\332\004\n\rSto" + + "rageConfig\022D\n\021datastore_options\030\002 \001(\0132\'." + + "google.privacy.dlp.v2.DatastoreOptionsH\000" + + "\022K\n\025cloud_storage_options\030\003 \001(\0132*.google" + + ".privacy.dlp.v2.CloudStorageOptionsH\000\022C\n" + + "\021big_query_options\030\004 \001(\0132&.google.privac" + + "y.dlp.v2.BigQueryOptionsH\000\022>\n\016hybrid_opt" + + "ions\030\t \001(\0132$.google.privacy.dlp.v2.Hybri" + + "dOptionsH\000\022L\n\017timespan_config\030\006 \001(\01323.go" + + "ogle.privacy.dlp.v2.StorageConfig.Timesp" + + "anConfig\032\332\001\n\016TimespanConfig\022.\n\nstart_tim" + + "e\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n\010e" + + "nd_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "p\0227\n\017timestamp_field\030\003 \001(\0132\036.google.priv" + + "acy.dlp.v2.FieldId\0221\n)enable_auto_popula" + + "tion_of_timespan_config\030\004 \001(\010B\006\n\004type\"\366\001" + + "\n\rHybridOptions\022\023\n\013description\030\001 \001(\t\022#\n\033" + + "required_finding_label_keys\030\002 \003(\t\022@\n\006lab" + + "els\030\003 \003(\01320.google.privacy.dlp.v2.Hybrid" + + "Options.LabelsEntry\022:\n\rtable_options\030\004 \001" + + "(\0132#.google.privacy.dlp.v2.TableOptions\032" + + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\"`\n\013BigQueryKey\022=\n\017table_reference" + + "\030\001 \001(\0132$.google.privacy.dlp.v2.BigQueryT" + + "able\022\022\n\nrow_number\030\002 \001(\003\">\n\014DatastoreKey" + + "\022.\n\nentity_key\030\001 \001(\0132\032.google.privacy.dl" + + "p.v2.Key\"\273\001\n\003Key\0228\n\014partition_id\030\001 \001(\0132\"" + + ".google.privacy.dlp.v2.PartitionId\0224\n\004pa" + + "th\030\002 \003(\0132&.google.privacy.dlp.v2.Key.Pat" + + "hElement\032D\n\013PathElement\022\014\n\004kind\030\001 \001(\t\022\014\n" + + "\002id\030\002 \001(\003H\000\022\016\n\004name\030\003 \001(\tH\000B\t\n\007id_type\"\241" + + "\001\n\tRecordKey\022<\n\rdatastore_key\030\002 \001(\0132#.go" + + "ogle.privacy.dlp.v2.DatastoreKeyH\000\022;\n\rbi" + + "g_query_key\030\003 \001(\0132\".google.privacy.dlp.v" + + "2.BigQueryKeyH\000\022\021\n\tid_values\030\005 \003(\tB\006\n\004ty" + + "pe\"I\n\rBigQueryTable\022\022\n\nproject_id\030\001 \001(\t\022" + + "\022\n\ndataset_id\030\002 \001(\t\022\020\n\010table_id\030\003 \001(\t\"s\n" + + "\rBigQueryField\0223\n\005table\030\001 \001(\0132$.google.p" + + "rivacy.dlp.v2.BigQueryTable\022-\n\005field\030\002 \001" + + "(\0132\036.google.privacy.dlp.v2.FieldId\"9\n\010En" + + "tityId\022-\n\005field\030\001 \001(\0132\036.google.privacy.d" + + "lp.v2.FieldId\"J\n\014TableOptions\022:\n\022identif" + + "ying_fields\030\001 \003(\0132\036.google.privacy.dlp.v" + + "2.FieldId*t\n\nLikelihood\022\032\n\026LIKELIHOOD_UN" + + "SPECIFIED\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKE" + + "LY\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_L" + + "IKELY\020\005*\232\001\n\010FileType\022\031\n\025FILE_TYPE_UNSPEC" + + "IFIED\020\000\022\017\n\013BINARY_FILE\020\001\022\r\n\tTEXT_FILE\020\002\022" + + "\t\n\005IMAGE\020\003\022\010\n\004WORD\020\005\022\007\n\003PDF\020\006\022\010\n\004AVRO\020\007\022" + + "\007\n\003CSV\020\010\022\007\n\003TSV\020\t\022\016\n\nPOWERPOINT\020\013\022\t\n\005EXC" + + "EL\020\014B\250\001\n\031com.google.privacy.dlp.v2B\nDlpS" + + "torageP\001Z8google.golang.org/genproto/goo" + + "gleapis/privacy/dlp/v2;dlp\252\002\023Google.Clou" + + "d.Dlp.V2\312\002\023Google\\Cloud\\Dlp\\V2\352\002\026Google:" + + ":Cloud::Dlp::V2b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_privacy_dlp_v2_InfoType_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_privacy_dlp_v2_InfoType_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_InfoType_descriptor, + new java.lang.String[] { "Name", "Version", }); + internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor, + new java.lang.String[] { "Score", }); + internal_static_google_privacy_dlp_v2_StoredType_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_privacy_dlp_v2_StoredType_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StoredType_descriptor, + new java.lang.String[] { "Name", "CreateTime", }); + internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor, + new java.lang.String[] { "InfoType", "Likelihood", "Dictionary", "Regex", "SurrogateType", "StoredType", "DetectionRules", "ExclusionType", "Type", }); + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor = + internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor, + new java.lang.String[] { "WordList", "CloudStoragePath", "Source", }); + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor = + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor, + new java.lang.String[] { "Words", }); + internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor = + internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor, + new java.lang.String[] { "Pattern", "GroupIndexes", }); + internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor = + internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor.getNestedTypes().get(2); + internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor, + new java.lang.String[] { }); + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor = + internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor.getNestedTypes().get(3); + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor, + new java.lang.String[] { "HotwordRule", "Type", }); + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor = + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor, + new java.lang.String[] { "WindowBefore", "WindowAfter", }); + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor = + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor, + new java.lang.String[] { "FixedLikelihood", "RelativeLikelihood", "Adjustment", }); + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor = + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor.getNestedTypes().get(2); + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor, + new java.lang.String[] { "HotwordRegex", "Proximity", "LikelihoodAdjustment", }); + internal_static_google_privacy_dlp_v2_FieldId_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_privacy_dlp_v2_FieldId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_FieldId_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_PartitionId_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_privacy_dlp_v2_PartitionId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PartitionId_descriptor, + new java.lang.String[] { "ProjectId", "NamespaceId", }); + internal_static_google_privacy_dlp_v2_KindExpression_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_privacy_dlp_v2_KindExpression_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_KindExpression_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_privacy_dlp_v2_DatastoreOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor, + new java.lang.String[] { "PartitionId", "Kind", }); + internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor, + new java.lang.String[] { "BucketName", "IncludeRegex", "ExcludeRegex", }); + internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor, + new java.lang.String[] { "FileSet", "BytesLimitPerFile", "BytesLimitPerFilePercent", "FileTypes", "SampleMethod", "FilesLimitPercent", }); + internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor = + internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor, + new java.lang.String[] { "Url", "RegexFileSet", }); + internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_privacy_dlp_v2_CloudStorageFileSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor, + new java.lang.String[] { "Url", }); + internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor, + new java.lang.String[] { "Path", }); + internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_privacy_dlp_v2_BigQueryOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor, + new java.lang.String[] { "TableReference", "IdentifyingFields", "RowsLimit", "RowsLimitPercent", "SampleMethod", "ExcludedFields", "IncludedFields", }); + internal_static_google_privacy_dlp_v2_StorageConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_privacy_dlp_v2_StorageConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StorageConfig_descriptor, + new java.lang.String[] { "DatastoreOptions", "CloudStorageOptions", "BigQueryOptions", "HybridOptions", "TimespanConfig", "Type", }); + internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor = + internal_static_google_privacy_dlp_v2_StorageConfig_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor, + new java.lang.String[] { "StartTime", "EndTime", "TimestampField", "EnableAutoPopulationOfTimespanConfig", }); + internal_static_google_privacy_dlp_v2_HybridOptions_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_HybridOptions_descriptor, + new java.lang.String[] { "Description", "RequiredFindingLabelKeys", "Labels", "TableOptions", }); + internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_descriptor = + internal_static_google_privacy_dlp_v2_HybridOptions_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_privacy_dlp_v2_BigQueryKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor, + new java.lang.String[] { "TableReference", "RowNumber", }); + internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_privacy_dlp_v2_DatastoreKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor, + new java.lang.String[] { "EntityKey", }); + internal_static_google_privacy_dlp_v2_Key_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_privacy_dlp_v2_Key_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Key_descriptor, + new java.lang.String[] { "PartitionId", "Path", }); + internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor = + internal_static_google_privacy_dlp_v2_Key_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_Key_PathElement_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor, + new java.lang.String[] { "Kind", "Id", "Name", "IdType", }); + internal_static_google_privacy_dlp_v2_RecordKey_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_privacy_dlp_v2_RecordKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordKey_descriptor, + new java.lang.String[] { "DatastoreKey", "BigQueryKey", "IdValues", "Type", }); + internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_privacy_dlp_v2_BigQueryTable_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor, + new java.lang.String[] { "ProjectId", "DatasetId", "TableId", }); + internal_static_google_privacy_dlp_v2_BigQueryField_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_privacy_dlp_v2_BigQueryField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_BigQueryField_descriptor, + new java.lang.String[] { "Table", "Field", }); + internal_static_google_privacy_dlp_v2_EntityId_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_privacy_dlp_v2_EntityId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_EntityId_descriptor, + new java.lang.String[] { "Field", }); + internal_static_google_privacy_dlp_v2_TableOptions_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_privacy_dlp_v2_TableOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TableOptions_descriptor, + new java.lang.String[] { "IdentifyingFields", }); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocation.java new file mode 100644 index 000000000000..e1a55799e30f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocation.java @@ -0,0 +1,514 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Location of a finding within a document.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DocumentLocation} + */ +public final class DocumentLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DocumentLocation) + DocumentLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use DocumentLocation.newBuilder() to construct. + private DocumentLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DocumentLocation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DocumentLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DocumentLocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + fileOffset_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DocumentLocation.class, com.google.privacy.dlp.v2.DocumentLocation.Builder.class); + } + + public static final int FILE_OFFSET_FIELD_NUMBER = 1; + private long fileOffset_; + /** + *
+   * Offset of the line, from the beginning of the file, where the finding
+   * is located.
+   * 
+ * + * int64 file_offset = 1; + * @return The fileOffset. + */ + @java.lang.Override + public long getFileOffset() { + return fileOffset_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (fileOffset_ != 0L) { + output.writeInt64(1, fileOffset_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fileOffset_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, fileOffset_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.DocumentLocation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.DocumentLocation other = (com.google.privacy.dlp.v2.DocumentLocation) obj; + + if (getFileOffset() + != other.getFileOffset()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILE_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFileOffset()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.DocumentLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Location of a finding within a document.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.DocumentLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DocumentLocation) + com.google.privacy.dlp.v2.DocumentLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.DocumentLocation.class, com.google.privacy.dlp.v2.DocumentLocation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.DocumentLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + fileOffset_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DocumentLocation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DocumentLocation build() { + com.google.privacy.dlp.v2.DocumentLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DocumentLocation buildPartial() { + com.google.privacy.dlp.v2.DocumentLocation result = new com.google.privacy.dlp.v2.DocumentLocation(this); + result.fileOffset_ = fileOffset_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.DocumentLocation) { + return mergeFrom((com.google.privacy.dlp.v2.DocumentLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.DocumentLocation other) { + if (other == com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance()) return this; + if (other.getFileOffset() != 0L) { + setFileOffset(other.getFileOffset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.DocumentLocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.DocumentLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long fileOffset_ ; + /** + *
+     * Offset of the line, from the beginning of the file, where the finding
+     * is located.
+     * 
+ * + * int64 file_offset = 1; + * @return The fileOffset. + */ + @java.lang.Override + public long getFileOffset() { + return fileOffset_; + } + /** + *
+     * Offset of the line, from the beginning of the file, where the finding
+     * is located.
+     * 
+ * + * int64 file_offset = 1; + * @param value The fileOffset to set. + * @return This builder for chaining. + */ + public Builder setFileOffset(long value) { + + fileOffset_ = value; + onChanged(); + return this; + } + /** + *
+     * Offset of the line, from the beginning of the file, where the finding
+     * is located.
+     * 
+ * + * int64 file_offset = 1; + * @return This builder for chaining. + */ + public Builder clearFileOffset() { + + fileOffset_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DocumentLocation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DocumentLocation) + private static final com.google.privacy.dlp.v2.DocumentLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DocumentLocation(); + } + + public static com.google.privacy.dlp.v2.DocumentLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DocumentLocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.DocumentLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocationOrBuilder.java new file mode 100644 index 000000000000..0d21b29d16db --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocationOrBuilder.java @@ -0,0 +1,20 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface DocumentLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DocumentLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Offset of the line, from the beginning of the file, where the finding
+   * is located.
+   * 
+ * + * int64 file_offset = 1; + * @return The fileOffset. + */ + long getFileOffset(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java new file mode 100644 index 000000000000..e7c5f2c00fdf --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * How a resource is encrypted.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.EncryptionStatus} + */ +public enum EncryptionStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unused.
+   * 
+ * + * ENCRYPTION_STATUS_UNSPECIFIED = 0; + */ + ENCRYPTION_STATUS_UNSPECIFIED(0), + /** + *
+   * Google manages server-side encryption keys on your behalf.
+   * 
+ * + * ENCRYPTION_GOOGLE_MANAGED = 1; + */ + ENCRYPTION_GOOGLE_MANAGED(1), + /** + *
+   * Customer provides the key.
+   * 
+ * + * ENCRYPTION_CUSTOMER_MANAGED = 2; + */ + ENCRYPTION_CUSTOMER_MANAGED(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unused.
+   * 
+ * + * ENCRYPTION_STATUS_UNSPECIFIED = 0; + */ + public static final int ENCRYPTION_STATUS_UNSPECIFIED_VALUE = 0; + /** + *
+   * Google manages server-side encryption keys on your behalf.
+   * 
+ * + * ENCRYPTION_GOOGLE_MANAGED = 1; + */ + public static final int ENCRYPTION_GOOGLE_MANAGED_VALUE = 1; + /** + *
+   * Customer provides the key.
+   * 
+ * + * ENCRYPTION_CUSTOMER_MANAGED = 2; + */ + public static final int ENCRYPTION_CUSTOMER_MANAGED_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EncryptionStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EncryptionStatus forNumber(int value) { + switch (value) { + case 0: return ENCRYPTION_STATUS_UNSPECIFIED; + case 1: return ENCRYPTION_GOOGLE_MANAGED; + case 2: return ENCRYPTION_CUSTOMER_MANAGED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + EncryptionStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EncryptionStatus findValueByNumber(int number) { + return EncryptionStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(11); + } + + private static final EncryptionStatus[] VALUES = values(); + + public static EncryptionStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EncryptionStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.EncryptionStatus) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityId.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityId.java new file mode 100644 index 000000000000..e2533207bbc5 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityId.java @@ -0,0 +1,673 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * An entity in a dataset is a field or set of fields that correspond to a
+ * single person. For example, in medical records the `EntityId` might be a
+ * patient identifier, or for financial records it might be an account
+ * identifier. This message is used when generalizations or analysis must take
+ * into account that multiple rows correspond to the same entity.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.EntityId} + */ +public final class EntityId extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.EntityId) + EntityIdOrBuilder { +private static final long serialVersionUID = 0L; + // Use EntityId.newBuilder() to construct. + private EntityId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EntityId() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EntityId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EntityId( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.EntityId.class, com.google.privacy.dlp.v2.EntityId.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+   * Composite key indicating which field contains the entity identifier.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+   * Composite key indicating which field contains the entity identifier.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+   * Composite key indicating which field contains the entity identifier.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.EntityId)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.EntityId other = (com.google.privacy.dlp.v2.EntityId) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.EntityId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.EntityId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.EntityId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.EntityId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.EntityId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.EntityId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.EntityId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.EntityId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.EntityId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.EntityId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.EntityId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.EntityId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.EntityId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An entity in a dataset is a field or set of fields that correspond to a
+   * single person. For example, in medical records the `EntityId` might be a
+   * patient identifier, or for financial records it might be an account
+   * identifier. This message is used when generalizations or analysis must take
+   * into account that multiple rows correspond to the same entity.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.EntityId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.EntityId) + com.google.privacy.dlp.v2.EntityIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.EntityId.class, com.google.privacy.dlp.v2.EntityId.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.EntityId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.EntityId getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.EntityId.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.EntityId build() { + com.google.privacy.dlp.v2.EntityId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.EntityId buildPartial() { + com.google.privacy.dlp.v2.EntityId result = new com.google.privacy.dlp.v2.EntityId(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.EntityId) { + return mergeFrom((com.google.privacy.dlp.v2.EntityId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.EntityId other) { + if (other == com.google.privacy.dlp.v2.EntityId.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.EntityId parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.EntityId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+     * Composite key indicating which field contains the entity identifier.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+     * Composite key indicating which field contains the entity identifier.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+     * Composite key indicating which field contains the entity identifier.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Composite key indicating which field contains the entity identifier.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Composite key indicating which field contains the entity identifier.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Composite key indicating which field contains the entity identifier.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+     * Composite key indicating which field contains the entity identifier.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+     * Composite key indicating which field contains the entity identifier.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+     * Composite key indicating which field contains the entity identifier.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.EntityId) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.EntityId) + private static final com.google.privacy.dlp.v2.EntityId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.EntityId(); + } + + public static com.google.privacy.dlp.v2.EntityId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EntityId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EntityId(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.EntityId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityIdOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityIdOrBuilder.java new file mode 100644 index 000000000000..f34df9f9d821 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityIdOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface EntityIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.EntityId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Composite key indicating which field contains the entity identifier.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+   * Composite key indicating which field contains the entity identifier.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+   * Composite key indicating which field contains the entity identifier.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Error.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Error.java new file mode 100644 index 000000000000..03df97e0df2f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Error.java @@ -0,0 +1,1110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Details information about an error encountered during job execution or
+ * the results of an unsuccessful activation of the JobTrigger.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Error} + */ +public final class Error extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Error) + ErrorOrBuilder { +private static final long serialVersionUID = 0L; + // Use Error.newBuilder() to construct. + private Error(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Error() { + timestamps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Error(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Error( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.rpc.Status.Builder subBuilder = null; + if (details_ != null) { + subBuilder = details_.toBuilder(); + } + details_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(details_); + details_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + timestamps_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + timestamps_.add( + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + timestamps_ = java.util.Collections.unmodifiableList(timestamps_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Error.class, com.google.privacy.dlp.v2.Error.Builder.class); + } + + public static final int DETAILS_FIELD_NUMBER = 1; + private com.google.rpc.Status details_; + /** + *
+   * Detailed error codes and messages.
+   * 
+ * + * .google.rpc.Status details = 1; + * @return Whether the details field is set. + */ + @java.lang.Override + public boolean hasDetails() { + return details_ != null; + } + /** + *
+   * Detailed error codes and messages.
+   * 
+ * + * .google.rpc.Status details = 1; + * @return The details. + */ + @java.lang.Override + public com.google.rpc.Status getDetails() { + return details_ == null ? com.google.rpc.Status.getDefaultInstance() : details_; + } + /** + *
+   * Detailed error codes and messages.
+   * 
+ * + * .google.rpc.Status details = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getDetailsOrBuilder() { + return getDetails(); + } + + public static final int TIMESTAMPS_FIELD_NUMBER = 2; + private java.util.List timestamps_; + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + @java.lang.Override + public java.util.List getTimestampsList() { + return timestamps_; + } + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + @java.lang.Override + public java.util.List + getTimestampsOrBuilderList() { + return timestamps_; + } + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + @java.lang.Override + public int getTimestampsCount() { + return timestamps_.size(); + } + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamps(int index) { + return timestamps_.get(index); + } + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampsOrBuilder( + int index) { + return timestamps_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (details_ != null) { + output.writeMessage(1, getDetails()); + } + for (int i = 0; i < timestamps_.size(); i++) { + output.writeMessage(2, timestamps_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (details_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDetails()); + } + for (int i = 0; i < timestamps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, timestamps_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Error)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Error other = (com.google.privacy.dlp.v2.Error) obj; + + if (hasDetails() != other.hasDetails()) return false; + if (hasDetails()) { + if (!getDetails() + .equals(other.getDetails())) return false; + } + if (!getTimestampsList() + .equals(other.getTimestampsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDetails()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + } + if (getTimestampsCount() > 0) { + hash = (37 * hash) + TIMESTAMPS_FIELD_NUMBER; + hash = (53 * hash) + getTimestampsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Error parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Error parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Error parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Error parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Error parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Error parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Error parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Error parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Error parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Error parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Error parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Error parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Error prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details information about an error encountered during job execution or
+   * the results of an unsuccessful activation of the JobTrigger.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Error} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Error) + com.google.privacy.dlp.v2.ErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Error.class, com.google.privacy.dlp.v2.Error.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Error.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTimestampsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (detailsBuilder_ == null) { + details_ = null; + } else { + details_ = null; + detailsBuilder_ = null; + } + if (timestampsBuilder_ == null) { + timestamps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + timestampsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Error getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Error.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Error build() { + com.google.privacy.dlp.v2.Error result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Error buildPartial() { + com.google.privacy.dlp.v2.Error result = new com.google.privacy.dlp.v2.Error(this); + int from_bitField0_ = bitField0_; + if (detailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = detailsBuilder_.build(); + } + if (timestampsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + timestamps_ = java.util.Collections.unmodifiableList(timestamps_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.timestamps_ = timestamps_; + } else { + result.timestamps_ = timestampsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Error) { + return mergeFrom((com.google.privacy.dlp.v2.Error)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Error other) { + if (other == com.google.privacy.dlp.v2.Error.getDefaultInstance()) return this; + if (other.hasDetails()) { + mergeDetails(other.getDetails()); + } + if (timestampsBuilder_ == null) { + if (!other.timestamps_.isEmpty()) { + if (timestamps_.isEmpty()) { + timestamps_ = other.timestamps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTimestampsIsMutable(); + timestamps_.addAll(other.timestamps_); + } + onChanged(); + } + } else { + if (!other.timestamps_.isEmpty()) { + if (timestampsBuilder_.isEmpty()) { + timestampsBuilder_.dispose(); + timestampsBuilder_ = null; + timestamps_ = other.timestamps_; + bitField0_ = (bitField0_ & ~0x00000001); + timestampsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTimestampsFieldBuilder() : null; + } else { + timestampsBuilder_.addAllMessages(other.timestamps_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Error parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Error) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.rpc.Status details_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> detailsBuilder_; + /** + *
+     * Detailed error codes and messages.
+     * 
+ * + * .google.rpc.Status details = 1; + * @return Whether the details field is set. + */ + public boolean hasDetails() { + return detailsBuilder_ != null || details_ != null; + } + /** + *
+     * Detailed error codes and messages.
+     * 
+ * + * .google.rpc.Status details = 1; + * @return The details. + */ + public com.google.rpc.Status getDetails() { + if (detailsBuilder_ == null) { + return details_ == null ? com.google.rpc.Status.getDefaultInstance() : details_; + } else { + return detailsBuilder_.getMessage(); + } + } + /** + *
+     * Detailed error codes and messages.
+     * 
+ * + * .google.rpc.Status details = 1; + */ + public Builder setDetails(com.google.rpc.Status value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + detailsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Detailed error codes and messages.
+     * 
+ * + * .google.rpc.Status details = 1; + */ + public Builder setDetails( + com.google.rpc.Status.Builder builderForValue) { + if (detailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + detailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Detailed error codes and messages.
+     * 
+ * + * .google.rpc.Status details = 1; + */ + public Builder mergeDetails(com.google.rpc.Status value) { + if (detailsBuilder_ == null) { + if (details_ != null) { + details_ = + com.google.rpc.Status.newBuilder(details_).mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + detailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Detailed error codes and messages.
+     * 
+ * + * .google.rpc.Status details = 1; + */ + public Builder clearDetails() { + if (detailsBuilder_ == null) { + details_ = null; + onChanged(); + } else { + details_ = null; + detailsBuilder_ = null; + } + + return this; + } + /** + *
+     * Detailed error codes and messages.
+     * 
+ * + * .google.rpc.Status details = 1; + */ + public com.google.rpc.Status.Builder getDetailsBuilder() { + + onChanged(); + return getDetailsFieldBuilder().getBuilder(); + } + /** + *
+     * Detailed error codes and messages.
+     * 
+ * + * .google.rpc.Status details = 1; + */ + public com.google.rpc.StatusOrBuilder getDetailsOrBuilder() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilder(); + } else { + return details_ == null ? + com.google.rpc.Status.getDefaultInstance() : details_; + } + } + /** + *
+     * Detailed error codes and messages.
+     * 
+ * + * .google.rpc.Status details = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getDetails(), + getParentForChildren(), + isClean()); + details_ = null; + } + return detailsBuilder_; + } + + private java.util.List timestamps_ = + java.util.Collections.emptyList(); + private void ensureTimestampsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + timestamps_ = new java.util.ArrayList(timestamps_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampsBuilder_; + + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public java.util.List getTimestampsList() { + if (timestampsBuilder_ == null) { + return java.util.Collections.unmodifiableList(timestamps_); + } else { + return timestampsBuilder_.getMessageList(); + } + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public int getTimestampsCount() { + if (timestampsBuilder_ == null) { + return timestamps_.size(); + } else { + return timestampsBuilder_.getCount(); + } + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public com.google.protobuf.Timestamp getTimestamps(int index) { + if (timestampsBuilder_ == null) { + return timestamps_.get(index); + } else { + return timestampsBuilder_.getMessage(index); + } + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public Builder setTimestamps( + int index, com.google.protobuf.Timestamp value) { + if (timestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimestampsIsMutable(); + timestamps_.set(index, value); + onChanged(); + } else { + timestampsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public Builder setTimestamps( + int index, com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampsBuilder_ == null) { + ensureTimestampsIsMutable(); + timestamps_.set(index, builderForValue.build()); + onChanged(); + } else { + timestampsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public Builder addTimestamps(com.google.protobuf.Timestamp value) { + if (timestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimestampsIsMutable(); + timestamps_.add(value); + onChanged(); + } else { + timestampsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public Builder addTimestamps( + int index, com.google.protobuf.Timestamp value) { + if (timestampsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimestampsIsMutable(); + timestamps_.add(index, value); + onChanged(); + } else { + timestampsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public Builder addTimestamps( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampsBuilder_ == null) { + ensureTimestampsIsMutable(); + timestamps_.add(builderForValue.build()); + onChanged(); + } else { + timestampsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public Builder addTimestamps( + int index, com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampsBuilder_ == null) { + ensureTimestampsIsMutable(); + timestamps_.add(index, builderForValue.build()); + onChanged(); + } else { + timestampsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public Builder addAllTimestamps( + java.lang.Iterable values) { + if (timestampsBuilder_ == null) { + ensureTimestampsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, timestamps_); + onChanged(); + } else { + timestampsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public Builder clearTimestamps() { + if (timestampsBuilder_ == null) { + timestamps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + timestampsBuilder_.clear(); + } + return this; + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public Builder removeTimestamps(int index) { + if (timestampsBuilder_ == null) { + ensureTimestampsIsMutable(); + timestamps_.remove(index); + onChanged(); + } else { + timestampsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public com.google.protobuf.Timestamp.Builder getTimestampsBuilder( + int index) { + return getTimestampsFieldBuilder().getBuilder(index); + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampsOrBuilder( + int index) { + if (timestampsBuilder_ == null) { + return timestamps_.get(index); } else { + return timestampsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public java.util.List + getTimestampsOrBuilderList() { + if (timestampsBuilder_ != null) { + return timestampsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(timestamps_); + } + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public com.google.protobuf.Timestamp.Builder addTimestampsBuilder() { + return getTimestampsFieldBuilder().addBuilder( + com.google.protobuf.Timestamp.getDefaultInstance()); + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public com.google.protobuf.Timestamp.Builder addTimestampsBuilder( + int index) { + return getTimestampsFieldBuilder().addBuilder( + index, com.google.protobuf.Timestamp.getDefaultInstance()); + } + /** + *
+     * The times the error occurred.
+     * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + public java.util.List + getTimestampsBuilderList() { + return getTimestampsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimestampsFieldBuilder() { + if (timestampsBuilder_ == null) { + timestampsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + timestamps_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + timestamps_ = null; + } + return timestampsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Error) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Error) + private static final com.google.privacy.dlp.v2.Error DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Error(); + } + + public static com.google.privacy.dlp.v2.Error getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Error parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Error(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Error getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ErrorOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ErrorOrBuilder.java new file mode 100644 index 000000000000..e91e9157b497 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ErrorOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Error) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Detailed error codes and messages.
+   * 
+ * + * .google.rpc.Status details = 1; + * @return Whether the details field is set. + */ + boolean hasDetails(); + /** + *
+   * Detailed error codes and messages.
+   * 
+ * + * .google.rpc.Status details = 1; + * @return The details. + */ + com.google.rpc.Status getDetails(); + /** + *
+   * Detailed error codes and messages.
+   * 
+ * + * .google.rpc.Status details = 1; + */ + com.google.rpc.StatusOrBuilder getDetailsOrBuilder(); + + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + java.util.List + getTimestampsList(); + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + com.google.protobuf.Timestamp getTimestamps(int index); + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + int getTimestampsCount(); + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + java.util.List + getTimestampsOrBuilderList(); + /** + *
+   * The times the error occurred.
+   * 
+ * + * repeated .google.protobuf.Timestamp timestamps = 2; + */ + com.google.protobuf.TimestampOrBuilder getTimestampsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java new file mode 100644 index 000000000000..d8a47b8bd5d0 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java @@ -0,0 +1,1033 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * List of excluded infoTypes.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ExcludeInfoTypes} + */ +public final class ExcludeInfoTypes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ExcludeInfoTypes) + ExcludeInfoTypesOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExcludeInfoTypes.newBuilder() to construct. + private ExcludeInfoTypes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExcludeInfoTypes() { + infoTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExcludeInfoTypes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExcludeInfoTypes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + infoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ExcludeInfoTypes.class, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder.class); + } + + public static final int INFO_TYPES_FIELD_NUMBER = 1; + private java.util.List infoTypes_; + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public java.util.List getInfoTypesList() { + return infoTypes_; + } + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public java.util.List + getInfoTypesOrBuilderList() { + return infoTypes_; + } + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public int getInfoTypesCount() { + return infoTypes_.size(); + } + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + return infoTypes_.get(index); + } + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + return infoTypes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < infoTypes_.size(); i++) { + output.writeMessage(1, infoTypes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < infoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, infoTypes_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ExcludeInfoTypes)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ExcludeInfoTypes other = (com.google.privacy.dlp.v2.ExcludeInfoTypes) obj; + + if (!getInfoTypesList() + .equals(other.getInfoTypesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInfoTypesCount() > 0) { + hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getInfoTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ExcludeInfoTypes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List of excluded infoTypes.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ExcludeInfoTypes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ExcludeInfoTypes) + com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ExcludeInfoTypes.class, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ExcludeInfoTypes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInfoTypesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + infoTypesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ExcludeInfoTypes getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ExcludeInfoTypes build() { + com.google.privacy.dlp.v2.ExcludeInfoTypes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ExcludeInfoTypes buildPartial() { + com.google.privacy.dlp.v2.ExcludeInfoTypes result = new com.google.privacy.dlp.v2.ExcludeInfoTypes(this); + int from_bitField0_ = bitField0_; + if (infoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.infoTypes_ = infoTypes_; + } else { + result.infoTypes_ = infoTypesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ExcludeInfoTypes) { + return mergeFrom((com.google.privacy.dlp.v2.ExcludeInfoTypes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ExcludeInfoTypes other) { + if (other == com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance()) return this; + if (infoTypesBuilder_ == null) { + if (!other.infoTypes_.isEmpty()) { + if (infoTypes_.isEmpty()) { + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInfoTypesIsMutable(); + infoTypes_.addAll(other.infoTypes_); + } + onChanged(); + } + } else { + if (!other.infoTypes_.isEmpty()) { + if (infoTypesBuilder_.isEmpty()) { + infoTypesBuilder_.dispose(); + infoTypesBuilder_ = null; + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + infoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInfoTypesFieldBuilder() : null; + } else { + infoTypesBuilder_.addAllMessages(other.infoTypes_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ExcludeInfoTypes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ExcludeInfoTypes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List infoTypes_ = + java.util.Collections.emptyList(); + private void ensureInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(infoTypes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; + + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List getInfoTypesList() { + if (infoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(infoTypes_); + } else { + return infoTypesBuilder_.getMessageList(); + } + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public int getInfoTypesCount() { + if (infoTypesBuilder_ == null) { + return infoTypes_.size(); + } else { + return infoTypesBuilder_.getCount(); + } + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); + } else { + return infoTypesBuilder_.getMessage(index); + } + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.set(index, value); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(index, value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addAllInfoTypes( + java.lang.Iterable values) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, infoTypes_); + onChanged(); + } else { + infoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder clearInfoTypes() { + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + infoTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder removeInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.remove(index); + onChanged(); + } else { + infoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); } else { + return infoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List + getInfoTypesOrBuilderList() { + if (infoTypesBuilder_ != null) { + return infoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(infoTypes_); + } + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { + return getInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+     * contained within with a finding of an infoType from this list. For
+     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+     * `exclusion_rule` containing `exclude_info_types.info_types` with
+     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+     * with EMAIL_ADDRESS finding.
+     * That leads to "555-222-2222@example.org" to generate only a single
+     * finding, namely email address.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List + getInfoTypesBuilderList() { + return getInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypesFieldBuilder() { + if (infoTypesBuilder_ == null) { + infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + infoTypes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + infoTypes_ = null; + } + return infoTypesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ExcludeInfoTypes) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ExcludeInfoTypes) + private static final com.google.privacy.dlp.v2.ExcludeInfoTypes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ExcludeInfoTypes(); + } + + public static com.google.privacy.dlp.v2.ExcludeInfoTypes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExcludeInfoTypes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExcludeInfoTypes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ExcludeInfoTypes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypesOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypesOrBuilder.java new file mode 100644 index 000000000000..521bd5256281 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypesOrBuilder.java @@ -0,0 +1,88 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ExcludeInfoTypesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ExcludeInfoTypes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + java.util.List + getInfoTypesList(); + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + int getInfoTypesCount(); + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + java.util.List + getInfoTypesOrBuilderList(); + /** + *
+   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
+   * contained within with a finding of an infoType from this list. For
+   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
+   * `exclusion_rule` containing `exclude_info_types.info_types` with
+   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
+   * with EMAIL_ADDRESS finding.
+   * That leads to "555-222-2222@example.org" to generate only a single
+   * finding, namely email address.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRule.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRule.java new file mode 100644 index 000000000000..f6106c7cbab5 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRule.java @@ -0,0 +1,1413 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The rule that specifies conditions when findings of infoTypes specified in
+ * `InspectionRuleSet` are removed from results.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ExclusionRule} + */ +public final class ExclusionRule extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ExclusionRule) + ExclusionRuleOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExclusionRule.newBuilder() to construct. + private ExclusionRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExclusionRule() { + matchingType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExclusionRule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExclusionRule( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder subBuilder = null; + if (typeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null; + if (typeCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder subBuilder = null; + if (typeCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.ExcludeInfoTypes) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.ExcludeInfoTypes.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ExcludeInfoTypes) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 3; + break; + } + case 32: { + int rawValue = input.readEnum(); + + matchingType_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ExclusionRule.class, com.google.privacy.dlp.v2.ExclusionRule.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DICTIONARY(1), + REGEX(2), + EXCLUDE_INFO_TYPES(3), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return DICTIONARY; + case 2: return REGEX; + case 3: return EXCLUDE_INFO_TYPES; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int DICTIONARY_FIELD_NUMBER = 1; + /** + *
+   * Dictionary which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + * @return Whether the dictionary field is set. + */ + @java.lang.Override + public boolean hasDictionary() { + return typeCase_ == 1; + } + /** + *
+   * Dictionary which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + * @return The dictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + /** + *
+   * Dictionary which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + + public static final int REGEX_FIELD_NUMBER = 2; + /** + *
+   * Regular expression which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + * @return Whether the regex field is set. + */ + @java.lang.Override + public boolean hasRegex() { + return typeCase_ == 2; + } + /** + *
+   * Regular expression which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + * @return The regex. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + /** + *
+   * Regular expression which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + + public static final int EXCLUDE_INFO_TYPES_FIELD_NUMBER = 3; + /** + *
+   * Set of infoTypes for which findings would affect this rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + * @return Whether the excludeInfoTypes field is set. + */ + @java.lang.Override + public boolean hasExcludeInfoTypes() { + return typeCase_ == 3; + } + /** + *
+   * Set of infoTypes for which findings would affect this rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + * @return The excludeInfoTypes. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ExcludeInfoTypes getExcludeInfoTypes() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_; + } + return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); + } + /** + *
+   * Set of infoTypes for which findings would affect this rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder getExcludeInfoTypesOrBuilder() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_; + } + return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); + } + + public static final int MATCHING_TYPE_FIELD_NUMBER = 4; + private int matchingType_; + /** + *
+   * How the rule is applied, see MatchingType documentation for details.
+   * 
+ * + * .google.privacy.dlp.v2.MatchingType matching_type = 4; + * @return The enum numeric value on the wire for matchingType. + */ + @java.lang.Override public int getMatchingTypeValue() { + return matchingType_; + } + /** + *
+   * How the rule is applied, see MatchingType documentation for details.
+   * 
+ * + * .google.privacy.dlp.v2.MatchingType matching_type = 4; + * @return The matchingType. + */ + @java.lang.Override public com.google.privacy.dlp.v2.MatchingType getMatchingType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.MatchingType result = com.google.privacy.dlp.v2.MatchingType.valueOf(matchingType_); + return result == null ? com.google.privacy.dlp.v2.MatchingType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); + } + if (typeCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); + } + if (typeCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_); + } + if (matchingType_ != com.google.privacy.dlp.v2.MatchingType.MATCHING_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, matchingType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); + } + if (typeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); + } + if (typeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_); + } + if (matchingType_ != com.google.privacy.dlp.v2.MatchingType.MATCHING_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, matchingType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ExclusionRule)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ExclusionRule other = (com.google.privacy.dlp.v2.ExclusionRule) obj; + + if (matchingType_ != other.matchingType_) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getDictionary() + .equals(other.getDictionary())) return false; + break; + case 2: + if (!getRegex() + .equals(other.getRegex())) return false; + break; + case 3: + if (!getExcludeInfoTypes() + .equals(other.getExcludeInfoTypes())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MATCHING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + matchingType_; + switch (typeCase_) { + case 1: + hash = (37 * hash) + DICTIONARY_FIELD_NUMBER; + hash = (53 * hash) + getDictionary().hashCode(); + break; + case 2: + hash = (37 * hash) + REGEX_FIELD_NUMBER; + hash = (53 * hash) + getRegex().hashCode(); + break; + case 3: + hash = (37 * hash) + EXCLUDE_INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getExcludeInfoTypes().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ExclusionRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The rule that specifies conditions when findings of infoTypes specified in
+   * `InspectionRuleSet` are removed from results.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ExclusionRule} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ExclusionRule) + com.google.privacy.dlp.v2.ExclusionRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ExclusionRule.class, com.google.privacy.dlp.v2.ExclusionRule.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ExclusionRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + matchingType_ = 0; + + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ExclusionRule getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ExclusionRule build() { + com.google.privacy.dlp.v2.ExclusionRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ExclusionRule buildPartial() { + com.google.privacy.dlp.v2.ExclusionRule result = new com.google.privacy.dlp.v2.ExclusionRule(this); + if (typeCase_ == 1) { + if (dictionaryBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = dictionaryBuilder_.build(); + } + } + if (typeCase_ == 2) { + if (regexBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = regexBuilder_.build(); + } + } + if (typeCase_ == 3) { + if (excludeInfoTypesBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = excludeInfoTypesBuilder_.build(); + } + } + result.matchingType_ = matchingType_; + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ExclusionRule) { + return mergeFrom((com.google.privacy.dlp.v2.ExclusionRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ExclusionRule other) { + if (other == com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance()) return this; + if (other.matchingType_ != 0) { + setMatchingTypeValue(other.getMatchingTypeValue()); + } + switch (other.getTypeCase()) { + case DICTIONARY: { + mergeDictionary(other.getDictionary()); + break; + } + case REGEX: { + mergeRegex(other.getRegex()); + break; + } + case EXCLUDE_INFO_TYPES: { + mergeExcludeInfoTypes(other.getExcludeInfoTypes()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ExclusionRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ExclusionRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> dictionaryBuilder_; + /** + *
+     * Dictionary which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + * @return Whether the dictionary field is set. + */ + @java.lang.Override + public boolean hasDictionary() { + return typeCase_ == 1; + } + /** + *
+     * Dictionary which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + * @return The dictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { + if (dictionaryBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return dictionaryBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + } + /** + *
+     * Dictionary which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + */ + public Builder setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { + if (dictionaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + dictionaryBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + *
+     * Dictionary which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + */ + public Builder setDictionary( + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder builderForValue) { + if (dictionaryBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + dictionaryBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + *
+     * Dictionary which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + */ + public Builder mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { + if (dictionaryBuilder_ == null) { + if (typeCase_ == 1 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + dictionaryBuilder_.mergeFrom(value); + } else { + dictionaryBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + *
+     * Dictionary which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + */ + public Builder clearDictionary() { + if (dictionaryBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + dictionaryBuilder_.clear(); + } + return this; + } + /** + *
+     * Dictionary which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder getDictionaryBuilder() { + return getDictionaryFieldBuilder().getBuilder(); + } + /** + *
+     * Dictionary which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { + if ((typeCase_ == 1) && (dictionaryBuilder_ != null)) { + return dictionaryBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + } + /** + *
+     * Dictionary which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> + getDictionaryFieldBuilder() { + if (dictionaryBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + dictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged();; + return dictionaryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> regexBuilder_; + /** + *
+     * Regular expression which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + * @return Whether the regex field is set. + */ + @java.lang.Override + public boolean hasRegex() { + return typeCase_ == 2; + } + /** + *
+     * Regular expression which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + * @return The regex. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { + if (regexBuilder_ == null) { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } else { + if (typeCase_ == 2) { + return regexBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + } + /** + *
+     * Regular expression which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + */ + public Builder setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { + if (regexBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + regexBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + /** + *
+     * Regular expression which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + */ + public Builder setRegex( + com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) { + if (regexBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + regexBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 2; + return this; + } + /** + *
+     * Regular expression which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + */ + public Builder mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { + if (regexBuilder_ == null) { + if (typeCase_ == 2 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 2) { + regexBuilder_.mergeFrom(value); + } else { + regexBuilder_.setMessage(value); + } + } + typeCase_ = 2; + return this; + } + /** + *
+     * Regular expression which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + */ + public Builder clearRegex() { + if (regexBuilder_ == null) { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + } + regexBuilder_.clear(); + } + return this; + } + /** + *
+     * Regular expression which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getRegexBuilder() { + return getRegexFieldBuilder().getBuilder(); + } + /** + *
+     * Regular expression which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { + if ((typeCase_ == 2) && (regexBuilder_ != null)) { + return regexBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + } + /** + *
+     * Regular expression which defines the rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> + getRegexFieldBuilder() { + if (regexBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + regexBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 2; + onChanged();; + return regexBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ExcludeInfoTypes, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder, com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder> excludeInfoTypesBuilder_; + /** + *
+     * Set of infoTypes for which findings would affect this rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + * @return Whether the excludeInfoTypes field is set. + */ + @java.lang.Override + public boolean hasExcludeInfoTypes() { + return typeCase_ == 3; + } + /** + *
+     * Set of infoTypes for which findings would affect this rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + * @return The excludeInfoTypes. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ExcludeInfoTypes getExcludeInfoTypes() { + if (excludeInfoTypesBuilder_ == null) { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_; + } + return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); + } else { + if (typeCase_ == 3) { + return excludeInfoTypesBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); + } + } + /** + *
+     * Set of infoTypes for which findings would affect this rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + */ + public Builder setExcludeInfoTypes(com.google.privacy.dlp.v2.ExcludeInfoTypes value) { + if (excludeInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + excludeInfoTypesBuilder_.setMessage(value); + } + typeCase_ = 3; + return this; + } + /** + *
+     * Set of infoTypes for which findings would affect this rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + */ + public Builder setExcludeInfoTypes( + com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder builderForValue) { + if (excludeInfoTypesBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + excludeInfoTypesBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 3; + return this; + } + /** + *
+     * Set of infoTypes for which findings would affect this rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + */ + public Builder mergeExcludeInfoTypes(com.google.privacy.dlp.v2.ExcludeInfoTypes value) { + if (excludeInfoTypesBuilder_ == null) { + if (typeCase_ == 3 && + type_ != com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.ExcludeInfoTypes.newBuilder((com.google.privacy.dlp.v2.ExcludeInfoTypes) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 3) { + excludeInfoTypesBuilder_.mergeFrom(value); + } else { + excludeInfoTypesBuilder_.setMessage(value); + } + } + typeCase_ = 3; + return this; + } + /** + *
+     * Set of infoTypes for which findings would affect this rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + */ + public Builder clearExcludeInfoTypes() { + if (excludeInfoTypesBuilder_ == null) { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + } + excludeInfoTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * Set of infoTypes for which findings would affect this rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + */ + public com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder getExcludeInfoTypesBuilder() { + return getExcludeInfoTypesFieldBuilder().getBuilder(); + } + /** + *
+     * Set of infoTypes for which findings would affect this rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder getExcludeInfoTypesOrBuilder() { + if ((typeCase_ == 3) && (excludeInfoTypesBuilder_ != null)) { + return excludeInfoTypesBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_; + } + return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); + } + } + /** + *
+     * Set of infoTypes for which findings would affect this rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ExcludeInfoTypes, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder, com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder> + getExcludeInfoTypesFieldBuilder() { + if (excludeInfoTypesBuilder_ == null) { + if (!(typeCase_ == 3)) { + type_ = com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); + } + excludeInfoTypesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ExcludeInfoTypes, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder, com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder>( + (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 3; + onChanged();; + return excludeInfoTypesBuilder_; + } + + private int matchingType_ = 0; + /** + *
+     * How the rule is applied, see MatchingType documentation for details.
+     * 
+ * + * .google.privacy.dlp.v2.MatchingType matching_type = 4; + * @return The enum numeric value on the wire for matchingType. + */ + @java.lang.Override public int getMatchingTypeValue() { + return matchingType_; + } + /** + *
+     * How the rule is applied, see MatchingType documentation for details.
+     * 
+ * + * .google.privacy.dlp.v2.MatchingType matching_type = 4; + * @param value The enum numeric value on the wire for matchingType to set. + * @return This builder for chaining. + */ + public Builder setMatchingTypeValue(int value) { + + matchingType_ = value; + onChanged(); + return this; + } + /** + *
+     * How the rule is applied, see MatchingType documentation for details.
+     * 
+ * + * .google.privacy.dlp.v2.MatchingType matching_type = 4; + * @return The matchingType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.MatchingType getMatchingType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.MatchingType result = com.google.privacy.dlp.v2.MatchingType.valueOf(matchingType_); + return result == null ? com.google.privacy.dlp.v2.MatchingType.UNRECOGNIZED : result; + } + /** + *
+     * How the rule is applied, see MatchingType documentation for details.
+     * 
+ * + * .google.privacy.dlp.v2.MatchingType matching_type = 4; + * @param value The matchingType to set. + * @return This builder for chaining. + */ + public Builder setMatchingType(com.google.privacy.dlp.v2.MatchingType value) { + if (value == null) { + throw new NullPointerException(); + } + + matchingType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * How the rule is applied, see MatchingType documentation for details.
+     * 
+ * + * .google.privacy.dlp.v2.MatchingType matching_type = 4; + * @return This builder for chaining. + */ + public Builder clearMatchingType() { + + matchingType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ExclusionRule) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ExclusionRule) + private static final com.google.privacy.dlp.v2.ExclusionRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ExclusionRule(); + } + + public static com.google.privacy.dlp.v2.ExclusionRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExclusionRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExclusionRule(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ExclusionRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRuleOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRuleOrBuilder.java new file mode 100644 index 000000000000..ae42d8aa75c7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRuleOrBuilder.java @@ -0,0 +1,111 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ExclusionRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ExclusionRule) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Dictionary which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + * @return Whether the dictionary field is set. + */ + boolean hasDictionary(); + /** + *
+   * Dictionary which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + * @return The dictionary. + */ + com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary(); + /** + *
+   * Dictionary which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; + */ + com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder(); + + /** + *
+   * Regular expression which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + * @return Whether the regex field is set. + */ + boolean hasRegex(); + /** + *
+   * Regular expression which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + * @return The regex. + */ + com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex(); + /** + *
+   * Regular expression which defines the rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; + */ + com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder(); + + /** + *
+   * Set of infoTypes for which findings would affect this rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + * @return Whether the excludeInfoTypes field is set. + */ + boolean hasExcludeInfoTypes(); + /** + *
+   * Set of infoTypes for which findings would affect this rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + * @return The excludeInfoTypes. + */ + com.google.privacy.dlp.v2.ExcludeInfoTypes getExcludeInfoTypes(); + /** + *
+   * Set of infoTypes for which findings would affect this rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; + */ + com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder getExcludeInfoTypesOrBuilder(); + + /** + *
+   * How the rule is applied, see MatchingType documentation for details.
+   * 
+ * + * .google.privacy.dlp.v2.MatchingType matching_type = 4; + * @return The enum numeric value on the wire for matchingType. + */ + int getMatchingTypeValue(); + /** + *
+   * How the rule is applied, see MatchingType documentation for details.
+   * 
+ * + * .google.privacy.dlp.v2.MatchingType matching_type = 4; + * @return The matchingType. + */ + com.google.privacy.dlp.v2.MatchingType getMatchingType(); + + public com.google.privacy.dlp.v2.ExclusionRule.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldId.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldId.java new file mode 100644 index 000000000000..cc95f67691ef --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldId.java @@ -0,0 +1,595 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * General identifier of a data field in a storage service.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.FieldId} + */ +public final class FieldId extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.FieldId) + FieldIdOrBuilder { +private static final long serialVersionUID = 0L; + // Use FieldId.newBuilder() to construct. + private FieldId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FieldId() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FieldId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FieldId( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.FieldId.class, com.google.privacy.dlp.v2.FieldId.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Name describing the field.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Name describing the field.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.FieldId)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.FieldId other = (com.google.privacy.dlp.v2.FieldId) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.FieldId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FieldId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FieldId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FieldId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FieldId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FieldId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FieldId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.FieldId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * General identifier of a data field in a storage service.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.FieldId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.FieldId) + com.google.privacy.dlp.v2.FieldIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.FieldId.class, com.google.privacy.dlp.v2.FieldId.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.FieldId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.FieldId.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId build() { + com.google.privacy.dlp.v2.FieldId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId buildPartial() { + com.google.privacy.dlp.v2.FieldId result = new com.google.privacy.dlp.v2.FieldId(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.FieldId) { + return mergeFrom((com.google.privacy.dlp.v2.FieldId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.FieldId other) { + if (other == com.google.privacy.dlp.v2.FieldId.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.FieldId parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.FieldId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Name describing the field.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name describing the field.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name describing the field.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Name describing the field.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Name describing the field.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.FieldId) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.FieldId) + private static final com.google.privacy.dlp.v2.FieldId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.FieldId(); + } + + public static com.google.privacy.dlp.v2.FieldId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FieldId(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldIdOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldIdOrBuilder.java new file mode 100644 index 000000000000..336f51109283 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldIdOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface FieldIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.FieldId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name describing the field.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Name describing the field.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformation.java new file mode 100644 index 000000000000..5e42d622bc27 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformation.java @@ -0,0 +1,1856 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The transformation to apply to the field.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.FieldTransformation} + */ +public final class FieldTransformation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.FieldTransformation) + FieldTransformationOrBuilder { +private static final long serialVersionUID = 0L; + // Use FieldTransformation.newBuilder() to construct. + private FieldTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FieldTransformation() { + fields_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FieldTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FieldTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fields_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); + break; + } + case 26: { + com.google.privacy.dlp.v2.RecordCondition.Builder subBuilder = null; + if (condition_ != null) { + subBuilder = condition_.toBuilder(); + } + condition_ = input.readMessage(com.google.privacy.dlp.v2.RecordCondition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(condition_); + condition_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.privacy.dlp.v2.PrimitiveTransformation.Builder subBuilder = null; + if (transformationCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.PrimitiveTransformation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 4; + break; + } + case 42: { + com.google.privacy.dlp.v2.InfoTypeTransformations.Builder subBuilder = null; + if (transformationCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.InfoTypeTransformations.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 5; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.FieldTransformation.class, com.google.privacy.dlp.v2.FieldTransformation.Builder.class); + } + + private int transformationCase_ = 0; + private java.lang.Object transformation_; + public enum TransformationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PRIMITIVE_TRANSFORMATION(4), + INFO_TYPE_TRANSFORMATIONS(5), + TRANSFORMATION_NOT_SET(0); + private final int value; + private TransformationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformationCase valueOf(int value) { + return forNumber(value); + } + + public static TransformationCase forNumber(int value) { + switch (value) { + case 4: return PRIMITIVE_TRANSFORMATION; + case 5: return INFO_TYPE_TRANSFORMATIONS; + case 0: return TRANSFORMATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TransformationCase + getTransformationCase() { + return TransformationCase.forNumber( + transformationCase_); + } + + public static final int FIELDS_FIELD_NUMBER = 1; + private java.util.List fields_; + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getFieldsList() { + return fields_; + } + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getFieldsOrBuilderList() { + return fields_; + } + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getFieldsCount() { + return fields_.size(); + } + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getFields(int index) { + return fields_.get(index); + } + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldsOrBuilder( + int index) { + return fields_.get(index); + } + + public static final int CONDITION_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.RecordCondition condition_; + /** + *
+   * Only apply the transformation if the condition evaluates to true for the
+   * given `RecordCondition`. The conditions are allowed to reference fields
+   * that are not used in the actual transformation.
+   * Example Use Cases:
+   * - Apply a different bucket transformation to an age column if the zip code
+   * column for the same record is within a specific range.
+   * - Redact a field if the date of birth field is greater than 85.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return condition_ != null; + } + /** + *
+   * Only apply the transformation if the condition evaluates to true for the
+   * given `RecordCondition`. The conditions are allowed to reference fields
+   * that are not used in the actual transformation.
+   * Example Use Cases:
+   * - Apply a different bucket transformation to an age column if the zip code
+   * column for the same record is within a specific range.
+   * - Redact a field if the date of birth field is greater than 85.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + * @return The condition. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition getCondition() { + return condition_ == null ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; + } + /** + *
+   * Only apply the transformation if the condition evaluates to true for the
+   * given `RecordCondition`. The conditions are allowed to reference fields
+   * that are not used in the actual transformation.
+   * Example Use Cases:
+   * - Apply a different bucket transformation to an age column if the zip code
+   * column for the same record is within a specific range.
+   * - Redact a field if the date of birth field is greater than 85.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() { + return getCondition(); + } + + public static final int PRIMITIVE_TRANSFORMATION_FIELD_NUMBER = 4; + /** + *
+   * Apply the transformation to the entire field.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + * @return Whether the primitiveTransformation field is set. + */ + @java.lang.Override + public boolean hasPrimitiveTransformation() { + return transformationCase_ == 4; + } + /** + *
+   * Apply the transformation to the entire field.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + * @return The primitiveTransformation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_; + } + return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); + } + /** + *
+   * Apply the transformation to the entire field.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder() { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_; + } + return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); + } + + public static final int INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER = 5; + /** + *
+   * Treat the contents of the field as free text, and selectively
+   * transform content that matches an `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + * @return Whether the infoTypeTransformations field is set. + */ + @java.lang.Override + public boolean hasInfoTypeTransformations() { + return transformationCase_ == 5; + } + /** + *
+   * Treat the contents of the field as free text, and selectively
+   * transform content that matches an `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + * @return The infoTypeTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() { + if (transformationCase_ == 5) { + return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + /** + *
+   * Treat the contents of the field as free text, and selectively
+   * transform content that matches an `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder() { + if (transformationCase_ == 5) { + return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(1, fields_.get(i)); + } + if (condition_ != null) { + output.writeMessage(3, getCondition()); + } + if (transformationCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_); + } + if (transformationCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fields_.get(i)); + } + if (condition_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getCondition()); + } + if (transformationCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_); + } + if (transformationCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.FieldTransformation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.FieldTransformation other = (com.google.privacy.dlp.v2.FieldTransformation) obj; + + if (!getFieldsList() + .equals(other.getFieldsList())) return false; + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition() + .equals(other.getCondition())) return false; + } + if (!getTransformationCase().equals(other.getTransformationCase())) return false; + switch (transformationCase_) { + case 4: + if (!getPrimitiveTransformation() + .equals(other.getPrimitiveTransformation())) return false; + break; + case 5: + if (!getInfoTypeTransformations() + .equals(other.getInfoTypeTransformations())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + switch (transformationCase_) { + case 4: + hash = (37 * hash) + PRIMITIVE_TRANSFORMATION_FIELD_NUMBER; + hash = (53 * hash) + getPrimitiveTransformation().hashCode(); + break; + case 5: + hash = (37 * hash) + INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getInfoTypeTransformations().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.FieldTransformation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The transformation to apply to the field.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.FieldTransformation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.FieldTransformation) + com.google.privacy.dlp.v2.FieldTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.FieldTransformation.class, com.google.privacy.dlp.v2.FieldTransformation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.FieldTransformation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldsBuilder_.clear(); + } + if (conditionBuilder_ == null) { + condition_ = null; + } else { + condition_ = null; + conditionBuilder_ = null; + } + transformationCase_ = 0; + transformation_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FieldTransformation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FieldTransformation build() { + com.google.privacy.dlp.v2.FieldTransformation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FieldTransformation buildPartial() { + com.google.privacy.dlp.v2.FieldTransformation result = new com.google.privacy.dlp.v2.FieldTransformation(this); + int from_bitField0_ = bitField0_; + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + if (conditionBuilder_ == null) { + result.condition_ = condition_; + } else { + result.condition_ = conditionBuilder_.build(); + } + if (transformationCase_ == 4) { + if (primitiveTransformationBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = primitiveTransformationBuilder_.build(); + } + } + if (transformationCase_ == 5) { + if (infoTypeTransformationsBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = infoTypeTransformationsBuilder_.build(); + } + } + result.transformationCase_ = transformationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.FieldTransformation) { + return mergeFrom((com.google.privacy.dlp.v2.FieldTransformation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.FieldTransformation other) { + if (other == com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()) return this; + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFieldsFieldBuilder() : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + switch (other.getTransformationCase()) { + case PRIMITIVE_TRANSFORMATION: { + mergePrimitiveTransformation(other.getPrimitiveTransformation()); + break; + } + case INFO_TYPE_TRANSFORMATIONS: { + mergeInfoTypeTransformations(other.getInfoTypeTransformations()); + break; + } + case TRANSFORMATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.FieldTransformation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.FieldTransformation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int transformationCase_ = 0; + private java.lang.Object transformation_; + public TransformationCase + getTransformationCase() { + return TransformationCase.forNumber( + transformationCase_); + } + + public Builder clearTransformation() { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.util.List fields_ = + java.util.Collections.emptyList(); + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fields_ = new java.util.ArrayList(fields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldsBuilder_; + + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldId getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addFields(com.google.privacy.dlp.v2.FieldId value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addFields( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllFields( + java.lang.Iterable values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldsBuilder( + int index) { + return getFieldsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldsOrBuilder( + int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addFieldsBuilder() { + return getFieldsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addFieldsBuilder( + int index) { + return getFieldsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * Required. Input field(s) to apply the transformation to.
+     * When you have columns that reference their position within a list,
+     * omit the index from the FieldId. FieldId name matching ignores the index.
+     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getFieldsBuilderList() { + return getFieldsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + fields_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + private com.google.privacy.dlp.v2.RecordCondition condition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder> conditionBuilder_; + /** + *
+     * Only apply the transformation if the condition evaluates to true for the
+     * given `RecordCondition`. The conditions are allowed to reference fields
+     * that are not used in the actual transformation.
+     * Example Use Cases:
+     * - Apply a different bucket transformation to an age column if the zip code
+     * column for the same record is within a specific range.
+     * - Redact a field if the date of birth field is greater than 85.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return conditionBuilder_ != null || condition_ != null; + } + /** + *
+     * Only apply the transformation if the condition evaluates to true for the
+     * given `RecordCondition`. The conditions are allowed to reference fields
+     * that are not used in the actual transformation.
+     * Example Use Cases:
+     * - Apply a different bucket transformation to an age column if the zip code
+     * column for the same record is within a specific range.
+     * - Redact a field if the date of birth field is greater than 85.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + * @return The condition. + */ + public com.google.privacy.dlp.v2.RecordCondition getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + /** + *
+     * Only apply the transformation if the condition evaluates to true for the
+     * given `RecordCondition`. The conditions are allowed to reference fields
+     * that are not used in the actual transformation.
+     * Example Use Cases:
+     * - Apply a different bucket transformation to an age column if the zip code
+     * column for the same record is within a specific range.
+     * - Redact a field if the date of birth field is greater than 85.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + */ + public Builder setCondition(com.google.privacy.dlp.v2.RecordCondition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + onChanged(); + } else { + conditionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Only apply the transformation if the condition evaluates to true for the
+     * given `RecordCondition`. The conditions are allowed to reference fields
+     * that are not used in the actual transformation.
+     * Example Use Cases:
+     * - Apply a different bucket transformation to an age column if the zip code
+     * column for the same record is within a specific range.
+     * - Redact a field if the date of birth field is greater than 85.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + */ + public Builder setCondition( + com.google.privacy.dlp.v2.RecordCondition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + onChanged(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Only apply the transformation if the condition evaluates to true for the
+     * given `RecordCondition`. The conditions are allowed to reference fields
+     * that are not used in the actual transformation.
+     * Example Use Cases:
+     * - Apply a different bucket transformation to an age column if the zip code
+     * column for the same record is within a specific range.
+     * - Redact a field if the date of birth field is greater than 85.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + */ + public Builder mergeCondition(com.google.privacy.dlp.v2.RecordCondition value) { + if (conditionBuilder_ == null) { + if (condition_ != null) { + condition_ = + com.google.privacy.dlp.v2.RecordCondition.newBuilder(condition_).mergeFrom(value).buildPartial(); + } else { + condition_ = value; + } + onChanged(); + } else { + conditionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Only apply the transformation if the condition evaluates to true for the
+     * given `RecordCondition`. The conditions are allowed to reference fields
+     * that are not used in the actual transformation.
+     * Example Use Cases:
+     * - Apply a different bucket transformation to an age column if the zip code
+     * column for the same record is within a specific range.
+     * - Redact a field if the date of birth field is greater than 85.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + */ + public Builder clearCondition() { + if (conditionBuilder_ == null) { + condition_ = null; + onChanged(); + } else { + condition_ = null; + conditionBuilder_ = null; + } + + return this; + } + /** + *
+     * Only apply the transformation if the condition evaluates to true for the
+     * given `RecordCondition`. The conditions are allowed to reference fields
+     * that are not used in the actual transformation.
+     * Example Use Cases:
+     * - Apply a different bucket transformation to an age column if the zip code
+     * column for the same record is within a specific range.
+     * - Redact a field if the date of birth field is greater than 85.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + */ + public com.google.privacy.dlp.v2.RecordCondition.Builder getConditionBuilder() { + + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + /** + *
+     * Only apply the transformation if the condition evaluates to true for the
+     * given `RecordCondition`. The conditions are allowed to reference fields
+     * that are not used in the actual transformation.
+     * Example Use Cases:
+     * - Apply a different bucket transformation to an age column if the zip code
+     * column for the same record is within a specific range.
+     * - Redact a field if the date of birth field is greater than 85.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + */ + public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null ? + com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; + } + } + /** + *
+     * Only apply the transformation if the condition evaluates to true for the
+     * given `RecordCondition`. The conditions are allowed to reference fields
+     * that are not used in the actual transformation.
+     * Example Use Cases:
+     * - Apply a different bucket transformation to an age column if the zip code
+     * column for the same record is within a specific range.
+     * - Redact a field if the date of birth field is greater than 85.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder>( + getCondition(), + getParentForChildren(), + isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> primitiveTransformationBuilder_; + /** + *
+     * Apply the transformation to the entire field.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + * @return Whether the primitiveTransformation field is set. + */ + @java.lang.Override + public boolean hasPrimitiveTransformation() { + return transformationCase_ == 4; + } + /** + *
+     * Apply the transformation to the entire field.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + * @return The primitiveTransformation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() { + if (primitiveTransformationBuilder_ == null) { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_; + } + return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); + } else { + if (transformationCase_ == 4) { + return primitiveTransformationBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); + } + } + /** + *
+     * Apply the transformation to the entire field.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + */ + public Builder setPrimitiveTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { + if (primitiveTransformationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + primitiveTransformationBuilder_.setMessage(value); + } + transformationCase_ = 4; + return this; + } + /** + *
+     * Apply the transformation to the entire field.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + */ + public Builder setPrimitiveTransformation( + com.google.privacy.dlp.v2.PrimitiveTransformation.Builder builderForValue) { + if (primitiveTransformationBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + primitiveTransformationBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 4; + return this; + } + /** + *
+     * Apply the transformation to the entire field.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + */ + public Builder mergePrimitiveTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { + if (primitiveTransformationBuilder_ == null) { + if (transformationCase_ == 4 && + transformation_ != com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.PrimitiveTransformation.newBuilder((com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 4) { + primitiveTransformationBuilder_.mergeFrom(value); + } else { + primitiveTransformationBuilder_.setMessage(value); + } + } + transformationCase_ = 4; + return this; + } + /** + *
+     * Apply the transformation to the entire field.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + */ + public Builder clearPrimitiveTransformation() { + if (primitiveTransformationBuilder_ == null) { + if (transformationCase_ == 4) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 4) { + transformationCase_ = 0; + transformation_ = null; + } + primitiveTransformationBuilder_.clear(); + } + return this; + } + /** + *
+     * Apply the transformation to the entire field.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + */ + public com.google.privacy.dlp.v2.PrimitiveTransformation.Builder getPrimitiveTransformationBuilder() { + return getPrimitiveTransformationFieldBuilder().getBuilder(); + } + /** + *
+     * Apply the transformation to the entire field.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder() { + if ((transformationCase_ == 4) && (primitiveTransformationBuilder_ != null)) { + return primitiveTransformationBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_; + } + return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); + } + } + /** + *
+     * Apply the transformation to the entire field.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> + getPrimitiveTransformationFieldBuilder() { + if (primitiveTransformationBuilder_ == null) { + if (!(transformationCase_ == 4)) { + transformation_ = com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); + } + primitiveTransformationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder>( + (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 4; + onChanged();; + return primitiveTransformationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder> infoTypeTransformationsBuilder_; + /** + *
+     * Treat the contents of the field as free text, and selectively
+     * transform content that matches an `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + * @return Whether the infoTypeTransformations field is set. + */ + @java.lang.Override + public boolean hasInfoTypeTransformations() { + return transformationCase_ == 5; + } + /** + *
+     * Treat the contents of the field as free text, and selectively
+     * transform content that matches an `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + * @return The infoTypeTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() { + if (infoTypeTransformationsBuilder_ == null) { + if (transformationCase_ == 5) { + return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } else { + if (transformationCase_ == 5) { + return infoTypeTransformationsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + } + /** + *
+     * Treat the contents of the field as free text, and selectively
+     * transform content that matches an `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + */ + public Builder setInfoTypeTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations value) { + if (infoTypeTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + infoTypeTransformationsBuilder_.setMessage(value); + } + transformationCase_ = 5; + return this; + } + /** + *
+     * Treat the contents of the field as free text, and selectively
+     * transform content that matches an `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + */ + public Builder setInfoTypeTransformations( + com.google.privacy.dlp.v2.InfoTypeTransformations.Builder builderForValue) { + if (infoTypeTransformationsBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + infoTypeTransformationsBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 5; + return this; + } + /** + *
+     * Treat the contents of the field as free text, and selectively
+     * transform content that matches an `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + */ + public Builder mergeInfoTypeTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations value) { + if (infoTypeTransformationsBuilder_ == null) { + if (transformationCase_ == 5 && + transformation_ != com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.InfoTypeTransformations.newBuilder((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 5) { + infoTypeTransformationsBuilder_.mergeFrom(value); + } else { + infoTypeTransformationsBuilder_.setMessage(value); + } + } + transformationCase_ = 5; + return this; + } + /** + *
+     * Treat the contents of the field as free text, and selectively
+     * transform content that matches an `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + */ + public Builder clearInfoTypeTransformations() { + if (infoTypeTransformationsBuilder_ == null) { + if (transformationCase_ == 5) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 5) { + transformationCase_ = 0; + transformation_ = null; + } + infoTypeTransformationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Treat the contents of the field as free text, and selectively
+     * transform content that matches an `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + */ + public com.google.privacy.dlp.v2.InfoTypeTransformations.Builder getInfoTypeTransformationsBuilder() { + return getInfoTypeTransformationsFieldBuilder().getBuilder(); + } + /** + *
+     * Treat the contents of the field as free text, and selectively
+     * transform content that matches an `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder() { + if ((transformationCase_ == 5) && (infoTypeTransformationsBuilder_ != null)) { + return infoTypeTransformationsBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 5) { + return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; + } + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + } + /** + *
+     * Treat the contents of the field as free text, and selectively
+     * transform content that matches an `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder> + getInfoTypeTransformationsFieldBuilder() { + if (infoTypeTransformationsBuilder_ == null) { + if (!(transformationCase_ == 5)) { + transformation_ = com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + infoTypeTransformationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder>( + (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 5; + onChanged();; + return infoTypeTransformationsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.FieldTransformation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.FieldTransformation) + private static final com.google.privacy.dlp.v2.FieldTransformation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.FieldTransformation(); + } + + public static com.google.privacy.dlp.v2.FieldTransformation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FieldTransformation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FieldTransformation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformationOrBuilder.java new file mode 100644 index 000000000000..204347a7f553 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformationOrBuilder.java @@ -0,0 +1,172 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface FieldTransformationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.FieldTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getFieldsList(); + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.FieldId getFields(int index); + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getFieldsCount(); + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getFieldsOrBuilderList(); + /** + *
+   * Required. Input field(s) to apply the transformation to.
+   * When you have columns that reference their position within a list,
+   * omit the index from the FieldId. FieldId name matching ignores the index.
+   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldsOrBuilder( + int index); + + /** + *
+   * Only apply the transformation if the condition evaluates to true for the
+   * given `RecordCondition`. The conditions are allowed to reference fields
+   * that are not used in the actual transformation.
+   * Example Use Cases:
+   * - Apply a different bucket transformation to an age column if the zip code
+   * column for the same record is within a specific range.
+   * - Redact a field if the date of birth field is greater than 85.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + * @return Whether the condition field is set. + */ + boolean hasCondition(); + /** + *
+   * Only apply the transformation if the condition evaluates to true for the
+   * given `RecordCondition`. The conditions are allowed to reference fields
+   * that are not used in the actual transformation.
+   * Example Use Cases:
+   * - Apply a different bucket transformation to an age column if the zip code
+   * column for the same record is within a specific range.
+   * - Redact a field if the date of birth field is greater than 85.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + * @return The condition. + */ + com.google.privacy.dlp.v2.RecordCondition getCondition(); + /** + *
+   * Only apply the transformation if the condition evaluates to true for the
+   * given `RecordCondition`. The conditions are allowed to reference fields
+   * that are not used in the actual transformation.
+   * Example Use Cases:
+   * - Apply a different bucket transformation to an age column if the zip code
+   * column for the same record is within a specific range.
+   * - Redact a field if the date of birth field is greater than 85.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 3; + */ + com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder(); + + /** + *
+   * Apply the transformation to the entire field.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + * @return Whether the primitiveTransformation field is set. + */ + boolean hasPrimitiveTransformation(); + /** + *
+   * Apply the transformation to the entire field.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + * @return The primitiveTransformation. + */ + com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation(); + /** + *
+   * Apply the transformation to the entire field.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; + */ + com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder(); + + /** + *
+   * Treat the contents of the field as free text, and selectively
+   * transform content that matches an `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + * @return Whether the infoTypeTransformations field is set. + */ + boolean hasInfoTypeTransformations(); + /** + *
+   * Treat the contents of the field as free text, and selectively
+   * transform content that matches an `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + * @return The infoTypeTransformations. + */ + com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations(); + /** + *
+   * Treat the contents of the field as free text, and selectively
+   * transform content that matches an `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; + */ + com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder(); + + public com.google.privacy.dlp.v2.FieldTransformation.TransformationCase getTransformationCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java new file mode 100644 index 000000000000..e5b28b2daac4 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java @@ -0,0 +1,335 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Definitions of file type groups to scan. New types will be added to this
+ * list.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.FileType} + */ +public enum FileType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Includes all files.
+   * 
+ * + * FILE_TYPE_UNSPECIFIED = 0; + */ + FILE_TYPE_UNSPECIFIED(0), + /** + *
+   * Includes all file extensions not covered by another entry. Binary
+   * scanning attempts to convert the content of the file to utf_8 to scan
+   * the file.
+   * If you wish to avoid this fall back, specify one or more of the other
+   * FileType's in your storage scan.
+   * 
+ * + * BINARY_FILE = 1; + */ + BINARY_FILE(1), + /** + *
+   * Included file extensions:
+   *   asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart,
+   *   dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm,
+   *   mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht,
+   *   properties, py, pyw, rb, rbw, rs, rss,  rc, scala, sh, sql, swift, tex,
+   *   shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md,
+   *   txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml.
+   * 
+ * + * TEXT_FILE = 2; + */ + TEXT_FILE(2), + /** + *
+   * Included file extensions:
+   *   bmp, gif, jpg, jpeg, jpe, png.
+   * bytes_limit_per_file has no effect on image files.
+   * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
+   * 
+ * + * IMAGE = 3; + */ + IMAGE(3), + /** + *
+   * Word files >30 MB will be scanned as binary files.
+   * Included file extensions:
+   *   docx, dotx, docm, dotm
+   * 
+ * + * WORD = 5; + */ + WORD(5), + /** + *
+   * PDF files >30 MB will be scanned as binary files.
+   * Included file extensions:
+   *   pdf
+   * 
+ * + * PDF = 6; + */ + PDF(6), + /** + *
+   * Included file extensions:
+   *   avro
+   * 
+ * + * AVRO = 7; + */ + AVRO(7), + /** + *
+   * Included file extensions:
+   *   csv
+   * 
+ * + * CSV = 8; + */ + CSV(8), + /** + *
+   * Included file extensions:
+   *   tsv
+   * 
+ * + * TSV = 9; + */ + TSV(9), + /** + *
+   * Powerpoint files >30 MB will be scanned as binary files.
+   * Included file extensions:
+   *   pptx, pptm, potx, potm, pot
+   * 
+ * + * POWERPOINT = 11; + */ + POWERPOINT(11), + /** + *
+   * Excel files >30 MB will be scanned as binary files.
+   * Included file extensions:
+   *   xlsx, xlsm, xltx, xltm
+   * 
+ * + * EXCEL = 12; + */ + EXCEL(12), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Includes all files.
+   * 
+ * + * FILE_TYPE_UNSPECIFIED = 0; + */ + public static final int FILE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * Includes all file extensions not covered by another entry. Binary
+   * scanning attempts to convert the content of the file to utf_8 to scan
+   * the file.
+   * If you wish to avoid this fall back, specify one or more of the other
+   * FileType's in your storage scan.
+   * 
+ * + * BINARY_FILE = 1; + */ + public static final int BINARY_FILE_VALUE = 1; + /** + *
+   * Included file extensions:
+   *   asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart,
+   *   dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm,
+   *   mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht,
+   *   properties, py, pyw, rb, rbw, rs, rss,  rc, scala, sh, sql, swift, tex,
+   *   shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md,
+   *   txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml.
+   * 
+ * + * TEXT_FILE = 2; + */ + public static final int TEXT_FILE_VALUE = 2; + /** + *
+   * Included file extensions:
+   *   bmp, gif, jpg, jpeg, jpe, png.
+   * bytes_limit_per_file has no effect on image files.
+   * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
+   * 
+ * + * IMAGE = 3; + */ + public static final int IMAGE_VALUE = 3; + /** + *
+   * Word files >30 MB will be scanned as binary files.
+   * Included file extensions:
+   *   docx, dotx, docm, dotm
+   * 
+ * + * WORD = 5; + */ + public static final int WORD_VALUE = 5; + /** + *
+   * PDF files >30 MB will be scanned as binary files.
+   * Included file extensions:
+   *   pdf
+   * 
+ * + * PDF = 6; + */ + public static final int PDF_VALUE = 6; + /** + *
+   * Included file extensions:
+   *   avro
+   * 
+ * + * AVRO = 7; + */ + public static final int AVRO_VALUE = 7; + /** + *
+   * Included file extensions:
+   *   csv
+   * 
+ * + * CSV = 8; + */ + public static final int CSV_VALUE = 8; + /** + *
+   * Included file extensions:
+   *   tsv
+   * 
+ * + * TSV = 9; + */ + public static final int TSV_VALUE = 9; + /** + *
+   * Powerpoint files >30 MB will be scanned as binary files.
+   * Included file extensions:
+   *   pptx, pptm, potx, potm, pot
+   * 
+ * + * POWERPOINT = 11; + */ + public static final int POWERPOINT_VALUE = 11; + /** + *
+   * Excel files >30 MB will be scanned as binary files.
+   * Included file extensions:
+   *   xlsx, xlsm, xltx, xltm
+   * 
+ * + * EXCEL = 12; + */ + public static final int EXCEL_VALUE = 12; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FileType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FileType forNumber(int value) { + switch (value) { + case 0: return FILE_TYPE_UNSPECIFIED; + case 1: return BINARY_FILE; + case 2: return TEXT_FILE; + case 3: return IMAGE; + case 5: return WORD; + case 6: return PDF; + case 7: return AVRO; + case 8: return CSV; + case 9: return TSV; + case 11: return POWERPOINT; + case 12: return EXCEL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + FileType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FileType findValueByNumber(int number) { + return FileType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.getDescriptor().getEnumTypes().get(1); + } + + private static final FileType[] VALUES = values(); + + public static FileType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FileType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.FileType) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java new file mode 100644 index 000000000000..88fa787eeb98 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java @@ -0,0 +1,3228 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Represents a piece of potentially sensitive content.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Finding} + */ +public final class Finding extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Finding) + FindingOrBuilder { +private static final long serialVersionUID = 0L; + // Use Finding.newBuilder() to construct. + private Finding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Finding() { + name_ = ""; + quote_ = ""; + likelihood_ = 0; + resourceName_ = ""; + triggerName_ = ""; + jobName_ = ""; + findingId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Finding(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Finding( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + quote_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (infoType_ != null) { + subBuilder = infoType_.toBuilder(); + } + infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(infoType_); + infoType_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + int rawValue = input.readEnum(); + + likelihood_ = rawValue; + break; + } + case 34: { + com.google.privacy.dlp.v2.Location.Builder subBuilder = null; + if (location_ != null) { + subBuilder = location_.toBuilder(); + } + location_ = input.readMessage(com.google.privacy.dlp.v2.Location.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(location_); + location_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.privacy.dlp.v2.QuoteInfo.Builder subBuilder = null; + if (quoteInfo_ != null) { + subBuilder = quoteInfo_.toBuilder(); + } + quoteInfo_ = input.readMessage(com.google.privacy.dlp.v2.QuoteInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(quoteInfo_); + quoteInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + resourceName_ = s; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + triggerName_ = s; + break; + } + case 82: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 90: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (jobCreateTime_ != null) { + subBuilder = jobCreateTime_.toBuilder(); + } + jobCreateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobCreateTime_); + jobCreateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + java.lang.String s = input.readStringRequireUtf8(); + + jobName_ = s; + break; + } + case 114: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 122: { + java.lang.String s = input.readStringRequireUtf8(); + + findingId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 10: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Finding.class, com.google.privacy.dlp.v2.Finding.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 14; + private volatile java.lang.Object name_; + /** + *
+   * Resource name in format
+   * projects/{project}/locations/{location}/findings/{finding} Populated only
+   * when viewing persisted findings.
+   * 
+ * + * string name = 14; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Resource name in format
+   * projects/{project}/locations/{location}/findings/{finding} Populated only
+   * when viewing persisted findings.
+   * 
+ * + * string name = 14; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUOTE_FIELD_NUMBER = 1; + private volatile java.lang.Object quote_; + /** + *
+   * The content that was found. Even if the content is not textual, it
+   * may be converted to a textual representation here.
+   * Provided if `include_quote` is true and the finding is
+   * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+   * in length, the quote may be omitted.
+   * 
+ * + * string quote = 1; + * @return The quote. + */ + @java.lang.Override + public java.lang.String getQuote() { + java.lang.Object ref = quote_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + quote_ = s; + return s; + } + } + /** + *
+   * The content that was found. Even if the content is not textual, it
+   * may be converted to a textual representation here.
+   * Provided if `include_quote` is true and the finding is
+   * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+   * in length, the quote may be omitted.
+   * 
+ * + * string quote = 1; + * @return The bytes for quote. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQuoteBytes() { + java.lang.Object ref = quote_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + quote_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFO_TYPE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.InfoType infoType_; + /** + *
+   * The type of content that might have been found.
+   * Provided if `excluded_types` is false.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return infoType_ != null; + } + /** + *
+   * The type of content that might have been found.
+   * Provided if `excluded_types` is false.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + /** + *
+   * The type of content that might have been found.
+   * Provided if `excluded_types` is false.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + return getInfoType(); + } + + public static final int LIKELIHOOD_FIELD_NUMBER = 3; + private int likelihood_; + /** + *
+   * Confidence of how likely it is that the `info_type` is correct.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 3; + * @return The enum numeric value on the wire for likelihood. + */ + @java.lang.Override public int getLikelihoodValue() { + return likelihood_; + } + /** + *
+   * Confidence of how likely it is that the `info_type` is correct.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 3; + * @return The likelihood. + */ + @java.lang.Override public com.google.privacy.dlp.v2.Likelihood getLikelihood() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_); + return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; + } + + public static final int LOCATION_FIELD_NUMBER = 4; + private com.google.privacy.dlp.v2.Location location_; + /** + *
+   * Where the content was found.
+   * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return location_ != null; + } + /** + *
+   * Where the content was found.
+   * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + * @return The location. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Location getLocation() { + return location_ == null ? com.google.privacy.dlp.v2.Location.getDefaultInstance() : location_; + } + /** + *
+   * Where the content was found.
+   * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.LocationOrBuilder getLocationOrBuilder() { + return getLocation(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Timestamp when finding was detected.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Timestamp when finding was detected.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Timestamp when finding was detected.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int QUOTE_INFO_FIELD_NUMBER = 7; + private com.google.privacy.dlp.v2.QuoteInfo quoteInfo_; + /** + *
+   * Contains data parsed from quotes. Only populated if include_quote was set
+   * to true and a supported infoType was requested. Currently supported
+   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+   * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + * @return Whether the quoteInfo field is set. + */ + @java.lang.Override + public boolean hasQuoteInfo() { + return quoteInfo_ != null; + } + /** + *
+   * Contains data parsed from quotes. Only populated if include_quote was set
+   * to true and a supported infoType was requested. Currently supported
+   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+   * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + * @return The quoteInfo. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.QuoteInfo getQuoteInfo() { + return quoteInfo_ == null ? com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance() : quoteInfo_; + } + /** + *
+   * Contains data parsed from quotes. Only populated if include_quote was set
+   * to true and a supported infoType was requested. Currently supported
+   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+   * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.QuoteInfoOrBuilder getQuoteInfoOrBuilder() { + return getQuoteInfo(); + } + + public static final int RESOURCE_NAME_FIELD_NUMBER = 8; + private volatile java.lang.Object resourceName_; + /** + *
+   * The job that stored the finding.
+   * 
+ * + * string resource_name = 8 [(.google.api.resource_reference) = { ... } + * @return The resourceName. + */ + @java.lang.Override + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } + } + /** + *
+   * The job that stored the finding.
+   * 
+ * + * string resource_name = 8 [(.google.api.resource_reference) = { ... } + * @return The bytes for resourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRIGGER_NAME_FIELD_NUMBER = 9; + private volatile java.lang.Object triggerName_; + /** + *
+   * Job trigger name, if applicable, for this finding.
+   * 
+ * + * string trigger_name = 9 [(.google.api.resource_reference) = { ... } + * @return The triggerName. + */ + @java.lang.Override + public java.lang.String getTriggerName() { + java.lang.Object ref = triggerName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerName_ = s; + return s; + } + } + /** + *
+   * Job trigger name, if applicable, for this finding.
+   * 
+ * + * string trigger_name = 9 [(.google.api.resource_reference) = { ... } + * @return The bytes for triggerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTriggerNameBytes() { + java.lang.Object ref = triggerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + triggerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 10; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * The labels associated with this `Finding`.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 10; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * The labels associated with this `Finding`.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 10; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * The labels associated with this `Finding`.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 10; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The labels associated with this `Finding`.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 10; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int JOB_CREATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp jobCreateTime_; + /** + *
+   * Time the job started that produced this finding.
+   * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + * @return Whether the jobCreateTime field is set. + */ + @java.lang.Override + public boolean hasJobCreateTime() { + return jobCreateTime_ != null; + } + /** + *
+   * Time the job started that produced this finding.
+   * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + * @return The jobCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getJobCreateTime() { + return jobCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : jobCreateTime_; + } + /** + *
+   * Time the job started that produced this finding.
+   * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getJobCreateTimeOrBuilder() { + return getJobCreateTime(); + } + + public static final int JOB_NAME_FIELD_NUMBER = 13; + private volatile java.lang.Object jobName_; + /** + *
+   * The job that stored the finding.
+   * 
+ * + * string job_name = 13 [(.google.api.resource_reference) = { ... } + * @return The jobName. + */ + @java.lang.Override + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobName_ = s; + return s; + } + } + /** + *
+   * The job that stored the finding.
+   * 
+ * + * string job_name = 13 [(.google.api.resource_reference) = { ... } + * @return The bytes for jobName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FINDING_ID_FIELD_NUMBER = 15; + private volatile java.lang.Object findingId_; + /** + *
+   * The unique finding id.
+   * 
+ * + * string finding_id = 15; + * @return The findingId. + */ + @java.lang.Override + public java.lang.String getFindingId() { + java.lang.Object ref = findingId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + findingId_ = s; + return s; + } + } + /** + *
+   * The unique finding id.
+   * 
+ * + * string finding_id = 15; + * @return The bytes for findingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFindingIdBytes() { + java.lang.Object ref = findingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + findingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(quote_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, quote_); + } + if (infoType_ != null) { + output.writeMessage(2, getInfoType()); + } + if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { + output.writeEnum(3, likelihood_); + } + if (location_ != null) { + output.writeMessage(4, getLocation()); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (quoteInfo_ != null) { + output.writeMessage(7, getQuoteInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, resourceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, triggerName_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 10); + if (jobCreateTime_ != null) { + output.writeMessage(11, getJobCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, jobName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(findingId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, findingId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(quote_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, quote_); + } + if (infoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInfoType()); + } + if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, likelihood_); + } + if (location_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getLocation()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCreateTime()); + } + if (quoteInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getQuoteInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, resourceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, triggerName_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, labels__); + } + if (jobCreateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getJobCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, jobName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(findingId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, findingId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Finding)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Finding other = (com.google.privacy.dlp.v2.Finding) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getQuote() + .equals(other.getQuote())) return false; + if (hasInfoType() != other.hasInfoType()) return false; + if (hasInfoType()) { + if (!getInfoType() + .equals(other.getInfoType())) return false; + } + if (likelihood_ != other.likelihood_) return false; + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation() + .equals(other.getLocation())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasQuoteInfo() != other.hasQuoteInfo()) return false; + if (hasQuoteInfo()) { + if (!getQuoteInfo() + .equals(other.getQuoteInfo())) return false; + } + if (!getResourceName() + .equals(other.getResourceName())) return false; + if (!getTriggerName() + .equals(other.getTriggerName())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (hasJobCreateTime() != other.hasJobCreateTime()) return false; + if (hasJobCreateTime()) { + if (!getJobCreateTime() + .equals(other.getJobCreateTime())) return false; + } + if (!getJobName() + .equals(other.getJobName())) return false; + if (!getFindingId() + .equals(other.getFindingId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + QUOTE_FIELD_NUMBER; + hash = (53 * hash) + getQuote().hashCode(); + if (hasInfoType()) { + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + } + hash = (37 * hash) + LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + likelihood_; + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasQuoteInfo()) { + hash = (37 * hash) + QUOTE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getQuoteInfo().hashCode(); + } + hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getResourceName().hashCode(); + hash = (37 * hash) + TRIGGER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTriggerName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasJobCreateTime()) { + hash = (37 * hash) + JOB_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getJobCreateTime().hashCode(); + } + hash = (37 * hash) + JOB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getJobName().hashCode(); + hash = (37 * hash) + FINDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getFindingId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Finding parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Finding parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Finding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Finding parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Finding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Finding parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Finding parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Finding parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Finding parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Finding parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Finding parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Finding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Finding prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents a piece of potentially sensitive content.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Finding} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Finding) + com.google.privacy.dlp.v2.FindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 10: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 10: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Finding.class, com.google.privacy.dlp.v2.Finding.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Finding.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + quote_ = ""; + + if (infoTypeBuilder_ == null) { + infoType_ = null; + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + likelihood_ = 0; + + if (locationBuilder_ == null) { + location_ = null; + } else { + location_ = null; + locationBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (quoteInfoBuilder_ == null) { + quoteInfo_ = null; + } else { + quoteInfo_ = null; + quoteInfoBuilder_ = null; + } + resourceName_ = ""; + + triggerName_ = ""; + + internalGetMutableLabels().clear(); + if (jobCreateTimeBuilder_ == null) { + jobCreateTime_ = null; + } else { + jobCreateTime_ = null; + jobCreateTimeBuilder_ = null; + } + jobName_ = ""; + + findingId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Finding getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Finding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Finding build() { + com.google.privacy.dlp.v2.Finding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Finding buildPartial() { + com.google.privacy.dlp.v2.Finding result = new com.google.privacy.dlp.v2.Finding(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.quote_ = quote_; + if (infoTypeBuilder_ == null) { + result.infoType_ = infoType_; + } else { + result.infoType_ = infoTypeBuilder_.build(); + } + result.likelihood_ = likelihood_; + if (locationBuilder_ == null) { + result.location_ = location_; + } else { + result.location_ = locationBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (quoteInfoBuilder_ == null) { + result.quoteInfo_ = quoteInfo_; + } else { + result.quoteInfo_ = quoteInfoBuilder_.build(); + } + result.resourceName_ = resourceName_; + result.triggerName_ = triggerName_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (jobCreateTimeBuilder_ == null) { + result.jobCreateTime_ = jobCreateTime_; + } else { + result.jobCreateTime_ = jobCreateTimeBuilder_.build(); + } + result.jobName_ = jobName_; + result.findingId_ = findingId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Finding) { + return mergeFrom((com.google.privacy.dlp.v2.Finding)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Finding other) { + if (other == com.google.privacy.dlp.v2.Finding.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getQuote().isEmpty()) { + quote_ = other.quote_; + onChanged(); + } + if (other.hasInfoType()) { + mergeInfoType(other.getInfoType()); + } + if (other.likelihood_ != 0) { + setLikelihoodValue(other.getLikelihoodValue()); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasQuoteInfo()) { + mergeQuoteInfo(other.getQuoteInfo()); + } + if (!other.getResourceName().isEmpty()) { + resourceName_ = other.resourceName_; + onChanged(); + } + if (!other.getTriggerName().isEmpty()) { + triggerName_ = other.triggerName_; + onChanged(); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + if (other.hasJobCreateTime()) { + mergeJobCreateTime(other.getJobCreateTime()); + } + if (!other.getJobName().isEmpty()) { + jobName_ = other.jobName_; + onChanged(); + } + if (!other.getFindingId().isEmpty()) { + findingId_ = other.findingId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Finding parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Finding) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Resource name in format
+     * projects/{project}/locations/{location}/findings/{finding} Populated only
+     * when viewing persisted findings.
+     * 
+ * + * string name = 14; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Resource name in format
+     * projects/{project}/locations/{location}/findings/{finding} Populated only
+     * when viewing persisted findings.
+     * 
+ * + * string name = 14; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Resource name in format
+     * projects/{project}/locations/{location}/findings/{finding} Populated only
+     * when viewing persisted findings.
+     * 
+ * + * string name = 14; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Resource name in format
+     * projects/{project}/locations/{location}/findings/{finding} Populated only
+     * when viewing persisted findings.
+     * 
+ * + * string name = 14; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Resource name in format
+     * projects/{project}/locations/{location}/findings/{finding} Populated only
+     * when viewing persisted findings.
+     * 
+ * + * string name = 14; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object quote_ = ""; + /** + *
+     * The content that was found. Even if the content is not textual, it
+     * may be converted to a textual representation here.
+     * Provided if `include_quote` is true and the finding is
+     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+     * in length, the quote may be omitted.
+     * 
+ * + * string quote = 1; + * @return The quote. + */ + public java.lang.String getQuote() { + java.lang.Object ref = quote_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + quote_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The content that was found. Even if the content is not textual, it
+     * may be converted to a textual representation here.
+     * Provided if `include_quote` is true and the finding is
+     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+     * in length, the quote may be omitted.
+     * 
+ * + * string quote = 1; + * @return The bytes for quote. + */ + public com.google.protobuf.ByteString + getQuoteBytes() { + java.lang.Object ref = quote_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + quote_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The content that was found. Even if the content is not textual, it
+     * may be converted to a textual representation here.
+     * Provided if `include_quote` is true and the finding is
+     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+     * in length, the quote may be omitted.
+     * 
+ * + * string quote = 1; + * @param value The quote to set. + * @return This builder for chaining. + */ + public Builder setQuote( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + quote_ = value; + onChanged(); + return this; + } + /** + *
+     * The content that was found. Even if the content is not textual, it
+     * may be converted to a textual representation here.
+     * Provided if `include_quote` is true and the finding is
+     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+     * in length, the quote may be omitted.
+     * 
+ * + * string quote = 1; + * @return This builder for chaining. + */ + public Builder clearQuote() { + + quote_ = getDefaultInstance().getQuote(); + onChanged(); + return this; + } + /** + *
+     * The content that was found. Even if the content is not textual, it
+     * may be converted to a textual representation here.
+     * Provided if `include_quote` is true and the finding is
+     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+     * in length, the quote may be omitted.
+     * 
+ * + * string quote = 1; + * @param value The bytes for quote to set. + * @return This builder for chaining. + */ + public Builder setQuoteBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + quote_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.InfoType infoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+     * The type of content that might have been found.
+     * Provided if `excluded_types` is false.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return Whether the infoType field is set. + */ + public boolean hasInfoType() { + return infoTypeBuilder_ != null || infoType_ != null; + } + /** + *
+     * The type of content that might have been found.
+     * Provided if `excluded_types` is false.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return The infoType. + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } else { + return infoTypeBuilder_.getMessage(); + } + } + /** + *
+     * The type of content that might have been found.
+     * Provided if `excluded_types` is false.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infoType_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The type of content that might have been found.
+     * Provided if `excluded_types` is false.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + infoType_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The type of content that might have been found.
+     * Provided if `excluded_types` is false.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (infoType_ != null) { + infoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); + } else { + infoType_ = value; + } + onChanged(); + } else { + infoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The type of content that might have been found.
+     * Provided if `excluded_types` is false.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + infoType_ = null; + onChanged(); + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + + return this; + } + /** + *
+     * The type of content that might have been found.
+     * Provided if `excluded_types` is false.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + + onChanged(); + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * The type of content that might have been found.
+     * Provided if `excluded_types` is false.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (infoTypeBuilder_ != null) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + return infoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + } + /** + *
+     * The type of content that might have been found.
+     * Provided if `excluded_types` is false.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getInfoType(), + getParentForChildren(), + isClean()); + infoType_ = null; + } + return infoTypeBuilder_; + } + + private int likelihood_ = 0; + /** + *
+     * Confidence of how likely it is that the `info_type` is correct.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 3; + * @return The enum numeric value on the wire for likelihood. + */ + @java.lang.Override public int getLikelihoodValue() { + return likelihood_; + } + /** + *
+     * Confidence of how likely it is that the `info_type` is correct.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 3; + * @param value The enum numeric value on the wire for likelihood to set. + * @return This builder for chaining. + */ + public Builder setLikelihoodValue(int value) { + + likelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Confidence of how likely it is that the `info_type` is correct.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 3; + * @return The likelihood. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Likelihood getLikelihood() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_); + return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Confidence of how likely it is that the `info_type` is correct.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 3; + * @param value The likelihood to set. + * @return This builder for chaining. + */ + public Builder setLikelihood(com.google.privacy.dlp.v2.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + likelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Confidence of how likely it is that the `info_type` is correct.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 3; + * @return This builder for chaining. + */ + public Builder clearLikelihood() { + + likelihood_ = 0; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.Location location_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Location, com.google.privacy.dlp.v2.Location.Builder, com.google.privacy.dlp.v2.LocationOrBuilder> locationBuilder_; + /** + *
+     * Where the content was found.
+     * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return locationBuilder_ != null || location_ != null; + } + /** + *
+     * Where the content was found.
+     * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + * @return The location. + */ + public com.google.privacy.dlp.v2.Location getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? com.google.privacy.dlp.v2.Location.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + *
+     * Where the content was found.
+     * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + */ + public Builder setLocation(com.google.privacy.dlp.v2.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + locationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Where the content was found.
+     * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + */ + public Builder setLocation( + com.google.privacy.dlp.v2.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Where the content was found.
+     * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + */ + public Builder mergeLocation(com.google.privacy.dlp.v2.Location value) { + if (locationBuilder_ == null) { + if (location_ != null) { + location_ = + com.google.privacy.dlp.v2.Location.newBuilder(location_).mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + locationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Where the content was found.
+     * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + location_ = null; + onChanged(); + } else { + location_ = null; + locationBuilder_ = null; + } + + return this; + } + /** + *
+     * Where the content was found.
+     * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + */ + public com.google.privacy.dlp.v2.Location.Builder getLocationBuilder() { + + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + *
+     * Where the content was found.
+     * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + */ + public com.google.privacy.dlp.v2.LocationOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? + com.google.privacy.dlp.v2.Location.getDefaultInstance() : location_; + } + } + /** + *
+     * Where the content was found.
+     * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Location, com.google.privacy.dlp.v2.Location.Builder, com.google.privacy.dlp.v2.LocationOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Location, com.google.privacy.dlp.v2.Location.Builder, com.google.privacy.dlp.v2.LocationOrBuilder>( + getLocation(), + getParentForChildren(), + isClean()); + location_ = null; + } + return locationBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Timestamp when finding was detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Timestamp when finding was detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp when finding was detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp when finding was detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp when finding was detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp when finding was detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp when finding was detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp when finding was detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Timestamp when finding was detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.privacy.dlp.v2.QuoteInfo quoteInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.QuoteInfo, com.google.privacy.dlp.v2.QuoteInfo.Builder, com.google.privacy.dlp.v2.QuoteInfoOrBuilder> quoteInfoBuilder_; + /** + *
+     * Contains data parsed from quotes. Only populated if include_quote was set
+     * to true and a supported infoType was requested. Currently supported
+     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+     * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + * @return Whether the quoteInfo field is set. + */ + public boolean hasQuoteInfo() { + return quoteInfoBuilder_ != null || quoteInfo_ != null; + } + /** + *
+     * Contains data parsed from quotes. Only populated if include_quote was set
+     * to true and a supported infoType was requested. Currently supported
+     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+     * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + * @return The quoteInfo. + */ + public com.google.privacy.dlp.v2.QuoteInfo getQuoteInfo() { + if (quoteInfoBuilder_ == null) { + return quoteInfo_ == null ? com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance() : quoteInfo_; + } else { + return quoteInfoBuilder_.getMessage(); + } + } + /** + *
+     * Contains data parsed from quotes. Only populated if include_quote was set
+     * to true and a supported infoType was requested. Currently supported
+     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+     * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + */ + public Builder setQuoteInfo(com.google.privacy.dlp.v2.QuoteInfo value) { + if (quoteInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + quoteInfo_ = value; + onChanged(); + } else { + quoteInfoBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Contains data parsed from quotes. Only populated if include_quote was set
+     * to true and a supported infoType was requested. Currently supported
+     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+     * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + */ + public Builder setQuoteInfo( + com.google.privacy.dlp.v2.QuoteInfo.Builder builderForValue) { + if (quoteInfoBuilder_ == null) { + quoteInfo_ = builderForValue.build(); + onChanged(); + } else { + quoteInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Contains data parsed from quotes. Only populated if include_quote was set
+     * to true and a supported infoType was requested. Currently supported
+     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+     * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + */ + public Builder mergeQuoteInfo(com.google.privacy.dlp.v2.QuoteInfo value) { + if (quoteInfoBuilder_ == null) { + if (quoteInfo_ != null) { + quoteInfo_ = + com.google.privacy.dlp.v2.QuoteInfo.newBuilder(quoteInfo_).mergeFrom(value).buildPartial(); + } else { + quoteInfo_ = value; + } + onChanged(); + } else { + quoteInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Contains data parsed from quotes. Only populated if include_quote was set
+     * to true and a supported infoType was requested. Currently supported
+     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+     * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + */ + public Builder clearQuoteInfo() { + if (quoteInfoBuilder_ == null) { + quoteInfo_ = null; + onChanged(); + } else { + quoteInfo_ = null; + quoteInfoBuilder_ = null; + } + + return this; + } + /** + *
+     * Contains data parsed from quotes. Only populated if include_quote was set
+     * to true and a supported infoType was requested. Currently supported
+     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+     * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + */ + public com.google.privacy.dlp.v2.QuoteInfo.Builder getQuoteInfoBuilder() { + + onChanged(); + return getQuoteInfoFieldBuilder().getBuilder(); + } + /** + *
+     * Contains data parsed from quotes. Only populated if include_quote was set
+     * to true and a supported infoType was requested. Currently supported
+     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+     * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + */ + public com.google.privacy.dlp.v2.QuoteInfoOrBuilder getQuoteInfoOrBuilder() { + if (quoteInfoBuilder_ != null) { + return quoteInfoBuilder_.getMessageOrBuilder(); + } else { + return quoteInfo_ == null ? + com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance() : quoteInfo_; + } + } + /** + *
+     * Contains data parsed from quotes. Only populated if include_quote was set
+     * to true and a supported infoType was requested. Currently supported
+     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+     * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.QuoteInfo, com.google.privacy.dlp.v2.QuoteInfo.Builder, com.google.privacy.dlp.v2.QuoteInfoOrBuilder> + getQuoteInfoFieldBuilder() { + if (quoteInfoBuilder_ == null) { + quoteInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.QuoteInfo, com.google.privacy.dlp.v2.QuoteInfo.Builder, com.google.privacy.dlp.v2.QuoteInfoOrBuilder>( + getQuoteInfo(), + getParentForChildren(), + isClean()); + quoteInfo_ = null; + } + return quoteInfoBuilder_; + } + + private java.lang.Object resourceName_ = ""; + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string resource_name = 8 [(.google.api.resource_reference) = { ... } + * @return The resourceName. + */ + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string resource_name = 8 [(.google.api.resource_reference) = { ... } + * @return The bytes for resourceName. + */ + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string resource_name = 8 [(.google.api.resource_reference) = { ... } + * @param value The resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceName_ = value; + onChanged(); + return this; + } + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string resource_name = 8 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearResourceName() { + + resourceName_ = getDefaultInstance().getResourceName(); + onChanged(); + return this; + } + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string resource_name = 8 [(.google.api.resource_reference) = { ... } + * @param value The bytes for resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object triggerName_ = ""; + /** + *
+     * Job trigger name, if applicable, for this finding.
+     * 
+ * + * string trigger_name = 9 [(.google.api.resource_reference) = { ... } + * @return The triggerName. + */ + public java.lang.String getTriggerName() { + java.lang.Object ref = triggerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + triggerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Job trigger name, if applicable, for this finding.
+     * 
+ * + * string trigger_name = 9 [(.google.api.resource_reference) = { ... } + * @return The bytes for triggerName. + */ + public com.google.protobuf.ByteString + getTriggerNameBytes() { + java.lang.Object ref = triggerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + triggerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Job trigger name, if applicable, for this finding.
+     * 
+ * + * string trigger_name = 9 [(.google.api.resource_reference) = { ... } + * @param value The triggerName to set. + * @return This builder for chaining. + */ + public Builder setTriggerName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + triggerName_ = value; + onChanged(); + return this; + } + /** + *
+     * Job trigger name, if applicable, for this finding.
+     * 
+ * + * string trigger_name = 9 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearTriggerName() { + + triggerName_ = getDefaultInstance().getTriggerName(); + onChanged(); + return this; + } + /** + *
+     * Job trigger name, if applicable, for this finding.
+     * 
+ * + * string trigger_name = 9 [(.google.api.resource_reference) = { ... } + * @param value The bytes for triggerName to set. + * @return This builder for chaining. + */ + public Builder setTriggerNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + triggerName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * The labels associated with this `Finding`.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 10; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * The labels associated with this `Finding`.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 10; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * The labels associated with this `Finding`.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 10; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The labels associated with this `Finding`.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 10; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * The labels associated with this `Finding`.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 10; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * The labels associated with this `Finding`.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 10; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * The labels associated with this `Finding`.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 10; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.Timestamp jobCreateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> jobCreateTimeBuilder_; + /** + *
+     * Time the job started that produced this finding.
+     * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + * @return Whether the jobCreateTime field is set. + */ + public boolean hasJobCreateTime() { + return jobCreateTimeBuilder_ != null || jobCreateTime_ != null; + } + /** + *
+     * Time the job started that produced this finding.
+     * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + * @return The jobCreateTime. + */ + public com.google.protobuf.Timestamp getJobCreateTime() { + if (jobCreateTimeBuilder_ == null) { + return jobCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : jobCreateTime_; + } else { + return jobCreateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time the job started that produced this finding.
+     * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + */ + public Builder setJobCreateTime(com.google.protobuf.Timestamp value) { + if (jobCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobCreateTime_ = value; + onChanged(); + } else { + jobCreateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time the job started that produced this finding.
+     * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + */ + public Builder setJobCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (jobCreateTimeBuilder_ == null) { + jobCreateTime_ = builderForValue.build(); + onChanged(); + } else { + jobCreateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time the job started that produced this finding.
+     * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + */ + public Builder mergeJobCreateTime(com.google.protobuf.Timestamp value) { + if (jobCreateTimeBuilder_ == null) { + if (jobCreateTime_ != null) { + jobCreateTime_ = + com.google.protobuf.Timestamp.newBuilder(jobCreateTime_).mergeFrom(value).buildPartial(); + } else { + jobCreateTime_ = value; + } + onChanged(); + } else { + jobCreateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time the job started that produced this finding.
+     * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + */ + public Builder clearJobCreateTime() { + if (jobCreateTimeBuilder_ == null) { + jobCreateTime_ = null; + onChanged(); + } else { + jobCreateTime_ = null; + jobCreateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Time the job started that produced this finding.
+     * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + */ + public com.google.protobuf.Timestamp.Builder getJobCreateTimeBuilder() { + + onChanged(); + return getJobCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time the job started that produced this finding.
+     * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + */ + public com.google.protobuf.TimestampOrBuilder getJobCreateTimeOrBuilder() { + if (jobCreateTimeBuilder_ != null) { + return jobCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return jobCreateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : jobCreateTime_; + } + } + /** + *
+     * Time the job started that produced this finding.
+     * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getJobCreateTimeFieldBuilder() { + if (jobCreateTimeBuilder_ == null) { + jobCreateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getJobCreateTime(), + getParentForChildren(), + isClean()); + jobCreateTime_ = null; + } + return jobCreateTimeBuilder_; + } + + private java.lang.Object jobName_ = ""; + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string job_name = 13 [(.google.api.resource_reference) = { ... } + * @return The jobName. + */ + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string job_name = 13 [(.google.api.resource_reference) = { ... } + * @return The bytes for jobName. + */ + public com.google.protobuf.ByteString + getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string job_name = 13 [(.google.api.resource_reference) = { ... } + * @param value The jobName to set. + * @return This builder for chaining. + */ + public Builder setJobName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobName_ = value; + onChanged(); + return this; + } + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string job_name = 13 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearJobName() { + + jobName_ = getDefaultInstance().getJobName(); + onChanged(); + return this; + } + /** + *
+     * The job that stored the finding.
+     * 
+ * + * string job_name = 13 [(.google.api.resource_reference) = { ... } + * @param value The bytes for jobName to set. + * @return This builder for chaining. + */ + public Builder setJobNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobName_ = value; + onChanged(); + return this; + } + + private java.lang.Object findingId_ = ""; + /** + *
+     * The unique finding id.
+     * 
+ * + * string finding_id = 15; + * @return The findingId. + */ + public java.lang.String getFindingId() { + java.lang.Object ref = findingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + findingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The unique finding id.
+     * 
+ * + * string finding_id = 15; + * @return The bytes for findingId. + */ + public com.google.protobuf.ByteString + getFindingIdBytes() { + java.lang.Object ref = findingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + findingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The unique finding id.
+     * 
+ * + * string finding_id = 15; + * @param value The findingId to set. + * @return This builder for chaining. + */ + public Builder setFindingId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + findingId_ = value; + onChanged(); + return this; + } + /** + *
+     * The unique finding id.
+     * 
+ * + * string finding_id = 15; + * @return This builder for chaining. + */ + public Builder clearFindingId() { + + findingId_ = getDefaultInstance().getFindingId(); + onChanged(); + return this; + } + /** + *
+     * The unique finding id.
+     * 
+ * + * string finding_id = 15; + * @param value The bytes for findingId to set. + * @return This builder for chaining. + */ + public Builder setFindingIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + findingId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Finding) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Finding) + private static final com.google.privacy.dlp.v2.Finding DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Finding(); + } + + public static com.google.privacy.dlp.v2.Finding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Finding parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Finding(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Finding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java new file mode 100644 index 000000000000..2785b2604b3c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java @@ -0,0 +1,400 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface FindingOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Finding) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Resource name in format
+   * projects/{project}/locations/{location}/findings/{finding} Populated only
+   * when viewing persisted findings.
+   * 
+ * + * string name = 14; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Resource name in format
+   * projects/{project}/locations/{location}/findings/{finding} Populated only
+   * when viewing persisted findings.
+   * 
+ * + * string name = 14; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The content that was found. Even if the content is not textual, it
+   * may be converted to a textual representation here.
+   * Provided if `include_quote` is true and the finding is
+   * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+   * in length, the quote may be omitted.
+   * 
+ * + * string quote = 1; + * @return The quote. + */ + java.lang.String getQuote(); + /** + *
+   * The content that was found. Even if the content is not textual, it
+   * may be converted to a textual representation here.
+   * Provided if `include_quote` is true and the finding is
+   * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
+   * in length, the quote may be omitted.
+   * 
+ * + * string quote = 1; + * @return The bytes for quote. + */ + com.google.protobuf.ByteString + getQuoteBytes(); + + /** + *
+   * The type of content that might have been found.
+   * Provided if `excluded_types` is false.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+   * The type of content that might have been found.
+   * Provided if `excluded_types` is false.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+   * The type of content that might have been found.
+   * Provided if `excluded_types` is false.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+   * Confidence of how likely it is that the `info_type` is correct.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 3; + * @return The enum numeric value on the wire for likelihood. + */ + int getLikelihoodValue(); + /** + *
+   * Confidence of how likely it is that the `info_type` is correct.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood likelihood = 3; + * @return The likelihood. + */ + com.google.privacy.dlp.v2.Likelihood getLikelihood(); + + /** + *
+   * Where the content was found.
+   * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + * @return Whether the location field is set. + */ + boolean hasLocation(); + /** + *
+   * Where the content was found.
+   * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + * @return The location. + */ + com.google.privacy.dlp.v2.Location getLocation(); + /** + *
+   * Where the content was found.
+   * 
+ * + * .google.privacy.dlp.v2.Location location = 4; + */ + com.google.privacy.dlp.v2.LocationOrBuilder getLocationOrBuilder(); + + /** + *
+   * Timestamp when finding was detected.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Timestamp when finding was detected.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Timestamp when finding was detected.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Contains data parsed from quotes. Only populated if include_quote was set
+   * to true and a supported infoType was requested. Currently supported
+   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+   * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + * @return Whether the quoteInfo field is set. + */ + boolean hasQuoteInfo(); + /** + *
+   * Contains data parsed from quotes. Only populated if include_quote was set
+   * to true and a supported infoType was requested. Currently supported
+   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+   * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + * @return The quoteInfo. + */ + com.google.privacy.dlp.v2.QuoteInfo getQuoteInfo(); + /** + *
+   * Contains data parsed from quotes. Only populated if include_quote was set
+   * to true and a supported infoType was requested. Currently supported
+   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
+   * 
+ * + * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; + */ + com.google.privacy.dlp.v2.QuoteInfoOrBuilder getQuoteInfoOrBuilder(); + + /** + *
+   * The job that stored the finding.
+   * 
+ * + * string resource_name = 8 [(.google.api.resource_reference) = { ... } + * @return The resourceName. + */ + java.lang.String getResourceName(); + /** + *
+   * The job that stored the finding.
+   * 
+ * + * string resource_name = 8 [(.google.api.resource_reference) = { ... } + * @return The bytes for resourceName. + */ + com.google.protobuf.ByteString + getResourceNameBytes(); + + /** + *
+   * Job trigger name, if applicable, for this finding.
+   * 
+ * + * string trigger_name = 9 [(.google.api.resource_reference) = { ... } + * @return The triggerName. + */ + java.lang.String getTriggerName(); + /** + *
+   * Job trigger name, if applicable, for this finding.
+   * 
+ * + * string trigger_name = 9 [(.google.api.resource_reference) = { ... } + * @return The bytes for triggerName. + */ + com.google.protobuf.ByteString + getTriggerNameBytes(); + + /** + *
+   * The labels associated with this `Finding`.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 10; + */ + int getLabelsCount(); + /** + *
+   * The labels associated with this `Finding`.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 10; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * The labels associated with this `Finding`.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 10; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * The labels associated with this `Finding`.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 10; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * The labels associated with this `Finding`.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 10; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Time the job started that produced this finding.
+   * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + * @return Whether the jobCreateTime field is set. + */ + boolean hasJobCreateTime(); + /** + *
+   * Time the job started that produced this finding.
+   * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + * @return The jobCreateTime. + */ + com.google.protobuf.Timestamp getJobCreateTime(); + /** + *
+   * Time the job started that produced this finding.
+   * 
+ * + * .google.protobuf.Timestamp job_create_time = 11; + */ + com.google.protobuf.TimestampOrBuilder getJobCreateTimeOrBuilder(); + + /** + *
+   * The job that stored the finding.
+   * 
+ * + * string job_name = 13 [(.google.api.resource_reference) = { ... } + * @return The jobName. + */ + java.lang.String getJobName(); + /** + *
+   * The job that stored the finding.
+   * 
+ * + * string job_name = 13 [(.google.api.resource_reference) = { ... } + * @return The bytes for jobName. + */ + com.google.protobuf.ByteString + getJobNameBytes(); + + /** + *
+   * The unique finding id.
+   * 
+ * + * string finding_id = 15; + * @return The findingId. + */ + java.lang.String getFindingId(); + /** + *
+   * The unique finding id.
+   * 
+ * + * string finding_id = 15; + * @return The bytes for findingId. + */ + com.google.protobuf.ByteString + getFindingIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequest.java new file mode 100644 index 000000000000..d788c5fdaf53 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequest.java @@ -0,0 +1,595 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The request message for finishing a DLP hybrid job.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.FinishDlpJobRequest} + */ +public final class FinishDlpJobRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.FinishDlpJobRequest) + FinishDlpJobRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use FinishDlpJobRequest.newBuilder() to construct. + private FinishDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FinishDlpJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FinishDlpJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FinishDlpJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.FinishDlpJobRequest.class, com.google.privacy.dlp.v2.FinishDlpJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the DlpJob resource to be cancelled.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the DlpJob resource to be cancelled.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.FinishDlpJobRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.FinishDlpJobRequest other = (com.google.privacy.dlp.v2.FinishDlpJobRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.FinishDlpJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The request message for finishing a DLP hybrid job.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.FinishDlpJobRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.FinishDlpJobRequest) + com.google.privacy.dlp.v2.FinishDlpJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.FinishDlpJobRequest.class, com.google.privacy.dlp.v2.FinishDlpJobRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.FinishDlpJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FinishDlpJobRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.FinishDlpJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FinishDlpJobRequest build() { + com.google.privacy.dlp.v2.FinishDlpJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FinishDlpJobRequest buildPartial() { + com.google.privacy.dlp.v2.FinishDlpJobRequest result = new com.google.privacy.dlp.v2.FinishDlpJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.FinishDlpJobRequest) { + return mergeFrom((com.google.privacy.dlp.v2.FinishDlpJobRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.FinishDlpJobRequest other) { + if (other == com.google.privacy.dlp.v2.FinishDlpJobRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.FinishDlpJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.FinishDlpJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the DlpJob resource to be cancelled.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.FinishDlpJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.FinishDlpJobRequest) + private static final com.google.privacy.dlp.v2.FinishDlpJobRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.FinishDlpJobRequest(); + } + + public static com.google.privacy.dlp.v2.FinishDlpJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FinishDlpJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FinishDlpJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FinishDlpJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequestOrBuilder.java new file mode 100644 index 000000000000..35fac50bb4f3 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface FinishDlpJobRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.FinishDlpJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the DlpJob resource to be cancelled.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the DlpJob resource to be cancelled.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java new file mode 100644 index 000000000000..53c5efc19b9b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java @@ -0,0 +1,1065 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Buckets values based on fixed size ranges. The
+ * Bucketing transformation can provide all of this functionality,
+ * but requires more configuration. This message is provided as a convenience to
+ * the user for simple bucketing strategies.
+ * The transformed value will be a hyphenated string of
+ * {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and upper_bound
+ * = 20, all values that are within this bucket will be replaced with "10-20".
+ * This can be used on data of type: double, long.
+ * If the bound Value type differs from the type of data
+ * being transformed, we will first attempt converting the type of the data to
+ * be transformed to match the type of the bound before comparing.
+ * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.FixedSizeBucketingConfig} + */ +public final class FixedSizeBucketingConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.FixedSizeBucketingConfig) + FixedSizeBucketingConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use FixedSizeBucketingConfig.newBuilder() to construct. + private FixedSizeBucketingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FixedSizeBucketingConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FixedSizeBucketingConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FixedSizeBucketingConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (lowerBound_ != null) { + subBuilder = lowerBound_.toBuilder(); + } + lowerBound_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lowerBound_); + lowerBound_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (upperBound_ != null) { + subBuilder = upperBound_.toBuilder(); + } + upperBound_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(upperBound_); + upperBound_ = subBuilder.buildPartial(); + } + + break; + } + case 25: { + + bucketSize_ = input.readDouble(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.FixedSizeBucketingConfig.class, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder.class); + } + + public static final int LOWER_BOUND_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.Value lowerBound_; + /** + *
+   * Required. Lower bound value of buckets. All values less than `lower_bound` are
+   * grouped together into a single bucket; for example if `lower_bound` = 10,
+   * then all values less than 10 are replaced with the value "-10".
+   * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the lowerBound field is set. + */ + @java.lang.Override + public boolean hasLowerBound() { + return lowerBound_ != null; + } + /** + *
+   * Required. Lower bound value of buckets. All values less than `lower_bound` are
+   * grouped together into a single bucket; for example if `lower_bound` = 10,
+   * then all values less than 10 are replaced with the value "-10".
+   * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The lowerBound. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getLowerBound() { + return lowerBound_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : lowerBound_; + } + /** + *
+   * Required. Lower bound value of buckets. All values less than `lower_bound` are
+   * grouped together into a single bucket; for example if `lower_bound` = 10,
+   * then all values less than 10 are replaced with the value "-10".
+   * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getLowerBoundOrBuilder() { + return getLowerBound(); + } + + public static final int UPPER_BOUND_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.Value upperBound_; + /** + *
+   * Required. Upper bound value of buckets. All values greater than upper_bound are
+   * grouped together into a single bucket; for example if `upper_bound` = 89,
+   * then all values greater than 89 are replaced with the value "89+".
+   * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the upperBound field is set. + */ + @java.lang.Override + public boolean hasUpperBound() { + return upperBound_ != null; + } + /** + *
+   * Required. Upper bound value of buckets. All values greater than upper_bound are
+   * grouped together into a single bucket; for example if `upper_bound` = 89,
+   * then all values greater than 89 are replaced with the value "89+".
+   * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The upperBound. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getUpperBound() { + return upperBound_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : upperBound_; + } + /** + *
+   * Required. Upper bound value of buckets. All values greater than upper_bound are
+   * grouped together into a single bucket; for example if `upper_bound` = 89,
+   * then all values greater than 89 are replaced with the value "89+".
+   * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getUpperBoundOrBuilder() { + return getUpperBound(); + } + + public static final int BUCKET_SIZE_FIELD_NUMBER = 3; + private double bucketSize_; + /** + *
+   * Required. Size of each bucket (except for minimum and maximum buckets). So if
+   * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
+   * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
+   * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
+   * 
+ * + * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bucketSize. + */ + @java.lang.Override + public double getBucketSize() { + return bucketSize_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (lowerBound_ != null) { + output.writeMessage(1, getLowerBound()); + } + if (upperBound_ != null) { + output.writeMessage(2, getUpperBound()); + } + if (java.lang.Double.doubleToRawLongBits(bucketSize_) != 0) { + output.writeDouble(3, bucketSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lowerBound_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLowerBound()); + } + if (upperBound_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpperBound()); + } + if (java.lang.Double.doubleToRawLongBits(bucketSize_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, bucketSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.FixedSizeBucketingConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.FixedSizeBucketingConfig other = (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) obj; + + if (hasLowerBound() != other.hasLowerBound()) return false; + if (hasLowerBound()) { + if (!getLowerBound() + .equals(other.getLowerBound())) return false; + } + if (hasUpperBound() != other.hasUpperBound()) return false; + if (hasUpperBound()) { + if (!getUpperBound() + .equals(other.getUpperBound())) return false; + } + if (java.lang.Double.doubleToLongBits(getBucketSize()) + != java.lang.Double.doubleToLongBits( + other.getBucketSize())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLowerBound()) { + hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + getLowerBound().hashCode(); + } + if (hasUpperBound()) { + hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; + hash = (53 * hash) + getUpperBound().hashCode(); + } + hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBucketSize())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.FixedSizeBucketingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Buckets values based on fixed size ranges. The
+   * Bucketing transformation can provide all of this functionality,
+   * but requires more configuration. This message is provided as a convenience to
+   * the user for simple bucketing strategies.
+   * The transformed value will be a hyphenated string of
+   * {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and upper_bound
+   * = 20, all values that are within this bucket will be replaced with "10-20".
+   * This can be used on data of type: double, long.
+   * If the bound Value type differs from the type of data
+   * being transformed, we will first attempt converting the type of the data to
+   * be transformed to match the type of the bound before comparing.
+   * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.FixedSizeBucketingConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.FixedSizeBucketingConfig) + com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.FixedSizeBucketingConfig.class, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.FixedSizeBucketingConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (lowerBoundBuilder_ == null) { + lowerBound_ = null; + } else { + lowerBound_ = null; + lowerBoundBuilder_ = null; + } + if (upperBoundBuilder_ == null) { + upperBound_ = null; + } else { + upperBound_ = null; + upperBoundBuilder_ = null; + } + bucketSize_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FixedSizeBucketingConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FixedSizeBucketingConfig build() { + com.google.privacy.dlp.v2.FixedSizeBucketingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FixedSizeBucketingConfig buildPartial() { + com.google.privacy.dlp.v2.FixedSizeBucketingConfig result = new com.google.privacy.dlp.v2.FixedSizeBucketingConfig(this); + if (lowerBoundBuilder_ == null) { + result.lowerBound_ = lowerBound_; + } else { + result.lowerBound_ = lowerBoundBuilder_.build(); + } + if (upperBoundBuilder_ == null) { + result.upperBound_ = upperBound_; + } else { + result.upperBound_ = upperBoundBuilder_.build(); + } + result.bucketSize_ = bucketSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.FixedSizeBucketingConfig) { + return mergeFrom((com.google.privacy.dlp.v2.FixedSizeBucketingConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.FixedSizeBucketingConfig other) { + if (other == com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance()) return this; + if (other.hasLowerBound()) { + mergeLowerBound(other.getLowerBound()); + } + if (other.hasUpperBound()) { + mergeUpperBound(other.getUpperBound()); + } + if (other.getBucketSize() != 0D) { + setBucketSize(other.getBucketSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.FixedSizeBucketingConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.Value lowerBound_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> lowerBoundBuilder_; + /** + *
+     * Required. Lower bound value of buckets. All values less than `lower_bound` are
+     * grouped together into a single bucket; for example if `lower_bound` = 10,
+     * then all values less than 10 are replaced with the value "-10".
+     * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the lowerBound field is set. + */ + public boolean hasLowerBound() { + return lowerBoundBuilder_ != null || lowerBound_ != null; + } + /** + *
+     * Required. Lower bound value of buckets. All values less than `lower_bound` are
+     * grouped together into a single bucket; for example if `lower_bound` = 10,
+     * then all values less than 10 are replaced with the value "-10".
+     * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The lowerBound. + */ + public com.google.privacy.dlp.v2.Value getLowerBound() { + if (lowerBoundBuilder_ == null) { + return lowerBound_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : lowerBound_; + } else { + return lowerBoundBuilder_.getMessage(); + } + } + /** + *
+     * Required. Lower bound value of buckets. All values less than `lower_bound` are
+     * grouped together into a single bucket; for example if `lower_bound` = 10,
+     * then all values less than 10 are replaced with the value "-10".
+     * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setLowerBound(com.google.privacy.dlp.v2.Value value) { + if (lowerBoundBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lowerBound_ = value; + onChanged(); + } else { + lowerBoundBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Lower bound value of buckets. All values less than `lower_bound` are
+     * grouped together into a single bucket; for example if `lower_bound` = 10,
+     * then all values less than 10 are replaced with the value "-10".
+     * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setLowerBound( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (lowerBoundBuilder_ == null) { + lowerBound_ = builderForValue.build(); + onChanged(); + } else { + lowerBoundBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Lower bound value of buckets. All values less than `lower_bound` are
+     * grouped together into a single bucket; for example if `lower_bound` = 10,
+     * then all values less than 10 are replaced with the value "-10".
+     * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeLowerBound(com.google.privacy.dlp.v2.Value value) { + if (lowerBoundBuilder_ == null) { + if (lowerBound_ != null) { + lowerBound_ = + com.google.privacy.dlp.v2.Value.newBuilder(lowerBound_).mergeFrom(value).buildPartial(); + } else { + lowerBound_ = value; + } + onChanged(); + } else { + lowerBoundBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Lower bound value of buckets. All values less than `lower_bound` are
+     * grouped together into a single bucket; for example if `lower_bound` = 10,
+     * then all values less than 10 are replaced with the value "-10".
+     * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearLowerBound() { + if (lowerBoundBuilder_ == null) { + lowerBound_ = null; + onChanged(); + } else { + lowerBound_ = null; + lowerBoundBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Lower bound value of buckets. All values less than `lower_bound` are
+     * grouped together into a single bucket; for example if `lower_bound` = 10,
+     * then all values less than 10 are replaced with the value "-10".
+     * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.Value.Builder getLowerBoundBuilder() { + + onChanged(); + return getLowerBoundFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Lower bound value of buckets. All values less than `lower_bound` are
+     * grouped together into a single bucket; for example if `lower_bound` = 10,
+     * then all values less than 10 are replaced with the value "-10".
+     * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getLowerBoundOrBuilder() { + if (lowerBoundBuilder_ != null) { + return lowerBoundBuilder_.getMessageOrBuilder(); + } else { + return lowerBound_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : lowerBound_; + } + } + /** + *
+     * Required. Lower bound value of buckets. All values less than `lower_bound` are
+     * grouped together into a single bucket; for example if `lower_bound` = 10,
+     * then all values less than 10 are replaced with the value "-10".
+     * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getLowerBoundFieldBuilder() { + if (lowerBoundBuilder_ == null) { + lowerBoundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getLowerBound(), + getParentForChildren(), + isClean()); + lowerBound_ = null; + } + return lowerBoundBuilder_; + } + + private com.google.privacy.dlp.v2.Value upperBound_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> upperBoundBuilder_; + /** + *
+     * Required. Upper bound value of buckets. All values greater than upper_bound are
+     * grouped together into a single bucket; for example if `upper_bound` = 89,
+     * then all values greater than 89 are replaced with the value "89+".
+     * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the upperBound field is set. + */ + public boolean hasUpperBound() { + return upperBoundBuilder_ != null || upperBound_ != null; + } + /** + *
+     * Required. Upper bound value of buckets. All values greater than upper_bound are
+     * grouped together into a single bucket; for example if `upper_bound` = 89,
+     * then all values greater than 89 are replaced with the value "89+".
+     * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The upperBound. + */ + public com.google.privacy.dlp.v2.Value getUpperBound() { + if (upperBoundBuilder_ == null) { + return upperBound_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : upperBound_; + } else { + return upperBoundBuilder_.getMessage(); + } + } + /** + *
+     * Required. Upper bound value of buckets. All values greater than upper_bound are
+     * grouped together into a single bucket; for example if `upper_bound` = 89,
+     * then all values greater than 89 are replaced with the value "89+".
+     * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpperBound(com.google.privacy.dlp.v2.Value value) { + if (upperBoundBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + upperBound_ = value; + onChanged(); + } else { + upperBoundBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Upper bound value of buckets. All values greater than upper_bound are
+     * grouped together into a single bucket; for example if `upper_bound` = 89,
+     * then all values greater than 89 are replaced with the value "89+".
+     * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpperBound( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (upperBoundBuilder_ == null) { + upperBound_ = builderForValue.build(); + onChanged(); + } else { + upperBoundBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Upper bound value of buckets. All values greater than upper_bound are
+     * grouped together into a single bucket; for example if `upper_bound` = 89,
+     * then all values greater than 89 are replaced with the value "89+".
+     * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpperBound(com.google.privacy.dlp.v2.Value value) { + if (upperBoundBuilder_ == null) { + if (upperBound_ != null) { + upperBound_ = + com.google.privacy.dlp.v2.Value.newBuilder(upperBound_).mergeFrom(value).buildPartial(); + } else { + upperBound_ = value; + } + onChanged(); + } else { + upperBoundBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Upper bound value of buckets. All values greater than upper_bound are
+     * grouped together into a single bucket; for example if `upper_bound` = 89,
+     * then all values greater than 89 are replaced with the value "89+".
+     * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpperBound() { + if (upperBoundBuilder_ == null) { + upperBound_ = null; + onChanged(); + } else { + upperBound_ = null; + upperBoundBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Upper bound value of buckets. All values greater than upper_bound are
+     * grouped together into a single bucket; for example if `upper_bound` = 89,
+     * then all values greater than 89 are replaced with the value "89+".
+     * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.Value.Builder getUpperBoundBuilder() { + + onChanged(); + return getUpperBoundFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Upper bound value of buckets. All values greater than upper_bound are
+     * grouped together into a single bucket; for example if `upper_bound` = 89,
+     * then all values greater than 89 are replaced with the value "89+".
+     * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getUpperBoundOrBuilder() { + if (upperBoundBuilder_ != null) { + return upperBoundBuilder_.getMessageOrBuilder(); + } else { + return upperBound_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : upperBound_; + } + } + /** + *
+     * Required. Upper bound value of buckets. All values greater than upper_bound are
+     * grouped together into a single bucket; for example if `upper_bound` = 89,
+     * then all values greater than 89 are replaced with the value "89+".
+     * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getUpperBoundFieldBuilder() { + if (upperBoundBuilder_ == null) { + upperBoundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getUpperBound(), + getParentForChildren(), + isClean()); + upperBound_ = null; + } + return upperBoundBuilder_; + } + + private double bucketSize_ ; + /** + *
+     * Required. Size of each bucket (except for minimum and maximum buckets). So if
+     * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
+     * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
+     * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
+     * 
+ * + * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bucketSize. + */ + @java.lang.Override + public double getBucketSize() { + return bucketSize_; + } + /** + *
+     * Required. Size of each bucket (except for minimum and maximum buckets). So if
+     * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
+     * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
+     * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
+     * 
+ * + * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bucketSize to set. + * @return This builder for chaining. + */ + public Builder setBucketSize(double value) { + + bucketSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Size of each bucket (except for minimum and maximum buckets). So if
+     * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
+     * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
+     * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
+     * 
+ * + * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearBucketSize() { + + bucketSize_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.FixedSizeBucketingConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.FixedSizeBucketingConfig) + private static final com.google.privacy.dlp.v2.FixedSizeBucketingConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.FixedSizeBucketingConfig(); + } + + public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FixedSizeBucketingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FixedSizeBucketingConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.FixedSizeBucketingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java new file mode 100644 index 000000000000..e4046de107fe --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java @@ -0,0 +1,88 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface FixedSizeBucketingConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.FixedSizeBucketingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Lower bound value of buckets. All values less than `lower_bound` are
+   * grouped together into a single bucket; for example if `lower_bound` = 10,
+   * then all values less than 10 are replaced with the value "-10".
+   * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the lowerBound field is set. + */ + boolean hasLowerBound(); + /** + *
+   * Required. Lower bound value of buckets. All values less than `lower_bound` are
+   * grouped together into a single bucket; for example if `lower_bound` = 10,
+   * then all values less than 10 are replaced with the value "-10".
+   * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The lowerBound. + */ + com.google.privacy.dlp.v2.Value getLowerBound(); + /** + *
+   * Required. Lower bound value of buckets. All values less than `lower_bound` are
+   * grouped together into a single bucket; for example if `lower_bound` = 10,
+   * then all values less than 10 are replaced with the value "-10".
+   * 
+ * + * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getLowerBoundOrBuilder(); + + /** + *
+   * Required. Upper bound value of buckets. All values greater than upper_bound are
+   * grouped together into a single bucket; for example if `upper_bound` = 89,
+   * then all values greater than 89 are replaced with the value "89+".
+   * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the upperBound field is set. + */ + boolean hasUpperBound(); + /** + *
+   * Required. Upper bound value of buckets. All values greater than upper_bound are
+   * grouped together into a single bucket; for example if `upper_bound` = 89,
+   * then all values greater than 89 are replaced with the value "89+".
+   * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The upperBound. + */ + com.google.privacy.dlp.v2.Value getUpperBound(); + /** + *
+   * Required. Upper bound value of buckets. All values greater than upper_bound are
+   * grouped together into a single bucket; for example if `upper_bound` = 89,
+   * then all values greater than 89 are replaced with the value "89+".
+   * 
+ * + * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getUpperBoundOrBuilder(); + + /** + *
+   * Required. Size of each bucket (except for minimum and maximum buckets). So if
+   * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
+   * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
+   * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
+   * 
+ * + * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bucketSize. + */ + double getBucketSize(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java new file mode 100644 index 000000000000..cddb33335c48 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for GetDeidentifyTemplate.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetDeidentifyTemplateRequest} + */ +public final class GetDeidentifyTemplateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) + GetDeidentifyTemplateRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetDeidentifyTemplateRequest.newBuilder() to construct. + private GetDeidentifyTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetDeidentifyTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetDeidentifyTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetDeidentifyTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the organization and deidentify template to be read, for
+   * example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the organization and deidentify template to be read, for
+   * example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest other = (com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetDeidentifyTemplate.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetDeidentifyTemplateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest build() { + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest buildPartial() { + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest result = new com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) { + return mergeFrom((com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest other) { + if (other == com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the organization and deidentify template to be read, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the organization and deidentify template to be read, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the organization and deidentify template to be read, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and deidentify template to be read, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and deidentify template to be read, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) + private static final com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(); + } + + public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDeidentifyTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDeidentifyTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..e11b89c3793c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface GetDeidentifyTemplateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the organization and deidentify template to be read, for
+   * example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the organization and deidentify template to be read, for
+   * example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequest.java new file mode 100644 index 000000000000..66ba9520c0f4 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequest.java @@ -0,0 +1,595 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The request message for [DlpJobs.GetDlpJob][].
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetDlpJobRequest} + */ +public final class GetDlpJobRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetDlpJobRequest) + GetDlpJobRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetDlpJobRequest.newBuilder() to construct. + private GetDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetDlpJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetDlpJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetDlpJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetDlpJobRequest.class, com.google.privacy.dlp.v2.GetDlpJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the DlpJob resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the DlpJob resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.GetDlpJobRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.GetDlpJobRequest other = (com.google.privacy.dlp.v2.GetDlpJobRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.GetDlpJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The request message for [DlpJobs.GetDlpJob][].
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetDlpJobRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetDlpJobRequest) + com.google.privacy.dlp.v2.GetDlpJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetDlpJobRequest.class, com.google.privacy.dlp.v2.GetDlpJobRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.GetDlpJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetDlpJobRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.GetDlpJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetDlpJobRequest build() { + com.google.privacy.dlp.v2.GetDlpJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetDlpJobRequest buildPartial() { + com.google.privacy.dlp.v2.GetDlpJobRequest result = new com.google.privacy.dlp.v2.GetDlpJobRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.GetDlpJobRequest) { + return mergeFrom((com.google.privacy.dlp.v2.GetDlpJobRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.GetDlpJobRequest other) { + if (other == com.google.privacy.dlp.v2.GetDlpJobRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.GetDlpJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.GetDlpJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the DlpJob resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the DlpJob resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the DlpJob resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the DlpJob resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the DlpJob resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetDlpJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetDlpJobRequest) + private static final com.google.privacy.dlp.v2.GetDlpJobRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetDlpJobRequest(); + } + + public static com.google.privacy.dlp.v2.GetDlpJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDlpJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDlpJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetDlpJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequestOrBuilder.java new file mode 100644 index 000000000000..1f23a52ae740 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequestOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface GetDlpJobRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetDlpJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the DlpJob resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the DlpJob resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java new file mode 100644 index 000000000000..ea5c839397b7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for GetInspectTemplate.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetInspectTemplateRequest} + */ +public final class GetInspectTemplateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetInspectTemplateRequest) + GetInspectTemplateRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetInspectTemplateRequest.newBuilder() to construct. + private GetInspectTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetInspectTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetInspectTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetInspectTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetInspectTemplateRequest.class, com.google.privacy.dlp.v2.GetInspectTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the organization and inspectTemplate to be read, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the organization and inspectTemplate to be read, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.GetInspectTemplateRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.GetInspectTemplateRequest other = (com.google.privacy.dlp.v2.GetInspectTemplateRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.GetInspectTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetInspectTemplate.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetInspectTemplateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetInspectTemplateRequest) + com.google.privacy.dlp.v2.GetInspectTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetInspectTemplateRequest.class, com.google.privacy.dlp.v2.GetInspectTemplateRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.GetInspectTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetInspectTemplateRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.GetInspectTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetInspectTemplateRequest build() { + com.google.privacy.dlp.v2.GetInspectTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetInspectTemplateRequest buildPartial() { + com.google.privacy.dlp.v2.GetInspectTemplateRequest result = new com.google.privacy.dlp.v2.GetInspectTemplateRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.GetInspectTemplateRequest) { + return mergeFrom((com.google.privacy.dlp.v2.GetInspectTemplateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.GetInspectTemplateRequest other) { + if (other == com.google.privacy.dlp.v2.GetInspectTemplateRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.GetInspectTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.GetInspectTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be read, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be read, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be read, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be read, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and inspectTemplate to be read, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetInspectTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetInspectTemplateRequest) + private static final com.google.privacy.dlp.v2.GetInspectTemplateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetInspectTemplateRequest(); + } + + public static com.google.privacy.dlp.v2.GetInspectTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInspectTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInspectTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetInspectTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..42f34c29382a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface GetInspectTemplateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetInspectTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the organization and inspectTemplate to be read, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the organization and inspectTemplate to be read, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequest.java new file mode 100644 index 000000000000..86cf30205325 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequest.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for GetJobTrigger.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetJobTriggerRequest} + */ +public final class GetJobTriggerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetJobTriggerRequest) + GetJobTriggerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetJobTriggerRequest.newBuilder() to construct. + private GetJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetJobTriggerRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetJobTriggerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetJobTriggerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetJobTriggerRequest.class, com.google.privacy.dlp.v2.GetJobTriggerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.GetJobTriggerRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.GetJobTriggerRequest other = (com.google.privacy.dlp.v2.GetJobTriggerRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.GetJobTriggerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetJobTrigger.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetJobTriggerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetJobTriggerRequest) + com.google.privacy.dlp.v2.GetJobTriggerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetJobTriggerRequest.class, com.google.privacy.dlp.v2.GetJobTriggerRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.GetJobTriggerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetJobTriggerRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.GetJobTriggerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetJobTriggerRequest build() { + com.google.privacy.dlp.v2.GetJobTriggerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetJobTriggerRequest buildPartial() { + com.google.privacy.dlp.v2.GetJobTriggerRequest result = new com.google.privacy.dlp.v2.GetJobTriggerRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.GetJobTriggerRequest) { + return mergeFrom((com.google.privacy.dlp.v2.GetJobTriggerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.GetJobTriggerRequest other) { + if (other == com.google.privacy.dlp.v2.GetJobTriggerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.GetJobTriggerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.GetJobTriggerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetJobTriggerRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetJobTriggerRequest) + private static final com.google.privacy.dlp.v2.GetJobTriggerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetJobTriggerRequest(); + } + + public static com.google.privacy.dlp.v2.GetJobTriggerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetJobTriggerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetJobTriggerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetJobTriggerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequestOrBuilder.java new file mode 100644 index 000000000000..c81d0b334e69 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface GetJobTriggerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetJobTriggerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java new file mode 100644 index 000000000000..5390be39bced --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for GetStoredInfoType.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetStoredInfoTypeRequest} + */ +public final class GetStoredInfoTypeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetStoredInfoTypeRequest) + GetStoredInfoTypeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetStoredInfoTypeRequest.newBuilder() to construct. + private GetStoredInfoTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetStoredInfoTypeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetStoredInfoTypeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetStoredInfoTypeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the organization and storedInfoType to be read, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the organization and storedInfoType to be read, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.GetStoredInfoTypeRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.GetStoredInfoTypeRequest other = (com.google.privacy.dlp.v2.GetStoredInfoTypeRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for GetStoredInfoType.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.GetStoredInfoTypeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetStoredInfoTypeRequest) + com.google.privacy.dlp.v2.GetStoredInfoTypeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetStoredInfoTypeRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetStoredInfoTypeRequest build() { + com.google.privacy.dlp.v2.GetStoredInfoTypeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetStoredInfoTypeRequest buildPartial() { + com.google.privacy.dlp.v2.GetStoredInfoTypeRequest result = new com.google.privacy.dlp.v2.GetStoredInfoTypeRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.GetStoredInfoTypeRequest) { + return mergeFrom((com.google.privacy.dlp.v2.GetStoredInfoTypeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest other) { + if (other == com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.GetStoredInfoTypeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the organization and storedInfoType to be read, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the organization and storedInfoType to be read, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the organization and storedInfoType to be read, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and storedInfoType to be read, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the organization and storedInfoType to be read, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetStoredInfoTypeRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetStoredInfoTypeRequest) + private static final com.google.privacy.dlp.v2.GetStoredInfoTypeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetStoredInfoTypeRequest(); + } + + public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetStoredInfoTypeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetStoredInfoTypeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.GetStoredInfoTypeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java new file mode 100644 index 000000000000..22cd00e8c1af --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface GetStoredInfoTypeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetStoredInfoTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the organization and storedInfoType to be read, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the organization and storedInfoType to be read, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItem.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItem.java new file mode 100644 index 000000000000..6d20e31cd8a6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItem.java @@ -0,0 +1,903 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * An individual hybrid item to inspect. Will be stored temporarily during
+ * processing.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridContentItem} + */ +public final class HybridContentItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridContentItem) + HybridContentItemOrBuilder { +private static final long serialVersionUID = 0L; + // Use HybridContentItem.newBuilder() to construct. + private HybridContentItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HybridContentItem() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HybridContentItem(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HybridContentItem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; + if (item_ != null) { + subBuilder = item_.toBuilder(); + } + item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(item_); + item_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.HybridFindingDetails.Builder subBuilder = null; + if (findingDetails_ != null) { + subBuilder = findingDetails_.toBuilder(); + } + findingDetails_ = input.readMessage(com.google.privacy.dlp.v2.HybridFindingDetails.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(findingDetails_); + findingDetails_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridContentItem.class, com.google.privacy.dlp.v2.HybridContentItem.Builder.class); + } + + public static final int ITEM_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.ContentItem item_; + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return item_ != null; + } + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return The item. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem getItem() { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + return getItem(); + } + + public static final int FINDING_DETAILS_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.HybridFindingDetails findingDetails_; + /** + *
+   * Supplementary information that will be added to each finding.
+   * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + * @return Whether the findingDetails field is set. + */ + @java.lang.Override + public boolean hasFindingDetails() { + return findingDetails_ != null; + } + /** + *
+   * Supplementary information that will be added to each finding.
+   * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + * @return The findingDetails. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridFindingDetails getFindingDetails() { + return findingDetails_ == null ? com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance() : findingDetails_; + } + /** + *
+   * Supplementary information that will be added to each finding.
+   * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder getFindingDetailsOrBuilder() { + return getFindingDetails(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (item_ != null) { + output.writeMessage(1, getItem()); + } + if (findingDetails_ != null) { + output.writeMessage(2, getFindingDetails()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (item_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getItem()); + } + if (findingDetails_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFindingDetails()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.HybridContentItem)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.HybridContentItem other = (com.google.privacy.dlp.v2.HybridContentItem) obj; + + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem() + .equals(other.getItem())) return false; + } + if (hasFindingDetails() != other.hasFindingDetails()) return false; + if (hasFindingDetails()) { + if (!getFindingDetails() + .equals(other.getFindingDetails())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + if (hasFindingDetails()) { + hash = (37 * hash) + FINDING_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getFindingDetails().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.HybridContentItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An individual hybrid item to inspect. Will be stored temporarily during
+   * processing.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridContentItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridContentItem) + com.google.privacy.dlp.v2.HybridContentItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridContentItem.class, com.google.privacy.dlp.v2.HybridContentItem.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.HybridContentItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (itemBuilder_ == null) { + item_ = null; + } else { + item_ = null; + itemBuilder_ = null; + } + if (findingDetailsBuilder_ == null) { + findingDetails_ = null; + } else { + findingDetails_ = null; + findingDetailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridContentItem getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridContentItem build() { + com.google.privacy.dlp.v2.HybridContentItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridContentItem buildPartial() { + com.google.privacy.dlp.v2.HybridContentItem result = new com.google.privacy.dlp.v2.HybridContentItem(this); + if (itemBuilder_ == null) { + result.item_ = item_; + } else { + result.item_ = itemBuilder_.build(); + } + if (findingDetailsBuilder_ == null) { + result.findingDetails_ = findingDetails_; + } else { + result.findingDetails_ = findingDetailsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.HybridContentItem) { + return mergeFrom((com.google.privacy.dlp.v2.HybridContentItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.HybridContentItem other) { + if (other == com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance()) return this; + if (other.hasItem()) { + mergeItem(other.getItem()); + } + if (other.hasFindingDetails()) { + mergeFindingDetails(other.getFindingDetails()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.HybridContentItem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.HybridContentItem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.ContentItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return Whether the item field is set. + */ + public boolean hasItem() { + return itemBuilder_ != null || item_ != null; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return The item. + */ + public com.google.privacy.dlp.v2.ContentItem getItem() { + if (itemBuilder_ == null) { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + onChanged(); + } else { + itemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder setItem( + com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + onChanged(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (item_ != null) { + item_ = + com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); + } else { + item_ = value; + } + onChanged(); + } else { + itemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder clearItem() { + if (itemBuilder_ == null) { + item_ = null; + onChanged(); + } else { + item_ = null; + itemBuilder_ = null; + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { + + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null ? + com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( + getItem(), + getParentForChildren(), + isClean()); + item_ = null; + } + return itemBuilder_; + } + + private com.google.privacy.dlp.v2.HybridFindingDetails findingDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridFindingDetails, com.google.privacy.dlp.v2.HybridFindingDetails.Builder, com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder> findingDetailsBuilder_; + /** + *
+     * Supplementary information that will be added to each finding.
+     * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + * @return Whether the findingDetails field is set. + */ + public boolean hasFindingDetails() { + return findingDetailsBuilder_ != null || findingDetails_ != null; + } + /** + *
+     * Supplementary information that will be added to each finding.
+     * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + * @return The findingDetails. + */ + public com.google.privacy.dlp.v2.HybridFindingDetails getFindingDetails() { + if (findingDetailsBuilder_ == null) { + return findingDetails_ == null ? com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance() : findingDetails_; + } else { + return findingDetailsBuilder_.getMessage(); + } + } + /** + *
+     * Supplementary information that will be added to each finding.
+     * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + */ + public Builder setFindingDetails(com.google.privacy.dlp.v2.HybridFindingDetails value) { + if (findingDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + findingDetails_ = value; + onChanged(); + } else { + findingDetailsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Supplementary information that will be added to each finding.
+     * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + */ + public Builder setFindingDetails( + com.google.privacy.dlp.v2.HybridFindingDetails.Builder builderForValue) { + if (findingDetailsBuilder_ == null) { + findingDetails_ = builderForValue.build(); + onChanged(); + } else { + findingDetailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Supplementary information that will be added to each finding.
+     * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + */ + public Builder mergeFindingDetails(com.google.privacy.dlp.v2.HybridFindingDetails value) { + if (findingDetailsBuilder_ == null) { + if (findingDetails_ != null) { + findingDetails_ = + com.google.privacy.dlp.v2.HybridFindingDetails.newBuilder(findingDetails_).mergeFrom(value).buildPartial(); + } else { + findingDetails_ = value; + } + onChanged(); + } else { + findingDetailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Supplementary information that will be added to each finding.
+     * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + */ + public Builder clearFindingDetails() { + if (findingDetailsBuilder_ == null) { + findingDetails_ = null; + onChanged(); + } else { + findingDetails_ = null; + findingDetailsBuilder_ = null; + } + + return this; + } + /** + *
+     * Supplementary information that will be added to each finding.
+     * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + */ + public com.google.privacy.dlp.v2.HybridFindingDetails.Builder getFindingDetailsBuilder() { + + onChanged(); + return getFindingDetailsFieldBuilder().getBuilder(); + } + /** + *
+     * Supplementary information that will be added to each finding.
+     * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + */ + public com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder getFindingDetailsOrBuilder() { + if (findingDetailsBuilder_ != null) { + return findingDetailsBuilder_.getMessageOrBuilder(); + } else { + return findingDetails_ == null ? + com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance() : findingDetails_; + } + } + /** + *
+     * Supplementary information that will be added to each finding.
+     * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridFindingDetails, com.google.privacy.dlp.v2.HybridFindingDetails.Builder, com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder> + getFindingDetailsFieldBuilder() { + if (findingDetailsBuilder_ == null) { + findingDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridFindingDetails, com.google.privacy.dlp.v2.HybridFindingDetails.Builder, com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder>( + getFindingDetails(), + getParentForChildren(), + isClean()); + findingDetails_ = null; + } + return findingDetailsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridContentItem) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridContentItem) + private static final com.google.privacy.dlp.v2.HybridContentItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridContentItem(); + } + + public static com.google.privacy.dlp.v2.HybridContentItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HybridContentItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HybridContentItem(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridContentItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItemOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItemOrBuilder.java new file mode 100644 index 000000000000..d7f55d6afcce --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItemOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface HybridContentItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridContentItem) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return The item. + */ + com.google.privacy.dlp.v2.ContentItem getItem(); + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); + + /** + *
+   * Supplementary information that will be added to each finding.
+   * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + * @return Whether the findingDetails field is set. + */ + boolean hasFindingDetails(); + /** + *
+   * Supplementary information that will be added to each finding.
+   * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + * @return The findingDetails. + */ + com.google.privacy.dlp.v2.HybridFindingDetails getFindingDetails(); + /** + *
+   * Supplementary information that will be added to each finding.
+   * 
+ * + * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; + */ + com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder getFindingDetailsOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetails.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetails.java new file mode 100644 index 000000000000..9e665c477c15 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetails.java @@ -0,0 +1,1585 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Populate to associate additional data with each finding.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridFindingDetails} + */ +public final class HybridFindingDetails extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridFindingDetails) + HybridFindingDetailsOrBuilder { +private static final long serialVersionUID = 0L; + // Use HybridFindingDetails.newBuilder() to construct. + private HybridFindingDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HybridFindingDetails() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HybridFindingDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HybridFindingDetails( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Container.Builder subBuilder = null; + if (containerDetails_ != null) { + subBuilder = containerDetails_.toBuilder(); + } + containerDetails_ = input.readMessage(com.google.privacy.dlp.v2.Container.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(containerDetails_); + containerDetails_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + fileOffset_ = input.readInt64(); + break; + } + case 24: { + + rowOffset_ = input.readInt64(); + break; + } + case 34: { + com.google.privacy.dlp.v2.TableOptions.Builder subBuilder = null; + if (tableOptions_ != null) { + subBuilder = tableOptions_.toBuilder(); + } + tableOptions_ = input.readMessage(com.google.privacy.dlp.v2.TableOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableOptions_); + tableOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridFindingDetails.class, com.google.privacy.dlp.v2.HybridFindingDetails.Builder.class); + } + + public static final int CONTAINER_DETAILS_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.Container containerDetails_; + /** + *
+   * Details about the container where the content being inspected is from.
+   * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + * @return Whether the containerDetails field is set. + */ + @java.lang.Override + public boolean hasContainerDetails() { + return containerDetails_ != null; + } + /** + *
+   * Details about the container where the content being inspected is from.
+   * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + * @return The containerDetails. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Container getContainerDetails() { + return containerDetails_ == null ? com.google.privacy.dlp.v2.Container.getDefaultInstance() : containerDetails_; + } + /** + *
+   * Details about the container where the content being inspected is from.
+   * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerDetailsOrBuilder() { + return getContainerDetails(); + } + + public static final int FILE_OFFSET_FIELD_NUMBER = 2; + private long fileOffset_; + /** + *
+   * Offset in bytes of the line, from the beginning of the file, where the
+   * finding  is located. Populate if the item being scanned is only part of a
+   * bigger item, such as a shard of a file and you want to track the absolute
+   * position of the finding.
+   * 
+ * + * int64 file_offset = 2; + * @return The fileOffset. + */ + @java.lang.Override + public long getFileOffset() { + return fileOffset_; + } + + public static final int ROW_OFFSET_FIELD_NUMBER = 3; + private long rowOffset_; + /** + *
+   * Offset of the row for tables. Populate if the row(s) being scanned are
+   * part of a bigger dataset and you want to keep track of their absolute
+   * position.
+   * 
+ * + * int64 row_offset = 3; + * @return The rowOffset. + */ + @java.lang.Override + public long getRowOffset() { + return rowOffset_; + } + + public static final int TABLE_OPTIONS_FIELD_NUMBER = 4; + private com.google.privacy.dlp.v2.TableOptions tableOptions_; + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys. If not known ahead
+   * of time, can also be set within each inspect hybrid call and the two
+   * will be merged. Note that identifying_fields will only be stored to
+   * BigQuery, and only if the BigQuery action has been included.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return Whether the tableOptions field is set. + */ + @java.lang.Override + public boolean hasTableOptions() { + return tableOptions_ != null; + } + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys. If not known ahead
+   * of time, can also be set within each inspect hybrid call and the two
+   * will be merged. Note that identifying_fields will only be stored to
+   * BigQuery, and only if the BigQuery action has been included.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return The tableOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableOptions getTableOptions() { + return tableOptions_ == null ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; + } + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys. If not known ahead
+   * of time, can also be set within each inspect hybrid call and the two
+   * will be merged. Note that identifying_fields will only be stored to
+   * BigQuery, and only if the BigQuery action has been included.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() { + return getTableOptions(); + } + + public static final int LABELS_FIELD_NUMBER = 5; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels to represent user provided metadata about the data being inspected.
+   * If configured by the job, some key values may be required.
+   * The labels associated with `Finding`'s produced by hybrid
+   * inspection.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 5; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels to represent user provided metadata about the data being inspected.
+   * If configured by the job, some key values may be required.
+   * The labels associated with `Finding`'s produced by hybrid
+   * inspection.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels to represent user provided metadata about the data being inspected.
+   * If configured by the job, some key values may be required.
+   * The labels associated with `Finding`'s produced by hybrid
+   * inspection.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels to represent user provided metadata about the data being inspected.
+   * If configured by the job, some key values may be required.
+   * The labels associated with `Finding`'s produced by hybrid
+   * inspection.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (containerDetails_ != null) { + output.writeMessage(1, getContainerDetails()); + } + if (fileOffset_ != 0L) { + output.writeInt64(2, fileOffset_); + } + if (rowOffset_ != 0L) { + output.writeInt64(3, rowOffset_); + } + if (tableOptions_ != null) { + output.writeMessage(4, getTableOptions()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 5); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (containerDetails_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getContainerDetails()); + } + if (fileOffset_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, fileOffset_); + } + if (rowOffset_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, rowOffset_); + } + if (tableOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getTableOptions()); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, labels__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.HybridFindingDetails)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.HybridFindingDetails other = (com.google.privacy.dlp.v2.HybridFindingDetails) obj; + + if (hasContainerDetails() != other.hasContainerDetails()) return false; + if (hasContainerDetails()) { + if (!getContainerDetails() + .equals(other.getContainerDetails())) return false; + } + if (getFileOffset() + != other.getFileOffset()) return false; + if (getRowOffset() + != other.getRowOffset()) return false; + if (hasTableOptions() != other.hasTableOptions()) return false; + if (hasTableOptions()) { + if (!getTableOptions() + .equals(other.getTableOptions())) return false; + } + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContainerDetails()) { + hash = (37 * hash) + CONTAINER_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getContainerDetails().hashCode(); + } + hash = (37 * hash) + FILE_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFileOffset()); + hash = (37 * hash) + ROW_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRowOffset()); + if (hasTableOptions()) { + hash = (37 * hash) + TABLE_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getTableOptions().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.HybridFindingDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Populate to associate additional data with each finding.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridFindingDetails} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridFindingDetails) + com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 5: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridFindingDetails.class, com.google.privacy.dlp.v2.HybridFindingDetails.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.HybridFindingDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (containerDetailsBuilder_ == null) { + containerDetails_ = null; + } else { + containerDetails_ = null; + containerDetailsBuilder_ = null; + } + fileOffset_ = 0L; + + rowOffset_ = 0L; + + if (tableOptionsBuilder_ == null) { + tableOptions_ = null; + } else { + tableOptions_ = null; + tableOptionsBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridFindingDetails getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridFindingDetails build() { + com.google.privacy.dlp.v2.HybridFindingDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridFindingDetails buildPartial() { + com.google.privacy.dlp.v2.HybridFindingDetails result = new com.google.privacy.dlp.v2.HybridFindingDetails(this); + int from_bitField0_ = bitField0_; + if (containerDetailsBuilder_ == null) { + result.containerDetails_ = containerDetails_; + } else { + result.containerDetails_ = containerDetailsBuilder_.build(); + } + result.fileOffset_ = fileOffset_; + result.rowOffset_ = rowOffset_; + if (tableOptionsBuilder_ == null) { + result.tableOptions_ = tableOptions_; + } else { + result.tableOptions_ = tableOptionsBuilder_.build(); + } + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.HybridFindingDetails) { + return mergeFrom((com.google.privacy.dlp.v2.HybridFindingDetails)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.HybridFindingDetails other) { + if (other == com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance()) return this; + if (other.hasContainerDetails()) { + mergeContainerDetails(other.getContainerDetails()); + } + if (other.getFileOffset() != 0L) { + setFileOffset(other.getFileOffset()); + } + if (other.getRowOffset() != 0L) { + setRowOffset(other.getRowOffset()); + } + if (other.hasTableOptions()) { + mergeTableOptions(other.getTableOptions()); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.HybridFindingDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.HybridFindingDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.Container containerDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder> containerDetailsBuilder_; + /** + *
+     * Details about the container where the content being inspected is from.
+     * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + * @return Whether the containerDetails field is set. + */ + public boolean hasContainerDetails() { + return containerDetailsBuilder_ != null || containerDetails_ != null; + } + /** + *
+     * Details about the container where the content being inspected is from.
+     * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + * @return The containerDetails. + */ + public com.google.privacy.dlp.v2.Container getContainerDetails() { + if (containerDetailsBuilder_ == null) { + return containerDetails_ == null ? com.google.privacy.dlp.v2.Container.getDefaultInstance() : containerDetails_; + } else { + return containerDetailsBuilder_.getMessage(); + } + } + /** + *
+     * Details about the container where the content being inspected is from.
+     * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + */ + public Builder setContainerDetails(com.google.privacy.dlp.v2.Container value) { + if (containerDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + containerDetails_ = value; + onChanged(); + } else { + containerDetailsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Details about the container where the content being inspected is from.
+     * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + */ + public Builder setContainerDetails( + com.google.privacy.dlp.v2.Container.Builder builderForValue) { + if (containerDetailsBuilder_ == null) { + containerDetails_ = builderForValue.build(); + onChanged(); + } else { + containerDetailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Details about the container where the content being inspected is from.
+     * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + */ + public Builder mergeContainerDetails(com.google.privacy.dlp.v2.Container value) { + if (containerDetailsBuilder_ == null) { + if (containerDetails_ != null) { + containerDetails_ = + com.google.privacy.dlp.v2.Container.newBuilder(containerDetails_).mergeFrom(value).buildPartial(); + } else { + containerDetails_ = value; + } + onChanged(); + } else { + containerDetailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Details about the container where the content being inspected is from.
+     * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + */ + public Builder clearContainerDetails() { + if (containerDetailsBuilder_ == null) { + containerDetails_ = null; + onChanged(); + } else { + containerDetails_ = null; + containerDetailsBuilder_ = null; + } + + return this; + } + /** + *
+     * Details about the container where the content being inspected is from.
+     * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + */ + public com.google.privacy.dlp.v2.Container.Builder getContainerDetailsBuilder() { + + onChanged(); + return getContainerDetailsFieldBuilder().getBuilder(); + } + /** + *
+     * Details about the container where the content being inspected is from.
+     * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + */ + public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerDetailsOrBuilder() { + if (containerDetailsBuilder_ != null) { + return containerDetailsBuilder_.getMessageOrBuilder(); + } else { + return containerDetails_ == null ? + com.google.privacy.dlp.v2.Container.getDefaultInstance() : containerDetails_; + } + } + /** + *
+     * Details about the container where the content being inspected is from.
+     * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder> + getContainerDetailsFieldBuilder() { + if (containerDetailsBuilder_ == null) { + containerDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder>( + getContainerDetails(), + getParentForChildren(), + isClean()); + containerDetails_ = null; + } + return containerDetailsBuilder_; + } + + private long fileOffset_ ; + /** + *
+     * Offset in bytes of the line, from the beginning of the file, where the
+     * finding  is located. Populate if the item being scanned is only part of a
+     * bigger item, such as a shard of a file and you want to track the absolute
+     * position of the finding.
+     * 
+ * + * int64 file_offset = 2; + * @return The fileOffset. + */ + @java.lang.Override + public long getFileOffset() { + return fileOffset_; + } + /** + *
+     * Offset in bytes of the line, from the beginning of the file, where the
+     * finding  is located. Populate if the item being scanned is only part of a
+     * bigger item, such as a shard of a file and you want to track the absolute
+     * position of the finding.
+     * 
+ * + * int64 file_offset = 2; + * @param value The fileOffset to set. + * @return This builder for chaining. + */ + public Builder setFileOffset(long value) { + + fileOffset_ = value; + onChanged(); + return this; + } + /** + *
+     * Offset in bytes of the line, from the beginning of the file, where the
+     * finding  is located. Populate if the item being scanned is only part of a
+     * bigger item, such as a shard of a file and you want to track the absolute
+     * position of the finding.
+     * 
+ * + * int64 file_offset = 2; + * @return This builder for chaining. + */ + public Builder clearFileOffset() { + + fileOffset_ = 0L; + onChanged(); + return this; + } + + private long rowOffset_ ; + /** + *
+     * Offset of the row for tables. Populate if the row(s) being scanned are
+     * part of a bigger dataset and you want to keep track of their absolute
+     * position.
+     * 
+ * + * int64 row_offset = 3; + * @return The rowOffset. + */ + @java.lang.Override + public long getRowOffset() { + return rowOffset_; + } + /** + *
+     * Offset of the row for tables. Populate if the row(s) being scanned are
+     * part of a bigger dataset and you want to keep track of their absolute
+     * position.
+     * 
+ * + * int64 row_offset = 3; + * @param value The rowOffset to set. + * @return This builder for chaining. + */ + public Builder setRowOffset(long value) { + + rowOffset_ = value; + onChanged(); + return this; + } + /** + *
+     * Offset of the row for tables. Populate if the row(s) being scanned are
+     * part of a bigger dataset and you want to keep track of their absolute
+     * position.
+     * 
+ * + * int64 row_offset = 3; + * @return This builder for chaining. + */ + public Builder clearRowOffset() { + + rowOffset_ = 0L; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.TableOptions tableOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder> tableOptionsBuilder_; + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys. If not known ahead
+     * of time, can also be set within each inspect hybrid call and the two
+     * will be merged. Note that identifying_fields will only be stored to
+     * BigQuery, and only if the BigQuery action has been included.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return Whether the tableOptions field is set. + */ + public boolean hasTableOptions() { + return tableOptionsBuilder_ != null || tableOptions_ != null; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys. If not known ahead
+     * of time, can also be set within each inspect hybrid call and the two
+     * will be merged. Note that identifying_fields will only be stored to
+     * BigQuery, and only if the BigQuery action has been included.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return The tableOptions. + */ + public com.google.privacy.dlp.v2.TableOptions getTableOptions() { + if (tableOptionsBuilder_ == null) { + return tableOptions_ == null ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; + } else { + return tableOptionsBuilder_.getMessage(); + } + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys. If not known ahead
+     * of time, can also be set within each inspect hybrid call and the two
+     * will be merged. Note that identifying_fields will only be stored to
+     * BigQuery, and only if the BigQuery action has been included.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public Builder setTableOptions(com.google.privacy.dlp.v2.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableOptions_ = value; + onChanged(); + } else { + tableOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys. If not known ahead
+     * of time, can also be set within each inspect hybrid call and the two
+     * will be merged. Note that identifying_fields will only be stored to
+     * BigQuery, and only if the BigQuery action has been included.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public Builder setTableOptions( + com.google.privacy.dlp.v2.TableOptions.Builder builderForValue) { + if (tableOptionsBuilder_ == null) { + tableOptions_ = builderForValue.build(); + onChanged(); + } else { + tableOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys. If not known ahead
+     * of time, can also be set within each inspect hybrid call and the two
+     * will be merged. Note that identifying_fields will only be stored to
+     * BigQuery, and only if the BigQuery action has been included.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public Builder mergeTableOptions(com.google.privacy.dlp.v2.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (tableOptions_ != null) { + tableOptions_ = + com.google.privacy.dlp.v2.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); + } else { + tableOptions_ = value; + } + onChanged(); + } else { + tableOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys. If not known ahead
+     * of time, can also be set within each inspect hybrid call and the two
+     * will be merged. Note that identifying_fields will only be stored to
+     * BigQuery, and only if the BigQuery action has been included.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public Builder clearTableOptions() { + if (tableOptionsBuilder_ == null) { + tableOptions_ = null; + onChanged(); + } else { + tableOptions_ = null; + tableOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys. If not known ahead
+     * of time, can also be set within each inspect hybrid call and the two
+     * will be merged. Note that identifying_fields will only be stored to
+     * BigQuery, and only if the BigQuery action has been included.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public com.google.privacy.dlp.v2.TableOptions.Builder getTableOptionsBuilder() { + + onChanged(); + return getTableOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys. If not known ahead
+     * of time, can also be set within each inspect hybrid call and the two
+     * will be merged. Note that identifying_fields will only be stored to
+     * BigQuery, and only if the BigQuery action has been included.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() { + if (tableOptionsBuilder_ != null) { + return tableOptionsBuilder_.getMessageOrBuilder(); + } else { + return tableOptions_ == null ? + com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; + } + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys. If not known ahead
+     * of time, can also be set within each inspect hybrid call and the two
+     * will be merged. Note that identifying_fields will only be stored to
+     * BigQuery, and only if the BigQuery action has been included.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder> + getTableOptionsFieldBuilder() { + if (tableOptionsBuilder_ == null) { + tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder>( + getTableOptions(), + getParentForChildren(), + isClean()); + tableOptions_ = null; + } + return tableOptionsBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels to represent user provided metadata about the data being inspected.
+     * If configured by the job, some key values may be required.
+     * The labels associated with `Finding`'s produced by hybrid
+     * inspection.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 5; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels to represent user provided metadata about the data being inspected.
+     * If configured by the job, some key values may be required.
+     * The labels associated with `Finding`'s produced by hybrid
+     * inspection.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels to represent user provided metadata about the data being inspected.
+     * If configured by the job, some key values may be required.
+     * The labels associated with `Finding`'s produced by hybrid
+     * inspection.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels to represent user provided metadata about the data being inspected.
+     * If configured by the job, some key values may be required.
+     * The labels associated with `Finding`'s produced by hybrid
+     * inspection.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 5; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels to represent user provided metadata about the data being inspected.
+     * If configured by the job, some key values may be required.
+     * The labels associated with `Finding`'s produced by hybrid
+     * inspection.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 5; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels to represent user provided metadata about the data being inspected.
+     * If configured by the job, some key values may be required.
+     * The labels associated with `Finding`'s produced by hybrid
+     * inspection.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 5; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Labels to represent user provided metadata about the data being inspected.
+     * If configured by the job, some key values may be required.
+     * The labels associated with `Finding`'s produced by hybrid
+     * inspection.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 5; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridFindingDetails) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridFindingDetails) + private static final com.google.privacy.dlp.v2.HybridFindingDetails DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridFindingDetails(); + } + + public static com.google.privacy.dlp.v2.HybridFindingDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HybridFindingDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HybridFindingDetails(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridFindingDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetailsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetailsOrBuilder.java new file mode 100644 index 000000000000..9bd710ab36ec --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetailsOrBuilder.java @@ -0,0 +1,211 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface HybridFindingDetailsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridFindingDetails) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Details about the container where the content being inspected is from.
+   * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + * @return Whether the containerDetails field is set. + */ + boolean hasContainerDetails(); + /** + *
+   * Details about the container where the content being inspected is from.
+   * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + * @return The containerDetails. + */ + com.google.privacy.dlp.v2.Container getContainerDetails(); + /** + *
+   * Details about the container where the content being inspected is from.
+   * 
+ * + * .google.privacy.dlp.v2.Container container_details = 1; + */ + com.google.privacy.dlp.v2.ContainerOrBuilder getContainerDetailsOrBuilder(); + + /** + *
+   * Offset in bytes of the line, from the beginning of the file, where the
+   * finding  is located. Populate if the item being scanned is only part of a
+   * bigger item, such as a shard of a file and you want to track the absolute
+   * position of the finding.
+   * 
+ * + * int64 file_offset = 2; + * @return The fileOffset. + */ + long getFileOffset(); + + /** + *
+   * Offset of the row for tables. Populate if the row(s) being scanned are
+   * part of a bigger dataset and you want to keep track of their absolute
+   * position.
+   * 
+ * + * int64 row_offset = 3; + * @return The rowOffset. + */ + long getRowOffset(); + + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys. If not known ahead
+   * of time, can also be set within each inspect hybrid call and the two
+   * will be merged. Note that identifying_fields will only be stored to
+   * BigQuery, and only if the BigQuery action has been included.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return Whether the tableOptions field is set. + */ + boolean hasTableOptions(); + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys. If not known ahead
+   * of time, can also be set within each inspect hybrid call and the two
+   * will be merged. Note that identifying_fields will only be stored to
+   * BigQuery, and only if the BigQuery action has been included.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return The tableOptions. + */ + com.google.privacy.dlp.v2.TableOptions getTableOptions(); + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys. If not known ahead
+   * of time, can also be set within each inspect hybrid call and the two
+   * will be merged. Note that identifying_fields will only be stored to
+   * BigQuery, and only if the BigQuery action has been included.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder(); + + /** + *
+   * Labels to represent user provided metadata about the data being inspected.
+   * If configured by the job, some key values may be required.
+   * The labels associated with `Finding`'s produced by hybrid
+   * inspection.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 5; + */ + int getLabelsCount(); + /** + *
+   * Labels to represent user provided metadata about the data being inspected.
+   * If configured by the job, some key values may be required.
+   * The labels associated with `Finding`'s produced by hybrid
+   * inspection.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 5; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels to represent user provided metadata about the data being inspected.
+   * If configured by the job, some key values may be required.
+   * The labels associated with `Finding`'s produced by hybrid
+   * inspection.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 5; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels to represent user provided metadata about the data being inspected.
+   * If configured by the job, some key values may be required.
+   * The labels associated with `Finding`'s produced by hybrid
+   * inspection.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 5; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels to represent user provided metadata about the data being inspected.
+   * If configured by the job, some key values may be required.
+   * The labels associated with `Finding`'s produced by hybrid
+   * inspection.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 5; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java new file mode 100644 index 000000000000..06c3862f29dc --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java @@ -0,0 +1,838 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request to search for potentially sensitive info in a custom location.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridInspectDlpJobRequest} + */ +public final class HybridInspectDlpJobRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridInspectDlpJobRequest) + HybridInspectDlpJobRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use HybridInspectDlpJobRequest.newBuilder() to construct. + private HybridInspectDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HybridInspectDlpJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HybridInspectDlpJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HybridInspectDlpJobRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + com.google.privacy.dlp.v2.HybridContentItem.Builder subBuilder = null; + if (hybridItem_ != null) { + subBuilder = hybridItem_.toBuilder(); + } + hybridItem_ = input.readMessage(com.google.privacy.dlp.v2.HybridContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hybridItem_); + hybridItem_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.class, com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the job to execute a hybrid inspect on, for example
+   * `projects/dlp-test-project/dlpJob/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the job to execute a hybrid inspect on, for example
+   * `projects/dlp-test-project/dlpJob/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HYBRID_ITEM_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.HybridContentItem hybridItem_; + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return Whether the hybridItem field is set. + */ + @java.lang.Override + public boolean hasHybridItem() { + return hybridItem_ != null; + } + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return The hybridItem. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridContentItem getHybridItem() { + return hybridItem_ == null ? com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; + } + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder() { + return getHybridItem(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (hybridItem_ != null) { + output.writeMessage(3, getHybridItem()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (hybridItem_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getHybridItem()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.HybridInspectDlpJobRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.HybridInspectDlpJobRequest other = (com.google.privacy.dlp.v2.HybridInspectDlpJobRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasHybridItem() != other.hasHybridItem()) return false; + if (hasHybridItem()) { + if (!getHybridItem() + .equals(other.getHybridItem())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasHybridItem()) { + hash = (37 * hash) + HYBRID_ITEM_FIELD_NUMBER; + hash = (53 * hash) + getHybridItem().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to search for potentially sensitive info in a custom location.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridInspectDlpJobRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridInspectDlpJobRequest) + com.google.privacy.dlp.v2.HybridInspectDlpJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.class, com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (hybridItemBuilder_ == null) { + hybridItem_ = null; + } else { + hybridItem_ = null; + hybridItemBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectDlpJobRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectDlpJobRequest build() { + com.google.privacy.dlp.v2.HybridInspectDlpJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectDlpJobRequest buildPartial() { + com.google.privacy.dlp.v2.HybridInspectDlpJobRequest result = new com.google.privacy.dlp.v2.HybridInspectDlpJobRequest(this); + result.name_ = name_; + if (hybridItemBuilder_ == null) { + result.hybridItem_ = hybridItem_; + } else { + result.hybridItem_ = hybridItemBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.HybridInspectDlpJobRequest) { + return mergeFrom((com.google.privacy.dlp.v2.HybridInspectDlpJobRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest other) { + if (other == com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasHybridItem()) { + mergeHybridItem(other.getHybridItem()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.HybridInspectDlpJobRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the job to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/dlpJob/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the job to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/dlpJob/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the job to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/dlpJob/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the job to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/dlpJob/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the job to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/dlpJob/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.HybridContentItem hybridItem_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder> hybridItemBuilder_; + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return Whether the hybridItem field is set. + */ + public boolean hasHybridItem() { + return hybridItemBuilder_ != null || hybridItem_ != null; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return The hybridItem. + */ + public com.google.privacy.dlp.v2.HybridContentItem getHybridItem() { + if (hybridItemBuilder_ == null) { + return hybridItem_ == null ? com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; + } else { + return hybridItemBuilder_.getMessage(); + } + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public Builder setHybridItem(com.google.privacy.dlp.v2.HybridContentItem value) { + if (hybridItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hybridItem_ = value; + onChanged(); + } else { + hybridItemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public Builder setHybridItem( + com.google.privacy.dlp.v2.HybridContentItem.Builder builderForValue) { + if (hybridItemBuilder_ == null) { + hybridItem_ = builderForValue.build(); + onChanged(); + } else { + hybridItemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public Builder mergeHybridItem(com.google.privacy.dlp.v2.HybridContentItem value) { + if (hybridItemBuilder_ == null) { + if (hybridItem_ != null) { + hybridItem_ = + com.google.privacy.dlp.v2.HybridContentItem.newBuilder(hybridItem_).mergeFrom(value).buildPartial(); + } else { + hybridItem_ = value; + } + onChanged(); + } else { + hybridItemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public Builder clearHybridItem() { + if (hybridItemBuilder_ == null) { + hybridItem_ = null; + onChanged(); + } else { + hybridItem_ = null; + hybridItemBuilder_ = null; + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public com.google.privacy.dlp.v2.HybridContentItem.Builder getHybridItemBuilder() { + + onChanged(); + return getHybridItemFieldBuilder().getBuilder(); + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder() { + if (hybridItemBuilder_ != null) { + return hybridItemBuilder_.getMessageOrBuilder(); + } else { + return hybridItem_ == null ? + com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; + } + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder> + getHybridItemFieldBuilder() { + if (hybridItemBuilder_ == null) { + hybridItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder>( + getHybridItem(), + getParentForChildren(), + isClean()); + hybridItem_ = null; + } + return hybridItemBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridInspectDlpJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridInspectDlpJobRequest) + private static final com.google.privacy.dlp.v2.HybridInspectDlpJobRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridInspectDlpJobRequest(); + } + + public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HybridInspectDlpJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HybridInspectDlpJobRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectDlpJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java new file mode 100644 index 000000000000..e22ca794074b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface HybridInspectDlpJobRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridInspectDlpJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the job to execute a hybrid inspect on, for example
+   * `projects/dlp-test-project/dlpJob/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the job to execute a hybrid inspect on, for example
+   * `projects/dlp-test-project/dlpJob/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return Whether the hybridItem field is set. + */ + boolean hasHybridItem(); + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return The hybridItem. + */ + com.google.privacy.dlp.v2.HybridContentItem getHybridItem(); + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java new file mode 100644 index 000000000000..213baaed24f6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java @@ -0,0 +1,838 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request to search for potentially sensitive info in a custom location.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridInspectJobTriggerRequest} + */ +public final class HybridInspectJobTriggerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) + HybridInspectJobTriggerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use HybridInspectJobTriggerRequest.newBuilder() to construct. + private HybridInspectJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HybridInspectJobTriggerRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HybridInspectJobTriggerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HybridInspectJobTriggerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + com.google.privacy.dlp.v2.HybridContentItem.Builder subBuilder = null; + if (hybridItem_ != null) { + subBuilder = hybridItem_.toBuilder(); + } + hybridItem_ = input.readMessage(com.google.privacy.dlp.v2.HybridContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hybridItem_); + hybridItem_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.class, com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the trigger to execute a hybrid inspect on, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the trigger to execute a hybrid inspect on, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HYBRID_ITEM_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.HybridContentItem hybridItem_; + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return Whether the hybridItem field is set. + */ + @java.lang.Override + public boolean hasHybridItem() { + return hybridItem_ != null; + } + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return The hybridItem. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridContentItem getHybridItem() { + return hybridItem_ == null ? com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; + } + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder() { + return getHybridItem(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (hybridItem_ != null) { + output.writeMessage(3, getHybridItem()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (hybridItem_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getHybridItem()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest other = (com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasHybridItem() != other.hasHybridItem()) return false; + if (hasHybridItem()) { + if (!getHybridItem() + .equals(other.getHybridItem())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasHybridItem()) { + hash = (37 * hash) + HYBRID_ITEM_FIELD_NUMBER; + hash = (53 * hash) + getHybridItem().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to search for potentially sensitive info in a custom location.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridInspectJobTriggerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.class, com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (hybridItemBuilder_ == null) { + hybridItem_ = null; + } else { + hybridItem_ = null; + hybridItemBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest build() { + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest buildPartial() { + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest result = new com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(this); + result.name_ = name_; + if (hybridItemBuilder_ == null) { + result.hybridItem_ = hybridItem_; + } else { + result.hybridItem_ = hybridItemBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) { + return mergeFrom((com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest other) { + if (other == com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasHybridItem()) { + mergeHybridItem(other.getHybridItem()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.HybridContentItem hybridItem_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder> hybridItemBuilder_; + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return Whether the hybridItem field is set. + */ + public boolean hasHybridItem() { + return hybridItemBuilder_ != null || hybridItem_ != null; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return The hybridItem. + */ + public com.google.privacy.dlp.v2.HybridContentItem getHybridItem() { + if (hybridItemBuilder_ == null) { + return hybridItem_ == null ? com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; + } else { + return hybridItemBuilder_.getMessage(); + } + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public Builder setHybridItem(com.google.privacy.dlp.v2.HybridContentItem value) { + if (hybridItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hybridItem_ = value; + onChanged(); + } else { + hybridItemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public Builder setHybridItem( + com.google.privacy.dlp.v2.HybridContentItem.Builder builderForValue) { + if (hybridItemBuilder_ == null) { + hybridItem_ = builderForValue.build(); + onChanged(); + } else { + hybridItemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public Builder mergeHybridItem(com.google.privacy.dlp.v2.HybridContentItem value) { + if (hybridItemBuilder_ == null) { + if (hybridItem_ != null) { + hybridItem_ = + com.google.privacy.dlp.v2.HybridContentItem.newBuilder(hybridItem_).mergeFrom(value).buildPartial(); + } else { + hybridItem_ = value; + } + onChanged(); + } else { + hybridItemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public Builder clearHybridItem() { + if (hybridItemBuilder_ == null) { + hybridItem_ = null; + onChanged(); + } else { + hybridItem_ = null; + hybridItemBuilder_ = null; + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public com.google.privacy.dlp.v2.HybridContentItem.Builder getHybridItemBuilder() { + + onChanged(); + return getHybridItemFieldBuilder().getBuilder(); + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + public com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder() { + if (hybridItemBuilder_ != null) { + return hybridItemBuilder_.getMessageOrBuilder(); + } else { + return hybridItem_ == null ? + com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; + } + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder> + getHybridItemFieldBuilder() { + if (hybridItemBuilder_ == null) { + hybridItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder>( + getHybridItem(), + getParentForChildren(), + isClean()); + hybridItem_ = null; + } + return hybridItemBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) + private static final com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(); + } + + public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HybridInspectJobTriggerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HybridInspectJobTriggerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java new file mode 100644 index 000000000000..819775dc90bc --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface HybridInspectJobTriggerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the trigger to execute a hybrid inspect on, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the trigger to execute a hybrid inspect on, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return Whether the hybridItem field is set. + */ + boolean hasHybridItem(); + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + * @return The hybridItem. + */ + com.google.privacy.dlp.v2.HybridContentItem getHybridItem(); + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; + */ + com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponse.java new file mode 100644 index 000000000000..3f470a7b01da --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponse.java @@ -0,0 +1,429 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Quota exceeded errors will be thrown once quota has been met.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridInspectResponse} + */ +public final class HybridInspectResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridInspectResponse) + HybridInspectResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use HybridInspectResponse.newBuilder() to construct. + private HybridInspectResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HybridInspectResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HybridInspectResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HybridInspectResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridInspectResponse.class, com.google.privacy.dlp.v2.HybridInspectResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.HybridInspectResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.HybridInspectResponse other = (com.google.privacy.dlp.v2.HybridInspectResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.HybridInspectResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Quota exceeded errors will be thrown once quota has been met.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridInspectResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridInspectResponse) + com.google.privacy.dlp.v2.HybridInspectResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridInspectResponse.class, com.google.privacy.dlp.v2.HybridInspectResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.HybridInspectResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.HybridInspectResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectResponse build() { + com.google.privacy.dlp.v2.HybridInspectResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectResponse buildPartial() { + com.google.privacy.dlp.v2.HybridInspectResponse result = new com.google.privacy.dlp.v2.HybridInspectResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.HybridInspectResponse) { + return mergeFrom((com.google.privacy.dlp.v2.HybridInspectResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.HybridInspectResponse other) { + if (other == com.google.privacy.dlp.v2.HybridInspectResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.HybridInspectResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.HybridInspectResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridInspectResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridInspectResponse) + private static final com.google.privacy.dlp.v2.HybridInspectResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridInspectResponse(); + } + + public static com.google.privacy.dlp.v2.HybridInspectResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HybridInspectResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HybridInspectResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponseOrBuilder.java new file mode 100644 index 000000000000..11529960a80e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface HybridInspectResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridInspectResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java new file mode 100644 index 000000000000..5fa5a6050edc --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java @@ -0,0 +1,692 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Statistics related to processing hybrid inspect requests.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridInspectStatistics} + */ +public final class HybridInspectStatistics extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridInspectStatistics) + HybridInspectStatisticsOrBuilder { +private static final long serialVersionUID = 0L; + // Use HybridInspectStatistics.newBuilder() to construct. + private HybridInspectStatistics(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HybridInspectStatistics() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HybridInspectStatistics(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HybridInspectStatistics( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + processedCount_ = input.readInt64(); + break; + } + case 16: { + + abortedCount_ = input.readInt64(); + break; + } + case 24: { + + pendingCount_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridInspectStatistics.class, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder.class); + } + + public static final int PROCESSED_COUNT_FIELD_NUMBER = 1; + private long processedCount_; + /** + *
+   * The number of hybrid inspection requests processed within this job.
+   * 
+ * + * int64 processed_count = 1; + * @return The processedCount. + */ + @java.lang.Override + public long getProcessedCount() { + return processedCount_; + } + + public static final int ABORTED_COUNT_FIELD_NUMBER = 2; + private long abortedCount_; + /** + *
+   * The number of hybrid inspection requests aborted because the job ran
+   * out of quota or was ended before they could be processed.
+   * 
+ * + * int64 aborted_count = 2; + * @return The abortedCount. + */ + @java.lang.Override + public long getAbortedCount() { + return abortedCount_; + } + + public static final int PENDING_COUNT_FIELD_NUMBER = 3; + private long pendingCount_; + /** + *
+   * The number of hybrid requests currently being processed. Only populated
+   * when called via method `getDlpJob`.
+   * A burst of traffic may cause hybrid inspect requests to be enqueued.
+   * Processing will take place as quickly as possible, but resource limitations
+   * may impact how long a request is enqueued for.
+   * 
+ * + * int64 pending_count = 3; + * @return The pendingCount. + */ + @java.lang.Override + public long getPendingCount() { + return pendingCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (processedCount_ != 0L) { + output.writeInt64(1, processedCount_); + } + if (abortedCount_ != 0L) { + output.writeInt64(2, abortedCount_); + } + if (pendingCount_ != 0L) { + output.writeInt64(3, pendingCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (processedCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, processedCount_); + } + if (abortedCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, abortedCount_); + } + if (pendingCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, pendingCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.HybridInspectStatistics)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.HybridInspectStatistics other = (com.google.privacy.dlp.v2.HybridInspectStatistics) obj; + + if (getProcessedCount() + != other.getProcessedCount()) return false; + if (getAbortedCount() + != other.getAbortedCount()) return false; + if (getPendingCount() + != other.getPendingCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROCESSED_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getProcessedCount()); + hash = (37 * hash) + ABORTED_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAbortedCount()); + hash = (37 * hash) + PENDING_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPendingCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.HybridInspectStatistics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Statistics related to processing hybrid inspect requests.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridInspectStatistics} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridInspectStatistics) + com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridInspectStatistics.class, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.HybridInspectStatistics.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + processedCount_ = 0L; + + abortedCount_ = 0L; + + pendingCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectStatistics getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectStatistics build() { + com.google.privacy.dlp.v2.HybridInspectStatistics result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectStatistics buildPartial() { + com.google.privacy.dlp.v2.HybridInspectStatistics result = new com.google.privacy.dlp.v2.HybridInspectStatistics(this); + result.processedCount_ = processedCount_; + result.abortedCount_ = abortedCount_; + result.pendingCount_ = pendingCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.HybridInspectStatistics) { + return mergeFrom((com.google.privacy.dlp.v2.HybridInspectStatistics)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.HybridInspectStatistics other) { + if (other == com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance()) return this; + if (other.getProcessedCount() != 0L) { + setProcessedCount(other.getProcessedCount()); + } + if (other.getAbortedCount() != 0L) { + setAbortedCount(other.getAbortedCount()); + } + if (other.getPendingCount() != 0L) { + setPendingCount(other.getPendingCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.HybridInspectStatistics parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.HybridInspectStatistics) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long processedCount_ ; + /** + *
+     * The number of hybrid inspection requests processed within this job.
+     * 
+ * + * int64 processed_count = 1; + * @return The processedCount. + */ + @java.lang.Override + public long getProcessedCount() { + return processedCount_; + } + /** + *
+     * The number of hybrid inspection requests processed within this job.
+     * 
+ * + * int64 processed_count = 1; + * @param value The processedCount to set. + * @return This builder for chaining. + */ + public Builder setProcessedCount(long value) { + + processedCount_ = value; + onChanged(); + return this; + } + /** + *
+     * The number of hybrid inspection requests processed within this job.
+     * 
+ * + * int64 processed_count = 1; + * @return This builder for chaining. + */ + public Builder clearProcessedCount() { + + processedCount_ = 0L; + onChanged(); + return this; + } + + private long abortedCount_ ; + /** + *
+     * The number of hybrid inspection requests aborted because the job ran
+     * out of quota or was ended before they could be processed.
+     * 
+ * + * int64 aborted_count = 2; + * @return The abortedCount. + */ + @java.lang.Override + public long getAbortedCount() { + return abortedCount_; + } + /** + *
+     * The number of hybrid inspection requests aborted because the job ran
+     * out of quota or was ended before they could be processed.
+     * 
+ * + * int64 aborted_count = 2; + * @param value The abortedCount to set. + * @return This builder for chaining. + */ + public Builder setAbortedCount(long value) { + + abortedCount_ = value; + onChanged(); + return this; + } + /** + *
+     * The number of hybrid inspection requests aborted because the job ran
+     * out of quota or was ended before they could be processed.
+     * 
+ * + * int64 aborted_count = 2; + * @return This builder for chaining. + */ + public Builder clearAbortedCount() { + + abortedCount_ = 0L; + onChanged(); + return this; + } + + private long pendingCount_ ; + /** + *
+     * The number of hybrid requests currently being processed. Only populated
+     * when called via method `getDlpJob`.
+     * A burst of traffic may cause hybrid inspect requests to be enqueued.
+     * Processing will take place as quickly as possible, but resource limitations
+     * may impact how long a request is enqueued for.
+     * 
+ * + * int64 pending_count = 3; + * @return The pendingCount. + */ + @java.lang.Override + public long getPendingCount() { + return pendingCount_; + } + /** + *
+     * The number of hybrid requests currently being processed. Only populated
+     * when called via method `getDlpJob`.
+     * A burst of traffic may cause hybrid inspect requests to be enqueued.
+     * Processing will take place as quickly as possible, but resource limitations
+     * may impact how long a request is enqueued for.
+     * 
+ * + * int64 pending_count = 3; + * @param value The pendingCount to set. + * @return This builder for chaining. + */ + public Builder setPendingCount(long value) { + + pendingCount_ = value; + onChanged(); + return this; + } + /** + *
+     * The number of hybrid requests currently being processed. Only populated
+     * when called via method `getDlpJob`.
+     * A burst of traffic may cause hybrid inspect requests to be enqueued.
+     * Processing will take place as quickly as possible, but resource limitations
+     * may impact how long a request is enqueued for.
+     * 
+ * + * int64 pending_count = 3; + * @return This builder for chaining. + */ + public Builder clearPendingCount() { + + pendingCount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridInspectStatistics) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridInspectStatistics) + private static final com.google.privacy.dlp.v2.HybridInspectStatistics DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridInspectStatistics(); + } + + public static com.google.privacy.dlp.v2.HybridInspectStatistics getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HybridInspectStatistics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HybridInspectStatistics(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectStatistics getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatisticsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatisticsOrBuilder.java new file mode 100644 index 000000000000..4057d7d81567 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatisticsOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface HybridInspectStatisticsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridInspectStatistics) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The number of hybrid inspection requests processed within this job.
+   * 
+ * + * int64 processed_count = 1; + * @return The processedCount. + */ + long getProcessedCount(); + + /** + *
+   * The number of hybrid inspection requests aborted because the job ran
+   * out of quota or was ended before they could be processed.
+   * 
+ * + * int64 aborted_count = 2; + * @return The abortedCount. + */ + long getAbortedCount(); + + /** + *
+   * The number of hybrid requests currently being processed. Only populated
+   * when called via method `getDlpJob`.
+   * A burst of traffic may cause hybrid inspect requests to be enqueued.
+   * Processing will take place as quickly as possible, but resource limitations
+   * may impact how long a request is enqueued for.
+   * 
+ * + * int64 pending_count = 3; + * @return The pendingCount. + */ + long getPendingCount(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptions.java new file mode 100644 index 000000000000..b2e4a66d84ed --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptions.java @@ -0,0 +1,1582 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Configuration to control jobs where the content being inspected is outside
+ * of Google Cloud Platform.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridOptions} + */ +public final class HybridOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridOptions) + HybridOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use HybridOptions.newBuilder() to construct. + private HybridOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HybridOptions() { + description_ = ""; + requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HybridOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HybridOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requiredFindingLabelKeys_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requiredFindingLabelKeys_.add(s); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 34: { + com.google.privacy.dlp.v2.TableOptions.Builder subBuilder = null; + if (tableOptions_ != null) { + subBuilder = tableOptions_.toBuilder(); + } + tableOptions_ = input.readMessage(com.google.privacy.dlp.v2.TableOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableOptions_); + tableOptions_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requiredFindingLabelKeys_ = requiredFindingLabelKeys_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridOptions.class, com.google.privacy.dlp.v2.HybridOptions.Builder.class); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object description_; + /** + *
+   * A short description of where the data is coming from. Will be stored once
+   * in the job. 256 max length.
+   * 
+ * + * string description = 1; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A short description of where the data is coming from. Will be stored once
+   * in the job. 256 max length.
+   * 
+ * + * string description = 1; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUIRED_FINDING_LABEL_KEYS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList requiredFindingLabelKeys_; + /** + *
+   * These are labels that each inspection request must include within their
+   * 'finding_labels' map. Request may contain others, but any missing one of
+   * these will be rejected.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * No more than 10 keys can be required.
+   * 
+ * + * repeated string required_finding_label_keys = 2; + * @return A list containing the requiredFindingLabelKeys. + */ + public com.google.protobuf.ProtocolStringList + getRequiredFindingLabelKeysList() { + return requiredFindingLabelKeys_; + } + /** + *
+   * These are labels that each inspection request must include within their
+   * 'finding_labels' map. Request may contain others, but any missing one of
+   * these will be rejected.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * No more than 10 keys can be required.
+   * 
+ * + * repeated string required_finding_label_keys = 2; + * @return The count of requiredFindingLabelKeys. + */ + public int getRequiredFindingLabelKeysCount() { + return requiredFindingLabelKeys_.size(); + } + /** + *
+   * These are labels that each inspection request must include within their
+   * 'finding_labels' map. Request may contain others, but any missing one of
+   * these will be rejected.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * No more than 10 keys can be required.
+   * 
+ * + * repeated string required_finding_label_keys = 2; + * @param index The index of the element to return. + * @return The requiredFindingLabelKeys at the given index. + */ + public java.lang.String getRequiredFindingLabelKeys(int index) { + return requiredFindingLabelKeys_.get(index); + } + /** + *
+   * These are labels that each inspection request must include within their
+   * 'finding_labels' map. Request may contain others, but any missing one of
+   * these will be rejected.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * No more than 10 keys can be required.
+   * 
+ * + * repeated string required_finding_label_keys = 2; + * @param index The index of the value to return. + * @return The bytes of the requiredFindingLabelKeys at the given index. + */ + public com.google.protobuf.ByteString + getRequiredFindingLabelKeysBytes(int index) { + return requiredFindingLabelKeys_.getByteString(index); + } + + public static final int LABELS_FIELD_NUMBER = 3; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * To organize findings, these labels will be added to each finding.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 3; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * To organize findings, these labels will be added to each finding.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * To organize findings, these labels will be added to each finding.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * To organize findings, these labels will be added to each finding.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TABLE_OPTIONS_FIELD_NUMBER = 4; + private com.google.privacy.dlp.v2.TableOptions tableOptions_; + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return Whether the tableOptions field is set. + */ + @java.lang.Override + public boolean hasTableOptions() { + return tableOptions_ != null; + } + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return The tableOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableOptions getTableOptions() { + return tableOptions_ == null ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; + } + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() { + return getTableOptions(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + for (int i = 0; i < requiredFindingLabelKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requiredFindingLabelKeys_.getRaw(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 3); + if (tableOptions_ != null) { + output.writeMessage(4, getTableOptions()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + { + int dataSize = 0; + for (int i = 0; i < requiredFindingLabelKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(requiredFindingLabelKeys_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequiredFindingLabelKeysList().size(); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, labels__); + } + if (tableOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getTableOptions()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.HybridOptions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.HybridOptions other = (com.google.privacy.dlp.v2.HybridOptions) obj; + + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getRequiredFindingLabelKeysList() + .equals(other.getRequiredFindingLabelKeysList())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (hasTableOptions() != other.hasTableOptions()) return false; + if (hasTableOptions()) { + if (!getTableOptions() + .equals(other.getTableOptions())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getRequiredFindingLabelKeysCount() > 0) { + hash = (37 * hash) + REQUIRED_FINDING_LABEL_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getRequiredFindingLabelKeysList().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasTableOptions()) { + hash = (37 * hash) + TABLE_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getTableOptions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.HybridOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.HybridOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.HybridOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.HybridOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.HybridOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration to control jobs where the content being inspected is outside
+   * of Google Cloud Platform.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.HybridOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridOptions) + com.google.privacy.dlp.v2.HybridOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.HybridOptions.class, com.google.privacy.dlp.v2.HybridOptions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.HybridOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + description_ = ""; + + requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableLabels().clear(); + if (tableOptionsBuilder_ == null) { + tableOptions_ = null; + } else { + tableOptions_ = null; + tableOptionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridOptions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridOptions build() { + com.google.privacy.dlp.v2.HybridOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridOptions buildPartial() { + com.google.privacy.dlp.v2.HybridOptions result = new com.google.privacy.dlp.v2.HybridOptions(this); + int from_bitField0_ = bitField0_; + result.description_ = description_; + if (((bitField0_ & 0x00000001) != 0)) { + requiredFindingLabelKeys_ = requiredFindingLabelKeys_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requiredFindingLabelKeys_ = requiredFindingLabelKeys_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (tableOptionsBuilder_ == null) { + result.tableOptions_ = tableOptions_; + } else { + result.tableOptions_ = tableOptionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.HybridOptions) { + return mergeFrom((com.google.privacy.dlp.v2.HybridOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.HybridOptions other) { + if (other == com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance()) return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.requiredFindingLabelKeys_.isEmpty()) { + if (requiredFindingLabelKeys_.isEmpty()) { + requiredFindingLabelKeys_ = other.requiredFindingLabelKeys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequiredFindingLabelKeysIsMutable(); + requiredFindingLabelKeys_.addAll(other.requiredFindingLabelKeys_); + } + onChanged(); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + if (other.hasTableOptions()) { + mergeTableOptions(other.getTableOptions()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.HybridOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.HybridOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object description_ = ""; + /** + *
+     * A short description of where the data is coming from. Will be stored once
+     * in the job. 256 max length.
+     * 
+ * + * string description = 1; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A short description of where the data is coming from. Will be stored once
+     * in the job. 256 max length.
+     * 
+ * + * string description = 1; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A short description of where the data is coming from. Will be stored once
+     * in the job. 256 max length.
+     * 
+ * + * string description = 1; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * A short description of where the data is coming from. Will be stored once
+     * in the job. 256 max length.
+     * 
+ * + * string description = 1; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * A short description of where the data is coming from. Will be stored once
+     * in the job. 256 max length.
+     * 
+ * + * string description = 1; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRequiredFindingLabelKeysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requiredFindingLabelKeys_ = new com.google.protobuf.LazyStringArrayList(requiredFindingLabelKeys_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * These are labels that each inspection request must include within their
+     * 'finding_labels' map. Request may contain others, but any missing one of
+     * these will be rejected.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * No more than 10 keys can be required.
+     * 
+ * + * repeated string required_finding_label_keys = 2; + * @return A list containing the requiredFindingLabelKeys. + */ + public com.google.protobuf.ProtocolStringList + getRequiredFindingLabelKeysList() { + return requiredFindingLabelKeys_.getUnmodifiableView(); + } + /** + *
+     * These are labels that each inspection request must include within their
+     * 'finding_labels' map. Request may contain others, but any missing one of
+     * these will be rejected.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * No more than 10 keys can be required.
+     * 
+ * + * repeated string required_finding_label_keys = 2; + * @return The count of requiredFindingLabelKeys. + */ + public int getRequiredFindingLabelKeysCount() { + return requiredFindingLabelKeys_.size(); + } + /** + *
+     * These are labels that each inspection request must include within their
+     * 'finding_labels' map. Request may contain others, but any missing one of
+     * these will be rejected.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * No more than 10 keys can be required.
+     * 
+ * + * repeated string required_finding_label_keys = 2; + * @param index The index of the element to return. + * @return The requiredFindingLabelKeys at the given index. + */ + public java.lang.String getRequiredFindingLabelKeys(int index) { + return requiredFindingLabelKeys_.get(index); + } + /** + *
+     * These are labels that each inspection request must include within their
+     * 'finding_labels' map. Request may contain others, but any missing one of
+     * these will be rejected.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * No more than 10 keys can be required.
+     * 
+ * + * repeated string required_finding_label_keys = 2; + * @param index The index of the value to return. + * @return The bytes of the requiredFindingLabelKeys at the given index. + */ + public com.google.protobuf.ByteString + getRequiredFindingLabelKeysBytes(int index) { + return requiredFindingLabelKeys_.getByteString(index); + } + /** + *
+     * These are labels that each inspection request must include within their
+     * 'finding_labels' map. Request may contain others, but any missing one of
+     * these will be rejected.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * No more than 10 keys can be required.
+     * 
+ * + * repeated string required_finding_label_keys = 2; + * @param index The index to set the value at. + * @param value The requiredFindingLabelKeys to set. + * @return This builder for chaining. + */ + public Builder setRequiredFindingLabelKeys( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredFindingLabelKeysIsMutable(); + requiredFindingLabelKeys_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * These are labels that each inspection request must include within their
+     * 'finding_labels' map. Request may contain others, but any missing one of
+     * these will be rejected.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * No more than 10 keys can be required.
+     * 
+ * + * repeated string required_finding_label_keys = 2; + * @param value The requiredFindingLabelKeys to add. + * @return This builder for chaining. + */ + public Builder addRequiredFindingLabelKeys( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequiredFindingLabelKeysIsMutable(); + requiredFindingLabelKeys_.add(value); + onChanged(); + return this; + } + /** + *
+     * These are labels that each inspection request must include within their
+     * 'finding_labels' map. Request may contain others, but any missing one of
+     * these will be rejected.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * No more than 10 keys can be required.
+     * 
+ * + * repeated string required_finding_label_keys = 2; + * @param values The requiredFindingLabelKeys to add. + * @return This builder for chaining. + */ + public Builder addAllRequiredFindingLabelKeys( + java.lang.Iterable values) { + ensureRequiredFindingLabelKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, requiredFindingLabelKeys_); + onChanged(); + return this; + } + /** + *
+     * These are labels that each inspection request must include within their
+     * 'finding_labels' map. Request may contain others, but any missing one of
+     * these will be rejected.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * No more than 10 keys can be required.
+     * 
+ * + * repeated string required_finding_label_keys = 2; + * @return This builder for chaining. + */ + public Builder clearRequiredFindingLabelKeys() { + requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * These are labels that each inspection request must include within their
+     * 'finding_labels' map. Request may contain others, but any missing one of
+     * these will be rejected.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * No more than 10 keys can be required.
+     * 
+ * + * repeated string required_finding_label_keys = 2; + * @param value The bytes of the requiredFindingLabelKeys to add. + * @return This builder for chaining. + */ + public Builder addRequiredFindingLabelKeysBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequiredFindingLabelKeysIsMutable(); + requiredFindingLabelKeys_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * To organize findings, these labels will be added to each finding.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 3; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * To organize findings, these labels will be added to each finding.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * To organize findings, these labels will be added to each finding.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * To organize findings, these labels will be added to each finding.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 3; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * To organize findings, these labels will be added to each finding.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 3; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * To organize findings, these labels will be added to each finding.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 3; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * To organize findings, these labels will be added to each finding.
+     * Label keys must be between 1 and 63 characters long and must conform
+     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+     * Label values must be between 0 and 63 characters long and must conform
+     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+     * No more than 10 labels can be associated with a given finding.
+     * Examples:
+     * * `"environment" : "production"`
+     * * `"pipeline" : "etl"`
+     * 
+ * + * map<string, string> labels = 3; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.privacy.dlp.v2.TableOptions tableOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder> tableOptionsBuilder_; + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return Whether the tableOptions field is set. + */ + public boolean hasTableOptions() { + return tableOptionsBuilder_ != null || tableOptions_ != null; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return The tableOptions. + */ + public com.google.privacy.dlp.v2.TableOptions getTableOptions() { + if (tableOptionsBuilder_ == null) { + return tableOptions_ == null ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; + } else { + return tableOptionsBuilder_.getMessage(); + } + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public Builder setTableOptions(com.google.privacy.dlp.v2.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableOptions_ = value; + onChanged(); + } else { + tableOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public Builder setTableOptions( + com.google.privacy.dlp.v2.TableOptions.Builder builderForValue) { + if (tableOptionsBuilder_ == null) { + tableOptions_ = builderForValue.build(); + onChanged(); + } else { + tableOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public Builder mergeTableOptions(com.google.privacy.dlp.v2.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (tableOptions_ != null) { + tableOptions_ = + com.google.privacy.dlp.v2.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); + } else { + tableOptions_ = value; + } + onChanged(); + } else { + tableOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public Builder clearTableOptions() { + if (tableOptionsBuilder_ == null) { + tableOptions_ = null; + onChanged(); + } else { + tableOptions_ = null; + tableOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public com.google.privacy.dlp.v2.TableOptions.Builder getTableOptionsBuilder() { + + onChanged(); + return getTableOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() { + if (tableOptionsBuilder_ != null) { + return tableOptionsBuilder_.getMessageOrBuilder(); + } else { + return tableOptions_ == null ? + com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; + } + } + /** + *
+     * If the container is a table, additional information to make findings
+     * meaningful such as the columns that are primary keys.
+     * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder> + getTableOptionsFieldBuilder() { + if (tableOptionsBuilder_ == null) { + tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder>( + getTableOptions(), + getParentForChildren(), + isClean()); + tableOptions_ = null; + } + return tableOptionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridOptions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridOptions) + private static final com.google.privacy.dlp.v2.HybridOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridOptions(); + } + + public static com.google.privacy.dlp.v2.HybridOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HybridOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HybridOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.HybridOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptionsOrBuilder.java new file mode 100644 index 000000000000..bb6e873057fa --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptionsOrBuilder.java @@ -0,0 +1,218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface HybridOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A short description of where the data is coming from. Will be stored once
+   * in the job. 256 max length.
+   * 
+ * + * string description = 1; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A short description of where the data is coming from. Will be stored once
+   * in the job. 256 max length.
+   * 
+ * + * string description = 1; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * These are labels that each inspection request must include within their
+   * 'finding_labels' map. Request may contain others, but any missing one of
+   * these will be rejected.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * No more than 10 keys can be required.
+   * 
+ * + * repeated string required_finding_label_keys = 2; + * @return A list containing the requiredFindingLabelKeys. + */ + java.util.List + getRequiredFindingLabelKeysList(); + /** + *
+   * These are labels that each inspection request must include within their
+   * 'finding_labels' map. Request may contain others, but any missing one of
+   * these will be rejected.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * No more than 10 keys can be required.
+   * 
+ * + * repeated string required_finding_label_keys = 2; + * @return The count of requiredFindingLabelKeys. + */ + int getRequiredFindingLabelKeysCount(); + /** + *
+   * These are labels that each inspection request must include within their
+   * 'finding_labels' map. Request may contain others, but any missing one of
+   * these will be rejected.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * No more than 10 keys can be required.
+   * 
+ * + * repeated string required_finding_label_keys = 2; + * @param index The index of the element to return. + * @return The requiredFindingLabelKeys at the given index. + */ + java.lang.String getRequiredFindingLabelKeys(int index); + /** + *
+   * These are labels that each inspection request must include within their
+   * 'finding_labels' map. Request may contain others, but any missing one of
+   * these will be rejected.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * No more than 10 keys can be required.
+   * 
+ * + * repeated string required_finding_label_keys = 2; + * @param index The index of the value to return. + * @return The bytes of the requiredFindingLabelKeys at the given index. + */ + com.google.protobuf.ByteString + getRequiredFindingLabelKeysBytes(int index); + + /** + *
+   * To organize findings, these labels will be added to each finding.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 3; + */ + int getLabelsCount(); + /** + *
+   * To organize findings, these labels will be added to each finding.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 3; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * To organize findings, these labels will be added to each finding.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 3; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * To organize findings, these labels will be added to each finding.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 3; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * To organize findings, these labels will be added to each finding.
+   * Label keys must be between 1 and 63 characters long and must conform
+   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
+   * Label values must be between 0 and 63 characters long and must conform
+   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
+   * No more than 10 labels can be associated with a given finding.
+   * Examples:
+   * * `"environment" : "production"`
+   * * `"pipeline" : "etl"`
+   * 
+ * + * map<string, string> labels = 3; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return Whether the tableOptions field is set. + */ + boolean hasTableOptions(); + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + * @return The tableOptions. + */ + com.google.privacy.dlp.v2.TableOptions getTableOptions(); + /** + *
+   * If the container is a table, additional information to make findings
+   * meaningful such as the columns that are primary keys.
+   * 
+ * + * .google.privacy.dlp.v2.TableOptions table_options = 4; + */ + com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocation.java new file mode 100644 index 000000000000..9feba61d1126 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocation.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Location of the finding within an image.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageLocation} + */ +public final class ImageLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageLocation) + ImageLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageLocation.newBuilder() to construct. + private ImageLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageLocation() { + boundingBoxes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageLocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + boundingBoxes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + boundingBoxes_.add( + input.readMessage(com.google.privacy.dlp.v2.BoundingBox.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + boundingBoxes_ = java.util.Collections.unmodifiableList(boundingBoxes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageLocation.class, com.google.privacy.dlp.v2.ImageLocation.Builder.class); + } + + public static final int BOUNDING_BOXES_FIELD_NUMBER = 1; + private java.util.List boundingBoxes_; + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + @java.lang.Override + public java.util.List getBoundingBoxesList() { + return boundingBoxes_; + } + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + @java.lang.Override + public java.util.List + getBoundingBoxesOrBuilderList() { + return boundingBoxes_; + } + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + @java.lang.Override + public int getBoundingBoxesCount() { + return boundingBoxes_.size(); + } + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BoundingBox getBoundingBoxes(int index) { + return boundingBoxes_.get(index); + } + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BoundingBoxOrBuilder getBoundingBoxesOrBuilder( + int index) { + return boundingBoxes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < boundingBoxes_.size(); i++) { + output.writeMessage(1, boundingBoxes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < boundingBoxes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, boundingBoxes_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ImageLocation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ImageLocation other = (com.google.privacy.dlp.v2.ImageLocation) obj; + + if (!getBoundingBoxesList() + .equals(other.getBoundingBoxesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBoundingBoxesCount() > 0) { + hash = (37 * hash) + BOUNDING_BOXES_FIELD_NUMBER; + hash = (53 * hash) + getBoundingBoxesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ImageLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ImageLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Location of the finding within an image.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageLocation) + com.google.privacy.dlp.v2.ImageLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageLocation.class, com.google.privacy.dlp.v2.ImageLocation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ImageLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBoundingBoxesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boundingBoxesBuilder_ == null) { + boundingBoxes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + boundingBoxesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageLocation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageLocation build() { + com.google.privacy.dlp.v2.ImageLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageLocation buildPartial() { + com.google.privacy.dlp.v2.ImageLocation result = new com.google.privacy.dlp.v2.ImageLocation(this); + int from_bitField0_ = bitField0_; + if (boundingBoxesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + boundingBoxes_ = java.util.Collections.unmodifiableList(boundingBoxes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boundingBoxes_ = boundingBoxes_; + } else { + result.boundingBoxes_ = boundingBoxesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ImageLocation) { + return mergeFrom((com.google.privacy.dlp.v2.ImageLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ImageLocation other) { + if (other == com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance()) return this; + if (boundingBoxesBuilder_ == null) { + if (!other.boundingBoxes_.isEmpty()) { + if (boundingBoxes_.isEmpty()) { + boundingBoxes_ = other.boundingBoxes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoundingBoxesIsMutable(); + boundingBoxes_.addAll(other.boundingBoxes_); + } + onChanged(); + } + } else { + if (!other.boundingBoxes_.isEmpty()) { + if (boundingBoxesBuilder_.isEmpty()) { + boundingBoxesBuilder_.dispose(); + boundingBoxesBuilder_ = null; + boundingBoxes_ = other.boundingBoxes_; + bitField0_ = (bitField0_ & ~0x00000001); + boundingBoxesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBoundingBoxesFieldBuilder() : null; + } else { + boundingBoxesBuilder_.addAllMessages(other.boundingBoxes_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ImageLocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ImageLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List boundingBoxes_ = + java.util.Collections.emptyList(); + private void ensureBoundingBoxesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boundingBoxes_ = new java.util.ArrayList(boundingBoxes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.BoundingBox, com.google.privacy.dlp.v2.BoundingBox.Builder, com.google.privacy.dlp.v2.BoundingBoxOrBuilder> boundingBoxesBuilder_; + + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public java.util.List getBoundingBoxesList() { + if (boundingBoxesBuilder_ == null) { + return java.util.Collections.unmodifiableList(boundingBoxes_); + } else { + return boundingBoxesBuilder_.getMessageList(); + } + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public int getBoundingBoxesCount() { + if (boundingBoxesBuilder_ == null) { + return boundingBoxes_.size(); + } else { + return boundingBoxesBuilder_.getCount(); + } + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public com.google.privacy.dlp.v2.BoundingBox getBoundingBoxes(int index) { + if (boundingBoxesBuilder_ == null) { + return boundingBoxes_.get(index); + } else { + return boundingBoxesBuilder_.getMessage(index); + } + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public Builder setBoundingBoxes( + int index, com.google.privacy.dlp.v2.BoundingBox value) { + if (boundingBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingBoxesIsMutable(); + boundingBoxes_.set(index, value); + onChanged(); + } else { + boundingBoxesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public Builder setBoundingBoxes( + int index, com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue) { + if (boundingBoxesBuilder_ == null) { + ensureBoundingBoxesIsMutable(); + boundingBoxes_.set(index, builderForValue.build()); + onChanged(); + } else { + boundingBoxesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public Builder addBoundingBoxes(com.google.privacy.dlp.v2.BoundingBox value) { + if (boundingBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingBoxesIsMutable(); + boundingBoxes_.add(value); + onChanged(); + } else { + boundingBoxesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public Builder addBoundingBoxes( + int index, com.google.privacy.dlp.v2.BoundingBox value) { + if (boundingBoxesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoundingBoxesIsMutable(); + boundingBoxes_.add(index, value); + onChanged(); + } else { + boundingBoxesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public Builder addBoundingBoxes( + com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue) { + if (boundingBoxesBuilder_ == null) { + ensureBoundingBoxesIsMutable(); + boundingBoxes_.add(builderForValue.build()); + onChanged(); + } else { + boundingBoxesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public Builder addBoundingBoxes( + int index, com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue) { + if (boundingBoxesBuilder_ == null) { + ensureBoundingBoxesIsMutable(); + boundingBoxes_.add(index, builderForValue.build()); + onChanged(); + } else { + boundingBoxesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public Builder addAllBoundingBoxes( + java.lang.Iterable values) { + if (boundingBoxesBuilder_ == null) { + ensureBoundingBoxesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, boundingBoxes_); + onChanged(); + } else { + boundingBoxesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public Builder clearBoundingBoxes() { + if (boundingBoxesBuilder_ == null) { + boundingBoxes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + boundingBoxesBuilder_.clear(); + } + return this; + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public Builder removeBoundingBoxes(int index) { + if (boundingBoxesBuilder_ == null) { + ensureBoundingBoxesIsMutable(); + boundingBoxes_.remove(index); + onChanged(); + } else { + boundingBoxesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public com.google.privacy.dlp.v2.BoundingBox.Builder getBoundingBoxesBuilder( + int index) { + return getBoundingBoxesFieldBuilder().getBuilder(index); + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public com.google.privacy.dlp.v2.BoundingBoxOrBuilder getBoundingBoxesOrBuilder( + int index) { + if (boundingBoxesBuilder_ == null) { + return boundingBoxes_.get(index); } else { + return boundingBoxesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public java.util.List + getBoundingBoxesOrBuilderList() { + if (boundingBoxesBuilder_ != null) { + return boundingBoxesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(boundingBoxes_); + } + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public com.google.privacy.dlp.v2.BoundingBox.Builder addBoundingBoxesBuilder() { + return getBoundingBoxesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance()); + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public com.google.privacy.dlp.v2.BoundingBox.Builder addBoundingBoxesBuilder( + int index) { + return getBoundingBoxesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance()); + } + /** + *
+     * Bounding boxes locating the pixels within the image containing the finding.
+     * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + public java.util.List + getBoundingBoxesBuilderList() { + return getBoundingBoxesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.BoundingBox, com.google.privacy.dlp.v2.BoundingBox.Builder, com.google.privacy.dlp.v2.BoundingBoxOrBuilder> + getBoundingBoxesFieldBuilder() { + if (boundingBoxesBuilder_ == null) { + boundingBoxesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.BoundingBox, com.google.privacy.dlp.v2.BoundingBox.Builder, com.google.privacy.dlp.v2.BoundingBoxOrBuilder>( + boundingBoxes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + boundingBoxes_ = null; + } + return boundingBoxesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageLocation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageLocation) + private static final com.google.privacy.dlp.v2.ImageLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageLocation(); + } + + public static com.google.privacy.dlp.v2.ImageLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageLocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocationOrBuilder.java new file mode 100644 index 000000000000..99ddc7481378 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocationOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ImageLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + java.util.List + getBoundingBoxesList(); + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + com.google.privacy.dlp.v2.BoundingBox getBoundingBoxes(int index); + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + int getBoundingBoxesCount(); + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + java.util.List + getBoundingBoxesOrBuilderList(); + /** + *
+   * Bounding boxes locating the pixels within the image containing the finding.
+   * 
+ * + * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; + */ + com.google.privacy.dlp.v2.BoundingBoxOrBuilder getBoundingBoxesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java new file mode 100644 index 000000000000..7843de5642d7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java @@ -0,0 +1,4271 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A type of transformation that is applied over images.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations} + */ +public final class ImageTransformations extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations) + ImageTransformationsOrBuilder { +private static final long serialVersionUID = 0L; + // Use ImageTransformations.newBuilder() to construct. + private ImageTransformations(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageTransformations() { + transforms_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageTransformations(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageTransformations( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transforms_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + transforms_.add( + input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transforms_ = java.util.Collections.unmodifiableList(transforms_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.class, com.google.privacy.dlp.v2.ImageTransformations.Builder.class); + } + + public interface ImageTransformationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations.ImageTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Apply transformation to the selected info_types.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * @return Whether the selectedInfoTypes field is set. + */ + boolean hasSelectedInfoTypes(); + /** + *
+     * Apply transformation to the selected info_types.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * @return The selectedInfoTypes. + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getSelectedInfoTypes(); + /** + *
+     * Apply transformation to the selected info_types.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder getSelectedInfoTypesOrBuilder(); + + /** + *
+     * Apply transformation to all findings not specified in other
+     * ImageTransformation's selected_info_types. Only one instance is allowed
+     * within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * @return Whether the allInfoTypes field is set. + */ + boolean hasAllInfoTypes(); + /** + *
+     * Apply transformation to all findings not specified in other
+     * ImageTransformation's selected_info_types. Only one instance is allowed
+     * within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * @return The allInfoTypes. + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getAllInfoTypes(); + /** + *
+     * Apply transformation to all findings not specified in other
+     * ImageTransformation's selected_info_types. Only one instance is allowed
+     * within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder getAllInfoTypesOrBuilder(); + + /** + *
+     * Apply transformation to all text that doesn't match an infoType. Only
+     * one instance is allowed within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * @return Whether the allText field is set. + */ + boolean hasAllText(); + /** + *
+     * Apply transformation to all text that doesn't match an infoType. Only
+     * one instance is allowed within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * @return The allText. + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getAllText(); + /** + *
+     * Apply transformation to all text that doesn't match an infoType. Only
+     * one instance is allowed within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder getAllTextOrBuilder(); + + /** + *
+     * The color to use when redacting content from an image. If not
+     * specified, the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return Whether the redactionColor field is set. + */ + boolean hasRedactionColor(); + /** + *
+     * The color to use when redacting content from an image. If not
+     * specified, the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return The redactionColor. + */ + com.google.privacy.dlp.v2.Color getRedactionColor(); + /** + *
+     * The color to use when redacting content from an image. If not
+     * specified, the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder(); + + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.TargetCase getTargetCase(); + } + /** + *
+   * Configuration for determining how redaction of images should occur.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation} + */ + public static final class ImageTransformation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation) + ImageTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageTransformation.newBuilder() to construct. + private ImageTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageTransformation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: { + com.google.privacy.dlp.v2.Color.Builder subBuilder = null; + if (redactionColor_ != null) { + subBuilder = redactionColor_.toBuilder(); + } + redactionColor_ = input.readMessage(com.google.privacy.dlp.v2.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(redactionColor_); + redactionColor_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder subBuilder = null; + if (targetCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_).toBuilder(); + } + target_ = + input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_); + target_ = subBuilder.buildPartial(); + } + targetCase_ = 4; + break; + } + case 42: { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder subBuilder = null; + if (targetCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_).toBuilder(); + } + target_ = + input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_); + target_ = subBuilder.buildPartial(); + } + targetCase_ = 5; + break; + } + case 50: { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder subBuilder = null; + if (targetCase_ == 6) { + subBuilder = ((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_).toBuilder(); + } + target_ = + input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_); + target_ = subBuilder.buildPartial(); + } + targetCase_ = 6; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder.class); + } + + public interface SelectedInfoTypesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getInfoTypesList(); + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + int getInfoTypesCount(); + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getInfoTypesOrBuilderList(); + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index); + } + /** + *
+     * Apply transformation to the selected info_types.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} + */ + public static final class SelectedInfoTypes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) + SelectedInfoTypesOrBuilder { + private static final long serialVersionUID = 0L; + // Use SelectedInfoTypes.newBuilder() to construct. + private SelectedInfoTypes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SelectedInfoTypes() { + infoTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SelectedInfoTypes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SelectedInfoTypes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + infoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder.class); + } + + public static final int INFO_TYPES_FIELD_NUMBER = 5; + private java.util.List infoTypes_; + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getInfoTypesList() { + return infoTypes_; + } + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getInfoTypesOrBuilderList() { + return infoTypes_; + } + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getInfoTypesCount() { + return infoTypes_.size(); + } + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + return infoTypes_.get(index); + } + /** + *
+       * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+       * must be unique within the ImageTransformations message.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + return infoTypes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < infoTypes_.size(); i++) { + output.writeMessage(5, infoTypes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < infoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, infoTypes_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes other = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) obj; + + if (!getInfoTypesList() + .equals(other.getInfoTypesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInfoTypesCount() > 0) { + hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getInfoTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInfoTypesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + infoTypesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes build() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes buildPartial() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes result = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes(this); + int from_bitField0_ = bitField0_; + if (infoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.infoTypes_ = infoTypes_; + } else { + result.infoTypes_ = infoTypesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) { + return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes other) { + if (other == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance()) return this; + if (infoTypesBuilder_ == null) { + if (!other.infoTypes_.isEmpty()) { + if (infoTypes_.isEmpty()) { + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInfoTypesIsMutable(); + infoTypes_.addAll(other.infoTypes_); + } + onChanged(); + } + } else { + if (!other.infoTypes_.isEmpty()) { + if (infoTypesBuilder_.isEmpty()) { + infoTypesBuilder_.dispose(); + infoTypesBuilder_ = null; + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + infoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInfoTypesFieldBuilder() : null; + } else { + infoTypesBuilder_.addAllMessages(other.infoTypes_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List infoTypes_ = + java.util.Collections.emptyList(); + private void ensureInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(infoTypes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; + + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getInfoTypesList() { + if (infoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(infoTypes_); + } else { + return infoTypesBuilder_.getMessageList(); + } + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getInfoTypesCount() { + if (infoTypesBuilder_ == null) { + return infoTypes_.size(); + } else { + return infoTypesBuilder_.getCount(); + } + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); + } else { + return infoTypesBuilder_.getMessage(index); + } + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.set(index, value); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(index, value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addInfoTypes( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllInfoTypes( + java.lang.Iterable values) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, infoTypes_); + onChanged(); + } else { + infoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearInfoTypes() { + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + infoTypesBuilder_.clear(); + } + return this; + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.remove(index); + onChanged(); + } else { + infoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); } else { + return infoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getInfoTypesOrBuilderList() { + if (infoTypesBuilder_ != null) { + return infoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(infoTypes_); + } + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { + return getInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+         * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
+         * must be unique within the ImageTransformations message.
+         * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getInfoTypesBuilderList() { + return getInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypesFieldBuilder() { + if (infoTypesBuilder_ == null) { + infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + infoTypes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + infoTypes_ = null; + } + return infoTypesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) + private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes(); + } + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SelectedInfoTypes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SelectedInfoTypes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AllInfoTypesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+     * Apply transformation to all findings.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} + */ + public static final class AllInfoTypes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + AllInfoTypesOrBuilder { + private static final long serialVersionUID = 0L; + // Use AllInfoTypes.newBuilder() to construct. + private AllInfoTypes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AllInfoTypes() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AllInfoTypes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AllInfoTypes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes other = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Apply transformation to all findings.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes build() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes buildPartial() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes result = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) { + return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes other) { + if (other == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes(); + } + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllInfoTypes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllInfoTypes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AllTextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+     * Apply to all text.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} + */ + public static final class AllText extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + AllTextOrBuilder { + private static final long serialVersionUID = 0L; + // Use AllText.newBuilder() to construct. + private AllText(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AllText() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AllText(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AllText( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText other = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Apply to all text.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText build() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText buildPartial() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText result = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) { + return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText other) { + if (other == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText(); + } + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllText parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllText(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int targetCase_ = 0; + private java.lang.Object target_; + public enum TargetCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SELECTED_INFO_TYPES(4), + ALL_INFO_TYPES(5), + ALL_TEXT(6), + TARGET_NOT_SET(0); + private final int value; + private TargetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 4: return SELECTED_INFO_TYPES; + case 5: return ALL_INFO_TYPES; + case 6: return ALL_TEXT; + case 0: return TARGET_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TargetCase + getTargetCase() { + return TargetCase.forNumber( + targetCase_); + } + + public static final int SELECTED_INFO_TYPES_FIELD_NUMBER = 4; + /** + *
+     * Apply transformation to the selected info_types.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * @return Whether the selectedInfoTypes field is set. + */ + @java.lang.Override + public boolean hasSelectedInfoTypes() { + return targetCase_ == 4; + } + /** + *
+     * Apply transformation to the selected info_types.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * @return The selectedInfoTypes. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getSelectedInfoTypes() { + if (targetCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + } + /** + *
+     * Apply transformation to the selected info_types.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder getSelectedInfoTypesOrBuilder() { + if (targetCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + } + + public static final int ALL_INFO_TYPES_FIELD_NUMBER = 5; + /** + *
+     * Apply transformation to all findings not specified in other
+     * ImageTransformation's selected_info_types. Only one instance is allowed
+     * within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * @return Whether the allInfoTypes field is set. + */ + @java.lang.Override + public boolean hasAllInfoTypes() { + return targetCase_ == 5; + } + /** + *
+     * Apply transformation to all findings not specified in other
+     * ImageTransformation's selected_info_types. Only one instance is allowed
+     * within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * @return The allInfoTypes. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getAllInfoTypes() { + if (targetCase_ == 5) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + } + /** + *
+     * Apply transformation to all findings not specified in other
+     * ImageTransformation's selected_info_types. Only one instance is allowed
+     * within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder getAllInfoTypesOrBuilder() { + if (targetCase_ == 5) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + } + + public static final int ALL_TEXT_FIELD_NUMBER = 6; + /** + *
+     * Apply transformation to all text that doesn't match an infoType. Only
+     * one instance is allowed within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * @return Whether the allText field is set. + */ + @java.lang.Override + public boolean hasAllText() { + return targetCase_ == 6; + } + /** + *
+     * Apply transformation to all text that doesn't match an infoType. Only
+     * one instance is allowed within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * @return The allText. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getAllText() { + if (targetCase_ == 6) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + } + /** + *
+     * Apply transformation to all text that doesn't match an infoType. Only
+     * one instance is allowed within the ImageTransformations message.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder getAllTextOrBuilder() { + if (targetCase_ == 6) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + } + + public static final int REDACTION_COLOR_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.Color redactionColor_; + /** + *
+     * The color to use when redacting content from an image. If not
+     * specified, the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return Whether the redactionColor field is set. + */ + @java.lang.Override + public boolean hasRedactionColor() { + return redactionColor_ != null; + } + /** + *
+     * The color to use when redacting content from an image. If not
+     * specified, the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return The redactionColor. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Color getRedactionColor() { + return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; + } + /** + *
+     * The color to use when redacting content from an image. If not
+     * specified, the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() { + return getRedactionColor(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (redactionColor_ != null) { + output.writeMessage(3, getRedactionColor()); + } + if (targetCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_); + } + if (targetCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_); + } + if (targetCase_ == 6) { + output.writeMessage(6, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (redactionColor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getRedactionColor()); + } + if (targetCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_); + } + if (targetCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_); + } + if (targetCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation other = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) obj; + + if (hasRedactionColor() != other.hasRedactionColor()) return false; + if (hasRedactionColor()) { + if (!getRedactionColor() + .equals(other.getRedactionColor())) return false; + } + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 4: + if (!getSelectedInfoTypes() + .equals(other.getSelectedInfoTypes())) return false; + break; + case 5: + if (!getAllInfoTypes() + .equals(other.getAllInfoTypes())) return false; + break; + case 6: + if (!getAllText() + .equals(other.getAllText())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRedactionColor()) { + hash = (37 * hash) + REDACTION_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getRedactionColor().hashCode(); + } + switch (targetCase_) { + case 4: + hash = (37 * hash) + SELECTED_INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getSelectedInfoTypes().hashCode(); + break; + case 5: + hash = (37 * hash) + ALL_INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAllInfoTypes().hashCode(); + break; + case 6: + hash = (37 * hash) + ALL_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getAllText().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Configuration for determining how redaction of images should occur.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation) + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (redactionColorBuilder_ == null) { + redactionColor_ = null; + } else { + redactionColor_ = null; + redactionColorBuilder_ = null; + } + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation build() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation buildPartial() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation result = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation(this); + if (targetCase_ == 4) { + if (selectedInfoTypesBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = selectedInfoTypesBuilder_.build(); + } + } + if (targetCase_ == 5) { + if (allInfoTypesBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = allInfoTypesBuilder_.build(); + } + } + if (targetCase_ == 6) { + if (allTextBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = allTextBuilder_.build(); + } + } + if (redactionColorBuilder_ == null) { + result.redactionColor_ = redactionColor_; + } else { + result.redactionColor_ = redactionColorBuilder_.build(); + } + result.targetCase_ = targetCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) { + return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation other) { + if (other == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.getDefaultInstance()) return this; + if (other.hasRedactionColor()) { + mergeRedactionColor(other.getRedactionColor()); + } + switch (other.getTargetCase()) { + case SELECTED_INFO_TYPES: { + mergeSelectedInfoTypes(other.getSelectedInfoTypes()); + break; + } + case ALL_INFO_TYPES: { + mergeAllInfoTypes(other.getAllInfoTypes()); + break; + } + case ALL_TEXT: { + mergeAllText(other.getAllText()); + break; + } + case TARGET_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int targetCase_ = 0; + private java.lang.Object target_; + public TargetCase + getTargetCase() { + return TargetCase.forNumber( + targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder> selectedInfoTypesBuilder_; + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * @return Whether the selectedInfoTypes field is set. + */ + @java.lang.Override + public boolean hasSelectedInfoTypes() { + return targetCase_ == 4; + } + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * @return The selectedInfoTypes. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getSelectedInfoTypes() { + if (selectedInfoTypesBuilder_ == null) { + if (targetCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + } else { + if (targetCase_ == 4) { + return selectedInfoTypesBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + } + } + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + */ + public Builder setSelectedInfoTypes(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes value) { + if (selectedInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + selectedInfoTypesBuilder_.setMessage(value); + } + targetCase_ = 4; + return this; + } + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + */ + public Builder setSelectedInfoTypes( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder builderForValue) { + if (selectedInfoTypesBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + selectedInfoTypesBuilder_.setMessage(builderForValue.build()); + } + targetCase_ = 4; + return this; + } + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + */ + public Builder mergeSelectedInfoTypes(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes value) { + if (selectedInfoTypesBuilder_ == null) { + if (targetCase_ == 4 && + target_ != com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance()) { + target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.newBuilder((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_) + .mergeFrom(value).buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + if (targetCase_ == 4) { + selectedInfoTypesBuilder_.mergeFrom(value); + } else { + selectedInfoTypesBuilder_.setMessage(value); + } + } + targetCase_ = 4; + return this; + } + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + */ + public Builder clearSelectedInfoTypes() { + if (selectedInfoTypesBuilder_ == null) { + if (targetCase_ == 4) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + } else { + if (targetCase_ == 4) { + targetCase_ = 0; + target_ = null; + } + selectedInfoTypesBuilder_.clear(); + } + return this; + } + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + */ + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder getSelectedInfoTypesBuilder() { + return getSelectedInfoTypesFieldBuilder().getBuilder(); + } + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder getSelectedInfoTypesOrBuilder() { + if ((targetCase_ == 4) && (selectedInfoTypesBuilder_ != null)) { + return selectedInfoTypesBuilder_.getMessageOrBuilder(); + } else { + if (targetCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + } + } + /** + *
+       * Apply transformation to the selected info_types.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder> + getSelectedInfoTypesFieldBuilder() { + if (selectedInfoTypesBuilder_ == null) { + if (!(targetCase_ == 4)) { + target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + } + selectedInfoTypesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder>( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_, + getParentForChildren(), + isClean()); + target_ = null; + } + targetCase_ = 4; + onChanged();; + return selectedInfoTypesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder> allInfoTypesBuilder_; + /** + *
+       * Apply transformation to all findings not specified in other
+       * ImageTransformation's selected_info_types. Only one instance is allowed
+       * within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * @return Whether the allInfoTypes field is set. + */ + @java.lang.Override + public boolean hasAllInfoTypes() { + return targetCase_ == 5; + } + /** + *
+       * Apply transformation to all findings not specified in other
+       * ImageTransformation's selected_info_types. Only one instance is allowed
+       * within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * @return The allInfoTypes. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getAllInfoTypes() { + if (allInfoTypesBuilder_ == null) { + if (targetCase_ == 5) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + } else { + if (targetCase_ == 5) { + return allInfoTypesBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + } + } + /** + *
+       * Apply transformation to all findings not specified in other
+       * ImageTransformation's selected_info_types. Only one instance is allowed
+       * within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + */ + public Builder setAllInfoTypes(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes value) { + if (allInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + allInfoTypesBuilder_.setMessage(value); + } + targetCase_ = 5; + return this; + } + /** + *
+       * Apply transformation to all findings not specified in other
+       * ImageTransformation's selected_info_types. Only one instance is allowed
+       * within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + */ + public Builder setAllInfoTypes( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder builderForValue) { + if (allInfoTypesBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + allInfoTypesBuilder_.setMessage(builderForValue.build()); + } + targetCase_ = 5; + return this; + } + /** + *
+       * Apply transformation to all findings not specified in other
+       * ImageTransformation's selected_info_types. Only one instance is allowed
+       * within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + */ + public Builder mergeAllInfoTypes(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes value) { + if (allInfoTypesBuilder_ == null) { + if (targetCase_ == 5 && + target_ != com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance()) { + target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.newBuilder((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_) + .mergeFrom(value).buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + if (targetCase_ == 5) { + allInfoTypesBuilder_.mergeFrom(value); + } else { + allInfoTypesBuilder_.setMessage(value); + } + } + targetCase_ = 5; + return this; + } + /** + *
+       * Apply transformation to all findings not specified in other
+       * ImageTransformation's selected_info_types. Only one instance is allowed
+       * within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + */ + public Builder clearAllInfoTypes() { + if (allInfoTypesBuilder_ == null) { + if (targetCase_ == 5) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + } else { + if (targetCase_ == 5) { + targetCase_ = 0; + target_ = null; + } + allInfoTypesBuilder_.clear(); + } + return this; + } + /** + *
+       * Apply transformation to all findings not specified in other
+       * ImageTransformation's selected_info_types. Only one instance is allowed
+       * within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + */ + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder getAllInfoTypesBuilder() { + return getAllInfoTypesFieldBuilder().getBuilder(); + } + /** + *
+       * Apply transformation to all findings not specified in other
+       * ImageTransformation's selected_info_types. Only one instance is allowed
+       * within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder getAllInfoTypesOrBuilder() { + if ((targetCase_ == 5) && (allInfoTypesBuilder_ != null)) { + return allInfoTypesBuilder_.getMessageOrBuilder(); + } else { + if (targetCase_ == 5) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + } + } + /** + *
+       * Apply transformation to all findings not specified in other
+       * ImageTransformation's selected_info_types. Only one instance is allowed
+       * within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder> + getAllInfoTypesFieldBuilder() { + if (allInfoTypesBuilder_ == null) { + if (!(targetCase_ == 5)) { + target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + } + allInfoTypesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder>( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_, + getParentForChildren(), + isClean()); + target_ = null; + } + targetCase_ = 5; + onChanged();; + return allInfoTypesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder> allTextBuilder_; + /** + *
+       * Apply transformation to all text that doesn't match an infoType. Only
+       * one instance is allowed within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * @return Whether the allText field is set. + */ + @java.lang.Override + public boolean hasAllText() { + return targetCase_ == 6; + } + /** + *
+       * Apply transformation to all text that doesn't match an infoType. Only
+       * one instance is allowed within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * @return The allText. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getAllText() { + if (allTextBuilder_ == null) { + if (targetCase_ == 6) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + } else { + if (targetCase_ == 6) { + return allTextBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + } + } + /** + *
+       * Apply transformation to all text that doesn't match an infoType. Only
+       * one instance is allowed within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + */ + public Builder setAllText(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText value) { + if (allTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + allTextBuilder_.setMessage(value); + } + targetCase_ = 6; + return this; + } + /** + *
+       * Apply transformation to all text that doesn't match an infoType. Only
+       * one instance is allowed within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + */ + public Builder setAllText( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder builderForValue) { + if (allTextBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + allTextBuilder_.setMessage(builderForValue.build()); + } + targetCase_ = 6; + return this; + } + /** + *
+       * Apply transformation to all text that doesn't match an infoType. Only
+       * one instance is allowed within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + */ + public Builder mergeAllText(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText value) { + if (allTextBuilder_ == null) { + if (targetCase_ == 6 && + target_ != com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance()) { + target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.newBuilder((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_) + .mergeFrom(value).buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + if (targetCase_ == 6) { + allTextBuilder_.mergeFrom(value); + } else { + allTextBuilder_.setMessage(value); + } + } + targetCase_ = 6; + return this; + } + /** + *
+       * Apply transformation to all text that doesn't match an infoType. Only
+       * one instance is allowed within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + */ + public Builder clearAllText() { + if (allTextBuilder_ == null) { + if (targetCase_ == 6) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + } else { + if (targetCase_ == 6) { + targetCase_ = 0; + target_ = null; + } + allTextBuilder_.clear(); + } + return this; + } + /** + *
+       * Apply transformation to all text that doesn't match an infoType. Only
+       * one instance is allowed within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + */ + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder getAllTextBuilder() { + return getAllTextFieldBuilder().getBuilder(); + } + /** + *
+       * Apply transformation to all text that doesn't match an infoType. Only
+       * one instance is allowed within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder getAllTextOrBuilder() { + if ((targetCase_ == 6) && (allTextBuilder_ != null)) { + return allTextBuilder_.getMessageOrBuilder(); + } else { + if (targetCase_ == 6) { + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; + } + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + } + } + /** + *
+       * Apply transformation to all text that doesn't match an infoType. Only
+       * one instance is allowed within the ImageTransformations message.
+       * 
+ * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder> + getAllTextFieldBuilder() { + if (allTextBuilder_ == null) { + if (!(targetCase_ == 6)) { + target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + } + allTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder>( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_, + getParentForChildren(), + isClean()); + target_ = null; + } + targetCase_ = 6; + onChanged();; + return allTextBuilder_; + } + + private com.google.privacy.dlp.v2.Color redactionColor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> redactionColorBuilder_; + /** + *
+       * The color to use when redacting content from an image. If not
+       * specified, the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return Whether the redactionColor field is set. + */ + public boolean hasRedactionColor() { + return redactionColorBuilder_ != null || redactionColor_ != null; + } + /** + *
+       * The color to use when redacting content from an image. If not
+       * specified, the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return The redactionColor. + */ + public com.google.privacy.dlp.v2.Color getRedactionColor() { + if (redactionColorBuilder_ == null) { + return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; + } else { + return redactionColorBuilder_.getMessage(); + } + } + /** + *
+       * The color to use when redacting content from an image. If not
+       * specified, the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public Builder setRedactionColor(com.google.privacy.dlp.v2.Color value) { + if (redactionColorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + redactionColor_ = value; + onChanged(); + } else { + redactionColorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The color to use when redacting content from an image. If not
+       * specified, the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public Builder setRedactionColor( + com.google.privacy.dlp.v2.Color.Builder builderForValue) { + if (redactionColorBuilder_ == null) { + redactionColor_ = builderForValue.build(); + onChanged(); + } else { + redactionColorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The color to use when redacting content from an image. If not
+       * specified, the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public Builder mergeRedactionColor(com.google.privacy.dlp.v2.Color value) { + if (redactionColorBuilder_ == null) { + if (redactionColor_ != null) { + redactionColor_ = + com.google.privacy.dlp.v2.Color.newBuilder(redactionColor_).mergeFrom(value).buildPartial(); + } else { + redactionColor_ = value; + } + onChanged(); + } else { + redactionColorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The color to use when redacting content from an image. If not
+       * specified, the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public Builder clearRedactionColor() { + if (redactionColorBuilder_ == null) { + redactionColor_ = null; + onChanged(); + } else { + redactionColor_ = null; + redactionColorBuilder_ = null; + } + + return this; + } + /** + *
+       * The color to use when redacting content from an image. If not
+       * specified, the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public com.google.privacy.dlp.v2.Color.Builder getRedactionColorBuilder() { + + onChanged(); + return getRedactionColorFieldBuilder().getBuilder(); + } + /** + *
+       * The color to use when redacting content from an image. If not
+       * specified, the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() { + if (redactionColorBuilder_ != null) { + return redactionColorBuilder_.getMessageOrBuilder(); + } else { + return redactionColor_ == null ? + com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; + } + } + /** + *
+       * The color to use when redacting content from an image. If not
+       * specified, the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> + getRedactionColorFieldBuilder() { + if (redactionColorBuilder_ == null) { + redactionColorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder>( + getRedactionColor(), + getParentForChildren(), + isClean()); + redactionColor_ = null; + } + return redactionColorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation) + private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation(); + } + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageTransformation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int TRANSFORMS_FIELD_NUMBER = 2; + private java.util.List transforms_; + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + @java.lang.Override + public java.util.List getTransformsList() { + return transforms_; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + @java.lang.Override + public java.util.List + getTransformsOrBuilderList() { + return transforms_; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + @java.lang.Override + public int getTransformsCount() { + return transforms_.size(); + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTransforms(int index) { + return transforms_.get(index); + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder getTransformsOrBuilder( + int index) { + return transforms_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < transforms_.size(); i++) { + output.writeMessage(2, transforms_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < transforms_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, transforms_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ImageTransformations other = (com.google.privacy.dlp.v2.ImageTransformations) obj; + + if (!getTransformsList() + .equals(other.getTransformsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTransformsCount() > 0) { + hash = (37 * hash) + TRANSFORMS_FIELD_NUMBER; + hash = (53 * hash) + getTransformsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ImageTransformations parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A type of transformation that is applied over images.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations) + com.google.privacy.dlp.v2.ImageTransformationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ImageTransformations.class, com.google.privacy.dlp.v2.ImageTransformations.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ImageTransformations.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTransformsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (transformsBuilder_ == null) { + transforms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transformsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations build() { + com.google.privacy.dlp.v2.ImageTransformations result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations buildPartial() { + com.google.privacy.dlp.v2.ImageTransformations result = new com.google.privacy.dlp.v2.ImageTransformations(this); + int from_bitField0_ = bitField0_; + if (transformsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transforms_ = java.util.Collections.unmodifiableList(transforms_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transforms_ = transforms_; + } else { + result.transforms_ = transformsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ImageTransformations) { + return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations other) { + if (other == com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance()) return this; + if (transformsBuilder_ == null) { + if (!other.transforms_.isEmpty()) { + if (transforms_.isEmpty()) { + transforms_ = other.transforms_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransformsIsMutable(); + transforms_.addAll(other.transforms_); + } + onChanged(); + } + } else { + if (!other.transforms_.isEmpty()) { + if (transformsBuilder_.isEmpty()) { + transformsBuilder_.dispose(); + transformsBuilder_ = null; + transforms_ = other.transforms_; + bitField0_ = (bitField0_ & ~0x00000001); + transformsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTransformsFieldBuilder() : null; + } else { + transformsBuilder_.addAllMessages(other.transforms_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ImageTransformations parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ImageTransformations) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List transforms_ = + java.util.Collections.emptyList(); + private void ensureTransformsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transforms_ = new java.util.ArrayList(transforms_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder> transformsBuilder_; + + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public java.util.List getTransformsList() { + if (transformsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transforms_); + } else { + return transformsBuilder_.getMessageList(); + } + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public int getTransformsCount() { + if (transformsBuilder_ == null) { + return transforms_.size(); + } else { + return transformsBuilder_.getCount(); + } + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTransforms(int index) { + if (transformsBuilder_ == null) { + return transforms_.get(index); + } else { + return transformsBuilder_.getMessage(index); + } + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public Builder setTransforms( + int index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation value) { + if (transformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformsIsMutable(); + transforms_.set(index, value); + onChanged(); + } else { + transformsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public Builder setTransforms( + int index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder builderForValue) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + transforms_.set(index, builderForValue.build()); + onChanged(); + } else { + transformsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public Builder addTransforms(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation value) { + if (transformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformsIsMutable(); + transforms_.add(value); + onChanged(); + } else { + transformsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public Builder addTransforms( + int index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation value) { + if (transformsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformsIsMutable(); + transforms_.add(index, value); + onChanged(); + } else { + transformsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public Builder addTransforms( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder builderForValue) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + transforms_.add(builderForValue.build()); + onChanged(); + } else { + transformsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public Builder addTransforms( + int index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder builderForValue) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + transforms_.add(index, builderForValue.build()); + onChanged(); + } else { + transformsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public Builder addAllTransforms( + java.lang.Iterable values) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, transforms_); + onChanged(); + } else { + transformsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public Builder clearTransforms() { + if (transformsBuilder_ == null) { + transforms_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transformsBuilder_.clear(); + } + return this; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public Builder removeTransforms(int index) { + if (transformsBuilder_ == null) { + ensureTransformsIsMutable(); + transforms_.remove(index); + onChanged(); + } else { + transformsBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder getTransformsBuilder( + int index) { + return getTransformsFieldBuilder().getBuilder(index); + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder getTransformsOrBuilder( + int index) { + if (transformsBuilder_ == null) { + return transforms_.get(index); } else { + return transformsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public java.util.List + getTransformsOrBuilderList() { + if (transformsBuilder_ != null) { + return transformsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transforms_); + } + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder addTransformsBuilder() { + return getTransformsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.getDefaultInstance()); + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder addTransformsBuilder( + int index) { + return getTransformsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.getDefaultInstance()); + } + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + public java.util.List + getTransformsBuilderList() { + return getTransformsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder> + getTransformsFieldBuilder() { + if (transformsBuilder_ == null) { + transformsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder>( + transforms_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transforms_ = null; + } + return transformsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations) + private static final com.google.privacy.dlp.v2.ImageTransformations DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations(); + } + + public static com.google.privacy.dlp.v2.ImageTransformations getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageTransformations parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageTransformations(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java new file mode 100644 index 000000000000..c07bc793c8a2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ImageTransformationsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + java.util.List + getTransformsList(); + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTransforms(int index); + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + int getTransformsCount(); + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + java.util.List + getTransformsOrBuilderList(); + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder getTransformsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java new file mode 100644 index 000000000000..82bf89b65535 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java @@ -0,0 +1,789 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Type of information detected by the API.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoType} + */ +public final class InfoType extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoType) + InfoTypeOrBuilder { +private static final long serialVersionUID = 0L; + // Use InfoType.newBuilder() to construct. + private InfoType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoType() { + name_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InfoType( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoType.class, com.google.privacy.dlp.v2.InfoType.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Name of the information type. Either a name of your choosing when
+   * creating a CustomInfoType, or one of the names listed
+   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+   * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
+   * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Name of the information type. Either a name of your choosing when
+   * creating a CustomInfoType, or one of the names listed
+   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+   * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
+   * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object version_; + /** + *
+   * Optional version name for this InfoType.
+   * 
+ * + * string version = 2; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Optional version name for this InfoType.
+   * 
+ * + * string version = 2; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InfoType)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InfoType other = (com.google.privacy.dlp.v2.InfoType) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InfoType parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoType parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoType parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoType parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoType parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoType parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InfoType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Type of information detected by the API.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoType} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoType) + com.google.privacy.dlp.v2.InfoTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoType.class, com.google.privacy.dlp.v2.InfoType.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InfoType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType build() { + com.google.privacy.dlp.v2.InfoType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType buildPartial() { + com.google.privacy.dlp.v2.InfoType result = new com.google.privacy.dlp.v2.InfoType(this); + result.name_ = name_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InfoType) { + return mergeFrom((com.google.privacy.dlp.v2.InfoType)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InfoType other) { + if (other == com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InfoType parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InfoType) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
+     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
+     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
+     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
+     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
+     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * Optional version name for this InfoType.
+     * 
+ * + * string version = 2; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional version name for this InfoType.
+     * 
+ * + * string version = 2; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional version name for this InfoType.
+     * 
+ * + * string version = 2; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional version name for this InfoType.
+     * 
+ * + * string version = 2; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * Optional version name for this InfoType.
+     * 
+ * + * string version = 2; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoType) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoType) + private static final com.google.privacy.dlp.v2.InfoType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoType(); + } + + public static com.google.privacy.dlp.v2.InfoType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InfoType(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategory.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategory.java new file mode 100644 index 000000000000..61c4ee295ebc --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategory.java @@ -0,0 +1,2212 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Classification of infoTypes to organize them according to geographic
+ * location, industry, and data type.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeCategory} + */ +public final class InfoTypeCategory extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeCategory) + InfoTypeCategoryOrBuilder { +private static final long serialVersionUID = 0L; + // Use InfoTypeCategory.newBuilder() to construct. + private InfoTypeCategory(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoTypeCategory() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoTypeCategory(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InfoTypeCategory( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + categoryCase_ = 1; + category_ = rawValue; + break; + } + case 16: { + int rawValue = input.readEnum(); + categoryCase_ = 2; + category_ = rawValue; + break; + } + case 24: { + int rawValue = input.readEnum(); + categoryCase_ = 3; + category_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeCategory.class, com.google.privacy.dlp.v2.InfoTypeCategory.Builder.class); + } + + /** + *
+   * Enum of the current locations.
+   * We might add more locations in the future.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.InfoTypeCategory.LocationCategory} + */ + public enum LocationCategory + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused location
+     * 
+ * + * LOCATION_UNSPECIFIED = 0; + */ + LOCATION_UNSPECIFIED(0), + /** + *
+     * The infoType is not issued by or tied to a specific region, but is used
+     * almost everywhere.
+     * 
+ * + * GLOBAL = 1; + */ + GLOBAL(1), + /** + *
+     * The infoType is typically used in Argentina.
+     * 
+ * + * ARGENTINA = 2; + */ + ARGENTINA(2), + /** + *
+     * The infoType is typically used in Australia.
+     * 
+ * + * AUSTRALIA = 3; + */ + AUSTRALIA(3), + /** + *
+     * The infoType is typically used in Belgium.
+     * 
+ * + * BELGIUM = 4; + */ + BELGIUM(4), + /** + *
+     * The infoType is typically used in Brazil.
+     * 
+ * + * BRAZIL = 5; + */ + BRAZIL(5), + /** + *
+     * The infoType is typically used in Canada.
+     * 
+ * + * CANADA = 6; + */ + CANADA(6), + /** + *
+     * The infoType is typically used in Chile.
+     * 
+ * + * CHILE = 7; + */ + CHILE(7), + /** + *
+     * The infoType is typically used in China.
+     * 
+ * + * CHINA = 8; + */ + CHINA(8), + /** + *
+     * The infoType is typically used in Colombia.
+     * 
+ * + * COLOMBIA = 9; + */ + COLOMBIA(9), + /** + *
+     * The infoType is typically used in Denmark.
+     * 
+ * + * DENMARK = 10; + */ + DENMARK(10), + /** + *
+     * The infoType is typically used in France.
+     * 
+ * + * FRANCE = 11; + */ + FRANCE(11), + /** + *
+     * The infoType is typically used in Finland.
+     * 
+ * + * FINLAND = 12; + */ + FINLAND(12), + /** + *
+     * The infoType is typically used in Germany.
+     * 
+ * + * GERMANY = 13; + */ + GERMANY(13), + /** + *
+     * The infoType is typically used in Hong Kong.
+     * 
+ * + * HONG_KONG = 14; + */ + HONG_KONG(14), + /** + *
+     * The infoType is typically used in India.
+     * 
+ * + * INDIA = 15; + */ + INDIA(15), + /** + *
+     * The infoType is typically used in Indonesia.
+     * 
+ * + * INDONESIA = 16; + */ + INDONESIA(16), + /** + *
+     * The infoType is typically used in Ireland.
+     * 
+ * + * IRELAND = 17; + */ + IRELAND(17), + /** + *
+     * The infoType is typically used in Israel.
+     * 
+ * + * ISRAEL = 18; + */ + ISRAEL(18), + /** + *
+     * The infoType is typically used in Italy.
+     * 
+ * + * ITALY = 19; + */ + ITALY(19), + /** + *
+     * The infoType is typically used in Japan.
+     * 
+ * + * JAPAN = 20; + */ + JAPAN(20), + /** + *
+     * The infoType is typically used in Korea.
+     * 
+ * + * KOREA = 21; + */ + KOREA(21), + /** + *
+     * The infoType is typically used in Mexico.
+     * 
+ * + * MEXICO = 22; + */ + MEXICO(22), + /** + *
+     * The infoType is typically used in the Netherlands.
+     * 
+ * + * THE_NETHERLANDS = 23; + */ + THE_NETHERLANDS(23), + /** + *
+     * The infoType is typically used in Norway.
+     * 
+ * + * NORWAY = 24; + */ + NORWAY(24), + /** + *
+     * The infoType is typically used in Paraguay.
+     * 
+ * + * PARAGUAY = 25; + */ + PARAGUAY(25), + /** + *
+     * The infoType is typically used in Peru.
+     * 
+ * + * PERU = 26; + */ + PERU(26), + /** + *
+     * The infoType is typically used in Poland.
+     * 
+ * + * POLAND = 27; + */ + POLAND(27), + /** + *
+     * The infoType is typically used in Portugal.
+     * 
+ * + * PORTUGAL = 28; + */ + PORTUGAL(28), + /** + *
+     * The infoType is typically used in Singapore.
+     * 
+ * + * SINGAPORE = 29; + */ + SINGAPORE(29), + /** + *
+     * The infoType is typically used in South Africa.
+     * 
+ * + * SOUTH_AFRICA = 30; + */ + SOUTH_AFRICA(30), + /** + *
+     * The infoType is typically used in Spain.
+     * 
+ * + * SPAIN = 31; + */ + SPAIN(31), + /** + *
+     * The infoType is typically used in Sweden.
+     * 
+ * + * SWEDEN = 32; + */ + SWEDEN(32), + /** + *
+     * The infoType is typically used in Taiwan.
+     * 
+ * + * TAIWAN = 33; + */ + TAIWAN(33), + /** + *
+     * The infoType is typically used in Thailand.
+     * 
+ * + * THAILAND = 34; + */ + THAILAND(34), + /** + *
+     * The infoType is typically used in Turkey.
+     * 
+ * + * TURKEY = 35; + */ + TURKEY(35), + /** + *
+     * The infoType is typically used in the United Kingdom.
+     * 
+ * + * UNITED_KINGDOM = 36; + */ + UNITED_KINGDOM(36), + /** + *
+     * The infoType is typically used in the United States.
+     * 
+ * + * UNITED_STATES = 37; + */ + UNITED_STATES(37), + /** + *
+     * The infoType is typically used in Uruguay.
+     * 
+ * + * URUGUAY = 38; + */ + URUGUAY(38), + /** + *
+     * The infoType is typically used in Venezuela.
+     * 
+ * + * VENEZUELA = 39; + */ + VENEZUELA(39), + /** + *
+     * The infoType is typically used in Google internally.
+     * 
+ * + * INTERNAL = 40; + */ + INTERNAL(40), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused location
+     * 
+ * + * LOCATION_UNSPECIFIED = 0; + */ + public static final int LOCATION_UNSPECIFIED_VALUE = 0; + /** + *
+     * The infoType is not issued by or tied to a specific region, but is used
+     * almost everywhere.
+     * 
+ * + * GLOBAL = 1; + */ + public static final int GLOBAL_VALUE = 1; + /** + *
+     * The infoType is typically used in Argentina.
+     * 
+ * + * ARGENTINA = 2; + */ + public static final int ARGENTINA_VALUE = 2; + /** + *
+     * The infoType is typically used in Australia.
+     * 
+ * + * AUSTRALIA = 3; + */ + public static final int AUSTRALIA_VALUE = 3; + /** + *
+     * The infoType is typically used in Belgium.
+     * 
+ * + * BELGIUM = 4; + */ + public static final int BELGIUM_VALUE = 4; + /** + *
+     * The infoType is typically used in Brazil.
+     * 
+ * + * BRAZIL = 5; + */ + public static final int BRAZIL_VALUE = 5; + /** + *
+     * The infoType is typically used in Canada.
+     * 
+ * + * CANADA = 6; + */ + public static final int CANADA_VALUE = 6; + /** + *
+     * The infoType is typically used in Chile.
+     * 
+ * + * CHILE = 7; + */ + public static final int CHILE_VALUE = 7; + /** + *
+     * The infoType is typically used in China.
+     * 
+ * + * CHINA = 8; + */ + public static final int CHINA_VALUE = 8; + /** + *
+     * The infoType is typically used in Colombia.
+     * 
+ * + * COLOMBIA = 9; + */ + public static final int COLOMBIA_VALUE = 9; + /** + *
+     * The infoType is typically used in Denmark.
+     * 
+ * + * DENMARK = 10; + */ + public static final int DENMARK_VALUE = 10; + /** + *
+     * The infoType is typically used in France.
+     * 
+ * + * FRANCE = 11; + */ + public static final int FRANCE_VALUE = 11; + /** + *
+     * The infoType is typically used in Finland.
+     * 
+ * + * FINLAND = 12; + */ + public static final int FINLAND_VALUE = 12; + /** + *
+     * The infoType is typically used in Germany.
+     * 
+ * + * GERMANY = 13; + */ + public static final int GERMANY_VALUE = 13; + /** + *
+     * The infoType is typically used in Hong Kong.
+     * 
+ * + * HONG_KONG = 14; + */ + public static final int HONG_KONG_VALUE = 14; + /** + *
+     * The infoType is typically used in India.
+     * 
+ * + * INDIA = 15; + */ + public static final int INDIA_VALUE = 15; + /** + *
+     * The infoType is typically used in Indonesia.
+     * 
+ * + * INDONESIA = 16; + */ + public static final int INDONESIA_VALUE = 16; + /** + *
+     * The infoType is typically used in Ireland.
+     * 
+ * + * IRELAND = 17; + */ + public static final int IRELAND_VALUE = 17; + /** + *
+     * The infoType is typically used in Israel.
+     * 
+ * + * ISRAEL = 18; + */ + public static final int ISRAEL_VALUE = 18; + /** + *
+     * The infoType is typically used in Italy.
+     * 
+ * + * ITALY = 19; + */ + public static final int ITALY_VALUE = 19; + /** + *
+     * The infoType is typically used in Japan.
+     * 
+ * + * JAPAN = 20; + */ + public static final int JAPAN_VALUE = 20; + /** + *
+     * The infoType is typically used in Korea.
+     * 
+ * + * KOREA = 21; + */ + public static final int KOREA_VALUE = 21; + /** + *
+     * The infoType is typically used in Mexico.
+     * 
+ * + * MEXICO = 22; + */ + public static final int MEXICO_VALUE = 22; + /** + *
+     * The infoType is typically used in the Netherlands.
+     * 
+ * + * THE_NETHERLANDS = 23; + */ + public static final int THE_NETHERLANDS_VALUE = 23; + /** + *
+     * The infoType is typically used in Norway.
+     * 
+ * + * NORWAY = 24; + */ + public static final int NORWAY_VALUE = 24; + /** + *
+     * The infoType is typically used in Paraguay.
+     * 
+ * + * PARAGUAY = 25; + */ + public static final int PARAGUAY_VALUE = 25; + /** + *
+     * The infoType is typically used in Peru.
+     * 
+ * + * PERU = 26; + */ + public static final int PERU_VALUE = 26; + /** + *
+     * The infoType is typically used in Poland.
+     * 
+ * + * POLAND = 27; + */ + public static final int POLAND_VALUE = 27; + /** + *
+     * The infoType is typically used in Portugal.
+     * 
+ * + * PORTUGAL = 28; + */ + public static final int PORTUGAL_VALUE = 28; + /** + *
+     * The infoType is typically used in Singapore.
+     * 
+ * + * SINGAPORE = 29; + */ + public static final int SINGAPORE_VALUE = 29; + /** + *
+     * The infoType is typically used in South Africa.
+     * 
+ * + * SOUTH_AFRICA = 30; + */ + public static final int SOUTH_AFRICA_VALUE = 30; + /** + *
+     * The infoType is typically used in Spain.
+     * 
+ * + * SPAIN = 31; + */ + public static final int SPAIN_VALUE = 31; + /** + *
+     * The infoType is typically used in Sweden.
+     * 
+ * + * SWEDEN = 32; + */ + public static final int SWEDEN_VALUE = 32; + /** + *
+     * The infoType is typically used in Taiwan.
+     * 
+ * + * TAIWAN = 33; + */ + public static final int TAIWAN_VALUE = 33; + /** + *
+     * The infoType is typically used in Thailand.
+     * 
+ * + * THAILAND = 34; + */ + public static final int THAILAND_VALUE = 34; + /** + *
+     * The infoType is typically used in Turkey.
+     * 
+ * + * TURKEY = 35; + */ + public static final int TURKEY_VALUE = 35; + /** + *
+     * The infoType is typically used in the United Kingdom.
+     * 
+ * + * UNITED_KINGDOM = 36; + */ + public static final int UNITED_KINGDOM_VALUE = 36; + /** + *
+     * The infoType is typically used in the United States.
+     * 
+ * + * UNITED_STATES = 37; + */ + public static final int UNITED_STATES_VALUE = 37; + /** + *
+     * The infoType is typically used in Uruguay.
+     * 
+ * + * URUGUAY = 38; + */ + public static final int URUGUAY_VALUE = 38; + /** + *
+     * The infoType is typically used in Venezuela.
+     * 
+ * + * VENEZUELA = 39; + */ + public static final int VENEZUELA_VALUE = 39; + /** + *
+     * The infoType is typically used in Google internally.
+     * 
+ * + * INTERNAL = 40; + */ + public static final int INTERNAL_VALUE = 40; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LocationCategory valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LocationCategory forNumber(int value) { + switch (value) { + case 0: return LOCATION_UNSPECIFIED; + case 1: return GLOBAL; + case 2: return ARGENTINA; + case 3: return AUSTRALIA; + case 4: return BELGIUM; + case 5: return BRAZIL; + case 6: return CANADA; + case 7: return CHILE; + case 8: return CHINA; + case 9: return COLOMBIA; + case 10: return DENMARK; + case 11: return FRANCE; + case 12: return FINLAND; + case 13: return GERMANY; + case 14: return HONG_KONG; + case 15: return INDIA; + case 16: return INDONESIA; + case 17: return IRELAND; + case 18: return ISRAEL; + case 19: return ITALY; + case 20: return JAPAN; + case 21: return KOREA; + case 22: return MEXICO; + case 23: return THE_NETHERLANDS; + case 24: return NORWAY; + case 25: return PARAGUAY; + case 26: return PERU; + case 27: return POLAND; + case 28: return PORTUGAL; + case 29: return SINGAPORE; + case 30: return SOUTH_AFRICA; + case 31: return SPAIN; + case 32: return SWEDEN; + case 33: return TAIWAN; + case 34: return THAILAND; + case 35: return TURKEY; + case 36: return UNITED_KINGDOM; + case 37: return UNITED_STATES; + case 38: return URUGUAY; + case 39: return VENEZUELA; + case 40: return INTERNAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LocationCategory> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LocationCategory findValueByNumber(int number) { + return LocationCategory.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.InfoTypeCategory.getDescriptor().getEnumTypes().get(0); + } + + private static final LocationCategory[] VALUES = values(); + + public static LocationCategory valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LocationCategory(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.InfoTypeCategory.LocationCategory) + } + + /** + *
+   * Enum of the current industries in the category.
+   * We might add more industries in the future.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory} + */ + public enum IndustryCategory + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused industry
+     * 
+ * + * INDUSTRY_UNSPECIFIED = 0; + */ + INDUSTRY_UNSPECIFIED(0), + /** + *
+     * The infoType is typically used in the finance industry.
+     * 
+ * + * FINANCE = 1; + */ + FINANCE(1), + /** + *
+     * The infoType is typically used in the health industry.
+     * 
+ * + * HEALTH = 2; + */ + HEALTH(2), + /** + *
+     * The infoType is typically used in the telecommunications industry.
+     * 
+ * + * TELECOMMUNICATIONS = 3; + */ + TELECOMMUNICATIONS(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused industry
+     * 
+ * + * INDUSTRY_UNSPECIFIED = 0; + */ + public static final int INDUSTRY_UNSPECIFIED_VALUE = 0; + /** + *
+     * The infoType is typically used in the finance industry.
+     * 
+ * + * FINANCE = 1; + */ + public static final int FINANCE_VALUE = 1; + /** + *
+     * The infoType is typically used in the health industry.
+     * 
+ * + * HEALTH = 2; + */ + public static final int HEALTH_VALUE = 2; + /** + *
+     * The infoType is typically used in the telecommunications industry.
+     * 
+ * + * TELECOMMUNICATIONS = 3; + */ + public static final int TELECOMMUNICATIONS_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IndustryCategory valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static IndustryCategory forNumber(int value) { + switch (value) { + case 0: return INDUSTRY_UNSPECIFIED; + case 1: return FINANCE; + case 2: return HEALTH; + case 3: return TELECOMMUNICATIONS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + IndustryCategory> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public IndustryCategory findValueByNumber(int number) { + return IndustryCategory.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.InfoTypeCategory.getDescriptor().getEnumTypes().get(1); + } + + private static final IndustryCategory[] VALUES = values(); + + public static IndustryCategory valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private IndustryCategory(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory) + } + + /** + *
+   * Enum of the current types in the category.
+   * We might add more types in the future.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.InfoTypeCategory.TypeCategory} + */ + public enum TypeCategory + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused type
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + *
+     * Personally identifiable information, for example, a
+     * name or phone number
+     * 
+ * + * PII = 1; + */ + PII(1), + /** + *
+     * Personally identifiable information that is especially sensitive, for
+     * example, a passport number.
+     * 
+ * + * SPII = 2; + */ + SPII(2), + /** + *
+     * Attributes that can partially identify someone, especially in
+     * combination with other attributes, like age, height, and gender.
+     * 
+ * + * DEMOGRAPHIC = 3; + */ + DEMOGRAPHIC(3), + /** + *
+     * Confidential or secret information, for example, a password.
+     * 
+ * + * CREDENTIAL = 4; + */ + CREDENTIAL(4), + /** + *
+     * An identification document issued by a government.
+     * 
+ * + * GOVERNMENT_ID = 5; + */ + GOVERNMENT_ID(5), + /** + *
+     * A document, for example, a resume or source code.
+     * 
+ * + * DOCUMENT = 6; + */ + DOCUMENT(6), + /** + *
+     * Information that is not sensitive on its own, but provides details about
+     * the circumstances surrounding an entity or an event.
+     * 
+ * + * CONTEXTUAL_INFORMATION = 7; + */ + CONTEXTUAL_INFORMATION(7), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused type
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Personally identifiable information, for example, a
+     * name or phone number
+     * 
+ * + * PII = 1; + */ + public static final int PII_VALUE = 1; + /** + *
+     * Personally identifiable information that is especially sensitive, for
+     * example, a passport number.
+     * 
+ * + * SPII = 2; + */ + public static final int SPII_VALUE = 2; + /** + *
+     * Attributes that can partially identify someone, especially in
+     * combination with other attributes, like age, height, and gender.
+     * 
+ * + * DEMOGRAPHIC = 3; + */ + public static final int DEMOGRAPHIC_VALUE = 3; + /** + *
+     * Confidential or secret information, for example, a password.
+     * 
+ * + * CREDENTIAL = 4; + */ + public static final int CREDENTIAL_VALUE = 4; + /** + *
+     * An identification document issued by a government.
+     * 
+ * + * GOVERNMENT_ID = 5; + */ + public static final int GOVERNMENT_ID_VALUE = 5; + /** + *
+     * A document, for example, a resume or source code.
+     * 
+ * + * DOCUMENT = 6; + */ + public static final int DOCUMENT_VALUE = 6; + /** + *
+     * Information that is not sensitive on its own, but provides details about
+     * the circumstances surrounding an entity or an event.
+     * 
+ * + * CONTEXTUAL_INFORMATION = 7; + */ + public static final int CONTEXTUAL_INFORMATION_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCategory valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TypeCategory forNumber(int value) { + switch (value) { + case 0: return TYPE_UNSPECIFIED; + case 1: return PII; + case 2: return SPII; + case 3: return DEMOGRAPHIC; + case 4: return CREDENTIAL; + case 5: return GOVERNMENT_ID; + case 6: return DOCUMENT; + case 7: return CONTEXTUAL_INFORMATION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TypeCategory> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TypeCategory findValueByNumber(int number) { + return TypeCategory.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.InfoTypeCategory.getDescriptor().getEnumTypes().get(2); + } + + private static final TypeCategory[] VALUES = values(); + + public static TypeCategory valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TypeCategory(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.InfoTypeCategory.TypeCategory) + } + + private int categoryCase_ = 0; + private java.lang.Object category_; + public enum CategoryCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LOCATION_CATEGORY(1), + INDUSTRY_CATEGORY(2), + TYPE_CATEGORY(3), + CATEGORY_NOT_SET(0); + private final int value; + private CategoryCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CategoryCase valueOf(int value) { + return forNumber(value); + } + + public static CategoryCase forNumber(int value) { + switch (value) { + case 1: return LOCATION_CATEGORY; + case 2: return INDUSTRY_CATEGORY; + case 3: return TYPE_CATEGORY; + case 0: return CATEGORY_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public CategoryCase + getCategoryCase() { + return CategoryCase.forNumber( + categoryCase_); + } + + public static final int LOCATION_CATEGORY_FIELD_NUMBER = 1; + /** + *
+   * The region or country that issued the ID or document represented by the
+   * infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return Whether the locationCategory field is set. + */ + public boolean hasLocationCategory() { + return categoryCase_ == 1; + } + /** + *
+   * The region or country that issued the ID or document represented by the
+   * infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return The enum numeric value on the wire for locationCategory. + */ + public int getLocationCategoryValue() { + if (categoryCase_ == 1) { + return (java.lang.Integer) category_; + } + return 0; + } + /** + *
+   * The region or country that issued the ID or document represented by the
+   * infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return The locationCategory. + */ + public com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory getLocationCategory() { + if (categoryCase_ == 1) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.valueOf( + (java.lang.Integer) category_); + return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.LOCATION_UNSPECIFIED; + } + + public static final int INDUSTRY_CATEGORY_FIELD_NUMBER = 2; + /** + *
+   * The group of relevant businesses where this infoType is commonly used
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return Whether the industryCategory field is set. + */ + public boolean hasIndustryCategory() { + return categoryCase_ == 2; + } + /** + *
+   * The group of relevant businesses where this infoType is commonly used
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return The enum numeric value on the wire for industryCategory. + */ + public int getIndustryCategoryValue() { + if (categoryCase_ == 2) { + return (java.lang.Integer) category_; + } + return 0; + } + /** + *
+   * The group of relevant businesses where this infoType is commonly used
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return The industryCategory. + */ + public com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory getIndustryCategory() { + if (categoryCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.valueOf( + (java.lang.Integer) category_); + return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.INDUSTRY_UNSPECIFIED; + } + + public static final int TYPE_CATEGORY_FIELD_NUMBER = 3; + /** + *
+   * The class of identifiers where this infoType belongs
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return Whether the typeCategory field is set. + */ + public boolean hasTypeCategory() { + return categoryCase_ == 3; + } + /** + *
+   * The class of identifiers where this infoType belongs
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return The enum numeric value on the wire for typeCategory. + */ + public int getTypeCategoryValue() { + if (categoryCase_ == 3) { + return (java.lang.Integer) category_; + } + return 0; + } + /** + *
+   * The class of identifiers where this infoType belongs
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return The typeCategory. + */ + public com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory getTypeCategory() { + if (categoryCase_ == 3) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.valueOf( + (java.lang.Integer) category_); + return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.TYPE_UNSPECIFIED; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (categoryCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) category_)); + } + if (categoryCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) category_)); + } + if (categoryCase_ == 3) { + output.writeEnum(3, ((java.lang.Integer) category_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (categoryCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, ((java.lang.Integer) category_)); + } + if (categoryCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, ((java.lang.Integer) category_)); + } + if (categoryCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, ((java.lang.Integer) category_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeCategory)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InfoTypeCategory other = (com.google.privacy.dlp.v2.InfoTypeCategory) obj; + + if (!getCategoryCase().equals(other.getCategoryCase())) return false; + switch (categoryCase_) { + case 1: + if (getLocationCategoryValue() + != other.getLocationCategoryValue()) return false; + break; + case 2: + if (getIndustryCategoryValue() + != other.getIndustryCategoryValue()) return false; + break; + case 3: + if (getTypeCategoryValue() + != other.getTypeCategoryValue()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (categoryCase_) { + case 1: + hash = (37 * hash) + LOCATION_CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getLocationCategoryValue(); + break; + case 2: + hash = (37 * hash) + INDUSTRY_CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getIndustryCategoryValue(); + break; + case 3: + hash = (37 * hash) + TYPE_CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getTypeCategoryValue(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeCategory prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Classification of infoTypes to organize them according to geographic
+   * location, industry, and data type.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeCategory} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeCategory) + com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeCategory.class, com.google.privacy.dlp.v2.InfoTypeCategory.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InfoTypeCategory.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + categoryCase_ = 0; + category_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeCategory getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InfoTypeCategory.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeCategory build() { + com.google.privacy.dlp.v2.InfoTypeCategory result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeCategory buildPartial() { + com.google.privacy.dlp.v2.InfoTypeCategory result = new com.google.privacy.dlp.v2.InfoTypeCategory(this); + if (categoryCase_ == 1) { + result.category_ = category_; + } + if (categoryCase_ == 2) { + result.category_ = category_; + } + if (categoryCase_ == 3) { + result.category_ = category_; + } + result.categoryCase_ = categoryCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InfoTypeCategory) { + return mergeFrom((com.google.privacy.dlp.v2.InfoTypeCategory)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeCategory other) { + if (other == com.google.privacy.dlp.v2.InfoTypeCategory.getDefaultInstance()) return this; + switch (other.getCategoryCase()) { + case LOCATION_CATEGORY: { + setLocationCategoryValue(other.getLocationCategoryValue()); + break; + } + case INDUSTRY_CATEGORY: { + setIndustryCategoryValue(other.getIndustryCategoryValue()); + break; + } + case TYPE_CATEGORY: { + setTypeCategoryValue(other.getTypeCategoryValue()); + break; + } + case CATEGORY_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InfoTypeCategory parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InfoTypeCategory) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int categoryCase_ = 0; + private java.lang.Object category_; + public CategoryCase + getCategoryCase() { + return CategoryCase.forNumber( + categoryCase_); + } + + public Builder clearCategory() { + categoryCase_ = 0; + category_ = null; + onChanged(); + return this; + } + + + /** + *
+     * The region or country that issued the ID or document represented by the
+     * infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return Whether the locationCategory field is set. + */ + @java.lang.Override + public boolean hasLocationCategory() { + return categoryCase_ == 1; + } + /** + *
+     * The region or country that issued the ID or document represented by the
+     * infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return The enum numeric value on the wire for locationCategory. + */ + @java.lang.Override + public int getLocationCategoryValue() { + if (categoryCase_ == 1) { + return ((java.lang.Integer) category_).intValue(); + } + return 0; + } + /** + *
+     * The region or country that issued the ID or document represented by the
+     * infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @param value The enum numeric value on the wire for locationCategory to set. + * @return This builder for chaining. + */ + public Builder setLocationCategoryValue(int value) { + categoryCase_ = 1; + category_ = value; + onChanged(); + return this; + } + /** + *
+     * The region or country that issued the ID or document represented by the
+     * infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return The locationCategory. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory getLocationCategory() { + if (categoryCase_ == 1) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.valueOf( + (java.lang.Integer) category_); + return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.LOCATION_UNSPECIFIED; + } + /** + *
+     * The region or country that issued the ID or document represented by the
+     * infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @param value The locationCategory to set. + * @return This builder for chaining. + */ + public Builder setLocationCategory(com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory value) { + if (value == null) { + throw new NullPointerException(); + } + categoryCase_ = 1; + category_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The region or country that issued the ID or document represented by the
+     * infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return This builder for chaining. + */ + public Builder clearLocationCategory() { + if (categoryCase_ == 1) { + categoryCase_ = 0; + category_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * The group of relevant businesses where this infoType is commonly used
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return Whether the industryCategory field is set. + */ + @java.lang.Override + public boolean hasIndustryCategory() { + return categoryCase_ == 2; + } + /** + *
+     * The group of relevant businesses where this infoType is commonly used
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return The enum numeric value on the wire for industryCategory. + */ + @java.lang.Override + public int getIndustryCategoryValue() { + if (categoryCase_ == 2) { + return ((java.lang.Integer) category_).intValue(); + } + return 0; + } + /** + *
+     * The group of relevant businesses where this infoType is commonly used
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @param value The enum numeric value on the wire for industryCategory to set. + * @return This builder for chaining. + */ + public Builder setIndustryCategoryValue(int value) { + categoryCase_ = 2; + category_ = value; + onChanged(); + return this; + } + /** + *
+     * The group of relevant businesses where this infoType is commonly used
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return The industryCategory. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory getIndustryCategory() { + if (categoryCase_ == 2) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.valueOf( + (java.lang.Integer) category_); + return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.INDUSTRY_UNSPECIFIED; + } + /** + *
+     * The group of relevant businesses where this infoType is commonly used
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @param value The industryCategory to set. + * @return This builder for chaining. + */ + public Builder setIndustryCategory(com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory value) { + if (value == null) { + throw new NullPointerException(); + } + categoryCase_ = 2; + category_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The group of relevant businesses where this infoType is commonly used
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return This builder for chaining. + */ + public Builder clearIndustryCategory() { + if (categoryCase_ == 2) { + categoryCase_ = 0; + category_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * The class of identifiers where this infoType belongs
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return Whether the typeCategory field is set. + */ + @java.lang.Override + public boolean hasTypeCategory() { + return categoryCase_ == 3; + } + /** + *
+     * The class of identifiers where this infoType belongs
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return The enum numeric value on the wire for typeCategory. + */ + @java.lang.Override + public int getTypeCategoryValue() { + if (categoryCase_ == 3) { + return ((java.lang.Integer) category_).intValue(); + } + return 0; + } + /** + *
+     * The class of identifiers where this infoType belongs
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @param value The enum numeric value on the wire for typeCategory to set. + * @return This builder for chaining. + */ + public Builder setTypeCategoryValue(int value) { + categoryCase_ = 3; + category_ = value; + onChanged(); + return this; + } + /** + *
+     * The class of identifiers where this infoType belongs
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return The typeCategory. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory getTypeCategory() { + if (categoryCase_ == 3) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.valueOf( + (java.lang.Integer) category_); + return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.UNRECOGNIZED : result; + } + return com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.TYPE_UNSPECIFIED; + } + /** + *
+     * The class of identifiers where this infoType belongs
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @param value The typeCategory to set. + * @return This builder for chaining. + */ + public Builder setTypeCategory(com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory value) { + if (value == null) { + throw new NullPointerException(); + } + categoryCase_ = 3; + category_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The class of identifiers where this infoType belongs
+     * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return This builder for chaining. + */ + public Builder clearTypeCategory() { + if (categoryCase_ == 3) { + categoryCase_ = 0; + category_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeCategory) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeCategory) + private static final com.google.privacy.dlp.v2.InfoTypeCategory DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeCategory(); + } + + public static com.google.privacy.dlp.v2.InfoTypeCategory getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoTypeCategory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InfoTypeCategory(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeCategory getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategoryOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategoryOrBuilder.java new file mode 100644 index 000000000000..c96f41bb1f98 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategoryOrBuilder.java @@ -0,0 +1,98 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InfoTypeCategoryOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeCategory) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The region or country that issued the ID or document represented by the
+   * infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return Whether the locationCategory field is set. + */ + boolean hasLocationCategory(); + /** + *
+   * The region or country that issued the ID or document represented by the
+   * infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return The enum numeric value on the wire for locationCategory. + */ + int getLocationCategoryValue(); + /** + *
+   * The region or country that issued the ID or document represented by the
+   * infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; + * @return The locationCategory. + */ + com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory getLocationCategory(); + + /** + *
+   * The group of relevant businesses where this infoType is commonly used
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return Whether the industryCategory field is set. + */ + boolean hasIndustryCategory(); + /** + *
+   * The group of relevant businesses where this infoType is commonly used
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return The enum numeric value on the wire for industryCategory. + */ + int getIndustryCategoryValue(); + /** + *
+   * The group of relevant businesses where this infoType is commonly used
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; + * @return The industryCategory. + */ + com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory getIndustryCategory(); + + /** + *
+   * The class of identifiers where this infoType belongs
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return Whether the typeCategory field is set. + */ + boolean hasTypeCategory(); + /** + *
+   * The class of identifiers where this infoType belongs
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return The enum numeric value on the wire for typeCategory. + */ + int getTypeCategoryValue(); + /** + *
+   * The class of identifiers where this infoType belongs
+   * 
+ * + * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; + * @return The typeCategory. + */ + com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory getTypeCategory(); + + public com.google.privacy.dlp.v2.InfoTypeCategory.CategoryCase getCategoryCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java new file mode 100644 index 000000000000..97e003288691 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java @@ -0,0 +1,2152 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * InfoType description.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeDescription} + */ +public final class InfoTypeDescription extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeDescription) + InfoTypeDescriptionOrBuilder { +private static final long serialVersionUID = 0L; + // Use InfoTypeDescription.newBuilder() to construct. + private InfoTypeDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoTypeDescription() { + name_ = ""; + displayName_ = ""; + supportedBy_ = java.util.Collections.emptyList(); + description_ = ""; + versions_ = java.util.Collections.emptyList(); + categories_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoTypeDescription(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InfoTypeDescription( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 24: { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + supportedBy_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + supportedBy_.add(rawValue); + break; + } + case 26: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + supportedBy_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + supportedBy_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + versions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + versions_.add( + input.readMessage(com.google.privacy.dlp.v2.VersionDescription.parser(), extensionRegistry)); + break; + } + case 82: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + categories_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + categories_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoTypeCategory.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + supportedBy_ = java.util.Collections.unmodifiableList(supportedBy_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + versions_ = java.util.Collections.unmodifiableList(versions_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + categories_ = java.util.Collections.unmodifiableList(categories_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeDescription.class, com.google.privacy.dlp.v2.InfoTypeDescription.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Internal name of the infoType.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Internal name of the infoType.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * Human readable form of the infoType name.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * Human readable form of the infoType name.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUPPORTED_BY_FIELD_NUMBER = 3; + private java.util.List supportedBy_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.InfoTypeSupportedBy> supportedBy_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.InfoTypeSupportedBy>() { + public com.google.privacy.dlp.v2.InfoTypeSupportedBy convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.InfoTypeSupportedBy result = com.google.privacy.dlp.v2.InfoTypeSupportedBy.valueOf(from); + return result == null ? com.google.privacy.dlp.v2.InfoTypeSupportedBy.UNRECOGNIZED : result; + } + }; + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return A list containing the supportedBy. + */ + @java.lang.Override + public java.util.List getSupportedByList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.InfoTypeSupportedBy>(supportedBy_, supportedBy_converter_); + } + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return The count of supportedBy. + */ + @java.lang.Override + public int getSupportedByCount() { + return supportedBy_.size(); + } + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param index The index of the element to return. + * @return The supportedBy at the given index. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeSupportedBy getSupportedBy(int index) { + return supportedBy_converter_.convert(supportedBy_.get(index)); + } + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return A list containing the enum numeric values on the wire for supportedBy. + */ + @java.lang.Override + public java.util.List + getSupportedByValueList() { + return supportedBy_; + } + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedBy at the given index. + */ + @java.lang.Override + public int getSupportedByValue(int index) { + return supportedBy_.get(index); + } + private int supportedByMemoizedSerializedSize; + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + *
+   * Description of the infotype. Translated when language is provided in the
+   * request.
+   * 
+ * + * string description = 4; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Description of the infotype. Translated when language is provided in the
+   * request.
+   * 
+ * + * string description = 4; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSIONS_FIELD_NUMBER = 9; + private java.util.List versions_; + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public java.util.List getVersionsList() { + return versions_; + } + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public java.util.List + getVersionsOrBuilderList() { + return versions_; + } + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public int getVersionsCount() { + return versions_.size(); + } + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.VersionDescription getVersions(int index) { + return versions_.get(index); + } + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.VersionDescriptionOrBuilder getVersionsOrBuilder( + int index) { + return versions_.get(index); + } + + public static final int CATEGORIES_FIELD_NUMBER = 10; + private java.util.List categories_; + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + @java.lang.Override + public java.util.List getCategoriesList() { + return categories_; + } + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + @java.lang.Override + public java.util.List + getCategoriesOrBuilderList() { + return categories_; + } + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + @java.lang.Override + public int getCategoriesCount() { + return categories_.size(); + } + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeCategory getCategories(int index) { + return categories_.get(index); + } + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder getCategoriesOrBuilder( + int index) { + return categories_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (getSupportedByList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(supportedByMemoizedSerializedSize); + } + for (int i = 0; i < supportedBy_.size(); i++) { + output.writeEnumNoTag(supportedBy_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + for (int i = 0; i < versions_.size(); i++) { + output.writeMessage(9, versions_.get(i)); + } + for (int i = 0; i < categories_.size(); i++) { + output.writeMessage(10, categories_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + { + int dataSize = 0; + for (int i = 0; i < supportedBy_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(supportedBy_.get(i)); + } + size += dataSize; + if (!getSupportedByList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }supportedByMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + for (int i = 0; i < versions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, versions_.get(i)); + } + for (int i = 0; i < categories_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, categories_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeDescription)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InfoTypeDescription other = (com.google.privacy.dlp.v2.InfoTypeDescription) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!supportedBy_.equals(other.supportedBy_)) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getVersionsList() + .equals(other.getVersionsList())) return false; + if (!getCategoriesList() + .equals(other.getCategoriesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getSupportedByCount() > 0) { + hash = (37 * hash) + SUPPORTED_BY_FIELD_NUMBER; + hash = (53 * hash) + supportedBy_.hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getVersionsCount() > 0) { + hash = (37 * hash) + VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getVersionsList().hashCode(); + } + if (getCategoriesCount() > 0) { + hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getCategoriesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeDescription prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * InfoType description.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeDescription} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeDescription) + com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeDescription.class, com.google.privacy.dlp.v2.InfoTypeDescription.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InfoTypeDescription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getVersionsFieldBuilder(); + getCategoriesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + supportedBy_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + description_ = ""; + + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + versionsBuilder_.clear(); + } + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + categoriesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeDescription getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InfoTypeDescription.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeDescription build() { + com.google.privacy.dlp.v2.InfoTypeDescription result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeDescription buildPartial() { + com.google.privacy.dlp.v2.InfoTypeDescription result = new com.google.privacy.dlp.v2.InfoTypeDescription(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + if (((bitField0_ & 0x00000001) != 0)) { + supportedBy_ = java.util.Collections.unmodifiableList(supportedBy_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.supportedBy_ = supportedBy_; + result.description_ = description_; + if (versionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + versions_ = java.util.Collections.unmodifiableList(versions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.versions_ = versions_; + } else { + result.versions_ = versionsBuilder_.build(); + } + if (categoriesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + categories_ = java.util.Collections.unmodifiableList(categories_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.categories_ = categories_; + } else { + result.categories_ = categoriesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InfoTypeDescription) { + return mergeFrom((com.google.privacy.dlp.v2.InfoTypeDescription)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeDescription other) { + if (other == com.google.privacy.dlp.v2.InfoTypeDescription.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.supportedBy_.isEmpty()) { + if (supportedBy_.isEmpty()) { + supportedBy_ = other.supportedBy_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSupportedByIsMutable(); + supportedBy_.addAll(other.supportedBy_); + } + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (versionsBuilder_ == null) { + if (!other.versions_.isEmpty()) { + if (versions_.isEmpty()) { + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureVersionsIsMutable(); + versions_.addAll(other.versions_); + } + onChanged(); + } + } else { + if (!other.versions_.isEmpty()) { + if (versionsBuilder_.isEmpty()) { + versionsBuilder_.dispose(); + versionsBuilder_ = null; + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000002); + versionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVersionsFieldBuilder() : null; + } else { + versionsBuilder_.addAllMessages(other.versions_); + } + } + } + if (categoriesBuilder_ == null) { + if (!other.categories_.isEmpty()) { + if (categories_.isEmpty()) { + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureCategoriesIsMutable(); + categories_.addAll(other.categories_); + } + onChanged(); + } + } else { + if (!other.categories_.isEmpty()) { + if (categoriesBuilder_.isEmpty()) { + categoriesBuilder_.dispose(); + categoriesBuilder_ = null; + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000004); + categoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCategoriesFieldBuilder() : null; + } else { + categoriesBuilder_.addAllMessages(other.categories_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InfoTypeDescription parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InfoTypeDescription) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Internal name of the infoType.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Internal name of the infoType.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Internal name of the infoType.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Internal name of the infoType.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Internal name of the infoType.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * Human readable form of the infoType name.
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Human readable form of the infoType name.
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Human readable form of the infoType name.
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * Human readable form of the infoType name.
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * Human readable form of the infoType name.
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.util.List supportedBy_ = + java.util.Collections.emptyList(); + private void ensureSupportedByIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + supportedBy_ = new java.util.ArrayList(supportedBy_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return A list containing the supportedBy. + */ + public java.util.List getSupportedByList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.InfoTypeSupportedBy>(supportedBy_, supportedBy_converter_); + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return The count of supportedBy. + */ + public int getSupportedByCount() { + return supportedBy_.size(); + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param index The index of the element to return. + * @return The supportedBy at the given index. + */ + public com.google.privacy.dlp.v2.InfoTypeSupportedBy getSupportedBy(int index) { + return supportedBy_converter_.convert(supportedBy_.get(index)); + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param index The index to set the value at. + * @param value The supportedBy to set. + * @return This builder for chaining. + */ + public Builder setSupportedBy( + int index, com.google.privacy.dlp.v2.InfoTypeSupportedBy value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedByIsMutable(); + supportedBy_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param value The supportedBy to add. + * @return This builder for chaining. + */ + public Builder addSupportedBy(com.google.privacy.dlp.v2.InfoTypeSupportedBy value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedByIsMutable(); + supportedBy_.add(value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param values The supportedBy to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedBy( + java.lang.Iterable values) { + ensureSupportedByIsMutable(); + for (com.google.privacy.dlp.v2.InfoTypeSupportedBy value : values) { + supportedBy_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return This builder for chaining. + */ + public Builder clearSupportedBy() { + supportedBy_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return A list containing the enum numeric values on the wire for supportedBy. + */ + public java.util.List + getSupportedByValueList() { + return java.util.Collections.unmodifiableList(supportedBy_); + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedBy at the given index. + */ + public int getSupportedByValue(int index) { + return supportedBy_.get(index); + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for supportedBy to set. + * @return This builder for chaining. + */ + public Builder setSupportedByValue( + int index, int value) { + ensureSupportedByIsMutable(); + supportedBy_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param value The enum numeric value on the wire for supportedBy to add. + * @return This builder for chaining. + */ + public Builder addSupportedByValue(int value) { + ensureSupportedByIsMutable(); + supportedBy_.add(value); + onChanged(); + return this; + } + /** + *
+     * Which parts of the API supports this InfoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param values The enum numeric values on the wire for supportedBy to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedByValue( + java.lang.Iterable values) { + ensureSupportedByIsMutable(); + for (int value : values) { + supportedBy_.add(value); + } + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Description of the infotype. Translated when language is provided in the
+     * request.
+     * 
+ * + * string description = 4; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Description of the infotype. Translated when language is provided in the
+     * request.
+     * 
+ * + * string description = 4; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Description of the infotype. Translated when language is provided in the
+     * request.
+     * 
+ * + * string description = 4; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Description of the infotype. Translated when language is provided in the
+     * request.
+     * 
+ * + * string description = 4; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Description of the infotype. Translated when language is provided in the
+     * request.
+     * 
+ * + * string description = 4; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.util.List versions_ = + java.util.Collections.emptyList(); + private void ensureVersionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + versions_ = new java.util.ArrayList(versions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.VersionDescription, com.google.privacy.dlp.v2.VersionDescription.Builder, com.google.privacy.dlp.v2.VersionDescriptionOrBuilder> versionsBuilder_; + + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public java.util.List getVersionsList() { + if (versionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(versions_); + } else { + return versionsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public int getVersionsCount() { + if (versionsBuilder_ == null) { + return versions_.size(); + } else { + return versionsBuilder_.getCount(); + } + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescription getVersions(int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); + } else { + return versionsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder setVersions( + int index, com.google.privacy.dlp.v2.VersionDescription value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.set(index, value); + onChanged(); + } else { + versionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder setVersions( + int index, com.google.privacy.dlp.v2.VersionDescription.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.set(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addVersions(com.google.privacy.dlp.v2.VersionDescription value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(value); + onChanged(); + } else { + versionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addVersions( + int index, com.google.privacy.dlp.v2.VersionDescription value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(index, value); + onChanged(); + } else { + versionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addVersions( + com.google.privacy.dlp.v2.VersionDescription.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addVersions( + int index, com.google.privacy.dlp.v2.VersionDescription.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addAllVersions( + java.lang.Iterable values) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, versions_); + onChanged(); + } else { + versionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder clearVersions() { + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + versionsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder removeVersions(int index) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.remove(index); + onChanged(); + } else { + versionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescription.Builder getVersionsBuilder( + int index) { + return getVersionsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescriptionOrBuilder getVersionsOrBuilder( + int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); } else { + return versionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public java.util.List + getVersionsOrBuilderList() { + if (versionsBuilder_ != null) { + return versionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(versions_); + } + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescription.Builder addVersionsBuilder() { + return getVersionsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.VersionDescription.getDefaultInstance()); + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescription.Builder addVersionsBuilder( + int index) { + return getVersionsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.VersionDescription.getDefaultInstance()); + } + /** + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public java.util.List + getVersionsBuilderList() { + return getVersionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.VersionDescription, com.google.privacy.dlp.v2.VersionDescription.Builder, com.google.privacy.dlp.v2.VersionDescriptionOrBuilder> + getVersionsFieldBuilder() { + if (versionsBuilder_ == null) { + versionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.VersionDescription, com.google.privacy.dlp.v2.VersionDescription.Builder, com.google.privacy.dlp.v2.VersionDescriptionOrBuilder>( + versions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + versions_ = null; + } + return versionsBuilder_; + } + + private java.util.List categories_ = + java.util.Collections.emptyList(); + private void ensureCategoriesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + categories_ = new java.util.ArrayList(categories_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeCategory, com.google.privacy.dlp.v2.InfoTypeCategory.Builder, com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder> categoriesBuilder_; + + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public java.util.List getCategoriesList() { + if (categoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(categories_); + } else { + return categoriesBuilder_.getMessageList(); + } + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public int getCategoriesCount() { + if (categoriesBuilder_ == null) { + return categories_.size(); + } else { + return categoriesBuilder_.getCount(); + } + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public com.google.privacy.dlp.v2.InfoTypeCategory getCategories(int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); + } else { + return categoriesBuilder_.getMessage(index); + } + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public Builder setCategories( + int index, com.google.privacy.dlp.v2.InfoTypeCategory value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.set(index, value); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public Builder setCategories( + int index, com.google.privacy.dlp.v2.InfoTypeCategory.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.set(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public Builder addCategories(com.google.privacy.dlp.v2.InfoTypeCategory value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(value); + onChanged(); + } else { + categoriesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public Builder addCategories( + int index, com.google.privacy.dlp.v2.InfoTypeCategory value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(index, value); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public Builder addCategories( + com.google.privacy.dlp.v2.InfoTypeCategory.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public Builder addCategories( + int index, com.google.privacy.dlp.v2.InfoTypeCategory.Builder builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public Builder addAllCategories( + java.lang.Iterable values) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, categories_); + onChanged(); + } else { + categoriesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public Builder clearCategories() { + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + categoriesBuilder_.clear(); + } + return this; + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public Builder removeCategories(int index) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.remove(index); + onChanged(); + } else { + categoriesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public com.google.privacy.dlp.v2.InfoTypeCategory.Builder getCategoriesBuilder( + int index) { + return getCategoriesFieldBuilder().getBuilder(index); + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder getCategoriesOrBuilder( + int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); } else { + return categoriesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public java.util.List + getCategoriesOrBuilderList() { + if (categoriesBuilder_ != null) { + return categoriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(categories_); + } + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public com.google.privacy.dlp.v2.InfoTypeCategory.Builder addCategoriesBuilder() { + return getCategoriesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoTypeCategory.getDefaultInstance()); + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public com.google.privacy.dlp.v2.InfoTypeCategory.Builder addCategoriesBuilder( + int index) { + return getCategoriesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoTypeCategory.getDefaultInstance()); + } + /** + *
+     * The category of the infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + public java.util.List + getCategoriesBuilderList() { + return getCategoriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeCategory, com.google.privacy.dlp.v2.InfoTypeCategory.Builder, com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder> + getCategoriesFieldBuilder() { + if (categoriesBuilder_ == null) { + categoriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeCategory, com.google.privacy.dlp.v2.InfoTypeCategory.Builder, com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder>( + categories_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + categories_ = null; + } + return categoriesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeDescription) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeDescription) + private static final com.google.privacy.dlp.v2.InfoTypeDescription DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeDescription(); + } + + public static com.google.privacy.dlp.v2.InfoTypeDescription getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoTypeDescription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InfoTypeDescription(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeDescription getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java new file mode 100644 index 000000000000..4cff91fbbc25 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java @@ -0,0 +1,208 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InfoTypeDescriptionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeDescription) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Internal name of the infoType.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Internal name of the infoType.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Human readable form of the infoType name.
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * Human readable form of the infoType name.
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return A list containing the supportedBy. + */ + java.util.List getSupportedByList(); + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return The count of supportedBy. + */ + int getSupportedByCount(); + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param index The index of the element to return. + * @return The supportedBy at the given index. + */ + com.google.privacy.dlp.v2.InfoTypeSupportedBy getSupportedBy(int index); + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @return A list containing the enum numeric values on the wire for supportedBy. + */ + java.util.List + getSupportedByValueList(); + /** + *
+   * Which parts of the API supports this InfoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedBy at the given index. + */ + int getSupportedByValue(int index); + + /** + *
+   * Description of the infotype. Translated when language is provided in the
+   * request.
+   * 
+ * + * string description = 4; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Description of the infotype. Translated when language is provided in the
+   * request.
+   * 
+ * + * string description = 4; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + java.util.List + getVersionsList(); + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + com.google.privacy.dlp.v2.VersionDescription getVersions(int index); + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + int getVersionsCount(); + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + java.util.List + getVersionsOrBuilderList(); + /** + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + com.google.privacy.dlp.v2.VersionDescriptionOrBuilder getVersionsOrBuilder( + int index); + + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + java.util.List + getCategoriesList(); + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + com.google.privacy.dlp.v2.InfoTypeCategory getCategories(int index); + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + int getCategoriesCount(); + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + java.util.List + getCategoriesOrBuilderList(); + /** + *
+   * The category of the infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; + */ + com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder getCategoriesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java new file mode 100644 index 000000000000..7786b7ba3207 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface InfoTypeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoType) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the information type. Either a name of your choosing when
+   * creating a CustomInfoType, or one of the names listed
+   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+   * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
+   * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Name of the information type. Either a name of your choosing when
+   * creating a CustomInfoType, or one of the names listed
+   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+   * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
+   * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Optional version name for this InfoType.
+   * 
+ * + * string version = 2; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Optional version name for this InfoType.
+   * 
+ * + * string version = 2; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStats.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStats.java new file mode 100644 index 000000000000..888d991e20c2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStats.java @@ -0,0 +1,746 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Statistics regarding a specific InfoType.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeStats} + */ +public final class InfoTypeStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeStats) + InfoTypeStatsOrBuilder { +private static final long serialVersionUID = 0L; + // Use InfoTypeStats.newBuilder() to construct. + private InfoTypeStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoTypeStats() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoTypeStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InfoTypeStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (infoType_ != null) { + subBuilder = infoType_.toBuilder(); + } + infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(infoType_); + infoType_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + count_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeStats.class, com.google.privacy.dlp.v2.InfoTypeStats.Builder.class); + } + + public static final int INFO_TYPE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.InfoType infoType_; + /** + *
+   * The type of finding this stat is for.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return infoType_ != null; + } + /** + *
+   * The type of finding this stat is for.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + /** + *
+   * The type of finding this stat is for.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + return getInfoType(); + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_; + /** + *
+   * Number of findings for this infoType.
+   * 
+ * + * int64 count = 2; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (infoType_ != null) { + output.writeMessage(1, getInfoType()); + } + if (count_ != 0L) { + output.writeInt64(2, count_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (infoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInfoType()); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, count_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeStats)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InfoTypeStats other = (com.google.privacy.dlp.v2.InfoTypeStats) obj; + + if (hasInfoType() != other.hasInfoType()) return false; + if (hasInfoType()) { + if (!getInfoType() + .equals(other.getInfoType())) return false; + } + if (getCount() + != other.getCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInfoType()) { + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + } + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Statistics regarding a specific InfoType.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeStats) + com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeStats.class, com.google.privacy.dlp.v2.InfoTypeStats.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InfoTypeStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypeBuilder_ == null) { + infoType_ = null; + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + count_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeStats getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InfoTypeStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeStats build() { + com.google.privacy.dlp.v2.InfoTypeStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeStats buildPartial() { + com.google.privacy.dlp.v2.InfoTypeStats result = new com.google.privacy.dlp.v2.InfoTypeStats(this); + if (infoTypeBuilder_ == null) { + result.infoType_ = infoType_; + } else { + result.infoType_ = infoTypeBuilder_.build(); + } + result.count_ = count_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InfoTypeStats) { + return mergeFrom((com.google.privacy.dlp.v2.InfoTypeStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeStats other) { + if (other == com.google.privacy.dlp.v2.InfoTypeStats.getDefaultInstance()) return this; + if (other.hasInfoType()) { + mergeInfoType(other.getInfoType()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InfoTypeStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InfoTypeStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.InfoType infoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+     * The type of finding this stat is for.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + public boolean hasInfoType() { + return infoTypeBuilder_ != null || infoType_ != null; + } + /** + *
+     * The type of finding this stat is for.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } else { + return infoTypeBuilder_.getMessage(); + } + } + /** + *
+     * The type of finding this stat is for.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infoType_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The type of finding this stat is for.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + infoType_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The type of finding this stat is for.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (infoType_ != null) { + infoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); + } else { + infoType_ = value; + } + onChanged(); + } else { + infoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The type of finding this stat is for.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + infoType_ = null; + onChanged(); + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + + return this; + } + /** + *
+     * The type of finding this stat is for.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + + onChanged(); + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * The type of finding this stat is for.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (infoTypeBuilder_ != null) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + return infoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + } + /** + *
+     * The type of finding this stat is for.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getInfoType(), + getParentForChildren(), + isClean()); + infoType_ = null; + } + return infoTypeBuilder_; + } + + private long count_ ; + /** + *
+     * Number of findings for this infoType.
+     * 
+ * + * int64 count = 2; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + *
+     * Number of findings for this infoType.
+     * 
+ * + * int64 count = 2; + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + onChanged(); + return this; + } + /** + *
+     * Number of findings for this infoType.
+     * 
+ * + * int64 count = 2; + * @return This builder for chaining. + */ + public Builder clearCount() { + + count_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeStats) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeStats) + private static final com.google.privacy.dlp.v2.InfoTypeStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeStats(); + } + + public static com.google.privacy.dlp.v2.InfoTypeStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoTypeStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InfoTypeStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStatsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStatsOrBuilder.java new file mode 100644 index 000000000000..da42c2c2c08c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStatsOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InfoTypeStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeStats) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The type of finding this stat is for.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+   * The type of finding this stat is for.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+   * The type of finding this stat is for.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+   * Number of findings for this infoType.
+   * 
+ * + * int64 count = 2; + * @return The count. + */ + long getCount(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java new file mode 100644 index 000000000000..e626f5c9921b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java @@ -0,0 +1,749 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The infoType details for this column.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeSummary} + */ +public final class InfoTypeSummary extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeSummary) + InfoTypeSummaryOrBuilder { +private static final long serialVersionUID = 0L; + // Use InfoTypeSummary.newBuilder() to construct. + private InfoTypeSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoTypeSummary() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoTypeSummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InfoTypeSummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (infoType_ != null) { + subBuilder = infoType_.toBuilder(); + } + infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(infoType_); + infoType_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + estimatedPrevalence_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeSummary.class, com.google.privacy.dlp.v2.InfoTypeSummary.Builder.class); + } + + public static final int INFO_TYPE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.InfoType infoType_; + /** + *
+   * The infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return infoType_ != null; + } + /** + *
+   * The infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + /** + *
+   * The infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + return getInfoType(); + } + + public static final int ESTIMATED_PREVALENCE_FIELD_NUMBER = 2; + private int estimatedPrevalence_; + /** + *
+   * Approximate percentage of non-null rows that contained data detected by
+   * this infotype.
+   * 
+ * + * int32 estimated_prevalence = 2; + * @return The estimatedPrevalence. + */ + @java.lang.Override + public int getEstimatedPrevalence() { + return estimatedPrevalence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (infoType_ != null) { + output.writeMessage(1, getInfoType()); + } + if (estimatedPrevalence_ != 0) { + output.writeInt32(2, estimatedPrevalence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (infoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInfoType()); + } + if (estimatedPrevalence_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, estimatedPrevalence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeSummary)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InfoTypeSummary other = (com.google.privacy.dlp.v2.InfoTypeSummary) obj; + + if (hasInfoType() != other.hasInfoType()) return false; + if (hasInfoType()) { + if (!getInfoType() + .equals(other.getInfoType())) return false; + } + if (getEstimatedPrevalence() + != other.getEstimatedPrevalence()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInfoType()) { + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + } + hash = (37 * hash) + ESTIMATED_PREVALENCE_FIELD_NUMBER; + hash = (53 * hash) + getEstimatedPrevalence(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The infoType details for this column.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeSummary} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeSummary) + com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeSummary.class, com.google.privacy.dlp.v2.InfoTypeSummary.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InfoTypeSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypeBuilder_ == null) { + infoType_ = null; + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + estimatedPrevalence_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeSummary getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InfoTypeSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeSummary build() { + com.google.privacy.dlp.v2.InfoTypeSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeSummary buildPartial() { + com.google.privacy.dlp.v2.InfoTypeSummary result = new com.google.privacy.dlp.v2.InfoTypeSummary(this); + if (infoTypeBuilder_ == null) { + result.infoType_ = infoType_; + } else { + result.infoType_ = infoTypeBuilder_.build(); + } + result.estimatedPrevalence_ = estimatedPrevalence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InfoTypeSummary) { + return mergeFrom((com.google.privacy.dlp.v2.InfoTypeSummary)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeSummary other) { + if (other == com.google.privacy.dlp.v2.InfoTypeSummary.getDefaultInstance()) return this; + if (other.hasInfoType()) { + mergeInfoType(other.getInfoType()); + } + if (other.getEstimatedPrevalence() != 0) { + setEstimatedPrevalence(other.getEstimatedPrevalence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InfoTypeSummary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InfoTypeSummary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.InfoType infoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+     * The infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + public boolean hasInfoType() { + return infoTypeBuilder_ != null || infoType_ != null; + } + /** + *
+     * The infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } else { + return infoTypeBuilder_.getMessage(); + } + } + /** + *
+     * The infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infoType_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + infoType_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (infoType_ != null) { + infoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); + } else { + infoType_ = value; + } + onChanged(); + } else { + infoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + infoType_ = null; + onChanged(); + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + + return this; + } + /** + *
+     * The infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + + onChanged(); + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * The infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (infoTypeBuilder_ != null) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + return infoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + } + /** + *
+     * The infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getInfoType(), + getParentForChildren(), + isClean()); + infoType_ = null; + } + return infoTypeBuilder_; + } + + private int estimatedPrevalence_ ; + /** + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * @return The estimatedPrevalence. + */ + @java.lang.Override + public int getEstimatedPrevalence() { + return estimatedPrevalence_; + } + /** + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * @param value The estimatedPrevalence to set. + * @return This builder for chaining. + */ + public Builder setEstimatedPrevalence(int value) { + + estimatedPrevalence_ = value; + onChanged(); + return this; + } + /** + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * @return This builder for chaining. + */ + public Builder clearEstimatedPrevalence() { + + estimatedPrevalence_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeSummary) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeSummary) + private static final com.google.privacy.dlp.v2.InfoTypeSummary DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeSummary(); + } + + public static com.google.privacy.dlp.v2.InfoTypeSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoTypeSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InfoTypeSummary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java new file mode 100644 index 000000000000..cd8629d71fbd --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java @@ -0,0 +1,47 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InfoTypeSummaryOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeSummary) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+   * The infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+   * The infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+   * Approximate percentage of non-null rows that contained data detected by
+   * this infotype.
+   * 
+ * + * int32 estimated_prevalence = 2; + * @return The estimatedPrevalence. + */ + int getEstimatedPrevalence(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java new file mode 100644 index 000000000000..71eedcbc43cd --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Parts of the APIs which use certain infoTypes.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.InfoTypeSupportedBy} + */ +public enum InfoTypeSupportedBy + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unused.
+   * 
+ * + * ENUM_TYPE_UNSPECIFIED = 0; + */ + ENUM_TYPE_UNSPECIFIED(0), + /** + *
+   * Supported by the inspect operations.
+   * 
+ * + * INSPECT = 1; + */ + INSPECT(1), + /** + *
+   * Supported by the risk analysis operations.
+   * 
+ * + * RISK_ANALYSIS = 2; + */ + RISK_ANALYSIS(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unused.
+   * 
+ * + * ENUM_TYPE_UNSPECIFIED = 0; + */ + public static final int ENUM_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * Supported by the inspect operations.
+   * 
+ * + * INSPECT = 1; + */ + public static final int INSPECT_VALUE = 1; + /** + *
+   * Supported by the risk analysis operations.
+   * 
+ * + * RISK_ANALYSIS = 2; + */ + public static final int RISK_ANALYSIS_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InfoTypeSupportedBy valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static InfoTypeSupportedBy forNumber(int value) { + switch (value) { + case 0: return ENUM_TYPE_UNSPECIFIED; + case 1: return INSPECT; + case 2: return RISK_ANALYSIS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + InfoTypeSupportedBy> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InfoTypeSupportedBy findValueByNumber(int number) { + return InfoTypeSupportedBy.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(7); + } + + private static final InfoTypeSupportedBy[] VALUES = values(); + + public static InfoTypeSupportedBy valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private InfoTypeSupportedBy(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.InfoTypeSupportedBy) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java new file mode 100644 index 000000000000..4b759eb02eb8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java @@ -0,0 +1,2137 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A type of transformation that will scan unstructured text and
+ * apply various `PrimitiveTransformation`s to each finding, where the
+ * transformation is applied to only values that were identified as a specific
+ * info_type.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeTransformations} + */ +public final class InfoTypeTransformations extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeTransformations) + InfoTypeTransformationsOrBuilder { +private static final long serialVersionUID = 0L; + // Use InfoTypeTransformations.newBuilder() to construct. + private InfoTypeTransformations(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoTypeTransformations() { + transformations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoTypeTransformations(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InfoTypeTransformations( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transformations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + transformations_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transformations_ = java.util.Collections.unmodifiableList(transformations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeTransformations.class, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder.class); + } + + public interface InfoTypeTransformationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + java.util.List + getInfoTypesList(); + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + int getInfoTypesCount(); + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + java.util.List + getInfoTypesOrBuilderList(); + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index); + + /** + *
+     * Required. Primitive transformation to apply to the infoType.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the primitiveTransformation field is set. + */ + boolean hasPrimitiveTransformation(); + /** + *
+     * Required. Primitive transformation to apply to the infoType.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The primitiveTransformation. + */ + com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation(); + /** + *
+     * Required. Primitive transformation to apply to the infoType.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder(); + } + /** + *
+   * A transformation to apply to text that is identified as a specific
+   * info_type.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation} + */ + public static final class InfoTypeTransformation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) + InfoTypeTransformationOrBuilder { + private static final long serialVersionUID = 0L; + // Use InfoTypeTransformation.newBuilder() to construct. + private InfoTypeTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoTypeTransformation() { + infoTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoTypeTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InfoTypeTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + infoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.privacy.dlp.v2.PrimitiveTransformation.Builder subBuilder = null; + if (primitiveTransformation_ != null) { + subBuilder = primitiveTransformation_.toBuilder(); + } + primitiveTransformation_ = input.readMessage(com.google.privacy.dlp.v2.PrimitiveTransformation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(primitiveTransformation_); + primitiveTransformation_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.class, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder.class); + } + + public static final int INFO_TYPES_FIELD_NUMBER = 1; + private java.util.List infoTypes_; + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public java.util.List getInfoTypesList() { + return infoTypes_; + } + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public java.util.List + getInfoTypesOrBuilderList() { + return infoTypes_; + } + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public int getInfoTypesCount() { + return infoTypes_.size(); + } + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + return infoTypes_.get(index); + } + /** + *
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + return infoTypes_.get(index); + } + + public static final int PRIMITIVE_TRANSFORMATION_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.PrimitiveTransformation primitiveTransformation_; + /** + *
+     * Required. Primitive transformation to apply to the infoType.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the primitiveTransformation field is set. + */ + @java.lang.Override + public boolean hasPrimitiveTransformation() { + return primitiveTransformation_ != null; + } + /** + *
+     * Required. Primitive transformation to apply to the infoType.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The primitiveTransformation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() { + return primitiveTransformation_ == null ? com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : primitiveTransformation_; + } + /** + *
+     * Required. Primitive transformation to apply to the infoType.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder() { + return getPrimitiveTransformation(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < infoTypes_.size(); i++) { + output.writeMessage(1, infoTypes_.get(i)); + } + if (primitiveTransformation_ != null) { + output.writeMessage(2, getPrimitiveTransformation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < infoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, infoTypes_.get(i)); + } + if (primitiveTransformation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPrimitiveTransformation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation other = (com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) obj; + + if (!getInfoTypesList() + .equals(other.getInfoTypesList())) return false; + if (hasPrimitiveTransformation() != other.hasPrimitiveTransformation()) return false; + if (hasPrimitiveTransformation()) { + if (!getPrimitiveTransformation() + .equals(other.getPrimitiveTransformation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInfoTypesCount() > 0) { + hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getInfoTypesList().hashCode(); + } + if (hasPrimitiveTransformation()) { + hash = (37 * hash) + PRIMITIVE_TRANSFORMATION_FIELD_NUMBER; + hash = (53 * hash) + getPrimitiveTransformation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A transformation to apply to text that is identified as a specific
+     * info_type.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.class, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInfoTypesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + infoTypesBuilder_.clear(); + } + if (primitiveTransformationBuilder_ == null) { + primitiveTransformation_ = null; + } else { + primitiveTransformation_ = null; + primitiveTransformationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation build() { + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation buildPartial() { + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation result = new com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation(this); + int from_bitField0_ = bitField0_; + if (infoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.infoTypes_ = infoTypes_; + } else { + result.infoTypes_ = infoTypesBuilder_.build(); + } + if (primitiveTransformationBuilder_ == null) { + result.primitiveTransformation_ = primitiveTransformation_; + } else { + result.primitiveTransformation_ = primitiveTransformationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) { + return mergeFrom((com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation other) { + if (other == com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.getDefaultInstance()) return this; + if (infoTypesBuilder_ == null) { + if (!other.infoTypes_.isEmpty()) { + if (infoTypes_.isEmpty()) { + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInfoTypesIsMutable(); + infoTypes_.addAll(other.infoTypes_); + } + onChanged(); + } + } else { + if (!other.infoTypes_.isEmpty()) { + if (infoTypesBuilder_.isEmpty()) { + infoTypesBuilder_.dispose(); + infoTypesBuilder_ = null; + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + infoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInfoTypesFieldBuilder() : null; + } else { + infoTypesBuilder_.addAllMessages(other.infoTypes_); + } + } + } + if (other.hasPrimitiveTransformation()) { + mergePrimitiveTransformation(other.getPrimitiveTransformation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List infoTypes_ = + java.util.Collections.emptyList(); + private void ensureInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(infoTypes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; + + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List getInfoTypesList() { + if (infoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(infoTypes_); + } else { + return infoTypesBuilder_.getMessageList(); + } + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public int getInfoTypesCount() { + if (infoTypesBuilder_ == null) { + return infoTypes_.size(); + } else { + return infoTypesBuilder_.getCount(); + } + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); + } else { + return infoTypesBuilder_.getMessage(index); + } + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.set(index, value); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(index, value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addAllInfoTypes( + java.lang.Iterable values) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, infoTypes_); + onChanged(); + } else { + infoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder clearInfoTypes() { + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + infoTypesBuilder_.clear(); + } + return this; + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder removeInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.remove(index); + onChanged(); + } else { + infoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); } else { + return infoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List + getInfoTypesOrBuilderList() { + if (infoTypesBuilder_ != null) { + return infoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(infoTypes_); + } + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { + return getInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List + getInfoTypesBuilderList() { + return getInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypesFieldBuilder() { + if (infoTypesBuilder_ == null) { + infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + infoTypes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + infoTypes_ = null; + } + return infoTypesBuilder_; + } + + private com.google.privacy.dlp.v2.PrimitiveTransformation primitiveTransformation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> primitiveTransformationBuilder_; + /** + *
+       * Required. Primitive transformation to apply to the infoType.
+       * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the primitiveTransformation field is set. + */ + public boolean hasPrimitiveTransformation() { + return primitiveTransformationBuilder_ != null || primitiveTransformation_ != null; + } + /** + *
+       * Required. Primitive transformation to apply to the infoType.
+       * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The primitiveTransformation. + */ + public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() { + if (primitiveTransformationBuilder_ == null) { + return primitiveTransformation_ == null ? com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : primitiveTransformation_; + } else { + return primitiveTransformationBuilder_.getMessage(); + } + } + /** + *
+       * Required. Primitive transformation to apply to the infoType.
+       * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPrimitiveTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { + if (primitiveTransformationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + primitiveTransformation_ = value; + onChanged(); + } else { + primitiveTransformationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Required. Primitive transformation to apply to the infoType.
+       * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setPrimitiveTransformation( + com.google.privacy.dlp.v2.PrimitiveTransformation.Builder builderForValue) { + if (primitiveTransformationBuilder_ == null) { + primitiveTransformation_ = builderForValue.build(); + onChanged(); + } else { + primitiveTransformationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Required. Primitive transformation to apply to the infoType.
+       * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergePrimitiveTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { + if (primitiveTransformationBuilder_ == null) { + if (primitiveTransformation_ != null) { + primitiveTransformation_ = + com.google.privacy.dlp.v2.PrimitiveTransformation.newBuilder(primitiveTransformation_).mergeFrom(value).buildPartial(); + } else { + primitiveTransformation_ = value; + } + onChanged(); + } else { + primitiveTransformationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Required. Primitive transformation to apply to the infoType.
+       * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearPrimitiveTransformation() { + if (primitiveTransformationBuilder_ == null) { + primitiveTransformation_ = null; + onChanged(); + } else { + primitiveTransformation_ = null; + primitiveTransformationBuilder_ = null; + } + + return this; + } + /** + *
+       * Required. Primitive transformation to apply to the infoType.
+       * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrimitiveTransformation.Builder getPrimitiveTransformationBuilder() { + + onChanged(); + return getPrimitiveTransformationFieldBuilder().getBuilder(); + } + /** + *
+       * Required. Primitive transformation to apply to the infoType.
+       * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder() { + if (primitiveTransformationBuilder_ != null) { + return primitiveTransformationBuilder_.getMessageOrBuilder(); + } else { + return primitiveTransformation_ == null ? + com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : primitiveTransformation_; + } + } + /** + *
+       * Required. Primitive transformation to apply to the infoType.
+       * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> + getPrimitiveTransformationFieldBuilder() { + if (primitiveTransformationBuilder_ == null) { + primitiveTransformationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder>( + getPrimitiveTransformation(), + getParentForChildren(), + isClean()); + primitiveTransformation_ = null; + } + return primitiveTransformationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) + private static final com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation(); + } + + public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoTypeTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InfoTypeTransformation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int TRANSFORMATIONS_FIELD_NUMBER = 1; + private java.util.List transformations_; + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getTransformationsList() { + return transformations_; + } + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getTransformationsOrBuilderList() { + return transformations_; + } + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getTransformationsCount() { + return transformations_.size(); + } + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getTransformations(int index) { + return transformations_.get(index); + } + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder getTransformationsOrBuilder( + int index) { + return transformations_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < transformations_.size(); i++) { + output.writeMessage(1, transformations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < transformations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, transformations_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeTransformations)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InfoTypeTransformations other = (com.google.privacy.dlp.v2.InfoTypeTransformations) obj; + + if (!getTransformationsList() + .equals(other.getTransformationsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTransformationsCount() > 0) { + hash = (37 * hash) + TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getTransformationsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeTransformations prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A type of transformation that will scan unstructured text and
+   * apply various `PrimitiveTransformation`s to each finding, where the
+   * transformation is applied to only values that were identified as a specific
+   * info_type.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InfoTypeTransformations} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeTransformations) + com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InfoTypeTransformations.class, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InfoTypeTransformations.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTransformationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (transformationsBuilder_ == null) { + transformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transformationsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations build() { + com.google.privacy.dlp.v2.InfoTypeTransformations result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations buildPartial() { + com.google.privacy.dlp.v2.InfoTypeTransformations result = new com.google.privacy.dlp.v2.InfoTypeTransformations(this); + int from_bitField0_ = bitField0_; + if (transformationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transformations_ = java.util.Collections.unmodifiableList(transformations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transformations_ = transformations_; + } else { + result.transformations_ = transformationsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InfoTypeTransformations) { + return mergeFrom((com.google.privacy.dlp.v2.InfoTypeTransformations)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeTransformations other) { + if (other == com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance()) return this; + if (transformationsBuilder_ == null) { + if (!other.transformations_.isEmpty()) { + if (transformations_.isEmpty()) { + transformations_ = other.transformations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransformationsIsMutable(); + transformations_.addAll(other.transformations_); + } + onChanged(); + } + } else { + if (!other.transformations_.isEmpty()) { + if (transformationsBuilder_.isEmpty()) { + transformationsBuilder_.dispose(); + transformationsBuilder_ = null; + transformations_ = other.transformations_; + bitField0_ = (bitField0_ & ~0x00000001); + transformationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTransformationsFieldBuilder() : null; + } else { + transformationsBuilder_.addAllMessages(other.transformations_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InfoTypeTransformations parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InfoTypeTransformations) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List transformations_ = + java.util.Collections.emptyList(); + private void ensureTransformationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transformations_ = new java.util.ArrayList(transformations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder> transformationsBuilder_; + + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getTransformationsList() { + if (transformationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transformations_); + } else { + return transformationsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getTransformationsCount() { + if (transformationsBuilder_ == null) { + return transformations_.size(); + } else { + return transformationsBuilder_.getCount(); + } + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getTransformations(int index) { + if (transformationsBuilder_ == null) { + return transformations_.get(index); + } else { + return transformationsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTransformations( + int index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation value) { + if (transformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationsIsMutable(); + transformations_.set(index, value); + onChanged(); + } else { + transformationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTransformations( + int index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder builderForValue) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.set(index, builderForValue.build()); + onChanged(); + } else { + transformationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation value) { + if (transformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationsIsMutable(); + transformations_.add(value); + onChanged(); + } else { + transformationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addTransformations( + int index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation value) { + if (transformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationsIsMutable(); + transformations_.add(index, value); + onChanged(); + } else { + transformationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addTransformations( + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder builderForValue) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.add(builderForValue.build()); + onChanged(); + } else { + transformationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addTransformations( + int index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder builderForValue) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.add(index, builderForValue.build()); + onChanged(); + } else { + transformationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllTransformations( + java.lang.Iterable values) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, transformations_); + onChanged(); + } else { + transformationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearTransformations() { + if (transformationsBuilder_ == null) { + transformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transformationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeTransformations(int index) { + if (transformationsBuilder_ == null) { + ensureTransformationsIsMutable(); + transformations_.remove(index); + onChanged(); + } else { + transformationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder getTransformationsBuilder( + int index) { + return getTransformationsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder getTransformationsOrBuilder( + int index) { + if (transformationsBuilder_ == null) { + return transformations_.get(index); } else { + return transformationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getTransformationsOrBuilderList() { + if (transformationsBuilder_ != null) { + return transformationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transformations_); + } + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder addTransformationsBuilder() { + return getTransformationsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.getDefaultInstance()); + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder addTransformationsBuilder( + int index) { + return getTransformationsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.getDefaultInstance()); + } + /** + *
+     * Required. Transformation for each infoType. Cannot specify more than one
+     * for a given infoType.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getTransformationsBuilderList() { + return getTransformationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder> + getTransformationsFieldBuilder() { + if (transformationsBuilder_ == null) { + transformationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder>( + transformations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transformations_ = null; + } + return transformationsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeTransformations) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeTransformations) + private static final com.google.privacy.dlp.v2.InfoTypeTransformations DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeTransformations(); + } + + public static com.google.privacy.dlp.v2.InfoTypeTransformations getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoTypeTransformations parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InfoTypeTransformations(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeTransformations getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformationsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformationsOrBuilder.java new file mode 100644 index 000000000000..fc82b6b8882c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformationsOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InfoTypeTransformationsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeTransformations) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getTransformationsList(); + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getTransformations(int index); + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getTransformationsCount(); + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getTransformationsOrBuilderList(); + /** + *
+   * Required. Transformation for each infoType. Cannot specify more than one
+   * for a given infoType.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder getTransformationsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java new file mode 100644 index 000000000000..3896eabfb809 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java @@ -0,0 +1,4924 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Configuration description of the scanning process.
+ * When used with redactContent only info_types and min_likelihood are currently
+ * used.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectConfig} + */ +public final class InspectConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectConfig) + InspectConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use InspectConfig.newBuilder() to construct. + private InspectConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InspectConfig() { + infoTypes_ = java.util.Collections.emptyList(); + minLikelihood_ = 0; + customInfoTypes_ = java.util.Collections.emptyList(); + contentOptions_ = java.util.Collections.emptyList(); + ruleSet_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InspectConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InspectConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + infoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); + break; + } + case 16: { + int rawValue = input.readEnum(); + + minLikelihood_ = rawValue; + break; + } + case 26: { + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder subBuilder = null; + if (limits_ != null) { + subBuilder = limits_.toBuilder(); + } + limits_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(limits_); + limits_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + + includeQuote_ = input.readBool(); + break; + } + case 40: { + + excludeInfoTypes_ = input.readBool(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + customInfoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + customInfoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.parser(), extensionRegistry)); + break; + } + case 64: { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + contentOptions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + contentOptions_.add(rawValue); + break; + } + case 66: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + contentOptions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + contentOptions_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 82: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + ruleSet_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + ruleSet_.add( + input.readMessage(com.google.privacy.dlp.v2.InspectionRuleSet.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + customInfoTypes_ = java.util.Collections.unmodifiableList(customInfoTypes_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + contentOptions_ = java.util.Collections.unmodifiableList(contentOptions_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + ruleSet_ = java.util.Collections.unmodifiableList(ruleSet_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectConfig.class, com.google.privacy.dlp.v2.InspectConfig.Builder.class); + } + + public interface FindingLimitsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectConfig.FindingLimits) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Max number of findings that will be returned for each item scanned.
+     * When set within `InspectJobConfig`,
+     * the maximum returned is 2000 regardless if this is set higher.
+     * When set within `InspectContentRequest`, this field is ignored.
+     * 
+ * + * int32 max_findings_per_item = 1; + * @return The maxFindingsPerItem. + */ + int getMaxFindingsPerItem(); + + /** + *
+     * Max number of findings that will be returned per request/job.
+     * When set within `InspectContentRequest`, the maximum returned is 2000
+     * regardless if this is set higher.
+     * 
+ * + * int32 max_findings_per_request = 2; + * @return The maxFindingsPerRequest. + */ + int getMaxFindingsPerRequest(); + + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + java.util.List + getMaxFindingsPerInfoTypeList(); + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType(int index); + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + int getMaxFindingsPerInfoTypeCount(); + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + java.util.List + getMaxFindingsPerInfoTypeOrBuilderList(); + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder getMaxFindingsPerInfoTypeOrBuilder( + int index); + } + /** + *
+   * Configuration to control the number of findings returned for inspection.
+   * This is not used for de-identification or data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits} + */ + public static final class FindingLimits extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits) + FindingLimitsOrBuilder { + private static final long serialVersionUID = 0L; + // Use FindingLimits.newBuilder() to construct. + private FindingLimits(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FindingLimits() { + maxFindingsPerInfoType_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FindingLimits(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FindingLimits( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + maxFindingsPerItem_ = input.readInt32(); + break; + } + case 16: { + + maxFindingsPerRequest_ = input.readInt32(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + maxFindingsPerInfoType_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + maxFindingsPerInfoType_.add( + input.readMessage(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + maxFindingsPerInfoType_ = java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.class, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder.class); + } + + public interface InfoTypeLimitOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Type of information the findings limit applies to. Only one limit per
+       * info_type should be provided. If InfoTypeLimit does not have an
+       * info_type, the DLP API applies the limit against all info_types that
+       * are found but not specified in another InfoTypeLimit.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+       * Type of information the findings limit applies to. Only one limit per
+       * info_type should be provided. If InfoTypeLimit does not have an
+       * info_type, the DLP API applies the limit against all info_types that
+       * are found but not specified in another InfoTypeLimit.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+       * Type of information the findings limit applies to. Only one limit per
+       * info_type should be provided. If InfoTypeLimit does not have an
+       * info_type, the DLP API applies the limit against all info_types that
+       * are found but not specified in another InfoTypeLimit.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+       * Max findings limit for the given infoType.
+       * 
+ * + * int32 max_findings = 2; + * @return The maxFindings. + */ + int getMaxFindings(); + } + /** + *
+     * Max findings configuration per infoType, per content item or long
+     * running DlpJob.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} + */ + public static final class InfoTypeLimit extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) + InfoTypeLimitOrBuilder { + private static final long serialVersionUID = 0L; + // Use InfoTypeLimit.newBuilder() to construct. + private InfoTypeLimit(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InfoTypeLimit() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InfoTypeLimit(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InfoTypeLimit( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (infoType_ != null) { + subBuilder = infoType_.toBuilder(); + } + infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(infoType_); + infoType_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + maxFindings_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.class, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder.class); + } + + public static final int INFO_TYPE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.InfoType infoType_; + /** + *
+       * Type of information the findings limit applies to. Only one limit per
+       * info_type should be provided. If InfoTypeLimit does not have an
+       * info_type, the DLP API applies the limit against all info_types that
+       * are found but not specified in another InfoTypeLimit.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return infoType_ != null; + } + /** + *
+       * Type of information the findings limit applies to. Only one limit per
+       * info_type should be provided. If InfoTypeLimit does not have an
+       * info_type, the DLP API applies the limit against all info_types that
+       * are found but not specified in another InfoTypeLimit.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + /** + *
+       * Type of information the findings limit applies to. Only one limit per
+       * info_type should be provided. If InfoTypeLimit does not have an
+       * info_type, the DLP API applies the limit against all info_types that
+       * are found but not specified in another InfoTypeLimit.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + return getInfoType(); + } + + public static final int MAX_FINDINGS_FIELD_NUMBER = 2; + private int maxFindings_; + /** + *
+       * Max findings limit for the given infoType.
+       * 
+ * + * int32 max_findings = 2; + * @return The maxFindings. + */ + @java.lang.Override + public int getMaxFindings() { + return maxFindings_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (infoType_ != null) { + output.writeMessage(1, getInfoType()); + } + if (maxFindings_ != 0) { + output.writeInt32(2, maxFindings_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (infoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInfoType()); + } + if (maxFindings_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxFindings_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit other = (com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) obj; + + if (hasInfoType() != other.hasInfoType()) return false; + if (hasInfoType()) { + if (!getInfoType() + .equals(other.getInfoType())) return false; + } + if (getMaxFindings() + != other.getMaxFindings()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInfoType()) { + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + } + hash = (37 * hash) + MAX_FINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getMaxFindings(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * Max findings configuration per infoType, per content item or long
+       * running DlpJob.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.class, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypeBuilder_ == null) { + infoType_ = null; + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + maxFindings_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit build() { + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit buildPartial() { + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit result = new com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit(this); + if (infoTypeBuilder_ == null) { + result.infoType_ = infoType_; + } else { + result.infoType_ = infoTypeBuilder_.build(); + } + result.maxFindings_ = maxFindings_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) { + return mergeFrom((com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit other) { + if (other == com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.getDefaultInstance()) return this; + if (other.hasInfoType()) { + mergeInfoType(other.getInfoType()); + } + if (other.getMaxFindings() != 0) { + setMaxFindings(other.getMaxFindings()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.InfoType infoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+         * Type of information the findings limit applies to. Only one limit per
+         * info_type should be provided. If InfoTypeLimit does not have an
+         * info_type, the DLP API applies the limit against all info_types that
+         * are found but not specified in another InfoTypeLimit.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + public boolean hasInfoType() { + return infoTypeBuilder_ != null || infoType_ != null; + } + /** + *
+         * Type of information the findings limit applies to. Only one limit per
+         * info_type should be provided. If InfoTypeLimit does not have an
+         * info_type, the DLP API applies the limit against all info_types that
+         * are found but not specified in another InfoTypeLimit.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } else { + return infoTypeBuilder_.getMessage(); + } + } + /** + *
+         * Type of information the findings limit applies to. Only one limit per
+         * info_type should be provided. If InfoTypeLimit does not have an
+         * info_type, the DLP API applies the limit against all info_types that
+         * are found but not specified in another InfoTypeLimit.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infoType_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * Type of information the findings limit applies to. Only one limit per
+         * info_type should be provided. If InfoTypeLimit does not have an
+         * info_type, the DLP API applies the limit against all info_types that
+         * are found but not specified in another InfoTypeLimit.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + infoType_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * Type of information the findings limit applies to. Only one limit per
+         * info_type should be provided. If InfoTypeLimit does not have an
+         * info_type, the DLP API applies the limit against all info_types that
+         * are found but not specified in another InfoTypeLimit.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (infoType_ != null) { + infoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); + } else { + infoType_ = value; + } + onChanged(); + } else { + infoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * Type of information the findings limit applies to. Only one limit per
+         * info_type should be provided. If InfoTypeLimit does not have an
+         * info_type, the DLP API applies the limit against all info_types that
+         * are found but not specified in another InfoTypeLimit.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + infoType_ = null; + onChanged(); + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + + return this; + } + /** + *
+         * Type of information the findings limit applies to. Only one limit per
+         * info_type should be provided. If InfoTypeLimit does not have an
+         * info_type, the DLP API applies the limit against all info_types that
+         * are found but not specified in another InfoTypeLimit.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + + onChanged(); + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+         * Type of information the findings limit applies to. Only one limit per
+         * info_type should be provided. If InfoTypeLimit does not have an
+         * info_type, the DLP API applies the limit against all info_types that
+         * are found but not specified in another InfoTypeLimit.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (infoTypeBuilder_ != null) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + return infoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + } + /** + *
+         * Type of information the findings limit applies to. Only one limit per
+         * info_type should be provided. If InfoTypeLimit does not have an
+         * info_type, the DLP API applies the limit against all info_types that
+         * are found but not specified in another InfoTypeLimit.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getInfoType(), + getParentForChildren(), + isClean()); + infoType_ = null; + } + return infoTypeBuilder_; + } + + private int maxFindings_ ; + /** + *
+         * Max findings limit for the given infoType.
+         * 
+ * + * int32 max_findings = 2; + * @return The maxFindings. + */ + @java.lang.Override + public int getMaxFindings() { + return maxFindings_; + } + /** + *
+         * Max findings limit for the given infoType.
+         * 
+ * + * int32 max_findings = 2; + * @param value The maxFindings to set. + * @return This builder for chaining. + */ + public Builder setMaxFindings(int value) { + + maxFindings_ = value; + onChanged(); + return this; + } + /** + *
+         * Max findings limit for the given infoType.
+         * 
+ * + * int32 max_findings = 2; + * @return This builder for chaining. + */ + public Builder clearMaxFindings() { + + maxFindings_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) + private static final com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit(); + } + + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InfoTypeLimit parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InfoTypeLimit(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int MAX_FINDINGS_PER_ITEM_FIELD_NUMBER = 1; + private int maxFindingsPerItem_; + /** + *
+     * Max number of findings that will be returned for each item scanned.
+     * When set within `InspectJobConfig`,
+     * the maximum returned is 2000 regardless if this is set higher.
+     * When set within `InspectContentRequest`, this field is ignored.
+     * 
+ * + * int32 max_findings_per_item = 1; + * @return The maxFindingsPerItem. + */ + @java.lang.Override + public int getMaxFindingsPerItem() { + return maxFindingsPerItem_; + } + + public static final int MAX_FINDINGS_PER_REQUEST_FIELD_NUMBER = 2; + private int maxFindingsPerRequest_; + /** + *
+     * Max number of findings that will be returned per request/job.
+     * When set within `InspectContentRequest`, the maximum returned is 2000
+     * regardless if this is set higher.
+     * 
+ * + * int32 max_findings_per_request = 2; + * @return The maxFindingsPerRequest. + */ + @java.lang.Override + public int getMaxFindingsPerRequest() { + return maxFindingsPerRequest_; + } + + public static final int MAX_FINDINGS_PER_INFO_TYPE_FIELD_NUMBER = 3; + private java.util.List maxFindingsPerInfoType_; + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + @java.lang.Override + public java.util.List getMaxFindingsPerInfoTypeList() { + return maxFindingsPerInfoType_; + } + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + @java.lang.Override + public java.util.List + getMaxFindingsPerInfoTypeOrBuilderList() { + return maxFindingsPerInfoType_; + } + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + @java.lang.Override + public int getMaxFindingsPerInfoTypeCount() { + return maxFindingsPerInfoType_.size(); + } + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType(int index) { + return maxFindingsPerInfoType_.get(index); + } + /** + *
+     * Configuration of findings limit given for specified infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder getMaxFindingsPerInfoTypeOrBuilder( + int index) { + return maxFindingsPerInfoType_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (maxFindingsPerItem_ != 0) { + output.writeInt32(1, maxFindingsPerItem_); + } + if (maxFindingsPerRequest_ != 0) { + output.writeInt32(2, maxFindingsPerRequest_); + } + for (int i = 0; i < maxFindingsPerInfoType_.size(); i++) { + output.writeMessage(3, maxFindingsPerInfoType_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxFindingsPerItem_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, maxFindingsPerItem_); + } + if (maxFindingsPerRequest_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxFindingsPerRequest_); + } + for (int i = 0; i < maxFindingsPerInfoType_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, maxFindingsPerInfoType_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectConfig.FindingLimits other = (com.google.privacy.dlp.v2.InspectConfig.FindingLimits) obj; + + if (getMaxFindingsPerItem() + != other.getMaxFindingsPerItem()) return false; + if (getMaxFindingsPerRequest() + != other.getMaxFindingsPerRequest()) return false; + if (!getMaxFindingsPerInfoTypeList() + .equals(other.getMaxFindingsPerInfoTypeList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAX_FINDINGS_PER_ITEM_FIELD_NUMBER; + hash = (53 * hash) + getMaxFindingsPerItem(); + hash = (37 * hash) + MAX_FINDINGS_PER_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getMaxFindingsPerRequest(); + if (getMaxFindingsPerInfoTypeCount() > 0) { + hash = (37 * hash) + MAX_FINDINGS_PER_INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMaxFindingsPerInfoTypeList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectConfig.FindingLimits prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Configuration to control the number of findings returned for inspection.
+     * This is not used for de-identification or data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits) + com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.class, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectConfig.FindingLimits.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMaxFindingsPerInfoTypeFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + maxFindingsPerItem_ = 0; + + maxFindingsPerRequest_ = 0; + + if (maxFindingsPerInfoTypeBuilder_ == null) { + maxFindingsPerInfoType_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + maxFindingsPerInfoTypeBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits build() { + com.google.privacy.dlp.v2.InspectConfig.FindingLimits result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits buildPartial() { + com.google.privacy.dlp.v2.InspectConfig.FindingLimits result = new com.google.privacy.dlp.v2.InspectConfig.FindingLimits(this); + int from_bitField0_ = bitField0_; + result.maxFindingsPerItem_ = maxFindingsPerItem_; + result.maxFindingsPerRequest_ = maxFindingsPerRequest_; + if (maxFindingsPerInfoTypeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + maxFindingsPerInfoType_ = java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.maxFindingsPerInfoType_ = maxFindingsPerInfoType_; + } else { + result.maxFindingsPerInfoType_ = maxFindingsPerInfoTypeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits) { + return mergeFrom((com.google.privacy.dlp.v2.InspectConfig.FindingLimits)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectConfig.FindingLimits other) { + if (other == com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance()) return this; + if (other.getMaxFindingsPerItem() != 0) { + setMaxFindingsPerItem(other.getMaxFindingsPerItem()); + } + if (other.getMaxFindingsPerRequest() != 0) { + setMaxFindingsPerRequest(other.getMaxFindingsPerRequest()); + } + if (maxFindingsPerInfoTypeBuilder_ == null) { + if (!other.maxFindingsPerInfoType_.isEmpty()) { + if (maxFindingsPerInfoType_.isEmpty()) { + maxFindingsPerInfoType_ = other.maxFindingsPerInfoType_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMaxFindingsPerInfoTypeIsMutable(); + maxFindingsPerInfoType_.addAll(other.maxFindingsPerInfoType_); + } + onChanged(); + } + } else { + if (!other.maxFindingsPerInfoType_.isEmpty()) { + if (maxFindingsPerInfoTypeBuilder_.isEmpty()) { + maxFindingsPerInfoTypeBuilder_.dispose(); + maxFindingsPerInfoTypeBuilder_ = null; + maxFindingsPerInfoType_ = other.maxFindingsPerInfoType_; + bitField0_ = (bitField0_ & ~0x00000001); + maxFindingsPerInfoTypeBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMaxFindingsPerInfoTypeFieldBuilder() : null; + } else { + maxFindingsPerInfoTypeBuilder_.addAllMessages(other.maxFindingsPerInfoType_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectConfig.FindingLimits parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectConfig.FindingLimits) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int maxFindingsPerItem_ ; + /** + *
+       * Max number of findings that will be returned for each item scanned.
+       * When set within `InspectJobConfig`,
+       * the maximum returned is 2000 regardless if this is set higher.
+       * When set within `InspectContentRequest`, this field is ignored.
+       * 
+ * + * int32 max_findings_per_item = 1; + * @return The maxFindingsPerItem. + */ + @java.lang.Override + public int getMaxFindingsPerItem() { + return maxFindingsPerItem_; + } + /** + *
+       * Max number of findings that will be returned for each item scanned.
+       * When set within `InspectJobConfig`,
+       * the maximum returned is 2000 regardless if this is set higher.
+       * When set within `InspectContentRequest`, this field is ignored.
+       * 
+ * + * int32 max_findings_per_item = 1; + * @param value The maxFindingsPerItem to set. + * @return This builder for chaining. + */ + public Builder setMaxFindingsPerItem(int value) { + + maxFindingsPerItem_ = value; + onChanged(); + return this; + } + /** + *
+       * Max number of findings that will be returned for each item scanned.
+       * When set within `InspectJobConfig`,
+       * the maximum returned is 2000 regardless if this is set higher.
+       * When set within `InspectContentRequest`, this field is ignored.
+       * 
+ * + * int32 max_findings_per_item = 1; + * @return This builder for chaining. + */ + public Builder clearMaxFindingsPerItem() { + + maxFindingsPerItem_ = 0; + onChanged(); + return this; + } + + private int maxFindingsPerRequest_ ; + /** + *
+       * Max number of findings that will be returned per request/job.
+       * When set within `InspectContentRequest`, the maximum returned is 2000
+       * regardless if this is set higher.
+       * 
+ * + * int32 max_findings_per_request = 2; + * @return The maxFindingsPerRequest. + */ + @java.lang.Override + public int getMaxFindingsPerRequest() { + return maxFindingsPerRequest_; + } + /** + *
+       * Max number of findings that will be returned per request/job.
+       * When set within `InspectContentRequest`, the maximum returned is 2000
+       * regardless if this is set higher.
+       * 
+ * + * int32 max_findings_per_request = 2; + * @param value The maxFindingsPerRequest to set. + * @return This builder for chaining. + */ + public Builder setMaxFindingsPerRequest(int value) { + + maxFindingsPerRequest_ = value; + onChanged(); + return this; + } + /** + *
+       * Max number of findings that will be returned per request/job.
+       * When set within `InspectContentRequest`, the maximum returned is 2000
+       * regardless if this is set higher.
+       * 
+ * + * int32 max_findings_per_request = 2; + * @return This builder for chaining. + */ + public Builder clearMaxFindingsPerRequest() { + + maxFindingsPerRequest_ = 0; + onChanged(); + return this; + } + + private java.util.List maxFindingsPerInfoType_ = + java.util.Collections.emptyList(); + private void ensureMaxFindingsPerInfoTypeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + maxFindingsPerInfoType_ = new java.util.ArrayList(maxFindingsPerInfoType_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder> maxFindingsPerInfoTypeBuilder_; + + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public java.util.List getMaxFindingsPerInfoTypeList() { + if (maxFindingsPerInfoTypeBuilder_ == null) { + return java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); + } else { + return maxFindingsPerInfoTypeBuilder_.getMessageList(); + } + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public int getMaxFindingsPerInfoTypeCount() { + if (maxFindingsPerInfoTypeBuilder_ == null) { + return maxFindingsPerInfoType_.size(); + } else { + return maxFindingsPerInfoTypeBuilder_.getCount(); + } + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType(int index) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + return maxFindingsPerInfoType_.get(index); + } else { + return maxFindingsPerInfoTypeBuilder_.getMessage(index); + } + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public Builder setMaxFindingsPerInfoType( + int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaxFindingsPerInfoTypeIsMutable(); + maxFindingsPerInfoType_.set(index, value); + onChanged(); + } else { + maxFindingsPerInfoTypeBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public Builder setMaxFindingsPerInfoType( + int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder builderForValue) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + ensureMaxFindingsPerInfoTypeIsMutable(); + maxFindingsPerInfoType_.set(index, builderForValue.build()); + onChanged(); + } else { + maxFindingsPerInfoTypeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public Builder addMaxFindingsPerInfoType(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaxFindingsPerInfoTypeIsMutable(); + maxFindingsPerInfoType_.add(value); + onChanged(); + } else { + maxFindingsPerInfoTypeBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public Builder addMaxFindingsPerInfoType( + int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaxFindingsPerInfoTypeIsMutable(); + maxFindingsPerInfoType_.add(index, value); + onChanged(); + } else { + maxFindingsPerInfoTypeBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public Builder addMaxFindingsPerInfoType( + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder builderForValue) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + ensureMaxFindingsPerInfoTypeIsMutable(); + maxFindingsPerInfoType_.add(builderForValue.build()); + onChanged(); + } else { + maxFindingsPerInfoTypeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public Builder addMaxFindingsPerInfoType( + int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder builderForValue) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + ensureMaxFindingsPerInfoTypeIsMutable(); + maxFindingsPerInfoType_.add(index, builderForValue.build()); + onChanged(); + } else { + maxFindingsPerInfoTypeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public Builder addAllMaxFindingsPerInfoType( + java.lang.Iterable values) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + ensureMaxFindingsPerInfoTypeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, maxFindingsPerInfoType_); + onChanged(); + } else { + maxFindingsPerInfoTypeBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public Builder clearMaxFindingsPerInfoType() { + if (maxFindingsPerInfoTypeBuilder_ == null) { + maxFindingsPerInfoType_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + maxFindingsPerInfoTypeBuilder_.clear(); + } + return this; + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public Builder removeMaxFindingsPerInfoType(int index) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + ensureMaxFindingsPerInfoTypeIsMutable(); + maxFindingsPerInfoType_.remove(index); + onChanged(); + } else { + maxFindingsPerInfoTypeBuilder_.remove(index); + } + return this; + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder getMaxFindingsPerInfoTypeBuilder( + int index) { + return getMaxFindingsPerInfoTypeFieldBuilder().getBuilder(index); + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder getMaxFindingsPerInfoTypeOrBuilder( + int index) { + if (maxFindingsPerInfoTypeBuilder_ == null) { + return maxFindingsPerInfoType_.get(index); } else { + return maxFindingsPerInfoTypeBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public java.util.List + getMaxFindingsPerInfoTypeOrBuilderList() { + if (maxFindingsPerInfoTypeBuilder_ != null) { + return maxFindingsPerInfoTypeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); + } + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder addMaxFindingsPerInfoTypeBuilder() { + return getMaxFindingsPerInfoTypeFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.getDefaultInstance()); + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder addMaxFindingsPerInfoTypeBuilder( + int index) { + return getMaxFindingsPerInfoTypeFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.getDefaultInstance()); + } + /** + *
+       * Configuration of findings limit given for specified infoTypes.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; + */ + public java.util.List + getMaxFindingsPerInfoTypeBuilderList() { + return getMaxFindingsPerInfoTypeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder> + getMaxFindingsPerInfoTypeFieldBuilder() { + if (maxFindingsPerInfoTypeBuilder_ == null) { + maxFindingsPerInfoTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder>( + maxFindingsPerInfoType_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + maxFindingsPerInfoType_ = null; + } + return maxFindingsPerInfoTypeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits) + private static final com.google.privacy.dlp.v2.InspectConfig.FindingLimits DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectConfig.FindingLimits(); + } + + public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FindingLimits parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FindingLimits(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int INFO_TYPES_FIELD_NUMBER = 1; + private java.util.List infoTypes_; + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public java.util.List getInfoTypesList() { + return infoTypes_; + } + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public java.util.List + getInfoTypesOrBuilderList() { + return infoTypes_; + } + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public int getInfoTypesCount() { + return infoTypes_.size(); + } + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + return infoTypes_.get(index); + } + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + return infoTypes_.get(index); + } + + public static final int MIN_LIKELIHOOD_FIELD_NUMBER = 2; + private int minLikelihood_; + /** + *
+   * Only returns findings equal or above this threshold. The default is
+   * POSSIBLE.
+   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; + * @return The enum numeric value on the wire for minLikelihood. + */ + @java.lang.Override public int getMinLikelihoodValue() { + return minLikelihood_; + } + /** + *
+   * Only returns findings equal or above this threshold. The default is
+   * POSSIBLE.
+   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; + * @return The minLikelihood. + */ + @java.lang.Override public com.google.privacy.dlp.v2.Likelihood getMinLikelihood() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(minLikelihood_); + return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; + } + + public static final int LIMITS_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.InspectConfig.FindingLimits limits_; + /** + *
+   * Configuration to control the number of findings returned.
+   * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + * @return Whether the limits field is set. + */ + @java.lang.Override + public boolean hasLimits() { + return limits_ != null; + } + /** + *
+   * Configuration to control the number of findings returned.
+   * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + * @return The limits. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits() { + return limits_ == null ? com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() : limits_; + } + /** + *
+   * Configuration to control the number of findings returned.
+   * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder getLimitsOrBuilder() { + return getLimits(); + } + + public static final int INCLUDE_QUOTE_FIELD_NUMBER = 4; + private boolean includeQuote_; + /** + *
+   * When true, a contextual quote from the data that triggered a finding is
+   * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
+   * This is not used for data profiling.
+   * 
+ * + * bool include_quote = 4; + * @return The includeQuote. + */ + @java.lang.Override + public boolean getIncludeQuote() { + return includeQuote_; + } + + public static final int EXCLUDE_INFO_TYPES_FIELD_NUMBER = 5; + private boolean excludeInfoTypes_; + /** + *
+   * When true, excludes type information of the findings.
+   * This is not used for data profiling.
+   * 
+ * + * bool exclude_info_types = 5; + * @return The excludeInfoTypes. + */ + @java.lang.Override + public boolean getExcludeInfoTypes() { + return excludeInfoTypes_; + } + + public static final int CUSTOM_INFO_TYPES_FIELD_NUMBER = 6; + private java.util.List customInfoTypes_; + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + @java.lang.Override + public java.util.List getCustomInfoTypesList() { + return customInfoTypes_; + } + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + @java.lang.Override + public java.util.List + getCustomInfoTypesOrBuilderList() { + return customInfoTypes_; + } + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + @java.lang.Override + public int getCustomInfoTypesCount() { + return customInfoTypes_.size(); + } + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index) { + return customInfoTypes_.get(index); + } + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBuilder( + int index) { + return customInfoTypes_.get(index); + } + + public static final int CONTENT_OPTIONS_FIELD_NUMBER = 8; + private java.util.List contentOptions_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.ContentOption> contentOptions_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.ContentOption>() { + public com.google.privacy.dlp.v2.ContentOption convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.ContentOption result = com.google.privacy.dlp.v2.ContentOption.valueOf(from); + return result == null ? com.google.privacy.dlp.v2.ContentOption.UNRECOGNIZED : result; + } + }; + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return A list containing the contentOptions. + */ + @java.lang.Override + public java.util.List getContentOptionsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.ContentOption>(contentOptions_, contentOptions_converter_); + } + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return The count of contentOptions. + */ + @java.lang.Override + public int getContentOptionsCount() { + return contentOptions_.size(); + } + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param index The index of the element to return. + * @return The contentOptions at the given index. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentOption getContentOptions(int index) { + return contentOptions_converter_.convert(contentOptions_.get(index)); + } + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return A list containing the enum numeric values on the wire for contentOptions. + */ + @java.lang.Override + public java.util.List + getContentOptionsValueList() { + return contentOptions_; + } + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of contentOptions at the given index. + */ + @java.lang.Override + public int getContentOptionsValue(int index) { + return contentOptions_.get(index); + } + private int contentOptionsMemoizedSerializedSize; + + public static final int RULE_SET_FIELD_NUMBER = 10; + private java.util.List ruleSet_; + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + @java.lang.Override + public java.util.List getRuleSetList() { + return ruleSet_; + } + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + @java.lang.Override + public java.util.List + getRuleSetOrBuilderList() { + return ruleSet_; + } + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + @java.lang.Override + public int getRuleSetCount() { + return ruleSet_.size(); + } + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRuleSet getRuleSet(int index) { + return ruleSet_.get(index); + } + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder getRuleSetOrBuilder( + int index) { + return ruleSet_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < infoTypes_.size(); i++) { + output.writeMessage(1, infoTypes_.get(i)); + } + if (minLikelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { + output.writeEnum(2, minLikelihood_); + } + if (limits_ != null) { + output.writeMessage(3, getLimits()); + } + if (includeQuote_ != false) { + output.writeBool(4, includeQuote_); + } + if (excludeInfoTypes_ != false) { + output.writeBool(5, excludeInfoTypes_); + } + for (int i = 0; i < customInfoTypes_.size(); i++) { + output.writeMessage(6, customInfoTypes_.get(i)); + } + if (getContentOptionsList().size() > 0) { + output.writeUInt32NoTag(66); + output.writeUInt32NoTag(contentOptionsMemoizedSerializedSize); + } + for (int i = 0; i < contentOptions_.size(); i++) { + output.writeEnumNoTag(contentOptions_.get(i)); + } + for (int i = 0; i < ruleSet_.size(); i++) { + output.writeMessage(10, ruleSet_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < infoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, infoTypes_.get(i)); + } + if (minLikelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, minLikelihood_); + } + if (limits_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLimits()); + } + if (includeQuote_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, includeQuote_); + } + if (excludeInfoTypes_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, excludeInfoTypes_); + } + for (int i = 0; i < customInfoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, customInfoTypes_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < contentOptions_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeEnumSizeNoTag(contentOptions_.get(i)); + } + size += dataSize; + if (!getContentOptionsList().isEmpty()) { size += 1; + size += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(dataSize); + }contentOptionsMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < ruleSet_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, ruleSet_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectConfig other = (com.google.privacy.dlp.v2.InspectConfig) obj; + + if (!getInfoTypesList() + .equals(other.getInfoTypesList())) return false; + if (minLikelihood_ != other.minLikelihood_) return false; + if (hasLimits() != other.hasLimits()) return false; + if (hasLimits()) { + if (!getLimits() + .equals(other.getLimits())) return false; + } + if (getIncludeQuote() + != other.getIncludeQuote()) return false; + if (getExcludeInfoTypes() + != other.getExcludeInfoTypes()) return false; + if (!getCustomInfoTypesList() + .equals(other.getCustomInfoTypesList())) return false; + if (!contentOptions_.equals(other.contentOptions_)) return false; + if (!getRuleSetList() + .equals(other.getRuleSetList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInfoTypesCount() > 0) { + hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getInfoTypesList().hashCode(); + } + hash = (37 * hash) + MIN_LIKELIHOOD_FIELD_NUMBER; + hash = (53 * hash) + minLikelihood_; + if (hasLimits()) { + hash = (37 * hash) + LIMITS_FIELD_NUMBER; + hash = (53 * hash) + getLimits().hashCode(); + } + hash = (37 * hash) + INCLUDE_QUOTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIncludeQuote()); + hash = (37 * hash) + EXCLUDE_INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getExcludeInfoTypes()); + if (getCustomInfoTypesCount() > 0) { + hash = (37 * hash) + CUSTOM_INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getCustomInfoTypesList().hashCode(); + } + if (getContentOptionsCount() > 0) { + hash = (37 * hash) + CONTENT_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + contentOptions_.hashCode(); + } + if (getRuleSetCount() > 0) { + hash = (37 * hash) + RULE_SET_FIELD_NUMBER; + hash = (53 * hash) + getRuleSetList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration description of the scanning process.
+   * When used with redactContent only info_types and min_likelihood are currently
+   * used.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectConfig) + com.google.privacy.dlp.v2.InspectConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectConfig.class, com.google.privacy.dlp.v2.InspectConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInfoTypesFieldBuilder(); + getCustomInfoTypesFieldBuilder(); + getRuleSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + infoTypesBuilder_.clear(); + } + minLikelihood_ = 0; + + if (limitsBuilder_ == null) { + limits_ = null; + } else { + limits_ = null; + limitsBuilder_ = null; + } + includeQuote_ = false; + + excludeInfoTypes_ = false; + + if (customInfoTypesBuilder_ == null) { + customInfoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + customInfoTypesBuilder_.clear(); + } + contentOptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + if (ruleSetBuilder_ == null) { + ruleSet_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ruleSetBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig build() { + com.google.privacy.dlp.v2.InspectConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig buildPartial() { + com.google.privacy.dlp.v2.InspectConfig result = new com.google.privacy.dlp.v2.InspectConfig(this); + int from_bitField0_ = bitField0_; + if (infoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.infoTypes_ = infoTypes_; + } else { + result.infoTypes_ = infoTypesBuilder_.build(); + } + result.minLikelihood_ = minLikelihood_; + if (limitsBuilder_ == null) { + result.limits_ = limits_; + } else { + result.limits_ = limitsBuilder_.build(); + } + result.includeQuote_ = includeQuote_; + result.excludeInfoTypes_ = excludeInfoTypes_; + if (customInfoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + customInfoTypes_ = java.util.Collections.unmodifiableList(customInfoTypes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.customInfoTypes_ = customInfoTypes_; + } else { + result.customInfoTypes_ = customInfoTypesBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + contentOptions_ = java.util.Collections.unmodifiableList(contentOptions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.contentOptions_ = contentOptions_; + if (ruleSetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + ruleSet_ = java.util.Collections.unmodifiableList(ruleSet_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.ruleSet_ = ruleSet_; + } else { + result.ruleSet_ = ruleSetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectConfig) { + return mergeFrom((com.google.privacy.dlp.v2.InspectConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectConfig other) { + if (other == com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance()) return this; + if (infoTypesBuilder_ == null) { + if (!other.infoTypes_.isEmpty()) { + if (infoTypes_.isEmpty()) { + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInfoTypesIsMutable(); + infoTypes_.addAll(other.infoTypes_); + } + onChanged(); + } + } else { + if (!other.infoTypes_.isEmpty()) { + if (infoTypesBuilder_.isEmpty()) { + infoTypesBuilder_.dispose(); + infoTypesBuilder_ = null; + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + infoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInfoTypesFieldBuilder() : null; + } else { + infoTypesBuilder_.addAllMessages(other.infoTypes_); + } + } + } + if (other.minLikelihood_ != 0) { + setMinLikelihoodValue(other.getMinLikelihoodValue()); + } + if (other.hasLimits()) { + mergeLimits(other.getLimits()); + } + if (other.getIncludeQuote() != false) { + setIncludeQuote(other.getIncludeQuote()); + } + if (other.getExcludeInfoTypes() != false) { + setExcludeInfoTypes(other.getExcludeInfoTypes()); + } + if (customInfoTypesBuilder_ == null) { + if (!other.customInfoTypes_.isEmpty()) { + if (customInfoTypes_.isEmpty()) { + customInfoTypes_ = other.customInfoTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCustomInfoTypesIsMutable(); + customInfoTypes_.addAll(other.customInfoTypes_); + } + onChanged(); + } + } else { + if (!other.customInfoTypes_.isEmpty()) { + if (customInfoTypesBuilder_.isEmpty()) { + customInfoTypesBuilder_.dispose(); + customInfoTypesBuilder_ = null; + customInfoTypes_ = other.customInfoTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + customInfoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCustomInfoTypesFieldBuilder() : null; + } else { + customInfoTypesBuilder_.addAllMessages(other.customInfoTypes_); + } + } + } + if (!other.contentOptions_.isEmpty()) { + if (contentOptions_.isEmpty()) { + contentOptions_ = other.contentOptions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureContentOptionsIsMutable(); + contentOptions_.addAll(other.contentOptions_); + } + onChanged(); + } + if (ruleSetBuilder_ == null) { + if (!other.ruleSet_.isEmpty()) { + if (ruleSet_.isEmpty()) { + ruleSet_ = other.ruleSet_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRuleSetIsMutable(); + ruleSet_.addAll(other.ruleSet_); + } + onChanged(); + } + } else { + if (!other.ruleSet_.isEmpty()) { + if (ruleSetBuilder_.isEmpty()) { + ruleSetBuilder_.dispose(); + ruleSetBuilder_ = null; + ruleSet_ = other.ruleSet_; + bitField0_ = (bitField0_ & ~0x00000008); + ruleSetBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRuleSetFieldBuilder() : null; + } else { + ruleSetBuilder_.addAllMessages(other.ruleSet_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List infoTypes_ = + java.util.Collections.emptyList(); + private void ensureInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(infoTypes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; + + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List getInfoTypesList() { + if (infoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(infoTypes_); + } else { + return infoTypesBuilder_.getMessageList(); + } + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public int getInfoTypesCount() { + if (infoTypesBuilder_ == null) { + return infoTypes_.size(); + } else { + return infoTypesBuilder_.getCount(); + } + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); + } else { + return infoTypesBuilder_.getMessage(index); + } + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.set(index, value); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(index, value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addAllInfoTypes( + java.lang.Iterable values) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, infoTypes_); + onChanged(); + } else { + infoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder clearInfoTypes() { + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + infoTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder removeInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.remove(index); + onChanged(); + } else { + infoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); } else { + return infoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List + getInfoTypesOrBuilderList() { + if (infoTypesBuilder_ != null) { + return infoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(infoTypes_); + } + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { + return getInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+     * Restricts what info_types to look for. The values must correspond to
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * If you need precise control and predictability as to what detectors are
+     * run you should specify specific InfoTypes listed in the reference,
+     * otherwise a default list will be used, which may change over time.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List + getInfoTypesBuilderList() { + return getInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypesFieldBuilder() { + if (infoTypesBuilder_ == null) { + infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + infoTypes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + infoTypes_ = null; + } + return infoTypesBuilder_; + } + + private int minLikelihood_ = 0; + /** + *
+     * Only returns findings equal or above this threshold. The default is
+     * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; + * @return The enum numeric value on the wire for minLikelihood. + */ + @java.lang.Override public int getMinLikelihoodValue() { + return minLikelihood_; + } + /** + *
+     * Only returns findings equal or above this threshold. The default is
+     * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; + * @param value The enum numeric value on the wire for minLikelihood to set. + * @return This builder for chaining. + */ + public Builder setMinLikelihoodValue(int value) { + + minLikelihood_ = value; + onChanged(); + return this; + } + /** + *
+     * Only returns findings equal or above this threshold. The default is
+     * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; + * @return The minLikelihood. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Likelihood getMinLikelihood() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(minLikelihood_); + return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; + } + /** + *
+     * Only returns findings equal or above this threshold. The default is
+     * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; + * @param value The minLikelihood to set. + * @return This builder for chaining. + */ + public Builder setMinLikelihood(com.google.privacy.dlp.v2.Likelihood value) { + if (value == null) { + throw new NullPointerException(); + } + + minLikelihood_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Only returns findings equal or above this threshold. The default is
+     * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
+     * 
+ * + * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; + * @return This builder for chaining. + */ + public Builder clearMinLikelihood() { + + minLikelihood_ = 0; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.InspectConfig.FindingLimits limits_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig.FindingLimits, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder> limitsBuilder_; + /** + *
+     * Configuration to control the number of findings returned.
+     * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + * @return Whether the limits field is set. + */ + public boolean hasLimits() { + return limitsBuilder_ != null || limits_ != null; + } + /** + *
+     * Configuration to control the number of findings returned.
+     * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + * @return The limits. + */ + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits() { + if (limitsBuilder_ == null) { + return limits_ == null ? com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() : limits_; + } else { + return limitsBuilder_.getMessage(); + } + } + /** + *
+     * Configuration to control the number of findings returned.
+     * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + */ + public Builder setLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits value) { + if (limitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + limits_ = value; + onChanged(); + } else { + limitsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Configuration to control the number of findings returned.
+     * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + */ + public Builder setLimits( + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder builderForValue) { + if (limitsBuilder_ == null) { + limits_ = builderForValue.build(); + onChanged(); + } else { + limitsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Configuration to control the number of findings returned.
+     * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + */ + public Builder mergeLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits value) { + if (limitsBuilder_ == null) { + if (limits_ != null) { + limits_ = + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.newBuilder(limits_).mergeFrom(value).buildPartial(); + } else { + limits_ = value; + } + onChanged(); + } else { + limitsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Configuration to control the number of findings returned.
+     * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + */ + public Builder clearLimits() { + if (limitsBuilder_ == null) { + limits_ = null; + onChanged(); + } else { + limits_ = null; + limitsBuilder_ = null; + } + + return this; + } + /** + *
+     * Configuration to control the number of findings returned.
+     * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + */ + public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder getLimitsBuilder() { + + onChanged(); + return getLimitsFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration to control the number of findings returned.
+     * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + */ + public com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder getLimitsOrBuilder() { + if (limitsBuilder_ != null) { + return limitsBuilder_.getMessageOrBuilder(); + } else { + return limits_ == null ? + com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() : limits_; + } + } + /** + *
+     * Configuration to control the number of findings returned.
+     * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig.FindingLimits, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder> + getLimitsFieldBuilder() { + if (limitsBuilder_ == null) { + limitsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig.FindingLimits, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder>( + getLimits(), + getParentForChildren(), + isClean()); + limits_ = null; + } + return limitsBuilder_; + } + + private boolean includeQuote_ ; + /** + *
+     * When true, a contextual quote from the data that triggered a finding is
+     * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
+     * This is not used for data profiling.
+     * 
+ * + * bool include_quote = 4; + * @return The includeQuote. + */ + @java.lang.Override + public boolean getIncludeQuote() { + return includeQuote_; + } + /** + *
+     * When true, a contextual quote from the data that triggered a finding is
+     * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
+     * This is not used for data profiling.
+     * 
+ * + * bool include_quote = 4; + * @param value The includeQuote to set. + * @return This builder for chaining. + */ + public Builder setIncludeQuote(boolean value) { + + includeQuote_ = value; + onChanged(); + return this; + } + /** + *
+     * When true, a contextual quote from the data that triggered a finding is
+     * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
+     * This is not used for data profiling.
+     * 
+ * + * bool include_quote = 4; + * @return This builder for chaining. + */ + public Builder clearIncludeQuote() { + + includeQuote_ = false; + onChanged(); + return this; + } + + private boolean excludeInfoTypes_ ; + /** + *
+     * When true, excludes type information of the findings.
+     * This is not used for data profiling.
+     * 
+ * + * bool exclude_info_types = 5; + * @return The excludeInfoTypes. + */ + @java.lang.Override + public boolean getExcludeInfoTypes() { + return excludeInfoTypes_; + } + /** + *
+     * When true, excludes type information of the findings.
+     * This is not used for data profiling.
+     * 
+ * + * bool exclude_info_types = 5; + * @param value The excludeInfoTypes to set. + * @return This builder for chaining. + */ + public Builder setExcludeInfoTypes(boolean value) { + + excludeInfoTypes_ = value; + onChanged(); + return this; + } + /** + *
+     * When true, excludes type information of the findings.
+     * This is not used for data profiling.
+     * 
+ * + * bool exclude_info_types = 5; + * @return This builder for chaining. + */ + public Builder clearExcludeInfoTypes() { + + excludeInfoTypes_ = false; + onChanged(); + return this; + } + + private java.util.List customInfoTypes_ = + java.util.Collections.emptyList(); + private void ensureCustomInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + customInfoTypes_ = new java.util.ArrayList(customInfoTypes_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType, com.google.privacy.dlp.v2.CustomInfoType.Builder, com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder> customInfoTypesBuilder_; + + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public java.util.List getCustomInfoTypesList() { + if (customInfoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(customInfoTypes_); + } else { + return customInfoTypesBuilder_.getMessageList(); + } + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public int getCustomInfoTypesCount() { + if (customInfoTypesBuilder_ == null) { + return customInfoTypes_.size(); + } else { + return customInfoTypesBuilder_.getCount(); + } + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index) { + if (customInfoTypesBuilder_ == null) { + return customInfoTypes_.get(index); + } else { + return customInfoTypesBuilder_.getMessage(index); + } + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public Builder setCustomInfoTypes( + int index, com.google.privacy.dlp.v2.CustomInfoType value) { + if (customInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomInfoTypesIsMutable(); + customInfoTypes_.set(index, value); + onChanged(); + } else { + customInfoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public Builder setCustomInfoTypes( + int index, com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue) { + if (customInfoTypesBuilder_ == null) { + ensureCustomInfoTypesIsMutable(); + customInfoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + customInfoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public Builder addCustomInfoTypes(com.google.privacy.dlp.v2.CustomInfoType value) { + if (customInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomInfoTypesIsMutable(); + customInfoTypes_.add(value); + onChanged(); + } else { + customInfoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public Builder addCustomInfoTypes( + int index, com.google.privacy.dlp.v2.CustomInfoType value) { + if (customInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomInfoTypesIsMutable(); + customInfoTypes_.add(index, value); + onChanged(); + } else { + customInfoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public Builder addCustomInfoTypes( + com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue) { + if (customInfoTypesBuilder_ == null) { + ensureCustomInfoTypesIsMutable(); + customInfoTypes_.add(builderForValue.build()); + onChanged(); + } else { + customInfoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public Builder addCustomInfoTypes( + int index, com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue) { + if (customInfoTypesBuilder_ == null) { + ensureCustomInfoTypesIsMutable(); + customInfoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + customInfoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public Builder addAllCustomInfoTypes( + java.lang.Iterable values) { + if (customInfoTypesBuilder_ == null) { + ensureCustomInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, customInfoTypes_); + onChanged(); + } else { + customInfoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public Builder clearCustomInfoTypes() { + if (customInfoTypesBuilder_ == null) { + customInfoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + customInfoTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public Builder removeCustomInfoTypes(int index) { + if (customInfoTypesBuilder_ == null) { + ensureCustomInfoTypesIsMutable(); + customInfoTypes_.remove(index); + onChanged(); + } else { + customInfoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Builder getCustomInfoTypesBuilder( + int index) { + return getCustomInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBuilder( + int index) { + if (customInfoTypesBuilder_ == null) { + return customInfoTypes_.get(index); } else { + return customInfoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public java.util.List + getCustomInfoTypesOrBuilderList() { + if (customInfoTypesBuilder_ != null) { + return customInfoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(customInfoTypes_); + } + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Builder addCustomInfoTypesBuilder() { + return getCustomInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()); + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Builder addCustomInfoTypesBuilder( + int index) { + return getCustomInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()); + } + /** + *
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+     * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + public java.util.List + getCustomInfoTypesBuilderList() { + return getCustomInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType, com.google.privacy.dlp.v2.CustomInfoType.Builder, com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder> + getCustomInfoTypesFieldBuilder() { + if (customInfoTypesBuilder_ == null) { + customInfoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType, com.google.privacy.dlp.v2.CustomInfoType.Builder, com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder>( + customInfoTypes_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + customInfoTypes_ = null; + } + return customInfoTypesBuilder_; + } + + private java.util.List contentOptions_ = + java.util.Collections.emptyList(); + private void ensureContentOptionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + contentOptions_ = new java.util.ArrayList(contentOptions_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return A list containing the contentOptions. + */ + public java.util.List getContentOptionsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.ContentOption>(contentOptions_, contentOptions_converter_); + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return The count of contentOptions. + */ + public int getContentOptionsCount() { + return contentOptions_.size(); + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param index The index of the element to return. + * @return The contentOptions at the given index. + */ + public com.google.privacy.dlp.v2.ContentOption getContentOptions(int index) { + return contentOptions_converter_.convert(contentOptions_.get(index)); + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param index The index to set the value at. + * @param value The contentOptions to set. + * @return This builder for chaining. + */ + public Builder setContentOptions( + int index, com.google.privacy.dlp.v2.ContentOption value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentOptionsIsMutable(); + contentOptions_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param value The contentOptions to add. + * @return This builder for chaining. + */ + public Builder addContentOptions(com.google.privacy.dlp.v2.ContentOption value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentOptionsIsMutable(); + contentOptions_.add(value.getNumber()); + onChanged(); + return this; + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param values The contentOptions to add. + * @return This builder for chaining. + */ + public Builder addAllContentOptions( + java.lang.Iterable values) { + ensureContentOptionsIsMutable(); + for (com.google.privacy.dlp.v2.ContentOption value : values) { + contentOptions_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return This builder for chaining. + */ + public Builder clearContentOptions() { + contentOptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return A list containing the enum numeric values on the wire for contentOptions. + */ + public java.util.List + getContentOptionsValueList() { + return java.util.Collections.unmodifiableList(contentOptions_); + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of contentOptions at the given index. + */ + public int getContentOptionsValue(int index) { + return contentOptions_.get(index); + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for contentOptions to set. + * @return This builder for chaining. + */ + public Builder setContentOptionsValue( + int index, int value) { + ensureContentOptionsIsMutable(); + contentOptions_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param value The enum numeric value on the wire for contentOptions to add. + * @return This builder for chaining. + */ + public Builder addContentOptionsValue(int value) { + ensureContentOptionsIsMutable(); + contentOptions_.add(value); + onChanged(); + return this; + } + /** + *
+     * Deprecated and unused.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param values The enum numeric values on the wire for contentOptions to add. + * @return This builder for chaining. + */ + public Builder addAllContentOptionsValue( + java.lang.Iterable values) { + ensureContentOptionsIsMutable(); + for (int value : values) { + contentOptions_.add(value); + } + onChanged(); + return this; + } + + private java.util.List ruleSet_ = + java.util.Collections.emptyList(); + private void ensureRuleSetIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + ruleSet_ = new java.util.ArrayList(ruleSet_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectionRuleSet, com.google.privacy.dlp.v2.InspectionRuleSet.Builder, com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder> ruleSetBuilder_; + + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public java.util.List getRuleSetList() { + if (ruleSetBuilder_ == null) { + return java.util.Collections.unmodifiableList(ruleSet_); + } else { + return ruleSetBuilder_.getMessageList(); + } + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public int getRuleSetCount() { + if (ruleSetBuilder_ == null) { + return ruleSet_.size(); + } else { + return ruleSetBuilder_.getCount(); + } + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public com.google.privacy.dlp.v2.InspectionRuleSet getRuleSet(int index) { + if (ruleSetBuilder_ == null) { + return ruleSet_.get(index); + } else { + return ruleSetBuilder_.getMessage(index); + } + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public Builder setRuleSet( + int index, com.google.privacy.dlp.v2.InspectionRuleSet value) { + if (ruleSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuleSetIsMutable(); + ruleSet_.set(index, value); + onChanged(); + } else { + ruleSetBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public Builder setRuleSet( + int index, com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue) { + if (ruleSetBuilder_ == null) { + ensureRuleSetIsMutable(); + ruleSet_.set(index, builderForValue.build()); + onChanged(); + } else { + ruleSetBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public Builder addRuleSet(com.google.privacy.dlp.v2.InspectionRuleSet value) { + if (ruleSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuleSetIsMutable(); + ruleSet_.add(value); + onChanged(); + } else { + ruleSetBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public Builder addRuleSet( + int index, com.google.privacy.dlp.v2.InspectionRuleSet value) { + if (ruleSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuleSetIsMutable(); + ruleSet_.add(index, value); + onChanged(); + } else { + ruleSetBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public Builder addRuleSet( + com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue) { + if (ruleSetBuilder_ == null) { + ensureRuleSetIsMutable(); + ruleSet_.add(builderForValue.build()); + onChanged(); + } else { + ruleSetBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public Builder addRuleSet( + int index, com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue) { + if (ruleSetBuilder_ == null) { + ensureRuleSetIsMutable(); + ruleSet_.add(index, builderForValue.build()); + onChanged(); + } else { + ruleSetBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public Builder addAllRuleSet( + java.lang.Iterable values) { + if (ruleSetBuilder_ == null) { + ensureRuleSetIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ruleSet_); + onChanged(); + } else { + ruleSetBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public Builder clearRuleSet() { + if (ruleSetBuilder_ == null) { + ruleSet_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + ruleSetBuilder_.clear(); + } + return this; + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public Builder removeRuleSet(int index) { + if (ruleSetBuilder_ == null) { + ensureRuleSetIsMutable(); + ruleSet_.remove(index); + onChanged(); + } else { + ruleSetBuilder_.remove(index); + } + return this; + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public com.google.privacy.dlp.v2.InspectionRuleSet.Builder getRuleSetBuilder( + int index) { + return getRuleSetFieldBuilder().getBuilder(index); + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder getRuleSetOrBuilder( + int index) { + if (ruleSetBuilder_ == null) { + return ruleSet_.get(index); } else { + return ruleSetBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public java.util.List + getRuleSetOrBuilderList() { + if (ruleSetBuilder_ != null) { + return ruleSetBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ruleSet_); + } + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public com.google.privacy.dlp.v2.InspectionRuleSet.Builder addRuleSetBuilder() { + return getRuleSetFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance()); + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public com.google.privacy.dlp.v2.InspectionRuleSet.Builder addRuleSetBuilder( + int index) { + return getRuleSetFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance()); + } + /** + *
+     * Set of rules to apply to the findings for this InspectConfig.
+     * Exclusion rules, contained in the set are executed in the end, other
+     * rules are executed in the order they are specified for each info type.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + public java.util.List + getRuleSetBuilderList() { + return getRuleSetFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectionRuleSet, com.google.privacy.dlp.v2.InspectionRuleSet.Builder, com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder> + getRuleSetFieldBuilder() { + if (ruleSetBuilder_ == null) { + ruleSetBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectionRuleSet, com.google.privacy.dlp.v2.InspectionRuleSet.Builder, com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder>( + ruleSet_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + ruleSet_ = null; + } + return ruleSetBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectConfig) + private static final com.google.privacy.dlp.v2.InspectConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectConfig(); + } + + public static com.google.privacy.dlp.v2.InspectConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InspectConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InspectConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java new file mode 100644 index 000000000000..13f7f9cd2282 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java @@ -0,0 +1,336 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InspectConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + java.util.List + getInfoTypesList(); + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + int getInfoTypesCount(); + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + java.util.List + getInfoTypesOrBuilderList(); + /** + *
+   * Restricts what info_types to look for. The values must correspond to
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
+   * If you need precise control and predictability as to what detectors are
+   * run you should specify specific InfoTypes listed in the reference,
+   * otherwise a default list will be used, which may change over time.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index); + + /** + *
+   * Only returns findings equal or above this threshold. The default is
+   * POSSIBLE.
+   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; + * @return The enum numeric value on the wire for minLikelihood. + */ + int getMinLikelihoodValue(); + /** + *
+   * Only returns findings equal or above this threshold. The default is
+   * POSSIBLE.
+   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
+   * 
+ * + * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; + * @return The minLikelihood. + */ + com.google.privacy.dlp.v2.Likelihood getMinLikelihood(); + + /** + *
+   * Configuration to control the number of findings returned.
+   * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + * @return Whether the limits field is set. + */ + boolean hasLimits(); + /** + *
+   * Configuration to control the number of findings returned.
+   * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + * @return The limits. + */ + com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits(); + /** + *
+   * Configuration to control the number of findings returned.
+   * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; + */ + com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder getLimitsOrBuilder(); + + /** + *
+   * When true, a contextual quote from the data that triggered a finding is
+   * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
+   * This is not used for data profiling.
+   * 
+ * + * bool include_quote = 4; + * @return The includeQuote. + */ + boolean getIncludeQuote(); + + /** + *
+   * When true, excludes type information of the findings.
+   * This is not used for data profiling.
+   * 
+ * + * bool exclude_info_types = 5; + * @return The excludeInfoTypes. + */ + boolean getExcludeInfoTypes(); + + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + java.util.List + getCustomInfoTypesList(); + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index); + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + int getCustomInfoTypesCount(); + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + java.util.List + getCustomInfoTypesOrBuilderList(); + /** + *
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
+   * 
+ * + * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; + */ + com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBuilder( + int index); + + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return A list containing the contentOptions. + */ + java.util.List getContentOptionsList(); + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return The count of contentOptions. + */ + int getContentOptionsCount(); + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param index The index of the element to return. + * @return The contentOptions at the given index. + */ + com.google.privacy.dlp.v2.ContentOption getContentOptions(int index); + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @return A list containing the enum numeric values on the wire for contentOptions. + */ + java.util.List + getContentOptionsValueList(); + /** + *
+   * Deprecated and unused.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of contentOptions at the given index. + */ + int getContentOptionsValue(int index); + + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + java.util.List + getRuleSetList(); + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + com.google.privacy.dlp.v2.InspectionRuleSet getRuleSet(int index); + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + int getRuleSetCount(); + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + java.util.List + getRuleSetOrBuilderList(); + /** + *
+   * Set of rules to apply to the findings for this InspectConfig.
+   * Exclusion rules, contained in the set are executed in the end, other
+   * rules are executed in the order they are specified for each info type.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; + */ + com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder getRuleSetOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java new file mode 100644 index 000000000000..5f376ac94e34 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java @@ -0,0 +1,1516 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request to search for potentially sensitive info in a ContentItem.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectContentRequest} + */ +public final class InspectContentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectContentRequest) + InspectContentRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use InspectContentRequest.newBuilder() to construct. + private InspectContentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InspectContentRequest() { + parent_ = ""; + inspectTemplateName_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InspectContentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InspectContentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; + if (inspectConfig_ != null) { + subBuilder = inspectConfig_.toBuilder(); + } + inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectConfig_); + inspectConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; + if (item_ != null) { + subBuilder = item_.toBuilder(); + } + item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(item_); + item_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + inspectTemplateName_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectContentRequest.class, com.google.privacy.dlp.v2.InspectContentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSPECT_CONFIG_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + /** + *
+   * Configuration for the inspector. What specified here will override
+   * the template referenced by the inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + @java.lang.Override + public boolean hasInspectConfig() { + return inspectConfig_ != null; + } + /** + *
+   * Configuration for the inspector. What specified here will override
+   * the template referenced by the inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + /** + *
+   * Configuration for the inspector. What specified here will override
+   * the template referenced by the inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + return getInspectConfig(); + } + + public static final int ITEM_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.ContentItem item_; + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return item_ != null; + } + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + * @return The item. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem getItem() { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + return getItem(); + } + + public static final int INSPECT_TEMPLATE_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object inspectTemplateName_; + /** + *
+   * Template to use. Any configuration directly specified in
+   * inspect_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 4; + * @return The inspectTemplateName. + */ + @java.lang.Override + public java.lang.String getInspectTemplateName() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inspectTemplateName_ = s; + return s; + } + } + /** + *
+   * Template to use. Any configuration directly specified in
+   * inspect_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 4; + * @return The bytes for inspectTemplateName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInspectTemplateNameBytes() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + inspectTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (inspectConfig_ != null) { + output.writeMessage(2, getInspectConfig()); + } + if (item_ != null) { + output.writeMessage(3, getItem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, inspectTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (inspectConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInspectConfig()); + } + if (item_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getItem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, inspectTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectContentRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectContentRequest other = (com.google.privacy.dlp.v2.InspectContentRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasInspectConfig() != other.hasInspectConfig()) return false; + if (hasInspectConfig()) { + if (!getInspectConfig() + .equals(other.getInspectConfig())) return false; + } + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem() + .equals(other.getItem())) return false; + } + if (!getInspectTemplateName() + .equals(other.getInspectTemplateName())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasInspectConfig()) { + hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInspectConfig().hashCode(); + } + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + hash = (37 * hash) + INSPECT_TEMPLATE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getInspectTemplateName().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectContentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to search for potentially sensitive info in a ContentItem.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectContentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectContentRequest) + com.google.privacy.dlp.v2.InspectContentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectContentRequest.class, com.google.privacy.dlp.v2.InspectContentRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectContentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + if (itemBuilder_ == null) { + item_ = null; + } else { + item_ = null; + itemBuilder_ = null; + } + inspectTemplateName_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectContentRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectContentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectContentRequest build() { + com.google.privacy.dlp.v2.InspectContentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectContentRequest buildPartial() { + com.google.privacy.dlp.v2.InspectContentRequest result = new com.google.privacy.dlp.v2.InspectContentRequest(this); + result.parent_ = parent_; + if (inspectConfigBuilder_ == null) { + result.inspectConfig_ = inspectConfig_; + } else { + result.inspectConfig_ = inspectConfigBuilder_.build(); + } + if (itemBuilder_ == null) { + result.item_ = item_; + } else { + result.item_ = itemBuilder_.build(); + } + result.inspectTemplateName_ = inspectTemplateName_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectContentRequest) { + return mergeFrom((com.google.privacy.dlp.v2.InspectContentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectContentRequest other) { + if (other == com.google.privacy.dlp.v2.InspectContentRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasInspectConfig()) { + mergeInspectConfig(other.getInspectConfig()); + } + if (other.hasItem()) { + mergeItem(other.getItem()); + } + if (!other.getInspectTemplateName().isEmpty()) { + inspectTemplateName_ = other.inspectTemplateName_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectContentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectContentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; + /** + *
+     * Configuration for the inspector. What specified here will override
+     * the template referenced by the inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + public boolean hasInspectConfig() { + return inspectConfigBuilder_ != null || inspectConfig_ != null; + } + /** + *
+     * Configuration for the inspector. What specified here will override
+     * the template referenced by the inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + if (inspectConfigBuilder_ == null) { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } else { + return inspectConfigBuilder_.getMessage(); + } + } + /** + *
+     * Configuration for the inspector. What specified here will override
+     * the template referenced by the inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectConfig_ = value; + onChanged(); + } else { + inspectConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Configuration for the inspector. What specified here will override
+     * the template referenced by the inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder setInspectConfig( + com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = builderForValue.build(); + onChanged(); + } else { + inspectConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Configuration for the inspector. What specified here will override
+     * the template referenced by the inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (inspectConfig_ != null) { + inspectConfig_ = + com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); + } else { + inspectConfig_ = value; + } + onChanged(); + } else { + inspectConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Configuration for the inspector. What specified here will override
+     * the template referenced by the inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder clearInspectConfig() { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + onChanged(); + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Configuration for the inspector. What specified here will override
+     * the template referenced by the inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { + + onChanged(); + return getInspectConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration for the inspector. What specified here will override
+     * the template referenced by the inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + if (inspectConfigBuilder_ != null) { + return inspectConfigBuilder_.getMessageOrBuilder(); + } else { + return inspectConfig_ == null ? + com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + } + /** + *
+     * Configuration for the inspector. What specified here will override
+     * the template referenced by the inspect_template_name argument.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> + getInspectConfigFieldBuilder() { + if (inspectConfigBuilder_ == null) { + inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( + getInspectConfig(), + getParentForChildren(), + isClean()); + inspectConfig_ = null; + } + return inspectConfigBuilder_; + } + + private com.google.privacy.dlp.v2.ContentItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + * @return Whether the item field is set. + */ + public boolean hasItem() { + return itemBuilder_ != null || item_ != null; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + * @return The item. + */ + public com.google.privacy.dlp.v2.ContentItem getItem() { + if (itemBuilder_ == null) { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + */ + public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + onChanged(); + } else { + itemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + */ + public Builder setItem( + com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + onChanged(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + */ + public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (item_ != null) { + item_ = + com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); + } else { + item_ = value; + } + onChanged(); + } else { + itemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + */ + public Builder clearItem() { + if (itemBuilder_ == null) { + item_ = null; + onChanged(); + } else { + item_ = null; + itemBuilder_ = null; + } + + return this; + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + */ + public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { + + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + */ + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null ? + com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + } + /** + *
+     * The item to inspect.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( + getItem(), + getParentForChildren(), + isClean()); + item_ = null; + } + return itemBuilder_; + } + + private java.lang.Object inspectTemplateName_ = ""; + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 4; + * @return The inspectTemplateName. + */ + public java.lang.String getInspectTemplateName() { + java.lang.Object ref = inspectTemplateName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inspectTemplateName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 4; + * @return The bytes for inspectTemplateName. + */ + public com.google.protobuf.ByteString + getInspectTemplateNameBytes() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + inspectTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 4; + * @param value The inspectTemplateName to set. + * @return This builder for chaining. + */ + public Builder setInspectTemplateName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inspectTemplateName_ = value; + onChanged(); + return this; + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 4; + * @return This builder for chaining. + */ + public Builder clearInspectTemplateName() { + + inspectTemplateName_ = getDefaultInstance().getInspectTemplateName(); + onChanged(); + return this; + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * inspect_config will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 4; + * @param value The bytes for inspectTemplateName to set. + * @return This builder for chaining. + */ + public Builder setInspectTemplateNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inspectTemplateName_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectContentRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectContentRequest) + private static final com.google.privacy.dlp.v2.InspectContentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectContentRequest(); + } + + public static com.google.privacy.dlp.v2.InspectContentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InspectContentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InspectContentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectContentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java new file mode 100644 index 000000000000..d2079954a98f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java @@ -0,0 +1,156 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InspectContentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectContentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Configuration for the inspector. What specified here will override
+   * the template referenced by the inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + boolean hasInspectConfig(); + /** + *
+   * Configuration for the inspector. What specified here will override
+   * the template referenced by the inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); + /** + *
+   * Configuration for the inspector. What specified here will override
+   * the template referenced by the inspect_template_name argument.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); + + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + * @return The item. + */ + com.google.privacy.dlp.v2.ContentItem getItem(); + /** + *
+   * The item to inspect.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 3; + */ + com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); + + /** + *
+   * Template to use. Any configuration directly specified in
+   * inspect_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 4; + * @return The inspectTemplateName. + */ + java.lang.String getInspectTemplateName(); + /** + *
+   * Template to use. Any configuration directly specified in
+   * inspect_config will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 4; + * @return The bytes for inspectTemplateName. + */ + com.google.protobuf.ByteString + getInspectTemplateNameBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponse.java new file mode 100644 index 000000000000..5e4eb7d861be --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponse.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Results of inspecting an item.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectContentResponse} + */ +public final class InspectContentResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectContentResponse) + InspectContentResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use InspectContentResponse.newBuilder() to construct. + private InspectContentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InspectContentResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InspectContentResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InspectContentResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InspectResult.Builder subBuilder = null; + if (result_ != null) { + subBuilder = result_.toBuilder(); + } + result_ = input.readMessage(com.google.privacy.dlp.v2.InspectResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(result_); + result_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectContentResponse.class, com.google.privacy.dlp.v2.InspectContentResponse.Builder.class); + } + + public static final int RESULT_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.InspectResult result_; + /** + *
+   * The findings.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + *
+   * The findings.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + * @return The result. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectResult getResult() { + return result_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : result_; + } + /** + *
+   * The findings.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectResultOrBuilder getResultOrBuilder() { + return getResult(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (result_ != null) { + output.writeMessage(1, getResult()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getResult()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectContentResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectContentResponse other = (com.google.privacy.dlp.v2.InspectContentResponse) obj; + + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult() + .equals(other.getResult())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectContentResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Results of inspecting an item.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectContentResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectContentResponse) + com.google.privacy.dlp.v2.InspectContentResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectContentResponse.class, com.google.privacy.dlp.v2.InspectContentResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectContentResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultBuilder_ == null) { + result_ = null; + } else { + result_ = null; + resultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectContentResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectContentResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectContentResponse build() { + com.google.privacy.dlp.v2.InspectContentResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectContentResponse buildPartial() { + com.google.privacy.dlp.v2.InspectContentResponse result = new com.google.privacy.dlp.v2.InspectContentResponse(this); + if (resultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = resultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectContentResponse) { + return mergeFrom((com.google.privacy.dlp.v2.InspectContentResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectContentResponse other) { + if (other == com.google.privacy.dlp.v2.InspectContentResponse.getDefaultInstance()) return this; + if (other.hasResult()) { + mergeResult(other.getResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectContentResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectContentResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.InspectResult result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> resultBuilder_; + /** + *
+     * The findings.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + * @return Whether the result field is set. + */ + public boolean hasResult() { + return resultBuilder_ != null || result_ != null; + } + /** + *
+     * The findings.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + * @return The result. + */ + public com.google.privacy.dlp.v2.InspectResult getResult() { + if (resultBuilder_ == null) { + return result_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + *
+     * The findings.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + */ + public Builder setResult(com.google.privacy.dlp.v2.InspectResult value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The findings.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + */ + public Builder setResult( + com.google.privacy.dlp.v2.InspectResult.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The findings.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + */ + public Builder mergeResult(com.google.privacy.dlp.v2.InspectResult value) { + if (resultBuilder_ == null) { + if (result_ != null) { + result_ = + com.google.privacy.dlp.v2.InspectResult.newBuilder(result_).mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + resultBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The findings.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + result_ = null; + onChanged(); + } else { + result_ = null; + resultBuilder_ = null; + } + + return this; + } + /** + *
+     * The findings.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + */ + public com.google.privacy.dlp.v2.InspectResult.Builder getResultBuilder() { + + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + *
+     * The findings.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + */ + public com.google.privacy.dlp.v2.InspectResultOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null ? + com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : result_; + } + } + /** + *
+     * The findings.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder>( + getResult(), + getParentForChildren(), + isClean()); + result_ = null; + } + return resultBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectContentResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectContentResponse) + private static final com.google.privacy.dlp.v2.InspectContentResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectContentResponse(); + } + + public static com.google.privacy.dlp.v2.InspectContentResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InspectContentResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InspectContentResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectContentResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponseOrBuilder.java new file mode 100644 index 000000000000..2595a8c8cc0e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponseOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InspectContentResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectContentResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The findings.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + *
+   * The findings.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + * @return The result. + */ + com.google.privacy.dlp.v2.InspectResult getResult(); + /** + *
+   * The findings.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult result = 1; + */ + com.google.privacy.dlp.v2.InspectResultOrBuilder getResultOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetails.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetails.java new file mode 100644 index 000000000000..63d91f13ff81 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetails.java @@ -0,0 +1,3258 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The results of an inspect DataSource job.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails} + */ +public final class InspectDataSourceDetails extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectDataSourceDetails) + InspectDataSourceDetailsOrBuilder { +private static final long serialVersionUID = 0L; + // Use InspectDataSourceDetails.newBuilder() to construct. + private InspectDataSourceDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InspectDataSourceDetails() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InspectDataSourceDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InspectDataSourceDetails( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder subBuilder = null; + if (requestedOptions_ != null) { + subBuilder = requestedOptions_.toBuilder(); + } + requestedOptions_ = input.readMessage(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(requestedOptions_); + requestedOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder subBuilder = null; + if (result_ != null) { + subBuilder = result_.toBuilder(); + } + result_ = input.readMessage(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(result_); + result_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectDataSourceDetails.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder.class); + } + + public interface RequestedOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * If run with an InspectTemplate, a snapshot of its state at the time of
+     * this run.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + * @return Whether the snapshotInspectTemplate field is set. + */ + boolean hasSnapshotInspectTemplate(); + /** + *
+     * If run with an InspectTemplate, a snapshot of its state at the time of
+     * this run.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + * @return The snapshotInspectTemplate. + */ + com.google.privacy.dlp.v2.InspectTemplate getSnapshotInspectTemplate(); + /** + *
+     * If run with an InspectTemplate, a snapshot of its state at the time of
+     * this run.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + */ + com.google.privacy.dlp.v2.InspectTemplateOrBuilder getSnapshotInspectTemplateOrBuilder(); + + /** + *
+     * Inspect config.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + * @return Whether the jobConfig field is set. + */ + boolean hasJobConfig(); + /** + *
+     * Inspect config.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + * @return The jobConfig. + */ + com.google.privacy.dlp.v2.InspectJobConfig getJobConfig(); + /** + *
+     * Inspect config.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + */ + com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getJobConfigOrBuilder(); + } + /** + *
+   * Snapshot of the inspection configuration.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions} + */ + public static final class RequestedOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) + RequestedOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestedOptions.newBuilder() to construct. + private RequestedOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RequestedOptions() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RequestedOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RequestedOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InspectTemplate.Builder subBuilder = null; + if (snapshotInspectTemplate_ != null) { + subBuilder = snapshotInspectTemplate_.toBuilder(); + } + snapshotInspectTemplate_ = input.readMessage(com.google.privacy.dlp.v2.InspectTemplate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(snapshotInspectTemplate_); + snapshotInspectTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.InspectJobConfig.Builder subBuilder = null; + if (jobConfig_ != null) { + subBuilder = jobConfig_.toBuilder(); + } + jobConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectJobConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobConfig_); + jobConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder.class); + } + + public static final int SNAPSHOT_INSPECT_TEMPLATE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.InspectTemplate snapshotInspectTemplate_; + /** + *
+     * If run with an InspectTemplate, a snapshot of its state at the time of
+     * this run.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + * @return Whether the snapshotInspectTemplate field is set. + */ + @java.lang.Override + public boolean hasSnapshotInspectTemplate() { + return snapshotInspectTemplate_ != null; + } + /** + *
+     * If run with an InspectTemplate, a snapshot of its state at the time of
+     * this run.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + * @return The snapshotInspectTemplate. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplate getSnapshotInspectTemplate() { + return snapshotInspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : snapshotInspectTemplate_; + } + /** + *
+     * If run with an InspectTemplate, a snapshot of its state at the time of
+     * this run.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getSnapshotInspectTemplateOrBuilder() { + return getSnapshotInspectTemplate(); + } + + public static final int JOB_CONFIG_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.InspectJobConfig jobConfig_; + /** + *
+     * Inspect config.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + * @return Whether the jobConfig field is set. + */ + @java.lang.Override + public boolean hasJobConfig() { + return jobConfig_ != null; + } + /** + *
+     * Inspect config.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + * @return The jobConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfig getJobConfig() { + return jobConfig_ == null ? com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance() : jobConfig_; + } + /** + *
+     * Inspect config.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getJobConfigOrBuilder() { + return getJobConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (snapshotInspectTemplate_ != null) { + output.writeMessage(1, getSnapshotInspectTemplate()); + } + if (jobConfig_ != null) { + output.writeMessage(3, getJobConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (snapshotInspectTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSnapshotInspectTemplate()); + } + if (jobConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getJobConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions other = (com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) obj; + + if (hasSnapshotInspectTemplate() != other.hasSnapshotInspectTemplate()) return false; + if (hasSnapshotInspectTemplate()) { + if (!getSnapshotInspectTemplate() + .equals(other.getSnapshotInspectTemplate())) return false; + } + if (hasJobConfig() != other.hasJobConfig()) return false; + if (hasJobConfig()) { + if (!getJobConfig() + .equals(other.getJobConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSnapshotInspectTemplate()) { + hash = (37 * hash) + SNAPSHOT_INSPECT_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getSnapshotInspectTemplate().hashCode(); + } + if (hasJobConfig()) { + hash = (37 * hash) + JOB_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getJobConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Snapshot of the inspection configuration.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (snapshotInspectTemplateBuilder_ == null) { + snapshotInspectTemplate_ = null; + } else { + snapshotInspectTemplate_ = null; + snapshotInspectTemplateBuilder_ = null; + } + if (jobConfigBuilder_ == null) { + jobConfig_ = null; + } else { + jobConfig_ = null; + jobConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions build() { + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions buildPartial() { + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions result = new com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions(this); + if (snapshotInspectTemplateBuilder_ == null) { + result.snapshotInspectTemplate_ = snapshotInspectTemplate_; + } else { + result.snapshotInspectTemplate_ = snapshotInspectTemplateBuilder_.build(); + } + if (jobConfigBuilder_ == null) { + result.jobConfig_ = jobConfig_; + } else { + result.jobConfig_ = jobConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) { + return mergeFrom((com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions other) { + if (other == com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance()) return this; + if (other.hasSnapshotInspectTemplate()) { + mergeSnapshotInspectTemplate(other.getSnapshotInspectTemplate()); + } + if (other.hasJobConfig()) { + mergeJobConfig(other.getJobConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.InspectTemplate snapshotInspectTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> snapshotInspectTemplateBuilder_; + /** + *
+       * If run with an InspectTemplate, a snapshot of its state at the time of
+       * this run.
+       * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + * @return Whether the snapshotInspectTemplate field is set. + */ + public boolean hasSnapshotInspectTemplate() { + return snapshotInspectTemplateBuilder_ != null || snapshotInspectTemplate_ != null; + } + /** + *
+       * If run with an InspectTemplate, a snapshot of its state at the time of
+       * this run.
+       * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + * @return The snapshotInspectTemplate. + */ + public com.google.privacy.dlp.v2.InspectTemplate getSnapshotInspectTemplate() { + if (snapshotInspectTemplateBuilder_ == null) { + return snapshotInspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : snapshotInspectTemplate_; + } else { + return snapshotInspectTemplateBuilder_.getMessage(); + } + } + /** + *
+       * If run with an InspectTemplate, a snapshot of its state at the time of
+       * this run.
+       * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + */ + public Builder setSnapshotInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { + if (snapshotInspectTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + snapshotInspectTemplate_ = value; + onChanged(); + } else { + snapshotInspectTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * If run with an InspectTemplate, a snapshot of its state at the time of
+       * this run.
+       * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + */ + public Builder setSnapshotInspectTemplate( + com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { + if (snapshotInspectTemplateBuilder_ == null) { + snapshotInspectTemplate_ = builderForValue.build(); + onChanged(); + } else { + snapshotInspectTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * If run with an InspectTemplate, a snapshot of its state at the time of
+       * this run.
+       * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + */ + public Builder mergeSnapshotInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { + if (snapshotInspectTemplateBuilder_ == null) { + if (snapshotInspectTemplate_ != null) { + snapshotInspectTemplate_ = + com.google.privacy.dlp.v2.InspectTemplate.newBuilder(snapshotInspectTemplate_).mergeFrom(value).buildPartial(); + } else { + snapshotInspectTemplate_ = value; + } + onChanged(); + } else { + snapshotInspectTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * If run with an InspectTemplate, a snapshot of its state at the time of
+       * this run.
+       * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + */ + public Builder clearSnapshotInspectTemplate() { + if (snapshotInspectTemplateBuilder_ == null) { + snapshotInspectTemplate_ = null; + onChanged(); + } else { + snapshotInspectTemplate_ = null; + snapshotInspectTemplateBuilder_ = null; + } + + return this; + } + /** + *
+       * If run with an InspectTemplate, a snapshot of its state at the time of
+       * this run.
+       * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + */ + public com.google.privacy.dlp.v2.InspectTemplate.Builder getSnapshotInspectTemplateBuilder() { + + onChanged(); + return getSnapshotInspectTemplateFieldBuilder().getBuilder(); + } + /** + *
+       * If run with an InspectTemplate, a snapshot of its state at the time of
+       * this run.
+       * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + */ + public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getSnapshotInspectTemplateOrBuilder() { + if (snapshotInspectTemplateBuilder_ != null) { + return snapshotInspectTemplateBuilder_.getMessageOrBuilder(); + } else { + return snapshotInspectTemplate_ == null ? + com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : snapshotInspectTemplate_; + } + } + /** + *
+       * If run with an InspectTemplate, a snapshot of its state at the time of
+       * this run.
+       * 
+ * + * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> + getSnapshotInspectTemplateFieldBuilder() { + if (snapshotInspectTemplateBuilder_ == null) { + snapshotInspectTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder>( + getSnapshotInspectTemplate(), + getParentForChildren(), + isClean()); + snapshotInspectTemplate_ = null; + } + return snapshotInspectTemplateBuilder_; + } + + private com.google.privacy.dlp.v2.InspectJobConfig jobConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> jobConfigBuilder_; + /** + *
+       * Inspect config.
+       * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + * @return Whether the jobConfig field is set. + */ + public boolean hasJobConfig() { + return jobConfigBuilder_ != null || jobConfig_ != null; + } + /** + *
+       * Inspect config.
+       * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + * @return The jobConfig. + */ + public com.google.privacy.dlp.v2.InspectJobConfig getJobConfig() { + if (jobConfigBuilder_ == null) { + return jobConfig_ == null ? com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance() : jobConfig_; + } else { + return jobConfigBuilder_.getMessage(); + } + } + /** + *
+       * Inspect config.
+       * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + */ + public Builder setJobConfig(com.google.privacy.dlp.v2.InspectJobConfig value) { + if (jobConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobConfig_ = value; + onChanged(); + } else { + jobConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Inspect config.
+       * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + */ + public Builder setJobConfig( + com.google.privacy.dlp.v2.InspectJobConfig.Builder builderForValue) { + if (jobConfigBuilder_ == null) { + jobConfig_ = builderForValue.build(); + onChanged(); + } else { + jobConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Inspect config.
+       * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + */ + public Builder mergeJobConfig(com.google.privacy.dlp.v2.InspectJobConfig value) { + if (jobConfigBuilder_ == null) { + if (jobConfig_ != null) { + jobConfig_ = + com.google.privacy.dlp.v2.InspectJobConfig.newBuilder(jobConfig_).mergeFrom(value).buildPartial(); + } else { + jobConfig_ = value; + } + onChanged(); + } else { + jobConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Inspect config.
+       * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + */ + public Builder clearJobConfig() { + if (jobConfigBuilder_ == null) { + jobConfig_ = null; + onChanged(); + } else { + jobConfig_ = null; + jobConfigBuilder_ = null; + } + + return this; + } + /** + *
+       * Inspect config.
+       * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + */ + public com.google.privacy.dlp.v2.InspectJobConfig.Builder getJobConfigBuilder() { + + onChanged(); + return getJobConfigFieldBuilder().getBuilder(); + } + /** + *
+       * Inspect config.
+       * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + */ + public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getJobConfigOrBuilder() { + if (jobConfigBuilder_ != null) { + return jobConfigBuilder_.getMessageOrBuilder(); + } else { + return jobConfig_ == null ? + com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance() : jobConfig_; + } + } + /** + *
+       * Inspect config.
+       * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> + getJobConfigFieldBuilder() { + if (jobConfigBuilder_ == null) { + jobConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder>( + getJobConfig(), + getParentForChildren(), + isClean()); + jobConfig_ = null; + } + return jobConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) + private static final com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions(); + } + + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestedOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RequestedOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectDataSourceDetails.Result) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Total size in bytes that were processed.
+     * 
+ * + * int64 processed_bytes = 1; + * @return The processedBytes. + */ + long getProcessedBytes(); + + /** + *
+     * Estimate of the number of bytes to process.
+     * 
+ * + * int64 total_estimated_bytes = 2; + * @return The totalEstimatedBytes. + */ + long getTotalEstimatedBytes(); + + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + java.util.List + getInfoTypeStatsList(); + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + com.google.privacy.dlp.v2.InfoTypeStats getInfoTypeStats(int index); + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + int getInfoTypeStatsCount(); + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + java.util.List + getInfoTypeStatsOrBuilderList(); + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder getInfoTypeStatsOrBuilder( + int index); + + /** + *
+     * Statistics related to the processing of hybrid inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + * @return Whether the hybridStats field is set. + */ + boolean hasHybridStats(); + /** + *
+     * Statistics related to the processing of hybrid inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + * @return The hybridStats. + */ + com.google.privacy.dlp.v2.HybridInspectStatistics getHybridStats(); + /** + *
+     * Statistics related to the processing of hybrid inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + */ + com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder getHybridStatsOrBuilder(); + } + /** + *
+   * All result fields mentioned below are updated while the job is processing.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails.Result} + */ + public static final class Result extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectDataSourceDetails.Result) + ResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use Result.newBuilder() to construct. + private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Result() { + infoTypeStats_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Result(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Result( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + processedBytes_ = input.readInt64(); + break; + } + case 16: { + + totalEstimatedBytes_ = input.readInt64(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypeStats_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + infoTypeStats_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoTypeStats.parser(), extensionRegistry)); + break; + } + case 58: { + com.google.privacy.dlp.v2.HybridInspectStatistics.Builder subBuilder = null; + if (hybridStats_ != null) { + subBuilder = hybridStats_.toBuilder(); + } + hybridStats_ = input.readMessage(com.google.privacy.dlp.v2.HybridInspectStatistics.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hybridStats_); + hybridStats_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypeStats_ = java.util.Collections.unmodifiableList(infoTypeStats_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder.class); + } + + public static final int PROCESSED_BYTES_FIELD_NUMBER = 1; + private long processedBytes_; + /** + *
+     * Total size in bytes that were processed.
+     * 
+ * + * int64 processed_bytes = 1; + * @return The processedBytes. + */ + @java.lang.Override + public long getProcessedBytes() { + return processedBytes_; + } + + public static final int TOTAL_ESTIMATED_BYTES_FIELD_NUMBER = 2; + private long totalEstimatedBytes_; + /** + *
+     * Estimate of the number of bytes to process.
+     * 
+ * + * int64 total_estimated_bytes = 2; + * @return The totalEstimatedBytes. + */ + @java.lang.Override + public long getTotalEstimatedBytes() { + return totalEstimatedBytes_; + } + + public static final int INFO_TYPE_STATS_FIELD_NUMBER = 3; + private java.util.List infoTypeStats_; + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + @java.lang.Override + public java.util.List getInfoTypeStatsList() { + return infoTypeStats_; + } + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + @java.lang.Override + public java.util.List + getInfoTypeStatsOrBuilderList() { + return infoTypeStats_; + } + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + @java.lang.Override + public int getInfoTypeStatsCount() { + return infoTypeStats_.size(); + } + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeStats getInfoTypeStats(int index) { + return infoTypeStats_.get(index); + } + /** + *
+     * Statistics of how many instances of each info type were found during
+     * inspect job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder getInfoTypeStatsOrBuilder( + int index) { + return infoTypeStats_.get(index); + } + + public static final int HYBRID_STATS_FIELD_NUMBER = 7; + private com.google.privacy.dlp.v2.HybridInspectStatistics hybridStats_; + /** + *
+     * Statistics related to the processing of hybrid inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + * @return Whether the hybridStats field is set. + */ + @java.lang.Override + public boolean hasHybridStats() { + return hybridStats_ != null; + } + /** + *
+     * Statistics related to the processing of hybrid inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + * @return The hybridStats. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectStatistics getHybridStats() { + return hybridStats_ == null ? com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance() : hybridStats_; + } + /** + *
+     * Statistics related to the processing of hybrid inspect.
+     * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder getHybridStatsOrBuilder() { + return getHybridStats(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (processedBytes_ != 0L) { + output.writeInt64(1, processedBytes_); + } + if (totalEstimatedBytes_ != 0L) { + output.writeInt64(2, totalEstimatedBytes_); + } + for (int i = 0; i < infoTypeStats_.size(); i++) { + output.writeMessage(3, infoTypeStats_.get(i)); + } + if (hybridStats_ != null) { + output.writeMessage(7, getHybridStats()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (processedBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, processedBytes_); + } + if (totalEstimatedBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, totalEstimatedBytes_); + } + for (int i = 0; i < infoTypeStats_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, infoTypeStats_.get(i)); + } + if (hybridStats_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getHybridStats()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails.Result)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result other = (com.google.privacy.dlp.v2.InspectDataSourceDetails.Result) obj; + + if (getProcessedBytes() + != other.getProcessedBytes()) return false; + if (getTotalEstimatedBytes() + != other.getTotalEstimatedBytes()) return false; + if (!getInfoTypeStatsList() + .equals(other.getInfoTypeStatsList())) return false; + if (hasHybridStats() != other.hasHybridStats()) return false; + if (hasHybridStats()) { + if (!getHybridStats() + .equals(other.getHybridStats())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROCESSED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getProcessedBytes()); + hash = (37 * hash) + TOTAL_ESTIMATED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalEstimatedBytes()); + if (getInfoTypeStatsCount() > 0) { + hash = (37 * hash) + INFO_TYPE_STATS_FIELD_NUMBER; + hash = (53 * hash) + getInfoTypeStatsList().hashCode(); + } + if (hasHybridStats()) { + hash = (37 * hash) + HYBRID_STATS_FIELD_NUMBER; + hash = (53 * hash) + getHybridStats().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * All result fields mentioned below are updated while the job is processing.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails.Result} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectDataSourceDetails.Result) + com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInfoTypeStatsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + processedBytes_ = 0L; + + totalEstimatedBytes_ = 0L; + + if (infoTypeStatsBuilder_ == null) { + infoTypeStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + infoTypeStatsBuilder_.clear(); + } + if (hybridStatsBuilder_ == null) { + hybridStats_ = null; + } else { + hybridStats_ = null; + hybridStatsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result build() { + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result buildPartial() { + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result result = new com.google.privacy.dlp.v2.InspectDataSourceDetails.Result(this); + int from_bitField0_ = bitField0_; + result.processedBytes_ = processedBytes_; + result.totalEstimatedBytes_ = totalEstimatedBytes_; + if (infoTypeStatsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + infoTypeStats_ = java.util.Collections.unmodifiableList(infoTypeStats_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.infoTypeStats_ = infoTypeStats_; + } else { + result.infoTypeStats_ = infoTypeStatsBuilder_.build(); + } + if (hybridStatsBuilder_ == null) { + result.hybridStats_ = hybridStats_; + } else { + result.hybridStats_ = hybridStatsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails.Result) { + return mergeFrom((com.google.privacy.dlp.v2.InspectDataSourceDetails.Result)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result other) { + if (other == com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance()) return this; + if (other.getProcessedBytes() != 0L) { + setProcessedBytes(other.getProcessedBytes()); + } + if (other.getTotalEstimatedBytes() != 0L) { + setTotalEstimatedBytes(other.getTotalEstimatedBytes()); + } + if (infoTypeStatsBuilder_ == null) { + if (!other.infoTypeStats_.isEmpty()) { + if (infoTypeStats_.isEmpty()) { + infoTypeStats_ = other.infoTypeStats_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInfoTypeStatsIsMutable(); + infoTypeStats_.addAll(other.infoTypeStats_); + } + onChanged(); + } + } else { + if (!other.infoTypeStats_.isEmpty()) { + if (infoTypeStatsBuilder_.isEmpty()) { + infoTypeStatsBuilder_.dispose(); + infoTypeStatsBuilder_ = null; + infoTypeStats_ = other.infoTypeStats_; + bitField0_ = (bitField0_ & ~0x00000001); + infoTypeStatsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInfoTypeStatsFieldBuilder() : null; + } else { + infoTypeStatsBuilder_.addAllMessages(other.infoTypeStats_); + } + } + } + if (other.hasHybridStats()) { + mergeHybridStats(other.getHybridStats()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectDataSourceDetails.Result) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long processedBytes_ ; + /** + *
+       * Total size in bytes that were processed.
+       * 
+ * + * int64 processed_bytes = 1; + * @return The processedBytes. + */ + @java.lang.Override + public long getProcessedBytes() { + return processedBytes_; + } + /** + *
+       * Total size in bytes that were processed.
+       * 
+ * + * int64 processed_bytes = 1; + * @param value The processedBytes to set. + * @return This builder for chaining. + */ + public Builder setProcessedBytes(long value) { + + processedBytes_ = value; + onChanged(); + return this; + } + /** + *
+       * Total size in bytes that were processed.
+       * 
+ * + * int64 processed_bytes = 1; + * @return This builder for chaining. + */ + public Builder clearProcessedBytes() { + + processedBytes_ = 0L; + onChanged(); + return this; + } + + private long totalEstimatedBytes_ ; + /** + *
+       * Estimate of the number of bytes to process.
+       * 
+ * + * int64 total_estimated_bytes = 2; + * @return The totalEstimatedBytes. + */ + @java.lang.Override + public long getTotalEstimatedBytes() { + return totalEstimatedBytes_; + } + /** + *
+       * Estimate of the number of bytes to process.
+       * 
+ * + * int64 total_estimated_bytes = 2; + * @param value The totalEstimatedBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalEstimatedBytes(long value) { + + totalEstimatedBytes_ = value; + onChanged(); + return this; + } + /** + *
+       * Estimate of the number of bytes to process.
+       * 
+ * + * int64 total_estimated_bytes = 2; + * @return This builder for chaining. + */ + public Builder clearTotalEstimatedBytes() { + + totalEstimatedBytes_ = 0L; + onChanged(); + return this; + } + + private java.util.List infoTypeStats_ = + java.util.Collections.emptyList(); + private void ensureInfoTypeStatsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + infoTypeStats_ = new java.util.ArrayList(infoTypeStats_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeStats, com.google.privacy.dlp.v2.InfoTypeStats.Builder, com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder> infoTypeStatsBuilder_; + + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public java.util.List getInfoTypeStatsList() { + if (infoTypeStatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(infoTypeStats_); + } else { + return infoTypeStatsBuilder_.getMessageList(); + } + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public int getInfoTypeStatsCount() { + if (infoTypeStatsBuilder_ == null) { + return infoTypeStats_.size(); + } else { + return infoTypeStatsBuilder_.getCount(); + } + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public com.google.privacy.dlp.v2.InfoTypeStats getInfoTypeStats(int index) { + if (infoTypeStatsBuilder_ == null) { + return infoTypeStats_.get(index); + } else { + return infoTypeStatsBuilder_.getMessage(index); + } + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public Builder setInfoTypeStats( + int index, com.google.privacy.dlp.v2.InfoTypeStats value) { + if (infoTypeStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypeStatsIsMutable(); + infoTypeStats_.set(index, value); + onChanged(); + } else { + infoTypeStatsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public Builder setInfoTypeStats( + int index, com.google.privacy.dlp.v2.InfoTypeStats.Builder builderForValue) { + if (infoTypeStatsBuilder_ == null) { + ensureInfoTypeStatsIsMutable(); + infoTypeStats_.set(index, builderForValue.build()); + onChanged(); + } else { + infoTypeStatsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public Builder addInfoTypeStats(com.google.privacy.dlp.v2.InfoTypeStats value) { + if (infoTypeStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypeStatsIsMutable(); + infoTypeStats_.add(value); + onChanged(); + } else { + infoTypeStatsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public Builder addInfoTypeStats( + int index, com.google.privacy.dlp.v2.InfoTypeStats value) { + if (infoTypeStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypeStatsIsMutable(); + infoTypeStats_.add(index, value); + onChanged(); + } else { + infoTypeStatsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public Builder addInfoTypeStats( + com.google.privacy.dlp.v2.InfoTypeStats.Builder builderForValue) { + if (infoTypeStatsBuilder_ == null) { + ensureInfoTypeStatsIsMutable(); + infoTypeStats_.add(builderForValue.build()); + onChanged(); + } else { + infoTypeStatsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public Builder addInfoTypeStats( + int index, com.google.privacy.dlp.v2.InfoTypeStats.Builder builderForValue) { + if (infoTypeStatsBuilder_ == null) { + ensureInfoTypeStatsIsMutable(); + infoTypeStats_.add(index, builderForValue.build()); + onChanged(); + } else { + infoTypeStatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public Builder addAllInfoTypeStats( + java.lang.Iterable values) { + if (infoTypeStatsBuilder_ == null) { + ensureInfoTypeStatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, infoTypeStats_); + onChanged(); + } else { + infoTypeStatsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public Builder clearInfoTypeStats() { + if (infoTypeStatsBuilder_ == null) { + infoTypeStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + infoTypeStatsBuilder_.clear(); + } + return this; + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public Builder removeInfoTypeStats(int index) { + if (infoTypeStatsBuilder_ == null) { + ensureInfoTypeStatsIsMutable(); + infoTypeStats_.remove(index); + onChanged(); + } else { + infoTypeStatsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public com.google.privacy.dlp.v2.InfoTypeStats.Builder getInfoTypeStatsBuilder( + int index) { + return getInfoTypeStatsFieldBuilder().getBuilder(index); + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder getInfoTypeStatsOrBuilder( + int index) { + if (infoTypeStatsBuilder_ == null) { + return infoTypeStats_.get(index); } else { + return infoTypeStatsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public java.util.List + getInfoTypeStatsOrBuilderList() { + if (infoTypeStatsBuilder_ != null) { + return infoTypeStatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(infoTypeStats_); + } + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public com.google.privacy.dlp.v2.InfoTypeStats.Builder addInfoTypeStatsBuilder() { + return getInfoTypeStatsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoTypeStats.getDefaultInstance()); + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public com.google.privacy.dlp.v2.InfoTypeStats.Builder addInfoTypeStatsBuilder( + int index) { + return getInfoTypeStatsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoTypeStats.getDefaultInstance()); + } + /** + *
+       * Statistics of how many instances of each info type were found during
+       * inspect job.
+       * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; + */ + public java.util.List + getInfoTypeStatsBuilderList() { + return getInfoTypeStatsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeStats, com.google.privacy.dlp.v2.InfoTypeStats.Builder, com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder> + getInfoTypeStatsFieldBuilder() { + if (infoTypeStatsBuilder_ == null) { + infoTypeStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeStats, com.google.privacy.dlp.v2.InfoTypeStats.Builder, com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder>( + infoTypeStats_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + infoTypeStats_ = null; + } + return infoTypeStatsBuilder_; + } + + private com.google.privacy.dlp.v2.HybridInspectStatistics hybridStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridInspectStatistics, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder, com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder> hybridStatsBuilder_; + /** + *
+       * Statistics related to the processing of hybrid inspect.
+       * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + * @return Whether the hybridStats field is set. + */ + public boolean hasHybridStats() { + return hybridStatsBuilder_ != null || hybridStats_ != null; + } + /** + *
+       * Statistics related to the processing of hybrid inspect.
+       * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + * @return The hybridStats. + */ + public com.google.privacy.dlp.v2.HybridInspectStatistics getHybridStats() { + if (hybridStatsBuilder_ == null) { + return hybridStats_ == null ? com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance() : hybridStats_; + } else { + return hybridStatsBuilder_.getMessage(); + } + } + /** + *
+       * Statistics related to the processing of hybrid inspect.
+       * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + */ + public Builder setHybridStats(com.google.privacy.dlp.v2.HybridInspectStatistics value) { + if (hybridStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hybridStats_ = value; + onChanged(); + } else { + hybridStatsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Statistics related to the processing of hybrid inspect.
+       * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + */ + public Builder setHybridStats( + com.google.privacy.dlp.v2.HybridInspectStatistics.Builder builderForValue) { + if (hybridStatsBuilder_ == null) { + hybridStats_ = builderForValue.build(); + onChanged(); + } else { + hybridStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Statistics related to the processing of hybrid inspect.
+       * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + */ + public Builder mergeHybridStats(com.google.privacy.dlp.v2.HybridInspectStatistics value) { + if (hybridStatsBuilder_ == null) { + if (hybridStats_ != null) { + hybridStats_ = + com.google.privacy.dlp.v2.HybridInspectStatistics.newBuilder(hybridStats_).mergeFrom(value).buildPartial(); + } else { + hybridStats_ = value; + } + onChanged(); + } else { + hybridStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Statistics related to the processing of hybrid inspect.
+       * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + */ + public Builder clearHybridStats() { + if (hybridStatsBuilder_ == null) { + hybridStats_ = null; + onChanged(); + } else { + hybridStats_ = null; + hybridStatsBuilder_ = null; + } + + return this; + } + /** + *
+       * Statistics related to the processing of hybrid inspect.
+       * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + */ + public com.google.privacy.dlp.v2.HybridInspectStatistics.Builder getHybridStatsBuilder() { + + onChanged(); + return getHybridStatsFieldBuilder().getBuilder(); + } + /** + *
+       * Statistics related to the processing of hybrid inspect.
+       * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + */ + public com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder getHybridStatsOrBuilder() { + if (hybridStatsBuilder_ != null) { + return hybridStatsBuilder_.getMessageOrBuilder(); + } else { + return hybridStats_ == null ? + com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance() : hybridStats_; + } + } + /** + *
+       * Statistics related to the processing of hybrid inspect.
+       * 
+ * + * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridInspectStatistics, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder, com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder> + getHybridStatsFieldBuilder() { + if (hybridStatsBuilder_ == null) { + hybridStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridInspectStatistics, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder, com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder>( + getHybridStats(), + getParentForChildren(), + isClean()); + hybridStats_ = null; + } + return hybridStatsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectDataSourceDetails.Result) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectDataSourceDetails.Result) + private static final com.google.privacy.dlp.v2.InspectDataSourceDetails.Result DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectDataSourceDetails.Result(); + } + + public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Result parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Result(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int REQUESTED_OPTIONS_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requestedOptions_; + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + * @return Whether the requestedOptions field is set. + */ + @java.lang.Override + public boolean hasRequestedOptions() { + return requestedOptions_ != null; + } + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + * @return The requestedOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getRequestedOptions() { + return requestedOptions_ == null ? com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance() : requestedOptions_; + } + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder getRequestedOptionsOrBuilder() { + return getRequestedOptions(); + } + + public static final int RESULT_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.InspectDataSourceDetails.Result result_; + /** + *
+   * A summary of the outcome of this inspection job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + * @return Whether the result field is set. + */ + @java.lang.Override + public boolean hasResult() { + return result_ != null; + } + /** + *
+   * A summary of the outcome of this inspection job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + * @return The result. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getResult() { + return result_ == null ? com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance() : result_; + } + /** + *
+   * A summary of the outcome of this inspection job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder getResultOrBuilder() { + return getResult(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (requestedOptions_ != null) { + output.writeMessage(2, getRequestedOptions()); + } + if (result_ != null) { + output.writeMessage(3, getResult()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (requestedOptions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRequestedOptions()); + } + if (result_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getResult()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectDataSourceDetails other = (com.google.privacy.dlp.v2.InspectDataSourceDetails) obj; + + if (hasRequestedOptions() != other.hasRequestedOptions()) return false; + if (hasRequestedOptions()) { + if (!getRequestedOptions() + .equals(other.getRequestedOptions())) return false; + } + if (hasResult() != other.hasResult()) return false; + if (hasResult()) { + if (!getResult() + .equals(other.getResult())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRequestedOptions()) { + hash = (37 * hash) + REQUESTED_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRequestedOptions().hashCode(); + } + if (hasResult()) { + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + getResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectDataSourceDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The results of an inspect DataSource job.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectDataSourceDetails) + com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectDataSourceDetails.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectDataSourceDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (requestedOptionsBuilder_ == null) { + requestedOptions_ = null; + } else { + requestedOptions_ = null; + requestedOptionsBuilder_ = null; + } + if (resultBuilder_ == null) { + result_ = null; + } else { + result_ = null; + resultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails build() { + com.google.privacy.dlp.v2.InspectDataSourceDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails buildPartial() { + com.google.privacy.dlp.v2.InspectDataSourceDetails result = new com.google.privacy.dlp.v2.InspectDataSourceDetails(this); + if (requestedOptionsBuilder_ == null) { + result.requestedOptions_ = requestedOptions_; + } else { + result.requestedOptions_ = requestedOptionsBuilder_.build(); + } + if (resultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = resultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails) { + return mergeFrom((com.google.privacy.dlp.v2.InspectDataSourceDetails)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectDataSourceDetails other) { + if (other == com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance()) return this; + if (other.hasRequestedOptions()) { + mergeRequestedOptions(other.getRequestedOptions()); + } + if (other.hasResult()) { + mergeResult(other.getResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectDataSourceDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectDataSourceDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requestedOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder> requestedOptionsBuilder_; + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + * @return Whether the requestedOptions field is set. + */ + public boolean hasRequestedOptions() { + return requestedOptionsBuilder_ != null || requestedOptions_ != null; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + * @return The requestedOptions. + */ + public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getRequestedOptions() { + if (requestedOptionsBuilder_ == null) { + return requestedOptions_ == null ? com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance() : requestedOptions_; + } else { + return requestedOptionsBuilder_.getMessage(); + } + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + */ + public Builder setRequestedOptions(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions value) { + if (requestedOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestedOptions_ = value; + onChanged(); + } else { + requestedOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + */ + public Builder setRequestedOptions( + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder builderForValue) { + if (requestedOptionsBuilder_ == null) { + requestedOptions_ = builderForValue.build(); + onChanged(); + } else { + requestedOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + */ + public Builder mergeRequestedOptions(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions value) { + if (requestedOptionsBuilder_ == null) { + if (requestedOptions_ != null) { + requestedOptions_ = + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.newBuilder(requestedOptions_).mergeFrom(value).buildPartial(); + } else { + requestedOptions_ = value; + } + onChanged(); + } else { + requestedOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + */ + public Builder clearRequestedOptions() { + if (requestedOptionsBuilder_ == null) { + requestedOptions_ = null; + onChanged(); + } else { + requestedOptions_ = null; + requestedOptionsBuilder_ = null; + } + + return this; + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + */ + public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder getRequestedOptionsBuilder() { + + onChanged(); + return getRequestedOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + */ + public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder getRequestedOptionsOrBuilder() { + if (requestedOptionsBuilder_ != null) { + return requestedOptionsBuilder_.getMessageOrBuilder(); + } else { + return requestedOptions_ == null ? + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance() : requestedOptions_; + } + } + /** + *
+     * The configuration used for this job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder> + getRequestedOptionsFieldBuilder() { + if (requestedOptionsBuilder_ == null) { + requestedOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder>( + getRequestedOptions(), + getParentForChildren(), + isClean()); + requestedOptions_ = null; + } + return requestedOptionsBuilder_; + } + + private com.google.privacy.dlp.v2.InspectDataSourceDetails.Result result_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder> resultBuilder_; + /** + *
+     * A summary of the outcome of this inspection job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + * @return Whether the result field is set. + */ + public boolean hasResult() { + return resultBuilder_ != null || result_ != null; + } + /** + *
+     * A summary of the outcome of this inspection job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + * @return The result. + */ + public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getResult() { + if (resultBuilder_ == null) { + return result_ == null ? com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance() : result_; + } else { + return resultBuilder_.getMessage(); + } + } + /** + *
+     * A summary of the outcome of this inspection job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + */ + public Builder setResult(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result value) { + if (resultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + resultBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A summary of the outcome of this inspection job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + */ + public Builder setResult( + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder builderForValue) { + if (resultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + resultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A summary of the outcome of this inspection job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + */ + public Builder mergeResult(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result value) { + if (resultBuilder_ == null) { + if (result_ != null) { + result_ = + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.newBuilder(result_).mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + resultBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A summary of the outcome of this inspection job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + */ + public Builder clearResult() { + if (resultBuilder_ == null) { + result_ = null; + onChanged(); + } else { + result_ = null; + resultBuilder_ = null; + } + + return this; + } + /** + *
+     * A summary of the outcome of this inspection job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + */ + public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder getResultBuilder() { + + onChanged(); + return getResultFieldBuilder().getBuilder(); + } + /** + *
+     * A summary of the outcome of this inspection job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + */ + public com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder getResultOrBuilder() { + if (resultBuilder_ != null) { + return resultBuilder_.getMessageOrBuilder(); + } else { + return result_ == null ? + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance() : result_; + } + } + /** + *
+     * A summary of the outcome of this inspection job.
+     * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder> + getResultFieldBuilder() { + if (resultBuilder_ == null) { + resultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder>( + getResult(), + getParentForChildren(), + isClean()); + result_ = null; + } + return resultBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectDataSourceDetails) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectDataSourceDetails) + private static final com.google.privacy.dlp.v2.InspectDataSourceDetails DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectDataSourceDetails(); + } + + public static com.google.privacy.dlp.v2.InspectDataSourceDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InspectDataSourceDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InspectDataSourceDetails(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectDataSourceDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetailsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetailsOrBuilder.java new file mode 100644 index 000000000000..ace7119dab8a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetailsOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InspectDataSourceDetailsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectDataSourceDetails) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + * @return Whether the requestedOptions field is set. + */ + boolean hasRequestedOptions(); + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + * @return The requestedOptions. + */ + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getRequestedOptions(); + /** + *
+   * The configuration used for this job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; + */ + com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder getRequestedOptionsOrBuilder(); + + /** + *
+   * A summary of the outcome of this inspection job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + * @return Whether the result field is set. + */ + boolean hasResult(); + /** + *
+   * A summary of the outcome of this inspection job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + * @return The result. + */ + com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getResult(); + /** + *
+   * A summary of the outcome of this inspection job.
+   * 
+ * + * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; + */ + com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder getResultOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfig.java new file mode 100644 index 000000000000..c20c208072ad --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfig.java @@ -0,0 +1,1524 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Controls what and how to inspect for findings.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectJobConfig} + */ +public final class InspectJobConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectJobConfig) + InspectJobConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use InspectJobConfig.newBuilder() to construct. + private InspectJobConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InspectJobConfig() { + inspectTemplateName_ = ""; + actions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InspectJobConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InspectJobConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.StorageConfig.Builder subBuilder = null; + if (storageConfig_ != null) { + subBuilder = storageConfig_.toBuilder(); + } + storageConfig_ = input.readMessage(com.google.privacy.dlp.v2.StorageConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(storageConfig_); + storageConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; + if (inspectConfig_ != null) { + subBuilder = inspectConfig_.toBuilder(); + } + inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectConfig_); + inspectConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + inspectTemplateName_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + actions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + actions_.add( + input.readMessage(com.google.privacy.dlp.v2.Action.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectJobConfig.class, com.google.privacy.dlp.v2.InspectJobConfig.Builder.class); + } + + public static final int STORAGE_CONFIG_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.StorageConfig storageConfig_; + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + * @return Whether the storageConfig field is set. + */ + @java.lang.Override + public boolean hasStorageConfig() { + return storageConfig_ != null; + } + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + * @return The storageConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig getStorageConfig() { + return storageConfig_ == null ? com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance() : storageConfig_; + } + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfigOrBuilder getStorageConfigOrBuilder() { + return getStorageConfig(); + } + + public static final int INSPECT_CONFIG_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + /** + *
+   * How and what to scan for.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + @java.lang.Override + public boolean hasInspectConfig() { + return inspectConfig_ != null; + } + /** + *
+   * How and what to scan for.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + /** + *
+   * How and what to scan for.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + return getInspectConfig(); + } + + public static final int INSPECT_TEMPLATE_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object inspectTemplateName_; + /** + *
+   * If provided, will be used as the default for all values in InspectConfig.
+   * `inspect_config` will be merged into the values persisted as part of the
+   * template.
+   * 
+ * + * string inspect_template_name = 3; + * @return The inspectTemplateName. + */ + @java.lang.Override + public java.lang.String getInspectTemplateName() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inspectTemplateName_ = s; + return s; + } + } + /** + *
+   * If provided, will be used as the default for all values in InspectConfig.
+   * `inspect_config` will be merged into the values persisted as part of the
+   * template.
+   * 
+ * + * string inspect_template_name = 3; + * @return The bytes for inspectTemplateName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInspectTemplateNameBytes() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + inspectTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIONS_FIELD_NUMBER = 4; + private java.util.List actions_; + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action getActions(int index) { + return actions_.get(index); + } + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (storageConfig_ != null) { + output.writeMessage(1, getStorageConfig()); + } + if (inspectConfig_ != null) { + output.writeMessage(2, getInspectConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, inspectTemplateName_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(4, actions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (storageConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStorageConfig()); + } + if (inspectConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInspectConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, inspectTemplateName_); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, actions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectJobConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectJobConfig other = (com.google.privacy.dlp.v2.InspectJobConfig) obj; + + if (hasStorageConfig() != other.hasStorageConfig()) return false; + if (hasStorageConfig()) { + if (!getStorageConfig() + .equals(other.getStorageConfig())) return false; + } + if (hasInspectConfig() != other.hasInspectConfig()) return false; + if (hasInspectConfig()) { + if (!getInspectConfig() + .equals(other.getInspectConfig())) return false; + } + if (!getInspectTemplateName() + .equals(other.getInspectTemplateName())) return false; + if (!getActionsList() + .equals(other.getActionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStorageConfig()) { + hash = (37 * hash) + STORAGE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getStorageConfig().hashCode(); + } + if (hasInspectConfig()) { + hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInspectConfig().hashCode(); + } + hash = (37 * hash) + INSPECT_TEMPLATE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getInspectTemplateName().hashCode(); + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectJobConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Controls what and how to inspect for findings.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectJobConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectJobConfig) + com.google.privacy.dlp.v2.InspectJobConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectJobConfig.class, com.google.privacy.dlp.v2.InspectJobConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectJobConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getActionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (storageConfigBuilder_ == null) { + storageConfig_ = null; + } else { + storageConfig_ = null; + storageConfigBuilder_ = null; + } + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + inspectTemplateName_ = ""; + + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + actionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfig build() { + com.google.privacy.dlp.v2.InspectJobConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfig buildPartial() { + com.google.privacy.dlp.v2.InspectJobConfig result = new com.google.privacy.dlp.v2.InspectJobConfig(this); + int from_bitField0_ = bitField0_; + if (storageConfigBuilder_ == null) { + result.storageConfig_ = storageConfig_; + } else { + result.storageConfig_ = storageConfigBuilder_.build(); + } + if (inspectConfigBuilder_ == null) { + result.inspectConfig_ = inspectConfig_; + } else { + result.inspectConfig_ = inspectConfigBuilder_.build(); + } + result.inspectTemplateName_ = inspectTemplateName_; + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectJobConfig) { + return mergeFrom((com.google.privacy.dlp.v2.InspectJobConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectJobConfig other) { + if (other == com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance()) return this; + if (other.hasStorageConfig()) { + mergeStorageConfig(other.getStorageConfig()); + } + if (other.hasInspectConfig()) { + mergeInspectConfig(other.getInspectConfig()); + } + if (!other.getInspectTemplateName().isEmpty()) { + inspectTemplateName_ = other.inspectTemplateName_; + onChanged(); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000001); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getActionsFieldBuilder() : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectJobConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectJobConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.StorageConfig storageConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StorageConfig, com.google.privacy.dlp.v2.StorageConfig.Builder, com.google.privacy.dlp.v2.StorageConfigOrBuilder> storageConfigBuilder_; + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + * @return Whether the storageConfig field is set. + */ + public boolean hasStorageConfig() { + return storageConfigBuilder_ != null || storageConfig_ != null; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + * @return The storageConfig. + */ + public com.google.privacy.dlp.v2.StorageConfig getStorageConfig() { + if (storageConfigBuilder_ == null) { + return storageConfig_ == null ? com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance() : storageConfig_; + } else { + return storageConfigBuilder_.getMessage(); + } + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + */ + public Builder setStorageConfig(com.google.privacy.dlp.v2.StorageConfig value) { + if (storageConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + storageConfig_ = value; + onChanged(); + } else { + storageConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + */ + public Builder setStorageConfig( + com.google.privacy.dlp.v2.StorageConfig.Builder builderForValue) { + if (storageConfigBuilder_ == null) { + storageConfig_ = builderForValue.build(); + onChanged(); + } else { + storageConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + */ + public Builder mergeStorageConfig(com.google.privacy.dlp.v2.StorageConfig value) { + if (storageConfigBuilder_ == null) { + if (storageConfig_ != null) { + storageConfig_ = + com.google.privacy.dlp.v2.StorageConfig.newBuilder(storageConfig_).mergeFrom(value).buildPartial(); + } else { + storageConfig_ = value; + } + onChanged(); + } else { + storageConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + */ + public Builder clearStorageConfig() { + if (storageConfigBuilder_ == null) { + storageConfig_ = null; + onChanged(); + } else { + storageConfig_ = null; + storageConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + */ + public com.google.privacy.dlp.v2.StorageConfig.Builder getStorageConfigBuilder() { + + onChanged(); + return getStorageConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + */ + public com.google.privacy.dlp.v2.StorageConfigOrBuilder getStorageConfigOrBuilder() { + if (storageConfigBuilder_ != null) { + return storageConfigBuilder_.getMessageOrBuilder(); + } else { + return storageConfig_ == null ? + com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance() : storageConfig_; + } + } + /** + *
+     * The data to scan.
+     * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StorageConfig, com.google.privacy.dlp.v2.StorageConfig.Builder, com.google.privacy.dlp.v2.StorageConfigOrBuilder> + getStorageConfigFieldBuilder() { + if (storageConfigBuilder_ == null) { + storageConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StorageConfig, com.google.privacy.dlp.v2.StorageConfig.Builder, com.google.privacy.dlp.v2.StorageConfigOrBuilder>( + getStorageConfig(), + getParentForChildren(), + isClean()); + storageConfig_ = null; + } + return storageConfigBuilder_; + } + + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; + /** + *
+     * How and what to scan for.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + public boolean hasInspectConfig() { + return inspectConfigBuilder_ != null || inspectConfig_ != null; + } + /** + *
+     * How and what to scan for.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + if (inspectConfigBuilder_ == null) { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } else { + return inspectConfigBuilder_.getMessage(); + } + } + /** + *
+     * How and what to scan for.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectConfig_ = value; + onChanged(); + } else { + inspectConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * How and what to scan for.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder setInspectConfig( + com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = builderForValue.build(); + onChanged(); + } else { + inspectConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * How and what to scan for.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (inspectConfig_ != null) { + inspectConfig_ = + com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); + } else { + inspectConfig_ = value; + } + onChanged(); + } else { + inspectConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * How and what to scan for.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder clearInspectConfig() { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + onChanged(); + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * How and what to scan for.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { + + onChanged(); + return getInspectConfigFieldBuilder().getBuilder(); + } + /** + *
+     * How and what to scan for.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + if (inspectConfigBuilder_ != null) { + return inspectConfigBuilder_.getMessageOrBuilder(); + } else { + return inspectConfig_ == null ? + com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + } + /** + *
+     * How and what to scan for.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> + getInspectConfigFieldBuilder() { + if (inspectConfigBuilder_ == null) { + inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( + getInspectConfig(), + getParentForChildren(), + isClean()); + inspectConfig_ = null; + } + return inspectConfigBuilder_; + } + + private java.lang.Object inspectTemplateName_ = ""; + /** + *
+     * If provided, will be used as the default for all values in InspectConfig.
+     * `inspect_config` will be merged into the values persisted as part of the
+     * template.
+     * 
+ * + * string inspect_template_name = 3; + * @return The inspectTemplateName. + */ + public java.lang.String getInspectTemplateName() { + java.lang.Object ref = inspectTemplateName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inspectTemplateName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If provided, will be used as the default for all values in InspectConfig.
+     * `inspect_config` will be merged into the values persisted as part of the
+     * template.
+     * 
+ * + * string inspect_template_name = 3; + * @return The bytes for inspectTemplateName. + */ + public com.google.protobuf.ByteString + getInspectTemplateNameBytes() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + inspectTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If provided, will be used as the default for all values in InspectConfig.
+     * `inspect_config` will be merged into the values persisted as part of the
+     * template.
+     * 
+ * + * string inspect_template_name = 3; + * @param value The inspectTemplateName to set. + * @return This builder for chaining. + */ + public Builder setInspectTemplateName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inspectTemplateName_ = value; + onChanged(); + return this; + } + /** + *
+     * If provided, will be used as the default for all values in InspectConfig.
+     * `inspect_config` will be merged into the values persisted as part of the
+     * template.
+     * 
+ * + * string inspect_template_name = 3; + * @return This builder for chaining. + */ + public Builder clearInspectTemplateName() { + + inspectTemplateName_ = getDefaultInstance().getInspectTemplateName(); + onChanged(); + return this; + } + /** + *
+     * If provided, will be used as the default for all values in InspectConfig.
+     * `inspect_config` will be merged into the values persisted as part of the
+     * template.
+     * 
+ * + * string inspect_template_name = 3; + * @param value The bytes for inspectTemplateName to set. + * @return This builder for chaining. + */ + public Builder setInspectTemplateNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inspectTemplateName_ = value; + onChanged(); + return this; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder> actionsBuilder_; + + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public com.google.privacy.dlp.v2.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public Builder setActions( + int index, com.google.privacy.dlp.v2.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public Builder setActions( + int index, com.google.privacy.dlp.v2.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public Builder addActions(com.google.privacy.dlp.v2.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public Builder addActions( + int index, com.google.privacy.dlp.v2.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public Builder addActions( + com.google.privacy.dlp.v2.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public Builder addActions( + int index, com.google.privacy.dlp.v2.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public com.google.privacy.dlp.v2.Action.Builder getActionsBuilder( + int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( + int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public com.google.privacy.dlp.v2.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Action.getDefaultInstance()); + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public com.google.privacy.dlp.v2.Action.Builder addActionsBuilder( + int index) { + return getActionsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Action.getDefaultInstance()); + } + /** + *
+     * Actions to execute at the completion of the job.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder>( + actions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + actions_ = null; + } + return actionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectJobConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectJobConfig) + private static final com.google.privacy.dlp.v2.InspectJobConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectJobConfig(); + } + + public static com.google.privacy.dlp.v2.InspectJobConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InspectJobConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InspectJobConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfigOrBuilder.java new file mode 100644 index 000000000000..00a4054b9f06 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfigOrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InspectJobConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectJobConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + * @return Whether the storageConfig field is set. + */ + boolean hasStorageConfig(); + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + * @return The storageConfig. + */ + com.google.privacy.dlp.v2.StorageConfig getStorageConfig(); + /** + *
+   * The data to scan.
+   * 
+ * + * .google.privacy.dlp.v2.StorageConfig storage_config = 1; + */ + com.google.privacy.dlp.v2.StorageConfigOrBuilder getStorageConfigOrBuilder(); + + /** + *
+   * How and what to scan for.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + boolean hasInspectConfig(); + /** + *
+   * How and what to scan for.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); + /** + *
+   * How and what to scan for.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); + + /** + *
+   * If provided, will be used as the default for all values in InspectConfig.
+   * `inspect_config` will be merged into the values persisted as part of the
+   * template.
+   * 
+ * + * string inspect_template_name = 3; + * @return The inspectTemplateName. + */ + java.lang.String getInspectTemplateName(); + /** + *
+   * If provided, will be used as the default for all values in InspectConfig.
+   * `inspect_config` will be merged into the values persisted as part of the
+   * template.
+   * 
+ * + * string inspect_template_name = 3; + * @return The bytes for inspectTemplateName. + */ + com.google.protobuf.ByteString + getInspectTemplateNameBytes(); + + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + java.util.List + getActionsList(); + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + com.google.privacy.dlp.v2.Action getActions(int index); + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + int getActionsCount(); + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + java.util.List + getActionsOrBuilderList(); + /** + *
+   * Actions to execute at the completion of the job.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 4; + */ + com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResult.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResult.java new file mode 100644 index 000000000000..14f25ff55ea5 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResult.java @@ -0,0 +1,973 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * All the findings for a single scanned item.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectResult} + */ +public final class InspectResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectResult) + InspectResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use InspectResult.newBuilder() to construct. + private InspectResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InspectResult() { + findings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InspectResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InspectResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + findings_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + findings_.add( + input.readMessage(com.google.privacy.dlp.v2.Finding.parser(), extensionRegistry)); + break; + } + case 16: { + + findingsTruncated_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + findings_ = java.util.Collections.unmodifiableList(findings_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectResult.class, com.google.privacy.dlp.v2.InspectResult.Builder.class); + } + + public static final int FINDINGS_FIELD_NUMBER = 1; + private java.util.List findings_; + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + @java.lang.Override + public java.util.List getFindingsList() { + return findings_; + } + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + @java.lang.Override + public java.util.List + getFindingsOrBuilderList() { + return findings_; + } + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + @java.lang.Override + public int getFindingsCount() { + return findings_.size(); + } + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Finding getFindings(int index) { + return findings_.get(index); + } + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FindingOrBuilder getFindingsOrBuilder( + int index) { + return findings_.get(index); + } + + public static final int FINDINGS_TRUNCATED_FIELD_NUMBER = 2; + private boolean findingsTruncated_; + /** + *
+   * If true, then this item might have more findings than were returned,
+   * and the findings returned are an arbitrary subset of all findings.
+   * The findings list might be truncated because the input items were too
+   * large, or because the server reached the maximum amount of resources
+   * allowed for a single API call. For best results, divide the input into
+   * smaller batches.
+   * 
+ * + * bool findings_truncated = 2; + * @return The findingsTruncated. + */ + @java.lang.Override + public boolean getFindingsTruncated() { + return findingsTruncated_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < findings_.size(); i++) { + output.writeMessage(1, findings_.get(i)); + } + if (findingsTruncated_ != false) { + output.writeBool(2, findingsTruncated_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < findings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, findings_.get(i)); + } + if (findingsTruncated_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, findingsTruncated_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectResult)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectResult other = (com.google.privacy.dlp.v2.InspectResult) obj; + + if (!getFindingsList() + .equals(other.getFindingsList())) return false; + if (getFindingsTruncated() + != other.getFindingsTruncated()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFindingsCount() > 0) { + hash = (37 * hash) + FINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getFindingsList().hashCode(); + } + hash = (37 * hash) + FINDINGS_TRUNCATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFindingsTruncated()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * All the findings for a single scanned item.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectResult) + com.google.privacy.dlp.v2.InspectResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectResult.class, com.google.privacy.dlp.v2.InspectResult.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFindingsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (findingsBuilder_ == null) { + findings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + findingsBuilder_.clear(); + } + findingsTruncated_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectResult getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectResult build() { + com.google.privacy.dlp.v2.InspectResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectResult buildPartial() { + com.google.privacy.dlp.v2.InspectResult result = new com.google.privacy.dlp.v2.InspectResult(this); + int from_bitField0_ = bitField0_; + if (findingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + findings_ = java.util.Collections.unmodifiableList(findings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.findings_ = findings_; + } else { + result.findings_ = findingsBuilder_.build(); + } + result.findingsTruncated_ = findingsTruncated_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectResult) { + return mergeFrom((com.google.privacy.dlp.v2.InspectResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectResult other) { + if (other == com.google.privacy.dlp.v2.InspectResult.getDefaultInstance()) return this; + if (findingsBuilder_ == null) { + if (!other.findings_.isEmpty()) { + if (findings_.isEmpty()) { + findings_ = other.findings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFindingsIsMutable(); + findings_.addAll(other.findings_); + } + onChanged(); + } + } else { + if (!other.findings_.isEmpty()) { + if (findingsBuilder_.isEmpty()) { + findingsBuilder_.dispose(); + findingsBuilder_ = null; + findings_ = other.findings_; + bitField0_ = (bitField0_ & ~0x00000001); + findingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFindingsFieldBuilder() : null; + } else { + findingsBuilder_.addAllMessages(other.findings_); + } + } + } + if (other.getFindingsTruncated() != false) { + setFindingsTruncated(other.getFindingsTruncated()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List findings_ = + java.util.Collections.emptyList(); + private void ensureFindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + findings_ = new java.util.ArrayList(findings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Finding, com.google.privacy.dlp.v2.Finding.Builder, com.google.privacy.dlp.v2.FindingOrBuilder> findingsBuilder_; + + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public java.util.List getFindingsList() { + if (findingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(findings_); + } else { + return findingsBuilder_.getMessageList(); + } + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public int getFindingsCount() { + if (findingsBuilder_ == null) { + return findings_.size(); + } else { + return findingsBuilder_.getCount(); + } + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public com.google.privacy.dlp.v2.Finding getFindings(int index) { + if (findingsBuilder_ == null) { + return findings_.get(index); + } else { + return findingsBuilder_.getMessage(index); + } + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public Builder setFindings( + int index, com.google.privacy.dlp.v2.Finding value) { + if (findingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFindingsIsMutable(); + findings_.set(index, value); + onChanged(); + } else { + findingsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public Builder setFindings( + int index, com.google.privacy.dlp.v2.Finding.Builder builderForValue) { + if (findingsBuilder_ == null) { + ensureFindingsIsMutable(); + findings_.set(index, builderForValue.build()); + onChanged(); + } else { + findingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public Builder addFindings(com.google.privacy.dlp.v2.Finding value) { + if (findingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFindingsIsMutable(); + findings_.add(value); + onChanged(); + } else { + findingsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public Builder addFindings( + int index, com.google.privacy.dlp.v2.Finding value) { + if (findingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFindingsIsMutable(); + findings_.add(index, value); + onChanged(); + } else { + findingsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public Builder addFindings( + com.google.privacy.dlp.v2.Finding.Builder builderForValue) { + if (findingsBuilder_ == null) { + ensureFindingsIsMutable(); + findings_.add(builderForValue.build()); + onChanged(); + } else { + findingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public Builder addFindings( + int index, com.google.privacy.dlp.v2.Finding.Builder builderForValue) { + if (findingsBuilder_ == null) { + ensureFindingsIsMutable(); + findings_.add(index, builderForValue.build()); + onChanged(); + } else { + findingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public Builder addAllFindings( + java.lang.Iterable values) { + if (findingsBuilder_ == null) { + ensureFindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, findings_); + onChanged(); + } else { + findingsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public Builder clearFindings() { + if (findingsBuilder_ == null) { + findings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + findingsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public Builder removeFindings(int index) { + if (findingsBuilder_ == null) { + ensureFindingsIsMutable(); + findings_.remove(index); + onChanged(); + } else { + findingsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public com.google.privacy.dlp.v2.Finding.Builder getFindingsBuilder( + int index) { + return getFindingsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public com.google.privacy.dlp.v2.FindingOrBuilder getFindingsOrBuilder( + int index) { + if (findingsBuilder_ == null) { + return findings_.get(index); } else { + return findingsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public java.util.List + getFindingsOrBuilderList() { + if (findingsBuilder_ != null) { + return findingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(findings_); + } + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public com.google.privacy.dlp.v2.Finding.Builder addFindingsBuilder() { + return getFindingsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Finding.getDefaultInstance()); + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public com.google.privacy.dlp.v2.Finding.Builder addFindingsBuilder( + int index) { + return getFindingsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Finding.getDefaultInstance()); + } + /** + *
+     * List of findings for an item.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + public java.util.List + getFindingsBuilderList() { + return getFindingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Finding, com.google.privacy.dlp.v2.Finding.Builder, com.google.privacy.dlp.v2.FindingOrBuilder> + getFindingsFieldBuilder() { + if (findingsBuilder_ == null) { + findingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Finding, com.google.privacy.dlp.v2.Finding.Builder, com.google.privacy.dlp.v2.FindingOrBuilder>( + findings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + findings_ = null; + } + return findingsBuilder_; + } + + private boolean findingsTruncated_ ; + /** + *
+     * If true, then this item might have more findings than were returned,
+     * and the findings returned are an arbitrary subset of all findings.
+     * The findings list might be truncated because the input items were too
+     * large, or because the server reached the maximum amount of resources
+     * allowed for a single API call. For best results, divide the input into
+     * smaller batches.
+     * 
+ * + * bool findings_truncated = 2; + * @return The findingsTruncated. + */ + @java.lang.Override + public boolean getFindingsTruncated() { + return findingsTruncated_; + } + /** + *
+     * If true, then this item might have more findings than were returned,
+     * and the findings returned are an arbitrary subset of all findings.
+     * The findings list might be truncated because the input items were too
+     * large, or because the server reached the maximum amount of resources
+     * allowed for a single API call. For best results, divide the input into
+     * smaller batches.
+     * 
+ * + * bool findings_truncated = 2; + * @param value The findingsTruncated to set. + * @return This builder for chaining. + */ + public Builder setFindingsTruncated(boolean value) { + + findingsTruncated_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, then this item might have more findings than were returned,
+     * and the findings returned are an arbitrary subset of all findings.
+     * The findings list might be truncated because the input items were too
+     * large, or because the server reached the maximum amount of resources
+     * allowed for a single API call. For best results, divide the input into
+     * smaller batches.
+     * 
+ * + * bool findings_truncated = 2; + * @return This builder for chaining. + */ + public Builder clearFindingsTruncated() { + + findingsTruncated_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectResult) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectResult) + private static final com.google.privacy.dlp.v2.InspectResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectResult(); + } + + public static com.google.privacy.dlp.v2.InspectResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InspectResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InspectResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResultOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResultOrBuilder.java new file mode 100644 index 000000000000..0bd251f5406f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResultOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InspectResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + java.util.List + getFindingsList(); + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + com.google.privacy.dlp.v2.Finding getFindings(int index); + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + int getFindingsCount(); + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + java.util.List + getFindingsOrBuilderList(); + /** + *
+   * List of findings for an item.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Finding findings = 1; + */ + com.google.privacy.dlp.v2.FindingOrBuilder getFindingsOrBuilder( + int index); + + /** + *
+   * If true, then this item might have more findings than were returned,
+   * and the findings returned are an arbitrary subset of all findings.
+   * The findings list might be truncated because the input items were too
+   * large, or because the server reached the maximum amount of resources
+   * allowed for a single API call. For best results, divide the input into
+   * smaller batches.
+   * 
+ * + * bool findings_truncated = 2; + * @return The findingsTruncated. + */ + boolean getFindingsTruncated(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java new file mode 100644 index 000000000000..d4d910419fca --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java @@ -0,0 +1,1662 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The inspectTemplate contains a configuration (set of types of sensitive data
+ * to be detected) to be used anywhere you otherwise would normally specify
+ * InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
+ * to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectTemplate} + */ +public final class InspectTemplate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectTemplate) + InspectTemplateOrBuilder { +private static final long serialVersionUID = 0L; + // Use InspectTemplate.newBuilder() to construct. + private InspectTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InspectTemplate() { + name_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InspectTemplate(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InspectTemplate( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; + if (inspectConfig_ != null) { + subBuilder = inspectConfig_.toBuilder(); + } + inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectConfig_); + inspectConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectTemplate.class, com.google.privacy.dlp.v2.InspectTemplate.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Output only. The template name.
+   * The template will have one of the following formats:
+   * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+   * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Output only. The template name.
+   * The template will have one of the following formats:
+   * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+   * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * Display name (max 256 chars).
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * Display name (max 256 chars).
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * Short description (max 256 chars).
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Short description (max 256 chars).
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int INSPECT_CONFIG_FIELD_NUMBER = 6; + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + /** + *
+   * The core content of the template. Configuration of the scanning process.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + * @return Whether the inspectConfig field is set. + */ + @java.lang.Override + public boolean hasInspectConfig() { + return inspectConfig_ != null; + } + /** + *
+   * The core content of the template. Configuration of the scanning process.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + * @return The inspectConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + /** + *
+   * The core content of the template. Configuration of the scanning process.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + return getInspectConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (inspectConfig_ != null) { + output.writeMessage(6, getInspectConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getUpdateTime()); + } + if (inspectConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getInspectConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectTemplate)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectTemplate other = (com.google.privacy.dlp.v2.InspectTemplate) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasInspectConfig() != other.hasInspectConfig()) return false; + if (hasInspectConfig()) { + if (!getInspectConfig() + .equals(other.getInspectConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasInspectConfig()) { + hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInspectConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectTemplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The inspectTemplate contains a configuration (set of types of sensitive data
+   * to be detected) to be used anywhere you otherwise would normally specify
+   * InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
+   * to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectTemplate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectTemplate) + com.google.privacy.dlp.v2.InspectTemplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectTemplate.class, com.google.privacy.dlp.v2.InspectTemplate.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectTemplate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplate getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplate build() { + com.google.privacy.dlp.v2.InspectTemplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplate buildPartial() { + com.google.privacy.dlp.v2.InspectTemplate result = new com.google.privacy.dlp.v2.InspectTemplate(this); + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (inspectConfigBuilder_ == null) { + result.inspectConfig_ = inspectConfig_; + } else { + result.inspectConfig_ = inspectConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectTemplate) { + return mergeFrom((com.google.privacy.dlp.v2.InspectTemplate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectTemplate other) { + if (other == com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasInspectConfig()) { + mergeInspectConfig(other.getInspectConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectTemplate parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectTemplate) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Output only. The template name.
+     * The template will have one of the following formats:
+     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * Display name (max 256 chars).
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Short description (max 256 chars).
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The creation timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The last update timestamp of an inspectTemplate.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; + /** + *
+     * The core content of the template. Configuration of the scanning process.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + * @return Whether the inspectConfig field is set. + */ + public boolean hasInspectConfig() { + return inspectConfigBuilder_ != null || inspectConfig_ != null; + } + /** + *
+     * The core content of the template. Configuration of the scanning process.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + * @return The inspectConfig. + */ + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + if (inspectConfigBuilder_ == null) { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } else { + return inspectConfigBuilder_.getMessage(); + } + } + /** + *
+     * The core content of the template. Configuration of the scanning process.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + */ + public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectConfig_ = value; + onChanged(); + } else { + inspectConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The core content of the template. Configuration of the scanning process.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + */ + public Builder setInspectConfig( + com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = builderForValue.build(); + onChanged(); + } else { + inspectConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The core content of the template. Configuration of the scanning process.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + */ + public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (inspectConfig_ != null) { + inspectConfig_ = + com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); + } else { + inspectConfig_ = value; + } + onChanged(); + } else { + inspectConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The core content of the template. Configuration of the scanning process.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + */ + public Builder clearInspectConfig() { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + onChanged(); + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * The core content of the template. Configuration of the scanning process.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + */ + public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { + + onChanged(); + return getInspectConfigFieldBuilder().getBuilder(); + } + /** + *
+     * The core content of the template. Configuration of the scanning process.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + */ + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + if (inspectConfigBuilder_ != null) { + return inspectConfigBuilder_.getMessageOrBuilder(); + } else { + return inspectConfig_ == null ? + com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + } + /** + *
+     * The core content of the template. Configuration of the scanning process.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> + getInspectConfigFieldBuilder() { + if (inspectConfigBuilder_ == null) { + inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( + getInspectConfig(), + getParentForChildren(), + isClean()); + inspectConfig_ = null; + } + return inspectConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectTemplate) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectTemplate) + private static final com.google.privacy.dlp.v2.InspectTemplate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectTemplate(); + } + + public static com.google.privacy.dlp.v2.InspectTemplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InspectTemplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InspectTemplate(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateName.java new file mode 100644 index 000000000000..0a062e2b0992 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateName.java @@ -0,0 +1,496 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InspectTemplateName implements ResourceName { + private static final PathTemplate ORGANIZATION_INSPECT_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/inspectTemplates/{inspect_template}"); + private static final PathTemplate PROJECT_INSPECT_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/inspectTemplates/{inspect_template}"); + private static final PathTemplate ORGANIZATION_LOCATION_INSPECT_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}"); + private static final PathTemplate PROJECT_LOCATION_INSPECT_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String organization; + private final String inspectTemplate; + private final String project; + private final String location; + + @Deprecated + protected InspectTemplateName() { + organization = null; + inspectTemplate = null; + project = null; + location = null; + } + + private InspectTemplateName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + inspectTemplate = Preconditions.checkNotNull(builder.getInspectTemplate()); + project = null; + location = null; + pathTemplate = ORGANIZATION_INSPECT_TEMPLATE; + } + + private InspectTemplateName(ProjectInspectTemplateBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + inspectTemplate = Preconditions.checkNotNull(builder.getInspectTemplate()); + organization = null; + location = null; + pathTemplate = PROJECT_INSPECT_TEMPLATE; + } + + private InspectTemplateName(OrganizationLocationInspectTemplateBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + inspectTemplate = Preconditions.checkNotNull(builder.getInspectTemplate()); + project = null; + pathTemplate = ORGANIZATION_LOCATION_INSPECT_TEMPLATE; + } + + private InspectTemplateName(ProjectLocationInspectTemplateBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + inspectTemplate = Preconditions.checkNotNull(builder.getInspectTemplate()); + organization = null; + pathTemplate = PROJECT_LOCATION_INSPECT_TEMPLATE; + } + + public String getOrganization() { + return organization; + } + + public String getInspectTemplate() { + return inspectTemplate; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newOrganizationInspectTemplateBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectInspectTemplateBuilder newProjectInspectTemplateBuilder() { + return new ProjectInspectTemplateBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationLocationInspectTemplateBuilder + newOrganizationLocationInspectTemplateBuilder() { + return new OrganizationLocationInspectTemplateBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationInspectTemplateBuilder newProjectLocationInspectTemplateBuilder() { + return new ProjectLocationInspectTemplateBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InspectTemplateName of(String organization, String inspectTemplate) { + return newBuilder().setOrganization(organization).setInspectTemplate(inspectTemplate).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static InspectTemplateName ofOrganizationInspectTemplateName( + String organization, String inspectTemplate) { + return newBuilder().setOrganization(organization).setInspectTemplate(inspectTemplate).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static InspectTemplateName ofProjectInspectTemplateName( + String project, String inspectTemplate) { + return newProjectInspectTemplateBuilder() + .setProject(project) + .setInspectTemplate(inspectTemplate) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static InspectTemplateName ofOrganizationLocationInspectTemplateName( + String organization, String location, String inspectTemplate) { + return newOrganizationLocationInspectTemplateBuilder() + .setOrganization(organization) + .setLocation(location) + .setInspectTemplate(inspectTemplate) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static InspectTemplateName ofProjectLocationInspectTemplateName( + String project, String location, String inspectTemplate) { + return newProjectLocationInspectTemplateBuilder() + .setProject(project) + .setLocation(location) + .setInspectTemplate(inspectTemplate) + .build(); + } + + public static String format(String organization, String inspectTemplate) { + return newBuilder() + .setOrganization(organization) + .setInspectTemplate(inspectTemplate) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationInspectTemplateName( + String organization, String inspectTemplate) { + return newBuilder() + .setOrganization(organization) + .setInspectTemplate(inspectTemplate) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectInspectTemplateName(String project, String inspectTemplate) { + return newProjectInspectTemplateBuilder() + .setProject(project) + .setInspectTemplate(inspectTemplate) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationLocationInspectTemplateName( + String organization, String location, String inspectTemplate) { + return newOrganizationLocationInspectTemplateBuilder() + .setOrganization(organization) + .setLocation(location) + .setInspectTemplate(inspectTemplate) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationInspectTemplateName( + String project, String location, String inspectTemplate) { + return newProjectLocationInspectTemplateBuilder() + .setProject(project) + .setLocation(location) + .setInspectTemplate(inspectTemplate) + .build() + .toString(); + } + + public static InspectTemplateName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (ORGANIZATION_INSPECT_TEMPLATE.matches(formattedString)) { + Map matchMap = ORGANIZATION_INSPECT_TEMPLATE.match(formattedString); + return ofOrganizationInspectTemplateName( + matchMap.get("organization"), matchMap.get("inspect_template")); + } else if (PROJECT_INSPECT_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_INSPECT_TEMPLATE.match(formattedString); + return ofProjectInspectTemplateName( + matchMap.get("project"), matchMap.get("inspect_template")); + } else if (ORGANIZATION_LOCATION_INSPECT_TEMPLATE.matches(formattedString)) { + Map matchMap = ORGANIZATION_LOCATION_INSPECT_TEMPLATE.match(formattedString); + return ofOrganizationLocationInspectTemplateName( + matchMap.get("organization"), matchMap.get("location"), matchMap.get("inspect_template")); + } else if (PROJECT_LOCATION_INSPECT_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_INSPECT_TEMPLATE.match(formattedString); + return ofProjectLocationInspectTemplateName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("inspect_template")); + } + throw new ValidationException("InspectTemplateName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InspectTemplateName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_INSPECT_TEMPLATE.matches(formattedString) + || PROJECT_INSPECT_TEMPLATE.matches(formattedString) + || ORGANIZATION_LOCATION_INSPECT_TEMPLATE.matches(formattedString) + || PROJECT_LOCATION_INSPECT_TEMPLATE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (inspectTemplate != null) { + fieldMapBuilder.put("inspect_template", inspectTemplate); + } + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InspectTemplateName that = ((InspectTemplateName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.inspectTemplate, that.inspectTemplate) + && Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(inspectTemplate); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for organizations/{organization}/inspectTemplates/{inspect_template}. */ + public static class Builder { + private String organization; + private String inspectTemplate; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getInspectTemplate() { + return inspectTemplate; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setInspectTemplate(String inspectTemplate) { + this.inspectTemplate = inspectTemplate; + return this; + } + + private Builder(InspectTemplateName inspectTemplateName) { + Preconditions.checkArgument( + Objects.equals(inspectTemplateName.pathTemplate, ORGANIZATION_INSPECT_TEMPLATE), + "toBuilder is only supported when InspectTemplateName has the pattern of organizations/{organization}/inspectTemplates/{inspect_template}"); + this.organization = inspectTemplateName.organization; + this.inspectTemplate = inspectTemplateName.inspectTemplate; + } + + public InspectTemplateName build() { + return new InspectTemplateName(this); + } + } + + /** Builder for projects/{project}/inspectTemplates/{inspect_template}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectInspectTemplateBuilder { + private String project; + private String inspectTemplate; + + protected ProjectInspectTemplateBuilder() {} + + public String getProject() { + return project; + } + + public String getInspectTemplate() { + return inspectTemplate; + } + + public ProjectInspectTemplateBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectInspectTemplateBuilder setInspectTemplate(String inspectTemplate) { + this.inspectTemplate = inspectTemplate; + return this; + } + + public InspectTemplateName build() { + return new InspectTemplateName(this); + } + } + + /** + * Builder for + * organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationLocationInspectTemplateBuilder { + private String organization; + private String location; + private String inspectTemplate; + + protected OrganizationLocationInspectTemplateBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getInspectTemplate() { + return inspectTemplate; + } + + public OrganizationLocationInspectTemplateBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationLocationInspectTemplateBuilder setLocation(String location) { + this.location = location; + return this; + } + + public OrganizationLocationInspectTemplateBuilder setInspectTemplate(String inspectTemplate) { + this.inspectTemplate = inspectTemplate; + return this; + } + + public InspectTemplateName build() { + return new InspectTemplateName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/inspectTemplates/{inspect_template}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationInspectTemplateBuilder { + private String project; + private String location; + private String inspectTemplate; + + protected ProjectLocationInspectTemplateBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInspectTemplate() { + return inspectTemplate; + } + + public ProjectLocationInspectTemplateBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationInspectTemplateBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationInspectTemplateBuilder setInspectTemplate(String inspectTemplate) { + this.inspectTemplate = inspectTemplate; + return this; + } + + public InspectTemplateName build() { + return new InspectTemplateName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateOrBuilder.java new file mode 100644 index 000000000000..ad84e9e88f97 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateOrBuilder.java @@ -0,0 +1,156 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InspectTemplateOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectTemplate) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The template name.
+   * The template will have one of the following formats:
+   * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+   * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Output only. The template name.
+   * The template will have one of the following formats:
+   * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
+   * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Display name (max 256 chars).
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * Display name (max 256 chars).
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * Short description (max 256 chars).
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Short description (max 256 chars).
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The creation timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The last update timestamp of an inspectTemplate.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * The core content of the template. Configuration of the scanning process.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + * @return Whether the inspectConfig field is set. + */ + boolean hasInspectConfig(); + /** + *
+   * The core content of the template. Configuration of the scanning process.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + * @return The inspectConfig. + */ + com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); + /** + *
+   * The core content of the template. Configuration of the scanning process.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; + */ + com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRule.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRule.java new file mode 100644 index 000000000000..add9b787c09a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRule.java @@ -0,0 +1,1026 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A single inspection rule to be applied to infoTypes, specified in
+ * `InspectionRuleSet`.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectionRule} + */ +public final class InspectionRule extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectionRule) + InspectionRuleOrBuilder { +private static final long serialVersionUID = 0L; + // Use InspectionRule.newBuilder() to construct. + private InspectionRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InspectionRule() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InspectionRule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InspectionRule( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder subBuilder = null; + if (typeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.ExclusionRule.Builder subBuilder = null; + if (typeCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.ExclusionRule) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.ExclusionRule.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ExclusionRule) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectionRule.class, com.google.privacy.dlp.v2.InspectionRule.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + HOTWORD_RULE(1), + EXCLUSION_RULE(2), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return HOTWORD_RULE; + case 2: return EXCLUSION_RULE; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int HOTWORD_RULE_FIELD_NUMBER = 1; + /** + *
+   * Hotword-based detection rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return Whether the hotwordRule field is set. + */ + @java.lang.Override + public boolean hasHotwordRule() { + return typeCase_ == 1; + } + /** + *
+   * Hotword-based detection rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return The hotwordRule. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + /** + *
+   * Hotword-based detection rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + + public static final int EXCLUSION_RULE_FIELD_NUMBER = 2; + /** + *
+   * Exclusion rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + * @return Whether the exclusionRule field is set. + */ + @java.lang.Override + public boolean hasExclusionRule() { + return typeCase_ == 2; + } + /** + *
+   * Exclusion rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + * @return The exclusionRule. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ExclusionRule getExclusionRule() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.ExclusionRule) type_; + } + return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); + } + /** + *
+   * Exclusion rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ExclusionRuleOrBuilder getExclusionRuleOrBuilder() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.ExclusionRule) type_; + } + return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); + } + if (typeCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.ExclusionRule) type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); + } + if (typeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.ExclusionRule) type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectionRule)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectionRule other = (com.google.privacy.dlp.v2.InspectionRule) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getHotwordRule() + .equals(other.getHotwordRule())) return false; + break; + case 2: + if (!getExclusionRule() + .equals(other.getExclusionRule())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + HOTWORD_RULE_FIELD_NUMBER; + hash = (53 * hash) + getHotwordRule().hashCode(); + break; + case 2: + hash = (37 * hash) + EXCLUSION_RULE_FIELD_NUMBER; + hash = (53 * hash) + getExclusionRule().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectionRule parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectionRule parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectionRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectionRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectionRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectionRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectionRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectionRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A single inspection rule to be applied to infoTypes, specified in
+   * `InspectionRuleSet`.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectionRule} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectionRule) + com.google.privacy.dlp.v2.InspectionRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectionRule.class, com.google.privacy.dlp.v2.InspectionRule.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectionRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRule getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectionRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRule build() { + com.google.privacy.dlp.v2.InspectionRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRule buildPartial() { + com.google.privacy.dlp.v2.InspectionRule result = new com.google.privacy.dlp.v2.InspectionRule(this); + if (typeCase_ == 1) { + if (hotwordRuleBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = hotwordRuleBuilder_.build(); + } + } + if (typeCase_ == 2) { + if (exclusionRuleBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = exclusionRuleBuilder_.build(); + } + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectionRule) { + return mergeFrom((com.google.privacy.dlp.v2.InspectionRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectionRule other) { + if (other == com.google.privacy.dlp.v2.InspectionRule.getDefaultInstance()) return this; + switch (other.getTypeCase()) { + case HOTWORD_RULE: { + mergeHotwordRule(other.getHotwordRule()); + break; + } + case EXCLUSION_RULE: { + mergeExclusionRule(other.getExclusionRule()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectionRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectionRule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder> hotwordRuleBuilder_; + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return Whether the hotwordRule field is set. + */ + @java.lang.Override + public boolean hasHotwordRule() { + return typeCase_ == 1; + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return The hotwordRule. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() { + if (hotwordRuleBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return hotwordRuleBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public Builder setHotwordRule(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) { + if (hotwordRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + hotwordRuleBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public Builder setHotwordRule( + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder builderForValue) { + if (hotwordRuleBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + hotwordRuleBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public Builder mergeHotwordRule(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) { + if (hotwordRuleBuilder_ == null) { + if (typeCase_ == 1 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + hotwordRuleBuilder_.mergeFrom(value); + } else { + hotwordRuleBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public Builder clearHotwordRule() { + if (hotwordRuleBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + hotwordRuleBuilder_.clear(); + } + return this; + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder getHotwordRuleBuilder() { + return getHotwordRuleFieldBuilder().getBuilder(); + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder() { + if ((typeCase_ == 1) && (hotwordRuleBuilder_ != null)) { + return hotwordRuleBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + } + /** + *
+     * Hotword-based detection rule.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder> + getHotwordRuleFieldBuilder() { + if (hotwordRuleBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); + } + hotwordRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged();; + return hotwordRuleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ExclusionRule, com.google.privacy.dlp.v2.ExclusionRule.Builder, com.google.privacy.dlp.v2.ExclusionRuleOrBuilder> exclusionRuleBuilder_; + /** + *
+     * Exclusion rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + * @return Whether the exclusionRule field is set. + */ + @java.lang.Override + public boolean hasExclusionRule() { + return typeCase_ == 2; + } + /** + *
+     * Exclusion rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + * @return The exclusionRule. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ExclusionRule getExclusionRule() { + if (exclusionRuleBuilder_ == null) { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.ExclusionRule) type_; + } + return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); + } else { + if (typeCase_ == 2) { + return exclusionRuleBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); + } + } + /** + *
+     * Exclusion rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + */ + public Builder setExclusionRule(com.google.privacy.dlp.v2.ExclusionRule value) { + if (exclusionRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + exclusionRuleBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + /** + *
+     * Exclusion rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + */ + public Builder setExclusionRule( + com.google.privacy.dlp.v2.ExclusionRule.Builder builderForValue) { + if (exclusionRuleBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + exclusionRuleBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 2; + return this; + } + /** + *
+     * Exclusion rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + */ + public Builder mergeExclusionRule(com.google.privacy.dlp.v2.ExclusionRule value) { + if (exclusionRuleBuilder_ == null) { + if (typeCase_ == 2 && + type_ != com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.ExclusionRule.newBuilder((com.google.privacy.dlp.v2.ExclusionRule) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 2) { + exclusionRuleBuilder_.mergeFrom(value); + } else { + exclusionRuleBuilder_.setMessage(value); + } + } + typeCase_ = 2; + return this; + } + /** + *
+     * Exclusion rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + */ + public Builder clearExclusionRule() { + if (exclusionRuleBuilder_ == null) { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + } + exclusionRuleBuilder_.clear(); + } + return this; + } + /** + *
+     * Exclusion rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + */ + public com.google.privacy.dlp.v2.ExclusionRule.Builder getExclusionRuleBuilder() { + return getExclusionRuleFieldBuilder().getBuilder(); + } + /** + *
+     * Exclusion rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ExclusionRuleOrBuilder getExclusionRuleOrBuilder() { + if ((typeCase_ == 2) && (exclusionRuleBuilder_ != null)) { + return exclusionRuleBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.ExclusionRule) type_; + } + return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); + } + } + /** + *
+     * Exclusion rule.
+     * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ExclusionRule, com.google.privacy.dlp.v2.ExclusionRule.Builder, com.google.privacy.dlp.v2.ExclusionRuleOrBuilder> + getExclusionRuleFieldBuilder() { + if (exclusionRuleBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); + } + exclusionRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ExclusionRule, com.google.privacy.dlp.v2.ExclusionRule.Builder, com.google.privacy.dlp.v2.ExclusionRuleOrBuilder>( + (com.google.privacy.dlp.v2.ExclusionRule) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 2; + onChanged();; + return exclusionRuleBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectionRule) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectionRule) + private static final com.google.privacy.dlp.v2.InspectionRule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectionRule(); + } + + public static com.google.privacy.dlp.v2.InspectionRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InspectionRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InspectionRule(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleOrBuilder.java new file mode 100644 index 000000000000..ff09d8f399f1 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InspectionRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectionRule) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Hotword-based detection rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return Whether the hotwordRule field is set. + */ + boolean hasHotwordRule(); + /** + *
+   * Hotword-based detection rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + * @return The hotwordRule. + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule(); + /** + *
+   * Hotword-based detection rule.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + */ + com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder(); + + /** + *
+   * Exclusion rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + * @return Whether the exclusionRule field is set. + */ + boolean hasExclusionRule(); + /** + *
+   * Exclusion rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + * @return The exclusionRule. + */ + com.google.privacy.dlp.v2.ExclusionRule getExclusionRule(); + /** + *
+   * Exclusion rule.
+   * 
+ * + * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; + */ + com.google.privacy.dlp.v2.ExclusionRuleOrBuilder getExclusionRuleOrBuilder(); + + public com.google.privacy.dlp.v2.InspectionRule.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSet.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSet.java new file mode 100644 index 000000000000..950f00c600e6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSet.java @@ -0,0 +1,1314 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Rule set for modifying a set of infoTypes to alter behavior under certain
+ * circumstances, depending on the specific details of the rules within the set.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectionRuleSet} + */ +public final class InspectionRuleSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectionRuleSet) + InspectionRuleSetOrBuilder { +private static final long serialVersionUID = 0L; + // Use InspectionRuleSet.newBuilder() to construct. + private InspectionRuleSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InspectionRuleSet() { + infoTypes_ = java.util.Collections.emptyList(); + rules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InspectionRuleSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InspectionRuleSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + infoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + rules_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + rules_.add( + input.readMessage(com.google.privacy.dlp.v2.InspectionRule.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectionRuleSet.class, com.google.privacy.dlp.v2.InspectionRuleSet.Builder.class); + } + + public static final int INFO_TYPES_FIELD_NUMBER = 1; + private java.util.List infoTypes_; + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public java.util.List getInfoTypesList() { + return infoTypes_; + } + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public java.util.List + getInfoTypesOrBuilderList() { + return infoTypes_; + } + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public int getInfoTypesCount() { + return infoTypes_.size(); + } + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + return infoTypes_.get(index); + } + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + return infoTypes_.get(index); + } + + public static final int RULES_FIELD_NUMBER = 2; + private java.util.List rules_; + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRule getRules(int index) { + return rules_.get(index); + } + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < infoTypes_.size(); i++) { + output.writeMessage(1, infoTypes_.get(i)); + } + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(2, rules_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < infoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, infoTypes_.get(i)); + } + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rules_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.InspectionRuleSet)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.InspectionRuleSet other = (com.google.privacy.dlp.v2.InspectionRuleSet) obj; + + if (!getInfoTypesList() + .equals(other.getInfoTypesList())) return false; + if (!getRulesList() + .equals(other.getRulesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInfoTypesCount() > 0) { + hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getInfoTypesList().hashCode(); + } + if (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.InspectionRuleSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Rule set for modifying a set of infoTypes to alter behavior under certain
+   * circumstances, depending on the specific details of the rules within the set.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.InspectionRuleSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectionRuleSet) + com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.InspectionRuleSet.class, com.google.privacy.dlp.v2.InspectionRuleSet.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.InspectionRuleSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInfoTypesFieldBuilder(); + getRulesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + infoTypesBuilder_.clear(); + } + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + rulesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRuleSet getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRuleSet build() { + com.google.privacy.dlp.v2.InspectionRuleSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRuleSet buildPartial() { + com.google.privacy.dlp.v2.InspectionRuleSet result = new com.google.privacy.dlp.v2.InspectionRuleSet(this); + int from_bitField0_ = bitField0_; + if (infoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.infoTypes_ = infoTypes_; + } else { + result.infoTypes_ = infoTypesBuilder_.build(); + } + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.InspectionRuleSet) { + return mergeFrom((com.google.privacy.dlp.v2.InspectionRuleSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.InspectionRuleSet other) { + if (other == com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance()) return this; + if (infoTypesBuilder_ == null) { + if (!other.infoTypes_.isEmpty()) { + if (infoTypes_.isEmpty()) { + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInfoTypesIsMutable(); + infoTypes_.addAll(other.infoTypes_); + } + onChanged(); + } + } else { + if (!other.infoTypes_.isEmpty()) { + if (infoTypesBuilder_.isEmpty()) { + infoTypesBuilder_.dispose(); + infoTypesBuilder_ = null; + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + infoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInfoTypesFieldBuilder() : null; + } else { + infoTypesBuilder_.addAllMessages(other.infoTypes_); + } + } + } + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000002); + rulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.InspectionRuleSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.InspectionRuleSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List infoTypes_ = + java.util.Collections.emptyList(); + private void ensureInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(infoTypes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; + + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List getInfoTypesList() { + if (infoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(infoTypes_); + } else { + return infoTypesBuilder_.getMessageList(); + } + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public int getInfoTypesCount() { + if (infoTypesBuilder_ == null) { + return infoTypes_.size(); + } else { + return infoTypesBuilder_.getCount(); + } + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); + } else { + return infoTypesBuilder_.getMessage(index); + } + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.set(index, value); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(index, value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder addAllInfoTypes( + java.lang.Iterable values) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, infoTypes_); + onChanged(); + } else { + infoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder clearInfoTypes() { + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + infoTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public Builder removeInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.remove(index); + onChanged(); + } else { + infoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); } else { + return infoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List + getInfoTypesOrBuilderList() { + if (infoTypesBuilder_ != null) { + return infoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(infoTypes_); + } + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { + return getInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + } + /** + *
+     * List of infoTypes this rule set is applied to.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + public java.util.List + getInfoTypesBuilderList() { + return getInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypesFieldBuilder() { + if (infoTypesBuilder_ == null) { + infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + infoTypes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + infoTypes_ = null; + } + return infoTypesBuilder_; + } + + private java.util.List rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectionRule, com.google.privacy.dlp.v2.InspectionRule.Builder, com.google.privacy.dlp.v2.InspectionRuleOrBuilder> rulesBuilder_; + + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public com.google.privacy.dlp.v2.InspectionRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public Builder setRules( + int index, com.google.privacy.dlp.v2.InspectionRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public Builder setRules( + int index, com.google.privacy.dlp.v2.InspectionRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public Builder addRules(com.google.privacy.dlp.v2.InspectionRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public Builder addRules( + int index, com.google.privacy.dlp.v2.InspectionRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public Builder addRules( + com.google.privacy.dlp.v2.InspectionRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public Builder addRules( + int index, com.google.privacy.dlp.v2.InspectionRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public com.google.privacy.dlp.v2.InspectionRule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public com.google.privacy.dlp.v2.InspectionRuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public com.google.privacy.dlp.v2.InspectionRule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InspectionRule.getDefaultInstance()); + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public com.google.privacy.dlp.v2.InspectionRule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InspectionRule.getDefaultInstance()); + } + /** + *
+     * Set of rules to be applied to infoTypes. The rules are applied in order.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + public java.util.List + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectionRule, com.google.privacy.dlp.v2.InspectionRule.Builder, com.google.privacy.dlp.v2.InspectionRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectionRule, com.google.privacy.dlp.v2.InspectionRule.Builder, com.google.privacy.dlp.v2.InspectionRuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectionRuleSet) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectionRuleSet) + private static final com.google.privacy.dlp.v2.InspectionRuleSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectionRuleSet(); + } + + public static com.google.privacy.dlp.v2.InspectionRuleSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InspectionRuleSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InspectionRuleSet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.InspectionRuleSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSetOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSetOrBuilder.java new file mode 100644 index 000000000000..2584c2b9b23c --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSetOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface InspectionRuleSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectionRuleSet) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + java.util.List + getInfoTypesList(); + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + int getInfoTypesCount(); + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + java.util.List + getInfoTypesOrBuilderList(); + /** + *
+   * List of infoTypes this rule set is applied to.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoType info_types = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( + int index); + + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + java.util.List + getRulesList(); + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + com.google.privacy.dlp.v2.InspectionRule getRules(int index); + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + int getRulesCount(); + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + java.util.List + getRulesOrBuilderList(); + /** + *
+   * Set of rules to be applied to infoTypes. The rules are applied in order.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; + */ + com.google.privacy.dlp.v2.InspectionRuleOrBuilder getRulesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java new file mode 100644 index 000000000000..5f84912e4816 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java @@ -0,0 +1,4349 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Contains a configuration to make dlp api calls on a repeating basis.
+ * See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.JobTrigger} + */ +public final class JobTrigger extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.JobTrigger) + JobTriggerOrBuilder { +private static final long serialVersionUID = 0L; + // Use JobTrigger.newBuilder() to construct. + private JobTrigger(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JobTrigger() { + name_ = ""; + displayName_ = ""; + description_ = ""; + triggers_ = java.util.Collections.emptyList(); + errors_ = java.util.Collections.emptyList(); + status_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JobTrigger(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private JobTrigger( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: { + com.google.privacy.dlp.v2.InspectJobConfig.Builder subBuilder = null; + if (jobCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.InspectJobConfig) job_).toBuilder(); + } + job_ = + input.readMessage(com.google.privacy.dlp.v2.InspectJobConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.InspectJobConfig) job_); + job_ = subBuilder.buildPartial(); + } + jobCase_ = 4; + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + triggers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + triggers_.add( + input.readMessage(com.google.privacy.dlp.v2.JobTrigger.Trigger.parser(), extensionRegistry)); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + errors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + errors_.add( + input.readMessage(com.google.privacy.dlp.v2.Error.parser(), extensionRegistry)); + break; + } + case 58: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastRunTime_ != null) { + subBuilder = lastRunTime_.toBuilder(); + } + lastRunTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastRunTime_); + lastRunTime_ = subBuilder.buildPartial(); + } + + break; + } + case 80: { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + triggers_ = java.util.Collections.unmodifiableList(triggers_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.JobTrigger.class, com.google.privacy.dlp.v2.JobTrigger.Builder.class); + } + + /** + *
+   * Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs
+   * will be created with this configuration. The service may automatically
+   * pause triggers experiencing frequent errors. To restart a job, set the
+   * status to HEALTHY after correcting user errors.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.JobTrigger.Status} + */ + public enum Status + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * STATUS_UNSPECIFIED = 0; + */ + STATUS_UNSPECIFIED(0), + /** + *
+     * Trigger is healthy.
+     * 
+ * + * HEALTHY = 1; + */ + HEALTHY(1), + /** + *
+     * Trigger is temporarily paused.
+     * 
+ * + * PAUSED = 2; + */ + PAUSED(2), + /** + *
+     * Trigger is cancelled and can not be resumed.
+     * 
+ * + * CANCELLED = 3; + */ + CANCELLED(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * STATUS_UNSPECIFIED = 0; + */ + public static final int STATUS_UNSPECIFIED_VALUE = 0; + /** + *
+     * Trigger is healthy.
+     * 
+ * + * HEALTHY = 1; + */ + public static final int HEALTHY_VALUE = 1; + /** + *
+     * Trigger is temporarily paused.
+     * 
+ * + * PAUSED = 2; + */ + public static final int PAUSED_VALUE = 2; + /** + *
+     * Trigger is cancelled and can not be resumed.
+     * 
+ * + * CANCELLED = 3; + */ + public static final int CANCELLED_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Status valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Status forNumber(int value) { + switch (value) { + case 0: return STATUS_UNSPECIFIED; + case 1: return HEALTHY; + case 2: return PAUSED; + case 3: return CANCELLED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Status> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Status findValueByNumber(int number) { + return Status.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.JobTrigger.getDescriptor().getEnumTypes().get(0); + } + + private static final Status[] VALUES = values(); + + public static Status valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Status(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.JobTrigger.Status) + } + + public interface TriggerOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.JobTrigger.Trigger) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Create a job on a repeating basis based on the elapse of time.
+     * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + * @return Whether the schedule field is set. + */ + boolean hasSchedule(); + /** + *
+     * Create a job on a repeating basis based on the elapse of time.
+     * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + * @return The schedule. + */ + com.google.privacy.dlp.v2.Schedule getSchedule(); + /** + *
+     * Create a job on a repeating basis based on the elapse of time.
+     * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + */ + com.google.privacy.dlp.v2.ScheduleOrBuilder getScheduleOrBuilder(); + + /** + *
+     * For use with hybrid jobs. Jobs must be manually created and finished.
+     * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + * @return Whether the manual field is set. + */ + boolean hasManual(); + /** + *
+     * For use with hybrid jobs. Jobs must be manually created and finished.
+     * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + * @return The manual. + */ + com.google.privacy.dlp.v2.Manual getManual(); + /** + *
+     * For use with hybrid jobs. Jobs must be manually created and finished.
+     * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + */ + com.google.privacy.dlp.v2.ManualOrBuilder getManualOrBuilder(); + + public com.google.privacy.dlp.v2.JobTrigger.Trigger.TriggerCase getTriggerCase(); + } + /** + *
+   * What event needs to occur for a new job to be started.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.JobTrigger.Trigger} + */ + public static final class Trigger extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.JobTrigger.Trigger) + TriggerOrBuilder { + private static final long serialVersionUID = 0L; + // Use Trigger.newBuilder() to construct. + private Trigger(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Trigger() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Trigger(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Trigger( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Schedule.Builder subBuilder = null; + if (triggerCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.Schedule) trigger_).toBuilder(); + } + trigger_ = + input.readMessage(com.google.privacy.dlp.v2.Schedule.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Schedule) trigger_); + trigger_ = subBuilder.buildPartial(); + } + triggerCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.Manual.Builder subBuilder = null; + if (triggerCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.Manual) trigger_).toBuilder(); + } + trigger_ = + input.readMessage(com.google.privacy.dlp.v2.Manual.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.Manual) trigger_); + trigger_ = subBuilder.buildPartial(); + } + triggerCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.JobTrigger.Trigger.class, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder.class); + } + + private int triggerCase_ = 0; + private java.lang.Object trigger_; + public enum TriggerCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SCHEDULE(1), + MANUAL(2), + TRIGGER_NOT_SET(0); + private final int value; + private TriggerCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TriggerCase valueOf(int value) { + return forNumber(value); + } + + public static TriggerCase forNumber(int value) { + switch (value) { + case 1: return SCHEDULE; + case 2: return MANUAL; + case 0: return TRIGGER_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TriggerCase + getTriggerCase() { + return TriggerCase.forNumber( + triggerCase_); + } + + public static final int SCHEDULE_FIELD_NUMBER = 1; + /** + *
+     * Create a job on a repeating basis based on the elapse of time.
+     * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return triggerCase_ == 1; + } + /** + *
+     * Create a job on a repeating basis based on the elapse of time.
+     * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + * @return The schedule. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Schedule getSchedule() { + if (triggerCase_ == 1) { + return (com.google.privacy.dlp.v2.Schedule) trigger_; + } + return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); + } + /** + *
+     * Create a job on a repeating basis based on the elapse of time.
+     * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ScheduleOrBuilder getScheduleOrBuilder() { + if (triggerCase_ == 1) { + return (com.google.privacy.dlp.v2.Schedule) trigger_; + } + return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); + } + + public static final int MANUAL_FIELD_NUMBER = 2; + /** + *
+     * For use with hybrid jobs. Jobs must be manually created and finished.
+     * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + * @return Whether the manual field is set. + */ + @java.lang.Override + public boolean hasManual() { + return triggerCase_ == 2; + } + /** + *
+     * For use with hybrid jobs. Jobs must be manually created and finished.
+     * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + * @return The manual. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Manual getManual() { + if (triggerCase_ == 2) { + return (com.google.privacy.dlp.v2.Manual) trigger_; + } + return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); + } + /** + *
+     * For use with hybrid jobs. Jobs must be manually created and finished.
+     * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ManualOrBuilder getManualOrBuilder() { + if (triggerCase_ == 2) { + return (com.google.privacy.dlp.v2.Manual) trigger_; + } + return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (triggerCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.Schedule) trigger_); + } + if (triggerCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.Manual) trigger_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (triggerCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.Schedule) trigger_); + } + if (triggerCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.Manual) trigger_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.JobTrigger.Trigger)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.JobTrigger.Trigger other = (com.google.privacy.dlp.v2.JobTrigger.Trigger) obj; + + if (!getTriggerCase().equals(other.getTriggerCase())) return false; + switch (triggerCase_) { + case 1: + if (!getSchedule() + .equals(other.getSchedule())) return false; + break; + case 2: + if (!getManual() + .equals(other.getManual())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (triggerCase_) { + case 1: + hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getSchedule().hashCode(); + break; + case 2: + hash = (37 * hash) + MANUAL_FIELD_NUMBER; + hash = (53 * hash) + getManual().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.JobTrigger.Trigger prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * What event needs to occur for a new job to be started.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.JobTrigger.Trigger} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.JobTrigger.Trigger) + com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.JobTrigger.Trigger.class, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.JobTrigger.Trigger.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + triggerCase_ = 0; + trigger_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger.Trigger getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.JobTrigger.Trigger.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger.Trigger build() { + com.google.privacy.dlp.v2.JobTrigger.Trigger result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger.Trigger buildPartial() { + com.google.privacy.dlp.v2.JobTrigger.Trigger result = new com.google.privacy.dlp.v2.JobTrigger.Trigger(this); + if (triggerCase_ == 1) { + if (scheduleBuilder_ == null) { + result.trigger_ = trigger_; + } else { + result.trigger_ = scheduleBuilder_.build(); + } + } + if (triggerCase_ == 2) { + if (manualBuilder_ == null) { + result.trigger_ = trigger_; + } else { + result.trigger_ = manualBuilder_.build(); + } + } + result.triggerCase_ = triggerCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.JobTrigger.Trigger) { + return mergeFrom((com.google.privacy.dlp.v2.JobTrigger.Trigger)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.JobTrigger.Trigger other) { + if (other == com.google.privacy.dlp.v2.JobTrigger.Trigger.getDefaultInstance()) return this; + switch (other.getTriggerCase()) { + case SCHEDULE: { + mergeSchedule(other.getSchedule()); + break; + } + case MANUAL: { + mergeManual(other.getManual()); + break; + } + case TRIGGER_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.JobTrigger.Trigger parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.JobTrigger.Trigger) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int triggerCase_ = 0; + private java.lang.Object trigger_; + public TriggerCase + getTriggerCase() { + return TriggerCase.forNumber( + triggerCase_); + } + + public Builder clearTrigger() { + triggerCase_ = 0; + trigger_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Schedule, com.google.privacy.dlp.v2.Schedule.Builder, com.google.privacy.dlp.v2.ScheduleOrBuilder> scheduleBuilder_; + /** + *
+       * Create a job on a repeating basis based on the elapse of time.
+       * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return triggerCase_ == 1; + } + /** + *
+       * Create a job on a repeating basis based on the elapse of time.
+       * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + * @return The schedule. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Schedule getSchedule() { + if (scheduleBuilder_ == null) { + if (triggerCase_ == 1) { + return (com.google.privacy.dlp.v2.Schedule) trigger_; + } + return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); + } else { + if (triggerCase_ == 1) { + return scheduleBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); + } + } + /** + *
+       * Create a job on a repeating basis based on the elapse of time.
+       * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + */ + public Builder setSchedule(com.google.privacy.dlp.v2.Schedule value) { + if (scheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trigger_ = value; + onChanged(); + } else { + scheduleBuilder_.setMessage(value); + } + triggerCase_ = 1; + return this; + } + /** + *
+       * Create a job on a repeating basis based on the elapse of time.
+       * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + */ + public Builder setSchedule( + com.google.privacy.dlp.v2.Schedule.Builder builderForValue) { + if (scheduleBuilder_ == null) { + trigger_ = builderForValue.build(); + onChanged(); + } else { + scheduleBuilder_.setMessage(builderForValue.build()); + } + triggerCase_ = 1; + return this; + } + /** + *
+       * Create a job on a repeating basis based on the elapse of time.
+       * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + */ + public Builder mergeSchedule(com.google.privacy.dlp.v2.Schedule value) { + if (scheduleBuilder_ == null) { + if (triggerCase_ == 1 && + trigger_ != com.google.privacy.dlp.v2.Schedule.getDefaultInstance()) { + trigger_ = com.google.privacy.dlp.v2.Schedule.newBuilder((com.google.privacy.dlp.v2.Schedule) trigger_) + .mergeFrom(value).buildPartial(); + } else { + trigger_ = value; + } + onChanged(); + } else { + if (triggerCase_ == 1) { + scheduleBuilder_.mergeFrom(value); + } else { + scheduleBuilder_.setMessage(value); + } + } + triggerCase_ = 1; + return this; + } + /** + *
+       * Create a job on a repeating basis based on the elapse of time.
+       * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + */ + public Builder clearSchedule() { + if (scheduleBuilder_ == null) { + if (triggerCase_ == 1) { + triggerCase_ = 0; + trigger_ = null; + onChanged(); + } + } else { + if (triggerCase_ == 1) { + triggerCase_ = 0; + trigger_ = null; + } + scheduleBuilder_.clear(); + } + return this; + } + /** + *
+       * Create a job on a repeating basis based on the elapse of time.
+       * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + */ + public com.google.privacy.dlp.v2.Schedule.Builder getScheduleBuilder() { + return getScheduleFieldBuilder().getBuilder(); + } + /** + *
+       * Create a job on a repeating basis based on the elapse of time.
+       * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ScheduleOrBuilder getScheduleOrBuilder() { + if ((triggerCase_ == 1) && (scheduleBuilder_ != null)) { + return scheduleBuilder_.getMessageOrBuilder(); + } else { + if (triggerCase_ == 1) { + return (com.google.privacy.dlp.v2.Schedule) trigger_; + } + return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); + } + } + /** + *
+       * Create a job on a repeating basis based on the elapse of time.
+       * 
+ * + * .google.privacy.dlp.v2.Schedule schedule = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Schedule, com.google.privacy.dlp.v2.Schedule.Builder, com.google.privacy.dlp.v2.ScheduleOrBuilder> + getScheduleFieldBuilder() { + if (scheduleBuilder_ == null) { + if (!(triggerCase_ == 1)) { + trigger_ = com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); + } + scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Schedule, com.google.privacy.dlp.v2.Schedule.Builder, com.google.privacy.dlp.v2.ScheduleOrBuilder>( + (com.google.privacy.dlp.v2.Schedule) trigger_, + getParentForChildren(), + isClean()); + trigger_ = null; + } + triggerCase_ = 1; + onChanged();; + return scheduleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Manual, com.google.privacy.dlp.v2.Manual.Builder, com.google.privacy.dlp.v2.ManualOrBuilder> manualBuilder_; + /** + *
+       * For use with hybrid jobs. Jobs must be manually created and finished.
+       * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + * @return Whether the manual field is set. + */ + @java.lang.Override + public boolean hasManual() { + return triggerCase_ == 2; + } + /** + *
+       * For use with hybrid jobs. Jobs must be manually created and finished.
+       * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + * @return The manual. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Manual getManual() { + if (manualBuilder_ == null) { + if (triggerCase_ == 2) { + return (com.google.privacy.dlp.v2.Manual) trigger_; + } + return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); + } else { + if (triggerCase_ == 2) { + return manualBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); + } + } + /** + *
+       * For use with hybrid jobs. Jobs must be manually created and finished.
+       * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + */ + public Builder setManual(com.google.privacy.dlp.v2.Manual value) { + if (manualBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trigger_ = value; + onChanged(); + } else { + manualBuilder_.setMessage(value); + } + triggerCase_ = 2; + return this; + } + /** + *
+       * For use with hybrid jobs. Jobs must be manually created and finished.
+       * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + */ + public Builder setManual( + com.google.privacy.dlp.v2.Manual.Builder builderForValue) { + if (manualBuilder_ == null) { + trigger_ = builderForValue.build(); + onChanged(); + } else { + manualBuilder_.setMessage(builderForValue.build()); + } + triggerCase_ = 2; + return this; + } + /** + *
+       * For use with hybrid jobs. Jobs must be manually created and finished.
+       * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + */ + public Builder mergeManual(com.google.privacy.dlp.v2.Manual value) { + if (manualBuilder_ == null) { + if (triggerCase_ == 2 && + trigger_ != com.google.privacy.dlp.v2.Manual.getDefaultInstance()) { + trigger_ = com.google.privacy.dlp.v2.Manual.newBuilder((com.google.privacy.dlp.v2.Manual) trigger_) + .mergeFrom(value).buildPartial(); + } else { + trigger_ = value; + } + onChanged(); + } else { + if (triggerCase_ == 2) { + manualBuilder_.mergeFrom(value); + } else { + manualBuilder_.setMessage(value); + } + } + triggerCase_ = 2; + return this; + } + /** + *
+       * For use with hybrid jobs. Jobs must be manually created and finished.
+       * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + */ + public Builder clearManual() { + if (manualBuilder_ == null) { + if (triggerCase_ == 2) { + triggerCase_ = 0; + trigger_ = null; + onChanged(); + } + } else { + if (triggerCase_ == 2) { + triggerCase_ = 0; + trigger_ = null; + } + manualBuilder_.clear(); + } + return this; + } + /** + *
+       * For use with hybrid jobs. Jobs must be manually created and finished.
+       * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + */ + public com.google.privacy.dlp.v2.Manual.Builder getManualBuilder() { + return getManualFieldBuilder().getBuilder(); + } + /** + *
+       * For use with hybrid jobs. Jobs must be manually created and finished.
+       * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ManualOrBuilder getManualOrBuilder() { + if ((triggerCase_ == 2) && (manualBuilder_ != null)) { + return manualBuilder_.getMessageOrBuilder(); + } else { + if (triggerCase_ == 2) { + return (com.google.privacy.dlp.v2.Manual) trigger_; + } + return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); + } + } + /** + *
+       * For use with hybrid jobs. Jobs must be manually created and finished.
+       * 
+ * + * .google.privacy.dlp.v2.Manual manual = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Manual, com.google.privacy.dlp.v2.Manual.Builder, com.google.privacy.dlp.v2.ManualOrBuilder> + getManualFieldBuilder() { + if (manualBuilder_ == null) { + if (!(triggerCase_ == 2)) { + trigger_ = com.google.privacy.dlp.v2.Manual.getDefaultInstance(); + } + manualBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Manual, com.google.privacy.dlp.v2.Manual.Builder, com.google.privacy.dlp.v2.ManualOrBuilder>( + (com.google.privacy.dlp.v2.Manual) trigger_, + getParentForChildren(), + isClean()); + trigger_ = null; + } + triggerCase_ = 2; + onChanged();; + return manualBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.JobTrigger.Trigger) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.JobTrigger.Trigger) + private static final com.google.privacy.dlp.v2.JobTrigger.Trigger DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.JobTrigger.Trigger(); + } + + public static com.google.privacy.dlp.v2.JobTrigger.Trigger getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Trigger parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Trigger(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger.Trigger getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int jobCase_ = 0; + private java.lang.Object job_; + public enum JobCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSPECT_JOB(4), + JOB_NOT_SET(0); + private final int value; + private JobCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobCase valueOf(int value) { + return forNumber(value); + } + + public static JobCase forNumber(int value) { + switch (value) { + case 4: return INSPECT_JOB; + case 0: return JOB_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public JobCase + getJobCase() { + return JobCase.forNumber( + jobCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Unique resource name for the triggeredJob, assigned by the service when the
+   * triggeredJob is created, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Unique resource name for the triggeredJob, assigned by the service when the
+   * triggeredJob is created, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + *
+   * Display name (max 100 chars)
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * Display name (max 100 chars)
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + *
+   * User provided description (max 256 chars)
+   * 
+ * + * string description = 3; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * User provided description (max 256 chars)
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSPECT_JOB_FIELD_NUMBER = 4; + /** + *
+   * For inspect jobs, a snapshot of the configuration.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + * @return Whether the inspectJob field is set. + */ + @java.lang.Override + public boolean hasInspectJob() { + return jobCase_ == 4; + } + /** + *
+   * For inspect jobs, a snapshot of the configuration.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + * @return The inspectJob. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() { + if (jobCase_ == 4) { + return (com.google.privacy.dlp.v2.InspectJobConfig) job_; + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + /** + *
+   * For inspect jobs, a snapshot of the configuration.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() { + if (jobCase_ == 4) { + return (com.google.privacy.dlp.v2.InspectJobConfig) job_; + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + + public static final int TRIGGERS_FIELD_NUMBER = 5; + private java.util.List triggers_; + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + @java.lang.Override + public java.util.List getTriggersList() { + return triggers_; + } + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + @java.lang.Override + public java.util.List + getTriggersOrBuilderList() { + return triggers_; + } + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + @java.lang.Override + public int getTriggersCount() { + return triggers_.size(); + } + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger.Trigger getTriggers(int index) { + return triggers_.get(index); + } + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder getTriggersOrBuilder( + int index) { + return triggers_.get(index); + } + + public static final int ERRORS_FIELD_NUMBER = 6; + private java.util.List errors_; + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.List + getErrorsOrBuilderList() { + return errors_; + } + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Error getErrors(int index) { + return errors_.get(index); + } + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( + int index) { + return errors_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The creation timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The creation timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The creation timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * Output only. The last update timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * Output only. The last update timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * Output only. The last update timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LAST_RUN_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp lastRunTime_; + /** + *
+   * Output only. The timestamp of the last time this trigger executed.
+   * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the lastRunTime field is set. + */ + @java.lang.Override + public boolean hasLastRunTime() { + return lastRunTime_ != null; + } + /** + *
+   * Output only. The timestamp of the last time this trigger executed.
+   * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The lastRunTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastRunTime() { + return lastRunTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastRunTime_; + } + /** + *
+   * Output only. The timestamp of the last time this trigger executed.
+   * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastRunTimeOrBuilder() { + return getLastRunTime(); + } + + public static final int STATUS_FIELD_NUMBER = 10; + private int status_; + /** + *
+   * Required. A status for this trigger.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + *
+   * Required. A status for this trigger.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return The status. + */ + @java.lang.Override public com.google.privacy.dlp.v2.JobTrigger.Status getStatus() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.JobTrigger.Status result = com.google.privacy.dlp.v2.JobTrigger.Status.valueOf(status_); + return result == null ? com.google.privacy.dlp.v2.JobTrigger.Status.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (jobCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.InspectJobConfig) job_); + } + for (int i = 0; i < triggers_.size(); i++) { + output.writeMessage(5, triggers_.get(i)); + } + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(6, errors_.get(i)); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } + if (lastRunTime_ != null) { + output.writeMessage(9, getLastRunTime()); + } + if (status_ != com.google.privacy.dlp.v2.JobTrigger.Status.STATUS_UNSPECIFIED.getNumber()) { + output.writeEnum(10, status_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (jobCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.InspectJobConfig) job_); + } + for (int i = 0; i < triggers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, triggers_.get(i)); + } + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, errors_.get(i)); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getUpdateTime()); + } + if (lastRunTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getLastRunTime()); + } + if (status_ != com.google.privacy.dlp.v2.JobTrigger.Status.STATUS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, status_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.JobTrigger)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.JobTrigger other = (com.google.privacy.dlp.v2.JobTrigger) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getTriggersList() + .equals(other.getTriggersList())) return false; + if (!getErrorsList() + .equals(other.getErrorsList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (hasLastRunTime() != other.hasLastRunTime()) return false; + if (hasLastRunTime()) { + if (!getLastRunTime() + .equals(other.getLastRunTime())) return false; + } + if (status_ != other.status_) return false; + if (!getJobCase().equals(other.getJobCase())) return false; + switch (jobCase_) { + case 4: + if (!getInspectJob() + .equals(other.getInspectJob())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getTriggersCount() > 0) { + hash = (37 * hash) + TRIGGERS_FIELD_NUMBER; + hash = (53 * hash) + getTriggersList().hashCode(); + } + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasLastRunTime()) { + hash = (37 * hash) + LAST_RUN_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastRunTime().hashCode(); + } + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + switch (jobCase_) { + case 4: + hash = (37 * hash) + INSPECT_JOB_FIELD_NUMBER; + hash = (53 * hash) + getInspectJob().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.JobTrigger parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.JobTrigger parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.JobTrigger parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.JobTrigger parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.JobTrigger parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.JobTrigger parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.JobTrigger parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.JobTrigger parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.JobTrigger prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Contains a configuration to make dlp api calls on a repeating basis.
+   * See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.JobTrigger} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.JobTrigger) + com.google.privacy.dlp.v2.JobTriggerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.JobTrigger.class, com.google.privacy.dlp.v2.JobTrigger.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.JobTrigger.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTriggersFieldBuilder(); + getErrorsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (triggersBuilder_ == null) { + triggers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + triggersBuilder_.clear(); + } + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + errorsBuilder_.clear(); + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (lastRunTimeBuilder_ == null) { + lastRunTime_ = null; + } else { + lastRunTime_ = null; + lastRunTimeBuilder_ = null; + } + status_ = 0; + + jobCase_ = 0; + job_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger build() { + com.google.privacy.dlp.v2.JobTrigger result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger buildPartial() { + com.google.privacy.dlp.v2.JobTrigger result = new com.google.privacy.dlp.v2.JobTrigger(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (jobCase_ == 4) { + if (inspectJobBuilder_ == null) { + result.job_ = job_; + } else { + result.job_ = inspectJobBuilder_.build(); + } + } + if (triggersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + triggers_ = java.util.Collections.unmodifiableList(triggers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.triggers_ = triggers_; + } else { + result.triggers_ = triggersBuilder_.build(); + } + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + if (lastRunTimeBuilder_ == null) { + result.lastRunTime_ = lastRunTime_; + } else { + result.lastRunTime_ = lastRunTimeBuilder_.build(); + } + result.status_ = status_; + result.jobCase_ = jobCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.JobTrigger) { + return mergeFrom((com.google.privacy.dlp.v2.JobTrigger)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.JobTrigger other) { + if (other == com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (triggersBuilder_ == null) { + if (!other.triggers_.isEmpty()) { + if (triggers_.isEmpty()) { + triggers_ = other.triggers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTriggersIsMutable(); + triggers_.addAll(other.triggers_); + } + onChanged(); + } + } else { + if (!other.triggers_.isEmpty()) { + if (triggersBuilder_.isEmpty()) { + triggersBuilder_.dispose(); + triggersBuilder_ = null; + triggers_ = other.triggers_; + bitField0_ = (bitField0_ & ~0x00000001); + triggersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTriggersFieldBuilder() : null; + } else { + triggersBuilder_.addAllMessages(other.triggers_); + } + } + } + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000002); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getErrorsFieldBuilder() : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasLastRunTime()) { + mergeLastRunTime(other.getLastRunTime()); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + switch (other.getJobCase()) { + case INSPECT_JOB: { + mergeInspectJob(other.getInspectJob()); + break; + } + case JOB_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.JobTrigger parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.JobTrigger) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int jobCase_ = 0; + private java.lang.Object job_; + public JobCase + getJobCase() { + return JobCase.forNumber( + jobCase_); + } + + public Builder clearJob() { + jobCase_ = 0; + job_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Unique resource name for the triggeredJob, assigned by the service when the
+     * triggeredJob is created, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Unique resource name for the triggeredJob, assigned by the service when the
+     * triggeredJob is created, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Unique resource name for the triggeredJob, assigned by the service when the
+     * triggeredJob is created, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Unique resource name for the triggeredJob, assigned by the service when the
+     * triggeredJob is created, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Unique resource name for the triggeredJob, assigned by the service when the
+     * triggeredJob is created, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * Display name (max 100 chars)
+     * 
+ * + * string display_name = 2; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Display name (max 100 chars)
+     * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Display name (max 100 chars)
+     * 
+ * + * string display_name = 2; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * Display name (max 100 chars)
+     * 
+ * + * string display_name = 2; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * Display name (max 100 chars)
+     * 
+ * + * string display_name = 2; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * User provided description (max 256 chars)
+     * 
+ * + * string description = 3; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * User provided description (max 256 chars)
+     * 
+ * + * string description = 3; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * User provided description (max 256 chars)
+     * 
+ * + * string description = 3; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * User provided description (max 256 chars)
+     * 
+ * + * string description = 3; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * User provided description (max 256 chars)
+     * 
+ * + * string description = 3; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> inspectJobBuilder_; + /** + *
+     * For inspect jobs, a snapshot of the configuration.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + * @return Whether the inspectJob field is set. + */ + @java.lang.Override + public boolean hasInspectJob() { + return jobCase_ == 4; + } + /** + *
+     * For inspect jobs, a snapshot of the configuration.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + * @return The inspectJob. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() { + if (inspectJobBuilder_ == null) { + if (jobCase_ == 4) { + return (com.google.privacy.dlp.v2.InspectJobConfig) job_; + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } else { + if (jobCase_ == 4) { + return inspectJobBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + } + /** + *
+     * For inspect jobs, a snapshot of the configuration.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + */ + public Builder setInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) { + if (inspectJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + job_ = value; + onChanged(); + } else { + inspectJobBuilder_.setMessage(value); + } + jobCase_ = 4; + return this; + } + /** + *
+     * For inspect jobs, a snapshot of the configuration.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + */ + public Builder setInspectJob( + com.google.privacy.dlp.v2.InspectJobConfig.Builder builderForValue) { + if (inspectJobBuilder_ == null) { + job_ = builderForValue.build(); + onChanged(); + } else { + inspectJobBuilder_.setMessage(builderForValue.build()); + } + jobCase_ = 4; + return this; + } + /** + *
+     * For inspect jobs, a snapshot of the configuration.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + */ + public Builder mergeInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) { + if (inspectJobBuilder_ == null) { + if (jobCase_ == 4 && + job_ != com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance()) { + job_ = com.google.privacy.dlp.v2.InspectJobConfig.newBuilder((com.google.privacy.dlp.v2.InspectJobConfig) job_) + .mergeFrom(value).buildPartial(); + } else { + job_ = value; + } + onChanged(); + } else { + if (jobCase_ == 4) { + inspectJobBuilder_.mergeFrom(value); + } else { + inspectJobBuilder_.setMessage(value); + } + } + jobCase_ = 4; + return this; + } + /** + *
+     * For inspect jobs, a snapshot of the configuration.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + */ + public Builder clearInspectJob() { + if (inspectJobBuilder_ == null) { + if (jobCase_ == 4) { + jobCase_ = 0; + job_ = null; + onChanged(); + } + } else { + if (jobCase_ == 4) { + jobCase_ = 0; + job_ = null; + } + inspectJobBuilder_.clear(); + } + return this; + } + /** + *
+     * For inspect jobs, a snapshot of the configuration.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + */ + public com.google.privacy.dlp.v2.InspectJobConfig.Builder getInspectJobBuilder() { + return getInspectJobFieldBuilder().getBuilder(); + } + /** + *
+     * For inspect jobs, a snapshot of the configuration.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() { + if ((jobCase_ == 4) && (inspectJobBuilder_ != null)) { + return inspectJobBuilder_.getMessageOrBuilder(); + } else { + if (jobCase_ == 4) { + return (com.google.privacy.dlp.v2.InspectJobConfig) job_; + } + return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + } + /** + *
+     * For inspect jobs, a snapshot of the configuration.
+     * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> + getInspectJobFieldBuilder() { + if (inspectJobBuilder_ == null) { + if (!(jobCase_ == 4)) { + job_ = com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); + } + inspectJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder>( + (com.google.privacy.dlp.v2.InspectJobConfig) job_, + getParentForChildren(), + isClean()); + job_ = null; + } + jobCase_ = 4; + onChanged();; + return inspectJobBuilder_; + } + + private java.util.List triggers_ = + java.util.Collections.emptyList(); + private void ensureTriggersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + triggers_ = new java.util.ArrayList(triggers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger.Trigger, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder, com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder> triggersBuilder_; + + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public java.util.List getTriggersList() { + if (triggersBuilder_ == null) { + return java.util.Collections.unmodifiableList(triggers_); + } else { + return triggersBuilder_.getMessageList(); + } + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public int getTriggersCount() { + if (triggersBuilder_ == null) { + return triggers_.size(); + } else { + return triggersBuilder_.getCount(); + } + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public com.google.privacy.dlp.v2.JobTrigger.Trigger getTriggers(int index) { + if (triggersBuilder_ == null) { + return triggers_.get(index); + } else { + return triggersBuilder_.getMessage(index); + } + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public Builder setTriggers( + int index, com.google.privacy.dlp.v2.JobTrigger.Trigger value) { + if (triggersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTriggersIsMutable(); + triggers_.set(index, value); + onChanged(); + } else { + triggersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public Builder setTriggers( + int index, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder builderForValue) { + if (triggersBuilder_ == null) { + ensureTriggersIsMutable(); + triggers_.set(index, builderForValue.build()); + onChanged(); + } else { + triggersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public Builder addTriggers(com.google.privacy.dlp.v2.JobTrigger.Trigger value) { + if (triggersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTriggersIsMutable(); + triggers_.add(value); + onChanged(); + } else { + triggersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public Builder addTriggers( + int index, com.google.privacy.dlp.v2.JobTrigger.Trigger value) { + if (triggersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTriggersIsMutable(); + triggers_.add(index, value); + onChanged(); + } else { + triggersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public Builder addTriggers( + com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder builderForValue) { + if (triggersBuilder_ == null) { + ensureTriggersIsMutable(); + triggers_.add(builderForValue.build()); + onChanged(); + } else { + triggersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public Builder addTriggers( + int index, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder builderForValue) { + if (triggersBuilder_ == null) { + ensureTriggersIsMutable(); + triggers_.add(index, builderForValue.build()); + onChanged(); + } else { + triggersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public Builder addAllTriggers( + java.lang.Iterable values) { + if (triggersBuilder_ == null) { + ensureTriggersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, triggers_); + onChanged(); + } else { + triggersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public Builder clearTriggers() { + if (triggersBuilder_ == null) { + triggers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + triggersBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public Builder removeTriggers(int index) { + if (triggersBuilder_ == null) { + ensureTriggersIsMutable(); + triggers_.remove(index); + onChanged(); + } else { + triggersBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder getTriggersBuilder( + int index) { + return getTriggersFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder getTriggersOrBuilder( + int index) { + if (triggersBuilder_ == null) { + return triggers_.get(index); } else { + return triggersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public java.util.List + getTriggersOrBuilderList() { + if (triggersBuilder_ != null) { + return triggersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(triggers_); + } + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder addTriggersBuilder() { + return getTriggersFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.JobTrigger.Trigger.getDefaultInstance()); + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder addTriggersBuilder( + int index) { + return getTriggersFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.JobTrigger.Trigger.getDefaultInstance()); + } + /** + *
+     * A list of triggers which will be OR'ed together. Only one in the list
+     * needs to trigger for a job to be started. The list may contain only
+     * a single Schedule trigger and must have at least one object.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + public java.util.List + getTriggersBuilderList() { + return getTriggersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger.Trigger, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder, com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder> + getTriggersFieldBuilder() { + if (triggersBuilder_ == null) { + triggersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger.Trigger, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder, com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder>( + triggers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + triggers_ = null; + } + return triggersBuilder_; + } + + private java.util.List errors_ = + java.util.Collections.emptyList(); + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + errors_ = new java.util.ArrayList(errors_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> errorsBuilder_; + + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.privacy.dlp.v2.Error getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setErrors( + int index, com.google.privacy.dlp.v2.Error value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setErrors( + int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addErrors(com.google.privacy.dlp.v2.Error value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addErrors( + int index, com.google.privacy.dlp.v2.Error value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addErrors( + com.google.privacy.dlp.v2.Error.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addErrors( + int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder addAllErrors( + java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.privacy.dlp.v2.Error.Builder getErrorsBuilder( + int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( + int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder() { + return getErrorsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Error.getDefaultInstance()); + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder( + int index) { + return getErrorsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Error.getDefaultInstance()); + } + /** + *
+     * Output only. A stream of errors encountered when the trigger was activated. Repeated
+     * errors may result in the JobTrigger automatically being paused.
+     * Will return the last 100 errors. Whenever the JobTrigger is modified
+     * this list will be cleared.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public java.util.List + getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder>( + errors_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The creation timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. The creation timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The creation timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The creation timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The creation timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The creation timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * Output only. The last update timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * Output only. The last update timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The last update timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The last update timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The last update timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * Output only. The last update timestamp of a triggeredJob.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp lastRunTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastRunTimeBuilder_; + /** + *
+     * Output only. The timestamp of the last time this trigger executed.
+     * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the lastRunTime field is set. + */ + public boolean hasLastRunTime() { + return lastRunTimeBuilder_ != null || lastRunTime_ != null; + } + /** + *
+     * Output only. The timestamp of the last time this trigger executed.
+     * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The lastRunTime. + */ + public com.google.protobuf.Timestamp getLastRunTime() { + if (lastRunTimeBuilder_ == null) { + return lastRunTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastRunTime_; + } else { + return lastRunTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The timestamp of the last time this trigger executed.
+     * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setLastRunTime(com.google.protobuf.Timestamp value) { + if (lastRunTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastRunTime_ = value; + onChanged(); + } else { + lastRunTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The timestamp of the last time this trigger executed.
+     * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setLastRunTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastRunTimeBuilder_ == null) { + lastRunTime_ = builderForValue.build(); + onChanged(); + } else { + lastRunTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The timestamp of the last time this trigger executed.
+     * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeLastRunTime(com.google.protobuf.Timestamp value) { + if (lastRunTimeBuilder_ == null) { + if (lastRunTime_ != null) { + lastRunTime_ = + com.google.protobuf.Timestamp.newBuilder(lastRunTime_).mergeFrom(value).buildPartial(); + } else { + lastRunTime_ = value; + } + onChanged(); + } else { + lastRunTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The timestamp of the last time this trigger executed.
+     * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearLastRunTime() { + if (lastRunTimeBuilder_ == null) { + lastRunTime_ = null; + onChanged(); + } else { + lastRunTime_ = null; + lastRunTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The timestamp of the last time this trigger executed.
+     * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getLastRunTimeBuilder() { + + onChanged(); + return getLastRunTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The timestamp of the last time this trigger executed.
+     * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getLastRunTimeOrBuilder() { + if (lastRunTimeBuilder_ != null) { + return lastRunTimeBuilder_.getMessageOrBuilder(); + } else { + return lastRunTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : lastRunTime_; + } + } + /** + *
+     * Output only. The timestamp of the last time this trigger executed.
+     * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getLastRunTimeFieldBuilder() { + if (lastRunTimeBuilder_ == null) { + lastRunTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getLastRunTime(), + getParentForChildren(), + isClean()); + lastRunTime_ = null; + } + return lastRunTimeBuilder_; + } + + private int status_ = 0; + /** + *
+     * Required. A status for this trigger.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override public int getStatusValue() { + return status_; + } + /** + *
+     * Required. A status for this trigger.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. A status for this trigger.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return The status. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger.Status getStatus() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.JobTrigger.Status result = com.google.privacy.dlp.v2.JobTrigger.Status.valueOf(status_); + return result == null ? com.google.privacy.dlp.v2.JobTrigger.Status.UNRECOGNIZED : result; + } + /** + *
+     * Required. A status for this trigger.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(com.google.privacy.dlp.v2.JobTrigger.Status value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Required. A status for this trigger.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.JobTrigger) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.JobTrigger) + private static final com.google.privacy.dlp.v2.JobTrigger DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.JobTrigger(); + } + + public static com.google.privacy.dlp.v2.JobTrigger getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JobTrigger parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new JobTrigger(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerName.java new file mode 100644 index 000000000000..b523f65a8272 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerName.java @@ -0,0 +1,313 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class JobTriggerName implements ResourceName { + private static final PathTemplate PROJECT_JOB_TRIGGER = + PathTemplate.createWithoutUrlEncoding("projects/{project}/jobTriggers/{job_trigger}"); + private static final PathTemplate PROJECT_LOCATION_JOB_TRIGGER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/jobTriggers/{job_trigger}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String jobTrigger; + private final String location; + + @Deprecated + protected JobTriggerName() { + project = null; + jobTrigger = null; + location = null; + } + + private JobTriggerName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + jobTrigger = Preconditions.checkNotNull(builder.getJobTrigger()); + location = null; + pathTemplate = PROJECT_JOB_TRIGGER; + } + + private JobTriggerName(ProjectLocationJobTriggerBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + jobTrigger = Preconditions.checkNotNull(builder.getJobTrigger()); + pathTemplate = PROJECT_LOCATION_JOB_TRIGGER; + } + + public String getProject() { + return project; + } + + public String getJobTrigger() { + return jobTrigger; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectJobTriggerBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationJobTriggerBuilder newProjectLocationJobTriggerBuilder() { + return new ProjectLocationJobTriggerBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static JobTriggerName of(String project, String jobTrigger) { + return newBuilder().setProject(project).setJobTrigger(jobTrigger).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static JobTriggerName ofProjectJobTriggerName(String project, String jobTrigger) { + return newBuilder().setProject(project).setJobTrigger(jobTrigger).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static JobTriggerName ofProjectLocationJobTriggerName( + String project, String location, String jobTrigger) { + return newProjectLocationJobTriggerBuilder() + .setProject(project) + .setLocation(location) + .setJobTrigger(jobTrigger) + .build(); + } + + public static String format(String project, String jobTrigger) { + return newBuilder().setProject(project).setJobTrigger(jobTrigger).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectJobTriggerName(String project, String jobTrigger) { + return newBuilder().setProject(project).setJobTrigger(jobTrigger).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationJobTriggerName( + String project, String location, String jobTrigger) { + return newProjectLocationJobTriggerBuilder() + .setProject(project) + .setLocation(location) + .setJobTrigger(jobTrigger) + .build() + .toString(); + } + + public static JobTriggerName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_JOB_TRIGGER.matches(formattedString)) { + Map matchMap = PROJECT_JOB_TRIGGER.match(formattedString); + return ofProjectJobTriggerName(matchMap.get("project"), matchMap.get("job_trigger")); + } else if (PROJECT_LOCATION_JOB_TRIGGER.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_JOB_TRIGGER.match(formattedString); + return ofProjectLocationJobTriggerName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("job_trigger")); + } + throw new ValidationException("JobTriggerName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (JobTriggerName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_JOB_TRIGGER.matches(formattedString) + || PROJECT_LOCATION_JOB_TRIGGER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (jobTrigger != null) { + fieldMapBuilder.put("job_trigger", jobTrigger); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + JobTriggerName that = ((JobTriggerName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.jobTrigger, that.jobTrigger) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(jobTrigger); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/jobTriggers/{job_trigger}. */ + public static class Builder { + private String project; + private String jobTrigger; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getJobTrigger() { + return jobTrigger; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setJobTrigger(String jobTrigger) { + this.jobTrigger = jobTrigger; + return this; + } + + private Builder(JobTriggerName jobTriggerName) { + Preconditions.checkArgument( + Objects.equals(jobTriggerName.pathTemplate, PROJECT_JOB_TRIGGER), + "toBuilder is only supported when JobTriggerName has the pattern of projects/{project}/jobTriggers/{job_trigger}"); + this.project = jobTriggerName.project; + this.jobTrigger = jobTriggerName.jobTrigger; + } + + public JobTriggerName build() { + return new JobTriggerName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/jobTriggers/{job_trigger}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationJobTriggerBuilder { + private String project; + private String location; + private String jobTrigger; + + protected ProjectLocationJobTriggerBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getJobTrigger() { + return jobTrigger; + } + + public ProjectLocationJobTriggerBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationJobTriggerBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationJobTriggerBuilder setJobTrigger(String jobTrigger) { + this.jobTrigger = jobTrigger; + return this; + } + + public JobTriggerName build() { + return new JobTriggerName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerOrBuilder.java new file mode 100644 index 000000000000..399e0b464629 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerOrBuilder.java @@ -0,0 +1,315 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface JobTriggerOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.JobTrigger) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Unique resource name for the triggeredJob, assigned by the service when the
+   * triggeredJob is created, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Unique resource name for the triggeredJob, assigned by the service when the
+   * triggeredJob is created, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Display name (max 100 chars)
+   * 
+ * + * string display_name = 2; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * Display name (max 100 chars)
+   * 
+ * + * string display_name = 2; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * User provided description (max 256 chars)
+   * 
+ * + * string description = 3; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * User provided description (max 256 chars)
+   * 
+ * + * string description = 3; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * For inspect jobs, a snapshot of the configuration.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + * @return Whether the inspectJob field is set. + */ + boolean hasInspectJob(); + /** + *
+   * For inspect jobs, a snapshot of the configuration.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + * @return The inspectJob. + */ + com.google.privacy.dlp.v2.InspectJobConfig getInspectJob(); + /** + *
+   * For inspect jobs, a snapshot of the configuration.
+   * 
+ * + * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; + */ + com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder(); + + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + java.util.List + getTriggersList(); + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + com.google.privacy.dlp.v2.JobTrigger.Trigger getTriggers(int index); + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + int getTriggersCount(); + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + java.util.List + getTriggersOrBuilderList(); + /** + *
+   * A list of triggers which will be OR'ed together. Only one in the list
+   * needs to trigger for a job to be started. The list may contain only
+   * a single Schedule trigger and must have at least one object.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; + */ + com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder getTriggersOrBuilder( + int index); + + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getErrorsList(); + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.privacy.dlp.v2.Error getErrors(int index); + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getErrorsCount(); + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.List + getErrorsOrBuilderList(); + /** + *
+   * Output only. A stream of errors encountered when the trigger was activated. Repeated
+   * errors may result in the JobTrigger automatically being paused.
+   * Will return the last 100 errors. Whenever the JobTrigger is modified
+   * this list will be cleared.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( + int index); + + /** + *
+   * Output only. The creation timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The creation timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The creation timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The last update timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * Output only. The last update timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * Output only. The last update timestamp of a triggeredJob.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * Output only. The timestamp of the last time this trigger executed.
+   * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the lastRunTime field is set. + */ + boolean hasLastRunTime(); + /** + *
+   * Output only. The timestamp of the last time this trigger executed.
+   * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The lastRunTime. + */ + com.google.protobuf.Timestamp getLastRunTime(); + /** + *
+   * Output only. The timestamp of the last time this trigger executed.
+   * 
+ * + * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getLastRunTimeOrBuilder(); + + /** + *
+   * Required. A status for this trigger.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + *
+   * Required. A status for this trigger.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return The status. + */ + com.google.privacy.dlp.v2.JobTrigger.Status getStatus(); + + public com.google.privacy.dlp.v2.JobTrigger.JobCase getJobCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Key.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Key.java new file mode 100644 index 000000000000..4772756c2247 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Key.java @@ -0,0 +1,2449 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A unique identifier for a Datastore entity.
+ * If a key's partition ID or any of its path kinds or names are
+ * reserved/read-only, the key is reserved/read-only.
+ * A reserved/read-only key is forbidden in certain documented contexts.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Key} + */ +public final class Key extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Key) + KeyOrBuilder { +private static final long serialVersionUID = 0L; + // Use Key.newBuilder() to construct. + private Key(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Key() { + path_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Key(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Key( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.PartitionId.Builder subBuilder = null; + if (partitionId_ != null) { + subBuilder = partitionId_.toBuilder(); + } + partitionId_ = input.readMessage(com.google.privacy.dlp.v2.PartitionId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(partitionId_); + partitionId_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + path_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + path_.add( + input.readMessage(com.google.privacy.dlp.v2.Key.PathElement.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + path_ = java.util.Collections.unmodifiableList(path_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Key.class, com.google.privacy.dlp.v2.Key.Builder.class); + } + + public interface PathElementOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Key.PathElement) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The kind of the entity.
+     * A kind matching regex `__.*__` is reserved/read-only.
+     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string kind = 1; + * @return The kind. + */ + java.lang.String getKind(); + /** + *
+     * The kind of the entity.
+     * A kind matching regex `__.*__` is reserved/read-only.
+     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string kind = 1; + * @return The bytes for kind. + */ + com.google.protobuf.ByteString + getKindBytes(); + + /** + *
+     * The auto-allocated ID of the entity.
+     * Never equal to zero. Values less than zero are discouraged and may not
+     * be supported in the future.
+     * 
+ * + * int64 id = 2; + * @return Whether the id field is set. + */ + boolean hasId(); + /** + *
+     * The auto-allocated ID of the entity.
+     * Never equal to zero. Values less than zero are discouraged and may not
+     * be supported in the future.
+     * 
+ * + * int64 id = 2; + * @return The id. + */ + long getId(); + + /** + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string name = 3; + * @return Whether the name field is set. + */ + boolean hasName(); + /** + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + public com.google.privacy.dlp.v2.Key.PathElement.IdTypeCase getIdTypeCase(); + } + /** + *
+   * A (kind, ID/name) pair used to construct a key path.
+   * If either name or ID is set, the element is complete.
+   * If neither is set, the element is incomplete.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Key.PathElement} + */ + public static final class PathElement extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Key.PathElement) + PathElementOrBuilder { + private static final long serialVersionUID = 0L; + // Use PathElement.newBuilder() to construct. + private PathElement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PathElement() { + kind_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PathElement(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PathElement( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + kind_ = s; + break; + } + case 16: { + idType_ = input.readInt64(); + idTypeCase_ = 2; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + idTypeCase_ = 3; + idType_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Key.PathElement.class, com.google.privacy.dlp.v2.Key.PathElement.Builder.class); + } + + private int idTypeCase_ = 0; + private java.lang.Object idType_; + public enum IdTypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ID(2), + NAME(3), + IDTYPE_NOT_SET(0); + private final int value; + private IdTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IdTypeCase valueOf(int value) { + return forNumber(value); + } + + public static IdTypeCase forNumber(int value) { + switch (value) { + case 2: return ID; + case 3: return NAME; + case 0: return IDTYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public IdTypeCase + getIdTypeCase() { + return IdTypeCase.forNumber( + idTypeCase_); + } + + public static final int KIND_FIELD_NUMBER = 1; + private volatile java.lang.Object kind_; + /** + *
+     * The kind of the entity.
+     * A kind matching regex `__.*__` is reserved/read-only.
+     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string kind = 1; + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + /** + *
+     * The kind of the entity.
+     * A kind matching regex `__.*__` is reserved/read-only.
+     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string kind = 1; + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + /** + *
+     * The auto-allocated ID of the entity.
+     * Never equal to zero. Values less than zero are discouraged and may not
+     * be supported in the future.
+     * 
+ * + * int64 id = 2; + * @return Whether the id field is set. + */ + @java.lang.Override + public boolean hasId() { + return idTypeCase_ == 2; + } + /** + *
+     * The auto-allocated ID of the entity.
+     * Never equal to zero. Values less than zero are discouraged and may not
+     * be supported in the future.
+     * 
+ * + * int64 id = 2; + * @return The id. + */ + @java.lang.Override + public long getId() { + if (idTypeCase_ == 2) { + return (java.lang.Long) idType_; + } + return 0L; + } + + public static final int NAME_FIELD_NUMBER = 3; + /** + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string name = 3; + * @return Whether the name field is set. + */ + public boolean hasName() { + return idTypeCase_ == 3; + } + /** + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string name = 3; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = ""; + if (idTypeCase_ == 3) { + ref = idType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idTypeCase_ == 3) { + idType_ = s; + } + return s; + } + } + /** + *
+     * The name of the entity.
+     * A name matching regex `__.*__` is reserved/read-only.
+     * A name must not be more than 1500 bytes when UTF-8 encoded.
+     * Cannot be `""`.
+     * 
+ * + * string name = 3; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = ""; + if (idTypeCase_ == 3) { + ref = idType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idTypeCase_ == 3) { + idType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_); + } + if (idTypeCase_ == 2) { + output.writeInt64( + 2, (long)((java.lang.Long) idType_)); + } + if (idTypeCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, idType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_); + } + if (idTypeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size( + 2, (long)((java.lang.Long) idType_)); + } + if (idTypeCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, idType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Key.PathElement)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Key.PathElement other = (com.google.privacy.dlp.v2.Key.PathElement) obj; + + if (!getKind() + .equals(other.getKind())) return false; + if (!getIdTypeCase().equals(other.getIdTypeCase())) return false; + switch (idTypeCase_) { + case 2: + if (getId() + != other.getId()) return false; + break; + case 3: + if (!getName() + .equals(other.getName())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + switch (idTypeCase_) { + case 2: + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getId()); + break; + case 3: + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Key.PathElement prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A (kind, ID/name) pair used to construct a key path.
+     * If either name or ID is set, the element is complete.
+     * If neither is set, the element is incomplete.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Key.PathElement} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Key.PathElement) + com.google.privacy.dlp.v2.Key.PathElementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Key.PathElement.class, com.google.privacy.dlp.v2.Key.PathElement.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Key.PathElement.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + kind_ = ""; + + idTypeCase_ = 0; + idType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Key.PathElement getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Key.PathElement.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Key.PathElement build() { + com.google.privacy.dlp.v2.Key.PathElement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Key.PathElement buildPartial() { + com.google.privacy.dlp.v2.Key.PathElement result = new com.google.privacy.dlp.v2.Key.PathElement(this); + result.kind_ = kind_; + if (idTypeCase_ == 2) { + result.idType_ = idType_; + } + if (idTypeCase_ == 3) { + result.idType_ = idType_; + } + result.idTypeCase_ = idTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Key.PathElement) { + return mergeFrom((com.google.privacy.dlp.v2.Key.PathElement)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Key.PathElement other) { + if (other == com.google.privacy.dlp.v2.Key.PathElement.getDefaultInstance()) return this; + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + onChanged(); + } + switch (other.getIdTypeCase()) { + case ID: { + setId(other.getId()); + break; + } + case NAME: { + idTypeCase_ = 3; + idType_ = other.idType_; + onChanged(); + break; + } + case IDTYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Key.PathElement parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Key.PathElement) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int idTypeCase_ = 0; + private java.lang.Object idType_; + public IdTypeCase + getIdTypeCase() { + return IdTypeCase.forNumber( + idTypeCase_); + } + + public Builder clearIdType() { + idTypeCase_ = 0; + idType_ = null; + onChanged(); + return this; + } + + + private java.lang.Object kind_ = ""; + /** + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string kind = 1; + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string kind = 1; + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString + getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string kind = 1; + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kind_ = value; + onChanged(); + return this; + } + /** + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string kind = 1; + * @return This builder for chaining. + */ + public Builder clearKind() { + + kind_ = getDefaultInstance().getKind(); + onChanged(); + return this; + } + /** + *
+       * The kind of the entity.
+       * A kind matching regex `__.*__` is reserved/read-only.
+       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string kind = 1; + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kind_ = value; + onChanged(); + return this; + } + + /** + *
+       * The auto-allocated ID of the entity.
+       * Never equal to zero. Values less than zero are discouraged and may not
+       * be supported in the future.
+       * 
+ * + * int64 id = 2; + * @return Whether the id field is set. + */ + public boolean hasId() { + return idTypeCase_ == 2; + } + /** + *
+       * The auto-allocated ID of the entity.
+       * Never equal to zero. Values less than zero are discouraged and may not
+       * be supported in the future.
+       * 
+ * + * int64 id = 2; + * @return The id. + */ + public long getId() { + if (idTypeCase_ == 2) { + return (java.lang.Long) idType_; + } + return 0L; + } + /** + *
+       * The auto-allocated ID of the entity.
+       * Never equal to zero. Values less than zero are discouraged and may not
+       * be supported in the future.
+       * 
+ * + * int64 id = 2; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + idTypeCase_ = 2; + idType_ = value; + onChanged(); + return this; + } + /** + *
+       * The auto-allocated ID of the entity.
+       * Never equal to zero. Values less than zero are discouraged and may not
+       * be supported in the future.
+       * 
+ * + * int64 id = 2; + * @return This builder for chaining. + */ + public Builder clearId() { + if (idTypeCase_ == 2) { + idTypeCase_ = 0; + idType_ = null; + onChanged(); + } + return this; + } + + /** + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string name = 3; + * @return Whether the name field is set. + */ + @java.lang.Override + public boolean hasName() { + return idTypeCase_ == 3; + } + /** + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string name = 3; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = ""; + if (idTypeCase_ == 3) { + ref = idType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (idTypeCase_ == 3) { + idType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string name = 3; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = ""; + if (idTypeCase_ == 3) { + ref = idType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (idTypeCase_ == 3) { + idType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string name = 3; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + idTypeCase_ = 3; + idType_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + if (idTypeCase_ == 3) { + idTypeCase_ = 0; + idType_ = null; + onChanged(); + } + return this; + } + /** + *
+       * The name of the entity.
+       * A name matching regex `__.*__` is reserved/read-only.
+       * A name must not be more than 1500 bytes when UTF-8 encoded.
+       * Cannot be `""`.
+       * 
+ * + * string name = 3; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + idTypeCase_ = 3; + idType_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Key.PathElement) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Key.PathElement) + private static final com.google.privacy.dlp.v2.Key.PathElement DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Key.PathElement(); + } + + public static com.google.privacy.dlp.v2.Key.PathElement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PathElement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PathElement(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Key.PathElement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PARTITION_ID_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.PartitionId partitionId_; + /** + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return Whether the partitionId field is set. + */ + @java.lang.Override + public boolean hasPartitionId() { + return partitionId_ != null; + } + /** + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return The partitionId. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PartitionId getPartitionId() { + return partitionId_ == null ? com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; + } + /** + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder() { + return getPartitionId(); + } + + public static final int PATH_FIELD_NUMBER = 2; + private java.util.List path_; + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + @java.lang.Override + public java.util.List getPathList() { + return path_; + } + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + @java.lang.Override + public java.util.List + getPathOrBuilderList() { + return path_; + } + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + @java.lang.Override + public int getPathCount() { + return path_.size(); + } + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Key.PathElement getPath(int index) { + return path_.get(index); + } + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Key.PathElementOrBuilder getPathOrBuilder( + int index) { + return path_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (partitionId_ != null) { + output.writeMessage(1, getPartitionId()); + } + for (int i = 0; i < path_.size(); i++) { + output.writeMessage(2, path_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partitionId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPartitionId()); + } + for (int i = 0; i < path_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, path_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Key)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Key other = (com.google.privacy.dlp.v2.Key) obj; + + if (hasPartitionId() != other.hasPartitionId()) return false; + if (hasPartitionId()) { + if (!getPartitionId() + .equals(other.getPartitionId())) return false; + } + if (!getPathList() + .equals(other.getPathList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPartitionId()) { + hash = (37 * hash) + PARTITION_ID_FIELD_NUMBER; + hash = (53 * hash) + getPartitionId().hashCode(); + } + if (getPathCount() > 0) { + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPathList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Key parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Key parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Key parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Key parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Key parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Key parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Key parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Key parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Key prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A unique identifier for a Datastore entity.
+   * If a key's partition ID or any of its path kinds or names are
+   * reserved/read-only, the key is reserved/read-only.
+   * A reserved/read-only key is forbidden in certain documented contexts.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Key} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Key) + com.google.privacy.dlp.v2.KeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Key.class, com.google.privacy.dlp.v2.Key.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Key.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPathFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (partitionIdBuilder_ == null) { + partitionId_ = null; + } else { + partitionId_ = null; + partitionIdBuilder_ = null; + } + if (pathBuilder_ == null) { + path_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pathBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Key getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Key.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Key build() { + com.google.privacy.dlp.v2.Key result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Key buildPartial() { + com.google.privacy.dlp.v2.Key result = new com.google.privacy.dlp.v2.Key(this); + int from_bitField0_ = bitField0_; + if (partitionIdBuilder_ == null) { + result.partitionId_ = partitionId_; + } else { + result.partitionId_ = partitionIdBuilder_.build(); + } + if (pathBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + path_ = java.util.Collections.unmodifiableList(path_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.path_ = path_; + } else { + result.path_ = pathBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Key) { + return mergeFrom((com.google.privacy.dlp.v2.Key)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Key other) { + if (other == com.google.privacy.dlp.v2.Key.getDefaultInstance()) return this; + if (other.hasPartitionId()) { + mergePartitionId(other.getPartitionId()); + } + if (pathBuilder_ == null) { + if (!other.path_.isEmpty()) { + if (path_.isEmpty()) { + path_ = other.path_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePathIsMutable(); + path_.addAll(other.path_); + } + onChanged(); + } + } else { + if (!other.path_.isEmpty()) { + if (pathBuilder_.isEmpty()) { + pathBuilder_.dispose(); + pathBuilder_ = null; + path_ = other.path_; + bitField0_ = (bitField0_ & ~0x00000001); + pathBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPathFieldBuilder() : null; + } else { + pathBuilder_.addAllMessages(other.path_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Key parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Key) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.PartitionId partitionId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder> partitionIdBuilder_; + /** + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return Whether the partitionId field is set. + */ + public boolean hasPartitionId() { + return partitionIdBuilder_ != null || partitionId_ != null; + } + /** + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return The partitionId. + */ + public com.google.privacy.dlp.v2.PartitionId getPartitionId() { + if (partitionIdBuilder_ == null) { + return partitionId_ == null ? com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; + } else { + return partitionIdBuilder_.getMessage(); + } + } + /** + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public Builder setPartitionId(com.google.privacy.dlp.v2.PartitionId value) { + if (partitionIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partitionId_ = value; + onChanged(); + } else { + partitionIdBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public Builder setPartitionId( + com.google.privacy.dlp.v2.PartitionId.Builder builderForValue) { + if (partitionIdBuilder_ == null) { + partitionId_ = builderForValue.build(); + onChanged(); + } else { + partitionIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public Builder mergePartitionId(com.google.privacy.dlp.v2.PartitionId value) { + if (partitionIdBuilder_ == null) { + if (partitionId_ != null) { + partitionId_ = + com.google.privacy.dlp.v2.PartitionId.newBuilder(partitionId_).mergeFrom(value).buildPartial(); + } else { + partitionId_ = value; + } + onChanged(); + } else { + partitionIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public Builder clearPartitionId() { + if (partitionIdBuilder_ == null) { + partitionId_ = null; + onChanged(); + } else { + partitionId_ = null; + partitionIdBuilder_ = null; + } + + return this; + } + /** + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public com.google.privacy.dlp.v2.PartitionId.Builder getPartitionIdBuilder() { + + onChanged(); + return getPartitionIdFieldBuilder().getBuilder(); + } + /** + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + public com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder() { + if (partitionIdBuilder_ != null) { + return partitionIdBuilder_.getMessageOrBuilder(); + } else { + return partitionId_ == null ? + com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; + } + } + /** + *
+     * Entities are partitioned into subsets, currently identified by a project
+     * ID and namespace ID.
+     * Queries are scoped to a single partition.
+     * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder> + getPartitionIdFieldBuilder() { + if (partitionIdBuilder_ == null) { + partitionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder>( + getPartitionId(), + getParentForChildren(), + isClean()); + partitionId_ = null; + } + return partitionIdBuilder_; + } + + private java.util.List path_ = + java.util.Collections.emptyList(); + private void ensurePathIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + path_ = new java.util.ArrayList(path_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Key.PathElement, com.google.privacy.dlp.v2.Key.PathElement.Builder, com.google.privacy.dlp.v2.Key.PathElementOrBuilder> pathBuilder_; + + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public java.util.List getPathList() { + if (pathBuilder_ == null) { + return java.util.Collections.unmodifiableList(path_); + } else { + return pathBuilder_.getMessageList(); + } + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public int getPathCount() { + if (pathBuilder_ == null) { + return path_.size(); + } else { + return pathBuilder_.getCount(); + } + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public com.google.privacy.dlp.v2.Key.PathElement getPath(int index) { + if (pathBuilder_ == null) { + return path_.get(index); + } else { + return pathBuilder_.getMessage(index); + } + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public Builder setPath( + int index, com.google.privacy.dlp.v2.Key.PathElement value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathIsMutable(); + path_.set(index, value); + onChanged(); + } else { + pathBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public Builder setPath( + int index, com.google.privacy.dlp.v2.Key.PathElement.Builder builderForValue) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.set(index, builderForValue.build()); + onChanged(); + } else { + pathBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public Builder addPath(com.google.privacy.dlp.v2.Key.PathElement value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathIsMutable(); + path_.add(value); + onChanged(); + } else { + pathBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public Builder addPath( + int index, com.google.privacy.dlp.v2.Key.PathElement value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathIsMutable(); + path_.add(index, value); + onChanged(); + } else { + pathBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public Builder addPath( + com.google.privacy.dlp.v2.Key.PathElement.Builder builderForValue) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.add(builderForValue.build()); + onChanged(); + } else { + pathBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public Builder addPath( + int index, com.google.privacy.dlp.v2.Key.PathElement.Builder builderForValue) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.add(index, builderForValue.build()); + onChanged(); + } else { + pathBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public Builder addAllPath( + java.lang.Iterable values) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, path_); + onChanged(); + } else { + pathBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public Builder clearPath() { + if (pathBuilder_ == null) { + path_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pathBuilder_.clear(); + } + return this; + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public Builder removePath(int index) { + if (pathBuilder_ == null) { + ensurePathIsMutable(); + path_.remove(index); + onChanged(); + } else { + pathBuilder_.remove(index); + } + return this; + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public com.google.privacy.dlp.v2.Key.PathElement.Builder getPathBuilder( + int index) { + return getPathFieldBuilder().getBuilder(index); + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public com.google.privacy.dlp.v2.Key.PathElementOrBuilder getPathOrBuilder( + int index) { + if (pathBuilder_ == null) { + return path_.get(index); } else { + return pathBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public java.util.List + getPathOrBuilderList() { + if (pathBuilder_ != null) { + return pathBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(path_); + } + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public com.google.privacy.dlp.v2.Key.PathElement.Builder addPathBuilder() { + return getPathFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Key.PathElement.getDefaultInstance()); + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public com.google.privacy.dlp.v2.Key.PathElement.Builder addPathBuilder( + int index) { + return getPathFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Key.PathElement.getDefaultInstance()); + } + /** + *
+     * The entity path.
+     * An entity path consists of one or more elements composed of a kind and a
+     * string or numerical identifier, which identify entities. The first
+     * element identifies a _root entity_, the second element identifies
+     * a _child_ of the root entity, the third element identifies a child of the
+     * second entity, and so forth. The entities identified by all prefixes of
+     * the path are called the element's _ancestors_.
+     * A path can never be empty, and a path can have at most 100 elements.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + public java.util.List + getPathBuilderList() { + return getPathFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Key.PathElement, com.google.privacy.dlp.v2.Key.PathElement.Builder, com.google.privacy.dlp.v2.Key.PathElementOrBuilder> + getPathFieldBuilder() { + if (pathBuilder_ == null) { + pathBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Key.PathElement, com.google.privacy.dlp.v2.Key.PathElement.Builder, com.google.privacy.dlp.v2.Key.PathElementOrBuilder>( + path_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + path_ = null; + } + return pathBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Key) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Key) + private static final com.google.privacy.dlp.v2.Key DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Key(); + } + + public static com.google.privacy.dlp.v2.Key getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Key parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Key(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Key getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KeyOrBuilder.java new file mode 100644 index 000000000000..0a62e436a145 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KeyOrBuilder.java @@ -0,0 +1,121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface KeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Key) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return Whether the partitionId field is set. + */ + boolean hasPartitionId(); + /** + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + * @return The partitionId. + */ + com.google.privacy.dlp.v2.PartitionId getPartitionId(); + /** + *
+   * Entities are partitioned into subsets, currently identified by a project
+   * ID and namespace ID.
+   * Queries are scoped to a single partition.
+   * 
+ * + * .google.privacy.dlp.v2.PartitionId partition_id = 1; + */ + com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder(); + + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + java.util.List + getPathList(); + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + com.google.privacy.dlp.v2.Key.PathElement getPath(int index); + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + int getPathCount(); + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + java.util.List + getPathOrBuilderList(); + /** + *
+   * The entity path.
+   * An entity path consists of one or more elements composed of a kind and a
+   * string or numerical identifier, which identify entities. The first
+   * element identifies a _root entity_, the second element identifies
+   * a _child_ of the root entity, the third element identifies a child of the
+   * second entity, and so forth. The entities identified by all prefixes of
+   * the path are called the element's _ancestors_.
+   * A path can never be empty, and a path can have at most 100 elements.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; + */ + com.google.privacy.dlp.v2.Key.PathElementOrBuilder getPathOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpression.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpression.java new file mode 100644 index 000000000000..67f3b4c7dfcd --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpression.java @@ -0,0 +1,595 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A representation of a Datastore kind.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.KindExpression} + */ +public final class KindExpression extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.KindExpression) + KindExpressionOrBuilder { +private static final long serialVersionUID = 0L; + // Use KindExpression.newBuilder() to construct. + private KindExpression(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KindExpression() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KindExpression(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KindExpression( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.KindExpression.class, com.google.privacy.dlp.v2.KindExpression.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The name of the kind.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the kind.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.KindExpression)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.KindExpression other = (com.google.privacy.dlp.v2.KindExpression) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.KindExpression parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.KindExpression parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KindExpression parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.KindExpression parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KindExpression parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.KindExpression parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KindExpression parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.KindExpression parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KindExpression parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.KindExpression parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KindExpression parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.KindExpression parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.KindExpression prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A representation of a Datastore kind.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.KindExpression} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.KindExpression) + com.google.privacy.dlp.v2.KindExpressionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.KindExpression.class, com.google.privacy.dlp.v2.KindExpression.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.KindExpression.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.KindExpression getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.KindExpression.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.KindExpression build() { + com.google.privacy.dlp.v2.KindExpression result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.KindExpression buildPartial() { + com.google.privacy.dlp.v2.KindExpression result = new com.google.privacy.dlp.v2.KindExpression(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.KindExpression) { + return mergeFrom((com.google.privacy.dlp.v2.KindExpression)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.KindExpression other) { + if (other == com.google.privacy.dlp.v2.KindExpression.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.KindExpression parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.KindExpression) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the kind.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the kind.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the kind.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the kind.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The name of the kind.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.KindExpression) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.KindExpression) + private static final com.google.privacy.dlp.v2.KindExpression DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.KindExpression(); + } + + public static com.google.privacy.dlp.v2.KindExpression getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KindExpression parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KindExpression(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.KindExpression getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpressionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpressionOrBuilder.java new file mode 100644 index 000000000000..42c93757b450 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpressionOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface KindExpressionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.KindExpression) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the kind.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the kind.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKey.java new file mode 100644 index 000000000000..691e82edcaca --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKey.java @@ -0,0 +1,695 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Include to use an existing data crypto key wrapped by KMS.
+ * The wrapped key must be a 128-, 192-, or 256-bit key.
+ * Authorization requires the following IAM permissions when sending a request
+ * to perform a crypto transformation using a KMS-wrapped crypto key:
+ * dlp.kms.encrypt
+ * For more information, see [Creating a wrapped key]
+ * (https://cloud.google.com/dlp/docs/create-wrapped-key).
+ * Note: When you use Cloud KMS for cryptographic operations,
+ * [charges apply](https://cloud.google.com/kms/pricing).
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.KmsWrappedCryptoKey} + */ +public final class KmsWrappedCryptoKey extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.KmsWrappedCryptoKey) + KmsWrappedCryptoKeyOrBuilder { +private static final long serialVersionUID = 0L; + // Use KmsWrappedCryptoKey.newBuilder() to construct. + private KmsWrappedCryptoKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KmsWrappedCryptoKey() { + wrappedKey_ = com.google.protobuf.ByteString.EMPTY; + cryptoKeyName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KmsWrappedCryptoKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KmsWrappedCryptoKey( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + wrappedKey_ = input.readBytes(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + cryptoKeyName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.KmsWrappedCryptoKey.class, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder.class); + } + + public static final int WRAPPED_KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString wrappedKey_; + /** + *
+   * Required. The wrapped data crypto key.
+   * 
+ * + * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The wrappedKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWrappedKey() { + return wrappedKey_; + } + + public static final int CRYPTO_KEY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object cryptoKeyName_; + /** + *
+   * Required. The resource name of the KMS CryptoKey to use for unwrapping.
+   * 
+ * + * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The cryptoKeyName. + */ + @java.lang.Override + public java.lang.String getCryptoKeyName() { + java.lang.Object ref = cryptoKeyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cryptoKeyName_ = s; + return s; + } + } + /** + *
+   * Required. The resource name of the KMS CryptoKey to use for unwrapping.
+   * 
+ * + * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cryptoKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCryptoKeyNameBytes() { + java.lang.Object ref = cryptoKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cryptoKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!wrappedKey_.isEmpty()) { + output.writeBytes(1, wrappedKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cryptoKeyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cryptoKeyName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!wrappedKey_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, wrappedKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cryptoKeyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cryptoKeyName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.KmsWrappedCryptoKey)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.KmsWrappedCryptoKey other = (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) obj; + + if (!getWrappedKey() + .equals(other.getWrappedKey())) return false; + if (!getCryptoKeyName() + .equals(other.getCryptoKeyName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WRAPPED_KEY_FIELD_NUMBER; + hash = (53 * hash) + getWrappedKey().hashCode(); + hash = (37 * hash) + CRYPTO_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCryptoKeyName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.KmsWrappedCryptoKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Include to use an existing data crypto key wrapped by KMS.
+   * The wrapped key must be a 128-, 192-, or 256-bit key.
+   * Authorization requires the following IAM permissions when sending a request
+   * to perform a crypto transformation using a KMS-wrapped crypto key:
+   * dlp.kms.encrypt
+   * For more information, see [Creating a wrapped key]
+   * (https://cloud.google.com/dlp/docs/create-wrapped-key).
+   * Note: When you use Cloud KMS for cryptographic operations,
+   * [charges apply](https://cloud.google.com/kms/pricing).
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.KmsWrappedCryptoKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.KmsWrappedCryptoKey) + com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.KmsWrappedCryptoKey.class, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.KmsWrappedCryptoKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + wrappedKey_ = com.google.protobuf.ByteString.EMPTY; + + cryptoKeyName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.KmsWrappedCryptoKey getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.KmsWrappedCryptoKey build() { + com.google.privacy.dlp.v2.KmsWrappedCryptoKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.KmsWrappedCryptoKey buildPartial() { + com.google.privacy.dlp.v2.KmsWrappedCryptoKey result = new com.google.privacy.dlp.v2.KmsWrappedCryptoKey(this); + result.wrappedKey_ = wrappedKey_; + result.cryptoKeyName_ = cryptoKeyName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.KmsWrappedCryptoKey) { + return mergeFrom((com.google.privacy.dlp.v2.KmsWrappedCryptoKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.KmsWrappedCryptoKey other) { + if (other == com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance()) return this; + if (other.getWrappedKey() != com.google.protobuf.ByteString.EMPTY) { + setWrappedKey(other.getWrappedKey()); + } + if (!other.getCryptoKeyName().isEmpty()) { + cryptoKeyName_ = other.cryptoKeyName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.KmsWrappedCryptoKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString wrappedKey_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Required. The wrapped data crypto key.
+     * 
+ * + * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The wrappedKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWrappedKey() { + return wrappedKey_; + } + /** + *
+     * Required. The wrapped data crypto key.
+     * 
+ * + * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The wrappedKey to set. + * @return This builder for chaining. + */ + public Builder setWrappedKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + wrappedKey_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The wrapped data crypto key.
+     * 
+ * + * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearWrappedKey() { + + wrappedKey_ = getDefaultInstance().getWrappedKey(); + onChanged(); + return this; + } + + private java.lang.Object cryptoKeyName_ = ""; + /** + *
+     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
+     * 
+ * + * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The cryptoKeyName. + */ + public java.lang.String getCryptoKeyName() { + java.lang.Object ref = cryptoKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cryptoKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
+     * 
+ * + * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cryptoKeyName. + */ + public com.google.protobuf.ByteString + getCryptoKeyNameBytes() { + java.lang.Object ref = cryptoKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cryptoKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
+     * 
+ * + * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The cryptoKeyName to set. + * @return This builder for chaining. + */ + public Builder setCryptoKeyName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cryptoKeyName_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
+     * 
+ * + * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearCryptoKeyName() { + + cryptoKeyName_ = getDefaultInstance().getCryptoKeyName(); + onChanged(); + return this; + } + /** + *
+     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
+     * 
+ * + * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for cryptoKeyName to set. + * @return This builder for chaining. + */ + public Builder setCryptoKeyNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cryptoKeyName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.KmsWrappedCryptoKey) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.KmsWrappedCryptoKey) + private static final com.google.privacy.dlp.v2.KmsWrappedCryptoKey DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.KmsWrappedCryptoKey(); + } + + public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KmsWrappedCryptoKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KmsWrappedCryptoKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.KmsWrappedCryptoKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKeyOrBuilder.java new file mode 100644 index 000000000000..3c37dfb4247b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKeyOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface KmsWrappedCryptoKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.KmsWrappedCryptoKey) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The wrapped data crypto key.
+   * 
+ * + * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The wrappedKey. + */ + com.google.protobuf.ByteString getWrappedKey(); + + /** + *
+   * Required. The resource name of the KMS CryptoKey to use for unwrapping.
+   * 
+ * + * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The cryptoKeyName. + */ + java.lang.String getCryptoKeyName(); + /** + *
+   * Required. The resource name of the KMS CryptoKey to use for unwrapping.
+   * 
+ * + * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for cryptoKeyName. + */ + com.google.protobuf.ByteString + getCryptoKeyNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java new file mode 100644 index 000000000000..b0a4fe4c3e4f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java @@ -0,0 +1,1306 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Configuration for a custom dictionary created from a data source of any size
+ * up to the maximum size defined in the
+ * [limits](https://cloud.google.com/dlp/limits) page. The artifacts of
+ * dictionary creation are stored in the specified Cloud Storage
+ * location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries
+ * that satisfy the size requirements.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryConfig} + */ +public final class LargeCustomDictionaryConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.LargeCustomDictionaryConfig) + LargeCustomDictionaryConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use LargeCustomDictionaryConfig.newBuilder() to construct. + private LargeCustomDictionaryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LargeCustomDictionaryConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LargeCustomDictionaryConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LargeCustomDictionaryConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CloudStoragePath.Builder subBuilder = null; + if (outputPath_ != null) { + subBuilder = outputPath_.toBuilder(); + } + outputPath_ = input.readMessage(com.google.privacy.dlp.v2.CloudStoragePath.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputPath_); + outputPath_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.CloudStorageFileSet.Builder subBuilder = null; + if (sourceCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.CloudStorageFileSet) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.privacy.dlp.v2.CloudStorageFileSet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CloudStorageFileSet) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.BigQueryField.Builder subBuilder = null; + if (sourceCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.BigQueryField) source_).toBuilder(); + } + source_ = + input.readMessage(com.google.privacy.dlp.v2.BigQueryField.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryField) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 3; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.class, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + public enum SourceCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_STORAGE_FILE_SET(2), + BIG_QUERY_FIELD(3), + SOURCE_NOT_SET(0); + private final int value; + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: return CLOUD_STORAGE_FILE_SET; + case 3: return BIG_QUERY_FIELD; + case 0: return SOURCE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public static final int OUTPUT_PATH_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.CloudStoragePath outputPath_; + /** + *
+   * Location to store dictionary artifacts in Cloud Storage. These files
+   * will only be accessible by project owners and the DLP API. If any of these
+   * artifacts are modified, the dictionary is considered invalid and can no
+   * longer be used.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + * @return Whether the outputPath field is set. + */ + @java.lang.Override + public boolean hasOutputPath() { + return outputPath_ != null; + } + /** + *
+   * Location to store dictionary artifacts in Cloud Storage. These files
+   * will only be accessible by project owners and the DLP API. If any of these
+   * artifacts are modified, the dictionary is considered invalid and can no
+   * longer be used.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + * @return The outputPath. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePath getOutputPath() { + return outputPath_ == null ? com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() : outputPath_; + } + /** + *
+   * Location to store dictionary artifacts in Cloud Storage. These files
+   * will only be accessible by project owners and the DLP API. If any of these
+   * artifacts are modified, the dictionary is considered invalid and can no
+   * longer be used.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getOutputPathOrBuilder() { + return getOutputPath(); + } + + public static final int CLOUD_STORAGE_FILE_SET_FIELD_NUMBER = 2; + /** + *
+   * Set of files containing newline-delimited lists of dictionary phrases.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + * @return Whether the cloudStorageFileSet field is set. + */ + @java.lang.Override + public boolean hasCloudStorageFileSet() { + return sourceCase_ == 2; + } + /** + *
+   * Set of files containing newline-delimited lists of dictionary phrases.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + * @return The cloudStorageFileSet. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageFileSet getCloudStorageFileSet() { + if (sourceCase_ == 2) { + return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; + } + return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); + } + /** + *
+   * Set of files containing newline-delimited lists of dictionary phrases.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder getCloudStorageFileSetOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; + } + return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); + } + + public static final int BIG_QUERY_FIELD_FIELD_NUMBER = 3; + /** + *
+   * Field in a BigQuery table where each cell represents a dictionary phrase.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + * @return Whether the bigQueryField field is set. + */ + @java.lang.Override + public boolean hasBigQueryField() { + return sourceCase_ == 3; + } + /** + *
+   * Field in a BigQuery table where each cell represents a dictionary phrase.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + * @return The bigQueryField. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryField getBigQueryField() { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.BigQueryField) source_; + } + return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); + } + /** + *
+   * Field in a BigQuery table where each cell represents a dictionary phrase.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryFieldOrBuilder getBigQueryFieldOrBuilder() { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.BigQueryField) source_; + } + return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (outputPath_ != null) { + output.writeMessage(1, getOutputPath()); + } + if (sourceCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.CloudStorageFileSet) source_); + } + if (sourceCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.BigQueryField) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputPath_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getOutputPath()); + } + if (sourceCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.CloudStorageFileSet) source_); + } + if (sourceCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.BigQueryField) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig other = (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) obj; + + if (hasOutputPath() != other.hasOutputPath()) return false; + if (hasOutputPath()) { + if (!getOutputPath() + .equals(other.getOutputPath())) return false; + } + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getCloudStorageFileSet() + .equals(other.getCloudStorageFileSet())) return false; + break; + case 3: + if (!getBigQueryField() + .equals(other.getBigQueryField())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOutputPath()) { + hash = (37 * hash) + OUTPUT_PATH_FIELD_NUMBER; + hash = (53 * hash) + getOutputPath().hashCode(); + } + switch (sourceCase_) { + case 2: + hash = (37 * hash) + CLOUD_STORAGE_FILE_SET_FIELD_NUMBER; + hash = (53 * hash) + getCloudStorageFileSet().hashCode(); + break; + case 3: + hash = (37 * hash) + BIG_QUERY_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getBigQueryField().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration for a custom dictionary created from a data source of any size
+   * up to the maximum size defined in the
+   * [limits](https://cloud.google.com/dlp/limits) page. The artifacts of
+   * dictionary creation are stored in the specified Cloud Storage
+   * location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries
+   * that satisfy the size requirements.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.LargeCustomDictionaryConfig) + com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.class, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (outputPathBuilder_ == null) { + outputPath_ = null; + } else { + outputPath_ = null; + outputPathBuilder_ = null; + } + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig build() { + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig buildPartial() { + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result = new com.google.privacy.dlp.v2.LargeCustomDictionaryConfig(this); + if (outputPathBuilder_ == null) { + result.outputPath_ = outputPath_; + } else { + result.outputPath_ = outputPathBuilder_.build(); + } + if (sourceCase_ == 2) { + if (cloudStorageFileSetBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = cloudStorageFileSetBuilder_.build(); + } + } + if (sourceCase_ == 3) { + if (bigQueryFieldBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = bigQueryFieldBuilder_.build(); + } + } + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) { + return mergeFrom((com.google.privacy.dlp.v2.LargeCustomDictionaryConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig other) { + if (other == com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance()) return this; + if (other.hasOutputPath()) { + mergeOutputPath(other.getOutputPath()); + } + switch (other.getSourceCase()) { + case CLOUD_STORAGE_FILE_SET: { + mergeCloudStorageFileSet(other.getCloudStorageFileSet()); + break; + } + case BIG_QUERY_FIELD: { + mergeBigQueryField(other.getBigQueryField()); + break; + } + case SOURCE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int sourceCase_ = 0; + private java.lang.Object source_; + public SourceCase + getSourceCase() { + return SourceCase.forNumber( + sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + + private com.google.privacy.dlp.v2.CloudStoragePath outputPath_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> outputPathBuilder_; + /** + *
+     * Location to store dictionary artifacts in Cloud Storage. These files
+     * will only be accessible by project owners and the DLP API. If any of these
+     * artifacts are modified, the dictionary is considered invalid and can no
+     * longer be used.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + * @return Whether the outputPath field is set. + */ + public boolean hasOutputPath() { + return outputPathBuilder_ != null || outputPath_ != null; + } + /** + *
+     * Location to store dictionary artifacts in Cloud Storage. These files
+     * will only be accessible by project owners and the DLP API. If any of these
+     * artifacts are modified, the dictionary is considered invalid and can no
+     * longer be used.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + * @return The outputPath. + */ + public com.google.privacy.dlp.v2.CloudStoragePath getOutputPath() { + if (outputPathBuilder_ == null) { + return outputPath_ == null ? com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() : outputPath_; + } else { + return outputPathBuilder_.getMessage(); + } + } + /** + *
+     * Location to store dictionary artifacts in Cloud Storage. These files
+     * will only be accessible by project owners and the DLP API. If any of these
+     * artifacts are modified, the dictionary is considered invalid and can no
+     * longer be used.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + */ + public Builder setOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value) { + if (outputPathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputPath_ = value; + onChanged(); + } else { + outputPathBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Location to store dictionary artifacts in Cloud Storage. These files
+     * will only be accessible by project owners and the DLP API. If any of these
+     * artifacts are modified, the dictionary is considered invalid and can no
+     * longer be used.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + */ + public Builder setOutputPath( + com.google.privacy.dlp.v2.CloudStoragePath.Builder builderForValue) { + if (outputPathBuilder_ == null) { + outputPath_ = builderForValue.build(); + onChanged(); + } else { + outputPathBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Location to store dictionary artifacts in Cloud Storage. These files
+     * will only be accessible by project owners and the DLP API. If any of these
+     * artifacts are modified, the dictionary is considered invalid and can no
+     * longer be used.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + */ + public Builder mergeOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value) { + if (outputPathBuilder_ == null) { + if (outputPath_ != null) { + outputPath_ = + com.google.privacy.dlp.v2.CloudStoragePath.newBuilder(outputPath_).mergeFrom(value).buildPartial(); + } else { + outputPath_ = value; + } + onChanged(); + } else { + outputPathBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Location to store dictionary artifacts in Cloud Storage. These files
+     * will only be accessible by project owners and the DLP API. If any of these
+     * artifacts are modified, the dictionary is considered invalid and can no
+     * longer be used.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + */ + public Builder clearOutputPath() { + if (outputPathBuilder_ == null) { + outputPath_ = null; + onChanged(); + } else { + outputPath_ = null; + outputPathBuilder_ = null; + } + + return this; + } + /** + *
+     * Location to store dictionary artifacts in Cloud Storage. These files
+     * will only be accessible by project owners and the DLP API. If any of these
+     * artifacts are modified, the dictionary is considered invalid and can no
+     * longer be used.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + */ + public com.google.privacy.dlp.v2.CloudStoragePath.Builder getOutputPathBuilder() { + + onChanged(); + return getOutputPathFieldBuilder().getBuilder(); + } + /** + *
+     * Location to store dictionary artifacts in Cloud Storage. These files
+     * will only be accessible by project owners and the DLP API. If any of these
+     * artifacts are modified, the dictionary is considered invalid and can no
+     * longer be used.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + */ + public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getOutputPathOrBuilder() { + if (outputPathBuilder_ != null) { + return outputPathBuilder_.getMessageOrBuilder(); + } else { + return outputPath_ == null ? + com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() : outputPath_; + } + } + /** + *
+     * Location to store dictionary artifacts in Cloud Storage. These files
+     * will only be accessible by project owners and the DLP API. If any of these
+     * artifacts are modified, the dictionary is considered invalid and can no
+     * longer be used.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> + getOutputPathFieldBuilder() { + if (outputPathBuilder_ == null) { + outputPathBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>( + getOutputPath(), + getParentForChildren(), + isClean()); + outputPath_ = null; + } + return outputPathBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageFileSet, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder> cloudStorageFileSetBuilder_; + /** + *
+     * Set of files containing newline-delimited lists of dictionary phrases.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + * @return Whether the cloudStorageFileSet field is set. + */ + @java.lang.Override + public boolean hasCloudStorageFileSet() { + return sourceCase_ == 2; + } + /** + *
+     * Set of files containing newline-delimited lists of dictionary phrases.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + * @return The cloudStorageFileSet. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageFileSet getCloudStorageFileSet() { + if (cloudStorageFileSetBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; + } + return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return cloudStorageFileSetBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); + } + } + /** + *
+     * Set of files containing newline-delimited lists of dictionary phrases.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + */ + public Builder setCloudStorageFileSet(com.google.privacy.dlp.v2.CloudStorageFileSet value) { + if (cloudStorageFileSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + cloudStorageFileSetBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** + *
+     * Set of files containing newline-delimited lists of dictionary phrases.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + */ + public Builder setCloudStorageFileSet( + com.google.privacy.dlp.v2.CloudStorageFileSet.Builder builderForValue) { + if (cloudStorageFileSetBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + cloudStorageFileSetBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + /** + *
+     * Set of files containing newline-delimited lists of dictionary phrases.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + */ + public Builder mergeCloudStorageFileSet(com.google.privacy.dlp.v2.CloudStorageFileSet value) { + if (cloudStorageFileSetBuilder_ == null) { + if (sourceCase_ == 2 && + source_ != com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance()) { + source_ = com.google.privacy.dlp.v2.CloudStorageFileSet.newBuilder((com.google.privacy.dlp.v2.CloudStorageFileSet) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + cloudStorageFileSetBuilder_.mergeFrom(value); + } else { + cloudStorageFileSetBuilder_.setMessage(value); + } + } + sourceCase_ = 2; + return this; + } + /** + *
+     * Set of files containing newline-delimited lists of dictionary phrases.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + */ + public Builder clearCloudStorageFileSet() { + if (cloudStorageFileSetBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + cloudStorageFileSetBuilder_.clear(); + } + return this; + } + /** + *
+     * Set of files containing newline-delimited lists of dictionary phrases.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + */ + public com.google.privacy.dlp.v2.CloudStorageFileSet.Builder getCloudStorageFileSetBuilder() { + return getCloudStorageFileSetFieldBuilder().getBuilder(); + } + /** + *
+     * Set of files containing newline-delimited lists of dictionary phrases.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder getCloudStorageFileSetOrBuilder() { + if ((sourceCase_ == 2) && (cloudStorageFileSetBuilder_ != null)) { + return cloudStorageFileSetBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; + } + return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); + } + } + /** + *
+     * Set of files containing newline-delimited lists of dictionary phrases.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageFileSet, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder> + getCloudStorageFileSetFieldBuilder() { + if (cloudStorageFileSetBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); + } + cloudStorageFileSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageFileSet, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder>( + (com.google.privacy.dlp.v2.CloudStorageFileSet) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged();; + return cloudStorageFileSetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryField, com.google.privacy.dlp.v2.BigQueryField.Builder, com.google.privacy.dlp.v2.BigQueryFieldOrBuilder> bigQueryFieldBuilder_; + /** + *
+     * Field in a BigQuery table where each cell represents a dictionary phrase.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + * @return Whether the bigQueryField field is set. + */ + @java.lang.Override + public boolean hasBigQueryField() { + return sourceCase_ == 3; + } + /** + *
+     * Field in a BigQuery table where each cell represents a dictionary phrase.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + * @return The bigQueryField. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryField getBigQueryField() { + if (bigQueryFieldBuilder_ == null) { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.BigQueryField) source_; + } + return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); + } else { + if (sourceCase_ == 3) { + return bigQueryFieldBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); + } + } + /** + *
+     * Field in a BigQuery table where each cell represents a dictionary phrase.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + */ + public Builder setBigQueryField(com.google.privacy.dlp.v2.BigQueryField value) { + if (bigQueryFieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + bigQueryFieldBuilder_.setMessage(value); + } + sourceCase_ = 3; + return this; + } + /** + *
+     * Field in a BigQuery table where each cell represents a dictionary phrase.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + */ + public Builder setBigQueryField( + com.google.privacy.dlp.v2.BigQueryField.Builder builderForValue) { + if (bigQueryFieldBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + bigQueryFieldBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 3; + return this; + } + /** + *
+     * Field in a BigQuery table where each cell represents a dictionary phrase.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + */ + public Builder mergeBigQueryField(com.google.privacy.dlp.v2.BigQueryField value) { + if (bigQueryFieldBuilder_ == null) { + if (sourceCase_ == 3 && + source_ != com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance()) { + source_ = com.google.privacy.dlp.v2.BigQueryField.newBuilder((com.google.privacy.dlp.v2.BigQueryField) source_) + .mergeFrom(value).buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 3) { + bigQueryFieldBuilder_.mergeFrom(value); + } else { + bigQueryFieldBuilder_.setMessage(value); + } + } + sourceCase_ = 3; + return this; + } + /** + *
+     * Field in a BigQuery table where each cell represents a dictionary phrase.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + */ + public Builder clearBigQueryField() { + if (bigQueryFieldBuilder_ == null) { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 3) { + sourceCase_ = 0; + source_ = null; + } + bigQueryFieldBuilder_.clear(); + } + return this; + } + /** + *
+     * Field in a BigQuery table where each cell represents a dictionary phrase.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + */ + public com.google.privacy.dlp.v2.BigQueryField.Builder getBigQueryFieldBuilder() { + return getBigQueryFieldFieldBuilder().getBuilder(); + } + /** + *
+     * Field in a BigQuery table where each cell represents a dictionary phrase.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryFieldOrBuilder getBigQueryFieldOrBuilder() { + if ((sourceCase_ == 3) && (bigQueryFieldBuilder_ != null)) { + return bigQueryFieldBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 3) { + return (com.google.privacy.dlp.v2.BigQueryField) source_; + } + return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); + } + } + /** + *
+     * Field in a BigQuery table where each cell represents a dictionary phrase.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryField, com.google.privacy.dlp.v2.BigQueryField.Builder, com.google.privacy.dlp.v2.BigQueryFieldOrBuilder> + getBigQueryFieldFieldBuilder() { + if (bigQueryFieldBuilder_ == null) { + if (!(sourceCase_ == 3)) { + source_ = com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); + } + bigQueryFieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryField, com.google.privacy.dlp.v2.BigQueryField.Builder, com.google.privacy.dlp.v2.BigQueryFieldOrBuilder>( + (com.google.privacy.dlp.v2.BigQueryField) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 3; + onChanged();; + return bigQueryFieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.LargeCustomDictionaryConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.LargeCustomDictionaryConfig) + private static final com.google.privacy.dlp.v2.LargeCustomDictionaryConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.LargeCustomDictionaryConfig(); + } + + public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LargeCustomDictionaryConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LargeCustomDictionaryConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java new file mode 100644 index 000000000000..3a7a606fb585 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java @@ -0,0 +1,101 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface LargeCustomDictionaryConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.LargeCustomDictionaryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Location to store dictionary artifacts in Cloud Storage. These files
+   * will only be accessible by project owners and the DLP API. If any of these
+   * artifacts are modified, the dictionary is considered invalid and can no
+   * longer be used.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + * @return Whether the outputPath field is set. + */ + boolean hasOutputPath(); + /** + *
+   * Location to store dictionary artifacts in Cloud Storage. These files
+   * will only be accessible by project owners and the DLP API. If any of these
+   * artifacts are modified, the dictionary is considered invalid and can no
+   * longer be used.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + * @return The outputPath. + */ + com.google.privacy.dlp.v2.CloudStoragePath getOutputPath(); + /** + *
+   * Location to store dictionary artifacts in Cloud Storage. These files
+   * will only be accessible by project owners and the DLP API. If any of these
+   * artifacts are modified, the dictionary is considered invalid and can no
+   * longer be used.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; + */ + com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getOutputPathOrBuilder(); + + /** + *
+   * Set of files containing newline-delimited lists of dictionary phrases.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + * @return Whether the cloudStorageFileSet field is set. + */ + boolean hasCloudStorageFileSet(); + /** + *
+   * Set of files containing newline-delimited lists of dictionary phrases.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + * @return The cloudStorageFileSet. + */ + com.google.privacy.dlp.v2.CloudStorageFileSet getCloudStorageFileSet(); + /** + *
+   * Set of files containing newline-delimited lists of dictionary phrases.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; + */ + com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder getCloudStorageFileSetOrBuilder(); + + /** + *
+   * Field in a BigQuery table where each cell represents a dictionary phrase.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + * @return Whether the bigQueryField field is set. + */ + boolean hasBigQueryField(); + /** + *
+   * Field in a BigQuery table where each cell represents a dictionary phrase.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + * @return The bigQueryField. + */ + com.google.privacy.dlp.v2.BigQueryField getBigQueryField(); + /** + *
+   * Field in a BigQuery table where each cell represents a dictionary phrase.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; + */ + com.google.privacy.dlp.v2.BigQueryFieldOrBuilder getBigQueryFieldOrBuilder(); + + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.SourceCase getSourceCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStats.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStats.java new file mode 100644 index 000000000000..78632a2cb6b6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStats.java @@ -0,0 +1,510 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Summary statistics of a custom dictionary.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryStats} + */ +public final class LargeCustomDictionaryStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.LargeCustomDictionaryStats) + LargeCustomDictionaryStatsOrBuilder { +private static final long serialVersionUID = 0L; + // Use LargeCustomDictionaryStats.newBuilder() to construct. + private LargeCustomDictionaryStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LargeCustomDictionaryStats() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LargeCustomDictionaryStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LargeCustomDictionaryStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + approxNumPhrases_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.LargeCustomDictionaryStats.class, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder.class); + } + + public static final int APPROX_NUM_PHRASES_FIELD_NUMBER = 1; + private long approxNumPhrases_; + /** + *
+   * Approximate number of distinct phrases in the dictionary.
+   * 
+ * + * int64 approx_num_phrases = 1; + * @return The approxNumPhrases. + */ + @java.lang.Override + public long getApproxNumPhrases() { + return approxNumPhrases_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (approxNumPhrases_ != 0L) { + output.writeInt64(1, approxNumPhrases_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (approxNumPhrases_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, approxNumPhrases_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryStats)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.LargeCustomDictionaryStats other = (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) obj; + + if (getApproxNumPhrases() + != other.getApproxNumPhrases()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APPROX_NUM_PHRASES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getApproxNumPhrases()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.LargeCustomDictionaryStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Summary statistics of a custom dictionary.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.LargeCustomDictionaryStats) + com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.LargeCustomDictionaryStats.class, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.LargeCustomDictionaryStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + approxNumPhrases_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryStats getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryStats build() { + com.google.privacy.dlp.v2.LargeCustomDictionaryStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryStats buildPartial() { + com.google.privacy.dlp.v2.LargeCustomDictionaryStats result = new com.google.privacy.dlp.v2.LargeCustomDictionaryStats(this); + result.approxNumPhrases_ = approxNumPhrases_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryStats) { + return mergeFrom((com.google.privacy.dlp.v2.LargeCustomDictionaryStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.LargeCustomDictionaryStats other) { + if (other == com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance()) return this; + if (other.getApproxNumPhrases() != 0L) { + setApproxNumPhrases(other.getApproxNumPhrases()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.LargeCustomDictionaryStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long approxNumPhrases_ ; + /** + *
+     * Approximate number of distinct phrases in the dictionary.
+     * 
+ * + * int64 approx_num_phrases = 1; + * @return The approxNumPhrases. + */ + @java.lang.Override + public long getApproxNumPhrases() { + return approxNumPhrases_; + } + /** + *
+     * Approximate number of distinct phrases in the dictionary.
+     * 
+ * + * int64 approx_num_phrases = 1; + * @param value The approxNumPhrases to set. + * @return This builder for chaining. + */ + public Builder setApproxNumPhrases(long value) { + + approxNumPhrases_ = value; + onChanged(); + return this; + } + /** + *
+     * Approximate number of distinct phrases in the dictionary.
+     * 
+ * + * int64 approx_num_phrases = 1; + * @return This builder for chaining. + */ + public Builder clearApproxNumPhrases() { + + approxNumPhrases_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.LargeCustomDictionaryStats) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.LargeCustomDictionaryStats) + private static final com.google.privacy.dlp.v2.LargeCustomDictionaryStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.LargeCustomDictionaryStats(); + } + + public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LargeCustomDictionaryStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LargeCustomDictionaryStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStatsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStatsOrBuilder.java new file mode 100644 index 000000000000..d61c9bc31dd4 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStatsOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface LargeCustomDictionaryStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.LargeCustomDictionaryStats) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Approximate number of distinct phrases in the dictionary.
+   * 
+ * + * int64 approx_num_phrases = 1; + * @return The approxNumPhrases. + */ + long getApproxNumPhrases(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java new file mode 100644 index 000000000000..61805ff768ec --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java @@ -0,0 +1,186 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Categorization of results based on how likely they are to represent a match,
+ * based on the number of elements they contain which imply a match.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.Likelihood} + */ +public enum Likelihood + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Default value; same as POSSIBLE.
+   * 
+ * + * LIKELIHOOD_UNSPECIFIED = 0; + */ + LIKELIHOOD_UNSPECIFIED(0), + /** + *
+   * Few matching elements.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + VERY_UNLIKELY(1), + /** + * UNLIKELY = 2; + */ + UNLIKELY(2), + /** + *
+   * Some matching elements.
+   * 
+ * + * POSSIBLE = 3; + */ + POSSIBLE(3), + /** + * LIKELY = 4; + */ + LIKELY(4), + /** + *
+   * Many matching elements.
+   * 
+ * + * VERY_LIKELY = 5; + */ + VERY_LIKELY(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Default value; same as POSSIBLE.
+   * 
+ * + * LIKELIHOOD_UNSPECIFIED = 0; + */ + public static final int LIKELIHOOD_UNSPECIFIED_VALUE = 0; + /** + *
+   * Few matching elements.
+   * 
+ * + * VERY_UNLIKELY = 1; + */ + public static final int VERY_UNLIKELY_VALUE = 1; + /** + * UNLIKELY = 2; + */ + public static final int UNLIKELY_VALUE = 2; + /** + *
+   * Some matching elements.
+   * 
+ * + * POSSIBLE = 3; + */ + public static final int POSSIBLE_VALUE = 3; + /** + * LIKELY = 4; + */ + public static final int LIKELY_VALUE = 4; + /** + *
+   * Many matching elements.
+   * 
+ * + * VERY_LIKELY = 5; + */ + public static final int VERY_LIKELY_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Likelihood valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Likelihood forNumber(int value) { + switch (value) { + case 0: return LIKELIHOOD_UNSPECIFIED; + case 1: return VERY_UNLIKELY; + case 2: return UNLIKELY; + case 3: return POSSIBLE; + case 4: return LIKELY; + case 5: return VERY_LIKELY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Likelihood> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Likelihood findValueByNumber(int number) { + return Likelihood.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.getDescriptor().getEnumTypes().get(0); + } + + private static final Likelihood[] VALUES = values(); + + public static Likelihood valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Likelihood(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.Likelihood) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java new file mode 100644 index 000000000000..08a8f5fd8998 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java @@ -0,0 +1,1352 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for ListDeidentifyTemplates.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} + */ +public final class ListDeidentifyTemplatesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) + ListDeidentifyTemplatesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListDeidentifyTemplatesRequest.newBuilder() to construct. + private ListDeidentifyTemplatesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListDeidentifyTemplatesRequest() { + parent_ = ""; + pageToken_ = ""; + orderBy_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListDeidentifyTemplatesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListDeidentifyTemplatesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.class, com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListDeidentifyTemplates`.
+   * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListDeidentifyTemplates`.
+   * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+   * Size of the page, can be limited by the server. If zero server returns
+   * a page of max size 100.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 4; + private volatile java.lang.Object orderBy_; + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the template was created.
+   * - `update_time`: corresponds to the time the template was last updated.
+   * - `name`: corresponds to the template's name.
+   * - `display_name`: corresponds to the template's display name.
+   * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the template was created.
+   * - `update_time`: corresponds to the time the template was last updated.
+   * - `name`: corresponds to the template's name.
+   * - `display_name`: corresponds to the template's display name.
+   * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest other = (com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListDeidentifyTemplates.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.class, com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + orderBy_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest build() { + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest buildPartial() { + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest result = new com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(this); + result.parent_ = parent_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + result.orderBy_ = orderBy_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) { + return mergeFrom((com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest other) { + if (other == com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListDeidentifyTemplates`.
+     * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListDeidentifyTemplates`.
+     * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListDeidentifyTemplates`.
+     * 
+ * + * string page_token = 2; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListDeidentifyTemplates`.
+     * 
+ * + * string page_token = 2; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListDeidentifyTemplates`.
+     * 
+ * + * string page_token = 2; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Size of the page, can be limited by the server. If zero server returns
+     * a page of max size 100.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Size of the page, can be limited by the server. If zero server returns
+     * a page of max size 100.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Size of the page, can be limited by the server. If zero server returns
+     * a page of max size 100.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) + private static final com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(); + } + + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeidentifyTemplatesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDeidentifyTemplatesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java new file mode 100644 index 000000000000..90eccd270045 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListDeidentifyTemplatesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListDeidentifyTemplates`.
+   * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListDeidentifyTemplates`.
+   * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Size of the page, can be limited by the server. If zero server returns
+   * a page of max size 100.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the template was created.
+   * - `update_time`: corresponds to the time the template was last updated.
+   * - `name`: corresponds to the template's name.
+   * - `display_name`: corresponds to the template's display name.
+   * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the template was created.
+   * - `update_time`: corresponds to the time the template was last updated.
+   * - `name`: corresponds to the template's name.
+   * - `display_name`: corresponds to the template's display name.
+   * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponse.java new file mode 100644 index 000000000000..196f26c1aa9d --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponse.java @@ -0,0 +1,1068 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Response message for ListDeidentifyTemplates.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} + */ +public final class ListDeidentifyTemplatesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) + ListDeidentifyTemplatesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListDeidentifyTemplatesResponse.newBuilder() to construct. + private ListDeidentifyTemplatesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListDeidentifyTemplatesResponse() { + deidentifyTemplates_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListDeidentifyTemplatesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListDeidentifyTemplatesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deidentifyTemplates_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deidentifyTemplates_.add( + input.readMessage(com.google.privacy.dlp.v2.DeidentifyTemplate.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deidentifyTemplates_ = java.util.Collections.unmodifiableList(deidentifyTemplates_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.class, com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.Builder.class); + } + + public static final int DEIDENTIFY_TEMPLATES_FIELD_NUMBER = 1; + private java.util.List deidentifyTemplates_; + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + @java.lang.Override + public java.util.List getDeidentifyTemplatesList() { + return deidentifyTemplates_; + } + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + @java.lang.Override + public java.util.List + getDeidentifyTemplatesOrBuilderList() { + return deidentifyTemplates_; + } + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + @java.lang.Override + public int getDeidentifyTemplatesCount() { + return deidentifyTemplates_.size(); + } + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplates(int index) { + return deidentifyTemplates_.get(index); + } + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplatesOrBuilder( + int index) { + return deidentifyTemplates_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListDeidentifyTemplates request.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListDeidentifyTemplates request.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < deidentifyTemplates_.size(); i++) { + output.writeMessage(1, deidentifyTemplates_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < deidentifyTemplates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, deidentifyTemplates_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse other = (com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) obj; + + if (!getDeidentifyTemplatesList() + .equals(other.getDeidentifyTemplatesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeidentifyTemplatesCount() > 0) { + hash = (37 * hash) + DEIDENTIFY_TEMPLATES_FIELD_NUMBER; + hash = (53 * hash) + getDeidentifyTemplatesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListDeidentifyTemplates.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) + com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.class, com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDeidentifyTemplatesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (deidentifyTemplatesBuilder_ == null) { + deidentifyTemplates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deidentifyTemplatesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse build() { + com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse buildPartial() { + com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse result = new com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse(this); + int from_bitField0_ = bitField0_; + if (deidentifyTemplatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deidentifyTemplates_ = java.util.Collections.unmodifiableList(deidentifyTemplates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deidentifyTemplates_ = deidentifyTemplates_; + } else { + result.deidentifyTemplates_ = deidentifyTemplatesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) { + return mergeFrom((com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse other) { + if (other == com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.getDefaultInstance()) return this; + if (deidentifyTemplatesBuilder_ == null) { + if (!other.deidentifyTemplates_.isEmpty()) { + if (deidentifyTemplates_.isEmpty()) { + deidentifyTemplates_ = other.deidentifyTemplates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeidentifyTemplatesIsMutable(); + deidentifyTemplates_.addAll(other.deidentifyTemplates_); + } + onChanged(); + } + } else { + if (!other.deidentifyTemplates_.isEmpty()) { + if (deidentifyTemplatesBuilder_.isEmpty()) { + deidentifyTemplatesBuilder_.dispose(); + deidentifyTemplatesBuilder_ = null; + deidentifyTemplates_ = other.deidentifyTemplates_; + bitField0_ = (bitField0_ & ~0x00000001); + deidentifyTemplatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDeidentifyTemplatesFieldBuilder() : null; + } else { + deidentifyTemplatesBuilder_.addAllMessages(other.deidentifyTemplates_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List deidentifyTemplates_ = + java.util.Collections.emptyList(); + private void ensureDeidentifyTemplatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deidentifyTemplates_ = new java.util.ArrayList(deidentifyTemplates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> deidentifyTemplatesBuilder_; + + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public java.util.List getDeidentifyTemplatesList() { + if (deidentifyTemplatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(deidentifyTemplates_); + } else { + return deidentifyTemplatesBuilder_.getMessageList(); + } + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public int getDeidentifyTemplatesCount() { + if (deidentifyTemplatesBuilder_ == null) { + return deidentifyTemplates_.size(); + } else { + return deidentifyTemplatesBuilder_.getCount(); + } + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplates(int index) { + if (deidentifyTemplatesBuilder_ == null) { + return deidentifyTemplates_.get(index); + } else { + return deidentifyTemplatesBuilder_.getMessage(index); + } + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public Builder setDeidentifyTemplates( + int index, com.google.privacy.dlp.v2.DeidentifyTemplate value) { + if (deidentifyTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeidentifyTemplatesIsMutable(); + deidentifyTemplates_.set(index, value); + onChanged(); + } else { + deidentifyTemplatesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public Builder setDeidentifyTemplates( + int index, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { + if (deidentifyTemplatesBuilder_ == null) { + ensureDeidentifyTemplatesIsMutable(); + deidentifyTemplates_.set(index, builderForValue.build()); + onChanged(); + } else { + deidentifyTemplatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public Builder addDeidentifyTemplates(com.google.privacy.dlp.v2.DeidentifyTemplate value) { + if (deidentifyTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeidentifyTemplatesIsMutable(); + deidentifyTemplates_.add(value); + onChanged(); + } else { + deidentifyTemplatesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public Builder addDeidentifyTemplates( + int index, com.google.privacy.dlp.v2.DeidentifyTemplate value) { + if (deidentifyTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeidentifyTemplatesIsMutable(); + deidentifyTemplates_.add(index, value); + onChanged(); + } else { + deidentifyTemplatesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public Builder addDeidentifyTemplates( + com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { + if (deidentifyTemplatesBuilder_ == null) { + ensureDeidentifyTemplatesIsMutable(); + deidentifyTemplates_.add(builderForValue.build()); + onChanged(); + } else { + deidentifyTemplatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public Builder addDeidentifyTemplates( + int index, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { + if (deidentifyTemplatesBuilder_ == null) { + ensureDeidentifyTemplatesIsMutable(); + deidentifyTemplates_.add(index, builderForValue.build()); + onChanged(); + } else { + deidentifyTemplatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public Builder addAllDeidentifyTemplates( + java.lang.Iterable values) { + if (deidentifyTemplatesBuilder_ == null) { + ensureDeidentifyTemplatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, deidentifyTemplates_); + onChanged(); + } else { + deidentifyTemplatesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public Builder clearDeidentifyTemplates() { + if (deidentifyTemplatesBuilder_ == null) { + deidentifyTemplates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deidentifyTemplatesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public Builder removeDeidentifyTemplates(int index) { + if (deidentifyTemplatesBuilder_ == null) { + ensureDeidentifyTemplatesIsMutable(); + deidentifyTemplates_.remove(index); + onChanged(); + } else { + deidentifyTemplatesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder getDeidentifyTemplatesBuilder( + int index) { + return getDeidentifyTemplatesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplatesOrBuilder( + int index) { + if (deidentifyTemplatesBuilder_ == null) { + return deidentifyTemplates_.get(index); } else { + return deidentifyTemplatesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public java.util.List + getDeidentifyTemplatesOrBuilderList() { + if (deidentifyTemplatesBuilder_ != null) { + return deidentifyTemplatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deidentifyTemplates_); + } + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder addDeidentifyTemplatesBuilder() { + return getDeidentifyTemplatesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance()); + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder addDeidentifyTemplatesBuilder( + int index) { + return getDeidentifyTemplatesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance()); + } + /** + *
+     * List of deidentify templates, up to page_size in
+     * ListDeidentifyTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + public java.util.List + getDeidentifyTemplatesBuilderList() { + return getDeidentifyTemplatesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> + getDeidentifyTemplatesFieldBuilder() { + if (deidentifyTemplatesBuilder_ == null) { + deidentifyTemplatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder>( + deidentifyTemplates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + deidentifyTemplates_ = null; + } + return deidentifyTemplatesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListDeidentifyTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListDeidentifyTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListDeidentifyTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListDeidentifyTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListDeidentifyTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) + private static final com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse(); + } + + public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeidentifyTemplatesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDeidentifyTemplatesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponseOrBuilder.java new file mode 100644 index 000000000000..3c5eaeb8cf4b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponseOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListDeidentifyTemplatesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + java.util.List + getDeidentifyTemplatesList(); + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplates(int index); + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + int getDeidentifyTemplatesCount(); + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + java.util.List + getDeidentifyTemplatesOrBuilderList(); + /** + *
+   * List of deidentify templates, up to page_size in
+   * ListDeidentifyTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; + */ + com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplatesOrBuilder( + int index); + + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListDeidentifyTemplates request.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListDeidentifyTemplates request.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java new file mode 100644 index 000000000000..0ecbdd17eb46 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java @@ -0,0 +1,1757 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The request message for listing DLP jobs.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListDlpJobsRequest} + */ +public final class ListDlpJobsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListDlpJobsRequest) + ListDlpJobsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListDlpJobsRequest.newBuilder() to construct. + private ListDlpJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListDlpJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + type_ = 0; + orderBy_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListDlpJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListDlpJobsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 40: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListDlpJobsRequest.class, com.google.privacy.dlp.v2.ListDlpJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 4; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 1; + private volatile java.lang.Object filter_; + /** + *
+   * Allows filtering.
+   * Supported syntax:
+   * * Filter expressions are made up of one or more restrictions.
+   * * Restrictions can be combined by `AND` or `OR` logical operators. A
+   * sequence of restrictions implicitly uses `AND`.
+   * * A restriction has the form of `{field} {operator} {value}`.
+   * * Supported fields/values for inspect jobs:
+   *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+   *     - `trigger_name` - The name of the trigger that created the job.
+   *     - 'end_time` - Corresponds to the time the job finished.
+   *     - 'start_time` - Corresponds to the time the job finished.
+   * * Supported fields for risk analysis jobs:
+   *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
+   *     - 'end_time` - Corresponds to the time the job finished.
+   *     - 'start_time` - Corresponds to the time the job finished.
+   * * The operator must be `=` or `!=`.
+   * Examples:
+   * * inspected_storage = cloud_storage AND state = done
+   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+   * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+   * * end_time > \"2017-12-12T00:00:00+00:00\"
+   * The length of this field should be no more than 500 characters.
+   * 
+ * + * string filter = 1; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Allows filtering.
+   * Supported syntax:
+   * * Filter expressions are made up of one or more restrictions.
+   * * Restrictions can be combined by `AND` or `OR` logical operators. A
+   * sequence of restrictions implicitly uses `AND`.
+   * * A restriction has the form of `{field} {operator} {value}`.
+   * * Supported fields/values for inspect jobs:
+   *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+   *     - `trigger_name` - The name of the trigger that created the job.
+   *     - 'end_time` - Corresponds to the time the job finished.
+   *     - 'start_time` - Corresponds to the time the job finished.
+   * * Supported fields for risk analysis jobs:
+   *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
+   *     - 'end_time` - Corresponds to the time the job finished.
+   *     - 'start_time` - Corresponds to the time the job finished.
+   * * The operator must be `=` or `!=`.
+   * Examples:
+   * * inspected_storage = cloud_storage AND state = done
+   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+   * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+   * * end_time > \"2017-12-12T00:00:00+00:00\"
+   * The length of this field should be no more than 500 characters.
+   * 
+ * + * string filter = 1; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 5; + private int type_; + /** + *
+   * The type of job. Defaults to `DlpJobType.INSPECT`
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 5; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The type of job. Defaults to `DlpJobType.INSPECT`
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 5; + * @return The type. + */ + @java.lang.Override public com.google.privacy.dlp.v2.DlpJobType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc, end_time asc, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the job was created.
+   * - `end_time`: corresponds to the time the job ended.
+   * - `name`: corresponds to the job's name.
+   * - `state`: corresponds to `state`
+   * 
+ * + * string order_by = 6; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc, end_time asc, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the job was created.
+   * - `end_time`: corresponds to the time the job ended.
+   * - `name`: corresponds to the job's name.
+   * - `state`: corresponds to `state`
+   * 
+ * + * string order_by = 6; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); + } + if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); + } + if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListDlpJobsRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListDlpJobsRequest other = (com.google.privacy.dlp.v2.ListDlpJobsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (type_ != other.type_) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListDlpJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The request message for listing DLP jobs.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListDlpJobsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListDlpJobsRequest) + com.google.privacy.dlp.v2.ListDlpJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListDlpJobsRequest.class, com.google.privacy.dlp.v2.ListDlpJobsRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListDlpJobsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + type_ = 0; + + orderBy_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDlpJobsRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListDlpJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDlpJobsRequest build() { + com.google.privacy.dlp.v2.ListDlpJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDlpJobsRequest buildPartial() { + com.google.privacy.dlp.v2.ListDlpJobsRequest result = new com.google.privacy.dlp.v2.ListDlpJobsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.type_ = type_; + result.orderBy_ = orderBy_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListDlpJobsRequest) { + return mergeFrom((com.google.privacy.dlp.v2.ListDlpJobsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListDlpJobsRequest other) { + if (other == com.google.privacy.dlp.v2.ListDlpJobsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListDlpJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListDlpJobsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect jobs:
+     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - `trigger_name` - The name of the trigger that created the job.
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * Supported fields for risk analysis jobs:
+     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * The operator must be `=` or `!=`.
+     * Examples:
+     * * inspected_storage = cloud_storage AND state = done
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+     * * end_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 1; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect jobs:
+     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - `trigger_name` - The name of the trigger that created the job.
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * Supported fields for risk analysis jobs:
+     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * The operator must be `=` or `!=`.
+     * Examples:
+     * * inspected_storage = cloud_storage AND state = done
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+     * * end_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 1; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect jobs:
+     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - `trigger_name` - The name of the trigger that created the job.
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * Supported fields for risk analysis jobs:
+     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * The operator must be `=` or `!=`.
+     * Examples:
+     * * inspected_storage = cloud_storage AND state = done
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+     * * end_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 1; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect jobs:
+     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - `trigger_name` - The name of the trigger that created the job.
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * Supported fields for risk analysis jobs:
+     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * The operator must be `=` or `!=`.
+     * Examples:
+     * * inspected_storage = cloud_storage AND state = done
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+     * * end_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 1; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect jobs:
+     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - `trigger_name` - The name of the trigger that created the job.
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * Supported fields for risk analysis jobs:
+     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
+     *     - 'end_time` - Corresponds to the time the job finished.
+     *     - 'start_time` - Corresponds to the time the job finished.
+     * * The operator must be `=` or `!=`.
+     * Examples:
+     * * inspected_storage = cloud_storage AND state = done
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+     * * end_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 1; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 3; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 3; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The standard list page token.
+     * 
+ * + * string page_token = 3; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+     * The type of job. Defaults to `DlpJobType.INSPECT`
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 5; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The type of job. Defaults to `DlpJobType.INSPECT`
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 5; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of job. Defaults to `DlpJobType.INSPECT`
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 5; + * @return The type. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJobType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; + } + /** + *
+     * The type of job. Defaults to `DlpJobType.INSPECT`
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 5; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.privacy.dlp.v2.DlpJobType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The type of job. Defaults to `DlpJobType.INSPECT`
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 5; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, end_time asc, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the job was created.
+     * - `end_time`: corresponds to the time the job ended.
+     * - `name`: corresponds to the job's name.
+     * - `state`: corresponds to `state`
+     * 
+ * + * string order_by = 6; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, end_time asc, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the job was created.
+     * - `end_time`: corresponds to the time the job ended.
+     * - `name`: corresponds to the job's name.
+     * - `state`: corresponds to `state`
+     * 
+ * + * string order_by = 6; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, end_time asc, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the job was created.
+     * - `end_time`: corresponds to the time the job ended.
+     * - `name`: corresponds to the job's name.
+     * - `state`: corresponds to `state`
+     * 
+ * + * string order_by = 6; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, end_time asc, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the job was created.
+     * - `end_time`: corresponds to the time the job ended.
+     * - `name`: corresponds to the job's name.
+     * - `state`: corresponds to `state`
+     * 
+ * + * string order_by = 6; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, end_time asc, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the job was created.
+     * - `end_time`: corresponds to the time the job ended.
+     * - `name`: corresponds to the job's name.
+     * - `state`: corresponds to `state`
+     * 
+ * + * string order_by = 6; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListDlpJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListDlpJobsRequest) + private static final com.google.privacy.dlp.v2.ListDlpJobsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListDlpJobsRequest(); + } + + public static com.google.privacy.dlp.v2.ListDlpJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDlpJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDlpJobsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDlpJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java new file mode 100644 index 000000000000..186ddb37d0a7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java @@ -0,0 +1,222 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListDlpJobsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListDlpJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Allows filtering.
+   * Supported syntax:
+   * * Filter expressions are made up of one or more restrictions.
+   * * Restrictions can be combined by `AND` or `OR` logical operators. A
+   * sequence of restrictions implicitly uses `AND`.
+   * * A restriction has the form of `{field} {operator} {value}`.
+   * * Supported fields/values for inspect jobs:
+   *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+   *     - `trigger_name` - The name of the trigger that created the job.
+   *     - 'end_time` - Corresponds to the time the job finished.
+   *     - 'start_time` - Corresponds to the time the job finished.
+   * * Supported fields for risk analysis jobs:
+   *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
+   *     - 'end_time` - Corresponds to the time the job finished.
+   *     - 'start_time` - Corresponds to the time the job finished.
+   * * The operator must be `=` or `!=`.
+   * Examples:
+   * * inspected_storage = cloud_storage AND state = done
+   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+   * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+   * * end_time > \"2017-12-12T00:00:00+00:00\"
+   * The length of this field should be no more than 500 characters.
+   * 
+ * + * string filter = 1; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Allows filtering.
+   * Supported syntax:
+   * * Filter expressions are made up of one or more restrictions.
+   * * Restrictions can be combined by `AND` or `OR` logical operators. A
+   * sequence of restrictions implicitly uses `AND`.
+   * * A restriction has the form of `{field} {operator} {value}`.
+   * * Supported fields/values for inspect jobs:
+   *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
+   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+   *     - `trigger_name` - The name of the trigger that created the job.
+   *     - 'end_time` - Corresponds to the time the job finished.
+   *     - 'start_time` - Corresponds to the time the job finished.
+   * * Supported fields for risk analysis jobs:
+   *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
+   *     - 'end_time` - Corresponds to the time the job finished.
+   *     - 'start_time` - Corresponds to the time the job finished.
+   * * The operator must be `=` or `!=`.
+   * Examples:
+   * * inspected_storage = cloud_storage AND state = done
+   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+   * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
+   * * end_time > \"2017-12-12T00:00:00+00:00\"
+   * The length of this field should be no more than 500 characters.
+   * 
+ * + * string filter = 1; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 2; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 3; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The standard list page token.
+   * 
+ * + * string page_token = 3; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * The type of job. Defaults to `DlpJobType.INSPECT`
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 5; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The type of job. Defaults to `DlpJobType.INSPECT`
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 5; + * @return The type. + */ + com.google.privacy.dlp.v2.DlpJobType getType(); + + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc, end_time asc, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the job was created.
+   * - `end_time`: corresponds to the time the job ended.
+   * - `name`: corresponds to the job's name.
+   * - `state`: corresponds to `state`
+   * 
+ * + * string order_by = 6; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc, end_time asc, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the job was created.
+   * - `end_time`: corresponds to the time the job ended.
+   * - `name`: corresponds to the job's name.
+   * - `state`: corresponds to `state`
+   * 
+ * + * string order_by = 6; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponse.java new file mode 100644 index 000000000000..170516607b1a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponse.java @@ -0,0 +1,1038 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The response message for listing DLP jobs.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListDlpJobsResponse} + */ +public final class ListDlpJobsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListDlpJobsResponse) + ListDlpJobsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListDlpJobsResponse.newBuilder() to construct. + private ListDlpJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListDlpJobsResponse() { + jobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListDlpJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListDlpJobsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobs_.add( + input.readMessage(com.google.privacy.dlp.v2.DlpJob.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListDlpJobsResponse.class, com.google.privacy.dlp.v2.ListDlpJobsResponse.Builder.class); + } + + public static final int JOBS_FIELD_NUMBER = 1; + private java.util.List jobs_; + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + @java.lang.Override + public java.util.List getJobsList() { + return jobs_; + } + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + @java.lang.Override + public java.util.List + getJobsOrBuilderList() { + return jobs_; + } + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + @java.lang.Override + public int getJobsCount() { + return jobs_.size(); + } + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJob getJobs(int index) { + return jobs_.get(index); + } + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJobOrBuilder getJobsOrBuilder( + int index) { + return jobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < jobs_.size(); i++) { + output.writeMessage(1, jobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < jobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, jobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListDlpJobsResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListDlpJobsResponse other = (com.google.privacy.dlp.v2.ListDlpJobsResponse) obj; + + if (!getJobsList() + .equals(other.getJobsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJobsCount() > 0) { + hash = (37 * hash) + JOBS_FIELD_NUMBER; + hash = (53 * hash) + getJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListDlpJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The response message for listing DLP jobs.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListDlpJobsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListDlpJobsResponse) + com.google.privacy.dlp.v2.ListDlpJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListDlpJobsResponse.class, com.google.privacy.dlp.v2.ListDlpJobsResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListDlpJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getJobsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDlpJobsResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListDlpJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDlpJobsResponse build() { + com.google.privacy.dlp.v2.ListDlpJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDlpJobsResponse buildPartial() { + com.google.privacy.dlp.v2.ListDlpJobsResponse result = new com.google.privacy.dlp.v2.ListDlpJobsResponse(this); + int from_bitField0_ = bitField0_; + if (jobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobs_ = java.util.Collections.unmodifiableList(jobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobs_ = jobs_; + } else { + result.jobs_ = jobsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListDlpJobsResponse) { + return mergeFrom((com.google.privacy.dlp.v2.ListDlpJobsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListDlpJobsResponse other) { + if (other == com.google.privacy.dlp.v2.ListDlpJobsResponse.getDefaultInstance()) return this; + if (jobsBuilder_ == null) { + if (!other.jobs_.isEmpty()) { + if (jobs_.isEmpty()) { + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobsIsMutable(); + jobs_.addAll(other.jobs_); + } + onChanged(); + } + } else { + if (!other.jobs_.isEmpty()) { + if (jobsBuilder_.isEmpty()) { + jobsBuilder_.dispose(); + jobsBuilder_ = null; + jobs_ = other.jobs_; + bitField0_ = (bitField0_ & ~0x00000001); + jobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getJobsFieldBuilder() : null; + } else { + jobsBuilder_.addAllMessages(other.jobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListDlpJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListDlpJobsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List jobs_ = + java.util.Collections.emptyList(); + private void ensureJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobs_ = new java.util.ArrayList(jobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DlpJob, com.google.privacy.dlp.v2.DlpJob.Builder, com.google.privacy.dlp.v2.DlpJobOrBuilder> jobsBuilder_; + + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public java.util.List getJobsList() { + if (jobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobs_); + } else { + return jobsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public int getJobsCount() { + if (jobsBuilder_ == null) { + return jobs_.size(); + } else { + return jobsBuilder_.getCount(); + } + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public com.google.privacy.dlp.v2.DlpJob getJobs(int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); + } else { + return jobsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public Builder setJobs( + int index, com.google.privacy.dlp.v2.DlpJob value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.set(index, value); + onChanged(); + } else { + jobsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public Builder setJobs( + int index, com.google.privacy.dlp.v2.DlpJob.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.set(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public Builder addJobs(com.google.privacy.dlp.v2.DlpJob value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(value); + onChanged(); + } else { + jobsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public Builder addJobs( + int index, com.google.privacy.dlp.v2.DlpJob value) { + if (jobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(index, value); + onChanged(); + } else { + jobsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public Builder addJobs( + com.google.privacy.dlp.v2.DlpJob.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public Builder addJobs( + int index, com.google.privacy.dlp.v2.DlpJob.Builder builderForValue) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.add(index, builderForValue.build()); + onChanged(); + } else { + jobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public Builder addAllJobs( + java.lang.Iterable values) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, jobs_); + onChanged(); + } else { + jobsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public Builder clearJobs() { + if (jobsBuilder_ == null) { + jobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public Builder removeJobs(int index) { + if (jobsBuilder_ == null) { + ensureJobsIsMutable(); + jobs_.remove(index); + onChanged(); + } else { + jobsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public com.google.privacy.dlp.v2.DlpJob.Builder getJobsBuilder( + int index) { + return getJobsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public com.google.privacy.dlp.v2.DlpJobOrBuilder getJobsOrBuilder( + int index) { + if (jobsBuilder_ == null) { + return jobs_.get(index); } else { + return jobsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public java.util.List + getJobsOrBuilderList() { + if (jobsBuilder_ != null) { + return jobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobs_); + } + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public com.google.privacy.dlp.v2.DlpJob.Builder addJobsBuilder() { + return getJobsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.DlpJob.getDefaultInstance()); + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public com.google.privacy.dlp.v2.DlpJob.Builder addJobsBuilder( + int index) { + return getJobsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.DlpJob.getDefaultInstance()); + } + /** + *
+     * A list of DlpJobs that matches the specified filter in the request.
+     * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + public java.util.List + getJobsBuilderList() { + return getJobsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DlpJob, com.google.privacy.dlp.v2.DlpJob.Builder, com.google.privacy.dlp.v2.DlpJobOrBuilder> + getJobsFieldBuilder() { + if (jobsBuilder_ == null) { + jobsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.DlpJob, com.google.privacy.dlp.v2.DlpJob.Builder, com.google.privacy.dlp.v2.DlpJobOrBuilder>( + jobs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + jobs_ = null; + } + return jobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * The standard List next-page token.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListDlpJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListDlpJobsResponse) + private static final com.google.privacy.dlp.v2.ListDlpJobsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListDlpJobsResponse(); + } + + public static com.google.privacy.dlp.v2.ListDlpJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDlpJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDlpJobsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListDlpJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponseOrBuilder.java new file mode 100644 index 000000000000..6f4aa8cd6db2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponseOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListDlpJobsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListDlpJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + java.util.List + getJobsList(); + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + com.google.privacy.dlp.v2.DlpJob getJobs(int index); + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + int getJobsCount(); + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + java.util.List + getJobsOrBuilderList(); + /** + *
+   * A list of DlpJobs that matches the specified filter in the request.
+   * 
+ * + * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; + */ + com.google.privacy.dlp.v2.DlpJobOrBuilder getJobsOrBuilder( + int index); + + /** + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * The standard List next-page token.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java new file mode 100644 index 000000000000..07eb287c26f0 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java @@ -0,0 +1,1128 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request for the list of infoTypes.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListInfoTypesRequest} + */ +public final class ListInfoTypesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListInfoTypesRequest) + ListInfoTypesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListInfoTypesRequest.newBuilder() to construct. + private ListInfoTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListInfoTypesRequest() { + parent_ = ""; + languageCode_ = ""; + filter_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListInfoTypesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListInfoTypesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListInfoTypesRequest.class, com.google.privacy.dlp.v2.ListInfoTypesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 4; + private volatile java.lang.Object parent_; + /** + *
+   * The parent resource name.
+   * The format of this value is as follows:
+   *     locations/<var>LOCATION_ID</var>
+   * 
+ * + * string parent = 4; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The parent resource name.
+   * The format of this value is as follows:
+   *     locations/<var>LOCATION_ID</var>
+   * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object languageCode_; + /** + *
+   * BCP-47 language code for localized infoType friendly
+   * names. If omitted, or if localized strings are not available,
+   * en-US strings will be returned.
+   * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + *
+   * BCP-47 language code for localized infoType friendly
+   * names. If omitted, or if localized strings are not available,
+   * en-US strings will be returned.
+   * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + *
+   * filter to only return infoTypes supported by certain parts of the
+   * API. Defaults to supported_by=INSPECT.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * filter to only return infoTypes supported by certain parts of the
+   * API. Defaults to supported_by=INSPECT.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 3; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 3; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, locationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, locationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListInfoTypesRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListInfoTypesRequest other = (com.google.privacy.dlp.v2.ListInfoTypesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getLanguageCode() + .equals(other.getLanguageCode())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListInfoTypesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request for the list of infoTypes.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListInfoTypesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListInfoTypesRequest) + com.google.privacy.dlp.v2.ListInfoTypesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListInfoTypesRequest.class, com.google.privacy.dlp.v2.ListInfoTypesRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListInfoTypesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + languageCode_ = ""; + + filter_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInfoTypesRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListInfoTypesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInfoTypesRequest build() { + com.google.privacy.dlp.v2.ListInfoTypesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInfoTypesRequest buildPartial() { + com.google.privacy.dlp.v2.ListInfoTypesRequest result = new com.google.privacy.dlp.v2.ListInfoTypesRequest(this); + result.parent_ = parent_; + result.languageCode_ = languageCode_; + result.filter_ = filter_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListInfoTypesRequest) { + return mergeFrom((com.google.privacy.dlp.v2.ListInfoTypesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListInfoTypesRequest other) { + if (other == com.google.privacy.dlp.v2.ListInfoTypesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListInfoTypesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListInfoTypesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * The parent resource name.
+     * The format of this value is as follows:
+     *     locations/<var>LOCATION_ID</var>
+     * 
+ * + * string parent = 4; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The parent resource name.
+     * The format of this value is as follows:
+     *     locations/<var>LOCATION_ID</var>
+     * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The parent resource name.
+     * The format of this value is as follows:
+     *     locations/<var>LOCATION_ID</var>
+     * 
+ * + * string parent = 4; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * The parent resource name.
+     * The format of this value is as follows:
+     *     locations/<var>LOCATION_ID</var>
+     * 
+ * + * string parent = 4; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * The parent resource name.
+     * The format of this value is as follows:
+     *     locations/<var>LOCATION_ID</var>
+     * 
+ * + * string parent = 4; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + *
+     * BCP-47 language code for localized infoType friendly
+     * names. If omitted, or if localized strings are not available,
+     * en-US strings will be returned.
+     * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * BCP-47 language code for localized infoType friendly
+     * names. If omitted, or if localized strings are not available,
+     * en-US strings will be returned.
+     * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString + getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * BCP-47 language code for localized infoType friendly
+     * names. If omitted, or if localized strings are not available,
+     * en-US strings will be returned.
+     * 
+ * + * string language_code = 1; + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + *
+     * BCP-47 language code for localized infoType friendly
+     * names. If omitted, or if localized strings are not available,
+     * en-US strings will be returned.
+     * 
+ * + * string language_code = 1; + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + *
+     * BCP-47 language code for localized infoType friendly
+     * names. If omitted, or if localized strings are not available,
+     * en-US strings will be returned.
+     * 
+ * + * string language_code = 1; + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * filter to only return infoTypes supported by certain parts of the
+     * API. Defaults to supported_by=INSPECT.
+     * 
+ * + * string filter = 2; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * filter to only return infoTypes supported by certain parts of the
+     * API. Defaults to supported_by=INSPECT.
+     * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * filter to only return infoTypes supported by certain parts of the
+     * API. Defaults to supported_by=INSPECT.
+     * 
+ * + * string filter = 2; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * filter to only return infoTypes supported by certain parts of the
+     * API. Defaults to supported_by=INSPECT.
+     * 
+ * + * string filter = 2; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * filter to only return infoTypes supported by certain parts of the
+     * API. Defaults to supported_by=INSPECT.
+     * 
+ * + * string filter = 2; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 3; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 3; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 3; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 3; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 3; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListInfoTypesRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListInfoTypesRequest) + private static final com.google.privacy.dlp.v2.ListInfoTypesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListInfoTypesRequest(); + } + + public static com.google.privacy.dlp.v2.ListInfoTypesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInfoTypesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInfoTypesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInfoTypesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java new file mode 100644 index 000000000000..b070e59020d1 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListInfoTypesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListInfoTypesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The parent resource name.
+   * The format of this value is as follows:
+   *     locations/<var>LOCATION_ID</var>
+   * 
+ * + * string parent = 4; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The parent resource name.
+   * The format of this value is as follows:
+   *     locations/<var>LOCATION_ID</var>
+   * 
+ * + * string parent = 4; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * BCP-47 language code for localized infoType friendly
+   * names. If omitted, or if localized strings are not available,
+   * en-US strings will be returned.
+   * 
+ * + * string language_code = 1; + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + *
+   * BCP-47 language code for localized infoType friendly
+   * names. If omitted, or if localized strings are not available,
+   * en-US strings will be returned.
+   * 
+ * + * string language_code = 1; + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString + getLanguageCodeBytes(); + + /** + *
+   * filter to only return infoTypes supported by certain parts of the
+   * API. Defaults to supported_by=INSPECT.
+   * 
+ * + * string filter = 2; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * filter to only return infoTypes supported by certain parts of the
+   * API. Defaults to supported_by=INSPECT.
+   * 
+ * + * string filter = 2; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 3; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 3; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponse.java new file mode 100644 index 000000000000..5bcc92b0a8a9 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponse.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Response to the ListInfoTypes request.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListInfoTypesResponse} + */ +public final class ListInfoTypesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListInfoTypesResponse) + ListInfoTypesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListInfoTypesResponse.newBuilder() to construct. + private ListInfoTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListInfoTypesResponse() { + infoTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListInfoTypesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListInfoTypesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + infoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoTypeDescription.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListInfoTypesResponse.class, com.google.privacy.dlp.v2.ListInfoTypesResponse.Builder.class); + } + + public static final int INFO_TYPES_FIELD_NUMBER = 1; + private java.util.List infoTypes_; + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + @java.lang.Override + public java.util.List getInfoTypesList() { + return infoTypes_; + } + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + @java.lang.Override + public java.util.List + getInfoTypesOrBuilderList() { + return infoTypes_; + } + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + @java.lang.Override + public int getInfoTypesCount() { + return infoTypes_.size(); + } + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeDescription getInfoTypes(int index) { + return infoTypes_.get(index); + } + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder getInfoTypesOrBuilder( + int index) { + return infoTypes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < infoTypes_.size(); i++) { + output.writeMessage(1, infoTypes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < infoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, infoTypes_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListInfoTypesResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListInfoTypesResponse other = (com.google.privacy.dlp.v2.ListInfoTypesResponse) obj; + + if (!getInfoTypesList() + .equals(other.getInfoTypesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInfoTypesCount() > 0) { + hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getInfoTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListInfoTypesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response to the ListInfoTypes request.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListInfoTypesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListInfoTypesResponse) + com.google.privacy.dlp.v2.ListInfoTypesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListInfoTypesResponse.class, com.google.privacy.dlp.v2.ListInfoTypesResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListInfoTypesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInfoTypesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + infoTypesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInfoTypesResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListInfoTypesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInfoTypesResponse build() { + com.google.privacy.dlp.v2.ListInfoTypesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInfoTypesResponse buildPartial() { + com.google.privacy.dlp.v2.ListInfoTypesResponse result = new com.google.privacy.dlp.v2.ListInfoTypesResponse(this); + int from_bitField0_ = bitField0_; + if (infoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.infoTypes_ = infoTypes_; + } else { + result.infoTypes_ = infoTypesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListInfoTypesResponse) { + return mergeFrom((com.google.privacy.dlp.v2.ListInfoTypesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListInfoTypesResponse other) { + if (other == com.google.privacy.dlp.v2.ListInfoTypesResponse.getDefaultInstance()) return this; + if (infoTypesBuilder_ == null) { + if (!other.infoTypes_.isEmpty()) { + if (infoTypes_.isEmpty()) { + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInfoTypesIsMutable(); + infoTypes_.addAll(other.infoTypes_); + } + onChanged(); + } + } else { + if (!other.infoTypes_.isEmpty()) { + if (infoTypesBuilder_.isEmpty()) { + infoTypesBuilder_.dispose(); + infoTypesBuilder_ = null; + infoTypes_ = other.infoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + infoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInfoTypesFieldBuilder() : null; + } else { + infoTypesBuilder_.addAllMessages(other.infoTypes_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListInfoTypesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListInfoTypesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List infoTypes_ = + java.util.Collections.emptyList(); + private void ensureInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(infoTypes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeDescription, com.google.privacy.dlp.v2.InfoTypeDescription.Builder, com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder> infoTypesBuilder_; + + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public java.util.List getInfoTypesList() { + if (infoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(infoTypes_); + } else { + return infoTypesBuilder_.getMessageList(); + } + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public int getInfoTypesCount() { + if (infoTypesBuilder_ == null) { + return infoTypes_.size(); + } else { + return infoTypesBuilder_.getCount(); + } + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeDescription getInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); + } else { + return infoTypesBuilder_.getMessage(index); + } + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoTypeDescription value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.set(index, value); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public Builder setInfoTypes( + int index, com.google.privacy.dlp.v2.InfoTypeDescription.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoTypeDescription value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoTypeDescription value) { + if (infoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInfoTypesIsMutable(); + infoTypes_.add(index, value); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public Builder addInfoTypes( + com.google.privacy.dlp.v2.InfoTypeDescription.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public Builder addInfoTypes( + int index, com.google.privacy.dlp.v2.InfoTypeDescription.Builder builderForValue) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + infoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public Builder addAllInfoTypes( + java.lang.Iterable values) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, infoTypes_); + onChanged(); + } else { + infoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public Builder clearInfoTypes() { + if (infoTypesBuilder_ == null) { + infoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + infoTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public Builder removeInfoTypes(int index) { + if (infoTypesBuilder_ == null) { + ensureInfoTypesIsMutable(); + infoTypes_.remove(index); + onChanged(); + } else { + infoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeDescription.Builder getInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder getInfoTypesOrBuilder( + int index) { + if (infoTypesBuilder_ == null) { + return infoTypes_.get(index); } else { + return infoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public java.util.List + getInfoTypesOrBuilderList() { + if (infoTypesBuilder_ != null) { + return infoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(infoTypes_); + } + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeDescription.Builder addInfoTypesBuilder() { + return getInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoTypeDescription.getDefaultInstance()); + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeDescription.Builder addInfoTypesBuilder( + int index) { + return getInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoTypeDescription.getDefaultInstance()); + } + /** + *
+     * Set of sensitive infoTypes.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + public java.util.List + getInfoTypesBuilderList() { + return getInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeDescription, com.google.privacy.dlp.v2.InfoTypeDescription.Builder, com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder> + getInfoTypesFieldBuilder() { + if (infoTypesBuilder_ == null) { + infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeDescription, com.google.privacy.dlp.v2.InfoTypeDescription.Builder, com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder>( + infoTypes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + infoTypes_ = null; + } + return infoTypesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListInfoTypesResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListInfoTypesResponse) + private static final com.google.privacy.dlp.v2.ListInfoTypesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListInfoTypesResponse(); + } + + public static com.google.privacy.dlp.v2.ListInfoTypesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInfoTypesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInfoTypesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInfoTypesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponseOrBuilder.java new file mode 100644 index 000000000000..c3217bec954a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListInfoTypesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListInfoTypesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + java.util.List + getInfoTypesList(); + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + com.google.privacy.dlp.v2.InfoTypeDescription getInfoTypes(int index); + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + int getInfoTypesCount(); + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + java.util.List + getInfoTypesOrBuilderList(); + /** + *
+   * Set of sensitive infoTypes.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; + */ + com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder getInfoTypesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java new file mode 100644 index 000000000000..121bf522ef24 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java @@ -0,0 +1,1352 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for ListInspectTemplates.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListInspectTemplatesRequest} + */ +public final class ListInspectTemplatesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListInspectTemplatesRequest) + ListInspectTemplatesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListInspectTemplatesRequest.newBuilder() to construct. + private ListInspectTemplatesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListInspectTemplatesRequest() { + parent_ = ""; + pageToken_ = ""; + orderBy_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListInspectTemplatesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListInspectTemplatesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListInspectTemplatesRequest.class, com.google.privacy.dlp.v2.ListInspectTemplatesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListInspectTemplates`.
+   * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListInspectTemplates`.
+   * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+   * Size of the page, can be limited by the server. If zero server returns
+   * a page of max size 100.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 4; + private volatile java.lang.Object orderBy_; + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the template was created.
+   * - `update_time`: corresponds to the time the template was last updated.
+   * - `name`: corresponds to the template's name.
+   * - `display_name`: corresponds to the template's display name.
+   * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the template was created.
+   * - `update_time`: corresponds to the time the template was last updated.
+   * - `name`: corresponds to the template's name.
+   * - `display_name`: corresponds to the template's display name.
+   * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListInspectTemplatesRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListInspectTemplatesRequest other = (com.google.privacy.dlp.v2.ListInspectTemplatesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListInspectTemplatesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListInspectTemplates.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListInspectTemplatesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListInspectTemplatesRequest) + com.google.privacy.dlp.v2.ListInspectTemplatesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListInspectTemplatesRequest.class, com.google.privacy.dlp.v2.ListInspectTemplatesRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListInspectTemplatesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + orderBy_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInspectTemplatesRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListInspectTemplatesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInspectTemplatesRequest build() { + com.google.privacy.dlp.v2.ListInspectTemplatesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInspectTemplatesRequest buildPartial() { + com.google.privacy.dlp.v2.ListInspectTemplatesRequest result = new com.google.privacy.dlp.v2.ListInspectTemplatesRequest(this); + result.parent_ = parent_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + result.orderBy_ = orderBy_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListInspectTemplatesRequest) { + return mergeFrom((com.google.privacy.dlp.v2.ListInspectTemplatesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListInspectTemplatesRequest other) { + if (other == com.google.privacy.dlp.v2.ListInspectTemplatesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListInspectTemplatesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListInspectTemplatesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * + Organizations scope, location specified:<br/>
+     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Organizations scope, no location specified (defaults to global):<br/>
+     *   `organizations/`<var>ORG_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListInspectTemplates`.
+     * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListInspectTemplates`.
+     * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListInspectTemplates`.
+     * 
+ * + * string page_token = 2; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListInspectTemplates`.
+     * 
+ * + * string page_token = 2; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListInspectTemplates`.
+     * 
+ * + * string page_token = 2; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Size of the page, can be limited by the server. If zero server returns
+     * a page of max size 100.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Size of the page, can be limited by the server. If zero server returns
+     * a page of max size 100.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Size of the page, can be limited by the server. If zero server returns
+     * a page of max size 100.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the template was created.
+     * - `update_time`: corresponds to the time the template was last updated.
+     * - `name`: corresponds to the template's name.
+     * - `display_name`: corresponds to the template's display name.
+     * 
+ * + * string order_by = 4; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListInspectTemplatesRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListInspectTemplatesRequest) + private static final com.google.privacy.dlp.v2.ListInspectTemplatesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListInspectTemplatesRequest(); + } + + public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInspectTemplatesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInspectTemplatesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInspectTemplatesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java new file mode 100644 index 000000000000..b7710cc685c2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListInspectTemplatesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListInspectTemplatesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * + Organizations scope, location specified:<br/>
+   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Organizations scope, no location specified (defaults to global):<br/>
+   *   `organizations/`<var>ORG_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListInspectTemplates`.
+   * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListInspectTemplates`.
+   * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Size of the page, can be limited by the server. If zero server returns
+   * a page of max size 100.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the template was created.
+   * - `update_time`: corresponds to the time the template was last updated.
+   * - `name`: corresponds to the template's name.
+   * - `display_name`: corresponds to the template's display name.
+   * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the template was created.
+   * - `update_time`: corresponds to the time the template was last updated.
+   * - `name`: corresponds to the template's name.
+   * - `display_name`: corresponds to the template's display name.
+   * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponse.java new file mode 100644 index 000000000000..28bccc1260ab --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Response message for ListInspectTemplates.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListInspectTemplatesResponse} + */ +public final class ListInspectTemplatesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListInspectTemplatesResponse) + ListInspectTemplatesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListInspectTemplatesResponse.newBuilder() to construct. + private ListInspectTemplatesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListInspectTemplatesResponse() { + inspectTemplates_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListInspectTemplatesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListInspectTemplatesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + inspectTemplates_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + inspectTemplates_.add( + input.readMessage(com.google.privacy.dlp.v2.InspectTemplate.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + inspectTemplates_ = java.util.Collections.unmodifiableList(inspectTemplates_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListInspectTemplatesResponse.class, com.google.privacy.dlp.v2.ListInspectTemplatesResponse.Builder.class); + } + + public static final int INSPECT_TEMPLATES_FIELD_NUMBER = 1; + private java.util.List inspectTemplates_; + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + @java.lang.Override + public java.util.List getInspectTemplatesList() { + return inspectTemplates_; + } + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + @java.lang.Override + public java.util.List + getInspectTemplatesOrBuilderList() { + return inspectTemplates_; + } + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + @java.lang.Override + public int getInspectTemplatesCount() { + return inspectTemplates_.size(); + } + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplates(int index) { + return inspectTemplates_.get(index); + } + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplatesOrBuilder( + int index) { + return inspectTemplates_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListInspectTemplates request.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListInspectTemplates request.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < inspectTemplates_.size(); i++) { + output.writeMessage(1, inspectTemplates_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < inspectTemplates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, inspectTemplates_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListInspectTemplatesResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListInspectTemplatesResponse other = (com.google.privacy.dlp.v2.ListInspectTemplatesResponse) obj; + + if (!getInspectTemplatesList() + .equals(other.getInspectTemplatesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInspectTemplatesCount() > 0) { + hash = (37 * hash) + INSPECT_TEMPLATES_FIELD_NUMBER; + hash = (53 * hash) + getInspectTemplatesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListInspectTemplatesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListInspectTemplates.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListInspectTemplatesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListInspectTemplatesResponse) + com.google.privacy.dlp.v2.ListInspectTemplatesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListInspectTemplatesResponse.class, com.google.privacy.dlp.v2.ListInspectTemplatesResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListInspectTemplatesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInspectTemplatesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (inspectTemplatesBuilder_ == null) { + inspectTemplates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + inspectTemplatesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInspectTemplatesResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListInspectTemplatesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInspectTemplatesResponse build() { + com.google.privacy.dlp.v2.ListInspectTemplatesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInspectTemplatesResponse buildPartial() { + com.google.privacy.dlp.v2.ListInspectTemplatesResponse result = new com.google.privacy.dlp.v2.ListInspectTemplatesResponse(this); + int from_bitField0_ = bitField0_; + if (inspectTemplatesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + inspectTemplates_ = java.util.Collections.unmodifiableList(inspectTemplates_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.inspectTemplates_ = inspectTemplates_; + } else { + result.inspectTemplates_ = inspectTemplatesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListInspectTemplatesResponse) { + return mergeFrom((com.google.privacy.dlp.v2.ListInspectTemplatesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListInspectTemplatesResponse other) { + if (other == com.google.privacy.dlp.v2.ListInspectTemplatesResponse.getDefaultInstance()) return this; + if (inspectTemplatesBuilder_ == null) { + if (!other.inspectTemplates_.isEmpty()) { + if (inspectTemplates_.isEmpty()) { + inspectTemplates_ = other.inspectTemplates_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInspectTemplatesIsMutable(); + inspectTemplates_.addAll(other.inspectTemplates_); + } + onChanged(); + } + } else { + if (!other.inspectTemplates_.isEmpty()) { + if (inspectTemplatesBuilder_.isEmpty()) { + inspectTemplatesBuilder_.dispose(); + inspectTemplatesBuilder_ = null; + inspectTemplates_ = other.inspectTemplates_; + bitField0_ = (bitField0_ & ~0x00000001); + inspectTemplatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInspectTemplatesFieldBuilder() : null; + } else { + inspectTemplatesBuilder_.addAllMessages(other.inspectTemplates_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListInspectTemplatesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListInspectTemplatesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List inspectTemplates_ = + java.util.Collections.emptyList(); + private void ensureInspectTemplatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + inspectTemplates_ = new java.util.ArrayList(inspectTemplates_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> inspectTemplatesBuilder_; + + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public java.util.List getInspectTemplatesList() { + if (inspectTemplatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(inspectTemplates_); + } else { + return inspectTemplatesBuilder_.getMessageList(); + } + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public int getInspectTemplatesCount() { + if (inspectTemplatesBuilder_ == null) { + return inspectTemplates_.size(); + } else { + return inspectTemplatesBuilder_.getCount(); + } + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplates(int index) { + if (inspectTemplatesBuilder_ == null) { + return inspectTemplates_.get(index); + } else { + return inspectTemplatesBuilder_.getMessage(index); + } + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public Builder setInspectTemplates( + int index, com.google.privacy.dlp.v2.InspectTemplate value) { + if (inspectTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInspectTemplatesIsMutable(); + inspectTemplates_.set(index, value); + onChanged(); + } else { + inspectTemplatesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public Builder setInspectTemplates( + int index, com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { + if (inspectTemplatesBuilder_ == null) { + ensureInspectTemplatesIsMutable(); + inspectTemplates_.set(index, builderForValue.build()); + onChanged(); + } else { + inspectTemplatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public Builder addInspectTemplates(com.google.privacy.dlp.v2.InspectTemplate value) { + if (inspectTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInspectTemplatesIsMutable(); + inspectTemplates_.add(value); + onChanged(); + } else { + inspectTemplatesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public Builder addInspectTemplates( + int index, com.google.privacy.dlp.v2.InspectTemplate value) { + if (inspectTemplatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInspectTemplatesIsMutable(); + inspectTemplates_.add(index, value); + onChanged(); + } else { + inspectTemplatesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public Builder addInspectTemplates( + com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { + if (inspectTemplatesBuilder_ == null) { + ensureInspectTemplatesIsMutable(); + inspectTemplates_.add(builderForValue.build()); + onChanged(); + } else { + inspectTemplatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public Builder addInspectTemplates( + int index, com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { + if (inspectTemplatesBuilder_ == null) { + ensureInspectTemplatesIsMutable(); + inspectTemplates_.add(index, builderForValue.build()); + onChanged(); + } else { + inspectTemplatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public Builder addAllInspectTemplates( + java.lang.Iterable values) { + if (inspectTemplatesBuilder_ == null) { + ensureInspectTemplatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, inspectTemplates_); + onChanged(); + } else { + inspectTemplatesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public Builder clearInspectTemplates() { + if (inspectTemplatesBuilder_ == null) { + inspectTemplates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + inspectTemplatesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public Builder removeInspectTemplates(int index) { + if (inspectTemplatesBuilder_ == null) { + ensureInspectTemplatesIsMutable(); + inspectTemplates_.remove(index); + onChanged(); + } else { + inspectTemplatesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public com.google.privacy.dlp.v2.InspectTemplate.Builder getInspectTemplatesBuilder( + int index) { + return getInspectTemplatesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplatesOrBuilder( + int index) { + if (inspectTemplatesBuilder_ == null) { + return inspectTemplates_.get(index); } else { + return inspectTemplatesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public java.util.List + getInspectTemplatesOrBuilderList() { + if (inspectTemplatesBuilder_ != null) { + return inspectTemplatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inspectTemplates_); + } + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public com.google.privacy.dlp.v2.InspectTemplate.Builder addInspectTemplatesBuilder() { + return getInspectTemplatesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance()); + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public com.google.privacy.dlp.v2.InspectTemplate.Builder addInspectTemplatesBuilder( + int index) { + return getInspectTemplatesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance()); + } + /** + *
+     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + public java.util.List + getInspectTemplatesBuilderList() { + return getInspectTemplatesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> + getInspectTemplatesFieldBuilder() { + if (inspectTemplatesBuilder_ == null) { + inspectTemplatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder>( + inspectTemplates_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + inspectTemplates_ = null; + } + return inspectTemplatesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListInspectTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListInspectTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListInspectTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListInspectTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListInspectTemplates request.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListInspectTemplatesResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListInspectTemplatesResponse) + private static final com.google.privacy.dlp.v2.ListInspectTemplatesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListInspectTemplatesResponse(); + } + + public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInspectTemplatesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInspectTemplatesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListInspectTemplatesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponseOrBuilder.java new file mode 100644 index 000000000000..b659793b05ba --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListInspectTemplatesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListInspectTemplatesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + java.util.List + getInspectTemplatesList(); + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + com.google.privacy.dlp.v2.InspectTemplate getInspectTemplates(int index); + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + int getInspectTemplatesCount(); + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + java.util.List + getInspectTemplatesOrBuilderList(); + /** + *
+   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; + */ + com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplatesOrBuilder( + int index); + + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListInspectTemplates request.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListInspectTemplates request.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java new file mode 100644 index 000000000000..7498690bdd38 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java @@ -0,0 +1,1757 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for ListJobTriggers.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListJobTriggersRequest} + */ +public final class ListJobTriggersRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListJobTriggersRequest) + ListJobTriggersRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListJobTriggersRequest.newBuilder() to construct. + private ListJobTriggersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListJobTriggersRequest() { + parent_ = ""; + pageToken_ = ""; + orderBy_ = ""; + filter_ = ""; + type_ = 0; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListJobTriggersRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListJobTriggersRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 48: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListJobTriggersRequest.class, com.google.privacy.dlp.v2.ListJobTriggersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to ListJobTriggers. `order_by` field must not
+   * change for subsequent calls.
+   * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to ListJobTriggers. `order_by` field must not
+   * change for subsequent calls.
+   * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+   * Size of the page, can be limited by a server.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 4; + private volatile java.lang.Object orderBy_; + /** + *
+   * Comma separated list of triggeredJob fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the JobTrigger was created.
+   * - `update_time`: corresponds to the time the JobTrigger was last updated.
+   * - `last_run_time`: corresponds to the last time the JobTrigger ran.
+   * - `name`: corresponds to the JobTrigger's name.
+   * - `display_name`: corresponds to the JobTrigger's display name.
+   * - `status`: corresponds to JobTrigger's status.
+   * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Comma separated list of triggeredJob fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the JobTrigger was created.
+   * - `update_time`: corresponds to the time the JobTrigger was last updated.
+   * - `last_run_time`: corresponds to the last time the JobTrigger ran.
+   * - `name`: corresponds to the JobTrigger's name.
+   * - `display_name`: corresponds to the JobTrigger's display name.
+   * - `status`: corresponds to JobTrigger's status.
+   * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + private volatile java.lang.Object filter_; + /** + *
+   * Allows filtering.
+   * Supported syntax:
+   * * Filter expressions are made up of one or more restrictions.
+   * * Restrictions can be combined by `AND` or `OR` logical operators. A
+   * sequence of restrictions implicitly uses `AND`.
+   * * A restriction has the form of `{field} {operator} {value}`.
+   * * Supported fields/values for inspect triggers:
+   *     - `status` - HEALTHY|PAUSED|CANCELLED
+   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+   *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+   *     quotation marks. Nanoseconds are ignored.
+   *     - 'error_count' - Number of errors that have occurred while running.
+   * * The operator must be `=` or `!=` for status and inspected_storage.
+   * Examples:
+   * * inspected_storage = cloud_storage AND status = HEALTHY
+   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+   * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+   * * last_run_time > \"2017-12-12T00:00:00+00:00\"
+   * The length of this field should be no more than 500 characters.
+   * 
+ * + * string filter = 5; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Allows filtering.
+   * Supported syntax:
+   * * Filter expressions are made up of one or more restrictions.
+   * * Restrictions can be combined by `AND` or `OR` logical operators. A
+   * sequence of restrictions implicitly uses `AND`.
+   * * A restriction has the form of `{field} {operator} {value}`.
+   * * Supported fields/values for inspect triggers:
+   *     - `status` - HEALTHY|PAUSED|CANCELLED
+   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+   *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+   *     quotation marks. Nanoseconds are ignored.
+   *     - 'error_count' - Number of errors that have occurred while running.
+   * * The operator must be `=` or `!=` for status and inspected_storage.
+   * Examples:
+   * * inspected_storage = cloud_storage AND status = HEALTHY
+   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+   * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+   * * last_run_time > \"2017-12-12T00:00:00+00:00\"
+   * The length of this field should be no more than 500 characters.
+   * 
+ * + * string filter = 5; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 6; + private int type_; + /** + *
+   * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 6; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 6; + * @return The type. + */ + @java.lang.Override public com.google.privacy.dlp.v2.DlpJobType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; + } + + public static final int LOCATION_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListJobTriggersRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListJobTriggersRequest other = (com.google.privacy.dlp.v2.ListJobTriggersRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (type_ != other.type_) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListJobTriggersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListJobTriggers.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListJobTriggersRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListJobTriggersRequest) + com.google.privacy.dlp.v2.ListJobTriggersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListJobTriggersRequest.class, com.google.privacy.dlp.v2.ListJobTriggersRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListJobTriggersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + orderBy_ = ""; + + filter_ = ""; + + type_ = 0; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListJobTriggersRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListJobTriggersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListJobTriggersRequest build() { + com.google.privacy.dlp.v2.ListJobTriggersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListJobTriggersRequest buildPartial() { + com.google.privacy.dlp.v2.ListJobTriggersRequest result = new com.google.privacy.dlp.v2.ListJobTriggersRequest(this); + result.parent_ = parent_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + result.orderBy_ = orderBy_; + result.filter_ = filter_; + result.type_ = type_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListJobTriggersRequest) { + return mergeFrom((com.google.privacy.dlp.v2.ListJobTriggersRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListJobTriggersRequest other) { + if (other == com.google.privacy.dlp.v2.ListJobTriggersRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListJobTriggersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListJobTriggersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
+     * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
+     * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
+     * 
+ * + * string page_token = 2; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
+     * 
+ * + * string page_token = 2; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
+     * 
+ * + * string page_token = 2; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Size of the page, can be limited by a server.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Size of the page, can be limited by a server.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Size of the page, can be limited by a server.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Comma separated list of triggeredJob fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the JobTrigger was created.
+     * - `update_time`: corresponds to the time the JobTrigger was last updated.
+     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
+     * - `name`: corresponds to the JobTrigger's name.
+     * - `display_name`: corresponds to the JobTrigger's display name.
+     * - `status`: corresponds to JobTrigger's status.
+     * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Comma separated list of triggeredJob fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the JobTrigger was created.
+     * - `update_time`: corresponds to the time the JobTrigger was last updated.
+     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
+     * - `name`: corresponds to the JobTrigger's name.
+     * - `display_name`: corresponds to the JobTrigger's display name.
+     * - `status`: corresponds to JobTrigger's status.
+     * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Comma separated list of triggeredJob fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the JobTrigger was created.
+     * - `update_time`: corresponds to the time the JobTrigger was last updated.
+     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
+     * - `name`: corresponds to the JobTrigger's name.
+     * - `display_name`: corresponds to the JobTrigger's display name.
+     * - `status`: corresponds to JobTrigger's status.
+     * 
+ * + * string order_by = 4; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Comma separated list of triggeredJob fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the JobTrigger was created.
+     * - `update_time`: corresponds to the time the JobTrigger was last updated.
+     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
+     * - `name`: corresponds to the JobTrigger's name.
+     * - `display_name`: corresponds to the JobTrigger's display name.
+     * - `status`: corresponds to JobTrigger's status.
+     * 
+ * + * string order_by = 4; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Comma separated list of triggeredJob fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the JobTrigger was created.
+     * - `update_time`: corresponds to the time the JobTrigger was last updated.
+     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
+     * - `name`: corresponds to the JobTrigger's name.
+     * - `display_name`: corresponds to the JobTrigger's display name.
+     * - `status`: corresponds to JobTrigger's status.
+     * 
+ * + * string order_by = 4; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect triggers:
+     *     - `status` - HEALTHY|PAUSED|CANCELLED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+     *     quotation marks. Nanoseconds are ignored.
+     *     - 'error_count' - Number of errors that have occurred while running.
+     * * The operator must be `=` or `!=` for status and inspected_storage.
+     * Examples:
+     * * inspected_storage = cloud_storage AND status = HEALTHY
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 5; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect triggers:
+     *     - `status` - HEALTHY|PAUSED|CANCELLED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+     *     quotation marks. Nanoseconds are ignored.
+     *     - 'error_count' - Number of errors that have occurred while running.
+     * * The operator must be `=` or `!=` for status and inspected_storage.
+     * Examples:
+     * * inspected_storage = cloud_storage AND status = HEALTHY
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 5; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect triggers:
+     *     - `status` - HEALTHY|PAUSED|CANCELLED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+     *     quotation marks. Nanoseconds are ignored.
+     *     - 'error_count' - Number of errors that have occurred while running.
+     * * The operator must be `=` or `!=` for status and inspected_storage.
+     * Examples:
+     * * inspected_storage = cloud_storage AND status = HEALTHY
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 5; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect triggers:
+     *     - `status` - HEALTHY|PAUSED|CANCELLED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+     *     quotation marks. Nanoseconds are ignored.
+     *     - 'error_count' - Number of errors that have occurred while running.
+     * * The operator must be `=` or `!=` for status and inspected_storage.
+     * Examples:
+     * * inspected_storage = cloud_storage AND status = HEALTHY
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 5; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * Allows filtering.
+     * Supported syntax:
+     * * Filter expressions are made up of one or more restrictions.
+     * * Restrictions can be combined by `AND` or `OR` logical operators. A
+     * sequence of restrictions implicitly uses `AND`.
+     * * A restriction has the form of `{field} {operator} {value}`.
+     * * Supported fields/values for inspect triggers:
+     *     - `status` - HEALTHY|PAUSED|CANCELLED
+     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+     *     quotation marks. Nanoseconds are ignored.
+     *     - 'error_count' - Number of errors that have occurred while running.
+     * * The operator must be `=` or `!=` for status and inspected_storage.
+     * Examples:
+     * * inspected_storage = cloud_storage AND status = HEALTHY
+     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
+     * The length of this field should be no more than 500 characters.
+     * 
+ * + * string filter = 5; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + *
+     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 6; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 6; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 6; + * @return The type. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DlpJobType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; + } + /** + *
+     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 6; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.privacy.dlp.v2.DlpJobType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
+     * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 6; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListJobTriggersRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListJobTriggersRequest) + private static final com.google.privacy.dlp.v2.ListJobTriggersRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListJobTriggersRequest(); + } + + public static com.google.privacy.dlp.v2.ListJobTriggersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListJobTriggersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListJobTriggersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListJobTriggersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java new file mode 100644 index 000000000000..e0bdcb976097 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java @@ -0,0 +1,222 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListJobTriggersRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListJobTriggersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to ListJobTriggers. `order_by` field must not
+   * change for subsequent calls.
+   * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to ListJobTriggers. `order_by` field must not
+   * change for subsequent calls.
+   * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Size of the page, can be limited by a server.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Comma separated list of triggeredJob fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the JobTrigger was created.
+   * - `update_time`: corresponds to the time the JobTrigger was last updated.
+   * - `last_run_time`: corresponds to the last time the JobTrigger ran.
+   * - `name`: corresponds to the JobTrigger's name.
+   * - `display_name`: corresponds to the JobTrigger's display name.
+   * - `status`: corresponds to JobTrigger's status.
+   * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Comma separated list of triggeredJob fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the JobTrigger was created.
+   * - `update_time`: corresponds to the time the JobTrigger was last updated.
+   * - `last_run_time`: corresponds to the last time the JobTrigger ran.
+   * - `name`: corresponds to the JobTrigger's name.
+   * - `display_name`: corresponds to the JobTrigger's display name.
+   * - `status`: corresponds to JobTrigger's status.
+   * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); + + /** + *
+   * Allows filtering.
+   * Supported syntax:
+   * * Filter expressions are made up of one or more restrictions.
+   * * Restrictions can be combined by `AND` or `OR` logical operators. A
+   * sequence of restrictions implicitly uses `AND`.
+   * * A restriction has the form of `{field} {operator} {value}`.
+   * * Supported fields/values for inspect triggers:
+   *     - `status` - HEALTHY|PAUSED|CANCELLED
+   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+   *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+   *     quotation marks. Nanoseconds are ignored.
+   *     - 'error_count' - Number of errors that have occurred while running.
+   * * The operator must be `=` or `!=` for status and inspected_storage.
+   * Examples:
+   * * inspected_storage = cloud_storage AND status = HEALTHY
+   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+   * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+   * * last_run_time > \"2017-12-12T00:00:00+00:00\"
+   * The length of this field should be no more than 500 characters.
+   * 
+ * + * string filter = 5; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Allows filtering.
+   * Supported syntax:
+   * * Filter expressions are made up of one or more restrictions.
+   * * Restrictions can be combined by `AND` or `OR` logical operators. A
+   * sequence of restrictions implicitly uses `AND`.
+   * * A restriction has the form of `{field} {operator} {value}`.
+   * * Supported fields/values for inspect triggers:
+   *     - `status` - HEALTHY|PAUSED|CANCELLED
+   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
+   *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
+   *     quotation marks. Nanoseconds are ignored.
+   *     - 'error_count' - Number of errors that have occurred while running.
+   * * The operator must be `=` or `!=` for status and inspected_storage.
+   * Examples:
+   * * inspected_storage = cloud_storage AND status = HEALTHY
+   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
+   * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
+   * * last_run_time > \"2017-12-12T00:00:00+00:00\"
+   * The length of this field should be no more than 500 characters.
+   * 
+ * + * string filter = 5; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 6; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
+   * 
+ * + * .google.privacy.dlp.v2.DlpJobType type = 6; + * @return The type. + */ + com.google.privacy.dlp.v2.DlpJobType getType(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponse.java new file mode 100644 index 000000000000..84ef275a81ed --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Response message for ListJobTriggers.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListJobTriggersResponse} + */ +public final class ListJobTriggersResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListJobTriggersResponse) + ListJobTriggersResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListJobTriggersResponse.newBuilder() to construct. + private ListJobTriggersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListJobTriggersResponse() { + jobTriggers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListJobTriggersResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListJobTriggersResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + jobTriggers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + jobTriggers_.add( + input.readMessage(com.google.privacy.dlp.v2.JobTrigger.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + jobTriggers_ = java.util.Collections.unmodifiableList(jobTriggers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListJobTriggersResponse.class, com.google.privacy.dlp.v2.ListJobTriggersResponse.Builder.class); + } + + public static final int JOB_TRIGGERS_FIELD_NUMBER = 1; + private java.util.List jobTriggers_; + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + @java.lang.Override + public java.util.List getJobTriggersList() { + return jobTriggers_; + } + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + @java.lang.Override + public java.util.List + getJobTriggersOrBuilderList() { + return jobTriggers_; + } + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + @java.lang.Override + public int getJobTriggersCount() { + return jobTriggers_.size(); + } + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger getJobTriggers(int index) { + return jobTriggers_.get(index); + } + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggersOrBuilder( + int index) { + return jobTriggers_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListJobTriggers request.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListJobTriggers request.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < jobTriggers_.size(); i++) { + output.writeMessage(1, jobTriggers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < jobTriggers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, jobTriggers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListJobTriggersResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListJobTriggersResponse other = (com.google.privacy.dlp.v2.ListJobTriggersResponse) obj; + + if (!getJobTriggersList() + .equals(other.getJobTriggersList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJobTriggersCount() > 0) { + hash = (37 * hash) + JOB_TRIGGERS_FIELD_NUMBER; + hash = (53 * hash) + getJobTriggersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListJobTriggersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListJobTriggers.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListJobTriggersResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListJobTriggersResponse) + com.google.privacy.dlp.v2.ListJobTriggersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListJobTriggersResponse.class, com.google.privacy.dlp.v2.ListJobTriggersResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListJobTriggersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getJobTriggersFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobTriggersBuilder_ == null) { + jobTriggers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + jobTriggersBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListJobTriggersResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListJobTriggersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListJobTriggersResponse build() { + com.google.privacy.dlp.v2.ListJobTriggersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListJobTriggersResponse buildPartial() { + com.google.privacy.dlp.v2.ListJobTriggersResponse result = new com.google.privacy.dlp.v2.ListJobTriggersResponse(this); + int from_bitField0_ = bitField0_; + if (jobTriggersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobTriggers_ = java.util.Collections.unmodifiableList(jobTriggers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobTriggers_ = jobTriggers_; + } else { + result.jobTriggers_ = jobTriggersBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListJobTriggersResponse) { + return mergeFrom((com.google.privacy.dlp.v2.ListJobTriggersResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListJobTriggersResponse other) { + if (other == com.google.privacy.dlp.v2.ListJobTriggersResponse.getDefaultInstance()) return this; + if (jobTriggersBuilder_ == null) { + if (!other.jobTriggers_.isEmpty()) { + if (jobTriggers_.isEmpty()) { + jobTriggers_ = other.jobTriggers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobTriggersIsMutable(); + jobTriggers_.addAll(other.jobTriggers_); + } + onChanged(); + } + } else { + if (!other.jobTriggers_.isEmpty()) { + if (jobTriggersBuilder_.isEmpty()) { + jobTriggersBuilder_.dispose(); + jobTriggersBuilder_ = null; + jobTriggers_ = other.jobTriggers_; + bitField0_ = (bitField0_ & ~0x00000001); + jobTriggersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getJobTriggersFieldBuilder() : null; + } else { + jobTriggersBuilder_.addAllMessages(other.jobTriggers_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListJobTriggersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListJobTriggersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List jobTriggers_ = + java.util.Collections.emptyList(); + private void ensureJobTriggersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobTriggers_ = new java.util.ArrayList(jobTriggers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> jobTriggersBuilder_; + + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public java.util.List getJobTriggersList() { + if (jobTriggersBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobTriggers_); + } else { + return jobTriggersBuilder_.getMessageList(); + } + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public int getJobTriggersCount() { + if (jobTriggersBuilder_ == null) { + return jobTriggers_.size(); + } else { + return jobTriggersBuilder_.getCount(); + } + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public com.google.privacy.dlp.v2.JobTrigger getJobTriggers(int index) { + if (jobTriggersBuilder_ == null) { + return jobTriggers_.get(index); + } else { + return jobTriggersBuilder_.getMessage(index); + } + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public Builder setJobTriggers( + int index, com.google.privacy.dlp.v2.JobTrigger value) { + if (jobTriggersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobTriggersIsMutable(); + jobTriggers_.set(index, value); + onChanged(); + } else { + jobTriggersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public Builder setJobTriggers( + int index, com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { + if (jobTriggersBuilder_ == null) { + ensureJobTriggersIsMutable(); + jobTriggers_.set(index, builderForValue.build()); + onChanged(); + } else { + jobTriggersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public Builder addJobTriggers(com.google.privacy.dlp.v2.JobTrigger value) { + if (jobTriggersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobTriggersIsMutable(); + jobTriggers_.add(value); + onChanged(); + } else { + jobTriggersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public Builder addJobTriggers( + int index, com.google.privacy.dlp.v2.JobTrigger value) { + if (jobTriggersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobTriggersIsMutable(); + jobTriggers_.add(index, value); + onChanged(); + } else { + jobTriggersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public Builder addJobTriggers( + com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { + if (jobTriggersBuilder_ == null) { + ensureJobTriggersIsMutable(); + jobTriggers_.add(builderForValue.build()); + onChanged(); + } else { + jobTriggersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public Builder addJobTriggers( + int index, com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { + if (jobTriggersBuilder_ == null) { + ensureJobTriggersIsMutable(); + jobTriggers_.add(index, builderForValue.build()); + onChanged(); + } else { + jobTriggersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public Builder addAllJobTriggers( + java.lang.Iterable values) { + if (jobTriggersBuilder_ == null) { + ensureJobTriggersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, jobTriggers_); + onChanged(); + } else { + jobTriggersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public Builder clearJobTriggers() { + if (jobTriggersBuilder_ == null) { + jobTriggers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobTriggersBuilder_.clear(); + } + return this; + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public Builder removeJobTriggers(int index) { + if (jobTriggersBuilder_ == null) { + ensureJobTriggersIsMutable(); + jobTriggers_.remove(index); + onChanged(); + } else { + jobTriggersBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public com.google.privacy.dlp.v2.JobTrigger.Builder getJobTriggersBuilder( + int index) { + return getJobTriggersFieldBuilder().getBuilder(index); + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggersOrBuilder( + int index) { + if (jobTriggersBuilder_ == null) { + return jobTriggers_.get(index); } else { + return jobTriggersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public java.util.List + getJobTriggersOrBuilderList() { + if (jobTriggersBuilder_ != null) { + return jobTriggersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobTriggers_); + } + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public com.google.privacy.dlp.v2.JobTrigger.Builder addJobTriggersBuilder() { + return getJobTriggersFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance()); + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public com.google.privacy.dlp.v2.JobTrigger.Builder addJobTriggersBuilder( + int index) { + return getJobTriggersFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance()); + } + /** + *
+     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + public java.util.List + getJobTriggersBuilderList() { + return getJobTriggersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> + getJobTriggersFieldBuilder() { + if (jobTriggersBuilder_ == null) { + jobTriggersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder>( + jobTriggers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + jobTriggers_ = null; + } + return jobTriggersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListJobTriggers request.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListJobTriggers request.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListJobTriggers request.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListJobTriggers request.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListJobTriggers request.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListJobTriggersResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListJobTriggersResponse) + private static final com.google.privacy.dlp.v2.ListJobTriggersResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListJobTriggersResponse(); + } + + public static com.google.privacy.dlp.v2.ListJobTriggersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListJobTriggersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListJobTriggersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListJobTriggersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponseOrBuilder.java new file mode 100644 index 000000000000..622afb7a6288 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListJobTriggersResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListJobTriggersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + java.util.List + getJobTriggersList(); + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + com.google.privacy.dlp.v2.JobTrigger getJobTriggers(int index); + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + int getJobTriggersCount(); + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + java.util.List + getJobTriggersOrBuilderList(); + /** + *
+   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; + */ + com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggersOrBuilder( + int index); + + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListJobTriggers request.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListJobTriggers request.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java new file mode 100644 index 000000000000..62521e1affae --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java @@ -0,0 +1,1331 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for ListStoredInfoTypes.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListStoredInfoTypesRequest} + */ +public final class ListStoredInfoTypesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListStoredInfoTypesRequest) + ListStoredInfoTypesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListStoredInfoTypesRequest.newBuilder() to construct. + private ListStoredInfoTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListStoredInfoTypesRequest() { + parent_ = ""; + pageToken_ = ""; + orderBy_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListStoredInfoTypesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListStoredInfoTypesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.class, com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListStoredInfoTypes`.
+   * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListStoredInfoTypes`.
+   * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+   * Size of the page, can be limited by the server. If zero server returns
+   * a page of max size 100.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 4; + private volatile java.lang.Object orderBy_; + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc, display_name, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the most recent version of the
+   * resource was created.
+   * - `state`: corresponds to the state of the resource.
+   * - `name`: corresponds to resource name.
+   * - `display_name`: corresponds to info type's display name.
+   * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc, display_name, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the most recent version of the
+   * resource was created.
+   * - `state`: corresponds to the state of the resource.
+   * - `name`: corresponds to resource name.
+   * - `display_name`: corresponds to info type's display name.
+   * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListStoredInfoTypesRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListStoredInfoTypesRequest other = (com.google.privacy.dlp.v2.ListStoredInfoTypesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for ListStoredInfoTypes.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListStoredInfoTypesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListStoredInfoTypesRequest) + com.google.privacy.dlp.v2.ListStoredInfoTypesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.class, com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + orderBy_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListStoredInfoTypesRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListStoredInfoTypesRequest build() { + com.google.privacy.dlp.v2.ListStoredInfoTypesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListStoredInfoTypesRequest buildPartial() { + com.google.privacy.dlp.v2.ListStoredInfoTypesRequest result = new com.google.privacy.dlp.v2.ListStoredInfoTypesRequest(this); + result.parent_ = parent_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + result.orderBy_ = orderBy_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListStoredInfoTypesRequest) { + return mergeFrom((com.google.privacy.dlp.v2.ListStoredInfoTypesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest other) { + if (other == com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListStoredInfoTypesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on the scope of the request
+     * (project or organization) and whether you have [specified a processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListStoredInfoTypes`.
+     * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListStoredInfoTypes`.
+     * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListStoredInfoTypes`.
+     * 
+ * + * string page_token = 2; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListStoredInfoTypes`.
+     * 
+ * + * string page_token = 2; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Page token to continue retrieval. Comes from previous call
+     * to `ListStoredInfoTypes`.
+     * 
+ * + * string page_token = 2; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Size of the page, can be limited by the server. If zero server returns
+     * a page of max size 100.
+     * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Size of the page, can be limited by the server. If zero server returns
+     * a page of max size 100.
+     * 
+ * + * int32 page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Size of the page, can be limited by the server. If zero server returns
+     * a page of max size 100.
+     * 
+ * + * int32 page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, display_name, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the most recent version of the
+     * resource was created.
+     * - `state`: corresponds to the state of the resource.
+     * - `name`: corresponds to resource name.
+     * - `display_name`: corresponds to info type's display name.
+     * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, display_name, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the most recent version of the
+     * resource was created.
+     * - `state`: corresponds to the state of the resource.
+     * - `name`: corresponds to resource name.
+     * - `display_name`: corresponds to info type's display name.
+     * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, display_name, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the most recent version of the
+     * resource was created.
+     * - `state`: corresponds to the state of the resource.
+     * - `name`: corresponds to resource name.
+     * - `display_name`: corresponds to info type's display name.
+     * 
+ * + * string order_by = 4; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, display_name, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the most recent version of the
+     * resource was created.
+     * - `state`: corresponds to the state of the resource.
+     * - `name`: corresponds to resource name.
+     * - `display_name`: corresponds to info type's display name.
+     * 
+ * + * string order_by = 4; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Comma separated list of fields to order by,
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc, display_name, create_time desc`
+     * Supported fields are:
+     * - `create_time`: corresponds to the time the most recent version of the
+     * resource was created.
+     * - `state`: corresponds to the state of the resource.
+     * - `name`: corresponds to resource name.
+     * - `display_name`: corresponds to info type's display name.
+     * 
+ * + * string order_by = 4; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 5; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListStoredInfoTypesRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListStoredInfoTypesRequest) + private static final com.google.privacy.dlp.v2.ListStoredInfoTypesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListStoredInfoTypesRequest(); + } + + public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListStoredInfoTypesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListStoredInfoTypesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListStoredInfoTypesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java new file mode 100644 index 000000000000..ea88064455b1 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java @@ -0,0 +1,144 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListStoredInfoTypesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListStoredInfoTypesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on the scope of the request
+   * (project or organization) and whether you have [specified a processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListStoredInfoTypes`.
+   * 
+ * + * string page_token = 2; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Page token to continue retrieval. Comes from previous call
+   * to `ListStoredInfoTypes`.
+   * 
+ * + * string page_token = 2; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Size of the page, can be limited by the server. If zero server returns
+   * a page of max size 100.
+   * 
+ * + * int32 page_size = 3; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc, display_name, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the most recent version of the
+   * resource was created.
+   * - `state`: corresponds to the state of the resource.
+   * - `name`: corresponds to resource name.
+   * - `display_name`: corresponds to info type's display name.
+   * 
+ * + * string order_by = 4; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Comma separated list of fields to order by,
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc, display_name, create_time desc`
+   * Supported fields are:
+   * - `create_time`: corresponds to the time the most recent version of the
+   * resource was created.
+   * - `state`: corresponds to the state of the resource.
+   * - `name`: corresponds to resource name.
+   * - `display_name`: corresponds to info type's display name.
+   * 
+ * + * string order_by = 4; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 5; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponse.java new file mode 100644 index 000000000000..3bf268a1279a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Response message for ListStoredInfoTypes.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListStoredInfoTypesResponse} + */ +public final class ListStoredInfoTypesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListStoredInfoTypesResponse) + ListStoredInfoTypesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListStoredInfoTypesResponse.newBuilder() to construct. + private ListStoredInfoTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListStoredInfoTypesResponse() { + storedInfoTypes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListStoredInfoTypesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListStoredInfoTypesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + storedInfoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + storedInfoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.StoredInfoType.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + storedInfoTypes_ = java.util.Collections.unmodifiableList(storedInfoTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.class, com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.Builder.class); + } + + public static final int STORED_INFO_TYPES_FIELD_NUMBER = 1; + private java.util.List storedInfoTypes_; + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + @java.lang.Override + public java.util.List getStoredInfoTypesList() { + return storedInfoTypes_; + } + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + @java.lang.Override + public java.util.List + getStoredInfoTypesOrBuilderList() { + return storedInfoTypes_; + } + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + @java.lang.Override + public int getStoredInfoTypesCount() { + return storedInfoTypes_.size(); + } + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoType getStoredInfoTypes(int index) { + return storedInfoTypes_.get(index); + } + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder getStoredInfoTypesOrBuilder( + int index) { + return storedInfoTypes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListStoredInfoTypes request.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListStoredInfoTypes request.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < storedInfoTypes_.size(); i++) { + output.writeMessage(1, storedInfoTypes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < storedInfoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, storedInfoTypes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ListStoredInfoTypesResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ListStoredInfoTypesResponse other = (com.google.privacy.dlp.v2.ListStoredInfoTypesResponse) obj; + + if (!getStoredInfoTypesList() + .equals(other.getStoredInfoTypesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getStoredInfoTypesCount() > 0) { + hash = (37 * hash) + STORED_INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getStoredInfoTypesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ListStoredInfoTypesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response message for ListStoredInfoTypes.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ListStoredInfoTypesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListStoredInfoTypesResponse) + com.google.privacy.dlp.v2.ListStoredInfoTypesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.class, com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getStoredInfoTypesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (storedInfoTypesBuilder_ == null) { + storedInfoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + storedInfoTypesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse build() { + com.google.privacy.dlp.v2.ListStoredInfoTypesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse buildPartial() { + com.google.privacy.dlp.v2.ListStoredInfoTypesResponse result = new com.google.privacy.dlp.v2.ListStoredInfoTypesResponse(this); + int from_bitField0_ = bitField0_; + if (storedInfoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + storedInfoTypes_ = java.util.Collections.unmodifiableList(storedInfoTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.storedInfoTypes_ = storedInfoTypes_; + } else { + result.storedInfoTypes_ = storedInfoTypesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ListStoredInfoTypesResponse) { + return mergeFrom((com.google.privacy.dlp.v2.ListStoredInfoTypesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ListStoredInfoTypesResponse other) { + if (other == com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.getDefaultInstance()) return this; + if (storedInfoTypesBuilder_ == null) { + if (!other.storedInfoTypes_.isEmpty()) { + if (storedInfoTypes_.isEmpty()) { + storedInfoTypes_ = other.storedInfoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStoredInfoTypesIsMutable(); + storedInfoTypes_.addAll(other.storedInfoTypes_); + } + onChanged(); + } + } else { + if (!other.storedInfoTypes_.isEmpty()) { + if (storedInfoTypesBuilder_.isEmpty()) { + storedInfoTypesBuilder_.dispose(); + storedInfoTypesBuilder_ = null; + storedInfoTypes_ = other.storedInfoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + storedInfoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getStoredInfoTypesFieldBuilder() : null; + } else { + storedInfoTypesBuilder_.addAllMessages(other.storedInfoTypes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ListStoredInfoTypesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List storedInfoTypes_ = + java.util.Collections.emptyList(); + private void ensureStoredInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + storedInfoTypes_ = new java.util.ArrayList(storedInfoTypes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoType, com.google.privacy.dlp.v2.StoredInfoType.Builder, com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder> storedInfoTypesBuilder_; + + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public java.util.List getStoredInfoTypesList() { + if (storedInfoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(storedInfoTypes_); + } else { + return storedInfoTypesBuilder_.getMessageList(); + } + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public int getStoredInfoTypesCount() { + if (storedInfoTypesBuilder_ == null) { + return storedInfoTypes_.size(); + } else { + return storedInfoTypesBuilder_.getCount(); + } + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public com.google.privacy.dlp.v2.StoredInfoType getStoredInfoTypes(int index) { + if (storedInfoTypesBuilder_ == null) { + return storedInfoTypes_.get(index); + } else { + return storedInfoTypesBuilder_.getMessage(index); + } + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public Builder setStoredInfoTypes( + int index, com.google.privacy.dlp.v2.StoredInfoType value) { + if (storedInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStoredInfoTypesIsMutable(); + storedInfoTypes_.set(index, value); + onChanged(); + } else { + storedInfoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public Builder setStoredInfoTypes( + int index, com.google.privacy.dlp.v2.StoredInfoType.Builder builderForValue) { + if (storedInfoTypesBuilder_ == null) { + ensureStoredInfoTypesIsMutable(); + storedInfoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + storedInfoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public Builder addStoredInfoTypes(com.google.privacy.dlp.v2.StoredInfoType value) { + if (storedInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStoredInfoTypesIsMutable(); + storedInfoTypes_.add(value); + onChanged(); + } else { + storedInfoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public Builder addStoredInfoTypes( + int index, com.google.privacy.dlp.v2.StoredInfoType value) { + if (storedInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStoredInfoTypesIsMutable(); + storedInfoTypes_.add(index, value); + onChanged(); + } else { + storedInfoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public Builder addStoredInfoTypes( + com.google.privacy.dlp.v2.StoredInfoType.Builder builderForValue) { + if (storedInfoTypesBuilder_ == null) { + ensureStoredInfoTypesIsMutable(); + storedInfoTypes_.add(builderForValue.build()); + onChanged(); + } else { + storedInfoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public Builder addStoredInfoTypes( + int index, com.google.privacy.dlp.v2.StoredInfoType.Builder builderForValue) { + if (storedInfoTypesBuilder_ == null) { + ensureStoredInfoTypesIsMutable(); + storedInfoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + storedInfoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public Builder addAllStoredInfoTypes( + java.lang.Iterable values) { + if (storedInfoTypesBuilder_ == null) { + ensureStoredInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, storedInfoTypes_); + onChanged(); + } else { + storedInfoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public Builder clearStoredInfoTypes() { + if (storedInfoTypesBuilder_ == null) { + storedInfoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + storedInfoTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public Builder removeStoredInfoTypes(int index) { + if (storedInfoTypesBuilder_ == null) { + ensureStoredInfoTypesIsMutable(); + storedInfoTypes_.remove(index); + onChanged(); + } else { + storedInfoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public com.google.privacy.dlp.v2.StoredInfoType.Builder getStoredInfoTypesBuilder( + int index) { + return getStoredInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder getStoredInfoTypesOrBuilder( + int index) { + if (storedInfoTypesBuilder_ == null) { + return storedInfoTypes_.get(index); } else { + return storedInfoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public java.util.List + getStoredInfoTypesOrBuilderList() { + if (storedInfoTypesBuilder_ != null) { + return storedInfoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(storedInfoTypes_); + } + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public com.google.privacy.dlp.v2.StoredInfoType.Builder addStoredInfoTypesBuilder() { + return getStoredInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance()); + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public com.google.privacy.dlp.v2.StoredInfoType.Builder addStoredInfoTypesBuilder( + int index) { + return getStoredInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance()); + } + /** + *
+     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + public java.util.List + getStoredInfoTypesBuilderList() { + return getStoredInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoType, com.google.privacy.dlp.v2.StoredInfoType.Builder, com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder> + getStoredInfoTypesFieldBuilder() { + if (storedInfoTypesBuilder_ == null) { + storedInfoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoType, com.google.privacy.dlp.v2.StoredInfoType.Builder, com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder>( + storedInfoTypes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + storedInfoTypes_ = null; + } + return storedInfoTypesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListStoredInfoTypes request.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListStoredInfoTypes request.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListStoredInfoTypes request.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListStoredInfoTypes request.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * If the next page is available then the next page token to be used
+     * in following ListStoredInfoTypes request.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListStoredInfoTypesResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListStoredInfoTypesResponse) + private static final com.google.privacy.dlp.v2.ListStoredInfoTypesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListStoredInfoTypesResponse(); + } + + public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListStoredInfoTypesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListStoredInfoTypesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponseOrBuilder.java new file mode 100644 index 000000000000..89c319c9f9da --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ListStoredInfoTypesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListStoredInfoTypesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + java.util.List + getStoredInfoTypesList(); + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + com.google.privacy.dlp.v2.StoredInfoType getStoredInfoTypes(int index); + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + int getStoredInfoTypesCount(); + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + java.util.List + getStoredInfoTypesOrBuilderList(); + /** + *
+   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; + */ + com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder getStoredInfoTypesOrBuilder( + int index); + + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListStoredInfoTypes request.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * If the next page is available then the next page token to be used
+   * in following ListStoredInfoTypes request.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Location.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Location.java new file mode 100644 index 000000000000..7cdf077baf5d --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Location.java @@ -0,0 +1,1675 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Specifies the location of the finding.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Location} + */ +public final class Location extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Location) + LocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Location() { + contentLocations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Location(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Location( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Range.Builder subBuilder = null; + if (byteRange_ != null) { + subBuilder = byteRange_.toBuilder(); + } + byteRange_ = input.readMessage(com.google.privacy.dlp.v2.Range.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(byteRange_); + byteRange_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.Range.Builder subBuilder = null; + if (codepointRange_ != null) { + subBuilder = codepointRange_.toBuilder(); + } + codepointRange_ = input.readMessage(com.google.privacy.dlp.v2.Range.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(codepointRange_); + codepointRange_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + contentLocations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + contentLocations_.add( + input.readMessage(com.google.privacy.dlp.v2.ContentLocation.parser(), extensionRegistry)); + break; + } + case 66: { + com.google.privacy.dlp.v2.Container.Builder subBuilder = null; + if (container_ != null) { + subBuilder = container_.toBuilder(); + } + container_ = input.readMessage(com.google.privacy.dlp.v2.Container.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(container_); + container_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + contentLocations_ = java.util.Collections.unmodifiableList(contentLocations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Location.class, com.google.privacy.dlp.v2.Location.Builder.class); + } + + public static final int BYTE_RANGE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.Range byteRange_; + /** + *
+   * Zero-based byte offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Note that when the content is not textual, this references
+   * the UTF-8 encoded textual representation of the content.
+   * Omitted if content is an image.
+   * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + * @return Whether the byteRange field is set. + */ + @java.lang.Override + public boolean hasByteRange() { + return byteRange_ != null; + } + /** + *
+   * Zero-based byte offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Note that when the content is not textual, this references
+   * the UTF-8 encoded textual representation of the content.
+   * Omitted if content is an image.
+   * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + * @return The byteRange. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Range getByteRange() { + return byteRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : byteRange_; + } + /** + *
+   * Zero-based byte offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Note that when the content is not textual, this references
+   * the UTF-8 encoded textual representation of the content.
+   * Omitted if content is an image.
+   * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RangeOrBuilder getByteRangeOrBuilder() { + return getByteRange(); + } + + public static final int CODEPOINT_RANGE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.Range codepointRange_; + /** + *
+   * Unicode character offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Provided when the content is text.
+   * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + * @return Whether the codepointRange field is set. + */ + @java.lang.Override + public boolean hasCodepointRange() { + return codepointRange_ != null; + } + /** + *
+   * Unicode character offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Provided when the content is text.
+   * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + * @return The codepointRange. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Range getCodepointRange() { + return codepointRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : codepointRange_; + } + /** + *
+   * Unicode character offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Provided when the content is text.
+   * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RangeOrBuilder getCodepointRangeOrBuilder() { + return getCodepointRange(); + } + + public static final int CONTENT_LOCATIONS_FIELD_NUMBER = 7; + private java.util.List contentLocations_; + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + @java.lang.Override + public java.util.List getContentLocationsList() { + return contentLocations_; + } + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + @java.lang.Override + public java.util.List + getContentLocationsOrBuilderList() { + return contentLocations_; + } + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + @java.lang.Override + public int getContentLocationsCount() { + return contentLocations_.size(); + } + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentLocation getContentLocations(int index) { + return contentLocations_.get(index); + } + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentLocationOrBuilder getContentLocationsOrBuilder( + int index) { + return contentLocations_.get(index); + } + + public static final int CONTAINER_FIELD_NUMBER = 8; + private com.google.privacy.dlp.v2.Container container_; + /** + *
+   * Information about the container where this finding occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + * @return Whether the container field is set. + */ + @java.lang.Override + public boolean hasContainer() { + return container_ != null; + } + /** + *
+   * Information about the container where this finding occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + * @return The container. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Container getContainer() { + return container_ == null ? com.google.privacy.dlp.v2.Container.getDefaultInstance() : container_; + } + /** + *
+   * Information about the container where this finding occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerOrBuilder() { + return getContainer(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (byteRange_ != null) { + output.writeMessage(1, getByteRange()); + } + if (codepointRange_ != null) { + output.writeMessage(2, getCodepointRange()); + } + for (int i = 0; i < contentLocations_.size(); i++) { + output.writeMessage(7, contentLocations_.get(i)); + } + if (container_ != null) { + output.writeMessage(8, getContainer()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (byteRange_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getByteRange()); + } + if (codepointRange_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCodepointRange()); + } + for (int i = 0; i < contentLocations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, contentLocations_.get(i)); + } + if (container_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getContainer()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Location)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Location other = (com.google.privacy.dlp.v2.Location) obj; + + if (hasByteRange() != other.hasByteRange()) return false; + if (hasByteRange()) { + if (!getByteRange() + .equals(other.getByteRange())) return false; + } + if (hasCodepointRange() != other.hasCodepointRange()) return false; + if (hasCodepointRange()) { + if (!getCodepointRange() + .equals(other.getCodepointRange())) return false; + } + if (!getContentLocationsList() + .equals(other.getContentLocationsList())) return false; + if (hasContainer() != other.hasContainer()) return false; + if (hasContainer()) { + if (!getContainer() + .equals(other.getContainer())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasByteRange()) { + hash = (37 * hash) + BYTE_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getByteRange().hashCode(); + } + if (hasCodepointRange()) { + hash = (37 * hash) + CODEPOINT_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getCodepointRange().hashCode(); + } + if (getContentLocationsCount() > 0) { + hash = (37 * hash) + CONTENT_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getContentLocationsList().hashCode(); + } + if (hasContainer()) { + hash = (37 * hash) + CONTAINER_FIELD_NUMBER; + hash = (53 * hash) + getContainer().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Location parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Location parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Location parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Location parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Location parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Location parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Location parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Location parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Location parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Location parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Location parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Location parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Location prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies the location of the finding.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Location} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Location) + com.google.privacy.dlp.v2.LocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Location.class, com.google.privacy.dlp.v2.Location.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Location.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getContentLocationsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (byteRangeBuilder_ == null) { + byteRange_ = null; + } else { + byteRange_ = null; + byteRangeBuilder_ = null; + } + if (codepointRangeBuilder_ == null) { + codepointRange_ = null; + } else { + codepointRange_ = null; + codepointRangeBuilder_ = null; + } + if (contentLocationsBuilder_ == null) { + contentLocations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + contentLocationsBuilder_.clear(); + } + if (containerBuilder_ == null) { + container_ = null; + } else { + container_ = null; + containerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Location getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Location.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Location build() { + com.google.privacy.dlp.v2.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Location buildPartial() { + com.google.privacy.dlp.v2.Location result = new com.google.privacy.dlp.v2.Location(this); + int from_bitField0_ = bitField0_; + if (byteRangeBuilder_ == null) { + result.byteRange_ = byteRange_; + } else { + result.byteRange_ = byteRangeBuilder_.build(); + } + if (codepointRangeBuilder_ == null) { + result.codepointRange_ = codepointRange_; + } else { + result.codepointRange_ = codepointRangeBuilder_.build(); + } + if (contentLocationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + contentLocations_ = java.util.Collections.unmodifiableList(contentLocations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.contentLocations_ = contentLocations_; + } else { + result.contentLocations_ = contentLocationsBuilder_.build(); + } + if (containerBuilder_ == null) { + result.container_ = container_; + } else { + result.container_ = containerBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Location) { + return mergeFrom((com.google.privacy.dlp.v2.Location)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Location other) { + if (other == com.google.privacy.dlp.v2.Location.getDefaultInstance()) return this; + if (other.hasByteRange()) { + mergeByteRange(other.getByteRange()); + } + if (other.hasCodepointRange()) { + mergeCodepointRange(other.getCodepointRange()); + } + if (contentLocationsBuilder_ == null) { + if (!other.contentLocations_.isEmpty()) { + if (contentLocations_.isEmpty()) { + contentLocations_ = other.contentLocations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContentLocationsIsMutable(); + contentLocations_.addAll(other.contentLocations_); + } + onChanged(); + } + } else { + if (!other.contentLocations_.isEmpty()) { + if (contentLocationsBuilder_.isEmpty()) { + contentLocationsBuilder_.dispose(); + contentLocationsBuilder_ = null; + contentLocations_ = other.contentLocations_; + bitField0_ = (bitField0_ & ~0x00000001); + contentLocationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getContentLocationsFieldBuilder() : null; + } else { + contentLocationsBuilder_.addAllMessages(other.contentLocations_); + } + } + } + if (other.hasContainer()) { + mergeContainer(other.getContainer()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Location parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Location) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.Range byteRange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder> byteRangeBuilder_; + /** + *
+     * Zero-based byte offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Note that when the content is not textual, this references
+     * the UTF-8 encoded textual representation of the content.
+     * Omitted if content is an image.
+     * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + * @return Whether the byteRange field is set. + */ + public boolean hasByteRange() { + return byteRangeBuilder_ != null || byteRange_ != null; + } + /** + *
+     * Zero-based byte offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Note that when the content is not textual, this references
+     * the UTF-8 encoded textual representation of the content.
+     * Omitted if content is an image.
+     * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + * @return The byteRange. + */ + public com.google.privacy.dlp.v2.Range getByteRange() { + if (byteRangeBuilder_ == null) { + return byteRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : byteRange_; + } else { + return byteRangeBuilder_.getMessage(); + } + } + /** + *
+     * Zero-based byte offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Note that when the content is not textual, this references
+     * the UTF-8 encoded textual representation of the content.
+     * Omitted if content is an image.
+     * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + */ + public Builder setByteRange(com.google.privacy.dlp.v2.Range value) { + if (byteRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + byteRange_ = value; + onChanged(); + } else { + byteRangeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Zero-based byte offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Note that when the content is not textual, this references
+     * the UTF-8 encoded textual representation of the content.
+     * Omitted if content is an image.
+     * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + */ + public Builder setByteRange( + com.google.privacy.dlp.v2.Range.Builder builderForValue) { + if (byteRangeBuilder_ == null) { + byteRange_ = builderForValue.build(); + onChanged(); + } else { + byteRangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Zero-based byte offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Note that when the content is not textual, this references
+     * the UTF-8 encoded textual representation of the content.
+     * Omitted if content is an image.
+     * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + */ + public Builder mergeByteRange(com.google.privacy.dlp.v2.Range value) { + if (byteRangeBuilder_ == null) { + if (byteRange_ != null) { + byteRange_ = + com.google.privacy.dlp.v2.Range.newBuilder(byteRange_).mergeFrom(value).buildPartial(); + } else { + byteRange_ = value; + } + onChanged(); + } else { + byteRangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Zero-based byte offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Note that when the content is not textual, this references
+     * the UTF-8 encoded textual representation of the content.
+     * Omitted if content is an image.
+     * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + */ + public Builder clearByteRange() { + if (byteRangeBuilder_ == null) { + byteRange_ = null; + onChanged(); + } else { + byteRange_ = null; + byteRangeBuilder_ = null; + } + + return this; + } + /** + *
+     * Zero-based byte offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Note that when the content is not textual, this references
+     * the UTF-8 encoded textual representation of the content.
+     * Omitted if content is an image.
+     * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + */ + public com.google.privacy.dlp.v2.Range.Builder getByteRangeBuilder() { + + onChanged(); + return getByteRangeFieldBuilder().getBuilder(); + } + /** + *
+     * Zero-based byte offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Note that when the content is not textual, this references
+     * the UTF-8 encoded textual representation of the content.
+     * Omitted if content is an image.
+     * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + */ + public com.google.privacy.dlp.v2.RangeOrBuilder getByteRangeOrBuilder() { + if (byteRangeBuilder_ != null) { + return byteRangeBuilder_.getMessageOrBuilder(); + } else { + return byteRange_ == null ? + com.google.privacy.dlp.v2.Range.getDefaultInstance() : byteRange_; + } + } + /** + *
+     * Zero-based byte offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Note that when the content is not textual, this references
+     * the UTF-8 encoded textual representation of the content.
+     * Omitted if content is an image.
+     * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder> + getByteRangeFieldBuilder() { + if (byteRangeBuilder_ == null) { + byteRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder>( + getByteRange(), + getParentForChildren(), + isClean()); + byteRange_ = null; + } + return byteRangeBuilder_; + } + + private com.google.privacy.dlp.v2.Range codepointRange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder> codepointRangeBuilder_; + /** + *
+     * Unicode character offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Provided when the content is text.
+     * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + * @return Whether the codepointRange field is set. + */ + public boolean hasCodepointRange() { + return codepointRangeBuilder_ != null || codepointRange_ != null; + } + /** + *
+     * Unicode character offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Provided when the content is text.
+     * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + * @return The codepointRange. + */ + public com.google.privacy.dlp.v2.Range getCodepointRange() { + if (codepointRangeBuilder_ == null) { + return codepointRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : codepointRange_; + } else { + return codepointRangeBuilder_.getMessage(); + } + } + /** + *
+     * Unicode character offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Provided when the content is text.
+     * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + */ + public Builder setCodepointRange(com.google.privacy.dlp.v2.Range value) { + if (codepointRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + codepointRange_ = value; + onChanged(); + } else { + codepointRangeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Unicode character offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Provided when the content is text.
+     * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + */ + public Builder setCodepointRange( + com.google.privacy.dlp.v2.Range.Builder builderForValue) { + if (codepointRangeBuilder_ == null) { + codepointRange_ = builderForValue.build(); + onChanged(); + } else { + codepointRangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Unicode character offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Provided when the content is text.
+     * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + */ + public Builder mergeCodepointRange(com.google.privacy.dlp.v2.Range value) { + if (codepointRangeBuilder_ == null) { + if (codepointRange_ != null) { + codepointRange_ = + com.google.privacy.dlp.v2.Range.newBuilder(codepointRange_).mergeFrom(value).buildPartial(); + } else { + codepointRange_ = value; + } + onChanged(); + } else { + codepointRangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Unicode character offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Provided when the content is text.
+     * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + */ + public Builder clearCodepointRange() { + if (codepointRangeBuilder_ == null) { + codepointRange_ = null; + onChanged(); + } else { + codepointRange_ = null; + codepointRangeBuilder_ = null; + } + + return this; + } + /** + *
+     * Unicode character offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Provided when the content is text.
+     * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + */ + public com.google.privacy.dlp.v2.Range.Builder getCodepointRangeBuilder() { + + onChanged(); + return getCodepointRangeFieldBuilder().getBuilder(); + } + /** + *
+     * Unicode character offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Provided when the content is text.
+     * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + */ + public com.google.privacy.dlp.v2.RangeOrBuilder getCodepointRangeOrBuilder() { + if (codepointRangeBuilder_ != null) { + return codepointRangeBuilder_.getMessageOrBuilder(); + } else { + return codepointRange_ == null ? + com.google.privacy.dlp.v2.Range.getDefaultInstance() : codepointRange_; + } + } + /** + *
+     * Unicode character offsets delimiting the finding.
+     * These are relative to the finding's containing element.
+     * Provided when the content is text.
+     * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder> + getCodepointRangeFieldBuilder() { + if (codepointRangeBuilder_ == null) { + codepointRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder>( + getCodepointRange(), + getParentForChildren(), + isClean()); + codepointRange_ = null; + } + return codepointRangeBuilder_; + } + + private java.util.List contentLocations_ = + java.util.Collections.emptyList(); + private void ensureContentLocationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + contentLocations_ = new java.util.ArrayList(contentLocations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ContentLocation, com.google.privacy.dlp.v2.ContentLocation.Builder, com.google.privacy.dlp.v2.ContentLocationOrBuilder> contentLocationsBuilder_; + + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public java.util.List getContentLocationsList() { + if (contentLocationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contentLocations_); + } else { + return contentLocationsBuilder_.getMessageList(); + } + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public int getContentLocationsCount() { + if (contentLocationsBuilder_ == null) { + return contentLocations_.size(); + } else { + return contentLocationsBuilder_.getCount(); + } + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public com.google.privacy.dlp.v2.ContentLocation getContentLocations(int index) { + if (contentLocationsBuilder_ == null) { + return contentLocations_.get(index); + } else { + return contentLocationsBuilder_.getMessage(index); + } + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public Builder setContentLocations( + int index, com.google.privacy.dlp.v2.ContentLocation value) { + if (contentLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentLocationsIsMutable(); + contentLocations_.set(index, value); + onChanged(); + } else { + contentLocationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public Builder setContentLocations( + int index, com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue) { + if (contentLocationsBuilder_ == null) { + ensureContentLocationsIsMutable(); + contentLocations_.set(index, builderForValue.build()); + onChanged(); + } else { + contentLocationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public Builder addContentLocations(com.google.privacy.dlp.v2.ContentLocation value) { + if (contentLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentLocationsIsMutable(); + contentLocations_.add(value); + onChanged(); + } else { + contentLocationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public Builder addContentLocations( + int index, com.google.privacy.dlp.v2.ContentLocation value) { + if (contentLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentLocationsIsMutable(); + contentLocations_.add(index, value); + onChanged(); + } else { + contentLocationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public Builder addContentLocations( + com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue) { + if (contentLocationsBuilder_ == null) { + ensureContentLocationsIsMutable(); + contentLocations_.add(builderForValue.build()); + onChanged(); + } else { + contentLocationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public Builder addContentLocations( + int index, com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue) { + if (contentLocationsBuilder_ == null) { + ensureContentLocationsIsMutable(); + contentLocations_.add(index, builderForValue.build()); + onChanged(); + } else { + contentLocationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public Builder addAllContentLocations( + java.lang.Iterable values) { + if (contentLocationsBuilder_ == null) { + ensureContentLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, contentLocations_); + onChanged(); + } else { + contentLocationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public Builder clearContentLocations() { + if (contentLocationsBuilder_ == null) { + contentLocations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + contentLocationsBuilder_.clear(); + } + return this; + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public Builder removeContentLocations(int index) { + if (contentLocationsBuilder_ == null) { + ensureContentLocationsIsMutable(); + contentLocations_.remove(index); + onChanged(); + } else { + contentLocationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public com.google.privacy.dlp.v2.ContentLocation.Builder getContentLocationsBuilder( + int index) { + return getContentLocationsFieldBuilder().getBuilder(index); + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public com.google.privacy.dlp.v2.ContentLocationOrBuilder getContentLocationsOrBuilder( + int index) { + if (contentLocationsBuilder_ == null) { + return contentLocations_.get(index); } else { + return contentLocationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public java.util.List + getContentLocationsOrBuilderList() { + if (contentLocationsBuilder_ != null) { + return contentLocationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contentLocations_); + } + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public com.google.privacy.dlp.v2.ContentLocation.Builder addContentLocationsBuilder() { + return getContentLocationsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance()); + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public com.google.privacy.dlp.v2.ContentLocation.Builder addContentLocationsBuilder( + int index) { + return getContentLocationsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance()); + } + /** + *
+     * List of nested objects pointing to the precise location of the finding
+     * within the file or record.
+     * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + public java.util.List + getContentLocationsBuilderList() { + return getContentLocationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ContentLocation, com.google.privacy.dlp.v2.ContentLocation.Builder, com.google.privacy.dlp.v2.ContentLocationOrBuilder> + getContentLocationsFieldBuilder() { + if (contentLocationsBuilder_ == null) { + contentLocationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ContentLocation, com.google.privacy.dlp.v2.ContentLocation.Builder, com.google.privacy.dlp.v2.ContentLocationOrBuilder>( + contentLocations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + contentLocations_ = null; + } + return contentLocationsBuilder_; + } + + private com.google.privacy.dlp.v2.Container container_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder> containerBuilder_; + /** + *
+     * Information about the container where this finding occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + * @return Whether the container field is set. + */ + public boolean hasContainer() { + return containerBuilder_ != null || container_ != null; + } + /** + *
+     * Information about the container where this finding occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + * @return The container. + */ + public com.google.privacy.dlp.v2.Container getContainer() { + if (containerBuilder_ == null) { + return container_ == null ? com.google.privacy.dlp.v2.Container.getDefaultInstance() : container_; + } else { + return containerBuilder_.getMessage(); + } + } + /** + *
+     * Information about the container where this finding occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + */ + public Builder setContainer(com.google.privacy.dlp.v2.Container value) { + if (containerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + container_ = value; + onChanged(); + } else { + containerBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Information about the container where this finding occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + */ + public Builder setContainer( + com.google.privacy.dlp.v2.Container.Builder builderForValue) { + if (containerBuilder_ == null) { + container_ = builderForValue.build(); + onChanged(); + } else { + containerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Information about the container where this finding occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + */ + public Builder mergeContainer(com.google.privacy.dlp.v2.Container value) { + if (containerBuilder_ == null) { + if (container_ != null) { + container_ = + com.google.privacy.dlp.v2.Container.newBuilder(container_).mergeFrom(value).buildPartial(); + } else { + container_ = value; + } + onChanged(); + } else { + containerBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Information about the container where this finding occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + */ + public Builder clearContainer() { + if (containerBuilder_ == null) { + container_ = null; + onChanged(); + } else { + container_ = null; + containerBuilder_ = null; + } + + return this; + } + /** + *
+     * Information about the container where this finding occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + */ + public com.google.privacy.dlp.v2.Container.Builder getContainerBuilder() { + + onChanged(); + return getContainerFieldBuilder().getBuilder(); + } + /** + *
+     * Information about the container where this finding occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + */ + public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerOrBuilder() { + if (containerBuilder_ != null) { + return containerBuilder_.getMessageOrBuilder(); + } else { + return container_ == null ? + com.google.privacy.dlp.v2.Container.getDefaultInstance() : container_; + } + } + /** + *
+     * Information about the container where this finding occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder> + getContainerFieldBuilder() { + if (containerBuilder_ == null) { + containerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder>( + getContainer(), + getParentForChildren(), + isClean()); + container_ = null; + } + return containerBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Location) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Location) + private static final com.google.privacy.dlp.v2.Location DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Location(); + } + + public static com.google.privacy.dlp.v2.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Location(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationName.java new file mode 100644 index 000000000000..8ca10856543b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationOrBuilder.java new file mode 100644 index 000000000000..baba0c5b8335 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationOrBuilder.java @@ -0,0 +1,157 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface LocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Location) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Zero-based byte offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Note that when the content is not textual, this references
+   * the UTF-8 encoded textual representation of the content.
+   * Omitted if content is an image.
+   * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + * @return Whether the byteRange field is set. + */ + boolean hasByteRange(); + /** + *
+   * Zero-based byte offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Note that when the content is not textual, this references
+   * the UTF-8 encoded textual representation of the content.
+   * Omitted if content is an image.
+   * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + * @return The byteRange. + */ + com.google.privacy.dlp.v2.Range getByteRange(); + /** + *
+   * Zero-based byte offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Note that when the content is not textual, this references
+   * the UTF-8 encoded textual representation of the content.
+   * Omitted if content is an image.
+   * 
+ * + * .google.privacy.dlp.v2.Range byte_range = 1; + */ + com.google.privacy.dlp.v2.RangeOrBuilder getByteRangeOrBuilder(); + + /** + *
+   * Unicode character offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Provided when the content is text.
+   * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + * @return Whether the codepointRange field is set. + */ + boolean hasCodepointRange(); + /** + *
+   * Unicode character offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Provided when the content is text.
+   * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + * @return The codepointRange. + */ + com.google.privacy.dlp.v2.Range getCodepointRange(); + /** + *
+   * Unicode character offsets delimiting the finding.
+   * These are relative to the finding's containing element.
+   * Provided when the content is text.
+   * 
+ * + * .google.privacy.dlp.v2.Range codepoint_range = 2; + */ + com.google.privacy.dlp.v2.RangeOrBuilder getCodepointRangeOrBuilder(); + + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + java.util.List + getContentLocationsList(); + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + com.google.privacy.dlp.v2.ContentLocation getContentLocations(int index); + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + int getContentLocationsCount(); + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + java.util.List + getContentLocationsOrBuilderList(); + /** + *
+   * List of nested objects pointing to the precise location of the finding
+   * within the file or record.
+   * 
+ * + * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; + */ + com.google.privacy.dlp.v2.ContentLocationOrBuilder getContentLocationsOrBuilder( + int index); + + /** + *
+   * Information about the container where this finding occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + * @return Whether the container field is set. + */ + boolean hasContainer(); + /** + *
+   * Information about the container where this finding occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + * @return The container. + */ + com.google.privacy.dlp.v2.Container getContainer(); + /** + *
+   * Information about the container where this finding occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.Container container = 8; + */ + com.google.privacy.dlp.v2.ContainerOrBuilder getContainerOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Manual.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Manual.java new file mode 100644 index 000000000000..77fc3ae0e0d7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Manual.java @@ -0,0 +1,431 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Job trigger option for hybrid jobs. Jobs must be manually created
+ * and finished.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Manual} + */ +public final class Manual extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Manual) + ManualOrBuilder { +private static final long serialVersionUID = 0L; + // Use Manual.newBuilder() to construct. + private Manual(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Manual() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Manual(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Manual( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Manual.class, com.google.privacy.dlp.v2.Manual.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Manual)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Manual other = (com.google.privacy.dlp.v2.Manual) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Manual parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Manual parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Manual parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Manual parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Manual parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Manual parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Manual parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Manual parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Manual parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Manual parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Manual parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Manual parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Manual prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Job trigger option for hybrid jobs. Jobs must be manually created
+   * and finished.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Manual} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Manual) + com.google.privacy.dlp.v2.ManualOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Manual.class, com.google.privacy.dlp.v2.Manual.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Manual.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Manual getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Manual build() { + com.google.privacy.dlp.v2.Manual result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Manual buildPartial() { + com.google.privacy.dlp.v2.Manual result = new com.google.privacy.dlp.v2.Manual(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Manual) { + return mergeFrom((com.google.privacy.dlp.v2.Manual)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Manual other) { + if (other == com.google.privacy.dlp.v2.Manual.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Manual parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Manual) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Manual) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Manual) + private static final com.google.privacy.dlp.v2.Manual DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Manual(); + } + + public static com.google.privacy.dlp.v2.Manual getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Manual parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Manual(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Manual getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ManualOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ManualOrBuilder.java new file mode 100644 index 000000000000..0e9dda656b0a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ManualOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ManualOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Manual) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java new file mode 100644 index 000000000000..599c6b892e85 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Type of the match which can be applied to different ways of matching, like
+ * Dictionary, regular expression and intersecting with findings of another
+ * info type.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.MatchingType} + */ +public enum MatchingType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Invalid.
+   * 
+ * + * MATCHING_TYPE_UNSPECIFIED = 0; + */ + MATCHING_TYPE_UNSPECIFIED(0), + /** + *
+   * Full match.
+   * - Dictionary: join of Dictionary results matched complete finding quote
+   * - Regex: all regex matches fill a finding quote start to end
+   * - Exclude info type: completely inside affecting info types findings
+   * 
+ * + * MATCHING_TYPE_FULL_MATCH = 1; + */ + MATCHING_TYPE_FULL_MATCH(1), + /** + *
+   * Partial match.
+   * - Dictionary: at least one of the tokens in the finding matches
+   * - Regex: substring of the finding matches
+   * - Exclude info type: intersects with affecting info types findings
+   * 
+ * + * MATCHING_TYPE_PARTIAL_MATCH = 2; + */ + MATCHING_TYPE_PARTIAL_MATCH(2), + /** + *
+   * Inverse match.
+   * - Dictionary: no tokens in the finding match the dictionary
+   * - Regex: finding doesn't match the regex
+   * - Exclude info type: no intersection with affecting info types findings
+   * 
+ * + * MATCHING_TYPE_INVERSE_MATCH = 3; + */ + MATCHING_TYPE_INVERSE_MATCH(3), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Invalid.
+   * 
+ * + * MATCHING_TYPE_UNSPECIFIED = 0; + */ + public static final int MATCHING_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * Full match.
+   * - Dictionary: join of Dictionary results matched complete finding quote
+   * - Regex: all regex matches fill a finding quote start to end
+   * - Exclude info type: completely inside affecting info types findings
+   * 
+ * + * MATCHING_TYPE_FULL_MATCH = 1; + */ + public static final int MATCHING_TYPE_FULL_MATCH_VALUE = 1; + /** + *
+   * Partial match.
+   * - Dictionary: at least one of the tokens in the finding matches
+   * - Regex: substring of the finding matches
+   * - Exclude info type: intersects with affecting info types findings
+   * 
+ * + * MATCHING_TYPE_PARTIAL_MATCH = 2; + */ + public static final int MATCHING_TYPE_PARTIAL_MATCH_VALUE = 2; + /** + *
+   * Inverse match.
+   * - Dictionary: no tokens in the finding match the dictionary
+   * - Regex: finding doesn't match the regex
+   * - Exclude info type: no intersection with affecting info types findings
+   * 
+ * + * MATCHING_TYPE_INVERSE_MATCH = 3; + */ + public static final int MATCHING_TYPE_INVERSE_MATCH_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MatchingType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MatchingType forNumber(int value) { + switch (value) { + case 0: return MATCHING_TYPE_UNSPECIFIED; + case 1: return MATCHING_TYPE_FULL_MATCH; + case 2: return MATCHING_TYPE_PARTIAL_MATCH; + case 3: return MATCHING_TYPE_INVERSE_MATCH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MatchingType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MatchingType findValueByNumber(int number) { + return MatchingType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(4); + } + + private static final MatchingType[] VALUES = values(); + + public static MatchingType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MatchingType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.MatchingType) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocation.java new file mode 100644 index 000000000000..0058f6c76bc1 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocation.java @@ -0,0 +1,885 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Metadata Location
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.MetadataLocation} + */ +public final class MetadataLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.MetadataLocation) + MetadataLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use MetadataLocation.newBuilder() to construct. + private MetadataLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MetadataLocation() { + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MetadataLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MetadataLocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 26: { + com.google.privacy.dlp.v2.StorageMetadataLabel.Builder subBuilder = null; + if (labelCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.StorageMetadataLabel) label_).toBuilder(); + } + label_ = + input.readMessage(com.google.privacy.dlp.v2.StorageMetadataLabel.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.StorageMetadataLabel) label_); + label_ = subBuilder.buildPartial(); + } + labelCase_ = 3; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.MetadataLocation.class, com.google.privacy.dlp.v2.MetadataLocation.Builder.class); + } + + private int labelCase_ = 0; + private java.lang.Object label_; + public enum LabelCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STORAGE_LABEL(3), + LABEL_NOT_SET(0); + private final int value; + private LabelCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LabelCase valueOf(int value) { + return forNumber(value); + } + + public static LabelCase forNumber(int value) { + switch (value) { + case 3: return STORAGE_LABEL; + case 0: return LABEL_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LabelCase + getLabelCase() { + return LabelCase.forNumber( + labelCase_); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+   * Type of metadata containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * Type of metadata containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataType type = 1; + * @return The type. + */ + @java.lang.Override public com.google.privacy.dlp.v2.MetadataType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.MetadataType result = com.google.privacy.dlp.v2.MetadataType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.MetadataType.UNRECOGNIZED : result; + } + + public static final int STORAGE_LABEL_FIELD_NUMBER = 3; + /** + *
+   * Storage metadata.
+   * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + * @return Whether the storageLabel field is set. + */ + @java.lang.Override + public boolean hasStorageLabel() { + return labelCase_ == 3; + } + /** + *
+   * Storage metadata.
+   * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + * @return The storageLabel. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StorageMetadataLabel getStorageLabel() { + if (labelCase_ == 3) { + return (com.google.privacy.dlp.v2.StorageMetadataLabel) label_; + } + return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); + } + /** + *
+   * Storage metadata.
+   * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder getStorageLabelOrBuilder() { + if (labelCase_ == 3) { + return (com.google.privacy.dlp.v2.StorageMetadataLabel) label_; + } + return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.privacy.dlp.v2.MetadataType.METADATATYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (labelCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.StorageMetadataLabel) label_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.privacy.dlp.v2.MetadataType.METADATATYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (labelCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.StorageMetadataLabel) label_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.MetadataLocation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.MetadataLocation other = (com.google.privacy.dlp.v2.MetadataLocation) obj; + + if (type_ != other.type_) return false; + if (!getLabelCase().equals(other.getLabelCase())) return false; + switch (labelCase_) { + case 3: + if (!getStorageLabel() + .equals(other.getStorageLabel())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + switch (labelCase_) { + case 3: + hash = (37 * hash) + STORAGE_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getStorageLabel().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.MetadataLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Metadata Location
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.MetadataLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.MetadataLocation) + com.google.privacy.dlp.v2.MetadataLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.MetadataLocation.class, com.google.privacy.dlp.v2.MetadataLocation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.MetadataLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + labelCase_ = 0; + label_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.MetadataLocation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.MetadataLocation build() { + com.google.privacy.dlp.v2.MetadataLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.MetadataLocation buildPartial() { + com.google.privacy.dlp.v2.MetadataLocation result = new com.google.privacy.dlp.v2.MetadataLocation(this); + result.type_ = type_; + if (labelCase_ == 3) { + if (storageLabelBuilder_ == null) { + result.label_ = label_; + } else { + result.label_ = storageLabelBuilder_.build(); + } + } + result.labelCase_ = labelCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.MetadataLocation) { + return mergeFrom((com.google.privacy.dlp.v2.MetadataLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.MetadataLocation other) { + if (other == com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + switch (other.getLabelCase()) { + case STORAGE_LABEL: { + mergeStorageLabel(other.getStorageLabel()); + break; + } + case LABEL_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.MetadataLocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.MetadataLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int labelCase_ = 0; + private java.lang.Object label_; + public LabelCase + getLabelCase() { + return LabelCase.forNumber( + labelCase_); + } + + public Builder clearLabel() { + labelCase_ = 0; + label_ = null; + onChanged(); + return this; + } + + + private int type_ = 0; + /** + *
+     * Type of metadata containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * Type of metadata containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataType type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * Type of metadata containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataType type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.MetadataType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.MetadataType result = com.google.privacy.dlp.v2.MetadataType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.MetadataType.UNRECOGNIZED : result; + } + /** + *
+     * Type of metadata containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataType type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.privacy.dlp.v2.MetadataType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Type of metadata containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.MetadataType type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StorageMetadataLabel, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder, com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder> storageLabelBuilder_; + /** + *
+     * Storage metadata.
+     * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + * @return Whether the storageLabel field is set. + */ + @java.lang.Override + public boolean hasStorageLabel() { + return labelCase_ == 3; + } + /** + *
+     * Storage metadata.
+     * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + * @return The storageLabel. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StorageMetadataLabel getStorageLabel() { + if (storageLabelBuilder_ == null) { + if (labelCase_ == 3) { + return (com.google.privacy.dlp.v2.StorageMetadataLabel) label_; + } + return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); + } else { + if (labelCase_ == 3) { + return storageLabelBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); + } + } + /** + *
+     * Storage metadata.
+     * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + */ + public Builder setStorageLabel(com.google.privacy.dlp.v2.StorageMetadataLabel value) { + if (storageLabelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + label_ = value; + onChanged(); + } else { + storageLabelBuilder_.setMessage(value); + } + labelCase_ = 3; + return this; + } + /** + *
+     * Storage metadata.
+     * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + */ + public Builder setStorageLabel( + com.google.privacy.dlp.v2.StorageMetadataLabel.Builder builderForValue) { + if (storageLabelBuilder_ == null) { + label_ = builderForValue.build(); + onChanged(); + } else { + storageLabelBuilder_.setMessage(builderForValue.build()); + } + labelCase_ = 3; + return this; + } + /** + *
+     * Storage metadata.
+     * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + */ + public Builder mergeStorageLabel(com.google.privacy.dlp.v2.StorageMetadataLabel value) { + if (storageLabelBuilder_ == null) { + if (labelCase_ == 3 && + label_ != com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance()) { + label_ = com.google.privacy.dlp.v2.StorageMetadataLabel.newBuilder((com.google.privacy.dlp.v2.StorageMetadataLabel) label_) + .mergeFrom(value).buildPartial(); + } else { + label_ = value; + } + onChanged(); + } else { + if (labelCase_ == 3) { + storageLabelBuilder_.mergeFrom(value); + } else { + storageLabelBuilder_.setMessage(value); + } + } + labelCase_ = 3; + return this; + } + /** + *
+     * Storage metadata.
+     * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + */ + public Builder clearStorageLabel() { + if (storageLabelBuilder_ == null) { + if (labelCase_ == 3) { + labelCase_ = 0; + label_ = null; + onChanged(); + } + } else { + if (labelCase_ == 3) { + labelCase_ = 0; + label_ = null; + } + storageLabelBuilder_.clear(); + } + return this; + } + /** + *
+     * Storage metadata.
+     * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + */ + public com.google.privacy.dlp.v2.StorageMetadataLabel.Builder getStorageLabelBuilder() { + return getStorageLabelFieldBuilder().getBuilder(); + } + /** + *
+     * Storage metadata.
+     * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder getStorageLabelOrBuilder() { + if ((labelCase_ == 3) && (storageLabelBuilder_ != null)) { + return storageLabelBuilder_.getMessageOrBuilder(); + } else { + if (labelCase_ == 3) { + return (com.google.privacy.dlp.v2.StorageMetadataLabel) label_; + } + return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); + } + } + /** + *
+     * Storage metadata.
+     * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StorageMetadataLabel, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder, com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder> + getStorageLabelFieldBuilder() { + if (storageLabelBuilder_ == null) { + if (!(labelCase_ == 3)) { + label_ = com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); + } + storageLabelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StorageMetadataLabel, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder, com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder>( + (com.google.privacy.dlp.v2.StorageMetadataLabel) label_, + getParentForChildren(), + isClean()); + label_ = null; + } + labelCase_ = 3; + onChanged();; + return storageLabelBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.MetadataLocation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.MetadataLocation) + private static final com.google.privacy.dlp.v2.MetadataLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.MetadataLocation(); + } + + public static com.google.privacy.dlp.v2.MetadataLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetadataLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MetadataLocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.MetadataLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocationOrBuilder.java new file mode 100644 index 000000000000..19acf67d1cc2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocationOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface MetadataLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.MetadataLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Type of metadata containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataType type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * Type of metadata containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.MetadataType type = 1; + * @return The type. + */ + com.google.privacy.dlp.v2.MetadataType getType(); + + /** + *
+   * Storage metadata.
+   * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + * @return Whether the storageLabel field is set. + */ + boolean hasStorageLabel(); + /** + *
+   * Storage metadata.
+   * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + * @return The storageLabel. + */ + com.google.privacy.dlp.v2.StorageMetadataLabel getStorageLabel(); + /** + *
+   * Storage metadata.
+   * 
+ * + * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; + */ + com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder getStorageLabelOrBuilder(); + + public com.google.privacy.dlp.v2.MetadataLocation.LabelCase getLabelCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java new file mode 100644 index 000000000000..e9065a0e78c7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java @@ -0,0 +1,133 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Type of metadata containing the finding.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.MetadataType} + */ +public enum MetadataType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unused
+   * 
+ * + * METADATATYPE_UNSPECIFIED = 0; + */ + METADATATYPE_UNSPECIFIED(0), + /** + *
+   * General file metadata provided by Cloud Storage.
+   * 
+ * + * STORAGE_METADATA = 2; + */ + STORAGE_METADATA(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unused
+   * 
+ * + * METADATATYPE_UNSPECIFIED = 0; + */ + public static final int METADATATYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * General file metadata provided by Cloud Storage.
+   * 
+ * + * STORAGE_METADATA = 2; + */ + public static final int STORAGE_METADATA_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetadataType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetadataType forNumber(int value) { + switch (value) { + case 0: return METADATATYPE_UNSPECIFIED; + case 2: return STORAGE_METADATA; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MetadataType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetadataType findValueByNumber(int number) { + return MetadataType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(6); + } + + private static final MetadataType[] VALUES = values(); + + public static MetadataType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetadataType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.MetadataType) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationLocationName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationLocationName.java new file mode 100644 index 000000000000..b69e6d4d41bf --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationLocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OrganizationLocationName implements ResourceName { + private static final PathTemplate ORGANIZATION_LOCATION = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String organization; + private final String location; + + @Deprecated + protected OrganizationLocationName() { + organization = null; + location = null; + } + + private OrganizationLocationName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OrganizationLocationName of(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build(); + } + + public static String format(String organization, String location) { + return newBuilder().setOrganization(organization).setLocation(location).build().toString(); + } + + public static OrganizationLocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION_LOCATION.validatedMatch( + formattedString, "OrganizationLocationName.parse: formattedString not in valid format"); + return of(matchMap.get("organization"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OrganizationLocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION_LOCATION.instantiate("organization", organization, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + OrganizationLocationName that = ((OrganizationLocationName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for organizations/{organization}/locations/{location}. */ + public static class Builder { + private String organization; + private String location; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(OrganizationLocationName organizationLocationName) { + this.organization = organizationLocationName.organization; + this.location = organizationLocationName.location; + } + + public OrganizationLocationName build() { + return new OrganizationLocationName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationName.java new file mode 100644 index 000000000000..493c147980d2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OrganizationName implements ResourceName { + private static final PathTemplate ORGANIZATION = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}"); + private volatile Map fieldValuesMap; + private final String organization; + + @Deprecated + protected OrganizationName() { + organization = null; + } + + private OrganizationName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + } + + public String getOrganization() { + return organization; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OrganizationName of(String organization) { + return newBuilder().setOrganization(organization).build(); + } + + public static String format(String organization) { + return newBuilder().setOrganization(organization).build().toString(); + } + + public static OrganizationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION.validatedMatch( + formattedString, "OrganizationName.parse: formattedString not in valid format"); + return of(matchMap.get("organization")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OrganizationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION.instantiate("organization", organization); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + OrganizationName that = ((OrganizationName) o); + return Objects.equals(this.organization, that.organization); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + return h; + } + + /** Builder for organizations/{organization}. */ + public static class Builder { + private String organization; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + private Builder(OrganizationName organizationName) { + this.organization = organizationName.organization; + } + + public OrganizationName build() { + return new OrganizationName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java new file mode 100644 index 000000000000..89636aaa4cbc --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java @@ -0,0 +1,749 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Infotype details for other infoTypes found within a column.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.OtherInfoTypeSummary} + */ +public final class OtherInfoTypeSummary extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.OtherInfoTypeSummary) + OtherInfoTypeSummaryOrBuilder { +private static final long serialVersionUID = 0L; + // Use OtherInfoTypeSummary.newBuilder() to construct. + private OtherInfoTypeSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OtherInfoTypeSummary() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OtherInfoTypeSummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OtherInfoTypeSummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (infoType_ != null) { + subBuilder = infoType_.toBuilder(); + } + infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(infoType_); + infoType_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + estimatedPrevalence_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.OtherInfoTypeSummary.class, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder.class); + } + + public static final int INFO_TYPE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.InfoType infoType_; + /** + *
+   * The other infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return infoType_ != null; + } + /** + *
+   * The other infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + /** + *
+   * The other infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + return getInfoType(); + } + + public static final int ESTIMATED_PREVALENCE_FIELD_NUMBER = 2; + private int estimatedPrevalence_; + /** + *
+   * Approximate percentage of non-null rows that contained data detected by
+   * this infotype.
+   * 
+ * + * int32 estimated_prevalence = 2; + * @return The estimatedPrevalence. + */ + @java.lang.Override + public int getEstimatedPrevalence() { + return estimatedPrevalence_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (infoType_ != null) { + output.writeMessage(1, getInfoType()); + } + if (estimatedPrevalence_ != 0) { + output.writeInt32(2, estimatedPrevalence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (infoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInfoType()); + } + if (estimatedPrevalence_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, estimatedPrevalence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.OtherInfoTypeSummary)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.OtherInfoTypeSummary other = (com.google.privacy.dlp.v2.OtherInfoTypeSummary) obj; + + if (hasInfoType() != other.hasInfoType()) return false; + if (hasInfoType()) { + if (!getInfoType() + .equals(other.getInfoType())) return false; + } + if (getEstimatedPrevalence() + != other.getEstimatedPrevalence()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInfoType()) { + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + } + hash = (37 * hash) + ESTIMATED_PREVALENCE_FIELD_NUMBER; + hash = (53 * hash) + getEstimatedPrevalence(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.OtherInfoTypeSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Infotype details for other infoTypes found within a column.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.OtherInfoTypeSummary} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.OtherInfoTypeSummary) + com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.OtherInfoTypeSummary.class, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.OtherInfoTypeSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypeBuilder_ == null) { + infoType_ = null; + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + estimatedPrevalence_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.OtherInfoTypeSummary getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.OtherInfoTypeSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.OtherInfoTypeSummary build() { + com.google.privacy.dlp.v2.OtherInfoTypeSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.OtherInfoTypeSummary buildPartial() { + com.google.privacy.dlp.v2.OtherInfoTypeSummary result = new com.google.privacy.dlp.v2.OtherInfoTypeSummary(this); + if (infoTypeBuilder_ == null) { + result.infoType_ = infoType_; + } else { + result.infoType_ = infoTypeBuilder_.build(); + } + result.estimatedPrevalence_ = estimatedPrevalence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.OtherInfoTypeSummary) { + return mergeFrom((com.google.privacy.dlp.v2.OtherInfoTypeSummary)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.OtherInfoTypeSummary other) { + if (other == com.google.privacy.dlp.v2.OtherInfoTypeSummary.getDefaultInstance()) return this; + if (other.hasInfoType()) { + mergeInfoType(other.getInfoType()); + } + if (other.getEstimatedPrevalence() != 0) { + setEstimatedPrevalence(other.getEstimatedPrevalence()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.OtherInfoTypeSummary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.OtherInfoTypeSummary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.InfoType infoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+     * The other infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + public boolean hasInfoType() { + return infoTypeBuilder_ != null || infoType_ != null; + } + /** + *
+     * The other infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } else { + return infoTypeBuilder_.getMessage(); + } + } + /** + *
+     * The other infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infoType_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The other infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + infoType_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The other infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (infoType_ != null) { + infoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); + } else { + infoType_ = value; + } + onChanged(); + } else { + infoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The other infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + infoType_ = null; + onChanged(); + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + + return this; + } + /** + *
+     * The other infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + + onChanged(); + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * The other infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (infoTypeBuilder_ != null) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + return infoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + } + /** + *
+     * The other infoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getInfoType(), + getParentForChildren(), + isClean()); + infoType_ = null; + } + return infoTypeBuilder_; + } + + private int estimatedPrevalence_ ; + /** + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * @return The estimatedPrevalence. + */ + @java.lang.Override + public int getEstimatedPrevalence() { + return estimatedPrevalence_; + } + /** + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * @param value The estimatedPrevalence to set. + * @return This builder for chaining. + */ + public Builder setEstimatedPrevalence(int value) { + + estimatedPrevalence_ = value; + onChanged(); + return this; + } + /** + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * @return This builder for chaining. + */ + public Builder clearEstimatedPrevalence() { + + estimatedPrevalence_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.OtherInfoTypeSummary) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.OtherInfoTypeSummary) + private static final com.google.privacy.dlp.v2.OtherInfoTypeSummary DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.OtherInfoTypeSummary(); + } + + public static com.google.privacy.dlp.v2.OtherInfoTypeSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OtherInfoTypeSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OtherInfoTypeSummary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.OtherInfoTypeSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java new file mode 100644 index 000000000000..471c73ef5596 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java @@ -0,0 +1,47 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface OtherInfoTypeSummaryOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.OtherInfoTypeSummary) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The other infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+   * The other infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+   * The other infoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+   * Approximate percentage of non-null rows that contained data detected by
+   * this infotype.
+   * 
+ * + * int32 estimated_prevalence = 2; + * @return The estimatedPrevalence. + */ + int getEstimatedPrevalence(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java new file mode 100644 index 000000000000..bd8ca8731340 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java @@ -0,0 +1,1272 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Cloud repository for storing output.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.OutputStorageConfig} + */ +public final class OutputStorageConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.OutputStorageConfig) + OutputStorageConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputStorageConfig.newBuilder() to construct. + private OutputStorageConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputStorageConfig() { + outputSchema_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputStorageConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputStorageConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (typeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.BigQueryTable) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryTable) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; + } + case 24: { + int rawValue = input.readEnum(); + + outputSchema_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.OutputStorageConfig.class, com.google.privacy.dlp.v2.OutputStorageConfig.Builder.class); + } + + /** + *
+   * Predefined schemas for storing findings.
+   * Only for use with external storage.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.OutputStorageConfig.OutputSchema} + */ + public enum OutputSchema + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * OUTPUT_SCHEMA_UNSPECIFIED = 0; + */ + OUTPUT_SCHEMA_UNSPECIFIED(0), + /** + *
+     * Basic schema including only `info_type`, `quote`, `certainty`, and
+     * `timestamp`.
+     * 
+ * + * BASIC_COLUMNS = 1; + */ + BASIC_COLUMNS(1), + /** + *
+     * Schema tailored to findings from scanning Cloud Storage.
+     * 
+ * + * GCS_COLUMNS = 2; + */ + GCS_COLUMNS(2), + /** + *
+     * Schema tailored to findings from scanning Google Datastore.
+     * 
+ * + * DATASTORE_COLUMNS = 3; + */ + DATASTORE_COLUMNS(3), + /** + *
+     * Schema tailored to findings from scanning Google BigQuery.
+     * 
+ * + * BIG_QUERY_COLUMNS = 4; + */ + BIG_QUERY_COLUMNS(4), + /** + *
+     * Schema containing all columns.
+     * 
+ * + * ALL_COLUMNS = 5; + */ + ALL_COLUMNS(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * OUTPUT_SCHEMA_UNSPECIFIED = 0; + */ + public static final int OUTPUT_SCHEMA_UNSPECIFIED_VALUE = 0; + /** + *
+     * Basic schema including only `info_type`, `quote`, `certainty`, and
+     * `timestamp`.
+     * 
+ * + * BASIC_COLUMNS = 1; + */ + public static final int BASIC_COLUMNS_VALUE = 1; + /** + *
+     * Schema tailored to findings from scanning Cloud Storage.
+     * 
+ * + * GCS_COLUMNS = 2; + */ + public static final int GCS_COLUMNS_VALUE = 2; + /** + *
+     * Schema tailored to findings from scanning Google Datastore.
+     * 
+ * + * DATASTORE_COLUMNS = 3; + */ + public static final int DATASTORE_COLUMNS_VALUE = 3; + /** + *
+     * Schema tailored to findings from scanning Google BigQuery.
+     * 
+ * + * BIG_QUERY_COLUMNS = 4; + */ + public static final int BIG_QUERY_COLUMNS_VALUE = 4; + /** + *
+     * Schema containing all columns.
+     * 
+ * + * ALL_COLUMNS = 5; + */ + public static final int ALL_COLUMNS_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OutputSchema valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static OutputSchema forNumber(int value) { + switch (value) { + case 0: return OUTPUT_SCHEMA_UNSPECIFIED; + case 1: return BASIC_COLUMNS; + case 2: return GCS_COLUMNS; + case 3: return DATASTORE_COLUMNS; + case 4: return BIG_QUERY_COLUMNS; + case 5: return ALL_COLUMNS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + OutputSchema> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public OutputSchema findValueByNumber(int number) { + return OutputSchema.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.OutputStorageConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final OutputSchema[] VALUES = values(); + + public static OutputSchema valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private OutputSchema(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.OutputStorageConfig.OutputSchema) + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TABLE(1), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return TABLE; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int TABLE_FIELD_NUMBER = 1; + /** + *
+   * Store findings in an existing table or a new table in an existing
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
+   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+   * for generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return typeCase_ == 1; + } + /** + *
+   * Store findings in an existing table or a new table in an existing
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
+   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+   * for generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return The table. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.BigQueryTable) type_; + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + /** + *
+   * Store findings in an existing table or a new table in an existing
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
+   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+   * for generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.BigQueryTable) type_; + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + + public static final int OUTPUT_SCHEMA_FIELD_NUMBER = 3; + private int outputSchema_; + /** + *
+   * Schema used for writing the findings for Inspect jobs. This field is only
+   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+   * from the `Finding` object. If appending to an existing table, any columns
+   * from the predefined schema that are missing will be added. No columns in
+   * the existing table will be deleted.
+   * If unspecified, then all available columns will be used for a new table or
+   * an (existing) table with no schema, and no changes will be made to an
+   * existing table that has a schema.
+   * Only for use with external storage.
+   * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; + * @return The enum numeric value on the wire for outputSchema. + */ + @java.lang.Override public int getOutputSchemaValue() { + return outputSchema_; + } + /** + *
+   * Schema used for writing the findings for Inspect jobs. This field is only
+   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+   * from the `Finding` object. If appending to an existing table, any columns
+   * from the predefined schema that are missing will be added. No columns in
+   * the existing table will be deleted.
+   * If unspecified, then all available columns will be used for a new table or
+   * an (existing) table with no schema, and no changes will be made to an
+   * existing table that has a schema.
+   * Only for use with external storage.
+   * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; + * @return The outputSchema. + */ + @java.lang.Override public com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema getOutputSchema() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema result = com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.valueOf(outputSchema_); + return result == null ? com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.BigQueryTable) type_); + } + if (outputSchema_ != com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.OUTPUT_SCHEMA_UNSPECIFIED.getNumber()) { + output.writeEnum(3, outputSchema_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.BigQueryTable) type_); + } + if (outputSchema_ != com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.OUTPUT_SCHEMA_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, outputSchema_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.OutputStorageConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.OutputStorageConfig other = (com.google.privacy.dlp.v2.OutputStorageConfig) obj; + + if (outputSchema_ != other.outputSchema_) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getTable() + .equals(other.getTable())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUTPUT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + outputSchema_; + switch (typeCase_) { + case 1: + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.OutputStorageConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Cloud repository for storing output.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.OutputStorageConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.OutputStorageConfig) + com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.OutputStorageConfig.class, com.google.privacy.dlp.v2.OutputStorageConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.OutputStorageConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + outputSchema_ = 0; + + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.OutputStorageConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.OutputStorageConfig build() { + com.google.privacy.dlp.v2.OutputStorageConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.OutputStorageConfig buildPartial() { + com.google.privacy.dlp.v2.OutputStorageConfig result = new com.google.privacy.dlp.v2.OutputStorageConfig(this); + if (typeCase_ == 1) { + if (tableBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = tableBuilder_.build(); + } + } + result.outputSchema_ = outputSchema_; + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.OutputStorageConfig) { + return mergeFrom((com.google.privacy.dlp.v2.OutputStorageConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.OutputStorageConfig other) { + if (other == com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance()) return this; + if (other.outputSchema_ != 0) { + setOutputSchemaValue(other.getOutputSchemaValue()); + } + switch (other.getTypeCase()) { + case TABLE: { + mergeTable(other.getTable()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.OutputStorageConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.OutputStorageConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; + /** + *
+     * Store findings in an existing table or a new table in an existing
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
+     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+     * for generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return typeCase_ == 1; + } + /** + *
+     * Store findings in an existing table or a new table in an existing
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
+     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+     * for generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return The table. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + if (tableBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.BigQueryTable) type_; + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return tableBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + } + /** + *
+     * Store findings in an existing table or a new table in an existing
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
+     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+     * for generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + tableBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + *
+     * Store findings in an existing table or a new table in an existing
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
+     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+     * for generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder setTable( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (tableBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + tableBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + *
+     * Store findings in an existing table or a new table in an existing
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
+     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+     * for generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (typeCase_ == 1 && + type_ != com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.BigQueryTable.newBuilder((com.google.privacy.dlp.v2.BigQueryTable) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + tableBuilder_.mergeFrom(value); + } else { + tableBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + *
+     * Store findings in an existing table or a new table in an existing
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
+     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+     * for generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + tableBuilder_.clear(); + } + return this; + } + /** + *
+     * Store findings in an existing table or a new table in an existing
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
+     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+     * for generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { + return getTableFieldBuilder().getBuilder(); + } + /** + *
+     * Store findings in an existing table or a new table in an existing
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
+     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+     * for generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + if ((typeCase_ == 1) && (tableBuilder_ != null)) { + return tableBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.BigQueryTable) type_; + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + } + /** + *
+     * Store findings in an existing table or a new table in an existing
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
+     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+     * for generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + (com.google.privacy.dlp.v2.BigQueryTable) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged();; + return tableBuilder_; + } + + private int outputSchema_ = 0; + /** + *
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
+     * If unspecified, then all available columns will be used for a new table or
+     * an (existing) table with no schema, and no changes will be made to an
+     * existing table that has a schema.
+     * Only for use with external storage.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; + * @return The enum numeric value on the wire for outputSchema. + */ + @java.lang.Override public int getOutputSchemaValue() { + return outputSchema_; + } + /** + *
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
+     * If unspecified, then all available columns will be used for a new table or
+     * an (existing) table with no schema, and no changes will be made to an
+     * existing table that has a schema.
+     * Only for use with external storage.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; + * @param value The enum numeric value on the wire for outputSchema to set. + * @return This builder for chaining. + */ + public Builder setOutputSchemaValue(int value) { + + outputSchema_ = value; + onChanged(); + return this; + } + /** + *
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
+     * If unspecified, then all available columns will be used for a new table or
+     * an (existing) table with no schema, and no changes will be made to an
+     * existing table that has a schema.
+     * Only for use with external storage.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; + * @return The outputSchema. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema getOutputSchema() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema result = com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.valueOf(outputSchema_); + return result == null ? com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.UNRECOGNIZED : result; + } + /** + *
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
+     * If unspecified, then all available columns will be used for a new table or
+     * an (existing) table with no schema, and no changes will be made to an
+     * existing table that has a schema.
+     * Only for use with external storage.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; + * @param value The outputSchema to set. + * @return This builder for chaining. + */ + public Builder setOutputSchema(com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema value) { + if (value == null) { + throw new NullPointerException(); + } + + outputSchema_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
+     * If unspecified, then all available columns will be used for a new table or
+     * an (existing) table with no schema, and no changes will be made to an
+     * existing table that has a schema.
+     * Only for use with external storage.
+     * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; + * @return This builder for chaining. + */ + public Builder clearOutputSchema() { + + outputSchema_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.OutputStorageConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.OutputStorageConfig) + private static final com.google.privacy.dlp.v2.OutputStorageConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.OutputStorageConfig(); + } + + public static com.google.privacy.dlp.v2.OutputStorageConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputStorageConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputStorageConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.OutputStorageConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java new file mode 100644 index 000000000000..1c192782abd9 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java @@ -0,0 +1,106 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface OutputStorageConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.OutputStorageConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Store findings in an existing table or a new table in an existing
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
+   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+   * for generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return Whether the table field is set. + */ + boolean hasTable(); + /** + *
+   * Store findings in an existing table or a new table in an existing
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
+   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+   * for generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return The table. + */ + com.google.privacy.dlp.v2.BigQueryTable getTable(); + /** + *
+   * Store findings in an existing table or a new table in an existing
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
+   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
+   * for generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); + + /** + *
+   * Schema used for writing the findings for Inspect jobs. This field is only
+   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+   * from the `Finding` object. If appending to an existing table, any columns
+   * from the predefined schema that are missing will be added. No columns in
+   * the existing table will be deleted.
+   * If unspecified, then all available columns will be used for a new table or
+   * an (existing) table with no schema, and no changes will be made to an
+   * existing table that has a schema.
+   * Only for use with external storage.
+   * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; + * @return The enum numeric value on the wire for outputSchema. + */ + int getOutputSchemaValue(); + /** + *
+   * Schema used for writing the findings for Inspect jobs. This field is only
+   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+   * from the `Finding` object. If appending to an existing table, any columns
+   * from the predefined schema that are missing will be added. No columns in
+   * the existing table will be deleted.
+   * If unspecified, then all available columns will be used for a new table or
+   * an (existing) table with no schema, and no changes will be made to an
+   * existing table that has a schema.
+   * Only for use with external storage.
+   * 
+ * + * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; + * @return The outputSchema. + */ + com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema getOutputSchema(); + + public com.google.privacy.dlp.v2.OutputStorageConfig.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionId.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionId.java new file mode 100644 index 000000000000..a71296aa8f16 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionId.java @@ -0,0 +1,769 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Datastore partition ID.
+ * A partition ID identifies a grouping of entities. The grouping is always
+ * by project and namespace, however the namespace ID may be empty.
+ * A partition ID contains several dimensions:
+ * project ID and namespace ID.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PartitionId} + */ +public final class PartitionId extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PartitionId) + PartitionIdOrBuilder { +private static final long serialVersionUID = 0L; + // Use PartitionId.newBuilder() to construct. + private PartitionId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PartitionId() { + projectId_ = ""; + namespaceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PartitionId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PartitionId( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + namespaceId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PartitionId.class, com.google.privacy.dlp.v2.PartitionId.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object projectId_; + /** + *
+   * The ID of the project to which the entities belong.
+   * 
+ * + * string project_id = 2; + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + *
+   * The ID of the project to which the entities belong.
+   * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMESPACE_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object namespaceId_; + /** + *
+   * If not empty, the ID of the namespace to which the entities belong.
+   * 
+ * + * string namespace_id = 4; + * @return The namespaceId. + */ + @java.lang.Override + public java.lang.String getNamespaceId() { + java.lang.Object ref = namespaceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespaceId_ = s; + return s; + } + } + /** + *
+   * If not empty, the ID of the namespace to which the entities belong.
+   * 
+ * + * string namespace_id = 4; + * @return The bytes for namespaceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNamespaceIdBytes() { + java.lang.Object ref = namespaceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespaceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, namespaceId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, namespaceId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PartitionId)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PartitionId other = (com.google.privacy.dlp.v2.PartitionId) obj; + + if (!getProjectId() + .equals(other.getProjectId())) return false; + if (!getNamespaceId() + .equals(other.getNamespaceId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + NAMESPACE_ID_FIELD_NUMBER; + hash = (53 * hash) + getNamespaceId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PartitionId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PartitionId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PartitionId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PartitionId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PartitionId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PartitionId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PartitionId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PartitionId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PartitionId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PartitionId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PartitionId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PartitionId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PartitionId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Datastore partition ID.
+   * A partition ID identifies a grouping of entities. The grouping is always
+   * by project and namespace, however the namespace ID may be empty.
+   * A partition ID contains several dimensions:
+   * project ID and namespace ID.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PartitionId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PartitionId) + com.google.privacy.dlp.v2.PartitionIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PartitionId.class, com.google.privacy.dlp.v2.PartitionId.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PartitionId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + projectId_ = ""; + + namespaceId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PartitionId getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PartitionId.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PartitionId build() { + com.google.privacy.dlp.v2.PartitionId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PartitionId buildPartial() { + com.google.privacy.dlp.v2.PartitionId result = new com.google.privacy.dlp.v2.PartitionId(this); + result.projectId_ = projectId_; + result.namespaceId_ = namespaceId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PartitionId) { + return mergeFrom((com.google.privacy.dlp.v2.PartitionId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PartitionId other) { + if (other == com.google.privacy.dlp.v2.PartitionId.getDefaultInstance()) return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (!other.getNamespaceId().isEmpty()) { + namespaceId_ = other.namespaceId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PartitionId parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PartitionId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object projectId_ = ""; + /** + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString + getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + *
+     * The ID of the project to which the entities belong.
+     * 
+ * + * string project_id = 2; + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private java.lang.Object namespaceId_ = ""; + /** + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * @return The namespaceId. + */ + public java.lang.String getNamespaceId() { + java.lang.Object ref = namespaceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespaceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * @return The bytes for namespaceId. + */ + public com.google.protobuf.ByteString + getNamespaceIdBytes() { + java.lang.Object ref = namespaceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + namespaceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * @param value The namespaceId to set. + * @return This builder for chaining. + */ + public Builder setNamespaceId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + namespaceId_ = value; + onChanged(); + return this; + } + /** + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * @return This builder for chaining. + */ + public Builder clearNamespaceId() { + + namespaceId_ = getDefaultInstance().getNamespaceId(); + onChanged(); + return this; + } + /** + *
+     * If not empty, the ID of the namespace to which the entities belong.
+     * 
+ * + * string namespace_id = 4; + * @param value The bytes for namespaceId to set. + * @return This builder for chaining. + */ + public Builder setNamespaceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + namespaceId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PartitionId) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PartitionId) + private static final com.google.privacy.dlp.v2.PartitionId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PartitionId(); + } + + public static com.google.privacy.dlp.v2.PartitionId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartitionId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PartitionId(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PartitionId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionIdOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionIdOrBuilder.java new file mode 100644 index 000000000000..f386a5d70556 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionIdOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface PartitionIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PartitionId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The ID of the project to which the entities belong.
+   * 
+ * + * string project_id = 2; + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + *
+   * The ID of the project to which the entities belong.
+   * 
+ * + * string project_id = 2; + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString + getProjectIdBytes(); + + /** + *
+   * If not empty, the ID of the namespace to which the entities belong.
+   * 
+ * + * string namespace_id = 4; + * @return The namespaceId. + */ + java.lang.String getNamespaceId(); + /** + *
+   * If not empty, the ID of the namespace to which the entities belong.
+   * 
+ * + * string namespace_id = 4; + * @return The bytes for namespaceId. + */ + com.google.protobuf.ByteString + getNamespaceIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformation.java new file mode 100644 index 000000000000..64e35f5fb6e8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformation.java @@ -0,0 +1,3654 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A rule for transforming a value.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrimitiveTransformation} + */ +public final class PrimitiveTransformation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrimitiveTransformation) + PrimitiveTransformationOrBuilder { +private static final long serialVersionUID = 0L; + // Use PrimitiveTransformation.newBuilder() to construct. + private PrimitiveTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrimitiveTransformation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrimitiveTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrimitiveTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.ReplaceValueConfig.Builder subBuilder = null; + if (transformationCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.ReplaceValueConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.RedactConfig.Builder subBuilder = null; + if (transformationCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.RedactConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.RedactConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.RedactConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.CharacterMaskConfig.Builder subBuilder = null; + if (transformationCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.CharacterMaskConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 3; + break; + } + case 34: { + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder subBuilder = null; + if (transformationCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 4; + break; + } + case 42: { + com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder subBuilder = null; + if (transformationCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.FixedSizeBucketingConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 5; + break; + } + case 50: { + com.google.privacy.dlp.v2.BucketingConfig.Builder subBuilder = null; + if (transformationCase_ == 6) { + subBuilder = ((com.google.privacy.dlp.v2.BucketingConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.BucketingConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.BucketingConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 6; + break; + } + case 58: { + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder subBuilder = null; + if (transformationCase_ == 7) { + subBuilder = ((com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 7; + break; + } + case 66: { + com.google.privacy.dlp.v2.TimePartConfig.Builder subBuilder = null; + if (transformationCase_ == 8) { + subBuilder = ((com.google.privacy.dlp.v2.TimePartConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.TimePartConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.TimePartConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 8; + break; + } + case 74: { + com.google.privacy.dlp.v2.CryptoHashConfig.Builder subBuilder = null; + if (transformationCase_ == 9) { + subBuilder = ((com.google.privacy.dlp.v2.CryptoHashConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.CryptoHashConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CryptoHashConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 9; + break; + } + case 90: { + com.google.privacy.dlp.v2.DateShiftConfig.Builder subBuilder = null; + if (transformationCase_ == 11) { + subBuilder = ((com.google.privacy.dlp.v2.DateShiftConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.DateShiftConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.DateShiftConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 11; + break; + } + case 98: { + com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder subBuilder = null; + if (transformationCase_ == 12) { + subBuilder = ((com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.CryptoDeterministicConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 12; + break; + } + case 106: { + com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder subBuilder = null; + if (transformationCase_ == 13) { + subBuilder = ((com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_).toBuilder(); + } + transformation_ = + input.readMessage(com.google.privacy.dlp.v2.ReplaceDictionaryConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 13; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrimitiveTransformation.class, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder.class); + } + + private int transformationCase_ = 0; + private java.lang.Object transformation_; + public enum TransformationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REPLACE_CONFIG(1), + REDACT_CONFIG(2), + CHARACTER_MASK_CONFIG(3), + CRYPTO_REPLACE_FFX_FPE_CONFIG(4), + FIXED_SIZE_BUCKETING_CONFIG(5), + BUCKETING_CONFIG(6), + REPLACE_WITH_INFO_TYPE_CONFIG(7), + TIME_PART_CONFIG(8), + CRYPTO_HASH_CONFIG(9), + DATE_SHIFT_CONFIG(11), + CRYPTO_DETERMINISTIC_CONFIG(12), + REPLACE_DICTIONARY_CONFIG(13), + TRANSFORMATION_NOT_SET(0); + private final int value; + private TransformationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformationCase valueOf(int value) { + return forNumber(value); + } + + public static TransformationCase forNumber(int value) { + switch (value) { + case 1: return REPLACE_CONFIG; + case 2: return REDACT_CONFIG; + case 3: return CHARACTER_MASK_CONFIG; + case 4: return CRYPTO_REPLACE_FFX_FPE_CONFIG; + case 5: return FIXED_SIZE_BUCKETING_CONFIG; + case 6: return BUCKETING_CONFIG; + case 7: return REPLACE_WITH_INFO_TYPE_CONFIG; + case 8: return TIME_PART_CONFIG; + case 9: return CRYPTO_HASH_CONFIG; + case 11: return DATE_SHIFT_CONFIG; + case 12: return CRYPTO_DETERMINISTIC_CONFIG; + case 13: return REPLACE_DICTIONARY_CONFIG; + case 0: return TRANSFORMATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TransformationCase + getTransformationCase() { + return TransformationCase.forNumber( + transformationCase_); + } + + public static final int REPLACE_CONFIG_FIELD_NUMBER = 1; + /** + *
+   * Replace with a specified value.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + * @return Whether the replaceConfig field is set. + */ + @java.lang.Override + public boolean hasReplaceConfig() { + return transformationCase_ == 1; + } + /** + *
+   * Replace with a specified value.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + * @return The replaceConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceValueConfig getReplaceConfig() { + if (transformationCase_ == 1) { + return (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); + } + /** + *
+   * Replace with a specified value.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder getReplaceConfigOrBuilder() { + if (transformationCase_ == 1) { + return (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); + } + + public static final int REDACT_CONFIG_FIELD_NUMBER = 2; + /** + *
+   * Redact
+   * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + * @return Whether the redactConfig field is set. + */ + @java.lang.Override + public boolean hasRedactConfig() { + return transformationCase_ == 2; + } + /** + *
+   * Redact
+   * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + * @return The redactConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RedactConfig getRedactConfig() { + if (transformationCase_ == 2) { + return (com.google.privacy.dlp.v2.RedactConfig) transformation_; + } + return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); + } + /** + *
+   * Redact
+   * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RedactConfigOrBuilder getRedactConfigOrBuilder() { + if (transformationCase_ == 2) { + return (com.google.privacy.dlp.v2.RedactConfig) transformation_; + } + return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); + } + + public static final int CHARACTER_MASK_CONFIG_FIELD_NUMBER = 3; + /** + *
+   * Mask
+   * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + * @return Whether the characterMaskConfig field is set. + */ + @java.lang.Override + public boolean hasCharacterMaskConfig() { + return transformationCase_ == 3; + } + /** + *
+   * Mask
+   * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + * @return The characterMaskConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CharacterMaskConfig getCharacterMaskConfig() { + if (transformationCase_ == 3) { + return (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_; + } + return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); + } + /** + *
+   * Mask
+   * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder getCharacterMaskConfigOrBuilder() { + if (transformationCase_ == 3) { + return (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_; + } + return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); + } + + public static final int CRYPTO_REPLACE_FFX_FPE_CONFIG_FIELD_NUMBER = 4; + /** + *
+   * Ffx-Fpe
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + * @return Whether the cryptoReplaceFfxFpeConfig field is set. + */ + @java.lang.Override + public boolean hasCryptoReplaceFfxFpeConfig() { + return transformationCase_ == 4; + } + /** + *
+   * Ffx-Fpe
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + * @return The cryptoReplaceFfxFpeConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getCryptoReplaceFfxFpeConfig() { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); + } + /** + *
+   * Ffx-Fpe
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder getCryptoReplaceFfxFpeConfigOrBuilder() { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); + } + + public static final int FIXED_SIZE_BUCKETING_CONFIG_FIELD_NUMBER = 5; + /** + *
+   * Fixed size bucketing
+   * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + * @return Whether the fixedSizeBucketingConfig field is set. + */ + @java.lang.Override + public boolean hasFixedSizeBucketingConfig() { + return transformationCase_ == 5; + } + /** + *
+   * Fixed size bucketing
+   * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + * @return The fixedSizeBucketingConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FixedSizeBucketingConfig getFixedSizeBucketingConfig() { + if (transformationCase_ == 5) { + return (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_; + } + return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); + } + /** + *
+   * Fixed size bucketing
+   * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder getFixedSizeBucketingConfigOrBuilder() { + if (transformationCase_ == 5) { + return (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_; + } + return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); + } + + public static final int BUCKETING_CONFIG_FIELD_NUMBER = 6; + /** + *
+   * Bucketing
+   * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + * @return Whether the bucketingConfig field is set. + */ + @java.lang.Override + public boolean hasBucketingConfig() { + return transformationCase_ == 6; + } + /** + *
+   * Bucketing
+   * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + * @return The bucketingConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig getBucketingConfig() { + if (transformationCase_ == 6) { + return (com.google.privacy.dlp.v2.BucketingConfig) transformation_; + } + return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); + } + /** + *
+   * Bucketing
+   * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfigOrBuilder getBucketingConfigOrBuilder() { + if (transformationCase_ == 6) { + return (com.google.privacy.dlp.v2.BucketingConfig) transformation_; + } + return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); + } + + public static final int REPLACE_WITH_INFO_TYPE_CONFIG_FIELD_NUMBER = 7; + /** + *
+   * Replace with infotype
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + * @return Whether the replaceWithInfoTypeConfig field is set. + */ + @java.lang.Override + public boolean hasReplaceWithInfoTypeConfig() { + return transformationCase_ == 7; + } + /** + *
+   * Replace with infotype
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + * @return The replaceWithInfoTypeConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getReplaceWithInfoTypeConfig() { + if (transformationCase_ == 7) { + return (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); + } + /** + *
+   * Replace with infotype
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder getReplaceWithInfoTypeConfigOrBuilder() { + if (transformationCase_ == 7) { + return (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); + } + + public static final int TIME_PART_CONFIG_FIELD_NUMBER = 8; + /** + *
+   * Time extraction
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + * @return Whether the timePartConfig field is set. + */ + @java.lang.Override + public boolean hasTimePartConfig() { + return transformationCase_ == 8; + } + /** + *
+   * Time extraction
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + * @return The timePartConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TimePartConfig getTimePartConfig() { + if (transformationCase_ == 8) { + return (com.google.privacy.dlp.v2.TimePartConfig) transformation_; + } + return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); + } + /** + *
+   * Time extraction
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TimePartConfigOrBuilder getTimePartConfigOrBuilder() { + if (transformationCase_ == 8) { + return (com.google.privacy.dlp.v2.TimePartConfig) transformation_; + } + return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); + } + + public static final int CRYPTO_HASH_CONFIG_FIELD_NUMBER = 9; + /** + *
+   * Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + * @return Whether the cryptoHashConfig field is set. + */ + @java.lang.Override + public boolean hasCryptoHashConfig() { + return transformationCase_ == 9; + } + /** + *
+   * Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + * @return The cryptoHashConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoHashConfig getCryptoHashConfig() { + if (transformationCase_ == 9) { + return (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); + } + /** + *
+   * Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder getCryptoHashConfigOrBuilder() { + if (transformationCase_ == 9) { + return (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); + } + + public static final int DATE_SHIFT_CONFIG_FIELD_NUMBER = 11; + /** + *
+   * Date Shift
+   * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + * @return Whether the dateShiftConfig field is set. + */ + @java.lang.Override + public boolean hasDateShiftConfig() { + return transformationCase_ == 11; + } + /** + *
+   * Date Shift
+   * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + * @return The dateShiftConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateShiftConfig getDateShiftConfig() { + if (transformationCase_ == 11) { + return (com.google.privacy.dlp.v2.DateShiftConfig) transformation_; + } + return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); + } + /** + *
+   * Date Shift
+   * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateShiftConfigOrBuilder getDateShiftConfigOrBuilder() { + if (transformationCase_ == 11) { + return (com.google.privacy.dlp.v2.DateShiftConfig) transformation_; + } + return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); + } + + public static final int CRYPTO_DETERMINISTIC_CONFIG_FIELD_NUMBER = 12; + /** + *
+   * Deterministic Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + * @return Whether the cryptoDeterministicConfig field is set. + */ + @java.lang.Override + public boolean hasCryptoDeterministicConfig() { + return transformationCase_ == 12; + } + /** + *
+   * Deterministic Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + * @return The cryptoDeterministicConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoDeterministicConfig getCryptoDeterministicConfig() { + if (transformationCase_ == 12) { + return (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); + } + /** + *
+   * Deterministic Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder getCryptoDeterministicConfigOrBuilder() { + if (transformationCase_ == 12) { + return (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); + } + + public static final int REPLACE_DICTIONARY_CONFIG_FIELD_NUMBER = 13; + /** + *
+   * Replace with a value randomly drawn (with replacement) from a dictionary.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + * @return Whether the replaceDictionaryConfig field is set. + */ + @java.lang.Override + public boolean hasReplaceDictionaryConfig() { + return transformationCase_ == 13; + } + /** + *
+   * Replace with a value randomly drawn (with replacement) from a dictionary.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + * @return The replaceDictionaryConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceDictionaryConfig getReplaceDictionaryConfig() { + if (transformationCase_ == 13) { + return (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); + } + /** + *
+   * Replace with a value randomly drawn (with replacement) from a dictionary.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder getReplaceDictionaryConfigOrBuilder() { + if (transformationCase_ == 13) { + return (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (transformationCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_); + } + if (transformationCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.RedactConfig) transformation_); + } + if (transformationCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_); + } + if (transformationCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_); + } + if (transformationCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_); + } + if (transformationCase_ == 6) { + output.writeMessage(6, (com.google.privacy.dlp.v2.BucketingConfig) transformation_); + } + if (transformationCase_ == 7) { + output.writeMessage(7, (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_); + } + if (transformationCase_ == 8) { + output.writeMessage(8, (com.google.privacy.dlp.v2.TimePartConfig) transformation_); + } + if (transformationCase_ == 9) { + output.writeMessage(9, (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_); + } + if (transformationCase_ == 11) { + output.writeMessage(11, (com.google.privacy.dlp.v2.DateShiftConfig) transformation_); + } + if (transformationCase_ == 12) { + output.writeMessage(12, (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_); + } + if (transformationCase_ == 13) { + output.writeMessage(13, (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transformationCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_); + } + if (transformationCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.RedactConfig) transformation_); + } + if (transformationCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_); + } + if (transformationCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_); + } + if (transformationCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_); + } + if (transformationCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.privacy.dlp.v2.BucketingConfig) transformation_); + } + if (transformationCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_); + } + if (transformationCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.privacy.dlp.v2.TimePartConfig) transformation_); + } + if (transformationCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_); + } + if (transformationCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (com.google.privacy.dlp.v2.DateShiftConfig) transformation_); + } + if (transformationCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_); + } + if (transformationCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrimitiveTransformation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrimitiveTransformation other = (com.google.privacy.dlp.v2.PrimitiveTransformation) obj; + + if (!getTransformationCase().equals(other.getTransformationCase())) return false; + switch (transformationCase_) { + case 1: + if (!getReplaceConfig() + .equals(other.getReplaceConfig())) return false; + break; + case 2: + if (!getRedactConfig() + .equals(other.getRedactConfig())) return false; + break; + case 3: + if (!getCharacterMaskConfig() + .equals(other.getCharacterMaskConfig())) return false; + break; + case 4: + if (!getCryptoReplaceFfxFpeConfig() + .equals(other.getCryptoReplaceFfxFpeConfig())) return false; + break; + case 5: + if (!getFixedSizeBucketingConfig() + .equals(other.getFixedSizeBucketingConfig())) return false; + break; + case 6: + if (!getBucketingConfig() + .equals(other.getBucketingConfig())) return false; + break; + case 7: + if (!getReplaceWithInfoTypeConfig() + .equals(other.getReplaceWithInfoTypeConfig())) return false; + break; + case 8: + if (!getTimePartConfig() + .equals(other.getTimePartConfig())) return false; + break; + case 9: + if (!getCryptoHashConfig() + .equals(other.getCryptoHashConfig())) return false; + break; + case 11: + if (!getDateShiftConfig() + .equals(other.getDateShiftConfig())) return false; + break; + case 12: + if (!getCryptoDeterministicConfig() + .equals(other.getCryptoDeterministicConfig())) return false; + break; + case 13: + if (!getReplaceDictionaryConfig() + .equals(other.getReplaceDictionaryConfig())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (transformationCase_) { + case 1: + hash = (37 * hash) + REPLACE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReplaceConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + REDACT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRedactConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + CHARACTER_MASK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCharacterMaskConfig().hashCode(); + break; + case 4: + hash = (37 * hash) + CRYPTO_REPLACE_FFX_FPE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCryptoReplaceFfxFpeConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + FIXED_SIZE_BUCKETING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFixedSizeBucketingConfig().hashCode(); + break; + case 6: + hash = (37 * hash) + BUCKETING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBucketingConfig().hashCode(); + break; + case 7: + hash = (37 * hash) + REPLACE_WITH_INFO_TYPE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReplaceWithInfoTypeConfig().hashCode(); + break; + case 8: + hash = (37 * hash) + TIME_PART_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTimePartConfig().hashCode(); + break; + case 9: + hash = (37 * hash) + CRYPTO_HASH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCryptoHashConfig().hashCode(); + break; + case 11: + hash = (37 * hash) + DATE_SHIFT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDateShiftConfig().hashCode(); + break; + case 12: + hash = (37 * hash) + CRYPTO_DETERMINISTIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCryptoDeterministicConfig().hashCode(); + break; + case 13: + hash = (37 * hash) + REPLACE_DICTIONARY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReplaceDictionaryConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrimitiveTransformation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A rule for transforming a value.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrimitiveTransformation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrimitiveTransformation) + com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrimitiveTransformation.class, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrimitiveTransformation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + transformationCase_ = 0; + transformation_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformation build() { + com.google.privacy.dlp.v2.PrimitiveTransformation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformation buildPartial() { + com.google.privacy.dlp.v2.PrimitiveTransformation result = new com.google.privacy.dlp.v2.PrimitiveTransformation(this); + if (transformationCase_ == 1) { + if (replaceConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = replaceConfigBuilder_.build(); + } + } + if (transformationCase_ == 2) { + if (redactConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = redactConfigBuilder_.build(); + } + } + if (transformationCase_ == 3) { + if (characterMaskConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = characterMaskConfigBuilder_.build(); + } + } + if (transformationCase_ == 4) { + if (cryptoReplaceFfxFpeConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = cryptoReplaceFfxFpeConfigBuilder_.build(); + } + } + if (transformationCase_ == 5) { + if (fixedSizeBucketingConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = fixedSizeBucketingConfigBuilder_.build(); + } + } + if (transformationCase_ == 6) { + if (bucketingConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = bucketingConfigBuilder_.build(); + } + } + if (transformationCase_ == 7) { + if (replaceWithInfoTypeConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = replaceWithInfoTypeConfigBuilder_.build(); + } + } + if (transformationCase_ == 8) { + if (timePartConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = timePartConfigBuilder_.build(); + } + } + if (transformationCase_ == 9) { + if (cryptoHashConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = cryptoHashConfigBuilder_.build(); + } + } + if (transformationCase_ == 11) { + if (dateShiftConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = dateShiftConfigBuilder_.build(); + } + } + if (transformationCase_ == 12) { + if (cryptoDeterministicConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = cryptoDeterministicConfigBuilder_.build(); + } + } + if (transformationCase_ == 13) { + if (replaceDictionaryConfigBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = replaceDictionaryConfigBuilder_.build(); + } + } + result.transformationCase_ = transformationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrimitiveTransformation) { + return mergeFrom((com.google.privacy.dlp.v2.PrimitiveTransformation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrimitiveTransformation other) { + if (other == com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance()) return this; + switch (other.getTransformationCase()) { + case REPLACE_CONFIG: { + mergeReplaceConfig(other.getReplaceConfig()); + break; + } + case REDACT_CONFIG: { + mergeRedactConfig(other.getRedactConfig()); + break; + } + case CHARACTER_MASK_CONFIG: { + mergeCharacterMaskConfig(other.getCharacterMaskConfig()); + break; + } + case CRYPTO_REPLACE_FFX_FPE_CONFIG: { + mergeCryptoReplaceFfxFpeConfig(other.getCryptoReplaceFfxFpeConfig()); + break; + } + case FIXED_SIZE_BUCKETING_CONFIG: { + mergeFixedSizeBucketingConfig(other.getFixedSizeBucketingConfig()); + break; + } + case BUCKETING_CONFIG: { + mergeBucketingConfig(other.getBucketingConfig()); + break; + } + case REPLACE_WITH_INFO_TYPE_CONFIG: { + mergeReplaceWithInfoTypeConfig(other.getReplaceWithInfoTypeConfig()); + break; + } + case TIME_PART_CONFIG: { + mergeTimePartConfig(other.getTimePartConfig()); + break; + } + case CRYPTO_HASH_CONFIG: { + mergeCryptoHashConfig(other.getCryptoHashConfig()); + break; + } + case DATE_SHIFT_CONFIG: { + mergeDateShiftConfig(other.getDateShiftConfig()); + break; + } + case CRYPTO_DETERMINISTIC_CONFIG: { + mergeCryptoDeterministicConfig(other.getCryptoDeterministicConfig()); + break; + } + case REPLACE_DICTIONARY_CONFIG: { + mergeReplaceDictionaryConfig(other.getReplaceDictionaryConfig()); + break; + } + case TRANSFORMATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrimitiveTransformation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrimitiveTransformation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int transformationCase_ = 0; + private java.lang.Object transformation_; + public TransformationCase + getTransformationCase() { + return TransformationCase.forNumber( + transformationCase_); + } + + public Builder clearTransformation() { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ReplaceValueConfig, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder, com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder> replaceConfigBuilder_; + /** + *
+     * Replace with a specified value.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + * @return Whether the replaceConfig field is set. + */ + @java.lang.Override + public boolean hasReplaceConfig() { + return transformationCase_ == 1; + } + /** + *
+     * Replace with a specified value.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + * @return The replaceConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceValueConfig getReplaceConfig() { + if (replaceConfigBuilder_ == null) { + if (transformationCase_ == 1) { + return (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 1) { + return replaceConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); + } + } + /** + *
+     * Replace with a specified value.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + */ + public Builder setReplaceConfig(com.google.privacy.dlp.v2.ReplaceValueConfig value) { + if (replaceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + replaceConfigBuilder_.setMessage(value); + } + transformationCase_ = 1; + return this; + } + /** + *
+     * Replace with a specified value.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + */ + public Builder setReplaceConfig( + com.google.privacy.dlp.v2.ReplaceValueConfig.Builder builderForValue) { + if (replaceConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + replaceConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 1; + return this; + } + /** + *
+     * Replace with a specified value.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + */ + public Builder mergeReplaceConfig(com.google.privacy.dlp.v2.ReplaceValueConfig value) { + if (replaceConfigBuilder_ == null) { + if (transformationCase_ == 1 && + transformation_ != com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.ReplaceValueConfig.newBuilder((com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 1) { + replaceConfigBuilder_.mergeFrom(value); + } else { + replaceConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 1; + return this; + } + /** + *
+     * Replace with a specified value.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + */ + public Builder clearReplaceConfig() { + if (replaceConfigBuilder_ == null) { + if (transformationCase_ == 1) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 1) { + transformationCase_ = 0; + transformation_ = null; + } + replaceConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Replace with a specified value.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + */ + public com.google.privacy.dlp.v2.ReplaceValueConfig.Builder getReplaceConfigBuilder() { + return getReplaceConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Replace with a specified value.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder getReplaceConfigOrBuilder() { + if ((transformationCase_ == 1) && (replaceConfigBuilder_ != null)) { + return replaceConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 1) { + return (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); + } + } + /** + *
+     * Replace with a specified value.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ReplaceValueConfig, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder, com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder> + getReplaceConfigFieldBuilder() { + if (replaceConfigBuilder_ == null) { + if (!(transformationCase_ == 1)) { + transformation_ = com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); + } + replaceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ReplaceValueConfig, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder, com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder>( + (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 1; + onChanged();; + return replaceConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RedactConfig, com.google.privacy.dlp.v2.RedactConfig.Builder, com.google.privacy.dlp.v2.RedactConfigOrBuilder> redactConfigBuilder_; + /** + *
+     * Redact
+     * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + * @return Whether the redactConfig field is set. + */ + @java.lang.Override + public boolean hasRedactConfig() { + return transformationCase_ == 2; + } + /** + *
+     * Redact
+     * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + * @return The redactConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RedactConfig getRedactConfig() { + if (redactConfigBuilder_ == null) { + if (transformationCase_ == 2) { + return (com.google.privacy.dlp.v2.RedactConfig) transformation_; + } + return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 2) { + return redactConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); + } + } + /** + *
+     * Redact
+     * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + */ + public Builder setRedactConfig(com.google.privacy.dlp.v2.RedactConfig value) { + if (redactConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + redactConfigBuilder_.setMessage(value); + } + transformationCase_ = 2; + return this; + } + /** + *
+     * Redact
+     * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + */ + public Builder setRedactConfig( + com.google.privacy.dlp.v2.RedactConfig.Builder builderForValue) { + if (redactConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + redactConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 2; + return this; + } + /** + *
+     * Redact
+     * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + */ + public Builder mergeRedactConfig(com.google.privacy.dlp.v2.RedactConfig value) { + if (redactConfigBuilder_ == null) { + if (transformationCase_ == 2 && + transformation_ != com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.RedactConfig.newBuilder((com.google.privacy.dlp.v2.RedactConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 2) { + redactConfigBuilder_.mergeFrom(value); + } else { + redactConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 2; + return this; + } + /** + *
+     * Redact
+     * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + */ + public Builder clearRedactConfig() { + if (redactConfigBuilder_ == null) { + if (transformationCase_ == 2) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 2) { + transformationCase_ = 0; + transformation_ = null; + } + redactConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Redact
+     * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + */ + public com.google.privacy.dlp.v2.RedactConfig.Builder getRedactConfigBuilder() { + return getRedactConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Redact
+     * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RedactConfigOrBuilder getRedactConfigOrBuilder() { + if ((transformationCase_ == 2) && (redactConfigBuilder_ != null)) { + return redactConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 2) { + return (com.google.privacy.dlp.v2.RedactConfig) transformation_; + } + return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); + } + } + /** + *
+     * Redact
+     * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RedactConfig, com.google.privacy.dlp.v2.RedactConfig.Builder, com.google.privacy.dlp.v2.RedactConfigOrBuilder> + getRedactConfigFieldBuilder() { + if (redactConfigBuilder_ == null) { + if (!(transformationCase_ == 2)) { + transformation_ = com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); + } + redactConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RedactConfig, com.google.privacy.dlp.v2.RedactConfig.Builder, com.google.privacy.dlp.v2.RedactConfigOrBuilder>( + (com.google.privacy.dlp.v2.RedactConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 2; + onChanged();; + return redactConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CharacterMaskConfig, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder, com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder> characterMaskConfigBuilder_; + /** + *
+     * Mask
+     * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + * @return Whether the characterMaskConfig field is set. + */ + @java.lang.Override + public boolean hasCharacterMaskConfig() { + return transformationCase_ == 3; + } + /** + *
+     * Mask
+     * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + * @return The characterMaskConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CharacterMaskConfig getCharacterMaskConfig() { + if (characterMaskConfigBuilder_ == null) { + if (transformationCase_ == 3) { + return (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_; + } + return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 3) { + return characterMaskConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); + } + } + /** + *
+     * Mask
+     * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + */ + public Builder setCharacterMaskConfig(com.google.privacy.dlp.v2.CharacterMaskConfig value) { + if (characterMaskConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + characterMaskConfigBuilder_.setMessage(value); + } + transformationCase_ = 3; + return this; + } + /** + *
+     * Mask
+     * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + */ + public Builder setCharacterMaskConfig( + com.google.privacy.dlp.v2.CharacterMaskConfig.Builder builderForValue) { + if (characterMaskConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + characterMaskConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 3; + return this; + } + /** + *
+     * Mask
+     * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + */ + public Builder mergeCharacterMaskConfig(com.google.privacy.dlp.v2.CharacterMaskConfig value) { + if (characterMaskConfigBuilder_ == null) { + if (transformationCase_ == 3 && + transformation_ != com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.CharacterMaskConfig.newBuilder((com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 3) { + characterMaskConfigBuilder_.mergeFrom(value); + } else { + characterMaskConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 3; + return this; + } + /** + *
+     * Mask
+     * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + */ + public Builder clearCharacterMaskConfig() { + if (characterMaskConfigBuilder_ == null) { + if (transformationCase_ == 3) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 3) { + transformationCase_ = 0; + transformation_ = null; + } + characterMaskConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Mask
+     * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + */ + public com.google.privacy.dlp.v2.CharacterMaskConfig.Builder getCharacterMaskConfigBuilder() { + return getCharacterMaskConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Mask
+     * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder getCharacterMaskConfigOrBuilder() { + if ((transformationCase_ == 3) && (characterMaskConfigBuilder_ != null)) { + return characterMaskConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 3) { + return (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_; + } + return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); + } + } + /** + *
+     * Mask
+     * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CharacterMaskConfig, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder, com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder> + getCharacterMaskConfigFieldBuilder() { + if (characterMaskConfigBuilder_ == null) { + if (!(transformationCase_ == 3)) { + transformation_ = com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); + } + characterMaskConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CharacterMaskConfig, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder, com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder>( + (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 3; + onChanged();; + return characterMaskConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder> cryptoReplaceFfxFpeConfigBuilder_; + /** + *
+     * Ffx-Fpe
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + * @return Whether the cryptoReplaceFfxFpeConfig field is set. + */ + @java.lang.Override + public boolean hasCryptoReplaceFfxFpeConfig() { + return transformationCase_ == 4; + } + /** + *
+     * Ffx-Fpe
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + * @return The cryptoReplaceFfxFpeConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getCryptoReplaceFfxFpeConfig() { + if (cryptoReplaceFfxFpeConfigBuilder_ == null) { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 4) { + return cryptoReplaceFfxFpeConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); + } + } + /** + *
+     * Ffx-Fpe
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + */ + public Builder setCryptoReplaceFfxFpeConfig(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig value) { + if (cryptoReplaceFfxFpeConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + cryptoReplaceFfxFpeConfigBuilder_.setMessage(value); + } + transformationCase_ = 4; + return this; + } + /** + *
+     * Ffx-Fpe
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + */ + public Builder setCryptoReplaceFfxFpeConfig( + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder builderForValue) { + if (cryptoReplaceFfxFpeConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + cryptoReplaceFfxFpeConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 4; + return this; + } + /** + *
+     * Ffx-Fpe
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + */ + public Builder mergeCryptoReplaceFfxFpeConfig(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig value) { + if (cryptoReplaceFfxFpeConfigBuilder_ == null) { + if (transformationCase_ == 4 && + transformation_ != com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.newBuilder((com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 4) { + cryptoReplaceFfxFpeConfigBuilder_.mergeFrom(value); + } else { + cryptoReplaceFfxFpeConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 4; + return this; + } + /** + *
+     * Ffx-Fpe
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + */ + public Builder clearCryptoReplaceFfxFpeConfig() { + if (cryptoReplaceFfxFpeConfigBuilder_ == null) { + if (transformationCase_ == 4) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 4) { + transformationCase_ = 0; + transformation_ = null; + } + cryptoReplaceFfxFpeConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Ffx-Fpe
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + */ + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder getCryptoReplaceFfxFpeConfigBuilder() { + return getCryptoReplaceFfxFpeConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Ffx-Fpe
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder getCryptoReplaceFfxFpeConfigOrBuilder() { + if ((transformationCase_ == 4) && (cryptoReplaceFfxFpeConfigBuilder_ != null)) { + return cryptoReplaceFfxFpeConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); + } + } + /** + *
+     * Ffx-Fpe
+     * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder> + getCryptoReplaceFfxFpeConfigFieldBuilder() { + if (cryptoReplaceFfxFpeConfigBuilder_ == null) { + if (!(transformationCase_ == 4)) { + transformation_ = com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); + } + cryptoReplaceFfxFpeConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder>( + (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 4; + onChanged();; + return cryptoReplaceFfxFpeConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FixedSizeBucketingConfig, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder, com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder> fixedSizeBucketingConfigBuilder_; + /** + *
+     * Fixed size bucketing
+     * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + * @return Whether the fixedSizeBucketingConfig field is set. + */ + @java.lang.Override + public boolean hasFixedSizeBucketingConfig() { + return transformationCase_ == 5; + } + /** + *
+     * Fixed size bucketing
+     * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + * @return The fixedSizeBucketingConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FixedSizeBucketingConfig getFixedSizeBucketingConfig() { + if (fixedSizeBucketingConfigBuilder_ == null) { + if (transformationCase_ == 5) { + return (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_; + } + return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 5) { + return fixedSizeBucketingConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); + } + } + /** + *
+     * Fixed size bucketing
+     * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + */ + public Builder setFixedSizeBucketingConfig(com.google.privacy.dlp.v2.FixedSizeBucketingConfig value) { + if (fixedSizeBucketingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + fixedSizeBucketingConfigBuilder_.setMessage(value); + } + transformationCase_ = 5; + return this; + } + /** + *
+     * Fixed size bucketing
+     * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + */ + public Builder setFixedSizeBucketingConfig( + com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder builderForValue) { + if (fixedSizeBucketingConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + fixedSizeBucketingConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 5; + return this; + } + /** + *
+     * Fixed size bucketing
+     * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + */ + public Builder mergeFixedSizeBucketingConfig(com.google.privacy.dlp.v2.FixedSizeBucketingConfig value) { + if (fixedSizeBucketingConfigBuilder_ == null) { + if (transformationCase_ == 5 && + transformation_ != com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.FixedSizeBucketingConfig.newBuilder((com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 5) { + fixedSizeBucketingConfigBuilder_.mergeFrom(value); + } else { + fixedSizeBucketingConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 5; + return this; + } + /** + *
+     * Fixed size bucketing
+     * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + */ + public Builder clearFixedSizeBucketingConfig() { + if (fixedSizeBucketingConfigBuilder_ == null) { + if (transformationCase_ == 5) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 5) { + transformationCase_ = 0; + transformation_ = null; + } + fixedSizeBucketingConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Fixed size bucketing
+     * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + */ + public com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder getFixedSizeBucketingConfigBuilder() { + return getFixedSizeBucketingConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Fixed size bucketing
+     * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder getFixedSizeBucketingConfigOrBuilder() { + if ((transformationCase_ == 5) && (fixedSizeBucketingConfigBuilder_ != null)) { + return fixedSizeBucketingConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 5) { + return (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_; + } + return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); + } + } + /** + *
+     * Fixed size bucketing
+     * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FixedSizeBucketingConfig, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder, com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder> + getFixedSizeBucketingConfigFieldBuilder() { + if (fixedSizeBucketingConfigBuilder_ == null) { + if (!(transformationCase_ == 5)) { + transformation_ = com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); + } + fixedSizeBucketingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FixedSizeBucketingConfig, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder, com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder>( + (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 5; + onChanged();; + return fixedSizeBucketingConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BucketingConfig, com.google.privacy.dlp.v2.BucketingConfig.Builder, com.google.privacy.dlp.v2.BucketingConfigOrBuilder> bucketingConfigBuilder_; + /** + *
+     * Bucketing
+     * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + * @return Whether the bucketingConfig field is set. + */ + @java.lang.Override + public boolean hasBucketingConfig() { + return transformationCase_ == 6; + } + /** + *
+     * Bucketing
+     * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + * @return The bucketingConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfig getBucketingConfig() { + if (bucketingConfigBuilder_ == null) { + if (transformationCase_ == 6) { + return (com.google.privacy.dlp.v2.BucketingConfig) transformation_; + } + return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 6) { + return bucketingConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); + } + } + /** + *
+     * Bucketing
+     * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + */ + public Builder setBucketingConfig(com.google.privacy.dlp.v2.BucketingConfig value) { + if (bucketingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + bucketingConfigBuilder_.setMessage(value); + } + transformationCase_ = 6; + return this; + } + /** + *
+     * Bucketing
+     * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + */ + public Builder setBucketingConfig( + com.google.privacy.dlp.v2.BucketingConfig.Builder builderForValue) { + if (bucketingConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + bucketingConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 6; + return this; + } + /** + *
+     * Bucketing
+     * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + */ + public Builder mergeBucketingConfig(com.google.privacy.dlp.v2.BucketingConfig value) { + if (bucketingConfigBuilder_ == null) { + if (transformationCase_ == 6 && + transformation_ != com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.BucketingConfig.newBuilder((com.google.privacy.dlp.v2.BucketingConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 6) { + bucketingConfigBuilder_.mergeFrom(value); + } else { + bucketingConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 6; + return this; + } + /** + *
+     * Bucketing
+     * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + */ + public Builder clearBucketingConfig() { + if (bucketingConfigBuilder_ == null) { + if (transformationCase_ == 6) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 6) { + transformationCase_ = 0; + transformation_ = null; + } + bucketingConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Bucketing
+     * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + */ + public com.google.privacy.dlp.v2.BucketingConfig.Builder getBucketingConfigBuilder() { + return getBucketingConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Bucketing
+     * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BucketingConfigOrBuilder getBucketingConfigOrBuilder() { + if ((transformationCase_ == 6) && (bucketingConfigBuilder_ != null)) { + return bucketingConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 6) { + return (com.google.privacy.dlp.v2.BucketingConfig) transformation_; + } + return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); + } + } + /** + *
+     * Bucketing
+     * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BucketingConfig, com.google.privacy.dlp.v2.BucketingConfig.Builder, com.google.privacy.dlp.v2.BucketingConfigOrBuilder> + getBucketingConfigFieldBuilder() { + if (bucketingConfigBuilder_ == null) { + if (!(transformationCase_ == 6)) { + transformation_ = com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); + } + bucketingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BucketingConfig, com.google.privacy.dlp.v2.BucketingConfig.Builder, com.google.privacy.dlp.v2.BucketingConfigOrBuilder>( + (com.google.privacy.dlp.v2.BucketingConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 6; + onChanged();; + return bucketingConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder> replaceWithInfoTypeConfigBuilder_; + /** + *
+     * Replace with infotype
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + * @return Whether the replaceWithInfoTypeConfig field is set. + */ + @java.lang.Override + public boolean hasReplaceWithInfoTypeConfig() { + return transformationCase_ == 7; + } + /** + *
+     * Replace with infotype
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + * @return The replaceWithInfoTypeConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getReplaceWithInfoTypeConfig() { + if (replaceWithInfoTypeConfigBuilder_ == null) { + if (transformationCase_ == 7) { + return (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 7) { + return replaceWithInfoTypeConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); + } + } + /** + *
+     * Replace with infotype
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + */ + public Builder setReplaceWithInfoTypeConfig(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig value) { + if (replaceWithInfoTypeConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + replaceWithInfoTypeConfigBuilder_.setMessage(value); + } + transformationCase_ = 7; + return this; + } + /** + *
+     * Replace with infotype
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + */ + public Builder setReplaceWithInfoTypeConfig( + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder builderForValue) { + if (replaceWithInfoTypeConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + replaceWithInfoTypeConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 7; + return this; + } + /** + *
+     * Replace with infotype
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + */ + public Builder mergeReplaceWithInfoTypeConfig(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig value) { + if (replaceWithInfoTypeConfigBuilder_ == null) { + if (transformationCase_ == 7 && + transformation_ != com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.newBuilder((com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 7) { + replaceWithInfoTypeConfigBuilder_.mergeFrom(value); + } else { + replaceWithInfoTypeConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 7; + return this; + } + /** + *
+     * Replace with infotype
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + */ + public Builder clearReplaceWithInfoTypeConfig() { + if (replaceWithInfoTypeConfigBuilder_ == null) { + if (transformationCase_ == 7) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 7) { + transformationCase_ = 0; + transformation_ = null; + } + replaceWithInfoTypeConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Replace with infotype
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + */ + public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder getReplaceWithInfoTypeConfigBuilder() { + return getReplaceWithInfoTypeConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Replace with infotype
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder getReplaceWithInfoTypeConfigOrBuilder() { + if ((transformationCase_ == 7) && (replaceWithInfoTypeConfigBuilder_ != null)) { + return replaceWithInfoTypeConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 7) { + return (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); + } + } + /** + *
+     * Replace with infotype
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder> + getReplaceWithInfoTypeConfigFieldBuilder() { + if (replaceWithInfoTypeConfigBuilder_ == null) { + if (!(transformationCase_ == 7)) { + transformation_ = com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); + } + replaceWithInfoTypeConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder>( + (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 7; + onChanged();; + return replaceWithInfoTypeConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TimePartConfig, com.google.privacy.dlp.v2.TimePartConfig.Builder, com.google.privacy.dlp.v2.TimePartConfigOrBuilder> timePartConfigBuilder_; + /** + *
+     * Time extraction
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + * @return Whether the timePartConfig field is set. + */ + @java.lang.Override + public boolean hasTimePartConfig() { + return transformationCase_ == 8; + } + /** + *
+     * Time extraction
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + * @return The timePartConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TimePartConfig getTimePartConfig() { + if (timePartConfigBuilder_ == null) { + if (transformationCase_ == 8) { + return (com.google.privacy.dlp.v2.TimePartConfig) transformation_; + } + return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 8) { + return timePartConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); + } + } + /** + *
+     * Time extraction
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + */ + public Builder setTimePartConfig(com.google.privacy.dlp.v2.TimePartConfig value) { + if (timePartConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + timePartConfigBuilder_.setMessage(value); + } + transformationCase_ = 8; + return this; + } + /** + *
+     * Time extraction
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + */ + public Builder setTimePartConfig( + com.google.privacy.dlp.v2.TimePartConfig.Builder builderForValue) { + if (timePartConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + timePartConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 8; + return this; + } + /** + *
+     * Time extraction
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + */ + public Builder mergeTimePartConfig(com.google.privacy.dlp.v2.TimePartConfig value) { + if (timePartConfigBuilder_ == null) { + if (transformationCase_ == 8 && + transformation_ != com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.TimePartConfig.newBuilder((com.google.privacy.dlp.v2.TimePartConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 8) { + timePartConfigBuilder_.mergeFrom(value); + } else { + timePartConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 8; + return this; + } + /** + *
+     * Time extraction
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + */ + public Builder clearTimePartConfig() { + if (timePartConfigBuilder_ == null) { + if (transformationCase_ == 8) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 8) { + transformationCase_ = 0; + transformation_ = null; + } + timePartConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Time extraction
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + */ + public com.google.privacy.dlp.v2.TimePartConfig.Builder getTimePartConfigBuilder() { + return getTimePartConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Time extraction
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TimePartConfigOrBuilder getTimePartConfigOrBuilder() { + if ((transformationCase_ == 8) && (timePartConfigBuilder_ != null)) { + return timePartConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 8) { + return (com.google.privacy.dlp.v2.TimePartConfig) transformation_; + } + return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); + } + } + /** + *
+     * Time extraction
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TimePartConfig, com.google.privacy.dlp.v2.TimePartConfig.Builder, com.google.privacy.dlp.v2.TimePartConfigOrBuilder> + getTimePartConfigFieldBuilder() { + if (timePartConfigBuilder_ == null) { + if (!(transformationCase_ == 8)) { + transformation_ = com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); + } + timePartConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TimePartConfig, com.google.privacy.dlp.v2.TimePartConfig.Builder, com.google.privacy.dlp.v2.TimePartConfigOrBuilder>( + (com.google.privacy.dlp.v2.TimePartConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 8; + onChanged();; + return timePartConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoHashConfig, com.google.privacy.dlp.v2.CryptoHashConfig.Builder, com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder> cryptoHashConfigBuilder_; + /** + *
+     * Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + * @return Whether the cryptoHashConfig field is set. + */ + @java.lang.Override + public boolean hasCryptoHashConfig() { + return transformationCase_ == 9; + } + /** + *
+     * Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + * @return The cryptoHashConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoHashConfig getCryptoHashConfig() { + if (cryptoHashConfigBuilder_ == null) { + if (transformationCase_ == 9) { + return (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 9) { + return cryptoHashConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); + } + } + /** + *
+     * Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + */ + public Builder setCryptoHashConfig(com.google.privacy.dlp.v2.CryptoHashConfig value) { + if (cryptoHashConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + cryptoHashConfigBuilder_.setMessage(value); + } + transformationCase_ = 9; + return this; + } + /** + *
+     * Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + */ + public Builder setCryptoHashConfig( + com.google.privacy.dlp.v2.CryptoHashConfig.Builder builderForValue) { + if (cryptoHashConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + cryptoHashConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 9; + return this; + } + /** + *
+     * Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + */ + public Builder mergeCryptoHashConfig(com.google.privacy.dlp.v2.CryptoHashConfig value) { + if (cryptoHashConfigBuilder_ == null) { + if (transformationCase_ == 9 && + transformation_ != com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.CryptoHashConfig.newBuilder((com.google.privacy.dlp.v2.CryptoHashConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 9) { + cryptoHashConfigBuilder_.mergeFrom(value); + } else { + cryptoHashConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 9; + return this; + } + /** + *
+     * Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + */ + public Builder clearCryptoHashConfig() { + if (cryptoHashConfigBuilder_ == null) { + if (transformationCase_ == 9) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 9) { + transformationCase_ = 0; + transformation_ = null; + } + cryptoHashConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + */ + public com.google.privacy.dlp.v2.CryptoHashConfig.Builder getCryptoHashConfigBuilder() { + return getCryptoHashConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder getCryptoHashConfigOrBuilder() { + if ((transformationCase_ == 9) && (cryptoHashConfigBuilder_ != null)) { + return cryptoHashConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 9) { + return (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); + } + } + /** + *
+     * Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoHashConfig, com.google.privacy.dlp.v2.CryptoHashConfig.Builder, com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder> + getCryptoHashConfigFieldBuilder() { + if (cryptoHashConfigBuilder_ == null) { + if (!(transformationCase_ == 9)) { + transformation_ = com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); + } + cryptoHashConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoHashConfig, com.google.privacy.dlp.v2.CryptoHashConfig.Builder, com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder>( + (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 9; + onChanged();; + return cryptoHashConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DateShiftConfig, com.google.privacy.dlp.v2.DateShiftConfig.Builder, com.google.privacy.dlp.v2.DateShiftConfigOrBuilder> dateShiftConfigBuilder_; + /** + *
+     * Date Shift
+     * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + * @return Whether the dateShiftConfig field is set. + */ + @java.lang.Override + public boolean hasDateShiftConfig() { + return transformationCase_ == 11; + } + /** + *
+     * Date Shift
+     * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + * @return The dateShiftConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateShiftConfig getDateShiftConfig() { + if (dateShiftConfigBuilder_ == null) { + if (transformationCase_ == 11) { + return (com.google.privacy.dlp.v2.DateShiftConfig) transformation_; + } + return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 11) { + return dateShiftConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); + } + } + /** + *
+     * Date Shift
+     * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + */ + public Builder setDateShiftConfig(com.google.privacy.dlp.v2.DateShiftConfig value) { + if (dateShiftConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + dateShiftConfigBuilder_.setMessage(value); + } + transformationCase_ = 11; + return this; + } + /** + *
+     * Date Shift
+     * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + */ + public Builder setDateShiftConfig( + com.google.privacy.dlp.v2.DateShiftConfig.Builder builderForValue) { + if (dateShiftConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + dateShiftConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 11; + return this; + } + /** + *
+     * Date Shift
+     * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + */ + public Builder mergeDateShiftConfig(com.google.privacy.dlp.v2.DateShiftConfig value) { + if (dateShiftConfigBuilder_ == null) { + if (transformationCase_ == 11 && + transformation_ != com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.DateShiftConfig.newBuilder((com.google.privacy.dlp.v2.DateShiftConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 11) { + dateShiftConfigBuilder_.mergeFrom(value); + } else { + dateShiftConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 11; + return this; + } + /** + *
+     * Date Shift
+     * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + */ + public Builder clearDateShiftConfig() { + if (dateShiftConfigBuilder_ == null) { + if (transformationCase_ == 11) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 11) { + transformationCase_ = 0; + transformation_ = null; + } + dateShiftConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Date Shift
+     * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + */ + public com.google.privacy.dlp.v2.DateShiftConfig.Builder getDateShiftConfigBuilder() { + return getDateShiftConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Date Shift
+     * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateShiftConfigOrBuilder getDateShiftConfigOrBuilder() { + if ((transformationCase_ == 11) && (dateShiftConfigBuilder_ != null)) { + return dateShiftConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 11) { + return (com.google.privacy.dlp.v2.DateShiftConfig) transformation_; + } + return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); + } + } + /** + *
+     * Date Shift
+     * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DateShiftConfig, com.google.privacy.dlp.v2.DateShiftConfig.Builder, com.google.privacy.dlp.v2.DateShiftConfigOrBuilder> + getDateShiftConfigFieldBuilder() { + if (dateShiftConfigBuilder_ == null) { + if (!(transformationCase_ == 11)) { + transformation_ = com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); + } + dateShiftConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DateShiftConfig, com.google.privacy.dlp.v2.DateShiftConfig.Builder, com.google.privacy.dlp.v2.DateShiftConfigOrBuilder>( + (com.google.privacy.dlp.v2.DateShiftConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 11; + onChanged();; + return dateShiftConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoDeterministicConfig, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder, com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder> cryptoDeterministicConfigBuilder_; + /** + *
+     * Deterministic Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + * @return Whether the cryptoDeterministicConfig field is set. + */ + @java.lang.Override + public boolean hasCryptoDeterministicConfig() { + return transformationCase_ == 12; + } + /** + *
+     * Deterministic Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + * @return The cryptoDeterministicConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoDeterministicConfig getCryptoDeterministicConfig() { + if (cryptoDeterministicConfigBuilder_ == null) { + if (transformationCase_ == 12) { + return (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 12) { + return cryptoDeterministicConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); + } + } + /** + *
+     * Deterministic Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + */ + public Builder setCryptoDeterministicConfig(com.google.privacy.dlp.v2.CryptoDeterministicConfig value) { + if (cryptoDeterministicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + cryptoDeterministicConfigBuilder_.setMessage(value); + } + transformationCase_ = 12; + return this; + } + /** + *
+     * Deterministic Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + */ + public Builder setCryptoDeterministicConfig( + com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder builderForValue) { + if (cryptoDeterministicConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + cryptoDeterministicConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 12; + return this; + } + /** + *
+     * Deterministic Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + */ + public Builder mergeCryptoDeterministicConfig(com.google.privacy.dlp.v2.CryptoDeterministicConfig value) { + if (cryptoDeterministicConfigBuilder_ == null) { + if (transformationCase_ == 12 && + transformation_ != com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.CryptoDeterministicConfig.newBuilder((com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 12) { + cryptoDeterministicConfigBuilder_.mergeFrom(value); + } else { + cryptoDeterministicConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 12; + return this; + } + /** + *
+     * Deterministic Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + */ + public Builder clearCryptoDeterministicConfig() { + if (cryptoDeterministicConfigBuilder_ == null) { + if (transformationCase_ == 12) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 12) { + transformationCase_ = 0; + transformation_ = null; + } + cryptoDeterministicConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Deterministic Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + */ + public com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder getCryptoDeterministicConfigBuilder() { + return getCryptoDeterministicConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Deterministic Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder getCryptoDeterministicConfigOrBuilder() { + if ((transformationCase_ == 12) && (cryptoDeterministicConfigBuilder_ != null)) { + return cryptoDeterministicConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 12) { + return (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_; + } + return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); + } + } + /** + *
+     * Deterministic Crypto
+     * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoDeterministicConfig, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder, com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder> + getCryptoDeterministicConfigFieldBuilder() { + if (cryptoDeterministicConfigBuilder_ == null) { + if (!(transformationCase_ == 12)) { + transformation_ = com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); + } + cryptoDeterministicConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CryptoDeterministicConfig, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder, com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder>( + (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 12; + onChanged();; + return cryptoDeterministicConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ReplaceDictionaryConfig, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder, com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder> replaceDictionaryConfigBuilder_; + /** + *
+     * Replace with a value randomly drawn (with replacement) from a dictionary.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + * @return Whether the replaceDictionaryConfig field is set. + */ + @java.lang.Override + public boolean hasReplaceDictionaryConfig() { + return transformationCase_ == 13; + } + /** + *
+     * Replace with a value randomly drawn (with replacement) from a dictionary.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + * @return The replaceDictionaryConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceDictionaryConfig getReplaceDictionaryConfig() { + if (replaceDictionaryConfigBuilder_ == null) { + if (transformationCase_ == 13) { + return (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); + } else { + if (transformationCase_ == 13) { + return replaceDictionaryConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); + } + } + /** + *
+     * Replace with a value randomly drawn (with replacement) from a dictionary.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + */ + public Builder setReplaceDictionaryConfig(com.google.privacy.dlp.v2.ReplaceDictionaryConfig value) { + if (replaceDictionaryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + replaceDictionaryConfigBuilder_.setMessage(value); + } + transformationCase_ = 13; + return this; + } + /** + *
+     * Replace with a value randomly drawn (with replacement) from a dictionary.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + */ + public Builder setReplaceDictionaryConfig( + com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder builderForValue) { + if (replaceDictionaryConfigBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + replaceDictionaryConfigBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 13; + return this; + } + /** + *
+     * Replace with a value randomly drawn (with replacement) from a dictionary.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + */ + public Builder mergeReplaceDictionaryConfig(com.google.privacy.dlp.v2.ReplaceDictionaryConfig value) { + if (replaceDictionaryConfigBuilder_ == null) { + if (transformationCase_ == 13 && + transformation_ != com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance()) { + transformation_ = com.google.privacy.dlp.v2.ReplaceDictionaryConfig.newBuilder((com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_) + .mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 13) { + replaceDictionaryConfigBuilder_.mergeFrom(value); + } else { + replaceDictionaryConfigBuilder_.setMessage(value); + } + } + transformationCase_ = 13; + return this; + } + /** + *
+     * Replace with a value randomly drawn (with replacement) from a dictionary.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + */ + public Builder clearReplaceDictionaryConfig() { + if (replaceDictionaryConfigBuilder_ == null) { + if (transformationCase_ == 13) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 13) { + transformationCase_ = 0; + transformation_ = null; + } + replaceDictionaryConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Replace with a value randomly drawn (with replacement) from a dictionary.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + */ + public com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder getReplaceDictionaryConfigBuilder() { + return getReplaceDictionaryConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Replace with a value randomly drawn (with replacement) from a dictionary.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder getReplaceDictionaryConfigOrBuilder() { + if ((transformationCase_ == 13) && (replaceDictionaryConfigBuilder_ != null)) { + return replaceDictionaryConfigBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 13) { + return (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_; + } + return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); + } + } + /** + *
+     * Replace with a value randomly drawn (with replacement) from a dictionary.
+     * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ReplaceDictionaryConfig, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder, com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder> + getReplaceDictionaryConfigFieldBuilder() { + if (replaceDictionaryConfigBuilder_ == null) { + if (!(transformationCase_ == 13)) { + transformation_ = com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); + } + replaceDictionaryConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ReplaceDictionaryConfig, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder, com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder>( + (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 13; + onChanged();; + return replaceDictionaryConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrimitiveTransformation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrimitiveTransformation) + private static final com.google.privacy.dlp.v2.PrimitiveTransformation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrimitiveTransformation(); + } + + public static com.google.privacy.dlp.v2.PrimitiveTransformation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrimitiveTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimitiveTransformation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformationOrBuilder.java new file mode 100644 index 000000000000..b025e51642ec --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformationOrBuilder.java @@ -0,0 +1,335 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface PrimitiveTransformationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrimitiveTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Replace with a specified value.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + * @return Whether the replaceConfig field is set. + */ + boolean hasReplaceConfig(); + /** + *
+   * Replace with a specified value.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + * @return The replaceConfig. + */ + com.google.privacy.dlp.v2.ReplaceValueConfig getReplaceConfig(); + /** + *
+   * Replace with a specified value.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; + */ + com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder getReplaceConfigOrBuilder(); + + /** + *
+   * Redact
+   * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + * @return Whether the redactConfig field is set. + */ + boolean hasRedactConfig(); + /** + *
+   * Redact
+   * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + * @return The redactConfig. + */ + com.google.privacy.dlp.v2.RedactConfig getRedactConfig(); + /** + *
+   * Redact
+   * 
+ * + * .google.privacy.dlp.v2.RedactConfig redact_config = 2; + */ + com.google.privacy.dlp.v2.RedactConfigOrBuilder getRedactConfigOrBuilder(); + + /** + *
+   * Mask
+   * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + * @return Whether the characterMaskConfig field is set. + */ + boolean hasCharacterMaskConfig(); + /** + *
+   * Mask
+   * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + * @return The characterMaskConfig. + */ + com.google.privacy.dlp.v2.CharacterMaskConfig getCharacterMaskConfig(); + /** + *
+   * Mask
+   * 
+ * + * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; + */ + com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder getCharacterMaskConfigOrBuilder(); + + /** + *
+   * Ffx-Fpe
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + * @return Whether the cryptoReplaceFfxFpeConfig field is set. + */ + boolean hasCryptoReplaceFfxFpeConfig(); + /** + *
+   * Ffx-Fpe
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + * @return The cryptoReplaceFfxFpeConfig. + */ + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getCryptoReplaceFfxFpeConfig(); + /** + *
+   * Ffx-Fpe
+   * 
+ * + * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + */ + com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder getCryptoReplaceFfxFpeConfigOrBuilder(); + + /** + *
+   * Fixed size bucketing
+   * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + * @return Whether the fixedSizeBucketingConfig field is set. + */ + boolean hasFixedSizeBucketingConfig(); + /** + *
+   * Fixed size bucketing
+   * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + * @return The fixedSizeBucketingConfig. + */ + com.google.privacy.dlp.v2.FixedSizeBucketingConfig getFixedSizeBucketingConfig(); + /** + *
+   * Fixed size bucketing
+   * 
+ * + * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + */ + com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder getFixedSizeBucketingConfigOrBuilder(); + + /** + *
+   * Bucketing
+   * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + * @return Whether the bucketingConfig field is set. + */ + boolean hasBucketingConfig(); + /** + *
+   * Bucketing
+   * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + * @return The bucketingConfig. + */ + com.google.privacy.dlp.v2.BucketingConfig getBucketingConfig(); + /** + *
+   * Bucketing
+   * 
+ * + * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; + */ + com.google.privacy.dlp.v2.BucketingConfigOrBuilder getBucketingConfigOrBuilder(); + + /** + *
+   * Replace with infotype
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + * @return Whether the replaceWithInfoTypeConfig field is set. + */ + boolean hasReplaceWithInfoTypeConfig(); + /** + *
+   * Replace with infotype
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + * @return The replaceWithInfoTypeConfig. + */ + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getReplaceWithInfoTypeConfig(); + /** + *
+   * Replace with infotype
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + */ + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder getReplaceWithInfoTypeConfigOrBuilder(); + + /** + *
+   * Time extraction
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + * @return Whether the timePartConfig field is set. + */ + boolean hasTimePartConfig(); + /** + *
+   * Time extraction
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + * @return The timePartConfig. + */ + com.google.privacy.dlp.v2.TimePartConfig getTimePartConfig(); + /** + *
+   * Time extraction
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; + */ + com.google.privacy.dlp.v2.TimePartConfigOrBuilder getTimePartConfigOrBuilder(); + + /** + *
+   * Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + * @return Whether the cryptoHashConfig field is set. + */ + boolean hasCryptoHashConfig(); + /** + *
+   * Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + * @return The cryptoHashConfig. + */ + com.google.privacy.dlp.v2.CryptoHashConfig getCryptoHashConfig(); + /** + *
+   * Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; + */ + com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder getCryptoHashConfigOrBuilder(); + + /** + *
+   * Date Shift
+   * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + * @return Whether the dateShiftConfig field is set. + */ + boolean hasDateShiftConfig(); + /** + *
+   * Date Shift
+   * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + * @return The dateShiftConfig. + */ + com.google.privacy.dlp.v2.DateShiftConfig getDateShiftConfig(); + /** + *
+   * Date Shift
+   * 
+ * + * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; + */ + com.google.privacy.dlp.v2.DateShiftConfigOrBuilder getDateShiftConfigOrBuilder(); + + /** + *
+   * Deterministic Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + * @return Whether the cryptoDeterministicConfig field is set. + */ + boolean hasCryptoDeterministicConfig(); + /** + *
+   * Deterministic Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + * @return The cryptoDeterministicConfig. + */ + com.google.privacy.dlp.v2.CryptoDeterministicConfig getCryptoDeterministicConfig(); + /** + *
+   * Deterministic Crypto
+   * 
+ * + * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; + */ + com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder getCryptoDeterministicConfigOrBuilder(); + + /** + *
+   * Replace with a value randomly drawn (with replacement) from a dictionary.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + * @return Whether the replaceDictionaryConfig field is set. + */ + boolean hasReplaceDictionaryConfig(); + /** + *
+   * Replace with a value randomly drawn (with replacement) from a dictionary.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + * @return The replaceDictionaryConfig. + */ + com.google.privacy.dlp.v2.ReplaceDictionaryConfig getReplaceDictionaryConfig(); + /** + *
+   * Replace with a value randomly drawn (with replacement) from a dictionary.
+   * 
+ * + * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; + */ + com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder getReplaceDictionaryConfigOrBuilder(); + + public com.google.privacy.dlp.v2.PrimitiveTransformation.TransformationCase getTransformationCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java new file mode 100644 index 000000000000..e5c533b28c24 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java @@ -0,0 +1,13589 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Privacy metric to compute for reidentification risk analysis.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric} + */ +public final class PrivacyMetric extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric) + PrivacyMetricOrBuilder { +private static final long serialVersionUID = 0L; + // Use PrivacyMetric.newBuilder() to construct. + private PrivacyMetric(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PrivacyMetric() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PrivacyMetric(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PrivacyMetric( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder subBuilder = null; + if (typeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder subBuilder = null; + if (typeCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder subBuilder = null; + if (typeCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 3; + break; + } + case 34: { + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder subBuilder = null; + if (typeCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 4; + break; + } + case 42: { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder subBuilder = null; + if (typeCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 5; + break; + } + case 50: { + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder subBuilder = null; + if (typeCase_ == 6) { + subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 6; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.class, com.google.privacy.dlp.v2.PrivacyMetric.Builder.class); + } + + public interface NumericalStatsConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Field to compute numerical stats on. Supported types are
+     * integer, float, date, datetime, timestamp, time.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+     * Field to compute numerical stats on. Supported types are
+     * integer, float, date, datetime, timestamp, time.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+     * Field to compute numerical stats on. Supported types are
+     * integer, float, date, datetime, timestamp, time.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + } + /** + *
+   * Compute numerical stats over an individual column, including
+   * min, max, and quantiles.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig} + */ + public static final class NumericalStatsConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) + NumericalStatsConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NumericalStatsConfig.newBuilder() to construct. + private NumericalStatsConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NumericalStatsConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NumericalStatsConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NumericalStatsConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+     * Field to compute numerical stats on. Supported types are
+     * integer, float, date, datetime, timestamp, time.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+     * Field to compute numerical stats on. Supported types are
+     * integer, float, date, datetime, timestamp, time.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+     * Field to compute numerical stats on. Supported types are
+     * integer, float, date, datetime, timestamp, time.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Compute numerical stats over an individual column, including
+     * min, max, and quantiles.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig build() { + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+       * Field to compute numerical stats on. Supported types are
+       * integer, float, date, datetime, timestamp, time.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+       * Field to compute numerical stats on. Supported types are
+       * integer, float, date, datetime, timestamp, time.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+       * Field to compute numerical stats on. Supported types are
+       * integer, float, date, datetime, timestamp, time.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Field to compute numerical stats on. Supported types are
+       * integer, float, date, datetime, timestamp, time.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Field to compute numerical stats on. Supported types are
+       * integer, float, date, datetime, timestamp, time.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Field to compute numerical stats on. Supported types are
+       * integer, float, date, datetime, timestamp, time.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+       * Field to compute numerical stats on. Supported types are
+       * integer, float, date, datetime, timestamp, time.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+       * Field to compute numerical stats on. Supported types are
+       * integer, float, date, datetime, timestamp, time.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+       * Field to compute numerical stats on. Supported types are
+       * integer, float, date, datetime, timestamp, time.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) + private static final com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NumericalStatsConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NumericalStatsConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CategoricalStatsConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Field to compute categorical stats on. All column types are
+     * supported except for arrays and structs. However, it may be more
+     * informative to use NumericalStats when the field type is supported,
+     * depending on the data.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+     * Field to compute categorical stats on. All column types are
+     * supported except for arrays and structs. However, it may be more
+     * informative to use NumericalStats when the field type is supported,
+     * depending on the data.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+     * Field to compute categorical stats on. All column types are
+     * supported except for arrays and structs. However, it may be more
+     * informative to use NumericalStats when the field type is supported,
+     * depending on the data.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + } + /** + *
+   * Compute numerical stats over an individual column, including
+   * number of distinct values and value count distribution.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig} + */ + public static final class CategoricalStatsConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) + CategoricalStatsConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use CategoricalStatsConfig.newBuilder() to construct. + private CategoricalStatsConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CategoricalStatsConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CategoricalStatsConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CategoricalStatsConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+     * Field to compute categorical stats on. All column types are
+     * supported except for arrays and structs. However, it may be more
+     * informative to use NumericalStats when the field type is supported,
+     * depending on the data.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+     * Field to compute categorical stats on. All column types are
+     * supported except for arrays and structs. However, it may be more
+     * informative to use NumericalStats when the field type is supported,
+     * depending on the data.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+     * Field to compute categorical stats on. All column types are
+     * supported except for arrays and structs. However, it may be more
+     * informative to use NumericalStats when the field type is supported,
+     * depending on the data.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Compute numerical stats over an individual column, including
+     * number of distinct values and value count distribution.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig build() { + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+       * Field to compute categorical stats on. All column types are
+       * supported except for arrays and structs. However, it may be more
+       * informative to use NumericalStats when the field type is supported,
+       * depending on the data.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+       * Field to compute categorical stats on. All column types are
+       * supported except for arrays and structs. However, it may be more
+       * informative to use NumericalStats when the field type is supported,
+       * depending on the data.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+       * Field to compute categorical stats on. All column types are
+       * supported except for arrays and structs. However, it may be more
+       * informative to use NumericalStats when the field type is supported,
+       * depending on the data.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Field to compute categorical stats on. All column types are
+       * supported except for arrays and structs. However, it may be more
+       * informative to use NumericalStats when the field type is supported,
+       * depending on the data.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Field to compute categorical stats on. All column types are
+       * supported except for arrays and structs. However, it may be more
+       * informative to use NumericalStats when the field type is supported,
+       * depending on the data.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Field to compute categorical stats on. All column types are
+       * supported except for arrays and structs. However, it may be more
+       * informative to use NumericalStats when the field type is supported,
+       * depending on the data.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+       * Field to compute categorical stats on. All column types are
+       * supported except for arrays and structs. However, it may be more
+       * informative to use NumericalStats when the field type is supported,
+       * depending on the data.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+       * Field to compute categorical stats on. All column types are
+       * supported except for arrays and structs. However, it may be more
+       * informative to use NumericalStats when the field type is supported,
+       * depending on the data.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+       * Field to compute categorical stats on. All column types are
+       * supported except for arrays and structs. However, it may be more
+       * informative to use NumericalStats when the field type is supported,
+       * depending on the data.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) + private static final com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CategoricalStatsConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CategoricalStatsConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface KAnonymityConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + java.util.List + getQuasiIdsList(); + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + com.google.privacy.dlp.v2.FieldId getQuasiIds(int index); + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + int getQuasiIdsCount(); + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + java.util.List + getQuasiIdsOrBuilderList(); + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( + int index); + + /** + *
+     * Message indicating that multiple rows might be associated to a
+     * single individual. If the same entity_id is associated to multiple
+     * quasi-identifier tuples over distinct rows, we consider the entire
+     * collection of tuples as the composite quasi-identifier. This collection
+     * is a multiset: the order in which the different tuples appear in the
+     * dataset is ignored, but their frequency is taken into account.
+     * Important note: a maximum of 1000 rows can be associated to a single
+     * entity ID. If more rows are associated with the same entity ID, some
+     * might be ignored.
+     * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + * @return Whether the entityId field is set. + */ + boolean hasEntityId(); + /** + *
+     * Message indicating that multiple rows might be associated to a
+     * single individual. If the same entity_id is associated to multiple
+     * quasi-identifier tuples over distinct rows, we consider the entire
+     * collection of tuples as the composite quasi-identifier. This collection
+     * is a multiset: the order in which the different tuples appear in the
+     * dataset is ignored, but their frequency is taken into account.
+     * Important note: a maximum of 1000 rows can be associated to a single
+     * entity ID. If more rows are associated with the same entity ID, some
+     * might be ignored.
+     * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + * @return The entityId. + */ + com.google.privacy.dlp.v2.EntityId getEntityId(); + /** + *
+     * Message indicating that multiple rows might be associated to a
+     * single individual. If the same entity_id is associated to multiple
+     * quasi-identifier tuples over distinct rows, we consider the entire
+     * collection of tuples as the composite quasi-identifier. This collection
+     * is a multiset: the order in which the different tuples appear in the
+     * dataset is ignored, but their frequency is taken into account.
+     * Important note: a maximum of 1000 rows can be associated to a single
+     * entity ID. If more rows are associated with the same entity ID, some
+     * might be ignored.
+     * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + com.google.privacy.dlp.v2.EntityIdOrBuilder getEntityIdOrBuilder(); + } + /** + *
+   * k-anonymity metric, used for analysis of reidentification risk.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig} + */ + public static final class KAnonymityConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) + KAnonymityConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use KAnonymityConfig.newBuilder() to construct. + private KAnonymityConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KAnonymityConfig() { + quasiIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KAnonymityConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KAnonymityConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIds_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.privacy.dlp.v2.EntityId.Builder subBuilder = null; + if (entityId_ != null) { + subBuilder = entityId_.toBuilder(); + } + entityId_ = input.readMessage(com.google.privacy.dlp.v2.EntityId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entityId_); + entityId_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder.class); + } + + public static final int QUASI_IDS_FIELD_NUMBER = 1; + private java.util.List quasiIds_; + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public java.util.List getQuasiIdsList() { + return quasiIds_; + } + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public java.util.List + getQuasiIdsOrBuilderList() { + return quasiIds_; + } + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public int getQuasiIdsCount() { + return quasiIds_.size(); + } + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getQuasiIds(int index) { + return quasiIds_.get(index); + } + /** + *
+     * Set of fields to compute k-anonymity over. When multiple fields are
+     * specified, they are considered a single composite key. Structs and
+     * repeated data types are not supported; however, nested fields are
+     * supported so long as they are not structs themselves or nested within
+     * a repeated field.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( + int index) { + return quasiIds_.get(index); + } + + public static final int ENTITY_ID_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.EntityId entityId_; + /** + *
+     * Message indicating that multiple rows might be associated to a
+     * single individual. If the same entity_id is associated to multiple
+     * quasi-identifier tuples over distinct rows, we consider the entire
+     * collection of tuples as the composite quasi-identifier. This collection
+     * is a multiset: the order in which the different tuples appear in the
+     * dataset is ignored, but their frequency is taken into account.
+     * Important note: a maximum of 1000 rows can be associated to a single
+     * entity ID. If more rows are associated with the same entity ID, some
+     * might be ignored.
+     * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + * @return Whether the entityId field is set. + */ + @java.lang.Override + public boolean hasEntityId() { + return entityId_ != null; + } + /** + *
+     * Message indicating that multiple rows might be associated to a
+     * single individual. If the same entity_id is associated to multiple
+     * quasi-identifier tuples over distinct rows, we consider the entire
+     * collection of tuples as the composite quasi-identifier. This collection
+     * is a multiset: the order in which the different tuples appear in the
+     * dataset is ignored, but their frequency is taken into account.
+     * Important note: a maximum of 1000 rows can be associated to a single
+     * entity ID. If more rows are associated with the same entity ID, some
+     * might be ignored.
+     * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + * @return The entityId. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.EntityId getEntityId() { + return entityId_ == null ? com.google.privacy.dlp.v2.EntityId.getDefaultInstance() : entityId_; + } + /** + *
+     * Message indicating that multiple rows might be associated to a
+     * single individual. If the same entity_id is associated to multiple
+     * quasi-identifier tuples over distinct rows, we consider the entire
+     * collection of tuples as the composite quasi-identifier. This collection
+     * is a multiset: the order in which the different tuples appear in the
+     * dataset is ignored, but their frequency is taken into account.
+     * Important note: a maximum of 1000 rows can be associated to a single
+     * entity ID. If more rows are associated with the same entity ID, some
+     * might be ignored.
+     * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.EntityIdOrBuilder getEntityIdOrBuilder() { + return getEntityId(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIds_.size(); i++) { + output.writeMessage(1, quasiIds_.get(i)); + } + if (entityId_ != null) { + output.writeMessage(2, getEntityId()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIds_.get(i)); + } + if (entityId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEntityId()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) obj; + + if (!getQuasiIdsList() + .equals(other.getQuasiIdsList())) return false; + if (hasEntityId() != other.hasEntityId()) return false; + if (hasEntityId()) { + if (!getEntityId() + .equals(other.getEntityId())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsCount() > 0) { + hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsList().hashCode(); + } + if (hasEntityId()) { + hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getEntityId().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * k-anonymity metric, used for analysis of reidentification risk.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsBuilder_.clear(); + } + if (entityIdBuilder_ == null) { + entityId_ = null; + } else { + entityId_ = null; + entityIdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig build() { + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig(this); + int from_bitField0_ = bitField0_; + if (quasiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIds_ = quasiIds_; + } else { + result.quasiIds_ = quasiIdsBuilder_.build(); + } + if (entityIdBuilder_ == null) { + result.entityId_ = entityId_; + } else { + result.entityId_ = entityIdBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance()) return this; + if (quasiIdsBuilder_ == null) { + if (!other.quasiIds_.isEmpty()) { + if (quasiIds_.isEmpty()) { + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsIsMutable(); + quasiIds_.addAll(other.quasiIds_); + } + onChanged(); + } + } else { + if (!other.quasiIds_.isEmpty()) { + if (quasiIdsBuilder_.isEmpty()) { + quasiIdsBuilder_.dispose(); + quasiIdsBuilder_ = null; + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsFieldBuilder() : null; + } else { + quasiIdsBuilder_.addAllMessages(other.quasiIds_); + } + } + } + if (other.hasEntityId()) { + mergeEntityId(other.getEntityId()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIds_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(quasiIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> quasiIdsBuilder_; + + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public java.util.List getQuasiIdsList() { + if (quasiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIds_); + } else { + return quasiIdsBuilder_.getMessageList(); + } + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public int getQuasiIdsCount() { + if (quasiIdsBuilder_ == null) { + return quasiIds_.size(); + } else { + return quasiIdsBuilder_.getCount(); + } + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldId getQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); + } else { + return quasiIdsBuilder_.getMessage(index); + } + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, value); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addQuasiIds(com.google.privacy.dlp.v2.FieldId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addQuasiIds( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addAllQuasiIds( + java.lang.Iterable values) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIds_); + onChanged(); + } else { + quasiIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder clearQuasiIds() { + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsBuilder_.clear(); + } + return this; + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder removeQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.remove(index); + onChanged(); + } else { + quasiIdsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().getBuilder(index); + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( + int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); } else { + return quasiIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + if (quasiIdsBuilder_ != null) { + return quasiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIds_); + } + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addQuasiIdsBuilder() { + return getQuasiIdsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+       * Set of fields to compute k-anonymity over. When multiple fields are
+       * specified, they are considered a single composite key. Structs and
+       * repeated data types are not supported; however, nested fields are
+       * supported so long as they are not structs themselves or nested within
+       * a repeated field.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public java.util.List + getQuasiIdsBuilderList() { + return getQuasiIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getQuasiIdsFieldBuilder() { + if (quasiIdsBuilder_ == null) { + quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + quasiIds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIds_ = null; + } + return quasiIdsBuilder_; + } + + private com.google.privacy.dlp.v2.EntityId entityId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.EntityId, com.google.privacy.dlp.v2.EntityId.Builder, com.google.privacy.dlp.v2.EntityIdOrBuilder> entityIdBuilder_; + /** + *
+       * Message indicating that multiple rows might be associated to a
+       * single individual. If the same entity_id is associated to multiple
+       * quasi-identifier tuples over distinct rows, we consider the entire
+       * collection of tuples as the composite quasi-identifier. This collection
+       * is a multiset: the order in which the different tuples appear in the
+       * dataset is ignored, but their frequency is taken into account.
+       * Important note: a maximum of 1000 rows can be associated to a single
+       * entity ID. If more rows are associated with the same entity ID, some
+       * might be ignored.
+       * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + * @return Whether the entityId field is set. + */ + public boolean hasEntityId() { + return entityIdBuilder_ != null || entityId_ != null; + } + /** + *
+       * Message indicating that multiple rows might be associated to a
+       * single individual. If the same entity_id is associated to multiple
+       * quasi-identifier tuples over distinct rows, we consider the entire
+       * collection of tuples as the composite quasi-identifier. This collection
+       * is a multiset: the order in which the different tuples appear in the
+       * dataset is ignored, but their frequency is taken into account.
+       * Important note: a maximum of 1000 rows can be associated to a single
+       * entity ID. If more rows are associated with the same entity ID, some
+       * might be ignored.
+       * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + * @return The entityId. + */ + public com.google.privacy.dlp.v2.EntityId getEntityId() { + if (entityIdBuilder_ == null) { + return entityId_ == null ? com.google.privacy.dlp.v2.EntityId.getDefaultInstance() : entityId_; + } else { + return entityIdBuilder_.getMessage(); + } + } + /** + *
+       * Message indicating that multiple rows might be associated to a
+       * single individual. If the same entity_id is associated to multiple
+       * quasi-identifier tuples over distinct rows, we consider the entire
+       * collection of tuples as the composite quasi-identifier. This collection
+       * is a multiset: the order in which the different tuples appear in the
+       * dataset is ignored, but their frequency is taken into account.
+       * Important note: a maximum of 1000 rows can be associated to a single
+       * entity ID. If more rows are associated with the same entity ID, some
+       * might be ignored.
+       * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + public Builder setEntityId(com.google.privacy.dlp.v2.EntityId value) { + if (entityIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entityId_ = value; + onChanged(); + } else { + entityIdBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Message indicating that multiple rows might be associated to a
+       * single individual. If the same entity_id is associated to multiple
+       * quasi-identifier tuples over distinct rows, we consider the entire
+       * collection of tuples as the composite quasi-identifier. This collection
+       * is a multiset: the order in which the different tuples appear in the
+       * dataset is ignored, but their frequency is taken into account.
+       * Important note: a maximum of 1000 rows can be associated to a single
+       * entity ID. If more rows are associated with the same entity ID, some
+       * might be ignored.
+       * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + public Builder setEntityId( + com.google.privacy.dlp.v2.EntityId.Builder builderForValue) { + if (entityIdBuilder_ == null) { + entityId_ = builderForValue.build(); + onChanged(); + } else { + entityIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Message indicating that multiple rows might be associated to a
+       * single individual. If the same entity_id is associated to multiple
+       * quasi-identifier tuples over distinct rows, we consider the entire
+       * collection of tuples as the composite quasi-identifier. This collection
+       * is a multiset: the order in which the different tuples appear in the
+       * dataset is ignored, but their frequency is taken into account.
+       * Important note: a maximum of 1000 rows can be associated to a single
+       * entity ID. If more rows are associated with the same entity ID, some
+       * might be ignored.
+       * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + public Builder mergeEntityId(com.google.privacy.dlp.v2.EntityId value) { + if (entityIdBuilder_ == null) { + if (entityId_ != null) { + entityId_ = + com.google.privacy.dlp.v2.EntityId.newBuilder(entityId_).mergeFrom(value).buildPartial(); + } else { + entityId_ = value; + } + onChanged(); + } else { + entityIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Message indicating that multiple rows might be associated to a
+       * single individual. If the same entity_id is associated to multiple
+       * quasi-identifier tuples over distinct rows, we consider the entire
+       * collection of tuples as the composite quasi-identifier. This collection
+       * is a multiset: the order in which the different tuples appear in the
+       * dataset is ignored, but their frequency is taken into account.
+       * Important note: a maximum of 1000 rows can be associated to a single
+       * entity ID. If more rows are associated with the same entity ID, some
+       * might be ignored.
+       * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + public Builder clearEntityId() { + if (entityIdBuilder_ == null) { + entityId_ = null; + onChanged(); + } else { + entityId_ = null; + entityIdBuilder_ = null; + } + + return this; + } + /** + *
+       * Message indicating that multiple rows might be associated to a
+       * single individual. If the same entity_id is associated to multiple
+       * quasi-identifier tuples over distinct rows, we consider the entire
+       * collection of tuples as the composite quasi-identifier. This collection
+       * is a multiset: the order in which the different tuples appear in the
+       * dataset is ignored, but their frequency is taken into account.
+       * Important note: a maximum of 1000 rows can be associated to a single
+       * entity ID. If more rows are associated with the same entity ID, some
+       * might be ignored.
+       * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + public com.google.privacy.dlp.v2.EntityId.Builder getEntityIdBuilder() { + + onChanged(); + return getEntityIdFieldBuilder().getBuilder(); + } + /** + *
+       * Message indicating that multiple rows might be associated to a
+       * single individual. If the same entity_id is associated to multiple
+       * quasi-identifier tuples over distinct rows, we consider the entire
+       * collection of tuples as the composite quasi-identifier. This collection
+       * is a multiset: the order in which the different tuples appear in the
+       * dataset is ignored, but their frequency is taken into account.
+       * Important note: a maximum of 1000 rows can be associated to a single
+       * entity ID. If more rows are associated with the same entity ID, some
+       * might be ignored.
+       * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + public com.google.privacy.dlp.v2.EntityIdOrBuilder getEntityIdOrBuilder() { + if (entityIdBuilder_ != null) { + return entityIdBuilder_.getMessageOrBuilder(); + } else { + return entityId_ == null ? + com.google.privacy.dlp.v2.EntityId.getDefaultInstance() : entityId_; + } + } + /** + *
+       * Message indicating that multiple rows might be associated to a
+       * single individual. If the same entity_id is associated to multiple
+       * quasi-identifier tuples over distinct rows, we consider the entire
+       * collection of tuples as the composite quasi-identifier. This collection
+       * is a multiset: the order in which the different tuples appear in the
+       * dataset is ignored, but their frequency is taken into account.
+       * Important note: a maximum of 1000 rows can be associated to a single
+       * entity ID. If more rows are associated with the same entity ID, some
+       * might be ignored.
+       * 
+ * + * .google.privacy.dlp.v2.EntityId entity_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.EntityId, com.google.privacy.dlp.v2.EntityId.Builder, com.google.privacy.dlp.v2.EntityIdOrBuilder> + getEntityIdFieldBuilder() { + if (entityIdBuilder_ == null) { + entityIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.EntityId, com.google.privacy.dlp.v2.EntityId.Builder, com.google.privacy.dlp.v2.EntityIdOrBuilder>( + getEntityId(), + getParentForChildren(), + isClean()); + entityId_ = null; + } + return entityIdBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) + private static final com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KAnonymityConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KAnonymityConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LDiversityConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + java.util.List + getQuasiIdsList(); + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + com.google.privacy.dlp.v2.FieldId getQuasiIds(int index); + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + int getQuasiIdsCount(); + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + java.util.List + getQuasiIdsOrBuilderList(); + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( + int index); + + /** + *
+     * Sensitive field for computing the l-value.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + * @return Whether the sensitiveAttribute field is set. + */ + boolean hasSensitiveAttribute(); + /** + *
+     * Sensitive field for computing the l-value.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + * @return The sensitiveAttribute. + */ + com.google.privacy.dlp.v2.FieldId getSensitiveAttribute(); + /** + *
+     * Sensitive field for computing the l-value.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getSensitiveAttributeOrBuilder(); + } + /** + *
+   * l-diversity metric, used for analysis of reidentification risk.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig} + */ + public static final class LDiversityConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) + LDiversityConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use LDiversityConfig.newBuilder() to construct. + private LDiversityConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LDiversityConfig() { + quasiIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LDiversityConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LDiversityConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIds_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (sensitiveAttribute_ != null) { + subBuilder = sensitiveAttribute_.toBuilder(); + } + sensitiveAttribute_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sensitiveAttribute_); + sensitiveAttribute_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder.class); + } + + public static final int QUASI_IDS_FIELD_NUMBER = 1; + private java.util.List quasiIds_; + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public java.util.List getQuasiIdsList() { + return quasiIds_; + } + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public java.util.List + getQuasiIdsOrBuilderList() { + return quasiIds_; + } + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public int getQuasiIdsCount() { + return quasiIds_.size(); + } + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getQuasiIds(int index) { + return quasiIds_.get(index); + } + /** + *
+     * Set of quasi-identifiers indicating how equivalence classes are
+     * defined for the l-diversity computation. When multiple fields are
+     * specified, they are considered a single composite key.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( + int index) { + return quasiIds_.get(index); + } + + public static final int SENSITIVE_ATTRIBUTE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.FieldId sensitiveAttribute_; + /** + *
+     * Sensitive field for computing the l-value.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + * @return Whether the sensitiveAttribute field is set. + */ + @java.lang.Override + public boolean hasSensitiveAttribute() { + return sensitiveAttribute_ != null; + } + /** + *
+     * Sensitive field for computing the l-value.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + * @return The sensitiveAttribute. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getSensitiveAttribute() { + return sensitiveAttribute_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : sensitiveAttribute_; + } + /** + *
+     * Sensitive field for computing the l-value.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getSensitiveAttributeOrBuilder() { + return getSensitiveAttribute(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIds_.size(); i++) { + output.writeMessage(1, quasiIds_.get(i)); + } + if (sensitiveAttribute_ != null) { + output.writeMessage(2, getSensitiveAttribute()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIds_.get(i)); + } + if (sensitiveAttribute_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSensitiveAttribute()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) obj; + + if (!getQuasiIdsList() + .equals(other.getQuasiIdsList())) return false; + if (hasSensitiveAttribute() != other.hasSensitiveAttribute()) return false; + if (hasSensitiveAttribute()) { + if (!getSensitiveAttribute() + .equals(other.getSensitiveAttribute())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsCount() > 0) { + hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsList().hashCode(); + } + if (hasSensitiveAttribute()) { + hash = (37 * hash) + SENSITIVE_ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getSensitiveAttribute().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * l-diversity metric, used for analysis of reidentification risk.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsBuilder_.clear(); + } + if (sensitiveAttributeBuilder_ == null) { + sensitiveAttribute_ = null; + } else { + sensitiveAttribute_ = null; + sensitiveAttributeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig build() { + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig(this); + int from_bitField0_ = bitField0_; + if (quasiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIds_ = quasiIds_; + } else { + result.quasiIds_ = quasiIdsBuilder_.build(); + } + if (sensitiveAttributeBuilder_ == null) { + result.sensitiveAttribute_ = sensitiveAttribute_; + } else { + result.sensitiveAttribute_ = sensitiveAttributeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance()) return this; + if (quasiIdsBuilder_ == null) { + if (!other.quasiIds_.isEmpty()) { + if (quasiIds_.isEmpty()) { + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsIsMutable(); + quasiIds_.addAll(other.quasiIds_); + } + onChanged(); + } + } else { + if (!other.quasiIds_.isEmpty()) { + if (quasiIdsBuilder_.isEmpty()) { + quasiIdsBuilder_.dispose(); + quasiIdsBuilder_ = null; + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsFieldBuilder() : null; + } else { + quasiIdsBuilder_.addAllMessages(other.quasiIds_); + } + } + } + if (other.hasSensitiveAttribute()) { + mergeSensitiveAttribute(other.getSensitiveAttribute()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIds_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(quasiIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> quasiIdsBuilder_; + + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public java.util.List getQuasiIdsList() { + if (quasiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIds_); + } else { + return quasiIdsBuilder_.getMessageList(); + } + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public int getQuasiIdsCount() { + if (quasiIdsBuilder_ == null) { + return quasiIds_.size(); + } else { + return quasiIdsBuilder_.getCount(); + } + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldId getQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); + } else { + return quasiIdsBuilder_.getMessage(index); + } + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, value); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addQuasiIds(com.google.privacy.dlp.v2.FieldId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addQuasiIds( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder addAllQuasiIds( + java.lang.Iterable values) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIds_); + onChanged(); + } else { + quasiIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder clearQuasiIds() { + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsBuilder_.clear(); + } + return this; + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public Builder removeQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.remove(index); + onChanged(); + } else { + quasiIdsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().getBuilder(index); + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( + int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); } else { + return quasiIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + if (quasiIdsBuilder_ != null) { + return quasiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIds_); + } + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addQuasiIdsBuilder() { + return getQuasiIdsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+       * Set of quasi-identifiers indicating how equivalence classes are
+       * defined for the l-diversity computation. When multiple fields are
+       * specified, they are considered a single composite key.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; + */ + public java.util.List + getQuasiIdsBuilderList() { + return getQuasiIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getQuasiIdsFieldBuilder() { + if (quasiIdsBuilder_ == null) { + quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + quasiIds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIds_ = null; + } + return quasiIdsBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId sensitiveAttribute_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> sensitiveAttributeBuilder_; + /** + *
+       * Sensitive field for computing the l-value.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + * @return Whether the sensitiveAttribute field is set. + */ + public boolean hasSensitiveAttribute() { + return sensitiveAttributeBuilder_ != null || sensitiveAttribute_ != null; + } + /** + *
+       * Sensitive field for computing the l-value.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + * @return The sensitiveAttribute. + */ + public com.google.privacy.dlp.v2.FieldId getSensitiveAttribute() { + if (sensitiveAttributeBuilder_ == null) { + return sensitiveAttribute_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : sensitiveAttribute_; + } else { + return sensitiveAttributeBuilder_.getMessage(); + } + } + /** + *
+       * Sensitive field for computing the l-value.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + */ + public Builder setSensitiveAttribute(com.google.privacy.dlp.v2.FieldId value) { + if (sensitiveAttributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sensitiveAttribute_ = value; + onChanged(); + } else { + sensitiveAttributeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Sensitive field for computing the l-value.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + */ + public Builder setSensitiveAttribute( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (sensitiveAttributeBuilder_ == null) { + sensitiveAttribute_ = builderForValue.build(); + onChanged(); + } else { + sensitiveAttributeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Sensitive field for computing the l-value.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + */ + public Builder mergeSensitiveAttribute(com.google.privacy.dlp.v2.FieldId value) { + if (sensitiveAttributeBuilder_ == null) { + if (sensitiveAttribute_ != null) { + sensitiveAttribute_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(sensitiveAttribute_).mergeFrom(value).buildPartial(); + } else { + sensitiveAttribute_ = value; + } + onChanged(); + } else { + sensitiveAttributeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Sensitive field for computing the l-value.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + */ + public Builder clearSensitiveAttribute() { + if (sensitiveAttributeBuilder_ == null) { + sensitiveAttribute_ = null; + onChanged(); + } else { + sensitiveAttribute_ = null; + sensitiveAttributeBuilder_ = null; + } + + return this; + } + /** + *
+       * Sensitive field for computing the l-value.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getSensitiveAttributeBuilder() { + + onChanged(); + return getSensitiveAttributeFieldBuilder().getBuilder(); + } + /** + *
+       * Sensitive field for computing the l-value.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getSensitiveAttributeOrBuilder() { + if (sensitiveAttributeBuilder_ != null) { + return sensitiveAttributeBuilder_.getMessageOrBuilder(); + } else { + return sensitiveAttribute_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : sensitiveAttribute_; + } + } + /** + *
+       * Sensitive field for computing the l-value.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getSensitiveAttributeFieldBuilder() { + if (sensitiveAttributeBuilder_ == null) { + sensitiveAttributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getSensitiveAttribute(), + getParentForChildren(), + isClean()); + sensitiveAttribute_ = null; + } + return sensitiveAttributeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) + private static final com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LDiversityConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LDiversityConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface KMapEstimationConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getQuasiIdsList(); + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getQuasiIds(int index); + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getQuasiIdsCount(); + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getQuasiIdsOrBuilderList(); + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder getQuasiIdsOrBuilder( + int index); + + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Set if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Set if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString + getRegionCodeBytes(); + + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + java.util.List + getAuxiliaryTablesList(); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getAuxiliaryTables(int index); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + int getAuxiliaryTablesCount(); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + java.util.List + getAuxiliaryTablesOrBuilderList(); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder getAuxiliaryTablesOrBuilder( + int index); + } + /** + *
+   * Reidentifiability metric. This corresponds to a risk model similar to what
+   * is called "journalist risk" in the literature, except the attack dataset is
+   * statistically modeled instead of being perfectly known. This can be done
+   * using publicly available data (like the US Census), or using a custom
+   * statistical model (indicated as one or several BigQuery tables), or by
+   * extrapolating from the distribution of values in the input dataset.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig} + */ + public static final class KMapEstimationConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) + KMapEstimationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use KMapEstimationConfig.newBuilder() to construct. + private KMapEstimationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private KMapEstimationConfig() { + quasiIds_ = java.util.Collections.emptyList(); + regionCode_ = ""; + auxiliaryTables_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new KMapEstimationConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KMapEstimationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIds_.add( + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + regionCode_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + auxiliaryTables_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + auxiliaryTables_.add( + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder.class); + } + + public interface TaggedFieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Required. Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+       * Required. Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+       * Required. Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + + /** + *
+       * A column can be tagged with a InfoType to use the relevant public
+       * dataset as a statistical model of population, if available. We
+       * currently support US ZIP codes, region codes, ages and genders.
+       * To programmatically obtain the list of supported InfoTypes, use
+       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+       * A column can be tagged with a InfoType to use the relevant public
+       * dataset as a statistical model of population, if available. We
+       * currently support US ZIP codes, region codes, ages and genders.
+       * To programmatically obtain the list of supported InfoTypes, use
+       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+       * A column can be tagged with a InfoType to use the relevant public
+       * dataset as a statistical model of population, if available. We
+       * currently support US ZIP codes, region codes, ages and genders.
+       * To programmatically obtain the list of supported InfoTypes, use
+       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 3; + * @return Whether the customTag field is set. + */ + boolean hasCustomTag(); + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 3; + * @return The customTag. + */ + java.lang.String getCustomTag(); + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 3; + * @return The bytes for customTag. + */ + com.google.protobuf.ByteString + getCustomTagBytes(); + + /** + *
+       * If no semantic tag is indicated, we infer the statistical model from
+       * the distribution of values in the input data
+       * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return Whether the inferred field is set. + */ + boolean hasInferred(); + /** + *
+       * If no semantic tag is indicated, we infer the statistical model from
+       * the distribution of values in the input data
+       * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return The inferred. + */ + com.google.protobuf.Empty getInferred(); + /** + *
+       * If no semantic tag is indicated, we infer the statistical model from
+       * the distribution of values in the input data
+       * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + com.google.protobuf.EmptyOrBuilder getInferredOrBuilder(); + + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.TagCase getTagCase(); + } + /** + *
+     * A column with a semantic tag attached.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField} + */ + public static final class TaggedField extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) + TaggedFieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use TaggedField.newBuilder() to construct. + private TaggedField(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TaggedField() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TaggedField(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TaggedField( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (tagCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.InfoType) tag_).toBuilder(); + } + tag_ = + input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoType) tag_); + tag_ = subBuilder.buildPartial(); + } + tagCase_ = 2; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + tagCase_ = 3; + tag_ = s; + break; + } + case 34: { + com.google.protobuf.Empty.Builder subBuilder = null; + if (tagCase_ == 4) { + subBuilder = ((com.google.protobuf.Empty) tag_).toBuilder(); + } + tag_ = + input.readMessage(com.google.protobuf.Empty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Empty) tag_); + tag_ = subBuilder.buildPartial(); + } + tagCase_ = 4; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder.class); + } + + private int tagCase_ = 0; + private java.lang.Object tag_; + public enum TagCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INFO_TYPE(2), + CUSTOM_TAG(3), + INFERRED(4), + TAG_NOT_SET(0); + private final int value; + private TagCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TagCase valueOf(int value) { + return forNumber(value); + } + + public static TagCase forNumber(int value) { + switch (value) { + case 2: return INFO_TYPE; + case 3: return CUSTOM_TAG; + case 4: return INFERRED; + case 0: return TAG_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TagCase + getTagCase() { + return TagCase.forNumber( + tagCase_); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+       * Required. Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+       * Required. Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+       * Required. Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int INFO_TYPE_FIELD_NUMBER = 2; + /** + *
+       * A column can be tagged with a InfoType to use the relevant public
+       * dataset as a statistical model of population, if available. We
+       * currently support US ZIP codes, region codes, ages and genders.
+       * To programmatically obtain the list of supported InfoTypes, use
+       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return tagCase_ == 2; + } + /** + *
+       * A column can be tagged with a InfoType to use the relevant public
+       * dataset as a statistical model of population, if available. We
+       * currently support US ZIP codes, region codes, ages and genders.
+       * To programmatically obtain the list of supported InfoTypes, use
+       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + /** + *
+       * A column can be tagged with a InfoType to use the relevant public
+       * dataset as a statistical model of population, if available. We
+       * currently support US ZIP codes, region codes, ages and genders.
+       * To programmatically obtain the list of supported InfoTypes, use
+       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + + public static final int CUSTOM_TAG_FIELD_NUMBER = 3; + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 3; + * @return Whether the customTag field is set. + */ + public boolean hasCustomTag() { + return tagCase_ == 3; + } + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 3; + * @return The customTag. + */ + public java.lang.String getCustomTag() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (tagCase_ == 3) { + tag_ = s; + } + return s; + } + } + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 3; + * @return The bytes for customTag. + */ + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (tagCase_ == 3) { + tag_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFERRED_FIELD_NUMBER = 4; + /** + *
+       * If no semantic tag is indicated, we infer the statistical model from
+       * the distribution of values in the input data
+       * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return Whether the inferred field is set. + */ + @java.lang.Override + public boolean hasInferred() { + return tagCase_ == 4; + } + /** + *
+       * If no semantic tag is indicated, we infer the statistical model from
+       * the distribution of values in the input data
+       * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return The inferred. + */ + @java.lang.Override + public com.google.protobuf.Empty getInferred() { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + /** + *
+       * If no semantic tag is indicated, we infer the statistical model from
+       * the distribution of values in the input data
+       * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + @java.lang.Override + public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (tagCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.InfoType) tag_); + } + if (tagCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tag_); + } + if (tagCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Empty) tag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + if (tagCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.InfoType) tag_); + } + if (tagCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tag_); + } + if (tagCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.protobuf.Empty) tag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField other = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!getTagCase().equals(other.getTagCase())) return false; + switch (tagCase_) { + case 2: + if (!getInfoType() + .equals(other.getInfoType())) return false; + break; + case 3: + if (!getCustomTag() + .equals(other.getCustomTag())) return false; + break; + case 4: + if (!getInferred() + .equals(other.getInferred())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + switch (tagCase_) { + case 2: + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + break; + case 3: + hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; + hash = (53 * hash) + getCustomTag().hashCode(); + break; + case 4: + hash = (37 * hash) + INFERRED_FIELD_NUMBER; + hash = (53 * hash) + getInferred().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * A column with a semantic tag attached.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + tagCase_ = 0; + tag_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField build() { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField result = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + if (tagCase_ == 2) { + if (infoTypeBuilder_ == null) { + result.tag_ = tag_; + } else { + result.tag_ = infoTypeBuilder_.build(); + } + } + if (tagCase_ == 3) { + result.tag_ = tag_; + } + if (tagCase_ == 4) { + if (inferredBuilder_ == null) { + result.tag_ = tag_; + } else { + result.tag_ = inferredBuilder_.build(); + } + } + result.tagCase_ = tagCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + switch (other.getTagCase()) { + case INFO_TYPE: { + mergeInfoType(other.getInfoType()); + break; + } + case CUSTOM_TAG: { + tagCase_ = 3; + tag_ = other.tag_; + onChanged(); + break; + } + case INFERRED: { + mergeInferred(other.getInferred()); + break; + } + case TAG_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int tagCase_ = 0; + private java.lang.Object tag_; + public TagCase + getTagCase() { + return TagCase.forNumber( + tagCase_); + } + + public Builder clearTag() { + tagCase_ = 0; + tag_ = null; + onChanged(); + return this; + } + + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+         * Required. Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+         * Required. Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+         * Required. Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * Required. Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * Required. Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * Required. Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+         * Required. Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+         * Required. Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+         * Required. Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+         * A column can be tagged with a InfoType to use the relevant public
+         * dataset as a statistical model of population, if available. We
+         * currently support US ZIP codes, region codes, ages and genders.
+         * To programmatically obtain the list of supported InfoTypes, use
+         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return tagCase_ == 2; + } + /** + *
+         * A column can be tagged with a InfoType to use the relevant public
+         * dataset as a statistical model of population, if available. We
+         * currently support US ZIP codes, region codes, ages and genders.
+         * To programmatically obtain the list of supported InfoTypes, use
+         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } else { + if (tagCase_ == 2) { + return infoTypeBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + } + /** + *
+         * A column can be tagged with a InfoType to use the relevant public
+         * dataset as a statistical model of population, if available. We
+         * currently support US ZIP codes, region codes, ages and genders.
+         * To programmatically obtain the list of supported InfoTypes, use
+         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + tagCase_ = 2; + return this; + } + /** + *
+         * A column can be tagged with a InfoType to use the relevant public
+         * dataset as a statistical model of population, if available. We
+         * currently support US ZIP codes, region codes, ages and genders.
+         * To programmatically obtain the list of supported InfoTypes, use
+         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + tag_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + tagCase_ = 2; + return this; + } + /** + *
+         * A column can be tagged with a InfoType to use the relevant public
+         * dataset as a statistical model of population, if available. We
+         * currently support US ZIP codes, region codes, ages and genders.
+         * To programmatically obtain the list of supported InfoTypes, use
+         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (tagCase_ == 2 && + tag_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) { + tag_ = com.google.privacy.dlp.v2.InfoType.newBuilder((com.google.privacy.dlp.v2.InfoType) tag_) + .mergeFrom(value).buildPartial(); + } else { + tag_ = value; + } + onChanged(); + } else { + if (tagCase_ == 2) { + infoTypeBuilder_.mergeFrom(value); + } else { + infoTypeBuilder_.setMessage(value); + } + } + tagCase_ = 2; + return this; + } + /** + *
+         * A column can be tagged with a InfoType to use the relevant public
+         * dataset as a statistical model of population, if available. We
+         * currently support US ZIP codes, region codes, ages and genders.
+         * To programmatically obtain the list of supported InfoTypes, use
+         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + if (tagCase_ == 2) { + tagCase_ = 0; + tag_ = null; + onChanged(); + } + } else { + if (tagCase_ == 2) { + tagCase_ = 0; + tag_ = null; + } + infoTypeBuilder_.clear(); + } + return this; + } + /** + *
+         * A column can be tagged with a InfoType to use the relevant public
+         * dataset as a statistical model of population, if available. We
+         * currently support US ZIP codes, region codes, ages and genders.
+         * To programmatically obtain the list of supported InfoTypes, use
+         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+         * A column can be tagged with a InfoType to use the relevant public
+         * dataset as a statistical model of population, if available. We
+         * currently support US ZIP codes, region codes, ages and genders.
+         * To programmatically obtain the list of supported InfoTypes, use
+         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if ((tagCase_ == 2) && (infoTypeBuilder_ != null)) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + } + /** + *
+         * A column can be tagged with a InfoType to use the relevant public
+         * dataset as a statistical model of population, if available. We
+         * currently support US ZIP codes, region codes, ages and genders.
+         * To programmatically obtain the list of supported InfoTypes, use
+         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+         * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + if (!(tagCase_ == 2)) { + tag_ = com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + (com.google.privacy.dlp.v2.InfoType) tag_, + getParentForChildren(), + isClean()); + tag_ = null; + } + tagCase_ = 2; + onChanged();; + return infoTypeBuilder_; + } + + /** + *
+         * A column can be tagged with a custom tag. In this case, the user must
+         * indicate an auxiliary table that contains statistical information on
+         * the possible values of this column (below).
+         * 
+ * + * string custom_tag = 3; + * @return Whether the customTag field is set. + */ + @java.lang.Override + public boolean hasCustomTag() { + return tagCase_ == 3; + } + /** + *
+         * A column can be tagged with a custom tag. In this case, the user must
+         * indicate an auxiliary table that contains statistical information on
+         * the possible values of this column (below).
+         * 
+ * + * string custom_tag = 3; + * @return The customTag. + */ + @java.lang.Override + public java.lang.String getCustomTag() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (tagCase_ == 3) { + tag_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * A column can be tagged with a custom tag. In this case, the user must
+         * indicate an auxiliary table that contains statistical information on
+         * the possible values of this column (below).
+         * 
+ * + * string custom_tag = 3; + * @return The bytes for customTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (tagCase_ == 3) { + tag_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * A column can be tagged with a custom tag. In this case, the user must
+         * indicate an auxiliary table that contains statistical information on
+         * the possible values of this column (below).
+         * 
+ * + * string custom_tag = 3; + * @param value The customTag to set. + * @return This builder for chaining. + */ + public Builder setCustomTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tagCase_ = 3; + tag_ = value; + onChanged(); + return this; + } + /** + *
+         * A column can be tagged with a custom tag. In this case, the user must
+         * indicate an auxiliary table that contains statistical information on
+         * the possible values of this column (below).
+         * 
+ * + * string custom_tag = 3; + * @return This builder for chaining. + */ + public Builder clearCustomTag() { + if (tagCase_ == 3) { + tagCase_ = 0; + tag_ = null; + onChanged(); + } + return this; + } + /** + *
+         * A column can be tagged with a custom tag. In this case, the user must
+         * indicate an auxiliary table that contains statistical information on
+         * the possible values of this column (below).
+         * 
+ * + * string custom_tag = 3; + * @param value The bytes for customTag to set. + * @return This builder for chaining. + */ + public Builder setCustomTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tagCase_ = 3; + tag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> inferredBuilder_; + /** + *
+         * If no semantic tag is indicated, we infer the statistical model from
+         * the distribution of values in the input data
+         * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return Whether the inferred field is set. + */ + @java.lang.Override + public boolean hasInferred() { + return tagCase_ == 4; + } + /** + *
+         * If no semantic tag is indicated, we infer the statistical model from
+         * the distribution of values in the input data
+         * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return The inferred. + */ + @java.lang.Override + public com.google.protobuf.Empty getInferred() { + if (inferredBuilder_ == null) { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } else { + if (tagCase_ == 4) { + return inferredBuilder_.getMessage(); + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + } + /** + *
+         * If no semantic tag is indicated, we infer the statistical model from
+         * the distribution of values in the input data
+         * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder setInferred(com.google.protobuf.Empty value) { + if (inferredBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + onChanged(); + } else { + inferredBuilder_.setMessage(value); + } + tagCase_ = 4; + return this; + } + /** + *
+         * If no semantic tag is indicated, we infer the statistical model from
+         * the distribution of values in the input data
+         * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder setInferred( + com.google.protobuf.Empty.Builder builderForValue) { + if (inferredBuilder_ == null) { + tag_ = builderForValue.build(); + onChanged(); + } else { + inferredBuilder_.setMessage(builderForValue.build()); + } + tagCase_ = 4; + return this; + } + /** + *
+         * If no semantic tag is indicated, we infer the statistical model from
+         * the distribution of values in the input data
+         * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder mergeInferred(com.google.protobuf.Empty value) { + if (inferredBuilder_ == null) { + if (tagCase_ == 4 && + tag_ != com.google.protobuf.Empty.getDefaultInstance()) { + tag_ = com.google.protobuf.Empty.newBuilder((com.google.protobuf.Empty) tag_) + .mergeFrom(value).buildPartial(); + } else { + tag_ = value; + } + onChanged(); + } else { + if (tagCase_ == 4) { + inferredBuilder_.mergeFrom(value); + } else { + inferredBuilder_.setMessage(value); + } + } + tagCase_ = 4; + return this; + } + /** + *
+         * If no semantic tag is indicated, we infer the statistical model from
+         * the distribution of values in the input data
+         * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder clearInferred() { + if (inferredBuilder_ == null) { + if (tagCase_ == 4) { + tagCase_ = 0; + tag_ = null; + onChanged(); + } + } else { + if (tagCase_ == 4) { + tagCase_ = 0; + tag_ = null; + } + inferredBuilder_.clear(); + } + return this; + } + /** + *
+         * If no semantic tag is indicated, we infer the statistical model from
+         * the distribution of values in the input data
+         * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public com.google.protobuf.Empty.Builder getInferredBuilder() { + return getInferredFieldBuilder().getBuilder(); + } + /** + *
+         * If no semantic tag is indicated, we infer the statistical model from
+         * the distribution of values in the input data
+         * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + @java.lang.Override + public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { + if ((tagCase_ == 4) && (inferredBuilder_ != null)) { + return inferredBuilder_.getMessageOrBuilder(); + } else { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + } + /** + *
+         * If no semantic tag is indicated, we infer the statistical model from
+         * the distribution of values in the input data
+         * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> + getInferredFieldBuilder() { + if (inferredBuilder_ == null) { + if (!(tagCase_ == 4)) { + tag_ = com.google.protobuf.Empty.getDefaultInstance(); + } + inferredBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder>( + (com.google.protobuf.Empty) tag_, + getParentForChildren(), + isClean()); + tag_ = null; + } + tagCase_ = 4; + onChanged();; + return inferredBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) + private static final com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TaggedField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TaggedField(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AuxiliaryTableOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Required. Auxiliary table location.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the table field is set. + */ + boolean hasTable(); + /** + *
+       * Required. Auxiliary table location.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + com.google.privacy.dlp.v2.BigQueryTable getTable(); + /** + *
+       * Required. Auxiliary table location.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); + + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getQuasiIdsList(); + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getQuasiIds(int index); + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getQuasiIdsCount(); + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getQuasiIdsOrBuilderList(); + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder getQuasiIdsOrBuilder( + int index); + + /** + *
+       * Required. The relative frequency column must contain a floating-point number
+       * between 0 and 1 (inclusive). Null values are assumed to be zero.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the relativeFrequency field is set. + */ + boolean hasRelativeFrequency(); + /** + *
+       * Required. The relative frequency column must contain a floating-point number
+       * between 0 and 1 (inclusive). Null values are assumed to be zero.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The relativeFrequency. + */ + com.google.privacy.dlp.v2.FieldId getRelativeFrequency(); + /** + *
+       * Required. The relative frequency column must contain a floating-point number
+       * between 0 and 1 (inclusive). Null values are assumed to be zero.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder(); + } + /** + *
+     * An auxiliary table contains statistical information on the relative
+     * frequency of different quasi-identifiers values. It has one or several
+     * quasi-identifiers columns, and one column that indicates the relative
+     * frequency of each quasi-identifier tuple.
+     * If a tuple is present in the data but not in the auxiliary table, the
+     * corresponding relative frequency is assumed to be zero (and thus, the
+     * tuple is highly reidentifiable).
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable} + */ + public static final class AuxiliaryTable extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) + AuxiliaryTableOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuxiliaryTable.newBuilder() to construct. + private AuxiliaryTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AuxiliaryTable() { + quasiIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuxiliaryTable(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AuxiliaryTable( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIds_.add( + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (relativeFrequency_ != null) { + subBuilder = relativeFrequency_.toBuilder(); + } + relativeFrequency_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relativeFrequency_); + relativeFrequency_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (table_ != null) { + subBuilder = table_.toBuilder(); + } + table_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(table_); + table_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder.class); + } + + public interface QuasiIdFieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+         * Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+         * Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + + /** + *
+         * A auxiliary field.
+         * 
+ * + * string custom_tag = 2; + * @return The customTag. + */ + java.lang.String getCustomTag(); + /** + *
+         * A auxiliary field.
+         * 
+ * + * string custom_tag = 2; + * @return The bytes for customTag. + */ + com.google.protobuf.ByteString + getCustomTagBytes(); + } + /** + *
+       * A quasi-identifier column has a custom_tag, used to know which column
+       * in the data corresponds to which column in the statistical model.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField} + */ + public static final class QuasiIdField extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) + QuasiIdFieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use QuasiIdField.newBuilder() to construct. + private QuasiIdField(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QuasiIdField() { + customTag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QuasiIdField(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QuasiIdField( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + customTag_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+         * Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+         * Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+         * Identifies the column.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int CUSTOM_TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object customTag_; + /** + *
+         * A auxiliary field.
+         * 
+ * + * string custom_tag = 2; + * @return The customTag. + */ + @java.lang.Override + public java.lang.String getCustomTag() { + java.lang.Object ref = customTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customTag_ = s; + return s; + } + } + /** + *
+         * A auxiliary field.
+         * 
+ * + * string custom_tag = 2; + * @return The bytes for customTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = customTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customTag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customTag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customTag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customTag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField other = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!getCustomTag() + .equals(other.getCustomTag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; + hash = (53 * hash) + getCustomTag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+         * A quasi-identifier column has a custom_tag, used to know which column
+         * in the data corresponds to which column in the statistical model.
+         * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + customTag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField build() { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField result = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + result.customTag_ = customTag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + if (!other.getCustomTag().isEmpty()) { + customTag_ = other.customTag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+           * Identifies the column.
+           * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+           * Identifies the column.
+           * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+           * Identifies the column.
+           * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+           * Identifies the column.
+           * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+           * Identifies the column.
+           * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+           * Identifies the column.
+           * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+           * Identifies the column.
+           * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+           * Identifies the column.
+           * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+           * Identifies the column.
+           * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private java.lang.Object customTag_ = ""; + /** + *
+           * A auxiliary field.
+           * 
+ * + * string custom_tag = 2; + * @return The customTag. + */ + public java.lang.String getCustomTag() { + java.lang.Object ref = customTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+           * A auxiliary field.
+           * 
+ * + * string custom_tag = 2; + * @return The bytes for customTag. + */ + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = customTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+           * A auxiliary field.
+           * 
+ * + * string custom_tag = 2; + * @param value The customTag to set. + * @return This builder for chaining. + */ + public Builder setCustomTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customTag_ = value; + onChanged(); + return this; + } + /** + *
+           * A auxiliary field.
+           * 
+ * + * string custom_tag = 2; + * @return This builder for chaining. + */ + public Builder clearCustomTag() { + + customTag_ = getDefaultInstance().getCustomTag(); + onChanged(); + return this; + } + /** + *
+           * A auxiliary field.
+           * 
+ * + * string custom_tag = 2; + * @param value The bytes for customTag to set. + * @return This builder for chaining. + */ + public Builder setCustomTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customTag_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) + private static final com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QuasiIdField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QuasiIdField(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int TABLE_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.BigQueryTable table_; + /** + *
+       * Required. Auxiliary table location.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return table_ != null; + } + /** + *
+       * Required. Auxiliary table location.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } + /** + *
+       * Required. Auxiliary table location.
+       * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + return getTable(); + } + + public static final int QUASI_IDS_FIELD_NUMBER = 1; + private java.util.List quasiIds_; + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getQuasiIdsList() { + return quasiIds_; + } + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getQuasiIdsOrBuilderList() { + return quasiIds_; + } + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getQuasiIdsCount() { + return quasiIds_.size(); + } + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getQuasiIds(int index) { + return quasiIds_.get(index); + } + /** + *
+       * Required. Quasi-identifier columns.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder getQuasiIdsOrBuilder( + int index) { + return quasiIds_.get(index); + } + + public static final int RELATIVE_FREQUENCY_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.FieldId relativeFrequency_; + /** + *
+       * Required. The relative frequency column must contain a floating-point number
+       * between 0 and 1 (inclusive). Null values are assumed to be zero.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the relativeFrequency field is set. + */ + @java.lang.Override + public boolean hasRelativeFrequency() { + return relativeFrequency_ != null; + } + /** + *
+       * Required. The relative frequency column must contain a floating-point number
+       * between 0 and 1 (inclusive). Null values are assumed to be zero.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The relativeFrequency. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { + return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; + } + /** + *
+       * Required. The relative frequency column must contain a floating-point number
+       * between 0 and 1 (inclusive). Null values are assumed to be zero.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { + return getRelativeFrequency(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIds_.size(); i++) { + output.writeMessage(1, quasiIds_.get(i)); + } + if (relativeFrequency_ != null) { + output.writeMessage(2, getRelativeFrequency()); + } + if (table_ != null) { + output.writeMessage(3, getTable()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIds_.get(i)); + } + if (relativeFrequency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRelativeFrequency()); + } + if (table_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTable()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable other = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) obj; + + if (hasTable() != other.hasTable()) return false; + if (hasTable()) { + if (!getTable() + .equals(other.getTable())) return false; + } + if (!getQuasiIdsList() + .equals(other.getQuasiIdsList())) return false; + if (hasRelativeFrequency() != other.hasRelativeFrequency()) return false; + if (hasRelativeFrequency()) { + if (!getRelativeFrequency() + .equals(other.getRelativeFrequency())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTable()) { + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + } + if (getQuasiIdsCount() > 0) { + hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsList().hashCode(); + } + if (hasRelativeFrequency()) { + hash = (37 * hash) + RELATIVE_FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + getRelativeFrequency().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * An auxiliary table contains statistical information on the relative
+       * frequency of different quasi-identifiers values. It has one or several
+       * quasi-identifiers columns, and one column that indicates the relative
+       * frequency of each quasi-identifier tuple.
+       * If a tuple is present in the data but not in the auxiliary table, the
+       * corresponding relative frequency is assumed to be zero (and thus, the
+       * tuple is highly reidentifiable).
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (tableBuilder_ == null) { + table_ = null; + } else { + table_ = null; + tableBuilder_ = null; + } + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsBuilder_.clear(); + } + if (relativeFrequencyBuilder_ == null) { + relativeFrequency_ = null; + } else { + relativeFrequency_ = null; + relativeFrequencyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable build() { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable result = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable(this); + int from_bitField0_ = bitField0_; + if (tableBuilder_ == null) { + result.table_ = table_; + } else { + result.table_ = tableBuilder_.build(); + } + if (quasiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIds_ = quasiIds_; + } else { + result.quasiIds_ = quasiIdsBuilder_.build(); + } + if (relativeFrequencyBuilder_ == null) { + result.relativeFrequency_ = relativeFrequency_; + } else { + result.relativeFrequency_ = relativeFrequencyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.getDefaultInstance()) return this; + if (other.hasTable()) { + mergeTable(other.getTable()); + } + if (quasiIdsBuilder_ == null) { + if (!other.quasiIds_.isEmpty()) { + if (quasiIds_.isEmpty()) { + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsIsMutable(); + quasiIds_.addAll(other.quasiIds_); + } + onChanged(); + } + } else { + if (!other.quasiIds_.isEmpty()) { + if (quasiIdsBuilder_.isEmpty()) { + quasiIdsBuilder_.dispose(); + quasiIdsBuilder_ = null; + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsFieldBuilder() : null; + } else { + quasiIdsBuilder_.addAllMessages(other.quasiIds_); + } + } + } + if (other.hasRelativeFrequency()) { + mergeRelativeFrequency(other.getRelativeFrequency()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.BigQueryTable table_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; + /** + *
+         * Required. Auxiliary table location.
+         * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the table field is set. + */ + public boolean hasTable() { + return tableBuilder_ != null || table_ != null; + } + /** + *
+         * Required. Auxiliary table location.
+         * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + if (tableBuilder_ == null) { + return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } else { + return tableBuilder_.getMessage(); + } + } + /** + *
+         * Required. Auxiliary table location.
+         * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + onChanged(); + } else { + tableBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * Required. Auxiliary table location.
+         * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTable( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (tableBuilder_ == null) { + table_ = builderForValue.build(); + onChanged(); + } else { + tableBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * Required. Auxiliary table location.
+         * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (table_ != null) { + table_ = + com.google.privacy.dlp.v2.BigQueryTable.newBuilder(table_).mergeFrom(value).buildPartial(); + } else { + table_ = value; + } + onChanged(); + } else { + tableBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * Required. Auxiliary table location.
+         * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + table_ = null; + onChanged(); + } else { + table_ = null; + tableBuilder_ = null; + } + + return this; + } + /** + *
+         * Required. Auxiliary table location.
+         * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { + + onChanged(); + return getTableFieldBuilder().getBuilder(); + } + /** + *
+         * Required. Auxiliary table location.
+         * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + if (tableBuilder_ != null) { + return tableBuilder_.getMessageOrBuilder(); + } else { + return table_ == null ? + com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } + } + /** + *
+         * Required. Auxiliary table location.
+         * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + getTable(), + getParentForChildren(), + isClean()); + table_ = null; + } + return tableBuilder_; + } + + private java.util.List quasiIds_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(quasiIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder> quasiIdsBuilder_; + + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getQuasiIdsList() { + if (quasiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIds_); + } else { + return quasiIdsBuilder_.getMessageList(); + } + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getQuasiIdsCount() { + if (quasiIdsBuilder_ == null) { + return quasiIds_.size(); + } else { + return quasiIdsBuilder_.getCount(); + } + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); + } else { + return quasiIdsBuilder_.getMessage(index); + } + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, value); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllQuasiIds( + java.lang.Iterable values) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIds_); + onChanged(); + } else { + quasiIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearQuasiIds() { + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsBuilder_.clear(); + } + return this; + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.remove(index); + onChanged(); + } else { + quasiIdsBuilder_.remove(index); + } + return this; + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder getQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().getBuilder(index); + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder getQuasiIdsOrBuilder( + int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); } else { + return quasiIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + if (quasiIdsBuilder_ != null) { + return quasiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIds_); + } + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder addQuasiIdsBuilder() { + return getQuasiIdsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.getDefaultInstance()); + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder addQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.getDefaultInstance()); + } + /** + *
+         * Required. Quasi-identifier columns.
+         * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getQuasiIdsBuilderList() { + return getQuasiIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder> + getQuasiIdsFieldBuilder() { + if (quasiIdsBuilder_ == null) { + quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder>( + quasiIds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIds_ = null; + } + return quasiIdsBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId relativeFrequency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> relativeFrequencyBuilder_; + /** + *
+         * Required. The relative frequency column must contain a floating-point number
+         * between 0 and 1 (inclusive). Null values are assumed to be zero.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the relativeFrequency field is set. + */ + public boolean hasRelativeFrequency() { + return relativeFrequencyBuilder_ != null || relativeFrequency_ != null; + } + /** + *
+         * Required. The relative frequency column must contain a floating-point number
+         * between 0 and 1 (inclusive). Null values are assumed to be zero.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The relativeFrequency. + */ + public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { + if (relativeFrequencyBuilder_ == null) { + return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; + } else { + return relativeFrequencyBuilder_.getMessage(); + } + } + /** + *
+         * Required. The relative frequency column must contain a floating-point number
+         * between 0 and 1 (inclusive). Null values are assumed to be zero.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { + if (relativeFrequencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relativeFrequency_ = value; + onChanged(); + } else { + relativeFrequencyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * Required. The relative frequency column must contain a floating-point number
+         * between 0 and 1 (inclusive). Null values are assumed to be zero.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRelativeFrequency( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (relativeFrequencyBuilder_ == null) { + relativeFrequency_ = builderForValue.build(); + onChanged(); + } else { + relativeFrequencyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * Required. The relative frequency column must contain a floating-point number
+         * between 0 and 1 (inclusive). Null values are assumed to be zero.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { + if (relativeFrequencyBuilder_ == null) { + if (relativeFrequency_ != null) { + relativeFrequency_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(relativeFrequency_).mergeFrom(value).buildPartial(); + } else { + relativeFrequency_ = value; + } + onChanged(); + } else { + relativeFrequencyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * Required. The relative frequency column must contain a floating-point number
+         * between 0 and 1 (inclusive). Null values are assumed to be zero.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRelativeFrequency() { + if (relativeFrequencyBuilder_ == null) { + relativeFrequency_ = null; + onChanged(); + } else { + relativeFrequency_ = null; + relativeFrequencyBuilder_ = null; + } + + return this; + } + /** + *
+         * Required. The relative frequency column must contain a floating-point number
+         * between 0 and 1 (inclusive). Null values are assumed to be zero.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getRelativeFrequencyBuilder() { + + onChanged(); + return getRelativeFrequencyFieldBuilder().getBuilder(); + } + /** + *
+         * Required. The relative frequency column must contain a floating-point number
+         * between 0 and 1 (inclusive). Null values are assumed to be zero.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { + if (relativeFrequencyBuilder_ != null) { + return relativeFrequencyBuilder_.getMessageOrBuilder(); + } else { + return relativeFrequency_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; + } + } + /** + *
+         * Required. The relative frequency column must contain a floating-point number
+         * between 0 and 1 (inclusive). Null values are assumed to be zero.
+         * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getRelativeFrequencyFieldBuilder() { + if (relativeFrequencyBuilder_ == null) { + relativeFrequencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getRelativeFrequency(), + getParentForChildren(), + isClean()); + relativeFrequency_ = null; + } + return relativeFrequencyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) + private static final com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuxiliaryTable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AuxiliaryTable(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int QUASI_IDS_FIELD_NUMBER = 1; + private java.util.List quasiIds_; + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getQuasiIdsList() { + return quasiIds_; + } + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getQuasiIdsOrBuilderList() { + return quasiIds_; + } + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getQuasiIdsCount() { + return quasiIds_.size(); + } + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getQuasiIds(int index) { + return quasiIds_.get(index); + } + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two columns can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder getQuasiIdsOrBuilder( + int index) { + return quasiIds_.get(index); + } + + public static final int REGION_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object regionCode_; + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Set if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Set if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUXILIARY_TABLES_FIELD_NUMBER = 3; + private java.util.List auxiliaryTables_; + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + @java.lang.Override + public java.util.List getAuxiliaryTablesList() { + return auxiliaryTables_; + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + @java.lang.Override + public java.util.List + getAuxiliaryTablesOrBuilderList() { + return auxiliaryTables_; + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + @java.lang.Override + public int getAuxiliaryTablesCount() { + return auxiliaryTables_.size(); + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getAuxiliaryTables(int index) { + return auxiliaryTables_.get(index); + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers column must appear in exactly one column
+     * of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder getAuxiliaryTablesOrBuilder( + int index) { + return auxiliaryTables_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIds_.size(); i++) { + output.writeMessage(1, quasiIds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regionCode_); + } + for (int i = 0; i < auxiliaryTables_.size(); i++) { + output.writeMessage(3, auxiliaryTables_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, regionCode_); + } + for (int i = 0; i < auxiliaryTables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, auxiliaryTables_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) obj; + + if (!getQuasiIdsList() + .equals(other.getQuasiIdsList())) return false; + if (!getRegionCode() + .equals(other.getRegionCode())) return false; + if (!getAuxiliaryTablesList() + .equals(other.getAuxiliaryTablesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsCount() > 0) { + hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsList().hashCode(); + } + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + if (getAuxiliaryTablesCount() > 0) { + hash = (37 * hash) + AUXILIARY_TABLES_FIELD_NUMBER; + hash = (53 * hash) + getAuxiliaryTablesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Reidentifiability metric. This corresponds to a risk model similar to what
+     * is called "journalist risk" in the literature, except the attack dataset is
+     * statistically modeled instead of being perfectly known. This can be done
+     * using publicly available data (like the US Census), or using a custom
+     * statistical model (indicated as one or several BigQuery tables), or by
+     * extrapolating from the distribution of values in the input dataset.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsFieldBuilder(); + getAuxiliaryTablesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsBuilder_.clear(); + } + regionCode_ = ""; + + if (auxiliaryTablesBuilder_ == null) { + auxiliaryTables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + auxiliaryTablesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig build() { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig(this); + int from_bitField0_ = bitField0_; + if (quasiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIds_ = quasiIds_; + } else { + result.quasiIds_ = quasiIdsBuilder_.build(); + } + result.regionCode_ = regionCode_; + if (auxiliaryTablesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.auxiliaryTables_ = auxiliaryTables_; + } else { + result.auxiliaryTables_ = auxiliaryTablesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance()) return this; + if (quasiIdsBuilder_ == null) { + if (!other.quasiIds_.isEmpty()) { + if (quasiIds_.isEmpty()) { + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsIsMutable(); + quasiIds_.addAll(other.quasiIds_); + } + onChanged(); + } + } else { + if (!other.quasiIds_.isEmpty()) { + if (quasiIdsBuilder_.isEmpty()) { + quasiIdsBuilder_.dispose(); + quasiIdsBuilder_ = null; + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsFieldBuilder() : null; + } else { + quasiIdsBuilder_.addAllMessages(other.quasiIds_); + } + } + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + onChanged(); + } + if (auxiliaryTablesBuilder_ == null) { + if (!other.auxiliaryTables_.isEmpty()) { + if (auxiliaryTables_.isEmpty()) { + auxiliaryTables_ = other.auxiliaryTables_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.addAll(other.auxiliaryTables_); + } + onChanged(); + } + } else { + if (!other.auxiliaryTables_.isEmpty()) { + if (auxiliaryTablesBuilder_.isEmpty()) { + auxiliaryTablesBuilder_.dispose(); + auxiliaryTablesBuilder_ = null; + auxiliaryTables_ = other.auxiliaryTables_; + bitField0_ = (bitField0_ & ~0x00000002); + auxiliaryTablesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAuxiliaryTablesFieldBuilder() : null; + } else { + auxiliaryTablesBuilder_.addAllMessages(other.auxiliaryTables_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIds_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(quasiIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder> quasiIdsBuilder_; + + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getQuasiIdsList() { + if (quasiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIds_); + } else { + return quasiIdsBuilder_.getMessageList(); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getQuasiIdsCount() { + if (quasiIdsBuilder_ == null) { + return quasiIds_.size(); + } else { + return quasiIdsBuilder_.getCount(); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); + } else { + return quasiIdsBuilder_.getMessage(index); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, value); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllQuasiIds( + java.lang.Iterable values) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIds_); + onChanged(); + } else { + quasiIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearQuasiIds() { + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsBuilder_.clear(); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.remove(index); + onChanged(); + } else { + quasiIdsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder getQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().getBuilder(index); + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder getQuasiIdsOrBuilder( + int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); } else { + return quasiIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + if (quasiIdsBuilder_ != null) { + return quasiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIds_); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder addQuasiIdsBuilder() { + return getQuasiIdsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.getDefaultInstance()); + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder addQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.getDefaultInstance()); + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two columns can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getQuasiIdsBuilderList() { + return getQuasiIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder> + getQuasiIdsFieldBuilder() { + if (quasiIdsBuilder_ == null) { + quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder>( + quasiIds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIds_ = null; + } + return quasiIdsBuilder_; + } + + private java.lang.Object regionCode_ = ""; + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString + getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + regionCode_ = value; + onChanged(); + return this; + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + + regionCode_ = getDefaultInstance().getRegionCode(); + onChanged(); + return this; + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + regionCode_ = value; + onChanged(); + return this; + } + + private java.util.List auxiliaryTables_ = + java.util.Collections.emptyList(); + private void ensureAuxiliaryTablesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + auxiliaryTables_ = new java.util.ArrayList(auxiliaryTables_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder> auxiliaryTablesBuilder_; + + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public java.util.List getAuxiliaryTablesList() { + if (auxiliaryTablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(auxiliaryTables_); + } else { + return auxiliaryTablesBuilder_.getMessageList(); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public int getAuxiliaryTablesCount() { + if (auxiliaryTablesBuilder_ == null) { + return auxiliaryTables_.size(); + } else { + return auxiliaryTablesBuilder_.getCount(); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getAuxiliaryTables(int index) { + if (auxiliaryTablesBuilder_ == null) { + return auxiliaryTables_.get(index); + } else { + return auxiliaryTablesBuilder_.getMessage(index); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public Builder setAuxiliaryTables( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable value) { + if (auxiliaryTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.set(index, value); + onChanged(); + } else { + auxiliaryTablesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public Builder setAuxiliaryTables( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder builderForValue) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.set(index, builderForValue.build()); + onChanged(); + } else { + auxiliaryTablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable value) { + if (auxiliaryTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(value); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable value) { + if (auxiliaryTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(index, value); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder builderForValue) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(builderForValue.build()); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables( + int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder builderForValue) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(index, builderForValue.build()); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public Builder addAllAuxiliaryTables( + java.lang.Iterable values) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, auxiliaryTables_); + onChanged(); + } else { + auxiliaryTablesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public Builder clearAuxiliaryTables() { + if (auxiliaryTablesBuilder_ == null) { + auxiliaryTables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + auxiliaryTablesBuilder_.clear(); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public Builder removeAuxiliaryTables(int index) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.remove(index); + onChanged(); + } else { + auxiliaryTablesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder getAuxiliaryTablesBuilder( + int index) { + return getAuxiliaryTablesFieldBuilder().getBuilder(index); + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder getAuxiliaryTablesOrBuilder( + int index) { + if (auxiliaryTablesBuilder_ == null) { + return auxiliaryTables_.get(index); } else { + return auxiliaryTablesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public java.util.List + getAuxiliaryTablesOrBuilderList() { + if (auxiliaryTablesBuilder_ != null) { + return auxiliaryTablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(auxiliaryTables_); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder addAuxiliaryTablesBuilder() { + return getAuxiliaryTablesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.getDefaultInstance()); + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder addAuxiliaryTablesBuilder( + int index) { + return getAuxiliaryTablesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.getDefaultInstance()); + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers column must appear in exactly one column
+       * of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; + */ + public java.util.List + getAuxiliaryTablesBuilderList() { + return getAuxiliaryTablesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder> + getAuxiliaryTablesFieldBuilder() { + if (auxiliaryTablesBuilder_ == null) { + auxiliaryTablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder>( + auxiliaryTables_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + auxiliaryTables_ = null; + } + return auxiliaryTablesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) + private static final com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KMapEstimationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KMapEstimationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeltaPresenceEstimationConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getQuasiIdsList(); + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.QuasiId getQuasiIds(int index); + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getQuasiIdsCount(); + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getQuasiIdsOrBuilderList(); + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.QuasiIdOrBuilder getQuasiIdsOrBuilder( + int index); + + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Set if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Set if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString + getRegionCodeBytes(); + + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + java.util.List + getAuxiliaryTablesList(); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + com.google.privacy.dlp.v2.StatisticalTable getAuxiliaryTables(int index); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + int getAuxiliaryTablesCount(); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + java.util.List + getAuxiliaryTablesOrBuilderList(); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + com.google.privacy.dlp.v2.StatisticalTableOrBuilder getAuxiliaryTablesOrBuilder( + int index); + } + /** + *
+   * δ-presence metric, used to estimate how likely it is for an attacker to
+   * figure out that one given individual appears in a de-identified dataset.
+   * Similarly to the k-map metric, we cannot compute δ-presence exactly without
+   * knowing the attack dataset, so we use a statistical model instead.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} + */ + public static final class DeltaPresenceEstimationConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + DeltaPresenceEstimationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeltaPresenceEstimationConfig.newBuilder() to construct. + private DeltaPresenceEstimationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeltaPresenceEstimationConfig() { + quasiIds_ = java.util.Collections.emptyList(); + regionCode_ = ""; + auxiliaryTables_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeltaPresenceEstimationConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeltaPresenceEstimationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIds_.add( + input.readMessage(com.google.privacy.dlp.v2.QuasiId.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + regionCode_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + auxiliaryTables_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + auxiliaryTables_.add( + input.readMessage(com.google.privacy.dlp.v2.StatisticalTable.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder.class); + } + + public static final int QUASI_IDS_FIELD_NUMBER = 1; + private java.util.List quasiIds_; + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getQuasiIdsList() { + return quasiIds_; + } + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getQuasiIdsOrBuilderList() { + return quasiIds_; + } + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getQuasiIdsCount() { + return quasiIds_.size(); + } + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.QuasiId getQuasiIds(int index) { + return quasiIds_.get(index); + } + /** + *
+     * Required. Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag.
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.QuasiIdOrBuilder getQuasiIdsOrBuilder( + int index) { + return quasiIds_.get(index); + } + + public static final int REGION_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object regionCode_; + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Set if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } + } + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Set if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUXILIARY_TABLES_FIELD_NUMBER = 3; + private java.util.List auxiliaryTables_; + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + @java.lang.Override + public java.util.List getAuxiliaryTablesList() { + return auxiliaryTables_; + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + @java.lang.Override + public java.util.List + getAuxiliaryTablesOrBuilderList() { + return auxiliaryTables_; + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + @java.lang.Override + public int getAuxiliaryTablesCount() { + return auxiliaryTables_.size(); + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable getAuxiliaryTables(int index) { + return auxiliaryTables_.get(index); + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTableOrBuilder getAuxiliaryTablesOrBuilder( + int index) { + return auxiliaryTables_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIds_.size(); i++) { + output.writeMessage(1, quasiIds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regionCode_); + } + for (int i = 0; i < auxiliaryTables_.size(); i++) { + output.writeMessage(3, auxiliaryTables_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, regionCode_); + } + for (int i = 0; i < auxiliaryTables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, auxiliaryTables_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) obj; + + if (!getQuasiIdsList() + .equals(other.getQuasiIdsList())) return false; + if (!getRegionCode() + .equals(other.getRegionCode())) return false; + if (!getAuxiliaryTablesList() + .equals(other.getAuxiliaryTablesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsCount() > 0) { + hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsList().hashCode(); + } + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + if (getAuxiliaryTablesCount() > 0) { + hash = (37 * hash) + AUXILIARY_TABLES_FIELD_NUMBER; + hash = (53 * hash) + getAuxiliaryTablesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * δ-presence metric, used to estimate how likely it is for an attacker to
+     * figure out that one given individual appears in a de-identified dataset.
+     * Similarly to the k-map metric, we cannot compute δ-presence exactly without
+     * knowing the attack dataset, so we use a statistical model instead.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsFieldBuilder(); + getAuxiliaryTablesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsBuilder_.clear(); + } + regionCode_ = ""; + + if (auxiliaryTablesBuilder_ == null) { + auxiliaryTables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + auxiliaryTablesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig build() { + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig(this); + int from_bitField0_ = bitField0_; + if (quasiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIds_ = quasiIds_; + } else { + result.quasiIds_ = quasiIdsBuilder_.build(); + } + result.regionCode_ = regionCode_; + if (auxiliaryTablesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.auxiliaryTables_ = auxiliaryTables_; + } else { + result.auxiliaryTables_ = auxiliaryTablesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance()) return this; + if (quasiIdsBuilder_ == null) { + if (!other.quasiIds_.isEmpty()) { + if (quasiIds_.isEmpty()) { + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsIsMutable(); + quasiIds_.addAll(other.quasiIds_); + } + onChanged(); + } + } else { + if (!other.quasiIds_.isEmpty()) { + if (quasiIdsBuilder_.isEmpty()) { + quasiIdsBuilder_.dispose(); + quasiIdsBuilder_ = null; + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsFieldBuilder() : null; + } else { + quasiIdsBuilder_.addAllMessages(other.quasiIds_); + } + } + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + onChanged(); + } + if (auxiliaryTablesBuilder_ == null) { + if (!other.auxiliaryTables_.isEmpty()) { + if (auxiliaryTables_.isEmpty()) { + auxiliaryTables_ = other.auxiliaryTables_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.addAll(other.auxiliaryTables_); + } + onChanged(); + } + } else { + if (!other.auxiliaryTables_.isEmpty()) { + if (auxiliaryTablesBuilder_.isEmpty()) { + auxiliaryTablesBuilder_.dispose(); + auxiliaryTablesBuilder_ = null; + auxiliaryTables_ = other.auxiliaryTables_; + bitField0_ = (bitField0_ & ~0x00000002); + auxiliaryTablesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAuxiliaryTablesFieldBuilder() : null; + } else { + auxiliaryTablesBuilder_.addAllMessages(other.auxiliaryTables_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIds_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(quasiIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.QuasiId, com.google.privacy.dlp.v2.QuasiId.Builder, com.google.privacy.dlp.v2.QuasiIdOrBuilder> quasiIdsBuilder_; + + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getQuasiIdsList() { + if (quasiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIds_); + } else { + return quasiIdsBuilder_.getMessageList(); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getQuasiIdsCount() { + if (quasiIdsBuilder_ == null) { + return quasiIds_.size(); + } else { + return quasiIdsBuilder_.getCount(); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.QuasiId getQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); + } else { + return quasiIdsBuilder_.getMessage(index); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.QuasiId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, value); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.QuasiId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds(com.google.privacy.dlp.v2.QuasiId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.QuasiId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + com.google.privacy.dlp.v2.QuasiId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.QuasiId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllQuasiIds( + java.lang.Iterable values) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIds_); + onChanged(); + } else { + quasiIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearQuasiIds() { + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsBuilder_.clear(); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.remove(index); + onChanged(); + } else { + quasiIdsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.QuasiId.Builder getQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().getBuilder(index); + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.QuasiIdOrBuilder getQuasiIdsOrBuilder( + int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); } else { + return quasiIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + if (quasiIdsBuilder_ != null) { + return quasiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIds_); + } + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.QuasiId.Builder addQuasiIdsBuilder() { + return getQuasiIdsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.QuasiId.getDefaultInstance()); + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.QuasiId.Builder addQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.QuasiId.getDefaultInstance()); + } + /** + *
+       * Required. Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag.
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getQuasiIdsBuilderList() { + return getQuasiIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.QuasiId, com.google.privacy.dlp.v2.QuasiId.Builder, com.google.privacy.dlp.v2.QuasiIdOrBuilder> + getQuasiIdsFieldBuilder() { + if (quasiIdsBuilder_ == null) { + quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.QuasiId, com.google.privacy.dlp.v2.QuasiId.Builder, com.google.privacy.dlp.v2.QuasiIdOrBuilder>( + quasiIds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIds_ = null; + } + return quasiIdsBuilder_; + } + + private java.lang.Object regionCode_ = ""; + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString + getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + regionCode_ = value; + onChanged(); + return this; + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + + regionCode_ = getDefaultInstance().getRegionCode(); + onChanged(); + return this; + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Set if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + regionCode_ = value; + onChanged(); + return this; + } + + private java.util.List auxiliaryTables_ = + java.util.Collections.emptyList(); + private void ensureAuxiliaryTablesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + auxiliaryTables_ = new java.util.ArrayList(auxiliaryTables_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable, com.google.privacy.dlp.v2.StatisticalTable.Builder, com.google.privacy.dlp.v2.StatisticalTableOrBuilder> auxiliaryTablesBuilder_; + + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public java.util.List getAuxiliaryTablesList() { + if (auxiliaryTablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(auxiliaryTables_); + } else { + return auxiliaryTablesBuilder_.getMessageList(); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public int getAuxiliaryTablesCount() { + if (auxiliaryTablesBuilder_ == null) { + return auxiliaryTables_.size(); + } else { + return auxiliaryTablesBuilder_.getCount(); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTable getAuxiliaryTables(int index) { + if (auxiliaryTablesBuilder_ == null) { + return auxiliaryTables_.get(index); + } else { + return auxiliaryTablesBuilder_.getMessage(index); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder setAuxiliaryTables( + int index, com.google.privacy.dlp.v2.StatisticalTable value) { + if (auxiliaryTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.set(index, value); + onChanged(); + } else { + auxiliaryTablesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder setAuxiliaryTables( + int index, com.google.privacy.dlp.v2.StatisticalTable.Builder builderForValue) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.set(index, builderForValue.build()); + onChanged(); + } else { + auxiliaryTablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables(com.google.privacy.dlp.v2.StatisticalTable value) { + if (auxiliaryTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(value); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables( + int index, com.google.privacy.dlp.v2.StatisticalTable value) { + if (auxiliaryTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(index, value); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables( + com.google.privacy.dlp.v2.StatisticalTable.Builder builderForValue) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(builderForValue.build()); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables( + int index, com.google.privacy.dlp.v2.StatisticalTable.Builder builderForValue) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(index, builderForValue.build()); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAllAuxiliaryTables( + java.lang.Iterable values) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, auxiliaryTables_); + onChanged(); + } else { + auxiliaryTablesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder clearAuxiliaryTables() { + if (auxiliaryTablesBuilder_ == null) { + auxiliaryTables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + auxiliaryTablesBuilder_.clear(); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder removeAuxiliaryTables(int index) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.remove(index); + onChanged(); + } else { + auxiliaryTablesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTable.Builder getAuxiliaryTablesBuilder( + int index) { + return getAuxiliaryTablesFieldBuilder().getBuilder(index); + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTableOrBuilder getAuxiliaryTablesOrBuilder( + int index) { + if (auxiliaryTablesBuilder_ == null) { + return auxiliaryTables_.get(index); } else { + return auxiliaryTablesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public java.util.List + getAuxiliaryTablesOrBuilderList() { + if (auxiliaryTablesBuilder_ != null) { + return auxiliaryTablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(auxiliaryTables_); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTable.Builder addAuxiliaryTablesBuilder() { + return getAuxiliaryTablesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance()); + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTable.Builder addAuxiliaryTablesBuilder( + int index) { + return getAuxiliaryTablesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance()); + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public java.util.List + getAuxiliaryTablesBuilderList() { + return getAuxiliaryTablesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable, com.google.privacy.dlp.v2.StatisticalTable.Builder, com.google.privacy.dlp.v2.StatisticalTableOrBuilder> + getAuxiliaryTablesFieldBuilder() { + if (auxiliaryTablesBuilder_ == null) { + auxiliaryTablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable, com.google.privacy.dlp.v2.StatisticalTable.Builder, com.google.privacy.dlp.v2.StatisticalTableOrBuilder>( + auxiliaryTables_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + auxiliaryTables_ = null; + } + return auxiliaryTablesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + private static final com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeltaPresenceEstimationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeltaPresenceEstimationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + NUMERICAL_STATS_CONFIG(1), + CATEGORICAL_STATS_CONFIG(2), + K_ANONYMITY_CONFIG(3), + L_DIVERSITY_CONFIG(4), + K_MAP_ESTIMATION_CONFIG(5), + DELTA_PRESENCE_ESTIMATION_CONFIG(6), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return NUMERICAL_STATS_CONFIG; + case 2: return CATEGORICAL_STATS_CONFIG; + case 3: return K_ANONYMITY_CONFIG; + case 4: return L_DIVERSITY_CONFIG; + case 5: return K_MAP_ESTIMATION_CONFIG; + case 6: return DELTA_PRESENCE_ESTIMATION_CONFIG; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int NUMERICAL_STATS_CONFIG_FIELD_NUMBER = 1; + /** + *
+   * Numerical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + * @return Whether the numericalStatsConfig field is set. + */ + @java.lang.Override + public boolean hasNumericalStatsConfig() { + return typeCase_ == 1; + } + /** + *
+   * Numerical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + * @return The numericalStatsConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getNumericalStatsConfig() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); + } + /** + *
+   * Numerical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder getNumericalStatsConfigOrBuilder() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); + } + + public static final int CATEGORICAL_STATS_CONFIG_FIELD_NUMBER = 2; + /** + *
+   * Categorical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + * @return Whether the categoricalStatsConfig field is set. + */ + @java.lang.Override + public boolean hasCategoricalStatsConfig() { + return typeCase_ == 2; + } + /** + *
+   * Categorical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + * @return The categoricalStatsConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getCategoricalStatsConfig() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); + } + /** + *
+   * Categorical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder getCategoricalStatsConfigOrBuilder() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); + } + + public static final int K_ANONYMITY_CONFIG_FIELD_NUMBER = 3; + /** + *
+   * K-anonymity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + * @return Whether the kAnonymityConfig field is set. + */ + @java.lang.Override + public boolean hasKAnonymityConfig() { + return typeCase_ == 3; + } + /** + *
+   * K-anonymity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + * @return The kAnonymityConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getKAnonymityConfig() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); + } + /** + *
+   * K-anonymity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder getKAnonymityConfigOrBuilder() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); + } + + public static final int L_DIVERSITY_CONFIG_FIELD_NUMBER = 4; + /** + *
+   * l-diversity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + * @return Whether the lDiversityConfig field is set. + */ + @java.lang.Override + public boolean hasLDiversityConfig() { + return typeCase_ == 4; + } + /** + *
+   * l-diversity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + * @return The lDiversityConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getLDiversityConfig() { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); + } + /** + *
+   * l-diversity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder getLDiversityConfigOrBuilder() { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); + } + + public static final int K_MAP_ESTIMATION_CONFIG_FIELD_NUMBER = 5; + /** + *
+   * k-map
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + * @return Whether the kMapEstimationConfig field is set. + */ + @java.lang.Override + public boolean hasKMapEstimationConfig() { + return typeCase_ == 5; + } + /** + *
+   * k-map
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + * @return The kMapEstimationConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getKMapEstimationConfig() { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); + } + /** + *
+   * k-map
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder getKMapEstimationConfigOrBuilder() { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); + } + + public static final int DELTA_PRESENCE_ESTIMATION_CONFIG_FIELD_NUMBER = 6; + /** + *
+   * delta-presence
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + * @return Whether the deltaPresenceEstimationConfig field is set. + */ + @java.lang.Override + public boolean hasDeltaPresenceEstimationConfig() { + return typeCase_ == 6; + } + /** + *
+   * delta-presence
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + * @return The deltaPresenceEstimationConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDeltaPresenceEstimationConfig() { + if (typeCase_ == 6) { + return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + /** + *
+   * delta-presence
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder getDeltaPresenceEstimationConfigOrBuilder() { + if (typeCase_ == 6) { + return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_); + } + if (typeCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_); + } + if (typeCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_); + } + if (typeCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_); + } + if (typeCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_); + } + if (typeCase_ == 6) { + output.writeMessage(6, (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_); + } + if (typeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_); + } + if (typeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_); + } + if (typeCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_); + } + if (typeCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_); + } + if (typeCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric other = (com.google.privacy.dlp.v2.PrivacyMetric) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getNumericalStatsConfig() + .equals(other.getNumericalStatsConfig())) return false; + break; + case 2: + if (!getCategoricalStatsConfig() + .equals(other.getCategoricalStatsConfig())) return false; + break; + case 3: + if (!getKAnonymityConfig() + .equals(other.getKAnonymityConfig())) return false; + break; + case 4: + if (!getLDiversityConfig() + .equals(other.getLDiversityConfig())) return false; + break; + case 5: + if (!getKMapEstimationConfig() + .equals(other.getKMapEstimationConfig())) return false; + break; + case 6: + if (!getDeltaPresenceEstimationConfig() + .equals(other.getDeltaPresenceEstimationConfig())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + NUMERICAL_STATS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNumericalStatsConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + CATEGORICAL_STATS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCategoricalStatsConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + K_ANONYMITY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getKAnonymityConfig().hashCode(); + break; + case 4: + hash = (37 * hash) + L_DIVERSITY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLDiversityConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + K_MAP_ESTIMATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getKMapEstimationConfig().hashCode(); + break; + case 6: + hash = (37 * hash) + DELTA_PRESENCE_ESTIMATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeltaPresenceEstimationConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Privacy metric to compute for reidentification risk analysis.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric) + com.google.privacy.dlp.v2.PrivacyMetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.class, com.google.privacy.dlp.v2.PrivacyMetric.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric build() { + com.google.privacy.dlp.v2.PrivacyMetric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric result = new com.google.privacy.dlp.v2.PrivacyMetric(this); + if (typeCase_ == 1) { + if (numericalStatsConfigBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = numericalStatsConfigBuilder_.build(); + } + } + if (typeCase_ == 2) { + if (categoricalStatsConfigBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = categoricalStatsConfigBuilder_.build(); + } + } + if (typeCase_ == 3) { + if (kAnonymityConfigBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = kAnonymityConfigBuilder_.build(); + } + } + if (typeCase_ == 4) { + if (lDiversityConfigBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = lDiversityConfigBuilder_.build(); + } + } + if (typeCase_ == 5) { + if (kMapEstimationConfigBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = kMapEstimationConfigBuilder_.build(); + } + } + if (typeCase_ == 6) { + if (deltaPresenceEstimationConfigBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = deltaPresenceEstimationConfigBuilder_.build(); + } + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance()) return this; + switch (other.getTypeCase()) { + case NUMERICAL_STATS_CONFIG: { + mergeNumericalStatsConfig(other.getNumericalStatsConfig()); + break; + } + case CATEGORICAL_STATS_CONFIG: { + mergeCategoricalStatsConfig(other.getCategoricalStatsConfig()); + break; + } + case K_ANONYMITY_CONFIG: { + mergeKAnonymityConfig(other.getKAnonymityConfig()); + break; + } + case L_DIVERSITY_CONFIG: { + mergeLDiversityConfig(other.getLDiversityConfig()); + break; + } + case K_MAP_ESTIMATION_CONFIG: { + mergeKMapEstimationConfig(other.getKMapEstimationConfig()); + break; + } + case DELTA_PRESENCE_ESTIMATION_CONFIG: { + mergeDeltaPresenceEstimationConfig(other.getDeltaPresenceEstimationConfig()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder> numericalStatsConfigBuilder_; + /** + *
+     * Numerical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + * @return Whether the numericalStatsConfig field is set. + */ + @java.lang.Override + public boolean hasNumericalStatsConfig() { + return typeCase_ == 1; + } + /** + *
+     * Numerical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + * @return The numericalStatsConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getNumericalStatsConfig() { + if (numericalStatsConfigBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return numericalStatsConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); + } + } + /** + *
+     * Numerical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + public Builder setNumericalStatsConfig(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig value) { + if (numericalStatsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + numericalStatsConfigBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + *
+     * Numerical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + public Builder setNumericalStatsConfig( + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder builderForValue) { + if (numericalStatsConfigBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + numericalStatsConfigBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + *
+     * Numerical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + public Builder mergeNumericalStatsConfig(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig value) { + if (numericalStatsConfigBuilder_ == null) { + if (typeCase_ == 1 && + type_ != com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + numericalStatsConfigBuilder_.mergeFrom(value); + } else { + numericalStatsConfigBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + *
+     * Numerical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + public Builder clearNumericalStatsConfig() { + if (numericalStatsConfigBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + numericalStatsConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Numerical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder getNumericalStatsConfigBuilder() { + return getNumericalStatsConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Numerical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder getNumericalStatsConfigOrBuilder() { + if ((typeCase_ == 1) && (numericalStatsConfigBuilder_ != null)) { + return numericalStatsConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); + } + } + /** + *
+     * Numerical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder> + getNumericalStatsConfigFieldBuilder() { + if (numericalStatsConfigBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); + } + numericalStatsConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder>( + (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged();; + return numericalStatsConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder> categoricalStatsConfigBuilder_; + /** + *
+     * Categorical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + * @return Whether the categoricalStatsConfig field is set. + */ + @java.lang.Override + public boolean hasCategoricalStatsConfig() { + return typeCase_ == 2; + } + /** + *
+     * Categorical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + * @return The categoricalStatsConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getCategoricalStatsConfig() { + if (categoricalStatsConfigBuilder_ == null) { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); + } else { + if (typeCase_ == 2) { + return categoricalStatsConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); + } + } + /** + *
+     * Categorical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + public Builder setCategoricalStatsConfig(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig value) { + if (categoricalStatsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + categoricalStatsConfigBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + /** + *
+     * Categorical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + public Builder setCategoricalStatsConfig( + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder builderForValue) { + if (categoricalStatsConfigBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + categoricalStatsConfigBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 2; + return this; + } + /** + *
+     * Categorical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + public Builder mergeCategoricalStatsConfig(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig value) { + if (categoricalStatsConfigBuilder_ == null) { + if (typeCase_ == 2 && + type_ != com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 2) { + categoricalStatsConfigBuilder_.mergeFrom(value); + } else { + categoricalStatsConfigBuilder_.setMessage(value); + } + } + typeCase_ = 2; + return this; + } + /** + *
+     * Categorical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + public Builder clearCategoricalStatsConfig() { + if (categoricalStatsConfigBuilder_ == null) { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + } + categoricalStatsConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Categorical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder getCategoricalStatsConfigBuilder() { + return getCategoricalStatsConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Categorical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder getCategoricalStatsConfigOrBuilder() { + if ((typeCase_ == 2) && (categoricalStatsConfigBuilder_ != null)) { + return categoricalStatsConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); + } + } + /** + *
+     * Categorical stats
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder> + getCategoricalStatsConfigFieldBuilder() { + if (categoricalStatsConfigBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); + } + categoricalStatsConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder>( + (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 2; + onChanged();; + return categoricalStatsConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder> kAnonymityConfigBuilder_; + /** + *
+     * K-anonymity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + * @return Whether the kAnonymityConfig field is set. + */ + @java.lang.Override + public boolean hasKAnonymityConfig() { + return typeCase_ == 3; + } + /** + *
+     * K-anonymity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + * @return The kAnonymityConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getKAnonymityConfig() { + if (kAnonymityConfigBuilder_ == null) { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); + } else { + if (typeCase_ == 3) { + return kAnonymityConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); + } + } + /** + *
+     * K-anonymity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + public Builder setKAnonymityConfig(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig value) { + if (kAnonymityConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + kAnonymityConfigBuilder_.setMessage(value); + } + typeCase_ = 3; + return this; + } + /** + *
+     * K-anonymity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + public Builder setKAnonymityConfig( + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder builderForValue) { + if (kAnonymityConfigBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + kAnonymityConfigBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 3; + return this; + } + /** + *
+     * K-anonymity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + public Builder mergeKAnonymityConfig(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig value) { + if (kAnonymityConfigBuilder_ == null) { + if (typeCase_ == 3 && + type_ != com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 3) { + kAnonymityConfigBuilder_.mergeFrom(value); + } else { + kAnonymityConfigBuilder_.setMessage(value); + } + } + typeCase_ = 3; + return this; + } + /** + *
+     * K-anonymity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + public Builder clearKAnonymityConfig() { + if (kAnonymityConfigBuilder_ == null) { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + } + kAnonymityConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * K-anonymity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder getKAnonymityConfigBuilder() { + return getKAnonymityConfigFieldBuilder().getBuilder(); + } + /** + *
+     * K-anonymity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder getKAnonymityConfigOrBuilder() { + if ((typeCase_ == 3) && (kAnonymityConfigBuilder_ != null)) { + return kAnonymityConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); + } + } + /** + *
+     * K-anonymity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder> + getKAnonymityConfigFieldBuilder() { + if (kAnonymityConfigBuilder_ == null) { + if (!(typeCase_ == 3)) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); + } + kAnonymityConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder>( + (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 3; + onChanged();; + return kAnonymityConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder> lDiversityConfigBuilder_; + /** + *
+     * l-diversity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + * @return Whether the lDiversityConfig field is set. + */ + @java.lang.Override + public boolean hasLDiversityConfig() { + return typeCase_ == 4; + } + /** + *
+     * l-diversity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + * @return The lDiversityConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getLDiversityConfig() { + if (lDiversityConfigBuilder_ == null) { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); + } else { + if (typeCase_ == 4) { + return lDiversityConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); + } + } + /** + *
+     * l-diversity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + */ + public Builder setLDiversityConfig(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig value) { + if (lDiversityConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + lDiversityConfigBuilder_.setMessage(value); + } + typeCase_ = 4; + return this; + } + /** + *
+     * l-diversity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + */ + public Builder setLDiversityConfig( + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder builderForValue) { + if (lDiversityConfigBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + lDiversityConfigBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 4; + return this; + } + /** + *
+     * l-diversity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + */ + public Builder mergeLDiversityConfig(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig value) { + if (lDiversityConfigBuilder_ == null) { + if (typeCase_ == 4 && + type_ != com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 4) { + lDiversityConfigBuilder_.mergeFrom(value); + } else { + lDiversityConfigBuilder_.setMessage(value); + } + } + typeCase_ = 4; + return this; + } + /** + *
+     * l-diversity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + */ + public Builder clearLDiversityConfig() { + if (lDiversityConfigBuilder_ == null) { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + } + lDiversityConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * l-diversity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder getLDiversityConfigBuilder() { + return getLDiversityConfigFieldBuilder().getBuilder(); + } + /** + *
+     * l-diversity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder getLDiversityConfigOrBuilder() { + if ((typeCase_ == 4) && (lDiversityConfigBuilder_ != null)) { + return lDiversityConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); + } + } + /** + *
+     * l-diversity
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder> + getLDiversityConfigFieldBuilder() { + if (lDiversityConfigBuilder_ == null) { + if (!(typeCase_ == 4)) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); + } + lDiversityConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder>( + (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 4; + onChanged();; + return lDiversityConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder> kMapEstimationConfigBuilder_; + /** + *
+     * k-map
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + * @return Whether the kMapEstimationConfig field is set. + */ + @java.lang.Override + public boolean hasKMapEstimationConfig() { + return typeCase_ == 5; + } + /** + *
+     * k-map
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + * @return The kMapEstimationConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getKMapEstimationConfig() { + if (kMapEstimationConfigBuilder_ == null) { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); + } else { + if (typeCase_ == 5) { + return kMapEstimationConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); + } + } + /** + *
+     * k-map
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + */ + public Builder setKMapEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig value) { + if (kMapEstimationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + kMapEstimationConfigBuilder_.setMessage(value); + } + typeCase_ = 5; + return this; + } + /** + *
+     * k-map
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + */ + public Builder setKMapEstimationConfig( + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder builderForValue) { + if (kMapEstimationConfigBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + kMapEstimationConfigBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 5; + return this; + } + /** + *
+     * k-map
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + */ + public Builder mergeKMapEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig value) { + if (kMapEstimationConfigBuilder_ == null) { + if (typeCase_ == 5 && + type_ != com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 5) { + kMapEstimationConfigBuilder_.mergeFrom(value); + } else { + kMapEstimationConfigBuilder_.setMessage(value); + } + } + typeCase_ = 5; + return this; + } + /** + *
+     * k-map
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + */ + public Builder clearKMapEstimationConfig() { + if (kMapEstimationConfigBuilder_ == null) { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + } + kMapEstimationConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * k-map
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder getKMapEstimationConfigBuilder() { + return getKMapEstimationConfigFieldBuilder().getBuilder(); + } + /** + *
+     * k-map
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder getKMapEstimationConfigOrBuilder() { + if ((typeCase_ == 5) && (kMapEstimationConfigBuilder_ != null)) { + return kMapEstimationConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); + } + } + /** + *
+     * k-map
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder> + getKMapEstimationConfigFieldBuilder() { + if (kMapEstimationConfigBuilder_ == null) { + if (!(typeCase_ == 5)) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); + } + kMapEstimationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder>( + (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 5; + onChanged();; + return kMapEstimationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder> deltaPresenceEstimationConfigBuilder_; + /** + *
+     * delta-presence
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + * @return Whether the deltaPresenceEstimationConfig field is set. + */ + @java.lang.Override + public boolean hasDeltaPresenceEstimationConfig() { + return typeCase_ == 6; + } + /** + *
+     * delta-presence
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + * @return The deltaPresenceEstimationConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDeltaPresenceEstimationConfig() { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (typeCase_ == 6) { + return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } else { + if (typeCase_ == 6) { + return deltaPresenceEstimationConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + } + /** + *
+     * delta-presence
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public Builder setDeltaPresenceEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig value) { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + deltaPresenceEstimationConfigBuilder_.setMessage(value); + } + typeCase_ = 6; + return this; + } + /** + *
+     * delta-presence
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public Builder setDeltaPresenceEstimationConfig( + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder builderForValue) { + if (deltaPresenceEstimationConfigBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + deltaPresenceEstimationConfigBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 6; + return this; + } + /** + *
+     * delta-presence
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public Builder mergeDeltaPresenceEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig value) { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (typeCase_ == 6 && + type_ != com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 6) { + deltaPresenceEstimationConfigBuilder_.mergeFrom(value); + } else { + deltaPresenceEstimationConfigBuilder_.setMessage(value); + } + } + typeCase_ = 6; + return this; + } + /** + *
+     * delta-presence
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public Builder clearDeltaPresenceEstimationConfig() { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (typeCase_ == 6) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 6) { + typeCase_ = 0; + type_ = null; + } + deltaPresenceEstimationConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * delta-presence
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder getDeltaPresenceEstimationConfigBuilder() { + return getDeltaPresenceEstimationConfigFieldBuilder().getBuilder(); + } + /** + *
+     * delta-presence
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder getDeltaPresenceEstimationConfigOrBuilder() { + if ((typeCase_ == 6) && (deltaPresenceEstimationConfigBuilder_ != null)) { + return deltaPresenceEstimationConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 6) { + return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + } + /** + *
+     * delta-presence
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder> + getDeltaPresenceEstimationConfigFieldBuilder() { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (!(typeCase_ == 6)) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + deltaPresenceEstimationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder>( + (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 6; + onChanged();; + return deltaPresenceEstimationConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric) + private static final com.google.privacy.dlp.v2.PrivacyMetric DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivacyMetric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrivacyMetric(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java new file mode 100644 index 000000000000..c04cb76f16b2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java @@ -0,0 +1,173 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface PrivacyMetricOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Numerical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + * @return Whether the numericalStatsConfig field is set. + */ + boolean hasNumericalStatsConfig(); + /** + *
+   * Numerical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + * @return The numericalStatsConfig. + */ + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getNumericalStatsConfig(); + /** + *
+   * Numerical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder getNumericalStatsConfigOrBuilder(); + + /** + *
+   * Categorical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + * @return Whether the categoricalStatsConfig field is set. + */ + boolean hasCategoricalStatsConfig(); + /** + *
+   * Categorical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + * @return The categoricalStatsConfig. + */ + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getCategoricalStatsConfig(); + /** + *
+   * Categorical stats
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder getCategoricalStatsConfigOrBuilder(); + + /** + *
+   * K-anonymity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + * @return Whether the kAnonymityConfig field is set. + */ + boolean hasKAnonymityConfig(); + /** + *
+   * K-anonymity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + * @return The kAnonymityConfig. + */ + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getKAnonymityConfig(); + /** + *
+   * K-anonymity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder getKAnonymityConfigOrBuilder(); + + /** + *
+   * l-diversity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + * @return Whether the lDiversityConfig field is set. + */ + boolean hasLDiversityConfig(); + /** + *
+   * l-diversity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + * @return The lDiversityConfig. + */ + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getLDiversityConfig(); + /** + *
+   * l-diversity
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + */ + com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder getLDiversityConfigOrBuilder(); + + /** + *
+   * k-map
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + * @return Whether the kMapEstimationConfig field is set. + */ + boolean hasKMapEstimationConfig(); + /** + *
+   * k-map
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + * @return The kMapEstimationConfig. + */ + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getKMapEstimationConfig(); + /** + *
+   * k-map
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; + */ + com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder getKMapEstimationConfigOrBuilder(); + + /** + *
+   * delta-presence
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + * @return Whether the deltaPresenceEstimationConfig field is set. + */ + boolean hasDeltaPresenceEstimationConfig(); + /** + *
+   * delta-presence
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + * @return The deltaPresenceEstimationConfig. + */ + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDeltaPresenceEstimationConfig(); + /** + *
+   * delta-presence
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder getDeltaPresenceEstimationConfigOrBuilder(); + + public com.google.privacy.dlp.v2.PrivacyMetric.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatus.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatus.java new file mode 100644 index 000000000000..5bac3337de68 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatus.java @@ -0,0 +1,893 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + * Protobuf type {@code google.privacy.dlp.v2.ProfileStatus} + */ +public final class ProfileStatus extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ProfileStatus) + ProfileStatusOrBuilder { +private static final long serialVersionUID = 0L; + // Use ProfileStatus.newBuilder() to construct. + private ProfileStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProfileStatus() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProfileStatus(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ProfileStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (timestamp_ != null) { + subBuilder = timestamp_.toBuilder(); + } + timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timestamp_); + timestamp_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ProfileStatus.class, com.google.privacy.dlp.v2.ProfileStatus.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 1; + private com.google.rpc.Status status_; + /** + *
+   * Profiling status code and optional message
+   * 
+ * + * .google.rpc.Status status = 1; + * @return Whether the status field is set. + */ + @java.lang.Override + public boolean hasStatus() { + return status_ != null; + } + /** + *
+   * Profiling status code and optional message
+   * 
+ * + * .google.rpc.Status status = 1; + * @return The status. + */ + @java.lang.Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + *
+   * Profiling status code and optional message
+   * 
+ * + * .google.rpc.Status status = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp timestamp_; + /** + *
+   * Time when the profile generation status was updated
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + *
+   * Time when the profile generation status was updated
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + *
+   * Time when the profile generation status was updated
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return getTimestamp(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (status_ != null) { + output.writeMessage(1, getStatus()); + } + if (timestamp_ != null) { + output.writeMessage(3, getTimestamp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStatus()); + } + if (timestamp_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTimestamp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ProfileStatus)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ProfileStatus other = (com.google.privacy.dlp.v2.ProfileStatus) obj; + + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus() + .equals(other.getStatus())) return false; + } + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp() + .equals(other.getTimestamp())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ProfileStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.privacy.dlp.v2.ProfileStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ProfileStatus) + com.google.privacy.dlp.v2.ProfileStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ProfileStatus.class, com.google.privacy.dlp.v2.ProfileStatus.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ProfileStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + if (timestampBuilder_ == null) { + timestamp_ = null; + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ProfileStatus getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ProfileStatus build() { + com.google.privacy.dlp.v2.ProfileStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ProfileStatus buildPartial() { + com.google.privacy.dlp.v2.ProfileStatus result = new com.google.privacy.dlp.v2.ProfileStatus(this); + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + if (timestampBuilder_ == null) { + result.timestamp_ = timestamp_; + } else { + result.timestamp_ = timestampBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ProfileStatus) { + return mergeFrom((com.google.privacy.dlp.v2.ProfileStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ProfileStatus other) { + if (other == com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance()) return this; + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ProfileStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ProfileStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; + /** + *
+     * Profiling status code and optional message
+     * 
+ * + * .google.rpc.Status status = 1; + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + *
+     * Profiling status code and optional message
+     * 
+ * + * .google.rpc.Status status = 1; + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + *
+     * Profiling status code and optional message
+     * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Profiling status code and optional message
+     * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder setStatus( + com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Profiling status code and optional message
+     * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = + com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Profiling status code and optional message
+     * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + *
+     * Profiling status code and optional message
+     * 
+ * + * .google.rpc.Status status = 1; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+     * Profiling status code and optional message
+     * 
+ * + * .google.rpc.Status status = 1; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + *
+     * Profiling status code and optional message
+     * 
+ * + * .google.rpc.Status status = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_; + /** + *
+     * Time when the profile generation status was updated
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return timestampBuilder_ != null || timestamp_ != null; + } + /** + *
+     * Time when the profile generation status was updated
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + /** + *
+     * Time when the profile generation status was updated
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + onChanged(); + } else { + timestampBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time when the profile generation status was updated
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + */ + public Builder setTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + onChanged(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time when the profile generation status was updated
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (timestamp_ != null) { + timestamp_ = + com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + onChanged(); + } else { + timestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time when the profile generation status was updated
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + */ + public Builder clearTimestamp() { + if (timestampBuilder_ == null) { + timestamp_ = null; + onChanged(); + } else { + timestamp_ = null; + timestampBuilder_ = null; + } + + return this; + } + /** + *
+     * Time when the profile generation status was updated
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + + onChanged(); + return getTimestampFieldBuilder().getBuilder(); + } + /** + *
+     * Time when the profile generation status was updated
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + /** + *
+     * Time when the profile generation status was updated
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), + getParentForChildren(), + isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ProfileStatus) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ProfileStatus) + private static final com.google.privacy.dlp.v2.ProfileStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ProfileStatus(); + } + + public static com.google.privacy.dlp.v2.ProfileStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProfileStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProfileStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ProfileStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatusOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatusOrBuilder.java new file mode 100644 index 000000000000..f2752c9f48d7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatusOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ProfileStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ProfileStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Profiling status code and optional message
+   * 
+ * + * .google.rpc.Status status = 1; + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + *
+   * Profiling status code and optional message
+   * 
+ * + * .google.rpc.Status status = 1; + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + *
+   * Profiling status code and optional message
+   * 
+ * + * .google.rpc.Status status = 1; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + *
+   * Time when the profile generation status was updated
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + *
+   * Time when the profile generation status was updated
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + /** + *
+   * Time when the profile generation status was updated
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 3; + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectName.java new file mode 100644 index 000000000000..7f3c373f382b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProjectName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected ProjectName() { + project = null; + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProjectName that = ((ProjectName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(ProjectName projectName) { + this.project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java new file mode 100644 index 000000000000..07dea059bf4a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java @@ -0,0 +1,1554 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A column with a semantic tag attached.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.QuasiId} + */ +public final class QuasiId extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.QuasiId) + QuasiIdOrBuilder { +private static final long serialVersionUID = 0L; + // Use QuasiId.newBuilder() to construct. + private QuasiId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QuasiId() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QuasiId(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QuasiId( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (tagCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.InfoType) tag_).toBuilder(); + } + tag_ = + input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoType) tag_); + tag_ = subBuilder.buildPartial(); + } + tagCase_ = 2; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + tagCase_ = 3; + tag_ = s; + break; + } + case 34: { + com.google.protobuf.Empty.Builder subBuilder = null; + if (tagCase_ == 4) { + subBuilder = ((com.google.protobuf.Empty) tag_).toBuilder(); + } + tag_ = + input.readMessage(com.google.protobuf.Empty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Empty) tag_); + tag_ = subBuilder.buildPartial(); + } + tagCase_ = 4; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.QuasiId.class, com.google.privacy.dlp.v2.QuasiId.Builder.class); + } + + private int tagCase_ = 0; + private java.lang.Object tag_; + public enum TagCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INFO_TYPE(2), + CUSTOM_TAG(3), + INFERRED(4), + TAG_NOT_SET(0); + private final int value; + private TagCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TagCase valueOf(int value) { + return forNumber(value); + } + + public static TagCase forNumber(int value) { + switch (value) { + case 2: return INFO_TYPE; + case 3: return CUSTOM_TAG; + case 4: return INFERRED; + case 0: return TAG_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TagCase + getTagCase() { + return TagCase.forNumber( + tagCase_); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+   * Required. Identifies the column.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+   * Required. Identifies the column.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+   * Required. Identifies the column.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int INFO_TYPE_FIELD_NUMBER = 2; + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return tagCase_ == 2; + } + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + + public static final int CUSTOM_TAG_FIELD_NUMBER = 3; + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + * @return Whether the customTag field is set. + */ + public boolean hasCustomTag() { + return tagCase_ == 3; + } + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + * @return The customTag. + */ + public java.lang.String getCustomTag() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (tagCase_ == 3) { + tag_ = s; + } + return s; + } + } + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + * @return The bytes for customTag. + */ + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (tagCase_ == 3) { + tag_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFERRED_FIELD_NUMBER = 4; + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return Whether the inferred field is set. + */ + @java.lang.Override + public boolean hasInferred() { + return tagCase_ == 4; + } + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return The inferred. + */ + @java.lang.Override + public com.google.protobuf.Empty getInferred() { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + @java.lang.Override + public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (tagCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.InfoType) tag_); + } + if (tagCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tag_); + } + if (tagCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Empty) tag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + if (tagCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.InfoType) tag_); + } + if (tagCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tag_); + } + if (tagCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.protobuf.Empty) tag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.QuasiId)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.QuasiId other = (com.google.privacy.dlp.v2.QuasiId) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!getTagCase().equals(other.getTagCase())) return false; + switch (tagCase_) { + case 2: + if (!getInfoType() + .equals(other.getInfoType())) return false; + break; + case 3: + if (!getCustomTag() + .equals(other.getCustomTag())) return false; + break; + case 4: + if (!getInferred() + .equals(other.getInferred())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + switch (tagCase_) { + case 2: + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + break; + case 3: + hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; + hash = (53 * hash) + getCustomTag().hashCode(); + break; + case 4: + hash = (37 * hash) + INFERRED_FIELD_NUMBER; + hash = (53 * hash) + getInferred().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuasiId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.QuasiId parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.QuasiId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A column with a semantic tag attached.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.QuasiId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.QuasiId) + com.google.privacy.dlp.v2.QuasiIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.QuasiId.class, com.google.privacy.dlp.v2.QuasiId.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.QuasiId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + tagCase_ = 0; + tag_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.QuasiId getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.QuasiId.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.QuasiId build() { + com.google.privacy.dlp.v2.QuasiId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.QuasiId buildPartial() { + com.google.privacy.dlp.v2.QuasiId result = new com.google.privacy.dlp.v2.QuasiId(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + if (tagCase_ == 2) { + if (infoTypeBuilder_ == null) { + result.tag_ = tag_; + } else { + result.tag_ = infoTypeBuilder_.build(); + } + } + if (tagCase_ == 3) { + result.tag_ = tag_; + } + if (tagCase_ == 4) { + if (inferredBuilder_ == null) { + result.tag_ = tag_; + } else { + result.tag_ = inferredBuilder_.build(); + } + } + result.tagCase_ = tagCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.QuasiId) { + return mergeFrom((com.google.privacy.dlp.v2.QuasiId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.QuasiId other) { + if (other == com.google.privacy.dlp.v2.QuasiId.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + switch (other.getTagCase()) { + case INFO_TYPE: { + mergeInfoType(other.getInfoType()); + break; + } + case CUSTOM_TAG: { + tagCase_ = 3; + tag_ = other.tag_; + onChanged(); + break; + } + case INFERRED: { + mergeInferred(other.getInferred()); + break; + } + case TAG_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.QuasiId parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.QuasiId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int tagCase_ = 0; + private java.lang.Object tag_; + public TagCase + getTagCase() { + return TagCase.forNumber( + tagCase_); + } + + public Builder clearTag() { + tagCase_ = 0; + tag_ = null; + onChanged(); + return this; + } + + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+     * Required. Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+     * Required. Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+     * Required. Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+     * Required. Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return tagCase_ == 2; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } else { + if (tagCase_ == 2) { + return infoTypeBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + tagCase_ = 2; + return this; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + tag_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + tagCase_ = 2; + return this; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (tagCase_ == 2 && + tag_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) { + tag_ = com.google.privacy.dlp.v2.InfoType.newBuilder((com.google.privacy.dlp.v2.InfoType) tag_) + .mergeFrom(value).buildPartial(); + } else { + tag_ = value; + } + onChanged(); + } else { + if (tagCase_ == 2) { + infoTypeBuilder_.mergeFrom(value); + } else { + infoTypeBuilder_.setMessage(value); + } + } + tagCase_ = 2; + return this; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + if (tagCase_ == 2) { + tagCase_ = 0; + tag_ = null; + onChanged(); + } + } else { + if (tagCase_ == 2) { + tagCase_ = 0; + tag_ = null; + } + infoTypeBuilder_.clear(); + } + return this; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if ((tagCase_ == 2) && (infoTypeBuilder_ != null)) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + if (!(tagCase_ == 2)) { + tag_ = com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + (com.google.privacy.dlp.v2.InfoType) tag_, + getParentForChildren(), + isClean()); + tag_ = null; + } + tagCase_ = 2; + onChanged();; + return infoTypeBuilder_; + } + + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + * @return Whether the customTag field is set. + */ + @java.lang.Override + public boolean hasCustomTag() { + return tagCase_ == 3; + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + * @return The customTag. + */ + @java.lang.Override + public java.lang.String getCustomTag() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (tagCase_ == 3) { + tag_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + * @return The bytes for customTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (tagCase_ == 3) { + tag_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + * @param value The customTag to set. + * @return This builder for chaining. + */ + public Builder setCustomTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tagCase_ = 3; + tag_ = value; + onChanged(); + return this; + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + * @return This builder for chaining. + */ + public Builder clearCustomTag() { + if (tagCase_ == 3) { + tagCase_ = 0; + tag_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + * @param value The bytes for customTag to set. + * @return This builder for chaining. + */ + public Builder setCustomTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tagCase_ = 3; + tag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> inferredBuilder_; + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return Whether the inferred field is set. + */ + @java.lang.Override + public boolean hasInferred() { + return tagCase_ == 4; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return The inferred. + */ + @java.lang.Override + public com.google.protobuf.Empty getInferred() { + if (inferredBuilder_ == null) { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } else { + if (tagCase_ == 4) { + return inferredBuilder_.getMessage(); + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder setInferred(com.google.protobuf.Empty value) { + if (inferredBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + onChanged(); + } else { + inferredBuilder_.setMessage(value); + } + tagCase_ = 4; + return this; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder setInferred( + com.google.protobuf.Empty.Builder builderForValue) { + if (inferredBuilder_ == null) { + tag_ = builderForValue.build(); + onChanged(); + } else { + inferredBuilder_.setMessage(builderForValue.build()); + } + tagCase_ = 4; + return this; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder mergeInferred(com.google.protobuf.Empty value) { + if (inferredBuilder_ == null) { + if (tagCase_ == 4 && + tag_ != com.google.protobuf.Empty.getDefaultInstance()) { + tag_ = com.google.protobuf.Empty.newBuilder((com.google.protobuf.Empty) tag_) + .mergeFrom(value).buildPartial(); + } else { + tag_ = value; + } + onChanged(); + } else { + if (tagCase_ == 4) { + inferredBuilder_.mergeFrom(value); + } else { + inferredBuilder_.setMessage(value); + } + } + tagCase_ = 4; + return this; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder clearInferred() { + if (inferredBuilder_ == null) { + if (tagCase_ == 4) { + tagCase_ = 0; + tag_ = null; + onChanged(); + } + } else { + if (tagCase_ == 4) { + tagCase_ = 0; + tag_ = null; + } + inferredBuilder_.clear(); + } + return this; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public com.google.protobuf.Empty.Builder getInferredBuilder() { + return getInferredFieldBuilder().getBuilder(); + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + @java.lang.Override + public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { + if ((tagCase_ == 4) && (inferredBuilder_ != null)) { + return inferredBuilder_.getMessageOrBuilder(); + } else { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> + getInferredFieldBuilder() { + if (inferredBuilder_ == null) { + if (!(tagCase_ == 4)) { + tag_ = com.google.protobuf.Empty.getDefaultInstance(); + } + inferredBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder>( + (com.google.protobuf.Empty) tag_, + getParentForChildren(), + isClean()); + tag_ = null; + } + tagCase_ = 4; + onChanged();; + return inferredBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.QuasiId) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.QuasiId) + private static final com.google.privacy.dlp.v2.QuasiId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.QuasiId(); + } + + public static com.google.privacy.dlp.v2.QuasiId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QuasiId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QuasiId(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.QuasiId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java new file mode 100644 index 000000000000..93fb5b0c4a7b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java @@ -0,0 +1,142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface QuasiIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.QuasiId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Identifies the column.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+   * Required. Identifies the column.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+   * Required. Identifies the column.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + * @return Whether the customTag field is set. + */ + boolean hasCustomTag(); + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + * @return The customTag. + */ + java.lang.String getCustomTag(); + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + * @return The bytes for customTag. + */ + com.google.protobuf.ByteString + getCustomTagBytes(); + + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return Whether the inferred field is set. + */ + boolean hasInferred(); + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + * @return The inferred. + */ + com.google.protobuf.Empty getInferred(); + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + com.google.protobuf.EmptyOrBuilder getInferredOrBuilder(); + + public com.google.privacy.dlp.v2.QuasiId.TagCase getTagCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfo.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfo.java new file mode 100644 index 000000000000..0eb3ee796617 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfo.java @@ -0,0 +1,761 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Message for infoType-dependent details parsed from quote.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.QuoteInfo} + */ +public final class QuoteInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.QuoteInfo) + QuoteInfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use QuoteInfo.newBuilder() to construct. + private QuoteInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QuoteInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QuoteInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QuoteInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + com.google.privacy.dlp.v2.DateTime.Builder subBuilder = null; + if (parsedQuoteCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.DateTime) parsedQuote_).toBuilder(); + } + parsedQuote_ = + input.readMessage(com.google.privacy.dlp.v2.DateTime.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.DateTime) parsedQuote_); + parsedQuote_ = subBuilder.buildPartial(); + } + parsedQuoteCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.QuoteInfo.class, com.google.privacy.dlp.v2.QuoteInfo.Builder.class); + } + + private int parsedQuoteCase_ = 0; + private java.lang.Object parsedQuote_; + public enum ParsedQuoteCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATE_TIME(2), + PARSEDQUOTE_NOT_SET(0); + private final int value; + private ParsedQuoteCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ParsedQuoteCase valueOf(int value) { + return forNumber(value); + } + + public static ParsedQuoteCase forNumber(int value) { + switch (value) { + case 2: return DATE_TIME; + case 0: return PARSEDQUOTE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ParsedQuoteCase + getParsedQuoteCase() { + return ParsedQuoteCase.forNumber( + parsedQuoteCase_); + } + + public static final int DATE_TIME_FIELD_NUMBER = 2; + /** + *
+   * The date time indicated by the quote.
+   * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + * @return Whether the dateTime field is set. + */ + @java.lang.Override + public boolean hasDateTime() { + return parsedQuoteCase_ == 2; + } + /** + *
+   * The date time indicated by the quote.
+   * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + * @return The dateTime. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime getDateTime() { + if (parsedQuoteCase_ == 2) { + return (com.google.privacy.dlp.v2.DateTime) parsedQuote_; + } + return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); + } + /** + *
+   * The date time indicated by the quote.
+   * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateTimeOrBuilder getDateTimeOrBuilder() { + if (parsedQuoteCase_ == 2) { + return (com.google.privacy.dlp.v2.DateTime) parsedQuote_; + } + return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (parsedQuoteCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.DateTime) parsedQuote_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (parsedQuoteCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.DateTime) parsedQuote_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.QuoteInfo)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.QuoteInfo other = (com.google.privacy.dlp.v2.QuoteInfo) obj; + + if (!getParsedQuoteCase().equals(other.getParsedQuoteCase())) return false; + switch (parsedQuoteCase_) { + case 2: + if (!getDateTime() + .equals(other.getDateTime())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (parsedQuoteCase_) { + case 2: + hash = (37 * hash) + DATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDateTime().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.QuoteInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Message for infoType-dependent details parsed from quote.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.QuoteInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.QuoteInfo) + com.google.privacy.dlp.v2.QuoteInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.QuoteInfo.class, com.google.privacy.dlp.v2.QuoteInfo.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.QuoteInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parsedQuoteCase_ = 0; + parsedQuote_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.QuoteInfo getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.QuoteInfo build() { + com.google.privacy.dlp.v2.QuoteInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.QuoteInfo buildPartial() { + com.google.privacy.dlp.v2.QuoteInfo result = new com.google.privacy.dlp.v2.QuoteInfo(this); + if (parsedQuoteCase_ == 2) { + if (dateTimeBuilder_ == null) { + result.parsedQuote_ = parsedQuote_; + } else { + result.parsedQuote_ = dateTimeBuilder_.build(); + } + } + result.parsedQuoteCase_ = parsedQuoteCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.QuoteInfo) { + return mergeFrom((com.google.privacy.dlp.v2.QuoteInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.QuoteInfo other) { + if (other == com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance()) return this; + switch (other.getParsedQuoteCase()) { + case DATE_TIME: { + mergeDateTime(other.getDateTime()); + break; + } + case PARSEDQUOTE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.QuoteInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.QuoteInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int parsedQuoteCase_ = 0; + private java.lang.Object parsedQuote_; + public ParsedQuoteCase + getParsedQuoteCase() { + return ParsedQuoteCase.forNumber( + parsedQuoteCase_); + } + + public Builder clearParsedQuote() { + parsedQuoteCase_ = 0; + parsedQuote_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DateTime, com.google.privacy.dlp.v2.DateTime.Builder, com.google.privacy.dlp.v2.DateTimeOrBuilder> dateTimeBuilder_; + /** + *
+     * The date time indicated by the quote.
+     * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + * @return Whether the dateTime field is set. + */ + @java.lang.Override + public boolean hasDateTime() { + return parsedQuoteCase_ == 2; + } + /** + *
+     * The date time indicated by the quote.
+     * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + * @return The dateTime. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateTime getDateTime() { + if (dateTimeBuilder_ == null) { + if (parsedQuoteCase_ == 2) { + return (com.google.privacy.dlp.v2.DateTime) parsedQuote_; + } + return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); + } else { + if (parsedQuoteCase_ == 2) { + return dateTimeBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); + } + } + /** + *
+     * The date time indicated by the quote.
+     * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + */ + public Builder setDateTime(com.google.privacy.dlp.v2.DateTime value) { + if (dateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + parsedQuote_ = value; + onChanged(); + } else { + dateTimeBuilder_.setMessage(value); + } + parsedQuoteCase_ = 2; + return this; + } + /** + *
+     * The date time indicated by the quote.
+     * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + */ + public Builder setDateTime( + com.google.privacy.dlp.v2.DateTime.Builder builderForValue) { + if (dateTimeBuilder_ == null) { + parsedQuote_ = builderForValue.build(); + onChanged(); + } else { + dateTimeBuilder_.setMessage(builderForValue.build()); + } + parsedQuoteCase_ = 2; + return this; + } + /** + *
+     * The date time indicated by the quote.
+     * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + */ + public Builder mergeDateTime(com.google.privacy.dlp.v2.DateTime value) { + if (dateTimeBuilder_ == null) { + if (parsedQuoteCase_ == 2 && + parsedQuote_ != com.google.privacy.dlp.v2.DateTime.getDefaultInstance()) { + parsedQuote_ = com.google.privacy.dlp.v2.DateTime.newBuilder((com.google.privacy.dlp.v2.DateTime) parsedQuote_) + .mergeFrom(value).buildPartial(); + } else { + parsedQuote_ = value; + } + onChanged(); + } else { + if (parsedQuoteCase_ == 2) { + dateTimeBuilder_.mergeFrom(value); + } else { + dateTimeBuilder_.setMessage(value); + } + } + parsedQuoteCase_ = 2; + return this; + } + /** + *
+     * The date time indicated by the quote.
+     * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + */ + public Builder clearDateTime() { + if (dateTimeBuilder_ == null) { + if (parsedQuoteCase_ == 2) { + parsedQuoteCase_ = 0; + parsedQuote_ = null; + onChanged(); + } + } else { + if (parsedQuoteCase_ == 2) { + parsedQuoteCase_ = 0; + parsedQuote_ = null; + } + dateTimeBuilder_.clear(); + } + return this; + } + /** + *
+     * The date time indicated by the quote.
+     * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + */ + public com.google.privacy.dlp.v2.DateTime.Builder getDateTimeBuilder() { + return getDateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The date time indicated by the quote.
+     * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DateTimeOrBuilder getDateTimeOrBuilder() { + if ((parsedQuoteCase_ == 2) && (dateTimeBuilder_ != null)) { + return dateTimeBuilder_.getMessageOrBuilder(); + } else { + if (parsedQuoteCase_ == 2) { + return (com.google.privacy.dlp.v2.DateTime) parsedQuote_; + } + return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); + } + } + /** + *
+     * The date time indicated by the quote.
+     * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DateTime, com.google.privacy.dlp.v2.DateTime.Builder, com.google.privacy.dlp.v2.DateTimeOrBuilder> + getDateTimeFieldBuilder() { + if (dateTimeBuilder_ == null) { + if (!(parsedQuoteCase_ == 2)) { + parsedQuote_ = com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); + } + dateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DateTime, com.google.privacy.dlp.v2.DateTime.Builder, com.google.privacy.dlp.v2.DateTimeOrBuilder>( + (com.google.privacy.dlp.v2.DateTime) parsedQuote_, + getParentForChildren(), + isClean()); + parsedQuote_ = null; + } + parsedQuoteCase_ = 2; + onChanged();; + return dateTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.QuoteInfo) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.QuoteInfo) + private static final com.google.privacy.dlp.v2.QuoteInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.QuoteInfo(); + } + + public static com.google.privacy.dlp.v2.QuoteInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QuoteInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QuoteInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.QuoteInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfoOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfoOrBuilder.java new file mode 100644 index 000000000000..021beda9bc69 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfoOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface QuoteInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.QuoteInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The date time indicated by the quote.
+   * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + * @return Whether the dateTime field is set. + */ + boolean hasDateTime(); + /** + *
+   * The date time indicated by the quote.
+   * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + * @return The dateTime. + */ + com.google.privacy.dlp.v2.DateTime getDateTime(); + /** + *
+   * The date time indicated by the quote.
+   * 
+ * + * .google.privacy.dlp.v2.DateTime date_time = 2; + */ + com.google.privacy.dlp.v2.DateTimeOrBuilder getDateTimeOrBuilder(); + + public com.google.privacy.dlp.v2.QuoteInfo.ParsedQuoteCase getParsedQuoteCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Range.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Range.java new file mode 100644 index 000000000000..b0c41c38e511 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Range.java @@ -0,0 +1,591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Generic half-open interval [start, end)
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Range} + */ +public final class Range extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Range) + RangeOrBuilder { +private static final long serialVersionUID = 0L; + // Use Range.newBuilder() to construct. + private Range(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Range() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Range(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Range( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + start_ = input.readInt64(); + break; + } + case 16: { + + end_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Range.class, com.google.privacy.dlp.v2.Range.Builder.class); + } + + public static final int START_FIELD_NUMBER = 1; + private long start_; + /** + *
+   * Index of the first character of the range (inclusive).
+   * 
+ * + * int64 start = 1; + * @return The start. + */ + @java.lang.Override + public long getStart() { + return start_; + } + + public static final int END_FIELD_NUMBER = 2; + private long end_; + /** + *
+   * Index of the last character of the range (exclusive).
+   * 
+ * + * int64 end = 2; + * @return The end. + */ + @java.lang.Override + public long getEnd() { + return end_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (start_ != 0L) { + output.writeInt64(1, start_); + } + if (end_ != 0L) { + output.writeInt64(2, end_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (start_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, start_); + } + if (end_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, end_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Range)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Range other = (com.google.privacy.dlp.v2.Range) obj; + + if (getStart() + != other.getStart()) return false; + if (getEnd() + != other.getEnd()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStart()); + hash = (37 * hash) + END_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEnd()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Range parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Range parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Range parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Range parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Range parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Range parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Range parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Range parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Range parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Range parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Range parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Range parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Range prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Generic half-open interval [start, end)
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Range} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Range) + com.google.privacy.dlp.v2.RangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Range.class, com.google.privacy.dlp.v2.Range.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Range.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + start_ = 0L; + + end_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Range getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Range.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Range build() { + com.google.privacy.dlp.v2.Range result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Range buildPartial() { + com.google.privacy.dlp.v2.Range result = new com.google.privacy.dlp.v2.Range(this); + result.start_ = start_; + result.end_ = end_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Range) { + return mergeFrom((com.google.privacy.dlp.v2.Range)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Range other) { + if (other == com.google.privacy.dlp.v2.Range.getDefaultInstance()) return this; + if (other.getStart() != 0L) { + setStart(other.getStart()); + } + if (other.getEnd() != 0L) { + setEnd(other.getEnd()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Range parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Range) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long start_ ; + /** + *
+     * Index of the first character of the range (inclusive).
+     * 
+ * + * int64 start = 1; + * @return The start. + */ + @java.lang.Override + public long getStart() { + return start_; + } + /** + *
+     * Index of the first character of the range (inclusive).
+     * 
+ * + * int64 start = 1; + * @param value The start to set. + * @return This builder for chaining. + */ + public Builder setStart(long value) { + + start_ = value; + onChanged(); + return this; + } + /** + *
+     * Index of the first character of the range (inclusive).
+     * 
+ * + * int64 start = 1; + * @return This builder for chaining. + */ + public Builder clearStart() { + + start_ = 0L; + onChanged(); + return this; + } + + private long end_ ; + /** + *
+     * Index of the last character of the range (exclusive).
+     * 
+ * + * int64 end = 2; + * @return The end. + */ + @java.lang.Override + public long getEnd() { + return end_; + } + /** + *
+     * Index of the last character of the range (exclusive).
+     * 
+ * + * int64 end = 2; + * @param value The end to set. + * @return This builder for chaining. + */ + public Builder setEnd(long value) { + + end_ = value; + onChanged(); + return this; + } + /** + *
+     * Index of the last character of the range (exclusive).
+     * 
+ * + * int64 end = 2; + * @return This builder for chaining. + */ + public Builder clearEnd() { + + end_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Range) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Range) + private static final com.google.privacy.dlp.v2.Range DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Range(); + } + + public static com.google.privacy.dlp.v2.Range getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Range parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Range(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Range getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RangeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RangeOrBuilder.java new file mode 100644 index 000000000000..c52c250e92d8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RangeOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RangeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Range) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Index of the first character of the range (inclusive).
+   * 
+ * + * int64 start = 1; + * @return The start. + */ + long getStart(); + + /** + *
+   * Index of the last character of the range (exclusive).
+   * 
+ * + * int64 end = 2; + * @return The end. + */ + long getEnd(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java new file mode 100644 index 000000000000..23a067cfd063 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java @@ -0,0 +1,3780 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A condition for determining whether a transformation should be applied to
+ * a field.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordCondition} + */ +public final class RecordCondition extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordCondition) + RecordConditionOrBuilder { +private static final long serialVersionUID = 0L; + // Use RecordCondition.newBuilder() to construct. + private RecordCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordCondition() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordCondition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordCondition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: { + com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder subBuilder = null; + if (expressions_ != null) { + subBuilder = expressions_.toBuilder(); + } + expressions_ = input.readMessage(com.google.privacy.dlp.v2.RecordCondition.Expressions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expressions_); + expressions_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordCondition.class, com.google.privacy.dlp.v2.RecordCondition.Builder.class); + } + + public interface ConditionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordCondition.Condition) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. Field within the record this condition is evaluated against.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+     * Required. Field within the record this condition is evaluated against.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+     * Required. Field within the record this condition is evaluated against.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + + /** + *
+     * Required. Operator used to compare the field or infoType to the value.
+     * 
+ * + * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The enum numeric value on the wire for operator. + */ + int getOperatorValue(); + /** + *
+     * Required. Operator used to compare the field or infoType to the value.
+     * 
+ * + * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The operator. + */ + com.google.privacy.dlp.v2.RelationalOperator getOperator(); + + /** + *
+     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + *
+     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + * @return The value. + */ + com.google.privacy.dlp.v2.Value getValue(); + /** + *
+     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder(); + } + /** + *
+   * The field type of `value` and `field` do not need to match to be
+   * considered equal, but not all comparisons are possible.
+   * EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types,
+   * but all other comparisons are invalid with incompatible types.
+   * A `value` of type:
+   * - `string` can be compared against all other types
+   * - `boolean` can only be compared against other booleans
+   * - `integer` can be compared against doubles or a string if the string value
+   * can be parsed as an integer.
+   * - `double` can be compared against integers or a string if the string can
+   * be parsed as a double.
+   * - `Timestamp` can be compared against strings in RFC 3339 date string
+   * format.
+   * - `TimeOfDay` can be compared against timestamps and strings in the format
+   * of 'HH:mm:ss'.
+   * If we fail to compare do to type mismatch, a warning will be given and
+   * the condition will evaluate to false.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Condition} + */ + public static final class Condition extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordCondition.Condition) + ConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Condition.newBuilder() to construct. + private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Condition() { + operator_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Condition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Condition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + int rawValue = input.readEnum(); + + operator_ = rawValue; + break; + } + case 34: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordCondition.Condition.class, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+     * Required. Field within the record this condition is evaluated against.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+     * Required. Field within the record this condition is evaluated against.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+     * Required. Field within the record this condition is evaluated against.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int OPERATOR_FIELD_NUMBER = 3; + private int operator_; + /** + *
+     * Required. Operator used to compare the field or infoType to the value.
+     * 
+ * + * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+     * Required. Operator used to compare the field or infoType to the value.
+     * 
+ * + * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The operator. + */ + @java.lang.Override public com.google.privacy.dlp.v2.RelationalOperator getOperator() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.RelationalOperator result = com.google.privacy.dlp.v2.RelationalOperator.valueOf(operator_); + return result == null ? com.google.privacy.dlp.v2.RelationalOperator.UNRECOGNIZED : result; + } + + public static final int VALUE_FIELD_NUMBER = 4; + private com.google.privacy.dlp.v2.Value value_; + /** + *
+     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + *
+     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + * @return The value. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getValue() { + return value_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; + } + /** + *
+     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder() { + return getValue(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (operator_ != com.google.privacy.dlp.v2.RelationalOperator.RELATIONAL_OPERATOR_UNSPECIFIED.getNumber()) { + output.writeEnum(3, operator_); + } + if (value_ != null) { + output.writeMessage(4, getValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + if (operator_ != com.google.privacy.dlp.v2.RelationalOperator.RELATIONAL_OPERATOR_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, operator_); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RecordCondition.Condition)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RecordCondition.Condition other = (com.google.privacy.dlp.v2.RecordCondition.Condition) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (operator_ != other.operator_) return false; + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + operator_; + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordCondition.Condition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The field type of `value` and `field` do not need to match to be
+     * considered equal, but not all comparisons are possible.
+     * EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types,
+     * but all other comparisons are invalid with incompatible types.
+     * A `value` of type:
+     * - `string` can be compared against all other types
+     * - `boolean` can only be compared against other booleans
+     * - `integer` can be compared against doubles or a string if the string value
+     * can be parsed as an integer.
+     * - `double` can be compared against integers or a string if the string can
+     * be parsed as a double.
+     * - `Timestamp` can be compared against strings in RFC 3339 date string
+     * format.
+     * - `TimeOfDay` can be compared against timestamps and strings in the format
+     * of 'HH:mm:ss'.
+     * If we fail to compare do to type mismatch, a warning will be given and
+     * the condition will evaluate to false.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Condition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordCondition.Condition) + com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordCondition.Condition.class, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RecordCondition.Condition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + operator_ = 0; + + if (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Condition getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RecordCondition.Condition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Condition build() { + com.google.privacy.dlp.v2.RecordCondition.Condition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Condition buildPartial() { + com.google.privacy.dlp.v2.RecordCondition.Condition result = new com.google.privacy.dlp.v2.RecordCondition.Condition(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + result.operator_ = operator_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RecordCondition.Condition) { + return mergeFrom((com.google.privacy.dlp.v2.RecordCondition.Condition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RecordCondition.Condition other) { + if (other == com.google.privacy.dlp.v2.RecordCondition.Condition.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + if (other.operator_ != 0) { + setOperatorValue(other.getOperatorValue()); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RecordCondition.Condition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RecordCondition.Condition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+       * Required. Field within the record this condition is evaluated against.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+       * Required. Field within the record this condition is evaluated against.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+       * Required. Field within the record this condition is evaluated against.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Required. Field within the record this condition is evaluated against.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Required. Field within the record this condition is evaluated against.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Required. Field within the record this condition is evaluated against.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+       * Required. Field within the record this condition is evaluated against.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+       * Required. Field within the record this condition is evaluated against.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+       * Required. Field within the record this condition is evaluated against.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private int operator_ = 0; + /** + *
+       * Required. Operator used to compare the field or infoType to the value.
+       * 
+ * + * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override public int getOperatorValue() { + return operator_; + } + /** + *
+       * Required. Operator used to compare the field or infoType to the value.
+       * 
+ * + * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The enum numeric value on the wire for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorValue(int value) { + + operator_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. Operator used to compare the field or infoType to the value.
+       * 
+ * + * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The operator. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RelationalOperator getOperator() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.RelationalOperator result = com.google.privacy.dlp.v2.RelationalOperator.valueOf(operator_); + return result == null ? com.google.privacy.dlp.v2.RelationalOperator.UNRECOGNIZED : result; + } + /** + *
+       * Required. Operator used to compare the field or infoType to the value.
+       * 
+ * + * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator(com.google.privacy.dlp.v2.RelationalOperator value) { + if (value == null) { + throw new NullPointerException(); + } + + operator_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Required. Operator used to compare the field or infoType to the value.
+       * 
+ * + * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearOperator() { + + operator_ = 0; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> valueBuilder_; + /** + *
+       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+       * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + *
+       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+       * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + * @return The value. + */ + public com.google.privacy.dlp.v2.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + *
+       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+       * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + */ + public Builder setValue(com.google.privacy.dlp.v2.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+       * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + */ + public Builder setValue( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+       * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + */ + public Builder mergeValue(com.google.privacy.dlp.v2.Value value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = + com.google.privacy.dlp.v2.Value.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+       * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + *
+       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+       * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + */ + public com.google.privacy.dlp.v2.Value.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + *
+       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+       * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; + } + } + /** + *
+       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
+       * 
+ * + * .google.privacy.dlp.v2.Value value = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordCondition.Condition) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordCondition.Condition) + private static final com.google.privacy.dlp.v2.RecordCondition.Condition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordCondition.Condition(); + } + + public static com.google.privacy.dlp.v2.RecordCondition.Condition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Condition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Condition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Condition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConditionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordCondition.Conditions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + java.util.List + getConditionsList(); + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + com.google.privacy.dlp.v2.RecordCondition.Condition getConditions(int index); + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + int getConditionsCount(); + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + java.util.List + getConditionsOrBuilderList(); + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder getConditionsOrBuilder( + int index); + } + /** + *
+   * A collection of conditions.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Conditions} + */ + public static final class Conditions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordCondition.Conditions) + ConditionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Conditions.newBuilder() to construct. + private Conditions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Conditions() { + conditions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Conditions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Conditions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + conditions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + conditions_.add( + input.readMessage(com.google.privacy.dlp.v2.RecordCondition.Condition.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + conditions_ = java.util.Collections.unmodifiableList(conditions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordCondition.Conditions.class, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder.class); + } + + public static final int CONDITIONS_FIELD_NUMBER = 1; + private java.util.List conditions_; + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + @java.lang.Override + public java.util.List getConditionsList() { + return conditions_; + } + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + @java.lang.Override + public java.util.List + getConditionsOrBuilderList() { + return conditions_; + } + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + @java.lang.Override + public int getConditionsCount() { + return conditions_.size(); + } + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Condition getConditions(int index) { + return conditions_.get(index); + } + /** + *
+     * A collection of conditions.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder getConditionsOrBuilder( + int index) { + return conditions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < conditions_.size(); i++) { + output.writeMessage(1, conditions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < conditions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, conditions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RecordCondition.Conditions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RecordCondition.Conditions other = (com.google.privacy.dlp.v2.RecordCondition.Conditions) obj; + + if (!getConditionsList() + .equals(other.getConditionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConditionsCount() > 0) { + hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; + hash = (53 * hash) + getConditionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordCondition.Conditions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A collection of conditions.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Conditions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordCondition.Conditions) + com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordCondition.Conditions.class, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RecordCondition.Conditions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getConditionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (conditionsBuilder_ == null) { + conditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + conditionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Conditions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Conditions build() { + com.google.privacy.dlp.v2.RecordCondition.Conditions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Conditions buildPartial() { + com.google.privacy.dlp.v2.RecordCondition.Conditions result = new com.google.privacy.dlp.v2.RecordCondition.Conditions(this); + int from_bitField0_ = bitField0_; + if (conditionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + conditions_ = java.util.Collections.unmodifiableList(conditions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.conditions_ = conditions_; + } else { + result.conditions_ = conditionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RecordCondition.Conditions) { + return mergeFrom((com.google.privacy.dlp.v2.RecordCondition.Conditions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RecordCondition.Conditions other) { + if (other == com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance()) return this; + if (conditionsBuilder_ == null) { + if (!other.conditions_.isEmpty()) { + if (conditions_.isEmpty()) { + conditions_ = other.conditions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConditionsIsMutable(); + conditions_.addAll(other.conditions_); + } + onChanged(); + } + } else { + if (!other.conditions_.isEmpty()) { + if (conditionsBuilder_.isEmpty()) { + conditionsBuilder_.dispose(); + conditionsBuilder_ = null; + conditions_ = other.conditions_; + bitField0_ = (bitField0_ & ~0x00000001); + conditionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConditionsFieldBuilder() : null; + } else { + conditionsBuilder_.addAllMessages(other.conditions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RecordCondition.Conditions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RecordCondition.Conditions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List conditions_ = + java.util.Collections.emptyList(); + private void ensureConditionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + conditions_ = new java.util.ArrayList(conditions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition.Condition, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder> conditionsBuilder_; + + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public java.util.List getConditionsList() { + if (conditionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(conditions_); + } else { + return conditionsBuilder_.getMessageList(); + } + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public int getConditionsCount() { + if (conditionsBuilder_ == null) { + return conditions_.size(); + } else { + return conditionsBuilder_.getCount(); + } + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public com.google.privacy.dlp.v2.RecordCondition.Condition getConditions(int index) { + if (conditionsBuilder_ == null) { + return conditions_.get(index); + } else { + return conditionsBuilder_.getMessage(index); + } + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public Builder setConditions( + int index, com.google.privacy.dlp.v2.RecordCondition.Condition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.set(index, value); + onChanged(); + } else { + conditionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public Builder setConditions( + int index, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.set(index, builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public Builder addConditions(com.google.privacy.dlp.v2.RecordCondition.Condition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.add(value); + onChanged(); + } else { + conditionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public Builder addConditions( + int index, com.google.privacy.dlp.v2.RecordCondition.Condition value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConditionsIsMutable(); + conditions_.add(index, value); + onChanged(); + } else { + conditionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public Builder addConditions( + com.google.privacy.dlp.v2.RecordCondition.Condition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public Builder addConditions( + int index, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder builderForValue) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(index, builderForValue.build()); + onChanged(); + } else { + conditionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public Builder addAllConditions( + java.lang.Iterable values) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, conditions_); + onChanged(); + } else { + conditionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public Builder clearConditions() { + if (conditionsBuilder_ == null) { + conditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + conditionsBuilder_.clear(); + } + return this; + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public Builder removeConditions(int index) { + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.remove(index); + onChanged(); + } else { + conditionsBuilder_.remove(index); + } + return this; + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public com.google.privacy.dlp.v2.RecordCondition.Condition.Builder getConditionsBuilder( + int index) { + return getConditionsFieldBuilder().getBuilder(index); + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder getConditionsOrBuilder( + int index) { + if (conditionsBuilder_ == null) { + return conditions_.get(index); } else { + return conditionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public java.util.List + getConditionsOrBuilderList() { + if (conditionsBuilder_ != null) { + return conditionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(conditions_); + } + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public com.google.privacy.dlp.v2.RecordCondition.Condition.Builder addConditionsBuilder() { + return getConditionsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.RecordCondition.Condition.getDefaultInstance()); + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public com.google.privacy.dlp.v2.RecordCondition.Condition.Builder addConditionsBuilder( + int index) { + return getConditionsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.RecordCondition.Condition.getDefaultInstance()); + } + /** + *
+       * A collection of conditions.
+       * 
+ * + * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; + */ + public java.util.List + getConditionsBuilderList() { + return getConditionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition.Condition, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder> + getConditionsFieldBuilder() { + if (conditionsBuilder_ == null) { + conditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition.Condition, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder>( + conditions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + conditions_ = null; + } + return conditionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordCondition.Conditions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordCondition.Conditions) + private static final com.google.privacy.dlp.v2.RecordCondition.Conditions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordCondition.Conditions(); + } + + public static com.google.privacy.dlp.v2.RecordCondition.Conditions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Conditions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Conditions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Conditions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ExpressionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordCondition.Expressions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The operator to apply to the result of conditions. Default and currently
+     * only supported value is `AND`.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; + * @return The enum numeric value on the wire for logicalOperator. + */ + int getLogicalOperatorValue(); + /** + *
+     * The operator to apply to the result of conditions. Default and currently
+     * only supported value is `AND`.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; + * @return The logicalOperator. + */ + com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator getLogicalOperator(); + + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + * @return Whether the conditions field is set. + */ + boolean hasConditions(); + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + * @return The conditions. + */ + com.google.privacy.dlp.v2.RecordCondition.Conditions getConditions(); + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + */ + com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder getConditionsOrBuilder(); + + public com.google.privacy.dlp.v2.RecordCondition.Expressions.TypeCase getTypeCase(); + } + /** + *
+   * An expression, consisting of an operator and conditions.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Expressions} + */ + public static final class Expressions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordCondition.Expressions) + ExpressionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Expressions.newBuilder() to construct. + private Expressions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Expressions() { + logicalOperator_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Expressions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Expressions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + logicalOperator_ = rawValue; + break; + } + case 26: { + com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder subBuilder = null; + if (typeCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.RecordCondition.Conditions) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.RecordCondition.Conditions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.RecordCondition.Conditions) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 3; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordCondition.Expressions.class, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder.class); + } + + /** + *
+     * Logical operators for conditional checks.
+     * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator} + */ + public enum LogicalOperator + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unused
+       * 
+ * + * LOGICAL_OPERATOR_UNSPECIFIED = 0; + */ + LOGICAL_OPERATOR_UNSPECIFIED(0), + /** + *
+       * Conditional AND
+       * 
+ * + * AND = 1; + */ + AND(1), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unused
+       * 
+ * + * LOGICAL_OPERATOR_UNSPECIFIED = 0; + */ + public static final int LOGICAL_OPERATOR_UNSPECIFIED_VALUE = 0; + /** + *
+       * Conditional AND
+       * 
+ * + * AND = 1; + */ + public static final int AND_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LogicalOperator valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LogicalOperator forNumber(int value) { + switch (value) { + case 0: return LOGICAL_OPERATOR_UNSPECIFIED; + case 1: return AND; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LogicalOperator> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LogicalOperator findValueByNumber(int number) { + return LogicalOperator.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.RecordCondition.Expressions.getDescriptor().getEnumTypes().get(0); + } + + private static final LogicalOperator[] VALUES = values(); + + public static LogicalOperator valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LogicalOperator(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator) + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CONDITIONS(3), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 3: return CONDITIONS; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int LOGICAL_OPERATOR_FIELD_NUMBER = 1; + private int logicalOperator_; + /** + *
+     * The operator to apply to the result of conditions. Default and currently
+     * only supported value is `AND`.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; + * @return The enum numeric value on the wire for logicalOperator. + */ + @java.lang.Override public int getLogicalOperatorValue() { + return logicalOperator_; + } + /** + *
+     * The operator to apply to the result of conditions. Default and currently
+     * only supported value is `AND`.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; + * @return The logicalOperator. + */ + @java.lang.Override public com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator getLogicalOperator() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator result = com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.valueOf(logicalOperator_); + return result == null ? com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.UNRECOGNIZED : result; + } + + public static final int CONDITIONS_FIELD_NUMBER = 3; + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + * @return Whether the conditions field is set. + */ + @java.lang.Override + public boolean hasConditions() { + return typeCase_ == 3; + } + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + * @return The conditions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Conditions getConditions() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_; + } + return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); + } + /** + *
+     * Conditions to apply to the expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder getConditionsOrBuilder() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_; + } + return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (logicalOperator_ != com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED.getNumber()) { + output.writeEnum(1, logicalOperator_); + } + if (typeCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (logicalOperator_ != com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, logicalOperator_); + } + if (typeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RecordCondition.Expressions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RecordCondition.Expressions other = (com.google.privacy.dlp.v2.RecordCondition.Expressions) obj; + + if (logicalOperator_ != other.logicalOperator_) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 3: + if (!getConditions() + .equals(other.getConditions())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOGICAL_OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + logicalOperator_; + switch (typeCase_) { + case 3: + hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; + hash = (53 * hash) + getConditions().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordCondition.Expressions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * An expression, consisting of an operator and conditions.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Expressions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordCondition.Expressions) + com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordCondition.Expressions.class, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RecordCondition.Expressions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + logicalOperator_ = 0; + + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Expressions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Expressions build() { + com.google.privacy.dlp.v2.RecordCondition.Expressions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Expressions buildPartial() { + com.google.privacy.dlp.v2.RecordCondition.Expressions result = new com.google.privacy.dlp.v2.RecordCondition.Expressions(this); + result.logicalOperator_ = logicalOperator_; + if (typeCase_ == 3) { + if (conditionsBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = conditionsBuilder_.build(); + } + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RecordCondition.Expressions) { + return mergeFrom((com.google.privacy.dlp.v2.RecordCondition.Expressions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RecordCondition.Expressions other) { + if (other == com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance()) return this; + if (other.logicalOperator_ != 0) { + setLogicalOperatorValue(other.getLogicalOperatorValue()); + } + switch (other.getTypeCase()) { + case CONDITIONS: { + mergeConditions(other.getConditions()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RecordCondition.Expressions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RecordCondition.Expressions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private int logicalOperator_ = 0; + /** + *
+       * The operator to apply to the result of conditions. Default and currently
+       * only supported value is `AND`.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; + * @return The enum numeric value on the wire for logicalOperator. + */ + @java.lang.Override public int getLogicalOperatorValue() { + return logicalOperator_; + } + /** + *
+       * The operator to apply to the result of conditions. Default and currently
+       * only supported value is `AND`.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; + * @param value The enum numeric value on the wire for logicalOperator to set. + * @return This builder for chaining. + */ + public Builder setLogicalOperatorValue(int value) { + + logicalOperator_ = value; + onChanged(); + return this; + } + /** + *
+       * The operator to apply to the result of conditions. Default and currently
+       * only supported value is `AND`.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; + * @return The logicalOperator. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator getLogicalOperator() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator result = com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.valueOf(logicalOperator_); + return result == null ? com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.UNRECOGNIZED : result; + } + /** + *
+       * The operator to apply to the result of conditions. Default and currently
+       * only supported value is `AND`.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; + * @param value The logicalOperator to set. + * @return This builder for chaining. + */ + public Builder setLogicalOperator(com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator value) { + if (value == null) { + throw new NullPointerException(); + } + + logicalOperator_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The operator to apply to the result of conditions. Default and currently
+       * only supported value is `AND`.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; + * @return This builder for chaining. + */ + public Builder clearLogicalOperator() { + + logicalOperator_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition.Conditions, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder> conditionsBuilder_; + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + * @return Whether the conditions field is set. + */ + @java.lang.Override + public boolean hasConditions() { + return typeCase_ == 3; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + * @return The conditions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Conditions getConditions() { + if (conditionsBuilder_ == null) { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_; + } + return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); + } else { + if (typeCase_ == 3) { + return conditionsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); + } + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + */ + public Builder setConditions(com.google.privacy.dlp.v2.RecordCondition.Conditions value) { + if (conditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + conditionsBuilder_.setMessage(value); + } + typeCase_ = 3; + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + */ + public Builder setConditions( + com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder builderForValue) { + if (conditionsBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + conditionsBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 3; + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + */ + public Builder mergeConditions(com.google.privacy.dlp.v2.RecordCondition.Conditions value) { + if (conditionsBuilder_ == null) { + if (typeCase_ == 3 && + type_ != com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.RecordCondition.Conditions.newBuilder((com.google.privacy.dlp.v2.RecordCondition.Conditions) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 3) { + conditionsBuilder_.mergeFrom(value); + } else { + conditionsBuilder_.setMessage(value); + } + } + typeCase_ = 3; + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + */ + public Builder clearConditions() { + if (conditionsBuilder_ == null) { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + } + conditionsBuilder_.clear(); + } + return this; + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + */ + public com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder getConditionsBuilder() { + return getConditionsFieldBuilder().getBuilder(); + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder getConditionsOrBuilder() { + if ((typeCase_ == 3) && (conditionsBuilder_ != null)) { + return conditionsBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_; + } + return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); + } + } + /** + *
+       * Conditions to apply to the expression.
+       * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition.Conditions, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder> + getConditionsFieldBuilder() { + if (conditionsBuilder_ == null) { + if (!(typeCase_ == 3)) { + type_ = com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); + } + conditionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition.Conditions, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder>( + (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 3; + onChanged();; + return conditionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordCondition.Expressions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordCondition.Expressions) + private static final com.google.privacy.dlp.v2.RecordCondition.Expressions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordCondition.Expressions(); + } + + public static com.google.privacy.dlp.v2.RecordCondition.Expressions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Expressions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Expressions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Expressions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int EXPRESSIONS_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.RecordCondition.Expressions expressions_; + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + * @return Whether the expressions field is set. + */ + @java.lang.Override + public boolean hasExpressions() { + return expressions_ != null; + } + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + * @return The expressions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.Expressions getExpressions() { + return expressions_ == null ? com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance() : expressions_; + } + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder getExpressionsOrBuilder() { + return getExpressions(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (expressions_ != null) { + output.writeMessage(3, getExpressions()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (expressions_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getExpressions()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RecordCondition)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RecordCondition other = (com.google.privacy.dlp.v2.RecordCondition) obj; + + if (hasExpressions() != other.hasExpressions()) return false; + if (hasExpressions()) { + if (!getExpressions() + .equals(other.getExpressions())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExpressions()) { + hash = (37 * hash) + EXPRESSIONS_FIELD_NUMBER; + hash = (53 * hash) + getExpressions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RecordCondition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordCondition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A condition for determining whether a transformation should be applied to
+   * a field.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordCondition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordCondition) + com.google.privacy.dlp.v2.RecordConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordCondition.class, com.google.privacy.dlp.v2.RecordCondition.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RecordCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (expressionsBuilder_ == null) { + expressions_ = null; + } else { + expressions_ = null; + expressionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition build() { + com.google.privacy.dlp.v2.RecordCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition buildPartial() { + com.google.privacy.dlp.v2.RecordCondition result = new com.google.privacy.dlp.v2.RecordCondition(this); + if (expressionsBuilder_ == null) { + result.expressions_ = expressions_; + } else { + result.expressions_ = expressionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RecordCondition) { + return mergeFrom((com.google.privacy.dlp.v2.RecordCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RecordCondition other) { + if (other == com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance()) return this; + if (other.hasExpressions()) { + mergeExpressions(other.getExpressions()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RecordCondition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RecordCondition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.RecordCondition.Expressions expressions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition.Expressions, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder, com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder> expressionsBuilder_; + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + * @return Whether the expressions field is set. + */ + public boolean hasExpressions() { + return expressionsBuilder_ != null || expressions_ != null; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + * @return The expressions. + */ + public com.google.privacy.dlp.v2.RecordCondition.Expressions getExpressions() { + if (expressionsBuilder_ == null) { + return expressions_ == null ? com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance() : expressions_; + } else { + return expressionsBuilder_.getMessage(); + } + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + */ + public Builder setExpressions(com.google.privacy.dlp.v2.RecordCondition.Expressions value) { + if (expressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expressions_ = value; + onChanged(); + } else { + expressionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + */ + public Builder setExpressions( + com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder builderForValue) { + if (expressionsBuilder_ == null) { + expressions_ = builderForValue.build(); + onChanged(); + } else { + expressionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + */ + public Builder mergeExpressions(com.google.privacy.dlp.v2.RecordCondition.Expressions value) { + if (expressionsBuilder_ == null) { + if (expressions_ != null) { + expressions_ = + com.google.privacy.dlp.v2.RecordCondition.Expressions.newBuilder(expressions_).mergeFrom(value).buildPartial(); + } else { + expressions_ = value; + } + onChanged(); + } else { + expressionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + */ + public Builder clearExpressions() { + if (expressionsBuilder_ == null) { + expressions_ = null; + onChanged(); + } else { + expressions_ = null; + expressionsBuilder_ = null; + } + + return this; + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + */ + public com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder getExpressionsBuilder() { + + onChanged(); + return getExpressionsFieldBuilder().getBuilder(); + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + */ + public com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder getExpressionsOrBuilder() { + if (expressionsBuilder_ != null) { + return expressionsBuilder_.getMessageOrBuilder(); + } else { + return expressions_ == null ? + com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance() : expressions_; + } + } + /** + *
+     * An expression.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition.Expressions, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder, com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder> + getExpressionsFieldBuilder() { + if (expressionsBuilder_ == null) { + expressionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition.Expressions, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder, com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder>( + getExpressions(), + getParentForChildren(), + isClean()); + expressions_ = null; + } + return expressionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordCondition) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordCondition) + private static final com.google.privacy.dlp.v2.RecordCondition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordCondition(); + } + + public static com.google.privacy.dlp.v2.RecordCondition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordCondition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordCondition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordConditionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordConditionOrBuilder.java new file mode 100644 index 000000000000..8a5ae866dfc9 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordConditionOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RecordConditionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordCondition) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + * @return Whether the expressions field is set. + */ + boolean hasExpressions(); + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + * @return The expressions. + */ + com.google.privacy.dlp.v2.RecordCondition.Expressions getExpressions(); + /** + *
+   * An expression.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; + */ + com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder getExpressionsOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKey.java new file mode 100644 index 000000000000..c91d477b4326 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKey.java @@ -0,0 +1,1188 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Message for a unique key indicating a record that contains a finding.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordKey} + */ +public final class RecordKey extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordKey) + RecordKeyOrBuilder { +private static final long serialVersionUID = 0L; + // Use RecordKey.newBuilder() to construct. + private RecordKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordKey() { + idValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordKey( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + com.google.privacy.dlp.v2.DatastoreKey.Builder subBuilder = null; + if (typeCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.DatastoreKey) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.DatastoreKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.DatastoreKey) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.BigQueryKey.Builder subBuilder = null; + if (typeCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.BigQueryKey) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.BigQueryKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryKey) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 3; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + idValues_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + idValues_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + idValues_ = idValues_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordKey.class, com.google.privacy.dlp.v2.RecordKey.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATASTORE_KEY(2), + BIG_QUERY_KEY(3), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 2: return DATASTORE_KEY; + case 3: return BIG_QUERY_KEY; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int DATASTORE_KEY_FIELD_NUMBER = 2; + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + * @return Whether the datastoreKey field is set. + */ + @java.lang.Override + public boolean hasDatastoreKey() { + return typeCase_ == 2; + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + * @return The datastoreKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreKey getDatastoreKey() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.DatastoreKey) type_; + } + return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreKeyOrBuilder getDatastoreKeyOrBuilder() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.DatastoreKey) type_; + } + return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); + } + + public static final int BIG_QUERY_KEY_FIELD_NUMBER = 3; + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + * @return Whether the bigQueryKey field is set. + */ + @java.lang.Override + public boolean hasBigQueryKey() { + return typeCase_ == 3; + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + * @return The bigQueryKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryKey getBigQueryKey() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.BigQueryKey) type_; + } + return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryKeyOrBuilder getBigQueryKeyOrBuilder() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.BigQueryKey) type_; + } + return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); + } + + public static final int ID_VALUES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList idValues_; + /** + *
+   * Values of identifying columns in the given row. Order of values matches
+   * the order of `identifying_fields` specified in the scanning request.
+   * 
+ * + * repeated string id_values = 5; + * @return A list containing the idValues. + */ + public com.google.protobuf.ProtocolStringList + getIdValuesList() { + return idValues_; + } + /** + *
+   * Values of identifying columns in the given row. Order of values matches
+   * the order of `identifying_fields` specified in the scanning request.
+   * 
+ * + * repeated string id_values = 5; + * @return The count of idValues. + */ + public int getIdValuesCount() { + return idValues_.size(); + } + /** + *
+   * Values of identifying columns in the given row. Order of values matches
+   * the order of `identifying_fields` specified in the scanning request.
+   * 
+ * + * repeated string id_values = 5; + * @param index The index of the element to return. + * @return The idValues at the given index. + */ + public java.lang.String getIdValues(int index) { + return idValues_.get(index); + } + /** + *
+   * Values of identifying columns in the given row. Order of values matches
+   * the order of `identifying_fields` specified in the scanning request.
+   * 
+ * + * repeated string id_values = 5; + * @param index The index of the value to return. + * @return The bytes of the idValues at the given index. + */ + public com.google.protobuf.ByteString + getIdValuesBytes(int index) { + return idValues_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.DatastoreKey) type_); + } + if (typeCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.BigQueryKey) type_); + } + for (int i = 0; i < idValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, idValues_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.DatastoreKey) type_); + } + if (typeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.BigQueryKey) type_); + } + { + int dataSize = 0; + for (int i = 0; i < idValues_.size(); i++) { + dataSize += computeStringSizeNoTag(idValues_.getRaw(i)); + } + size += dataSize; + size += 1 * getIdValuesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RecordKey)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RecordKey other = (com.google.privacy.dlp.v2.RecordKey) obj; + + if (!getIdValuesList() + .equals(other.getIdValuesList())) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 2: + if (!getDatastoreKey() + .equals(other.getDatastoreKey())) return false; + break; + case 3: + if (!getBigQueryKey() + .equals(other.getBigQueryKey())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdValuesCount() > 0) { + hash = (37 * hash) + ID_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getIdValuesList().hashCode(); + } + switch (typeCase_) { + case 2: + hash = (37 * hash) + DATASTORE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getDatastoreKey().hashCode(); + break; + case 3: + hash = (37 * hash) + BIG_QUERY_KEY_FIELD_NUMBER; + hash = (53 * hash) + getBigQueryKey().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RecordKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Message for a unique key indicating a record that contains a finding.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordKey) + com.google.privacy.dlp.v2.RecordKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordKey.class, com.google.privacy.dlp.v2.RecordKey.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RecordKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + idValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordKey getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RecordKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordKey build() { + com.google.privacy.dlp.v2.RecordKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordKey buildPartial() { + com.google.privacy.dlp.v2.RecordKey result = new com.google.privacy.dlp.v2.RecordKey(this); + int from_bitField0_ = bitField0_; + if (typeCase_ == 2) { + if (datastoreKeyBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = datastoreKeyBuilder_.build(); + } + } + if (typeCase_ == 3) { + if (bigQueryKeyBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = bigQueryKeyBuilder_.build(); + } + } + if (((bitField0_ & 0x00000001) != 0)) { + idValues_ = idValues_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.idValues_ = idValues_; + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RecordKey) { + return mergeFrom((com.google.privacy.dlp.v2.RecordKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RecordKey other) { + if (other == com.google.privacy.dlp.v2.RecordKey.getDefaultInstance()) return this; + if (!other.idValues_.isEmpty()) { + if (idValues_.isEmpty()) { + idValues_ = other.idValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdValuesIsMutable(); + idValues_.addAll(other.idValues_); + } + onChanged(); + } + switch (other.getTypeCase()) { + case DATASTORE_KEY: { + mergeDatastoreKey(other.getDatastoreKey()); + break; + } + case BIG_QUERY_KEY: { + mergeBigQueryKey(other.getBigQueryKey()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RecordKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RecordKey) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DatastoreKey, com.google.privacy.dlp.v2.DatastoreKey.Builder, com.google.privacy.dlp.v2.DatastoreKeyOrBuilder> datastoreKeyBuilder_; + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + * @return Whether the datastoreKey field is set. + */ + @java.lang.Override + public boolean hasDatastoreKey() { + return typeCase_ == 2; + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + * @return The datastoreKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreKey getDatastoreKey() { + if (datastoreKeyBuilder_ == null) { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.DatastoreKey) type_; + } + return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); + } else { + if (typeCase_ == 2) { + return datastoreKeyBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); + } + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + */ + public Builder setDatastoreKey(com.google.privacy.dlp.v2.DatastoreKey value) { + if (datastoreKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + datastoreKeyBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + */ + public Builder setDatastoreKey( + com.google.privacy.dlp.v2.DatastoreKey.Builder builderForValue) { + if (datastoreKeyBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + datastoreKeyBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 2; + return this; + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + */ + public Builder mergeDatastoreKey(com.google.privacy.dlp.v2.DatastoreKey value) { + if (datastoreKeyBuilder_ == null) { + if (typeCase_ == 2 && + type_ != com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.DatastoreKey.newBuilder((com.google.privacy.dlp.v2.DatastoreKey) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 2) { + datastoreKeyBuilder_.mergeFrom(value); + } else { + datastoreKeyBuilder_.setMessage(value); + } + } + typeCase_ = 2; + return this; + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + */ + public Builder clearDatastoreKey() { + if (datastoreKeyBuilder_ == null) { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + } + datastoreKeyBuilder_.clear(); + } + return this; + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + */ + public com.google.privacy.dlp.v2.DatastoreKey.Builder getDatastoreKeyBuilder() { + return getDatastoreKeyFieldBuilder().getBuilder(); + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreKeyOrBuilder getDatastoreKeyOrBuilder() { + if ((typeCase_ == 2) && (datastoreKeyBuilder_ != null)) { + return datastoreKeyBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.DatastoreKey) type_; + } + return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); + } + } + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DatastoreKey, com.google.privacy.dlp.v2.DatastoreKey.Builder, com.google.privacy.dlp.v2.DatastoreKeyOrBuilder> + getDatastoreKeyFieldBuilder() { + if (datastoreKeyBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); + } + datastoreKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DatastoreKey, com.google.privacy.dlp.v2.DatastoreKey.Builder, com.google.privacy.dlp.v2.DatastoreKeyOrBuilder>( + (com.google.privacy.dlp.v2.DatastoreKey) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 2; + onChanged();; + return datastoreKeyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryKey, com.google.privacy.dlp.v2.BigQueryKey.Builder, com.google.privacy.dlp.v2.BigQueryKeyOrBuilder> bigQueryKeyBuilder_; + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + * @return Whether the bigQueryKey field is set. + */ + @java.lang.Override + public boolean hasBigQueryKey() { + return typeCase_ == 3; + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + * @return The bigQueryKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryKey getBigQueryKey() { + if (bigQueryKeyBuilder_ == null) { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.BigQueryKey) type_; + } + return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); + } else { + if (typeCase_ == 3) { + return bigQueryKeyBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); + } + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + */ + public Builder setBigQueryKey(com.google.privacy.dlp.v2.BigQueryKey value) { + if (bigQueryKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + bigQueryKeyBuilder_.setMessage(value); + } + typeCase_ = 3; + return this; + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + */ + public Builder setBigQueryKey( + com.google.privacy.dlp.v2.BigQueryKey.Builder builderForValue) { + if (bigQueryKeyBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + bigQueryKeyBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 3; + return this; + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + */ + public Builder mergeBigQueryKey(com.google.privacy.dlp.v2.BigQueryKey value) { + if (bigQueryKeyBuilder_ == null) { + if (typeCase_ == 3 && + type_ != com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.BigQueryKey.newBuilder((com.google.privacy.dlp.v2.BigQueryKey) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 3) { + bigQueryKeyBuilder_.mergeFrom(value); + } else { + bigQueryKeyBuilder_.setMessage(value); + } + } + typeCase_ = 3; + return this; + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + */ + public Builder clearBigQueryKey() { + if (bigQueryKeyBuilder_ == null) { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + } + bigQueryKeyBuilder_.clear(); + } + return this; + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + */ + public com.google.privacy.dlp.v2.BigQueryKey.Builder getBigQueryKeyBuilder() { + return getBigQueryKeyFieldBuilder().getBuilder(); + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryKeyOrBuilder getBigQueryKeyOrBuilder() { + if ((typeCase_ == 3) && (bigQueryKeyBuilder_ != null)) { + return bigQueryKeyBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.BigQueryKey) type_; + } + return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); + } + } + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryKey, com.google.privacy.dlp.v2.BigQueryKey.Builder, com.google.privacy.dlp.v2.BigQueryKeyOrBuilder> + getBigQueryKeyFieldBuilder() { + if (bigQueryKeyBuilder_ == null) { + if (!(typeCase_ == 3)) { + type_ = com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); + } + bigQueryKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryKey, com.google.privacy.dlp.v2.BigQueryKey.Builder, com.google.privacy.dlp.v2.BigQueryKeyOrBuilder>( + (com.google.privacy.dlp.v2.BigQueryKey) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 3; + onChanged();; + return bigQueryKeyBuilder_; + } + + private com.google.protobuf.LazyStringList idValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureIdValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + idValues_ = new com.google.protobuf.LazyStringArrayList(idValues_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Values of identifying columns in the given row. Order of values matches
+     * the order of `identifying_fields` specified in the scanning request.
+     * 
+ * + * repeated string id_values = 5; + * @return A list containing the idValues. + */ + public com.google.protobuf.ProtocolStringList + getIdValuesList() { + return idValues_.getUnmodifiableView(); + } + /** + *
+     * Values of identifying columns in the given row. Order of values matches
+     * the order of `identifying_fields` specified in the scanning request.
+     * 
+ * + * repeated string id_values = 5; + * @return The count of idValues. + */ + public int getIdValuesCount() { + return idValues_.size(); + } + /** + *
+     * Values of identifying columns in the given row. Order of values matches
+     * the order of `identifying_fields` specified in the scanning request.
+     * 
+ * + * repeated string id_values = 5; + * @param index The index of the element to return. + * @return The idValues at the given index. + */ + public java.lang.String getIdValues(int index) { + return idValues_.get(index); + } + /** + *
+     * Values of identifying columns in the given row. Order of values matches
+     * the order of `identifying_fields` specified in the scanning request.
+     * 
+ * + * repeated string id_values = 5; + * @param index The index of the value to return. + * @return The bytes of the idValues at the given index. + */ + public com.google.protobuf.ByteString + getIdValuesBytes(int index) { + return idValues_.getByteString(index); + } + /** + *
+     * Values of identifying columns in the given row. Order of values matches
+     * the order of `identifying_fields` specified in the scanning request.
+     * 
+ * + * repeated string id_values = 5; + * @param index The index to set the value at. + * @param value The idValues to set. + * @return This builder for chaining. + */ + public Builder setIdValues( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdValuesIsMutable(); + idValues_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Values of identifying columns in the given row. Order of values matches
+     * the order of `identifying_fields` specified in the scanning request.
+     * 
+ * + * repeated string id_values = 5; + * @param value The idValues to add. + * @return This builder for chaining. + */ + public Builder addIdValues( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdValuesIsMutable(); + idValues_.add(value); + onChanged(); + return this; + } + /** + *
+     * Values of identifying columns in the given row. Order of values matches
+     * the order of `identifying_fields` specified in the scanning request.
+     * 
+ * + * repeated string id_values = 5; + * @param values The idValues to add. + * @return This builder for chaining. + */ + public Builder addAllIdValues( + java.lang.Iterable values) { + ensureIdValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, idValues_); + onChanged(); + return this; + } + /** + *
+     * Values of identifying columns in the given row. Order of values matches
+     * the order of `identifying_fields` specified in the scanning request.
+     * 
+ * + * repeated string id_values = 5; + * @return This builder for chaining. + */ + public Builder clearIdValues() { + idValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Values of identifying columns in the given row. Order of values matches
+     * the order of `identifying_fields` specified in the scanning request.
+     * 
+ * + * repeated string id_values = 5; + * @param value The bytes of the idValues to add. + * @return This builder for chaining. + */ + public Builder addIdValuesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIdValuesIsMutable(); + idValues_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordKey) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordKey) + private static final com.google.privacy.dlp.v2.RecordKey DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordKey(); + } + + public static com.google.privacy.dlp.v2.RecordKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKeyOrBuilder.java new file mode 100644 index 000000000000..04fa1b159097 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKeyOrBuilder.java @@ -0,0 +1,86 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface RecordKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordKey) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + * @return Whether the datastoreKey field is set. + */ + boolean hasDatastoreKey(); + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + * @return The datastoreKey. + */ + com.google.privacy.dlp.v2.DatastoreKey getDatastoreKey(); + /** + * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; + */ + com.google.privacy.dlp.v2.DatastoreKeyOrBuilder getDatastoreKeyOrBuilder(); + + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + * @return Whether the bigQueryKey field is set. + */ + boolean hasBigQueryKey(); + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + * @return The bigQueryKey. + */ + com.google.privacy.dlp.v2.BigQueryKey getBigQueryKey(); + /** + * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; + */ + com.google.privacy.dlp.v2.BigQueryKeyOrBuilder getBigQueryKeyOrBuilder(); + + /** + *
+   * Values of identifying columns in the given row. Order of values matches
+   * the order of `identifying_fields` specified in the scanning request.
+   * 
+ * + * repeated string id_values = 5; + * @return A list containing the idValues. + */ + java.util.List + getIdValuesList(); + /** + *
+   * Values of identifying columns in the given row. Order of values matches
+   * the order of `identifying_fields` specified in the scanning request.
+   * 
+ * + * repeated string id_values = 5; + * @return The count of idValues. + */ + int getIdValuesCount(); + /** + *
+   * Values of identifying columns in the given row. Order of values matches
+   * the order of `identifying_fields` specified in the scanning request.
+   * 
+ * + * repeated string id_values = 5; + * @param index The index of the element to return. + * @return The idValues at the given index. + */ + java.lang.String getIdValues(int index); + /** + *
+   * Values of identifying columns in the given row. Order of values matches
+   * the order of `identifying_fields` specified in the scanning request.
+   * 
+ * + * repeated string id_values = 5; + * @param index The index of the value to return. + * @return The bytes of the idValues at the given index. + */ + com.google.protobuf.ByteString + getIdValuesBytes(int index); + + public com.google.privacy.dlp.v2.RecordKey.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocation.java new file mode 100644 index 000000000000..b6f7d8007915 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocation.java @@ -0,0 +1,1137 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Location of a finding within a row or record.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordLocation} + */ +public final class RecordLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordLocation) + RecordLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use RecordLocation.newBuilder() to construct. + private RecordLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordLocation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordLocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.RecordKey.Builder subBuilder = null; + if (recordKey_ != null) { + subBuilder = recordKey_.toBuilder(); + } + recordKey_ = input.readMessage(com.google.privacy.dlp.v2.RecordKey.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(recordKey_); + recordKey_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (fieldId_ != null) { + subBuilder = fieldId_.toBuilder(); + } + fieldId_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fieldId_); + fieldId_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.TableLocation.Builder subBuilder = null; + if (tableLocation_ != null) { + subBuilder = tableLocation_.toBuilder(); + } + tableLocation_ = input.readMessage(com.google.privacy.dlp.v2.TableLocation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableLocation_); + tableLocation_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordLocation.class, com.google.privacy.dlp.v2.RecordLocation.Builder.class); + } + + public static final int RECORD_KEY_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.RecordKey recordKey_; + /** + *
+   * Key of the finding.
+   * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + * @return Whether the recordKey field is set. + */ + @java.lang.Override + public boolean hasRecordKey() { + return recordKey_ != null; + } + /** + *
+   * Key of the finding.
+   * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + * @return The recordKey. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordKey getRecordKey() { + return recordKey_ == null ? com.google.privacy.dlp.v2.RecordKey.getDefaultInstance() : recordKey_; + } + /** + *
+   * Key of the finding.
+   * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordKeyOrBuilder getRecordKeyOrBuilder() { + return getRecordKey(); + } + + public static final int FIELD_ID_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.FieldId fieldId_; + /** + *
+   * Field id of the field containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + * @return Whether the fieldId field is set. + */ + @java.lang.Override + public boolean hasFieldId() { + return fieldId_ != null; + } + /** + *
+   * Field id of the field containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + * @return The fieldId. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getFieldId() { + return fieldId_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; + } + /** + *
+   * Field id of the field containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { + return getFieldId(); + } + + public static final int TABLE_LOCATION_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.TableLocation tableLocation_; + /** + *
+   * Location within a `ContentItem.Table`.
+   * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + * @return Whether the tableLocation field is set. + */ + @java.lang.Override + public boolean hasTableLocation() { + return tableLocation_ != null; + } + /** + *
+   * Location within a `ContentItem.Table`.
+   * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + * @return The tableLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableLocation getTableLocation() { + return tableLocation_ == null ? com.google.privacy.dlp.v2.TableLocation.getDefaultInstance() : tableLocation_; + } + /** + *
+   * Location within a `ContentItem.Table`.
+   * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableLocationOrBuilder getTableLocationOrBuilder() { + return getTableLocation(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (recordKey_ != null) { + output.writeMessage(1, getRecordKey()); + } + if (fieldId_ != null) { + output.writeMessage(2, getFieldId()); + } + if (tableLocation_ != null) { + output.writeMessage(3, getTableLocation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (recordKey_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRecordKey()); + } + if (fieldId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFieldId()); + } + if (tableLocation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTableLocation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RecordLocation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RecordLocation other = (com.google.privacy.dlp.v2.RecordLocation) obj; + + if (hasRecordKey() != other.hasRecordKey()) return false; + if (hasRecordKey()) { + if (!getRecordKey() + .equals(other.getRecordKey())) return false; + } + if (hasFieldId() != other.hasFieldId()) return false; + if (hasFieldId()) { + if (!getFieldId() + .equals(other.getFieldId())) return false; + } + if (hasTableLocation() != other.hasTableLocation()) return false; + if (hasTableLocation()) { + if (!getTableLocation() + .equals(other.getTableLocation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRecordKey()) { + hash = (37 * hash) + RECORD_KEY_FIELD_NUMBER; + hash = (53 * hash) + getRecordKey().hashCode(); + } + if (hasFieldId()) { + hash = (37 * hash) + FIELD_ID_FIELD_NUMBER; + hash = (53 * hash) + getFieldId().hashCode(); + } + if (hasTableLocation()) { + hash = (37 * hash) + TABLE_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getTableLocation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RecordLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Location of a finding within a row or record.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordLocation) + com.google.privacy.dlp.v2.RecordLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordLocation.class, com.google.privacy.dlp.v2.RecordLocation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RecordLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (recordKeyBuilder_ == null) { + recordKey_ = null; + } else { + recordKey_ = null; + recordKeyBuilder_ = null; + } + if (fieldIdBuilder_ == null) { + fieldId_ = null; + } else { + fieldId_ = null; + fieldIdBuilder_ = null; + } + if (tableLocationBuilder_ == null) { + tableLocation_ = null; + } else { + tableLocation_ = null; + tableLocationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordLocation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordLocation build() { + com.google.privacy.dlp.v2.RecordLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordLocation buildPartial() { + com.google.privacy.dlp.v2.RecordLocation result = new com.google.privacy.dlp.v2.RecordLocation(this); + if (recordKeyBuilder_ == null) { + result.recordKey_ = recordKey_; + } else { + result.recordKey_ = recordKeyBuilder_.build(); + } + if (fieldIdBuilder_ == null) { + result.fieldId_ = fieldId_; + } else { + result.fieldId_ = fieldIdBuilder_.build(); + } + if (tableLocationBuilder_ == null) { + result.tableLocation_ = tableLocation_; + } else { + result.tableLocation_ = tableLocationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RecordLocation) { + return mergeFrom((com.google.privacy.dlp.v2.RecordLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RecordLocation other) { + if (other == com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance()) return this; + if (other.hasRecordKey()) { + mergeRecordKey(other.getRecordKey()); + } + if (other.hasFieldId()) { + mergeFieldId(other.getFieldId()); + } + if (other.hasTableLocation()) { + mergeTableLocation(other.getTableLocation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RecordLocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RecordLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.RecordKey recordKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordKey, com.google.privacy.dlp.v2.RecordKey.Builder, com.google.privacy.dlp.v2.RecordKeyOrBuilder> recordKeyBuilder_; + /** + *
+     * Key of the finding.
+     * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + * @return Whether the recordKey field is set. + */ + public boolean hasRecordKey() { + return recordKeyBuilder_ != null || recordKey_ != null; + } + /** + *
+     * Key of the finding.
+     * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + * @return The recordKey. + */ + public com.google.privacy.dlp.v2.RecordKey getRecordKey() { + if (recordKeyBuilder_ == null) { + return recordKey_ == null ? com.google.privacy.dlp.v2.RecordKey.getDefaultInstance() : recordKey_; + } else { + return recordKeyBuilder_.getMessage(); + } + } + /** + *
+     * Key of the finding.
+     * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + */ + public Builder setRecordKey(com.google.privacy.dlp.v2.RecordKey value) { + if (recordKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recordKey_ = value; + onChanged(); + } else { + recordKeyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Key of the finding.
+     * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + */ + public Builder setRecordKey( + com.google.privacy.dlp.v2.RecordKey.Builder builderForValue) { + if (recordKeyBuilder_ == null) { + recordKey_ = builderForValue.build(); + onChanged(); + } else { + recordKeyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Key of the finding.
+     * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + */ + public Builder mergeRecordKey(com.google.privacy.dlp.v2.RecordKey value) { + if (recordKeyBuilder_ == null) { + if (recordKey_ != null) { + recordKey_ = + com.google.privacy.dlp.v2.RecordKey.newBuilder(recordKey_).mergeFrom(value).buildPartial(); + } else { + recordKey_ = value; + } + onChanged(); + } else { + recordKeyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Key of the finding.
+     * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + */ + public Builder clearRecordKey() { + if (recordKeyBuilder_ == null) { + recordKey_ = null; + onChanged(); + } else { + recordKey_ = null; + recordKeyBuilder_ = null; + } + + return this; + } + /** + *
+     * Key of the finding.
+     * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + */ + public com.google.privacy.dlp.v2.RecordKey.Builder getRecordKeyBuilder() { + + onChanged(); + return getRecordKeyFieldBuilder().getBuilder(); + } + /** + *
+     * Key of the finding.
+     * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + */ + public com.google.privacy.dlp.v2.RecordKeyOrBuilder getRecordKeyOrBuilder() { + if (recordKeyBuilder_ != null) { + return recordKeyBuilder_.getMessageOrBuilder(); + } else { + return recordKey_ == null ? + com.google.privacy.dlp.v2.RecordKey.getDefaultInstance() : recordKey_; + } + } + /** + *
+     * Key of the finding.
+     * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordKey, com.google.privacy.dlp.v2.RecordKey.Builder, com.google.privacy.dlp.v2.RecordKeyOrBuilder> + getRecordKeyFieldBuilder() { + if (recordKeyBuilder_ == null) { + recordKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordKey, com.google.privacy.dlp.v2.RecordKey.Builder, com.google.privacy.dlp.v2.RecordKeyOrBuilder>( + getRecordKey(), + getParentForChildren(), + isClean()); + recordKey_ = null; + } + return recordKeyBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId fieldId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldIdBuilder_; + /** + *
+     * Field id of the field containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + * @return Whether the fieldId field is set. + */ + public boolean hasFieldId() { + return fieldIdBuilder_ != null || fieldId_ != null; + } + /** + *
+     * Field id of the field containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + * @return The fieldId. + */ + public com.google.privacy.dlp.v2.FieldId getFieldId() { + if (fieldIdBuilder_ == null) { + return fieldId_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; + } else { + return fieldIdBuilder_.getMessage(); + } + } + /** + *
+     * Field id of the field containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + */ + public Builder setFieldId(com.google.privacy.dlp.v2.FieldId value) { + if (fieldIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldId_ = value; + onChanged(); + } else { + fieldIdBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Field id of the field containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + */ + public Builder setFieldId( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldIdBuilder_ == null) { + fieldId_ = builderForValue.build(); + onChanged(); + } else { + fieldIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Field id of the field containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + */ + public Builder mergeFieldId(com.google.privacy.dlp.v2.FieldId value) { + if (fieldIdBuilder_ == null) { + if (fieldId_ != null) { + fieldId_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(fieldId_).mergeFrom(value).buildPartial(); + } else { + fieldId_ = value; + } + onChanged(); + } else { + fieldIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Field id of the field containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + */ + public Builder clearFieldId() { + if (fieldIdBuilder_ == null) { + fieldId_ = null; + onChanged(); + } else { + fieldId_ = null; + fieldIdBuilder_ = null; + } + + return this; + } + /** + *
+     * Field id of the field containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldIdBuilder() { + + onChanged(); + return getFieldIdFieldBuilder().getBuilder(); + } + /** + *
+     * Field id of the field containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { + if (fieldIdBuilder_ != null) { + return fieldIdBuilder_.getMessageOrBuilder(); + } else { + return fieldId_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; + } + } + /** + *
+     * Field id of the field containing the finding.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldIdFieldBuilder() { + if (fieldIdBuilder_ == null) { + fieldIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getFieldId(), + getParentForChildren(), + isClean()); + fieldId_ = null; + } + return fieldIdBuilder_; + } + + private com.google.privacy.dlp.v2.TableLocation tableLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableLocation, com.google.privacy.dlp.v2.TableLocation.Builder, com.google.privacy.dlp.v2.TableLocationOrBuilder> tableLocationBuilder_; + /** + *
+     * Location within a `ContentItem.Table`.
+     * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + * @return Whether the tableLocation field is set. + */ + public boolean hasTableLocation() { + return tableLocationBuilder_ != null || tableLocation_ != null; + } + /** + *
+     * Location within a `ContentItem.Table`.
+     * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + * @return The tableLocation. + */ + public com.google.privacy.dlp.v2.TableLocation getTableLocation() { + if (tableLocationBuilder_ == null) { + return tableLocation_ == null ? com.google.privacy.dlp.v2.TableLocation.getDefaultInstance() : tableLocation_; + } else { + return tableLocationBuilder_.getMessage(); + } + } + /** + *
+     * Location within a `ContentItem.Table`.
+     * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + */ + public Builder setTableLocation(com.google.privacy.dlp.v2.TableLocation value) { + if (tableLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableLocation_ = value; + onChanged(); + } else { + tableLocationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Location within a `ContentItem.Table`.
+     * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + */ + public Builder setTableLocation( + com.google.privacy.dlp.v2.TableLocation.Builder builderForValue) { + if (tableLocationBuilder_ == null) { + tableLocation_ = builderForValue.build(); + onChanged(); + } else { + tableLocationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Location within a `ContentItem.Table`.
+     * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + */ + public Builder mergeTableLocation(com.google.privacy.dlp.v2.TableLocation value) { + if (tableLocationBuilder_ == null) { + if (tableLocation_ != null) { + tableLocation_ = + com.google.privacy.dlp.v2.TableLocation.newBuilder(tableLocation_).mergeFrom(value).buildPartial(); + } else { + tableLocation_ = value; + } + onChanged(); + } else { + tableLocationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Location within a `ContentItem.Table`.
+     * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + */ + public Builder clearTableLocation() { + if (tableLocationBuilder_ == null) { + tableLocation_ = null; + onChanged(); + } else { + tableLocation_ = null; + tableLocationBuilder_ = null; + } + + return this; + } + /** + *
+     * Location within a `ContentItem.Table`.
+     * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + */ + public com.google.privacy.dlp.v2.TableLocation.Builder getTableLocationBuilder() { + + onChanged(); + return getTableLocationFieldBuilder().getBuilder(); + } + /** + *
+     * Location within a `ContentItem.Table`.
+     * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + */ + public com.google.privacy.dlp.v2.TableLocationOrBuilder getTableLocationOrBuilder() { + if (tableLocationBuilder_ != null) { + return tableLocationBuilder_.getMessageOrBuilder(); + } else { + return tableLocation_ == null ? + com.google.privacy.dlp.v2.TableLocation.getDefaultInstance() : tableLocation_; + } + } + /** + *
+     * Location within a `ContentItem.Table`.
+     * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableLocation, com.google.privacy.dlp.v2.TableLocation.Builder, com.google.privacy.dlp.v2.TableLocationOrBuilder> + getTableLocationFieldBuilder() { + if (tableLocationBuilder_ == null) { + tableLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TableLocation, com.google.privacy.dlp.v2.TableLocation.Builder, com.google.privacy.dlp.v2.TableLocationOrBuilder>( + getTableLocation(), + getParentForChildren(), + isClean()); + tableLocation_ = null; + } + return tableLocationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordLocation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordLocation) + private static final com.google.privacy.dlp.v2.RecordLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordLocation(); + } + + public static com.google.privacy.dlp.v2.RecordLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordLocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocationOrBuilder.java new file mode 100644 index 000000000000..1c1cbc5bb9d5 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocationOrBuilder.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RecordLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Key of the finding.
+   * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + * @return Whether the recordKey field is set. + */ + boolean hasRecordKey(); + /** + *
+   * Key of the finding.
+   * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + * @return The recordKey. + */ + com.google.privacy.dlp.v2.RecordKey getRecordKey(); + /** + *
+   * Key of the finding.
+   * 
+ * + * .google.privacy.dlp.v2.RecordKey record_key = 1; + */ + com.google.privacy.dlp.v2.RecordKeyOrBuilder getRecordKeyOrBuilder(); + + /** + *
+   * Field id of the field containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + * @return Whether the fieldId field is set. + */ + boolean hasFieldId(); + /** + *
+   * Field id of the field containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + * @return The fieldId. + */ + com.google.privacy.dlp.v2.FieldId getFieldId(); + /** + *
+   * Field id of the field containing the finding.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 2; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder(); + + /** + *
+   * Location within a `ContentItem.Table`.
+   * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + * @return Whether the tableLocation field is set. + */ + boolean hasTableLocation(); + /** + *
+   * Location within a `ContentItem.Table`.
+   * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + * @return The tableLocation. + */ + com.google.privacy.dlp.v2.TableLocation getTableLocation(); + /** + *
+   * Location within a `ContentItem.Table`.
+   * 
+ * + * .google.privacy.dlp.v2.TableLocation table_location = 3; + */ + com.google.privacy.dlp.v2.TableLocationOrBuilder getTableLocationOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppression.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppression.java new file mode 100644 index 000000000000..11b598ec35a6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppression.java @@ -0,0 +1,679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Configuration to suppress records whose suppression conditions evaluate to
+ * true.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordSuppression} + */ +public final class RecordSuppression extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordSuppression) + RecordSuppressionOrBuilder { +private static final long serialVersionUID = 0L; + // Use RecordSuppression.newBuilder() to construct. + private RecordSuppression(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordSuppression() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordSuppression(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordSuppression( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.RecordCondition.Builder subBuilder = null; + if (condition_ != null) { + subBuilder = condition_.toBuilder(); + } + condition_ = input.readMessage(com.google.privacy.dlp.v2.RecordCondition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(condition_); + condition_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordSuppression.class, com.google.privacy.dlp.v2.RecordSuppression.Builder.class); + } + + public static final int CONDITION_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.RecordCondition condition_; + /** + *
+   * A condition that when it evaluates to true will result in the record being
+   * evaluated to be suppressed from the transformed content.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return condition_ != null; + } + /** + *
+   * A condition that when it evaluates to true will result in the record being
+   * evaluated to be suppressed from the transformed content.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + * @return The condition. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordCondition getCondition() { + return condition_ == null ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; + } + /** + *
+   * A condition that when it evaluates to true will result in the record being
+   * evaluated to be suppressed from the transformed content.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() { + return getCondition(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (condition_ != null) { + output.writeMessage(1, getCondition()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (condition_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCondition()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RecordSuppression)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RecordSuppression other = (com.google.privacy.dlp.v2.RecordSuppression) obj; + + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition() + .equals(other.getCondition())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordSuppression prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration to suppress records whose suppression conditions evaluate to
+   * true.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordSuppression} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordSuppression) + com.google.privacy.dlp.v2.RecordSuppressionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordSuppression.class, com.google.privacy.dlp.v2.RecordSuppression.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RecordSuppression.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (conditionBuilder_ == null) { + condition_ = null; + } else { + condition_ = null; + conditionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordSuppression getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordSuppression build() { + com.google.privacy.dlp.v2.RecordSuppression result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordSuppression buildPartial() { + com.google.privacy.dlp.v2.RecordSuppression result = new com.google.privacy.dlp.v2.RecordSuppression(this); + if (conditionBuilder_ == null) { + result.condition_ = condition_; + } else { + result.condition_ = conditionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RecordSuppression) { + return mergeFrom((com.google.privacy.dlp.v2.RecordSuppression)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RecordSuppression other) { + if (other == com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance()) return this; + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RecordSuppression parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RecordSuppression) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.RecordCondition condition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder> conditionBuilder_; + /** + *
+     * A condition that when it evaluates to true will result in the record being
+     * evaluated to be suppressed from the transformed content.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return conditionBuilder_ != null || condition_ != null; + } + /** + *
+     * A condition that when it evaluates to true will result in the record being
+     * evaluated to be suppressed from the transformed content.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + * @return The condition. + */ + public com.google.privacy.dlp.v2.RecordCondition getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + /** + *
+     * A condition that when it evaluates to true will result in the record being
+     * evaluated to be suppressed from the transformed content.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + */ + public Builder setCondition(com.google.privacy.dlp.v2.RecordCondition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + onChanged(); + } else { + conditionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A condition that when it evaluates to true will result in the record being
+     * evaluated to be suppressed from the transformed content.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + */ + public Builder setCondition( + com.google.privacy.dlp.v2.RecordCondition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + onChanged(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A condition that when it evaluates to true will result in the record being
+     * evaluated to be suppressed from the transformed content.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + */ + public Builder mergeCondition(com.google.privacy.dlp.v2.RecordCondition value) { + if (conditionBuilder_ == null) { + if (condition_ != null) { + condition_ = + com.google.privacy.dlp.v2.RecordCondition.newBuilder(condition_).mergeFrom(value).buildPartial(); + } else { + condition_ = value; + } + onChanged(); + } else { + conditionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A condition that when it evaluates to true will result in the record being
+     * evaluated to be suppressed from the transformed content.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + */ + public Builder clearCondition() { + if (conditionBuilder_ == null) { + condition_ = null; + onChanged(); + } else { + condition_ = null; + conditionBuilder_ = null; + } + + return this; + } + /** + *
+     * A condition that when it evaluates to true will result in the record being
+     * evaluated to be suppressed from the transformed content.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + */ + public com.google.privacy.dlp.v2.RecordCondition.Builder getConditionBuilder() { + + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + /** + *
+     * A condition that when it evaluates to true will result in the record being
+     * evaluated to be suppressed from the transformed content.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + */ + public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null ? + com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; + } + } + /** + *
+     * A condition that when it evaluates to true will result in the record being
+     * evaluated to be suppressed from the transformed content.
+     * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder>( + getCondition(), + getParentForChildren(), + isClean()); + condition_ = null; + } + return conditionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordSuppression) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordSuppression) + private static final com.google.privacy.dlp.v2.RecordSuppression DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordSuppression(); + } + + public static com.google.privacy.dlp.v2.RecordSuppression getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordSuppression parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordSuppression(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordSuppression getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppressionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppressionOrBuilder.java new file mode 100644 index 000000000000..70c511b76c5a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppressionOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RecordSuppressionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordSuppression) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A condition that when it evaluates to true will result in the record being
+   * evaluated to be suppressed from the transformed content.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + * @return Whether the condition field is set. + */ + boolean hasCondition(); + /** + *
+   * A condition that when it evaluates to true will result in the record being
+   * evaluated to be suppressed from the transformed content.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + * @return The condition. + */ + com.google.privacy.dlp.v2.RecordCondition getCondition(); + /** + *
+   * A condition that when it evaluates to true will result in the record being
+   * evaluated to be suppressed from the transformed content.
+   * 
+ * + * .google.privacy.dlp.v2.RecordCondition condition = 1; + */ + com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java new file mode 100644 index 000000000000..a0e1b01e8622 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java @@ -0,0 +1,1059 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + * Protobuf type {@code google.privacy.dlp.v2.RecordTransformation} + */ +public final class RecordTransformation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordTransformation) + RecordTransformationOrBuilder { +private static final long serialVersionUID = 0L; + // Use RecordTransformation.newBuilder() to construct. + private RecordTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordTransformation() { + containerVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordTransformation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordTransformation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (fieldId_ != null) { + subBuilder = fieldId_.toBuilder(); + } + fieldId_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fieldId_); + fieldId_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (containerTimestamp_ != null) { + subBuilder = containerTimestamp_.toBuilder(); + } + containerTimestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(containerTimestamp_); + containerTimestamp_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + containerVersion_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordTransformation.class, com.google.privacy.dlp.v2.RecordTransformation.Builder.class); + } + + public static final int FIELD_ID_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId fieldId_; + /** + *
+   * For record transformations, provide a field.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + * @return Whether the fieldId field is set. + */ + @java.lang.Override + public boolean hasFieldId() { + return fieldId_ != null; + } + /** + *
+   * For record transformations, provide a field.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + * @return The fieldId. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getFieldId() { + return fieldId_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; + } + /** + *
+   * For record transformations, provide a field.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { + return getFieldId(); + } + + public static final int CONTAINER_TIMESTAMP_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp containerTimestamp_; + /** + *
+   * Findings container modification timestamp, if applicable.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + * @return Whether the containerTimestamp field is set. + */ + @java.lang.Override + public boolean hasContainerTimestamp() { + return containerTimestamp_ != null; + } + /** + *
+   * Findings container modification timestamp, if applicable.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + * @return The containerTimestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getContainerTimestamp() { + return containerTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; + } + /** + *
+   * Findings container modification timestamp, if applicable.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { + return getContainerTimestamp(); + } + + public static final int CONTAINER_VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object containerVersion_; + /** + *
+   * Container version, if available ("generation" for Cloud Storage).
+   * 
+ * + * string container_version = 3; + * @return The containerVersion. + */ + @java.lang.Override + public java.lang.String getContainerVersion() { + java.lang.Object ref = containerVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerVersion_ = s; + return s; + } + } + /** + *
+   * Container version, if available ("generation" for Cloud Storage).
+   * 
+ * + * string container_version = 3; + * @return The bytes for containerVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerVersionBytes() { + java.lang.Object ref = containerVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (fieldId_ != null) { + output.writeMessage(1, getFieldId()); + } + if (containerTimestamp_ != null) { + output.writeMessage(2, getContainerTimestamp()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, containerVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fieldId_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFieldId()); + } + if (containerTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getContainerTimestamp()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, containerVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RecordTransformation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RecordTransformation other = (com.google.privacy.dlp.v2.RecordTransformation) obj; + + if (hasFieldId() != other.hasFieldId()) return false; + if (hasFieldId()) { + if (!getFieldId() + .equals(other.getFieldId())) return false; + } + if (hasContainerTimestamp() != other.hasContainerTimestamp()) return false; + if (hasContainerTimestamp()) { + if (!getContainerTimestamp() + .equals(other.getContainerTimestamp())) return false; + } + if (!getContainerVersion() + .equals(other.getContainerVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFieldId()) { + hash = (37 * hash) + FIELD_ID_FIELD_NUMBER; + hash = (53 * hash) + getFieldId().hashCode(); + } + if (hasContainerTimestamp()) { + hash = (37 * hash) + CONTAINER_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getContainerTimestamp().hashCode(); + } + hash = (37 * hash) + CONTAINER_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getContainerVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordTransformation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.privacy.dlp.v2.RecordTransformation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordTransformation) + com.google.privacy.dlp.v2.RecordTransformationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordTransformation.class, com.google.privacy.dlp.v2.RecordTransformation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RecordTransformation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldIdBuilder_ == null) { + fieldId_ = null; + } else { + fieldId_ = null; + fieldIdBuilder_ = null; + } + if (containerTimestampBuilder_ == null) { + containerTimestamp_ = null; + } else { + containerTimestamp_ = null; + containerTimestampBuilder_ = null; + } + containerVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformation build() { + com.google.privacy.dlp.v2.RecordTransformation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformation buildPartial() { + com.google.privacy.dlp.v2.RecordTransformation result = new com.google.privacy.dlp.v2.RecordTransformation(this); + if (fieldIdBuilder_ == null) { + result.fieldId_ = fieldId_; + } else { + result.fieldId_ = fieldIdBuilder_.build(); + } + if (containerTimestampBuilder_ == null) { + result.containerTimestamp_ = containerTimestamp_; + } else { + result.containerTimestamp_ = containerTimestampBuilder_.build(); + } + result.containerVersion_ = containerVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RecordTransformation) { + return mergeFrom((com.google.privacy.dlp.v2.RecordTransformation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RecordTransformation other) { + if (other == com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance()) return this; + if (other.hasFieldId()) { + mergeFieldId(other.getFieldId()); + } + if (other.hasContainerTimestamp()) { + mergeContainerTimestamp(other.getContainerTimestamp()); + } + if (!other.getContainerVersion().isEmpty()) { + containerVersion_ = other.containerVersion_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RecordTransformation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RecordTransformation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.FieldId fieldId_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldIdBuilder_; + /** + *
+     * For record transformations, provide a field.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + * @return Whether the fieldId field is set. + */ + public boolean hasFieldId() { + return fieldIdBuilder_ != null || fieldId_ != null; + } + /** + *
+     * For record transformations, provide a field.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + * @return The fieldId. + */ + public com.google.privacy.dlp.v2.FieldId getFieldId() { + if (fieldIdBuilder_ == null) { + return fieldId_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; + } else { + return fieldIdBuilder_.getMessage(); + } + } + /** + *
+     * For record transformations, provide a field.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + */ + public Builder setFieldId(com.google.privacy.dlp.v2.FieldId value) { + if (fieldIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldId_ = value; + onChanged(); + } else { + fieldIdBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * For record transformations, provide a field.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + */ + public Builder setFieldId( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldIdBuilder_ == null) { + fieldId_ = builderForValue.build(); + onChanged(); + } else { + fieldIdBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * For record transformations, provide a field.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + */ + public Builder mergeFieldId(com.google.privacy.dlp.v2.FieldId value) { + if (fieldIdBuilder_ == null) { + if (fieldId_ != null) { + fieldId_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(fieldId_).mergeFrom(value).buildPartial(); + } else { + fieldId_ = value; + } + onChanged(); + } else { + fieldIdBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * For record transformations, provide a field.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + */ + public Builder clearFieldId() { + if (fieldIdBuilder_ == null) { + fieldId_ = null; + onChanged(); + } else { + fieldId_ = null; + fieldIdBuilder_ = null; + } + + return this; + } + /** + *
+     * For record transformations, provide a field.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldIdBuilder() { + + onChanged(); + return getFieldIdFieldBuilder().getBuilder(); + } + /** + *
+     * For record transformations, provide a field.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { + if (fieldIdBuilder_ != null) { + return fieldIdBuilder_.getMessageOrBuilder(); + } else { + return fieldId_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; + } + } + /** + *
+     * For record transformations, provide a field.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldIdFieldBuilder() { + if (fieldIdBuilder_ == null) { + fieldIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getFieldId(), + getParentForChildren(), + isClean()); + fieldId_ = null; + } + return fieldIdBuilder_; + } + + private com.google.protobuf.Timestamp containerTimestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> containerTimestampBuilder_; + /** + *
+     * Findings container modification timestamp, if applicable.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + * @return Whether the containerTimestamp field is set. + */ + public boolean hasContainerTimestamp() { + return containerTimestampBuilder_ != null || containerTimestamp_ != null; + } + /** + *
+     * Findings container modification timestamp, if applicable.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + * @return The containerTimestamp. + */ + public com.google.protobuf.Timestamp getContainerTimestamp() { + if (containerTimestampBuilder_ == null) { + return containerTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; + } else { + return containerTimestampBuilder_.getMessage(); + } + } + /** + *
+     * Findings container modification timestamp, if applicable.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + */ + public Builder setContainerTimestamp(com.google.protobuf.Timestamp value) { + if (containerTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + containerTimestamp_ = value; + onChanged(); + } else { + containerTimestampBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Findings container modification timestamp, if applicable.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + */ + public Builder setContainerTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (containerTimestampBuilder_ == null) { + containerTimestamp_ = builderForValue.build(); + onChanged(); + } else { + containerTimestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Findings container modification timestamp, if applicable.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + */ + public Builder mergeContainerTimestamp(com.google.protobuf.Timestamp value) { + if (containerTimestampBuilder_ == null) { + if (containerTimestamp_ != null) { + containerTimestamp_ = + com.google.protobuf.Timestamp.newBuilder(containerTimestamp_).mergeFrom(value).buildPartial(); + } else { + containerTimestamp_ = value; + } + onChanged(); + } else { + containerTimestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Findings container modification timestamp, if applicable.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + */ + public Builder clearContainerTimestamp() { + if (containerTimestampBuilder_ == null) { + containerTimestamp_ = null; + onChanged(); + } else { + containerTimestamp_ = null; + containerTimestampBuilder_ = null; + } + + return this; + } + /** + *
+     * Findings container modification timestamp, if applicable.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + */ + public com.google.protobuf.Timestamp.Builder getContainerTimestampBuilder() { + + onChanged(); + return getContainerTimestampFieldBuilder().getBuilder(); + } + /** + *
+     * Findings container modification timestamp, if applicable.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + */ + public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { + if (containerTimestampBuilder_ != null) { + return containerTimestampBuilder_.getMessageOrBuilder(); + } else { + return containerTimestamp_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; + } + } + /** + *
+     * Findings container modification timestamp, if applicable.
+     * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getContainerTimestampFieldBuilder() { + if (containerTimestampBuilder_ == null) { + containerTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getContainerTimestamp(), + getParentForChildren(), + isClean()); + containerTimestamp_ = null; + } + return containerTimestampBuilder_; + } + + private java.lang.Object containerVersion_ = ""; + /** + *
+     * Container version, if available ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 3; + * @return The containerVersion. + */ + public java.lang.String getContainerVersion() { + java.lang.Object ref = containerVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Container version, if available ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 3; + * @return The bytes for containerVersion. + */ + public com.google.protobuf.ByteString + getContainerVersionBytes() { + java.lang.Object ref = containerVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Container version, if available ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 3; + * @param value The containerVersion to set. + * @return This builder for chaining. + */ + public Builder setContainerVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerVersion_ = value; + onChanged(); + return this; + } + /** + *
+     * Container version, if available ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 3; + * @return This builder for chaining. + */ + public Builder clearContainerVersion() { + + containerVersion_ = getDefaultInstance().getContainerVersion(); + onChanged(); + return this; + } + /** + *
+     * Container version, if available ("generation" for Cloud Storage).
+     * 
+ * + * string container_version = 3; + * @param value The bytes for containerVersion to set. + * @return This builder for chaining. + */ + public Builder setContainerVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerVersion_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordTransformation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordTransformation) + private static final com.google.privacy.dlp.v2.RecordTransformation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordTransformation(); + } + + public static com.google.privacy.dlp.v2.RecordTransformation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordTransformation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java new file mode 100644 index 000000000000..0d0990a303ca --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RecordTransformationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordTransformation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * For record transformations, provide a field.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + * @return Whether the fieldId field is set. + */ + boolean hasFieldId(); + /** + *
+   * For record transformations, provide a field.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + * @return The fieldId. + */ + com.google.privacy.dlp.v2.FieldId getFieldId(); + /** + *
+   * For record transformations, provide a field.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field_id = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder(); + + /** + *
+   * Findings container modification timestamp, if applicable.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + * @return Whether the containerTimestamp field is set. + */ + boolean hasContainerTimestamp(); + /** + *
+   * Findings container modification timestamp, if applicable.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + * @return The containerTimestamp. + */ + com.google.protobuf.Timestamp getContainerTimestamp(); + /** + *
+   * Findings container modification timestamp, if applicable.
+   * 
+ * + * .google.protobuf.Timestamp container_timestamp = 2; + */ + com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder(); + + /** + *
+   * Container version, if available ("generation" for Cloud Storage).
+   * 
+ * + * string container_version = 3; + * @return The containerVersion. + */ + java.lang.String getContainerVersion(); + /** + *
+   * Container version, if available ("generation" for Cloud Storage).
+   * 
+ * + * string container_version = 3; + * @return The bytes for containerVersion. + */ + com.google.protobuf.ByteString + getContainerVersionBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformations.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformations.java new file mode 100644 index 000000000000..593d41c452c7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformations.java @@ -0,0 +1,1337 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A type of transformation that is applied over structured data such as a
+ * table.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordTransformations} + */ +public final class RecordTransformations extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordTransformations) + RecordTransformationsOrBuilder { +private static final long serialVersionUID = 0L; + // Use RecordTransformations.newBuilder() to construct. + private RecordTransformations(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RecordTransformations() { + fieldTransformations_ = java.util.Collections.emptyList(); + recordSuppressions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RecordTransformations(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RecordTransformations( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fieldTransformations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fieldTransformations_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldTransformation.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + recordSuppressions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + recordSuppressions_.add( + input.readMessage(com.google.privacy.dlp.v2.RecordSuppression.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fieldTransformations_ = java.util.Collections.unmodifiableList(fieldTransformations_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + recordSuppressions_ = java.util.Collections.unmodifiableList(recordSuppressions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordTransformations.class, com.google.privacy.dlp.v2.RecordTransformations.Builder.class); + } + + public static final int FIELD_TRANSFORMATIONS_FIELD_NUMBER = 1; + private java.util.List fieldTransformations_; + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + @java.lang.Override + public java.util.List getFieldTransformationsList() { + return fieldTransformations_; + } + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + @java.lang.Override + public java.util.List + getFieldTransformationsOrBuilderList() { + return fieldTransformations_; + } + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + @java.lang.Override + public int getFieldTransformationsCount() { + return fieldTransformations_.size(); + } + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index) { + return fieldTransformations_.get(index); + } + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( + int index) { + return fieldTransformations_.get(index); + } + + public static final int RECORD_SUPPRESSIONS_FIELD_NUMBER = 2; + private java.util.List recordSuppressions_; + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + @java.lang.Override + public java.util.List getRecordSuppressionsList() { + return recordSuppressions_; + } + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + @java.lang.Override + public java.util.List + getRecordSuppressionsOrBuilderList() { + return recordSuppressions_; + } + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + @java.lang.Override + public int getRecordSuppressionsCount() { + return recordSuppressions_.size(); + } + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordSuppression getRecordSuppressions(int index) { + return recordSuppressions_.get(index); + } + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressionsOrBuilder( + int index) { + return recordSuppressions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < fieldTransformations_.size(); i++) { + output.writeMessage(1, fieldTransformations_.get(i)); + } + for (int i = 0; i < recordSuppressions_.size(); i++) { + output.writeMessage(2, recordSuppressions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fieldTransformations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fieldTransformations_.get(i)); + } + for (int i = 0; i < recordSuppressions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, recordSuppressions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RecordTransformations)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RecordTransformations other = (com.google.privacy.dlp.v2.RecordTransformations) obj; + + if (!getFieldTransformationsList() + .equals(other.getFieldTransformationsList())) return false; + if (!getRecordSuppressionsList() + .equals(other.getRecordSuppressionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldTransformationsCount() > 0) { + hash = (37 * hash) + FIELD_TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFieldTransformationsList().hashCode(); + } + if (getRecordSuppressionsCount() > 0) { + hash = (37 * hash) + RECORD_SUPPRESSIONS_FIELD_NUMBER; + hash = (53 * hash) + getRecordSuppressionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordTransformations prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A type of transformation that is applied over structured data such as a
+   * table.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RecordTransformations} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordTransformations) + com.google.privacy.dlp.v2.RecordTransformationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RecordTransformations.class, com.google.privacy.dlp.v2.RecordTransformations.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RecordTransformations.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFieldTransformationsFieldBuilder(); + getRecordSuppressionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldTransformationsBuilder_ == null) { + fieldTransformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldTransformationsBuilder_.clear(); + } + if (recordSuppressionsBuilder_ == null) { + recordSuppressions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + recordSuppressionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformations getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformations build() { + com.google.privacy.dlp.v2.RecordTransformations result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformations buildPartial() { + com.google.privacy.dlp.v2.RecordTransformations result = new com.google.privacy.dlp.v2.RecordTransformations(this); + int from_bitField0_ = bitField0_; + if (fieldTransformationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fieldTransformations_ = java.util.Collections.unmodifiableList(fieldTransformations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fieldTransformations_ = fieldTransformations_; + } else { + result.fieldTransformations_ = fieldTransformationsBuilder_.build(); + } + if (recordSuppressionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + recordSuppressions_ = java.util.Collections.unmodifiableList(recordSuppressions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.recordSuppressions_ = recordSuppressions_; + } else { + result.recordSuppressions_ = recordSuppressionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RecordTransformations) { + return mergeFrom((com.google.privacy.dlp.v2.RecordTransformations)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RecordTransformations other) { + if (other == com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance()) return this; + if (fieldTransformationsBuilder_ == null) { + if (!other.fieldTransformations_.isEmpty()) { + if (fieldTransformations_.isEmpty()) { + fieldTransformations_ = other.fieldTransformations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.addAll(other.fieldTransformations_); + } + onChanged(); + } + } else { + if (!other.fieldTransformations_.isEmpty()) { + if (fieldTransformationsBuilder_.isEmpty()) { + fieldTransformationsBuilder_.dispose(); + fieldTransformationsBuilder_ = null; + fieldTransformations_ = other.fieldTransformations_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldTransformationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFieldTransformationsFieldBuilder() : null; + } else { + fieldTransformationsBuilder_.addAllMessages(other.fieldTransformations_); + } + } + } + if (recordSuppressionsBuilder_ == null) { + if (!other.recordSuppressions_.isEmpty()) { + if (recordSuppressions_.isEmpty()) { + recordSuppressions_ = other.recordSuppressions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRecordSuppressionsIsMutable(); + recordSuppressions_.addAll(other.recordSuppressions_); + } + onChanged(); + } + } else { + if (!other.recordSuppressions_.isEmpty()) { + if (recordSuppressionsBuilder_.isEmpty()) { + recordSuppressionsBuilder_.dispose(); + recordSuppressionsBuilder_ = null; + recordSuppressions_ = other.recordSuppressions_; + bitField0_ = (bitField0_ & ~0x00000002); + recordSuppressionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRecordSuppressionsFieldBuilder() : null; + } else { + recordSuppressionsBuilder_.addAllMessages(other.recordSuppressions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RecordTransformations parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RecordTransformations) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List fieldTransformations_ = + java.util.Collections.emptyList(); + private void ensureFieldTransformationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fieldTransformations_ = new java.util.ArrayList(fieldTransformations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder> fieldTransformationsBuilder_; + + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public java.util.List getFieldTransformationsList() { + if (fieldTransformationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fieldTransformations_); + } else { + return fieldTransformationsBuilder_.getMessageList(); + } + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public int getFieldTransformationsCount() { + if (fieldTransformationsBuilder_ == null) { + return fieldTransformations_.size(); + } else { + return fieldTransformationsBuilder_.getCount(); + } + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index) { + if (fieldTransformationsBuilder_ == null) { + return fieldTransformations_.get(index); + } else { + return fieldTransformationsBuilder_.getMessage(index); + } + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public Builder setFieldTransformations( + int index, com.google.privacy.dlp.v2.FieldTransformation value) { + if (fieldTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldTransformationsIsMutable(); + fieldTransformations_.set(index, value); + onChanged(); + } else { + fieldTransformationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public Builder setFieldTransformations( + int index, com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldTransformationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public Builder addFieldTransformations(com.google.privacy.dlp.v2.FieldTransformation value) { + if (fieldTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldTransformationsIsMutable(); + fieldTransformations_.add(value); + onChanged(); + } else { + fieldTransformationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public Builder addFieldTransformations( + int index, com.google.privacy.dlp.v2.FieldTransformation value) { + if (fieldTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldTransformationsIsMutable(); + fieldTransformations_.add(index, value); + onChanged(); + } else { + fieldTransformationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public Builder addFieldTransformations( + com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.add(builderForValue.build()); + onChanged(); + } else { + fieldTransformationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public Builder addFieldTransformations( + int index, com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldTransformationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public Builder addAllFieldTransformations( + java.lang.Iterable values) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fieldTransformations_); + onChanged(); + } else { + fieldTransformationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public Builder clearFieldTransformations() { + if (fieldTransformationsBuilder_ == null) { + fieldTransformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldTransformationsBuilder_.clear(); + } + return this; + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public Builder removeFieldTransformations(int index) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.remove(index); + onChanged(); + } else { + fieldTransformationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public com.google.privacy.dlp.v2.FieldTransformation.Builder getFieldTransformationsBuilder( + int index) { + return getFieldTransformationsFieldBuilder().getBuilder(index); + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( + int index) { + if (fieldTransformationsBuilder_ == null) { + return fieldTransformations_.get(index); } else { + return fieldTransformationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public java.util.List + getFieldTransformationsOrBuilderList() { + if (fieldTransformationsBuilder_ != null) { + return fieldTransformationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fieldTransformations_); + } + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public com.google.privacy.dlp.v2.FieldTransformation.Builder addFieldTransformationsBuilder() { + return getFieldTransformationsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()); + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public com.google.privacy.dlp.v2.FieldTransformation.Builder addFieldTransformationsBuilder( + int index) { + return getFieldTransformationsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()); + } + /** + *
+     * Transform the record by applying various field transformations.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + public java.util.List + getFieldTransformationsBuilderList() { + return getFieldTransformationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder> + getFieldTransformationsFieldBuilder() { + if (fieldTransformationsBuilder_ == null) { + fieldTransformationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder>( + fieldTransformations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fieldTransformations_ = null; + } + return fieldTransformationsBuilder_; + } + + private java.util.List recordSuppressions_ = + java.util.Collections.emptyList(); + private void ensureRecordSuppressionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + recordSuppressions_ = new java.util.ArrayList(recordSuppressions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder> recordSuppressionsBuilder_; + + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public java.util.List getRecordSuppressionsList() { + if (recordSuppressionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(recordSuppressions_); + } else { + return recordSuppressionsBuilder_.getMessageList(); + } + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public int getRecordSuppressionsCount() { + if (recordSuppressionsBuilder_ == null) { + return recordSuppressions_.size(); + } else { + return recordSuppressionsBuilder_.getCount(); + } + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public com.google.privacy.dlp.v2.RecordSuppression getRecordSuppressions(int index) { + if (recordSuppressionsBuilder_ == null) { + return recordSuppressions_.get(index); + } else { + return recordSuppressionsBuilder_.getMessage(index); + } + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public Builder setRecordSuppressions( + int index, com.google.privacy.dlp.v2.RecordSuppression value) { + if (recordSuppressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordSuppressionsIsMutable(); + recordSuppressions_.set(index, value); + onChanged(); + } else { + recordSuppressionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public Builder setRecordSuppressions( + int index, com.google.privacy.dlp.v2.RecordSuppression.Builder builderForValue) { + if (recordSuppressionsBuilder_ == null) { + ensureRecordSuppressionsIsMutable(); + recordSuppressions_.set(index, builderForValue.build()); + onChanged(); + } else { + recordSuppressionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public Builder addRecordSuppressions(com.google.privacy.dlp.v2.RecordSuppression value) { + if (recordSuppressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordSuppressionsIsMutable(); + recordSuppressions_.add(value); + onChanged(); + } else { + recordSuppressionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public Builder addRecordSuppressions( + int index, com.google.privacy.dlp.v2.RecordSuppression value) { + if (recordSuppressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordSuppressionsIsMutable(); + recordSuppressions_.add(index, value); + onChanged(); + } else { + recordSuppressionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public Builder addRecordSuppressions( + com.google.privacy.dlp.v2.RecordSuppression.Builder builderForValue) { + if (recordSuppressionsBuilder_ == null) { + ensureRecordSuppressionsIsMutable(); + recordSuppressions_.add(builderForValue.build()); + onChanged(); + } else { + recordSuppressionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public Builder addRecordSuppressions( + int index, com.google.privacy.dlp.v2.RecordSuppression.Builder builderForValue) { + if (recordSuppressionsBuilder_ == null) { + ensureRecordSuppressionsIsMutable(); + recordSuppressions_.add(index, builderForValue.build()); + onChanged(); + } else { + recordSuppressionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public Builder addAllRecordSuppressions( + java.lang.Iterable values) { + if (recordSuppressionsBuilder_ == null) { + ensureRecordSuppressionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, recordSuppressions_); + onChanged(); + } else { + recordSuppressionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public Builder clearRecordSuppressions() { + if (recordSuppressionsBuilder_ == null) { + recordSuppressions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + recordSuppressionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public Builder removeRecordSuppressions(int index) { + if (recordSuppressionsBuilder_ == null) { + ensureRecordSuppressionsIsMutable(); + recordSuppressions_.remove(index); + onChanged(); + } else { + recordSuppressionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public com.google.privacy.dlp.v2.RecordSuppression.Builder getRecordSuppressionsBuilder( + int index) { + return getRecordSuppressionsFieldBuilder().getBuilder(index); + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressionsOrBuilder( + int index) { + if (recordSuppressionsBuilder_ == null) { + return recordSuppressions_.get(index); } else { + return recordSuppressionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public java.util.List + getRecordSuppressionsOrBuilderList() { + if (recordSuppressionsBuilder_ != null) { + return recordSuppressionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(recordSuppressions_); + } + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public com.google.privacy.dlp.v2.RecordSuppression.Builder addRecordSuppressionsBuilder() { + return getRecordSuppressionsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance()); + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public com.google.privacy.dlp.v2.RecordSuppression.Builder addRecordSuppressionsBuilder( + int index) { + return getRecordSuppressionsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance()); + } + /** + *
+     * Configuration defining which records get suppressed entirely. Records that
+     * match any suppression rule are omitted from the output.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + public java.util.List + getRecordSuppressionsBuilderList() { + return getRecordSuppressionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder> + getRecordSuppressionsFieldBuilder() { + if (recordSuppressionsBuilder_ == null) { + recordSuppressionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder>( + recordSuppressions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + recordSuppressions_ = null; + } + return recordSuppressionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordTransformations) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordTransformations) + private static final com.google.privacy.dlp.v2.RecordTransformations DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordTransformations(); + } + + public static com.google.privacy.dlp.v2.RecordTransformations getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordTransformations parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordTransformations(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformations getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationsOrBuilder.java new file mode 100644 index 000000000000..a6934a379fce --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationsOrBuilder.java @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RecordTransformationsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordTransformations) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + java.util.List + getFieldTransformationsList(); + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index); + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + int getFieldTransformationsCount(); + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + java.util.List + getFieldTransformationsOrBuilderList(); + /** + *
+   * Transform the record by applying various field transformations.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; + */ + com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( + int index); + + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + java.util.List + getRecordSuppressionsList(); + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + com.google.privacy.dlp.v2.RecordSuppression getRecordSuppressions(int index); + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + int getRecordSuppressionsCount(); + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + java.util.List + getRecordSuppressionsOrBuilderList(); + /** + *
+   * Configuration defining which records get suppressed entirely. Records that
+   * match any suppression rule are omitted from the output.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; + */ + com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressionsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfig.java new file mode 100644 index 000000000000..69e2e888f511 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfig.java @@ -0,0 +1,433 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Redact a given value. For example, if used with an `InfoTypeTransformation`
+ * transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the
+ * output would be 'My phone number is '.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RedactConfig} + */ +public final class RedactConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactConfig) + RedactConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use RedactConfig.newBuilder() to construct. + private RedactConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RedactConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RedactConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RedactConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RedactConfig.class, com.google.privacy.dlp.v2.RedactConfig.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RedactConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RedactConfig other = (com.google.privacy.dlp.v2.RedactConfig) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RedactConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RedactConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Redact a given value. For example, if used with an `InfoTypeTransformation`
+   * transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the
+   * output would be 'My phone number is '.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RedactConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactConfig) + com.google.privacy.dlp.v2.RedactConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RedactConfig.class, com.google.privacy.dlp.v2.RedactConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RedactConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactConfig build() { + com.google.privacy.dlp.v2.RedactConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactConfig buildPartial() { + com.google.privacy.dlp.v2.RedactConfig result = new com.google.privacy.dlp.v2.RedactConfig(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RedactConfig) { + return mergeFrom((com.google.privacy.dlp.v2.RedactConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RedactConfig other) { + if (other == com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RedactConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RedactConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactConfig) + private static final com.google.privacy.dlp.v2.RedactConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactConfig(); + } + + public static com.google.privacy.dlp.v2.RedactConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RedactConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RedactConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfigOrBuilder.java new file mode 100644 index 000000000000..5bbd13c06ac8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfigOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RedactConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactConfig) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java new file mode 100644 index 000000000000..54c3f7a559d9 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java @@ -0,0 +1,3097 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request to search for potentially sensitive info in an image and redact it
+ * by covering it with a colored rectangle.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest} + */ +public final class RedactImageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageRequest) + RedactImageRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RedactImageRequest.newBuilder() to construct. + private RedactImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RedactImageRequest() { + parent_ = ""; + locationId_ = ""; + imageRedactionConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RedactImageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RedactImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; + if (inspectConfig_ != null) { + subBuilder = inspectConfig_.toBuilder(); + } + inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectConfig_); + inspectConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + imageRedactionConfigs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + imageRedactionConfigs_.add( + input.readMessage(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.parser(), extensionRegistry)); + break; + } + case 48: { + + includeFindings_ = input.readBool(); + break; + } + case 58: { + com.google.privacy.dlp.v2.ByteContentItem.Builder subBuilder = null; + if (byteItem_ != null) { + subBuilder = byteItem_.toBuilder(); + } + byteItem_ = input.readMessage(com.google.privacy.dlp.v2.ByteContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(byteItem_); + byteItem_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + imageRedactionConfigs_ = java.util.Collections.unmodifiableList(imageRedactionConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RedactImageRequest.class, com.google.privacy.dlp.v2.RedactImageRequest.Builder.class); + } + + public interface ImageRedactionConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Only one per info_type should be provided per request. If not
+     * specified, and redact_all_text is false, the DLP API will redact all
+     * text that it matches against all info_types that are found, but not
+     * specified in another ImageRedactionConfig.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+     * Only one per info_type should be provided per request. If not
+     * specified, and redact_all_text is false, the DLP API will redact all
+     * text that it matches against all info_types that are found, but not
+     * specified in another ImageRedactionConfig.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+     * Only one per info_type should be provided per request. If not
+     * specified, and redact_all_text is false, the DLP API will redact all
+     * text that it matches against all info_types that are found, but not
+     * specified in another ImageRedactionConfig.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+     * If true, all text found in the image, regardless whether it matches an
+     * info_type, is redacted. Only one should be provided.
+     * 
+ * + * bool redact_all_text = 2; + * @return Whether the redactAllText field is set. + */ + boolean hasRedactAllText(); + /** + *
+     * If true, all text found in the image, regardless whether it matches an
+     * info_type, is redacted. Only one should be provided.
+     * 
+ * + * bool redact_all_text = 2; + * @return The redactAllText. + */ + boolean getRedactAllText(); + + /** + *
+     * The color to use when redacting content from an image. If not specified,
+     * the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return Whether the redactionColor field is set. + */ + boolean hasRedactionColor(); + /** + *
+     * The color to use when redacting content from an image. If not specified,
+     * the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return The redactionColor. + */ + com.google.privacy.dlp.v2.Color getRedactionColor(); + /** + *
+     * The color to use when redacting content from an image. If not specified,
+     * the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder(); + + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.TargetCase getTargetCase(); + } + /** + *
+   * Configuration for determining how redaction of images should occur.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig} + */ + public static final class ImageRedactionConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) + ImageRedactionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageRedactionConfig.newBuilder() to construct. + private ImageRedactionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ImageRedactionConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ImageRedactionConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ImageRedactionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (targetCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.InfoType) target_).toBuilder(); + } + target_ = + input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoType) target_); + target_ = subBuilder.buildPartial(); + } + targetCase_ = 1; + break; + } + case 16: { + target_ = input.readBool(); + targetCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.Color.Builder subBuilder = null; + if (redactionColor_ != null) { + subBuilder = redactionColor_.toBuilder(); + } + redactionColor_ = input.readMessage(com.google.privacy.dlp.v2.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(redactionColor_); + redactionColor_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.class, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder.class); + } + + private int targetCase_ = 0; + private java.lang.Object target_; + public enum TargetCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INFO_TYPE(1), + REDACT_ALL_TEXT(2), + TARGET_NOT_SET(0); + private final int value; + private TargetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 1: return INFO_TYPE; + case 2: return REDACT_ALL_TEXT; + case 0: return TARGET_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TargetCase + getTargetCase() { + return TargetCase.forNumber( + targetCase_); + } + + public static final int INFO_TYPE_FIELD_NUMBER = 1; + /** + *
+     * Only one per info_type should be provided per request. If not
+     * specified, and redact_all_text is false, the DLP API will redact all
+     * text that it matches against all info_types that are found, but not
+     * specified in another ImageRedactionConfig.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return targetCase_ == 1; + } + /** + *
+     * Only one per info_type should be provided per request. If not
+     * specified, and redact_all_text is false, the DLP API will redact all
+     * text that it matches against all info_types that are found, but not
+     * specified in another ImageRedactionConfig.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (targetCase_ == 1) { + return (com.google.privacy.dlp.v2.InfoType) target_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + /** + *
+     * Only one per info_type should be provided per request. If not
+     * specified, and redact_all_text is false, the DLP API will redact all
+     * text that it matches against all info_types that are found, but not
+     * specified in another ImageRedactionConfig.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (targetCase_ == 1) { + return (com.google.privacy.dlp.v2.InfoType) target_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + + public static final int REDACT_ALL_TEXT_FIELD_NUMBER = 2; + /** + *
+     * If true, all text found in the image, regardless whether it matches an
+     * info_type, is redacted. Only one should be provided.
+     * 
+ * + * bool redact_all_text = 2; + * @return Whether the redactAllText field is set. + */ + @java.lang.Override + public boolean hasRedactAllText() { + return targetCase_ == 2; + } + /** + *
+     * If true, all text found in the image, regardless whether it matches an
+     * info_type, is redacted. Only one should be provided.
+     * 
+ * + * bool redact_all_text = 2; + * @return The redactAllText. + */ + @java.lang.Override + public boolean getRedactAllText() { + if (targetCase_ == 2) { + return (java.lang.Boolean) target_; + } + return false; + } + + public static final int REDACTION_COLOR_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.Color redactionColor_; + /** + *
+     * The color to use when redacting content from an image. If not specified,
+     * the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return Whether the redactionColor field is set. + */ + @java.lang.Override + public boolean hasRedactionColor() { + return redactionColor_ != null; + } + /** + *
+     * The color to use when redacting content from an image. If not specified,
+     * the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return The redactionColor. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Color getRedactionColor() { + return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; + } + /** + *
+     * The color to use when redacting content from an image. If not specified,
+     * the default is black.
+     * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() { + return getRedactionColor(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (targetCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.InfoType) target_); + } + if (targetCase_ == 2) { + output.writeBool( + 2, (boolean)((java.lang.Boolean) target_)); + } + if (redactionColor_ != null) { + output.writeMessage(3, getRedactionColor()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.InfoType) target_); + } + if (targetCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 2, (boolean)((java.lang.Boolean) target_)); + } + if (redactionColor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getRedactionColor()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig other = (com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) obj; + + if (hasRedactionColor() != other.hasRedactionColor()) return false; + if (hasRedactionColor()) { + if (!getRedactionColor() + .equals(other.getRedactionColor())) return false; + } + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 1: + if (!getInfoType() + .equals(other.getInfoType())) return false; + break; + case 2: + if (getRedactAllText() + != other.getRedactAllText()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRedactionColor()) { + hash = (37 * hash) + REDACTION_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getRedactionColor().hashCode(); + } + switch (targetCase_) { + case 1: + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + break; + case 2: + hash = (37 * hash) + REDACT_ALL_TEXT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRedactAllText()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Configuration for determining how redaction of images should occur.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.class, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (redactionColorBuilder_ == null) { + redactionColor_ = null; + } else { + redactionColor_ = null; + redactionColorBuilder_ = null; + } + targetCase_ = 0; + target_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig build() { + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig buildPartial() { + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result = new com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig(this); + if (targetCase_ == 1) { + if (infoTypeBuilder_ == null) { + result.target_ = target_; + } else { + result.target_ = infoTypeBuilder_.build(); + } + } + if (targetCase_ == 2) { + result.target_ = target_; + } + if (redactionColorBuilder_ == null) { + result.redactionColor_ = redactionColor_; + } else { + result.redactionColor_ = redactionColorBuilder_.build(); + } + result.targetCase_ = targetCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) { + return mergeFrom((com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig other) { + if (other == com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance()) return this; + if (other.hasRedactionColor()) { + mergeRedactionColor(other.getRedactionColor()); + } + switch (other.getTargetCase()) { + case INFO_TYPE: { + mergeInfoType(other.getInfoType()); + break; + } + case REDACT_ALL_TEXT: { + setRedactAllText(other.getRedactAllText()); + break; + } + case TARGET_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int targetCase_ = 0; + private java.lang.Object target_; + public TargetCase + getTargetCase() { + return TargetCase.forNumber( + targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+       * Only one per info_type should be provided per request. If not
+       * specified, and redact_all_text is false, the DLP API will redact all
+       * text that it matches against all info_types that are found, but not
+       * specified in another ImageRedactionConfig.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return targetCase_ == 1; + } + /** + *
+       * Only one per info_type should be provided per request. If not
+       * specified, and redact_all_text is false, the DLP API will redact all
+       * text that it matches against all info_types that are found, but not
+       * specified in another ImageRedactionConfig.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + if (targetCase_ == 1) { + return (com.google.privacy.dlp.v2.InfoType) target_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } else { + if (targetCase_ == 1) { + return infoTypeBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + } + /** + *
+       * Only one per info_type should be provided per request. If not
+       * specified, and redact_all_text is false, the DLP API will redact all
+       * text that it matches against all info_types that are found, but not
+       * specified in another ImageRedactionConfig.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + targetCase_ = 1; + return this; + } + /** + *
+       * Only one per info_type should be provided per request. If not
+       * specified, and redact_all_text is false, the DLP API will redact all
+       * text that it matches against all info_types that are found, but not
+       * specified in another ImageRedactionConfig.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + targetCase_ = 1; + return this; + } + /** + *
+       * Only one per info_type should be provided per request. If not
+       * specified, and redact_all_text is false, the DLP API will redact all
+       * text that it matches against all info_types that are found, but not
+       * specified in another ImageRedactionConfig.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (targetCase_ == 1 && + target_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) { + target_ = com.google.privacy.dlp.v2.InfoType.newBuilder((com.google.privacy.dlp.v2.InfoType) target_) + .mergeFrom(value).buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + if (targetCase_ == 1) { + infoTypeBuilder_.mergeFrom(value); + } else { + infoTypeBuilder_.setMessage(value); + } + } + targetCase_ = 1; + return this; + } + /** + *
+       * Only one per info_type should be provided per request. If not
+       * specified, and redact_all_text is false, the DLP API will redact all
+       * text that it matches against all info_types that are found, but not
+       * specified in another ImageRedactionConfig.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + if (targetCase_ == 1) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + } else { + if (targetCase_ == 1) { + targetCase_ = 0; + target_ = null; + } + infoTypeBuilder_.clear(); + } + return this; + } + /** + *
+       * Only one per info_type should be provided per request. If not
+       * specified, and redact_all_text is false, the DLP API will redact all
+       * text that it matches against all info_types that are found, but not
+       * specified in another ImageRedactionConfig.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+       * Only one per info_type should be provided per request. If not
+       * specified, and redact_all_text is false, the DLP API will redact all
+       * text that it matches against all info_types that are found, but not
+       * specified in another ImageRedactionConfig.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if ((targetCase_ == 1) && (infoTypeBuilder_ != null)) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + if (targetCase_ == 1) { + return (com.google.privacy.dlp.v2.InfoType) target_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + } + /** + *
+       * Only one per info_type should be provided per request. If not
+       * specified, and redact_all_text is false, the DLP API will redact all
+       * text that it matches against all info_types that are found, but not
+       * specified in another ImageRedactionConfig.
+       * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + if (!(targetCase_ == 1)) { + target_ = com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + (com.google.privacy.dlp.v2.InfoType) target_, + getParentForChildren(), + isClean()); + target_ = null; + } + targetCase_ = 1; + onChanged();; + return infoTypeBuilder_; + } + + /** + *
+       * If true, all text found in the image, regardless whether it matches an
+       * info_type, is redacted. Only one should be provided.
+       * 
+ * + * bool redact_all_text = 2; + * @return Whether the redactAllText field is set. + */ + public boolean hasRedactAllText() { + return targetCase_ == 2; + } + /** + *
+       * If true, all text found in the image, regardless whether it matches an
+       * info_type, is redacted. Only one should be provided.
+       * 
+ * + * bool redact_all_text = 2; + * @return The redactAllText. + */ + public boolean getRedactAllText() { + if (targetCase_ == 2) { + return (java.lang.Boolean) target_; + } + return false; + } + /** + *
+       * If true, all text found in the image, regardless whether it matches an
+       * info_type, is redacted. Only one should be provided.
+       * 
+ * + * bool redact_all_text = 2; + * @param value The redactAllText to set. + * @return This builder for chaining. + */ + public Builder setRedactAllText(boolean value) { + targetCase_ = 2; + target_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, all text found in the image, regardless whether it matches an
+       * info_type, is redacted. Only one should be provided.
+       * 
+ * + * bool redact_all_text = 2; + * @return This builder for chaining. + */ + public Builder clearRedactAllText() { + if (targetCase_ == 2) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + return this; + } + + private com.google.privacy.dlp.v2.Color redactionColor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> redactionColorBuilder_; + /** + *
+       * The color to use when redacting content from an image. If not specified,
+       * the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return Whether the redactionColor field is set. + */ + public boolean hasRedactionColor() { + return redactionColorBuilder_ != null || redactionColor_ != null; + } + /** + *
+       * The color to use when redacting content from an image. If not specified,
+       * the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + * @return The redactionColor. + */ + public com.google.privacy.dlp.v2.Color getRedactionColor() { + if (redactionColorBuilder_ == null) { + return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; + } else { + return redactionColorBuilder_.getMessage(); + } + } + /** + *
+       * The color to use when redacting content from an image. If not specified,
+       * the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public Builder setRedactionColor(com.google.privacy.dlp.v2.Color value) { + if (redactionColorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + redactionColor_ = value; + onChanged(); + } else { + redactionColorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The color to use when redacting content from an image. If not specified,
+       * the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public Builder setRedactionColor( + com.google.privacy.dlp.v2.Color.Builder builderForValue) { + if (redactionColorBuilder_ == null) { + redactionColor_ = builderForValue.build(); + onChanged(); + } else { + redactionColorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The color to use when redacting content from an image. If not specified,
+       * the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public Builder mergeRedactionColor(com.google.privacy.dlp.v2.Color value) { + if (redactionColorBuilder_ == null) { + if (redactionColor_ != null) { + redactionColor_ = + com.google.privacy.dlp.v2.Color.newBuilder(redactionColor_).mergeFrom(value).buildPartial(); + } else { + redactionColor_ = value; + } + onChanged(); + } else { + redactionColorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The color to use when redacting content from an image. If not specified,
+       * the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public Builder clearRedactionColor() { + if (redactionColorBuilder_ == null) { + redactionColor_ = null; + onChanged(); + } else { + redactionColor_ = null; + redactionColorBuilder_ = null; + } + + return this; + } + /** + *
+       * The color to use when redacting content from an image. If not specified,
+       * the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public com.google.privacy.dlp.v2.Color.Builder getRedactionColorBuilder() { + + onChanged(); + return getRedactionColorFieldBuilder().getBuilder(); + } + /** + *
+       * The color to use when redacting content from an image. If not specified,
+       * the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() { + if (redactionColorBuilder_ != null) { + return redactionColorBuilder_.getMessageOrBuilder(); + } else { + return redactionColor_ == null ? + com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; + } + } + /** + *
+       * The color to use when redacting content from an image. If not specified,
+       * the default is black.
+       * 
+ * + * .google.privacy.dlp.v2.Color redaction_color = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> + getRedactionColorFieldBuilder() { + if (redactionColorBuilder_ == null) { + redactionColorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder>( + getRedactionColor(), + getParentForChildren(), + isClean()); + redactionColor_ = null; + } + return redactionColorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) + private static final com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig(); + } + + public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageRedactionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageRedactionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 8; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 8; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 8; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSPECT_CONFIG_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + @java.lang.Override + public boolean hasInspectConfig() { + return inspectConfig_ != null; + } + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + return getInspectConfig(); + } + + public static final int IMAGE_REDACTION_CONFIGS_FIELD_NUMBER = 5; + private java.util.List imageRedactionConfigs_; + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + @java.lang.Override + public java.util.List getImageRedactionConfigsList() { + return imageRedactionConfigs_; + } + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + @java.lang.Override + public java.util.List + getImageRedactionConfigsOrBuilderList() { + return imageRedactionConfigs_; + } + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + @java.lang.Override + public int getImageRedactionConfigsCount() { + return imageRedactionConfigs_.size(); + } + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getImageRedactionConfigs(int index) { + return imageRedactionConfigs_.get(index); + } + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder getImageRedactionConfigsOrBuilder( + int index) { + return imageRedactionConfigs_.get(index); + } + + public static final int INCLUDE_FINDINGS_FIELD_NUMBER = 6; + private boolean includeFindings_; + /** + *
+   * Whether the response should include findings along with the redacted
+   * image.
+   * 
+ * + * bool include_findings = 6; + * @return The includeFindings. + */ + @java.lang.Override + public boolean getIncludeFindings() { + return includeFindings_; + } + + public static final int BYTE_ITEM_FIELD_NUMBER = 7; + private com.google.privacy.dlp.v2.ByteContentItem byteItem_; + /** + *
+   * The content must be PNG, JPEG, SVG or BMP.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + * @return Whether the byteItem field is set. + */ + @java.lang.Override + public boolean hasByteItem() { + return byteItem_ != null; + } + /** + *
+   * The content must be PNG, JPEG, SVG or BMP.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + * @return The byteItem. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItem getByteItem() { + return byteItem_ == null ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance() : byteItem_; + } + /** + *
+   * The content must be PNG, JPEG, SVG or BMP.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() { + return getByteItem(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (inspectConfig_ != null) { + output.writeMessage(2, getInspectConfig()); + } + for (int i = 0; i < imageRedactionConfigs_.size(); i++) { + output.writeMessage(5, imageRedactionConfigs_.get(i)); + } + if (includeFindings_ != false) { + output.writeBool(6, includeFindings_); + } + if (byteItem_ != null) { + output.writeMessage(7, getByteItem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (inspectConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInspectConfig()); + } + for (int i = 0; i < imageRedactionConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, imageRedactionConfigs_.get(i)); + } + if (includeFindings_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, includeFindings_); + } + if (byteItem_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getByteItem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RedactImageRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RedactImageRequest other = (com.google.privacy.dlp.v2.RedactImageRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (hasInspectConfig() != other.hasInspectConfig()) return false; + if (hasInspectConfig()) { + if (!getInspectConfig() + .equals(other.getInspectConfig())) return false; + } + if (!getImageRedactionConfigsList() + .equals(other.getImageRedactionConfigsList())) return false; + if (getIncludeFindings() + != other.getIncludeFindings()) return false; + if (hasByteItem() != other.hasByteItem()) return false; + if (hasByteItem()) { + if (!getByteItem() + .equals(other.getByteItem())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + if (hasInspectConfig()) { + hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInspectConfig().hashCode(); + } + if (getImageRedactionConfigsCount() > 0) { + hash = (37 * hash) + IMAGE_REDACTION_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getImageRedactionConfigsList().hashCode(); + } + hash = (37 * hash) + INCLUDE_FINDINGS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIncludeFindings()); + if (hasByteItem()) { + hash = (37 * hash) + BYTE_ITEM_FIELD_NUMBER; + hash = (53 * hash) + getByteItem().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RedactImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to search for potentially sensitive info in an image and redact it
+   * by covering it with a colored rectangle.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageRequest) + com.google.privacy.dlp.v2.RedactImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RedactImageRequest.class, com.google.privacy.dlp.v2.RedactImageRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RedactImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getImageRedactionConfigsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + locationId_ = ""; + + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + if (imageRedactionConfigsBuilder_ == null) { + imageRedactionConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + imageRedactionConfigsBuilder_.clear(); + } + includeFindings_ = false; + + if (byteItemBuilder_ == null) { + byteItem_ = null; + } else { + byteItem_ = null; + byteItemBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest build() { + com.google.privacy.dlp.v2.RedactImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest buildPartial() { + com.google.privacy.dlp.v2.RedactImageRequest result = new com.google.privacy.dlp.v2.RedactImageRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + result.locationId_ = locationId_; + if (inspectConfigBuilder_ == null) { + result.inspectConfig_ = inspectConfig_; + } else { + result.inspectConfig_ = inspectConfigBuilder_.build(); + } + if (imageRedactionConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + imageRedactionConfigs_ = java.util.Collections.unmodifiableList(imageRedactionConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.imageRedactionConfigs_ = imageRedactionConfigs_; + } else { + result.imageRedactionConfigs_ = imageRedactionConfigsBuilder_.build(); + } + result.includeFindings_ = includeFindings_; + if (byteItemBuilder_ == null) { + result.byteItem_ = byteItem_; + } else { + result.byteItem_ = byteItemBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RedactImageRequest) { + return mergeFrom((com.google.privacy.dlp.v2.RedactImageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageRequest other) { + if (other == com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + if (other.hasInspectConfig()) { + mergeInspectConfig(other.getInspectConfig()); + } + if (imageRedactionConfigsBuilder_ == null) { + if (!other.imageRedactionConfigs_.isEmpty()) { + if (imageRedactionConfigs_.isEmpty()) { + imageRedactionConfigs_ = other.imageRedactionConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureImageRedactionConfigsIsMutable(); + imageRedactionConfigs_.addAll(other.imageRedactionConfigs_); + } + onChanged(); + } + } else { + if (!other.imageRedactionConfigs_.isEmpty()) { + if (imageRedactionConfigsBuilder_.isEmpty()) { + imageRedactionConfigsBuilder_.dispose(); + imageRedactionConfigsBuilder_ = null; + imageRedactionConfigs_ = other.imageRedactionConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + imageRedactionConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getImageRedactionConfigsFieldBuilder() : null; + } else { + imageRedactionConfigsBuilder_.addAllMessages(other.imageRedactionConfigs_); + } + } + } + if (other.getIncludeFindings() != false) { + setIncludeFindings(other.getIncludeFindings()); + } + if (other.hasByteItem()) { + mergeByteItem(other.getByteItem()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RedactImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RedactImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 8; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 8; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 8; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 8; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 8; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + public boolean hasInspectConfig() { + return inspectConfigBuilder_ != null || inspectConfig_ != null; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + if (inspectConfigBuilder_ == null) { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } else { + return inspectConfigBuilder_.getMessage(); + } + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectConfig_ = value; + onChanged(); + } else { + inspectConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder setInspectConfig( + com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = builderForValue.build(); + onChanged(); + } else { + inspectConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (inspectConfig_ != null) { + inspectConfig_ = + com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); + } else { + inspectConfig_ = value; + } + onChanged(); + } else { + inspectConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public Builder clearInspectConfig() { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + onChanged(); + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { + + onChanged(); + return getInspectConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + if (inspectConfigBuilder_ != null) { + return inspectConfigBuilder_.getMessageOrBuilder(); + } else { + return inspectConfig_ == null ? + com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> + getInspectConfigFieldBuilder() { + if (inspectConfigBuilder_ == null) { + inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( + getInspectConfig(), + getParentForChildren(), + isClean()); + inspectConfig_ = null; + } + return inspectConfigBuilder_; + } + + private java.util.List imageRedactionConfigs_ = + java.util.Collections.emptyList(); + private void ensureImageRedactionConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + imageRedactionConfigs_ = new java.util.ArrayList(imageRedactionConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder> imageRedactionConfigsBuilder_; + + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public java.util.List getImageRedactionConfigsList() { + if (imageRedactionConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(imageRedactionConfigs_); + } else { + return imageRedactionConfigsBuilder_.getMessageList(); + } + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public int getImageRedactionConfigsCount() { + if (imageRedactionConfigsBuilder_ == null) { + return imageRedactionConfigs_.size(); + } else { + return imageRedactionConfigsBuilder_.getCount(); + } + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getImageRedactionConfigs(int index) { + if (imageRedactionConfigsBuilder_ == null) { + return imageRedactionConfigs_.get(index); + } else { + return imageRedactionConfigsBuilder_.getMessage(index); + } + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public Builder setImageRedactionConfigs( + int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) { + if (imageRedactionConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImageRedactionConfigsIsMutable(); + imageRedactionConfigs_.set(index, value); + onChanged(); + } else { + imageRedactionConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public Builder setImageRedactionConfigs( + int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) { + if (imageRedactionConfigsBuilder_ == null) { + ensureImageRedactionConfigsIsMutable(); + imageRedactionConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + imageRedactionConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public Builder addImageRedactionConfigs(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) { + if (imageRedactionConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImageRedactionConfigsIsMutable(); + imageRedactionConfigs_.add(value); + onChanged(); + } else { + imageRedactionConfigsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public Builder addImageRedactionConfigs( + int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) { + if (imageRedactionConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImageRedactionConfigsIsMutable(); + imageRedactionConfigs_.add(index, value); + onChanged(); + } else { + imageRedactionConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public Builder addImageRedactionConfigs( + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) { + if (imageRedactionConfigsBuilder_ == null) { + ensureImageRedactionConfigsIsMutable(); + imageRedactionConfigs_.add(builderForValue.build()); + onChanged(); + } else { + imageRedactionConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public Builder addImageRedactionConfigs( + int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) { + if (imageRedactionConfigsBuilder_ == null) { + ensureImageRedactionConfigsIsMutable(); + imageRedactionConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + imageRedactionConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public Builder addAllImageRedactionConfigs( + java.lang.Iterable values) { + if (imageRedactionConfigsBuilder_ == null) { + ensureImageRedactionConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, imageRedactionConfigs_); + onChanged(); + } else { + imageRedactionConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public Builder clearImageRedactionConfigs() { + if (imageRedactionConfigsBuilder_ == null) { + imageRedactionConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + imageRedactionConfigsBuilder_.clear(); + } + return this; + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public Builder removeImageRedactionConfigs(int index) { + if (imageRedactionConfigsBuilder_ == null) { + ensureImageRedactionConfigsIsMutable(); + imageRedactionConfigs_.remove(index); + onChanged(); + } else { + imageRedactionConfigsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder getImageRedactionConfigsBuilder( + int index) { + return getImageRedactionConfigsFieldBuilder().getBuilder(index); + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder getImageRedactionConfigsOrBuilder( + int index) { + if (imageRedactionConfigsBuilder_ == null) { + return imageRedactionConfigs_.get(index); } else { + return imageRedactionConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public java.util.List + getImageRedactionConfigsOrBuilderList() { + if (imageRedactionConfigsBuilder_ != null) { + return imageRedactionConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(imageRedactionConfigs_); + } + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder addImageRedactionConfigsBuilder() { + return getImageRedactionConfigsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance()); + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder addImageRedactionConfigsBuilder( + int index) { + return getImageRedactionConfigsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance()); + } + /** + *
+     * The configuration for specifying what content to redact from images.
+     * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + public java.util.List + getImageRedactionConfigsBuilderList() { + return getImageRedactionConfigsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder> + getImageRedactionConfigsFieldBuilder() { + if (imageRedactionConfigsBuilder_ == null) { + imageRedactionConfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder>( + imageRedactionConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + imageRedactionConfigs_ = null; + } + return imageRedactionConfigsBuilder_; + } + + private boolean includeFindings_ ; + /** + *
+     * Whether the response should include findings along with the redacted
+     * image.
+     * 
+ * + * bool include_findings = 6; + * @return The includeFindings. + */ + @java.lang.Override + public boolean getIncludeFindings() { + return includeFindings_; + } + /** + *
+     * Whether the response should include findings along with the redacted
+     * image.
+     * 
+ * + * bool include_findings = 6; + * @param value The includeFindings to set. + * @return This builder for chaining. + */ + public Builder setIncludeFindings(boolean value) { + + includeFindings_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether the response should include findings along with the redacted
+     * image.
+     * 
+ * + * bool include_findings = 6; + * @return This builder for chaining. + */ + public Builder clearIncludeFindings() { + + includeFindings_ = false; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.ByteContentItem byteItem_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> byteItemBuilder_; + /** + *
+     * The content must be PNG, JPEG, SVG or BMP.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + * @return Whether the byteItem field is set. + */ + public boolean hasByteItem() { + return byteItemBuilder_ != null || byteItem_ != null; + } + /** + *
+     * The content must be PNG, JPEG, SVG or BMP.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + * @return The byteItem. + */ + public com.google.privacy.dlp.v2.ByteContentItem getByteItem() { + if (byteItemBuilder_ == null) { + return byteItem_ == null ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance() : byteItem_; + } else { + return byteItemBuilder_.getMessage(); + } + } + /** + *
+     * The content must be PNG, JPEG, SVG or BMP.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + */ + public Builder setByteItem(com.google.privacy.dlp.v2.ByteContentItem value) { + if (byteItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + byteItem_ = value; + onChanged(); + } else { + byteItemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The content must be PNG, JPEG, SVG or BMP.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + */ + public Builder setByteItem( + com.google.privacy.dlp.v2.ByteContentItem.Builder builderForValue) { + if (byteItemBuilder_ == null) { + byteItem_ = builderForValue.build(); + onChanged(); + } else { + byteItemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The content must be PNG, JPEG, SVG or BMP.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + */ + public Builder mergeByteItem(com.google.privacy.dlp.v2.ByteContentItem value) { + if (byteItemBuilder_ == null) { + if (byteItem_ != null) { + byteItem_ = + com.google.privacy.dlp.v2.ByteContentItem.newBuilder(byteItem_).mergeFrom(value).buildPartial(); + } else { + byteItem_ = value; + } + onChanged(); + } else { + byteItemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The content must be PNG, JPEG, SVG or BMP.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + */ + public Builder clearByteItem() { + if (byteItemBuilder_ == null) { + byteItem_ = null; + onChanged(); + } else { + byteItem_ = null; + byteItemBuilder_ = null; + } + + return this; + } + /** + *
+     * The content must be PNG, JPEG, SVG or BMP.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + */ + public com.google.privacy.dlp.v2.ByteContentItem.Builder getByteItemBuilder() { + + onChanged(); + return getByteItemFieldBuilder().getBuilder(); + } + /** + *
+     * The content must be PNG, JPEG, SVG or BMP.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + */ + public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() { + if (byteItemBuilder_ != null) { + return byteItemBuilder_.getMessageOrBuilder(); + } else { + return byteItem_ == null ? + com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance() : byteItem_; + } + } + /** + *
+     * The content must be PNG, JPEG, SVG or BMP.
+     * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> + getByteItemFieldBuilder() { + if (byteItemBuilder_ == null) { + byteItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder>( + getByteItem(), + getParentForChildren(), + isClean()); + byteItem_ = null; + } + return byteItemBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactImageRequest) + private static final com.google.privacy.dlp.v2.RedactImageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactImageRequest(); + } + + public static com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RedactImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RedactImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java new file mode 100644 index 000000000000..72859285dc20 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java @@ -0,0 +1,180 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RedactImageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 8; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 8; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); + + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return Whether the inspectConfig field is set. + */ + boolean hasInspectConfig(); + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + * @return The inspectConfig. + */ + com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; + */ + com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); + + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + java.util.List + getImageRedactionConfigsList(); + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getImageRedactionConfigs(int index); + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + int getImageRedactionConfigsCount(); + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + java.util.List + getImageRedactionConfigsOrBuilderList(); + /** + *
+   * The configuration for specifying what content to redact from images.
+   * 
+ * + * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; + */ + com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder getImageRedactionConfigsOrBuilder( + int index); + + /** + *
+   * Whether the response should include findings along with the redacted
+   * image.
+   * 
+ * + * bool include_findings = 6; + * @return The includeFindings. + */ + boolean getIncludeFindings(); + + /** + *
+   * The content must be PNG, JPEG, SVG or BMP.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + * @return Whether the byteItem field is set. + */ + boolean hasByteItem(); + /** + *
+   * The content must be PNG, JPEG, SVG or BMP.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + * @return The byteItem. + */ + com.google.privacy.dlp.v2.ByteContentItem getByteItem(); + /** + *
+   * The content must be PNG, JPEG, SVG or BMP.
+   * 
+ * + * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; + */ + com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java new file mode 100644 index 000000000000..6652f23cbff9 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java @@ -0,0 +1,929 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Results of redacting an image.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RedactImageResponse} + */ +public final class RedactImageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageResponse) + RedactImageResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use RedactImageResponse.newBuilder() to construct. + private RedactImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RedactImageResponse() { + redactedImage_ = com.google.protobuf.ByteString.EMPTY; + extractedText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RedactImageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RedactImageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + redactedImage_ = input.readBytes(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + extractedText_ = s; + break; + } + case 26: { + com.google.privacy.dlp.v2.InspectResult.Builder subBuilder = null; + if (inspectResult_ != null) { + subBuilder = inspectResult_.toBuilder(); + } + inspectResult_ = input.readMessage(com.google.privacy.dlp.v2.InspectResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectResult_); + inspectResult_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RedactImageResponse.class, com.google.privacy.dlp.v2.RedactImageResponse.Builder.class); + } + + public static final int REDACTED_IMAGE_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString redactedImage_; + /** + *
+   * The redacted image. The type will be the same as the original image.
+   * 
+ * + * bytes redacted_image = 1; + * @return The redactedImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRedactedImage() { + return redactedImage_; + } + + public static final int EXTRACTED_TEXT_FIELD_NUMBER = 2; + private volatile java.lang.Object extractedText_; + /** + *
+   * If an image was being inspected and the InspectConfig's include_quote was
+   * set to true, then this field will include all text, if any, that was found
+   * in the image.
+   * 
+ * + * string extracted_text = 2; + * @return The extractedText. + */ + @java.lang.Override + public java.lang.String getExtractedText() { + java.lang.Object ref = extractedText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + extractedText_ = s; + return s; + } + } + /** + *
+   * If an image was being inspected and the InspectConfig's include_quote was
+   * set to true, then this field will include all text, if any, that was found
+   * in the image.
+   * 
+ * + * string extracted_text = 2; + * @return The bytes for extractedText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExtractedTextBytes() { + java.lang.Object ref = extractedText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + extractedText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSPECT_RESULT_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.InspectResult inspectResult_; + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + * @return Whether the inspectResult field is set. + */ + @java.lang.Override + public boolean hasInspectResult() { + return inspectResult_ != null; + } + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + * @return The inspectResult. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectResult getInspectResult() { + return inspectResult_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : inspectResult_; + } + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectResultOrBuilder getInspectResultOrBuilder() { + return getInspectResult(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!redactedImage_.isEmpty()) { + output.writeBytes(1, redactedImage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extractedText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, extractedText_); + } + if (inspectResult_ != null) { + output.writeMessage(3, getInspectResult()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!redactedImage_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, redactedImage_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extractedText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, extractedText_); + } + if (inspectResult_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getInspectResult()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RedactImageResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RedactImageResponse other = (com.google.privacy.dlp.v2.RedactImageResponse) obj; + + if (!getRedactedImage() + .equals(other.getRedactedImage())) return false; + if (!getExtractedText() + .equals(other.getExtractedText())) return false; + if (hasInspectResult() != other.hasInspectResult()) return false; + if (hasInspectResult()) { + if (!getInspectResult() + .equals(other.getInspectResult())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REDACTED_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getRedactedImage().hashCode(); + hash = (37 * hash) + EXTRACTED_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getExtractedText().hashCode(); + if (hasInspectResult()) { + hash = (37 * hash) + INSPECT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getInspectResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RedactImageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Results of redacting an image.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RedactImageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageResponse) + com.google.privacy.dlp.v2.RedactImageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RedactImageResponse.class, com.google.privacy.dlp.v2.RedactImageResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RedactImageResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + redactedImage_ = com.google.protobuf.ByteString.EMPTY; + + extractedText_ = ""; + + if (inspectResultBuilder_ == null) { + inspectResult_ = null; + } else { + inspectResult_ = null; + inspectResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RedactImageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageResponse build() { + com.google.privacy.dlp.v2.RedactImageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageResponse buildPartial() { + com.google.privacy.dlp.v2.RedactImageResponse result = new com.google.privacy.dlp.v2.RedactImageResponse(this); + result.redactedImage_ = redactedImage_; + result.extractedText_ = extractedText_; + if (inspectResultBuilder_ == null) { + result.inspectResult_ = inspectResult_; + } else { + result.inspectResult_ = inspectResultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RedactImageResponse) { + return mergeFrom((com.google.privacy.dlp.v2.RedactImageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageResponse other) { + if (other == com.google.privacy.dlp.v2.RedactImageResponse.getDefaultInstance()) return this; + if (other.getRedactedImage() != com.google.protobuf.ByteString.EMPTY) { + setRedactedImage(other.getRedactedImage()); + } + if (!other.getExtractedText().isEmpty()) { + extractedText_ = other.extractedText_; + onChanged(); + } + if (other.hasInspectResult()) { + mergeInspectResult(other.getInspectResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RedactImageResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RedactImageResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString redactedImage_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * The redacted image. The type will be the same as the original image.
+     * 
+ * + * bytes redacted_image = 1; + * @return The redactedImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRedactedImage() { + return redactedImage_; + } + /** + *
+     * The redacted image. The type will be the same as the original image.
+     * 
+ * + * bytes redacted_image = 1; + * @param value The redactedImage to set. + * @return This builder for chaining. + */ + public Builder setRedactedImage(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + redactedImage_ = value; + onChanged(); + return this; + } + /** + *
+     * The redacted image. The type will be the same as the original image.
+     * 
+ * + * bytes redacted_image = 1; + * @return This builder for chaining. + */ + public Builder clearRedactedImage() { + + redactedImage_ = getDefaultInstance().getRedactedImage(); + onChanged(); + return this; + } + + private java.lang.Object extractedText_ = ""; + /** + *
+     * If an image was being inspected and the InspectConfig's include_quote was
+     * set to true, then this field will include all text, if any, that was found
+     * in the image.
+     * 
+ * + * string extracted_text = 2; + * @return The extractedText. + */ + public java.lang.String getExtractedText() { + java.lang.Object ref = extractedText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + extractedText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If an image was being inspected and the InspectConfig's include_quote was
+     * set to true, then this field will include all text, if any, that was found
+     * in the image.
+     * 
+ * + * string extracted_text = 2; + * @return The bytes for extractedText. + */ + public com.google.protobuf.ByteString + getExtractedTextBytes() { + java.lang.Object ref = extractedText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + extractedText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If an image was being inspected and the InspectConfig's include_quote was
+     * set to true, then this field will include all text, if any, that was found
+     * in the image.
+     * 
+ * + * string extracted_text = 2; + * @param value The extractedText to set. + * @return This builder for chaining. + */ + public Builder setExtractedText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + extractedText_ = value; + onChanged(); + return this; + } + /** + *
+     * If an image was being inspected and the InspectConfig's include_quote was
+     * set to true, then this field will include all text, if any, that was found
+     * in the image.
+     * 
+ * + * string extracted_text = 2; + * @return This builder for chaining. + */ + public Builder clearExtractedText() { + + extractedText_ = getDefaultInstance().getExtractedText(); + onChanged(); + return this; + } + /** + *
+     * If an image was being inspected and the InspectConfig's include_quote was
+     * set to true, then this field will include all text, if any, that was found
+     * in the image.
+     * 
+ * + * string extracted_text = 2; + * @param value The bytes for extractedText to set. + * @return This builder for chaining. + */ + public Builder setExtractedTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + extractedText_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.InspectResult inspectResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> inspectResultBuilder_; + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + * @return Whether the inspectResult field is set. + */ + public boolean hasInspectResult() { + return inspectResultBuilder_ != null || inspectResult_ != null; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + * @return The inspectResult. + */ + public com.google.privacy.dlp.v2.InspectResult getInspectResult() { + if (inspectResultBuilder_ == null) { + return inspectResult_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : inspectResult_; + } else { + return inspectResultBuilder_.getMessage(); + } + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public Builder setInspectResult(com.google.privacy.dlp.v2.InspectResult value) { + if (inspectResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectResult_ = value; + onChanged(); + } else { + inspectResultBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public Builder setInspectResult( + com.google.privacy.dlp.v2.InspectResult.Builder builderForValue) { + if (inspectResultBuilder_ == null) { + inspectResult_ = builderForValue.build(); + onChanged(); + } else { + inspectResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public Builder mergeInspectResult(com.google.privacy.dlp.v2.InspectResult value) { + if (inspectResultBuilder_ == null) { + if (inspectResult_ != null) { + inspectResult_ = + com.google.privacy.dlp.v2.InspectResult.newBuilder(inspectResult_).mergeFrom(value).buildPartial(); + } else { + inspectResult_ = value; + } + onChanged(); + } else { + inspectResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public Builder clearInspectResult() { + if (inspectResultBuilder_ == null) { + inspectResult_ = null; + onChanged(); + } else { + inspectResult_ = null; + inspectResultBuilder_ = null; + } + + return this; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public com.google.privacy.dlp.v2.InspectResult.Builder getInspectResultBuilder() { + + onChanged(); + return getInspectResultFieldBuilder().getBuilder(); + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public com.google.privacy.dlp.v2.InspectResultOrBuilder getInspectResultOrBuilder() { + if (inspectResultBuilder_ != null) { + return inspectResultBuilder_.getMessageOrBuilder(); + } else { + return inspectResult_ == null ? + com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : inspectResult_; + } + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> + getInspectResultFieldBuilder() { + if (inspectResultBuilder_ == null) { + inspectResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder>( + getInspectResult(), + getParentForChildren(), + isClean()); + inspectResult_ = null; + } + return inspectResultBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactImageResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactImageResponse) + private static final com.google.privacy.dlp.v2.RedactImageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactImageResponse(); + } + + public static com.google.privacy.dlp.v2.RedactImageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RedactImageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RedactImageResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RedactImageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java new file mode 100644 index 000000000000..daf06874d12b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RedactImageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactImageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The redacted image. The type will be the same as the original image.
+   * 
+ * + * bytes redacted_image = 1; + * @return The redactedImage. + */ + com.google.protobuf.ByteString getRedactedImage(); + + /** + *
+   * If an image was being inspected and the InspectConfig's include_quote was
+   * set to true, then this field will include all text, if any, that was found
+   * in the image.
+   * 
+ * + * string extracted_text = 2; + * @return The extractedText. + */ + java.lang.String getExtractedText(); + /** + *
+   * If an image was being inspected and the InspectConfig's include_quote was
+   * set to true, then this field will include all text, if any, that was found
+   * in the image.
+   * 
+ * + * string extracted_text = 2; + * @return The bytes for extractedText. + */ + com.google.protobuf.ByteString + getExtractedTextBytes(); + + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + * @return Whether the inspectResult field is set. + */ + boolean hasInspectResult(); + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + * @return The inspectResult. + */ + com.google.privacy.dlp.v2.InspectResult getInspectResult(); + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + com.google.privacy.dlp.v2.InspectResultOrBuilder getInspectResultOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java new file mode 100644 index 000000000000..f7dbf9743769 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java @@ -0,0 +1,2044 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request to re-identify an item.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentRequest} + */ +public final class ReidentifyContentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReidentifyContentRequest) + ReidentifyContentRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReidentifyContentRequest.newBuilder() to construct. + private ReidentifyContentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReidentifyContentRequest() { + parent_ = ""; + inspectTemplateName_ = ""; + reidentifyTemplateName_ = ""; + locationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReidentifyContentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReidentifyContentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.DeidentifyConfig.Builder subBuilder = null; + if (reidentifyConfig_ != null) { + subBuilder = reidentifyConfig_.toBuilder(); + } + reidentifyConfig_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(reidentifyConfig_); + reidentifyConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; + if (inspectConfig_ != null) { + subBuilder = inspectConfig_.toBuilder(); + } + inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectConfig_); + inspectConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; + if (item_ != null) { + subBuilder = item_.toBuilder(); + } + item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(item_); + item_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + inspectTemplateName_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + reidentifyTemplateName_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + locationId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReidentifyContentRequest.class, com.google.privacy.dlp.v2.ReidentifyContentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REIDENTIFY_CONFIG_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.DeidentifyConfig reidentifyConfig_; + /** + *
+   * Configuration for the re-identification of the content item.
+   * This field shares the same proto message type that is used for
+   * de-identification, however its usage here is for the reversal of the
+   * previous de-identification. Re-identification is performed by examining
+   * the transformations used to de-identify the items and executing the
+   * reverse. This requires that only reversible transformations
+   * be provided here. The reversible transformations are:
+   *  - `CryptoDeterministicConfig`
+   *  - `CryptoReplaceFfxFpeConfig`
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + * @return Whether the reidentifyConfig field is set. + */ + @java.lang.Override + public boolean hasReidentifyConfig() { + return reidentifyConfig_ != null; + } + /** + *
+   * Configuration for the re-identification of the content item.
+   * This field shares the same proto message type that is used for
+   * de-identification, however its usage here is for the reversal of the
+   * previous de-identification. Re-identification is performed by examining
+   * the transformations used to de-identify the items and executing the
+   * reverse. This requires that only reversible transformations
+   * be provided here. The reversible transformations are:
+   *  - `CryptoDeterministicConfig`
+   *  - `CryptoReplaceFfxFpeConfig`
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + * @return The reidentifyConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfig getReidentifyConfig() { + return reidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : reidentifyConfig_; + } + /** + *
+   * Configuration for the re-identification of the content item.
+   * This field shares the same proto message type that is used for
+   * de-identification, however its usage here is for the reversal of the
+   * previous de-identification. Re-identification is performed by examining
+   * the transformations used to de-identify the items and executing the
+   * reverse. This requires that only reversible transformations
+   * be provided here. The reversible transformations are:
+   *  - `CryptoDeterministicConfig`
+   *  - `CryptoReplaceFfxFpeConfig`
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getReidentifyConfigOrBuilder() { + return getReidentifyConfig(); + } + + public static final int INSPECT_CONFIG_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return Whether the inspectConfig field is set. + */ + @java.lang.Override + public boolean hasInspectConfig() { + return inspectConfig_ != null; + } + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return The inspectConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + return getInspectConfig(); + } + + public static final int ITEM_FIELD_NUMBER = 4; + private com.google.privacy.dlp.v2.ContentItem item_; + /** + *
+   * The item to re-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return item_ != null; + } + /** + *
+   * The item to re-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return The item. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem getItem() { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + /** + *
+   * The item to re-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + return getItem(); + } + + public static final int INSPECT_TEMPLATE_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object inspectTemplateName_; + /** + *
+   * Template to use. Any configuration directly specified in
+   * `inspect_config` will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 5; + * @return The inspectTemplateName. + */ + @java.lang.Override + public java.lang.String getInspectTemplateName() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inspectTemplateName_ = s; + return s; + } + } + /** + *
+   * Template to use. Any configuration directly specified in
+   * `inspect_config` will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 5; + * @return The bytes for inspectTemplateName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInspectTemplateNameBytes() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + inspectTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object reidentifyTemplateName_; + /** + *
+   * Template to use. References an instance of `DeidentifyTemplate`.
+   * Any configuration directly specified in `reidentify_config` or
+   * `inspect_config` will override those set in the template. The
+   * `DeidentifyTemplate` used must include only reversible transformations.
+   * Singular fields that are set in this request will replace their
+   * corresponding fields in the template. Repeated fields are appended.
+   * Singular sub-messages and groups are recursively merged.
+   * 
+ * + * string reidentify_template_name = 6; + * @return The reidentifyTemplateName. + */ + @java.lang.Override + public java.lang.String getReidentifyTemplateName() { + java.lang.Object ref = reidentifyTemplateName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reidentifyTemplateName_ = s; + return s; + } + } + /** + *
+   * Template to use. References an instance of `DeidentifyTemplate`.
+   * Any configuration directly specified in `reidentify_config` or
+   * `inspect_config` will override those set in the template. The
+   * `DeidentifyTemplate` used must include only reversible transformations.
+   * Singular fields that are set in this request will replace their
+   * corresponding fields in the template. Repeated fields are appended.
+   * Singular sub-messages and groups are recursively merged.
+   * 
+ * + * string reidentify_template_name = 6; + * @return The bytes for reidentifyTemplateName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReidentifyTemplateNameBytes() { + java.lang.Object ref = reidentifyTemplateName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + reidentifyTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object locationId_; + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } + } + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (reidentifyConfig_ != null) { + output.writeMessage(2, getReidentifyConfig()); + } + if (inspectConfig_ != null) { + output.writeMessage(3, getInspectConfig()); + } + if (item_ != null) { + output.writeMessage(4, getItem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, inspectTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reidentifyTemplateName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, reidentifyTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, locationId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (reidentifyConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReidentifyConfig()); + } + if (inspectConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getInspectConfig()); + } + if (item_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getItem()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, inspectTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reidentifyTemplateName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, reidentifyTemplateName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, locationId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ReidentifyContentRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ReidentifyContentRequest other = (com.google.privacy.dlp.v2.ReidentifyContentRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasReidentifyConfig() != other.hasReidentifyConfig()) return false; + if (hasReidentifyConfig()) { + if (!getReidentifyConfig() + .equals(other.getReidentifyConfig())) return false; + } + if (hasInspectConfig() != other.hasInspectConfig()) return false; + if (hasInspectConfig()) { + if (!getInspectConfig() + .equals(other.getInspectConfig())) return false; + } + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem() + .equals(other.getItem())) return false; + } + if (!getInspectTemplateName() + .equals(other.getInspectTemplateName())) return false; + if (!getReidentifyTemplateName() + .equals(other.getReidentifyTemplateName())) return false; + if (!getLocationId() + .equals(other.getLocationId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasReidentifyConfig()) { + hash = (37 * hash) + REIDENTIFY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getReidentifyConfig().hashCode(); + } + if (hasInspectConfig()) { + hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInspectConfig().hashCode(); + } + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + hash = (37 * hash) + INSPECT_TEMPLATE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getInspectTemplateName().hashCode(); + hash = (37 * hash) + REIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getReidentifyTemplateName().hashCode(); + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ReidentifyContentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to re-identify an item.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReidentifyContentRequest) + com.google.privacy.dlp.v2.ReidentifyContentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReidentifyContentRequest.class, com.google.privacy.dlp.v2.ReidentifyContentRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ReidentifyContentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (reidentifyConfigBuilder_ == null) { + reidentifyConfig_ = null; + } else { + reidentifyConfig_ = null; + reidentifyConfigBuilder_ = null; + } + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + if (itemBuilder_ == null) { + item_ = null; + } else { + item_ = null; + itemBuilder_ = null; + } + inspectTemplateName_ = ""; + + reidentifyTemplateName_ = ""; + + locationId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReidentifyContentRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ReidentifyContentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReidentifyContentRequest build() { + com.google.privacy.dlp.v2.ReidentifyContentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReidentifyContentRequest buildPartial() { + com.google.privacy.dlp.v2.ReidentifyContentRequest result = new com.google.privacy.dlp.v2.ReidentifyContentRequest(this); + result.parent_ = parent_; + if (reidentifyConfigBuilder_ == null) { + result.reidentifyConfig_ = reidentifyConfig_; + } else { + result.reidentifyConfig_ = reidentifyConfigBuilder_.build(); + } + if (inspectConfigBuilder_ == null) { + result.inspectConfig_ = inspectConfig_; + } else { + result.inspectConfig_ = inspectConfigBuilder_.build(); + } + if (itemBuilder_ == null) { + result.item_ = item_; + } else { + result.item_ = itemBuilder_.build(); + } + result.inspectTemplateName_ = inspectTemplateName_; + result.reidentifyTemplateName_ = reidentifyTemplateName_; + result.locationId_ = locationId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ReidentifyContentRequest) { + return mergeFrom((com.google.privacy.dlp.v2.ReidentifyContentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ReidentifyContentRequest other) { + if (other == com.google.privacy.dlp.v2.ReidentifyContentRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasReidentifyConfig()) { + mergeReidentifyConfig(other.getReidentifyConfig()); + } + if (other.hasInspectConfig()) { + mergeInspectConfig(other.getInspectConfig()); + } + if (other.hasItem()) { + mergeItem(other.getItem()); + } + if (!other.getInspectTemplateName().isEmpty()) { + inspectTemplateName_ = other.inspectTemplateName_; + onChanged(); + } + if (!other.getReidentifyTemplateName().isEmpty()) { + reidentifyTemplateName_ = other.reidentifyTemplateName_; + onChanged(); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ReidentifyContentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ReidentifyContentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Parent resource name.
+     * The format of this value varies depending on whether you have [specified a
+     * processing
+     * location](https://cloud.google.com/dlp/docs/specifying-location):
+     * + Projects scope, location specified:<br/>
+     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+     * + Projects scope, no location specified (defaults to global):<br/>
+     *   `projects/`<var>PROJECT_ID</var>
+     * The following example `parent` string specifies a parent project with the
+     * identifier `example-project`, and specifies the `europe-west3` location
+     * for processing data:
+     *     parent=projects/example-project/locations/europe-west3
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.DeidentifyConfig reidentifyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> reidentifyConfigBuilder_; + /** + *
+     * Configuration for the re-identification of the content item.
+     * This field shares the same proto message type that is used for
+     * de-identification, however its usage here is for the reversal of the
+     * previous de-identification. Re-identification is performed by examining
+     * the transformations used to de-identify the items and executing the
+     * reverse. This requires that only reversible transformations
+     * be provided here. The reversible transformations are:
+     *  - `CryptoDeterministicConfig`
+     *  - `CryptoReplaceFfxFpeConfig`
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + * @return Whether the reidentifyConfig field is set. + */ + public boolean hasReidentifyConfig() { + return reidentifyConfigBuilder_ != null || reidentifyConfig_ != null; + } + /** + *
+     * Configuration for the re-identification of the content item.
+     * This field shares the same proto message type that is used for
+     * de-identification, however its usage here is for the reversal of the
+     * previous de-identification. Re-identification is performed by examining
+     * the transformations used to de-identify the items and executing the
+     * reverse. This requires that only reversible transformations
+     * be provided here. The reversible transformations are:
+     *  - `CryptoDeterministicConfig`
+     *  - `CryptoReplaceFfxFpeConfig`
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + * @return The reidentifyConfig. + */ + public com.google.privacy.dlp.v2.DeidentifyConfig getReidentifyConfig() { + if (reidentifyConfigBuilder_ == null) { + return reidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : reidentifyConfig_; + } else { + return reidentifyConfigBuilder_.getMessage(); + } + } + /** + *
+     * Configuration for the re-identification of the content item.
+     * This field shares the same proto message type that is used for
+     * de-identification, however its usage here is for the reversal of the
+     * previous de-identification. Re-identification is performed by examining
+     * the transformations used to de-identify the items and executing the
+     * reverse. This requires that only reversible transformations
+     * be provided here. The reversible transformations are:
+     *  - `CryptoDeterministicConfig`
+     *  - `CryptoReplaceFfxFpeConfig`
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + */ + public Builder setReidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { + if (reidentifyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reidentifyConfig_ = value; + onChanged(); + } else { + reidentifyConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Configuration for the re-identification of the content item.
+     * This field shares the same proto message type that is used for
+     * de-identification, however its usage here is for the reversal of the
+     * previous de-identification. Re-identification is performed by examining
+     * the transformations used to de-identify the items and executing the
+     * reverse. This requires that only reversible transformations
+     * be provided here. The reversible transformations are:
+     *  - `CryptoDeterministicConfig`
+     *  - `CryptoReplaceFfxFpeConfig`
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + */ + public Builder setReidentifyConfig( + com.google.privacy.dlp.v2.DeidentifyConfig.Builder builderForValue) { + if (reidentifyConfigBuilder_ == null) { + reidentifyConfig_ = builderForValue.build(); + onChanged(); + } else { + reidentifyConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Configuration for the re-identification of the content item.
+     * This field shares the same proto message type that is used for
+     * de-identification, however its usage here is for the reversal of the
+     * previous de-identification. Re-identification is performed by examining
+     * the transformations used to de-identify the items and executing the
+     * reverse. This requires that only reversible transformations
+     * be provided here. The reversible transformations are:
+     *  - `CryptoDeterministicConfig`
+     *  - `CryptoReplaceFfxFpeConfig`
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + */ + public Builder mergeReidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { + if (reidentifyConfigBuilder_ == null) { + if (reidentifyConfig_ != null) { + reidentifyConfig_ = + com.google.privacy.dlp.v2.DeidentifyConfig.newBuilder(reidentifyConfig_).mergeFrom(value).buildPartial(); + } else { + reidentifyConfig_ = value; + } + onChanged(); + } else { + reidentifyConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Configuration for the re-identification of the content item.
+     * This field shares the same proto message type that is used for
+     * de-identification, however its usage here is for the reversal of the
+     * previous de-identification. Re-identification is performed by examining
+     * the transformations used to de-identify the items and executing the
+     * reverse. This requires that only reversible transformations
+     * be provided here. The reversible transformations are:
+     *  - `CryptoDeterministicConfig`
+     *  - `CryptoReplaceFfxFpeConfig`
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + */ + public Builder clearReidentifyConfig() { + if (reidentifyConfigBuilder_ == null) { + reidentifyConfig_ = null; + onChanged(); + } else { + reidentifyConfig_ = null; + reidentifyConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Configuration for the re-identification of the content item.
+     * This field shares the same proto message type that is used for
+     * de-identification, however its usage here is for the reversal of the
+     * previous de-identification. Re-identification is performed by examining
+     * the transformations used to de-identify the items and executing the
+     * reverse. This requires that only reversible transformations
+     * be provided here. The reversible transformations are:
+     *  - `CryptoDeterministicConfig`
+     *  - `CryptoReplaceFfxFpeConfig`
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + */ + public com.google.privacy.dlp.v2.DeidentifyConfig.Builder getReidentifyConfigBuilder() { + + onChanged(); + return getReidentifyConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration for the re-identification of the content item.
+     * This field shares the same proto message type that is used for
+     * de-identification, however its usage here is for the reversal of the
+     * previous de-identification. Re-identification is performed by examining
+     * the transformations used to de-identify the items and executing the
+     * reverse. This requires that only reversible transformations
+     * be provided here. The reversible transformations are:
+     *  - `CryptoDeterministicConfig`
+     *  - `CryptoReplaceFfxFpeConfig`
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + */ + public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getReidentifyConfigOrBuilder() { + if (reidentifyConfigBuilder_ != null) { + return reidentifyConfigBuilder_.getMessageOrBuilder(); + } else { + return reidentifyConfig_ == null ? + com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : reidentifyConfig_; + } + } + /** + *
+     * Configuration for the re-identification of the content item.
+     * This field shares the same proto message type that is used for
+     * de-identification, however its usage here is for the reversal of the
+     * previous de-identification. Re-identification is performed by examining
+     * the transformations used to de-identify the items and executing the
+     * reverse. This requires that only reversible transformations
+     * be provided here. The reversible transformations are:
+     *  - `CryptoDeterministicConfig`
+     *  - `CryptoReplaceFfxFpeConfig`
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> + getReidentifyConfigFieldBuilder() { + if (reidentifyConfigBuilder_ == null) { + reidentifyConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>( + getReidentifyConfig(), + getParentForChildren(), + isClean()); + reidentifyConfig_ = null; + } + return reidentifyConfigBuilder_; + } + + private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return Whether the inspectConfig field is set. + */ + public boolean hasInspectConfig() { + return inspectConfigBuilder_ != null || inspectConfig_ != null; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return The inspectConfig. + */ + public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { + if (inspectConfigBuilder_ == null) { + return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } else { + return inspectConfigBuilder_.getMessage(); + } + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectConfig_ = value; + onChanged(); + } else { + inspectConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public Builder setInspectConfig( + com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = builderForValue.build(); + onChanged(); + } else { + inspectConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { + if (inspectConfigBuilder_ == null) { + if (inspectConfig_ != null) { + inspectConfig_ = + com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); + } else { + inspectConfig_ = value; + } + onChanged(); + } else { + inspectConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public Builder clearInspectConfig() { + if (inspectConfigBuilder_ == null) { + inspectConfig_ = null; + onChanged(); + } else { + inspectConfig_ = null; + inspectConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { + + onChanged(); + return getInspectConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { + if (inspectConfigBuilder_ != null) { + return inspectConfigBuilder_.getMessageOrBuilder(); + } else { + return inspectConfig_ == null ? + com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; + } + } + /** + *
+     * Configuration for the inspector.
+     * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> + getInspectConfigFieldBuilder() { + if (inspectConfigBuilder_ == null) { + inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( + getInspectConfig(), + getParentForChildren(), + isClean()); + inspectConfig_ = null; + } + return inspectConfigBuilder_; + } + + private com.google.privacy.dlp.v2.ContentItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; + /** + *
+     * The item to re-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return Whether the item field is set. + */ + public boolean hasItem() { + return itemBuilder_ != null || item_ != null; + } + /** + *
+     * The item to re-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return The item. + */ + public com.google.privacy.dlp.v2.ContentItem getItem() { + if (itemBuilder_ == null) { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + *
+     * The item to re-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + onChanged(); + } else { + itemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The item to re-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public Builder setItem( + com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + onChanged(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The item to re-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (item_ != null) { + item_ = + com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); + } else { + item_ = value; + } + onChanged(); + } else { + itemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The item to re-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public Builder clearItem() { + if (itemBuilder_ == null) { + item_ = null; + onChanged(); + } else { + item_ = null; + itemBuilder_ = null; + } + + return this; + } + /** + *
+     * The item to re-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { + + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + *
+     * The item to re-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null ? + com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + } + /** + *
+     * The item to re-identify. Will be treated as text.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( + getItem(), + getParentForChildren(), + isClean()); + item_ = null; + } + return itemBuilder_; + } + + private java.lang.Object inspectTemplateName_ = ""; + /** + *
+     * Template to use. Any configuration directly specified in
+     * `inspect_config` will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @return The inspectTemplateName. + */ + public java.lang.String getInspectTemplateName() { + java.lang.Object ref = inspectTemplateName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inspectTemplateName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * `inspect_config` will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @return The bytes for inspectTemplateName. + */ + public com.google.protobuf.ByteString + getInspectTemplateNameBytes() { + java.lang.Object ref = inspectTemplateName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + inspectTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * `inspect_config` will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @param value The inspectTemplateName to set. + * @return This builder for chaining. + */ + public Builder setInspectTemplateName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inspectTemplateName_ = value; + onChanged(); + return this; + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * `inspect_config` will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @return This builder for chaining. + */ + public Builder clearInspectTemplateName() { + + inspectTemplateName_ = getDefaultInstance().getInspectTemplateName(); + onChanged(); + return this; + } + /** + *
+     * Template to use. Any configuration directly specified in
+     * `inspect_config` will override those set in the template. Singular fields
+     * that are set in this request will replace their corresponding fields in the
+     * template. Repeated fields are appended. Singular sub-messages and groups
+     * are recursively merged.
+     * 
+ * + * string inspect_template_name = 5; + * @param value The bytes for inspectTemplateName to set. + * @return This builder for chaining. + */ + public Builder setInspectTemplateNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inspectTemplateName_ = value; + onChanged(); + return this; + } + + private java.lang.Object reidentifyTemplateName_ = ""; + /** + *
+     * Template to use. References an instance of `DeidentifyTemplate`.
+     * Any configuration directly specified in `reidentify_config` or
+     * `inspect_config` will override those set in the template. The
+     * `DeidentifyTemplate` used must include only reversible transformations.
+     * Singular fields that are set in this request will replace their
+     * corresponding fields in the template. Repeated fields are appended.
+     * Singular sub-messages and groups are recursively merged.
+     * 
+ * + * string reidentify_template_name = 6; + * @return The reidentifyTemplateName. + */ + public java.lang.String getReidentifyTemplateName() { + java.lang.Object ref = reidentifyTemplateName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reidentifyTemplateName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Template to use. References an instance of `DeidentifyTemplate`.
+     * Any configuration directly specified in `reidentify_config` or
+     * `inspect_config` will override those set in the template. The
+     * `DeidentifyTemplate` used must include only reversible transformations.
+     * Singular fields that are set in this request will replace their
+     * corresponding fields in the template. Repeated fields are appended.
+     * Singular sub-messages and groups are recursively merged.
+     * 
+ * + * string reidentify_template_name = 6; + * @return The bytes for reidentifyTemplateName. + */ + public com.google.protobuf.ByteString + getReidentifyTemplateNameBytes() { + java.lang.Object ref = reidentifyTemplateName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + reidentifyTemplateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Template to use. References an instance of `DeidentifyTemplate`.
+     * Any configuration directly specified in `reidentify_config` or
+     * `inspect_config` will override those set in the template. The
+     * `DeidentifyTemplate` used must include only reversible transformations.
+     * Singular fields that are set in this request will replace their
+     * corresponding fields in the template. Repeated fields are appended.
+     * Singular sub-messages and groups are recursively merged.
+     * 
+ * + * string reidentify_template_name = 6; + * @param value The reidentifyTemplateName to set. + * @return This builder for chaining. + */ + public Builder setReidentifyTemplateName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + reidentifyTemplateName_ = value; + onChanged(); + return this; + } + /** + *
+     * Template to use. References an instance of `DeidentifyTemplate`.
+     * Any configuration directly specified in `reidentify_config` or
+     * `inspect_config` will override those set in the template. The
+     * `DeidentifyTemplate` used must include only reversible transformations.
+     * Singular fields that are set in this request will replace their
+     * corresponding fields in the template. Repeated fields are appended.
+     * Singular sub-messages and groups are recursively merged.
+     * 
+ * + * string reidentify_template_name = 6; + * @return This builder for chaining. + */ + public Builder clearReidentifyTemplateName() { + + reidentifyTemplateName_ = getDefaultInstance().getReidentifyTemplateName(); + onChanged(); + return this; + } + /** + *
+     * Template to use. References an instance of `DeidentifyTemplate`.
+     * Any configuration directly specified in `reidentify_config` or
+     * `inspect_config` will override those set in the template. The
+     * `DeidentifyTemplate` used must include only reversible transformations.
+     * Singular fields that are set in this request will replace their
+     * corresponding fields in the template. Repeated fields are appended.
+     * Singular sub-messages and groups are recursively merged.
+     * 
+ * + * string reidentify_template_name = 6; + * @param value The bytes for reidentifyTemplateName to set. + * @return This builder for chaining. + */ + public Builder setReidentifyTemplateNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + reidentifyTemplateName_ = value; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString + getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + locationId_ = value; + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @return This builder for chaining. + */ + public Builder clearLocationId() { + + locationId_ = getDefaultInstance().getLocationId(); + onChanged(); + return this; + } + /** + *
+     * Deprecated. This field has no effect.
+     * 
+ * + * string location_id = 7; + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + locationId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReidentifyContentRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReidentifyContentRequest) + private static final com.google.privacy.dlp.v2.ReidentifyContentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReidentifyContentRequest(); + } + + public static com.google.privacy.dlp.v2.ReidentifyContentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReidentifyContentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReidentifyContentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReidentifyContentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java new file mode 100644 index 000000000000..49de25cb72d3 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java @@ -0,0 +1,236 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ReidentifyContentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReidentifyContentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Parent resource name.
+   * The format of this value varies depending on whether you have [specified a
+   * processing
+   * location](https://cloud.google.com/dlp/docs/specifying-location):
+   * + Projects scope, location specified:<br/>
+   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
+   * + Projects scope, no location specified (defaults to global):<br/>
+   *   `projects/`<var>PROJECT_ID</var>
+   * The following example `parent` string specifies a parent project with the
+   * identifier `example-project`, and specifies the `europe-west3` location
+   * for processing data:
+   *     parent=projects/example-project/locations/europe-west3
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Configuration for the re-identification of the content item.
+   * This field shares the same proto message type that is used for
+   * de-identification, however its usage here is for the reversal of the
+   * previous de-identification. Re-identification is performed by examining
+   * the transformations used to de-identify the items and executing the
+   * reverse. This requires that only reversible transformations
+   * be provided here. The reversible transformations are:
+   *  - `CryptoDeterministicConfig`
+   *  - `CryptoReplaceFfxFpeConfig`
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + * @return Whether the reidentifyConfig field is set. + */ + boolean hasReidentifyConfig(); + /** + *
+   * Configuration for the re-identification of the content item.
+   * This field shares the same proto message type that is used for
+   * de-identification, however its usage here is for the reversal of the
+   * previous de-identification. Re-identification is performed by examining
+   * the transformations used to de-identify the items and executing the
+   * reverse. This requires that only reversible transformations
+   * be provided here. The reversible transformations are:
+   *  - `CryptoDeterministicConfig`
+   *  - `CryptoReplaceFfxFpeConfig`
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + * @return The reidentifyConfig. + */ + com.google.privacy.dlp.v2.DeidentifyConfig getReidentifyConfig(); + /** + *
+   * Configuration for the re-identification of the content item.
+   * This field shares the same proto message type that is used for
+   * de-identification, however its usage here is for the reversal of the
+   * previous de-identification. Re-identification is performed by examining
+   * the transformations used to de-identify the items and executing the
+   * reverse. This requires that only reversible transformations
+   * be provided here. The reversible transformations are:
+   *  - `CryptoDeterministicConfig`
+   *  - `CryptoReplaceFfxFpeConfig`
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; + */ + com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getReidentifyConfigOrBuilder(); + + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return Whether the inspectConfig field is set. + */ + boolean hasInspectConfig(); + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + * @return The inspectConfig. + */ + com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); + /** + *
+   * Configuration for the inspector.
+   * 
+ * + * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; + */ + com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); + + /** + *
+   * The item to re-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + *
+   * The item to re-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + * @return The item. + */ + com.google.privacy.dlp.v2.ContentItem getItem(); + /** + *
+   * The item to re-identify. Will be treated as text.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 4; + */ + com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); + + /** + *
+   * Template to use. Any configuration directly specified in
+   * `inspect_config` will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 5; + * @return The inspectTemplateName. + */ + java.lang.String getInspectTemplateName(); + /** + *
+   * Template to use. Any configuration directly specified in
+   * `inspect_config` will override those set in the template. Singular fields
+   * that are set in this request will replace their corresponding fields in the
+   * template. Repeated fields are appended. Singular sub-messages and groups
+   * are recursively merged.
+   * 
+ * + * string inspect_template_name = 5; + * @return The bytes for inspectTemplateName. + */ + com.google.protobuf.ByteString + getInspectTemplateNameBytes(); + + /** + *
+   * Template to use. References an instance of `DeidentifyTemplate`.
+   * Any configuration directly specified in `reidentify_config` or
+   * `inspect_config` will override those set in the template. The
+   * `DeidentifyTemplate` used must include only reversible transformations.
+   * Singular fields that are set in this request will replace their
+   * corresponding fields in the template. Repeated fields are appended.
+   * Singular sub-messages and groups are recursively merged.
+   * 
+ * + * string reidentify_template_name = 6; + * @return The reidentifyTemplateName. + */ + java.lang.String getReidentifyTemplateName(); + /** + *
+   * Template to use. References an instance of `DeidentifyTemplate`.
+   * Any configuration directly specified in `reidentify_config` or
+   * `inspect_config` will override those set in the template. The
+   * `DeidentifyTemplate` used must include only reversible transformations.
+   * Singular fields that are set in this request will replace their
+   * corresponding fields in the template. Repeated fields are appended.
+   * Singular sub-messages and groups are recursively merged.
+   * 
+ * + * string reidentify_template_name = 6; + * @return The bytes for reidentifyTemplateName. + */ + com.google.protobuf.ByteString + getReidentifyTemplateNameBytes(); + + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The locationId. + */ + java.lang.String getLocationId(); + /** + *
+   * Deprecated. This field has no effect.
+   * 
+ * + * string location_id = 7; + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString + getLocationIdBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java new file mode 100644 index 000000000000..5da38a8ae729 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java @@ -0,0 +1,901 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Results of re-identifying an item.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentResponse} + */ +public final class ReidentifyContentResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReidentifyContentResponse) + ReidentifyContentResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReidentifyContentResponse.newBuilder() to construct. + private ReidentifyContentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReidentifyContentResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReidentifyContentResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReidentifyContentResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; + if (item_ != null) { + subBuilder = item_.toBuilder(); + } + item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(item_); + item_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.TransformationOverview.Builder subBuilder = null; + if (overview_ != null) { + subBuilder = overview_.toBuilder(); + } + overview_ = input.readMessage(com.google.privacy.dlp.v2.TransformationOverview.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(overview_); + overview_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReidentifyContentResponse.class, com.google.privacy.dlp.v2.ReidentifyContentResponse.Builder.class); + } + + public static final int ITEM_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.ContentItem item_; + /** + *
+   * The re-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return Whether the item field is set. + */ + @java.lang.Override + public boolean hasItem() { + return item_ != null; + } + /** + *
+   * The re-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return The item. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItem getItem() { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + /** + *
+   * The re-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + return getItem(); + } + + public static final int OVERVIEW_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.TransformationOverview overview_; + /** + *
+   * An overview of the changes that were made to the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return Whether the overview field is set. + */ + @java.lang.Override + public boolean hasOverview() { + return overview_ != null; + } + /** + *
+   * An overview of the changes that were made to the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return The overview. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationOverview getOverview() { + return overview_ == null ? com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; + } + /** + *
+   * An overview of the changes that were made to the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder() { + return getOverview(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (item_ != null) { + output.writeMessage(1, getItem()); + } + if (overview_ != null) { + output.writeMessage(2, getOverview()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (item_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getItem()); + } + if (overview_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOverview()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ReidentifyContentResponse)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ReidentifyContentResponse other = (com.google.privacy.dlp.v2.ReidentifyContentResponse) obj; + + if (hasItem() != other.hasItem()) return false; + if (hasItem()) { + if (!getItem() + .equals(other.getItem())) return false; + } + if (hasOverview() != other.hasOverview()) return false; + if (hasOverview()) { + if (!getOverview() + .equals(other.getOverview())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasItem()) { + hash = (37 * hash) + ITEM_FIELD_NUMBER; + hash = (53 * hash) + getItem().hashCode(); + } + if (hasOverview()) { + hash = (37 * hash) + OVERVIEW_FIELD_NUMBER; + hash = (53 * hash) + getOverview().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ReidentifyContentResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Results of re-identifying an item.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReidentifyContentResponse) + com.google.privacy.dlp.v2.ReidentifyContentResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReidentifyContentResponse.class, com.google.privacy.dlp.v2.ReidentifyContentResponse.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ReidentifyContentResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (itemBuilder_ == null) { + item_ = null; + } else { + item_ = null; + itemBuilder_ = null; + } + if (overviewBuilder_ == null) { + overview_ = null; + } else { + overview_ = null; + overviewBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReidentifyContentResponse getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ReidentifyContentResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReidentifyContentResponse build() { + com.google.privacy.dlp.v2.ReidentifyContentResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReidentifyContentResponse buildPartial() { + com.google.privacy.dlp.v2.ReidentifyContentResponse result = new com.google.privacy.dlp.v2.ReidentifyContentResponse(this); + if (itemBuilder_ == null) { + result.item_ = item_; + } else { + result.item_ = itemBuilder_.build(); + } + if (overviewBuilder_ == null) { + result.overview_ = overview_; + } else { + result.overview_ = overviewBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ReidentifyContentResponse) { + return mergeFrom((com.google.privacy.dlp.v2.ReidentifyContentResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ReidentifyContentResponse other) { + if (other == com.google.privacy.dlp.v2.ReidentifyContentResponse.getDefaultInstance()) return this; + if (other.hasItem()) { + mergeItem(other.getItem()); + } + if (other.hasOverview()) { + mergeOverview(other.getOverview()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ReidentifyContentResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ReidentifyContentResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.ContentItem item_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; + /** + *
+     * The re-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return Whether the item field is set. + */ + public boolean hasItem() { + return itemBuilder_ != null || item_ != null; + } + /** + *
+     * The re-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return The item. + */ + public com.google.privacy.dlp.v2.ContentItem getItem() { + if (itemBuilder_ == null) { + return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } else { + return itemBuilder_.getMessage(); + } + } + /** + *
+     * The re-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + item_ = value; + onChanged(); + } else { + itemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The re-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder setItem( + com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { + if (itemBuilder_ == null) { + item_ = builderForValue.build(); + onChanged(); + } else { + itemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The re-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { + if (itemBuilder_ == null) { + if (item_ != null) { + item_ = + com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); + } else { + item_ = value; + } + onChanged(); + } else { + itemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The re-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public Builder clearItem() { + if (itemBuilder_ == null) { + item_ = null; + onChanged(); + } else { + item_ = null; + itemBuilder_ = null; + } + + return this; + } + /** + *
+     * The re-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { + + onChanged(); + return getItemFieldBuilder().getBuilder(); + } + /** + *
+     * The re-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { + if (itemBuilder_ != null) { + return itemBuilder_.getMessageOrBuilder(); + } else { + return item_ == null ? + com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; + } + } + /** + *
+     * The re-identified item.
+     * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> + getItemFieldBuilder() { + if (itemBuilder_ == null) { + itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( + getItem(), + getParentForChildren(), + isClean()); + item_ = null; + } + return itemBuilder_; + } + + private com.google.privacy.dlp.v2.TransformationOverview overview_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder> overviewBuilder_; + /** + *
+     * An overview of the changes that were made to the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return Whether the overview field is set. + */ + public boolean hasOverview() { + return overviewBuilder_ != null || overview_ != null; + } + /** + *
+     * An overview of the changes that were made to the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return The overview. + */ + public com.google.privacy.dlp.v2.TransformationOverview getOverview() { + if (overviewBuilder_ == null) { + return overview_ == null ? com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; + } else { + return overviewBuilder_.getMessage(); + } + } + /** + *
+     * An overview of the changes that were made to the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public Builder setOverview(com.google.privacy.dlp.v2.TransformationOverview value) { + if (overviewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + overview_ = value; + onChanged(); + } else { + overviewBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * An overview of the changes that were made to the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public Builder setOverview( + com.google.privacy.dlp.v2.TransformationOverview.Builder builderForValue) { + if (overviewBuilder_ == null) { + overview_ = builderForValue.build(); + onChanged(); + } else { + overviewBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * An overview of the changes that were made to the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public Builder mergeOverview(com.google.privacy.dlp.v2.TransformationOverview value) { + if (overviewBuilder_ == null) { + if (overview_ != null) { + overview_ = + com.google.privacy.dlp.v2.TransformationOverview.newBuilder(overview_).mergeFrom(value).buildPartial(); + } else { + overview_ = value; + } + onChanged(); + } else { + overviewBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * An overview of the changes that were made to the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public Builder clearOverview() { + if (overviewBuilder_ == null) { + overview_ = null; + onChanged(); + } else { + overview_ = null; + overviewBuilder_ = null; + } + + return this; + } + /** + *
+     * An overview of the changes that were made to the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public com.google.privacy.dlp.v2.TransformationOverview.Builder getOverviewBuilder() { + + onChanged(); + return getOverviewFieldBuilder().getBuilder(); + } + /** + *
+     * An overview of the changes that were made to the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + public com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder() { + if (overviewBuilder_ != null) { + return overviewBuilder_.getMessageOrBuilder(); + } else { + return overview_ == null ? + com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; + } + } + /** + *
+     * An overview of the changes that were made to the `item`.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder> + getOverviewFieldBuilder() { + if (overviewBuilder_ == null) { + overviewBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder>( + getOverview(), + getParentForChildren(), + isClean()); + overview_ = null; + } + return overviewBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReidentifyContentResponse) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReidentifyContentResponse) + private static final com.google.privacy.dlp.v2.ReidentifyContentResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReidentifyContentResponse(); + } + + public static com.google.privacy.dlp.v2.ReidentifyContentResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReidentifyContentResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReidentifyContentResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReidentifyContentResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponseOrBuilder.java new file mode 100644 index 000000000000..a805fd991754 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponseOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ReidentifyContentResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReidentifyContentResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The re-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return Whether the item field is set. + */ + boolean hasItem(); + /** + *
+   * The re-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + * @return The item. + */ + com.google.privacy.dlp.v2.ContentItem getItem(); + /** + *
+   * The re-identified item.
+   * 
+ * + * .google.privacy.dlp.v2.ContentItem item = 1; + */ + com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); + + /** + *
+   * An overview of the changes that were made to the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return Whether the overview field is set. + */ + boolean hasOverview(); + /** + *
+   * An overview of the changes that were made to the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + * @return The overview. + */ + com.google.privacy.dlp.v2.TransformationOverview getOverview(); + /** + *
+   * An overview of the changes that were made to the `item`.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationOverview overview = 2; + */ + com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java new file mode 100644 index 000000000000..31c4332e55fd --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java @@ -0,0 +1,235 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Operators available for comparing the value of fields.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.RelationalOperator} + */ +public enum RelationalOperator + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unused
+   * 
+ * + * RELATIONAL_OPERATOR_UNSPECIFIED = 0; + */ + RELATIONAL_OPERATOR_UNSPECIFIED(0), + /** + *
+   * Equal. Attempts to match even with incompatible types.
+   * 
+ * + * EQUAL_TO = 1; + */ + EQUAL_TO(1), + /** + *
+   * Not equal to. Attempts to match even with incompatible types.
+   * 
+ * + * NOT_EQUAL_TO = 2; + */ + NOT_EQUAL_TO(2), + /** + *
+   * Greater than.
+   * 
+ * + * GREATER_THAN = 3; + */ + GREATER_THAN(3), + /** + *
+   * Less than.
+   * 
+ * + * LESS_THAN = 4; + */ + LESS_THAN(4), + /** + *
+   * Greater than or equals.
+   * 
+ * + * GREATER_THAN_OR_EQUALS = 5; + */ + GREATER_THAN_OR_EQUALS(5), + /** + *
+   * Less than or equals.
+   * 
+ * + * LESS_THAN_OR_EQUALS = 6; + */ + LESS_THAN_OR_EQUALS(6), + /** + *
+   * Exists
+   * 
+ * + * EXISTS = 7; + */ + EXISTS(7), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unused
+   * 
+ * + * RELATIONAL_OPERATOR_UNSPECIFIED = 0; + */ + public static final int RELATIONAL_OPERATOR_UNSPECIFIED_VALUE = 0; + /** + *
+   * Equal. Attempts to match even with incompatible types.
+   * 
+ * + * EQUAL_TO = 1; + */ + public static final int EQUAL_TO_VALUE = 1; + /** + *
+   * Not equal to. Attempts to match even with incompatible types.
+   * 
+ * + * NOT_EQUAL_TO = 2; + */ + public static final int NOT_EQUAL_TO_VALUE = 2; + /** + *
+   * Greater than.
+   * 
+ * + * GREATER_THAN = 3; + */ + public static final int GREATER_THAN_VALUE = 3; + /** + *
+   * Less than.
+   * 
+ * + * LESS_THAN = 4; + */ + public static final int LESS_THAN_VALUE = 4; + /** + *
+   * Greater than or equals.
+   * 
+ * + * GREATER_THAN_OR_EQUALS = 5; + */ + public static final int GREATER_THAN_OR_EQUALS_VALUE = 5; + /** + *
+   * Less than or equals.
+   * 
+ * + * LESS_THAN_OR_EQUALS = 6; + */ + public static final int LESS_THAN_OR_EQUALS_VALUE = 6; + /** + *
+   * Exists
+   * 
+ * + * EXISTS = 7; + */ + public static final int EXISTS_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RelationalOperator valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RelationalOperator forNumber(int value) { + switch (value) { + case 0: return RELATIONAL_OPERATOR_UNSPECIFIED; + case 1: return EQUAL_TO; + case 2: return NOT_EQUAL_TO; + case 3: return GREATER_THAN; + case 4: return LESS_THAN; + case 5: return GREATER_THAN_OR_EQUALS; + case 6: return LESS_THAN_OR_EQUALS; + case 7: return EXISTS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + RelationalOperator> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RelationalOperator findValueByNumber(int number) { + return RelationalOperator.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(3); + } + + private static final RelationalOperator[] VALUES = values(); + + public static RelationalOperator valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RelationalOperator(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.RelationalOperator) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfig.java new file mode 100644 index 000000000000..f98afeb62d0d --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfig.java @@ -0,0 +1,785 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Replace each input value with a value randomly selected from the dictionary.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReplaceDictionaryConfig} + */ +public final class ReplaceDictionaryConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReplaceDictionaryConfig) + ReplaceDictionaryConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReplaceDictionaryConfig.newBuilder() to construct. + private ReplaceDictionaryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReplaceDictionaryConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReplaceDictionaryConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReplaceDictionaryConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder subBuilder = null; + if (typeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReplaceDictionaryConfig.class, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + WORD_LIST(1), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return WORD_LIST; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int WORD_LIST_FIELD_NUMBER = 1; + /** + *
+   * A list of words to select from for random replacement. The
+   * [limits](https://cloud.google.com/dlp/limits) page contains details about
+   * the size limits of dictionaries.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return Whether the wordList field is set. + */ + @java.lang.Override + public boolean hasWordList() { + return typeCase_ == 1; + } + /** + *
+   * A list of words to select from for random replacement. The
+   * [limits](https://cloud.google.com/dlp/limits) page contains details about
+   * the size limits of dictionaries.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return The wordList. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + /** + *
+   * A list of words to select from for random replacement. The
+   * [limits](https://cloud.google.com/dlp/limits) page contains details about
+   * the size limits of dictionaries.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ReplaceDictionaryConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ReplaceDictionaryConfig other = (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getWordList() + .equals(other.getWordList())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + WORD_LIST_FIELD_NUMBER; + hash = (53 * hash) + getWordList().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ReplaceDictionaryConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Replace each input value with a value randomly selected from the dictionary.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReplaceDictionaryConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReplaceDictionaryConfig) + com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReplaceDictionaryConfig.class, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ReplaceDictionaryConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceDictionaryConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceDictionaryConfig build() { + com.google.privacy.dlp.v2.ReplaceDictionaryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceDictionaryConfig buildPartial() { + com.google.privacy.dlp.v2.ReplaceDictionaryConfig result = new com.google.privacy.dlp.v2.ReplaceDictionaryConfig(this); + if (typeCase_ == 1) { + if (wordListBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = wordListBuilder_.build(); + } + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ReplaceDictionaryConfig) { + return mergeFrom((com.google.privacy.dlp.v2.ReplaceDictionaryConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ReplaceDictionaryConfig other) { + if (other == com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance()) return this; + switch (other.getTypeCase()) { + case WORD_LIST: { + mergeWordList(other.getWordList()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ReplaceDictionaryConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder> wordListBuilder_; + /** + *
+     * A list of words to select from for random replacement. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return Whether the wordList field is set. + */ + @java.lang.Override + public boolean hasWordList() { + return typeCase_ == 1; + } + /** + *
+     * A list of words to select from for random replacement. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return The wordList. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() { + if (wordListBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return wordListBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + } + /** + *
+     * A list of words to select from for random replacement. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public Builder setWordList(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) { + if (wordListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + wordListBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + *
+     * A list of words to select from for random replacement. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public Builder setWordList( + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder builderForValue) { + if (wordListBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + wordListBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + *
+     * A list of words to select from for random replacement. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public Builder mergeWordList(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) { + if (wordListBuilder_ == null) { + if (typeCase_ == 1 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + wordListBuilder_.mergeFrom(value); + } else { + wordListBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + *
+     * A list of words to select from for random replacement. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public Builder clearWordList() { + if (wordListBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + wordListBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of words to select from for random replacement. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder getWordListBuilder() { + return getWordListFieldBuilder().getBuilder(); + } + /** + *
+     * A list of words to select from for random replacement. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder() { + if ((typeCase_ == 1) && (wordListBuilder_ != null)) { + return wordListBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + } + /** + *
+     * A list of words to select from for random replacement. The
+     * [limits](https://cloud.google.com/dlp/limits) page contains details about
+     * the size limits of dictionaries.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder> + getWordListFieldBuilder() { + if (wordListBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); + } + wordListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged();; + return wordListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReplaceDictionaryConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReplaceDictionaryConfig) + private static final com.google.privacy.dlp.v2.ReplaceDictionaryConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReplaceDictionaryConfig(); + } + + public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReplaceDictionaryConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReplaceDictionaryConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceDictionaryConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfigOrBuilder.java new file mode 100644 index 000000000000..d4ce18a55313 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfigOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ReplaceDictionaryConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReplaceDictionaryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of words to select from for random replacement. The
+   * [limits](https://cloud.google.com/dlp/limits) page contains details about
+   * the size limits of dictionaries.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return Whether the wordList field is set. + */ + boolean hasWordList(); + /** + *
+   * A list of words to select from for random replacement. The
+   * [limits](https://cloud.google.com/dlp/limits) page contains details about
+   * the size limits of dictionaries.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + * @return The wordList. + */ + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList(); + /** + *
+   * A list of words to select from for random replacement. The
+   * [limits](https://cloud.google.com/dlp/limits) page contains details about
+   * the size limits of dictionaries.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; + */ + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder(); + + public com.google.privacy.dlp.v2.ReplaceDictionaryConfig.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfig.java new file mode 100644 index 000000000000..452727c9d0f2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfig.java @@ -0,0 +1,665 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Replace each input value with a given `Value`.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReplaceValueConfig} + */ +public final class ReplaceValueConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReplaceValueConfig) + ReplaceValueConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReplaceValueConfig.newBuilder() to construct. + private ReplaceValueConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReplaceValueConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReplaceValueConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReplaceValueConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (newValue_ != null) { + subBuilder = newValue_.toBuilder(); + } + newValue_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(newValue_); + newValue_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReplaceValueConfig.class, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder.class); + } + + public static final int NEW_VALUE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.Value newValue_; + /** + *
+   * Value to replace it with.
+   * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + * @return Whether the newValue field is set. + */ + @java.lang.Override + public boolean hasNewValue() { + return newValue_ != null; + } + /** + *
+   * Value to replace it with.
+   * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + * @return The newValue. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getNewValue() { + return newValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : newValue_; + } + /** + *
+   * Value to replace it with.
+   * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getNewValueOrBuilder() { + return getNewValue(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (newValue_ != null) { + output.writeMessage(1, getNewValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (newValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getNewValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ReplaceValueConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ReplaceValueConfig other = (com.google.privacy.dlp.v2.ReplaceValueConfig) obj; + + if (hasNewValue() != other.hasNewValue()) return false; + if (hasNewValue()) { + if (!getNewValue() + .equals(other.getNewValue())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNewValue()) { + hash = (37 * hash) + NEW_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getNewValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ReplaceValueConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Replace each input value with a given `Value`.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReplaceValueConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReplaceValueConfig) + com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReplaceValueConfig.class, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ReplaceValueConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (newValueBuilder_ == null) { + newValue_ = null; + } else { + newValue_ = null; + newValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceValueConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceValueConfig build() { + com.google.privacy.dlp.v2.ReplaceValueConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceValueConfig buildPartial() { + com.google.privacy.dlp.v2.ReplaceValueConfig result = new com.google.privacy.dlp.v2.ReplaceValueConfig(this); + if (newValueBuilder_ == null) { + result.newValue_ = newValue_; + } else { + result.newValue_ = newValueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ReplaceValueConfig) { + return mergeFrom((com.google.privacy.dlp.v2.ReplaceValueConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ReplaceValueConfig other) { + if (other == com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance()) return this; + if (other.hasNewValue()) { + mergeNewValue(other.getNewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ReplaceValueConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ReplaceValueConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.Value newValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> newValueBuilder_; + /** + *
+     * Value to replace it with.
+     * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + * @return Whether the newValue field is set. + */ + public boolean hasNewValue() { + return newValueBuilder_ != null || newValue_ != null; + } + /** + *
+     * Value to replace it with.
+     * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + * @return The newValue. + */ + public com.google.privacy.dlp.v2.Value getNewValue() { + if (newValueBuilder_ == null) { + return newValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : newValue_; + } else { + return newValueBuilder_.getMessage(); + } + } + /** + *
+     * Value to replace it with.
+     * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + */ + public Builder setNewValue(com.google.privacy.dlp.v2.Value value) { + if (newValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newValue_ = value; + onChanged(); + } else { + newValueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Value to replace it with.
+     * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + */ + public Builder setNewValue( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (newValueBuilder_ == null) { + newValue_ = builderForValue.build(); + onChanged(); + } else { + newValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Value to replace it with.
+     * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + */ + public Builder mergeNewValue(com.google.privacy.dlp.v2.Value value) { + if (newValueBuilder_ == null) { + if (newValue_ != null) { + newValue_ = + com.google.privacy.dlp.v2.Value.newBuilder(newValue_).mergeFrom(value).buildPartial(); + } else { + newValue_ = value; + } + onChanged(); + } else { + newValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Value to replace it with.
+     * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + */ + public Builder clearNewValue() { + if (newValueBuilder_ == null) { + newValue_ = null; + onChanged(); + } else { + newValue_ = null; + newValueBuilder_ = null; + } + + return this; + } + /** + *
+     * Value to replace it with.
+     * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getNewValueBuilder() { + + onChanged(); + return getNewValueFieldBuilder().getBuilder(); + } + /** + *
+     * Value to replace it with.
+     * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getNewValueOrBuilder() { + if (newValueBuilder_ != null) { + return newValueBuilder_.getMessageOrBuilder(); + } else { + return newValue_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : newValue_; + } + } + /** + *
+     * Value to replace it with.
+     * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getNewValueFieldBuilder() { + if (newValueBuilder_ == null) { + newValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getNewValue(), + getParentForChildren(), + isClean()); + newValue_ = null; + } + return newValueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReplaceValueConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReplaceValueConfig) + private static final com.google.privacy.dlp.v2.ReplaceValueConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReplaceValueConfig(); + } + + public static com.google.privacy.dlp.v2.ReplaceValueConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReplaceValueConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReplaceValueConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceValueConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfigOrBuilder.java new file mode 100644 index 000000000000..61fbf07fc518 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfigOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ReplaceValueConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReplaceValueConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Value to replace it with.
+   * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + * @return Whether the newValue field is set. + */ + boolean hasNewValue(); + /** + *
+   * Value to replace it with.
+   * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + * @return The newValue. + */ + com.google.privacy.dlp.v2.Value getNewValue(); + /** + *
+   * Value to replace it with.
+   * 
+ * + * .google.privacy.dlp.v2.Value new_value = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getNewValueOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfig.java new file mode 100644 index 000000000000..49d41adcc78e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfig.java @@ -0,0 +1,429 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Replace each matching finding with the name of the info_type.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReplaceWithInfoTypeConfig} + */ +public final class ReplaceWithInfoTypeConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) + ReplaceWithInfoTypeConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use ReplaceWithInfoTypeConfig.newBuilder() to construct. + private ReplaceWithInfoTypeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ReplaceWithInfoTypeConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ReplaceWithInfoTypeConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ReplaceWithInfoTypeConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.class, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig other = (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Replace each matching finding with the name of the info_type.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ReplaceWithInfoTypeConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.class, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig build() { + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig buildPartial() { + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig result = new com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) { + return mergeFrom((com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig other) { + if (other == com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) + private static final com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig(); + } + + public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReplaceWithInfoTypeConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReplaceWithInfoTypeConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfigOrBuilder.java new file mode 100644 index 000000000000..8f9400b276d6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfigOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ReplaceWithInfoTypeConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java new file mode 100644 index 000000000000..f0ba9260b426 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java @@ -0,0 +1,151 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * How broadly a resource has been shared. New items may be added over time.
+ * A higher number means more restricted.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.ResourceVisibility} + */ +public enum ResourceVisibility + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unused.
+   * 
+ * + * RESOURCE_VISIBILITY_UNSPECIFIED = 0; + */ + RESOURCE_VISIBILITY_UNSPECIFIED(0), + /** + *
+   * Visible to any user.
+   * 
+ * + * RESOURCE_VISIBILITY_PUBLIC = 10; + */ + RESOURCE_VISIBILITY_PUBLIC(10), + /** + *
+   * Visible only to specific users.
+   * 
+ * + * RESOURCE_VISIBILITY_RESTRICTED = 20; + */ + RESOURCE_VISIBILITY_RESTRICTED(20), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unused.
+   * 
+ * + * RESOURCE_VISIBILITY_UNSPECIFIED = 0; + */ + public static final int RESOURCE_VISIBILITY_UNSPECIFIED_VALUE = 0; + /** + *
+   * Visible to any user.
+   * 
+ * + * RESOURCE_VISIBILITY_PUBLIC = 10; + */ + public static final int RESOURCE_VISIBILITY_PUBLIC_VALUE = 10; + /** + *
+   * Visible only to specific users.
+   * 
+ * + * RESOURCE_VISIBILITY_RESTRICTED = 20; + */ + public static final int RESOURCE_VISIBILITY_RESTRICTED_VALUE = 20; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourceVisibility valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ResourceVisibility forNumber(int value) { + switch (value) { + case 0: return RESOURCE_VISIBILITY_UNSPECIFIED; + case 10: return RESOURCE_VISIBILITY_PUBLIC; + case 20: return RESOURCE_VISIBILITY_RESTRICTED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ResourceVisibility> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ResourceVisibility findValueByNumber(int number) { + return ResourceVisibility.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(10); + } + + private static final ResourceVisibility[] VALUES = values(); + + public static ResourceVisibility valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ResourceVisibility(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.ResourceVisibility) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java new file mode 100644 index 000000000000..a512fc3e744f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java @@ -0,0 +1,1369 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Configuration for a risk analysis job. See
+ * https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RiskAnalysisJobConfig} + */ +public final class RiskAnalysisJobConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RiskAnalysisJobConfig) + RiskAnalysisJobConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use RiskAnalysisJobConfig.newBuilder() to construct. + private RiskAnalysisJobConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RiskAnalysisJobConfig() { + actions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RiskAnalysisJobConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RiskAnalysisJobConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.PrivacyMetric.Builder subBuilder = null; + if (privacyMetric_ != null) { + subBuilder = privacyMetric_.toBuilder(); + } + privacyMetric_ = input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(privacyMetric_); + privacyMetric_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (sourceTable_ != null) { + subBuilder = sourceTable_.toBuilder(); + } + sourceTable_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sourceTable_); + sourceTable_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + actions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + actions_.add( + input.readMessage(com.google.privacy.dlp.v2.Action.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RiskAnalysisJobConfig.class, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder.class); + } + + public static final int PRIVACY_METRIC_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.PrivacyMetric privacyMetric_; + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + * @return Whether the privacyMetric field is set. + */ + @java.lang.Override + public boolean hasPrivacyMetric() { + return privacyMetric_ != null; + } + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + * @return The privacyMetric. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetric getPrivacyMetric() { + return privacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : privacyMetric_; + } + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getPrivacyMetricOrBuilder() { + return getPrivacyMetric(); + } + + public static final int SOURCE_TABLE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.BigQueryTable sourceTable_; + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + * @return Whether the sourceTable field is set. + */ + @java.lang.Override + public boolean hasSourceTable() { + return sourceTable_ != null; + } + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + * @return The sourceTable. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getSourceTable() { + return sourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : sourceTable_; + } + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getSourceTableOrBuilder() { + return getSourceTable(); + } + + public static final int ACTIONS_FIELD_NUMBER = 3; + private java.util.List actions_; + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action getActions(int index) { + return actions_.get(index); + } + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (privacyMetric_ != null) { + output.writeMessage(1, getPrivacyMetric()); + } + if (sourceTable_ != null) { + output.writeMessage(2, getSourceTable()); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(3, actions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (privacyMetric_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPrivacyMetric()); + } + if (sourceTable_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSourceTable()); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, actions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.RiskAnalysisJobConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.RiskAnalysisJobConfig other = (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) obj; + + if (hasPrivacyMetric() != other.hasPrivacyMetric()) return false; + if (hasPrivacyMetric()) { + if (!getPrivacyMetric() + .equals(other.getPrivacyMetric())) return false; + } + if (hasSourceTable() != other.hasSourceTable()) return false; + if (hasSourceTable()) { + if (!getSourceTable() + .equals(other.getSourceTable())) return false; + } + if (!getActionsList() + .equals(other.getActionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPrivacyMetric()) { + hash = (37 * hash) + PRIVACY_METRIC_FIELD_NUMBER; + hash = (53 * hash) + getPrivacyMetric().hashCode(); + } + if (hasSourceTable()) { + hash = (37 * hash) + SOURCE_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getSourceTable().hashCode(); + } + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.RiskAnalysisJobConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration for a risk analysis job. See
+   * https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.RiskAnalysisJobConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RiskAnalysisJobConfig) + com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.RiskAnalysisJobConfig.class, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.RiskAnalysisJobConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getActionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (privacyMetricBuilder_ == null) { + privacyMetric_ = null; + } else { + privacyMetric_ = null; + privacyMetricBuilder_ = null; + } + if (sourceTableBuilder_ == null) { + sourceTable_ = null; + } else { + sourceTable_ = null; + sourceTableBuilder_ = null; + } + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + actionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig build() { + com.google.privacy.dlp.v2.RiskAnalysisJobConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig buildPartial() { + com.google.privacy.dlp.v2.RiskAnalysisJobConfig result = new com.google.privacy.dlp.v2.RiskAnalysisJobConfig(this); + int from_bitField0_ = bitField0_; + if (privacyMetricBuilder_ == null) { + result.privacyMetric_ = privacyMetric_; + } else { + result.privacyMetric_ = privacyMetricBuilder_.build(); + } + if (sourceTableBuilder_ == null) { + result.sourceTable_ = sourceTable_; + } else { + result.sourceTable_ = sourceTableBuilder_.build(); + } + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.RiskAnalysisJobConfig) { + return mergeFrom((com.google.privacy.dlp.v2.RiskAnalysisJobConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.RiskAnalysisJobConfig other) { + if (other == com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance()) return this; + if (other.hasPrivacyMetric()) { + mergePrivacyMetric(other.getPrivacyMetric()); + } + if (other.hasSourceTable()) { + mergeSourceTable(other.getSourceTable()); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000001); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getActionsFieldBuilder() : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.RiskAnalysisJobConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.PrivacyMetric privacyMetric_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder> privacyMetricBuilder_; + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + * @return Whether the privacyMetric field is set. + */ + public boolean hasPrivacyMetric() { + return privacyMetricBuilder_ != null || privacyMetric_ != null; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + * @return The privacyMetric. + */ + public com.google.privacy.dlp.v2.PrivacyMetric getPrivacyMetric() { + if (privacyMetricBuilder_ == null) { + return privacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : privacyMetric_; + } else { + return privacyMetricBuilder_.getMessage(); + } + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + */ + public Builder setPrivacyMetric(com.google.privacy.dlp.v2.PrivacyMetric value) { + if (privacyMetricBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + privacyMetric_ = value; + onChanged(); + } else { + privacyMetricBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + */ + public Builder setPrivacyMetric( + com.google.privacy.dlp.v2.PrivacyMetric.Builder builderForValue) { + if (privacyMetricBuilder_ == null) { + privacyMetric_ = builderForValue.build(); + onChanged(); + } else { + privacyMetricBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + */ + public Builder mergePrivacyMetric(com.google.privacy.dlp.v2.PrivacyMetric value) { + if (privacyMetricBuilder_ == null) { + if (privacyMetric_ != null) { + privacyMetric_ = + com.google.privacy.dlp.v2.PrivacyMetric.newBuilder(privacyMetric_).mergeFrom(value).buildPartial(); + } else { + privacyMetric_ = value; + } + onChanged(); + } else { + privacyMetricBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + */ + public Builder clearPrivacyMetric() { + if (privacyMetricBuilder_ == null) { + privacyMetric_ = null; + onChanged(); + } else { + privacyMetric_ = null; + privacyMetricBuilder_ = null; + } + + return this; + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.Builder getPrivacyMetricBuilder() { + + onChanged(); + return getPrivacyMetricFieldBuilder().getBuilder(); + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + */ + public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getPrivacyMetricOrBuilder() { + if (privacyMetricBuilder_ != null) { + return privacyMetricBuilder_.getMessageOrBuilder(); + } else { + return privacyMetric_ == null ? + com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : privacyMetric_; + } + } + /** + *
+     * Privacy metric to compute.
+     * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder> + getPrivacyMetricFieldBuilder() { + if (privacyMetricBuilder_ == null) { + privacyMetricBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder>( + getPrivacyMetric(), + getParentForChildren(), + isClean()); + privacyMetric_ = null; + } + return privacyMetricBuilder_; + } + + private com.google.privacy.dlp.v2.BigQueryTable sourceTable_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> sourceTableBuilder_; + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + * @return Whether the sourceTable field is set. + */ + public boolean hasSourceTable() { + return sourceTableBuilder_ != null || sourceTable_ != null; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + * @return The sourceTable. + */ + public com.google.privacy.dlp.v2.BigQueryTable getSourceTable() { + if (sourceTableBuilder_ == null) { + return sourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : sourceTable_; + } else { + return sourceTableBuilder_.getMessage(); + } + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + */ + public Builder setSourceTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (sourceTableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceTable_ = value; + onChanged(); + } else { + sourceTableBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + */ + public Builder setSourceTable( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (sourceTableBuilder_ == null) { + sourceTable_ = builderForValue.build(); + onChanged(); + } else { + sourceTableBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + */ + public Builder mergeSourceTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (sourceTableBuilder_ == null) { + if (sourceTable_ != null) { + sourceTable_ = + com.google.privacy.dlp.v2.BigQueryTable.newBuilder(sourceTable_).mergeFrom(value).buildPartial(); + } else { + sourceTable_ = value; + } + onChanged(); + } else { + sourceTableBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + */ + public Builder clearSourceTable() { + if (sourceTableBuilder_ == null) { + sourceTable_ = null; + onChanged(); + } else { + sourceTable_ = null; + sourceTableBuilder_ = null; + } + + return this; + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getSourceTableBuilder() { + + onChanged(); + return getSourceTableFieldBuilder().getBuilder(); + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getSourceTableOrBuilder() { + if (sourceTableBuilder_ != null) { + return sourceTableBuilder_.getMessageOrBuilder(); + } else { + return sourceTable_ == null ? + com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : sourceTable_; + } + } + /** + *
+     * Input dataset to compute metrics over.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getSourceTableFieldBuilder() { + if (sourceTableBuilder_ == null) { + sourceTableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + getSourceTable(), + getParentForChildren(), + isClean()); + sourceTable_ = null; + } + return sourceTableBuilder_; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder> actionsBuilder_; + + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public com.google.privacy.dlp.v2.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public Builder setActions( + int index, com.google.privacy.dlp.v2.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public Builder setActions( + int index, com.google.privacy.dlp.v2.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public Builder addActions(com.google.privacy.dlp.v2.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public Builder addActions( + int index, com.google.privacy.dlp.v2.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public Builder addActions( + com.google.privacy.dlp.v2.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public Builder addActions( + int index, com.google.privacy.dlp.v2.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public com.google.privacy.dlp.v2.Action.Builder getActionsBuilder( + int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( + int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public com.google.privacy.dlp.v2.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Action.getDefaultInstance()); + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public com.google.privacy.dlp.v2.Action.Builder addActionsBuilder( + int index) { + return getActionsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Action.getDefaultInstance()); + } + /** + *
+     * Actions to execute at the completion of the job. Are executed in the order
+     * provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder>( + actions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + actions_ = null; + } + return actionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RiskAnalysisJobConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RiskAnalysisJobConfig) + private static final com.google.privacy.dlp.v2.RiskAnalysisJobConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RiskAnalysisJobConfig(); + } + + public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RiskAnalysisJobConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RiskAnalysisJobConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfigOrBuilder.java new file mode 100644 index 000000000000..c3f296ca1358 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfigOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface RiskAnalysisJobConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RiskAnalysisJobConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + * @return Whether the privacyMetric field is set. + */ + boolean hasPrivacyMetric(); + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + * @return The privacyMetric. + */ + com.google.privacy.dlp.v2.PrivacyMetric getPrivacyMetric(); + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; + */ + com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getPrivacyMetricOrBuilder(); + + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + * @return Whether the sourceTable field is set. + */ + boolean hasSourceTable(); + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + * @return The sourceTable. + */ + com.google.privacy.dlp.v2.BigQueryTable getSourceTable(); + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable source_table = 2; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getSourceTableOrBuilder(); + + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + java.util.List + getActionsList(); + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + com.google.privacy.dlp.v2.Action getActions(int index); + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + int getActionsCount(); + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + java.util.List + getActionsOrBuilderList(); + /** + *
+   * Actions to execute at the completion of the job. Are executed in the order
+   * provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Action actions = 3; + */ + com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java new file mode 100644 index 000000000000..6e693ddb6dfb --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java @@ -0,0 +1,821 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Schedule for inspect job triggers.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Schedule} + */ +public final class Schedule extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Schedule) + ScheduleOrBuilder { +private static final long serialVersionUID = 0L; + // Use Schedule.newBuilder() to construct. + private Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Schedule() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Schedule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Schedule( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (optionCase_ == 1) { + subBuilder = ((com.google.protobuf.Duration) option_).toBuilder(); + } + option_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Duration) option_); + option_ = subBuilder.buildPartial(); + } + optionCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Schedule.class, com.google.privacy.dlp.v2.Schedule.Builder.class); + } + + private int optionCase_ = 0; + private java.lang.Object option_; + public enum OptionCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RECURRENCE_PERIOD_DURATION(1), + OPTION_NOT_SET(0); + private final int value; + private OptionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OptionCase valueOf(int value) { + return forNumber(value); + } + + public static OptionCase forNumber(int value) { + switch (value) { + case 1: return RECURRENCE_PERIOD_DURATION; + case 0: return OPTION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public OptionCase + getOptionCase() { + return OptionCase.forNumber( + optionCase_); + } + + public static final int RECURRENCE_PERIOD_DURATION_FIELD_NUMBER = 1; + /** + *
+   * With this option a job is started on a regular periodic basis. For
+   * example: every day (86400 seconds).
+   * A scheduled start time will be skipped if the previous
+   * execution has not ended when its scheduled time occurs.
+   * This value must be set to a time duration greater than or equal
+   * to 1 day and can be no longer than 60 days.
+   * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + * @return Whether the recurrencePeriodDuration field is set. + */ + @java.lang.Override + public boolean hasRecurrencePeriodDuration() { + return optionCase_ == 1; + } + /** + *
+   * With this option a job is started on a regular periodic basis. For
+   * example: every day (86400 seconds).
+   * A scheduled start time will be skipped if the previous
+   * execution has not ended when its scheduled time occurs.
+   * This value must be set to a time duration greater than or equal
+   * to 1 day and can be no longer than 60 days.
+   * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + * @return The recurrencePeriodDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getRecurrencePeriodDuration() { + if (optionCase_ == 1) { + return (com.google.protobuf.Duration) option_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + /** + *
+   * With this option a job is started on a regular periodic basis. For
+   * example: every day (86400 seconds).
+   * A scheduled start time will be skipped if the previous
+   * execution has not ended when its scheduled time occurs.
+   * This value must be set to a time duration greater than or equal
+   * to 1 day and can be no longer than 60 days.
+   * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getRecurrencePeriodDurationOrBuilder() { + if (optionCase_ == 1) { + return (com.google.protobuf.Duration) option_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (optionCase_ == 1) { + output.writeMessage(1, (com.google.protobuf.Duration) option_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (optionCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.protobuf.Duration) option_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Schedule)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Schedule other = (com.google.privacy.dlp.v2.Schedule) obj; + + if (!getOptionCase().equals(other.getOptionCase())) return false; + switch (optionCase_) { + case 1: + if (!getRecurrencePeriodDuration() + .equals(other.getRecurrencePeriodDuration())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (optionCase_) { + case 1: + hash = (37 * hash) + RECURRENCE_PERIOD_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getRecurrencePeriodDuration().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Schedule parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Schedule parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Schedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Schedule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Schedule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Schedule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Schedule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Schedule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Schedule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Schedule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Schedule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Schedule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Schedule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Schedule for inspect job triggers.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Schedule} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Schedule) + com.google.privacy.dlp.v2.ScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Schedule.class, com.google.privacy.dlp.v2.Schedule.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Schedule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + optionCase_ = 0; + option_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Schedule getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Schedule build() { + com.google.privacy.dlp.v2.Schedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Schedule buildPartial() { + com.google.privacy.dlp.v2.Schedule result = new com.google.privacy.dlp.v2.Schedule(this); + if (optionCase_ == 1) { + if (recurrencePeriodDurationBuilder_ == null) { + result.option_ = option_; + } else { + result.option_ = recurrencePeriodDurationBuilder_.build(); + } + } + result.optionCase_ = optionCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Schedule) { + return mergeFrom((com.google.privacy.dlp.v2.Schedule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Schedule other) { + if (other == com.google.privacy.dlp.v2.Schedule.getDefaultInstance()) return this; + switch (other.getOptionCase()) { + case RECURRENCE_PERIOD_DURATION: { + mergeRecurrencePeriodDuration(other.getRecurrencePeriodDuration()); + break; + } + case OPTION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Schedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Schedule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int optionCase_ = 0; + private java.lang.Object option_; + public OptionCase + getOptionCase() { + return OptionCase.forNumber( + optionCase_); + } + + public Builder clearOption() { + optionCase_ = 0; + option_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> recurrencePeriodDurationBuilder_; + /** + *
+     * With this option a job is started on a regular periodic basis. For
+     * example: every day (86400 seconds).
+     * A scheduled start time will be skipped if the previous
+     * execution has not ended when its scheduled time occurs.
+     * This value must be set to a time duration greater than or equal
+     * to 1 day and can be no longer than 60 days.
+     * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + * @return Whether the recurrencePeriodDuration field is set. + */ + @java.lang.Override + public boolean hasRecurrencePeriodDuration() { + return optionCase_ == 1; + } + /** + *
+     * With this option a job is started on a regular periodic basis. For
+     * example: every day (86400 seconds).
+     * A scheduled start time will be skipped if the previous
+     * execution has not ended when its scheduled time occurs.
+     * This value must be set to a time duration greater than or equal
+     * to 1 day and can be no longer than 60 days.
+     * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + * @return The recurrencePeriodDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getRecurrencePeriodDuration() { + if (recurrencePeriodDurationBuilder_ == null) { + if (optionCase_ == 1) { + return (com.google.protobuf.Duration) option_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (optionCase_ == 1) { + return recurrencePeriodDurationBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + *
+     * With this option a job is started on a regular periodic basis. For
+     * example: every day (86400 seconds).
+     * A scheduled start time will be skipped if the previous
+     * execution has not ended when its scheduled time occurs.
+     * This value must be set to a time duration greater than or equal
+     * to 1 day and can be no longer than 60 days.
+     * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + */ + public Builder setRecurrencePeriodDuration(com.google.protobuf.Duration value) { + if (recurrencePeriodDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + option_ = value; + onChanged(); + } else { + recurrencePeriodDurationBuilder_.setMessage(value); + } + optionCase_ = 1; + return this; + } + /** + *
+     * With this option a job is started on a regular periodic basis. For
+     * example: every day (86400 seconds).
+     * A scheduled start time will be skipped if the previous
+     * execution has not ended when its scheduled time occurs.
+     * This value must be set to a time duration greater than or equal
+     * to 1 day and can be no longer than 60 days.
+     * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + */ + public Builder setRecurrencePeriodDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (recurrencePeriodDurationBuilder_ == null) { + option_ = builderForValue.build(); + onChanged(); + } else { + recurrencePeriodDurationBuilder_.setMessage(builderForValue.build()); + } + optionCase_ = 1; + return this; + } + /** + *
+     * With this option a job is started on a regular periodic basis. For
+     * example: every day (86400 seconds).
+     * A scheduled start time will be skipped if the previous
+     * execution has not ended when its scheduled time occurs.
+     * This value must be set to a time duration greater than or equal
+     * to 1 day and can be no longer than 60 days.
+     * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + */ + public Builder mergeRecurrencePeriodDuration(com.google.protobuf.Duration value) { + if (recurrencePeriodDurationBuilder_ == null) { + if (optionCase_ == 1 && + option_ != com.google.protobuf.Duration.getDefaultInstance()) { + option_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) option_) + .mergeFrom(value).buildPartial(); + } else { + option_ = value; + } + onChanged(); + } else { + if (optionCase_ == 1) { + recurrencePeriodDurationBuilder_.mergeFrom(value); + } else { + recurrencePeriodDurationBuilder_.setMessage(value); + } + } + optionCase_ = 1; + return this; + } + /** + *
+     * With this option a job is started on a regular periodic basis. For
+     * example: every day (86400 seconds).
+     * A scheduled start time will be skipped if the previous
+     * execution has not ended when its scheduled time occurs.
+     * This value must be set to a time duration greater than or equal
+     * to 1 day and can be no longer than 60 days.
+     * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + */ + public Builder clearRecurrencePeriodDuration() { + if (recurrencePeriodDurationBuilder_ == null) { + if (optionCase_ == 1) { + optionCase_ = 0; + option_ = null; + onChanged(); + } + } else { + if (optionCase_ == 1) { + optionCase_ = 0; + option_ = null; + } + recurrencePeriodDurationBuilder_.clear(); + } + return this; + } + /** + *
+     * With this option a job is started on a regular periodic basis. For
+     * example: every day (86400 seconds).
+     * A scheduled start time will be skipped if the previous
+     * execution has not ended when its scheduled time occurs.
+     * This value must be set to a time duration greater than or equal
+     * to 1 day and can be no longer than 60 days.
+     * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + */ + public com.google.protobuf.Duration.Builder getRecurrencePeriodDurationBuilder() { + return getRecurrencePeriodDurationFieldBuilder().getBuilder(); + } + /** + *
+     * With this option a job is started on a regular periodic basis. For
+     * example: every day (86400 seconds).
+     * A scheduled start time will be skipped if the previous
+     * execution has not ended when its scheduled time occurs.
+     * This value must be set to a time duration greater than or equal
+     * to 1 day and can be no longer than 60 days.
+     * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getRecurrencePeriodDurationOrBuilder() { + if ((optionCase_ == 1) && (recurrencePeriodDurationBuilder_ != null)) { + return recurrencePeriodDurationBuilder_.getMessageOrBuilder(); + } else { + if (optionCase_ == 1) { + return (com.google.protobuf.Duration) option_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + *
+     * With this option a job is started on a regular periodic basis. For
+     * example: every day (86400 seconds).
+     * A scheduled start time will be skipped if the previous
+     * execution has not ended when its scheduled time occurs.
+     * This value must be set to a time duration greater than or equal
+     * to 1 day and can be no longer than 60 days.
+     * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getRecurrencePeriodDurationFieldBuilder() { + if (recurrencePeriodDurationBuilder_ == null) { + if (!(optionCase_ == 1)) { + option_ = com.google.protobuf.Duration.getDefaultInstance(); + } + recurrencePeriodDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) option_, + getParentForChildren(), + isClean()); + option_ = null; + } + optionCase_ = 1; + onChanged();; + return recurrencePeriodDurationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Schedule) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Schedule) + private static final com.google.privacy.dlp.v2.Schedule DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Schedule(); + } + + public static com.google.privacy.dlp.v2.Schedule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schedule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Schedule(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Schedule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java new file mode 100644 index 000000000000..e86a68c3c9f8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ScheduleOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Schedule) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * With this option a job is started on a regular periodic basis. For
+   * example: every day (86400 seconds).
+   * A scheduled start time will be skipped if the previous
+   * execution has not ended when its scheduled time occurs.
+   * This value must be set to a time duration greater than or equal
+   * to 1 day and can be no longer than 60 days.
+   * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + * @return Whether the recurrencePeriodDuration field is set. + */ + boolean hasRecurrencePeriodDuration(); + /** + *
+   * With this option a job is started on a regular periodic basis. For
+   * example: every day (86400 seconds).
+   * A scheduled start time will be skipped if the previous
+   * execution has not ended when its scheduled time occurs.
+   * This value must be set to a time duration greater than or equal
+   * to 1 day and can be no longer than 60 days.
+   * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + * @return The recurrencePeriodDuration. + */ + com.google.protobuf.Duration getRecurrencePeriodDuration(); + /** + *
+   * With this option a job is started on a regular periodic basis. For
+   * example: every day (86400 seconds).
+   * A scheduled start time will be skipped if the previous
+   * execution has not ended when its scheduled time occurs.
+   * This value must be set to a time duration greater than or equal
+   * to 1 day and can be no longer than 60 days.
+   * 
+ * + * .google.protobuf.Duration recurrence_period_duration = 1; + */ + com.google.protobuf.DurationOrBuilder getRecurrencePeriodDurationOrBuilder(); + + public com.google.privacy.dlp.v2.Schedule.OptionCase getOptionCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java new file mode 100644 index 000000000000..9c8a683fea84 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java @@ -0,0 +1,725 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Score is a summary of all elements in the data profile.
+ * A higher number means more sensitive.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.SensitivityScore} + */ +public final class SensitivityScore extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.SensitivityScore) + SensitivityScoreOrBuilder { +private static final long serialVersionUID = 0L; + // Use SensitivityScore.newBuilder() to construct. + private SensitivityScore(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SensitivityScore() { + score_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SensitivityScore(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SensitivityScore( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + score_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.SensitivityScore.class, com.google.privacy.dlp.v2.SensitivityScore.Builder.class); + } + + /** + *
+   * Various score levels for resources.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel} + */ + public enum SensitivityScoreLevel + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * SENSITIVITY_SCORE_UNSPECIFIED = 0; + */ + SENSITIVITY_SCORE_UNSPECIFIED(0), + /** + *
+     * No sensitive information detected. Limited access.
+     * 
+ * + * SENSITIVITY_LOW = 10; + */ + SENSITIVITY_LOW(10), + /** + *
+     * Medium risk - PII, potentially sensitive data, or fields with free-text
+     * data that are at higher risk of having intermittent sensitive data.
+     * Consider limiting access.
+     * 
+ * + * SENSITIVITY_MODERATE = 20; + */ + SENSITIVITY_MODERATE(20), + /** + *
+     * High risk – SPII may be present. Exfiltration of data may lead to user
+     * data loss. Re-identification of users may be possible. Consider limiting
+     * usage and or removing SPII.
+     * 
+ * + * SENSITIVITY_HIGH = 30; + */ + SENSITIVITY_HIGH(30), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * SENSITIVITY_SCORE_UNSPECIFIED = 0; + */ + public static final int SENSITIVITY_SCORE_UNSPECIFIED_VALUE = 0; + /** + *
+     * No sensitive information detected. Limited access.
+     * 
+ * + * SENSITIVITY_LOW = 10; + */ + public static final int SENSITIVITY_LOW_VALUE = 10; + /** + *
+     * Medium risk - PII, potentially sensitive data, or fields with free-text
+     * data that are at higher risk of having intermittent sensitive data.
+     * Consider limiting access.
+     * 
+ * + * SENSITIVITY_MODERATE = 20; + */ + public static final int SENSITIVITY_MODERATE_VALUE = 20; + /** + *
+     * High risk – SPII may be present. Exfiltration of data may lead to user
+     * data loss. Re-identification of users may be possible. Consider limiting
+     * usage and or removing SPII.
+     * 
+ * + * SENSITIVITY_HIGH = 30; + */ + public static final int SENSITIVITY_HIGH_VALUE = 30; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SensitivityScoreLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SensitivityScoreLevel forNumber(int value) { + switch (value) { + case 0: return SENSITIVITY_SCORE_UNSPECIFIED; + case 10: return SENSITIVITY_LOW; + case 20: return SENSITIVITY_MODERATE; + case 30: return SENSITIVITY_HIGH; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SensitivityScoreLevel> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SensitivityScoreLevel findValueByNumber(int number) { + return SensitivityScoreLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.SensitivityScore.getDescriptor().getEnumTypes().get(0); + } + + private static final SensitivityScoreLevel[] VALUES = values(); + + public static SensitivityScoreLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SensitivityScoreLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel) + } + + public static final int SCORE_FIELD_NUMBER = 1; + private int score_; + /** + *
+   * The score applied to the resource.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; + * @return The enum numeric value on the wire for score. + */ + @java.lang.Override public int getScoreValue() { + return score_; + } + /** + *
+   * The score applied to the resource.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; + * @return The score. + */ + @java.lang.Override public com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel getScore() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel result = com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.valueOf(score_); + return result == null ? com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (score_ != com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.SENSITIVITY_SCORE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, score_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (score_ != com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.SENSITIVITY_SCORE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, score_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.SensitivityScore)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.SensitivityScore other = (com.google.privacy.dlp.v2.SensitivityScore) obj; + + if (score_ != other.score_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + score_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.SensitivityScore prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Score is a summary of all elements in the data profile.
+   * A higher number means more sensitive.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.SensitivityScore} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.SensitivityScore) + com.google.privacy.dlp.v2.SensitivityScoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.SensitivityScore.class, com.google.privacy.dlp.v2.SensitivityScore.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.SensitivityScore.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + score_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.SensitivityScore getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.SensitivityScore build() { + com.google.privacy.dlp.v2.SensitivityScore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.SensitivityScore buildPartial() { + com.google.privacy.dlp.v2.SensitivityScore result = new com.google.privacy.dlp.v2.SensitivityScore(this); + result.score_ = score_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.SensitivityScore) { + return mergeFrom((com.google.privacy.dlp.v2.SensitivityScore)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.SensitivityScore other) { + if (other == com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance()) return this; + if (other.score_ != 0) { + setScoreValue(other.getScoreValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.SensitivityScore parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.SensitivityScore) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int score_ = 0; + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; + * @return The enum numeric value on the wire for score. + */ + @java.lang.Override public int getScoreValue() { + return score_; + } + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; + * @param value The enum numeric value on the wire for score to set. + * @return This builder for chaining. + */ + public Builder setScoreValue(int value) { + + score_ = value; + onChanged(); + return this; + } + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; + * @return The score. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel getScore() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel result = com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.valueOf(score_); + return result == null ? com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.UNRECOGNIZED : result; + } + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel value) { + if (value == null) { + throw new NullPointerException(); + } + + score_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The score applied to the resource.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; + * @return This builder for chaining. + */ + public Builder clearScore() { + + score_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.SensitivityScore) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.SensitivityScore) + private static final com.google.privacy.dlp.v2.SensitivityScore DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.SensitivityScore(); + } + + public static com.google.privacy.dlp.v2.SensitivityScore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SensitivityScore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SensitivityScore(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.SensitivityScore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java new file mode 100644 index 000000000000..858ce025380e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface SensitivityScoreOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.SensitivityScore) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The score applied to the resource.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; + * @return The enum numeric value on the wire for score. + */ + int getScoreValue(); + /** + *
+   * The score applied to the resource.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; + * @return The score. + */ + com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel getScore(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java new file mode 100644 index 000000000000..25d0a1f9891b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java @@ -0,0 +1,2265 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * An auxiliary table containing statistical information on the relative
+ * frequency of different quasi-identifiers values. It has one or several
+ * quasi-identifiers columns, and one column that indicates the relative
+ * frequency of each quasi-identifier tuple.
+ * If a tuple is present in the data but not in the auxiliary table, the
+ * corresponding relative frequency is assumed to be zero (and thus, the
+ * tuple is highly reidentifiable).
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable} + */ +public final class StatisticalTable extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StatisticalTable) + StatisticalTableOrBuilder { +private static final long serialVersionUID = 0L; + // Use StatisticalTable.newBuilder() to construct. + private StatisticalTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StatisticalTable() { + quasiIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StatisticalTable(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StatisticalTable( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIds_.add( + input.readMessage(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (relativeFrequency_ != null) { + subBuilder = relativeFrequency_.toBuilder(); + } + relativeFrequency_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relativeFrequency_); + relativeFrequency_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (table_ != null) { + subBuilder = table_.toBuilder(); + } + table_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(table_); + table_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StatisticalTable.class, com.google.privacy.dlp.v2.StatisticalTable.Builder.class); + } + + public interface QuasiIdentifierFieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+     * Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+     * Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 2; + * @return The customTag. + */ + java.lang.String getCustomTag(); + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 2; + * @return The bytes for customTag. + */ + com.google.protobuf.ByteString + getCustomTagBytes(); + } + /** + *
+   * A quasi-identifier column has a custom_tag, used to know which column
+   * in the data corresponds to which column in the statistical model.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} + */ + public static final class QuasiIdentifierField extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + QuasiIdentifierFieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use QuasiIdentifierField.newBuilder() to construct. + private QuasiIdentifierField(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QuasiIdentifierField() { + customTag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QuasiIdentifierField(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QuasiIdentifierField( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + customTag_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.class, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+     * Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+     * Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+     * Identifies the column.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int CUSTOM_TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object customTag_; + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 2; + * @return The customTag. + */ + @java.lang.Override + public java.lang.String getCustomTag() { + java.lang.Object ref = customTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customTag_ = s; + return s; + } + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 2; + * @return The bytes for customTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = customTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customTag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customTag_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customTag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customTag_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField other = (com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) obj; + + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (!getCustomTag() + .equals(other.getCustomTag())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; + hash = (53 * hash) + getCustomTag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A quasi-identifier column has a custom_tag, used to know which column
+     * in the data corresponds to which column in the statistical model.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.class, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + customTag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField build() { + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField buildPartial() { + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField result = new com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + result.customTag_ = customTag_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) { + return mergeFrom((com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField other) { + if (other == com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + if (!other.getCustomTag().isEmpty()) { + customTag_ = other.customTag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+       * Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+       * Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+       * Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+       * Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+       * Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+       * Identifies the column.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private java.lang.Object customTag_ = ""; + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 2; + * @return The customTag. + */ + public java.lang.String getCustomTag() { + java.lang.Object ref = customTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 2; + * @return The bytes for customTag. + */ + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = customTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 2; + * @param value The customTag to set. + * @return This builder for chaining. + */ + public Builder setCustomTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customTag_ = value; + onChanged(); + return this; + } + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 2; + * @return This builder for chaining. + */ + public Builder clearCustomTag() { + + customTag_ = getDefaultInstance().getCustomTag(); + onChanged(); + return this; + } + /** + *
+       * A column can be tagged with a custom tag. In this case, the user must
+       * indicate an auxiliary table that contains statistical information on
+       * the possible values of this column (below).
+       * 
+ * + * string custom_tag = 2; + * @param value The bytes for customTag to set. + * @return This builder for chaining. + */ + public Builder setCustomTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customTag_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + private static final com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField(); + } + + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QuasiIdentifierField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QuasiIdentifierField(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int TABLE_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.BigQueryTable table_; + /** + *
+   * Required. Auxiliary table location.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return table_ != null; + } + /** + *
+   * Required. Auxiliary table location.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } + /** + *
+   * Required. Auxiliary table location.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + return getTable(); + } + + public static final int QUASI_IDS_FIELD_NUMBER = 1; + private java.util.List quasiIds_; + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List getQuasiIdsList() { + return quasiIds_; + } + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public java.util.List + getQuasiIdsOrBuilderList() { + return quasiIds_; + } + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public int getQuasiIdsCount() { + return quasiIds_.size(); + } + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getQuasiIds(int index) { + return quasiIds_.get(index); + } + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder getQuasiIdsOrBuilder( + int index) { + return quasiIds_.get(index); + } + + public static final int RELATIVE_FREQUENCY_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.FieldId relativeFrequency_; + /** + *
+   * Required. The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the relativeFrequency field is set. + */ + @java.lang.Override + public boolean hasRelativeFrequency() { + return relativeFrequency_ != null; + } + /** + *
+   * Required. The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The relativeFrequency. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { + return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; + } + /** + *
+   * Required. The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { + return getRelativeFrequency(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIds_.size(); i++) { + output.writeMessage(1, quasiIds_.get(i)); + } + if (relativeFrequency_ != null) { + output.writeMessage(2, getRelativeFrequency()); + } + if (table_ != null) { + output.writeMessage(3, getTable()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIds_.get(i)); + } + if (relativeFrequency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRelativeFrequency()); + } + if (table_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTable()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StatisticalTable)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StatisticalTable other = (com.google.privacy.dlp.v2.StatisticalTable) obj; + + if (hasTable() != other.hasTable()) return false; + if (hasTable()) { + if (!getTable() + .equals(other.getTable())) return false; + } + if (!getQuasiIdsList() + .equals(other.getQuasiIdsList())) return false; + if (hasRelativeFrequency() != other.hasRelativeFrequency()) return false; + if (hasRelativeFrequency()) { + if (!getRelativeFrequency() + .equals(other.getRelativeFrequency())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTable()) { + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + } + if (getQuasiIdsCount() > 0) { + hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsList().hashCode(); + } + if (hasRelativeFrequency()) { + hash = (37 * hash) + RELATIVE_FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + getRelativeFrequency().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StatisticalTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An auxiliary table containing statistical information on the relative
+   * frequency of different quasi-identifiers values. It has one or several
+   * quasi-identifiers columns, and one column that indicates the relative
+   * frequency of each quasi-identifier tuple.
+   * If a tuple is present in the data but not in the auxiliary table, the
+   * corresponding relative frequency is assumed to be zero (and thus, the
+   * tuple is highly reidentifiable).
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StatisticalTable) + com.google.privacy.dlp.v2.StatisticalTableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StatisticalTable.class, com.google.privacy.dlp.v2.StatisticalTable.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StatisticalTable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (tableBuilder_ == null) { + table_ = null; + } else { + table_ = null; + tableBuilder_ = null; + } + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsBuilder_.clear(); + } + if (relativeFrequencyBuilder_ == null) { + relativeFrequency_ = null; + } else { + relativeFrequency_ = null; + relativeFrequencyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable build() { + com.google.privacy.dlp.v2.StatisticalTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable buildPartial() { + com.google.privacy.dlp.v2.StatisticalTable result = new com.google.privacy.dlp.v2.StatisticalTable(this); + int from_bitField0_ = bitField0_; + if (tableBuilder_ == null) { + result.table_ = table_; + } else { + result.table_ = tableBuilder_.build(); + } + if (quasiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIds_ = quasiIds_; + } else { + result.quasiIds_ = quasiIdsBuilder_.build(); + } + if (relativeFrequencyBuilder_ == null) { + result.relativeFrequency_ = relativeFrequency_; + } else { + result.relativeFrequency_ = relativeFrequencyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StatisticalTable) { + return mergeFrom((com.google.privacy.dlp.v2.StatisticalTable)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StatisticalTable other) { + if (other == com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance()) return this; + if (other.hasTable()) { + mergeTable(other.getTable()); + } + if (quasiIdsBuilder_ == null) { + if (!other.quasiIds_.isEmpty()) { + if (quasiIds_.isEmpty()) { + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsIsMutable(); + quasiIds_.addAll(other.quasiIds_); + } + onChanged(); + } + } else { + if (!other.quasiIds_.isEmpty()) { + if (quasiIdsBuilder_.isEmpty()) { + quasiIdsBuilder_.dispose(); + quasiIdsBuilder_ = null; + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsFieldBuilder() : null; + } else { + quasiIdsBuilder_.addAllMessages(other.quasiIds_); + } + } + } + if (other.hasRelativeFrequency()) { + mergeRelativeFrequency(other.getRelativeFrequency()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StatisticalTable parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StatisticalTable) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.BigQueryTable table_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; + /** + *
+     * Required. Auxiliary table location.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the table field is set. + */ + public boolean hasTable() { + return tableBuilder_ != null || table_ != null; + } + /** + *
+     * Required. Auxiliary table location.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + if (tableBuilder_ == null) { + return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } else { + return tableBuilder_.getMessage(); + } + } + /** + *
+     * Required. Auxiliary table location.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + onChanged(); + } else { + tableBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Auxiliary table location.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTable( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (tableBuilder_ == null) { + table_ = builderForValue.build(); + onChanged(); + } else { + tableBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Auxiliary table location.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (table_ != null) { + table_ = + com.google.privacy.dlp.v2.BigQueryTable.newBuilder(table_).mergeFrom(value).buildPartial(); + } else { + table_ = value; + } + onChanged(); + } else { + tableBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Auxiliary table location.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + table_ = null; + onChanged(); + } else { + table_ = null; + tableBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Auxiliary table location.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { + + onChanged(); + return getTableFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Auxiliary table location.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + if (tableBuilder_ != null) { + return tableBuilder_.getMessageOrBuilder(); + } else { + return table_ == null ? + com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } + } + /** + *
+     * Required. Auxiliary table location.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + getTable(), + getParentForChildren(), + isClean()); + table_ = null; + } + return tableBuilder_; + } + + private java.util.List quasiIds_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + quasiIds_ = new java.util.ArrayList(quasiIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder> quasiIdsBuilder_; + + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List getQuasiIdsList() { + if (quasiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIds_); + } else { + return quasiIdsBuilder_.getMessageList(); + } + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public int getQuasiIdsCount() { + if (quasiIdsBuilder_ == null) { + return quasiIds_.size(); + } else { + return quasiIdsBuilder_.getCount(); + } + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); + } else { + return quasiIdsBuilder_.getMessage(index); + } + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, value); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder addAllQuasiIds( + java.lang.Iterable values) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIds_); + onChanged(); + } else { + quasiIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearQuasiIds() { + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsBuilder_.clear(); + } + return this; + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder removeQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.remove(index); + onChanged(); + } else { + quasiIdsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder getQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().getBuilder(index); + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder getQuasiIdsOrBuilder( + int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); } else { + return quasiIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + if (quasiIdsBuilder_ != null) { + return quasiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIds_); + } + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder addQuasiIdsBuilder() { + return getQuasiIdsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance()); + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder addQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance()); + } + /** + *
+     * Required. Quasi-identifier columns.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public java.util.List + getQuasiIdsBuilderList() { + return getQuasiIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder> + getQuasiIdsFieldBuilder() { + if (quasiIdsBuilder_ == null) { + quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder>( + quasiIds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + quasiIds_ = null; + } + return quasiIdsBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId relativeFrequency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> relativeFrequencyBuilder_; + /** + *
+     * Required. The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the relativeFrequency field is set. + */ + public boolean hasRelativeFrequency() { + return relativeFrequencyBuilder_ != null || relativeFrequency_ != null; + } + /** + *
+     * Required. The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The relativeFrequency. + */ + public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { + if (relativeFrequencyBuilder_ == null) { + return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; + } else { + return relativeFrequencyBuilder_.getMessage(); + } + } + /** + *
+     * Required. The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { + if (relativeFrequencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relativeFrequency_ = value; + onChanged(); + } else { + relativeFrequencyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRelativeFrequency( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (relativeFrequencyBuilder_ == null) { + relativeFrequency_ = builderForValue.build(); + onChanged(); + } else { + relativeFrequencyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { + if (relativeFrequencyBuilder_ == null) { + if (relativeFrequency_ != null) { + relativeFrequency_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(relativeFrequency_).mergeFrom(value).buildPartial(); + } else { + relativeFrequency_ = value; + } + onChanged(); + } else { + relativeFrequencyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRelativeFrequency() { + if (relativeFrequencyBuilder_ == null) { + relativeFrequency_ = null; + onChanged(); + } else { + relativeFrequency_ = null; + relativeFrequencyBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getRelativeFrequencyBuilder() { + + onChanged(); + return getRelativeFrequencyFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { + if (relativeFrequencyBuilder_ != null) { + return relativeFrequencyBuilder_.getMessageOrBuilder(); + } else { + return relativeFrequency_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; + } + } + /** + *
+     * Required. The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getRelativeFrequencyFieldBuilder() { + if (relativeFrequencyBuilder_ == null) { + relativeFrequencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getRelativeFrequency(), + getParentForChildren(), + isClean()); + relativeFrequency_ = null; + } + return relativeFrequencyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StatisticalTable) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StatisticalTable) + private static final com.google.privacy.dlp.v2.StatisticalTable DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StatisticalTable(); + } + + public static com.google.privacy.dlp.v2.StatisticalTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StatisticalTable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StatisticalTable(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StatisticalTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java new file mode 100644 index 000000000000..36a59a940517 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface StatisticalTableOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StatisticalTable) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Auxiliary table location.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the table field is set. + */ + boolean hasTable(); + /** + *
+   * Required. Auxiliary table location.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + com.google.privacy.dlp.v2.BigQueryTable getTable(); + /** + *
+   * Required. Auxiliary table location.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); + + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getQuasiIdsList(); + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getQuasiIds(int index); + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + int getQuasiIdsCount(); + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + java.util.List + getQuasiIdsOrBuilderList(); + /** + *
+   * Required. Quasi-identifier columns.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder getQuasiIdsOrBuilder( + int index); + + /** + *
+   * Required. The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the relativeFrequency field is set. + */ + boolean hasRelativeFrequency(); + /** + *
+   * Required. The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The relativeFrequency. + */ + com.google.privacy.dlp.v2.FieldId getRelativeFrequency(); + /** + *
+   * Required. The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java new file mode 100644 index 000000000000..72230106c2ad --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java @@ -0,0 +1,3488 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Shared message indicating Cloud storage type.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StorageConfig} + */ +public final class StorageConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StorageConfig) + StorageConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use StorageConfig.newBuilder() to construct. + private StorageConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StorageConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StorageConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StorageConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + com.google.privacy.dlp.v2.DatastoreOptions.Builder subBuilder = null; + if (typeCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.DatastoreOptions) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.DatastoreOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.DatastoreOptions) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 2; + break; + } + case 26: { + com.google.privacy.dlp.v2.CloudStorageOptions.Builder subBuilder = null; + if (typeCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.CloudStorageOptions) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CloudStorageOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CloudStorageOptions) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 3; + break; + } + case 34: { + com.google.privacy.dlp.v2.BigQueryOptions.Builder subBuilder = null; + if (typeCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.BigQueryOptions) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.BigQueryOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryOptions) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 4; + break; + } + case 50: { + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder subBuilder = null; + if (timespanConfig_ != null) { + subBuilder = timespanConfig_.toBuilder(); + } + timespanConfig_ = input.readMessage(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timespanConfig_); + timespanConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.privacy.dlp.v2.HybridOptions.Builder subBuilder = null; + if (typeCase_ == 9) { + subBuilder = ((com.google.privacy.dlp.v2.HybridOptions) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.HybridOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.HybridOptions) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 9; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StorageConfig.class, com.google.privacy.dlp.v2.StorageConfig.Builder.class); + } + + public interface TimespanConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StorageConfig.TimespanConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Exclude files, tables, or rows older than this value.
+     * If not set, no lower time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+     * Exclude files, tables, or rows older than this value.
+     * If not set, no lower time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+     * Exclude files, tables, or rows older than this value.
+     * If not set, no lower time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+     * Exclude files, tables, or rows newer than this value.
+     * If not set, no upper time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+     * Exclude files, tables, or rows newer than this value.
+     * If not set, no upper time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+     * Exclude files, tables, or rows newer than this value.
+     * If not set, no upper time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + *
+     * Specification of the field containing the timestamp of scanned items.
+     * Used for data sources like Datastore and BigQuery.
+     * <b>For BigQuery</b>
+     * If this value is not specified and the table was modified between the
+     * given start and end times, the entire table will be scanned. If this
+     * value is specified, then rows are filtered based on the given start and
+     * end times. Rows with a `NULL` value in the provided BigQuery column are
+     * skipped.
+     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+     * `TIMESTAMP`, and `DATETIME`.
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
+     * If this value is specified, then entities are filtered based on the given
+     * start and end times. If an entity does not contain the provided timestamp
+     * property or contains empty or invalid values, then it is included.
+     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + * @return Whether the timestampField field is set. + */ + boolean hasTimestampField(); + /** + *
+     * Specification of the field containing the timestamp of scanned items.
+     * Used for data sources like Datastore and BigQuery.
+     * <b>For BigQuery</b>
+     * If this value is not specified and the table was modified between the
+     * given start and end times, the entire table will be scanned. If this
+     * value is specified, then rows are filtered based on the given start and
+     * end times. Rows with a `NULL` value in the provided BigQuery column are
+     * skipped.
+     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+     * `TIMESTAMP`, and `DATETIME`.
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
+     * If this value is specified, then entities are filtered based on the given
+     * start and end times. If an entity does not contain the provided timestamp
+     * property or contains empty or invalid values, then it is included.
+     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + * @return The timestampField. + */ + com.google.privacy.dlp.v2.FieldId getTimestampField(); + /** + *
+     * Specification of the field containing the timestamp of scanned items.
+     * Used for data sources like Datastore and BigQuery.
+     * <b>For BigQuery</b>
+     * If this value is not specified and the table was modified between the
+     * given start and end times, the entire table will be scanned. If this
+     * value is specified, then rows are filtered based on the given start and
+     * end times. Rows with a `NULL` value in the provided BigQuery column are
+     * skipped.
+     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+     * `TIMESTAMP`, and `DATETIME`.
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
+     * If this value is specified, then entities are filtered based on the given
+     * start and end times. If an entity does not contain the provided timestamp
+     * property or contains empty or invalid values, then it is included.
+     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder(); + + /** + *
+     * When the job is started by a JobTrigger we will automatically figure out
+     * a valid start_time to avoid scanning files that have not been modified
+     * since the last time the JobTrigger executed. This will be based on the
+     * time of the execution of the last run of the JobTrigger or the timespan
+     * end_time used in the last run of the JobTrigger.
+     * 
+ * + * bool enable_auto_population_of_timespan_config = 4; + * @return The enableAutoPopulationOfTimespanConfig. + */ + boolean getEnableAutoPopulationOfTimespanConfig(); + } + /** + *
+   * Configuration of the timespan of the items to include in scanning.
+   * Currently only supported when inspecting Cloud Storage and BigQuery.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StorageConfig.TimespanConfig} + */ + public static final class TimespanConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StorageConfig.TimespanConfig) + TimespanConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimespanConfig.newBuilder() to construct. + private TimespanConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TimespanConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TimespanConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TimespanConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (timestampField_ != null) { + subBuilder = timestampField_.toBuilder(); + } + timestampField_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timestampField_); + timestampField_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + + enableAutoPopulationOfTimespanConfig_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.class, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder.class); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + *
+     * Exclude files, tables, or rows older than this value.
+     * If not set, no lower time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+     * Exclude files, tables, or rows older than this value.
+     * If not set, no lower time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+     * Exclude files, tables, or rows older than this value.
+     * If not set, no lower time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+     * Exclude files, tables, or rows newer than this value.
+     * If not set, no upper time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+     * Exclude files, tables, or rows newer than this value.
+     * If not set, no upper time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+     * Exclude files, tables, or rows newer than this value.
+     * If not set, no upper time limit is applied.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int TIMESTAMP_FIELD_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.FieldId timestampField_; + /** + *
+     * Specification of the field containing the timestamp of scanned items.
+     * Used for data sources like Datastore and BigQuery.
+     * <b>For BigQuery</b>
+     * If this value is not specified and the table was modified between the
+     * given start and end times, the entire table will be scanned. If this
+     * value is specified, then rows are filtered based on the given start and
+     * end times. Rows with a `NULL` value in the provided BigQuery column are
+     * skipped.
+     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+     * `TIMESTAMP`, and `DATETIME`.
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
+     * If this value is specified, then entities are filtered based on the given
+     * start and end times. If an entity does not contain the provided timestamp
+     * property or contains empty or invalid values, then it is included.
+     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + * @return Whether the timestampField field is set. + */ + @java.lang.Override + public boolean hasTimestampField() { + return timestampField_ != null; + } + /** + *
+     * Specification of the field containing the timestamp of scanned items.
+     * Used for data sources like Datastore and BigQuery.
+     * <b>For BigQuery</b>
+     * If this value is not specified and the table was modified between the
+     * given start and end times, the entire table will be scanned. If this
+     * value is specified, then rows are filtered based on the given start and
+     * end times. Rows with a `NULL` value in the provided BigQuery column are
+     * skipped.
+     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+     * `TIMESTAMP`, and `DATETIME`.
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
+     * If this value is specified, then entities are filtered based on the given
+     * start and end times. If an entity does not contain the provided timestamp
+     * property or contains empty or invalid values, then it is included.
+     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + * @return The timestampField. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getTimestampField() { + return timestampField_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : timestampField_; + } + /** + *
+     * Specification of the field containing the timestamp of scanned items.
+     * Used for data sources like Datastore and BigQuery.
+     * <b>For BigQuery</b>
+     * If this value is not specified and the table was modified between the
+     * given start and end times, the entire table will be scanned. If this
+     * value is specified, then rows are filtered based on the given start and
+     * end times. Rows with a `NULL` value in the provided BigQuery column are
+     * skipped.
+     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+     * `TIMESTAMP`, and `DATETIME`.
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
+     * If this value is specified, then entities are filtered based on the given
+     * start and end times. If an entity does not contain the provided timestamp
+     * property or contains empty or invalid values, then it is included.
+     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder() { + return getTimestampField(); + } + + public static final int ENABLE_AUTO_POPULATION_OF_TIMESPAN_CONFIG_FIELD_NUMBER = 4; + private boolean enableAutoPopulationOfTimespanConfig_; + /** + *
+     * When the job is started by a JobTrigger we will automatically figure out
+     * a valid start_time to avoid scanning files that have not been modified
+     * since the last time the JobTrigger executed. This will be based on the
+     * time of the execution of the last run of the JobTrigger or the timespan
+     * end_time used in the last run of the JobTrigger.
+     * 
+ * + * bool enable_auto_population_of_timespan_config = 4; + * @return The enableAutoPopulationOfTimespanConfig. + */ + @java.lang.Override + public boolean getEnableAutoPopulationOfTimespanConfig() { + return enableAutoPopulationOfTimespanConfig_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (timestampField_ != null) { + output.writeMessage(3, getTimestampField()); + } + if (enableAutoPopulationOfTimespanConfig_ != false) { + output.writeBool(4, enableAutoPopulationOfTimespanConfig_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + if (timestampField_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTimestampField()); + } + if (enableAutoPopulationOfTimespanConfig_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, enableAutoPopulationOfTimespanConfig_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StorageConfig.TimespanConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig other = (com.google.privacy.dlp.v2.StorageConfig.TimespanConfig) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (hasTimestampField() != other.hasTimestampField()) return false; + if (hasTimestampField()) { + if (!getTimestampField() + .equals(other.getTimestampField())) return false; + } + if (getEnableAutoPopulationOfTimespanConfig() + != other.getEnableAutoPopulationOfTimespanConfig()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasTimestampField()) { + hash = (37 * hash) + TIMESTAMP_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getTimestampField().hashCode(); + } + hash = (37 * hash) + ENABLE_AUTO_POPULATION_OF_TIMESPAN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getEnableAutoPopulationOfTimespanConfig()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Configuration of the timespan of the items to include in scanning.
+     * Currently only supported when inspecting Cloud Storage and BigQuery.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StorageConfig.TimespanConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StorageConfig.TimespanConfig) + com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.class, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (timestampFieldBuilder_ == null) { + timestampField_ = null; + } else { + timestampField_ = null; + timestampFieldBuilder_ = null; + } + enableAutoPopulationOfTimespanConfig_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig build() { + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig buildPartial() { + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig result = new com.google.privacy.dlp.v2.StorageConfig.TimespanConfig(this); + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (timestampFieldBuilder_ == null) { + result.timestampField_ = timestampField_; + } else { + result.timestampField_ = timestampFieldBuilder_.build(); + } + result.enableAutoPopulationOfTimespanConfig_ = enableAutoPopulationOfTimespanConfig_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StorageConfig.TimespanConfig) { + return mergeFrom((com.google.privacy.dlp.v2.StorageConfig.TimespanConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig other) { + if (other == com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasTimestampField()) { + mergeTimestampField(other.getTimestampField()); + } + if (other.getEnableAutoPopulationOfTimespanConfig() != false) { + setEnableAutoPopulationOfTimespanConfig(other.getEnableAutoPopulationOfTimespanConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StorageConfig.TimespanConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+       * Exclude files, tables, or rows older than this value.
+       * If not set, no lower time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + *
+       * Exclude files, tables, or rows older than this value.
+       * If not set, no lower time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+       * Exclude files, tables, or rows older than this value.
+       * If not set, no lower time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Exclude files, tables, or rows older than this value.
+       * If not set, no lower time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Exclude files, tables, or rows older than this value.
+       * If not set, no lower time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Exclude files, tables, or rows older than this value.
+       * If not set, no lower time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + *
+       * Exclude files, tables, or rows older than this value.
+       * If not set, no lower time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+       * Exclude files, tables, or rows older than this value.
+       * If not set, no lower time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+       * Exclude files, tables, or rows older than this value.
+       * If not set, no lower time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+       * Exclude files, tables, or rows newer than this value.
+       * If not set, no upper time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + *
+       * Exclude files, tables, or rows newer than this value.
+       * If not set, no upper time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+       * Exclude files, tables, or rows newer than this value.
+       * If not set, no upper time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Exclude files, tables, or rows newer than this value.
+       * If not set, no upper time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Exclude files, tables, or rows newer than this value.
+       * If not set, no upper time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Exclude files, tables, or rows newer than this value.
+       * If not set, no upper time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + *
+       * Exclude files, tables, or rows newer than this value.
+       * If not set, no upper time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+       * Exclude files, tables, or rows newer than this value.
+       * If not set, no upper time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+       * Exclude files, tables, or rows newer than this value.
+       * If not set, no upper time limit is applied.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId timestampField_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> timestampFieldBuilder_; + /** + *
+       * Specification of the field containing the timestamp of scanned items.
+       * Used for data sources like Datastore and BigQuery.
+       * <b>For BigQuery</b>
+       * If this value is not specified and the table was modified between the
+       * given start and end times, the entire table will be scanned. If this
+       * value is specified, then rows are filtered based on the given start and
+       * end times. Rows with a `NULL` value in the provided BigQuery column are
+       * skipped.
+       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+       * `TIMESTAMP`, and `DATETIME`.
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
+       * If this value is specified, then entities are filtered based on the given
+       * start and end times. If an entity does not contain the provided timestamp
+       * property or contains empty or invalid values, then it is included.
+       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + * @return Whether the timestampField field is set. + */ + public boolean hasTimestampField() { + return timestampFieldBuilder_ != null || timestampField_ != null; + } + /** + *
+       * Specification of the field containing the timestamp of scanned items.
+       * Used for data sources like Datastore and BigQuery.
+       * <b>For BigQuery</b>
+       * If this value is not specified and the table was modified between the
+       * given start and end times, the entire table will be scanned. If this
+       * value is specified, then rows are filtered based on the given start and
+       * end times. Rows with a `NULL` value in the provided BigQuery column are
+       * skipped.
+       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+       * `TIMESTAMP`, and `DATETIME`.
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
+       * If this value is specified, then entities are filtered based on the given
+       * start and end times. If an entity does not contain the provided timestamp
+       * property or contains empty or invalid values, then it is included.
+       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + * @return The timestampField. + */ + public com.google.privacy.dlp.v2.FieldId getTimestampField() { + if (timestampFieldBuilder_ == null) { + return timestampField_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : timestampField_; + } else { + return timestampFieldBuilder_.getMessage(); + } + } + /** + *
+       * Specification of the field containing the timestamp of scanned items.
+       * Used for data sources like Datastore and BigQuery.
+       * <b>For BigQuery</b>
+       * If this value is not specified and the table was modified between the
+       * given start and end times, the entire table will be scanned. If this
+       * value is specified, then rows are filtered based on the given start and
+       * end times. Rows with a `NULL` value in the provided BigQuery column are
+       * skipped.
+       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+       * `TIMESTAMP`, and `DATETIME`.
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
+       * If this value is specified, then entities are filtered based on the given
+       * start and end times. If an entity does not contain the provided timestamp
+       * property or contains empty or invalid values, then it is included.
+       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + */ + public Builder setTimestampField(com.google.privacy.dlp.v2.FieldId value) { + if (timestampFieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestampField_ = value; + onChanged(); + } else { + timestampFieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Specification of the field containing the timestamp of scanned items.
+       * Used for data sources like Datastore and BigQuery.
+       * <b>For BigQuery</b>
+       * If this value is not specified and the table was modified between the
+       * given start and end times, the entire table will be scanned. If this
+       * value is specified, then rows are filtered based on the given start and
+       * end times. Rows with a `NULL` value in the provided BigQuery column are
+       * skipped.
+       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+       * `TIMESTAMP`, and `DATETIME`.
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
+       * If this value is specified, then entities are filtered based on the given
+       * start and end times. If an entity does not contain the provided timestamp
+       * property or contains empty or invalid values, then it is included.
+       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + */ + public Builder setTimestampField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (timestampFieldBuilder_ == null) { + timestampField_ = builderForValue.build(); + onChanged(); + } else { + timestampFieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Specification of the field containing the timestamp of scanned items.
+       * Used for data sources like Datastore and BigQuery.
+       * <b>For BigQuery</b>
+       * If this value is not specified and the table was modified between the
+       * given start and end times, the entire table will be scanned. If this
+       * value is specified, then rows are filtered based on the given start and
+       * end times. Rows with a `NULL` value in the provided BigQuery column are
+       * skipped.
+       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+       * `TIMESTAMP`, and `DATETIME`.
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
+       * If this value is specified, then entities are filtered based on the given
+       * start and end times. If an entity does not contain the provided timestamp
+       * property or contains empty or invalid values, then it is included.
+       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + */ + public Builder mergeTimestampField(com.google.privacy.dlp.v2.FieldId value) { + if (timestampFieldBuilder_ == null) { + if (timestampField_ != null) { + timestampField_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(timestampField_).mergeFrom(value).buildPartial(); + } else { + timestampField_ = value; + } + onChanged(); + } else { + timestampFieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Specification of the field containing the timestamp of scanned items.
+       * Used for data sources like Datastore and BigQuery.
+       * <b>For BigQuery</b>
+       * If this value is not specified and the table was modified between the
+       * given start and end times, the entire table will be scanned. If this
+       * value is specified, then rows are filtered based on the given start and
+       * end times. Rows with a `NULL` value in the provided BigQuery column are
+       * skipped.
+       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+       * `TIMESTAMP`, and `DATETIME`.
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
+       * If this value is specified, then entities are filtered based on the given
+       * start and end times. If an entity does not contain the provided timestamp
+       * property or contains empty or invalid values, then it is included.
+       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + */ + public Builder clearTimestampField() { + if (timestampFieldBuilder_ == null) { + timestampField_ = null; + onChanged(); + } else { + timestampField_ = null; + timestampFieldBuilder_ = null; + } + + return this; + } + /** + *
+       * Specification of the field containing the timestamp of scanned items.
+       * Used for data sources like Datastore and BigQuery.
+       * <b>For BigQuery</b>
+       * If this value is not specified and the table was modified between the
+       * given start and end times, the entire table will be scanned. If this
+       * value is specified, then rows are filtered based on the given start and
+       * end times. Rows with a `NULL` value in the provided BigQuery column are
+       * skipped.
+       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+       * `TIMESTAMP`, and `DATETIME`.
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
+       * If this value is specified, then entities are filtered based on the given
+       * start and end times. If an entity does not contain the provided timestamp
+       * property or contains empty or invalid values, then it is included.
+       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getTimestampFieldBuilder() { + + onChanged(); + return getTimestampFieldFieldBuilder().getBuilder(); + } + /** + *
+       * Specification of the field containing the timestamp of scanned items.
+       * Used for data sources like Datastore and BigQuery.
+       * <b>For BigQuery</b>
+       * If this value is not specified and the table was modified between the
+       * given start and end times, the entire table will be scanned. If this
+       * value is specified, then rows are filtered based on the given start and
+       * end times. Rows with a `NULL` value in the provided BigQuery column are
+       * skipped.
+       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+       * `TIMESTAMP`, and `DATETIME`.
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
+       * If this value is specified, then entities are filtered based on the given
+       * start and end times. If an entity does not contain the provided timestamp
+       * property or contains empty or invalid values, then it is included.
+       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder() { + if (timestampFieldBuilder_ != null) { + return timestampFieldBuilder_.getMessageOrBuilder(); + } else { + return timestampField_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : timestampField_; + } + } + /** + *
+       * Specification of the field containing the timestamp of scanned items.
+       * Used for data sources like Datastore and BigQuery.
+       * <b>For BigQuery</b>
+       * If this value is not specified and the table was modified between the
+       * given start and end times, the entire table will be scanned. If this
+       * value is specified, then rows are filtered based on the given start and
+       * end times. Rows with a `NULL` value in the provided BigQuery column are
+       * skipped.
+       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
+       * `TIMESTAMP`, and `DATETIME`.
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
+       * If this value is specified, then entities are filtered based on the given
+       * start and end times. If an entity does not contain the provided timestamp
+       * property or contains empty or invalid values, then it is included.
+       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
+       * 
+ * + * .google.privacy.dlp.v2.FieldId timestamp_field = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getTimestampFieldFieldBuilder() { + if (timestampFieldBuilder_ == null) { + timestampFieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getTimestampField(), + getParentForChildren(), + isClean()); + timestampField_ = null; + } + return timestampFieldBuilder_; + } + + private boolean enableAutoPopulationOfTimespanConfig_ ; + /** + *
+       * When the job is started by a JobTrigger we will automatically figure out
+       * a valid start_time to avoid scanning files that have not been modified
+       * since the last time the JobTrigger executed. This will be based on the
+       * time of the execution of the last run of the JobTrigger or the timespan
+       * end_time used in the last run of the JobTrigger.
+       * 
+ * + * bool enable_auto_population_of_timespan_config = 4; + * @return The enableAutoPopulationOfTimespanConfig. + */ + @java.lang.Override + public boolean getEnableAutoPopulationOfTimespanConfig() { + return enableAutoPopulationOfTimespanConfig_; + } + /** + *
+       * When the job is started by a JobTrigger we will automatically figure out
+       * a valid start_time to avoid scanning files that have not been modified
+       * since the last time the JobTrigger executed. This will be based on the
+       * time of the execution of the last run of the JobTrigger or the timespan
+       * end_time used in the last run of the JobTrigger.
+       * 
+ * + * bool enable_auto_population_of_timespan_config = 4; + * @param value The enableAutoPopulationOfTimespanConfig to set. + * @return This builder for chaining. + */ + public Builder setEnableAutoPopulationOfTimespanConfig(boolean value) { + + enableAutoPopulationOfTimespanConfig_ = value; + onChanged(); + return this; + } + /** + *
+       * When the job is started by a JobTrigger we will automatically figure out
+       * a valid start_time to avoid scanning files that have not been modified
+       * since the last time the JobTrigger executed. This will be based on the
+       * time of the execution of the last run of the JobTrigger or the timespan
+       * end_time used in the last run of the JobTrigger.
+       * 
+ * + * bool enable_auto_population_of_timespan_config = 4; + * @return This builder for chaining. + */ + public Builder clearEnableAutoPopulationOfTimespanConfig() { + + enableAutoPopulationOfTimespanConfig_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StorageConfig.TimespanConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StorageConfig.TimespanConfig) + private static final com.google.privacy.dlp.v2.StorageConfig.TimespanConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StorageConfig.TimespanConfig(); + } + + public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimespanConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimespanConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATASTORE_OPTIONS(2), + CLOUD_STORAGE_OPTIONS(3), + BIG_QUERY_OPTIONS(4), + HYBRID_OPTIONS(9), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 2: return DATASTORE_OPTIONS; + case 3: return CLOUD_STORAGE_OPTIONS; + case 4: return BIG_QUERY_OPTIONS; + case 9: return HYBRID_OPTIONS; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int DATASTORE_OPTIONS_FIELD_NUMBER = 2; + /** + *
+   * Google Cloud Datastore options.
+   * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + * @return Whether the datastoreOptions field is set. + */ + @java.lang.Override + public boolean hasDatastoreOptions() { + return typeCase_ == 2; + } + /** + *
+   * Google Cloud Datastore options.
+   * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + * @return The datastoreOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreOptions getDatastoreOptions() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.DatastoreOptions) type_; + } + return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); + } + /** + *
+   * Google Cloud Datastore options.
+   * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder getDatastoreOptionsOrBuilder() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.DatastoreOptions) type_; + } + return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); + } + + public static final int CLOUD_STORAGE_OPTIONS_FIELD_NUMBER = 3; + /** + *
+   * Cloud Storage options.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + * @return Whether the cloudStorageOptions field is set. + */ + @java.lang.Override + public boolean hasCloudStorageOptions() { + return typeCase_ == 3; + } + /** + *
+   * Cloud Storage options.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + * @return The cloudStorageOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions getCloudStorageOptions() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.CloudStorageOptions) type_; + } + return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); + } + /** + *
+   * Cloud Storage options.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder getCloudStorageOptionsOrBuilder() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.CloudStorageOptions) type_; + } + return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); + } + + public static final int BIG_QUERY_OPTIONS_FIELD_NUMBER = 4; + /** + *
+   * BigQuery options.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + * @return Whether the bigQueryOptions field is set. + */ + @java.lang.Override + public boolean hasBigQueryOptions() { + return typeCase_ == 4; + } + /** + *
+   * BigQuery options.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + * @return The bigQueryOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryOptions getBigQueryOptions() { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.BigQueryOptions) type_; + } + return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); + } + /** + *
+   * BigQuery options.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder getBigQueryOptionsOrBuilder() { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.BigQueryOptions) type_; + } + return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); + } + + public static final int HYBRID_OPTIONS_FIELD_NUMBER = 9; + /** + *
+   * Hybrid inspection options.
+   * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + * @return Whether the hybridOptions field is set. + */ + @java.lang.Override + public boolean hasHybridOptions() { + return typeCase_ == 9; + } + /** + *
+   * Hybrid inspection options.
+   * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + * @return The hybridOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridOptions getHybridOptions() { + if (typeCase_ == 9) { + return (com.google.privacy.dlp.v2.HybridOptions) type_; + } + return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); + } + /** + *
+   * Hybrid inspection options.
+   * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridOptionsOrBuilder getHybridOptionsOrBuilder() { + if (typeCase_ == 9) { + return (com.google.privacy.dlp.v2.HybridOptions) type_; + } + return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); + } + + public static final int TIMESPAN_CONFIG_FIELD_NUMBER = 6; + private com.google.privacy.dlp.v2.StorageConfig.TimespanConfig timespanConfig_; + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + * @return Whether the timespanConfig field is set. + */ + @java.lang.Override + public boolean hasTimespanConfig() { + return timespanConfig_ != null; + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + * @return The timespanConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getTimespanConfig() { + return timespanConfig_ == null ? com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance() : timespanConfig_; + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder getTimespanConfigOrBuilder() { + return getTimespanConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.DatastoreOptions) type_); + } + if (typeCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.CloudStorageOptions) type_); + } + if (typeCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.BigQueryOptions) type_); + } + if (timespanConfig_ != null) { + output.writeMessage(6, getTimespanConfig()); + } + if (typeCase_ == 9) { + output.writeMessage(9, (com.google.privacy.dlp.v2.HybridOptions) type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.DatastoreOptions) type_); + } + if (typeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.CloudStorageOptions) type_); + } + if (typeCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.BigQueryOptions) type_); + } + if (timespanConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getTimespanConfig()); + } + if (typeCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.privacy.dlp.v2.HybridOptions) type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StorageConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StorageConfig other = (com.google.privacy.dlp.v2.StorageConfig) obj; + + if (hasTimespanConfig() != other.hasTimespanConfig()) return false; + if (hasTimespanConfig()) { + if (!getTimespanConfig() + .equals(other.getTimespanConfig())) return false; + } + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 2: + if (!getDatastoreOptions() + .equals(other.getDatastoreOptions())) return false; + break; + case 3: + if (!getCloudStorageOptions() + .equals(other.getCloudStorageOptions())) return false; + break; + case 4: + if (!getBigQueryOptions() + .equals(other.getBigQueryOptions())) return false; + break; + case 9: + if (!getHybridOptions() + .equals(other.getHybridOptions())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimespanConfig()) { + hash = (37 * hash) + TIMESPAN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTimespanConfig().hashCode(); + } + switch (typeCase_) { + case 2: + hash = (37 * hash) + DATASTORE_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDatastoreOptions().hashCode(); + break; + case 3: + hash = (37 * hash) + CLOUD_STORAGE_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getCloudStorageOptions().hashCode(); + break; + case 4: + hash = (37 * hash) + BIG_QUERY_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getBigQueryOptions().hashCode(); + break; + case 9: + hash = (37 * hash) + HYBRID_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getHybridOptions().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StorageConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StorageConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StorageConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StorageConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StorageConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StorageConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StorageConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StorageConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Shared message indicating Cloud storage type.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StorageConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StorageConfig) + com.google.privacy.dlp.v2.StorageConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StorageConfig.class, com.google.privacy.dlp.v2.StorageConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StorageConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (timespanConfigBuilder_ == null) { + timespanConfig_ = null; + } else { + timespanConfig_ = null; + timespanConfigBuilder_ = null; + } + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig build() { + com.google.privacy.dlp.v2.StorageConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig buildPartial() { + com.google.privacy.dlp.v2.StorageConfig result = new com.google.privacy.dlp.v2.StorageConfig(this); + if (typeCase_ == 2) { + if (datastoreOptionsBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = datastoreOptionsBuilder_.build(); + } + } + if (typeCase_ == 3) { + if (cloudStorageOptionsBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = cloudStorageOptionsBuilder_.build(); + } + } + if (typeCase_ == 4) { + if (bigQueryOptionsBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = bigQueryOptionsBuilder_.build(); + } + } + if (typeCase_ == 9) { + if (hybridOptionsBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = hybridOptionsBuilder_.build(); + } + } + if (timespanConfigBuilder_ == null) { + result.timespanConfig_ = timespanConfig_; + } else { + result.timespanConfig_ = timespanConfigBuilder_.build(); + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StorageConfig) { + return mergeFrom((com.google.privacy.dlp.v2.StorageConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StorageConfig other) { + if (other == com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance()) return this; + if (other.hasTimespanConfig()) { + mergeTimespanConfig(other.getTimespanConfig()); + } + switch (other.getTypeCase()) { + case DATASTORE_OPTIONS: { + mergeDatastoreOptions(other.getDatastoreOptions()); + break; + } + case CLOUD_STORAGE_OPTIONS: { + mergeCloudStorageOptions(other.getCloudStorageOptions()); + break; + } + case BIG_QUERY_OPTIONS: { + mergeBigQueryOptions(other.getBigQueryOptions()); + break; + } + case HYBRID_OPTIONS: { + mergeHybridOptions(other.getHybridOptions()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StorageConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StorageConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DatastoreOptions, com.google.privacy.dlp.v2.DatastoreOptions.Builder, com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder> datastoreOptionsBuilder_; + /** + *
+     * Google Cloud Datastore options.
+     * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + * @return Whether the datastoreOptions field is set. + */ + @java.lang.Override + public boolean hasDatastoreOptions() { + return typeCase_ == 2; + } + /** + *
+     * Google Cloud Datastore options.
+     * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + * @return The datastoreOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreOptions getDatastoreOptions() { + if (datastoreOptionsBuilder_ == null) { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.DatastoreOptions) type_; + } + return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); + } else { + if (typeCase_ == 2) { + return datastoreOptionsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); + } + } + /** + *
+     * Google Cloud Datastore options.
+     * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + */ + public Builder setDatastoreOptions(com.google.privacy.dlp.v2.DatastoreOptions value) { + if (datastoreOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + datastoreOptionsBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + /** + *
+     * Google Cloud Datastore options.
+     * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + */ + public Builder setDatastoreOptions( + com.google.privacy.dlp.v2.DatastoreOptions.Builder builderForValue) { + if (datastoreOptionsBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + datastoreOptionsBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 2; + return this; + } + /** + *
+     * Google Cloud Datastore options.
+     * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + */ + public Builder mergeDatastoreOptions(com.google.privacy.dlp.v2.DatastoreOptions value) { + if (datastoreOptionsBuilder_ == null) { + if (typeCase_ == 2 && + type_ != com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.DatastoreOptions.newBuilder((com.google.privacy.dlp.v2.DatastoreOptions) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 2) { + datastoreOptionsBuilder_.mergeFrom(value); + } else { + datastoreOptionsBuilder_.setMessage(value); + } + } + typeCase_ = 2; + return this; + } + /** + *
+     * Google Cloud Datastore options.
+     * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + */ + public Builder clearDatastoreOptions() { + if (datastoreOptionsBuilder_ == null) { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + } + datastoreOptionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Google Cloud Datastore options.
+     * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + */ + public com.google.privacy.dlp.v2.DatastoreOptions.Builder getDatastoreOptionsBuilder() { + return getDatastoreOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Google Cloud Datastore options.
+     * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder getDatastoreOptionsOrBuilder() { + if ((typeCase_ == 2) && (datastoreOptionsBuilder_ != null)) { + return datastoreOptionsBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.DatastoreOptions) type_; + } + return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); + } + } + /** + *
+     * Google Cloud Datastore options.
+     * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DatastoreOptions, com.google.privacy.dlp.v2.DatastoreOptions.Builder, com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder> + getDatastoreOptionsFieldBuilder() { + if (datastoreOptionsBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); + } + datastoreOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DatastoreOptions, com.google.privacy.dlp.v2.DatastoreOptions.Builder, com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder>( + (com.google.privacy.dlp.v2.DatastoreOptions) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 2; + onChanged();; + return datastoreOptionsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageOptions, com.google.privacy.dlp.v2.CloudStorageOptions.Builder, com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder> cloudStorageOptionsBuilder_; + /** + *
+     * Cloud Storage options.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + * @return Whether the cloudStorageOptions field is set. + */ + @java.lang.Override + public boolean hasCloudStorageOptions() { + return typeCase_ == 3; + } + /** + *
+     * Cloud Storage options.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + * @return The cloudStorageOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptions getCloudStorageOptions() { + if (cloudStorageOptionsBuilder_ == null) { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.CloudStorageOptions) type_; + } + return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); + } else { + if (typeCase_ == 3) { + return cloudStorageOptionsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); + } + } + /** + *
+     * Cloud Storage options.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + */ + public Builder setCloudStorageOptions(com.google.privacy.dlp.v2.CloudStorageOptions value) { + if (cloudStorageOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + cloudStorageOptionsBuilder_.setMessage(value); + } + typeCase_ = 3; + return this; + } + /** + *
+     * Cloud Storage options.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + */ + public Builder setCloudStorageOptions( + com.google.privacy.dlp.v2.CloudStorageOptions.Builder builderForValue) { + if (cloudStorageOptionsBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + cloudStorageOptionsBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 3; + return this; + } + /** + *
+     * Cloud Storage options.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + */ + public Builder mergeCloudStorageOptions(com.google.privacy.dlp.v2.CloudStorageOptions value) { + if (cloudStorageOptionsBuilder_ == null) { + if (typeCase_ == 3 && + type_ != com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CloudStorageOptions.newBuilder((com.google.privacy.dlp.v2.CloudStorageOptions) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 3) { + cloudStorageOptionsBuilder_.mergeFrom(value); + } else { + cloudStorageOptionsBuilder_.setMessage(value); + } + } + typeCase_ = 3; + return this; + } + /** + *
+     * Cloud Storage options.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + */ + public Builder clearCloudStorageOptions() { + if (cloudStorageOptionsBuilder_ == null) { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + } + cloudStorageOptionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Cloud Storage options.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + */ + public com.google.privacy.dlp.v2.CloudStorageOptions.Builder getCloudStorageOptionsBuilder() { + return getCloudStorageOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Cloud Storage options.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder getCloudStorageOptionsOrBuilder() { + if ((typeCase_ == 3) && (cloudStorageOptionsBuilder_ != null)) { + return cloudStorageOptionsBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.CloudStorageOptions) type_; + } + return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); + } + } + /** + *
+     * Cloud Storage options.
+     * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageOptions, com.google.privacy.dlp.v2.CloudStorageOptions.Builder, com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder> + getCloudStorageOptionsFieldBuilder() { + if (cloudStorageOptionsBuilder_ == null) { + if (!(typeCase_ == 3)) { + type_ = com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); + } + cloudStorageOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CloudStorageOptions, com.google.privacy.dlp.v2.CloudStorageOptions.Builder, com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder>( + (com.google.privacy.dlp.v2.CloudStorageOptions) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 3; + onChanged();; + return cloudStorageOptionsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryOptions, com.google.privacy.dlp.v2.BigQueryOptions.Builder, com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder> bigQueryOptionsBuilder_; + /** + *
+     * BigQuery options.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + * @return Whether the bigQueryOptions field is set. + */ + @java.lang.Override + public boolean hasBigQueryOptions() { + return typeCase_ == 4; + } + /** + *
+     * BigQuery options.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + * @return The bigQueryOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryOptions getBigQueryOptions() { + if (bigQueryOptionsBuilder_ == null) { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.BigQueryOptions) type_; + } + return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); + } else { + if (typeCase_ == 4) { + return bigQueryOptionsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); + } + } + /** + *
+     * BigQuery options.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + */ + public Builder setBigQueryOptions(com.google.privacy.dlp.v2.BigQueryOptions value) { + if (bigQueryOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + bigQueryOptionsBuilder_.setMessage(value); + } + typeCase_ = 4; + return this; + } + /** + *
+     * BigQuery options.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + */ + public Builder setBigQueryOptions( + com.google.privacy.dlp.v2.BigQueryOptions.Builder builderForValue) { + if (bigQueryOptionsBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + bigQueryOptionsBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 4; + return this; + } + /** + *
+     * BigQuery options.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + */ + public Builder mergeBigQueryOptions(com.google.privacy.dlp.v2.BigQueryOptions value) { + if (bigQueryOptionsBuilder_ == null) { + if (typeCase_ == 4 && + type_ != com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.BigQueryOptions.newBuilder((com.google.privacy.dlp.v2.BigQueryOptions) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 4) { + bigQueryOptionsBuilder_.mergeFrom(value); + } else { + bigQueryOptionsBuilder_.setMessage(value); + } + } + typeCase_ = 4; + return this; + } + /** + *
+     * BigQuery options.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + */ + public Builder clearBigQueryOptions() { + if (bigQueryOptionsBuilder_ == null) { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + } + bigQueryOptionsBuilder_.clear(); + } + return this; + } + /** + *
+     * BigQuery options.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + */ + public com.google.privacy.dlp.v2.BigQueryOptions.Builder getBigQueryOptionsBuilder() { + return getBigQueryOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * BigQuery options.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder getBigQueryOptionsOrBuilder() { + if ((typeCase_ == 4) && (bigQueryOptionsBuilder_ != null)) { + return bigQueryOptionsBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.BigQueryOptions) type_; + } + return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); + } + } + /** + *
+     * BigQuery options.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryOptions, com.google.privacy.dlp.v2.BigQueryOptions.Builder, com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder> + getBigQueryOptionsFieldBuilder() { + if (bigQueryOptionsBuilder_ == null) { + if (!(typeCase_ == 4)) { + type_ = com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); + } + bigQueryOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryOptions, com.google.privacy.dlp.v2.BigQueryOptions.Builder, com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder>( + (com.google.privacy.dlp.v2.BigQueryOptions) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 4; + onChanged();; + return bigQueryOptionsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridOptions, com.google.privacy.dlp.v2.HybridOptions.Builder, com.google.privacy.dlp.v2.HybridOptionsOrBuilder> hybridOptionsBuilder_; + /** + *
+     * Hybrid inspection options.
+     * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + * @return Whether the hybridOptions field is set. + */ + @java.lang.Override + public boolean hasHybridOptions() { + return typeCase_ == 9; + } + /** + *
+     * Hybrid inspection options.
+     * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + * @return The hybridOptions. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridOptions getHybridOptions() { + if (hybridOptionsBuilder_ == null) { + if (typeCase_ == 9) { + return (com.google.privacy.dlp.v2.HybridOptions) type_; + } + return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); + } else { + if (typeCase_ == 9) { + return hybridOptionsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); + } + } + /** + *
+     * Hybrid inspection options.
+     * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + */ + public Builder setHybridOptions(com.google.privacy.dlp.v2.HybridOptions value) { + if (hybridOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + hybridOptionsBuilder_.setMessage(value); + } + typeCase_ = 9; + return this; + } + /** + *
+     * Hybrid inspection options.
+     * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + */ + public Builder setHybridOptions( + com.google.privacy.dlp.v2.HybridOptions.Builder builderForValue) { + if (hybridOptionsBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + hybridOptionsBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 9; + return this; + } + /** + *
+     * Hybrid inspection options.
+     * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + */ + public Builder mergeHybridOptions(com.google.privacy.dlp.v2.HybridOptions value) { + if (hybridOptionsBuilder_ == null) { + if (typeCase_ == 9 && + type_ != com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.HybridOptions.newBuilder((com.google.privacy.dlp.v2.HybridOptions) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 9) { + hybridOptionsBuilder_.mergeFrom(value); + } else { + hybridOptionsBuilder_.setMessage(value); + } + } + typeCase_ = 9; + return this; + } + /** + *
+     * Hybrid inspection options.
+     * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + */ + public Builder clearHybridOptions() { + if (hybridOptionsBuilder_ == null) { + if (typeCase_ == 9) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 9) { + typeCase_ = 0; + type_ = null; + } + hybridOptionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Hybrid inspection options.
+     * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + */ + public com.google.privacy.dlp.v2.HybridOptions.Builder getHybridOptionsBuilder() { + return getHybridOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Hybrid inspection options.
+     * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.HybridOptionsOrBuilder getHybridOptionsOrBuilder() { + if ((typeCase_ == 9) && (hybridOptionsBuilder_ != null)) { + return hybridOptionsBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 9) { + return (com.google.privacy.dlp.v2.HybridOptions) type_; + } + return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); + } + } + /** + *
+     * Hybrid inspection options.
+     * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridOptions, com.google.privacy.dlp.v2.HybridOptions.Builder, com.google.privacy.dlp.v2.HybridOptionsOrBuilder> + getHybridOptionsFieldBuilder() { + if (hybridOptionsBuilder_ == null) { + if (!(typeCase_ == 9)) { + type_ = com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); + } + hybridOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.HybridOptions, com.google.privacy.dlp.v2.HybridOptions.Builder, com.google.privacy.dlp.v2.HybridOptionsOrBuilder>( + (com.google.privacy.dlp.v2.HybridOptions) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 9; + onChanged();; + return hybridOptionsBuilder_; + } + + private com.google.privacy.dlp.v2.StorageConfig.TimespanConfig timespanConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder, com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder> timespanConfigBuilder_; + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + * @return Whether the timespanConfig field is set. + */ + public boolean hasTimespanConfig() { + return timespanConfigBuilder_ != null || timespanConfig_ != null; + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + * @return The timespanConfig. + */ + public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getTimespanConfig() { + if (timespanConfigBuilder_ == null) { + return timespanConfig_ == null ? com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance() : timespanConfig_; + } else { + return timespanConfigBuilder_.getMessage(); + } + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + */ + public Builder setTimespanConfig(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig value) { + if (timespanConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timespanConfig_ = value; + onChanged(); + } else { + timespanConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + */ + public Builder setTimespanConfig( + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder builderForValue) { + if (timespanConfigBuilder_ == null) { + timespanConfig_ = builderForValue.build(); + onChanged(); + } else { + timespanConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + */ + public Builder mergeTimespanConfig(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig value) { + if (timespanConfigBuilder_ == null) { + if (timespanConfig_ != null) { + timespanConfig_ = + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.newBuilder(timespanConfig_).mergeFrom(value).buildPartial(); + } else { + timespanConfig_ = value; + } + onChanged(); + } else { + timespanConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + */ + public Builder clearTimespanConfig() { + if (timespanConfigBuilder_ == null) { + timespanConfig_ = null; + onChanged(); + } else { + timespanConfig_ = null; + timespanConfigBuilder_ = null; + } + + return this; + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + */ + public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder getTimespanConfigBuilder() { + + onChanged(); + return getTimespanConfigFieldBuilder().getBuilder(); + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + */ + public com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder getTimespanConfigOrBuilder() { + if (timespanConfigBuilder_ != null) { + return timespanConfigBuilder_.getMessageOrBuilder(); + } else { + return timespanConfig_ == null ? + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance() : timespanConfig_; + } + } + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder, com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder> + getTimespanConfigFieldBuilder() { + if (timespanConfigBuilder_ == null) { + timespanConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder, com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder>( + getTimespanConfig(), + getParentForChildren(), + isClean()); + timespanConfig_ = null; + } + return timespanConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StorageConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StorageConfig) + private static final com.google.privacy.dlp.v2.StorageConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StorageConfig(); + } + + public static com.google.privacy.dlp.v2.StorageConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StorageConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java new file mode 100644 index 000000000000..b3cd3b0327ab --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface StorageConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StorageConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Google Cloud Datastore options.
+   * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + * @return Whether the datastoreOptions field is set. + */ + boolean hasDatastoreOptions(); + /** + *
+   * Google Cloud Datastore options.
+   * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + * @return The datastoreOptions. + */ + com.google.privacy.dlp.v2.DatastoreOptions getDatastoreOptions(); + /** + *
+   * Google Cloud Datastore options.
+   * 
+ * + * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; + */ + com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder getDatastoreOptionsOrBuilder(); + + /** + *
+   * Cloud Storage options.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + * @return Whether the cloudStorageOptions field is set. + */ + boolean hasCloudStorageOptions(); + /** + *
+   * Cloud Storage options.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + * @return The cloudStorageOptions. + */ + com.google.privacy.dlp.v2.CloudStorageOptions getCloudStorageOptions(); + /** + *
+   * Cloud Storage options.
+   * 
+ * + * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; + */ + com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder getCloudStorageOptionsOrBuilder(); + + /** + *
+   * BigQuery options.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + * @return Whether the bigQueryOptions field is set. + */ + boolean hasBigQueryOptions(); + /** + *
+   * BigQuery options.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + * @return The bigQueryOptions. + */ + com.google.privacy.dlp.v2.BigQueryOptions getBigQueryOptions(); + /** + *
+   * BigQuery options.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; + */ + com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder getBigQueryOptionsOrBuilder(); + + /** + *
+   * Hybrid inspection options.
+   * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + * @return Whether the hybridOptions field is set. + */ + boolean hasHybridOptions(); + /** + *
+   * Hybrid inspection options.
+   * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + * @return The hybridOptions. + */ + com.google.privacy.dlp.v2.HybridOptions getHybridOptions(); + /** + *
+   * Hybrid inspection options.
+   * 
+ * + * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; + */ + com.google.privacy.dlp.v2.HybridOptionsOrBuilder getHybridOptionsOrBuilder(); + + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + * @return Whether the timespanConfig field is set. + */ + boolean hasTimespanConfig(); + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + * @return The timespanConfig. + */ + com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getTimespanConfig(); + /** + * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; + */ + com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder getTimespanConfigOrBuilder(); + + public com.google.privacy.dlp.v2.StorageConfig.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabel.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabel.java new file mode 100644 index 000000000000..c1b640c68260 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabel.java @@ -0,0 +1,567 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Storage metadata label to indicate which metadata entry contains findings.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StorageMetadataLabel} + */ +public final class StorageMetadataLabel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StorageMetadataLabel) + StorageMetadataLabelOrBuilder { +private static final long serialVersionUID = 0L; + // Use StorageMetadataLabel.newBuilder() to construct. + private StorageMetadataLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StorageMetadataLabel() { + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StorageMetadataLabel(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StorageMetadataLabel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StorageMetadataLabel.class, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + * string key = 1; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StorageMetadataLabel)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StorageMetadataLabel other = (com.google.privacy.dlp.v2.StorageMetadataLabel) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StorageMetadataLabel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Storage metadata label to indicate which metadata entry contains findings.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StorageMetadataLabel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StorageMetadataLabel) + com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StorageMetadataLabel.class, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StorageMetadataLabel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageMetadataLabel getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageMetadataLabel build() { + com.google.privacy.dlp.v2.StorageMetadataLabel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageMetadataLabel buildPartial() { + com.google.privacy.dlp.v2.StorageMetadataLabel result = new com.google.privacy.dlp.v2.StorageMetadataLabel(this); + result.key_ = key_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StorageMetadataLabel) { + return mergeFrom((com.google.privacy.dlp.v2.StorageMetadataLabel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StorageMetadataLabel other) { + if (other == com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StorageMetadataLabel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StorageMetadataLabel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StorageMetadataLabel) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StorageMetadataLabel) + private static final com.google.privacy.dlp.v2.StorageMetadataLabel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StorageMetadataLabel(); + } + + public static com.google.privacy.dlp.v2.StorageMetadataLabel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StorageMetadataLabel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StorageMetadataLabel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StorageMetadataLabel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabelOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabelOrBuilder.java new file mode 100644 index 000000000000..aee8b378113f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabelOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface StorageMetadataLabelOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StorageMetadataLabel) + com.google.protobuf.MessageOrBuilder { + + /** + * string key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoType.java new file mode 100644 index 000000000000..5b2018aaebb9 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoType.java @@ -0,0 +1,1299 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * StoredInfoType resource message that contains information about the current
+ * version and any pending updates.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredInfoType} + */ +public final class StoredInfoType extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredInfoType) + StoredInfoTypeOrBuilder { +private static final long serialVersionUID = 0L; + // Use StoredInfoType.newBuilder() to construct. + private StoredInfoType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StoredInfoType() { + name_ = ""; + pendingVersions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StoredInfoType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StoredInfoType( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder subBuilder = null; + if (currentVersion_ != null) { + subBuilder = currentVersion_.toBuilder(); + } + currentVersion_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeVersion.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(currentVersion_); + currentVersion_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pendingVersions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pendingVersions_.add( + input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeVersion.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pendingVersions_ = java.util.Collections.unmodifiableList(pendingVersions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredInfoType.class, com.google.privacy.dlp.v2.StoredInfoType.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CURRENT_VERSION_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.StoredInfoTypeVersion currentVersion_; + /** + *
+   * Current version of the stored info type.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + * @return Whether the currentVersion field is set. + */ + @java.lang.Override + public boolean hasCurrentVersion() { + return currentVersion_ != null; + } + /** + *
+   * Current version of the stored info type.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + * @return The currentVersion. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeVersion getCurrentVersion() { + return currentVersion_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance() : currentVersion_; + } + /** + *
+   * Current version of the stored info type.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getCurrentVersionOrBuilder() { + return getCurrentVersion(); + } + + public static final int PENDING_VERSIONS_FIELD_NUMBER = 3; + private java.util.List pendingVersions_; + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + @java.lang.Override + public java.util.List getPendingVersionsList() { + return pendingVersions_; + } + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + @java.lang.Override + public java.util.List + getPendingVersionsOrBuilderList() { + return pendingVersions_; + } + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + @java.lang.Override + public int getPendingVersionsCount() { + return pendingVersions_.size(); + } + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeVersion getPendingVersions(int index) { + return pendingVersions_.get(index); + } + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getPendingVersionsOrBuilder( + int index) { + return pendingVersions_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (currentVersion_ != null) { + output.writeMessage(2, getCurrentVersion()); + } + for (int i = 0; i < pendingVersions_.size(); i++) { + output.writeMessage(3, pendingVersions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (currentVersion_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCurrentVersion()); + } + for (int i = 0; i < pendingVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, pendingVersions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StoredInfoType)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StoredInfoType other = (com.google.privacy.dlp.v2.StoredInfoType) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCurrentVersion() != other.hasCurrentVersion()) return false; + if (hasCurrentVersion()) { + if (!getCurrentVersion() + .equals(other.getCurrentVersion())) return false; + } + if (!getPendingVersionsList() + .equals(other.getPendingVersionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCurrentVersion()) { + hash = (37 * hash) + CURRENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getCurrentVersion().hashCode(); + } + if (getPendingVersionsCount() > 0) { + hash = (37 * hash) + PENDING_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPendingVersionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StoredInfoType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * StoredInfoType resource message that contains information about the current
+   * version and any pending updates.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredInfoType} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredInfoType) + com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredInfoType.class, com.google.privacy.dlp.v2.StoredInfoType.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StoredInfoType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPendingVersionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (currentVersionBuilder_ == null) { + currentVersion_ = null; + } else { + currentVersion_ = null; + currentVersionBuilder_ = null; + } + if (pendingVersionsBuilder_ == null) { + pendingVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pendingVersionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoType getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoType build() { + com.google.privacy.dlp.v2.StoredInfoType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoType buildPartial() { + com.google.privacy.dlp.v2.StoredInfoType result = new com.google.privacy.dlp.v2.StoredInfoType(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (currentVersionBuilder_ == null) { + result.currentVersion_ = currentVersion_; + } else { + result.currentVersion_ = currentVersionBuilder_.build(); + } + if (pendingVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pendingVersions_ = java.util.Collections.unmodifiableList(pendingVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pendingVersions_ = pendingVersions_; + } else { + result.pendingVersions_ = pendingVersionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StoredInfoType) { + return mergeFrom((com.google.privacy.dlp.v2.StoredInfoType)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StoredInfoType other) { + if (other == com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCurrentVersion()) { + mergeCurrentVersion(other.getCurrentVersion()); + } + if (pendingVersionsBuilder_ == null) { + if (!other.pendingVersions_.isEmpty()) { + if (pendingVersions_.isEmpty()) { + pendingVersions_ = other.pendingVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePendingVersionsIsMutable(); + pendingVersions_.addAll(other.pendingVersions_); + } + onChanged(); + } + } else { + if (!other.pendingVersions_.isEmpty()) { + if (pendingVersionsBuilder_.isEmpty()) { + pendingVersionsBuilder_.dispose(); + pendingVersionsBuilder_ = null; + pendingVersions_ = other.pendingVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + pendingVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPendingVersionsFieldBuilder() : null; + } else { + pendingVersionsBuilder_.addAllMessages(other.pendingVersions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StoredInfoType parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StoredInfoType) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Resource name.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.StoredInfoTypeVersion currentVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder> currentVersionBuilder_; + /** + *
+     * Current version of the stored info type.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + * @return Whether the currentVersion field is set. + */ + public boolean hasCurrentVersion() { + return currentVersionBuilder_ != null || currentVersion_ != null; + } + /** + *
+     * Current version of the stored info type.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + * @return The currentVersion. + */ + public com.google.privacy.dlp.v2.StoredInfoTypeVersion getCurrentVersion() { + if (currentVersionBuilder_ == null) { + return currentVersion_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance() : currentVersion_; + } else { + return currentVersionBuilder_.getMessage(); + } + } + /** + *
+     * Current version of the stored info type.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + */ + public Builder setCurrentVersion(com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { + if (currentVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentVersion_ = value; + onChanged(); + } else { + currentVersionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Current version of the stored info type.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + */ + public Builder setCurrentVersion( + com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder builderForValue) { + if (currentVersionBuilder_ == null) { + currentVersion_ = builderForValue.build(); + onChanged(); + } else { + currentVersionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Current version of the stored info type.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + */ + public Builder mergeCurrentVersion(com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { + if (currentVersionBuilder_ == null) { + if (currentVersion_ != null) { + currentVersion_ = + com.google.privacy.dlp.v2.StoredInfoTypeVersion.newBuilder(currentVersion_).mergeFrom(value).buildPartial(); + } else { + currentVersion_ = value; + } + onChanged(); + } else { + currentVersionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Current version of the stored info type.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + */ + public Builder clearCurrentVersion() { + if (currentVersionBuilder_ == null) { + currentVersion_ = null; + onChanged(); + } else { + currentVersion_ = null; + currentVersionBuilder_ = null; + } + + return this; + } + /** + *
+     * Current version of the stored info type.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder getCurrentVersionBuilder() { + + onChanged(); + return getCurrentVersionFieldBuilder().getBuilder(); + } + /** + *
+     * Current version of the stored info type.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getCurrentVersionOrBuilder() { + if (currentVersionBuilder_ != null) { + return currentVersionBuilder_.getMessageOrBuilder(); + } else { + return currentVersion_ == null ? + com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance() : currentVersion_; + } + } + /** + *
+     * Current version of the stored info type.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder> + getCurrentVersionFieldBuilder() { + if (currentVersionBuilder_ == null) { + currentVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder>( + getCurrentVersion(), + getParentForChildren(), + isClean()); + currentVersion_ = null; + } + return currentVersionBuilder_; + } + + private java.util.List pendingVersions_ = + java.util.Collections.emptyList(); + private void ensurePendingVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pendingVersions_ = new java.util.ArrayList(pendingVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder> pendingVersionsBuilder_; + + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public java.util.List getPendingVersionsList() { + if (pendingVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pendingVersions_); + } else { + return pendingVersionsBuilder_.getMessageList(); + } + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public int getPendingVersionsCount() { + if (pendingVersionsBuilder_ == null) { + return pendingVersions_.size(); + } else { + return pendingVersionsBuilder_.getCount(); + } + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeVersion getPendingVersions(int index) { + if (pendingVersionsBuilder_ == null) { + return pendingVersions_.get(index); + } else { + return pendingVersionsBuilder_.getMessage(index); + } + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public Builder setPendingVersions( + int index, com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { + if (pendingVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePendingVersionsIsMutable(); + pendingVersions_.set(index, value); + onChanged(); + } else { + pendingVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public Builder setPendingVersions( + int index, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder builderForValue) { + if (pendingVersionsBuilder_ == null) { + ensurePendingVersionsIsMutable(); + pendingVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + pendingVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public Builder addPendingVersions(com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { + if (pendingVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePendingVersionsIsMutable(); + pendingVersions_.add(value); + onChanged(); + } else { + pendingVersionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public Builder addPendingVersions( + int index, com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { + if (pendingVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePendingVersionsIsMutable(); + pendingVersions_.add(index, value); + onChanged(); + } else { + pendingVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public Builder addPendingVersions( + com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder builderForValue) { + if (pendingVersionsBuilder_ == null) { + ensurePendingVersionsIsMutable(); + pendingVersions_.add(builderForValue.build()); + onChanged(); + } else { + pendingVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public Builder addPendingVersions( + int index, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder builderForValue) { + if (pendingVersionsBuilder_ == null) { + ensurePendingVersionsIsMutable(); + pendingVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + pendingVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public Builder addAllPendingVersions( + java.lang.Iterable values) { + if (pendingVersionsBuilder_ == null) { + ensurePendingVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pendingVersions_); + onChanged(); + } else { + pendingVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public Builder clearPendingVersions() { + if (pendingVersionsBuilder_ == null) { + pendingVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pendingVersionsBuilder_.clear(); + } + return this; + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public Builder removePendingVersions(int index) { + if (pendingVersionsBuilder_ == null) { + ensurePendingVersionsIsMutable(); + pendingVersions_.remove(index); + onChanged(); + } else { + pendingVersionsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder getPendingVersionsBuilder( + int index) { + return getPendingVersionsFieldBuilder().getBuilder(index); + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getPendingVersionsOrBuilder( + int index) { + if (pendingVersionsBuilder_ == null) { + return pendingVersions_.get(index); } else { + return pendingVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public java.util.List + getPendingVersionsOrBuilderList() { + if (pendingVersionsBuilder_ != null) { + return pendingVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pendingVersions_); + } + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder addPendingVersionsBuilder() { + return getPendingVersionsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance()); + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder addPendingVersionsBuilder( + int index) { + return getPendingVersionsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance()); + } + /** + *
+     * Pending versions of the stored info type. Empty if no versions are
+     * pending.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + public java.util.List + getPendingVersionsBuilderList() { + return getPendingVersionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder> + getPendingVersionsFieldBuilder() { + if (pendingVersionsBuilder_ == null) { + pendingVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder>( + pendingVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pendingVersions_ = null; + } + return pendingVersionsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredInfoType) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredInfoType) + private static final com.google.privacy.dlp.v2.StoredInfoType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredInfoType(); + } + + public static com.google.privacy.dlp.v2.StoredInfoType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StoredInfoType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StoredInfoType(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfig.java new file mode 100644 index 000000000000..4f77b11984bd --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfig.java @@ -0,0 +1,1623 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Configuration for stored infoTypes. All fields and subfield are provided
+ * by the user. For more information, see
+ * https://cloud.google.com/dlp/docs/creating-custom-infotypes.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeConfig} + */ +public final class StoredInfoTypeConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredInfoTypeConfig) + StoredInfoTypeConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use StoredInfoTypeConfig.newBuilder() to construct. + private StoredInfoTypeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StoredInfoTypeConfig() { + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StoredInfoTypeConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StoredInfoTypeConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: { + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder subBuilder = null; + if (typeCase_ == 3) { + subBuilder = ((com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 3; + break; + } + case 34: { + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder subBuilder = null; + if (typeCase_ == 4) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 4; + break; + } + case 42: { + com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null; + if (typeCase_ == 5) { + subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 5; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredInfoTypeConfig.class, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LARGE_CUSTOM_DICTIONARY(3), + DICTIONARY(4), + REGEX(5), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 3: return LARGE_CUSTOM_DICTIONARY; + case 4: return DICTIONARY; + case 5: return REGEX; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + *
+   * Display name of the StoredInfoType (max 256 characters).
+   * 
+ * + * string display_name = 1; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * Display name of the StoredInfoType (max 256 characters).
+   * 
+ * + * string display_name = 1; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + *
+   * Description of the StoredInfoType (max 256 characters).
+   * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Description of the StoredInfoType (max 256 characters).
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LARGE_CUSTOM_DICTIONARY_FIELD_NUMBER = 3; + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + * @return Whether the largeCustomDictionary field is set. + */ + @java.lang.Override + public boolean hasLargeCustomDictionary() { + return typeCase_ == 3; + } + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + * @return The largeCustomDictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getLargeCustomDictionary() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_; + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); + } + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder getLargeCustomDictionaryOrBuilder() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_; + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); + } + + public static final int DICTIONARY_FIELD_NUMBER = 4; + /** + *
+   * Store dictionary-based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + * @return Whether the dictionary field is set. + */ + @java.lang.Override + public boolean hasDictionary() { + return typeCase_ == 4; + } + /** + *
+   * Store dictionary-based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + * @return The dictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + /** + *
+   * Store dictionary-based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + + public static final int REGEX_FIELD_NUMBER = 5; + /** + *
+   * Store regular expression-based StoredInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + * @return Whether the regex field is set. + */ + @java.lang.Override + public boolean hasRegex() { + return typeCase_ == 5; + } + /** + *
+   * Store regular expression-based StoredInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + * @return The regex. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + /** + *
+   * Store regular expression-based StoredInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (typeCase_ == 3) { + output.writeMessage(3, (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_); + } + if (typeCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); + } + if (typeCase_ == 5) { + output.writeMessage(5, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (typeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_); + } + if (typeCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); + } + if (typeCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StoredInfoTypeConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StoredInfoTypeConfig other = (com.google.privacy.dlp.v2.StoredInfoTypeConfig) obj; + + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 3: + if (!getLargeCustomDictionary() + .equals(other.getLargeCustomDictionary())) return false; + break; + case 4: + if (!getDictionary() + .equals(other.getDictionary())) return false; + break; + case 5: + if (!getRegex() + .equals(other.getRegex())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + switch (typeCase_) { + case 3: + hash = (37 * hash) + LARGE_CUSTOM_DICTIONARY_FIELD_NUMBER; + hash = (53 * hash) + getLargeCustomDictionary().hashCode(); + break; + case 4: + hash = (37 * hash) + DICTIONARY_FIELD_NUMBER; + hash = (53 * hash) + getDictionary().hashCode(); + break; + case 5: + hash = (37 * hash) + REGEX_FIELD_NUMBER; + hash = (53 * hash) + getRegex().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StoredInfoTypeConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Configuration for stored infoTypes. All fields and subfield are provided
+   * by the user. For more information, see
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredInfoTypeConfig) + com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredInfoTypeConfig.class, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StoredInfoTypeConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + description_ = ""; + + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfig build() { + com.google.privacy.dlp.v2.StoredInfoTypeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfig buildPartial() { + com.google.privacy.dlp.v2.StoredInfoTypeConfig result = new com.google.privacy.dlp.v2.StoredInfoTypeConfig(this); + result.displayName_ = displayName_; + result.description_ = description_; + if (typeCase_ == 3) { + if (largeCustomDictionaryBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = largeCustomDictionaryBuilder_.build(); + } + } + if (typeCase_ == 4) { + if (dictionaryBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = dictionaryBuilder_.build(); + } + } + if (typeCase_ == 5) { + if (regexBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = regexBuilder_.build(); + } + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StoredInfoTypeConfig) { + return mergeFrom((com.google.privacy.dlp.v2.StoredInfoTypeConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StoredInfoTypeConfig other) { + if (other == com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance()) return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + switch (other.getTypeCase()) { + case LARGE_CUSTOM_DICTIONARY: { + mergeLargeCustomDictionary(other.getLargeCustomDictionary()); + break; + } + case DICTIONARY: { + mergeDictionary(other.getDictionary()); + break; + } + case REGEX: { + mergeRegex(other.getRegex()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StoredInfoTypeConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StoredInfoTypeConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private java.lang.Object displayName_ = ""; + /** + *
+     * Display name of the StoredInfoType (max 256 characters).
+     * 
+ * + * string display_name = 1; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Display name of the StoredInfoType (max 256 characters).
+     * 
+ * + * string display_name = 1; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Display name of the StoredInfoType (max 256 characters).
+     * 
+ * + * string display_name = 1; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * Display name of the StoredInfoType (max 256 characters).
+     * 
+ * + * string display_name = 1; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * Display name of the StoredInfoType (max 256 characters).
+     * 
+ * + * string display_name = 1; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Description of the StoredInfoType (max 256 characters).
+     * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Description of the StoredInfoType (max 256 characters).
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Description of the StoredInfoType (max 256 characters).
+     * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Description of the StoredInfoType (max 256 characters).
+     * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Description of the StoredInfoType (max 256 characters).
+     * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder> largeCustomDictionaryBuilder_; + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + * @return Whether the largeCustomDictionary field is set. + */ + @java.lang.Override + public boolean hasLargeCustomDictionary() { + return typeCase_ == 3; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + * @return The largeCustomDictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getLargeCustomDictionary() { + if (largeCustomDictionaryBuilder_ == null) { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_; + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); + } else { + if (typeCase_ == 3) { + return largeCustomDictionaryBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); + } + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + */ + public Builder setLargeCustomDictionary(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig value) { + if (largeCustomDictionaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + largeCustomDictionaryBuilder_.setMessage(value); + } + typeCase_ = 3; + return this; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + */ + public Builder setLargeCustomDictionary( + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder builderForValue) { + if (largeCustomDictionaryBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + largeCustomDictionaryBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 3; + return this; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + */ + public Builder mergeLargeCustomDictionary(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig value) { + if (largeCustomDictionaryBuilder_ == null) { + if (typeCase_ == 3 && + type_ != com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.newBuilder((com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 3) { + largeCustomDictionaryBuilder_.mergeFrom(value); + } else { + largeCustomDictionaryBuilder_.setMessage(value); + } + } + typeCase_ = 3; + return this; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + */ + public Builder clearLargeCustomDictionary() { + if (largeCustomDictionaryBuilder_ == null) { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + } + largeCustomDictionaryBuilder_.clear(); + } + return this; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + */ + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder getLargeCustomDictionaryBuilder() { + return getLargeCustomDictionaryFieldBuilder().getBuilder(); + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder getLargeCustomDictionaryOrBuilder() { + if ((typeCase_ == 3) && (largeCustomDictionaryBuilder_ != null)) { + return largeCustomDictionaryBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_; + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); + } + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder> + getLargeCustomDictionaryFieldBuilder() { + if (largeCustomDictionaryBuilder_ == null) { + if (!(typeCase_ == 3)) { + type_ = com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); + } + largeCustomDictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder>( + (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 3; + onChanged();; + return largeCustomDictionaryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> dictionaryBuilder_; + /** + *
+     * Store dictionary-based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + * @return Whether the dictionary field is set. + */ + @java.lang.Override + public boolean hasDictionary() { + return typeCase_ == 4; + } + /** + *
+     * Store dictionary-based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + * @return The dictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { + if (dictionaryBuilder_ == null) { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } else { + if (typeCase_ == 4) { + return dictionaryBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + } + /** + *
+     * Store dictionary-based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + */ + public Builder setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { + if (dictionaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + dictionaryBuilder_.setMessage(value); + } + typeCase_ = 4; + return this; + } + /** + *
+     * Store dictionary-based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + */ + public Builder setDictionary( + com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder builderForValue) { + if (dictionaryBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + dictionaryBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 4; + return this; + } + /** + *
+     * Store dictionary-based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + */ + public Builder mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { + if (dictionaryBuilder_ == null) { + if (typeCase_ == 4 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 4) { + dictionaryBuilder_.mergeFrom(value); + } else { + dictionaryBuilder_.setMessage(value); + } + } + typeCase_ = 4; + return this; + } + /** + *
+     * Store dictionary-based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + */ + public Builder clearDictionary() { + if (dictionaryBuilder_ == null) { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + } + dictionaryBuilder_.clear(); + } + return this; + } + /** + *
+     * Store dictionary-based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder getDictionaryBuilder() { + return getDictionaryFieldBuilder().getBuilder(); + } + /** + *
+     * Store dictionary-based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { + if ((typeCase_ == 4) && (dictionaryBuilder_ != null)) { + return dictionaryBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 4) { + return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + } + /** + *
+     * Store dictionary-based CustomInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> + getDictionaryFieldBuilder() { + if (dictionaryBuilder_ == null) { + if (!(typeCase_ == 4)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); + } + dictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 4; + onChanged();; + return dictionaryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> regexBuilder_; + /** + *
+     * Store regular expression-based StoredInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + * @return Whether the regex field is set. + */ + @java.lang.Override + public boolean hasRegex() { + return typeCase_ == 5; + } + /** + *
+     * Store regular expression-based StoredInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + * @return The regex. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { + if (regexBuilder_ == null) { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } else { + if (typeCase_ == 5) { + return regexBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + } + /** + *
+     * Store regular expression-based StoredInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + */ + public Builder setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { + if (regexBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + regexBuilder_.setMessage(value); + } + typeCase_ = 5; + return this; + } + /** + *
+     * Store regular expression-based StoredInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + */ + public Builder setRegex( + com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) { + if (regexBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + regexBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 5; + return this; + } + /** + *
+     * Store regular expression-based StoredInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + */ + public Builder mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { + if (regexBuilder_ == null) { + if (typeCase_ == 5 && + type_ != com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 5) { + regexBuilder_.mergeFrom(value); + } else { + regexBuilder_.setMessage(value); + } + } + typeCase_ = 5; + return this; + } + /** + *
+     * Store regular expression-based StoredInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + */ + public Builder clearRegex() { + if (regexBuilder_ == null) { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + } + regexBuilder_.clear(); + } + return this; + } + /** + *
+     * Store regular expression-based StoredInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + */ + public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getRegexBuilder() { + return getRegexFieldBuilder().getBuilder(); + } + /** + *
+     * Store regular expression-based StoredInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { + if ((typeCase_ == 5) && (regexBuilder_ != null)) { + return regexBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 5) { + return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; + } + return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + } + /** + *
+     * Store regular expression-based StoredInfoType.
+     * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> + getRegexFieldBuilder() { + if (regexBuilder_ == null) { + if (!(typeCase_ == 5)) { + type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); + } + regexBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>( + (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 5; + onChanged();; + return regexBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredInfoTypeConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredInfoTypeConfig) + private static final com.google.privacy.dlp.v2.StoredInfoTypeConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredInfoTypeConfig(); + } + + public static com.google.privacy.dlp.v2.StoredInfoTypeConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StoredInfoTypeConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StoredInfoTypeConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfigOrBuilder.java new file mode 100644 index 000000000000..bd4966de7e44 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfigOrBuilder.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface StoredInfoTypeConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredInfoTypeConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Display name of the StoredInfoType (max 256 characters).
+   * 
+ * + * string display_name = 1; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * Display name of the StoredInfoType (max 256 characters).
+   * 
+ * + * string display_name = 1; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * Description of the StoredInfoType (max 256 characters).
+   * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Description of the StoredInfoType (max 256 characters).
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + * @return Whether the largeCustomDictionary field is set. + */ + boolean hasLargeCustomDictionary(); + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + * @return The largeCustomDictionary. + */ + com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getLargeCustomDictionary(); + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; + */ + com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder getLargeCustomDictionaryOrBuilder(); + + /** + *
+   * Store dictionary-based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + * @return Whether the dictionary field is set. + */ + boolean hasDictionary(); + /** + *
+   * Store dictionary-based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + * @return The dictionary. + */ + com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary(); + /** + *
+   * Store dictionary-based CustomInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; + */ + com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder(); + + /** + *
+   * Store regular expression-based StoredInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + * @return Whether the regex field is set. + */ + boolean hasRegex(); + /** + *
+   * Store regular expression-based StoredInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + * @return The regex. + */ + com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex(); + /** + *
+   * Store regular expression-based StoredInfoType.
+   * 
+ * + * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; + */ + com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder(); + + public com.google.privacy.dlp.v2.StoredInfoTypeConfig.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeName.java new file mode 100644 index 000000000000..9f7ca00d1f64 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeName.java @@ -0,0 +1,495 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.privacy.dlp.v2; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class StoredInfoTypeName implements ResourceName { + private static final PathTemplate ORGANIZATION_STORED_INFO_TYPE = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/storedInfoTypes/{stored_info_type}"); + private static final PathTemplate PROJECT_STORED_INFO_TYPE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/storedInfoTypes/{stored_info_type}"); + private static final PathTemplate ORGANIZATION_LOCATION_STORED_INFO_TYPE = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}"); + private static final PathTemplate PROJECT_LOCATION_STORED_INFO_TYPE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String organization; + private final String storedInfoType; + private final String project; + private final String location; + + @Deprecated + protected StoredInfoTypeName() { + organization = null; + storedInfoType = null; + project = null; + location = null; + } + + private StoredInfoTypeName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + storedInfoType = Preconditions.checkNotNull(builder.getStoredInfoType()); + project = null; + location = null; + pathTemplate = ORGANIZATION_STORED_INFO_TYPE; + } + + private StoredInfoTypeName(ProjectStoredInfoTypeBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + storedInfoType = Preconditions.checkNotNull(builder.getStoredInfoType()); + organization = null; + location = null; + pathTemplate = PROJECT_STORED_INFO_TYPE; + } + + private StoredInfoTypeName(OrganizationLocationStoredInfoTypeBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + location = Preconditions.checkNotNull(builder.getLocation()); + storedInfoType = Preconditions.checkNotNull(builder.getStoredInfoType()); + project = null; + pathTemplate = ORGANIZATION_LOCATION_STORED_INFO_TYPE; + } + + private StoredInfoTypeName(ProjectLocationStoredInfoTypeBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + storedInfoType = Preconditions.checkNotNull(builder.getStoredInfoType()); + organization = null; + pathTemplate = PROJECT_LOCATION_STORED_INFO_TYPE; + } + + public String getOrganization() { + return organization; + } + + public String getStoredInfoType() { + return storedInfoType; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newOrganizationStoredInfoTypeBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectStoredInfoTypeBuilder newProjectStoredInfoTypeBuilder() { + return new ProjectStoredInfoTypeBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationLocationStoredInfoTypeBuilder + newOrganizationLocationStoredInfoTypeBuilder() { + return new OrganizationLocationStoredInfoTypeBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationStoredInfoTypeBuilder newProjectLocationStoredInfoTypeBuilder() { + return new ProjectLocationStoredInfoTypeBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static StoredInfoTypeName of(String organization, String storedInfoType) { + return newBuilder().setOrganization(organization).setStoredInfoType(storedInfoType).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static StoredInfoTypeName ofOrganizationStoredInfoTypeName( + String organization, String storedInfoType) { + return newBuilder().setOrganization(organization).setStoredInfoType(storedInfoType).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static StoredInfoTypeName ofProjectStoredInfoTypeName( + String project, String storedInfoType) { + return newProjectStoredInfoTypeBuilder() + .setProject(project) + .setStoredInfoType(storedInfoType) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static StoredInfoTypeName ofOrganizationLocationStoredInfoTypeName( + String organization, String location, String storedInfoType) { + return newOrganizationLocationStoredInfoTypeBuilder() + .setOrganization(organization) + .setLocation(location) + .setStoredInfoType(storedInfoType) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static StoredInfoTypeName ofProjectLocationStoredInfoTypeName( + String project, String location, String storedInfoType) { + return newProjectLocationStoredInfoTypeBuilder() + .setProject(project) + .setLocation(location) + .setStoredInfoType(storedInfoType) + .build(); + } + + public static String format(String organization, String storedInfoType) { + return newBuilder() + .setOrganization(organization) + .setStoredInfoType(storedInfoType) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationStoredInfoTypeName( + String organization, String storedInfoType) { + return newBuilder() + .setOrganization(organization) + .setStoredInfoType(storedInfoType) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectStoredInfoTypeName(String project, String storedInfoType) { + return newProjectStoredInfoTypeBuilder() + .setProject(project) + .setStoredInfoType(storedInfoType) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationLocationStoredInfoTypeName( + String organization, String location, String storedInfoType) { + return newOrganizationLocationStoredInfoTypeBuilder() + .setOrganization(organization) + .setLocation(location) + .setStoredInfoType(storedInfoType) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationStoredInfoTypeName( + String project, String location, String storedInfoType) { + return newProjectLocationStoredInfoTypeBuilder() + .setProject(project) + .setLocation(location) + .setStoredInfoType(storedInfoType) + .build() + .toString(); + } + + public static StoredInfoTypeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (ORGANIZATION_STORED_INFO_TYPE.matches(formattedString)) { + Map matchMap = ORGANIZATION_STORED_INFO_TYPE.match(formattedString); + return ofOrganizationStoredInfoTypeName( + matchMap.get("organization"), matchMap.get("stored_info_type")); + } else if (PROJECT_STORED_INFO_TYPE.matches(formattedString)) { + Map matchMap = PROJECT_STORED_INFO_TYPE.match(formattedString); + return ofProjectStoredInfoTypeName(matchMap.get("project"), matchMap.get("stored_info_type")); + } else if (ORGANIZATION_LOCATION_STORED_INFO_TYPE.matches(formattedString)) { + Map matchMap = ORGANIZATION_LOCATION_STORED_INFO_TYPE.match(formattedString); + return ofOrganizationLocationStoredInfoTypeName( + matchMap.get("organization"), matchMap.get("location"), matchMap.get("stored_info_type")); + } else if (PROJECT_LOCATION_STORED_INFO_TYPE.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_STORED_INFO_TYPE.match(formattedString); + return ofProjectLocationStoredInfoTypeName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("stored_info_type")); + } + throw new ValidationException("StoredInfoTypeName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (StoredInfoTypeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION_STORED_INFO_TYPE.matches(formattedString) + || PROJECT_STORED_INFO_TYPE.matches(formattedString) + || ORGANIZATION_LOCATION_STORED_INFO_TYPE.matches(formattedString) + || PROJECT_LOCATION_STORED_INFO_TYPE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + if (storedInfoType != null) { + fieldMapBuilder.put("stored_info_type", storedInfoType); + } + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + StoredInfoTypeName that = ((StoredInfoTypeName) o); + return Objects.equals(this.organization, that.organization) + && Objects.equals(this.storedInfoType, that.storedInfoType) + && Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(organization); + h *= 1000003; + h ^= Objects.hashCode(storedInfoType); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for organizations/{organization}/storedInfoTypes/{stored_info_type}. */ + public static class Builder { + private String organization; + private String storedInfoType; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public String getStoredInfoType() { + return storedInfoType; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public Builder setStoredInfoType(String storedInfoType) { + this.storedInfoType = storedInfoType; + return this; + } + + private Builder(StoredInfoTypeName storedInfoTypeName) { + Preconditions.checkArgument( + Objects.equals(storedInfoTypeName.pathTemplate, ORGANIZATION_STORED_INFO_TYPE), + "toBuilder is only supported when StoredInfoTypeName has the pattern of organizations/{organization}/storedInfoTypes/{stored_info_type}"); + this.organization = storedInfoTypeName.organization; + this.storedInfoType = storedInfoTypeName.storedInfoType; + } + + public StoredInfoTypeName build() { + return new StoredInfoTypeName(this); + } + } + + /** Builder for projects/{project}/storedInfoTypes/{stored_info_type}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectStoredInfoTypeBuilder { + private String project; + private String storedInfoType; + + protected ProjectStoredInfoTypeBuilder() {} + + public String getProject() { + return project; + } + + public String getStoredInfoType() { + return storedInfoType; + } + + public ProjectStoredInfoTypeBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectStoredInfoTypeBuilder setStoredInfoType(String storedInfoType) { + this.storedInfoType = storedInfoType; + return this; + } + + public StoredInfoTypeName build() { + return new StoredInfoTypeName(this); + } + } + + /** + * Builder for + * organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationLocationStoredInfoTypeBuilder { + private String organization; + private String location; + private String storedInfoType; + + protected OrganizationLocationStoredInfoTypeBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getLocation() { + return location; + } + + public String getStoredInfoType() { + return storedInfoType; + } + + public OrganizationLocationStoredInfoTypeBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationLocationStoredInfoTypeBuilder setLocation(String location) { + this.location = location; + return this; + } + + public OrganizationLocationStoredInfoTypeBuilder setStoredInfoType(String storedInfoType) { + this.storedInfoType = storedInfoType; + return this; + } + + public StoredInfoTypeName build() { + return new StoredInfoTypeName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationStoredInfoTypeBuilder { + private String project; + private String location; + private String storedInfoType; + + protected ProjectLocationStoredInfoTypeBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getStoredInfoType() { + return storedInfoType; + } + + public ProjectLocationStoredInfoTypeBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationStoredInfoTypeBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationStoredInfoTypeBuilder setStoredInfoType(String storedInfoType) { + this.storedInfoType = storedInfoType; + return this; + } + + public StoredInfoTypeName build() { + return new StoredInfoTypeName(this); + } + } +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeOrBuilder.java new file mode 100644 index 000000000000..96b13d2f9a55 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface StoredInfoTypeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredInfoType) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Resource name.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Current version of the stored info type.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + * @return Whether the currentVersion field is set. + */ + boolean hasCurrentVersion(); + /** + *
+   * Current version of the stored info type.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + * @return The currentVersion. + */ + com.google.privacy.dlp.v2.StoredInfoTypeVersion getCurrentVersion(); + /** + *
+   * Current version of the stored info type.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; + */ + com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getCurrentVersionOrBuilder(); + + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + java.util.List + getPendingVersionsList(); + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + com.google.privacy.dlp.v2.StoredInfoTypeVersion getPendingVersions(int index); + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + int getPendingVersionsCount(); + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + java.util.List + getPendingVersionsOrBuilderList(); + /** + *
+   * Pending versions of the stored info type. Empty if no versions are
+   * pending.
+   * 
+ * + * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; + */ + com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getPendingVersionsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java new file mode 100644 index 000000000000..3a4b156740a1 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java @@ -0,0 +1,190 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * State of a StoredInfoType version.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.StoredInfoTypeState} + */ +public enum StoredInfoTypeState + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unused
+   * 
+ * + * STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; + */ + STORED_INFO_TYPE_STATE_UNSPECIFIED(0), + /** + *
+   * StoredInfoType version is being created.
+   * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + *
+   * StoredInfoType version is ready for use.
+   * 
+ * + * READY = 2; + */ + READY(2), + /** + *
+   * StoredInfoType creation failed. All relevant error messages are returned in
+   * the `StoredInfoTypeVersion` message.
+   * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + *
+   * StoredInfoType is no longer valid because artifacts stored in
+   * user-controlled storage were modified. To fix an invalid StoredInfoType,
+   * use the `UpdateStoredInfoType` method to create a new version.
+   * 
+ * + * INVALID = 4; + */ + INVALID(4), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unused
+   * 
+ * + * STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; + */ + public static final int STORED_INFO_TYPE_STATE_UNSPECIFIED_VALUE = 0; + /** + *
+   * StoredInfoType version is being created.
+   * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + *
+   * StoredInfoType version is ready for use.
+   * 
+ * + * READY = 2; + */ + public static final int READY_VALUE = 2; + /** + *
+   * StoredInfoType creation failed. All relevant error messages are returned in
+   * the `StoredInfoTypeVersion` message.
+   * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + *
+   * StoredInfoType is no longer valid because artifacts stored in
+   * user-controlled storage were modified. To fix an invalid StoredInfoType,
+   * use the `UpdateStoredInfoType` method to create a new version.
+   * 
+ * + * INVALID = 4; + */ + public static final int INVALID_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StoredInfoTypeState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static StoredInfoTypeState forNumber(int value) { + switch (value) { + case 0: return STORED_INFO_TYPE_STATE_UNSPECIFIED; + case 1: return PENDING; + case 2: return READY; + case 3: return FAILED; + case 4: return INVALID; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + StoredInfoTypeState> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StoredInfoTypeState findValueByNumber(int number) { + return StoredInfoTypeState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(9); + } + + private static final StoredInfoTypeState[] VALUES = values(); + + public static StoredInfoTypeState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StoredInfoTypeState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.StoredInfoTypeState) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStats.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStats.java new file mode 100644 index 000000000000..19e3e85d76f2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStats.java @@ -0,0 +1,761 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Statistics for a StoredInfoType.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeStats} + */ +public final class StoredInfoTypeStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredInfoTypeStats) + StoredInfoTypeStatsOrBuilder { +private static final long serialVersionUID = 0L; + // Use StoredInfoTypeStats.newBuilder() to construct. + private StoredInfoTypeStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StoredInfoTypeStats() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StoredInfoTypeStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StoredInfoTypeStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder subBuilder = null; + if (typeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.LargeCustomDictionaryStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredInfoTypeStats.class, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LARGE_CUSTOM_DICTIONARY(1), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return LARGE_CUSTOM_DICTIONARY; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int LARGE_CUSTOM_DICTIONARY_FIELD_NUMBER = 1; + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + * @return Whether the largeCustomDictionary field is set. + */ + @java.lang.Override + public boolean hasLargeCustomDictionary() { + return typeCase_ == 1; + } + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + * @return The largeCustomDictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryStats getLargeCustomDictionary() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_; + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); + } + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder getLargeCustomDictionaryOrBuilder() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_; + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StoredInfoTypeStats)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StoredInfoTypeStats other = (com.google.privacy.dlp.v2.StoredInfoTypeStats) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getLargeCustomDictionary() + .equals(other.getLargeCustomDictionary())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + LARGE_CUSTOM_DICTIONARY_FIELD_NUMBER; + hash = (53 * hash) + getLargeCustomDictionary().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StoredInfoTypeStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Statistics for a StoredInfoType.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredInfoTypeStats) + com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredInfoTypeStats.class, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StoredInfoTypeStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeStats getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeStats build() { + com.google.privacy.dlp.v2.StoredInfoTypeStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeStats buildPartial() { + com.google.privacy.dlp.v2.StoredInfoTypeStats result = new com.google.privacy.dlp.v2.StoredInfoTypeStats(this); + if (typeCase_ == 1) { + if (largeCustomDictionaryBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = largeCustomDictionaryBuilder_.build(); + } + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StoredInfoTypeStats) { + return mergeFrom((com.google.privacy.dlp.v2.StoredInfoTypeStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StoredInfoTypeStats other) { + if (other == com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance()) return this; + switch (other.getTypeCase()) { + case LARGE_CUSTOM_DICTIONARY: { + mergeLargeCustomDictionary(other.getLargeCustomDictionary()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StoredInfoTypeStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StoredInfoTypeStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.LargeCustomDictionaryStats, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder> largeCustomDictionaryBuilder_; + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + * @return Whether the largeCustomDictionary field is set. + */ + @java.lang.Override + public boolean hasLargeCustomDictionary() { + return typeCase_ == 1; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + * @return The largeCustomDictionary. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryStats getLargeCustomDictionary() { + if (largeCustomDictionaryBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_; + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return largeCustomDictionaryBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); + } + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + */ + public Builder setLargeCustomDictionary(com.google.privacy.dlp.v2.LargeCustomDictionaryStats value) { + if (largeCustomDictionaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + largeCustomDictionaryBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + */ + public Builder setLargeCustomDictionary( + com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder builderForValue) { + if (largeCustomDictionaryBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + largeCustomDictionaryBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + */ + public Builder mergeLargeCustomDictionary(com.google.privacy.dlp.v2.LargeCustomDictionaryStats value) { + if (largeCustomDictionaryBuilder_ == null) { + if (typeCase_ == 1 && + type_ != com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.LargeCustomDictionaryStats.newBuilder((com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + largeCustomDictionaryBuilder_.mergeFrom(value); + } else { + largeCustomDictionaryBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + */ + public Builder clearLargeCustomDictionary() { + if (largeCustomDictionaryBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + largeCustomDictionaryBuilder_.clear(); + } + return this; + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + */ + public com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder getLargeCustomDictionaryBuilder() { + return getLargeCustomDictionaryFieldBuilder().getBuilder(); + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder getLargeCustomDictionaryOrBuilder() { + if ((typeCase_ == 1) && (largeCustomDictionaryBuilder_ != null)) { + return largeCustomDictionaryBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_; + } + return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); + } + } + /** + *
+     * StoredInfoType where findings are defined by a dictionary of phrases.
+     * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.LargeCustomDictionaryStats, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder> + getLargeCustomDictionaryFieldBuilder() { + if (largeCustomDictionaryBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); + } + largeCustomDictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.LargeCustomDictionaryStats, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder>( + (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged();; + return largeCustomDictionaryBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredInfoTypeStats) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredInfoTypeStats) + private static final com.google.privacy.dlp.v2.StoredInfoTypeStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredInfoTypeStats(); + } + + public static com.google.privacy.dlp.v2.StoredInfoTypeStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StoredInfoTypeStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StoredInfoTypeStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStatsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStatsOrBuilder.java new file mode 100644 index 000000000000..667339e898bd --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStatsOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface StoredInfoTypeStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredInfoTypeStats) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + * @return Whether the largeCustomDictionary field is set. + */ + boolean hasLargeCustomDictionary(); + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + * @return The largeCustomDictionary. + */ + com.google.privacy.dlp.v2.LargeCustomDictionaryStats getLargeCustomDictionary(); + /** + *
+   * StoredInfoType where findings are defined by a dictionary of phrases.
+   * 
+ * + * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; + */ + com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder getLargeCustomDictionaryOrBuilder(); + + public com.google.privacy.dlp.v2.StoredInfoTypeStats.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java new file mode 100644 index 000000000000..6a6c3e4a2cc6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java @@ -0,0 +1,1955 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Version of a StoredInfoType, including the configuration used to build it,
+ * create timestamp, and current state.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeVersion} + */ +public final class StoredInfoTypeVersion extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredInfoTypeVersion) + StoredInfoTypeVersionOrBuilder { +private static final long serialVersionUID = 0L; + // Use StoredInfoTypeVersion.newBuilder() to construct. + private StoredInfoTypeVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StoredInfoTypeVersion() { + state_ = 0; + errors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StoredInfoTypeVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StoredInfoTypeVersion( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder subBuilder = null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + errors_.add( + input.readMessage(com.google.privacy.dlp.v2.Error.parser(), extensionRegistry)); + break; + } + case 42: { + com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder subBuilder = null; + if (stats_ != null) { + subBuilder = stats_.toBuilder(); + } + stats_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stats_); + stats_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredInfoTypeVersion.class, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder.class); + } + + public static final int CONFIG_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; + /** + *
+   * StoredInfoType configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + *
+   * StoredInfoType configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + * @return The config. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { + return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; + } + /** + *
+   * StoredInfoType configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { + return getConfig(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Create timestamp of the version. Read-only, determined by the system
+   * when the version is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Create timestamp of the version. Read-only, determined by the system
+   * when the version is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Create timestamp of the version. Read-only, determined by the system
+   * when the version is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + *
+   * Stored info type version state. Read-only, updated by the system
+   * during dictionary creation.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * Stored info type version state. Read-only, updated by the system
+   * during dictionary creation.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; + * @return The state. + */ + @java.lang.Override public com.google.privacy.dlp.v2.StoredInfoTypeState getState() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.StoredInfoTypeState result = com.google.privacy.dlp.v2.StoredInfoTypeState.valueOf(state_); + return result == null ? com.google.privacy.dlp.v2.StoredInfoTypeState.UNRECOGNIZED : result; + } + + public static final int ERRORS_FIELD_NUMBER = 4; + private java.util.List errors_; + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + @java.lang.Override + public java.util.List + getErrorsOrBuilderList() { + return errors_; + } + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Error getErrors(int index) { + return errors_.get(index); + } + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( + int index) { + return errors_.get(index); + } + + public static final int STATS_FIELD_NUMBER = 5; + private com.google.privacy.dlp.v2.StoredInfoTypeStats stats_; + /** + *
+   * Statistics about this storedInfoType version.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return stats_ != null; + } + /** + *
+   * Statistics about this storedInfoType version.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + * @return The stats. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeStats getStats() { + return stats_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance() : stats_; + } + /** + *
+   * Statistics about this storedInfoType version.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder getStatsOrBuilder() { + return getStats(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (config_ != null) { + output.writeMessage(1, getConfig()); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (state_ != com.google.privacy.dlp.v2.StoredInfoTypeState.STORED_INFO_TYPE_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(4, errors_.get(i)); + } + if (stats_ != null) { + output.writeMessage(5, getStats()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (config_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getConfig()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + if (state_ != com.google.privacy.dlp.v2.StoredInfoTypeState.STORED_INFO_TYPE_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, state_); + } + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, errors_.get(i)); + } + if (stats_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getStats()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StoredInfoTypeVersion)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StoredInfoTypeVersion other = (com.google.privacy.dlp.v2.StoredInfoTypeVersion) obj; + + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig() + .equals(other.getConfig())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getErrorsList() + .equals(other.getErrorsList())) return false; + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats() + .equals(other.getStats())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StoredInfoTypeVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Version of a StoredInfoType, including the configuration used to build it,
+   * create timestamp, and current state.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeVersion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredInfoTypeVersion) + com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredInfoTypeVersion.class, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StoredInfoTypeVersion.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getErrorsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + state_ = 0; + + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + errorsBuilder_.clear(); + } + if (statsBuilder_ == null) { + stats_ = null; + } else { + stats_ = null; + statsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeVersion getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeVersion build() { + com.google.privacy.dlp.v2.StoredInfoTypeVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeVersion buildPartial() { + com.google.privacy.dlp.v2.StoredInfoTypeVersion result = new com.google.privacy.dlp.v2.StoredInfoTypeVersion(this); + int from_bitField0_ = bitField0_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.state_ = state_; + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + if (statsBuilder_ == null) { + result.stats_ = stats_; + } else { + result.stats_ = statsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StoredInfoTypeVersion) { + return mergeFrom((com.google.privacy.dlp.v2.StoredInfoTypeVersion)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StoredInfoTypeVersion other) { + if (other == com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance()) return this; + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000001); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getErrorsFieldBuilder() : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + if (other.hasStats()) { + mergeStats(other.getStats()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StoredInfoTypeVersion parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StoredInfoTypeVersion) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> configBuilder_; + /** + *
+     * StoredInfoType configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + *
+     * StoredInfoType configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + * @return The config. + */ + public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + *
+     * StoredInfoType configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + */ + public Builder setConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * StoredInfoType configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + */ + public Builder setConfig( + com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * StoredInfoType configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + */ + public Builder mergeConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.privacy.dlp.v2.StoredInfoTypeConfig.newBuilder(config_).mergeFrom(value).buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * StoredInfoType configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + *
+     * StoredInfoType configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + *
+     * StoredInfoType configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null ? + com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; + } + } + /** + *
+     * StoredInfoType configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder>( + getConfig(), + getParentForChildren(), + isClean()); + config_ = null; + } + return configBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Create timestamp of the version. Read-only, determined by the system
+     * when the version is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Create timestamp of the version. Read-only, determined by the system
+     * when the version is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Create timestamp of the version. Read-only, determined by the system
+     * when the version is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Create timestamp of the version. Read-only, determined by the system
+     * when the version is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Create timestamp of the version. Read-only, determined by the system
+     * when the version is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Create timestamp of the version. Read-only, determined by the system
+     * when the version is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Create timestamp of the version. Read-only, determined by the system
+     * when the version is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Create timestamp of the version. Read-only, determined by the system
+     * when the version is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Create timestamp of the version. Read-only, determined by the system
+     * when the version is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private int state_ = 0; + /** + *
+     * Stored info type version state. Read-only, updated by the system
+     * during dictionary creation.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * Stored info type version state. Read-only, updated by the system
+     * during dictionary creation.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * Stored info type version state. Read-only, updated by the system
+     * during dictionary creation.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; + * @return The state. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeState getState() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.StoredInfoTypeState result = com.google.privacy.dlp.v2.StoredInfoTypeState.valueOf(state_); + return result == null ? com.google.privacy.dlp.v2.StoredInfoTypeState.UNRECOGNIZED : result; + } + /** + *
+     * Stored info type version state. Read-only, updated by the system
+     * during dictionary creation.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.privacy.dlp.v2.StoredInfoTypeState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Stored info type version state. Read-only, updated by the system
+     * during dictionary creation.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.util.List errors_ = + java.util.Collections.emptyList(); + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errors_ = new java.util.ArrayList(errors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> errorsBuilder_; + + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public com.google.privacy.dlp.v2.Error getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public Builder setErrors( + int index, com.google.privacy.dlp.v2.Error value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public Builder setErrors( + int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public Builder addErrors(com.google.privacy.dlp.v2.Error value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public Builder addErrors( + int index, com.google.privacy.dlp.v2.Error value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public Builder addErrors( + com.google.privacy.dlp.v2.Error.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public Builder addErrors( + int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public Builder addAllErrors( + java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public com.google.privacy.dlp.v2.Error.Builder getErrorsBuilder( + int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( + int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public java.util.List + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder() { + return getErrorsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Error.getDefaultInstance()); + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder( + int index) { + return getErrorsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Error.getDefaultInstance()); + } + /** + *
+     * Errors that occurred when creating this storedInfoType version, or
+     * anomalies detected in the storedInfoType data that render it unusable. Only
+     * the five most recent errors will be displayed, with the most recent error
+     * appearing first.
+     * For example, some of the data for stored custom dictionaries is put in
+     * the user's Cloud Storage bucket, and if this data is modified or
+     * deleted by the user or another system, the dictionary becomes invalid.
+     * If any errors occur, fix the problem indicated by the error message and
+     * use the UpdateStoredInfoType API method to create another version of the
+     * storedInfoType to continue using it, reusing the same `config` if it was
+     * not the source of the error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + public java.util.List + getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder>( + errors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + private com.google.privacy.dlp.v2.StoredInfoTypeStats stats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeStats, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder, com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder> statsBuilder_; + /** + *
+     * Statistics about this storedInfoType version.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return statsBuilder_ != null || stats_ != null; + } + /** + *
+     * Statistics about this storedInfoType version.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + * @return The stats. + */ + public com.google.privacy.dlp.v2.StoredInfoTypeStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance() : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + *
+     * Statistics about this storedInfoType version.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + */ + public Builder setStats(com.google.privacy.dlp.v2.StoredInfoTypeStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + onChanged(); + } else { + statsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Statistics about this storedInfoType version.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + */ + public Builder setStats( + com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + onChanged(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Statistics about this storedInfoType version.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + */ + public Builder mergeStats(com.google.privacy.dlp.v2.StoredInfoTypeStats value) { + if (statsBuilder_ == null) { + if (stats_ != null) { + stats_ = + com.google.privacy.dlp.v2.StoredInfoTypeStats.newBuilder(stats_).mergeFrom(value).buildPartial(); + } else { + stats_ = value; + } + onChanged(); + } else { + statsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Statistics about this storedInfoType version.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + */ + public Builder clearStats() { + if (statsBuilder_ == null) { + stats_ = null; + onChanged(); + } else { + stats_ = null; + statsBuilder_ = null; + } + + return this; + } + /** + *
+     * Statistics about this storedInfoType version.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder getStatsBuilder() { + + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + *
+     * Statistics about this storedInfoType version.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null ? + com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance() : stats_; + } + } + /** + *
+     * Statistics about this storedInfoType version.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeStats, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder, com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeStats, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder, com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder>( + getStats(), + getParentForChildren(), + isClean()); + stats_ = null; + } + return statsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredInfoTypeVersion) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredInfoTypeVersion) + private static final com.google.privacy.dlp.v2.StoredInfoTypeVersion DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredInfoTypeVersion(); + } + + public static com.google.privacy.dlp.v2.StoredInfoTypeVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StoredInfoTypeVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StoredInfoTypeVersion(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java new file mode 100644 index 000000000000..adfc4e48c357 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java @@ -0,0 +1,208 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface StoredInfoTypeVersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredInfoTypeVersion) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * StoredInfoType configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + *
+   * StoredInfoType configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + * @return The config. + */ + com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig(); + /** + *
+   * StoredInfoType configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; + */ + com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder(); + + /** + *
+   * Create timestamp of the version. Read-only, determined by the system
+   * when the version is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Create timestamp of the version. Read-only, determined by the system
+   * when the version is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Create timestamp of the version. Read-only, determined by the system
+   * when the version is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Stored info type version state. Read-only, updated by the system
+   * during dictionary creation.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * Stored info type version state. Read-only, updated by the system
+   * during dictionary creation.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; + * @return The state. + */ + com.google.privacy.dlp.v2.StoredInfoTypeState getState(); + + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + java.util.List + getErrorsList(); + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + com.google.privacy.dlp.v2.Error getErrors(int index); + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + int getErrorsCount(); + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + java.util.List + getErrorsOrBuilderList(); + /** + *
+   * Errors that occurred when creating this storedInfoType version, or
+   * anomalies detected in the storedInfoType data that render it unusable. Only
+   * the five most recent errors will be displayed, with the most recent error
+   * appearing first.
+   * For example, some of the data for stored custom dictionaries is put in
+   * the user's Cloud Storage bucket, and if this data is modified or
+   * deleted by the user or another system, the dictionary becomes invalid.
+   * If any errors occur, fix the problem indicated by the error message and
+   * use the UpdateStoredInfoType API method to create another version of the
+   * storedInfoType to continue using it, reusing the same `config` if it was
+   * not the source of the error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Error errors = 4; + */ + com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( + int index); + + /** + *
+   * Statistics about this storedInfoType version.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + * @return Whether the stats field is set. + */ + boolean hasStats(); + /** + *
+   * Statistics about this storedInfoType version.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + * @return The stats. + */ + com.google.privacy.dlp.v2.StoredInfoTypeStats getStats(); + /** + *
+   * Statistics about this storedInfoType version.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; + */ + com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder getStatsOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredType.java new file mode 100644 index 000000000000..53b531e6352f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredType.java @@ -0,0 +1,857 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A reference to a StoredInfoType to use with scanning.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredType} + */ +public final class StoredType extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredType) + StoredTypeOrBuilder { +private static final long serialVersionUID = 0L; + // Use StoredType.newBuilder() to construct. + private StoredType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StoredType() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StoredType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StoredType( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredType.class, com.google.privacy.dlp.v2.StoredType.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Resource name of the requested `StoredInfoType`, for example
+   * `organizations/433245324/storedInfoTypes/432452342` or
+   * `projects/project-id/storedInfoTypes/432452342`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Resource name of the requested `StoredInfoType`, for example
+   * `organizations/433245324/storedInfoTypes/432452342` or
+   * `projects/project-id/storedInfoTypes/432452342`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Timestamp indicating when the version of the `StoredInfoType` used for
+   * inspection was created. Output-only field, populated by the system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Timestamp indicating when the version of the `StoredInfoType` used for
+   * inspection was created. Output-only field, populated by the system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Timestamp indicating when the version of the `StoredInfoType` used for
+   * inspection was created. Output-only field, populated by the system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCreateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.StoredType)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StoredType other = (com.google.privacy.dlp.v2.StoredType) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StoredType parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredType parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StoredType parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredType parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredType parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StoredType parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StoredType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StoredType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A reference to a StoredInfoType to use with scanning.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StoredType} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredType) + com.google.privacy.dlp.v2.StoredTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StoredType.class, com.google.privacy.dlp.v2.StoredType.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StoredType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredType getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredType build() { + com.google.privacy.dlp.v2.StoredType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredType buildPartial() { + com.google.privacy.dlp.v2.StoredType result = new com.google.privacy.dlp.v2.StoredType(this); + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StoredType) { + return mergeFrom((com.google.privacy.dlp.v2.StoredType)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StoredType other) { + if (other == com.google.privacy.dlp.v2.StoredType.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StoredType parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StoredType) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Resource name of the requested `StoredInfoType`, for example
+     * `organizations/433245324/storedInfoTypes/432452342` or
+     * `projects/project-id/storedInfoTypes/432452342`.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Resource name of the requested `StoredInfoType`, for example
+     * `organizations/433245324/storedInfoTypes/432452342` or
+     * `projects/project-id/storedInfoTypes/432452342`.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Resource name of the requested `StoredInfoType`, for example
+     * `organizations/433245324/storedInfoTypes/432452342` or
+     * `projects/project-id/storedInfoTypes/432452342`.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Resource name of the requested `StoredInfoType`, for example
+     * `organizations/433245324/storedInfoTypes/432452342` or
+     * `projects/project-id/storedInfoTypes/432452342`.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Resource name of the requested `StoredInfoType`, for example
+     * `organizations/433245324/storedInfoTypes/432452342` or
+     * `projects/project-id/storedInfoTypes/432452342`.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Timestamp indicating when the version of the `StoredInfoType` used for
+     * inspection was created. Output-only field, populated by the system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Timestamp indicating when the version of the `StoredInfoType` used for
+     * inspection was created. Output-only field, populated by the system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp indicating when the version of the `StoredInfoType` used for
+     * inspection was created. Output-only field, populated by the system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp indicating when the version of the `StoredInfoType` used for
+     * inspection was created. Output-only field, populated by the system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp indicating when the version of the `StoredInfoType` used for
+     * inspection was created. Output-only field, populated by the system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp indicating when the version of the `StoredInfoType` used for
+     * inspection was created. Output-only field, populated by the system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp indicating when the version of the `StoredInfoType` used for
+     * inspection was created. Output-only field, populated by the system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp indicating when the version of the `StoredInfoType` used for
+     * inspection was created. Output-only field, populated by the system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Timestamp indicating when the version of the `StoredInfoType` used for
+     * inspection was created. Output-only field, populated by the system.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredType) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredType) + private static final com.google.privacy.dlp.v2.StoredType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredType(); + } + + public static com.google.privacy.dlp.v2.StoredType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StoredType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StoredType(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.StoredType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredTypeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredTypeOrBuilder.java new file mode 100644 index 000000000000..c72c5d388d95 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredTypeOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface StoredTypeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredType) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Resource name of the requested `StoredInfoType`, for example
+   * `organizations/433245324/storedInfoTypes/432452342` or
+   * `projects/project-id/storedInfoTypes/432452342`.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Resource name of the requested `StoredInfoType`, for example
+   * `organizations/433245324/storedInfoTypes/432452342` or
+   * `projects/project-id/storedInfoTypes/432452342`.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Timestamp indicating when the version of the `StoredInfoType` used for
+   * inspection was created. Output-only field, populated by the system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Timestamp indicating when the version of the `StoredInfoType` used for
+   * inspection was created. Output-only field, populated by the system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Timestamp indicating when the version of the `StoredInfoType` used for
+   * inspection was created. Output-only field, populated by the system.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java new file mode 100644 index 000000000000..587dc47a2a33 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java @@ -0,0 +1,2231 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Structured content to inspect. Up to 50,000 `Value`s per request allowed. See
+ * https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table
+ * to learn more.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Table} + */ +public final class Table extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Table) + TableOrBuilder { +private static final long serialVersionUID = 0L; + // Use Table.newBuilder() to construct. + private Table(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Table() { + headers_ = java.util.Collections.emptyList(); + rows_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Table(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Table( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + headers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + headers_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + rows_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + rows_.add( + input.readMessage(com.google.privacy.dlp.v2.Table.Row.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + headers_ = java.util.Collections.unmodifiableList(headers_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Table.class, com.google.privacy.dlp.v2.Table.Builder.class); + } + + public interface RowOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Table.Row) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + java.util.List + getValuesList(); + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + com.google.privacy.dlp.v2.Value getValues(int index); + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + int getValuesCount(); + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + java.util.List + getValuesOrBuilderList(); + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getValuesOrBuilder( + int index); + } + /** + *
+   * Values of the row.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Table.Row} + */ + public static final class Row extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Table.Row) + RowOrBuilder { + private static final long serialVersionUID = 0L; + // Use Row.newBuilder() to construct. + private Row(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Row() { + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Row(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Row( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add( + input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Table.Row.class, com.google.privacy.dlp.v2.Table.Row.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private java.util.List values_; + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + @java.lang.Override + public java.util.List getValuesList() { + return values_; + } + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + @java.lang.Override + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + @java.lang.Override + public int getValuesCount() { + return values_.size(); + } + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getValues(int index) { + return values_.get(index); + } + /** + *
+     * Individual cells.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getValuesOrBuilder( + int index) { + return values_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(1, values_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, values_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Table.Row)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Table.Row other = (com.google.privacy.dlp.v2.Table.Row) obj; + + if (!getValuesList() + .equals(other.getValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Table.Row parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Table.Row parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table.Row parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Table.Row parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table.Row parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Table.Row parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table.Row parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Table.Row parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table.Row parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Table.Row parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table.Row parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Table.Row parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Table.Row prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Values of the row.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Table.Row} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Table.Row) + com.google.privacy.dlp.v2.Table.RowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Table.Row.class, com.google.privacy.dlp.v2.Table.Row.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Table.Row.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Table.Row getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Table.Row.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Table.Row build() { + com.google.privacy.dlp.v2.Table.Row result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Table.Row buildPartial() { + com.google.privacy.dlp.v2.Table.Row result = new com.google.privacy.dlp.v2.Table.Row(this); + int from_bitField0_ = bitField0_; + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Table.Row) { + return mergeFrom((com.google.privacy.dlp.v2.Table.Row)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Table.Row other) { + if (other == com.google.privacy.dlp.v2.Table.Row.getDefaultInstance()) return this; + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Table.Row parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Table.Row) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> valuesBuilder_; + + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public com.google.privacy.dlp.v2.Value getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public Builder setValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public Builder setValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public Builder addValues(com.google.privacy.dlp.v2.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public Builder addValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public Builder addValues( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public Builder addValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+       * Individual cells.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value values = 1; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + values_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Table.Row) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Table.Row) + private static final com.google.privacy.dlp.v2.Table.Row DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Table.Row(); + } + + public static com.google.privacy.dlp.v2.Table.Row getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Row parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Row(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Table.Row getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int HEADERS_FIELD_NUMBER = 1; + private java.util.List headers_; + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + @java.lang.Override + public java.util.List getHeadersList() { + return headers_; + } + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + @java.lang.Override + public java.util.List + getHeadersOrBuilderList() { + return headers_; + } + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + @java.lang.Override + public int getHeadersCount() { + return headers_.size(); + } + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getHeaders(int index) { + return headers_.get(index); + } + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getHeadersOrBuilder( + int index) { + return headers_.get(index); + } + + public static final int ROWS_FIELD_NUMBER = 2; + private java.util.List rows_; + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + @java.lang.Override + public java.util.List getRowsList() { + return rows_; + } + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + @java.lang.Override + public java.util.List + getRowsOrBuilderList() { + return rows_; + } + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + @java.lang.Override + public int getRowsCount() { + return rows_.size(); + } + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Table.Row getRows(int index) { + return rows_.get(index); + } + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Table.RowOrBuilder getRowsOrBuilder( + int index) { + return rows_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < headers_.size(); i++) { + output.writeMessage(1, headers_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(2, rows_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < headers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, headers_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rows_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Table)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Table other = (com.google.privacy.dlp.v2.Table) obj; + + if (!getHeadersList() + .equals(other.getHeadersList())) return false; + if (!getRowsList() + .equals(other.getRowsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getHeadersCount() > 0) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getHeadersList().hashCode(); + } + if (getRowsCount() > 0) { + hash = (37 * hash) + ROWS_FIELD_NUMBER; + hash = (53 * hash) + getRowsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Table parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Table parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Table parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Table parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Table parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Table parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Table parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Table parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Table prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Structured content to inspect. Up to 50,000 `Value`s per request allowed. See
+   * https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table
+   * to learn more.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Table} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Table) + com.google.privacy.dlp.v2.TableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Table.class, com.google.privacy.dlp.v2.Table.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Table.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getHeadersFieldBuilder(); + getRowsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + headersBuilder_.clear(); + } + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + rowsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Table getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Table.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Table build() { + com.google.privacy.dlp.v2.Table result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Table buildPartial() { + com.google.privacy.dlp.v2.Table result = new com.google.privacy.dlp.v2.Table(this); + int from_bitField0_ = bitField0_; + if (headersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + headers_ = java.util.Collections.unmodifiableList(headers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.headers_ = headers_; + } else { + result.headers_ = headersBuilder_.build(); + } + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rows_ = rows_; + } else { + result.rows_ = rowsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Table) { + return mergeFrom((com.google.privacy.dlp.v2.Table)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Table other) { + if (other == com.google.privacy.dlp.v2.Table.getDefaultInstance()) return this; + if (headersBuilder_ == null) { + if (!other.headers_.isEmpty()) { + if (headers_.isEmpty()) { + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHeadersIsMutable(); + headers_.addAll(other.headers_); + } + onChanged(); + } + } else { + if (!other.headers_.isEmpty()) { + if (headersBuilder_.isEmpty()) { + headersBuilder_.dispose(); + headersBuilder_ = null; + headers_ = other.headers_; + bitField0_ = (bitField0_ & ~0x00000001); + headersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getHeadersFieldBuilder() : null; + } else { + headersBuilder_.addAllMessages(other.headers_); + } + } + } + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + rowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRowsFieldBuilder() : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Table parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Table) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List headers_ = + java.util.Collections.emptyList(); + private void ensureHeadersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + headers_ = new java.util.ArrayList(headers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> headersBuilder_; + + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public java.util.List getHeadersList() { + if (headersBuilder_ == null) { + return java.util.Collections.unmodifiableList(headers_); + } else { + return headersBuilder_.getMessageList(); + } + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public int getHeadersCount() { + if (headersBuilder_ == null) { + return headers_.size(); + } else { + return headersBuilder_.getCount(); + } + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public com.google.privacy.dlp.v2.FieldId getHeaders(int index) { + if (headersBuilder_ == null) { + return headers_.get(index); + } else { + return headersBuilder_.getMessage(index); + } + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public Builder setHeaders( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.set(index, value); + onChanged(); + } else { + headersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public Builder setHeaders( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.set(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public Builder addHeaders(com.google.privacy.dlp.v2.FieldId value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(value); + onChanged(); + } else { + headersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public Builder addHeaders( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (headersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadersIsMutable(); + headers_.add(index, value); + onChanged(); + } else { + headersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public Builder addHeaders( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public Builder addHeaders( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(index, builderForValue.build()); + onChanged(); + } else { + headersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public Builder addAllHeaders( + java.lang.Iterable values) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, headers_); + onChanged(); + } else { + headersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public Builder clearHeaders() { + if (headersBuilder_ == null) { + headers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + headersBuilder_.clear(); + } + return this; + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public Builder removeHeaders(int index) { + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.remove(index); + onChanged(); + } else { + headersBuilder_.remove(index); + } + return this; + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getHeadersBuilder( + int index) { + return getHeadersFieldBuilder().getBuilder(index); + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getHeadersOrBuilder( + int index) { + if (headersBuilder_ == null) { + return headers_.get(index); } else { + return headersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public java.util.List + getHeadersOrBuilderList() { + if (headersBuilder_ != null) { + return headersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headers_); + } + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addHeadersBuilder() { + return getHeadersFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addHeadersBuilder( + int index) { + return getHeadersFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * Headers of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + public java.util.List + getHeadersBuilderList() { + return getHeadersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getHeadersFieldBuilder() { + if (headersBuilder_ == null) { + headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + headers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + headers_ = null; + } + return headersBuilder_; + } + + private java.util.List rows_ = + java.util.Collections.emptyList(); + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Table.Row, com.google.privacy.dlp.v2.Table.Row.Builder, com.google.privacy.dlp.v2.Table.RowOrBuilder> rowsBuilder_; + + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public com.google.privacy.dlp.v2.Table.Row getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public Builder setRows( + int index, com.google.privacy.dlp.v2.Table.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + } else { + rowsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public Builder setRows( + int index, com.google.privacy.dlp.v2.Table.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public Builder addRows(com.google.privacy.dlp.v2.Table.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public Builder addRows( + int index, com.google.privacy.dlp.v2.Table.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public Builder addRows( + com.google.privacy.dlp.v2.Table.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public Builder addRows( + int index, com.google.privacy.dlp.v2.Table.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rows_); + onChanged(); + } else { + rowsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rowsBuilder_.clear(); + } + return this; + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); + onChanged(); + } else { + rowsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public com.google.privacy.dlp.v2.Table.Row.Builder getRowsBuilder( + int index) { + return getRowsFieldBuilder().getBuilder(index); + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public com.google.privacy.dlp.v2.Table.RowOrBuilder getRowsOrBuilder( + int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); } else { + return rowsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); + } + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public com.google.privacy.dlp.v2.Table.Row.Builder addRowsBuilder() { + return getRowsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Table.Row.getDefaultInstance()); + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public com.google.privacy.dlp.v2.Table.Row.Builder addRowsBuilder( + int index) { + return getRowsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Table.Row.getDefaultInstance()); + } + /** + *
+     * Rows of the table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + public java.util.List + getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Table.Row, com.google.privacy.dlp.v2.Table.Row.Builder, com.google.privacy.dlp.v2.Table.RowOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Table.Row, com.google.privacy.dlp.v2.Table.Row.Builder, com.google.privacy.dlp.v2.Table.RowOrBuilder>( + rows_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + rows_ = null; + } + return rowsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Table) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Table) + private static final com.google.privacy.dlp.v2.Table DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Table(); + } + + public static com.google.privacy.dlp.v2.Table getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser
() { + @java.lang.Override + public Table parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Table(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser
parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Table getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfile.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfile.java new file mode 100644 index 000000000000..4e88222445b9 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfile.java @@ -0,0 +1,5572 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * The profile for a scanned table.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TableDataProfile} + */ +public final class TableDataProfile extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TableDataProfile) + TableDataProfileOrBuilder { +private static final long serialVersionUID = 0L; + // Use TableDataProfile.newBuilder() to construct. + private TableDataProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TableDataProfile() { + name_ = ""; + projectDataProfile_ = ""; + datasetProjectId_ = ""; + datasetLocation_ = ""; + datasetId_ = ""; + tableId_ = ""; + fullResource_ = ""; + state_ = 0; + predictedInfoTypes_ = java.util.Collections.emptyList(); + otherInfoTypes_ = java.util.Collections.emptyList(); + encryptionStatus_ = 0; + resourceVisibility_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TableDataProfile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TableDataProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + projectDataProfile_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + fullResource_ = s; + break; + } + case 42: { + com.google.privacy.dlp.v2.SensitivityScore.Builder subBuilder = null; + if (sensitivityScore_ != null) { + subBuilder = sensitivityScore_.toBuilder(); + } + sensitivityScore_ = input.readMessage(com.google.privacy.dlp.v2.SensitivityScore.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sensitivityScore_); + sensitivityScore_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.privacy.dlp.v2.DataRiskLevel.Builder subBuilder = null; + if (dataRiskLevel_ != null) { + subBuilder = dataRiskLevel_.toBuilder(); + } + dataRiskLevel_ = input.readMessage(com.google.privacy.dlp.v2.DataRiskLevel.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataRiskLevel_); + dataRiskLevel_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder subBuilder = null; + if (configSnapshot_ != null) { + subBuilder = configSnapshot_.toBuilder(); + } + configSnapshot_ = input.readMessage(com.google.privacy.dlp.v2.DataProfileConfigSnapshot.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configSnapshot_); + configSnapshot_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastModifiedTime_ != null) { + subBuilder = lastModifiedTime_.toBuilder(); + } + lastModifiedTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastModifiedTime_); + lastModifiedTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (expirationTime_ != null) { + subBuilder = expirationTime_.toBuilder(); + } + expirationTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(expirationTime_); + expirationTime_ = subBuilder.buildPartial(); + } + + break; + } + case 80: { + + scannedColumnCount_ = input.readInt64(); + break; + } + case 88: { + + failedColumnCount_ = input.readInt64(); + break; + } + case 96: { + + tableSizeBytes_ = input.readInt64(); + break; + } + case 104: { + + rowCount_ = input.readInt64(); + break; + } + case 112: { + int rawValue = input.readEnum(); + + encryptionStatus_ = rawValue; + break; + } + case 120: { + int rawValue = input.readEnum(); + + resourceVisibility_ = rawValue; + break; + } + case 130: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (profileLastGenerated_ != null) { + subBuilder = profileLastGenerated_.toBuilder(); + } + profileLastGenerated_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profileLastGenerated_); + profileLastGenerated_ = subBuilder.buildPartial(); + } + + break; + } + case 138: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + resourceLabels_ = com.google.protobuf.MapField.newMapField( + ResourceLabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + resourceLabels__ = input.readMessage( + ResourceLabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + resourceLabels_.getMutableMap().put( + resourceLabels__.getKey(), resourceLabels__.getValue()); + break; + } + case 170: { + com.google.privacy.dlp.v2.ProfileStatus.Builder subBuilder = null; + if (profileStatus_ != null) { + subBuilder = profileStatus_.toBuilder(); + } + profileStatus_ = input.readMessage(com.google.privacy.dlp.v2.ProfileStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(profileStatus_); + profileStatus_ = subBuilder.buildPartial(); + } + + break; + } + case 176: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 186: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 194: { + java.lang.String s = input.readStringRequireUtf8(); + + datasetProjectId_ = s; + break; + } + case 202: { + java.lang.String s = input.readStringRequireUtf8(); + + datasetId_ = s; + break; + } + case 210: { + java.lang.String s = input.readStringRequireUtf8(); + + tableId_ = s; + break; + } + case 218: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + predictedInfoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + predictedInfoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.InfoTypeSummary.parser(), extensionRegistry)); + break; + } + case 226: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + otherInfoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + otherInfoTypes_.add( + input.readMessage(com.google.privacy.dlp.v2.OtherInfoTypeSummary.parser(), extensionRegistry)); + break; + } + case 234: { + java.lang.String s = input.readStringRequireUtf8(); + + datasetLocation_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + predictedInfoTypes_ = java.util.Collections.unmodifiableList(predictedInfoTypes_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + otherInfoTypes_ = java.util.Collections.unmodifiableList(otherInfoTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 17: + return internalGetResourceLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TableDataProfile.class, com.google.privacy.dlp.v2.TableDataProfile.Builder.class); + } + + /** + *
+   * Possible states of a profile. New items may be added.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.TableDataProfile.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The profile is currently running. Once a profile has finished it will
+     * transition to DONE.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * The profile is no longer generating.
+     * If profile_status.status.code is 0, the profile succeeded, otherwise, it
+     * failed.
+     * 
+ * + * DONE = 2; + */ + DONE(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The profile is currently running. Once a profile has finished it will
+     * transition to DONE.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * The profile is no longer generating.
+     * If profile_status.status.code is 0, the profile succeeded, otherwise, it
+     * failed.
+     * 
+ * + * DONE = 2; + */ + public static final int DONE_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return DONE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.TableDataProfile.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TableDataProfile.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The name of the profile.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The name of the profile.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_DATA_PROFILE_FIELD_NUMBER = 2; + private volatile java.lang.Object projectDataProfile_; + /** + *
+   * The resource name to the project data profile for this table.
+   * 
+ * + * string project_data_profile = 2; + * @return The projectDataProfile. + */ + @java.lang.Override + public java.lang.String getProjectDataProfile() { + java.lang.Object ref = projectDataProfile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectDataProfile_ = s; + return s; + } + } + /** + *
+   * The resource name to the project data profile for this table.
+   * 
+ * + * string project_data_profile = 2; + * @return The bytes for projectDataProfile. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectDataProfileBytes() { + java.lang.Object ref = projectDataProfile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectDataProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_PROJECT_ID_FIELD_NUMBER = 24; + private volatile java.lang.Object datasetProjectId_; + /** + *
+   * The GCP project ID that owns the BigQuery dataset.
+   * 
+ * + * string dataset_project_id = 24; + * @return The datasetProjectId. + */ + @java.lang.Override + public java.lang.String getDatasetProjectId() { + java.lang.Object ref = datasetProjectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetProjectId_ = s; + return s; + } + } + /** + *
+   * The GCP project ID that owns the BigQuery dataset.
+   * 
+ * + * string dataset_project_id = 24; + * @return The bytes for datasetProjectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatasetProjectIdBytes() { + java.lang.Object ref = datasetProjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + datasetProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_LOCATION_FIELD_NUMBER = 29; + private volatile java.lang.Object datasetLocation_; + /** + *
+   * The BigQuery location where the dataset's data is stored.
+   * See https://cloud.google.com/bigquery/docs/locations for supported
+   * locations.
+   * 
+ * + * string dataset_location = 29; + * @return The datasetLocation. + */ + @java.lang.Override + public java.lang.String getDatasetLocation() { + java.lang.Object ref = datasetLocation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetLocation_ = s; + return s; + } + } + /** + *
+   * The BigQuery location where the dataset's data is stored.
+   * See https://cloud.google.com/bigquery/docs/locations for supported
+   * locations.
+   * 
+ * + * string dataset_location = 29; + * @return The bytes for datasetLocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatasetLocationBytes() { + java.lang.Object ref = datasetLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + datasetLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_ID_FIELD_NUMBER = 25; + private volatile java.lang.Object datasetId_; + /** + *
+   * The BigQuery dataset ID.
+   * 
+ * + * string dataset_id = 25; + * @return The datasetId. + */ + @java.lang.Override + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } + } + /** + *
+   * The BigQuery dataset ID.
+   * 
+ * + * string dataset_id = 25; + * @return The bytes for datasetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_ID_FIELD_NUMBER = 26; + private volatile java.lang.Object tableId_; + /** + *
+   * The BigQuery table ID.
+   * 
+ * + * string table_id = 26; + * @return The tableId. + */ + @java.lang.Override + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } + } + /** + *
+   * The BigQuery table ID.
+   * 
+ * + * string table_id = 26; + * @return The bytes for tableId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_RESOURCE_FIELD_NUMBER = 3; + private volatile java.lang.Object fullResource_; + /** + *
+   * The resource name of the table.
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * 
+ * + * string full_resource = 3; + * @return The fullResource. + */ + @java.lang.Override + public java.lang.String getFullResource() { + java.lang.Object ref = fullResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResource_ = s; + return s; + } + } + /** + *
+   * The resource name of the table.
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * 
+ * + * string full_resource = 3; + * @return The bytes for fullResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullResourceBytes() { + java.lang.Object ref = fullResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROFILE_STATUS_FIELD_NUMBER = 21; + private com.google.privacy.dlp.v2.ProfileStatus profileStatus_; + /** + *
+   * Success or error status from the most recent profile generation attempt.
+   * May be empty if the profile is still being generated.
+   * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + * @return Whether the profileStatus field is set. + */ + @java.lang.Override + public boolean hasProfileStatus() { + return profileStatus_ != null; + } + /** + *
+   * Success or error status from the most recent profile generation attempt.
+   * May be empty if the profile is still being generated.
+   * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + * @return The profileStatus. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ProfileStatus getProfileStatus() { + return profileStatus_ == null ? com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance() : profileStatus_; + } + /** + *
+   * Success or error status from the most recent profile generation attempt.
+   * May be empty if the profile is still being generated.
+   * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ProfileStatusOrBuilder getProfileStatusOrBuilder() { + return getProfileStatus(); + } + + public static final int STATE_FIELD_NUMBER = 22; + private int state_; + /** + *
+   * State of a profile.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile.State state = 22; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+   * State of a profile.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile.State state = 22; + * @return The state. + */ + @java.lang.Override public com.google.privacy.dlp.v2.TableDataProfile.State getState() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TableDataProfile.State result = com.google.privacy.dlp.v2.TableDataProfile.State.valueOf(state_); + return result == null ? com.google.privacy.dlp.v2.TableDataProfile.State.UNRECOGNIZED : result; + } + + public static final int SENSITIVITY_SCORE_FIELD_NUMBER = 5; + private com.google.privacy.dlp.v2.SensitivityScore sensitivityScore_; + /** + *
+   * The sensitivity score of this table.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + * @return Whether the sensitivityScore field is set. + */ + @java.lang.Override + public boolean hasSensitivityScore() { + return sensitivityScore_ != null; + } + /** + *
+   * The sensitivity score of this table.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + * @return The sensitivityScore. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.SensitivityScore getSensitivityScore() { + return sensitivityScore_ == null ? com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance() : sensitivityScore_; + } + /** + *
+   * The sensitivity score of this table.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.SensitivityScoreOrBuilder getSensitivityScoreOrBuilder() { + return getSensitivityScore(); + } + + public static final int DATA_RISK_LEVEL_FIELD_NUMBER = 6; + private com.google.privacy.dlp.v2.DataRiskLevel dataRiskLevel_; + /** + *
+   * The data risk level of this table.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + * @return Whether the dataRiskLevel field is set. + */ + @java.lang.Override + public boolean hasDataRiskLevel() { + return dataRiskLevel_ != null; + } + /** + *
+   * The data risk level of this table.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + * @return The dataRiskLevel. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataRiskLevel getDataRiskLevel() { + return dataRiskLevel_ == null ? com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance() : dataRiskLevel_; + } + /** + *
+   * The data risk level of this table.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataRiskLevelOrBuilder getDataRiskLevelOrBuilder() { + return getDataRiskLevel(); + } + + public static final int PREDICTED_INFO_TYPES_FIELD_NUMBER = 27; + private java.util.List predictedInfoTypes_; + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + @java.lang.Override + public java.util.List getPredictedInfoTypesList() { + return predictedInfoTypes_; + } + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + @java.lang.Override + public java.util.List + getPredictedInfoTypesOrBuilderList() { + return predictedInfoTypes_; + } + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + @java.lang.Override + public int getPredictedInfoTypesCount() { + return predictedInfoTypes_.size(); + } + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeSummary getPredictedInfoTypes(int index) { + return predictedInfoTypes_.get(index); + } + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder getPredictedInfoTypesOrBuilder( + int index) { + return predictedInfoTypes_.get(index); + } + + public static final int OTHER_INFO_TYPES_FIELD_NUMBER = 28; + private java.util.List otherInfoTypes_; + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + @java.lang.Override + public java.util.List getOtherInfoTypesList() { + return otherInfoTypes_; + } + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + @java.lang.Override + public java.util.List + getOtherInfoTypesOrBuilderList() { + return otherInfoTypes_; + } + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + @java.lang.Override + public int getOtherInfoTypesCount() { + return otherInfoTypes_.size(); + } + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.OtherInfoTypeSummary getOtherInfoTypes(int index) { + return otherInfoTypes_.get(index); + } + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder getOtherInfoTypesOrBuilder( + int index) { + return otherInfoTypes_.get(index); + } + + public static final int CONFIG_SNAPSHOT_FIELD_NUMBER = 7; + private com.google.privacy.dlp.v2.DataProfileConfigSnapshot configSnapshot_; + /** + *
+   * The snapshot of the configurations used to generate the profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + * @return Whether the configSnapshot field is set. + */ + @java.lang.Override + public boolean hasConfigSnapshot() { + return configSnapshot_ != null; + } + /** + *
+   * The snapshot of the configurations used to generate the profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + * @return The configSnapshot. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileConfigSnapshot getConfigSnapshot() { + return configSnapshot_ == null ? com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance() : configSnapshot_; + } + /** + *
+   * The snapshot of the configurations used to generate the profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder getConfigSnapshotOrBuilder() { + return getConfigSnapshot(); + } + + public static final int LAST_MODIFIED_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp lastModifiedTime_; + /** + *
+   * The time when this table was last modified
+   * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + * @return Whether the lastModifiedTime field is set. + */ + @java.lang.Override + public boolean hasLastModifiedTime() { + return lastModifiedTime_ != null; + } + /** + *
+   * The time when this table was last modified
+   * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + * @return The lastModifiedTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastModifiedTime() { + return lastModifiedTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastModifiedTime_; + } + /** + *
+   * The time when this table was last modified
+   * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastModifiedTimeOrBuilder() { + return getLastModifiedTime(); + } + + public static final int EXPIRATION_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp expirationTime_; + /** + *
+   * Optional. The time when this table expires.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + * @return Whether the expirationTime field is set. + */ + @java.lang.Override + public boolean hasExpirationTime() { + return expirationTime_ != null; + } + /** + *
+   * Optional. The time when this table expires.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + * @return The expirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpirationTime() { + return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } + /** + *
+   * Optional. The time when this table expires.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + return getExpirationTime(); + } + + public static final int SCANNED_COLUMN_COUNT_FIELD_NUMBER = 10; + private long scannedColumnCount_; + /** + *
+   * The number of columns profiled in the table.
+   * 
+ * + * int64 scanned_column_count = 10; + * @return The scannedColumnCount. + */ + @java.lang.Override + public long getScannedColumnCount() { + return scannedColumnCount_; + } + + public static final int FAILED_COLUMN_COUNT_FIELD_NUMBER = 11; + private long failedColumnCount_; + /** + *
+   * The number of columns skipped in the table because of an error.
+   * 
+ * + * int64 failed_column_count = 11; + * @return The failedColumnCount. + */ + @java.lang.Override + public long getFailedColumnCount() { + return failedColumnCount_; + } + + public static final int TABLE_SIZE_BYTES_FIELD_NUMBER = 12; + private long tableSizeBytes_; + /** + *
+   * The size of the table when the profile was generated.
+   * 
+ * + * int64 table_size_bytes = 12; + * @return The tableSizeBytes. + */ + @java.lang.Override + public long getTableSizeBytes() { + return tableSizeBytes_; + } + + public static final int ROW_COUNT_FIELD_NUMBER = 13; + private long rowCount_; + /** + *
+   * Number of rows in the table when the profile was generated.
+   * 
+ * + * int64 row_count = 13; + * @return The rowCount. + */ + @java.lang.Override + public long getRowCount() { + return rowCount_; + } + + public static final int ENCRYPTION_STATUS_FIELD_NUMBER = 14; + private int encryptionStatus_; + /** + *
+   * How the table is encrypted.
+   * 
+ * + * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; + * @return The enum numeric value on the wire for encryptionStatus. + */ + @java.lang.Override public int getEncryptionStatusValue() { + return encryptionStatus_; + } + /** + *
+   * How the table is encrypted.
+   * 
+ * + * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; + * @return The encryptionStatus. + */ + @java.lang.Override public com.google.privacy.dlp.v2.EncryptionStatus getEncryptionStatus() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.EncryptionStatus result = com.google.privacy.dlp.v2.EncryptionStatus.valueOf(encryptionStatus_); + return result == null ? com.google.privacy.dlp.v2.EncryptionStatus.UNRECOGNIZED : result; + } + + public static final int RESOURCE_VISIBILITY_FIELD_NUMBER = 15; + private int resourceVisibility_; + /** + *
+   * How broadly a resource has been shared.
+   * 
+ * + * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; + * @return The enum numeric value on the wire for resourceVisibility. + */ + @java.lang.Override public int getResourceVisibilityValue() { + return resourceVisibility_; + } + /** + *
+   * How broadly a resource has been shared.
+   * 
+ * + * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; + * @return The resourceVisibility. + */ + @java.lang.Override public com.google.privacy.dlp.v2.ResourceVisibility getResourceVisibility() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.ResourceVisibility result = com.google.privacy.dlp.v2.ResourceVisibility.valueOf(resourceVisibility_); + return result == null ? com.google.privacy.dlp.v2.ResourceVisibility.UNRECOGNIZED : result; + } + + public static final int PROFILE_LAST_GENERATED_FIELD_NUMBER = 16; + private com.google.protobuf.Timestamp profileLastGenerated_; + /** + *
+   * The last time the profile was generated.
+   * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + * @return Whether the profileLastGenerated field is set. + */ + @java.lang.Override + public boolean hasProfileLastGenerated() { + return profileLastGenerated_ != null; + } + /** + *
+   * The last time the profile was generated.
+   * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + * @return The profileLastGenerated. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getProfileLastGenerated() { + return profileLastGenerated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : profileLastGenerated_; + } + /** + *
+   * The last time the profile was generated.
+   * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getProfileLastGeneratedOrBuilder() { + return getProfileLastGenerated(); + } + + public static final int RESOURCE_LABELS_FIELD_NUMBER = 17; + private static final class ResourceLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> resourceLabels_; + private com.google.protobuf.MapField + internalGetResourceLabels() { + if (resourceLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourceLabelsDefaultEntryHolder.defaultEntry); + } + return resourceLabels_; + } + + public int getResourceLabelsCount() { + return internalGetResourceLabels().getMap().size(); + } + /** + *
+   * The labels applied to the resource at the time the profile was generated.
+   * 
+ * + * map<string, string> resource_labels = 17; + */ + + @java.lang.Override + public boolean containsResourceLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResourceLabels().getMap().containsKey(key); + } + /** + * Use {@link #getResourceLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResourceLabels() { + return getResourceLabelsMap(); + } + /** + *
+   * The labels applied to the resource at the time the profile was generated.
+   * 
+ * + * map<string, string> resource_labels = 17; + */ + @java.lang.Override + + public java.util.Map getResourceLabelsMap() { + return internalGetResourceLabels().getMap(); + } + /** + *
+   * The labels applied to the resource at the time the profile was generated.
+   * 
+ * + * map<string, string> resource_labels = 17; + */ + @java.lang.Override + + public java.lang.String getResourceLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResourceLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The labels applied to the resource at the time the profile was generated.
+   * 
+ * + * map<string, string> resource_labels = 17; + */ + @java.lang.Override + + public java.lang.String getResourceLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResourceLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 23; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The time at which the table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * The time at which the table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The time at which the table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectDataProfile_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectDataProfile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fullResource_); + } + if (sensitivityScore_ != null) { + output.writeMessage(5, getSensitivityScore()); + } + if (dataRiskLevel_ != null) { + output.writeMessage(6, getDataRiskLevel()); + } + if (configSnapshot_ != null) { + output.writeMessage(7, getConfigSnapshot()); + } + if (lastModifiedTime_ != null) { + output.writeMessage(8, getLastModifiedTime()); + } + if (expirationTime_ != null) { + output.writeMessage(9, getExpirationTime()); + } + if (scannedColumnCount_ != 0L) { + output.writeInt64(10, scannedColumnCount_); + } + if (failedColumnCount_ != 0L) { + output.writeInt64(11, failedColumnCount_); + } + if (tableSizeBytes_ != 0L) { + output.writeInt64(12, tableSizeBytes_); + } + if (rowCount_ != 0L) { + output.writeInt64(13, rowCount_); + } + if (encryptionStatus_ != com.google.privacy.dlp.v2.EncryptionStatus.ENCRYPTION_STATUS_UNSPECIFIED.getNumber()) { + output.writeEnum(14, encryptionStatus_); + } + if (resourceVisibility_ != com.google.privacy.dlp.v2.ResourceVisibility.RESOURCE_VISIBILITY_UNSPECIFIED.getNumber()) { + output.writeEnum(15, resourceVisibility_); + } + if (profileLastGenerated_ != null) { + output.writeMessage(16, getProfileLastGenerated()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetResourceLabels(), + ResourceLabelsDefaultEntryHolder.defaultEntry, + 17); + if (profileStatus_ != null) { + output.writeMessage(21, getProfileStatus()); + } + if (state_ != com.google.privacy.dlp.v2.TableDataProfile.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(22, state_); + } + if (createTime_ != null) { + output.writeMessage(23, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetProjectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, datasetProjectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, tableId_); + } + for (int i = 0; i < predictedInfoTypes_.size(); i++) { + output.writeMessage(27, predictedInfoTypes_.get(i)); + } + for (int i = 0; i < otherInfoTypes_.size(); i++) { + output.writeMessage(28, otherInfoTypes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetLocation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 29, datasetLocation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectDataProfile_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectDataProfile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, fullResource_); + } + if (sensitivityScore_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getSensitivityScore()); + } + if (dataRiskLevel_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getDataRiskLevel()); + } + if (configSnapshot_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getConfigSnapshot()); + } + if (lastModifiedTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getLastModifiedTime()); + } + if (expirationTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getExpirationTime()); + } + if (scannedColumnCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, scannedColumnCount_); + } + if (failedColumnCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(11, failedColumnCount_); + } + if (tableSizeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, tableSizeBytes_); + } + if (rowCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(13, rowCount_); + } + if (encryptionStatus_ != com.google.privacy.dlp.v2.EncryptionStatus.ENCRYPTION_STATUS_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(14, encryptionStatus_); + } + if (resourceVisibility_ != com.google.privacy.dlp.v2.ResourceVisibility.RESOURCE_VISIBILITY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, resourceVisibility_); + } + if (profileLastGenerated_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getProfileLastGenerated()); + } + for (java.util.Map.Entry entry + : internalGetResourceLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + resourceLabels__ = ResourceLabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, resourceLabels__); + } + if (profileStatus_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getProfileStatus()); + } + if (state_ != com.google.privacy.dlp.v2.TableDataProfile.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(22, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetProjectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, datasetProjectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, datasetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, tableId_); + } + for (int i = 0; i < predictedInfoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(27, predictedInfoTypes_.get(i)); + } + for (int i = 0; i < otherInfoTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(28, otherInfoTypes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetLocation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, datasetLocation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TableDataProfile)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TableDataProfile other = (com.google.privacy.dlp.v2.TableDataProfile) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getProjectDataProfile() + .equals(other.getProjectDataProfile())) return false; + if (!getDatasetProjectId() + .equals(other.getDatasetProjectId())) return false; + if (!getDatasetLocation() + .equals(other.getDatasetLocation())) return false; + if (!getDatasetId() + .equals(other.getDatasetId())) return false; + if (!getTableId() + .equals(other.getTableId())) return false; + if (!getFullResource() + .equals(other.getFullResource())) return false; + if (hasProfileStatus() != other.hasProfileStatus()) return false; + if (hasProfileStatus()) { + if (!getProfileStatus() + .equals(other.getProfileStatus())) return false; + } + if (state_ != other.state_) return false; + if (hasSensitivityScore() != other.hasSensitivityScore()) return false; + if (hasSensitivityScore()) { + if (!getSensitivityScore() + .equals(other.getSensitivityScore())) return false; + } + if (hasDataRiskLevel() != other.hasDataRiskLevel()) return false; + if (hasDataRiskLevel()) { + if (!getDataRiskLevel() + .equals(other.getDataRiskLevel())) return false; + } + if (!getPredictedInfoTypesList() + .equals(other.getPredictedInfoTypesList())) return false; + if (!getOtherInfoTypesList() + .equals(other.getOtherInfoTypesList())) return false; + if (hasConfigSnapshot() != other.hasConfigSnapshot()) return false; + if (hasConfigSnapshot()) { + if (!getConfigSnapshot() + .equals(other.getConfigSnapshot())) return false; + } + if (hasLastModifiedTime() != other.hasLastModifiedTime()) return false; + if (hasLastModifiedTime()) { + if (!getLastModifiedTime() + .equals(other.getLastModifiedTime())) return false; + } + if (hasExpirationTime() != other.hasExpirationTime()) return false; + if (hasExpirationTime()) { + if (!getExpirationTime() + .equals(other.getExpirationTime())) return false; + } + if (getScannedColumnCount() + != other.getScannedColumnCount()) return false; + if (getFailedColumnCount() + != other.getFailedColumnCount()) return false; + if (getTableSizeBytes() + != other.getTableSizeBytes()) return false; + if (getRowCount() + != other.getRowCount()) return false; + if (encryptionStatus_ != other.encryptionStatus_) return false; + if (resourceVisibility_ != other.resourceVisibility_) return false; + if (hasProfileLastGenerated() != other.hasProfileLastGenerated()) return false; + if (hasProfileLastGenerated()) { + if (!getProfileLastGenerated() + .equals(other.getProfileLastGenerated())) return false; + } + if (!internalGetResourceLabels().equals( + other.internalGetResourceLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PROJECT_DATA_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProjectDataProfile().hashCode(); + hash = (37 * hash) + DATASET_PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetProjectId().hashCode(); + hash = (37 * hash) + DATASET_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getDatasetLocation().hashCode(); + hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatasetId().hashCode(); + hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTableId().hashCode(); + hash = (37 * hash) + FULL_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getFullResource().hashCode(); + if (hasProfileStatus()) { + hash = (37 * hash) + PROFILE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getProfileStatus().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasSensitivityScore()) { + hash = (37 * hash) + SENSITIVITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + getSensitivityScore().hashCode(); + } + if (hasDataRiskLevel()) { + hash = (37 * hash) + DATA_RISK_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getDataRiskLevel().hashCode(); + } + if (getPredictedInfoTypesCount() > 0) { + hash = (37 * hash) + PREDICTED_INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getPredictedInfoTypesList().hashCode(); + } + if (getOtherInfoTypesCount() > 0) { + hash = (37 * hash) + OTHER_INFO_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getOtherInfoTypesList().hashCode(); + } + if (hasConfigSnapshot()) { + hash = (37 * hash) + CONFIG_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getConfigSnapshot().hashCode(); + } + if (hasLastModifiedTime()) { + hash = (37 * hash) + LAST_MODIFIED_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastModifiedTime().hashCode(); + } + if (hasExpirationTime()) { + hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpirationTime().hashCode(); + } + hash = (37 * hash) + SCANNED_COLUMN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScannedColumnCount()); + hash = (37 * hash) + FAILED_COLUMN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFailedColumnCount()); + hash = (37 * hash) + TABLE_SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTableSizeBytes()); + hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRowCount()); + hash = (37 * hash) + ENCRYPTION_STATUS_FIELD_NUMBER; + hash = (53 * hash) + encryptionStatus_; + hash = (37 * hash) + RESOURCE_VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + resourceVisibility_; + if (hasProfileLastGenerated()) { + hash = (37 * hash) + PROFILE_LAST_GENERATED_FIELD_NUMBER; + hash = (53 * hash) + getProfileLastGenerated().hashCode(); + } + if (!internalGetResourceLabels().getMap().isEmpty()) { + hash = (37 * hash) + RESOURCE_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetResourceLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TableDataProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The profile for a scanned table.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TableDataProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TableDataProfile) + com.google.privacy.dlp.v2.TableDataProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 17: + return internalGetResourceLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 17: + return internalGetMutableResourceLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TableDataProfile.class, com.google.privacy.dlp.v2.TableDataProfile.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TableDataProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPredictedInfoTypesFieldBuilder(); + getOtherInfoTypesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + projectDataProfile_ = ""; + + datasetProjectId_ = ""; + + datasetLocation_ = ""; + + datasetId_ = ""; + + tableId_ = ""; + + fullResource_ = ""; + + if (profileStatusBuilder_ == null) { + profileStatus_ = null; + } else { + profileStatus_ = null; + profileStatusBuilder_ = null; + } + state_ = 0; + + if (sensitivityScoreBuilder_ == null) { + sensitivityScore_ = null; + } else { + sensitivityScore_ = null; + sensitivityScoreBuilder_ = null; + } + if (dataRiskLevelBuilder_ == null) { + dataRiskLevel_ = null; + } else { + dataRiskLevel_ = null; + dataRiskLevelBuilder_ = null; + } + if (predictedInfoTypesBuilder_ == null) { + predictedInfoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + predictedInfoTypesBuilder_.clear(); + } + if (otherInfoTypesBuilder_ == null) { + otherInfoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + otherInfoTypesBuilder_.clear(); + } + if (configSnapshotBuilder_ == null) { + configSnapshot_ = null; + } else { + configSnapshot_ = null; + configSnapshotBuilder_ = null; + } + if (lastModifiedTimeBuilder_ == null) { + lastModifiedTime_ = null; + } else { + lastModifiedTime_ = null; + lastModifiedTimeBuilder_ = null; + } + if (expirationTimeBuilder_ == null) { + expirationTime_ = null; + } else { + expirationTime_ = null; + expirationTimeBuilder_ = null; + } + scannedColumnCount_ = 0L; + + failedColumnCount_ = 0L; + + tableSizeBytes_ = 0L; + + rowCount_ = 0L; + + encryptionStatus_ = 0; + + resourceVisibility_ = 0; + + if (profileLastGeneratedBuilder_ == null) { + profileLastGenerated_ = null; + } else { + profileLastGenerated_ = null; + profileLastGeneratedBuilder_ = null; + } + internalGetMutableResourceLabels().clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableDataProfile getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableDataProfile build() { + com.google.privacy.dlp.v2.TableDataProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableDataProfile buildPartial() { + com.google.privacy.dlp.v2.TableDataProfile result = new com.google.privacy.dlp.v2.TableDataProfile(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.projectDataProfile_ = projectDataProfile_; + result.datasetProjectId_ = datasetProjectId_; + result.datasetLocation_ = datasetLocation_; + result.datasetId_ = datasetId_; + result.tableId_ = tableId_; + result.fullResource_ = fullResource_; + if (profileStatusBuilder_ == null) { + result.profileStatus_ = profileStatus_; + } else { + result.profileStatus_ = profileStatusBuilder_.build(); + } + result.state_ = state_; + if (sensitivityScoreBuilder_ == null) { + result.sensitivityScore_ = sensitivityScore_; + } else { + result.sensitivityScore_ = sensitivityScoreBuilder_.build(); + } + if (dataRiskLevelBuilder_ == null) { + result.dataRiskLevel_ = dataRiskLevel_; + } else { + result.dataRiskLevel_ = dataRiskLevelBuilder_.build(); + } + if (predictedInfoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + predictedInfoTypes_ = java.util.Collections.unmodifiableList(predictedInfoTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.predictedInfoTypes_ = predictedInfoTypes_; + } else { + result.predictedInfoTypes_ = predictedInfoTypesBuilder_.build(); + } + if (otherInfoTypesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + otherInfoTypes_ = java.util.Collections.unmodifiableList(otherInfoTypes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.otherInfoTypes_ = otherInfoTypes_; + } else { + result.otherInfoTypes_ = otherInfoTypesBuilder_.build(); + } + if (configSnapshotBuilder_ == null) { + result.configSnapshot_ = configSnapshot_; + } else { + result.configSnapshot_ = configSnapshotBuilder_.build(); + } + if (lastModifiedTimeBuilder_ == null) { + result.lastModifiedTime_ = lastModifiedTime_; + } else { + result.lastModifiedTime_ = lastModifiedTimeBuilder_.build(); + } + if (expirationTimeBuilder_ == null) { + result.expirationTime_ = expirationTime_; + } else { + result.expirationTime_ = expirationTimeBuilder_.build(); + } + result.scannedColumnCount_ = scannedColumnCount_; + result.failedColumnCount_ = failedColumnCount_; + result.tableSizeBytes_ = tableSizeBytes_; + result.rowCount_ = rowCount_; + result.encryptionStatus_ = encryptionStatus_; + result.resourceVisibility_ = resourceVisibility_; + if (profileLastGeneratedBuilder_ == null) { + result.profileLastGenerated_ = profileLastGenerated_; + } else { + result.profileLastGenerated_ = profileLastGeneratedBuilder_.build(); + } + result.resourceLabels_ = internalGetResourceLabels(); + result.resourceLabels_.makeImmutable(); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TableDataProfile) { + return mergeFrom((com.google.privacy.dlp.v2.TableDataProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TableDataProfile other) { + if (other == com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getProjectDataProfile().isEmpty()) { + projectDataProfile_ = other.projectDataProfile_; + onChanged(); + } + if (!other.getDatasetProjectId().isEmpty()) { + datasetProjectId_ = other.datasetProjectId_; + onChanged(); + } + if (!other.getDatasetLocation().isEmpty()) { + datasetLocation_ = other.datasetLocation_; + onChanged(); + } + if (!other.getDatasetId().isEmpty()) { + datasetId_ = other.datasetId_; + onChanged(); + } + if (!other.getTableId().isEmpty()) { + tableId_ = other.tableId_; + onChanged(); + } + if (!other.getFullResource().isEmpty()) { + fullResource_ = other.fullResource_; + onChanged(); + } + if (other.hasProfileStatus()) { + mergeProfileStatus(other.getProfileStatus()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasSensitivityScore()) { + mergeSensitivityScore(other.getSensitivityScore()); + } + if (other.hasDataRiskLevel()) { + mergeDataRiskLevel(other.getDataRiskLevel()); + } + if (predictedInfoTypesBuilder_ == null) { + if (!other.predictedInfoTypes_.isEmpty()) { + if (predictedInfoTypes_.isEmpty()) { + predictedInfoTypes_ = other.predictedInfoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePredictedInfoTypesIsMutable(); + predictedInfoTypes_.addAll(other.predictedInfoTypes_); + } + onChanged(); + } + } else { + if (!other.predictedInfoTypes_.isEmpty()) { + if (predictedInfoTypesBuilder_.isEmpty()) { + predictedInfoTypesBuilder_.dispose(); + predictedInfoTypesBuilder_ = null; + predictedInfoTypes_ = other.predictedInfoTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + predictedInfoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPredictedInfoTypesFieldBuilder() : null; + } else { + predictedInfoTypesBuilder_.addAllMessages(other.predictedInfoTypes_); + } + } + } + if (otherInfoTypesBuilder_ == null) { + if (!other.otherInfoTypes_.isEmpty()) { + if (otherInfoTypes_.isEmpty()) { + otherInfoTypes_ = other.otherInfoTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOtherInfoTypesIsMutable(); + otherInfoTypes_.addAll(other.otherInfoTypes_); + } + onChanged(); + } + } else { + if (!other.otherInfoTypes_.isEmpty()) { + if (otherInfoTypesBuilder_.isEmpty()) { + otherInfoTypesBuilder_.dispose(); + otherInfoTypesBuilder_ = null; + otherInfoTypes_ = other.otherInfoTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + otherInfoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOtherInfoTypesFieldBuilder() : null; + } else { + otherInfoTypesBuilder_.addAllMessages(other.otherInfoTypes_); + } + } + } + if (other.hasConfigSnapshot()) { + mergeConfigSnapshot(other.getConfigSnapshot()); + } + if (other.hasLastModifiedTime()) { + mergeLastModifiedTime(other.getLastModifiedTime()); + } + if (other.hasExpirationTime()) { + mergeExpirationTime(other.getExpirationTime()); + } + if (other.getScannedColumnCount() != 0L) { + setScannedColumnCount(other.getScannedColumnCount()); + } + if (other.getFailedColumnCount() != 0L) { + setFailedColumnCount(other.getFailedColumnCount()); + } + if (other.getTableSizeBytes() != 0L) { + setTableSizeBytes(other.getTableSizeBytes()); + } + if (other.getRowCount() != 0L) { + setRowCount(other.getRowCount()); + } + if (other.encryptionStatus_ != 0) { + setEncryptionStatusValue(other.getEncryptionStatusValue()); + } + if (other.resourceVisibility_ != 0) { + setResourceVisibilityValue(other.getResourceVisibilityValue()); + } + if (other.hasProfileLastGenerated()) { + mergeProfileLastGenerated(other.getProfileLastGenerated()); + } + internalGetMutableResourceLabels().mergeFrom( + other.internalGetResourceLabels()); + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TableDataProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TableDataProfile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The name of the profile.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the profile.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the profile.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the profile.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The name of the profile.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object projectDataProfile_ = ""; + /** + *
+     * The resource name to the project data profile for this table.
+     * 
+ * + * string project_data_profile = 2; + * @return The projectDataProfile. + */ + public java.lang.String getProjectDataProfile() { + java.lang.Object ref = projectDataProfile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectDataProfile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name to the project data profile for this table.
+     * 
+ * + * string project_data_profile = 2; + * @return The bytes for projectDataProfile. + */ + public com.google.protobuf.ByteString + getProjectDataProfileBytes() { + java.lang.Object ref = projectDataProfile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + projectDataProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name to the project data profile for this table.
+     * 
+ * + * string project_data_profile = 2; + * @param value The projectDataProfile to set. + * @return This builder for chaining. + */ + public Builder setProjectDataProfile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectDataProfile_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name to the project data profile for this table.
+     * 
+ * + * string project_data_profile = 2; + * @return This builder for chaining. + */ + public Builder clearProjectDataProfile() { + + projectDataProfile_ = getDefaultInstance().getProjectDataProfile(); + onChanged(); + return this; + } + /** + *
+     * The resource name to the project data profile for this table.
+     * 
+ * + * string project_data_profile = 2; + * @param value The bytes for projectDataProfile to set. + * @return This builder for chaining. + */ + public Builder setProjectDataProfileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectDataProfile_ = value; + onChanged(); + return this; + } + + private java.lang.Object datasetProjectId_ = ""; + /** + *
+     * The GCP project ID that owns the BigQuery dataset.
+     * 
+ * + * string dataset_project_id = 24; + * @return The datasetProjectId. + */ + public java.lang.String getDatasetProjectId() { + java.lang.Object ref = datasetProjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetProjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The GCP project ID that owns the BigQuery dataset.
+     * 
+ * + * string dataset_project_id = 24; + * @return The bytes for datasetProjectId. + */ + public com.google.protobuf.ByteString + getDatasetProjectIdBytes() { + java.lang.Object ref = datasetProjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + datasetProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The GCP project ID that owns the BigQuery dataset.
+     * 
+ * + * string dataset_project_id = 24; + * @param value The datasetProjectId to set. + * @return This builder for chaining. + */ + public Builder setDatasetProjectId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetProjectId_ = value; + onChanged(); + return this; + } + /** + *
+     * The GCP project ID that owns the BigQuery dataset.
+     * 
+ * + * string dataset_project_id = 24; + * @return This builder for chaining. + */ + public Builder clearDatasetProjectId() { + + datasetProjectId_ = getDefaultInstance().getDatasetProjectId(); + onChanged(); + return this; + } + /** + *
+     * The GCP project ID that owns the BigQuery dataset.
+     * 
+ * + * string dataset_project_id = 24; + * @param value The bytes for datasetProjectId to set. + * @return This builder for chaining. + */ + public Builder setDatasetProjectIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetProjectId_ = value; + onChanged(); + return this; + } + + private java.lang.Object datasetLocation_ = ""; + /** + *
+     * The BigQuery location where the dataset's data is stored.
+     * See https://cloud.google.com/bigquery/docs/locations for supported
+     * locations.
+     * 
+ * + * string dataset_location = 29; + * @return The datasetLocation. + */ + public java.lang.String getDatasetLocation() { + java.lang.Object ref = datasetLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The BigQuery location where the dataset's data is stored.
+     * See https://cloud.google.com/bigquery/docs/locations for supported
+     * locations.
+     * 
+ * + * string dataset_location = 29; + * @return The bytes for datasetLocation. + */ + public com.google.protobuf.ByteString + getDatasetLocationBytes() { + java.lang.Object ref = datasetLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + datasetLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The BigQuery location where the dataset's data is stored.
+     * See https://cloud.google.com/bigquery/docs/locations for supported
+     * locations.
+     * 
+ * + * string dataset_location = 29; + * @param value The datasetLocation to set. + * @return This builder for chaining. + */ + public Builder setDatasetLocation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetLocation_ = value; + onChanged(); + return this; + } + /** + *
+     * The BigQuery location where the dataset's data is stored.
+     * See https://cloud.google.com/bigquery/docs/locations for supported
+     * locations.
+     * 
+ * + * string dataset_location = 29; + * @return This builder for chaining. + */ + public Builder clearDatasetLocation() { + + datasetLocation_ = getDefaultInstance().getDatasetLocation(); + onChanged(); + return this; + } + /** + *
+     * The BigQuery location where the dataset's data is stored.
+     * See https://cloud.google.com/bigquery/docs/locations for supported
+     * locations.
+     * 
+ * + * string dataset_location = 29; + * @param value The bytes for datasetLocation to set. + * @return This builder for chaining. + */ + public Builder setDatasetLocationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetLocation_ = value; + onChanged(); + return this; + } + + private java.lang.Object datasetId_ = ""; + /** + *
+     * The BigQuery dataset ID.
+     * 
+ * + * string dataset_id = 25; + * @return The datasetId. + */ + public java.lang.String getDatasetId() { + java.lang.Object ref = datasetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datasetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The BigQuery dataset ID.
+     * 
+ * + * string dataset_id = 25; + * @return The bytes for datasetId. + */ + public com.google.protobuf.ByteString + getDatasetIdBytes() { + java.lang.Object ref = datasetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + datasetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The BigQuery dataset ID.
+     * 
+ * + * string dataset_id = 25; + * @param value The datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datasetId_ = value; + onChanged(); + return this; + } + /** + *
+     * The BigQuery dataset ID.
+     * 
+ * + * string dataset_id = 25; + * @return This builder for chaining. + */ + public Builder clearDatasetId() { + + datasetId_ = getDefaultInstance().getDatasetId(); + onChanged(); + return this; + } + /** + *
+     * The BigQuery dataset ID.
+     * 
+ * + * string dataset_id = 25; + * @param value The bytes for datasetId to set. + * @return This builder for chaining. + */ + public Builder setDatasetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datasetId_ = value; + onChanged(); + return this; + } + + private java.lang.Object tableId_ = ""; + /** + *
+     * The BigQuery table ID.
+     * 
+ * + * string table_id = 26; + * @return The tableId. + */ + public java.lang.String getTableId() { + java.lang.Object ref = tableId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tableId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The BigQuery table ID.
+     * 
+ * + * string table_id = 26; + * @return The bytes for tableId. + */ + public com.google.protobuf.ByteString + getTableIdBytes() { + java.lang.Object ref = tableId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The BigQuery table ID.
+     * 
+ * + * string table_id = 26; + * @param value The tableId to set. + * @return This builder for chaining. + */ + public Builder setTableId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tableId_ = value; + onChanged(); + return this; + } + /** + *
+     * The BigQuery table ID.
+     * 
+ * + * string table_id = 26; + * @return This builder for chaining. + */ + public Builder clearTableId() { + + tableId_ = getDefaultInstance().getTableId(); + onChanged(); + return this; + } + /** + *
+     * The BigQuery table ID.
+     * 
+ * + * string table_id = 26; + * @param value The bytes for tableId to set. + * @return This builder for chaining. + */ + public Builder setTableIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tableId_ = value; + onChanged(); + return this; + } + + private java.lang.Object fullResource_ = ""; + /** + *
+     * The resource name of the table.
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource = 3; + * @return The fullResource. + */ + public java.lang.String getFullResource() { + java.lang.Object ref = fullResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the table.
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource = 3; + * @return The bytes for fullResource. + */ + public com.google.protobuf.ByteString + getFullResourceBytes() { + java.lang.Object ref = fullResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the table.
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource = 3; + * @param value The fullResource to set. + * @return This builder for chaining. + */ + public Builder setFullResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullResource_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the table.
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource = 3; + * @return This builder for chaining. + */ + public Builder clearFullResource() { + + fullResource_ = getDefaultInstance().getFullResource(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the table.
+     * https://cloud.google.com/apis/design/resource_names#full_resource_name
+     * 
+ * + * string full_resource = 3; + * @param value The bytes for fullResource to set. + * @return This builder for chaining. + */ + public Builder setFullResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullResource_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.ProfileStatus profileStatus_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ProfileStatus, com.google.privacy.dlp.v2.ProfileStatus.Builder, com.google.privacy.dlp.v2.ProfileStatusOrBuilder> profileStatusBuilder_; + /** + *
+     * Success or error status from the most recent profile generation attempt.
+     * May be empty if the profile is still being generated.
+     * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + * @return Whether the profileStatus field is set. + */ + public boolean hasProfileStatus() { + return profileStatusBuilder_ != null || profileStatus_ != null; + } + /** + *
+     * Success or error status from the most recent profile generation attempt.
+     * May be empty if the profile is still being generated.
+     * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + * @return The profileStatus. + */ + public com.google.privacy.dlp.v2.ProfileStatus getProfileStatus() { + if (profileStatusBuilder_ == null) { + return profileStatus_ == null ? com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance() : profileStatus_; + } else { + return profileStatusBuilder_.getMessage(); + } + } + /** + *
+     * Success or error status from the most recent profile generation attempt.
+     * May be empty if the profile is still being generated.
+     * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + */ + public Builder setProfileStatus(com.google.privacy.dlp.v2.ProfileStatus value) { + if (profileStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profileStatus_ = value; + onChanged(); + } else { + profileStatusBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Success or error status from the most recent profile generation attempt.
+     * May be empty if the profile is still being generated.
+     * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + */ + public Builder setProfileStatus( + com.google.privacy.dlp.v2.ProfileStatus.Builder builderForValue) { + if (profileStatusBuilder_ == null) { + profileStatus_ = builderForValue.build(); + onChanged(); + } else { + profileStatusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Success or error status from the most recent profile generation attempt.
+     * May be empty if the profile is still being generated.
+     * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + */ + public Builder mergeProfileStatus(com.google.privacy.dlp.v2.ProfileStatus value) { + if (profileStatusBuilder_ == null) { + if (profileStatus_ != null) { + profileStatus_ = + com.google.privacy.dlp.v2.ProfileStatus.newBuilder(profileStatus_).mergeFrom(value).buildPartial(); + } else { + profileStatus_ = value; + } + onChanged(); + } else { + profileStatusBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Success or error status from the most recent profile generation attempt.
+     * May be empty if the profile is still being generated.
+     * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + */ + public Builder clearProfileStatus() { + if (profileStatusBuilder_ == null) { + profileStatus_ = null; + onChanged(); + } else { + profileStatus_ = null; + profileStatusBuilder_ = null; + } + + return this; + } + /** + *
+     * Success or error status from the most recent profile generation attempt.
+     * May be empty if the profile is still being generated.
+     * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + */ + public com.google.privacy.dlp.v2.ProfileStatus.Builder getProfileStatusBuilder() { + + onChanged(); + return getProfileStatusFieldBuilder().getBuilder(); + } + /** + *
+     * Success or error status from the most recent profile generation attempt.
+     * May be empty if the profile is still being generated.
+     * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + */ + public com.google.privacy.dlp.v2.ProfileStatusOrBuilder getProfileStatusOrBuilder() { + if (profileStatusBuilder_ != null) { + return profileStatusBuilder_.getMessageOrBuilder(); + } else { + return profileStatus_ == null ? + com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance() : profileStatus_; + } + } + /** + *
+     * Success or error status from the most recent profile generation attempt.
+     * May be empty if the profile is still being generated.
+     * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ProfileStatus, com.google.privacy.dlp.v2.ProfileStatus.Builder, com.google.privacy.dlp.v2.ProfileStatusOrBuilder> + getProfileStatusFieldBuilder() { + if (profileStatusBuilder_ == null) { + profileStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ProfileStatus, com.google.privacy.dlp.v2.ProfileStatus.Builder, com.google.privacy.dlp.v2.ProfileStatusOrBuilder>( + getProfileStatus(), + getParentForChildren(), + isClean()); + profileStatus_ = null; + } + return profileStatusBuilder_; + } + + private int state_ = 0; + /** + *
+     * State of a profile.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile.State state = 22; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override public int getStateValue() { + return state_; + } + /** + *
+     * State of a profile.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile.State state = 22; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * State of a profile.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile.State state = 22; + * @return The state. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TableDataProfile.State getState() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TableDataProfile.State result = com.google.privacy.dlp.v2.TableDataProfile.State.valueOf(state_); + return result == null ? com.google.privacy.dlp.v2.TableDataProfile.State.UNRECOGNIZED : result; + } + /** + *
+     * State of a profile.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile.State state = 22; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.privacy.dlp.v2.TableDataProfile.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * State of a profile.
+     * 
+ * + * .google.privacy.dlp.v2.TableDataProfile.State state = 22; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.SensitivityScore sensitivityScore_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.SensitivityScore, com.google.privacy.dlp.v2.SensitivityScore.Builder, com.google.privacy.dlp.v2.SensitivityScoreOrBuilder> sensitivityScoreBuilder_; + /** + *
+     * The sensitivity score of this table.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + * @return Whether the sensitivityScore field is set. + */ + public boolean hasSensitivityScore() { + return sensitivityScoreBuilder_ != null || sensitivityScore_ != null; + } + /** + *
+     * The sensitivity score of this table.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + * @return The sensitivityScore. + */ + public com.google.privacy.dlp.v2.SensitivityScore getSensitivityScore() { + if (sensitivityScoreBuilder_ == null) { + return sensitivityScore_ == null ? com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance() : sensitivityScore_; + } else { + return sensitivityScoreBuilder_.getMessage(); + } + } + /** + *
+     * The sensitivity score of this table.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + */ + public Builder setSensitivityScore(com.google.privacy.dlp.v2.SensitivityScore value) { + if (sensitivityScoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sensitivityScore_ = value; + onChanged(); + } else { + sensitivityScoreBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The sensitivity score of this table.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + */ + public Builder setSensitivityScore( + com.google.privacy.dlp.v2.SensitivityScore.Builder builderForValue) { + if (sensitivityScoreBuilder_ == null) { + sensitivityScore_ = builderForValue.build(); + onChanged(); + } else { + sensitivityScoreBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The sensitivity score of this table.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + */ + public Builder mergeSensitivityScore(com.google.privacy.dlp.v2.SensitivityScore value) { + if (sensitivityScoreBuilder_ == null) { + if (sensitivityScore_ != null) { + sensitivityScore_ = + com.google.privacy.dlp.v2.SensitivityScore.newBuilder(sensitivityScore_).mergeFrom(value).buildPartial(); + } else { + sensitivityScore_ = value; + } + onChanged(); + } else { + sensitivityScoreBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The sensitivity score of this table.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + */ + public Builder clearSensitivityScore() { + if (sensitivityScoreBuilder_ == null) { + sensitivityScore_ = null; + onChanged(); + } else { + sensitivityScore_ = null; + sensitivityScoreBuilder_ = null; + } + + return this; + } + /** + *
+     * The sensitivity score of this table.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + */ + public com.google.privacy.dlp.v2.SensitivityScore.Builder getSensitivityScoreBuilder() { + + onChanged(); + return getSensitivityScoreFieldBuilder().getBuilder(); + } + /** + *
+     * The sensitivity score of this table.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + */ + public com.google.privacy.dlp.v2.SensitivityScoreOrBuilder getSensitivityScoreOrBuilder() { + if (sensitivityScoreBuilder_ != null) { + return sensitivityScoreBuilder_.getMessageOrBuilder(); + } else { + return sensitivityScore_ == null ? + com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance() : sensitivityScore_; + } + } + /** + *
+     * The sensitivity score of this table.
+     * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.SensitivityScore, com.google.privacy.dlp.v2.SensitivityScore.Builder, com.google.privacy.dlp.v2.SensitivityScoreOrBuilder> + getSensitivityScoreFieldBuilder() { + if (sensitivityScoreBuilder_ == null) { + sensitivityScoreBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.SensitivityScore, com.google.privacy.dlp.v2.SensitivityScore.Builder, com.google.privacy.dlp.v2.SensitivityScoreOrBuilder>( + getSensitivityScore(), + getParentForChildren(), + isClean()); + sensitivityScore_ = null; + } + return sensitivityScoreBuilder_; + } + + private com.google.privacy.dlp.v2.DataRiskLevel dataRiskLevel_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataRiskLevel, com.google.privacy.dlp.v2.DataRiskLevel.Builder, com.google.privacy.dlp.v2.DataRiskLevelOrBuilder> dataRiskLevelBuilder_; + /** + *
+     * The data risk level of this table.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + * @return Whether the dataRiskLevel field is set. + */ + public boolean hasDataRiskLevel() { + return dataRiskLevelBuilder_ != null || dataRiskLevel_ != null; + } + /** + *
+     * The data risk level of this table.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + * @return The dataRiskLevel. + */ + public com.google.privacy.dlp.v2.DataRiskLevel getDataRiskLevel() { + if (dataRiskLevelBuilder_ == null) { + return dataRiskLevel_ == null ? com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance() : dataRiskLevel_; + } else { + return dataRiskLevelBuilder_.getMessage(); + } + } + /** + *
+     * The data risk level of this table.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + */ + public Builder setDataRiskLevel(com.google.privacy.dlp.v2.DataRiskLevel value) { + if (dataRiskLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataRiskLevel_ = value; + onChanged(); + } else { + dataRiskLevelBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The data risk level of this table.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + */ + public Builder setDataRiskLevel( + com.google.privacy.dlp.v2.DataRiskLevel.Builder builderForValue) { + if (dataRiskLevelBuilder_ == null) { + dataRiskLevel_ = builderForValue.build(); + onChanged(); + } else { + dataRiskLevelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The data risk level of this table.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + */ + public Builder mergeDataRiskLevel(com.google.privacy.dlp.v2.DataRiskLevel value) { + if (dataRiskLevelBuilder_ == null) { + if (dataRiskLevel_ != null) { + dataRiskLevel_ = + com.google.privacy.dlp.v2.DataRiskLevel.newBuilder(dataRiskLevel_).mergeFrom(value).buildPartial(); + } else { + dataRiskLevel_ = value; + } + onChanged(); + } else { + dataRiskLevelBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The data risk level of this table.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + */ + public Builder clearDataRiskLevel() { + if (dataRiskLevelBuilder_ == null) { + dataRiskLevel_ = null; + onChanged(); + } else { + dataRiskLevel_ = null; + dataRiskLevelBuilder_ = null; + } + + return this; + } + /** + *
+     * The data risk level of this table.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + */ + public com.google.privacy.dlp.v2.DataRiskLevel.Builder getDataRiskLevelBuilder() { + + onChanged(); + return getDataRiskLevelFieldBuilder().getBuilder(); + } + /** + *
+     * The data risk level of this table.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + */ + public com.google.privacy.dlp.v2.DataRiskLevelOrBuilder getDataRiskLevelOrBuilder() { + if (dataRiskLevelBuilder_ != null) { + return dataRiskLevelBuilder_.getMessageOrBuilder(); + } else { + return dataRiskLevel_ == null ? + com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance() : dataRiskLevel_; + } + } + /** + *
+     * The data risk level of this table.
+     * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataRiskLevel, com.google.privacy.dlp.v2.DataRiskLevel.Builder, com.google.privacy.dlp.v2.DataRiskLevelOrBuilder> + getDataRiskLevelFieldBuilder() { + if (dataRiskLevelBuilder_ == null) { + dataRiskLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataRiskLevel, com.google.privacy.dlp.v2.DataRiskLevel.Builder, com.google.privacy.dlp.v2.DataRiskLevelOrBuilder>( + getDataRiskLevel(), + getParentForChildren(), + isClean()); + dataRiskLevel_ = null; + } + return dataRiskLevelBuilder_; + } + + private java.util.List predictedInfoTypes_ = + java.util.Collections.emptyList(); + private void ensurePredictedInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + predictedInfoTypes_ = new java.util.ArrayList(predictedInfoTypes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeSummary, com.google.privacy.dlp.v2.InfoTypeSummary.Builder, com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder> predictedInfoTypesBuilder_; + + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public java.util.List getPredictedInfoTypesList() { + if (predictedInfoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(predictedInfoTypes_); + } else { + return predictedInfoTypesBuilder_.getMessageList(); + } + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public int getPredictedInfoTypesCount() { + if (predictedInfoTypesBuilder_ == null) { + return predictedInfoTypes_.size(); + } else { + return predictedInfoTypesBuilder_.getCount(); + } + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public com.google.privacy.dlp.v2.InfoTypeSummary getPredictedInfoTypes(int index) { + if (predictedInfoTypesBuilder_ == null) { + return predictedInfoTypes_.get(index); + } else { + return predictedInfoTypesBuilder_.getMessage(index); + } + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public Builder setPredictedInfoTypes( + int index, com.google.privacy.dlp.v2.InfoTypeSummary value) { + if (predictedInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePredictedInfoTypesIsMutable(); + predictedInfoTypes_.set(index, value); + onChanged(); + } else { + predictedInfoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public Builder setPredictedInfoTypes( + int index, com.google.privacy.dlp.v2.InfoTypeSummary.Builder builderForValue) { + if (predictedInfoTypesBuilder_ == null) { + ensurePredictedInfoTypesIsMutable(); + predictedInfoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + predictedInfoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public Builder addPredictedInfoTypes(com.google.privacy.dlp.v2.InfoTypeSummary value) { + if (predictedInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePredictedInfoTypesIsMutable(); + predictedInfoTypes_.add(value); + onChanged(); + } else { + predictedInfoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public Builder addPredictedInfoTypes( + int index, com.google.privacy.dlp.v2.InfoTypeSummary value) { + if (predictedInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePredictedInfoTypesIsMutable(); + predictedInfoTypes_.add(index, value); + onChanged(); + } else { + predictedInfoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public Builder addPredictedInfoTypes( + com.google.privacy.dlp.v2.InfoTypeSummary.Builder builderForValue) { + if (predictedInfoTypesBuilder_ == null) { + ensurePredictedInfoTypesIsMutable(); + predictedInfoTypes_.add(builderForValue.build()); + onChanged(); + } else { + predictedInfoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public Builder addPredictedInfoTypes( + int index, com.google.privacy.dlp.v2.InfoTypeSummary.Builder builderForValue) { + if (predictedInfoTypesBuilder_ == null) { + ensurePredictedInfoTypesIsMutable(); + predictedInfoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + predictedInfoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public Builder addAllPredictedInfoTypes( + java.lang.Iterable values) { + if (predictedInfoTypesBuilder_ == null) { + ensurePredictedInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, predictedInfoTypes_); + onChanged(); + } else { + predictedInfoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public Builder clearPredictedInfoTypes() { + if (predictedInfoTypesBuilder_ == null) { + predictedInfoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + predictedInfoTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public Builder removePredictedInfoTypes(int index) { + if (predictedInfoTypesBuilder_ == null) { + ensurePredictedInfoTypesIsMutable(); + predictedInfoTypes_.remove(index); + onChanged(); + } else { + predictedInfoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public com.google.privacy.dlp.v2.InfoTypeSummary.Builder getPredictedInfoTypesBuilder( + int index) { + return getPredictedInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder getPredictedInfoTypesOrBuilder( + int index) { + if (predictedInfoTypesBuilder_ == null) { + return predictedInfoTypes_.get(index); } else { + return predictedInfoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public java.util.List + getPredictedInfoTypesOrBuilderList() { + if (predictedInfoTypesBuilder_ != null) { + return predictedInfoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(predictedInfoTypes_); + } + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public com.google.privacy.dlp.v2.InfoTypeSummary.Builder addPredictedInfoTypesBuilder() { + return getPredictedInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.InfoTypeSummary.getDefaultInstance()); + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public com.google.privacy.dlp.v2.InfoTypeSummary.Builder addPredictedInfoTypesBuilder( + int index) { + return getPredictedInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.InfoTypeSummary.getDefaultInstance()); + } + /** + *
+     * The infoTypes predicted from this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + public java.util.List + getPredictedInfoTypesBuilderList() { + return getPredictedInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeSummary, com.google.privacy.dlp.v2.InfoTypeSummary.Builder, com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder> + getPredictedInfoTypesFieldBuilder() { + if (predictedInfoTypesBuilder_ == null) { + predictedInfoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoTypeSummary, com.google.privacy.dlp.v2.InfoTypeSummary.Builder, com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder>( + predictedInfoTypes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + predictedInfoTypes_ = null; + } + return predictedInfoTypesBuilder_; + } + + private java.util.List otherInfoTypes_ = + java.util.Collections.emptyList(); + private void ensureOtherInfoTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + otherInfoTypes_ = new java.util.ArrayList(otherInfoTypes_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.OtherInfoTypeSummary, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder, com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder> otherInfoTypesBuilder_; + + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public java.util.List getOtherInfoTypesList() { + if (otherInfoTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(otherInfoTypes_); + } else { + return otherInfoTypesBuilder_.getMessageList(); + } + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public int getOtherInfoTypesCount() { + if (otherInfoTypesBuilder_ == null) { + return otherInfoTypes_.size(); + } else { + return otherInfoTypesBuilder_.getCount(); + } + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public com.google.privacy.dlp.v2.OtherInfoTypeSummary getOtherInfoTypes(int index) { + if (otherInfoTypesBuilder_ == null) { + return otherInfoTypes_.get(index); + } else { + return otherInfoTypesBuilder_.getMessage(index); + } + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public Builder setOtherInfoTypes( + int index, com.google.privacy.dlp.v2.OtherInfoTypeSummary value) { + if (otherInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOtherInfoTypesIsMutable(); + otherInfoTypes_.set(index, value); + onChanged(); + } else { + otherInfoTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public Builder setOtherInfoTypes( + int index, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder builderForValue) { + if (otherInfoTypesBuilder_ == null) { + ensureOtherInfoTypesIsMutable(); + otherInfoTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + otherInfoTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public Builder addOtherInfoTypes(com.google.privacy.dlp.v2.OtherInfoTypeSummary value) { + if (otherInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOtherInfoTypesIsMutable(); + otherInfoTypes_.add(value); + onChanged(); + } else { + otherInfoTypesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public Builder addOtherInfoTypes( + int index, com.google.privacy.dlp.v2.OtherInfoTypeSummary value) { + if (otherInfoTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOtherInfoTypesIsMutable(); + otherInfoTypes_.add(index, value); + onChanged(); + } else { + otherInfoTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public Builder addOtherInfoTypes( + com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder builderForValue) { + if (otherInfoTypesBuilder_ == null) { + ensureOtherInfoTypesIsMutable(); + otherInfoTypes_.add(builderForValue.build()); + onChanged(); + } else { + otherInfoTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public Builder addOtherInfoTypes( + int index, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder builderForValue) { + if (otherInfoTypesBuilder_ == null) { + ensureOtherInfoTypesIsMutable(); + otherInfoTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + otherInfoTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public Builder addAllOtherInfoTypes( + java.lang.Iterable values) { + if (otherInfoTypesBuilder_ == null) { + ensureOtherInfoTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, otherInfoTypes_); + onChanged(); + } else { + otherInfoTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public Builder clearOtherInfoTypes() { + if (otherInfoTypesBuilder_ == null) { + otherInfoTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + otherInfoTypesBuilder_.clear(); + } + return this; + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public Builder removeOtherInfoTypes(int index) { + if (otherInfoTypesBuilder_ == null) { + ensureOtherInfoTypesIsMutable(); + otherInfoTypes_.remove(index); + onChanged(); + } else { + otherInfoTypesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder getOtherInfoTypesBuilder( + int index) { + return getOtherInfoTypesFieldBuilder().getBuilder(index); + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder getOtherInfoTypesOrBuilder( + int index) { + if (otherInfoTypesBuilder_ == null) { + return otherInfoTypes_.get(index); } else { + return otherInfoTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public java.util.List + getOtherInfoTypesOrBuilderList() { + if (otherInfoTypesBuilder_ != null) { + return otherInfoTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(otherInfoTypes_); + } + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder addOtherInfoTypesBuilder() { + return getOtherInfoTypesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.OtherInfoTypeSummary.getDefaultInstance()); + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder addOtherInfoTypesBuilder( + int index) { + return getOtherInfoTypesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.OtherInfoTypeSummary.getDefaultInstance()); + } + /** + *
+     * Other infoTypes found in this table's data.
+     * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + public java.util.List + getOtherInfoTypesBuilderList() { + return getOtherInfoTypesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.OtherInfoTypeSummary, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder, com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder> + getOtherInfoTypesFieldBuilder() { + if (otherInfoTypesBuilder_ == null) { + otherInfoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.OtherInfoTypeSummary, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder, com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder>( + otherInfoTypes_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + otherInfoTypes_ = null; + } + return otherInfoTypesBuilder_; + } + + private com.google.privacy.dlp.v2.DataProfileConfigSnapshot configSnapshot_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileConfigSnapshot, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder, com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder> configSnapshotBuilder_; + /** + *
+     * The snapshot of the configurations used to generate the profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + * @return Whether the configSnapshot field is set. + */ + public boolean hasConfigSnapshot() { + return configSnapshotBuilder_ != null || configSnapshot_ != null; + } + /** + *
+     * The snapshot of the configurations used to generate the profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + * @return The configSnapshot. + */ + public com.google.privacy.dlp.v2.DataProfileConfigSnapshot getConfigSnapshot() { + if (configSnapshotBuilder_ == null) { + return configSnapshot_ == null ? com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance() : configSnapshot_; + } else { + return configSnapshotBuilder_.getMessage(); + } + } + /** + *
+     * The snapshot of the configurations used to generate the profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + */ + public Builder setConfigSnapshot(com.google.privacy.dlp.v2.DataProfileConfigSnapshot value) { + if (configSnapshotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configSnapshot_ = value; + onChanged(); + } else { + configSnapshotBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The snapshot of the configurations used to generate the profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + */ + public Builder setConfigSnapshot( + com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder builderForValue) { + if (configSnapshotBuilder_ == null) { + configSnapshot_ = builderForValue.build(); + onChanged(); + } else { + configSnapshotBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The snapshot of the configurations used to generate the profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + */ + public Builder mergeConfigSnapshot(com.google.privacy.dlp.v2.DataProfileConfigSnapshot value) { + if (configSnapshotBuilder_ == null) { + if (configSnapshot_ != null) { + configSnapshot_ = + com.google.privacy.dlp.v2.DataProfileConfigSnapshot.newBuilder(configSnapshot_).mergeFrom(value).buildPartial(); + } else { + configSnapshot_ = value; + } + onChanged(); + } else { + configSnapshotBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The snapshot of the configurations used to generate the profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + */ + public Builder clearConfigSnapshot() { + if (configSnapshotBuilder_ == null) { + configSnapshot_ = null; + onChanged(); + } else { + configSnapshot_ = null; + configSnapshotBuilder_ = null; + } + + return this; + } + /** + *
+     * The snapshot of the configurations used to generate the profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + */ + public com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder getConfigSnapshotBuilder() { + + onChanged(); + return getConfigSnapshotFieldBuilder().getBuilder(); + } + /** + *
+     * The snapshot of the configurations used to generate the profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + */ + public com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder getConfigSnapshotOrBuilder() { + if (configSnapshotBuilder_ != null) { + return configSnapshotBuilder_.getMessageOrBuilder(); + } else { + return configSnapshot_ == null ? + com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance() : configSnapshot_; + } + } + /** + *
+     * The snapshot of the configurations used to generate the profile.
+     * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileConfigSnapshot, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder, com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder> + getConfigSnapshotFieldBuilder() { + if (configSnapshotBuilder_ == null) { + configSnapshotBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DataProfileConfigSnapshot, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder, com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder>( + getConfigSnapshot(), + getParentForChildren(), + isClean()); + configSnapshot_ = null; + } + return configSnapshotBuilder_; + } + + private com.google.protobuf.Timestamp lastModifiedTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastModifiedTimeBuilder_; + /** + *
+     * The time when this table was last modified
+     * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + * @return Whether the lastModifiedTime field is set. + */ + public boolean hasLastModifiedTime() { + return lastModifiedTimeBuilder_ != null || lastModifiedTime_ != null; + } + /** + *
+     * The time when this table was last modified
+     * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + * @return The lastModifiedTime. + */ + public com.google.protobuf.Timestamp getLastModifiedTime() { + if (lastModifiedTimeBuilder_ == null) { + return lastModifiedTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastModifiedTime_; + } else { + return lastModifiedTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when this table was last modified
+     * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + */ + public Builder setLastModifiedTime(com.google.protobuf.Timestamp value) { + if (lastModifiedTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastModifiedTime_ = value; + onChanged(); + } else { + lastModifiedTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when this table was last modified
+     * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + */ + public Builder setLastModifiedTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastModifiedTimeBuilder_ == null) { + lastModifiedTime_ = builderForValue.build(); + onChanged(); + } else { + lastModifiedTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when this table was last modified
+     * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + */ + public Builder mergeLastModifiedTime(com.google.protobuf.Timestamp value) { + if (lastModifiedTimeBuilder_ == null) { + if (lastModifiedTime_ != null) { + lastModifiedTime_ = + com.google.protobuf.Timestamp.newBuilder(lastModifiedTime_).mergeFrom(value).buildPartial(); + } else { + lastModifiedTime_ = value; + } + onChanged(); + } else { + lastModifiedTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when this table was last modified
+     * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + */ + public Builder clearLastModifiedTime() { + if (lastModifiedTimeBuilder_ == null) { + lastModifiedTime_ = null; + onChanged(); + } else { + lastModifiedTime_ = null; + lastModifiedTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when this table was last modified
+     * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getLastModifiedTimeBuilder() { + + onChanged(); + return getLastModifiedTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when this table was last modified
+     * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getLastModifiedTimeOrBuilder() { + if (lastModifiedTimeBuilder_ != null) { + return lastModifiedTimeBuilder_.getMessageOrBuilder(); + } else { + return lastModifiedTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : lastModifiedTime_; + } + } + /** + *
+     * The time when this table was last modified
+     * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getLastModifiedTimeFieldBuilder() { + if (lastModifiedTimeBuilder_ == null) { + lastModifiedTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getLastModifiedTime(), + getParentForChildren(), + isClean()); + lastModifiedTime_ = null; + } + return lastModifiedTimeBuilder_; + } + + private com.google.protobuf.Timestamp expirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expirationTimeBuilder_; + /** + *
+     * Optional. The time when this table expires.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + * @return Whether the expirationTime field is set. + */ + public boolean hasExpirationTime() { + return expirationTimeBuilder_ != null || expirationTime_ != null; + } + /** + *
+     * Optional. The time when this table expires.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + * @return The expirationTime. + */ + public com.google.protobuf.Timestamp getExpirationTime() { + if (expirationTimeBuilder_ == null) { + return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } else { + return expirationTimeBuilder_.getMessage(); + } + } + /** + *
+     * Optional. The time when this table expires.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationTime_ = value; + onChanged(); + } else { + expirationTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. The time when this table expires.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + */ + public Builder setExpirationTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (expirationTimeBuilder_ == null) { + expirationTime_ = builderForValue.build(); + onChanged(); + } else { + expirationTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. The time when this table expires.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + */ + public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (expirationTime_ != null) { + expirationTime_ = + com.google.protobuf.Timestamp.newBuilder(expirationTime_).mergeFrom(value).buildPartial(); + } else { + expirationTime_ = value; + } + onChanged(); + } else { + expirationTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. The time when this table expires.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + */ + public Builder clearExpirationTime() { + if (expirationTimeBuilder_ == null) { + expirationTime_ = null; + onChanged(); + } else { + expirationTime_ = null; + expirationTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. The time when this table expires.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + */ + public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { + + onChanged(); + return getExpirationTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. The time when this table expires.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + */ + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + if (expirationTimeBuilder_ != null) { + return expirationTimeBuilder_.getMessageOrBuilder(); + } else { + return expirationTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; + } + } + /** + *
+     * Optional. The time when this table expires.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getExpirationTimeFieldBuilder() { + if (expirationTimeBuilder_ == null) { + expirationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getExpirationTime(), + getParentForChildren(), + isClean()); + expirationTime_ = null; + } + return expirationTimeBuilder_; + } + + private long scannedColumnCount_ ; + /** + *
+     * The number of columns profiled in the table.
+     * 
+ * + * int64 scanned_column_count = 10; + * @return The scannedColumnCount. + */ + @java.lang.Override + public long getScannedColumnCount() { + return scannedColumnCount_; + } + /** + *
+     * The number of columns profiled in the table.
+     * 
+ * + * int64 scanned_column_count = 10; + * @param value The scannedColumnCount to set. + * @return This builder for chaining. + */ + public Builder setScannedColumnCount(long value) { + + scannedColumnCount_ = value; + onChanged(); + return this; + } + /** + *
+     * The number of columns profiled in the table.
+     * 
+ * + * int64 scanned_column_count = 10; + * @return This builder for chaining. + */ + public Builder clearScannedColumnCount() { + + scannedColumnCount_ = 0L; + onChanged(); + return this; + } + + private long failedColumnCount_ ; + /** + *
+     * The number of columns skipped in the table because of an error.
+     * 
+ * + * int64 failed_column_count = 11; + * @return The failedColumnCount. + */ + @java.lang.Override + public long getFailedColumnCount() { + return failedColumnCount_; + } + /** + *
+     * The number of columns skipped in the table because of an error.
+     * 
+ * + * int64 failed_column_count = 11; + * @param value The failedColumnCount to set. + * @return This builder for chaining. + */ + public Builder setFailedColumnCount(long value) { + + failedColumnCount_ = value; + onChanged(); + return this; + } + /** + *
+     * The number of columns skipped in the table because of an error.
+     * 
+ * + * int64 failed_column_count = 11; + * @return This builder for chaining. + */ + public Builder clearFailedColumnCount() { + + failedColumnCount_ = 0L; + onChanged(); + return this; + } + + private long tableSizeBytes_ ; + /** + *
+     * The size of the table when the profile was generated.
+     * 
+ * + * int64 table_size_bytes = 12; + * @return The tableSizeBytes. + */ + @java.lang.Override + public long getTableSizeBytes() { + return tableSizeBytes_; + } + /** + *
+     * The size of the table when the profile was generated.
+     * 
+ * + * int64 table_size_bytes = 12; + * @param value The tableSizeBytes to set. + * @return This builder for chaining. + */ + public Builder setTableSizeBytes(long value) { + + tableSizeBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * The size of the table when the profile was generated.
+     * 
+ * + * int64 table_size_bytes = 12; + * @return This builder for chaining. + */ + public Builder clearTableSizeBytes() { + + tableSizeBytes_ = 0L; + onChanged(); + return this; + } + + private long rowCount_ ; + /** + *
+     * Number of rows in the table when the profile was generated.
+     * 
+ * + * int64 row_count = 13; + * @return The rowCount. + */ + @java.lang.Override + public long getRowCount() { + return rowCount_; + } + /** + *
+     * Number of rows in the table when the profile was generated.
+     * 
+ * + * int64 row_count = 13; + * @param value The rowCount to set. + * @return This builder for chaining. + */ + public Builder setRowCount(long value) { + + rowCount_ = value; + onChanged(); + return this; + } + /** + *
+     * Number of rows in the table when the profile was generated.
+     * 
+ * + * int64 row_count = 13; + * @return This builder for chaining. + */ + public Builder clearRowCount() { + + rowCount_ = 0L; + onChanged(); + return this; + } + + private int encryptionStatus_ = 0; + /** + *
+     * How the table is encrypted.
+     * 
+ * + * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; + * @return The enum numeric value on the wire for encryptionStatus. + */ + @java.lang.Override public int getEncryptionStatusValue() { + return encryptionStatus_; + } + /** + *
+     * How the table is encrypted.
+     * 
+ * + * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; + * @param value The enum numeric value on the wire for encryptionStatus to set. + * @return This builder for chaining. + */ + public Builder setEncryptionStatusValue(int value) { + + encryptionStatus_ = value; + onChanged(); + return this; + } + /** + *
+     * How the table is encrypted.
+     * 
+ * + * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; + * @return The encryptionStatus. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.EncryptionStatus getEncryptionStatus() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.EncryptionStatus result = com.google.privacy.dlp.v2.EncryptionStatus.valueOf(encryptionStatus_); + return result == null ? com.google.privacy.dlp.v2.EncryptionStatus.UNRECOGNIZED : result; + } + /** + *
+     * How the table is encrypted.
+     * 
+ * + * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; + * @param value The encryptionStatus to set. + * @return This builder for chaining. + */ + public Builder setEncryptionStatus(com.google.privacy.dlp.v2.EncryptionStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + encryptionStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * How the table is encrypted.
+     * 
+ * + * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; + * @return This builder for chaining. + */ + public Builder clearEncryptionStatus() { + + encryptionStatus_ = 0; + onChanged(); + return this; + } + + private int resourceVisibility_ = 0; + /** + *
+     * How broadly a resource has been shared.
+     * 
+ * + * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; + * @return The enum numeric value on the wire for resourceVisibility. + */ + @java.lang.Override public int getResourceVisibilityValue() { + return resourceVisibility_; + } + /** + *
+     * How broadly a resource has been shared.
+     * 
+ * + * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; + * @param value The enum numeric value on the wire for resourceVisibility to set. + * @return This builder for chaining. + */ + public Builder setResourceVisibilityValue(int value) { + + resourceVisibility_ = value; + onChanged(); + return this; + } + /** + *
+     * How broadly a resource has been shared.
+     * 
+ * + * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; + * @return The resourceVisibility. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ResourceVisibility getResourceVisibility() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.ResourceVisibility result = com.google.privacy.dlp.v2.ResourceVisibility.valueOf(resourceVisibility_); + return result == null ? com.google.privacy.dlp.v2.ResourceVisibility.UNRECOGNIZED : result; + } + /** + *
+     * How broadly a resource has been shared.
+     * 
+ * + * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; + * @param value The resourceVisibility to set. + * @return This builder for chaining. + */ + public Builder setResourceVisibility(com.google.privacy.dlp.v2.ResourceVisibility value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceVisibility_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * How broadly a resource has been shared.
+     * 
+ * + * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; + * @return This builder for chaining. + */ + public Builder clearResourceVisibility() { + + resourceVisibility_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp profileLastGenerated_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> profileLastGeneratedBuilder_; + /** + *
+     * The last time the profile was generated.
+     * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + * @return Whether the profileLastGenerated field is set. + */ + public boolean hasProfileLastGenerated() { + return profileLastGeneratedBuilder_ != null || profileLastGenerated_ != null; + } + /** + *
+     * The last time the profile was generated.
+     * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + * @return The profileLastGenerated. + */ + public com.google.protobuf.Timestamp getProfileLastGenerated() { + if (profileLastGeneratedBuilder_ == null) { + return profileLastGenerated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : profileLastGenerated_; + } else { + return profileLastGeneratedBuilder_.getMessage(); + } + } + /** + *
+     * The last time the profile was generated.
+     * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + */ + public Builder setProfileLastGenerated(com.google.protobuf.Timestamp value) { + if (profileLastGeneratedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profileLastGenerated_ = value; + onChanged(); + } else { + profileLastGeneratedBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The last time the profile was generated.
+     * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + */ + public Builder setProfileLastGenerated( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (profileLastGeneratedBuilder_ == null) { + profileLastGenerated_ = builderForValue.build(); + onChanged(); + } else { + profileLastGeneratedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The last time the profile was generated.
+     * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + */ + public Builder mergeProfileLastGenerated(com.google.protobuf.Timestamp value) { + if (profileLastGeneratedBuilder_ == null) { + if (profileLastGenerated_ != null) { + profileLastGenerated_ = + com.google.protobuf.Timestamp.newBuilder(profileLastGenerated_).mergeFrom(value).buildPartial(); + } else { + profileLastGenerated_ = value; + } + onChanged(); + } else { + profileLastGeneratedBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The last time the profile was generated.
+     * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + */ + public Builder clearProfileLastGenerated() { + if (profileLastGeneratedBuilder_ == null) { + profileLastGenerated_ = null; + onChanged(); + } else { + profileLastGenerated_ = null; + profileLastGeneratedBuilder_ = null; + } + + return this; + } + /** + *
+     * The last time the profile was generated.
+     * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + */ + public com.google.protobuf.Timestamp.Builder getProfileLastGeneratedBuilder() { + + onChanged(); + return getProfileLastGeneratedFieldBuilder().getBuilder(); + } + /** + *
+     * The last time the profile was generated.
+     * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + */ + public com.google.protobuf.TimestampOrBuilder getProfileLastGeneratedOrBuilder() { + if (profileLastGeneratedBuilder_ != null) { + return profileLastGeneratedBuilder_.getMessageOrBuilder(); + } else { + return profileLastGenerated_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : profileLastGenerated_; + } + } + /** + *
+     * The last time the profile was generated.
+     * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getProfileLastGeneratedFieldBuilder() { + if (profileLastGeneratedBuilder_ == null) { + profileLastGeneratedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getProfileLastGenerated(), + getParentForChildren(), + isClean()); + profileLastGenerated_ = null; + } + return profileLastGeneratedBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> resourceLabels_; + private com.google.protobuf.MapField + internalGetResourceLabels() { + if (resourceLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourceLabelsDefaultEntryHolder.defaultEntry); + } + return resourceLabels_; + } + private com.google.protobuf.MapField + internalGetMutableResourceLabels() { + onChanged();; + if (resourceLabels_ == null) { + resourceLabels_ = com.google.protobuf.MapField.newMapField( + ResourceLabelsDefaultEntryHolder.defaultEntry); + } + if (!resourceLabels_.isMutable()) { + resourceLabels_ = resourceLabels_.copy(); + } + return resourceLabels_; + } + + public int getResourceLabelsCount() { + return internalGetResourceLabels().getMap().size(); + } + /** + *
+     * The labels applied to the resource at the time the profile was generated.
+     * 
+ * + * map<string, string> resource_labels = 17; + */ + + @java.lang.Override + public boolean containsResourceLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetResourceLabels().getMap().containsKey(key); + } + /** + * Use {@link #getResourceLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResourceLabels() { + return getResourceLabelsMap(); + } + /** + *
+     * The labels applied to the resource at the time the profile was generated.
+     * 
+ * + * map<string, string> resource_labels = 17; + */ + @java.lang.Override + + public java.util.Map getResourceLabelsMap() { + return internalGetResourceLabels().getMap(); + } + /** + *
+     * The labels applied to the resource at the time the profile was generated.
+     * 
+ * + * map<string, string> resource_labels = 17; + */ + @java.lang.Override + + public java.lang.String getResourceLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResourceLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The labels applied to the resource at the time the profile was generated.
+     * 
+ * + * map<string, string> resource_labels = 17; + */ + @java.lang.Override + + public java.lang.String getResourceLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetResourceLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearResourceLabels() { + internalGetMutableResourceLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * The labels applied to the resource at the time the profile was generated.
+     * 
+ * + * map<string, string> resource_labels = 17; + */ + + public Builder removeResourceLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableResourceLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableResourceLabels() { + return internalGetMutableResourceLabels().getMutableMap(); + } + /** + *
+     * The labels applied to the resource at the time the profile was generated.
+     * 
+ * + * map<string, string> resource_labels = 17; + */ + public Builder putResourceLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableResourceLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * The labels applied to the resource at the time the profile was generated.
+     * 
+ * + * map<string, string> resource_labels = 17; + */ + + public Builder putAllResourceLabels( + java.util.Map values) { + internalGetMutableResourceLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The time at which the table was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * The time at which the table was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time at which the table was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time at which the table was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time at which the table was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time at which the table was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time at which the table was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time at which the table was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The time at which the table was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TableDataProfile) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TableDataProfile) + private static final com.google.privacy.dlp.v2.TableDataProfile DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TableDataProfile(); + } + + public static com.google.privacy.dlp.v2.TableDataProfile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableDataProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableDataProfile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableDataProfile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfileOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfileOrBuilder.java new file mode 100644 index 000000000000..8f69c540bfba --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfileOrBuilder.java @@ -0,0 +1,615 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TableDataProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TableDataProfile) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the profile.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The name of the profile.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The resource name to the project data profile for this table.
+   * 
+ * + * string project_data_profile = 2; + * @return The projectDataProfile. + */ + java.lang.String getProjectDataProfile(); + /** + *
+   * The resource name to the project data profile for this table.
+   * 
+ * + * string project_data_profile = 2; + * @return The bytes for projectDataProfile. + */ + com.google.protobuf.ByteString + getProjectDataProfileBytes(); + + /** + *
+   * The GCP project ID that owns the BigQuery dataset.
+   * 
+ * + * string dataset_project_id = 24; + * @return The datasetProjectId. + */ + java.lang.String getDatasetProjectId(); + /** + *
+   * The GCP project ID that owns the BigQuery dataset.
+   * 
+ * + * string dataset_project_id = 24; + * @return The bytes for datasetProjectId. + */ + com.google.protobuf.ByteString + getDatasetProjectIdBytes(); + + /** + *
+   * The BigQuery location where the dataset's data is stored.
+   * See https://cloud.google.com/bigquery/docs/locations for supported
+   * locations.
+   * 
+ * + * string dataset_location = 29; + * @return The datasetLocation. + */ + java.lang.String getDatasetLocation(); + /** + *
+   * The BigQuery location where the dataset's data is stored.
+   * See https://cloud.google.com/bigquery/docs/locations for supported
+   * locations.
+   * 
+ * + * string dataset_location = 29; + * @return The bytes for datasetLocation. + */ + com.google.protobuf.ByteString + getDatasetLocationBytes(); + + /** + *
+   * The BigQuery dataset ID.
+   * 
+ * + * string dataset_id = 25; + * @return The datasetId. + */ + java.lang.String getDatasetId(); + /** + *
+   * The BigQuery dataset ID.
+   * 
+ * + * string dataset_id = 25; + * @return The bytes for datasetId. + */ + com.google.protobuf.ByteString + getDatasetIdBytes(); + + /** + *
+   * The BigQuery table ID.
+   * 
+ * + * string table_id = 26; + * @return The tableId. + */ + java.lang.String getTableId(); + /** + *
+   * The BigQuery table ID.
+   * 
+ * + * string table_id = 26; + * @return The bytes for tableId. + */ + com.google.protobuf.ByteString + getTableIdBytes(); + + /** + *
+   * The resource name of the table.
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * 
+ * + * string full_resource = 3; + * @return The fullResource. + */ + java.lang.String getFullResource(); + /** + *
+   * The resource name of the table.
+   * https://cloud.google.com/apis/design/resource_names#full_resource_name
+   * 
+ * + * string full_resource = 3; + * @return The bytes for fullResource. + */ + com.google.protobuf.ByteString + getFullResourceBytes(); + + /** + *
+   * Success or error status from the most recent profile generation attempt.
+   * May be empty if the profile is still being generated.
+   * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + * @return Whether the profileStatus field is set. + */ + boolean hasProfileStatus(); + /** + *
+   * Success or error status from the most recent profile generation attempt.
+   * May be empty if the profile is still being generated.
+   * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + * @return The profileStatus. + */ + com.google.privacy.dlp.v2.ProfileStatus getProfileStatus(); + /** + *
+   * Success or error status from the most recent profile generation attempt.
+   * May be empty if the profile is still being generated.
+   * 
+ * + * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; + */ + com.google.privacy.dlp.v2.ProfileStatusOrBuilder getProfileStatusOrBuilder(); + + /** + *
+   * State of a profile.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile.State state = 22; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * State of a profile.
+   * 
+ * + * .google.privacy.dlp.v2.TableDataProfile.State state = 22; + * @return The state. + */ + com.google.privacy.dlp.v2.TableDataProfile.State getState(); + + /** + *
+   * The sensitivity score of this table.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + * @return Whether the sensitivityScore field is set. + */ + boolean hasSensitivityScore(); + /** + *
+   * The sensitivity score of this table.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + * @return The sensitivityScore. + */ + com.google.privacy.dlp.v2.SensitivityScore getSensitivityScore(); + /** + *
+   * The sensitivity score of this table.
+   * 
+ * + * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; + */ + com.google.privacy.dlp.v2.SensitivityScoreOrBuilder getSensitivityScoreOrBuilder(); + + /** + *
+   * The data risk level of this table.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + * @return Whether the dataRiskLevel field is set. + */ + boolean hasDataRiskLevel(); + /** + *
+   * The data risk level of this table.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + * @return The dataRiskLevel. + */ + com.google.privacy.dlp.v2.DataRiskLevel getDataRiskLevel(); + /** + *
+   * The data risk level of this table.
+   * 
+ * + * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; + */ + com.google.privacy.dlp.v2.DataRiskLevelOrBuilder getDataRiskLevelOrBuilder(); + + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + java.util.List + getPredictedInfoTypesList(); + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + com.google.privacy.dlp.v2.InfoTypeSummary getPredictedInfoTypes(int index); + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + int getPredictedInfoTypesCount(); + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + java.util.List + getPredictedInfoTypesOrBuilderList(); + /** + *
+   * The infoTypes predicted from this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; + */ + com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder getPredictedInfoTypesOrBuilder( + int index); + + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + java.util.List + getOtherInfoTypesList(); + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + com.google.privacy.dlp.v2.OtherInfoTypeSummary getOtherInfoTypes(int index); + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + int getOtherInfoTypesCount(); + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + java.util.List + getOtherInfoTypesOrBuilderList(); + /** + *
+   * Other infoTypes found in this table's data.
+   * 
+ * + * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; + */ + com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder getOtherInfoTypesOrBuilder( + int index); + + /** + *
+   * The snapshot of the configurations used to generate the profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + * @return Whether the configSnapshot field is set. + */ + boolean hasConfigSnapshot(); + /** + *
+   * The snapshot of the configurations used to generate the profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + * @return The configSnapshot. + */ + com.google.privacy.dlp.v2.DataProfileConfigSnapshot getConfigSnapshot(); + /** + *
+   * The snapshot of the configurations used to generate the profile.
+   * 
+ * + * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; + */ + com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder getConfigSnapshotOrBuilder(); + + /** + *
+   * The time when this table was last modified
+   * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + * @return Whether the lastModifiedTime field is set. + */ + boolean hasLastModifiedTime(); + /** + *
+   * The time when this table was last modified
+   * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + * @return The lastModifiedTime. + */ + com.google.protobuf.Timestamp getLastModifiedTime(); + /** + *
+   * The time when this table was last modified
+   * 
+ * + * .google.protobuf.Timestamp last_modified_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getLastModifiedTimeOrBuilder(); + + /** + *
+   * Optional. The time when this table expires.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + * @return Whether the expirationTime field is set. + */ + boolean hasExpirationTime(); + /** + *
+   * Optional. The time when this table expires.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + * @return The expirationTime. + */ + com.google.protobuf.Timestamp getExpirationTime(); + /** + *
+   * Optional. The time when this table expires.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 9; + */ + com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); + + /** + *
+   * The number of columns profiled in the table.
+   * 
+ * + * int64 scanned_column_count = 10; + * @return The scannedColumnCount. + */ + long getScannedColumnCount(); + + /** + *
+   * The number of columns skipped in the table because of an error.
+   * 
+ * + * int64 failed_column_count = 11; + * @return The failedColumnCount. + */ + long getFailedColumnCount(); + + /** + *
+   * The size of the table when the profile was generated.
+   * 
+ * + * int64 table_size_bytes = 12; + * @return The tableSizeBytes. + */ + long getTableSizeBytes(); + + /** + *
+   * Number of rows in the table when the profile was generated.
+   * 
+ * + * int64 row_count = 13; + * @return The rowCount. + */ + long getRowCount(); + + /** + *
+   * How the table is encrypted.
+   * 
+ * + * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; + * @return The enum numeric value on the wire for encryptionStatus. + */ + int getEncryptionStatusValue(); + /** + *
+   * How the table is encrypted.
+   * 
+ * + * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; + * @return The encryptionStatus. + */ + com.google.privacy.dlp.v2.EncryptionStatus getEncryptionStatus(); + + /** + *
+   * How broadly a resource has been shared.
+   * 
+ * + * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; + * @return The enum numeric value on the wire for resourceVisibility. + */ + int getResourceVisibilityValue(); + /** + *
+   * How broadly a resource has been shared.
+   * 
+ * + * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; + * @return The resourceVisibility. + */ + com.google.privacy.dlp.v2.ResourceVisibility getResourceVisibility(); + + /** + *
+   * The last time the profile was generated.
+   * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + * @return Whether the profileLastGenerated field is set. + */ + boolean hasProfileLastGenerated(); + /** + *
+   * The last time the profile was generated.
+   * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + * @return The profileLastGenerated. + */ + com.google.protobuf.Timestamp getProfileLastGenerated(); + /** + *
+   * The last time the profile was generated.
+   * 
+ * + * .google.protobuf.Timestamp profile_last_generated = 16; + */ + com.google.protobuf.TimestampOrBuilder getProfileLastGeneratedOrBuilder(); + + /** + *
+   * The labels applied to the resource at the time the profile was generated.
+   * 
+ * + * map<string, string> resource_labels = 17; + */ + int getResourceLabelsCount(); + /** + *
+   * The labels applied to the resource at the time the profile was generated.
+   * 
+ * + * map<string, string> resource_labels = 17; + */ + boolean containsResourceLabels( + java.lang.String key); + /** + * Use {@link #getResourceLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getResourceLabels(); + /** + *
+   * The labels applied to the resource at the time the profile was generated.
+   * 
+ * + * map<string, string> resource_labels = 17; + */ + java.util.Map + getResourceLabelsMap(); + /** + *
+   * The labels applied to the resource at the time the profile was generated.
+   * 
+ * + * map<string, string> resource_labels = 17; + */ + + /* nullable */ +java.lang.String getResourceLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * The labels applied to the resource at the time the profile was generated.
+   * 
+ * + * map<string, string> resource_labels = 17; + */ + + java.lang.String getResourceLabelsOrThrow( + java.lang.String key); + + /** + *
+   * The time at which the table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The time at which the table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The time at which the table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 23; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocation.java new file mode 100644 index 000000000000..babc1fa9a345 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocation.java @@ -0,0 +1,530 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Location of a finding within a table.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TableLocation} + */ +public final class TableLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TableLocation) + TableLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use TableLocation.newBuilder() to construct. + private TableLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TableLocation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TableLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TableLocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + rowIndex_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TableLocation.class, com.google.privacy.dlp.v2.TableLocation.Builder.class); + } + + public static final int ROW_INDEX_FIELD_NUMBER = 1; + private long rowIndex_; + /** + *
+   * The zero-based index of the row where the finding is located. Only
+   * populated for resources that have a natural ordering, not BigQuery. In
+   * BigQuery, to identify the row a finding came from, populate
+   * BigQueryOptions.identifying_fields with your primary key column names and
+   * when you store the findings the value of those columns will be stored
+   * inside of Finding.
+   * 
+ * + * int64 row_index = 1; + * @return The rowIndex. + */ + @java.lang.Override + public long getRowIndex() { + return rowIndex_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (rowIndex_ != 0L) { + output.writeInt64(1, rowIndex_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rowIndex_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, rowIndex_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TableLocation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TableLocation other = (com.google.privacy.dlp.v2.TableLocation) obj; + + if (getRowIndex() + != other.getRowIndex()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ROW_INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRowIndex()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TableLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TableLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TableLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TableLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TableLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TableLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TableLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TableLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Location of a finding within a table.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TableLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TableLocation) + com.google.privacy.dlp.v2.TableLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TableLocation.class, com.google.privacy.dlp.v2.TableLocation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TableLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + rowIndex_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableLocation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TableLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableLocation build() { + com.google.privacy.dlp.v2.TableLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableLocation buildPartial() { + com.google.privacy.dlp.v2.TableLocation result = new com.google.privacy.dlp.v2.TableLocation(this); + result.rowIndex_ = rowIndex_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TableLocation) { + return mergeFrom((com.google.privacy.dlp.v2.TableLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TableLocation other) { + if (other == com.google.privacy.dlp.v2.TableLocation.getDefaultInstance()) return this; + if (other.getRowIndex() != 0L) { + setRowIndex(other.getRowIndex()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TableLocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TableLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long rowIndex_ ; + /** + *
+     * The zero-based index of the row where the finding is located. Only
+     * populated for resources that have a natural ordering, not BigQuery. In
+     * BigQuery, to identify the row a finding came from, populate
+     * BigQueryOptions.identifying_fields with your primary key column names and
+     * when you store the findings the value of those columns will be stored
+     * inside of Finding.
+     * 
+ * + * int64 row_index = 1; + * @return The rowIndex. + */ + @java.lang.Override + public long getRowIndex() { + return rowIndex_; + } + /** + *
+     * The zero-based index of the row where the finding is located. Only
+     * populated for resources that have a natural ordering, not BigQuery. In
+     * BigQuery, to identify the row a finding came from, populate
+     * BigQueryOptions.identifying_fields with your primary key column names and
+     * when you store the findings the value of those columns will be stored
+     * inside of Finding.
+     * 
+ * + * int64 row_index = 1; + * @param value The rowIndex to set. + * @return This builder for chaining. + */ + public Builder setRowIndex(long value) { + + rowIndex_ = value; + onChanged(); + return this; + } + /** + *
+     * The zero-based index of the row where the finding is located. Only
+     * populated for resources that have a natural ordering, not BigQuery. In
+     * BigQuery, to identify the row a finding came from, populate
+     * BigQueryOptions.identifying_fields with your primary key column names and
+     * when you store the findings the value of those columns will be stored
+     * inside of Finding.
+     * 
+ * + * int64 row_index = 1; + * @return This builder for chaining. + */ + public Builder clearRowIndex() { + + rowIndex_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TableLocation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TableLocation) + private static final com.google.privacy.dlp.v2.TableLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TableLocation(); + } + + public static com.google.privacy.dlp.v2.TableLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableLocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocationOrBuilder.java new file mode 100644 index 000000000000..c823d019b0b6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocationOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TableLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TableLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The zero-based index of the row where the finding is located. Only
+   * populated for resources that have a natural ordering, not BigQuery. In
+   * BigQuery, to identify the row a finding came from, populate
+   * BigQueryOptions.identifying_fields with your primary key column names and
+   * when you store the findings the value of those columns will be stored
+   * inside of Finding.
+   * 
+ * + * int64 row_index = 1; + * @return The rowIndex. + */ + long getRowIndex(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptions.java new file mode 100644 index 000000000000..25e72c8bc954 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptions.java @@ -0,0 +1,941 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Instructions regarding the table content being inspected.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TableOptions} + */ +public final class TableOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TableOptions) + TableOptionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use TableOptions.newBuilder() to construct. + private TableOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TableOptions() { + identifyingFields_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TableOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TableOptions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + identifyingFields_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + identifyingFields_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + identifyingFields_ = java.util.Collections.unmodifiableList(identifyingFields_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TableOptions.class, com.google.privacy.dlp.v2.TableOptions.Builder.class); + } + + public static final int IDENTIFYING_FIELDS_FIELD_NUMBER = 1; + private java.util.List identifyingFields_; + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + @java.lang.Override + public java.util.List getIdentifyingFieldsList() { + return identifyingFields_; + } + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + @java.lang.Override + public java.util.List + getIdentifyingFieldsOrBuilderList() { + return identifyingFields_; + } + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + @java.lang.Override + public int getIdentifyingFieldsCount() { + return identifyingFields_.size(); + } + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index) { + return identifyingFields_.get(index); + } + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( + int index) { + return identifyingFields_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < identifyingFields_.size(); i++) { + output.writeMessage(1, identifyingFields_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < identifyingFields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, identifyingFields_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TableOptions)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TableOptions other = (com.google.privacy.dlp.v2.TableOptions) obj; + + if (!getIdentifyingFieldsList() + .equals(other.getIdentifyingFieldsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdentifyingFieldsCount() > 0) { + hash = (37 * hash) + IDENTIFYING_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getIdentifyingFieldsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TableOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TableOptions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TableOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TableOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TableOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TableOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TableOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TableOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TableOptions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Instructions regarding the table content being inspected.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TableOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TableOptions) + com.google.privacy.dlp.v2.TableOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TableOptions.class, com.google.privacy.dlp.v2.TableOptions.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TableOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getIdentifyingFieldsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (identifyingFieldsBuilder_ == null) { + identifyingFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + identifyingFieldsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableOptions getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TableOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableOptions build() { + com.google.privacy.dlp.v2.TableOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableOptions buildPartial() { + com.google.privacy.dlp.v2.TableOptions result = new com.google.privacy.dlp.v2.TableOptions(this); + int from_bitField0_ = bitField0_; + if (identifyingFieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + identifyingFields_ = java.util.Collections.unmodifiableList(identifyingFields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.identifyingFields_ = identifyingFields_; + } else { + result.identifyingFields_ = identifyingFieldsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TableOptions) { + return mergeFrom((com.google.privacy.dlp.v2.TableOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TableOptions other) { + if (other == com.google.privacy.dlp.v2.TableOptions.getDefaultInstance()) return this; + if (identifyingFieldsBuilder_ == null) { + if (!other.identifyingFields_.isEmpty()) { + if (identifyingFields_.isEmpty()) { + identifyingFields_ = other.identifyingFields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.addAll(other.identifyingFields_); + } + onChanged(); + } + } else { + if (!other.identifyingFields_.isEmpty()) { + if (identifyingFieldsBuilder_.isEmpty()) { + identifyingFieldsBuilder_.dispose(); + identifyingFieldsBuilder_ = null; + identifyingFields_ = other.identifyingFields_; + bitField0_ = (bitField0_ & ~0x00000001); + identifyingFieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getIdentifyingFieldsFieldBuilder() : null; + } else { + identifyingFieldsBuilder_.addAllMessages(other.identifyingFields_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TableOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TableOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List identifyingFields_ = + java.util.Collections.emptyList(); + private void ensureIdentifyingFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + identifyingFields_ = new java.util.ArrayList(identifyingFields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> identifyingFieldsBuilder_; + + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public java.util.List getIdentifyingFieldsList() { + if (identifyingFieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(identifyingFields_); + } else { + return identifyingFieldsBuilder_.getMessageList(); + } + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public int getIdentifyingFieldsCount() { + if (identifyingFieldsBuilder_ == null) { + return identifyingFields_.size(); + } else { + return identifyingFieldsBuilder_.getCount(); + } + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index) { + if (identifyingFieldsBuilder_ == null) { + return identifyingFields_.get(index); + } else { + return identifyingFieldsBuilder_.getMessage(index); + } + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public Builder setIdentifyingFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (identifyingFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.set(index, value); + onChanged(); + } else { + identifyingFieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public Builder setIdentifyingFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.set(index, builderForValue.build()); + onChanged(); + } else { + identifyingFieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public Builder addIdentifyingFields(com.google.privacy.dlp.v2.FieldId value) { + if (identifyingFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.add(value); + onChanged(); + } else { + identifyingFieldsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public Builder addIdentifyingFields( + int index, com.google.privacy.dlp.v2.FieldId value) { + if (identifyingFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.add(index, value); + onChanged(); + } else { + identifyingFieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public Builder addIdentifyingFields( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.add(builderForValue.build()); + onChanged(); + } else { + identifyingFieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public Builder addIdentifyingFields( + int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.add(index, builderForValue.build()); + onChanged(); + } else { + identifyingFieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public Builder addAllIdentifyingFields( + java.lang.Iterable values) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, identifyingFields_); + onChanged(); + } else { + identifyingFieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public Builder clearIdentifyingFields() { + if (identifyingFieldsBuilder_ == null) { + identifyingFields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + identifyingFieldsBuilder_.clear(); + } + return this; + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public Builder removeIdentifyingFields(int index) { + if (identifyingFieldsBuilder_ == null) { + ensureIdentifyingFieldsIsMutable(); + identifyingFields_.remove(index); + onChanged(); + } else { + identifyingFieldsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getIdentifyingFieldsBuilder( + int index) { + return getIdentifyingFieldsFieldBuilder().getBuilder(index); + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( + int index) { + if (identifyingFieldsBuilder_ == null) { + return identifyingFields_.get(index); } else { + return identifyingFieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public java.util.List + getIdentifyingFieldsOrBuilderList() { + if (identifyingFieldsBuilder_ != null) { + return identifyingFieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identifyingFields_); + } + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addIdentifyingFieldsBuilder() { + return getIdentifyingFieldsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder addIdentifyingFieldsBuilder( + int index) { + return getIdentifyingFieldsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); + } + /** + *
+     * The columns that are the primary keys for table objects included in
+     * ContentItem. A copy of this cell's value will stored alongside alongside
+     * each finding so that the finding can be traced to the specific row it came
+     * from. No more than 3 may be provided.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + public java.util.List + getIdentifyingFieldsBuilderList() { + return getIdentifyingFieldsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getIdentifyingFieldsFieldBuilder() { + if (identifyingFieldsBuilder_ == null) { + identifyingFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + identifyingFields_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + identifyingFields_ = null; + } + return identifyingFieldsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TableOptions) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TableOptions) + private static final com.google.privacy.dlp.v2.TableOptions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TableOptions(); + } + + public static com.google.privacy.dlp.v2.TableOptions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableOptions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TableOptions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptionsOrBuilder.java new file mode 100644 index 000000000000..0c70d7361877 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptionsOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/storage.proto + +package com.google.privacy.dlp.v2; + +public interface TableOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TableOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + java.util.List + getIdentifyingFieldsList(); + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index); + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + int getIdentifyingFieldsCount(); + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + java.util.List + getIdentifyingFieldsOrBuilderList(); + /** + *
+   * The columns that are the primary keys for table objects included in
+   * ContentItem. A copy of this cell's value will stored alongside alongside
+   * each finding so that the finding can be traced to the specific row it came
+   * from. No more than 3 may be provided.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOrBuilder.java new file mode 100644 index 000000000000..5608646ca0e4 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TableOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Table) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + java.util.List + getHeadersList(); + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + com.google.privacy.dlp.v2.FieldId getHeaders(int index); + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + int getHeadersCount(); + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + java.util.List + getHeadersOrBuilderList(); + /** + *
+   * Headers of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldId headers = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getHeadersOrBuilder( + int index); + + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + java.util.List + getRowsList(); + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + com.google.privacy.dlp.v2.Table.Row getRows(int index); + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + int getRowsCount(); + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + java.util.List + getRowsOrBuilderList(); + /** + *
+   * Rows of the table.
+   * 
+ * + * repeated .google.privacy.dlp.v2.Table.Row rows = 2; + */ + com.google.privacy.dlp.v2.Table.RowOrBuilder getRowsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfig.java new file mode 100644 index 000000000000..98fa846b9e41 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfig.java @@ -0,0 +1,768 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a
+ * portion of the value.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TimePartConfig} + */ +public final class TimePartConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TimePartConfig) + TimePartConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use TimePartConfig.newBuilder() to construct. + private TimePartConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TimePartConfig() { + partToExtract_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TimePartConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TimePartConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + partToExtract_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TimePartConfig.class, com.google.privacy.dlp.v2.TimePartConfig.Builder.class); + } + + /** + *
+   * Components that make up time.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.TimePartConfig.TimePart} + */ + public enum TimePart + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused
+     * 
+ * + * TIME_PART_UNSPECIFIED = 0; + */ + TIME_PART_UNSPECIFIED(0), + /** + *
+     * [0-9999]
+     * 
+ * + * YEAR = 1; + */ + YEAR(1), + /** + *
+     * [1-12]
+     * 
+ * + * MONTH = 2; + */ + MONTH(2), + /** + *
+     * [1-31]
+     * 
+ * + * DAY_OF_MONTH = 3; + */ + DAY_OF_MONTH(3), + /** + *
+     * [1-7]
+     * 
+ * + * DAY_OF_WEEK = 4; + */ + DAY_OF_WEEK(4), + /** + *
+     * [1-53]
+     * 
+ * + * WEEK_OF_YEAR = 5; + */ + WEEK_OF_YEAR(5), + /** + *
+     * [0-23]
+     * 
+ * + * HOUR_OF_DAY = 6; + */ + HOUR_OF_DAY(6), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused
+     * 
+ * + * TIME_PART_UNSPECIFIED = 0; + */ + public static final int TIME_PART_UNSPECIFIED_VALUE = 0; + /** + *
+     * [0-9999]
+     * 
+ * + * YEAR = 1; + */ + public static final int YEAR_VALUE = 1; + /** + *
+     * [1-12]
+     * 
+ * + * MONTH = 2; + */ + public static final int MONTH_VALUE = 2; + /** + *
+     * [1-31]
+     * 
+ * + * DAY_OF_MONTH = 3; + */ + public static final int DAY_OF_MONTH_VALUE = 3; + /** + *
+     * [1-7]
+     * 
+ * + * DAY_OF_WEEK = 4; + */ + public static final int DAY_OF_WEEK_VALUE = 4; + /** + *
+     * [1-53]
+     * 
+ * + * WEEK_OF_YEAR = 5; + */ + public static final int WEEK_OF_YEAR_VALUE = 5; + /** + *
+     * [0-23]
+     * 
+ * + * HOUR_OF_DAY = 6; + */ + public static final int HOUR_OF_DAY_VALUE = 6; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TimePart valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TimePart forNumber(int value) { + switch (value) { + case 0: return TIME_PART_UNSPECIFIED; + case 1: return YEAR; + case 2: return MONTH; + case 3: return DAY_OF_MONTH; + case 4: return DAY_OF_WEEK; + case 5: return WEEK_OF_YEAR; + case 6: return HOUR_OF_DAY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TimePart> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TimePart findValueByNumber(int number) { + return TimePart.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.TimePartConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final TimePart[] VALUES = values(); + + public static TimePart valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TimePart(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TimePartConfig.TimePart) + } + + public static final int PART_TO_EXTRACT_FIELD_NUMBER = 1; + private int partToExtract_; + /** + *
+   * The part of the time to keep.
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; + * @return The enum numeric value on the wire for partToExtract. + */ + @java.lang.Override public int getPartToExtractValue() { + return partToExtract_; + } + /** + *
+   * The part of the time to keep.
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; + * @return The partToExtract. + */ + @java.lang.Override public com.google.privacy.dlp.v2.TimePartConfig.TimePart getPartToExtract() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TimePartConfig.TimePart result = com.google.privacy.dlp.v2.TimePartConfig.TimePart.valueOf(partToExtract_); + return result == null ? com.google.privacy.dlp.v2.TimePartConfig.TimePart.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (partToExtract_ != com.google.privacy.dlp.v2.TimePartConfig.TimePart.TIME_PART_UNSPECIFIED.getNumber()) { + output.writeEnum(1, partToExtract_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partToExtract_ != com.google.privacy.dlp.v2.TimePartConfig.TimePart.TIME_PART_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, partToExtract_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TimePartConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TimePartConfig other = (com.google.privacy.dlp.v2.TimePartConfig) obj; + + if (partToExtract_ != other.partToExtract_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PART_TO_EXTRACT_FIELD_NUMBER; + hash = (53 * hash) + partToExtract_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TimePartConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a
+   * portion of the value.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TimePartConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TimePartConfig) + com.google.privacy.dlp.v2.TimePartConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TimePartConfig.class, com.google.privacy.dlp.v2.TimePartConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TimePartConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + partToExtract_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TimePartConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TimePartConfig build() { + com.google.privacy.dlp.v2.TimePartConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TimePartConfig buildPartial() { + com.google.privacy.dlp.v2.TimePartConfig result = new com.google.privacy.dlp.v2.TimePartConfig(this); + result.partToExtract_ = partToExtract_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TimePartConfig) { + return mergeFrom((com.google.privacy.dlp.v2.TimePartConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TimePartConfig other) { + if (other == com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance()) return this; + if (other.partToExtract_ != 0) { + setPartToExtractValue(other.getPartToExtractValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TimePartConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TimePartConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int partToExtract_ = 0; + /** + *
+     * The part of the time to keep.
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; + * @return The enum numeric value on the wire for partToExtract. + */ + @java.lang.Override public int getPartToExtractValue() { + return partToExtract_; + } + /** + *
+     * The part of the time to keep.
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; + * @param value The enum numeric value on the wire for partToExtract to set. + * @return This builder for chaining. + */ + public Builder setPartToExtractValue(int value) { + + partToExtract_ = value; + onChanged(); + return this; + } + /** + *
+     * The part of the time to keep.
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; + * @return The partToExtract. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TimePartConfig.TimePart getPartToExtract() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TimePartConfig.TimePart result = com.google.privacy.dlp.v2.TimePartConfig.TimePart.valueOf(partToExtract_); + return result == null ? com.google.privacy.dlp.v2.TimePartConfig.TimePart.UNRECOGNIZED : result; + } + /** + *
+     * The part of the time to keep.
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; + * @param value The partToExtract to set. + * @return This builder for chaining. + */ + public Builder setPartToExtract(com.google.privacy.dlp.v2.TimePartConfig.TimePart value) { + if (value == null) { + throw new NullPointerException(); + } + + partToExtract_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The part of the time to keep.
+     * 
+ * + * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; + * @return This builder for chaining. + */ + public Builder clearPartToExtract() { + + partToExtract_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TimePartConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TimePartConfig) + private static final com.google.privacy.dlp.v2.TimePartConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TimePartConfig(); + } + + public static com.google.privacy.dlp.v2.TimePartConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimePartConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimePartConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TimePartConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfigOrBuilder.java new file mode 100644 index 000000000000..e42fb6dd8de6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfigOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TimePartConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TimePartConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The part of the time to keep.
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; + * @return The enum numeric value on the wire for partToExtract. + */ + int getPartToExtractValue(); + /** + *
+   * The part of the time to keep.
+   * 
+ * + * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; + * @return The partToExtract. + */ + com.google.privacy.dlp.v2.TimePartConfig.TimePart getPartToExtract(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java new file mode 100644 index 000000000000..9fbb92a348d8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java @@ -0,0 +1,1029 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * User specified templates and configs for how to deidentify structured,
+ * unstructures, and image files. User must provide either a unstructured
+ * deidentify template or at least one redact image config.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationConfig} + */ +public final class TransformationConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationConfig) + TransformationConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransformationConfig.newBuilder() to construct. + private TransformationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransformationConfig() { + deidentifyTemplate_ = ""; + structuredDeidentifyTemplate_ = ""; + imageRedactTemplate_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransformationConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + deidentifyTemplate_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + structuredDeidentifyTemplate_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + imageRedactTemplate_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationConfig.class, com.google.privacy.dlp.v2.TransformationConfig.Builder.class); + } + + public static final int DEIDENTIFY_TEMPLATE_FIELD_NUMBER = 1; + private volatile java.lang.Object deidentifyTemplate_; + /** + *
+   * De-identify template.
+   * If this template is specified, it will serve as the default de-identify
+   * template. This template cannot contain `record_transformations` since it
+   * can be used for unstructured content such as free-form text files. If this
+   * template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
+   * de-identify unstructured content.
+   * 
+ * + * string deidentify_template = 1; + * @return The deidentifyTemplate. + */ + @java.lang.Override + public java.lang.String getDeidentifyTemplate() { + java.lang.Object ref = deidentifyTemplate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deidentifyTemplate_ = s; + return s; + } + } + /** + *
+   * De-identify template.
+   * If this template is specified, it will serve as the default de-identify
+   * template. This template cannot contain `record_transformations` since it
+   * can be used for unstructured content such as free-form text files. If this
+   * template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
+   * de-identify unstructured content.
+   * 
+ * + * string deidentify_template = 1; + * @return The bytes for deidentifyTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeidentifyTemplateBytes() { + java.lang.Object ref = deidentifyTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deidentifyTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRUCTURED_DEIDENTIFY_TEMPLATE_FIELD_NUMBER = 2; + private volatile java.lang.Object structuredDeidentifyTemplate_; + /** + *
+   * Structured de-identify template.
+   * If this template is specified, it will serve as the de-identify template
+   * for structured content such as delimited files and tables. If this template
+   * is not set but the `deidentify_template` is set, then `deidentify_template`
+   * will also apply to the structured content. If neither template is set, a
+   * default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
+   * content.
+   * 
+ * + * string structured_deidentify_template = 2; + * @return The structuredDeidentifyTemplate. + */ + @java.lang.Override + public java.lang.String getStructuredDeidentifyTemplate() { + java.lang.Object ref = structuredDeidentifyTemplate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + structuredDeidentifyTemplate_ = s; + return s; + } + } + /** + *
+   * Structured de-identify template.
+   * If this template is specified, it will serve as the de-identify template
+   * for structured content such as delimited files and tables. If this template
+   * is not set but the `deidentify_template` is set, then `deidentify_template`
+   * will also apply to the structured content. If neither template is set, a
+   * default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
+   * content.
+   * 
+ * + * string structured_deidentify_template = 2; + * @return The bytes for structuredDeidentifyTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStructuredDeidentifyTemplateBytes() { + java.lang.Object ref = structuredDeidentifyTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + structuredDeidentifyTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_REDACT_TEMPLATE_FIELD_NUMBER = 4; + private volatile java.lang.Object imageRedactTemplate_; + /** + *
+   * Image redact template.
+   * If this template is specified, it will serve as the de-identify template
+   * for images. If this template is not set, all findings in the image will be
+   * redacted with a black box.
+   * 
+ * + * string image_redact_template = 4; + * @return The imageRedactTemplate. + */ + @java.lang.Override + public java.lang.String getImageRedactTemplate() { + java.lang.Object ref = imageRedactTemplate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageRedactTemplate_ = s; + return s; + } + } + /** + *
+   * Image redact template.
+   * If this template is specified, it will serve as the de-identify template
+   * for images. If this template is not set, all findings in the image will be
+   * redacted with a black box.
+   * 
+ * + * string image_redact_template = 4; + * @return The bytes for imageRedactTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getImageRedactTemplateBytes() { + java.lang.Object ref = imageRedactTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageRedactTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deidentifyTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deidentifyTemplate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(structuredDeidentifyTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, structuredDeidentifyTemplate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageRedactTemplate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, imageRedactTemplate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deidentifyTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deidentifyTemplate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(structuredDeidentifyTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, structuredDeidentifyTemplate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageRedactTemplate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, imageRedactTemplate_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationConfig other = (com.google.privacy.dlp.v2.TransformationConfig) obj; + + if (!getDeidentifyTemplate() + .equals(other.getDeidentifyTemplate())) return false; + if (!getStructuredDeidentifyTemplate() + .equals(other.getStructuredDeidentifyTemplate())) return false; + if (!getImageRedactTemplate() + .equals(other.getImageRedactTemplate())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEIDENTIFY_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getDeidentifyTemplate().hashCode(); + hash = (37 * hash) + STRUCTURED_DEIDENTIFY_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getStructuredDeidentifyTemplate().hashCode(); + hash = (37 * hash) + IMAGE_REDACT_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getImageRedactTemplate().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * User specified templates and configs for how to deidentify structured,
+   * unstructures, and image files. User must provide either a unstructured
+   * deidentify template or at least one redact image config.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationConfig) + com.google.privacy.dlp.v2.TransformationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationConfig.class, com.google.privacy.dlp.v2.TransformationConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + deidentifyTemplate_ = ""; + + structuredDeidentifyTemplate_ = ""; + + imageRedactTemplate_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationConfig build() { + com.google.privacy.dlp.v2.TransformationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationConfig buildPartial() { + com.google.privacy.dlp.v2.TransformationConfig result = new com.google.privacy.dlp.v2.TransformationConfig(this); + result.deidentifyTemplate_ = deidentifyTemplate_; + result.structuredDeidentifyTemplate_ = structuredDeidentifyTemplate_; + result.imageRedactTemplate_ = imageRedactTemplate_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationConfig) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationConfig other) { + if (other == com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance()) return this; + if (!other.getDeidentifyTemplate().isEmpty()) { + deidentifyTemplate_ = other.deidentifyTemplate_; + onChanged(); + } + if (!other.getStructuredDeidentifyTemplate().isEmpty()) { + structuredDeidentifyTemplate_ = other.structuredDeidentifyTemplate_; + onChanged(); + } + if (!other.getImageRedactTemplate().isEmpty()) { + imageRedactTemplate_ = other.imageRedactTemplate_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object deidentifyTemplate_ = ""; + /** + *
+     * De-identify template.
+     * If this template is specified, it will serve as the default de-identify
+     * template. This template cannot contain `record_transformations` since it
+     * can be used for unstructured content such as free-form text files. If this
+     * template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
+     * de-identify unstructured content.
+     * 
+ * + * string deidentify_template = 1; + * @return The deidentifyTemplate. + */ + public java.lang.String getDeidentifyTemplate() { + java.lang.Object ref = deidentifyTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deidentifyTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * De-identify template.
+     * If this template is specified, it will serve as the default de-identify
+     * template. This template cannot contain `record_transformations` since it
+     * can be used for unstructured content such as free-form text files. If this
+     * template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
+     * de-identify unstructured content.
+     * 
+ * + * string deidentify_template = 1; + * @return The bytes for deidentifyTemplate. + */ + public com.google.protobuf.ByteString + getDeidentifyTemplateBytes() { + java.lang.Object ref = deidentifyTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deidentifyTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * De-identify template.
+     * If this template is specified, it will serve as the default de-identify
+     * template. This template cannot contain `record_transformations` since it
+     * can be used for unstructured content such as free-form text files. If this
+     * template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
+     * de-identify unstructured content.
+     * 
+ * + * string deidentify_template = 1; + * @param value The deidentifyTemplate to set. + * @return This builder for chaining. + */ + public Builder setDeidentifyTemplate( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deidentifyTemplate_ = value; + onChanged(); + return this; + } + /** + *
+     * De-identify template.
+     * If this template is specified, it will serve as the default de-identify
+     * template. This template cannot contain `record_transformations` since it
+     * can be used for unstructured content such as free-form text files. If this
+     * template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
+     * de-identify unstructured content.
+     * 
+ * + * string deidentify_template = 1; + * @return This builder for chaining. + */ + public Builder clearDeidentifyTemplate() { + + deidentifyTemplate_ = getDefaultInstance().getDeidentifyTemplate(); + onChanged(); + return this; + } + /** + *
+     * De-identify template.
+     * If this template is specified, it will serve as the default de-identify
+     * template. This template cannot contain `record_transformations` since it
+     * can be used for unstructured content such as free-form text files. If this
+     * template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
+     * de-identify unstructured content.
+     * 
+ * + * string deidentify_template = 1; + * @param value The bytes for deidentifyTemplate to set. + * @return This builder for chaining. + */ + public Builder setDeidentifyTemplateBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deidentifyTemplate_ = value; + onChanged(); + return this; + } + + private java.lang.Object structuredDeidentifyTemplate_ = ""; + /** + *
+     * Structured de-identify template.
+     * If this template is specified, it will serve as the de-identify template
+     * for structured content such as delimited files and tables. If this template
+     * is not set but the `deidentify_template` is set, then `deidentify_template`
+     * will also apply to the structured content. If neither template is set, a
+     * default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
+     * content.
+     * 
+ * + * string structured_deidentify_template = 2; + * @return The structuredDeidentifyTemplate. + */ + public java.lang.String getStructuredDeidentifyTemplate() { + java.lang.Object ref = structuredDeidentifyTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + structuredDeidentifyTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Structured de-identify template.
+     * If this template is specified, it will serve as the de-identify template
+     * for structured content such as delimited files and tables. If this template
+     * is not set but the `deidentify_template` is set, then `deidentify_template`
+     * will also apply to the structured content. If neither template is set, a
+     * default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
+     * content.
+     * 
+ * + * string structured_deidentify_template = 2; + * @return The bytes for structuredDeidentifyTemplate. + */ + public com.google.protobuf.ByteString + getStructuredDeidentifyTemplateBytes() { + java.lang.Object ref = structuredDeidentifyTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + structuredDeidentifyTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Structured de-identify template.
+     * If this template is specified, it will serve as the de-identify template
+     * for structured content such as delimited files and tables. If this template
+     * is not set but the `deidentify_template` is set, then `deidentify_template`
+     * will also apply to the structured content. If neither template is set, a
+     * default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
+     * content.
+     * 
+ * + * string structured_deidentify_template = 2; + * @param value The structuredDeidentifyTemplate to set. + * @return This builder for chaining. + */ + public Builder setStructuredDeidentifyTemplate( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + structuredDeidentifyTemplate_ = value; + onChanged(); + return this; + } + /** + *
+     * Structured de-identify template.
+     * If this template is specified, it will serve as the de-identify template
+     * for structured content such as delimited files and tables. If this template
+     * is not set but the `deidentify_template` is set, then `deidentify_template`
+     * will also apply to the structured content. If neither template is set, a
+     * default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
+     * content.
+     * 
+ * + * string structured_deidentify_template = 2; + * @return This builder for chaining. + */ + public Builder clearStructuredDeidentifyTemplate() { + + structuredDeidentifyTemplate_ = getDefaultInstance().getStructuredDeidentifyTemplate(); + onChanged(); + return this; + } + /** + *
+     * Structured de-identify template.
+     * If this template is specified, it will serve as the de-identify template
+     * for structured content such as delimited files and tables. If this template
+     * is not set but the `deidentify_template` is set, then `deidentify_template`
+     * will also apply to the structured content. If neither template is set, a
+     * default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
+     * content.
+     * 
+ * + * string structured_deidentify_template = 2; + * @param value The bytes for structuredDeidentifyTemplate to set. + * @return This builder for chaining. + */ + public Builder setStructuredDeidentifyTemplateBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + structuredDeidentifyTemplate_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageRedactTemplate_ = ""; + /** + *
+     * Image redact template.
+     * If this template is specified, it will serve as the de-identify template
+     * for images. If this template is not set, all findings in the image will be
+     * redacted with a black box.
+     * 
+ * + * string image_redact_template = 4; + * @return The imageRedactTemplate. + */ + public java.lang.String getImageRedactTemplate() { + java.lang.Object ref = imageRedactTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageRedactTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Image redact template.
+     * If this template is specified, it will serve as the de-identify template
+     * for images. If this template is not set, all findings in the image will be
+     * redacted with a black box.
+     * 
+ * + * string image_redact_template = 4; + * @return The bytes for imageRedactTemplate. + */ + public com.google.protobuf.ByteString + getImageRedactTemplateBytes() { + java.lang.Object ref = imageRedactTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageRedactTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Image redact template.
+     * If this template is specified, it will serve as the de-identify template
+     * for images. If this template is not set, all findings in the image will be
+     * redacted with a black box.
+     * 
+ * + * string image_redact_template = 4; + * @param value The imageRedactTemplate to set. + * @return This builder for chaining. + */ + public Builder setImageRedactTemplate( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageRedactTemplate_ = value; + onChanged(); + return this; + } + /** + *
+     * Image redact template.
+     * If this template is specified, it will serve as the de-identify template
+     * for images. If this template is not set, all findings in the image will be
+     * redacted with a black box.
+     * 
+ * + * string image_redact_template = 4; + * @return This builder for chaining. + */ + public Builder clearImageRedactTemplate() { + + imageRedactTemplate_ = getDefaultInstance().getImageRedactTemplate(); + onChanged(); + return this; + } + /** + *
+     * Image redact template.
+     * If this template is specified, it will serve as the de-identify template
+     * for images. If this template is not set, all findings in the image will be
+     * redacted with a black box.
+     * 
+ * + * string image_redact_template = 4; + * @param value The bytes for imageRedactTemplate to set. + * @return This builder for chaining. + */ + public Builder setImageRedactTemplateBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageRedactTemplate_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationConfig) + private static final com.google.privacy.dlp.v2.TransformationConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationConfig(); + } + + public static com.google.privacy.dlp.v2.TransformationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java new file mode 100644 index 000000000000..026ab337bb29 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java @@ -0,0 +1,97 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransformationConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * De-identify template.
+   * If this template is specified, it will serve as the default de-identify
+   * template. This template cannot contain `record_transformations` since it
+   * can be used for unstructured content such as free-form text files. If this
+   * template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
+   * de-identify unstructured content.
+   * 
+ * + * string deidentify_template = 1; + * @return The deidentifyTemplate. + */ + java.lang.String getDeidentifyTemplate(); + /** + *
+   * De-identify template.
+   * If this template is specified, it will serve as the default de-identify
+   * template. This template cannot contain `record_transformations` since it
+   * can be used for unstructured content such as free-form text files. If this
+   * template is not set, a default `ReplaceWithInfoTypeConfig` will be used to
+   * de-identify unstructured content.
+   * 
+ * + * string deidentify_template = 1; + * @return The bytes for deidentifyTemplate. + */ + com.google.protobuf.ByteString + getDeidentifyTemplateBytes(); + + /** + *
+   * Structured de-identify template.
+   * If this template is specified, it will serve as the de-identify template
+   * for structured content such as delimited files and tables. If this template
+   * is not set but the `deidentify_template` is set, then `deidentify_template`
+   * will also apply to the structured content. If neither template is set, a
+   * default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
+   * content.
+   * 
+ * + * string structured_deidentify_template = 2; + * @return The structuredDeidentifyTemplate. + */ + java.lang.String getStructuredDeidentifyTemplate(); + /** + *
+   * Structured de-identify template.
+   * If this template is specified, it will serve as the de-identify template
+   * for structured content such as delimited files and tables. If this template
+   * is not set but the `deidentify_template` is set, then `deidentify_template`
+   * will also apply to the structured content. If neither template is set, a
+   * default `ReplaceWithInfoTypeConfig` will be used to de-identify structured
+   * content.
+   * 
+ * + * string structured_deidentify_template = 2; + * @return The bytes for structuredDeidentifyTemplate. + */ + com.google.protobuf.ByteString + getStructuredDeidentifyTemplateBytes(); + + /** + *
+   * Image redact template.
+   * If this template is specified, it will serve as the de-identify template
+   * for images. If this template is not set, all findings in the image will be
+   * redacted with a black box.
+   * 
+ * + * string image_redact_template = 4; + * @return The imageRedactTemplate. + */ + java.lang.String getImageRedactTemplate(); + /** + *
+   * Image redact template.
+   * If this template is specified, it will serve as the de-identify template
+   * for images. If this template is not set, all findings in the image will be
+   * redacted with a black box.
+   * 
+ * + * string image_redact_template = 4; + * @return The bytes for imageRedactTemplate. + */ + com.google.protobuf.ByteString + getImageRedactTemplateBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java new file mode 100644 index 000000000000..4154463240b6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Describes functionality of a given container in its original format.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.TransformationContainerType} + */ +public enum TransformationContainerType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * TRANSFORM_UNKNOWN_CONTAINER = 0; + */ + TRANSFORM_UNKNOWN_CONTAINER(0), + /** + * TRANSFORM_BODY = 1; + */ + TRANSFORM_BODY(1), + /** + * TRANSFORM_METADATA = 2; + */ + TRANSFORM_METADATA(2), + /** + * TRANSFORM_TABLE = 3; + */ + TRANSFORM_TABLE(3), + UNRECOGNIZED(-1), + ; + + /** + * TRANSFORM_UNKNOWN_CONTAINER = 0; + */ + public static final int TRANSFORM_UNKNOWN_CONTAINER_VALUE = 0; + /** + * TRANSFORM_BODY = 1; + */ + public static final int TRANSFORM_BODY_VALUE = 1; + /** + * TRANSFORM_METADATA = 2; + */ + public static final int TRANSFORM_METADATA_VALUE = 2; + /** + * TRANSFORM_TABLE = 3; + */ + public static final int TRANSFORM_TABLE_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformationContainerType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TransformationContainerType forNumber(int value) { + switch (value) { + case 0: return TRANSFORM_UNKNOWN_CONTAINER; + case 1: return TRANSFORM_BODY; + case 2: return TRANSFORM_METADATA; + case 3: return TRANSFORM_TABLE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TransformationContainerType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransformationContainerType findValueByNumber(int number) { + return TransformationContainerType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(1); + } + + private static final TransformationContainerType[] VALUES = values(); + + public static TransformationContainerType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TransformationContainerType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TransformationContainerType) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java new file mode 100644 index 000000000000..e77be554628e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java @@ -0,0 +1,1200 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A flattened description of a `PrimitiveTransformation` or
+ * `RecordSuppression`.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationDescription} + */ +public final class TransformationDescription extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationDescription) + TransformationDescriptionOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransformationDescription.newBuilder() to construct. + private TransformationDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransformationDescription() { + type_ = 0; + description_ = ""; + condition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransformationDescription(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationDescription( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + condition_ = s; + break; + } + case 34: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (infoType_ != null) { + subBuilder = infoType_.toBuilder(); + } + infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(infoType_); + infoType_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationDescription.class, com.google.privacy.dlp.v2.TransformationDescription.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+   * The transformation type.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+   * The transformation type.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationType type = 1; + * @return The type. + */ + @java.lang.Override public com.google.privacy.dlp.v2.TransformationType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TransformationType result = com.google.privacy.dlp.v2.TransformationType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.TransformationType.UNRECOGNIZED : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + *
+   * A description of the transformation. This is empty for a
+   * RECORD_SUPPRESSION, or is the output of calling toString() on the
+   * `PrimitiveTransformation` protocol buffer message for any other type of
+   * transformation.
+   * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * A description of the transformation. This is empty for a
+   * RECORD_SUPPRESSION, or is the output of calling toString() on the
+   * `PrimitiveTransformation` protocol buffer message for any other type of
+   * transformation.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_FIELD_NUMBER = 3; + private volatile java.lang.Object condition_; + /** + *
+   * A human-readable string representation of the `RecordCondition`
+   * corresponding to this transformation. Set if a `RecordCondition` was used
+   * to determine whether or not to apply this transformation.
+   * Examples:
+   *     * (age_field > 85)
+   *     * (age_field <= 18)
+   *     * (zip_field exists)
+   *     * (zip_field == 01234) && (city_field != "Springville")
+   *     * (zip_field == 01234) && (age_field <= 18) && (city_field exists)
+   * 
+ * + * string condition = 3; + * @return The condition. + */ + @java.lang.Override + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } + } + /** + *
+   * A human-readable string representation of the `RecordCondition`
+   * corresponding to this transformation. Set if a `RecordCondition` was used
+   * to determine whether or not to apply this transformation.
+   * Examples:
+   *     * (age_field > 85)
+   *     * (age_field <= 18)
+   *     * (zip_field exists)
+   *     * (zip_field == 01234) && (city_field != "Springville")
+   *     * (zip_field == 01234) && (age_field <= 18) && (city_field exists)
+   * 
+ * + * string condition = 3; + * @return The bytes for condition. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFO_TYPE_FIELD_NUMBER = 4; + private com.google.privacy.dlp.v2.InfoType infoType_; + /** + *
+   * Set if the transformation was limited to a specific `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return infoType_ != null; + } + /** + *
+   * Set if the transformation was limited to a specific `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + /** + *
+   * Set if the transformation was limited to a specific `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + return getInfoType(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.google.privacy.dlp.v2.TransformationType.TRANSFORMATION_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, condition_); + } + if (infoType_ != null) { + output.writeMessage(4, getInfoType()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.google.privacy.dlp.v2.TransformationType.TRANSFORMATION_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(condition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, condition_); + } + if (infoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getInfoType()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationDescription)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationDescription other = (com.google.privacy.dlp.v2.TransformationDescription) obj; + + if (type_ != other.type_) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getCondition() + .equals(other.getCondition())) return false; + if (hasInfoType() != other.hasInfoType()) return false; + if (hasInfoType()) { + if (!getInfoType() + .equals(other.getInfoType())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + if (hasInfoType()) { + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationDescription prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A flattened description of a `PrimitiveTransformation` or
+   * `RecordSuppression`.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationDescription} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationDescription) + com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationDescription.class, com.google.privacy.dlp.v2.TransformationDescription.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationDescription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + description_ = ""; + + condition_ = ""; + + if (infoTypeBuilder_ == null) { + infoType_ = null; + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDescription getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDescription build() { + com.google.privacy.dlp.v2.TransformationDescription result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDescription buildPartial() { + com.google.privacy.dlp.v2.TransformationDescription result = new com.google.privacy.dlp.v2.TransformationDescription(this); + result.type_ = type_; + result.description_ = description_; + result.condition_ = condition_; + if (infoTypeBuilder_ == null) { + result.infoType_ = infoType_; + } else { + result.infoType_ = infoTypeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationDescription) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationDescription)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationDescription other) { + if (other == com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getCondition().isEmpty()) { + condition_ = other.condition_; + onChanged(); + } + if (other.hasInfoType()) { + mergeInfoType(other.getInfoType()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationDescription parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationDescription) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + *
+     * The transformation type.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationType type = 1; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The transformation type.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationType type = 1; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The transformation type.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationType type = 1; + * @return The type. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationType getType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TransformationType result = com.google.privacy.dlp.v2.TransformationType.valueOf(type_); + return result == null ? com.google.privacy.dlp.v2.TransformationType.UNRECOGNIZED : result; + } + /** + *
+     * The transformation type.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationType type = 1; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.privacy.dlp.v2.TransformationType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The transformation type.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationType type = 1; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * A description of the transformation. This is empty for a
+     * RECORD_SUPPRESSION, or is the output of calling toString() on the
+     * `PrimitiveTransformation` protocol buffer message for any other type of
+     * transformation.
+     * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A description of the transformation. This is empty for a
+     * RECORD_SUPPRESSION, or is the output of calling toString() on the
+     * `PrimitiveTransformation` protocol buffer message for any other type of
+     * transformation.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A description of the transformation. This is empty for a
+     * RECORD_SUPPRESSION, or is the output of calling toString() on the
+     * `PrimitiveTransformation` protocol buffer message for any other type of
+     * transformation.
+     * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * A description of the transformation. This is empty for a
+     * RECORD_SUPPRESSION, or is the output of calling toString() on the
+     * `PrimitiveTransformation` protocol buffer message for any other type of
+     * transformation.
+     * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * A description of the transformation. This is empty for a
+     * RECORD_SUPPRESSION, or is the output of calling toString() on the
+     * `PrimitiveTransformation` protocol buffer message for any other type of
+     * transformation.
+     * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object condition_ = ""; + /** + *
+     * A human-readable string representation of the `RecordCondition`
+     * corresponding to this transformation. Set if a `RecordCondition` was used
+     * to determine whether or not to apply this transformation.
+     * Examples:
+     *     * (age_field > 85)
+     *     * (age_field <= 18)
+     *     * (zip_field exists)
+     *     * (zip_field == 01234) && (city_field != "Springville")
+     *     * (zip_field == 01234) && (age_field <= 18) && (city_field exists)
+     * 
+ * + * string condition = 3; + * @return The condition. + */ + public java.lang.String getCondition() { + java.lang.Object ref = condition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + condition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A human-readable string representation of the `RecordCondition`
+     * corresponding to this transformation. Set if a `RecordCondition` was used
+     * to determine whether or not to apply this transformation.
+     * Examples:
+     *     * (age_field > 85)
+     *     * (age_field <= 18)
+     *     * (zip_field exists)
+     *     * (zip_field == 01234) && (city_field != "Springville")
+     *     * (zip_field == 01234) && (age_field <= 18) && (city_field exists)
+     * 
+ * + * string condition = 3; + * @return The bytes for condition. + */ + public com.google.protobuf.ByteString + getConditionBytes() { + java.lang.Object ref = condition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + condition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A human-readable string representation of the `RecordCondition`
+     * corresponding to this transformation. Set if a `RecordCondition` was used
+     * to determine whether or not to apply this transformation.
+     * Examples:
+     *     * (age_field > 85)
+     *     * (age_field <= 18)
+     *     * (zip_field exists)
+     *     * (zip_field == 01234) && (city_field != "Springville")
+     *     * (zip_field == 01234) && (age_field <= 18) && (city_field exists)
+     * 
+ * + * string condition = 3; + * @param value The condition to set. + * @return This builder for chaining. + */ + public Builder setCondition( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + condition_ = value; + onChanged(); + return this; + } + /** + *
+     * A human-readable string representation of the `RecordCondition`
+     * corresponding to this transformation. Set if a `RecordCondition` was used
+     * to determine whether or not to apply this transformation.
+     * Examples:
+     *     * (age_field > 85)
+     *     * (age_field <= 18)
+     *     * (zip_field exists)
+     *     * (zip_field == 01234) && (city_field != "Springville")
+     *     * (zip_field == 01234) && (age_field <= 18) && (city_field exists)
+     * 
+ * + * string condition = 3; + * @return This builder for chaining. + */ + public Builder clearCondition() { + + condition_ = getDefaultInstance().getCondition(); + onChanged(); + return this; + } + /** + *
+     * A human-readable string representation of the `RecordCondition`
+     * corresponding to this transformation. Set if a `RecordCondition` was used
+     * to determine whether or not to apply this transformation.
+     * Examples:
+     *     * (age_field > 85)
+     *     * (age_field <= 18)
+     *     * (zip_field exists)
+     *     * (zip_field == 01234) && (city_field != "Springville")
+     *     * (zip_field == 01234) && (age_field <= 18) && (city_field exists)
+     * 
+ * + * string condition = 3; + * @param value The bytes for condition to set. + * @return This builder for chaining. + */ + public Builder setConditionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + condition_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.InfoType infoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+     * Set if the transformation was limited to a specific `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + * @return Whether the infoType field is set. + */ + public boolean hasInfoType() { + return infoTypeBuilder_ != null || infoType_ != null; + } + /** + *
+     * Set if the transformation was limited to a specific `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + * @return The infoType. + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } else { + return infoTypeBuilder_.getMessage(); + } + } + /** + *
+     * Set if the transformation was limited to a specific `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infoType_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + infoType_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (infoType_ != null) { + infoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); + } else { + infoType_ = value; + } + onChanged(); + } else { + infoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + infoType_ = null; + onChanged(); + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + + onChanged(); + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * Set if the transformation was limited to a specific `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (infoTypeBuilder_ != null) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + return infoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + } + /** + *
+     * Set if the transformation was limited to a specific `InfoType`.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getInfoType(), + getParentForChildren(), + isClean()); + infoType_ = null; + } + return infoTypeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationDescription) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationDescription) + private static final com.google.privacy.dlp.v2.TransformationDescription DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationDescription(); + } + + public static com.google.privacy.dlp.v2.TransformationDescription getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationDescription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationDescription(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDescription getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java new file mode 100644 index 000000000000..304c5c1daf48 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransformationDescriptionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationDescription) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The transformation type.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationType type = 1; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+   * The transformation type.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationType type = 1; + * @return The type. + */ + com.google.privacy.dlp.v2.TransformationType getType(); + + /** + *
+   * A description of the transformation. This is empty for a
+   * RECORD_SUPPRESSION, or is the output of calling toString() on the
+   * `PrimitiveTransformation` protocol buffer message for any other type of
+   * transformation.
+   * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * A description of the transformation. This is empty for a
+   * RECORD_SUPPRESSION, or is the output of calling toString() on the
+   * `PrimitiveTransformation` protocol buffer message for any other type of
+   * transformation.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * A human-readable string representation of the `RecordCondition`
+   * corresponding to this transformation. Set if a `RecordCondition` was used
+   * to determine whether or not to apply this transformation.
+   * Examples:
+   *     * (age_field > 85)
+   *     * (age_field <= 18)
+   *     * (zip_field exists)
+   *     * (zip_field == 01234) && (city_field != "Springville")
+   *     * (zip_field == 01234) && (age_field <= 18) && (city_field exists)
+   * 
+ * + * string condition = 3; + * @return The condition. + */ + java.lang.String getCondition(); + /** + *
+   * A human-readable string representation of the `RecordCondition`
+   * corresponding to this transformation. Set if a `RecordCondition` was used
+   * to determine whether or not to apply this transformation.
+   * Examples:
+   *     * (age_field > 85)
+   *     * (age_field <= 18)
+   *     * (zip_field exists)
+   *     * (zip_field == 01234) && (city_field != "Springville")
+   *     * (zip_field == 01234) && (age_field <= 18) && (city_field exists)
+   * 
+ * + * string condition = 3; + * @return The bytes for condition. + */ + com.google.protobuf.ByteString + getConditionBytes(); + + /** + *
+   * Set if the transformation was limited to a specific `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+   * Set if the transformation was limited to a specific `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+   * Set if the transformation was limited to a specific `InfoType`.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 4; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java new file mode 100644 index 000000000000..999ba82c59ec --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java @@ -0,0 +1,1894 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Details about a single transformation. This object contains a description of
+ * the transformation, information about whether the transformation was
+ * successfully applied, and the precise location where the transformation
+ * occurred. These details are stored in a user-specified BigQuery table.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationDetails} + */ +public final class TransformationDetails extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationDetails) + TransformationDetailsOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransformationDetails.newBuilder() to construct. + private TransformationDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransformationDetails() { + resourceName_ = ""; + containerName_ = ""; + transformation_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransformationDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationDetails( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + resourceName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + containerName_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transformation_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + transformation_.add( + input.readMessage(com.google.privacy.dlp.v2.TransformationDescription.parser(), extensionRegistry)); + break; + } + case 34: { + com.google.privacy.dlp.v2.TransformationResultStatus.Builder subBuilder = null; + if (statusDetails_ != null) { + subBuilder = statusDetails_.toBuilder(); + } + statusDetails_ = input.readMessage(com.google.privacy.dlp.v2.TransformationResultStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(statusDetails_); + statusDetails_ = subBuilder.buildPartial(); + } + + break; + } + case 40: { + + transformedBytes_ = input.readInt64(); + break; + } + case 50: { + com.google.privacy.dlp.v2.TransformationLocation.Builder subBuilder = null; + if (transformationLocation_ != null) { + subBuilder = transformationLocation_.toBuilder(); + } + transformationLocation_ = input.readMessage(com.google.privacy.dlp.v2.TransformationLocation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transformationLocation_); + transformationLocation_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transformation_ = java.util.Collections.unmodifiableList(transformation_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationDetails.class, com.google.privacy.dlp.v2.TransformationDetails.Builder.class); + } + + public static final int RESOURCE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object resourceName_; + /** + *
+   * The name of the job that completed the transformation.
+   * 
+ * + * string resource_name = 1; + * @return The resourceName. + */ + @java.lang.Override + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } + } + /** + *
+   * The name of the job that completed the transformation.
+   * 
+ * + * string resource_name = 1; + * @return The bytes for resourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object containerName_; + /** + *
+   * The top level name of the container where the transformation is located
+   * (this will be the source file name or table name).
+   * 
+ * + * string container_name = 2; + * @return The containerName. + */ + @java.lang.Override + public java.lang.String getContainerName() { + java.lang.Object ref = containerName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerName_ = s; + return s; + } + } + /** + *
+   * The top level name of the container where the transformation is located
+   * (this will be the source file name or table name).
+   * 
+ * + * string container_name = 2; + * @return The bytes for containerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContainerNameBytes() { + java.lang.Object ref = containerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSFORMATION_FIELD_NUMBER = 3; + private java.util.List transformation_; + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + @java.lang.Override + public java.util.List getTransformationList() { + return transformation_; + } + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + @java.lang.Override + public java.util.List + getTransformationOrBuilderList() { + return transformation_; + } + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + @java.lang.Override + public int getTransformationCount() { + return transformation_.size(); + } + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDescription getTransformation(int index) { + return transformation_.get(index); + } + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransformationOrBuilder( + int index) { + return transformation_.get(index); + } + + public static final int STATUS_DETAILS_FIELD_NUMBER = 4; + private com.google.privacy.dlp.v2.TransformationResultStatus statusDetails_; + /** + *
+   * Status of the transformation, if transformation was not successful, this
+   * will specify what caused it to fail, otherwise it will show that the
+   * transformation was successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * @return Whether the statusDetails field is set. + */ + @java.lang.Override + public boolean hasStatusDetails() { + return statusDetails_ != null; + } + /** + *
+   * Status of the transformation, if transformation was not successful, this
+   * will specify what caused it to fail, otherwise it will show that the
+   * transformation was successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * @return The statusDetails. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationResultStatus getStatusDetails() { + return statusDetails_ == null ? com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance() : statusDetails_; + } + /** + *
+   * Status of the transformation, if transformation was not successful, this
+   * will specify what caused it to fail, otherwise it will show that the
+   * transformation was successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder getStatusDetailsOrBuilder() { + return getStatusDetails(); + } + + public static final int TRANSFORMED_BYTES_FIELD_NUMBER = 5; + private long transformedBytes_; + /** + *
+   * The number of bytes that were transformed. If transformation was
+   * unsuccessful or did not take place because there was no content to
+   * transform, this will be zero.
+   * 
+ * + * int64 transformed_bytes = 5; + * @return The transformedBytes. + */ + @java.lang.Override + public long getTransformedBytes() { + return transformedBytes_; + } + + public static final int TRANSFORMATION_LOCATION_FIELD_NUMBER = 6; + private com.google.privacy.dlp.v2.TransformationLocation transformationLocation_; + /** + *
+   * The precise location of the transformed content in the original container.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * @return Whether the transformationLocation field is set. + */ + @java.lang.Override + public boolean hasTransformationLocation() { + return transformationLocation_ != null; + } + /** + *
+   * The precise location of the transformed content in the original container.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * @return The transformationLocation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationLocation getTransformationLocation() { + return transformationLocation_ == null ? com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance() : transformationLocation_; + } + /** + *
+   * The precise location of the transformed content in the original container.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationLocationOrBuilder getTransformationLocationOrBuilder() { + return getTransformationLocation(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, containerName_); + } + for (int i = 0; i < transformation_.size(); i++) { + output.writeMessage(3, transformation_.get(i)); + } + if (statusDetails_ != null) { + output.writeMessage(4, getStatusDetails()); + } + if (transformedBytes_ != 0L) { + output.writeInt64(5, transformedBytes_); + } + if (transformationLocation_ != null) { + output.writeMessage(6, getTransformationLocation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerName_); + } + for (int i = 0; i < transformation_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, transformation_.get(i)); + } + if (statusDetails_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getStatusDetails()); + } + if (transformedBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, transformedBytes_); + } + if (transformationLocation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getTransformationLocation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationDetails)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationDetails other = (com.google.privacy.dlp.v2.TransformationDetails) obj; + + if (!getResourceName() + .equals(other.getResourceName())) return false; + if (!getContainerName() + .equals(other.getContainerName())) return false; + if (!getTransformationList() + .equals(other.getTransformationList())) return false; + if (hasStatusDetails() != other.hasStatusDetails()) return false; + if (hasStatusDetails()) { + if (!getStatusDetails() + .equals(other.getStatusDetails())) return false; + } + if (getTransformedBytes() + != other.getTransformedBytes()) return false; + if (hasTransformationLocation() != other.hasTransformationLocation()) return false; + if (hasTransformationLocation()) { + if (!getTransformationLocation() + .equals(other.getTransformationLocation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getResourceName().hashCode(); + hash = (37 * hash) + CONTAINER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getContainerName().hashCode(); + if (getTransformationCount() > 0) { + hash = (37 * hash) + TRANSFORMATION_FIELD_NUMBER; + hash = (53 * hash) + getTransformationList().hashCode(); + } + if (hasStatusDetails()) { + hash = (37 * hash) + STATUS_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getStatusDetails().hashCode(); + } + hash = (37 * hash) + TRANSFORMED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTransformedBytes()); + if (hasTransformationLocation()) { + hash = (37 * hash) + TRANSFORMATION_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getTransformationLocation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details about a single transformation. This object contains a description of
+   * the transformation, information about whether the transformation was
+   * successfully applied, and the precise location where the transformation
+   * occurred. These details are stored in a user-specified BigQuery table.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationDetails} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationDetails) + com.google.privacy.dlp.v2.TransformationDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationDetails.class, com.google.privacy.dlp.v2.TransformationDetails.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTransformationFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + resourceName_ = ""; + + containerName_ = ""; + + if (transformationBuilder_ == null) { + transformation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transformationBuilder_.clear(); + } + if (statusDetailsBuilder_ == null) { + statusDetails_ = null; + } else { + statusDetails_ = null; + statusDetailsBuilder_ = null; + } + transformedBytes_ = 0L; + + if (transformationLocationBuilder_ == null) { + transformationLocation_ = null; + } else { + transformationLocation_ = null; + transformationLocationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetails getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetails build() { + com.google.privacy.dlp.v2.TransformationDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetails buildPartial() { + com.google.privacy.dlp.v2.TransformationDetails result = new com.google.privacy.dlp.v2.TransformationDetails(this); + int from_bitField0_ = bitField0_; + result.resourceName_ = resourceName_; + result.containerName_ = containerName_; + if (transformationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transformation_ = java.util.Collections.unmodifiableList(transformation_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transformation_ = transformation_; + } else { + result.transformation_ = transformationBuilder_.build(); + } + if (statusDetailsBuilder_ == null) { + result.statusDetails_ = statusDetails_; + } else { + result.statusDetails_ = statusDetailsBuilder_.build(); + } + result.transformedBytes_ = transformedBytes_; + if (transformationLocationBuilder_ == null) { + result.transformationLocation_ = transformationLocation_; + } else { + result.transformationLocation_ = transformationLocationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationDetails) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationDetails)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationDetails other) { + if (other == com.google.privacy.dlp.v2.TransformationDetails.getDefaultInstance()) return this; + if (!other.getResourceName().isEmpty()) { + resourceName_ = other.resourceName_; + onChanged(); + } + if (!other.getContainerName().isEmpty()) { + containerName_ = other.containerName_; + onChanged(); + } + if (transformationBuilder_ == null) { + if (!other.transformation_.isEmpty()) { + if (transformation_.isEmpty()) { + transformation_ = other.transformation_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransformationIsMutable(); + transformation_.addAll(other.transformation_); + } + onChanged(); + } + } else { + if (!other.transformation_.isEmpty()) { + if (transformationBuilder_.isEmpty()) { + transformationBuilder_.dispose(); + transformationBuilder_ = null; + transformation_ = other.transformation_; + bitField0_ = (bitField0_ & ~0x00000001); + transformationBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTransformationFieldBuilder() : null; + } else { + transformationBuilder_.addAllMessages(other.transformation_); + } + } + } + if (other.hasStatusDetails()) { + mergeStatusDetails(other.getStatusDetails()); + } + if (other.getTransformedBytes() != 0L) { + setTransformedBytes(other.getTransformedBytes()); + } + if (other.hasTransformationLocation()) { + mergeTransformationLocation(other.getTransformationLocation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object resourceName_ = ""; + /** + *
+     * The name of the job that completed the transformation.
+     * 
+ * + * string resource_name = 1; + * @return The resourceName. + */ + public java.lang.String getResourceName() { + java.lang.Object ref = resourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the job that completed the transformation.
+     * 
+ * + * string resource_name = 1; + * @return The bytes for resourceName. + */ + public com.google.protobuf.ByteString + getResourceNameBytes() { + java.lang.Object ref = resourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the job that completed the transformation.
+     * 
+ * + * string resource_name = 1; + * @param value The resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceName_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the job that completed the transformation.
+     * 
+ * + * string resource_name = 1; + * @return This builder for chaining. + */ + public Builder clearResourceName() { + + resourceName_ = getDefaultInstance().getResourceName(); + onChanged(); + return this; + } + /** + *
+     * The name of the job that completed the transformation.
+     * 
+ * + * string resource_name = 1; + * @param value The bytes for resourceName to set. + * @return This builder for chaining. + */ + public Builder setResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object containerName_ = ""; + /** + *
+     * The top level name of the container where the transformation is located
+     * (this will be the source file name or table name).
+     * 
+ * + * string container_name = 2; + * @return The containerName. + */ + public java.lang.String getContainerName() { + java.lang.Object ref = containerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The top level name of the container where the transformation is located
+     * (this will be the source file name or table name).
+     * 
+ * + * string container_name = 2; + * @return The bytes for containerName. + */ + public com.google.protobuf.ByteString + getContainerNameBytes() { + java.lang.Object ref = containerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The top level name of the container where the transformation is located
+     * (this will be the source file name or table name).
+     * 
+ * + * string container_name = 2; + * @param value The containerName to set. + * @return This builder for chaining. + */ + public Builder setContainerName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerName_ = value; + onChanged(); + return this; + } + /** + *
+     * The top level name of the container where the transformation is located
+     * (this will be the source file name or table name).
+     * 
+ * + * string container_name = 2; + * @return This builder for chaining. + */ + public Builder clearContainerName() { + + containerName_ = getDefaultInstance().getContainerName(); + onChanged(); + return this; + } + /** + *
+     * The top level name of the container where the transformation is located
+     * (this will be the source file name or table name).
+     * 
+ * + * string container_name = 2; + * @param value The bytes for containerName to set. + * @return This builder for chaining. + */ + public Builder setContainerNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerName_ = value; + onChanged(); + return this; + } + + private java.util.List transformation_ = + java.util.Collections.emptyList(); + private void ensureTransformationIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transformation_ = new java.util.ArrayList(transformation_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationDescription, com.google.privacy.dlp.v2.TransformationDescription.Builder, com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder> transformationBuilder_; + + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public java.util.List getTransformationList() { + if (transformationBuilder_ == null) { + return java.util.Collections.unmodifiableList(transformation_); + } else { + return transformationBuilder_.getMessageList(); + } + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public int getTransformationCount() { + if (transformationBuilder_ == null) { + return transformation_.size(); + } else { + return transformationBuilder_.getCount(); + } + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public com.google.privacy.dlp.v2.TransformationDescription getTransformation(int index) { + if (transformationBuilder_ == null) { + return transformation_.get(index); + } else { + return transformationBuilder_.getMessage(index); + } + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public Builder setTransformation( + int index, com.google.privacy.dlp.v2.TransformationDescription value) { + if (transformationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationIsMutable(); + transformation_.set(index, value); + onChanged(); + } else { + transformationBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public Builder setTransformation( + int index, com.google.privacy.dlp.v2.TransformationDescription.Builder builderForValue) { + if (transformationBuilder_ == null) { + ensureTransformationIsMutable(); + transformation_.set(index, builderForValue.build()); + onChanged(); + } else { + transformationBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public Builder addTransformation(com.google.privacy.dlp.v2.TransformationDescription value) { + if (transformationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationIsMutable(); + transformation_.add(value); + onChanged(); + } else { + transformationBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public Builder addTransformation( + int index, com.google.privacy.dlp.v2.TransformationDescription value) { + if (transformationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationIsMutable(); + transformation_.add(index, value); + onChanged(); + } else { + transformationBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public Builder addTransformation( + com.google.privacy.dlp.v2.TransformationDescription.Builder builderForValue) { + if (transformationBuilder_ == null) { + ensureTransformationIsMutable(); + transformation_.add(builderForValue.build()); + onChanged(); + } else { + transformationBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public Builder addTransformation( + int index, com.google.privacy.dlp.v2.TransformationDescription.Builder builderForValue) { + if (transformationBuilder_ == null) { + ensureTransformationIsMutable(); + transformation_.add(index, builderForValue.build()); + onChanged(); + } else { + transformationBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public Builder addAllTransformation( + java.lang.Iterable values) { + if (transformationBuilder_ == null) { + ensureTransformationIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, transformation_); + onChanged(); + } else { + transformationBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public Builder clearTransformation() { + if (transformationBuilder_ == null) { + transformation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transformationBuilder_.clear(); + } + return this; + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public Builder removeTransformation(int index) { + if (transformationBuilder_ == null) { + ensureTransformationIsMutable(); + transformation_.remove(index); + onChanged(); + } else { + transformationBuilder_.remove(index); + } + return this; + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public com.google.privacy.dlp.v2.TransformationDescription.Builder getTransformationBuilder( + int index) { + return getTransformationFieldBuilder().getBuilder(index); + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransformationOrBuilder( + int index) { + if (transformationBuilder_ == null) { + return transformation_.get(index); } else { + return transformationBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public java.util.List + getTransformationOrBuilderList() { + if (transformationBuilder_ != null) { + return transformationBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transformation_); + } + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public com.google.privacy.dlp.v2.TransformationDescription.Builder addTransformationBuilder() { + return getTransformationFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance()); + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public com.google.privacy.dlp.v2.TransformationDescription.Builder addTransformationBuilder( + int index) { + return getTransformationFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance()); + } + /** + *
+     * Description of transformation. This would only contain more than one
+     * element if there were multiple matching transformations and which one to
+     * apply was ambiguous. Not set for states that contain no transformation,
+     * currently only state that contains no transformation is
+     * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + public java.util.List + getTransformationBuilderList() { + return getTransformationFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationDescription, com.google.privacy.dlp.v2.TransformationDescription.Builder, com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder> + getTransformationFieldBuilder() { + if (transformationBuilder_ == null) { + transformationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationDescription, com.google.privacy.dlp.v2.TransformationDescription.Builder, com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder>( + transformation_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transformation_ = null; + } + return transformationBuilder_; + } + + private com.google.privacy.dlp.v2.TransformationResultStatus statusDetails_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationResultStatus, com.google.privacy.dlp.v2.TransformationResultStatus.Builder, com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder> statusDetailsBuilder_; + /** + *
+     * Status of the transformation, if transformation was not successful, this
+     * will specify what caused it to fail, otherwise it will show that the
+     * transformation was successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * @return Whether the statusDetails field is set. + */ + public boolean hasStatusDetails() { + return statusDetailsBuilder_ != null || statusDetails_ != null; + } + /** + *
+     * Status of the transformation, if transformation was not successful, this
+     * will specify what caused it to fail, otherwise it will show that the
+     * transformation was successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * @return The statusDetails. + */ + public com.google.privacy.dlp.v2.TransformationResultStatus getStatusDetails() { + if (statusDetailsBuilder_ == null) { + return statusDetails_ == null ? com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance() : statusDetails_; + } else { + return statusDetailsBuilder_.getMessage(); + } + } + /** + *
+     * Status of the transformation, if transformation was not successful, this
+     * will specify what caused it to fail, otherwise it will show that the
+     * transformation was successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + */ + public Builder setStatusDetails(com.google.privacy.dlp.v2.TransformationResultStatus value) { + if (statusDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + statusDetails_ = value; + onChanged(); + } else { + statusDetailsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Status of the transformation, if transformation was not successful, this
+     * will specify what caused it to fail, otherwise it will show that the
+     * transformation was successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + */ + public Builder setStatusDetails( + com.google.privacy.dlp.v2.TransformationResultStatus.Builder builderForValue) { + if (statusDetailsBuilder_ == null) { + statusDetails_ = builderForValue.build(); + onChanged(); + } else { + statusDetailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Status of the transformation, if transformation was not successful, this
+     * will specify what caused it to fail, otherwise it will show that the
+     * transformation was successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + */ + public Builder mergeStatusDetails(com.google.privacy.dlp.v2.TransformationResultStatus value) { + if (statusDetailsBuilder_ == null) { + if (statusDetails_ != null) { + statusDetails_ = + com.google.privacy.dlp.v2.TransformationResultStatus.newBuilder(statusDetails_).mergeFrom(value).buildPartial(); + } else { + statusDetails_ = value; + } + onChanged(); + } else { + statusDetailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Status of the transformation, if transformation was not successful, this
+     * will specify what caused it to fail, otherwise it will show that the
+     * transformation was successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + */ + public Builder clearStatusDetails() { + if (statusDetailsBuilder_ == null) { + statusDetails_ = null; + onChanged(); + } else { + statusDetails_ = null; + statusDetailsBuilder_ = null; + } + + return this; + } + /** + *
+     * Status of the transformation, if transformation was not successful, this
+     * will specify what caused it to fail, otherwise it will show that the
+     * transformation was successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + */ + public com.google.privacy.dlp.v2.TransformationResultStatus.Builder getStatusDetailsBuilder() { + + onChanged(); + return getStatusDetailsFieldBuilder().getBuilder(); + } + /** + *
+     * Status of the transformation, if transformation was not successful, this
+     * will specify what caused it to fail, otherwise it will show that the
+     * transformation was successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + */ + public com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder getStatusDetailsOrBuilder() { + if (statusDetailsBuilder_ != null) { + return statusDetailsBuilder_.getMessageOrBuilder(); + } else { + return statusDetails_ == null ? + com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance() : statusDetails_; + } + } + /** + *
+     * Status of the transformation, if transformation was not successful, this
+     * will specify what caused it to fail, otherwise it will show that the
+     * transformation was successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationResultStatus, com.google.privacy.dlp.v2.TransformationResultStatus.Builder, com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder> + getStatusDetailsFieldBuilder() { + if (statusDetailsBuilder_ == null) { + statusDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationResultStatus, com.google.privacy.dlp.v2.TransformationResultStatus.Builder, com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder>( + getStatusDetails(), + getParentForChildren(), + isClean()); + statusDetails_ = null; + } + return statusDetailsBuilder_; + } + + private long transformedBytes_ ; + /** + *
+     * The number of bytes that were transformed. If transformation was
+     * unsuccessful or did not take place because there was no content to
+     * transform, this will be zero.
+     * 
+ * + * int64 transformed_bytes = 5; + * @return The transformedBytes. + */ + @java.lang.Override + public long getTransformedBytes() { + return transformedBytes_; + } + /** + *
+     * The number of bytes that were transformed. If transformation was
+     * unsuccessful or did not take place because there was no content to
+     * transform, this will be zero.
+     * 
+ * + * int64 transformed_bytes = 5; + * @param value The transformedBytes to set. + * @return This builder for chaining. + */ + public Builder setTransformedBytes(long value) { + + transformedBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * The number of bytes that were transformed. If transformation was
+     * unsuccessful or did not take place because there was no content to
+     * transform, this will be zero.
+     * 
+ * + * int64 transformed_bytes = 5; + * @return This builder for chaining. + */ + public Builder clearTransformedBytes() { + + transformedBytes_ = 0L; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.TransformationLocation transformationLocation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationLocation, com.google.privacy.dlp.v2.TransformationLocation.Builder, com.google.privacy.dlp.v2.TransformationLocationOrBuilder> transformationLocationBuilder_; + /** + *
+     * The precise location of the transformed content in the original container.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * @return Whether the transformationLocation field is set. + */ + public boolean hasTransformationLocation() { + return transformationLocationBuilder_ != null || transformationLocation_ != null; + } + /** + *
+     * The precise location of the transformed content in the original container.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * @return The transformationLocation. + */ + public com.google.privacy.dlp.v2.TransformationLocation getTransformationLocation() { + if (transformationLocationBuilder_ == null) { + return transformationLocation_ == null ? com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance() : transformationLocation_; + } else { + return transformationLocationBuilder_.getMessage(); + } + } + /** + *
+     * The precise location of the transformed content in the original container.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + */ + public Builder setTransformationLocation(com.google.privacy.dlp.v2.TransformationLocation value) { + if (transformationLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationLocation_ = value; + onChanged(); + } else { + transformationLocationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The precise location of the transformed content in the original container.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + */ + public Builder setTransformationLocation( + com.google.privacy.dlp.v2.TransformationLocation.Builder builderForValue) { + if (transformationLocationBuilder_ == null) { + transformationLocation_ = builderForValue.build(); + onChanged(); + } else { + transformationLocationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The precise location of the transformed content in the original container.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + */ + public Builder mergeTransformationLocation(com.google.privacy.dlp.v2.TransformationLocation value) { + if (transformationLocationBuilder_ == null) { + if (transformationLocation_ != null) { + transformationLocation_ = + com.google.privacy.dlp.v2.TransformationLocation.newBuilder(transformationLocation_).mergeFrom(value).buildPartial(); + } else { + transformationLocation_ = value; + } + onChanged(); + } else { + transformationLocationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The precise location of the transformed content in the original container.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + */ + public Builder clearTransformationLocation() { + if (transformationLocationBuilder_ == null) { + transformationLocation_ = null; + onChanged(); + } else { + transformationLocation_ = null; + transformationLocationBuilder_ = null; + } + + return this; + } + /** + *
+     * The precise location of the transformed content in the original container.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + */ + public com.google.privacy.dlp.v2.TransformationLocation.Builder getTransformationLocationBuilder() { + + onChanged(); + return getTransformationLocationFieldBuilder().getBuilder(); + } + /** + *
+     * The precise location of the transformed content in the original container.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + */ + public com.google.privacy.dlp.v2.TransformationLocationOrBuilder getTransformationLocationOrBuilder() { + if (transformationLocationBuilder_ != null) { + return transformationLocationBuilder_.getMessageOrBuilder(); + } else { + return transformationLocation_ == null ? + com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance() : transformationLocation_; + } + } + /** + *
+     * The precise location of the transformed content in the original container.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationLocation, com.google.privacy.dlp.v2.TransformationLocation.Builder, com.google.privacy.dlp.v2.TransformationLocationOrBuilder> + getTransformationLocationFieldBuilder() { + if (transformationLocationBuilder_ == null) { + transformationLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationLocation, com.google.privacy.dlp.v2.TransformationLocation.Builder, com.google.privacy.dlp.v2.TransformationLocationOrBuilder>( + getTransformationLocation(), + getParentForChildren(), + isClean()); + transformationLocation_ = null; + } + return transformationLocationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationDetails) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationDetails) + private static final com.google.privacy.dlp.v2.TransformationDetails DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationDetails(); + } + + public static com.google.privacy.dlp.v2.TransformationDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationDetails(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java new file mode 100644 index 000000000000..01f49cd09ca2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransformationDetailsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationDetails) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the job that completed the transformation.
+   * 
+ * + * string resource_name = 1; + * @return The resourceName. + */ + java.lang.String getResourceName(); + /** + *
+   * The name of the job that completed the transformation.
+   * 
+ * + * string resource_name = 1; + * @return The bytes for resourceName. + */ + com.google.protobuf.ByteString + getResourceNameBytes(); + + /** + *
+   * The top level name of the container where the transformation is located
+   * (this will be the source file name or table name).
+   * 
+ * + * string container_name = 2; + * @return The containerName. + */ + java.lang.String getContainerName(); + /** + *
+   * The top level name of the container where the transformation is located
+   * (this will be the source file name or table name).
+   * 
+ * + * string container_name = 2; + * @return The bytes for containerName. + */ + com.google.protobuf.ByteString + getContainerNameBytes(); + + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + java.util.List + getTransformationList(); + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + com.google.privacy.dlp.v2.TransformationDescription getTransformation(int index); + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + int getTransformationCount(); + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + java.util.List + getTransformationOrBuilderList(); + /** + *
+   * Description of transformation. This would only contain more than one
+   * element if there were multiple matching transformations and which one to
+   * apply was ambiguous. Not set for states that contain no transformation,
+   * currently only state that contains no transformation is
+   * TransformationResultStateType.METADATA_UNRETRIEVABLE.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3; + */ + com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransformationOrBuilder( + int index); + + /** + *
+   * Status of the transformation, if transformation was not successful, this
+   * will specify what caused it to fail, otherwise it will show that the
+   * transformation was successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * @return Whether the statusDetails field is set. + */ + boolean hasStatusDetails(); + /** + *
+   * Status of the transformation, if transformation was not successful, this
+   * will specify what caused it to fail, otherwise it will show that the
+   * transformation was successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * @return The statusDetails. + */ + com.google.privacy.dlp.v2.TransformationResultStatus getStatusDetails(); + /** + *
+   * Status of the transformation, if transformation was not successful, this
+   * will specify what caused it to fail, otherwise it will show that the
+   * transformation was successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + */ + com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder getStatusDetailsOrBuilder(); + + /** + *
+   * The number of bytes that were transformed. If transformation was
+   * unsuccessful or did not take place because there was no content to
+   * transform, this will be zero.
+   * 
+ * + * int64 transformed_bytes = 5; + * @return The transformedBytes. + */ + long getTransformedBytes(); + + /** + *
+   * The precise location of the transformed content in the original container.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * @return Whether the transformationLocation field is set. + */ + boolean hasTransformationLocation(); + /** + *
+   * The precise location of the transformed content in the original container.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * @return The transformationLocation. + */ + com.google.privacy.dlp.v2.TransformationLocation getTransformationLocation(); + /** + *
+   * The precise location of the transformed content in the original container.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + */ + com.google.privacy.dlp.v2.TransformationLocationOrBuilder getTransformationLocationOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java new file mode 100644 index 000000000000..8a947da68aa2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java @@ -0,0 +1,821 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Config for storing transformation details.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationDetailsStorageConfig} + */ +public final class TransformationDetailsStorageConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationDetailsStorageConfig) + TransformationDetailsStorageConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransformationDetailsStorageConfig.newBuilder() to construct. + private TransformationDetailsStorageConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransformationDetailsStorageConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransformationDetailsStorageConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationDetailsStorageConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (typeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.BigQueryTable) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryTable) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.class, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TABLE(1), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return TABLE; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int TABLE_FIELD_NUMBER = 1; + /** + *
+   * The BigQuery table in which to store the output. This may be an existing
+   * table or in a new table in an existing dataset.
+   * If table_id is not set a new one will be generated for you with the
+   * following format:
+   * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+   * time zone will be used for generating the date details.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return typeCase_ == 1; + } + /** + *
+   * The BigQuery table in which to store the output. This may be an existing
+   * table or in a new table in an existing dataset.
+   * If table_id is not set a new one will be generated for you with the
+   * following format:
+   * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+   * time zone will be used for generating the date details.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return The table. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.BigQueryTable) type_; + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + /** + *
+   * The BigQuery table in which to store the output. This may be an existing
+   * table or in a new table in an existing dataset.
+   * If table_id is not set a new one will be generated for you with the
+   * following format:
+   * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+   * time zone will be used for generating the date details.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.BigQueryTable) type_; + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.BigQueryTable) type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.BigQueryTable) type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationDetailsStorageConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig other = (com.google.privacy.dlp.v2.TransformationDetailsStorageConfig) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getTable() + .equals(other.getTable())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Config for storing transformation details.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationDetailsStorageConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationDetailsStorageConfig) + com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.class, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig build() { + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig buildPartial() { + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig result = new com.google.privacy.dlp.v2.TransformationDetailsStorageConfig(this); + if (typeCase_ == 1) { + if (tableBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = tableBuilder_.build(); + } + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationDetailsStorageConfig) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationDetailsStorageConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig other) { + if (other == com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance()) return this; + switch (other.getTypeCase()) { + case TABLE: { + mergeTable(other.getTable()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationDetailsStorageConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; + /** + *
+     * The BigQuery table in which to store the output. This may be an existing
+     * table or in a new table in an existing dataset.
+     * If table_id is not set a new one will be generated for you with the
+     * following format:
+     * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+     * time zone will be used for generating the date details.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return typeCase_ == 1; + } + /** + *
+     * The BigQuery table in which to store the output. This may be an existing
+     * table or in a new table in an existing dataset.
+     * If table_id is not set a new one will be generated for you with the
+     * following format:
+     * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+     * time zone will be used for generating the date details.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return The table. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + if (tableBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.BigQueryTable) type_; + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return tableBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + } + /** + *
+     * The BigQuery table in which to store the output. This may be an existing
+     * table or in a new table in an existing dataset.
+     * If table_id is not set a new one will be generated for you with the
+     * following format:
+     * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+     * time zone will be used for generating the date details.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + tableBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + *
+     * The BigQuery table in which to store the output. This may be an existing
+     * table or in a new table in an existing dataset.
+     * If table_id is not set a new one will be generated for you with the
+     * following format:
+     * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+     * time zone will be used for generating the date details.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder setTable( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (tableBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + tableBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + *
+     * The BigQuery table in which to store the output. This may be an existing
+     * table or in a new table in an existing dataset.
+     * If table_id is not set a new one will be generated for you with the
+     * following format:
+     * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+     * time zone will be used for generating the date details.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (typeCase_ == 1 && + type_ != com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.BigQueryTable.newBuilder((com.google.privacy.dlp.v2.BigQueryTable) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + tableBuilder_.mergeFrom(value); + } else { + tableBuilder_.setMessage(value); + } + } + typeCase_ = 1; + return this; + } + /** + *
+     * The BigQuery table in which to store the output. This may be an existing
+     * table or in a new table in an existing dataset.
+     * If table_id is not set a new one will be generated for you with the
+     * following format:
+     * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+     * time zone will be used for generating the date details.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + tableBuilder_.clear(); + } + return this; + } + /** + *
+     * The BigQuery table in which to store the output. This may be an existing
+     * table or in a new table in an existing dataset.
+     * If table_id is not set a new one will be generated for you with the
+     * following format:
+     * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+     * time zone will be used for generating the date details.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { + return getTableFieldBuilder().getBuilder(); + } + /** + *
+     * The BigQuery table in which to store the output. This may be an existing
+     * table or in a new table in an existing dataset.
+     * If table_id is not set a new one will be generated for you with the
+     * following format:
+     * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+     * time zone will be used for generating the date details.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + if ((typeCase_ == 1) && (tableBuilder_ != null)) { + return tableBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.BigQueryTable) type_; + } + return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + } + /** + *
+     * The BigQuery table in which to store the output. This may be an existing
+     * table or in a new table in an existing dataset.
+     * If table_id is not set a new one will be generated for you with the
+     * following format:
+     * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+     * time zone will be used for generating the date details.
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); + } + tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + (com.google.privacy.dlp.v2.BigQueryTable) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged();; + return tableBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationDetailsStorageConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationDetailsStorageConfig) + private static final com.google.privacy.dlp.v2.TransformationDetailsStorageConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationDetailsStorageConfig(); + } + + public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationDetailsStorageConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationDetailsStorageConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java new file mode 100644 index 000000000000..4c06560d6be8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransformationDetailsStorageConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationDetailsStorageConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The BigQuery table in which to store the output. This may be an existing
+   * table or in a new table in an existing dataset.
+   * If table_id is not set a new one will be generated for you with the
+   * following format:
+   * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+   * time zone will be used for generating the date details.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return Whether the table field is set. + */ + boolean hasTable(); + /** + *
+   * The BigQuery table in which to store the output. This may be an existing
+   * table or in a new table in an existing dataset.
+   * If table_id is not set a new one will be generated for you with the
+   * following format:
+   * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+   * time zone will be used for generating the date details.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + * @return The table. + */ + com.google.privacy.dlp.v2.BigQueryTable getTable(); + /** + *
+   * The BigQuery table in which to store the output. This may be an existing
+   * table or in a new table in an existing dataset.
+   * If table_id is not set a new one will be generated for you with the
+   * following format:
+   * dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific
+   * time zone will be used for generating the date details.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 1; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); + + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandling.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandling.java new file mode 100644 index 000000000000..715e5b5afde7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandling.java @@ -0,0 +1,1900 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * How to handle transformation errors during de-identification. A
+ * transformation error occurs when the requested transformation is incompatible
+ * with the data. For example, trying to de-identify an IP address using a
+ * `DateShift` transformation would result in a transformation error, since date
+ * info cannot be extracted from an IP address.
+ * Information about any incompatible transformations, and how they were
+ * handled, is returned in the response as part of the
+ * `TransformationOverviews`.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling} + */ +public final class TransformationErrorHandling extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationErrorHandling) + TransformationErrorHandlingOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransformationErrorHandling.newBuilder() to construct. + private TransformationErrorHandling(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransformationErrorHandling() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransformationErrorHandling(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationErrorHandling( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder subBuilder = null; + if (modeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_).toBuilder(); + } + mode_ = + input.readMessage(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_); + mode_ = subBuilder.buildPartial(); + } + modeCase_ = 1; + break; + } + case 18: { + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder subBuilder = null; + if (modeCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_).toBuilder(); + } + mode_ = + input.readMessage(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_); + mode_ = subBuilder.buildPartial(); + } + modeCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationErrorHandling.class, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder.class); + } + + public interface ThrowErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Throw an error and fail the request when a transformation error occurs.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} + */ + public static final class ThrowError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) + ThrowErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use ThrowError.newBuilder() to construct. + private ThrowError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ThrowError() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ThrowError(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ThrowError( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.class, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError other = (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Throw an error and fail the request when a transformation error occurs.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.class, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError build() { + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError buildPartial() { + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError result = new com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError other) { + if (other == com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) + private static final com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError(); + } + + public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ThrowError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ThrowError(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LeaveUntransformedOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Skips the data without modifying it if the requested transformation would
+   * cause an error. For example, if a `DateShift` transformation were applied
+   * an an IP address, this mode would leave the IP address unchanged in the
+   * response.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} + */ + public static final class LeaveUntransformed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) + LeaveUntransformedOrBuilder { + private static final long serialVersionUID = 0L; + // Use LeaveUntransformed.newBuilder() to construct. + private LeaveUntransformed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LeaveUntransformed() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LeaveUntransformed(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LeaveUntransformed( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.class, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed other = (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Skips the data without modifying it if the requested transformation would
+     * cause an error. For example, if a `DateShift` transformation were applied
+     * an an IP address, this mode would leave the IP address unchanged in the
+     * response.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.class, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed build() { + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed buildPartial() { + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed result = new com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed other) { + if (other == com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) + private static final com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed(); + } + + public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LeaveUntransformed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LeaveUntransformed(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int modeCase_ = 0; + private java.lang.Object mode_; + public enum ModeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + THROW_ERROR(1), + LEAVE_UNTRANSFORMED(2), + MODE_NOT_SET(0); + private final int value; + private ModeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ModeCase valueOf(int value) { + return forNumber(value); + } + + public static ModeCase forNumber(int value) { + switch (value) { + case 1: return THROW_ERROR; + case 2: return LEAVE_UNTRANSFORMED; + case 0: return MODE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ModeCase + getModeCase() { + return ModeCase.forNumber( + modeCase_); + } + + public static final int THROW_ERROR_FIELD_NUMBER = 1; + /** + *
+   * Throw an error
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + * @return Whether the throwError field is set. + */ + @java.lang.Override + public boolean hasThrowError() { + return modeCase_ == 1; + } + /** + *
+   * Throw an error
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + * @return The throwError. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getThrowError() { + if (modeCase_ == 1) { + return (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_; + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); + } + /** + *
+   * Throw an error
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder getThrowErrorOrBuilder() { + if (modeCase_ == 1) { + return (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_; + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); + } + + public static final int LEAVE_UNTRANSFORMED_FIELD_NUMBER = 2; + /** + *
+   * Ignore errors
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + * @return Whether the leaveUntransformed field is set. + */ + @java.lang.Override + public boolean hasLeaveUntransformed() { + return modeCase_ == 2; + } + /** + *
+   * Ignore errors
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + * @return The leaveUntransformed. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getLeaveUntransformed() { + if (modeCase_ == 2) { + return (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_; + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); + } + /** + *
+   * Ignore errors
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder getLeaveUntransformedOrBuilder() { + if (modeCase_ == 2) { + return (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_; + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (modeCase_ == 1) { + output.writeMessage(1, (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_); + } + if (modeCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_); + } + if (modeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationErrorHandling)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationErrorHandling other = (com.google.privacy.dlp.v2.TransformationErrorHandling) obj; + + if (!getModeCase().equals(other.getModeCase())) return false; + switch (modeCase_) { + case 1: + if (!getThrowError() + .equals(other.getThrowError())) return false; + break; + case 2: + if (!getLeaveUntransformed() + .equals(other.getLeaveUntransformed())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (modeCase_) { + case 1: + hash = (37 * hash) + THROW_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getThrowError().hashCode(); + break; + case 2: + hash = (37 * hash) + LEAVE_UNTRANSFORMED_FIELD_NUMBER; + hash = (53 * hash) + getLeaveUntransformed().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationErrorHandling prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * How to handle transformation errors during de-identification. A
+   * transformation error occurs when the requested transformation is incompatible
+   * with the data. For example, trying to de-identify an IP address using a
+   * `DateShift` transformation would result in a transformation error, since date
+   * info cannot be extracted from an IP address.
+   * Information about any incompatible transformations, and how they were
+   * handled, is returned in the response as part of the
+   * `TransformationOverviews`.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationErrorHandling) + com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationErrorHandling.class, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationErrorHandling.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + modeCase_ = 0; + mode_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling build() { + com.google.privacy.dlp.v2.TransformationErrorHandling result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling buildPartial() { + com.google.privacy.dlp.v2.TransformationErrorHandling result = new com.google.privacy.dlp.v2.TransformationErrorHandling(this); + if (modeCase_ == 1) { + if (throwErrorBuilder_ == null) { + result.mode_ = mode_; + } else { + result.mode_ = throwErrorBuilder_.build(); + } + } + if (modeCase_ == 2) { + if (leaveUntransformedBuilder_ == null) { + result.mode_ = mode_; + } else { + result.mode_ = leaveUntransformedBuilder_.build(); + } + } + result.modeCase_ = modeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationErrorHandling) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationErrorHandling other) { + if (other == com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance()) return this; + switch (other.getModeCase()) { + case THROW_ERROR: { + mergeThrowError(other.getThrowError()); + break; + } + case LEAVE_UNTRANSFORMED: { + mergeLeaveUntransformed(other.getLeaveUntransformed()); + break; + } + case MODE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationErrorHandling parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationErrorHandling) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int modeCase_ = 0; + private java.lang.Object mode_; + public ModeCase + getModeCase() { + return ModeCase.forNumber( + modeCase_); + } + + public Builder clearMode() { + modeCase_ = 0; + mode_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder> throwErrorBuilder_; + /** + *
+     * Throw an error
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + * @return Whether the throwError field is set. + */ + @java.lang.Override + public boolean hasThrowError() { + return modeCase_ == 1; + } + /** + *
+     * Throw an error
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + * @return The throwError. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getThrowError() { + if (throwErrorBuilder_ == null) { + if (modeCase_ == 1) { + return (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_; + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); + } else { + if (modeCase_ == 1) { + return throwErrorBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); + } + } + /** + *
+     * Throw an error
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + */ + public Builder setThrowError(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError value) { + if (throwErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + onChanged(); + } else { + throwErrorBuilder_.setMessage(value); + } + modeCase_ = 1; + return this; + } + /** + *
+     * Throw an error
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + */ + public Builder setThrowError( + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder builderForValue) { + if (throwErrorBuilder_ == null) { + mode_ = builderForValue.build(); + onChanged(); + } else { + throwErrorBuilder_.setMessage(builderForValue.build()); + } + modeCase_ = 1; + return this; + } + /** + *
+     * Throw an error
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + */ + public Builder mergeThrowError(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError value) { + if (throwErrorBuilder_ == null) { + if (modeCase_ == 1 && + mode_ != com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance()) { + mode_ = com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.newBuilder((com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_) + .mergeFrom(value).buildPartial(); + } else { + mode_ = value; + } + onChanged(); + } else { + if (modeCase_ == 1) { + throwErrorBuilder_.mergeFrom(value); + } else { + throwErrorBuilder_.setMessage(value); + } + } + modeCase_ = 1; + return this; + } + /** + *
+     * Throw an error
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + */ + public Builder clearThrowError() { + if (throwErrorBuilder_ == null) { + if (modeCase_ == 1) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + } else { + if (modeCase_ == 1) { + modeCase_ = 0; + mode_ = null; + } + throwErrorBuilder_.clear(); + } + return this; + } + /** + *
+     * Throw an error
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + */ + public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder getThrowErrorBuilder() { + return getThrowErrorFieldBuilder().getBuilder(); + } + /** + *
+     * Throw an error
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder getThrowErrorOrBuilder() { + if ((modeCase_ == 1) && (throwErrorBuilder_ != null)) { + return throwErrorBuilder_.getMessageOrBuilder(); + } else { + if (modeCase_ == 1) { + return (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_; + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); + } + } + /** + *
+     * Throw an error
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder> + getThrowErrorFieldBuilder() { + if (throwErrorBuilder_ == null) { + if (!(modeCase_ == 1)) { + mode_ = com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); + } + throwErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder>( + (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_, + getParentForChildren(), + isClean()); + mode_ = null; + } + modeCase_ = 1; + onChanged();; + return throwErrorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder> leaveUntransformedBuilder_; + /** + *
+     * Ignore errors
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + * @return Whether the leaveUntransformed field is set. + */ + @java.lang.Override + public boolean hasLeaveUntransformed() { + return modeCase_ == 2; + } + /** + *
+     * Ignore errors
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + * @return The leaveUntransformed. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getLeaveUntransformed() { + if (leaveUntransformedBuilder_ == null) { + if (modeCase_ == 2) { + return (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_; + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); + } else { + if (modeCase_ == 2) { + return leaveUntransformedBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); + } + } + /** + *
+     * Ignore errors
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + */ + public Builder setLeaveUntransformed(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed value) { + if (leaveUntransformedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + onChanged(); + } else { + leaveUntransformedBuilder_.setMessage(value); + } + modeCase_ = 2; + return this; + } + /** + *
+     * Ignore errors
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + */ + public Builder setLeaveUntransformed( + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder builderForValue) { + if (leaveUntransformedBuilder_ == null) { + mode_ = builderForValue.build(); + onChanged(); + } else { + leaveUntransformedBuilder_.setMessage(builderForValue.build()); + } + modeCase_ = 2; + return this; + } + /** + *
+     * Ignore errors
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + */ + public Builder mergeLeaveUntransformed(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed value) { + if (leaveUntransformedBuilder_ == null) { + if (modeCase_ == 2 && + mode_ != com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance()) { + mode_ = com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.newBuilder((com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_) + .mergeFrom(value).buildPartial(); + } else { + mode_ = value; + } + onChanged(); + } else { + if (modeCase_ == 2) { + leaveUntransformedBuilder_.mergeFrom(value); + } else { + leaveUntransformedBuilder_.setMessage(value); + } + } + modeCase_ = 2; + return this; + } + /** + *
+     * Ignore errors
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + */ + public Builder clearLeaveUntransformed() { + if (leaveUntransformedBuilder_ == null) { + if (modeCase_ == 2) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + } else { + if (modeCase_ == 2) { + modeCase_ = 0; + mode_ = null; + } + leaveUntransformedBuilder_.clear(); + } + return this; + } + /** + *
+     * Ignore errors
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + */ + public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder getLeaveUntransformedBuilder() { + return getLeaveUntransformedFieldBuilder().getBuilder(); + } + /** + *
+     * Ignore errors
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder getLeaveUntransformedOrBuilder() { + if ((modeCase_ == 2) && (leaveUntransformedBuilder_ != null)) { + return leaveUntransformedBuilder_.getMessageOrBuilder(); + } else { + if (modeCase_ == 2) { + return (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_; + } + return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); + } + } + /** + *
+     * Ignore errors
+     * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder> + getLeaveUntransformedFieldBuilder() { + if (leaveUntransformedBuilder_ == null) { + if (!(modeCase_ == 2)) { + mode_ = com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); + } + leaveUntransformedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder>( + (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_, + getParentForChildren(), + isClean()); + mode_ = null; + } + modeCase_ = 2; + onChanged();; + return leaveUntransformedBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationErrorHandling) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationErrorHandling) + private static final com.google.privacy.dlp.v2.TransformationErrorHandling DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationErrorHandling(); + } + + public static com.google.privacy.dlp.v2.TransformationErrorHandling getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationErrorHandling parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationErrorHandling(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationErrorHandling getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandlingOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandlingOrBuilder.java new file mode 100644 index 000000000000..d088516eb979 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandlingOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransformationErrorHandlingOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationErrorHandling) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Throw an error
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + * @return Whether the throwError field is set. + */ + boolean hasThrowError(); + /** + *
+   * Throw an error
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + * @return The throwError. + */ + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getThrowError(); + /** + *
+   * Throw an error
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; + */ + com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder getThrowErrorOrBuilder(); + + /** + *
+   * Ignore errors
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + * @return Whether the leaveUntransformed field is set. + */ + boolean hasLeaveUntransformed(); + /** + *
+   * Ignore errors
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + * @return The leaveUntransformed. + */ + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getLeaveUntransformed(); + /** + *
+   * Ignore errors
+   * 
+ * + * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; + */ + com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder getLeaveUntransformedOrBuilder(); + + public com.google.privacy.dlp.v2.TransformationErrorHandling.ModeCase getModeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java new file mode 100644 index 000000000000..ac07635ab0ee --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java @@ -0,0 +1,1144 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Specifies the location of a transformation.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationLocation} + */ +public final class TransformationLocation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationLocation) + TransformationLocationOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransformationLocation.newBuilder() to construct. + private TransformationLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransformationLocation() { + containerType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransformationLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationLocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + locationTypeCase_ = 1; + locationType_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.RecordTransformation.Builder subBuilder = null; + if (locationTypeCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.RecordTransformation) locationType_).toBuilder(); + } + locationType_ = + input.readMessage(com.google.privacy.dlp.v2.RecordTransformation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.RecordTransformation) locationType_); + locationType_ = subBuilder.buildPartial(); + } + locationTypeCase_ = 2; + break; + } + case 24: { + int rawValue = input.readEnum(); + + containerType_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationLocation.class, com.google.privacy.dlp.v2.TransformationLocation.Builder.class); + } + + private int locationTypeCase_ = 0; + private java.lang.Object locationType_; + public enum LocationTypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FINDING_ID(1), + RECORD_TRANSFORMATION(2), + LOCATIONTYPE_NOT_SET(0); + private final int value; + private LocationTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LocationTypeCase valueOf(int value) { + return forNumber(value); + } + + public static LocationTypeCase forNumber(int value) { + switch (value) { + case 1: return FINDING_ID; + case 2: return RECORD_TRANSFORMATION; + case 0: return LOCATIONTYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LocationTypeCase + getLocationTypeCase() { + return LocationTypeCase.forNumber( + locationTypeCase_); + } + + public static final int FINDING_ID_FIELD_NUMBER = 1; + /** + *
+   * For infotype transformations, link to the corresponding findings ID so
+   * that location information does not need to be duplicated. Each findings
+   * ID correlates to an entry in the findings output table, this table only
+   * gets created when users specify to save findings (add the save findings
+   * action to the request).
+   * 
+ * + * string finding_id = 1; + * @return Whether the findingId field is set. + */ + public boolean hasFindingId() { + return locationTypeCase_ == 1; + } + /** + *
+   * For infotype transformations, link to the corresponding findings ID so
+   * that location information does not need to be duplicated. Each findings
+   * ID correlates to an entry in the findings output table, this table only
+   * gets created when users specify to save findings (add the save findings
+   * action to the request).
+   * 
+ * + * string finding_id = 1; + * @return The findingId. + */ + public java.lang.String getFindingId() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 1) { + ref = locationType_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationTypeCase_ == 1) { + locationType_ = s; + } + return s; + } + } + /** + *
+   * For infotype transformations, link to the corresponding findings ID so
+   * that location information does not need to be duplicated. Each findings
+   * ID correlates to an entry in the findings output table, this table only
+   * gets created when users specify to save findings (add the save findings
+   * action to the request).
+   * 
+ * + * string finding_id = 1; + * @return The bytes for findingId. + */ + public com.google.protobuf.ByteString + getFindingIdBytes() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 1) { + ref = locationType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (locationTypeCase_ == 1) { + locationType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECORD_TRANSFORMATION_FIELD_NUMBER = 2; + /** + *
+   * For record transformations, provide a field and container information.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * @return Whether the recordTransformation field is set. + */ + @java.lang.Override + public boolean hasRecordTransformation() { + return locationTypeCase_ == 2; + } + /** + *
+   * For record transformations, provide a field and container information.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * @return The recordTransformation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformation getRecordTransformation() { + if (locationTypeCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordTransformation) locationType_; + } + return com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); + } + /** + *
+   * For record transformations, provide a field and container information.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformationOrBuilder getRecordTransformationOrBuilder() { + if (locationTypeCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordTransformation) locationType_; + } + return com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); + } + + public static final int CONTAINER_TYPE_FIELD_NUMBER = 3; + private int containerType_; + /** + *
+   * Information about the functionality of the container where this finding
+   * occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * @return The enum numeric value on the wire for containerType. + */ + @java.lang.Override public int getContainerTypeValue() { + return containerType_; + } + /** + *
+   * Information about the functionality of the container where this finding
+   * occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * @return The containerType. + */ + @java.lang.Override public com.google.privacy.dlp.v2.TransformationContainerType getContainerType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TransformationContainerType result = com.google.privacy.dlp.v2.TransformationContainerType.valueOf(containerType_); + return result == null ? com.google.privacy.dlp.v2.TransformationContainerType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (locationTypeCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, locationType_); + } + if (locationTypeCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.RecordTransformation) locationType_); + } + if (containerType_ != com.google.privacy.dlp.v2.TransformationContainerType.TRANSFORM_UNKNOWN_CONTAINER.getNumber()) { + output.writeEnum(3, containerType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (locationTypeCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, locationType_); + } + if (locationTypeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.RecordTransformation) locationType_); + } + if (containerType_ != com.google.privacy.dlp.v2.TransformationContainerType.TRANSFORM_UNKNOWN_CONTAINER.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, containerType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationLocation)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationLocation other = (com.google.privacy.dlp.v2.TransformationLocation) obj; + + if (containerType_ != other.containerType_) return false; + if (!getLocationTypeCase().equals(other.getLocationTypeCase())) return false; + switch (locationTypeCase_) { + case 1: + if (!getFindingId() + .equals(other.getFindingId())) return false; + break; + case 2: + if (!getRecordTransformation() + .equals(other.getRecordTransformation())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTAINER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + containerType_; + switch (locationTypeCase_) { + case 1: + hash = (37 * hash) + FINDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getFindingId().hashCode(); + break; + case 2: + hash = (37 * hash) + RECORD_TRANSFORMATION_FIELD_NUMBER; + hash = (53 * hash) + getRecordTransformation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationLocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifies the location of a transformation.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationLocation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationLocation) + com.google.privacy.dlp.v2.TransformationLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationLocation.class, com.google.privacy.dlp.v2.TransformationLocation.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + containerType_ = 0; + + locationTypeCase_ = 0; + locationType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationLocation getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationLocation build() { + com.google.privacy.dlp.v2.TransformationLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationLocation buildPartial() { + com.google.privacy.dlp.v2.TransformationLocation result = new com.google.privacy.dlp.v2.TransformationLocation(this); + if (locationTypeCase_ == 1) { + result.locationType_ = locationType_; + } + if (locationTypeCase_ == 2) { + if (recordTransformationBuilder_ == null) { + result.locationType_ = locationType_; + } else { + result.locationType_ = recordTransformationBuilder_.build(); + } + } + result.containerType_ = containerType_; + result.locationTypeCase_ = locationTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationLocation) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationLocation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationLocation other) { + if (other == com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance()) return this; + if (other.containerType_ != 0) { + setContainerTypeValue(other.getContainerTypeValue()); + } + switch (other.getLocationTypeCase()) { + case FINDING_ID: { + locationTypeCase_ = 1; + locationType_ = other.locationType_; + onChanged(); + break; + } + case RECORD_TRANSFORMATION: { + mergeRecordTransformation(other.getRecordTransformation()); + break; + } + case LOCATIONTYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationLocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationLocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int locationTypeCase_ = 0; + private java.lang.Object locationType_; + public LocationTypeCase + getLocationTypeCase() { + return LocationTypeCase.forNumber( + locationTypeCase_); + } + + public Builder clearLocationType() { + locationTypeCase_ = 0; + locationType_ = null; + onChanged(); + return this; + } + + + /** + *
+     * For infotype transformations, link to the corresponding findings ID so
+     * that location information does not need to be duplicated. Each findings
+     * ID correlates to an entry in the findings output table, this table only
+     * gets created when users specify to save findings (add the save findings
+     * action to the request).
+     * 
+ * + * string finding_id = 1; + * @return Whether the findingId field is set. + */ + @java.lang.Override + public boolean hasFindingId() { + return locationTypeCase_ == 1; + } + /** + *
+     * For infotype transformations, link to the corresponding findings ID so
+     * that location information does not need to be duplicated. Each findings
+     * ID correlates to an entry in the findings output table, this table only
+     * gets created when users specify to save findings (add the save findings
+     * action to the request).
+     * 
+ * + * string finding_id = 1; + * @return The findingId. + */ + @java.lang.Override + public java.lang.String getFindingId() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 1) { + ref = locationType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationTypeCase_ == 1) { + locationType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * For infotype transformations, link to the corresponding findings ID so
+     * that location information does not need to be duplicated. Each findings
+     * ID correlates to an entry in the findings output table, this table only
+     * gets created when users specify to save findings (add the save findings
+     * action to the request).
+     * 
+ * + * string finding_id = 1; + * @return The bytes for findingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFindingIdBytes() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 1) { + ref = locationType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (locationTypeCase_ == 1) { + locationType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * For infotype transformations, link to the corresponding findings ID so
+     * that location information does not need to be duplicated. Each findings
+     * ID correlates to an entry in the findings output table, this table only
+     * gets created when users specify to save findings (add the save findings
+     * action to the request).
+     * 
+ * + * string finding_id = 1; + * @param value The findingId to set. + * @return This builder for chaining. + */ + public Builder setFindingId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationTypeCase_ = 1; + locationType_ = value; + onChanged(); + return this; + } + /** + *
+     * For infotype transformations, link to the corresponding findings ID so
+     * that location information does not need to be duplicated. Each findings
+     * ID correlates to an entry in the findings output table, this table only
+     * gets created when users specify to save findings (add the save findings
+     * action to the request).
+     * 
+ * + * string finding_id = 1; + * @return This builder for chaining. + */ + public Builder clearFindingId() { + if (locationTypeCase_ == 1) { + locationTypeCase_ = 0; + locationType_ = null; + onChanged(); + } + return this; + } + /** + *
+     * For infotype transformations, link to the corresponding findings ID so
+     * that location information does not need to be duplicated. Each findings
+     * ID correlates to an entry in the findings output table, this table only
+     * gets created when users specify to save findings (add the save findings
+     * action to the request).
+     * 
+ * + * string finding_id = 1; + * @param value The bytes for findingId to set. + * @return This builder for chaining. + */ + public Builder setFindingIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationTypeCase_ = 1; + locationType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordTransformation, com.google.privacy.dlp.v2.RecordTransformation.Builder, com.google.privacy.dlp.v2.RecordTransformationOrBuilder> recordTransformationBuilder_; + /** + *
+     * For record transformations, provide a field and container information.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * @return Whether the recordTransformation field is set. + */ + @java.lang.Override + public boolean hasRecordTransformation() { + return locationTypeCase_ == 2; + } + /** + *
+     * For record transformations, provide a field and container information.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * @return The recordTransformation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformation getRecordTransformation() { + if (recordTransformationBuilder_ == null) { + if (locationTypeCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordTransformation) locationType_; + } + return com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); + } else { + if (locationTypeCase_ == 2) { + return recordTransformationBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); + } + } + /** + *
+     * For record transformations, provide a field and container information.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + */ + public Builder setRecordTransformation(com.google.privacy.dlp.v2.RecordTransformation value) { + if (recordTransformationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + locationType_ = value; + onChanged(); + } else { + recordTransformationBuilder_.setMessage(value); + } + locationTypeCase_ = 2; + return this; + } + /** + *
+     * For record transformations, provide a field and container information.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + */ + public Builder setRecordTransformation( + com.google.privacy.dlp.v2.RecordTransformation.Builder builderForValue) { + if (recordTransformationBuilder_ == null) { + locationType_ = builderForValue.build(); + onChanged(); + } else { + recordTransformationBuilder_.setMessage(builderForValue.build()); + } + locationTypeCase_ = 2; + return this; + } + /** + *
+     * For record transformations, provide a field and container information.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + */ + public Builder mergeRecordTransformation(com.google.privacy.dlp.v2.RecordTransformation value) { + if (recordTransformationBuilder_ == null) { + if (locationTypeCase_ == 2 && + locationType_ != com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance()) { + locationType_ = com.google.privacy.dlp.v2.RecordTransformation.newBuilder((com.google.privacy.dlp.v2.RecordTransformation) locationType_) + .mergeFrom(value).buildPartial(); + } else { + locationType_ = value; + } + onChanged(); + } else { + if (locationTypeCase_ == 2) { + recordTransformationBuilder_.mergeFrom(value); + } else { + recordTransformationBuilder_.setMessage(value); + } + } + locationTypeCase_ = 2; + return this; + } + /** + *
+     * For record transformations, provide a field and container information.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + */ + public Builder clearRecordTransformation() { + if (recordTransformationBuilder_ == null) { + if (locationTypeCase_ == 2) { + locationTypeCase_ = 0; + locationType_ = null; + onChanged(); + } + } else { + if (locationTypeCase_ == 2) { + locationTypeCase_ = 0; + locationType_ = null; + } + recordTransformationBuilder_.clear(); + } + return this; + } + /** + *
+     * For record transformations, provide a field and container information.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + */ + public com.google.privacy.dlp.v2.RecordTransformation.Builder getRecordTransformationBuilder() { + return getRecordTransformationFieldBuilder().getBuilder(); + } + /** + *
+     * For record transformations, provide a field and container information.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordTransformationOrBuilder getRecordTransformationOrBuilder() { + if ((locationTypeCase_ == 2) && (recordTransformationBuilder_ != null)) { + return recordTransformationBuilder_.getMessageOrBuilder(); + } else { + if (locationTypeCase_ == 2) { + return (com.google.privacy.dlp.v2.RecordTransformation) locationType_; + } + return com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); + } + } + /** + *
+     * For record transformations, provide a field and container information.
+     * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordTransformation, com.google.privacy.dlp.v2.RecordTransformation.Builder, com.google.privacy.dlp.v2.RecordTransformationOrBuilder> + getRecordTransformationFieldBuilder() { + if (recordTransformationBuilder_ == null) { + if (!(locationTypeCase_ == 2)) { + locationType_ = com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); + } + recordTransformationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordTransformation, com.google.privacy.dlp.v2.RecordTransformation.Builder, com.google.privacy.dlp.v2.RecordTransformationOrBuilder>( + (com.google.privacy.dlp.v2.RecordTransformation) locationType_, + getParentForChildren(), + isClean()); + locationType_ = null; + } + locationTypeCase_ = 2; + onChanged();; + return recordTransformationBuilder_; + } + + private int containerType_ = 0; + /** + *
+     * Information about the functionality of the container where this finding
+     * occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * @return The enum numeric value on the wire for containerType. + */ + @java.lang.Override public int getContainerTypeValue() { + return containerType_; + } + /** + *
+     * Information about the functionality of the container where this finding
+     * occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * @param value The enum numeric value on the wire for containerType to set. + * @return This builder for chaining. + */ + public Builder setContainerTypeValue(int value) { + + containerType_ = value; + onChanged(); + return this; + } + /** + *
+     * Information about the functionality of the container where this finding
+     * occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * @return The containerType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationContainerType getContainerType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TransformationContainerType result = com.google.privacy.dlp.v2.TransformationContainerType.valueOf(containerType_); + return result == null ? com.google.privacy.dlp.v2.TransformationContainerType.UNRECOGNIZED : result; + } + /** + *
+     * Information about the functionality of the container where this finding
+     * occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * @param value The containerType to set. + * @return This builder for chaining. + */ + public Builder setContainerType(com.google.privacy.dlp.v2.TransformationContainerType value) { + if (value == null) { + throw new NullPointerException(); + } + + containerType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Information about the functionality of the container where this finding
+     * occurred, if available.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * @return This builder for chaining. + */ + public Builder clearContainerType() { + + containerType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationLocation) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationLocation) + private static final com.google.privacy.dlp.v2.TransformationLocation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationLocation(); + } + + public static com.google.privacy.dlp.v2.TransformationLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationLocation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java new file mode 100644 index 000000000000..d944788cde5f --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java @@ -0,0 +1,100 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransformationLocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationLocation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * For infotype transformations, link to the corresponding findings ID so
+   * that location information does not need to be duplicated. Each findings
+   * ID correlates to an entry in the findings output table, this table only
+   * gets created when users specify to save findings (add the save findings
+   * action to the request).
+   * 
+ * + * string finding_id = 1; + * @return Whether the findingId field is set. + */ + boolean hasFindingId(); + /** + *
+   * For infotype transformations, link to the corresponding findings ID so
+   * that location information does not need to be duplicated. Each findings
+   * ID correlates to an entry in the findings output table, this table only
+   * gets created when users specify to save findings (add the save findings
+   * action to the request).
+   * 
+ * + * string finding_id = 1; + * @return The findingId. + */ + java.lang.String getFindingId(); + /** + *
+   * For infotype transformations, link to the corresponding findings ID so
+   * that location information does not need to be duplicated. Each findings
+   * ID correlates to an entry in the findings output table, this table only
+   * gets created when users specify to save findings (add the save findings
+   * action to the request).
+   * 
+ * + * string finding_id = 1; + * @return The bytes for findingId. + */ + com.google.protobuf.ByteString + getFindingIdBytes(); + + /** + *
+   * For record transformations, provide a field and container information.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * @return Whether the recordTransformation field is set. + */ + boolean hasRecordTransformation(); + /** + *
+   * For record transformations, provide a field and container information.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * @return The recordTransformation. + */ + com.google.privacy.dlp.v2.RecordTransformation getRecordTransformation(); + /** + *
+   * For record transformations, provide a field and container information.
+   * 
+ * + * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + */ + com.google.privacy.dlp.v2.RecordTransformationOrBuilder getRecordTransformationOrBuilder(); + + /** + *
+   * Information about the functionality of the container where this finding
+   * occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * @return The enum numeric value on the wire for containerType. + */ + int getContainerTypeValue(); + /** + *
+   * Information about the functionality of the container where this finding
+   * occurred, if available.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * @return The containerType. + */ + com.google.privacy.dlp.v2.TransformationContainerType getContainerType(); + + public com.google.privacy.dlp.v2.TransformationLocation.LocationTypeCase getLocationTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverview.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverview.java new file mode 100644 index 000000000000..687083d689da --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverview.java @@ -0,0 +1,953 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Overview of the modifications that occurred.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationOverview} + */ +public final class TransformationOverview extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationOverview) + TransformationOverviewOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransformationOverview.newBuilder() to construct. + private TransformationOverview(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransformationOverview() { + transformationSummaries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransformationOverview(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationOverview( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + + transformedBytes_ = input.readInt64(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transformationSummaries_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + transformationSummaries_.add( + input.readMessage(com.google.privacy.dlp.v2.TransformationSummary.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transformationSummaries_ = java.util.Collections.unmodifiableList(transformationSummaries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationOverview.class, com.google.privacy.dlp.v2.TransformationOverview.Builder.class); + } + + public static final int TRANSFORMED_BYTES_FIELD_NUMBER = 2; + private long transformedBytes_; + /** + *
+   * Total size in bytes that were transformed in some way.
+   * 
+ * + * int64 transformed_bytes = 2; + * @return The transformedBytes. + */ + @java.lang.Override + public long getTransformedBytes() { + return transformedBytes_; + } + + public static final int TRANSFORMATION_SUMMARIES_FIELD_NUMBER = 3; + private java.util.List transformationSummaries_; + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + @java.lang.Override + public java.util.List getTransformationSummariesList() { + return transformationSummaries_; + } + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + @java.lang.Override + public java.util.List + getTransformationSummariesOrBuilderList() { + return transformationSummaries_; + } + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + @java.lang.Override + public int getTransformationSummariesCount() { + return transformationSummaries_.size(); + } + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary getTransformationSummaries(int index) { + return transformationSummaries_.get(index); + } + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummaryOrBuilder getTransformationSummariesOrBuilder( + int index) { + return transformationSummaries_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (transformedBytes_ != 0L) { + output.writeInt64(2, transformedBytes_); + } + for (int i = 0; i < transformationSummaries_.size(); i++) { + output.writeMessage(3, transformationSummaries_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transformedBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, transformedBytes_); + } + for (int i = 0; i < transformationSummaries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, transformationSummaries_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationOverview)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationOverview other = (com.google.privacy.dlp.v2.TransformationOverview) obj; + + if (getTransformedBytes() + != other.getTransformedBytes()) return false; + if (!getTransformationSummariesList() + .equals(other.getTransformationSummariesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRANSFORMED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTransformedBytes()); + if (getTransformationSummariesCount() > 0) { + hash = (37 * hash) + TRANSFORMATION_SUMMARIES_FIELD_NUMBER; + hash = (53 * hash) + getTransformationSummariesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationOverview prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Overview of the modifications that occurred.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationOverview} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationOverview) + com.google.privacy.dlp.v2.TransformationOverviewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationOverview.class, com.google.privacy.dlp.v2.TransformationOverview.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationOverview.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTransformationSummariesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + transformedBytes_ = 0L; + + if (transformationSummariesBuilder_ == null) { + transformationSummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transformationSummariesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationOverview getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationOverview build() { + com.google.privacy.dlp.v2.TransformationOverview result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationOverview buildPartial() { + com.google.privacy.dlp.v2.TransformationOverview result = new com.google.privacy.dlp.v2.TransformationOverview(this); + int from_bitField0_ = bitField0_; + result.transformedBytes_ = transformedBytes_; + if (transformationSummariesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transformationSummaries_ = java.util.Collections.unmodifiableList(transformationSummaries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transformationSummaries_ = transformationSummaries_; + } else { + result.transformationSummaries_ = transformationSummariesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationOverview) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationOverview)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationOverview other) { + if (other == com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance()) return this; + if (other.getTransformedBytes() != 0L) { + setTransformedBytes(other.getTransformedBytes()); + } + if (transformationSummariesBuilder_ == null) { + if (!other.transformationSummaries_.isEmpty()) { + if (transformationSummaries_.isEmpty()) { + transformationSummaries_ = other.transformationSummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransformationSummariesIsMutable(); + transformationSummaries_.addAll(other.transformationSummaries_); + } + onChanged(); + } + } else { + if (!other.transformationSummaries_.isEmpty()) { + if (transformationSummariesBuilder_.isEmpty()) { + transformationSummariesBuilder_.dispose(); + transformationSummariesBuilder_ = null; + transformationSummaries_ = other.transformationSummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + transformationSummariesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTransformationSummariesFieldBuilder() : null; + } else { + transformationSummariesBuilder_.addAllMessages(other.transformationSummaries_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationOverview parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationOverview) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long transformedBytes_ ; + /** + *
+     * Total size in bytes that were transformed in some way.
+     * 
+ * + * int64 transformed_bytes = 2; + * @return The transformedBytes. + */ + @java.lang.Override + public long getTransformedBytes() { + return transformedBytes_; + } + /** + *
+     * Total size in bytes that were transformed in some way.
+     * 
+ * + * int64 transformed_bytes = 2; + * @param value The transformedBytes to set. + * @return This builder for chaining. + */ + public Builder setTransformedBytes(long value) { + + transformedBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Total size in bytes that were transformed in some way.
+     * 
+ * + * int64 transformed_bytes = 2; + * @return This builder for chaining. + */ + public Builder clearTransformedBytes() { + + transformedBytes_ = 0L; + onChanged(); + return this; + } + + private java.util.List transformationSummaries_ = + java.util.Collections.emptyList(); + private void ensureTransformationSummariesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transformationSummaries_ = new java.util.ArrayList(transformationSummaries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationSummary, com.google.privacy.dlp.v2.TransformationSummary.Builder, com.google.privacy.dlp.v2.TransformationSummaryOrBuilder> transformationSummariesBuilder_; + + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public java.util.List getTransformationSummariesList() { + if (transformationSummariesBuilder_ == null) { + return java.util.Collections.unmodifiableList(transformationSummaries_); + } else { + return transformationSummariesBuilder_.getMessageList(); + } + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public int getTransformationSummariesCount() { + if (transformationSummariesBuilder_ == null) { + return transformationSummaries_.size(); + } else { + return transformationSummariesBuilder_.getCount(); + } + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public com.google.privacy.dlp.v2.TransformationSummary getTransformationSummaries(int index) { + if (transformationSummariesBuilder_ == null) { + return transformationSummaries_.get(index); + } else { + return transformationSummariesBuilder_.getMessage(index); + } + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public Builder setTransformationSummaries( + int index, com.google.privacy.dlp.v2.TransformationSummary value) { + if (transformationSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationSummariesIsMutable(); + transformationSummaries_.set(index, value); + onChanged(); + } else { + transformationSummariesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public Builder setTransformationSummaries( + int index, com.google.privacy.dlp.v2.TransformationSummary.Builder builderForValue) { + if (transformationSummariesBuilder_ == null) { + ensureTransformationSummariesIsMutable(); + transformationSummaries_.set(index, builderForValue.build()); + onChanged(); + } else { + transformationSummariesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public Builder addTransformationSummaries(com.google.privacy.dlp.v2.TransformationSummary value) { + if (transformationSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationSummariesIsMutable(); + transformationSummaries_.add(value); + onChanged(); + } else { + transformationSummariesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public Builder addTransformationSummaries( + int index, com.google.privacy.dlp.v2.TransformationSummary value) { + if (transformationSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransformationSummariesIsMutable(); + transformationSummaries_.add(index, value); + onChanged(); + } else { + transformationSummariesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public Builder addTransformationSummaries( + com.google.privacy.dlp.v2.TransformationSummary.Builder builderForValue) { + if (transformationSummariesBuilder_ == null) { + ensureTransformationSummariesIsMutable(); + transformationSummaries_.add(builderForValue.build()); + onChanged(); + } else { + transformationSummariesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public Builder addTransformationSummaries( + int index, com.google.privacy.dlp.v2.TransformationSummary.Builder builderForValue) { + if (transformationSummariesBuilder_ == null) { + ensureTransformationSummariesIsMutable(); + transformationSummaries_.add(index, builderForValue.build()); + onChanged(); + } else { + transformationSummariesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public Builder addAllTransformationSummaries( + java.lang.Iterable values) { + if (transformationSummariesBuilder_ == null) { + ensureTransformationSummariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, transformationSummaries_); + onChanged(); + } else { + transformationSummariesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public Builder clearTransformationSummaries() { + if (transformationSummariesBuilder_ == null) { + transformationSummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transformationSummariesBuilder_.clear(); + } + return this; + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public Builder removeTransformationSummaries(int index) { + if (transformationSummariesBuilder_ == null) { + ensureTransformationSummariesIsMutable(); + transformationSummaries_.remove(index); + onChanged(); + } else { + transformationSummariesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public com.google.privacy.dlp.v2.TransformationSummary.Builder getTransformationSummariesBuilder( + int index) { + return getTransformationSummariesFieldBuilder().getBuilder(index); + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public com.google.privacy.dlp.v2.TransformationSummaryOrBuilder getTransformationSummariesOrBuilder( + int index) { + if (transformationSummariesBuilder_ == null) { + return transformationSummaries_.get(index); } else { + return transformationSummariesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public java.util.List + getTransformationSummariesOrBuilderList() { + if (transformationSummariesBuilder_ != null) { + return transformationSummariesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transformationSummaries_); + } + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public com.google.privacy.dlp.v2.TransformationSummary.Builder addTransformationSummariesBuilder() { + return getTransformationSummariesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.TransformationSummary.getDefaultInstance()); + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public com.google.privacy.dlp.v2.TransformationSummary.Builder addTransformationSummariesBuilder( + int index) { + return getTransformationSummariesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.TransformationSummary.getDefaultInstance()); + } + /** + *
+     * Transformations applied to the dataset.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + public java.util.List + getTransformationSummariesBuilderList() { + return getTransformationSummariesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationSummary, com.google.privacy.dlp.v2.TransformationSummary.Builder, com.google.privacy.dlp.v2.TransformationSummaryOrBuilder> + getTransformationSummariesFieldBuilder() { + if (transformationSummariesBuilder_ == null) { + transformationSummariesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationSummary, com.google.privacy.dlp.v2.TransformationSummary.Builder, com.google.privacy.dlp.v2.TransformationSummaryOrBuilder>( + transformationSummaries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transformationSummaries_ = null; + } + return transformationSummariesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationOverview) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationOverview) + private static final com.google.privacy.dlp.v2.TransformationOverview DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationOverview(); + } + + public static com.google.privacy.dlp.v2.TransformationOverview getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationOverview parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationOverview(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationOverview getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverviewOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverviewOrBuilder.java new file mode 100644 index 000000000000..e293041d32df --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverviewOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransformationOverviewOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationOverview) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Total size in bytes that were transformed in some way.
+   * 
+ * + * int64 transformed_bytes = 2; + * @return The transformedBytes. + */ + long getTransformedBytes(); + + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + java.util.List + getTransformationSummariesList(); + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + com.google.privacy.dlp.v2.TransformationSummary getTransformationSummaries(int index); + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + int getTransformationSummariesCount(); + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + java.util.List + getTransformationSummariesOrBuilderList(); + /** + *
+   * Transformations applied to the dataset.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; + */ + com.google.privacy.dlp.v2.TransformationSummaryOrBuilder getTransformationSummariesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java new file mode 100644 index 000000000000..148195253e31 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java @@ -0,0 +1,788 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + * Protobuf type {@code google.privacy.dlp.v2.TransformationResultStatus} + */ +public final class TransformationResultStatus extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationResultStatus) + TransformationResultStatusOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransformationResultStatus.newBuilder() to construct. + private TransformationResultStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransformationResultStatus() { + resultStatusType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransformationResultStatus(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationResultStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + resultStatusType_ = rawValue; + break; + } + case 18: { + com.google.rpc.Status.Builder subBuilder = null; + if (details_ != null) { + subBuilder = details_.toBuilder(); + } + details_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(details_); + details_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationResultStatus.class, com.google.privacy.dlp.v2.TransformationResultStatus.Builder.class); + } + + public static final int RESULT_STATUS_TYPE_FIELD_NUMBER = 1; + private int resultStatusType_; + /** + *
+   * Transformation result status type, this will be either SUCCESS, or it will
+   * be the reason for why the transformation was not completely successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * @return The enum numeric value on the wire for resultStatusType. + */ + @java.lang.Override public int getResultStatusTypeValue() { + return resultStatusType_; + } + /** + *
+   * Transformation result status type, this will be either SUCCESS, or it will
+   * be the reason for why the transformation was not completely successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * @return The resultStatusType. + */ + @java.lang.Override public com.google.privacy.dlp.v2.TransformationResultStatusType getResultStatusType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TransformationResultStatusType result = com.google.privacy.dlp.v2.TransformationResultStatusType.valueOf(resultStatusType_); + return result == null ? com.google.privacy.dlp.v2.TransformationResultStatusType.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 2; + private com.google.rpc.Status details_; + /** + *
+   * Detailed error codes and messages
+   * 
+ * + * .google.rpc.Status details = 2; + * @return Whether the details field is set. + */ + @java.lang.Override + public boolean hasDetails() { + return details_ != null; + } + /** + *
+   * Detailed error codes and messages
+   * 
+ * + * .google.rpc.Status details = 2; + * @return The details. + */ + @java.lang.Override + public com.google.rpc.Status getDetails() { + return details_ == null ? com.google.rpc.Status.getDefaultInstance() : details_; + } + /** + *
+   * Detailed error codes and messages
+   * 
+ * + * .google.rpc.Status details = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getDetailsOrBuilder() { + return getDetails(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (resultStatusType_ != com.google.privacy.dlp.v2.TransformationResultStatusType.STATE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, resultStatusType_); + } + if (details_ != null) { + output.writeMessage(2, getDetails()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resultStatusType_ != com.google.privacy.dlp.v2.TransformationResultStatusType.STATE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, resultStatusType_); + } + if (details_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDetails()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationResultStatus)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationResultStatus other = (com.google.privacy.dlp.v2.TransformationResultStatus) obj; + + if (resultStatusType_ != other.resultStatusType_) return false; + if (hasDetails() != other.hasDetails()) return false; + if (hasDetails()) { + if (!getDetails() + .equals(other.getDetails())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESULT_STATUS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + resultStatusType_; + if (hasDetails()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationResultStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.privacy.dlp.v2.TransformationResultStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationResultStatus) + com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationResultStatus.class, com.google.privacy.dlp.v2.TransformationResultStatus.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationResultStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + resultStatusType_ = 0; + + if (detailsBuilder_ == null) { + details_ = null; + } else { + details_ = null; + detailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationResultStatus getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationResultStatus build() { + com.google.privacy.dlp.v2.TransformationResultStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationResultStatus buildPartial() { + com.google.privacy.dlp.v2.TransformationResultStatus result = new com.google.privacy.dlp.v2.TransformationResultStatus(this); + result.resultStatusType_ = resultStatusType_; + if (detailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = detailsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationResultStatus) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationResultStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationResultStatus other) { + if (other == com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance()) return this; + if (other.resultStatusType_ != 0) { + setResultStatusTypeValue(other.getResultStatusTypeValue()); + } + if (other.hasDetails()) { + mergeDetails(other.getDetails()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationResultStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationResultStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int resultStatusType_ = 0; + /** + *
+     * Transformation result status type, this will be either SUCCESS, or it will
+     * be the reason for why the transformation was not completely successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * @return The enum numeric value on the wire for resultStatusType. + */ + @java.lang.Override public int getResultStatusTypeValue() { + return resultStatusType_; + } + /** + *
+     * Transformation result status type, this will be either SUCCESS, or it will
+     * be the reason for why the transformation was not completely successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * @param value The enum numeric value on the wire for resultStatusType to set. + * @return This builder for chaining. + */ + public Builder setResultStatusTypeValue(int value) { + + resultStatusType_ = value; + onChanged(); + return this; + } + /** + *
+     * Transformation result status type, this will be either SUCCESS, or it will
+     * be the reason for why the transformation was not completely successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * @return The resultStatusType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationResultStatusType getResultStatusType() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TransformationResultStatusType result = com.google.privacy.dlp.v2.TransformationResultStatusType.valueOf(resultStatusType_); + return result == null ? com.google.privacy.dlp.v2.TransformationResultStatusType.UNRECOGNIZED : result; + } + /** + *
+     * Transformation result status type, this will be either SUCCESS, or it will
+     * be the reason for why the transformation was not completely successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * @param value The resultStatusType to set. + * @return This builder for chaining. + */ + public Builder setResultStatusType(com.google.privacy.dlp.v2.TransformationResultStatusType value) { + if (value == null) { + throw new NullPointerException(); + } + + resultStatusType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Transformation result status type, this will be either SUCCESS, or it will
+     * be the reason for why the transformation was not completely successful.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * @return This builder for chaining. + */ + public Builder clearResultStatusType() { + + resultStatusType_ = 0; + onChanged(); + return this; + } + + private com.google.rpc.Status details_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> detailsBuilder_; + /** + *
+     * Detailed error codes and messages
+     * 
+ * + * .google.rpc.Status details = 2; + * @return Whether the details field is set. + */ + public boolean hasDetails() { + return detailsBuilder_ != null || details_ != null; + } + /** + *
+     * Detailed error codes and messages
+     * 
+ * + * .google.rpc.Status details = 2; + * @return The details. + */ + public com.google.rpc.Status getDetails() { + if (detailsBuilder_ == null) { + return details_ == null ? com.google.rpc.Status.getDefaultInstance() : details_; + } else { + return detailsBuilder_.getMessage(); + } + } + /** + *
+     * Detailed error codes and messages
+     * 
+ * + * .google.rpc.Status details = 2; + */ + public Builder setDetails(com.google.rpc.Status value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + detailsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Detailed error codes and messages
+     * 
+ * + * .google.rpc.Status details = 2; + */ + public Builder setDetails( + com.google.rpc.Status.Builder builderForValue) { + if (detailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + detailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Detailed error codes and messages
+     * 
+ * + * .google.rpc.Status details = 2; + */ + public Builder mergeDetails(com.google.rpc.Status value) { + if (detailsBuilder_ == null) { + if (details_ != null) { + details_ = + com.google.rpc.Status.newBuilder(details_).mergeFrom(value).buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + detailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Detailed error codes and messages
+     * 
+ * + * .google.rpc.Status details = 2; + */ + public Builder clearDetails() { + if (detailsBuilder_ == null) { + details_ = null; + onChanged(); + } else { + details_ = null; + detailsBuilder_ = null; + } + + return this; + } + /** + *
+     * Detailed error codes and messages
+     * 
+ * + * .google.rpc.Status details = 2; + */ + public com.google.rpc.Status.Builder getDetailsBuilder() { + + onChanged(); + return getDetailsFieldBuilder().getBuilder(); + } + /** + *
+     * Detailed error codes and messages
+     * 
+ * + * .google.rpc.Status details = 2; + */ + public com.google.rpc.StatusOrBuilder getDetailsOrBuilder() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilder(); + } else { + return details_ == null ? + com.google.rpc.Status.getDefaultInstance() : details_; + } + } + /** + *
+     * Detailed error codes and messages
+     * 
+ * + * .google.rpc.Status details = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getDetails(), + getParentForChildren(), + isClean()); + details_ = null; + } + return detailsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationResultStatus) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationResultStatus) + private static final com.google.privacy.dlp.v2.TransformationResultStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationResultStatus(); + } + + public static com.google.privacy.dlp.v2.TransformationResultStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationResultStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationResultStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationResultStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java new file mode 100644 index 000000000000..6cab1b0a3b14 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransformationResultStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationResultStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Transformation result status type, this will be either SUCCESS, or it will
+   * be the reason for why the transformation was not completely successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * @return The enum numeric value on the wire for resultStatusType. + */ + int getResultStatusTypeValue(); + /** + *
+   * Transformation result status type, this will be either SUCCESS, or it will
+   * be the reason for why the transformation was not completely successful.
+   * 
+ * + * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * @return The resultStatusType. + */ + com.google.privacy.dlp.v2.TransformationResultStatusType getResultStatusType(); + + /** + *
+   * Detailed error codes and messages
+   * 
+ * + * .google.rpc.Status details = 2; + * @return Whether the details field is set. + */ + boolean hasDetails(); + /** + *
+   * Detailed error codes and messages
+   * 
+ * + * .google.rpc.Status details = 2; + * @return The details. + */ + com.google.rpc.Status getDetails(); + /** + *
+   * Detailed error codes and messages
+   * 
+ * + * .google.rpc.Status details = 2; + */ + com.google.rpc.StatusOrBuilder getDetailsOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java new file mode 100644 index 000000000000..9c1eb3be93e4 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java @@ -0,0 +1,188 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Enum of possible outcomes of transformations. SUCCESS if transformation and
+ * storing of transformation was successful, otherwise, reason for not
+ * transforming.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.TransformationResultStatusType} + */ +public enum TransformationResultStatusType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * STATE_TYPE_UNSPECIFIED = 0; + */ + STATE_TYPE_UNSPECIFIED(0), + /** + *
+   * This will be set when a finding could not be transformed (i.e. outside user
+   * set bucket range).
+   * 
+ * + * INVALID_TRANSFORM = 1; + */ + INVALID_TRANSFORM(1), + /** + *
+   * This will be set when a BigQuery transformation was successful but could
+   * not be stored back in BigQuery because the transformed row exceeds
+   * BigQuery's max row size.
+   * 
+ * + * BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2; + */ + BIGQUERY_MAX_ROW_SIZE_EXCEEDED(2), + /** + *
+   * This will be set when there is a finding in the custom metadata of a file,
+   * but at the write time of the transformed file, this key / value pair is
+   * unretrievable.
+   * 
+ * + * METADATA_UNRETRIEVABLE = 3; + */ + METADATA_UNRETRIEVABLE(3), + /** + *
+   * This will be set when the transformation and storing of it is successful.
+   * 
+ * + * SUCCESS = 4; + */ + SUCCESS(4), + UNRECOGNIZED(-1), + ; + + /** + * STATE_TYPE_UNSPECIFIED = 0; + */ + public static final int STATE_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * This will be set when a finding could not be transformed (i.e. outside user
+   * set bucket range).
+   * 
+ * + * INVALID_TRANSFORM = 1; + */ + public static final int INVALID_TRANSFORM_VALUE = 1; + /** + *
+   * This will be set when a BigQuery transformation was successful but could
+   * not be stored back in BigQuery because the transformed row exceeds
+   * BigQuery's max row size.
+   * 
+ * + * BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2; + */ + public static final int BIGQUERY_MAX_ROW_SIZE_EXCEEDED_VALUE = 2; + /** + *
+   * This will be set when there is a finding in the custom metadata of a file,
+   * but at the write time of the transformed file, this key / value pair is
+   * unretrievable.
+   * 
+ * + * METADATA_UNRETRIEVABLE = 3; + */ + public static final int METADATA_UNRETRIEVABLE_VALUE = 3; + /** + *
+   * This will be set when the transformation and storing of it is successful.
+   * 
+ * + * SUCCESS = 4; + */ + public static final int SUCCESS_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformationResultStatusType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TransformationResultStatusType forNumber(int value) { + switch (value) { + case 0: return STATE_TYPE_UNSPECIFIED; + case 1: return INVALID_TRANSFORM; + case 2: return BIGQUERY_MAX_ROW_SIZE_EXCEEDED; + case 3: return METADATA_UNRETRIEVABLE; + case 4: return SUCCESS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TransformationResultStatusType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransformationResultStatusType findValueByNumber(int number) { + return TransformationResultStatusType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(0); + } + + private static final TransformationResultStatusType[] VALUES = values(); + + public static TransformationResultStatusType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TransformationResultStatusType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TransformationResultStatusType) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummary.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummary.java new file mode 100644 index 000000000000..f11a0d0a68a3 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummary.java @@ -0,0 +1,3391 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Summary of a single transformation.
+ * Only one of 'transformation', 'field_transformation', or 'record_suppress'
+ * will be set.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationSummary} + */ +public final class TransformationSummary extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationSummary) + TransformationSummaryOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransformationSummary.newBuilder() to construct. + private TransformationSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransformationSummary() { + fieldTransformations_ = java.util.Collections.emptyList(); + results_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransformationSummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransformationSummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (infoType_ != null) { + subBuilder = infoType_.toBuilder(); + } + infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(infoType_); + infoType_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.PrimitiveTransformation.Builder subBuilder = null; + if (transformation_ != null) { + subBuilder = transformation_.toBuilder(); + } + transformation_ = input.readMessage(com.google.privacy.dlp.v2.PrimitiveTransformation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transformation_); + transformation_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + results_.add( + input.readMessage(com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.parser(), extensionRegistry)); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fieldTransformations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fieldTransformations_.add( + input.readMessage(com.google.privacy.dlp.v2.FieldTransformation.parser(), extensionRegistry)); + break; + } + case 50: { + com.google.privacy.dlp.v2.RecordSuppression.Builder subBuilder = null; + if (recordSuppress_ != null) { + subBuilder = recordSuppress_.toBuilder(); + } + recordSuppress_ = input.readMessage(com.google.privacy.dlp.v2.RecordSuppression.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(recordSuppress_); + recordSuppress_ = subBuilder.buildPartial(); + } + + break; + } + case 56: { + + transformedBytes_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fieldTransformations_ = java.util.Collections.unmodifiableList(fieldTransformations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationSummary.class, com.google.privacy.dlp.v2.TransformationSummary.Builder.class); + } + + /** + *
+   * Possible outcomes of transformations.
+   * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.TransformationSummary.TransformationResultCode} + */ + public enum TransformationResultCode + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unused
+     * 
+ * + * TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; + */ + TRANSFORMATION_RESULT_CODE_UNSPECIFIED(0), + /** + *
+     * Transformation completed without an error.
+     * 
+ * + * SUCCESS = 1; + */ + SUCCESS(1), + /** + *
+     * Transformation had an error.
+     * 
+ * + * ERROR = 2; + */ + ERROR(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unused
+     * 
+ * + * TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; + */ + public static final int TRANSFORMATION_RESULT_CODE_UNSPECIFIED_VALUE = 0; + /** + *
+     * Transformation completed without an error.
+     * 
+ * + * SUCCESS = 1; + */ + public static final int SUCCESS_VALUE = 1; + /** + *
+     * Transformation had an error.
+     * 
+ * + * ERROR = 2; + */ + public static final int ERROR_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformationResultCode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TransformationResultCode forNumber(int value) { + switch (value) { + case 0: return TRANSFORMATION_RESULT_CODE_UNSPECIFIED; + case 1: return SUCCESS; + case 2: return ERROR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TransformationResultCode> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransformationResultCode findValueByNumber(int number) { + return TransformationResultCode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.TransformationSummary.getDescriptor().getEnumTypes().get(0); + } + + private static final TransformationResultCode[] VALUES = values(); + + public static TransformationResultCode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TransformationResultCode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TransformationSummary.TransformationResultCode) + } + + public interface SummaryResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationSummary.SummaryResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Number of transformations counted by this result.
+     * 
+ * + * int64 count = 1; + * @return The count. + */ + long getCount(); + + /** + *
+     * Outcome of the transformation.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; + * @return The enum numeric value on the wire for code. + */ + int getCodeValue(); + /** + *
+     * Outcome of the transformation.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; + * @return The code. + */ + com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode getCode(); + + /** + *
+     * A place for warnings or errors to show up if a transformation didn't
+     * work as expected.
+     * 
+ * + * string details = 3; + * @return The details. + */ + java.lang.String getDetails(); + /** + *
+     * A place for warnings or errors to show up if a transformation didn't
+     * work as expected.
+     * 
+ * + * string details = 3; + * @return The bytes for details. + */ + com.google.protobuf.ByteString + getDetailsBytes(); + } + /** + *
+   * A collection that informs the user the number of times a particular
+   * `TransformationResultCode` and error details occurred.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationSummary.SummaryResult} + */ + public static final class SummaryResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationSummary.SummaryResult) + SummaryResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use SummaryResult.newBuilder() to construct. + private SummaryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SummaryResult() { + code_ = 0; + details_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SummaryResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SummaryResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + count_ = input.readInt64(); + break; + } + case 16: { + int rawValue = input.readEnum(); + + code_ = rawValue; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + details_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.class, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder.class); + } + + public static final int COUNT_FIELD_NUMBER = 1; + private long count_; + /** + *
+     * Number of transformations counted by this result.
+     * 
+ * + * int64 count = 1; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + public static final int CODE_FIELD_NUMBER = 2; + private int code_; + /** + *
+     * Outcome of the transformation.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override public int getCodeValue() { + return code_; + } + /** + *
+     * Outcome of the transformation.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; + * @return The code. + */ + @java.lang.Override public com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode getCode() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode result = com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.valueOf(code_); + return result == null ? com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.UNRECOGNIZED : result; + } + + public static final int DETAILS_FIELD_NUMBER = 3; + private volatile java.lang.Object details_; + /** + *
+     * A place for warnings or errors to show up if a transformation didn't
+     * work as expected.
+     * 
+ * + * string details = 3; + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + /** + *
+     * A place for warnings or errors to show up if a transformation didn't
+     * work as expected.
+     * 
+ * + * string details = 3; + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (count_ != 0L) { + output.writeInt64(1, count_); + } + if (code_ != com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.TRANSFORMATION_RESULT_CODE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, details_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, count_); + } + if (code_ != com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.TRANSFORMATION_RESULT_CODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, details_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationSummary.SummaryResult)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult other = (com.google.privacy.dlp.v2.TransformationSummary.SummaryResult) obj; + + if (getCount() + != other.getCount()) return false; + if (code_ != other.code_) return false; + if (!getDetails() + .equals(other.getDetails())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCount()); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + code_; + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationSummary.SummaryResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A collection that informs the user the number of times a particular
+     * `TransformationResultCode` and error details occurred.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationSummary.SummaryResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationSummary.SummaryResult) + com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.class, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + count_ = 0L; + + code_ = 0; + + details_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult build() { + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult buildPartial() { + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult result = new com.google.privacy.dlp.v2.TransformationSummary.SummaryResult(this); + result.count_ = count_; + result.code_ = code_; + result.details_ = details_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationSummary.SummaryResult) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationSummary.SummaryResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationSummary.SummaryResult other) { + if (other == com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.getDefaultInstance()) return this; + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + if (other.code_ != 0) { + setCodeValue(other.getCodeValue()); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationSummary.SummaryResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long count_ ; + /** + *
+       * Number of transformations counted by this result.
+       * 
+ * + * int64 count = 1; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + *
+       * Number of transformations counted by this result.
+       * 
+ * + * int64 count = 1; + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + onChanged(); + return this; + } + /** + *
+       * Number of transformations counted by this result.
+       * 
+ * + * int64 count = 1; + * @return This builder for chaining. + */ + public Builder clearCount() { + + count_ = 0L; + onChanged(); + return this; + } + + private int code_ = 0; + /** + *
+       * Outcome of the transformation.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override public int getCodeValue() { + return code_; + } + /** + *
+       * Outcome of the transformation.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; + * @param value The enum numeric value on the wire for code to set. + * @return This builder for chaining. + */ + public Builder setCodeValue(int value) { + + code_ = value; + onChanged(); + return this; + } + /** + *
+       * Outcome of the transformation.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; + * @return The code. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode getCode() { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode result = com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.valueOf(code_); + return result == null ? com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.UNRECOGNIZED : result; + } + /** + *
+       * Outcome of the transformation.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode value) { + if (value == null) { + throw new NullPointerException(); + } + + code_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Outcome of the transformation.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; + * @return This builder for chaining. + */ + public Builder clearCode() { + + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + /** + *
+       * A place for warnings or errors to show up if a transformation didn't
+       * work as expected.
+       * 
+ * + * string details = 3; + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A place for warnings or errors to show up if a transformation didn't
+       * work as expected.
+       * 
+ * + * string details = 3; + * @return The bytes for details. + */ + public com.google.protobuf.ByteString + getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A place for warnings or errors to show up if a transformation didn't
+       * work as expected.
+       * 
+ * + * string details = 3; + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + details_ = value; + onChanged(); + return this; + } + /** + *
+       * A place for warnings or errors to show up if a transformation didn't
+       * work as expected.
+       * 
+ * + * string details = 3; + * @return This builder for chaining. + */ + public Builder clearDetails() { + + details_ = getDefaultInstance().getDetails(); + onChanged(); + return this; + } + /** + *
+       * A place for warnings or errors to show up if a transformation didn't
+       * work as expected.
+       * 
+ * + * string details = 3; + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + details_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationSummary.SummaryResult) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationSummary.SummaryResult) + private static final com.google.privacy.dlp.v2.TransformationSummary.SummaryResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationSummary.SummaryResult(); + } + + public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SummaryResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SummaryResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int INFO_TYPE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.InfoType infoType_; + /** + *
+   * Set if the transformation was limited to a specific InfoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + @java.lang.Override + public boolean hasInfoType() { + return infoType_ != null; + } + /** + *
+   * Set if the transformation was limited to a specific InfoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoType getInfoType() { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + /** + *
+   * Set if the transformation was limited to a specific InfoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + return getInfoType(); + } + + public static final int FIELD_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+   * Set if the transformation was limited to a specific FieldId.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return Whether the field field is set. + */ + @java.lang.Override + public boolean hasField() { + return field_ != null; + } + /** + *
+   * Set if the transformation was limited to a specific FieldId.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return The field. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+   * Set if the transformation was limited to a specific FieldId.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int TRANSFORMATION_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.PrimitiveTransformation transformation_; + /** + *
+   * The specific transformation these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + * @return Whether the transformation field is set. + */ + @java.lang.Override + public boolean hasTransformation() { + return transformation_ != null; + } + /** + *
+   * The specific transformation these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + * @return The transformation. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformation getTransformation() { + return transformation_ == null ? com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : transformation_; + } + /** + *
+   * The specific transformation these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getTransformationOrBuilder() { + return getTransformation(); + } + + public static final int FIELD_TRANSFORMATIONS_FIELD_NUMBER = 5; + private java.util.List fieldTransformations_; + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + @java.lang.Override + public java.util.List getFieldTransformationsList() { + return fieldTransformations_; + } + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + @java.lang.Override + public java.util.List + getFieldTransformationsOrBuilderList() { + return fieldTransformations_; + } + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + @java.lang.Override + public int getFieldTransformationsCount() { + return fieldTransformations_.size(); + } + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index) { + return fieldTransformations_.get(index); + } + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( + int index) { + return fieldTransformations_.get(index); + } + + public static final int RECORD_SUPPRESS_FIELD_NUMBER = 6; + private com.google.privacy.dlp.v2.RecordSuppression recordSuppress_; + /** + *
+   * The specific suppression option these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + * @return Whether the recordSuppress field is set. + */ + @java.lang.Override + public boolean hasRecordSuppress() { + return recordSuppress_ != null; + } + /** + *
+   * The specific suppression option these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + * @return The recordSuppress. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordSuppression getRecordSuppress() { + return recordSuppress_ == null ? com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance() : recordSuppress_; + } + /** + *
+   * The specific suppression option these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressOrBuilder() { + return getRecordSuppress(); + } + + public static final int RESULTS_FIELD_NUMBER = 4; + private java.util.List results_; + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getResults(int index) { + return results_.get(index); + } + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int TRANSFORMED_BYTES_FIELD_NUMBER = 7; + private long transformedBytes_; + /** + *
+   * Total size in bytes that were transformed in some way.
+   * 
+ * + * int64 transformed_bytes = 7; + * @return The transformedBytes. + */ + @java.lang.Override + public long getTransformedBytes() { + return transformedBytes_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (infoType_ != null) { + output.writeMessage(1, getInfoType()); + } + if (field_ != null) { + output.writeMessage(2, getField()); + } + if (transformation_ != null) { + output.writeMessage(3, getTransformation()); + } + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(4, results_.get(i)); + } + for (int i = 0; i < fieldTransformations_.size(); i++) { + output.writeMessage(5, fieldTransformations_.get(i)); + } + if (recordSuppress_ != null) { + output.writeMessage(6, getRecordSuppress()); + } + if (transformedBytes_ != 0L) { + output.writeInt64(7, transformedBytes_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (infoType_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInfoType()); + } + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getField()); + } + if (transformation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTransformation()); + } + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, results_.get(i)); + } + for (int i = 0; i < fieldTransformations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, fieldTransformations_.get(i)); + } + if (recordSuppress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getRecordSuppress()); + } + if (transformedBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, transformedBytes_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransformationSummary)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransformationSummary other = (com.google.privacy.dlp.v2.TransformationSummary) obj; + + if (hasInfoType() != other.hasInfoType()) return false; + if (hasInfoType()) { + if (!getInfoType() + .equals(other.getInfoType())) return false; + } + if (hasField() != other.hasField()) return false; + if (hasField()) { + if (!getField() + .equals(other.getField())) return false; + } + if (hasTransformation() != other.hasTransformation()) return false; + if (hasTransformation()) { + if (!getTransformation() + .equals(other.getTransformation())) return false; + } + if (!getFieldTransformationsList() + .equals(other.getFieldTransformationsList())) return false; + if (hasRecordSuppress() != other.hasRecordSuppress()) return false; + if (hasRecordSuppress()) { + if (!getRecordSuppress() + .equals(other.getRecordSuppress())) return false; + } + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (getTransformedBytes() + != other.getTransformedBytes()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInfoType()) { + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + } + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + if (hasTransformation()) { + hash = (37 * hash) + TRANSFORMATION_FIELD_NUMBER; + hash = (53 * hash) + getTransformation().hashCode(); + } + if (getFieldTransformationsCount() > 0) { + hash = (37 * hash) + FIELD_TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getFieldTransformationsList().hashCode(); + } + if (hasRecordSuppress()) { + hash = (37 * hash) + RECORD_SUPPRESS_FIELD_NUMBER; + hash = (53 * hash) + getRecordSuppress().hashCode(); + } + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (37 * hash) + TRANSFORMED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTransformedBytes()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Summary of a single transformation.
+   * Only one of 'transformation', 'field_transformation', or 'record_suppress'
+   * will be set.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransformationSummary} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationSummary) + com.google.privacy.dlp.v2.TransformationSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransformationSummary.class, com.google.privacy.dlp.v2.TransformationSummary.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransformationSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFieldTransformationsFieldBuilder(); + getResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (infoTypeBuilder_ == null) { + infoType_ = null; + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + if (transformationBuilder_ == null) { + transformation_ = null; + } else { + transformation_ = null; + transformationBuilder_ = null; + } + if (fieldTransformationsBuilder_ == null) { + fieldTransformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldTransformationsBuilder_.clear(); + } + if (recordSuppressBuilder_ == null) { + recordSuppress_ = null; + } else { + recordSuppress_ = null; + recordSuppressBuilder_ = null; + } + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + resultsBuilder_.clear(); + } + transformedBytes_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransformationSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary build() { + com.google.privacy.dlp.v2.TransformationSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary buildPartial() { + com.google.privacy.dlp.v2.TransformationSummary result = new com.google.privacy.dlp.v2.TransformationSummary(this); + int from_bitField0_ = bitField0_; + if (infoTypeBuilder_ == null) { + result.infoType_ = infoType_; + } else { + result.infoType_ = infoTypeBuilder_.build(); + } + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + if (transformationBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = transformationBuilder_.build(); + } + if (fieldTransformationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fieldTransformations_ = java.util.Collections.unmodifiableList(fieldTransformations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fieldTransformations_ = fieldTransformations_; + } else { + result.fieldTransformations_ = fieldTransformationsBuilder_.build(); + } + if (recordSuppressBuilder_ == null) { + result.recordSuppress_ = recordSuppress_; + } else { + result.recordSuppress_ = recordSuppressBuilder_.build(); + } + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + result.transformedBytes_ = transformedBytes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransformationSummary) { + return mergeFrom((com.google.privacy.dlp.v2.TransformationSummary)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationSummary other) { + if (other == com.google.privacy.dlp.v2.TransformationSummary.getDefaultInstance()) return this; + if (other.hasInfoType()) { + mergeInfoType(other.getInfoType()); + } + if (other.hasField()) { + mergeField(other.getField()); + } + if (other.hasTransformation()) { + mergeTransformation(other.getTransformation()); + } + if (fieldTransformationsBuilder_ == null) { + if (!other.fieldTransformations_.isEmpty()) { + if (fieldTransformations_.isEmpty()) { + fieldTransformations_ = other.fieldTransformations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.addAll(other.fieldTransformations_); + } + onChanged(); + } + } else { + if (!other.fieldTransformations_.isEmpty()) { + if (fieldTransformationsBuilder_.isEmpty()) { + fieldTransformationsBuilder_.dispose(); + fieldTransformationsBuilder_ = null; + fieldTransformations_ = other.fieldTransformations_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldTransformationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFieldTransformationsFieldBuilder() : null; + } else { + fieldTransformationsBuilder_.addAllMessages(other.fieldTransformations_); + } + } + } + if (other.hasRecordSuppress()) { + mergeRecordSuppress(other.getRecordSuppress()); + } + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000002); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (other.getTransformedBytes() != 0L) { + setTransformedBytes(other.getTransformedBytes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransformationSummary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransformationSummary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.InfoType infoType_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+     * Set if the transformation was limited to a specific InfoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + public boolean hasInfoType() { + return infoTypeBuilder_ != null || infoType_ != null; + } + /** + *
+     * Set if the transformation was limited to a specific InfoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } else { + return infoTypeBuilder_.getMessage(); + } + } + /** + *
+     * Set if the transformation was limited to a specific InfoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + infoType_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific InfoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + infoType_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific InfoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (infoType_ != null) { + infoType_ = + com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); + } else { + infoType_ = value; + } + onChanged(); + } else { + infoTypeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific InfoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + infoType_ = null; + onChanged(); + } else { + infoType_ = null; + infoTypeBuilder_ = null; + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific InfoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + + onChanged(); + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * Set if the transformation was limited to a specific InfoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (infoTypeBuilder_ != null) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + return infoType_ == null ? + com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + } + } + /** + *
+     * Set if the transformation was limited to a specific InfoType.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getInfoType(), + getParentForChildren(), + isClean()); + infoType_ = null; + } + return infoTypeBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId field_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+     * Set if the transformation was limited to a specific FieldId.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return Whether the field field is set. + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+     * Set if the transformation was limited to a specific FieldId.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return The field. + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+     * Set if the transformation was limited to a specific FieldId.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific FieldId.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific FieldId.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific FieldId.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+     * Set if the transformation was limited to a specific FieldId.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+     * Set if the transformation was limited to a specific FieldId.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+     * Set if the transformation was limited to a specific FieldId.
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private com.google.privacy.dlp.v2.PrimitiveTransformation transformation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> transformationBuilder_; + /** + *
+     * The specific transformation these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + * @return Whether the transformation field is set. + */ + public boolean hasTransformation() { + return transformationBuilder_ != null || transformation_ != null; + } + /** + *
+     * The specific transformation these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + * @return The transformation. + */ + public com.google.privacy.dlp.v2.PrimitiveTransformation getTransformation() { + if (transformationBuilder_ == null) { + return transformation_ == null ? com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : transformation_; + } else { + return transformationBuilder_.getMessage(); + } + } + /** + *
+     * The specific transformation these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + */ + public Builder setTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { + if (transformationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + transformationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The specific transformation these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + */ + public Builder setTransformation( + com.google.privacy.dlp.v2.PrimitiveTransformation.Builder builderForValue) { + if (transformationBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + transformationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The specific transformation these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + */ + public Builder mergeTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { + if (transformationBuilder_ == null) { + if (transformation_ != null) { + transformation_ = + com.google.privacy.dlp.v2.PrimitiveTransformation.newBuilder(transformation_).mergeFrom(value).buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + transformationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The specific transformation these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + */ + public Builder clearTransformation() { + if (transformationBuilder_ == null) { + transformation_ = null; + onChanged(); + } else { + transformation_ = null; + transformationBuilder_ = null; + } + + return this; + } + /** + *
+     * The specific transformation these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + */ + public com.google.privacy.dlp.v2.PrimitiveTransformation.Builder getTransformationBuilder() { + + onChanged(); + return getTransformationFieldBuilder().getBuilder(); + } + /** + *
+     * The specific transformation these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + */ + public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getTransformationOrBuilder() { + if (transformationBuilder_ != null) { + return transformationBuilder_.getMessageOrBuilder(); + } else { + return transformation_ == null ? + com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : transformation_; + } + } + /** + *
+     * The specific transformation these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> + getTransformationFieldBuilder() { + if (transformationBuilder_ == null) { + transformationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder>( + getTransformation(), + getParentForChildren(), + isClean()); + transformation_ = null; + } + return transformationBuilder_; + } + + private java.util.List fieldTransformations_ = + java.util.Collections.emptyList(); + private void ensureFieldTransformationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fieldTransformations_ = new java.util.ArrayList(fieldTransformations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder> fieldTransformationsBuilder_; + + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public java.util.List getFieldTransformationsList() { + if (fieldTransformationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fieldTransformations_); + } else { + return fieldTransformationsBuilder_.getMessageList(); + } + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public int getFieldTransformationsCount() { + if (fieldTransformationsBuilder_ == null) { + return fieldTransformations_.size(); + } else { + return fieldTransformationsBuilder_.getCount(); + } + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index) { + if (fieldTransformationsBuilder_ == null) { + return fieldTransformations_.get(index); + } else { + return fieldTransformationsBuilder_.getMessage(index); + } + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public Builder setFieldTransformations( + int index, com.google.privacy.dlp.v2.FieldTransformation value) { + if (fieldTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldTransformationsIsMutable(); + fieldTransformations_.set(index, value); + onChanged(); + } else { + fieldTransformationsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public Builder setFieldTransformations( + int index, com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldTransformationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public Builder addFieldTransformations(com.google.privacy.dlp.v2.FieldTransformation value) { + if (fieldTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldTransformationsIsMutable(); + fieldTransformations_.add(value); + onChanged(); + } else { + fieldTransformationsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public Builder addFieldTransformations( + int index, com.google.privacy.dlp.v2.FieldTransformation value) { + if (fieldTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldTransformationsIsMutable(); + fieldTransformations_.add(index, value); + onChanged(); + } else { + fieldTransformationsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public Builder addFieldTransformations( + com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.add(builderForValue.build()); + onChanged(); + } else { + fieldTransformationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public Builder addFieldTransformations( + int index, com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldTransformationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public Builder addAllFieldTransformations( + java.lang.Iterable values) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fieldTransformations_); + onChanged(); + } else { + fieldTransformationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public Builder clearFieldTransformations() { + if (fieldTransformationsBuilder_ == null) { + fieldTransformations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldTransformationsBuilder_.clear(); + } + return this; + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public Builder removeFieldTransformations(int index) { + if (fieldTransformationsBuilder_ == null) { + ensureFieldTransformationsIsMutable(); + fieldTransformations_.remove(index); + onChanged(); + } else { + fieldTransformationsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public com.google.privacy.dlp.v2.FieldTransformation.Builder getFieldTransformationsBuilder( + int index) { + return getFieldTransformationsFieldBuilder().getBuilder(index); + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( + int index) { + if (fieldTransformationsBuilder_ == null) { + return fieldTransformations_.get(index); } else { + return fieldTransformationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public java.util.List + getFieldTransformationsOrBuilderList() { + if (fieldTransformationsBuilder_ != null) { + return fieldTransformationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fieldTransformations_); + } + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public com.google.privacy.dlp.v2.FieldTransformation.Builder addFieldTransformationsBuilder() { + return getFieldTransformationsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()); + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public com.google.privacy.dlp.v2.FieldTransformation.Builder addFieldTransformationsBuilder( + int index) { + return getFieldTransformationsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()); + } + /** + *
+     * The field transformation that was applied.
+     * If multiple field transformations are requested for a single field,
+     * this list will contain all of them; otherwise, only one is supplied.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + public java.util.List + getFieldTransformationsBuilderList() { + return getFieldTransformationsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder> + getFieldTransformationsFieldBuilder() { + if (fieldTransformationsBuilder_ == null) { + fieldTransformationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder>( + fieldTransformations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fieldTransformations_ = null; + } + return fieldTransformationsBuilder_; + } + + private com.google.privacy.dlp.v2.RecordSuppression recordSuppress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder> recordSuppressBuilder_; + /** + *
+     * The specific suppression option these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + * @return Whether the recordSuppress field is set. + */ + public boolean hasRecordSuppress() { + return recordSuppressBuilder_ != null || recordSuppress_ != null; + } + /** + *
+     * The specific suppression option these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + * @return The recordSuppress. + */ + public com.google.privacy.dlp.v2.RecordSuppression getRecordSuppress() { + if (recordSuppressBuilder_ == null) { + return recordSuppress_ == null ? com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance() : recordSuppress_; + } else { + return recordSuppressBuilder_.getMessage(); + } + } + /** + *
+     * The specific suppression option these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + */ + public Builder setRecordSuppress(com.google.privacy.dlp.v2.RecordSuppression value) { + if (recordSuppressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recordSuppress_ = value; + onChanged(); + } else { + recordSuppressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The specific suppression option these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + */ + public Builder setRecordSuppress( + com.google.privacy.dlp.v2.RecordSuppression.Builder builderForValue) { + if (recordSuppressBuilder_ == null) { + recordSuppress_ = builderForValue.build(); + onChanged(); + } else { + recordSuppressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The specific suppression option these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + */ + public Builder mergeRecordSuppress(com.google.privacy.dlp.v2.RecordSuppression value) { + if (recordSuppressBuilder_ == null) { + if (recordSuppress_ != null) { + recordSuppress_ = + com.google.privacy.dlp.v2.RecordSuppression.newBuilder(recordSuppress_).mergeFrom(value).buildPartial(); + } else { + recordSuppress_ = value; + } + onChanged(); + } else { + recordSuppressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The specific suppression option these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + */ + public Builder clearRecordSuppress() { + if (recordSuppressBuilder_ == null) { + recordSuppress_ = null; + onChanged(); + } else { + recordSuppress_ = null; + recordSuppressBuilder_ = null; + } + + return this; + } + /** + *
+     * The specific suppression option these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + */ + public com.google.privacy.dlp.v2.RecordSuppression.Builder getRecordSuppressBuilder() { + + onChanged(); + return getRecordSuppressFieldBuilder().getBuilder(); + } + /** + *
+     * The specific suppression option these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + */ + public com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressOrBuilder() { + if (recordSuppressBuilder_ != null) { + return recordSuppressBuilder_.getMessageOrBuilder(); + } else { + return recordSuppress_ == null ? + com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance() : recordSuppress_; + } + } + /** + *
+     * The specific suppression option these stats apply to.
+     * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder> + getRecordSuppressFieldBuilder() { + if (recordSuppressBuilder_ == null) { + recordSuppressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder>( + getRecordSuppress(), + getParentForChildren(), + isClean()); + recordSuppress_ = null; + } + return recordSuppressBuilder_; + } + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder, com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder> resultsBuilder_; + + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public Builder setResults( + int index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public Builder setResults( + int index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public Builder addResults(com.google.privacy.dlp.v2.TransformationSummary.SummaryResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public Builder addResults( + int index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public Builder addResults( + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public Builder addResults( + int index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.getDefaultInstance()); + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.getDefaultInstance()); + } + /** + *
+     * Collection of all transformations that took place or had an error.
+     * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder, com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder, com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder>( + results_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private long transformedBytes_ ; + /** + *
+     * Total size in bytes that were transformed in some way.
+     * 
+ * + * int64 transformed_bytes = 7; + * @return The transformedBytes. + */ + @java.lang.Override + public long getTransformedBytes() { + return transformedBytes_; + } + /** + *
+     * Total size in bytes that were transformed in some way.
+     * 
+ * + * int64 transformed_bytes = 7; + * @param value The transformedBytes to set. + * @return This builder for chaining. + */ + public Builder setTransformedBytes(long value) { + + transformedBytes_ = value; + onChanged(); + return this; + } + /** + *
+     * Total size in bytes that were transformed in some way.
+     * 
+ * + * int64 transformed_bytes = 7; + * @return This builder for chaining. + */ + public Builder clearTransformedBytes() { + + transformedBytes_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationSummary) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationSummary) + private static final com.google.privacy.dlp.v2.TransformationSummary DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationSummary(); + } + + public static com.google.privacy.dlp.v2.TransformationSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationSummary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummaryOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummaryOrBuilder.java new file mode 100644 index 000000000000..680cc23117e3 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummaryOrBuilder.java @@ -0,0 +1,225 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransformationSummaryOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationSummary) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Set if the transformation was limited to a specific InfoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return Whether the infoType field is set. + */ + boolean hasInfoType(); + /** + *
+   * Set if the transformation was limited to a specific InfoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + * @return The infoType. + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+   * Set if the transformation was limited to a specific InfoType.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 1; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+   * Set if the transformation was limited to a specific FieldId.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return Whether the field field is set. + */ + boolean hasField(); + /** + *
+   * Set if the transformation was limited to a specific FieldId.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + * @return The field. + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+   * Set if the transformation was limited to a specific FieldId.
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 2; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + + /** + *
+   * The specific transformation these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + * @return Whether the transformation field is set. + */ + boolean hasTransformation(); + /** + *
+   * The specific transformation these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + * @return The transformation. + */ + com.google.privacy.dlp.v2.PrimitiveTransformation getTransformation(); + /** + *
+   * The specific transformation these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; + */ + com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getTransformationOrBuilder(); + + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + java.util.List + getFieldTransformationsList(); + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index); + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + int getFieldTransformationsCount(); + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + java.util.List + getFieldTransformationsOrBuilderList(); + /** + *
+   * The field transformation that was applied.
+   * If multiple field transformations are requested for a single field,
+   * this list will contain all of them; otherwise, only one is supplied.
+   * 
+ * + * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; + */ + com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( + int index); + + /** + *
+   * The specific suppression option these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + * @return Whether the recordSuppress field is set. + */ + boolean hasRecordSuppress(); + /** + *
+   * The specific suppression option these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + * @return The recordSuppress. + */ + com.google.privacy.dlp.v2.RecordSuppression getRecordSuppress(); + /** + *
+   * The specific suppression option these stats apply to.
+   * 
+ * + * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; + */ + com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressOrBuilder(); + + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + java.util.List + getResultsList(); + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getResults(int index); + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + int getResultsCount(); + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+   * Collection of all transformations that took place or had an error.
+   * 
+ * + * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; + */ + com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+   * Total size in bytes that were transformed in some way.
+   * 
+ * + * int64 transformed_bytes = 7; + * @return The transformedBytes. + */ + long getTransformedBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java new file mode 100644 index 000000000000..d9e523caa8f3 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java @@ -0,0 +1,356 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * An enum of rules that can be used to transform a value. Can be a
+ * record suppression, or one of the transformation rules specified under
+ * `PrimitiveTransformation`.
+ * 
+ * + * Protobuf enum {@code google.privacy.dlp.v2.TransformationType} + */ +public enum TransformationType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unused
+   * 
+ * + * TRANSFORMATION_TYPE_UNSPECIFIED = 0; + */ + TRANSFORMATION_TYPE_UNSPECIFIED(0), + /** + *
+   * Record suppression
+   * 
+ * + * RECORD_SUPPRESSION = 1; + */ + RECORD_SUPPRESSION(1), + /** + *
+   * Replace value
+   * 
+ * + * REPLACE_VALUE = 2; + */ + REPLACE_VALUE(2), + /** + *
+   * Replace value using a dictionary.
+   * 
+ * + * REPLACE_DICTIONARY = 15; + */ + REPLACE_DICTIONARY(15), + /** + *
+   * Redact
+   * 
+ * + * REDACT = 3; + */ + REDACT(3), + /** + *
+   * Character mask
+   * 
+ * + * CHARACTER_MASK = 4; + */ + CHARACTER_MASK(4), + /** + *
+   * FFX-FPE
+   * 
+ * + * CRYPTO_REPLACE_FFX_FPE = 5; + */ + CRYPTO_REPLACE_FFX_FPE(5), + /** + *
+   * Fixed size bucketing
+   * 
+ * + * FIXED_SIZE_BUCKETING = 6; + */ + FIXED_SIZE_BUCKETING(6), + /** + *
+   * Bucketing
+   * 
+ * + * BUCKETING = 7; + */ + BUCKETING(7), + /** + *
+   * Replace with info type
+   * 
+ * + * REPLACE_WITH_INFO_TYPE = 8; + */ + REPLACE_WITH_INFO_TYPE(8), + /** + *
+   * Time part
+   * 
+ * + * TIME_PART = 9; + */ + TIME_PART(9), + /** + *
+   * Crypto hash
+   * 
+ * + * CRYPTO_HASH = 10; + */ + CRYPTO_HASH(10), + /** + *
+   * Date shift
+   * 
+ * + * DATE_SHIFT = 12; + */ + DATE_SHIFT(12), + /** + *
+   * Deterministic crypto
+   * 
+ * + * CRYPTO_DETERMINISTIC_CONFIG = 13; + */ + CRYPTO_DETERMINISTIC_CONFIG(13), + /** + *
+   * Redact image
+   * 
+ * + * REDACT_IMAGE = 14; + */ + REDACT_IMAGE(14), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unused
+   * 
+ * + * TRANSFORMATION_TYPE_UNSPECIFIED = 0; + */ + public static final int TRANSFORMATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * Record suppression
+   * 
+ * + * RECORD_SUPPRESSION = 1; + */ + public static final int RECORD_SUPPRESSION_VALUE = 1; + /** + *
+   * Replace value
+   * 
+ * + * REPLACE_VALUE = 2; + */ + public static final int REPLACE_VALUE_VALUE = 2; + /** + *
+   * Replace value using a dictionary.
+   * 
+ * + * REPLACE_DICTIONARY = 15; + */ + public static final int REPLACE_DICTIONARY_VALUE = 15; + /** + *
+   * Redact
+   * 
+ * + * REDACT = 3; + */ + public static final int REDACT_VALUE = 3; + /** + *
+   * Character mask
+   * 
+ * + * CHARACTER_MASK = 4; + */ + public static final int CHARACTER_MASK_VALUE = 4; + /** + *
+   * FFX-FPE
+   * 
+ * + * CRYPTO_REPLACE_FFX_FPE = 5; + */ + public static final int CRYPTO_REPLACE_FFX_FPE_VALUE = 5; + /** + *
+   * Fixed size bucketing
+   * 
+ * + * FIXED_SIZE_BUCKETING = 6; + */ + public static final int FIXED_SIZE_BUCKETING_VALUE = 6; + /** + *
+   * Bucketing
+   * 
+ * + * BUCKETING = 7; + */ + public static final int BUCKETING_VALUE = 7; + /** + *
+   * Replace with info type
+   * 
+ * + * REPLACE_WITH_INFO_TYPE = 8; + */ + public static final int REPLACE_WITH_INFO_TYPE_VALUE = 8; + /** + *
+   * Time part
+   * 
+ * + * TIME_PART = 9; + */ + public static final int TIME_PART_VALUE = 9; + /** + *
+   * Crypto hash
+   * 
+ * + * CRYPTO_HASH = 10; + */ + public static final int CRYPTO_HASH_VALUE = 10; + /** + *
+   * Date shift
+   * 
+ * + * DATE_SHIFT = 12; + */ + public static final int DATE_SHIFT_VALUE = 12; + /** + *
+   * Deterministic crypto
+   * 
+ * + * CRYPTO_DETERMINISTIC_CONFIG = 13; + */ + public static final int CRYPTO_DETERMINISTIC_CONFIG_VALUE = 13; + /** + *
+   * Redact image
+   * 
+ * + * REDACT_IMAGE = 14; + */ + public static final int REDACT_IMAGE_VALUE = 14; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransformationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TransformationType forNumber(int value) { + switch (value) { + case 0: return TRANSFORMATION_TYPE_UNSPECIFIED; + case 1: return RECORD_SUPPRESSION; + case 2: return REPLACE_VALUE; + case 15: return REPLACE_DICTIONARY; + case 3: return REDACT; + case 4: return CHARACTER_MASK; + case 5: return CRYPTO_REPLACE_FFX_FPE; + case 6: return FIXED_SIZE_BUCKETING; + case 7: return BUCKETING; + case 8: return REPLACE_WITH_INFO_TYPE; + case 9: return TIME_PART; + case 10: return CRYPTO_HASH; + case 12: return DATE_SHIFT; + case 13: return CRYPTO_DETERMINISTIC_CONFIG; + case 14: return REDACT_IMAGE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TransformationType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransformationType findValueByNumber(int number) { + return TransformationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(2); + } + + private static final TransformationType[] VALUES = values(); + + public static TransformationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TransformationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TransformationType) +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKey.java new file mode 100644 index 000000000000..59900aa0e3cd --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKey.java @@ -0,0 +1,632 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Use this to have a random data crypto key generated.
+ * It will be discarded after the request finishes.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransientCryptoKey} + */ +public final class TransientCryptoKey extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransientCryptoKey) + TransientCryptoKeyOrBuilder { +private static final long serialVersionUID = 0L; + // Use TransientCryptoKey.newBuilder() to construct. + private TransientCryptoKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransientCryptoKey() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransientCryptoKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransientCryptoKey( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransientCryptoKey.class, com.google.privacy.dlp.v2.TransientCryptoKey.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Name of the key.
+   * This is an arbitrary string used to differentiate different keys.
+   * A unique key is generated per name: two separate `TransientCryptoKey`
+   * protos share the same generated key if their names are the same.
+   * When the data crypto key is generated, this name is not used in any way
+   * (repeating the api call will result in a different key being generated).
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Name of the key.
+   * This is an arbitrary string used to differentiate different keys.
+   * A unique key is generated per name: two separate `TransientCryptoKey`
+   * protos share the same generated key if their names are the same.
+   * When the data crypto key is generated, this name is not used in any way
+   * (repeating the api call will result in a different key being generated).
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.TransientCryptoKey)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.TransientCryptoKey other = (com.google.privacy.dlp.v2.TransientCryptoKey) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransientCryptoKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Use this to have a random data crypto key generated.
+   * It will be discarded after the request finishes.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.TransientCryptoKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransientCryptoKey) + com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.TransientCryptoKey.class, com.google.privacy.dlp.v2.TransientCryptoKey.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.TransientCryptoKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransientCryptoKey getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransientCryptoKey build() { + com.google.privacy.dlp.v2.TransientCryptoKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransientCryptoKey buildPartial() { + com.google.privacy.dlp.v2.TransientCryptoKey result = new com.google.privacy.dlp.v2.TransientCryptoKey(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.TransientCryptoKey) { + return mergeFrom((com.google.privacy.dlp.v2.TransientCryptoKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.TransientCryptoKey other) { + if (other == com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.TransientCryptoKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.TransientCryptoKey) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Name of the key.
+     * This is an arbitrary string used to differentiate different keys.
+     * A unique key is generated per name: two separate `TransientCryptoKey`
+     * protos share the same generated key if their names are the same.
+     * When the data crypto key is generated, this name is not used in any way
+     * (repeating the api call will result in a different key being generated).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Name of the key.
+     * This is an arbitrary string used to differentiate different keys.
+     * A unique key is generated per name: two separate `TransientCryptoKey`
+     * protos share the same generated key if their names are the same.
+     * When the data crypto key is generated, this name is not used in any way
+     * (repeating the api call will result in a different key being generated).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Name of the key.
+     * This is an arbitrary string used to differentiate different keys.
+     * A unique key is generated per name: two separate `TransientCryptoKey`
+     * protos share the same generated key if their names are the same.
+     * When the data crypto key is generated, this name is not used in any way
+     * (repeating the api call will result in a different key being generated).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Name of the key.
+     * This is an arbitrary string used to differentiate different keys.
+     * A unique key is generated per name: two separate `TransientCryptoKey`
+     * protos share the same generated key if their names are the same.
+     * When the data crypto key is generated, this name is not used in any way
+     * (repeating the api call will result in a different key being generated).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Name of the key.
+     * This is an arbitrary string used to differentiate different keys.
+     * A unique key is generated per name: two separate `TransientCryptoKey`
+     * protos share the same generated key if their names are the same.
+     * When the data crypto key is generated, this name is not used in any way
+     * (repeating the api call will result in a different key being generated).
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransientCryptoKey) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransientCryptoKey) + private static final com.google.privacy.dlp.v2.TransientCryptoKey DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransientCryptoKey(); + } + + public static com.google.privacy.dlp.v2.TransientCryptoKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransientCryptoKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransientCryptoKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.TransientCryptoKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKeyOrBuilder.java new file mode 100644 index 000000000000..072f5f73f2f6 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKeyOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface TransientCryptoKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransientCryptoKey) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Name of the key.
+   * This is an arbitrary string used to differentiate different keys.
+   * A unique key is generated per name: two separate `TransientCryptoKey`
+   * protos share the same generated key if their names are the same.
+   * When the data crypto key is generated, this name is not used in any way
+   * (repeating the api call will result in a different key being generated).
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Name of the key.
+   * This is an arbitrary string used to differentiate different keys.
+   * A unique key is generated per name: two separate `TransientCryptoKey`
+   * protos share the same generated key if their names are the same.
+   * When the data crypto key is generated, this name is not used in any way
+   * (repeating the api call will result in a different key being generated).
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKey.java new file mode 100644 index 000000000000..0c2c1a2fa173 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKey.java @@ -0,0 +1,515 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Using raw keys is prone to security risks due to accidentally
+ * leaking the key. Choose another type of key if possible.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UnwrappedCryptoKey} + */ +public final class UnwrappedCryptoKey extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UnwrappedCryptoKey) + UnwrappedCryptoKeyOrBuilder { +private static final long serialVersionUID = 0L; + // Use UnwrappedCryptoKey.newBuilder() to construct. + private UnwrappedCryptoKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UnwrappedCryptoKey() { + key_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UnwrappedCryptoKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UnwrappedCryptoKey( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + key_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UnwrappedCryptoKey.class, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + *
+   * Required. A 128/192/256 bit key.
+   * 
+ * + * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!key_.isEmpty()) { + output.writeBytes(1, key_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!key_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, key_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.UnwrappedCryptoKey)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.UnwrappedCryptoKey other = (com.google.privacy.dlp.v2.UnwrappedCryptoKey) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.UnwrappedCryptoKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Using raw keys is prone to security risks due to accidentally
+   * leaking the key. Choose another type of key if possible.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UnwrappedCryptoKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UnwrappedCryptoKey) + com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UnwrappedCryptoKey.class, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.UnwrappedCryptoKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UnwrappedCryptoKey getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UnwrappedCryptoKey build() { + com.google.privacy.dlp.v2.UnwrappedCryptoKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UnwrappedCryptoKey buildPartial() { + com.google.privacy.dlp.v2.UnwrappedCryptoKey result = new com.google.privacy.dlp.v2.UnwrappedCryptoKey(this); + result.key_ = key_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.UnwrappedCryptoKey) { + return mergeFrom((com.google.privacy.dlp.v2.UnwrappedCryptoKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.UnwrappedCryptoKey other) { + if (other == com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance()) return this; + if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { + setKey(other.getKey()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.UnwrappedCryptoKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.UnwrappedCryptoKey) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Required. A 128/192/256 bit key.
+     * 
+ * + * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + *
+     * Required. A 128/192/256 bit key.
+     * 
+ * + * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. A 128/192/256 bit key.
+     * 
+ * + * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UnwrappedCryptoKey) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UnwrappedCryptoKey) + private static final com.google.privacy.dlp.v2.UnwrappedCryptoKey DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UnwrappedCryptoKey(); + } + + public static com.google.privacy.dlp.v2.UnwrappedCryptoKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UnwrappedCryptoKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UnwrappedCryptoKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UnwrappedCryptoKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKeyOrBuilder.java new file mode 100644 index 000000000000..ce2457619b00 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKeyOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface UnwrappedCryptoKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UnwrappedCryptoKey) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. A 128/192/256 bit key.
+   * 
+ * + * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java new file mode 100644 index 000000000000..22f6ee82407a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java @@ -0,0 +1,1081 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for UpdateDeidentifyTemplate.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} + */ +public final class UpdateDeidentifyTemplateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) + UpdateDeidentifyTemplateRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateDeidentifyTemplateRequest.newBuilder() to construct. + private UpdateDeidentifyTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateDeidentifyTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateDeidentifyTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateDeidentifyTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.DeidentifyTemplate.Builder subBuilder = null; + if (deidentifyTemplate_ != null) { + subBuilder = deidentifyTemplate_.toBuilder(); + } + deidentifyTemplate_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyTemplate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deidentifyTemplate_); + deidentifyTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of organization and deidentify template to be updated, for
+   * example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of organization and deidentify template to be updated, for
+   * example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEIDENTIFY_TEMPLATE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.DeidentifyTemplate deidentifyTemplate_; + /** + *
+   * New DeidentifyTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + * @return Whether the deidentifyTemplate field is set. + */ + @java.lang.Override + public boolean hasDeidentifyTemplate() { + return deidentifyTemplate_ != null; + } + /** + *
+   * New DeidentifyTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + * @return The deidentifyTemplate. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate() { + return deidentifyTemplate_ == null ? com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; + } + /** + *
+   * New DeidentifyTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder() { + return getDeidentifyTemplate(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (deidentifyTemplate_ != null) { + output.writeMessage(2, getDeidentifyTemplate()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (deidentifyTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDeidentifyTemplate()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest other = (com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasDeidentifyTemplate() != other.hasDeidentifyTemplate()) return false; + if (hasDeidentifyTemplate()) { + if (!getDeidentifyTemplate() + .equals(other.getDeidentifyTemplate())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasDeidentifyTemplate()) { + hash = (37 * hash) + DEIDENTIFY_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getDeidentifyTemplate().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateDeidentifyTemplate.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (deidentifyTemplateBuilder_ == null) { + deidentifyTemplate_ = null; + } else { + deidentifyTemplate_ = null; + deidentifyTemplateBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest build() { + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest buildPartial() { + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest result = new com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(this); + result.name_ = name_; + if (deidentifyTemplateBuilder_ == null) { + result.deidentifyTemplate_ = deidentifyTemplate_; + } else { + result.deidentifyTemplate_ = deidentifyTemplateBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) { + return mergeFrom((com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest other) { + if (other == com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasDeidentifyTemplate()) { + mergeDeidentifyTemplate(other.getDeidentifyTemplate()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of organization and deidentify template to be updated, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of organization and deidentify template to be updated, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of organization and deidentify template to be updated, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of organization and deidentify template to be updated, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of organization and deidentify template to be updated, for
+     * example `organizations/433245324/deidentifyTemplates/432452342` or
+     * projects/project-id/deidentifyTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.DeidentifyTemplate deidentifyTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> deidentifyTemplateBuilder_; + /** + *
+     * New DeidentifyTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + * @return Whether the deidentifyTemplate field is set. + */ + public boolean hasDeidentifyTemplate() { + return deidentifyTemplateBuilder_ != null || deidentifyTemplate_ != null; + } + /** + *
+     * New DeidentifyTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + * @return The deidentifyTemplate. + */ + public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate() { + if (deidentifyTemplateBuilder_ == null) { + return deidentifyTemplate_ == null ? com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; + } else { + return deidentifyTemplateBuilder_.getMessage(); + } + } + /** + *
+     * New DeidentifyTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + */ + public Builder setDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate value) { + if (deidentifyTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deidentifyTemplate_ = value; + onChanged(); + } else { + deidentifyTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * New DeidentifyTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + */ + public Builder setDeidentifyTemplate( + com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { + if (deidentifyTemplateBuilder_ == null) { + deidentifyTemplate_ = builderForValue.build(); + onChanged(); + } else { + deidentifyTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * New DeidentifyTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + */ + public Builder mergeDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate value) { + if (deidentifyTemplateBuilder_ == null) { + if (deidentifyTemplate_ != null) { + deidentifyTemplate_ = + com.google.privacy.dlp.v2.DeidentifyTemplate.newBuilder(deidentifyTemplate_).mergeFrom(value).buildPartial(); + } else { + deidentifyTemplate_ = value; + } + onChanged(); + } else { + deidentifyTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * New DeidentifyTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + */ + public Builder clearDeidentifyTemplate() { + if (deidentifyTemplateBuilder_ == null) { + deidentifyTemplate_ = null; + onChanged(); + } else { + deidentifyTemplate_ = null; + deidentifyTemplateBuilder_ = null; + } + + return this; + } + /** + *
+     * New DeidentifyTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + */ + public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder getDeidentifyTemplateBuilder() { + + onChanged(); + return getDeidentifyTemplateFieldBuilder().getBuilder(); + } + /** + *
+     * New DeidentifyTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + */ + public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder() { + if (deidentifyTemplateBuilder_ != null) { + return deidentifyTemplateBuilder_.getMessageOrBuilder(); + } else { + return deidentifyTemplate_ == null ? + com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; + } + } + /** + *
+     * New DeidentifyTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> + getDeidentifyTemplateFieldBuilder() { + if (deidentifyTemplateBuilder_ == null) { + deidentifyTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder>( + getDeidentifyTemplate(), + getParentForChildren(), + isClean()); + deidentifyTemplate_ = null; + } + return deidentifyTemplateBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) + private static final com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(); + } + + public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDeidentifyTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateDeidentifyTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..72bfe90f457b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java @@ -0,0 +1,87 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface UpdateDeidentifyTemplateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of organization and deidentify template to be updated, for
+   * example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of organization and deidentify template to be updated, for
+   * example `organizations/433245324/deidentifyTemplates/432452342` or
+   * projects/project-id/deidentifyTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * New DeidentifyTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + * @return Whether the deidentifyTemplate field is set. + */ + boolean hasDeidentifyTemplate(); + /** + *
+   * New DeidentifyTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + * @return The deidentifyTemplate. + */ + com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate(); + /** + *
+   * New DeidentifyTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; + */ + com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder(); + + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java new file mode 100644 index 000000000000..c5cd9a70708e --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java @@ -0,0 +1,1081 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for UpdateInspectTemplate.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UpdateInspectTemplateRequest} + */ +public final class UpdateInspectTemplateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UpdateInspectTemplateRequest) + UpdateInspectTemplateRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateInspectTemplateRequest.newBuilder() to construct. + private UpdateInspectTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateInspectTemplateRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateInspectTemplateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateInspectTemplateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.InspectTemplate.Builder subBuilder = null; + if (inspectTemplate_ != null) { + subBuilder = inspectTemplate_.toBuilder(); + } + inspectTemplate_ = input.readMessage(com.google.privacy.dlp.v2.InspectTemplate.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inspectTemplate_); + inspectTemplate_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.class, com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of organization and inspectTemplate to be updated, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of organization and inspectTemplate to be updated, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSPECT_TEMPLATE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.InspectTemplate inspectTemplate_; + /** + *
+   * New InspectTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + * @return Whether the inspectTemplate field is set. + */ + @java.lang.Override + public boolean hasInspectTemplate() { + return inspectTemplate_ != null; + } + /** + *
+   * New InspectTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + * @return The inspectTemplate. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate() { + return inspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; + } + /** + *
+   * New InspectTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder() { + return getInspectTemplate(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (inspectTemplate_ != null) { + output.writeMessage(2, getInspectTemplate()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (inspectTemplate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInspectTemplate()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.UpdateInspectTemplateRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.UpdateInspectTemplateRequest other = (com.google.privacy.dlp.v2.UpdateInspectTemplateRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasInspectTemplate() != other.hasInspectTemplate()) return false; + if (hasInspectTemplate()) { + if (!getInspectTemplate() + .equals(other.getInspectTemplate())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasInspectTemplate()) { + hash = (37 * hash) + INSPECT_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getInspectTemplate().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateInspectTemplate.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UpdateInspectTemplateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UpdateInspectTemplateRequest) + com.google.privacy.dlp.v2.UpdateInspectTemplateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.class, com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (inspectTemplateBuilder_ == null) { + inspectTemplate_ = null; + } else { + inspectTemplate_ = null; + inspectTemplateBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateInspectTemplateRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateInspectTemplateRequest build() { + com.google.privacy.dlp.v2.UpdateInspectTemplateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateInspectTemplateRequest buildPartial() { + com.google.privacy.dlp.v2.UpdateInspectTemplateRequest result = new com.google.privacy.dlp.v2.UpdateInspectTemplateRequest(this); + result.name_ = name_; + if (inspectTemplateBuilder_ == null) { + result.inspectTemplate_ = inspectTemplate_; + } else { + result.inspectTemplate_ = inspectTemplateBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.UpdateInspectTemplateRequest) { + return mergeFrom((com.google.privacy.dlp.v2.UpdateInspectTemplateRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest other) { + if (other == com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasInspectTemplate()) { + mergeInspectTemplate(other.getInspectTemplate()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.UpdateInspectTemplateRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of organization and inspectTemplate to be updated, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of organization and inspectTemplate to be updated, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of organization and inspectTemplate to be updated, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of organization and inspectTemplate to be updated, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of organization and inspectTemplate to be updated, for
+     * example `organizations/433245324/inspectTemplates/432452342` or
+     * projects/project-id/inspectTemplates/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.InspectTemplate inspectTemplate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> inspectTemplateBuilder_; + /** + *
+     * New InspectTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + * @return Whether the inspectTemplate field is set. + */ + public boolean hasInspectTemplate() { + return inspectTemplateBuilder_ != null || inspectTemplate_ != null; + } + /** + *
+     * New InspectTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + * @return The inspectTemplate. + */ + public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate() { + if (inspectTemplateBuilder_ == null) { + return inspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; + } else { + return inspectTemplateBuilder_.getMessage(); + } + } + /** + *
+     * New InspectTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + */ + public Builder setInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { + if (inspectTemplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectTemplate_ = value; + onChanged(); + } else { + inspectTemplateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * New InspectTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + */ + public Builder setInspectTemplate( + com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { + if (inspectTemplateBuilder_ == null) { + inspectTemplate_ = builderForValue.build(); + onChanged(); + } else { + inspectTemplateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * New InspectTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + */ + public Builder mergeInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { + if (inspectTemplateBuilder_ == null) { + if (inspectTemplate_ != null) { + inspectTemplate_ = + com.google.privacy.dlp.v2.InspectTemplate.newBuilder(inspectTemplate_).mergeFrom(value).buildPartial(); + } else { + inspectTemplate_ = value; + } + onChanged(); + } else { + inspectTemplateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * New InspectTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + */ + public Builder clearInspectTemplate() { + if (inspectTemplateBuilder_ == null) { + inspectTemplate_ = null; + onChanged(); + } else { + inspectTemplate_ = null; + inspectTemplateBuilder_ = null; + } + + return this; + } + /** + *
+     * New InspectTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + */ + public com.google.privacy.dlp.v2.InspectTemplate.Builder getInspectTemplateBuilder() { + + onChanged(); + return getInspectTemplateFieldBuilder().getBuilder(); + } + /** + *
+     * New InspectTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + */ + public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder() { + if (inspectTemplateBuilder_ != null) { + return inspectTemplateBuilder_.getMessageOrBuilder(); + } else { + return inspectTemplate_ == null ? + com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; + } + } + /** + *
+     * New InspectTemplate value.
+     * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> + getInspectTemplateFieldBuilder() { + if (inspectTemplateBuilder_ == null) { + inspectTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder>( + getInspectTemplate(), + getParentForChildren(), + isClean()); + inspectTemplate_ = null; + } + return inspectTemplateBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UpdateInspectTemplateRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UpdateInspectTemplateRequest) + private static final com.google.privacy.dlp.v2.UpdateInspectTemplateRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UpdateInspectTemplateRequest(); + } + + public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInspectTemplateRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateInspectTemplateRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateInspectTemplateRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java new file mode 100644 index 000000000000..bbe54d472dc2 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java @@ -0,0 +1,87 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface UpdateInspectTemplateRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UpdateInspectTemplateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of organization and inspectTemplate to be updated, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of organization and inspectTemplate to be updated, for
+   * example `organizations/433245324/inspectTemplates/432452342` or
+   * projects/project-id/inspectTemplates/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * New InspectTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + * @return Whether the inspectTemplate field is set. + */ + boolean hasInspectTemplate(); + /** + *
+   * New InspectTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + * @return The inspectTemplate. + */ + com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate(); + /** + *
+   * New InspectTemplate value.
+   * 
+ * + * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; + */ + com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder(); + + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequest.java new file mode 100644 index 000000000000..ecd13ab84a74 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequest.java @@ -0,0 +1,1074 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for UpdateJobTrigger.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UpdateJobTriggerRequest} + */ +public final class UpdateJobTriggerRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UpdateJobTriggerRequest) + UpdateJobTriggerRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateJobTriggerRequest.newBuilder() to construct. + private UpdateJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateJobTriggerRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateJobTriggerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateJobTriggerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.JobTrigger.Builder subBuilder = null; + if (jobTrigger_ != null) { + subBuilder = jobTrigger_.toBuilder(); + } + jobTrigger_ = input.readMessage(com.google.privacy.dlp.v2.JobTrigger.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(jobTrigger_); + jobTrigger_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UpdateJobTriggerRequest.class, com.google.privacy.dlp.v2.UpdateJobTriggerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_TRIGGER_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.JobTrigger jobTrigger_; + /** + *
+   * New JobTrigger value.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + * @return Whether the jobTrigger field is set. + */ + @java.lang.Override + public boolean hasJobTrigger() { + return jobTrigger_ != null; + } + /** + *
+   * New JobTrigger value.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + * @return The jobTrigger. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.JobTrigger getJobTrigger() { + return jobTrigger_ == null ? com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; + } + /** + *
+   * New JobTrigger value.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder() { + return getJobTrigger(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (jobTrigger_ != null) { + output.writeMessage(2, getJobTrigger()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (jobTrigger_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getJobTrigger()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.UpdateJobTriggerRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.UpdateJobTriggerRequest other = (com.google.privacy.dlp.v2.UpdateJobTriggerRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasJobTrigger() != other.hasJobTrigger()) return false; + if (hasJobTrigger()) { + if (!getJobTrigger() + .equals(other.getJobTrigger())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasJobTrigger()) { + hash = (37 * hash) + JOB_TRIGGER_FIELD_NUMBER; + hash = (53 * hash) + getJobTrigger().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.UpdateJobTriggerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateJobTrigger.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UpdateJobTriggerRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UpdateJobTriggerRequest) + com.google.privacy.dlp.v2.UpdateJobTriggerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UpdateJobTriggerRequest.class, com.google.privacy.dlp.v2.UpdateJobTriggerRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.UpdateJobTriggerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (jobTriggerBuilder_ == null) { + jobTrigger_ = null; + } else { + jobTrigger_ = null; + jobTriggerBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateJobTriggerRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.UpdateJobTriggerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateJobTriggerRequest build() { + com.google.privacy.dlp.v2.UpdateJobTriggerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateJobTriggerRequest buildPartial() { + com.google.privacy.dlp.v2.UpdateJobTriggerRequest result = new com.google.privacy.dlp.v2.UpdateJobTriggerRequest(this); + result.name_ = name_; + if (jobTriggerBuilder_ == null) { + result.jobTrigger_ = jobTrigger_; + } else { + result.jobTrigger_ = jobTriggerBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.UpdateJobTriggerRequest) { + return mergeFrom((com.google.privacy.dlp.v2.UpdateJobTriggerRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.UpdateJobTriggerRequest other) { + if (other == com.google.privacy.dlp.v2.UpdateJobTriggerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasJobTrigger()) { + mergeJobTrigger(other.getJobTrigger()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.UpdateJobTriggerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.UpdateJobTriggerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of the project and the triggeredJob, for example
+     * `projects/dlp-test-project/jobTriggers/53234423`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.JobTrigger jobTrigger_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> jobTriggerBuilder_; + /** + *
+     * New JobTrigger value.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + * @return Whether the jobTrigger field is set. + */ + public boolean hasJobTrigger() { + return jobTriggerBuilder_ != null || jobTrigger_ != null; + } + /** + *
+     * New JobTrigger value.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + * @return The jobTrigger. + */ + public com.google.privacy.dlp.v2.JobTrigger getJobTrigger() { + if (jobTriggerBuilder_ == null) { + return jobTrigger_ == null ? com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; + } else { + return jobTriggerBuilder_.getMessage(); + } + } + /** + *
+     * New JobTrigger value.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + */ + public Builder setJobTrigger(com.google.privacy.dlp.v2.JobTrigger value) { + if (jobTriggerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobTrigger_ = value; + onChanged(); + } else { + jobTriggerBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * New JobTrigger value.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + */ + public Builder setJobTrigger( + com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { + if (jobTriggerBuilder_ == null) { + jobTrigger_ = builderForValue.build(); + onChanged(); + } else { + jobTriggerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * New JobTrigger value.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + */ + public Builder mergeJobTrigger(com.google.privacy.dlp.v2.JobTrigger value) { + if (jobTriggerBuilder_ == null) { + if (jobTrigger_ != null) { + jobTrigger_ = + com.google.privacy.dlp.v2.JobTrigger.newBuilder(jobTrigger_).mergeFrom(value).buildPartial(); + } else { + jobTrigger_ = value; + } + onChanged(); + } else { + jobTriggerBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * New JobTrigger value.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + */ + public Builder clearJobTrigger() { + if (jobTriggerBuilder_ == null) { + jobTrigger_ = null; + onChanged(); + } else { + jobTrigger_ = null; + jobTriggerBuilder_ = null; + } + + return this; + } + /** + *
+     * New JobTrigger value.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + */ + public com.google.privacy.dlp.v2.JobTrigger.Builder getJobTriggerBuilder() { + + onChanged(); + return getJobTriggerFieldBuilder().getBuilder(); + } + /** + *
+     * New JobTrigger value.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + */ + public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder() { + if (jobTriggerBuilder_ != null) { + return jobTriggerBuilder_.getMessageOrBuilder(); + } else { + return jobTrigger_ == null ? + com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; + } + } + /** + *
+     * New JobTrigger value.
+     * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> + getJobTriggerFieldBuilder() { + if (jobTriggerBuilder_ == null) { + jobTriggerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder>( + getJobTrigger(), + getParentForChildren(), + isClean()); + jobTrigger_ = null; + } + return jobTriggerBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UpdateJobTriggerRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UpdateJobTriggerRequest) + private static final com.google.privacy.dlp.v2.UpdateJobTriggerRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UpdateJobTriggerRequest(); + } + + public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateJobTriggerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateJobTriggerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateJobTriggerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequestOrBuilder.java new file mode 100644 index 000000000000..513d1bc88b88 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface UpdateJobTriggerRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UpdateJobTriggerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of the project and the triggeredJob, for example
+   * `projects/dlp-test-project/jobTriggers/53234423`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * New JobTrigger value.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + * @return Whether the jobTrigger field is set. + */ + boolean hasJobTrigger(); + /** + *
+   * New JobTrigger value.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + * @return The jobTrigger. + */ + com.google.privacy.dlp.v2.JobTrigger getJobTrigger(); + /** + *
+   * New JobTrigger value.
+   * 
+ * + * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; + */ + com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder(); + + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequest.java new file mode 100644 index 000000000000..33f80bab761a --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequest.java @@ -0,0 +1,1105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Request message for UpdateStoredInfoType.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} + */ +public final class UpdateStoredInfoTypeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) + UpdateStoredInfoTypeRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateStoredInfoTypeRequest.newBuilder() to construct. + private UpdateStoredInfoTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateStoredInfoTypeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateStoredInfoTypeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateStoredInfoTypeRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder subBuilder = null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. Resource name of organization and storedInfoType to be updated, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. Resource name of organization and storedInfoType to be updated, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; + /** + *
+   * Updated configuration for the storedInfoType. If not provided, a new
+   * version of the storedInfoType will be created with the existing
+   * configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + *
+   * Updated configuration for the storedInfoType. If not provided, a new
+   * version of the storedInfoType will be created with the existing
+   * configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + * @return The config. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { + return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; + } + /** + *
+   * Updated configuration for the storedInfoType. If not provided, a new
+   * version of the storedInfoType will be created with the existing
+   * configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { + return getConfig(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (config_ != null) { + output.writeMessage(2, getConfig()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (config_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getConfig()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest other = (com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig() + .equals(other.getConfig())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request message for UpdateStoredInfoType.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest build() { + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest buildPartial() { + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest result = new com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(this); + result.name_ = name_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) { + return mergeFrom((com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest other) { + if (other == com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. Resource name of organization and storedInfoType to be updated, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Resource name of organization and storedInfoType to be updated, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Resource name of organization and storedInfoType to be updated, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of organization and storedInfoType to be updated, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. Resource name of organization and storedInfoType to be updated, for
+     * example `organizations/433245324/storedInfoTypes/432452342` or
+     * projects/project-id/storedInfoTypes/432452342.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> configBuilder_; + /** + *
+     * Updated configuration for the storedInfoType. If not provided, a new
+     * version of the storedInfoType will be created with the existing
+     * configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + *
+     * Updated configuration for the storedInfoType. If not provided, a new
+     * version of the storedInfoType will be created with the existing
+     * configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + * @return The config. + */ + public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + *
+     * Updated configuration for the storedInfoType. If not provided, a new
+     * version of the storedInfoType will be created with the existing
+     * configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + */ + public Builder setConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Updated configuration for the storedInfoType. If not provided, a new
+     * version of the storedInfoType will be created with the existing
+     * configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + */ + public Builder setConfig( + com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Updated configuration for the storedInfoType. If not provided, a new
+     * version of the storedInfoType will be created with the existing
+     * configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + */ + public Builder mergeConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.privacy.dlp.v2.StoredInfoTypeConfig.newBuilder(config_).mergeFrom(value).buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Updated configuration for the storedInfoType. If not provided, a new
+     * version of the storedInfoType will be created with the existing
+     * configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + *
+     * Updated configuration for the storedInfoType. If not provided, a new
+     * version of the storedInfoType will be created with the existing
+     * configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Updated configuration for the storedInfoType. If not provided, a new
+     * version of the storedInfoType will be created with the existing
+     * configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + */ + public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null ? + com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; + } + } + /** + *
+     * Updated configuration for the storedInfoType. If not provided, a new
+     * version of the storedInfoType will be created with the existing
+     * configuration.
+     * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder>( + getConfig(), + getParentForChildren(), + isClean()); + config_ = null; + } + return configBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * Mask to control which fields get updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) + private static final com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(); + } + + public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateStoredInfoTypeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateStoredInfoTypeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequestOrBuilder.java new file mode 100644 index 000000000000..571697176b18 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequestOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface UpdateStoredInfoTypeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Resource name of organization and storedInfoType to be updated, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. Resource name of organization and storedInfoType to be updated, for
+   * example `organizations/433245324/storedInfoTypes/432452342` or
+   * projects/project-id/storedInfoTypes/432452342.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Updated configuration for the storedInfoType. If not provided, a new
+   * version of the storedInfoType will be created with the existing
+   * configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + *
+   * Updated configuration for the storedInfoType. If not provided, a new
+   * version of the storedInfoType will be created with the existing
+   * configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + * @return The config. + */ + com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig(); + /** + *
+   * Updated configuration for the storedInfoType. If not provided, a new
+   * version of the storedInfoType will be created with the existing
+   * configuration.
+   * 
+ * + * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; + */ + com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder(); + + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * Mask to control which fields get updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Value.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Value.java new file mode 100644 index 000000000000..1dcea9980bc9 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Value.java @@ -0,0 +1,2037 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Set of primitive values supported by the system.
+ * Note that for the purposes of inspection or transformation, the number
+ * of bytes considered to comprise a 'Value' is based on its representation
+ * as a UTF-8 encoded string. For example, if 'integer_value' is set to
+ * 123456789, the number of bytes would be counted as 9, even though an
+ * int64 only holds up to 8 bytes of data.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Value} + */ +public final class Value extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Value) + ValueOrBuilder { +private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. + private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Value() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Value(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Value( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + type_ = input.readInt64(); + typeCase_ = 1; + break; + } + case 17: { + type_ = input.readDouble(); + typeCase_ = 2; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + typeCase_ = 3; + type_ = s; + break; + } + case 32: { + type_ = input.readBool(); + typeCase_ = 4; + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (typeCase_ == 5) { + subBuilder = ((com.google.protobuf.Timestamp) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Timestamp) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 5; + break; + } + case 50: { + com.google.type.TimeOfDay.Builder subBuilder = null; + if (typeCase_ == 6) { + subBuilder = ((com.google.type.TimeOfDay) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.type.TimeOfDay.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.type.TimeOfDay) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 6; + break; + } + case 58: { + com.google.type.Date.Builder subBuilder = null; + if (typeCase_ == 7) { + subBuilder = ((com.google.type.Date) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.type.Date.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.type.Date) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 7; + break; + } + case 64: { + int rawValue = input.readEnum(); + typeCase_ = 8; + type_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Value.class, com.google.privacy.dlp.v2.Value.Builder.class); + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INTEGER_VALUE(1), + FLOAT_VALUE(2), + STRING_VALUE(3), + BOOLEAN_VALUE(4), + TIMESTAMP_VALUE(5), + TIME_VALUE(6), + DATE_VALUE(7), + DAY_OF_WEEK_VALUE(8), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return INTEGER_VALUE; + case 2: return FLOAT_VALUE; + case 3: return STRING_VALUE; + case 4: return BOOLEAN_VALUE; + case 5: return TIMESTAMP_VALUE; + case 6: return TIME_VALUE; + case 7: return DATE_VALUE; + case 8: return DAY_OF_WEEK_VALUE; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int INTEGER_VALUE_FIELD_NUMBER = 1; + /** + *
+   * integer
+   * 
+ * + * int64 integer_value = 1; + * @return Whether the integerValue field is set. + */ + @java.lang.Override + public boolean hasIntegerValue() { + return typeCase_ == 1; + } + /** + *
+   * integer
+   * 
+ * + * int64 integer_value = 1; + * @return The integerValue. + */ + @java.lang.Override + public long getIntegerValue() { + if (typeCase_ == 1) { + return (java.lang.Long) type_; + } + return 0L; + } + + public static final int FLOAT_VALUE_FIELD_NUMBER = 2; + /** + *
+   * float
+   * 
+ * + * double float_value = 2; + * @return Whether the floatValue field is set. + */ + @java.lang.Override + public boolean hasFloatValue() { + return typeCase_ == 2; + } + /** + *
+   * float
+   * 
+ * + * double float_value = 2; + * @return The floatValue. + */ + @java.lang.Override + public double getFloatValue() { + if (typeCase_ == 2) { + return (java.lang.Double) type_; + } + return 0D; + } + + public static final int STRING_VALUE_FIELD_NUMBER = 3; + /** + *
+   * string
+   * 
+ * + * string string_value = 3; + * @return Whether the stringValue field is set. + */ + public boolean hasStringValue() { + return typeCase_ == 3; + } + /** + *
+   * string
+   * 
+ * + * string string_value = 3; + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (typeCase_ == 3) { + ref = type_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (typeCase_ == 3) { + type_ = s; + } + return s; + } + } + /** + *
+   * string
+   * 
+ * + * string string_value = 3; + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = ""; + if (typeCase_ == 3) { + ref = type_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (typeCase_ == 3) { + type_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; + /** + *
+   * boolean
+   * 
+ * + * bool boolean_value = 4; + * @return Whether the booleanValue field is set. + */ + @java.lang.Override + public boolean hasBooleanValue() { + return typeCase_ == 4; + } + /** + *
+   * boolean
+   * 
+ * + * bool boolean_value = 4; + * @return The booleanValue. + */ + @java.lang.Override + public boolean getBooleanValue() { + if (typeCase_ == 4) { + return (java.lang.Boolean) type_; + } + return false; + } + + public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 5; + /** + *
+   * timestamp
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return typeCase_ == 5; + } + /** + *
+   * timestamp
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (typeCase_ == 5) { + return (com.google.protobuf.Timestamp) type_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + *
+   * timestamp
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if (typeCase_ == 5) { + return (com.google.protobuf.Timestamp) type_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int TIME_VALUE_FIELD_NUMBER = 6; + /** + *
+   * time of day
+   * 
+ * + * .google.type.TimeOfDay time_value = 6; + * @return Whether the timeValue field is set. + */ + @java.lang.Override + public boolean hasTimeValue() { + return typeCase_ == 6; + } + /** + *
+   * time of day
+   * 
+ * + * .google.type.TimeOfDay time_value = 6; + * @return The timeValue. + */ + @java.lang.Override + public com.google.type.TimeOfDay getTimeValue() { + if (typeCase_ == 6) { + return (com.google.type.TimeOfDay) type_; + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } + /** + *
+   * time of day
+   * 
+ * + * .google.type.TimeOfDay time_value = 6; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getTimeValueOrBuilder() { + if (typeCase_ == 6) { + return (com.google.type.TimeOfDay) type_; + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } + + public static final int DATE_VALUE_FIELD_NUMBER = 7; + /** + *
+   * date
+   * 
+ * + * .google.type.Date date_value = 7; + * @return Whether the dateValue field is set. + */ + @java.lang.Override + public boolean hasDateValue() { + return typeCase_ == 7; + } + /** + *
+   * date
+   * 
+ * + * .google.type.Date date_value = 7; + * @return The dateValue. + */ + @java.lang.Override + public com.google.type.Date getDateValue() { + if (typeCase_ == 7) { + return (com.google.type.Date) type_; + } + return com.google.type.Date.getDefaultInstance(); + } + /** + *
+   * date
+   * 
+ * + * .google.type.Date date_value = 7; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateValueOrBuilder() { + if (typeCase_ == 7) { + return (com.google.type.Date) type_; + } + return com.google.type.Date.getDefaultInstance(); + } + + public static final int DAY_OF_WEEK_VALUE_FIELD_NUMBER = 8; + /** + *
+   * day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return Whether the dayOfWeekValue field is set. + */ + public boolean hasDayOfWeekValue() { + return typeCase_ == 8; + } + /** + *
+   * day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return The enum numeric value on the wire for dayOfWeekValue. + */ + public int getDayOfWeekValueValue() { + if (typeCase_ == 8) { + return (java.lang.Integer) type_; + } + return 0; + } + /** + *
+   * day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return The dayOfWeekValue. + */ + public com.google.type.DayOfWeek getDayOfWeekValue() { + if (typeCase_ == 8) { + @SuppressWarnings("deprecation") + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf( + (java.lang.Integer) type_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + return com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (typeCase_ == 1) { + output.writeInt64( + 1, (long)((java.lang.Long) type_)); + } + if (typeCase_ == 2) { + output.writeDouble( + 2, (double)((java.lang.Double) type_)); + } + if (typeCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + if (typeCase_ == 4) { + output.writeBool( + 4, (boolean)((java.lang.Boolean) type_)); + } + if (typeCase_ == 5) { + output.writeMessage(5, (com.google.protobuf.Timestamp) type_); + } + if (typeCase_ == 6) { + output.writeMessage(6, (com.google.type.TimeOfDay) type_); + } + if (typeCase_ == 7) { + output.writeMessage(7, (com.google.type.Date) type_); + } + if (typeCase_ == 8) { + output.writeEnum(8, ((java.lang.Integer) type_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size( + 1, (long)((java.lang.Long) type_)); + } + if (typeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize( + 2, (double)((java.lang.Double) type_)); + } + if (typeCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + if (typeCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 4, (boolean)((java.lang.Boolean) type_)); + } + if (typeCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.protobuf.Timestamp) type_); + } + if (typeCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.type.TimeOfDay) type_); + } + if (typeCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.google.type.Date) type_); + } + if (typeCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, ((java.lang.Integer) type_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Value)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Value other = (com.google.privacy.dlp.v2.Value) obj; + + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (getIntegerValue() + != other.getIntegerValue()) return false; + break; + case 2: + if (java.lang.Double.doubleToLongBits(getFloatValue()) + != java.lang.Double.doubleToLongBits( + other.getFloatValue())) return false; + break; + case 3: + if (!getStringValue() + .equals(other.getStringValue())) return false; + break; + case 4: + if (getBooleanValue() + != other.getBooleanValue()) return false; + break; + case 5: + if (!getTimestampValue() + .equals(other.getTimestampValue())) return false; + break; + case 6: + if (!getTimeValue() + .equals(other.getTimeValue())) return false; + break; + case 7: + if (!getDateValue() + .equals(other.getDateValue())) return false; + break; + case 8: + if (getDayOfWeekValueValue() + != other.getDayOfWeekValueValue()) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeCase_) { + case 1: + hash = (37 * hash) + INTEGER_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getIntegerValue()); + break; + case 2: + hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getFloatValue())); + break; + case 3: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 4: + hash = (37 * hash) + BOOLEAN_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBooleanValue()); + break; + case 5: + hash = (37 * hash) + TIMESTAMP_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTimestampValue().hashCode(); + break; + case 6: + hash = (37 * hash) + TIME_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getTimeValue().hashCode(); + break; + case 7: + hash = (37 * hash) + DATE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDateValue().hashCode(); + break; + case 8: + hash = (37 * hash) + DAY_OF_WEEK_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDayOfWeekValueValue(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Value parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Value parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Value parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Value parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.Value parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Value parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Value parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.Value parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.Value parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.Value prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Set of primitive values supported by the system.
+   * Note that for the purposes of inspection or transformation, the number
+   * of bytes considered to comprise a 'Value' is based on its representation
+   * as a UTF-8 encoded string. For example, if 'integer_value' is set to
+   * 123456789, the number of bytes would be counted as 9, even though an
+   * int64 only holds up to 8 bytes of data.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Value} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Value) + com.google.privacy.dlp.v2.ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Value.class, com.google.privacy.dlp.v2.Value.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Value.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Value getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Value.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Value build() { + com.google.privacy.dlp.v2.Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Value buildPartial() { + com.google.privacy.dlp.v2.Value result = new com.google.privacy.dlp.v2.Value(this); + if (typeCase_ == 1) { + result.type_ = type_; + } + if (typeCase_ == 2) { + result.type_ = type_; + } + if (typeCase_ == 3) { + result.type_ = type_; + } + if (typeCase_ == 4) { + result.type_ = type_; + } + if (typeCase_ == 5) { + if (timestampValueBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = timestampValueBuilder_.build(); + } + } + if (typeCase_ == 6) { + if (timeValueBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = timeValueBuilder_.build(); + } + } + if (typeCase_ == 7) { + if (dateValueBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = dateValueBuilder_.build(); + } + } + if (typeCase_ == 8) { + result.type_ = type_; + } + result.typeCase_ = typeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Value) { + return mergeFrom((com.google.privacy.dlp.v2.Value)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Value other) { + if (other == com.google.privacy.dlp.v2.Value.getDefaultInstance()) return this; + switch (other.getTypeCase()) { + case INTEGER_VALUE: { + setIntegerValue(other.getIntegerValue()); + break; + } + case FLOAT_VALUE: { + setFloatValue(other.getFloatValue()); + break; + } + case STRING_VALUE: { + typeCase_ = 3; + type_ = other.type_; + onChanged(); + break; + } + case BOOLEAN_VALUE: { + setBooleanValue(other.getBooleanValue()); + break; + } + case TIMESTAMP_VALUE: { + mergeTimestampValue(other.getTimestampValue()); + break; + } + case TIME_VALUE: { + mergeTimeValue(other.getTimeValue()); + break; + } + case DATE_VALUE: { + mergeDateValue(other.getDateValue()); + break; + } + case DAY_OF_WEEK_VALUE: { + setDayOfWeekValueValue(other.getDayOfWeekValueValue()); + break; + } + case TYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Value parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Value) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int typeCase_ = 0; + private java.lang.Object type_; + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + + /** + *
+     * integer
+     * 
+ * + * int64 integer_value = 1; + * @return Whether the integerValue field is set. + */ + public boolean hasIntegerValue() { + return typeCase_ == 1; + } + /** + *
+     * integer
+     * 
+ * + * int64 integer_value = 1; + * @return The integerValue. + */ + public long getIntegerValue() { + if (typeCase_ == 1) { + return (java.lang.Long) type_; + } + return 0L; + } + /** + *
+     * integer
+     * 
+ * + * int64 integer_value = 1; + * @param value The integerValue to set. + * @return This builder for chaining. + */ + public Builder setIntegerValue(long value) { + typeCase_ = 1; + type_ = value; + onChanged(); + return this; + } + /** + *
+     * integer
+     * 
+ * + * int64 integer_value = 1; + * @return This builder for chaining. + */ + public Builder clearIntegerValue() { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * float
+     * 
+ * + * double float_value = 2; + * @return Whether the floatValue field is set. + */ + public boolean hasFloatValue() { + return typeCase_ == 2; + } + /** + *
+     * float
+     * 
+ * + * double float_value = 2; + * @return The floatValue. + */ + public double getFloatValue() { + if (typeCase_ == 2) { + return (java.lang.Double) type_; + } + return 0D; + } + /** + *
+     * float
+     * 
+ * + * double float_value = 2; + * @param value The floatValue to set. + * @return This builder for chaining. + */ + public Builder setFloatValue(double value) { + typeCase_ = 2; + type_ = value; + onChanged(); + return this; + } + /** + *
+     * float
+     * 
+ * + * double float_value = 2; + * @return This builder for chaining. + */ + public Builder clearFloatValue() { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * string
+     * 
+ * + * string string_value = 3; + * @return Whether the stringValue field is set. + */ + @java.lang.Override + public boolean hasStringValue() { + return typeCase_ == 3; + } + /** + *
+     * string
+     * 
+ * + * string string_value = 3; + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (typeCase_ == 3) { + ref = type_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (typeCase_ == 3) { + type_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * string
+     * 
+ * + * string string_value = 3; + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = ""; + if (typeCase_ == 3) { + ref = type_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (typeCase_ == 3) { + type_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * string
+     * 
+ * + * string string_value = 3; + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + typeCase_ = 3; + type_ = value; + onChanged(); + return this; + } + /** + *
+     * string
+     * 
+ * + * string string_value = 3; + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + return this; + } + /** + *
+     * string
+     * 
+ * + * string string_value = 3; + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + typeCase_ = 3; + type_ = value; + onChanged(); + return this; + } + + /** + *
+     * boolean
+     * 
+ * + * bool boolean_value = 4; + * @return Whether the booleanValue field is set. + */ + public boolean hasBooleanValue() { + return typeCase_ == 4; + } + /** + *
+     * boolean
+     * 
+ * + * bool boolean_value = 4; + * @return The booleanValue. + */ + public boolean getBooleanValue() { + if (typeCase_ == 4) { + return (java.lang.Boolean) type_; + } + return false; + } + /** + *
+     * boolean
+     * 
+ * + * bool boolean_value = 4; + * @param value The booleanValue to set. + * @return This builder for chaining. + */ + public Builder setBooleanValue(boolean value) { + typeCase_ = 4; + type_ = value; + onChanged(); + return this; + } + /** + *
+     * boolean
+     * 
+ * + * bool boolean_value = 4; + * @return This builder for chaining. + */ + public Builder clearBooleanValue() { + if (typeCase_ == 4) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampValueBuilder_; + /** + *
+     * timestamp
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * @return Whether the timestampValue field is set. + */ + @java.lang.Override + public boolean hasTimestampValue() { + return typeCase_ == 5; + } + /** + *
+     * timestamp
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * @return The timestampValue. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestampValue() { + if (timestampValueBuilder_ == null) { + if (typeCase_ == 5) { + return (com.google.protobuf.Timestamp) type_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (typeCase_ == 5) { + return timestampValueBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+     * timestamp
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public Builder setTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + timestampValueBuilder_.setMessage(value); + } + typeCase_ = 5; + return this; + } + /** + *
+     * timestamp
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public Builder setTimestampValue( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampValueBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + timestampValueBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 5; + return this; + } + /** + *
+     * timestamp
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { + if (timestampValueBuilder_ == null) { + if (typeCase_ == 5 && + type_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + type_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 5) { + timestampValueBuilder_.mergeFrom(value); + } else { + timestampValueBuilder_.setMessage(value); + } + } + typeCase_ = 5; + return this; + } + /** + *
+     * timestamp
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public Builder clearTimestampValue() { + if (timestampValueBuilder_ == null) { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 5) { + typeCase_ = 0; + type_ = null; + } + timestampValueBuilder_.clear(); + } + return this; + } + /** + *
+     * timestamp
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { + return getTimestampValueFieldBuilder().getBuilder(); + } + /** + *
+     * timestamp
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { + if ((typeCase_ == 5) && (timestampValueBuilder_ != null)) { + return timestampValueBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 5) { + return (com.google.protobuf.Timestamp) type_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+     * timestamp
+     * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getTimestampValueFieldBuilder() { + if (timestampValueBuilder_ == null) { + if (!(typeCase_ == 5)) { + type_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + timestampValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 5; + onChanged();; + return timestampValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> timeValueBuilder_; + /** + *
+     * time of day
+     * 
+ * + * .google.type.TimeOfDay time_value = 6; + * @return Whether the timeValue field is set. + */ + @java.lang.Override + public boolean hasTimeValue() { + return typeCase_ == 6; + } + /** + *
+     * time of day
+     * 
+ * + * .google.type.TimeOfDay time_value = 6; + * @return The timeValue. + */ + @java.lang.Override + public com.google.type.TimeOfDay getTimeValue() { + if (timeValueBuilder_ == null) { + if (typeCase_ == 6) { + return (com.google.type.TimeOfDay) type_; + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } else { + if (typeCase_ == 6) { + return timeValueBuilder_.getMessage(); + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } + } + /** + *
+     * time of day
+     * 
+ * + * .google.type.TimeOfDay time_value = 6; + */ + public Builder setTimeValue(com.google.type.TimeOfDay value) { + if (timeValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + timeValueBuilder_.setMessage(value); + } + typeCase_ = 6; + return this; + } + /** + *
+     * time of day
+     * 
+ * + * .google.type.TimeOfDay time_value = 6; + */ + public Builder setTimeValue( + com.google.type.TimeOfDay.Builder builderForValue) { + if (timeValueBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + timeValueBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 6; + return this; + } + /** + *
+     * time of day
+     * 
+ * + * .google.type.TimeOfDay time_value = 6; + */ + public Builder mergeTimeValue(com.google.type.TimeOfDay value) { + if (timeValueBuilder_ == null) { + if (typeCase_ == 6 && + type_ != com.google.type.TimeOfDay.getDefaultInstance()) { + type_ = com.google.type.TimeOfDay.newBuilder((com.google.type.TimeOfDay) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 6) { + timeValueBuilder_.mergeFrom(value); + } else { + timeValueBuilder_.setMessage(value); + } + } + typeCase_ = 6; + return this; + } + /** + *
+     * time of day
+     * 
+ * + * .google.type.TimeOfDay time_value = 6; + */ + public Builder clearTimeValue() { + if (timeValueBuilder_ == null) { + if (typeCase_ == 6) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 6) { + typeCase_ = 0; + type_ = null; + } + timeValueBuilder_.clear(); + } + return this; + } + /** + *
+     * time of day
+     * 
+ * + * .google.type.TimeOfDay time_value = 6; + */ + public com.google.type.TimeOfDay.Builder getTimeValueBuilder() { + return getTimeValueFieldBuilder().getBuilder(); + } + /** + *
+     * time of day
+     * 
+ * + * .google.type.TimeOfDay time_value = 6; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getTimeValueOrBuilder() { + if ((typeCase_ == 6) && (timeValueBuilder_ != null)) { + return timeValueBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 6) { + return (com.google.type.TimeOfDay) type_; + } + return com.google.type.TimeOfDay.getDefaultInstance(); + } + } + /** + *
+     * time of day
+     * 
+ * + * .google.type.TimeOfDay time_value = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> + getTimeValueFieldBuilder() { + if (timeValueBuilder_ == null) { + if (!(typeCase_ == 6)) { + type_ = com.google.type.TimeOfDay.getDefaultInstance(); + } + timeValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder>( + (com.google.type.TimeOfDay) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 6; + onChanged();; + return timeValueBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> dateValueBuilder_; + /** + *
+     * date
+     * 
+ * + * .google.type.Date date_value = 7; + * @return Whether the dateValue field is set. + */ + @java.lang.Override + public boolean hasDateValue() { + return typeCase_ == 7; + } + /** + *
+     * date
+     * 
+ * + * .google.type.Date date_value = 7; + * @return The dateValue. + */ + @java.lang.Override + public com.google.type.Date getDateValue() { + if (dateValueBuilder_ == null) { + if (typeCase_ == 7) { + return (com.google.type.Date) type_; + } + return com.google.type.Date.getDefaultInstance(); + } else { + if (typeCase_ == 7) { + return dateValueBuilder_.getMessage(); + } + return com.google.type.Date.getDefaultInstance(); + } + } + /** + *
+     * date
+     * 
+ * + * .google.type.Date date_value = 7; + */ + public Builder setDateValue(com.google.type.Date value) { + if (dateValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + dateValueBuilder_.setMessage(value); + } + typeCase_ = 7; + return this; + } + /** + *
+     * date
+     * 
+ * + * .google.type.Date date_value = 7; + */ + public Builder setDateValue( + com.google.type.Date.Builder builderForValue) { + if (dateValueBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + dateValueBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 7; + return this; + } + /** + *
+     * date
+     * 
+ * + * .google.type.Date date_value = 7; + */ + public Builder mergeDateValue(com.google.type.Date value) { + if (dateValueBuilder_ == null) { + if (typeCase_ == 7 && + type_ != com.google.type.Date.getDefaultInstance()) { + type_ = com.google.type.Date.newBuilder((com.google.type.Date) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 7) { + dateValueBuilder_.mergeFrom(value); + } else { + dateValueBuilder_.setMessage(value); + } + } + typeCase_ = 7; + return this; + } + /** + *
+     * date
+     * 
+ * + * .google.type.Date date_value = 7; + */ + public Builder clearDateValue() { + if (dateValueBuilder_ == null) { + if (typeCase_ == 7) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 7) { + typeCase_ = 0; + type_ = null; + } + dateValueBuilder_.clear(); + } + return this; + } + /** + *
+     * date
+     * 
+ * + * .google.type.Date date_value = 7; + */ + public com.google.type.Date.Builder getDateValueBuilder() { + return getDateValueFieldBuilder().getBuilder(); + } + /** + *
+     * date
+     * 
+ * + * .google.type.Date date_value = 7; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateValueOrBuilder() { + if ((typeCase_ == 7) && (dateValueBuilder_ != null)) { + return dateValueBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 7) { + return (com.google.type.Date) type_; + } + return com.google.type.Date.getDefaultInstance(); + } + } + /** + *
+     * date
+     * 
+ * + * .google.type.Date date_value = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getDateValueFieldBuilder() { + if (dateValueBuilder_ == null) { + if (!(typeCase_ == 7)) { + type_ = com.google.type.Date.getDefaultInstance(); + } + dateValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + (com.google.type.Date) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 7; + onChanged();; + return dateValueBuilder_; + } + + /** + *
+     * day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return Whether the dayOfWeekValue field is set. + */ + @java.lang.Override + public boolean hasDayOfWeekValue() { + return typeCase_ == 8; + } + /** + *
+     * day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return The enum numeric value on the wire for dayOfWeekValue. + */ + @java.lang.Override + public int getDayOfWeekValueValue() { + if (typeCase_ == 8) { + return ((java.lang.Integer) type_).intValue(); + } + return 0; + } + /** + *
+     * day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @param value The enum numeric value on the wire for dayOfWeekValue to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeekValueValue(int value) { + typeCase_ = 8; + type_ = value; + onChanged(); + return this; + } + /** + *
+     * day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return The dayOfWeekValue. + */ + @java.lang.Override + public com.google.type.DayOfWeek getDayOfWeekValue() { + if (typeCase_ == 8) { + @SuppressWarnings("deprecation") + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf( + (java.lang.Integer) type_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + return com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED; + } + /** + *
+     * day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @param value The dayOfWeekValue to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeekValue(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + typeCase_ = 8; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * day of week
+     * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return This builder for chaining. + */ + public Builder clearDayOfWeekValue() { + if (typeCase_ == 8) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Value) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Value) + private static final com.google.privacy.dlp.v2.Value DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Value(); + } + + public static com.google.privacy.dlp.v2.Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Value(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequency.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequency.java new file mode 100644 index 000000000000..f80ced7bb8d7 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequency.java @@ -0,0 +1,746 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A value of a field, including its frequency.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ValueFrequency} + */ +public final class ValueFrequency extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ValueFrequency) + ValueFrequencyOrBuilder { +private static final long serialVersionUID = 0L; + // Use ValueFrequency.newBuilder() to construct. + private ValueFrequency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ValueFrequency() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ValueFrequency(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ValueFrequency( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.privacy.dlp.v2.Value.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + count_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ValueFrequency.class, com.google.privacy.dlp.v2.ValueFrequency.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.Value value_; + /** + *
+   * A value contained in the field in question.
+   * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + *
+   * A value contained in the field in question.
+   * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + * @return The value. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Value getValue() { + return value_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; + } + /** + *
+   * A value contained in the field in question.
+   * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder() { + return getValue(); + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_; + /** + *
+   * How many times the value is contained in the field.
+   * 
+ * + * int64 count = 2; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (value_ != null) { + output.writeMessage(1, getValue()); + } + if (count_ != 0L) { + output.writeInt64(2, count_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValue()); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, count_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.ValueFrequency)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.ValueFrequency other = (com.google.privacy.dlp.v2.ValueFrequency) obj; + + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue() + .equals(other.getValue())) return false; + } + if (getCount() + != other.getCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.ValueFrequency prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A value of a field, including its frequency.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.ValueFrequency} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ValueFrequency) + com.google.privacy.dlp.v2.ValueFrequencyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.ValueFrequency.class, com.google.privacy.dlp.v2.ValueFrequency.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.ValueFrequency.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + count_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ValueFrequency getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ValueFrequency build() { + com.google.privacy.dlp.v2.ValueFrequency result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ValueFrequency buildPartial() { + com.google.privacy.dlp.v2.ValueFrequency result = new com.google.privacy.dlp.v2.ValueFrequency(this); + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + result.count_ = count_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.ValueFrequency) { + return mergeFrom((com.google.privacy.dlp.v2.ValueFrequency)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.ValueFrequency other) { + if (other == com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()) return this; + if (other.hasValue()) { + mergeValue(other.getValue()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.ValueFrequency parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.ValueFrequency) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> valueBuilder_; + /** + *
+     * A value contained in the field in question.
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + * @return Whether the value field is set. + */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + *
+     * A value contained in the field in question.
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + * @return The value. + */ + public com.google.privacy.dlp.v2.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + *
+     * A value contained in the field in question.
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + */ + public Builder setValue(com.google.privacy.dlp.v2.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A value contained in the field in question.
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + */ + public Builder setValue( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A value contained in the field in question.
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + */ + public Builder mergeValue(com.google.privacy.dlp.v2.Value value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = + com.google.privacy.dlp.v2.Value.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A value contained in the field in question.
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + *
+     * A value contained in the field in question.
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + *
+     * A value contained in the field in question.
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? + com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; + } + } + /** + *
+     * A value contained in the field in question.
+     * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + getValue(), + getParentForChildren(), + isClean()); + value_ = null; + } + return valueBuilder_; + } + + private long count_ ; + /** + *
+     * How many times the value is contained in the field.
+     * 
+ * + * int64 count = 2; + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + *
+     * How many times the value is contained in the field.
+     * 
+ * + * int64 count = 2; + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + onChanged(); + return this; + } + /** + *
+     * How many times the value is contained in the field.
+     * 
+ * + * int64 count = 2; + * @return This builder for chaining. + */ + public Builder clearCount() { + + count_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ValueFrequency) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ValueFrequency) + private static final com.google.privacy.dlp.v2.ValueFrequency DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ValueFrequency(); + } + + public static com.google.privacy.dlp.v2.ValueFrequency getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValueFrequency parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ValueFrequency(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.ValueFrequency getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequencyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequencyOrBuilder.java new file mode 100644 index 000000000000..ce5bc42687ae --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequencyOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ValueFrequencyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ValueFrequency) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A value contained in the field in question.
+   * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + *
+   * A value contained in the field in question.
+   * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + * @return The value. + */ + com.google.privacy.dlp.v2.Value getValue(); + /** + *
+   * A value contained in the field in question.
+   * 
+ * + * .google.privacy.dlp.v2.Value value = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder(); + + /** + *
+   * How many times the value is contained in the field.
+   * 
+ * + * int64 count = 2; + * @return The count. + */ + long getCount(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueOrBuilder.java new file mode 100644 index 000000000000..8816ef2613b8 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueOrBuilder.java @@ -0,0 +1,206 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Value) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * integer
+   * 
+ * + * int64 integer_value = 1; + * @return Whether the integerValue field is set. + */ + boolean hasIntegerValue(); + /** + *
+   * integer
+   * 
+ * + * int64 integer_value = 1; + * @return The integerValue. + */ + long getIntegerValue(); + + /** + *
+   * float
+   * 
+ * + * double float_value = 2; + * @return Whether the floatValue field is set. + */ + boolean hasFloatValue(); + /** + *
+   * float
+   * 
+ * + * double float_value = 2; + * @return The floatValue. + */ + double getFloatValue(); + + /** + *
+   * string
+   * 
+ * + * string string_value = 3; + * @return Whether the stringValue field is set. + */ + boolean hasStringValue(); + /** + *
+   * string
+   * 
+ * + * string string_value = 3; + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + *
+   * string
+   * 
+ * + * string string_value = 3; + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + /** + *
+   * boolean
+   * 
+ * + * bool boolean_value = 4; + * @return Whether the booleanValue field is set. + */ + boolean hasBooleanValue(); + /** + *
+   * boolean
+   * 
+ * + * bool boolean_value = 4; + * @return The booleanValue. + */ + boolean getBooleanValue(); + + /** + *
+   * timestamp
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * @return Whether the timestampValue field is set. + */ + boolean hasTimestampValue(); + /** + *
+   * timestamp
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + * @return The timestampValue. + */ + com.google.protobuf.Timestamp getTimestampValue(); + /** + *
+   * timestamp
+   * 
+ * + * .google.protobuf.Timestamp timestamp_value = 5; + */ + com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder(); + + /** + *
+   * time of day
+   * 
+ * + * .google.type.TimeOfDay time_value = 6; + * @return Whether the timeValue field is set. + */ + boolean hasTimeValue(); + /** + *
+   * time of day
+   * 
+ * + * .google.type.TimeOfDay time_value = 6; + * @return The timeValue. + */ + com.google.type.TimeOfDay getTimeValue(); + /** + *
+   * time of day
+   * 
+ * + * .google.type.TimeOfDay time_value = 6; + */ + com.google.type.TimeOfDayOrBuilder getTimeValueOrBuilder(); + + /** + *
+   * date
+   * 
+ * + * .google.type.Date date_value = 7; + * @return Whether the dateValue field is set. + */ + boolean hasDateValue(); + /** + *
+   * date
+   * 
+ * + * .google.type.Date date_value = 7; + * @return The dateValue. + */ + com.google.type.Date getDateValue(); + /** + *
+   * date
+   * 
+ * + * .google.type.Date date_value = 7; + */ + com.google.type.DateOrBuilder getDateValueOrBuilder(); + + /** + *
+   * day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return Whether the dayOfWeekValue field is set. + */ + boolean hasDayOfWeekValue(); + /** + *
+   * day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return The enum numeric value on the wire for dayOfWeekValue. + */ + int getDayOfWeekValueValue(); + /** + *
+   * day of week
+   * 
+ * + * .google.type.DayOfWeek day_of_week_value = 8; + * @return The dayOfWeekValue. + */ + com.google.type.DayOfWeek getDayOfWeekValue(); + + public com.google.privacy.dlp.v2.Value.TypeCase getTypeCase(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java new file mode 100644 index 000000000000..9b080232c895 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java @@ -0,0 +1,761 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * Details about each available version for an infotype.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.VersionDescription} + */ +public final class VersionDescription extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.VersionDescription) + VersionDescriptionOrBuilder { +private static final long serialVersionUID = 0L; + // Use VersionDescription.newBuilder() to construct. + private VersionDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VersionDescription() { + version_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VersionDescription(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VersionDescription( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.VersionDescription.class, com.google.privacy.dlp.v2.VersionDescription.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + *
+   * Name of the version
+   * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * Name of the version
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + *
+   * Description of the version.
+   * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * Description of the version.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.VersionDescription)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.VersionDescription other = (com.google.privacy.dlp.v2.VersionDescription) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.VersionDescription parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.VersionDescription parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.VersionDescription prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Details about each available version for an infotype.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.VersionDescription} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.VersionDescription) + com.google.privacy.dlp.v2.VersionDescriptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.VersionDescription.class, com.google.privacy.dlp.v2.VersionDescription.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.VersionDescription.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.VersionDescription getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.VersionDescription.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.VersionDescription build() { + com.google.privacy.dlp.v2.VersionDescription result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.VersionDescription buildPartial() { + com.google.privacy.dlp.v2.VersionDescription result = new com.google.privacy.dlp.v2.VersionDescription(this); + result.version_ = version_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.VersionDescription) { + return mergeFrom((com.google.privacy.dlp.v2.VersionDescription)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.VersionDescription other) { + if (other == com.google.privacy.dlp.v2.VersionDescription.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.VersionDescription parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.VersionDescription) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * Name of the version
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Name of the version
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Name of the version
+     * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * Name of the version
+     * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * Name of the version
+     * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * Description of the version.
+     * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Description of the version.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Description of the version.
+     * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * Description of the version.
+     * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * Description of the version.
+     * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.VersionDescription) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.VersionDescription) + private static final com.google.privacy.dlp.v2.VersionDescription DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.VersionDescription(); + } + + public static com.google.privacy.dlp.v2.VersionDescription getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionDescription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionDescription(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.VersionDescription getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java new file mode 100644 index 000000000000..744cf81c2693 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface VersionDescriptionOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.VersionDescription) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Name of the version
+   * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Name of the version
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * Description of the version.
+   * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * Description of the version.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto new file mode 100644 index 000000000000..4dc3a3862d00 --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto @@ -0,0 +1,5372 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.privacy.dlp.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/privacy/dlp/v2/storage.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/date.proto"; +import "google/type/dayofweek.proto"; +import "google/type/timeofday.proto"; + +option csharp_namespace = "Google.Cloud.Dlp.V2"; +option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp"; +option java_multiple_files = true; +option java_outer_classname = "DlpProto"; +option java_package = "com.google.privacy.dlp.v2"; +option php_namespace = "Google\\Cloud\\Dlp\\V2"; +option ruby_package = "Google::Cloud::Dlp::V2"; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/DlpContent" + pattern: "projects/{project}/dlpContent" + pattern: "projects/{project}/locations/{location}/dlpContent" +}; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; + +// The Cloud Data Loss Prevention (DLP) API is a service that allows clients +// to detect the presence of Personally Identifiable Information (PII) and other +// privacy-sensitive data in user-supplied, unstructured data streams, like text +// blocks or images. +// The service also includes methods for sensitive data redaction and +// scheduling of data scans on Google Cloud Platform based data sets. +// +// To learn more about concepts and find how-to guides see +// https://cloud.google.com/dlp/docs/. +service DlpService { + option (google.api.default_host) = "dlp.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Finds potentially sensitive info in content. + // This method has limits on input size, processing time, and output size. + // + // When no InfoTypes or CustomInfoTypes are specified in this request, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + // + // For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images + // and https://cloud.google.com/dlp/docs/inspecting-text, + rpc InspectContent(InspectContentRequest) returns (InspectContentResponse) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/content:inspect" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/content:inspect" + body: "*" + } + }; + } + + // Redacts potentially sensitive info from an image. + // This method has limits on input size, processing time, and output size. + // See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to + // learn more. + // + // When no InfoTypes or CustomInfoTypes are specified in this request, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + rpc RedactImage(RedactImageRequest) returns (RedactImageResponse) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/image:redact" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/image:redact" + body: "*" + } + }; + } + + // De-identifies potentially sensitive info from a ContentItem. + // This method has limits on input size and output size. + // See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to + // learn more. + // + // When no InfoTypes or CustomInfoTypes are specified in this request, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + rpc DeidentifyContent(DeidentifyContentRequest) returns (DeidentifyContentResponse) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/content:deidentify" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/content:deidentify" + body: "*" + } + }; + } + + // Re-identifies content that has been de-identified. + // See + // https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example + // to learn more. + rpc ReidentifyContent(ReidentifyContentRequest) returns (ReidentifyContentResponse) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/content:reidentify" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/content:reidentify" + body: "*" + } + }; + } + + // Returns a list of the sensitive information types that DLP API + // supports. See https://cloud.google.com/dlp/docs/infotypes-reference to + // learn more. + rpc ListInfoTypes(ListInfoTypesRequest) returns (ListInfoTypesResponse) { + option (google.api.http) = { + get: "/v2/infoTypes" + additional_bindings { + get: "/v2/{parent=locations/*}/infoTypes" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an InspectTemplate for reusing frequently used configuration + // for inspecting content, images, and storage. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. + rpc CreateInspectTemplate(CreateInspectTemplateRequest) returns (InspectTemplate) { + option (google.api.http) = { + post: "/v2/{parent=organizations/*}/inspectTemplates" + body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/inspectTemplates" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*}/inspectTemplates" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/inspectTemplates" + body: "*" + } + }; + option (google.api.method_signature) = "parent,inspect_template"; + } + + // Updates the InspectTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. + rpc UpdateInspectTemplate(UpdateInspectTemplateRequest) returns (InspectTemplate) { + option (google.api.http) = { + patch: "/v2/{name=organizations/*/inspectTemplates/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/inspectTemplates/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" + body: "*" + } + }; + option (google.api.method_signature) = "name,inspect_template,update_mask"; + } + + // Gets an InspectTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. + rpc GetInspectTemplate(GetInspectTemplateRequest) returns (InspectTemplate) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/inspectTemplates/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + } + additional_bindings { + get: "/v2/{name=projects/*/inspectTemplates/*}" + } + additional_bindings { + get: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists InspectTemplates. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. + rpc ListInspectTemplates(ListInspectTemplatesRequest) returns (ListInspectTemplatesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*}/inspectTemplates" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/inspectTemplates" + } + additional_bindings { + get: "/v2/{parent=projects/*}/inspectTemplates" + } + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/inspectTemplates" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes an InspectTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. + rpc DeleteInspectTemplate(DeleteInspectTemplateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=organizations/*/inspectTemplates/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + } + additional_bindings { + delete: "/v2/{name=projects/*/inspectTemplates/*}" + } + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a DeidentifyTemplate for reusing frequently used configuration + // for de-identifying content, images, and storage. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. + rpc CreateDeidentifyTemplate(CreateDeidentifyTemplateRequest) returns (DeidentifyTemplate) { + option (google.api.http) = { + post: "/v2/{parent=organizations/*}/deidentifyTemplates" + body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*}/deidentifyTemplates" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/deidentifyTemplates" + body: "*" + } + }; + option (google.api.method_signature) = "parent,deidentify_template"; + } + + // Updates the DeidentifyTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. + rpc UpdateDeidentifyTemplate(UpdateDeidentifyTemplateRequest) returns (DeidentifyTemplate) { + option (google.api.http) = { + patch: "/v2/{name=organizations/*/deidentifyTemplates/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/deidentifyTemplates/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + body: "*" + } + }; + option (google.api.method_signature) = "name,deidentify_template,update_mask"; + } + + // Gets a DeidentifyTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. + rpc GetDeidentifyTemplate(GetDeidentifyTemplateRequest) returns (DeidentifyTemplate) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/deidentifyTemplates/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + } + additional_bindings { + get: "/v2/{name=projects/*/deidentifyTemplates/*}" + } + additional_bindings { + get: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists DeidentifyTemplates. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. + rpc ListDeidentifyTemplates(ListDeidentifyTemplatesRequest) returns (ListDeidentifyTemplatesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*}/deidentifyTemplates" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates" + } + additional_bindings { + get: "/v2/{parent=projects/*}/deidentifyTemplates" + } + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/deidentifyTemplates" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a DeidentifyTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. + rpc DeleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=organizations/*/deidentifyTemplates/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + } + additional_bindings { + delete: "/v2/{name=projects/*/deidentifyTemplates/*}" + } + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a job trigger to run DLP actions such as scanning storage for + // sensitive information on a set schedule. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + rpc CreateJobTrigger(CreateJobTriggerRequest) returns (JobTrigger) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/jobTriggers" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/jobTriggers" + body: "*" + } + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/jobTriggers" + body: "*" + } + }; + option (google.api.method_signature) = "parent,job_trigger"; + } + + // Updates a job trigger. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + rpc UpdateJobTrigger(UpdateJobTriggerRequest) returns (JobTrigger) { + option (google.api.http) = { + patch: "/v2/{name=projects/*/jobTriggers/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/jobTriggers/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/jobTriggers/*}" + body: "*" + } + }; + option (google.api.method_signature) = "name,job_trigger,update_mask"; + } + + // Inspect hybrid content and store findings to a trigger. The inspection + // will be processed asynchronously. To review the findings monitor the + // jobs within the trigger. + rpc HybridInspectJobTrigger(HybridInspectJobTriggerRequest) returns (HybridInspectResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a job trigger. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + rpc GetJobTrigger(GetJobTriggerRequest) returns (JobTrigger) { + option (google.api.http) = { + get: "/v2/{name=projects/*/jobTriggers/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/jobTriggers/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/jobTriggers/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists job triggers. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + rpc ListJobTriggers(ListJobTriggersRequest) returns (ListJobTriggersResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*}/jobTriggers" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/jobTriggers" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/jobTriggers" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a job trigger. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. + rpc DeleteJobTrigger(DeleteJobTriggerRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/jobTriggers/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/jobTriggers/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/jobTriggers/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Activate a job trigger. Causes the immediate execute of a trigger + // instead of waiting on the trigger event to occur. + rpc ActivateJobTrigger(ActivateJobTriggerRequest) returns (DlpJob) { + option (google.api.http) = { + post: "/v2/{name=projects/*/jobTriggers/*}:activate" + body: "*" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:activate" + body: "*" + } + }; + } + + // Creates a new job to inspect storage or calculate risk metrics. + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + // + // When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + rpc CreateDlpJob(CreateDlpJobRequest) returns (DlpJob) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/dlpJobs" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/dlpJobs" + body: "*" + } + }; + option (google.api.method_signature) = "parent,inspect_job"; + option (google.api.method_signature) = "parent,risk_job"; + } + + // Lists DlpJobs that match the specified filter in the request. + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + rpc ListDlpJobs(ListDlpJobsRequest) returns (ListDlpJobsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*}/dlpJobs" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/dlpJobs" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/dlpJobs" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the latest state of a long-running DlpJob. + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + rpc GetDlpJob(GetDlpJobRequest) returns (DlpJob) { + option (google.api.http) = { + get: "/v2/{name=projects/*/dlpJobs/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/dlpJobs/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a long-running DlpJob. This method indicates that the client is + // no longer interested in the DlpJob result. The job will be canceled if + // possible. + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + rpc DeleteDlpJob(DeleteDlpJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/dlpJobs/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/dlpJobs/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Starts asynchronous cancellation on a long-running DlpJob. The server + // makes a best effort to cancel the DlpJob, but success is not + // guaranteed. + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + rpc CancelDlpJob(CancelDlpJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=projects/*/dlpJobs/*}:cancel" + body: "*" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel" + body: "*" + } + }; + } + + // Creates a pre-built stored infoType to be used for inspection. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc CreateStoredInfoType(CreateStoredInfoTypeRequest) returns (StoredInfoType) { + option (google.api.http) = { + post: "/v2/{parent=organizations/*}/storedInfoTypes" + body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/storedInfoTypes" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*}/storedInfoTypes" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/storedInfoTypes" + body: "*" + } + }; + option (google.api.method_signature) = "parent,config"; + } + + // Updates the stored infoType by creating a new version. The existing version + // will continue to be used until the new version is ready. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc UpdateStoredInfoType(UpdateStoredInfoTypeRequest) returns (StoredInfoType) { + option (google.api.http) = { + patch: "/v2/{name=organizations/*/storedInfoTypes/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/storedInfoTypes/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + body: "*" + } + }; + option (google.api.method_signature) = "name,config,update_mask"; + } + + // Gets a stored infoType. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc GetStoredInfoType(GetStoredInfoTypeRequest) returns (StoredInfoType) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/storedInfoTypes/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + } + additional_bindings { + get: "/v2/{name=projects/*/storedInfoTypes/*}" + } + additional_bindings { + get: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists stored infoTypes. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc ListStoredInfoTypes(ListStoredInfoTypesRequest) returns (ListStoredInfoTypesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*}/storedInfoTypes" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/storedInfoTypes" + } + additional_bindings { + get: "/v2/{parent=projects/*}/storedInfoTypes" + } + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/storedInfoTypes" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a stored infoType. + // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to + // learn more. + rpc DeleteStoredInfoType(DeleteStoredInfoTypeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=organizations/*/storedInfoTypes/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + } + additional_bindings { + delete: "/v2/{name=projects/*/storedInfoTypes/*}" + } + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Inspect hybrid content and store findings to a job. + // To review the findings, inspect the job. Inspection will occur + // asynchronously. + rpc HybridInspectDlpJob(HybridInspectDlpJobRequest) returns (HybridInspectResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Finish a running hybrid DlpJob. Triggers the finalization steps and running + // of any enabled actions that have not yet run. + rpc FinishDlpJob(FinishDlpJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish" + body: "*" + }; + } +} + +// List of excluded infoTypes. +message ExcludeInfoTypes { + // InfoType list in ExclusionRule rule drops a finding when it overlaps or + // contained within with a finding of an infoType from this list. For + // example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and + // `exclusion_rule` containing `exclude_info_types.info_types` with + // "EMAIL_ADDRESS" the phone number findings are dropped if they overlap + // with EMAIL_ADDRESS finding. + // That leads to "555-222-2222@example.org" to generate only a single + // finding, namely email address. + repeated InfoType info_types = 1; +} + +// The rule that specifies conditions when findings of infoTypes specified in +// `InspectionRuleSet` are removed from results. +message ExclusionRule { + // Exclusion rule types. + oneof type { + // Dictionary which defines the rule. + CustomInfoType.Dictionary dictionary = 1; + + // Regular expression which defines the rule. + CustomInfoType.Regex regex = 2; + + // Set of infoTypes for which findings would affect this rule. + ExcludeInfoTypes exclude_info_types = 3; + } + + // How the rule is applied, see MatchingType documentation for details. + MatchingType matching_type = 4; +} + +// A single inspection rule to be applied to infoTypes, specified in +// `InspectionRuleSet`. +message InspectionRule { + // Inspection rule types. + oneof type { + // Hotword-based detection rule. + CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + + // Exclusion rule. + ExclusionRule exclusion_rule = 2; + } +} + +// Rule set for modifying a set of infoTypes to alter behavior under certain +// circumstances, depending on the specific details of the rules within the set. +message InspectionRuleSet { + // List of infoTypes this rule set is applied to. + repeated InfoType info_types = 1; + + // Set of rules to be applied to infoTypes. The rules are applied in order. + repeated InspectionRule rules = 2; +} + +// Configuration description of the scanning process. +// When used with redactContent only info_types and min_likelihood are currently +// used. +message InspectConfig { + // Configuration to control the number of findings returned for inspection. + // This is not used for de-identification or data profiling. + // + // When redacting sensitive data from images, finding limits don't apply. They + // can cause unexpected or inconsistent results, where only some data is + // redacted. Don't include finding limits in + // [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] + // requests. Otherwise, Cloud DLP returns an error. + message FindingLimits { + // Max findings configuration per infoType, per content item or long + // running DlpJob. + message InfoTypeLimit { + // Type of information the findings limit applies to. Only one limit per + // info_type should be provided. If InfoTypeLimit does not have an + // info_type, the DLP API applies the limit against all info_types that + // are found but not specified in another InfoTypeLimit. + InfoType info_type = 1; + + // Max findings limit for the given infoType. + int32 max_findings = 2; + } + + // Max number of findings that will be returned for each item scanned. + // When set within `InspectJobConfig`, + // the maximum returned is 2000 regardless if this is set higher. + // When set within `InspectContentRequest`, this field is ignored. + int32 max_findings_per_item = 1; + + // Max number of findings that will be returned per request/job. + // When set within `InspectContentRequest`, the maximum returned is 2000 + // regardless if this is set higher. + int32 max_findings_per_request = 2; + + // Configuration of findings limit given for specified infoTypes. + repeated InfoTypeLimit max_findings_per_info_type = 3; + } + + // Restricts what info_types to look for. The values must correspond to + // InfoType values returned by ListInfoTypes or listed at + // https://cloud.google.com/dlp/docs/infotypes-reference. + // + // When no InfoTypes or CustomInfoTypes are specified in a request, the + // system may automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + // + // If you need precise control and predictability as to what detectors are + // run you should specify specific InfoTypes listed in the reference, + // otherwise a default list will be used, which may change over time. + repeated InfoType info_types = 1; + + // Only returns findings equal or above this threshold. The default is + // POSSIBLE. + // See https://cloud.google.com/dlp/docs/likelihood to learn more. + Likelihood min_likelihood = 2; + + // Configuration to control the number of findings returned. + // This is not used for data profiling. + // + // When redacting sensitive data from images, finding limits don't apply. They + // can cause unexpected or inconsistent results, where only some data is + // redacted. Don't include finding limits in + // [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] + // requests. Otherwise, Cloud DLP returns an error. + FindingLimits limits = 3; + + // When true, a contextual quote from the data that triggered a finding is + // included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote]. + // This is not used for data profiling. + bool include_quote = 4; + + // When true, excludes type information of the findings. + // This is not used for data profiling. + bool exclude_info_types = 5; + + // CustomInfoTypes provided by the user. See + // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. + repeated CustomInfoType custom_info_types = 6; + + // Deprecated and unused. + repeated ContentOption content_options = 8; + + // Set of rules to apply to the findings for this InspectConfig. + // Exclusion rules, contained in the set are executed in the end, other + // rules are executed in the order they are specified for each info type. + repeated InspectionRuleSet rule_set = 10; +} + +// Container for bytes to inspect or redact. +message ByteContentItem { + // The type of data being sent for inspection. To learn more, see + // [Supported file + // types](https://cloud.google.com/dlp/docs/supported-file-types). + enum BytesType { + // Unused + BYTES_TYPE_UNSPECIFIED = 0; + + // Any image type. + IMAGE = 6; + + // jpeg + IMAGE_JPEG = 1; + + // bmp + IMAGE_BMP = 2; + + // png + IMAGE_PNG = 3; + + // svg + IMAGE_SVG = 4; + + // plain text + TEXT_UTF8 = 5; + + // docx, docm, dotx, dotm + WORD_DOCUMENT = 7; + + // pdf + PDF = 8; + + // pptx, pptm, potx, potm, pot + POWERPOINT_DOCUMENT = 9; + + // xlsx, xlsm, xltx, xltm + EXCEL_DOCUMENT = 10; + + // avro + AVRO = 11; + + // csv + CSV = 12; + + // tsv + TSV = 13; + } + + // The type of data stored in the bytes string. Default will be TEXT_UTF8. + BytesType type = 1; + + // Content data to inspect or redact. + bytes data = 2; +} + +// Container structure for the content to inspect. +message ContentItem { + // Data of the item either in the byte array or UTF-8 string form, or table. + oneof data_item { + // String data to inspect or redact. + string value = 3; + + // Structured content for inspection. See + // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to + // learn more. + Table table = 4; + + // Content data to inspect or redact. Replaces `type` and `data`. + ByteContentItem byte_item = 5; + } +} + +// Structured content to inspect. Up to 50,000 `Value`s per request allowed. See +// https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table +// to learn more. +message Table { + // Values of the row. + message Row { + // Individual cells. + repeated Value values = 1; + } + + // Headers of the table. + repeated FieldId headers = 1; + + // Rows of the table. + repeated Row rows = 2; +} + +// All the findings for a single scanned item. +message InspectResult { + // List of findings for an item. + repeated Finding findings = 1; + + // If true, then this item might have more findings than were returned, + // and the findings returned are an arbitrary subset of all findings. + // The findings list might be truncated because the input items were too + // large, or because the server reached the maximum amount of resources + // allowed for a single API call. For best results, divide the input into + // smaller batches. + bool findings_truncated = 2; +} + +// Represents a piece of potentially sensitive content. +message Finding { + option (google.api.resource) = { + type: "dlp.googleapis.com/Finding" + pattern: "projects/{project}/locations/{location}/findings/{finding}" + }; + + // Resource name in format + // projects/{project}/locations/{location}/findings/{finding} Populated only + // when viewing persisted findings. + string name = 14; + + // The content that was found. Even if the content is not textual, it + // may be converted to a textual representation here. + // Provided if `include_quote` is true and the finding is + // less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes + // in length, the quote may be omitted. + string quote = 1; + + // The type of content that might have been found. + // Provided if `excluded_types` is false. + InfoType info_type = 2; + + // Confidence of how likely it is that the `info_type` is correct. + Likelihood likelihood = 3; + + // Where the content was found. + Location location = 4; + + // Timestamp when finding was detected. + google.protobuf.Timestamp create_time = 6; + + // Contains data parsed from quotes. Only populated if include_quote was set + // to true and a supported infoType was requested. Currently supported + // infoTypes: DATE, DATE_OF_BIRTH and TIME. + QuoteInfo quote_info = 7; + + // The job that stored the finding. + string resource_name = 8 [(google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + }]; + + // Job trigger name, if applicable, for this finding. + string trigger_name = 9 [(google.api.resource_reference) = { + type: "dlp.googleapis.com/JobTrigger" + }]; + + // The labels associated with this `Finding`. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // + // No more than 10 labels can be associated with a given finding. + // + // Examples: + // * `"environment" : "production"` + // * `"pipeline" : "etl"` + map labels = 10; + + // Time the job started that produced this finding. + google.protobuf.Timestamp job_create_time = 11; + + // The job that stored the finding. + string job_name = 13 [(google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + }]; + + // The unique finding id. + string finding_id = 15; +} + +// Specifies the location of the finding. +message Location { + // Zero-based byte offsets delimiting the finding. + // These are relative to the finding's containing element. + // Note that when the content is not textual, this references + // the UTF-8 encoded textual representation of the content. + // Omitted if content is an image. + Range byte_range = 1; + + // Unicode character offsets delimiting the finding. + // These are relative to the finding's containing element. + // Provided when the content is text. + Range codepoint_range = 2; + + // List of nested objects pointing to the precise location of the finding + // within the file or record. + repeated ContentLocation content_locations = 7; + + // Information about the container where this finding occurred, if available. + Container container = 8; +} + +// Precise location of the finding within a document, record, image, or metadata +// container. +message ContentLocation { + // Name of the container where the finding is located. + // The top level name is the source file name or table name. Names of some + // common storage containers are formatted as follows: + // + // * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` + // * Cloud Storage files: `gs://{bucket}/{path}` + // * Datastore namespace: {namespace} + // + // Nested names could be absent if the embedded object has no string + // identifier (for example, an image contained within a document). + string container_name = 1; + + // Type of the container within the file with location of the finding. + oneof location { + // Location within a row or record of a database table. + RecordLocation record_location = 2; + + // Location within an image's pixels. + ImageLocation image_location = 3; + + // Location data for document files. + DocumentLocation document_location = 5; + + // Location within the metadata for inspected content. + MetadataLocation metadata_location = 8; + } + + // Finding container modification timestamp, if applicable. For Cloud Storage, + // this field contains the last file modification timestamp. For a BigQuery + // table, this field contains the last_modified_time property. For Datastore, + // this field isn't populated. + google.protobuf.Timestamp container_timestamp = 6; + + // Finding container version, if available + // ("generation" for Cloud Storage). + string container_version = 7; +} + +// Metadata Location +message MetadataLocation { + // Type of metadata containing the finding. + MetadataType type = 1; + + // Label of the piece of metadata containing the finding, for example - + // latitude, author, caption. + oneof label { + // Storage metadata. + StorageMetadataLabel storage_label = 3; + } +} + +// Storage metadata label to indicate which metadata entry contains findings. +message StorageMetadataLabel { + string key = 1; +} + +// Location of a finding within a document. +message DocumentLocation { + // Offset of the line, from the beginning of the file, where the finding + // is located. + int64 file_offset = 1; +} + +// Location of a finding within a row or record. +message RecordLocation { + // Key of the finding. + RecordKey record_key = 1; + + // Field id of the field containing the finding. + FieldId field_id = 2; + + // Location within a `ContentItem.Table`. + TableLocation table_location = 3; +} + +// Location of a finding within a table. +message TableLocation { + // The zero-based index of the row where the finding is located. Only + // populated for resources that have a natural ordering, not BigQuery. In + // BigQuery, to identify the row a finding came from, populate + // BigQueryOptions.identifying_fields with your primary key column names and + // when you store the findings the value of those columns will be stored + // inside of Finding. + int64 row_index = 1; +} + +// Represents a container that may contain DLP findings. +// Examples of a container include a file, table, or database record. +message Container { + // Container type, for example BigQuery or Cloud Storage. + string type = 1; + + // Project where the finding was found. + // Can be different from the project that owns the finding. + string project_id = 2; + + // A string representation of the full container name. + // Examples: + // - BigQuery: 'Project:DataSetId.TableId' + // - Cloud Storage: 'gs://Bucket/folders/filename.txt' + string full_path = 3; + + // The root of the container. + // Examples: + // + // - For BigQuery table `project_id:dataset_id.table_id`, the root is + // `dataset_id` + // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root + // is `gs://bucket` + string root_path = 4; + + // The rest of the path after the root. + // Examples: + // + // - For BigQuery table `project_id:dataset_id.table_id`, the relative path is + // `table_id` + // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + // path is `folder/filename.txt` + string relative_path = 5; + + // Findings container modification timestamp, if applicable. For Cloud + // Storage, this field contains the last file modification timestamp. For a + // BigQuery table, this field contains the last_modified_time property. For + // Datastore, this field isn't populated. + google.protobuf.Timestamp update_time = 6; + + // Findings container version, if available + // ("generation" for Cloud Storage). + string version = 7; +} + +// Generic half-open interval [start, end) +message Range { + // Index of the first character of the range (inclusive). + int64 start = 1; + + // Index of the last character of the range (exclusive). + int64 end = 2; +} + +// Location of the finding within an image. +message ImageLocation { + // Bounding boxes locating the pixels within the image containing the finding. + repeated BoundingBox bounding_boxes = 1; +} + +// Bounding box encompassing detected text within an image. +message BoundingBox { + // Top coordinate of the bounding box. (0,0) is upper left. + int32 top = 1; + + // Left coordinate of the bounding box. (0,0) is upper left. + int32 left = 2; + + // Width of the bounding box in pixels. + int32 width = 3; + + // Height of the bounding box in pixels. + int32 height = 4; +} + +// Request to search for potentially sensitive info in an image and redact it +// by covering it with a colored rectangle. +message RedactImageRequest { + // Configuration for determining how redaction of images should occur. + message ImageRedactionConfig { + // Type of information to redact from images. + oneof target { + // Only one per info_type should be provided per request. If not + // specified, and redact_all_text is false, the DLP API will redact all + // text that it matches against all info_types that are found, but not + // specified in another ImageRedactionConfig. + InfoType info_type = 1; + + // If true, all text found in the image, regardless whether it matches an + // info_type, is redacted. Only one should be provided. + bool redact_all_text = 2; + } + + // The color to use when redacting content from an image. If not specified, + // the default is black. + Color redaction_color = 3; + } + + // Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [(google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpContent" + }]; + + // Deprecated. This field has no effect. + string location_id = 8; + + // Configuration for the inspector. + InspectConfig inspect_config = 2; + + // The configuration for specifying what content to redact from images. + repeated ImageRedactionConfig image_redaction_configs = 5; + + // Whether the response should include findings along with the redacted + // image. + bool include_findings = 6; + + // The content must be PNG, JPEG, SVG or BMP. + ByteContentItem byte_item = 7; +} + +// Represents a color in the RGB color space. +message Color { + // The amount of red in the color as a value in the interval [0, 1]. + float red = 1; + + // The amount of green in the color as a value in the interval [0, 1]. + float green = 2; + + // The amount of blue in the color as a value in the interval [0, 1]. + float blue = 3; +} + +// Results of redacting an image. +message RedactImageResponse { + // The redacted image. The type will be the same as the original image. + bytes redacted_image = 1; + + // If an image was being inspected and the InspectConfig's include_quote was + // set to true, then this field will include all text, if any, that was found + // in the image. + string extracted_text = 2; + + // The findings. Populated when include_findings in the request is true. + InspectResult inspect_result = 3; +} + +// Request to de-identify a ContentItem. +message DeidentifyContentRequest { + // Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [(google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpContent" + }]; + + // Configuration for the de-identification of the content item. + // Items specified here will override the template referenced by the + // deidentify_template_name argument. + DeidentifyConfig deidentify_config = 2; + + // Configuration for the inspector. + // Items specified here will override the template referenced by the + // inspect_template_name argument. + InspectConfig inspect_config = 3; + + // The item to de-identify. Will be treated as text. + ContentItem item = 4; + + // Template to use. Any configuration directly specified in + // inspect_config will override those set in the template. Singular fields + // that are set in this request will replace their corresponding fields in the + // template. Repeated fields are appended. Singular sub-messages and groups + // are recursively merged. + string inspect_template_name = 5; + + // Template to use. Any configuration directly specified in + // deidentify_config will override those set in the template. Singular fields + // that are set in this request will replace their corresponding fields in the + // template. Repeated fields are appended. Singular sub-messages and groups + // are recursively merged. + string deidentify_template_name = 6; + + // Deprecated. This field has no effect. + string location_id = 7; +} + +// Results of de-identifying a ContentItem. +message DeidentifyContentResponse { + // The de-identified item. + ContentItem item = 1; + + // An overview of the changes that were made on the `item`. + TransformationOverview overview = 2; +} + +// Request to re-identify an item. +message ReidentifyContentRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpContent" + } + ]; + + // Configuration for the re-identification of the content item. + // This field shares the same proto message type that is used for + // de-identification, however its usage here is for the reversal of the + // previous de-identification. Re-identification is performed by examining + // the transformations used to de-identify the items and executing the + // reverse. This requires that only reversible transformations + // be provided here. The reversible transformations are: + // + // - `CryptoDeterministicConfig` + // - `CryptoReplaceFfxFpeConfig` + DeidentifyConfig reidentify_config = 2; + + // Configuration for the inspector. + InspectConfig inspect_config = 3; + + // The item to re-identify. Will be treated as text. + ContentItem item = 4; + + // Template to use. Any configuration directly specified in + // `inspect_config` will override those set in the template. Singular fields + // that are set in this request will replace their corresponding fields in the + // template. Repeated fields are appended. Singular sub-messages and groups + // are recursively merged. + string inspect_template_name = 5; + + // Template to use. References an instance of `DeidentifyTemplate`. + // Any configuration directly specified in `reidentify_config` or + // `inspect_config` will override those set in the template. The + // `DeidentifyTemplate` used must include only reversible transformations. + // Singular fields that are set in this request will replace their + // corresponding fields in the template. Repeated fields are appended. + // Singular sub-messages and groups are recursively merged. + string reidentify_template_name = 6; + + // Deprecated. This field has no effect. + string location_id = 7; +} + +// Results of re-identifying an item. +message ReidentifyContentResponse { + // The re-identified item. + ContentItem item = 1; + + // An overview of the changes that were made to the `item`. + TransformationOverview overview = 2; +} + +// Request to search for potentially sensitive info in a ContentItem. +message InspectContentRequest { + // Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [(google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpContent" + }]; + + // Configuration for the inspector. What specified here will override + // the template referenced by the inspect_template_name argument. + InspectConfig inspect_config = 2; + + // The item to inspect. + ContentItem item = 3; + + // Template to use. Any configuration directly specified in + // inspect_config will override those set in the template. Singular fields + // that are set in this request will replace their corresponding fields in the + // template. Repeated fields are appended. Singular sub-messages and groups + // are recursively merged. + string inspect_template_name = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Results of inspecting an item. +message InspectContentResponse { + // The findings. + InspectResult result = 1; +} + +// Cloud repository for storing output. +message OutputStorageConfig { + // Predefined schemas for storing findings. + // Only for use with external storage. + enum OutputSchema { + // Unused. + OUTPUT_SCHEMA_UNSPECIFIED = 0; + + // Basic schema including only `info_type`, `quote`, `certainty`, and + // `timestamp`. + BASIC_COLUMNS = 1; + + // Schema tailored to findings from scanning Cloud Storage. + GCS_COLUMNS = 2; + + // Schema tailored to findings from scanning Google Datastore. + DATASTORE_COLUMNS = 3; + + // Schema tailored to findings from scanning Google BigQuery. + BIG_QUERY_COLUMNS = 4; + + // Schema containing all columns. + ALL_COLUMNS = 5; + } + + // Output storage types. + oneof type { + // Store findings in an existing table or a new table in an existing + // dataset. If table_id is not set a new one will be generated + // for you with the following format: + // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + // for generating the date details. + // + // For Inspect, each column in an existing output table must have the same + // name, type, and mode of a field in the `Finding` object. + // + // For Risk, an existing output table should be the output of a previous + // Risk analysis job run on the same source table, with the same privacy + // metric and quasi-identifiers. Risk jobs that analyze the same table but + // compute a different privacy metric, or use different sets of + // quasi-identifiers, cannot store their results in the same table. + BigQueryTable table = 1; + } + + // Schema used for writing the findings for Inspect jobs. This field is only + // used for Inspect and must be unspecified for Risk jobs. Columns are derived + // from the `Finding` object. If appending to an existing table, any columns + // from the predefined schema that are missing will be added. No columns in + // the existing table will be deleted. + // + // If unspecified, then all available columns will be used for a new table or + // an (existing) table with no schema, and no changes will be made to an + // existing table that has a schema. + // Only for use with external storage. + OutputSchema output_schema = 3; +} + +// Statistics regarding a specific InfoType. +message InfoTypeStats { + // The type of finding this stat is for. + InfoType info_type = 1; + + // Number of findings for this infoType. + int64 count = 2; +} + +// The results of an inspect DataSource job. +message InspectDataSourceDetails { + // Snapshot of the inspection configuration. + message RequestedOptions { + // If run with an InspectTemplate, a snapshot of its state at the time of + // this run. + InspectTemplate snapshot_inspect_template = 1; + + // Inspect config. + InspectJobConfig job_config = 3; + } + + // All result fields mentioned below are updated while the job is processing. + message Result { + // Total size in bytes that were processed. + int64 processed_bytes = 1; + + // Estimate of the number of bytes to process. + int64 total_estimated_bytes = 2; + + // Statistics of how many instances of each info type were found during + // inspect job. + repeated InfoTypeStats info_type_stats = 3; + + // Statistics related to the processing of hybrid inspect. + HybridInspectStatistics hybrid_stats = 7; + } + + // The configuration used for this job. + RequestedOptions requested_options = 2; + + // A summary of the outcome of this inspection job. + Result result = 3; +} + +// Statistics related to processing hybrid inspect requests. +message HybridInspectStatistics { + // The number of hybrid inspection requests processed within this job. + int64 processed_count = 1; + + // The number of hybrid inspection requests aborted because the job ran + // out of quota or was ended before they could be processed. + int64 aborted_count = 2; + + // The number of hybrid requests currently being processed. Only populated + // when called via method `getDlpJob`. + // A burst of traffic may cause hybrid inspect requests to be enqueued. + // Processing will take place as quickly as possible, but resource limitations + // may impact how long a request is enqueued for. + int64 pending_count = 3; +} + +// InfoType description. +message InfoTypeDescription { + // Internal name of the infoType. + string name = 1; + + // Human readable form of the infoType name. + string display_name = 2; + + // Which parts of the API supports this InfoType. + repeated InfoTypeSupportedBy supported_by = 3; + + // Description of the infotype. Translated when language is provided in the + // request. + string description = 4; + + // A list of available versions for the infotype. + repeated VersionDescription versions = 9; + + // The category of the infoType. + repeated InfoTypeCategory categories = 10; +} + +// Classification of infoTypes to organize them according to geographic +// location, industry, and data type. +message InfoTypeCategory { + // Enum of the current locations. + // We might add more locations in the future. + enum LocationCategory { + // Unused location + LOCATION_UNSPECIFIED = 0; + + // The infoType is not issued by or tied to a specific region, but is used + // almost everywhere. + GLOBAL = 1; + + // The infoType is typically used in Argentina. + ARGENTINA = 2; + + // The infoType is typically used in Australia. + AUSTRALIA = 3; + + // The infoType is typically used in Belgium. + BELGIUM = 4; + + // The infoType is typically used in Brazil. + BRAZIL = 5; + + // The infoType is typically used in Canada. + CANADA = 6; + + // The infoType is typically used in Chile. + CHILE = 7; + + // The infoType is typically used in China. + CHINA = 8; + + // The infoType is typically used in Colombia. + COLOMBIA = 9; + + // The infoType is typically used in Denmark. + DENMARK = 10; + + // The infoType is typically used in France. + FRANCE = 11; + + // The infoType is typically used in Finland. + FINLAND = 12; + + // The infoType is typically used in Germany. + GERMANY = 13; + + // The infoType is typically used in Hong Kong. + HONG_KONG = 14; + + // The infoType is typically used in India. + INDIA = 15; + + // The infoType is typically used in Indonesia. + INDONESIA = 16; + + // The infoType is typically used in Ireland. + IRELAND = 17; + + // The infoType is typically used in Israel. + ISRAEL = 18; + + // The infoType is typically used in Italy. + ITALY = 19; + + // The infoType is typically used in Japan. + JAPAN = 20; + + // The infoType is typically used in Korea. + KOREA = 21; + + // The infoType is typically used in Mexico. + MEXICO = 22; + + // The infoType is typically used in the Netherlands. + THE_NETHERLANDS = 23; + + // The infoType is typically used in Norway. + NORWAY = 24; + + // The infoType is typically used in Paraguay. + PARAGUAY = 25; + + // The infoType is typically used in Peru. + PERU = 26; + + // The infoType is typically used in Poland. + POLAND = 27; + + // The infoType is typically used in Portugal. + PORTUGAL = 28; + + // The infoType is typically used in Singapore. + SINGAPORE = 29; + + // The infoType is typically used in South Africa. + SOUTH_AFRICA = 30; + + // The infoType is typically used in Spain. + SPAIN = 31; + + // The infoType is typically used in Sweden. + SWEDEN = 32; + + // The infoType is typically used in Taiwan. + TAIWAN = 33; + + // The infoType is typically used in Thailand. + THAILAND = 34; + + // The infoType is typically used in Turkey. + TURKEY = 35; + + // The infoType is typically used in the United Kingdom. + UNITED_KINGDOM = 36; + + // The infoType is typically used in the United States. + UNITED_STATES = 37; + + // The infoType is typically used in Uruguay. + URUGUAY = 38; + + // The infoType is typically used in Venezuela. + VENEZUELA = 39; + + // The infoType is typically used in Google internally. + INTERNAL = 40; + } + + // Enum of the current industries in the category. + // We might add more industries in the future. + enum IndustryCategory { + // Unused industry + INDUSTRY_UNSPECIFIED = 0; + + // The infoType is typically used in the finance industry. + FINANCE = 1; + + // The infoType is typically used in the health industry. + HEALTH = 2; + + // The infoType is typically used in the telecommunications industry. + TELECOMMUNICATIONS = 3; + } + + // Enum of the current types in the category. + // We might add more types in the future. + enum TypeCategory { + // Unused type + TYPE_UNSPECIFIED = 0; + + // Personally identifiable information, for example, a + // name or phone number + PII = 1; + + // Personally identifiable information that is especially sensitive, for + // example, a passport number. + SPII = 2; + + // Attributes that can partially identify someone, especially in + // combination with other attributes, like age, height, and gender. + DEMOGRAPHIC = 3; + + // Confidential or secret information, for example, a password. + CREDENTIAL = 4; + + // An identification document issued by a government. + GOVERNMENT_ID = 5; + + // A document, for example, a resume or source code. + DOCUMENT = 6; + + // Information that is not sensitive on its own, but provides details about + // the circumstances surrounding an entity or an event. + CONTEXTUAL_INFORMATION = 7; + } + + oneof category { + // The region or country that issued the ID or document represented by the + // infoType. + LocationCategory location_category = 1; + + // The group of relevant businesses where this infoType is commonly used + IndustryCategory industry_category = 2; + + // The class of identifiers where this infoType belongs + TypeCategory type_category = 3; + } +} + +// Details about each available version for an infotype. +message VersionDescription { + // Name of the version + string version = 1; + + // Description of the version. + string description = 2; +} + +// Request for the list of infoTypes. +message ListInfoTypesRequest { + // The parent resource name. + // + // The format of this value is as follows: + // + // locations/LOCATION_ID + string parent = 4; + + // BCP-47 language code for localized infoType friendly + // names. If omitted, or if localized strings are not available, + // en-US strings will be returned. + string language_code = 1; + + // filter to only return infoTypes supported by certain parts of the + // API. Defaults to supported_by=INSPECT. + string filter = 2; + + // Deprecated. This field has no effect. + string location_id = 3; +} + +// Response to the ListInfoTypes request. +message ListInfoTypesResponse { + // Set of sensitive infoTypes. + repeated InfoTypeDescription info_types = 1; +} + +// Configuration for a risk analysis job. See +// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more. +message RiskAnalysisJobConfig { + // Privacy metric to compute. + PrivacyMetric privacy_metric = 1; + + // Input dataset to compute metrics over. + BigQueryTable source_table = 2; + + // Actions to execute at the completion of the job. Are executed in the order + // provided. + repeated Action actions = 3; +} + +// A column with a semantic tag attached. +message QuasiId { + // Required. Identifies the column. + FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Semantic tag that identifies what a column contains, to determine which + // statistical model to use to estimate the reidentifiability of each + // value. [required] + oneof tag { + // A column can be tagged with a InfoType to use the relevant public + // dataset as a statistical model of population, if available. We + // currently support US ZIP codes, region codes, ages and genders. + // To programmatically obtain the list of supported InfoTypes, use + // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. + InfoType info_type = 2; + + // A column can be tagged with a custom tag. In this case, the user must + // indicate an auxiliary table that contains statistical information on + // the possible values of this column (below). + string custom_tag = 3; + + // If no semantic tag is indicated, we infer the statistical model from + // the distribution of values in the input data + google.protobuf.Empty inferred = 4; + } +} + +// An auxiliary table containing statistical information on the relative +// frequency of different quasi-identifiers values. It has one or several +// quasi-identifiers columns, and one column that indicates the relative +// frequency of each quasi-identifier tuple. +// If a tuple is present in the data but not in the auxiliary table, the +// corresponding relative frequency is assumed to be zero (and thus, the +// tuple is highly reidentifiable). +message StatisticalTable { + // A quasi-identifier column has a custom_tag, used to know which column + // in the data corresponds to which column in the statistical model. + message QuasiIdentifierField { + // Identifies the column. + FieldId field = 1; + + // A column can be tagged with a custom tag. In this case, the user must + // indicate an auxiliary table that contains statistical information on + // the possible values of this column (below). + string custom_tag = 2; + } + + // Required. Auxiliary table location. + BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Quasi-identifier columns. + repeated QuasiIdentifierField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The relative frequency column must contain a floating-point number + // between 0 and 1 (inclusive). Null values are assumed to be zero. + FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Privacy metric to compute for reidentification risk analysis. +message PrivacyMetric { + // Compute numerical stats over an individual column, including + // min, max, and quantiles. + message NumericalStatsConfig { + // Field to compute numerical stats on. Supported types are + // integer, float, date, datetime, timestamp, time. + FieldId field = 1; + } + + // Compute numerical stats over an individual column, including + // number of distinct values and value count distribution. + message CategoricalStatsConfig { + // Field to compute categorical stats on. All column types are + // supported except for arrays and structs. However, it may be more + // informative to use NumericalStats when the field type is supported, + // depending on the data. + FieldId field = 1; + } + + // k-anonymity metric, used for analysis of reidentification risk. + message KAnonymityConfig { + // Set of fields to compute k-anonymity over. When multiple fields are + // specified, they are considered a single composite key. Structs and + // repeated data types are not supported; however, nested fields are + // supported so long as they are not structs themselves or nested within + // a repeated field. + repeated FieldId quasi_ids = 1; + + // Message indicating that multiple rows might be associated to a + // single individual. If the same entity_id is associated to multiple + // quasi-identifier tuples over distinct rows, we consider the entire + // collection of tuples as the composite quasi-identifier. This collection + // is a multiset: the order in which the different tuples appear in the + // dataset is ignored, but their frequency is taken into account. + // + // Important note: a maximum of 1000 rows can be associated to a single + // entity ID. If more rows are associated with the same entity ID, some + // might be ignored. + EntityId entity_id = 2; + } + + // l-diversity metric, used for analysis of reidentification risk. + message LDiversityConfig { + // Set of quasi-identifiers indicating how equivalence classes are + // defined for the l-diversity computation. When multiple fields are + // specified, they are considered a single composite key. + repeated FieldId quasi_ids = 1; + + // Sensitive field for computing the l-value. + FieldId sensitive_attribute = 2; + } + + // Reidentifiability metric. This corresponds to a risk model similar to what + // is called "journalist risk" in the literature, except the attack dataset is + // statistically modeled instead of being perfectly known. This can be done + // using publicly available data (like the US Census), or using a custom + // statistical model (indicated as one or several BigQuery tables), or by + // extrapolating from the distribution of values in the input dataset. + message KMapEstimationConfig { + // A column with a semantic tag attached. + message TaggedField { + // Required. Identifies the column. + FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Semantic tag that identifies what a column contains, to determine which + // statistical model to use to estimate the reidentifiability of each + // value. [required] + oneof tag { + // A column can be tagged with a InfoType to use the relevant public + // dataset as a statistical model of population, if available. We + // currently support US ZIP codes, region codes, ages and genders. + // To programmatically obtain the list of supported InfoTypes, use + // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. + InfoType info_type = 2; + + // A column can be tagged with a custom tag. In this case, the user must + // indicate an auxiliary table that contains statistical information on + // the possible values of this column (below). + string custom_tag = 3; + + // If no semantic tag is indicated, we infer the statistical model from + // the distribution of values in the input data + google.protobuf.Empty inferred = 4; + } + } + + // An auxiliary table contains statistical information on the relative + // frequency of different quasi-identifiers values. It has one or several + // quasi-identifiers columns, and one column that indicates the relative + // frequency of each quasi-identifier tuple. + // If a tuple is present in the data but not in the auxiliary table, the + // corresponding relative frequency is assumed to be zero (and thus, the + // tuple is highly reidentifiable). + message AuxiliaryTable { + // A quasi-identifier column has a custom_tag, used to know which column + // in the data corresponds to which column in the statistical model. + message QuasiIdField { + // Identifies the column. + FieldId field = 1; + + // A auxiliary field. + string custom_tag = 2; + } + + // Required. Auxiliary table location. + BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Quasi-identifier columns. + repeated QuasiIdField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The relative frequency column must contain a floating-point number + // between 0 and 1 (inclusive). Null values are assumed to be zero. + FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Fields considered to be quasi-identifiers. No two columns can have the + // same tag. + repeated TaggedField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; + + // ISO 3166-1 alpha-2 region code to use in the statistical modeling. + // Set if no column is tagged with a region-specific InfoType (like + // US_ZIP_5) or a region code. + string region_code = 2; + + // Several auxiliary tables can be used in the analysis. Each custom_tag + // used to tag a quasi-identifiers column must appear in exactly one column + // of one auxiliary table. + repeated AuxiliaryTable auxiliary_tables = 3; + } + + // δ-presence metric, used to estimate how likely it is for an attacker to + // figure out that one given individual appears in a de-identified dataset. + // Similarly to the k-map metric, we cannot compute δ-presence exactly without + // knowing the attack dataset, so we use a statistical model instead. + message DeltaPresenceEstimationConfig { + // Required. Fields considered to be quasi-identifiers. No two fields can have the + // same tag. + repeated QuasiId quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; + + // ISO 3166-1 alpha-2 region code to use in the statistical modeling. + // Set if no column is tagged with a region-specific InfoType (like + // US_ZIP_5) or a region code. + string region_code = 2; + + // Several auxiliary tables can be used in the analysis. Each custom_tag + // used to tag a quasi-identifiers field must appear in exactly one + // field of one auxiliary table. + repeated StatisticalTable auxiliary_tables = 3; + } + + // Types of analysis. + oneof type { + // Numerical stats + NumericalStatsConfig numerical_stats_config = 1; + + // Categorical stats + CategoricalStatsConfig categorical_stats_config = 2; + + // K-anonymity + KAnonymityConfig k_anonymity_config = 3; + + // l-diversity + LDiversityConfig l_diversity_config = 4; + + // k-map + KMapEstimationConfig k_map_estimation_config = 5; + + // delta-presence + DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + } +} + +// Result of a risk analysis operation request. +message AnalyzeDataSourceRiskDetails { + // Result of the numerical stats computation. + message NumericalStatsResult { + // Minimum value appearing in the column. + Value min_value = 1; + + // Maximum value appearing in the column. + Value max_value = 2; + + // List of 99 values that partition the set of field values into 100 equal + // sized buckets. + repeated Value quantile_values = 4; + } + + // Result of the categorical stats computation. + message CategoricalStatsResult { + // Histogram of value frequencies in the column. + message CategoricalStatsHistogramBucket { + // Lower bound on the value frequency of the values in this bucket. + int64 value_frequency_lower_bound = 1; + + // Upper bound on the value frequency of the values in this bucket. + int64 value_frequency_upper_bound = 2; + + // Total number of values in this bucket. + int64 bucket_size = 3; + + // Sample of value frequencies in this bucket. The total number of + // values returned per bucket is capped at 20. + repeated ValueFrequency bucket_values = 4; + + // Total number of distinct values in this bucket. + int64 bucket_value_count = 5; + } + + // Histogram of value frequencies in the column. + repeated CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; + } + + // Result of the k-anonymity computation. + message KAnonymityResult { + // The set of columns' values that share the same ldiversity value + message KAnonymityEquivalenceClass { + // Set of values defining the equivalence class. One value per + // quasi-identifier column in the original KAnonymity metric message. + // The order is always the same as the original request. + repeated Value quasi_ids_values = 1; + + // Size of the equivalence class, for example number of rows with the + // above set of values. + int64 equivalence_class_size = 2; + } + + // Histogram of k-anonymity equivalence classes. + message KAnonymityHistogramBucket { + // Lower bound on the size of the equivalence classes in this bucket. + int64 equivalence_class_size_lower_bound = 1; + + // Upper bound on the size of the equivalence classes in this bucket. + int64 equivalence_class_size_upper_bound = 2; + + // Total number of equivalence classes in this bucket. + int64 bucket_size = 3; + + // Sample of equivalence classes in this bucket. The total number of + // classes returned per bucket is capped at 20. + repeated KAnonymityEquivalenceClass bucket_values = 4; + + // Total number of distinct equivalence classes in this bucket. + int64 bucket_value_count = 5; + } + + // Histogram of k-anonymity equivalence classes. + repeated KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + } + + // Result of the l-diversity computation. + message LDiversityResult { + // The set of columns' values that share the same ldiversity value. + message LDiversityEquivalenceClass { + // Quasi-identifier values defining the k-anonymity equivalence + // class. The order is always the same as the original request. + repeated Value quasi_ids_values = 1; + + // Size of the k-anonymity equivalence class. + int64 equivalence_class_size = 2; + + // Number of distinct sensitive values in this equivalence class. + int64 num_distinct_sensitive_values = 3; + + // Estimated frequencies of top sensitive values. + repeated ValueFrequency top_sensitive_values = 4; + } + + // Histogram of l-diversity equivalence class sensitive value frequencies. + message LDiversityHistogramBucket { + // Lower bound on the sensitive value frequencies of the equivalence + // classes in this bucket. + int64 sensitive_value_frequency_lower_bound = 1; + + // Upper bound on the sensitive value frequencies of the equivalence + // classes in this bucket. + int64 sensitive_value_frequency_upper_bound = 2; + + // Total number of equivalence classes in this bucket. + int64 bucket_size = 3; + + // Sample of equivalence classes in this bucket. The total number of + // classes returned per bucket is capped at 20. + repeated LDiversityEquivalenceClass bucket_values = 4; + + // Total number of distinct equivalence classes in this bucket. + int64 bucket_value_count = 5; + } + + // Histogram of l-diversity equivalence class sensitive value frequencies. + repeated LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; + } + + // Result of the reidentifiability analysis. Note that these results are an + // estimation, not exact values. + message KMapEstimationResult { + // A tuple of values for the quasi-identifier columns. + message KMapEstimationQuasiIdValues { + // The quasi-identifier values. + repeated Value quasi_ids_values = 1; + + // The estimated anonymity for these quasi-identifier values. + int64 estimated_anonymity = 2; + } + + // A KMapEstimationHistogramBucket message with the following values: + // min_anonymity: 3 + // max_anonymity: 5 + // frequency: 42 + // means that there are 42 records whose quasi-identifier values correspond + // to 3, 4 or 5 people in the overlying population. An important particular + // case is when min_anonymity = max_anonymity = 1: the frequency field then + // corresponds to the number of uniquely identifiable records. + message KMapEstimationHistogramBucket { + // Always positive. + int64 min_anonymity = 1; + + // Always greater than or equal to min_anonymity. + int64 max_anonymity = 2; + + // Number of records within these anonymity bounds. + int64 bucket_size = 5; + + // Sample of quasi-identifier tuple values in this bucket. The total + // number of classes returned per bucket is capped at 20. + repeated KMapEstimationQuasiIdValues bucket_values = 6; + + // Total number of distinct quasi-identifier tuple values in this bucket. + int64 bucket_value_count = 7; + } + + // The intervals [min_anonymity, max_anonymity] do not overlap. If a value + // doesn't correspond to any such interval, the associated frequency is + // zero. For example, the following records: + // {min_anonymity: 1, max_anonymity: 1, frequency: 17} + // {min_anonymity: 2, max_anonymity: 3, frequency: 42} + // {min_anonymity: 5, max_anonymity: 10, frequency: 99} + // mean that there are no record with an estimated anonymity of 4, 5, or + // larger than 10. + repeated KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + } + + // Result of the δ-presence computation. Note that these results are an + // estimation, not exact values. + message DeltaPresenceEstimationResult { + // A tuple of values for the quasi-identifier columns. + message DeltaPresenceEstimationQuasiIdValues { + // The quasi-identifier values. + repeated Value quasi_ids_values = 1; + + // The estimated probability that a given individual sharing these + // quasi-identifier values is in the dataset. This value, typically + // called δ, is the ratio between the number of records in the dataset + // with these quasi-identifier values, and the total number of individuals + // (inside *and* outside the dataset) with these quasi-identifier values. + // For example, if there are 15 individuals in the dataset who share the + // same quasi-identifier values, and an estimated 100 people in the entire + // population with these values, then δ is 0.15. + double estimated_probability = 2; + } + + // A DeltaPresenceEstimationHistogramBucket message with the following + // values: + // min_probability: 0.1 + // max_probability: 0.2 + // frequency: 42 + // means that there are 42 records for which δ is in [0.1, 0.2). An + // important particular case is when min_probability = max_probability = 1: + // then, every individual who shares this quasi-identifier combination is in + // the dataset. + message DeltaPresenceEstimationHistogramBucket { + // Between 0 and 1. + double min_probability = 1; + + // Always greater than or equal to min_probability. + double max_probability = 2; + + // Number of records within these probability bounds. + int64 bucket_size = 5; + + // Sample of quasi-identifier tuple values in this bucket. The total + // number of classes returned per bucket is capped at 20. + repeated DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + + // Total number of distinct quasi-identifier tuple values in this bucket. + int64 bucket_value_count = 7; + } + + // The intervals [min_probability, max_probability) do not overlap. If a + // value doesn't correspond to any such interval, the associated frequency + // is zero. For example, the following records: + // {min_probability: 0, max_probability: 0.1, frequency: 17} + // {min_probability: 0.2, max_probability: 0.3, frequency: 42} + // {min_probability: 0.3, max_probability: 0.4, frequency: 99} + // mean that there are no record with an estimated probability in [0.1, 0.2) + // nor larger or equal to 0.4. + repeated DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + } + + // Risk analysis options. + message RequestedRiskAnalysisOptions { + // The job config for the risk job. + RiskAnalysisJobConfig job_config = 1; + } + + // Privacy metric to compute. + PrivacyMetric requested_privacy_metric = 1; + + // Input dataset to compute metrics over. + BigQueryTable requested_source_table = 2; + + // Values associated with this metric. + oneof result { + // Numerical stats result + NumericalStatsResult numerical_stats_result = 3; + + // Categorical stats result + CategoricalStatsResult categorical_stats_result = 4; + + // K-anonymity result + KAnonymityResult k_anonymity_result = 5; + + // L-divesity result + LDiversityResult l_diversity_result = 6; + + // K-map result + KMapEstimationResult k_map_estimation_result = 7; + + // Delta-presence result + DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + } + + // The configuration used for this job. + RequestedRiskAnalysisOptions requested_options = 10; +} + +// A value of a field, including its frequency. +message ValueFrequency { + // A value contained in the field in question. + Value value = 1; + + // How many times the value is contained in the field. + int64 count = 2; +} + +// Set of primitive values supported by the system. +// Note that for the purposes of inspection or transformation, the number +// of bytes considered to comprise a 'Value' is based on its representation +// as a UTF-8 encoded string. For example, if 'integer_value' is set to +// 123456789, the number of bytes would be counted as 9, even though an +// int64 only holds up to 8 bytes of data. +message Value { + // Value types + oneof type { + // integer + int64 integer_value = 1; + + // float + double float_value = 2; + + // string + string string_value = 3; + + // boolean + bool boolean_value = 4; + + // timestamp + google.protobuf.Timestamp timestamp_value = 5; + + // time of day + google.type.TimeOfDay time_value = 6; + + // date + google.type.Date date_value = 7; + + // day of week + google.type.DayOfWeek day_of_week_value = 8; + } +} + +// Message for infoType-dependent details parsed from quote. +message QuoteInfo { + // Object representation of the quote. + oneof parsed_quote { + // The date time indicated by the quote. + DateTime date_time = 2; + } +} + +// Message for a date time object. +// e.g. 2018-01-01, 5th August. +message DateTime { + // Time zone of the date time object. + message TimeZone { + // Set only if the offset can be determined. Positive for time ahead of UTC. + // E.g. For "UTC-9", this value is -540. + int32 offset_minutes = 1; + } + + // One or more of the following must be set. + // Must be a valid date or time value. + google.type.Date date = 1; + + // Day of week + google.type.DayOfWeek day_of_week = 2; + + // Time of day + google.type.TimeOfDay time = 3; + + // Time zone + TimeZone time_zone = 4; +} + +// The configuration that controls how the data will change. +message DeidentifyConfig { + oneof transformation { + // Treat the dataset as free-form text and apply the same free text + // transformation everywhere. + InfoTypeTransformations info_type_transformations = 1; + + // Treat the dataset as structured. Transformations can be applied to + // specific locations within structured datasets, such as transforming + // a column within a table. + RecordTransformations record_transformations = 2; + + // Treat the dataset as an image and redact. + ImageTransformations image_transformations = 4; + } + + // Mode for handling transformation errors. If left unspecified, the default + // mode is `TransformationErrorHandling.ThrowError`. + TransformationErrorHandling transformation_error_handling = 3; +} + +// A type of transformation that is applied over images. +message ImageTransformations { + // Configuration for determining how redaction of images should occur. + message ImageTransformation { + // Apply transformation to the selected info_types. + message SelectedInfoTypes { + // Required. InfoTypes to apply the transformation to. Required. Provided InfoType + // must be unique within the ImageTransformations message. + repeated InfoType info_types = 5 [(google.api.field_behavior) = REQUIRED]; + } + + // Apply transformation to all findings. + message AllInfoTypes { + + } + + // Apply to all text. + message AllText { + + } + + oneof target { + // Apply transformation to the selected info_types. + SelectedInfoTypes selected_info_types = 4; + + // Apply transformation to all findings not specified in other + // ImageTransformation's selected_info_types. Only one instance is allowed + // within the ImageTransformations message. + AllInfoTypes all_info_types = 5; + + // Apply transformation to all text that doesn't match an infoType. Only + // one instance is allowed within the ImageTransformations message. + AllText all_text = 6; + } + + // The color to use when redacting content from an image. If not + // specified, the default is black. + Color redaction_color = 3; + } + + repeated ImageTransformation transforms = 2; +} + +// How to handle transformation errors during de-identification. A +// transformation error occurs when the requested transformation is incompatible +// with the data. For example, trying to de-identify an IP address using a +// `DateShift` transformation would result in a transformation error, since date +// info cannot be extracted from an IP address. +// Information about any incompatible transformations, and how they were +// handled, is returned in the response as part of the +// `TransformationOverviews`. +message TransformationErrorHandling { + // Throw an error and fail the request when a transformation error occurs. + message ThrowError { + + } + + // Skips the data without modifying it if the requested transformation would + // cause an error. For example, if a `DateShift` transformation were applied + // an an IP address, this mode would leave the IP address unchanged in the + // response. + message LeaveUntransformed { + + } + + // How transformation errors should be handled. + oneof mode { + // Throw an error + ThrowError throw_error = 1; + + // Ignore errors + LeaveUntransformed leave_untransformed = 2; + } +} + +// A rule for transforming a value. +message PrimitiveTransformation { + oneof transformation { + // Replace with a specified value. + ReplaceValueConfig replace_config = 1; + + // Redact + RedactConfig redact_config = 2; + + // Mask + CharacterMaskConfig character_mask_config = 3; + + // Ffx-Fpe + CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + + // Fixed size bucketing + FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + + // Bucketing + BucketingConfig bucketing_config = 6; + + // Replace with infotype + ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + + // Time extraction + TimePartConfig time_part_config = 8; + + // Crypto + CryptoHashConfig crypto_hash_config = 9; + + // Date Shift + DateShiftConfig date_shift_config = 11; + + // Deterministic Crypto + CryptoDeterministicConfig crypto_deterministic_config = 12; + + // Replace with a value randomly drawn (with replacement) from a dictionary. + ReplaceDictionaryConfig replace_dictionary_config = 13; + } +} + +// For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a +// portion of the value. +message TimePartConfig { + // Components that make up time. + enum TimePart { + // Unused + TIME_PART_UNSPECIFIED = 0; + + // [0-9999] + YEAR = 1; + + // [1-12] + MONTH = 2; + + // [1-31] + DAY_OF_MONTH = 3; + + // [1-7] + DAY_OF_WEEK = 4; + + // [1-53] + WEEK_OF_YEAR = 5; + + // [0-23] + HOUR_OF_DAY = 6; + } + + // The part of the time to keep. + TimePart part_to_extract = 1; +} + +// Pseudonymization method that generates surrogates via cryptographic hashing. +// Uses SHA-256. +// The key size must be either 32 or 64 bytes. +// Outputs a base64 encoded representation of the hashed output +// (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). +// Currently, only string and integer values can be hashed. +// See https://cloud.google.com/dlp/docs/pseudonymization to learn more. +message CryptoHashConfig { + // The key used by the hash function. + CryptoKey crypto_key = 1; +} + +// Pseudonymization method that generates deterministic encryption for the given +// input. Outputs a base64 encoded representation of the encrypted output. +// Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297. +message CryptoDeterministicConfig { + // The key used by the encryption function. For deterministic encryption + // using AES-SIV, the provided key is internally expanded to 64 bytes prior to + // use. + CryptoKey crypto_key = 1; + + // The custom info type to annotate the surrogate with. + // This annotation will be applied to the surrogate by prefixing it with + // the name of the custom info type followed by the number of + // characters comprising the surrogate. The following scheme defines the + // format: {info type name}({surrogate character count}):{surrogate} + // + // For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and + // the surrogate is 'abc', the full replacement value + // will be: 'MY_TOKEN_INFO_TYPE(3):abc' + // + // This annotation identifies the surrogate when inspecting content using the + // custom info type 'Surrogate'. This facilitates reversal of the + // surrogate when it occurs in free text. + // + // Note: For record transformations where the entire cell in a table is being + // transformed, surrogates are not mandatory. Surrogates are used to denote + // the location of the token and are necessary for re-identification in free + // form text. + // + // In order for inspection to work properly, the name of this info type must + // not occur naturally anywhere in your data; otherwise, inspection may either + // + // - reverse a surrogate that does not correspond to an actual identifier + // - be unable to parse the surrogate and result in an error + // + // Therefore, choose your custom info type name carefully after considering + // what your data looks like. One way to select a name that has a high chance + // of yielding reliable detection is to include one or more unicode characters + // that are highly improbable to exist in your data. + // For example, assuming your data is entered from a regular ASCII keyboard, + // the symbol with the hex code point 29DD might be used like so: + // ⧝MY_TOKEN_TYPE. + InfoType surrogate_info_type = 2; + + // A context may be used for higher security and maintaining + // referential integrity such that the same identifier in two different + // contexts will be given a distinct surrogate. The context is appended to + // plaintext value being encrypted. On decryption the provided context is + // validated against the value used during encryption. If a context was + // provided during encryption, same context must be provided during decryption + // as well. + // + // If the context is not set, plaintext would be used as is for encryption. + // If the context is set but: + // + // 1. there is no record present when transforming a given value or + // 2. the field is not present when transforming a given value, + // + // plaintext would be used as is for encryption. + // + // Note that case (1) is expected when an `InfoTypeTransformation` is + // applied to both structured and unstructured `ContentItem`s. + FieldId context = 3; +} + +// Replace each input value with a given `Value`. +message ReplaceValueConfig { + // Value to replace it with. + Value new_value = 1; +} + +// Replace each input value with a value randomly selected from the dictionary. +message ReplaceDictionaryConfig { + oneof type { + // A list of words to select from for random replacement. The + // [limits](https://cloud.google.com/dlp/limits) page contains details about + // the size limits of dictionaries. + CustomInfoType.Dictionary.WordList word_list = 1; + } +} + +// Replace each matching finding with the name of the info_type. +message ReplaceWithInfoTypeConfig { + +} + +// Redact a given value. For example, if used with an `InfoTypeTransformation` +// transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the +// output would be 'My phone number is '. +message RedactConfig { + +} + +// Characters to skip when doing deidentification of a value. These will be left +// alone and skipped. +message CharsToIgnore { + // Convenience enum for indicating common characters to not transform. + enum CommonCharsToIgnore { + // Unused. + COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0; + + // 0-9 + NUMERIC = 1; + + // A-Z + ALPHA_UPPER_CASE = 2; + + // a-z + ALPHA_LOWER_CASE = 3; + + // US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ + PUNCTUATION = 4; + + // Whitespace character, one of [ \t\n\x0B\f\r] + WHITESPACE = 5; + } + + oneof characters { + // Characters to not transform when masking. + string characters_to_skip = 1; + + // Common characters to not transform when masking. Useful to avoid removing + // punctuation. + CommonCharsToIgnore common_characters_to_ignore = 2; + } +} + +// Partially mask a string by replacing a given number of characters with a +// fixed character. Masking can start from the beginning or end of the string. +// This can be used on data of any type (numbers, longs, and so on) and when +// de-identifying structured data we'll attempt to preserve the original data's +// type. (This allows you to take a long like 123 and modify it to a string like +// **3. +message CharacterMaskConfig { + // Character to use to mask the sensitive values—for example, `*` for an + // alphabetic string such as a name, or `0` for a numeric string such as ZIP + // code or credit card number. This string must have a length of 1. If not + // supplied, this value defaults to `*` for strings, and `0` for digits. + string masking_character = 1; + + // Number of characters to mask. If not set, all matching chars will be + // masked. Skipped characters do not count towards this tally. + // + // If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP + // masks all but a number of characters. + // For example, suppose you have the following values: + // + // - `masking_character` is `*` + // - `number_to_mask` is `-4` + // - `reverse_order` is `false` + // - `CharsToIgnore` includes `-` + // - Input string is `1234-5678-9012-3456` + // + // The resulting de-identified string is + // `****-****-****-3456`. Cloud DLP masks all but the last four characters. + // If `reverse_order` is `true`, all but the first four characters are masked + // as `1234-****-****-****`. + int32 number_to_mask = 2; + + // Mask characters in reverse order. For example, if `masking_character` is + // `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the + // input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. + // If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` + // is `true`, then the string `12345` is masked as `12***`. + bool reverse_order = 3; + + // When masking a string, items in this list will be skipped when replacing + // characters. For example, if the input string is `555-555-5555` and you + // instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP + // returns `***-**5-5555`. + repeated CharsToIgnore characters_to_ignore = 4; +} + +// Buckets values based on fixed size ranges. The +// Bucketing transformation can provide all of this functionality, +// but requires more configuration. This message is provided as a convenience to +// the user for simple bucketing strategies. +// +// The transformed value will be a hyphenated string of +// {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and upper_bound +// = 20, all values that are within this bucket will be replaced with "10-20". +// +// This can be used on data of type: double, long. +// +// If the bound Value type differs from the type of data +// being transformed, we will first attempt converting the type of the data to +// be transformed to match the type of the bound before comparing. +// +// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. +message FixedSizeBucketingConfig { + // Required. Lower bound value of buckets. All values less than `lower_bound` are + // grouped together into a single bucket; for example if `lower_bound` = 10, + // then all values less than 10 are replaced with the value "-10". + Value lower_bound = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Upper bound value of buckets. All values greater than upper_bound are + // grouped together into a single bucket; for example if `upper_bound` = 89, + // then all values greater than 89 are replaced with the value "89+". + Value upper_bound = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Size of each bucket (except for minimum and maximum buckets). So if + // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the + // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, + // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. + double bucket_size = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Generalization function that buckets values based on ranges. The ranges and +// replacement values are dynamically provided by the user for custom behavior, +// such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH +// This can be used on +// data of type: number, long, string, timestamp. +// If the bound `Value` type differs from the type of data being transformed, we +// will first attempt converting the type of the data to be transformed to match +// the type of the bound before comparing. +// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. +message BucketingConfig { + // Bucket is represented as a range, along with replacement values. + message Bucket { + // Lower bound of the range, inclusive. Type should be the same as max if + // used. + Value min = 1; + + // Upper bound of the range, exclusive; type must match min. + Value max = 2; + + // Required. Replacement value for this bucket. + Value replacement_value = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Set of buckets. Ranges must be non-overlapping. + repeated Bucket buckets = 1; +} + +// Replaces an identifier with a surrogate using Format Preserving Encryption +// (FPE) with the FFX mode of operation; however when used in the +// `ReidentifyContent` API method, it serves the opposite function by reversing +// the surrogate back into the original identifier. The identifier must be +// encoded as ASCII. For a given crypto key and context, the same identifier +// will be replaced with the same surrogate. Identifiers must be at least two +// characters long. In the case that the identifier is the empty string, it will +// be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn +// more. +// +// Note: We recommend using CryptoDeterministicConfig for all use cases which +// do not require preserving the input alphabet space and size, plus warrant +// referential integrity. +message CryptoReplaceFfxFpeConfig { + // These are commonly used subsets of the alphabet that the FFX mode + // natively supports. In the algorithm, the alphabet is selected using + // the "radix". Therefore each corresponds to a particular radix. + enum FfxCommonNativeAlphabet { + // Unused. + FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; + + // `[0-9]` (radix of 10) + NUMERIC = 1; + + // `[0-9A-F]` (radix of 16) + HEXADECIMAL = 2; + + // `[0-9A-Z]` (radix of 36) + UPPER_CASE_ALPHA_NUMERIC = 3; + + // `[0-9A-Za-z]` (radix of 62) + ALPHA_NUMERIC = 4; + } + + // Required. The key used by the encryption algorithm. + CryptoKey crypto_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // The 'tweak', a context may be used for higher security since the same + // identifier in two different contexts won't be given the same surrogate. If + // the context is not set, a default tweak will be used. + // + // If the context is set but: + // + // 1. there is no record present when transforming a given value or + // 1. the field is not present when transforming a given value, + // + // a default tweak will be used. + // + // Note that case (1) is expected when an `InfoTypeTransformation` is + // applied to both structured and unstructured `ContentItem`s. + // Currently, the referenced field may be of value type integer or string. + // + // The tweak is constructed as a sequence of bytes in big endian byte order + // such that: + // + // - a 64 bit integer is encoded followed by a single byte of value 1 + // - a string is encoded in UTF-8 format followed by a single byte of value 2 + FieldId context = 2; + + // Choose an alphabet which the data being transformed will be made up of. + oneof alphabet { + // Common alphabets. + FfxCommonNativeAlphabet common_alphabet = 4; + + // This is supported by mapping these to the alphanumeric characters + // that the FFX mode natively supports. This happens before/after + // encryption/decryption. + // Each character listed must appear only once. + // Number of characters must be in the range [2, 95]. + // This must be encoded as ASCII. + // The order of characters does not matter. + // The full list of allowed characters is: + // 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz + // ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/ + string custom_alphabet = 5; + + // The native way to select the alphabet. Must be in the range [2, 95]. + int32 radix = 6; + } + + // The custom infoType to annotate the surrogate with. + // This annotation will be applied to the surrogate by prefixing it with + // the name of the custom infoType followed by the number of + // characters comprising the surrogate. The following scheme defines the + // format: info_type_name(surrogate_character_count):surrogate + // + // For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and + // the surrogate is 'abc', the full replacement value + // will be: 'MY_TOKEN_INFO_TYPE(3):abc' + // + // This annotation identifies the surrogate when inspecting content using the + // custom infoType + // [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). + // This facilitates reversal of the surrogate when it occurs in free text. + // + // In order for inspection to work properly, the name of this infoType must + // not occur naturally anywhere in your data; otherwise, inspection may + // find a surrogate that does not correspond to an actual identifier. + // Therefore, choose your custom infoType name carefully after considering + // what your data looks like. One way to select a name that has a high chance + // of yielding reliable detection is to include one or more unicode characters + // that are highly improbable to exist in your data. + // For example, assuming your data is entered from a regular ASCII keyboard, + // the symbol with the hex code point 29DD might be used like so: + // ⧝MY_TOKEN_TYPE + InfoType surrogate_info_type = 8; +} + +// This is a data encryption key (DEK) (as opposed to +// a key encryption key (KEK) stored by Cloud Key Management Service +// (Cloud KMS). +// When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate +// IAM policy on the KEK to ensure an attacker cannot +// unwrap the DEK. +message CryptoKey { + // Sources of crypto keys. + oneof source { + // Transient crypto key + TransientCryptoKey transient = 1; + + // Unwrapped crypto key + UnwrappedCryptoKey unwrapped = 2; + + // Key wrapped using Cloud KMS + KmsWrappedCryptoKey kms_wrapped = 3; + } +} + +// Use this to have a random data crypto key generated. +// It will be discarded after the request finishes. +message TransientCryptoKey { + // Required. Name of the key. + // This is an arbitrary string used to differentiate different keys. + // A unique key is generated per name: two separate `TransientCryptoKey` + // protos share the same generated key if their names are the same. + // When the data crypto key is generated, this name is not used in any way + // (repeating the api call will result in a different key being generated). + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Using raw keys is prone to security risks due to accidentally +// leaking the key. Choose another type of key if possible. +message UnwrappedCryptoKey { + // Required. A 128/192/256 bit key. + bytes key = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Include to use an existing data crypto key wrapped by KMS. +// The wrapped key must be a 128-, 192-, or 256-bit key. +// Authorization requires the following IAM permissions when sending a request +// to perform a crypto transformation using a KMS-wrapped crypto key: +// dlp.kms.encrypt +// +// For more information, see [Creating a wrapped key] +// (https://cloud.google.com/dlp/docs/create-wrapped-key). +// +// Note: When you use Cloud KMS for cryptographic operations, +// [charges apply](https://cloud.google.com/kms/pricing). +message KmsWrappedCryptoKey { + // Required. The wrapped data crypto key. + bytes wrapped_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the KMS CryptoKey to use for unwrapping. + string crypto_key_name = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Shifts dates by random number of days, with option to be consistent for the +// same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting +// to learn more. +message DateShiftConfig { + // Required. Range of shift in days. Actual shift will be selected at random within this + // range (inclusive ends). Negative means shift to earlier in time. Must not + // be more than 365250 days (1000 years) each direction. + // + // For example, 3 means shift date to at most 3 days into the future. + int32 upper_bound_days = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. For example, -5 means shift date to at most 5 days back in the past. + int32 lower_bound_days = 2 [(google.api.field_behavior) = REQUIRED]; + + // Points to the field that contains the context, for example, an entity id. + // If set, must also set cryptoKey. If set, shift will be consistent for the + // given context. + FieldId context = 3; + + // Method for calculating shift that takes context into consideration. If + // set, must also set context. Can only be applied to table items. + oneof method { + // Causes the shift to be computed based on this key and the context. This + // results in the same shift for the same context and crypto_key. If + // set, must also set context. Can only be applied to table items. + CryptoKey crypto_key = 4; + } +} + +// A type of transformation that will scan unstructured text and +// apply various `PrimitiveTransformation`s to each finding, where the +// transformation is applied to only values that were identified as a specific +// info_type. +message InfoTypeTransformations { + // A transformation to apply to text that is identified as a specific + // info_type. + message InfoTypeTransformation { + // InfoTypes to apply the transformation to. An empty list will cause + // this transformation to apply to all findings that correspond to + // infoTypes that were requested in `InspectConfig`. + repeated InfoType info_types = 1; + + // Required. Primitive transformation to apply to the infoType. + PrimitiveTransformation primitive_transformation = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Transformation for each infoType. Cannot specify more than one + // for a given infoType. + repeated InfoTypeTransformation transformations = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The transformation to apply to the field. +message FieldTransformation { + // Required. Input field(s) to apply the transformation to. + // When you have columns that reference their position within a list, + // omit the index from the FieldId. FieldId name matching ignores the index. + // For example, instead of "contact.nums[0].type", use "contact.nums.type". + repeated FieldId fields = 1 [(google.api.field_behavior) = REQUIRED]; + + // Only apply the transformation if the condition evaluates to true for the + // given `RecordCondition`. The conditions are allowed to reference fields + // that are not used in the actual transformation. + // + // Example Use Cases: + // + // - Apply a different bucket transformation to an age column if the zip code + // column for the same record is within a specific range. + // - Redact a field if the date of birth field is greater than 85. + RecordCondition condition = 3; + + // Transformation to apply. [required] + oneof transformation { + // Apply the transformation to the entire field. + PrimitiveTransformation primitive_transformation = 4; + + // Treat the contents of the field as free text, and selectively + // transform content that matches an `InfoType`. + InfoTypeTransformations info_type_transformations = 5; + } +} + +// A type of transformation that is applied over structured data such as a +// table. +message RecordTransformations { + // Transform the record by applying various field transformations. + repeated FieldTransformation field_transformations = 1; + + // Configuration defining which records get suppressed entirely. Records that + // match any suppression rule are omitted from the output. + repeated RecordSuppression record_suppressions = 2; +} + +// Configuration to suppress records whose suppression conditions evaluate to +// true. +message RecordSuppression { + // A condition that when it evaluates to true will result in the record being + // evaluated to be suppressed from the transformed content. + RecordCondition condition = 1; +} + +// A condition for determining whether a transformation should be applied to +// a field. +message RecordCondition { + // The field type of `value` and `field` do not need to match to be + // considered equal, but not all comparisons are possible. + // EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types, + // but all other comparisons are invalid with incompatible types. + // A `value` of type: + // + // - `string` can be compared against all other types + // - `boolean` can only be compared against other booleans + // - `integer` can be compared against doubles or a string if the string value + // can be parsed as an integer. + // - `double` can be compared against integers or a string if the string can + // be parsed as a double. + // - `Timestamp` can be compared against strings in RFC 3339 date string + // format. + // - `TimeOfDay` can be compared against timestamps and strings in the format + // of 'HH:mm:ss'. + // + // If we fail to compare do to type mismatch, a warning will be given and + // the condition will evaluate to false. + message Condition { + // Required. Field within the record this condition is evaluated against. + FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Operator used to compare the field or infoType to the value. + RelationalOperator operator = 3 [(google.api.field_behavior) = REQUIRED]; + + // Value to compare against. [Mandatory, except for `EXISTS` tests.] + Value value = 4; + } + + // A collection of conditions. + message Conditions { + // A collection of conditions. + repeated Condition conditions = 1; + } + + // An expression, consisting of an operator and conditions. + message Expressions { + // Logical operators for conditional checks. + enum LogicalOperator { + // Unused + LOGICAL_OPERATOR_UNSPECIFIED = 0; + + // Conditional AND + AND = 1; + } + + // The operator to apply to the result of conditions. Default and currently + // only supported value is `AND`. + LogicalOperator logical_operator = 1; + + // Expression types. + oneof type { + // Conditions to apply to the expression. + Conditions conditions = 3; + } + } + + // An expression. + Expressions expressions = 3; +} + +// Overview of the modifications that occurred. +message TransformationOverview { + // Total size in bytes that were transformed in some way. + int64 transformed_bytes = 2; + + // Transformations applied to the dataset. + repeated TransformationSummary transformation_summaries = 3; +} + +// Summary of a single transformation. +// Only one of 'transformation', 'field_transformation', or 'record_suppress' +// will be set. +message TransformationSummary { + // Possible outcomes of transformations. + enum TransformationResultCode { + // Unused + TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; + + // Transformation completed without an error. + SUCCESS = 1; + + // Transformation had an error. + ERROR = 2; + } + + // A collection that informs the user the number of times a particular + // `TransformationResultCode` and error details occurred. + message SummaryResult { + // Number of transformations counted by this result. + int64 count = 1; + + // Outcome of the transformation. + TransformationResultCode code = 2; + + // A place for warnings or errors to show up if a transformation didn't + // work as expected. + string details = 3; + } + + // Set if the transformation was limited to a specific InfoType. + InfoType info_type = 1; + + // Set if the transformation was limited to a specific FieldId. + FieldId field = 2; + + // The specific transformation these stats apply to. + PrimitiveTransformation transformation = 3; + + // The field transformation that was applied. + // If multiple field transformations are requested for a single field, + // this list will contain all of them; otherwise, only one is supplied. + repeated FieldTransformation field_transformations = 5; + + // The specific suppression option these stats apply to. + RecordSuppression record_suppress = 6; + + // Collection of all transformations that took place or had an error. + repeated SummaryResult results = 4; + + // Total size in bytes that were transformed in some way. + int64 transformed_bytes = 7; +} + +// A flattened description of a `PrimitiveTransformation` or +// `RecordSuppression`. +message TransformationDescription { + // The transformation type. + TransformationType type = 1; + + // A description of the transformation. This is empty for a + // RECORD_SUPPRESSION, or is the output of calling toString() on the + // `PrimitiveTransformation` protocol buffer message for any other type of + // transformation. + string description = 2; + + // A human-readable string representation of the `RecordCondition` + // corresponding to this transformation. Set if a `RecordCondition` was used + // to determine whether or not to apply this transformation. + // + // Examples: + // * (age_field > 85) + // * (age_field <= 18) + // * (zip_field exists) + // * (zip_field == 01234) && (city_field != "Springville") + // * (zip_field == 01234) && (age_field <= 18) && (city_field exists) + string condition = 3; + + // Set if the transformation was limited to a specific `InfoType`. + InfoType info_type = 4; +} + +// Details about a single transformation. This object contains a description of +// the transformation, information about whether the transformation was +// successfully applied, and the precise location where the transformation +// occurred. These details are stored in a user-specified BigQuery table. +message TransformationDetails { + // The name of the job that completed the transformation. + string resource_name = 1; + + // The top level name of the container where the transformation is located + // (this will be the source file name or table name). + string container_name = 2; + + // Description of transformation. This would only contain more than one + // element if there were multiple matching transformations and which one to + // apply was ambiguous. Not set for states that contain no transformation, + // currently only state that contains no transformation is + // TransformationResultStateType.METADATA_UNRETRIEVABLE. + repeated TransformationDescription transformation = 3; + + // Status of the transformation, if transformation was not successful, this + // will specify what caused it to fail, otherwise it will show that the + // transformation was successful. + TransformationResultStatus status_details = 4; + + // The number of bytes that were transformed. If transformation was + // unsuccessful or did not take place because there was no content to + // transform, this will be zero. + int64 transformed_bytes = 5; + + // The precise location of the transformed content in the original container. + TransformationLocation transformation_location = 6; +} + +// Specifies the location of a transformation. +message TransformationLocation { + oneof location_type { + // For infotype transformations, link to the corresponding findings ID so + // that location information does not need to be duplicated. Each findings + // ID correlates to an entry in the findings output table, this table only + // gets created when users specify to save findings (add the save findings + // action to the request). + string finding_id = 1; + + // For record transformations, provide a field and container information. + RecordTransformation record_transformation = 2; + } + + // Information about the functionality of the container where this finding + // occurred, if available. + TransformationContainerType container_type = 3; +} + +message RecordTransformation { + // For record transformations, provide a field. + FieldId field_id = 1; + + // Findings container modification timestamp, if applicable. + google.protobuf.Timestamp container_timestamp = 2; + + // Container version, if available ("generation" for Cloud Storage). + string container_version = 3; +} + +message TransformationResultStatus { + // Transformation result status type, this will be either SUCCESS, or it will + // be the reason for why the transformation was not completely successful. + TransformationResultStatusType result_status_type = 1; + + // Detailed error codes and messages + google.rpc.Status details = 2; +} + +// Enum of possible outcomes of transformations. SUCCESS if transformation and +// storing of transformation was successful, otherwise, reason for not +// transforming. +enum TransformationResultStatusType { + STATE_TYPE_UNSPECIFIED = 0; + + // This will be set when a finding could not be transformed (i.e. outside user + // set bucket range). + INVALID_TRANSFORM = 1; + + // This will be set when a BigQuery transformation was successful but could + // not be stored back in BigQuery because the transformed row exceeds + // BigQuery's max row size. + BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2; + + // This will be set when there is a finding in the custom metadata of a file, + // but at the write time of the transformed file, this key / value pair is + // unretrievable. + METADATA_UNRETRIEVABLE = 3; + + // This will be set when the transformation and storing of it is successful. + SUCCESS = 4; +} + +// Describes functionality of a given container in its original format. +enum TransformationContainerType { + TRANSFORM_UNKNOWN_CONTAINER = 0; + + TRANSFORM_BODY = 1; + + TRANSFORM_METADATA = 2; + + TRANSFORM_TABLE = 3; +} + +// An enum of rules that can be used to transform a value. Can be a +// record suppression, or one of the transformation rules specified under +// `PrimitiveTransformation`. +enum TransformationType { + // Unused + TRANSFORMATION_TYPE_UNSPECIFIED = 0; + + // Record suppression + RECORD_SUPPRESSION = 1; + + // Replace value + REPLACE_VALUE = 2; + + // Replace value using a dictionary. + REPLACE_DICTIONARY = 15; + + // Redact + REDACT = 3; + + // Character mask + CHARACTER_MASK = 4; + + // FFX-FPE + CRYPTO_REPLACE_FFX_FPE = 5; + + // Fixed size bucketing + FIXED_SIZE_BUCKETING = 6; + + // Bucketing + BUCKETING = 7; + + // Replace with info type + REPLACE_WITH_INFO_TYPE = 8; + + // Time part + TIME_PART = 9; + + // Crypto hash + CRYPTO_HASH = 10; + + // Date shift + DATE_SHIFT = 12; + + // Deterministic crypto + CRYPTO_DETERMINISTIC_CONFIG = 13; + + // Redact image + REDACT_IMAGE = 14; +} + +// Config for storing transformation details. +message TransformationDetailsStorageConfig { + // Location to store the transformation summary. + oneof type { + // The BigQuery table in which to store the output. This may be an existing + // table or in a new table in an existing dataset. + // If table_id is not set a new one will be generated for you with the + // following format: + // dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific + // time zone will be used for generating the date details. + BigQueryTable table = 1; + } +} + +// Schedule for inspect job triggers. +message Schedule { + oneof option { + // With this option a job is started on a regular periodic basis. For + // example: every day (86400 seconds). + // + // A scheduled start time will be skipped if the previous + // execution has not ended when its scheduled time occurs. + // + // This value must be set to a time duration greater than or equal + // to 1 day and can be no longer than 60 days. + google.protobuf.Duration recurrence_period_duration = 1; + } +} + +// Job trigger option for hybrid jobs. Jobs must be manually created +// and finished. +message Manual { + +} + +// The inspectTemplate contains a configuration (set of types of sensitive data +// to be detected) to be used anywhere you otherwise would normally specify +// InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates +// to learn more. +message InspectTemplate { + option (google.api.resource) = { + type: "dlp.googleapis.com/InspectTemplate" + pattern: "organizations/{organization}/inspectTemplates/{inspect_template}" + pattern: "projects/{project}/inspectTemplates/{inspect_template}" + pattern: "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}" + pattern: "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}" + }; + + // Output only. The template name. + // + // The template will have one of the following formats: + // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR + // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Display name (max 256 chars). + string display_name = 2; + + // Short description (max 256 chars). + string description = 3; + + // Output only. The creation timestamp of an inspectTemplate. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of an inspectTemplate. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The core content of the template. Configuration of the scanning process. + InspectConfig inspect_config = 6; +} + +// DeidentifyTemplates contains instructions on how to de-identify content. +// See https://cloud.google.com/dlp/docs/concepts-templates to learn more. +message DeidentifyTemplate { + option (google.api.resource) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + pattern: "organizations/{organization}/deidentifyTemplates/{deidentify_template}" + pattern: "projects/{project}/deidentifyTemplates/{deidentify_template}" + pattern: "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}" + pattern: "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}" + }; + + // Output only. The template name. + // + // The template will have one of the following formats: + // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR + // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Display name (max 256 chars). + string display_name = 2; + + // Short description (max 256 chars). + string description = 3; + + // Output only. The creation timestamp of an inspectTemplate. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of an inspectTemplate. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The core content of the template. + DeidentifyConfig deidentify_config = 6; +} + +// Details information about an error encountered during job execution or +// the results of an unsuccessful activation of the JobTrigger. +message Error { + // Detailed error codes and messages. + google.rpc.Status details = 1; + + // The times the error occurred. + repeated google.protobuf.Timestamp timestamps = 2; +} + +// Contains a configuration to make dlp api calls on a repeating basis. +// See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more. +message JobTrigger { + option (google.api.resource) = { + type: "dlp.googleapis.com/JobTrigger" + pattern: "projects/{project}/jobTriggers/{job_trigger}" + pattern: "projects/{project}/locations/{location}/jobTriggers/{job_trigger}" + }; + + // What event needs to occur for a new job to be started. + message Trigger { + oneof trigger { + // Create a job on a repeating basis based on the elapse of time. + Schedule schedule = 1; + + // For use with hybrid jobs. Jobs must be manually created and finished. + Manual manual = 2; + } + } + + // Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs + // will be created with this configuration. The service may automatically + // pause triggers experiencing frequent errors. To restart a job, set the + // status to HEALTHY after correcting user errors. + enum Status { + // Unused. + STATUS_UNSPECIFIED = 0; + + // Trigger is healthy. + HEALTHY = 1; + + // Trigger is temporarily paused. + PAUSED = 2; + + // Trigger is cancelled and can not be resumed. + CANCELLED = 3; + } + + // Unique resource name for the triggeredJob, assigned by the service when the + // triggeredJob is created, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1; + + // Display name (max 100 chars) + string display_name = 2; + + // User provided description (max 256 chars) + string description = 3; + + // The configuration details for the specific type of job to run. + oneof job { + // For inspect jobs, a snapshot of the configuration. + InspectJobConfig inspect_job = 4; + } + + // A list of triggers which will be OR'ed together. Only one in the list + // needs to trigger for a job to be started. The list may contain only + // a single Schedule trigger and must have at least one object. + repeated Trigger triggers = 5; + + // Output only. A stream of errors encountered when the trigger was activated. Repeated + // errors may result in the JobTrigger automatically being paused. + // Will return the last 100 errors. Whenever the JobTrigger is modified + // this list will be cleared. + repeated Error errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The creation timestamp of a triggeredJob. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of a triggeredJob. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of the last time this trigger executed. + google.protobuf.Timestamp last_run_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. A status for this trigger. + Status status = 10 [(google.api.field_behavior) = REQUIRED]; +} + +// A task to execute on the completion of a job. +// See https://cloud.google.com/dlp/docs/concepts-actions to learn more. +message Action { + // If set, the detailed findings will be persisted to the specified + // OutputStorageConfig. Only a single instance of this action can be + // specified. + // Compatible with: Inspect, Risk + message SaveFindings { + // Location to store findings outside of DLP. + OutputStorageConfig output_config = 1; + } + + // Publish a message into a given Pub/Sub topic when DlpJob has completed. The + // message contains a single field, `DlpJobName`, which is equal to the + // finished job's + // [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob). + // Compatible with: Inspect, Risk + message PublishToPubSub { + // Cloud Pub/Sub topic to send notifications to. The topic must have given + // publishing access rights to the DLP API service account executing + // the long running DlpJob sending the notifications. + // Format is projects/{project}/topics/{topic}. + string topic = 1; + } + + // Publish the result summary of a DlpJob to the Cloud Security + // Command Center (CSCC Alpha). + // This action is only available for projects which are parts of + // an organization and whitelisted for the alpha Cloud Security Command + // Center. + // The action will publish the count of finding instances and their info + // types. The summary of findings will be persisted in CSCC and are governed + // by CSCC service-specific policy, see + // https://cloud.google.com/terms/service-terms Only a single instance of this + // action can be specified. Compatible with: Inspect + message PublishSummaryToCscc { + + } + + // Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag + // templates are applied to the resource that Cloud DLP scanned. Data + // Catalog tag templates are stored in the same project and region where the + // BigQuery table exists. For Cloud DLP to create and apply the tag template, + // the Cloud DLP service agent must have the + // `roles/datacatalog.tagTemplateOwner` permission on the project. The tag + // template contains fields summarizing the results of the DlpJob. Any field + // values previously written by another DlpJob are deleted. [InfoType naming + // patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using + // this feature. + // + // Findings are persisted in Data Catalog storage and are governed by + // service-specific policies for Data Catalog. For more information, see + // [Service Specific Terms](https://cloud.google.com/terms/service-terms). + // + // Only a single instance of this action can be specified. This action is + // allowed only if all resources being scanned are BigQuery tables. + // Compatible with: Inspect + message PublishFindingsToCloudDataCatalog { + + } + + // Create a de-identified copy of the requested table or files. + // + // A TransformationDetail will be created for each transformation. + // + // If any rows in BigQuery are skipped during de-identification + // (transformation errors or row size exceeds BigQuery insert API limits) they + // are placed in the failure output table. If the original row exceeds + // the BigQuery insert API limit it will be truncated when written to the + // failure output table. The failure output table can be set in the + // action.deidentify.output.big_query_output.deidentified_failure_output_table + // field, if no table is set, a table will be automatically created in the + // same project and dataset as the original table. + // + // Compatible with: Inspect + message Deidentify { + // User specified deidentify templates and configs for structured, + // unstructured, and image files. + TransformationConfig transformation_config = 7; + + // Config for storing transformation details. This is separate from the + // de-identified content, and contains metadata about the successful + // transformations and/or failures that occurred while de-identifying. This + // needs to be set in order for users to access information about the status + // of each transformation (see + // [TransformationDetails][google.privacy.dlp.v2.TransformationDetails] + // message for more information about what is noted). + TransformationDetailsStorageConfig transformation_details_storage_config = 3; + + oneof output { + // Required. User settable Cloud Storage bucket and folders to store de-identified + // files. This field must be set for cloud storage deidentification. The + // output Cloud Storage bucket must be different from the input bucket. + // De-identified files will overwrite files in the output path. + // + // Form of: gs://bucket/folder/ or gs://bucket + string cloud_storage_output = 9 [(google.api.field_behavior) = REQUIRED]; + } + + // List of user-specified file type groups to transform. If specified, only + // the files with these filetypes will be transformed. If empty, all + // supported files will be transformed. Supported types may be automatically + // added over time. If a file type is set in this field that isn't supported + // by the Deidentify action then the job will fail and will not be + // successfully created/started. Currently the only filetypes supported are: + // IMAGES, TEXT_FILES, CSV, TSV. + repeated FileType file_types_to_transform = 8; + } + + // Sends an email when the job completes. The email goes to IAM project owners + // and technical [Essential + // Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts). + message JobNotificationEmails { + + } + + // Enable Stackdriver metric dlp.googleapis.com/finding_count. This + // will publish a metric to stack driver on each infotype requested and + // how many findings were found for it. CustomDetectors will be bucketed + // as 'Custom' under the Stackdriver label 'info_type'. + message PublishToStackdriver { + + } + + oneof action { + // Save resulting findings in a provided location. + SaveFindings save_findings = 1; + + // Publish a notification to a Pub/Sub topic. + PublishToPubSub pub_sub = 2; + + // Publish summary to Cloud Security Command Center (Alpha). + PublishSummaryToCscc publish_summary_to_cscc = 3; + + // Publish findings to Cloud Datahub. + PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + + // Create a de-identified copy of the input data. + Deidentify deidentify = 7; + + // Enable email notification for project owners and editors on job's + // completion/failure. + JobNotificationEmails job_notification_emails = 8; + + // Enable Stackdriver metric dlp.googleapis.com/finding_count. + PublishToStackdriver publish_to_stackdriver = 9; + } +} + +// User specified templates and configs for how to deidentify structured, +// unstructures, and image files. User must provide either a unstructured +// deidentify template or at least one redact image config. +message TransformationConfig { + // De-identify template. + // If this template is specified, it will serve as the default de-identify + // template. This template cannot contain `record_transformations` since it + // can be used for unstructured content such as free-form text files. If this + // template is not set, a default `ReplaceWithInfoTypeConfig` will be used to + // de-identify unstructured content. + string deidentify_template = 1; + + // Structured de-identify template. + // If this template is specified, it will serve as the de-identify template + // for structured content such as delimited files and tables. If this template + // is not set but the `deidentify_template` is set, then `deidentify_template` + // will also apply to the structured content. If neither template is set, a + // default `ReplaceWithInfoTypeConfig` will be used to de-identify structured + // content. + string structured_deidentify_template = 2; + + // Image redact template. + // If this template is specified, it will serve as the de-identify template + // for images. If this template is not set, all findings in the image will be + // redacted with a black box. + string image_redact_template = 4; +} + +// Request message for CreateInspectTemplate. +message CreateInspectTemplateRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + Organizations scope, location specified:
+ // `organizations/`ORG_ID`/locations/`LOCATION_ID + // + Organizations scope, no location specified (defaults to global):
+ // `organizations/`ORG_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/InspectTemplate" + } + ]; + + // Required. The InspectTemplate to create. + InspectTemplate inspect_template = 2 [(google.api.field_behavior) = REQUIRED]; + + // The template id can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string template_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; +} + +// Request message for UpdateInspectTemplate. +message UpdateInspectTemplateRequest { + // Required. Resource name of organization and inspectTemplate to be updated, for + // example `organizations/433245324/inspectTemplates/432452342` or + // projects/project-id/inspectTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/InspectTemplate" + } + ]; + + // New InspectTemplate value. + InspectTemplate inspect_template = 2; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetInspectTemplate. +message GetInspectTemplateRequest { + // Required. Resource name of the organization and inspectTemplate to be read, for + // example `organizations/433245324/inspectTemplates/432452342` or + // projects/project-id/inspectTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/InspectTemplate" + } + ]; +} + +// Request message for ListInspectTemplates. +message ListInspectTemplatesRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + Organizations scope, location specified:
+ // `organizations/`ORG_ID`/locations/`LOCATION_ID + // + Organizations scope, no location specified (defaults to global):
+ // `organizations/`ORG_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/InspectTemplate" + } + ]; + + // Page token to continue retrieval. Comes from previous call + // to `ListInspectTemplates`. + string page_token = 2; + + // Size of the page, can be limited by the server. If zero server returns + // a page of max size 100. + int32 page_size = 3; + + // Comma separated list of fields to order by, + // followed by `asc` or `desc` postfix. This list is case-insensitive, + // default sorting order is ascending, redundant space characters are + // insignificant. + // + // Example: `name asc,update_time, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the template was created. + // - `update_time`: corresponds to the time the template was last updated. + // - `name`: corresponds to the template's name. + // - `display_name`: corresponds to the template's display name. + string order_by = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Response message for ListInspectTemplates. +message ListInspectTemplatesResponse { + // List of inspectTemplates, up to page_size in ListInspectTemplatesRequest. + repeated InspectTemplate inspect_templates = 1; + + // If the next page is available then the next page token to be used + // in following ListInspectTemplates request. + string next_page_token = 2; +} + +// Request message for DeleteInspectTemplate. +message DeleteInspectTemplateRequest { + // Required. Resource name of the organization and inspectTemplate to be deleted, for + // example `organizations/433245324/inspectTemplates/432452342` or + // projects/project-id/inspectTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/InspectTemplate" + } + ]; +} + +// Request message for CreateJobTrigger. +message CreateJobTriggerRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/JobTrigger" + } + ]; + + // Required. The JobTrigger to create. + JobTrigger job_trigger = 2 [(google.api.field_behavior) = REQUIRED]; + + // The trigger id can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string trigger_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; +} + +// Request message for ActivateJobTrigger. +message ActivateJobTriggerRequest { + // Required. Resource name of the trigger to activate, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/JobTrigger" + } + ]; +} + +// Request message for UpdateJobTrigger. +message UpdateJobTriggerRequest { + // Required. Resource name of the project and the triggeredJob, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/JobTrigger" + } + ]; + + // New JobTrigger value. + JobTrigger job_trigger = 2; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetJobTrigger. +message GetJobTriggerRequest { + // Required. Resource name of the project and the triggeredJob, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/JobTrigger" + } + ]; +} + +// Request message for CreateDlpJobRequest. Used to initiate long running +// jobs such as calculating risk metrics or inspecting Google Cloud +// Storage. +message CreateDlpJobRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpJob" + } + ]; + + // The configuration details for the specific type of job to run. + oneof job { + // An inspection job scans a storage repository for InfoTypes. + InspectJobConfig inspect_job = 2; + + // A risk analysis job calculates re-identification risk metrics for a + // BigQuery table. + RiskAnalysisJobConfig risk_job = 3; + } + + // The job id can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string job_id = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Request message for ListJobTriggers. +message ListJobTriggersRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/JobTrigger" + } + ]; + + // Page token to continue retrieval. Comes from previous call + // to ListJobTriggers. `order_by` field must not + // change for subsequent calls. + string page_token = 2; + + // Size of the page, can be limited by a server. + int32 page_size = 3; + + // Comma separated list of triggeredJob fields to order by, + // followed by `asc` or `desc` postfix. This list is case-insensitive, + // default sorting order is ascending, redundant space characters are + // insignificant. + // + // Example: `name asc,update_time, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the JobTrigger was created. + // - `update_time`: corresponds to the time the JobTrigger was last updated. + // - `last_run_time`: corresponds to the last time the JobTrigger ran. + // - `name`: corresponds to the JobTrigger's name. + // - `display_name`: corresponds to the JobTrigger's display name. + // - `status`: corresponds to JobTrigger's status. + string order_by = 4; + + // Allows filtering. + // + // Supported syntax: + // + // * Filter expressions are made up of one or more restrictions. + // * Restrictions can be combined by `AND` or `OR` logical operators. A + // sequence of restrictions implicitly uses `AND`. + // * A restriction has the form of `{field} {operator} {value}`. + // * Supported fields/values for inspect triggers: + // - `status` - HEALTHY|PAUSED|CANCELLED + // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + // - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + // quotation marks. Nanoseconds are ignored. + // - 'error_count' - Number of errors that have occurred while running. + // * The operator must be `=` or `!=` for status and inspected_storage. + // + // Examples: + // + // * inspected_storage = cloud_storage AND status = HEALTHY + // * inspected_storage = cloud_storage OR inspected_storage = bigquery + // * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + // * last_run_time > \"2017-12-12T00:00:00+00:00\" + // + // The length of this field should be no more than 500 characters. + string filter = 5; + + // The type of jobs. Will use `DlpJobType.INSPECT` if not set. + DlpJobType type = 6; + + // Deprecated. This field has no effect. + string location_id = 7; +} + +// Response message for ListJobTriggers. +message ListJobTriggersResponse { + // List of triggeredJobs, up to page_size in ListJobTriggersRequest. + repeated JobTrigger job_triggers = 1; + + // If the next page is available then the next page token to be used + // in following ListJobTriggers request. + string next_page_token = 2; +} + +// Request message for DeleteJobTrigger. +message DeleteJobTriggerRequest { + // Required. Resource name of the project and the triggeredJob, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/JobTrigger" + } + ]; +} + +// Controls what and how to inspect for findings. +message InspectJobConfig { + // The data to scan. + StorageConfig storage_config = 1; + + // How and what to scan for. + InspectConfig inspect_config = 2; + + // If provided, will be used as the default for all values in InspectConfig. + // `inspect_config` will be merged into the values persisted as part of the + // template. + string inspect_template_name = 3; + + // Actions to execute at the completion of the job. + repeated Action actions = 4; +} + +// A task to execute when a data profile has been generated. +message DataProfileAction { + // If set, the detailed data profiles will be persisted to the location + // of your choice whenever updated. + message Export { + // Store all table and column profiles in an existing table or a new table + // in an existing dataset. Each re-generation will result in a new row in + // BigQuery. + BigQueryTable profile_table = 1; + } + + // Send a Pub/Sub message into the given Pub/Sub topic to connect other + // systems to data profile generation. The message payload data will + // be the byte serialization of `DataProfilePubSubMessage`. + message PubSubNotification { + // The levels of detail that can be included in the Pub/Sub message. + enum DetailLevel { + // Unused. + DETAIL_LEVEL_UNSPECIFIED = 0; + + // The full table data profile. + TABLE_PROFILE = 1; + + // The resource name of the table. + RESOURCE_NAME = 2; + } + + // Cloud Pub/Sub topic to send notifications to. + // Format is projects/{project}/topics/{topic}. + string topic = 1; + + // The type of event that triggers a Pub/Sub. At most one + // `PubSubNotification` per EventType is permitted. + EventType event = 2; + + // Conditions (e.g., data risk or sensitivity level) for triggering a + // Pub/Sub. + DataProfilePubSubCondition pubsub_condition = 3; + + // How much data to include in the Pub/Sub message. If the user wishes to + // limit the size of the message, they can use resource_name and fetch the + // profile fields they wish to. Per table profile (not per column). + DetailLevel detail_of_message = 4; + } + + // Types of event that can trigger an action. + enum EventType { + // Unused. + EVENT_TYPE_UNSPECIFIED = 0; + + // New profile (not a re-profile). + NEW_PROFILE = 1; + + // Changed one of the following profile metrics: + // * Table data risk score + // * Table sensitivity score + // * Table resource visibility + // * Table encryption type + // * Table predicted infoTypes + // * Table other infoTypes + CHANGED_PROFILE = 2; + + // Table data risk score or sensitivity score increased. + SCORE_INCREASED = 3; + + // A user (non-internal) error occurred. + ERROR_CHANGED = 4; + } + + oneof action { + // Export data profiles into a provided location. + Export export_data = 1; + + // Publish a message into the Pub/Sub topic. + PubSubNotification pub_sub_notification = 2; + } +} + +// Configuration for setting up a job to scan resources for profile generation. +// Only one data profile configuration may exist per organization, folder, +// or project. +// +// The generated data profiles are retained according to the +// [data retention policy] +// (https://cloud.google.com/dlp/docs/data-profiles#retention). +message DataProfileJobConfig { + // The data to scan. + DataProfileLocation location = 1; + + // The project that will run the scan. The DLP service + // account that exists within this project must have access to all resources + // that are profiled, and the Cloud DLP API must be enabled. + string project_id = 5; + + // Detection logic for profile generation. + // + // Not all template features are used by profiles. FindingLimits, + // include_quote and exclude_info_types have no impact on + // data profiling. + // + // Multiple templates may be provided if there is data in multiple regions. + // At most one template must be specified per-region (including "global"). + // Each region is scanned using the applicable template. If no region-specific + // template is specified, but a "global" template is specified, it will be + // copied to that region and used instead. If no global or region-specific + // template is provided for a region with data, that region's data will not be + // scanned. + // + // For more information, see + // https://cloud.google.com/dlp/docs/data-profiles#data_residency. + repeated string inspect_templates = 7; + + // Actions to execute at the completion of the job. + repeated DataProfileAction data_profile_actions = 6; +} + +// The data that will be profiled. +message DataProfileLocation { + // The location to be scanned. + oneof location { + // The ID of an organization to scan. + int64 organization_id = 1; + + // The ID of the Folder within an organization to scan. + int64 folder_id = 2; + } +} + +// Combines all of the information about a DLP job. +message DlpJob { + option (google.api.resource) = { + type: "dlp.googleapis.com/DlpJob" + pattern: "projects/{project}/dlpJobs/{dlp_job}" + pattern: "projects/{project}/locations/{location}/dlpJobs/{dlp_job}" + }; + + // Possible states of a job. New items may be added. + enum JobState { + // Unused. + JOB_STATE_UNSPECIFIED = 0; + + // The job has not yet started. + PENDING = 1; + + // The job is currently running. Once a job has finished it will transition + // to FAILED or DONE. + RUNNING = 2; + + // The job is no longer running. + DONE = 3; + + // The job was canceled before it could be completed. + CANCELED = 4; + + // The job had an error and did not complete. + FAILED = 5; + + // The job is currently accepting findings via hybridInspect. + // A hybrid job in ACTIVE state may continue to have findings added to it + // through the calling of hybridInspect. After the job has finished no more + // calls to hybridInspect may be made. ACTIVE jobs can transition to DONE. + ACTIVE = 6; + } + + // The server-assigned name. + string name = 1; + + // The type of job. + DlpJobType type = 2; + + // State of a job. + JobState state = 3; + + oneof details { + // Results from analyzing risk of a data source. + AnalyzeDataSourceRiskDetails risk_details = 4; + + // Results from inspecting a data source. + InspectDataSourceDetails inspect_details = 5; + } + + // Time when the job was created. + google.protobuf.Timestamp create_time = 6; + + // Time when the job started. + google.protobuf.Timestamp start_time = 7; + + // Time when the job finished. + google.protobuf.Timestamp end_time = 8; + + // If created by a job trigger, the resource name of the trigger that + // instantiated the job. + string job_trigger_name = 10; + + // A stream of errors encountered running the job. + repeated Error errors = 11; +} + +// The request message for [DlpJobs.GetDlpJob][]. +message GetDlpJobRequest { + // Required. The name of the DlpJob resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + } + ]; +} + +// The request message for listing DLP jobs. +message ListDlpJobsRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpJob" + } + ]; + + // Allows filtering. + // + // Supported syntax: + // + // * Filter expressions are made up of one or more restrictions. + // * Restrictions can be combined by `AND` or `OR` logical operators. A + // sequence of restrictions implicitly uses `AND`. + // * A restriction has the form of `{field} {operator} {value}`. + // * Supported fields/values for inspect jobs: + // - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + // - `trigger_name` - The name of the trigger that created the job. + // - 'end_time` - Corresponds to the time the job finished. + // - 'start_time` - Corresponds to the time the job finished. + // * Supported fields for risk analysis jobs: + // - `state` - RUNNING|CANCELED|FINISHED|FAILED + // - 'end_time` - Corresponds to the time the job finished. + // - 'start_time` - Corresponds to the time the job finished. + // * The operator must be `=` or `!=`. + // + // Examples: + // + // * inspected_storage = cloud_storage AND state = done + // * inspected_storage = cloud_storage OR inspected_storage = bigquery + // * inspected_storage = cloud_storage AND (state = done OR state = canceled) + // * end_time > \"2017-12-12T00:00:00+00:00\" + // + // The length of this field should be no more than 500 characters. + string filter = 1; + + // The standard list page size. + int32 page_size = 2; + + // The standard list page token. + string page_token = 3; + + // The type of job. Defaults to `DlpJobType.INSPECT` + DlpJobType type = 5; + + // Comma separated list of fields to order by, + // followed by `asc` or `desc` postfix. This list is case-insensitive, + // default sorting order is ascending, redundant space characters are + // insignificant. + // + // Example: `name asc, end_time asc, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the job was created. + // - `end_time`: corresponds to the time the job ended. + // - `name`: corresponds to the job's name. + // - `state`: corresponds to `state` + string order_by = 6; + + // Deprecated. This field has no effect. + string location_id = 7; +} + +// The response message for listing DLP jobs. +message ListDlpJobsResponse { + // A list of DlpJobs that matches the specified filter in the request. + repeated DlpJob jobs = 1; + + // The standard List next-page token. + string next_page_token = 2; +} + +// The request message for canceling a DLP job. +message CancelDlpJobRequest { + // Required. The name of the DlpJob resource to be cancelled. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + } + ]; +} + +// The request message for finishing a DLP hybrid job. +message FinishDlpJobRequest { + // Required. The name of the DlpJob resource to be cancelled. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + } + ]; +} + +// The request message for deleting a DLP job. +message DeleteDlpJobRequest { + // Required. The name of the DlpJob resource to be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + } + ]; +} + +// Request message for CreateDeidentifyTemplate. +message CreateDeidentifyTemplateRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + Organizations scope, location specified:
+ // `organizations/`ORG_ID`/locations/`LOCATION_ID + // + Organizations scope, no location specified (defaults to global):
+ // `organizations/`ORG_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; + + // Required. The DeidentifyTemplate to create. + DeidentifyTemplate deidentify_template = 2 [(google.api.field_behavior) = REQUIRED]; + + // The template id can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string template_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; +} + +// Request message for UpdateDeidentifyTemplate. +message UpdateDeidentifyTemplateRequest { + // Required. Resource name of organization and deidentify template to be updated, for + // example `organizations/433245324/deidentifyTemplates/432452342` or + // projects/project-id/deidentifyTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; + + // New DeidentifyTemplate value. + DeidentifyTemplate deidentify_template = 2; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetDeidentifyTemplate. +message GetDeidentifyTemplateRequest { + // Required. Resource name of the organization and deidentify template to be read, for + // example `organizations/433245324/deidentifyTemplates/432452342` or + // projects/project-id/deidentifyTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; +} + +// Request message for ListDeidentifyTemplates. +message ListDeidentifyTemplatesRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + Organizations scope, location specified:
+ // `organizations/`ORG_ID`/locations/`LOCATION_ID + // + Organizations scope, no location specified (defaults to global):
+ // `organizations/`ORG_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; + + // Page token to continue retrieval. Comes from previous call + // to `ListDeidentifyTemplates`. + string page_token = 2; + + // Size of the page, can be limited by the server. If zero server returns + // a page of max size 100. + int32 page_size = 3; + + // Comma separated list of fields to order by, + // followed by `asc` or `desc` postfix. This list is case-insensitive, + // default sorting order is ascending, redundant space characters are + // insignificant. + // + // Example: `name asc,update_time, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the template was created. + // - `update_time`: corresponds to the time the template was last updated. + // - `name`: corresponds to the template's name. + // - `display_name`: corresponds to the template's display name. + string order_by = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Response message for ListDeidentifyTemplates. +message ListDeidentifyTemplatesResponse { + // List of deidentify templates, up to page_size in + // ListDeidentifyTemplatesRequest. + repeated DeidentifyTemplate deidentify_templates = 1; + + // If the next page is available then the next page token to be used + // in following ListDeidentifyTemplates request. + string next_page_token = 2; +} + +// Request message for DeleteDeidentifyTemplate. +message DeleteDeidentifyTemplateRequest { + // Required. Resource name of the organization and deidentify template to be deleted, + // for example `organizations/433245324/deidentifyTemplates/432452342` or + // projects/project-id/deidentifyTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; +} + +// Configuration for a custom dictionary created from a data source of any size +// up to the maximum size defined in the +// [limits](https://cloud.google.com/dlp/limits) page. The artifacts of +// dictionary creation are stored in the specified Cloud Storage +// location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries +// that satisfy the size requirements. +message LargeCustomDictionaryConfig { + // Location to store dictionary artifacts in Cloud Storage. These files + // will only be accessible by project owners and the DLP API. If any of these + // artifacts are modified, the dictionary is considered invalid and can no + // longer be used. + CloudStoragePath output_path = 1; + + oneof source { + // Set of files containing newline-delimited lists of dictionary phrases. + CloudStorageFileSet cloud_storage_file_set = 2; + + // Field in a BigQuery table where each cell represents a dictionary phrase. + BigQueryField big_query_field = 3; + } +} + +// Summary statistics of a custom dictionary. +message LargeCustomDictionaryStats { + // Approximate number of distinct phrases in the dictionary. + int64 approx_num_phrases = 1; +} + +// Configuration for stored infoTypes. All fields and subfield are provided +// by the user. For more information, see +// https://cloud.google.com/dlp/docs/creating-custom-infotypes. +message StoredInfoTypeConfig { + // Display name of the StoredInfoType (max 256 characters). + string display_name = 1; + + // Description of the StoredInfoType (max 256 characters). + string description = 2; + + // Stored infotype types. + oneof type { + // StoredInfoType where findings are defined by a dictionary of phrases. + LargeCustomDictionaryConfig large_custom_dictionary = 3; + + // Store dictionary-based CustomInfoType. + CustomInfoType.Dictionary dictionary = 4; + + // Store regular expression-based StoredInfoType. + CustomInfoType.Regex regex = 5; + } +} + +// Statistics for a StoredInfoType. +message StoredInfoTypeStats { + // Stat types + oneof type { + // StoredInfoType where findings are defined by a dictionary of phrases. + LargeCustomDictionaryStats large_custom_dictionary = 1; + } +} + +// Version of a StoredInfoType, including the configuration used to build it, +// create timestamp, and current state. +message StoredInfoTypeVersion { + // StoredInfoType configuration. + StoredInfoTypeConfig config = 1; + + // Create timestamp of the version. Read-only, determined by the system + // when the version is created. + google.protobuf.Timestamp create_time = 2; + + // Stored info type version state. Read-only, updated by the system + // during dictionary creation. + StoredInfoTypeState state = 3; + + // Errors that occurred when creating this storedInfoType version, or + // anomalies detected in the storedInfoType data that render it unusable. Only + // the five most recent errors will be displayed, with the most recent error + // appearing first. + // + // For example, some of the data for stored custom dictionaries is put in + // the user's Cloud Storage bucket, and if this data is modified or + // deleted by the user or another system, the dictionary becomes invalid. + // + // If any errors occur, fix the problem indicated by the error message and + // use the UpdateStoredInfoType API method to create another version of the + // storedInfoType to continue using it, reusing the same `config` if it was + // not the source of the error. + repeated Error errors = 4; + + // Statistics about this storedInfoType version. + StoredInfoTypeStats stats = 5; +} + +// StoredInfoType resource message that contains information about the current +// version and any pending updates. +message StoredInfoType { + option (google.api.resource) = { + type: "dlp.googleapis.com/StoredInfoType" + pattern: "organizations/{organization}/storedInfoTypes/{stored_info_type}" + pattern: "projects/{project}/storedInfoTypes/{stored_info_type}" + pattern: "organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}" + pattern: "projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}" + }; + + // Resource name. + string name = 1; + + // Current version of the stored info type. + StoredInfoTypeVersion current_version = 2; + + // Pending versions of the stored info type. Empty if no versions are + // pending. + repeated StoredInfoTypeVersion pending_versions = 3; +} + +// Request message for CreateStoredInfoType. +message CreateStoredInfoTypeRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + Organizations scope, location specified:
+ // `organizations/`ORG_ID`/locations/`LOCATION_ID + // + Organizations scope, no location specified (defaults to global):
+ // `organizations/`ORG_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/StoredInfoType" + } + ]; + + // Required. Configuration of the storedInfoType to create. + StoredInfoTypeConfig config = 2 [(google.api.field_behavior) = REQUIRED]; + + // The storedInfoType ID can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string stored_info_type_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; +} + +// Request message for UpdateStoredInfoType. +message UpdateStoredInfoTypeRequest { + // Required. Resource name of organization and storedInfoType to be updated, for + // example `organizations/433245324/storedInfoTypes/432452342` or + // projects/project-id/storedInfoTypes/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/StoredInfoType" + } + ]; + + // Updated configuration for the storedInfoType. If not provided, a new + // version of the storedInfoType will be created with the existing + // configuration. + StoredInfoTypeConfig config = 2; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetStoredInfoType. +message GetStoredInfoTypeRequest { + // Required. Resource name of the organization and storedInfoType to be read, for + // example `organizations/433245324/storedInfoTypes/432452342` or + // projects/project-id/storedInfoTypes/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/StoredInfoType" + } + ]; +} + +// Request message for ListStoredInfoTypes. +message ListStoredInfoTypesRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/dlp/docs/specifying-location): + // + // + Projects scope, location specified:
+ // `projects/`PROJECT_ID`/locations/`LOCATION_ID + // + Projects scope, no location specified (defaults to global):
+ // `projects/`PROJECT_ID + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/StoredInfoType" + } + ]; + + // Page token to continue retrieval. Comes from previous call + // to `ListStoredInfoTypes`. + string page_token = 2; + + // Size of the page, can be limited by the server. If zero server returns + // a page of max size 100. + int32 page_size = 3; + + // Comma separated list of fields to order by, + // followed by `asc` or `desc` postfix. This list is case-insensitive, + // default sorting order is ascending, redundant space characters are + // insignificant. + // + // Example: `name asc, display_name, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the most recent version of the + // resource was created. + // - `state`: corresponds to the state of the resource. + // - `name`: corresponds to resource name. + // - `display_name`: corresponds to info type's display name. + string order_by = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Response message for ListStoredInfoTypes. +message ListStoredInfoTypesResponse { + // List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest. + repeated StoredInfoType stored_info_types = 1; + + // If the next page is available then the next page token to be used + // in following ListStoredInfoTypes request. + string next_page_token = 2; +} + +// Request message for DeleteStoredInfoType. +message DeleteStoredInfoTypeRequest { + // Required. Resource name of the organization and storedInfoType to be deleted, for + // example `organizations/433245324/storedInfoTypes/432452342` or + // projects/project-id/storedInfoTypes/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/StoredInfoType" + } + ]; +} + +// Request to search for potentially sensitive info in a custom location. +message HybridInspectJobTriggerRequest { + // Required. Resource name of the trigger to execute a hybrid inspect on, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/JobTrigger" + } + ]; + + // The item to inspect. + HybridContentItem hybrid_item = 3; +} + +// Request to search for potentially sensitive info in a custom location. +message HybridInspectDlpJobRequest { + // Required. Resource name of the job to execute a hybrid inspect on, for example + // `projects/dlp-test-project/dlpJob/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DlpJob" + } + ]; + + // The item to inspect. + HybridContentItem hybrid_item = 3; +} + +// An individual hybrid item to inspect. Will be stored temporarily during +// processing. +message HybridContentItem { + // The item to inspect. + ContentItem item = 1; + + // Supplementary information that will be added to each finding. + HybridFindingDetails finding_details = 2; +} + +// Populate to associate additional data with each finding. +message HybridFindingDetails { + // Details about the container where the content being inspected is from. + Container container_details = 1; + + // Offset in bytes of the line, from the beginning of the file, where the + // finding is located. Populate if the item being scanned is only part of a + // bigger item, such as a shard of a file and you want to track the absolute + // position of the finding. + int64 file_offset = 2; + + // Offset of the row for tables. Populate if the row(s) being scanned are + // part of a bigger dataset and you want to keep track of their absolute + // position. + int64 row_offset = 3; + + // If the container is a table, additional information to make findings + // meaningful such as the columns that are primary keys. If not known ahead + // of time, can also be set within each inspect hybrid call and the two + // will be merged. Note that identifying_fields will only be stored to + // BigQuery, and only if the BigQuery action has been included. + TableOptions table_options = 4; + + // Labels to represent user provided metadata about the data being inspected. + // If configured by the job, some key values may be required. + // The labels associated with `Finding`'s produced by hybrid + // inspection. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // + // No more than 10 labels can be associated with a given finding. + // + // Examples: + // * `"environment" : "production"` + // * `"pipeline" : "etl"` + map labels = 5; +} + +// Quota exceeded errors will be thrown once quota has been met. +message HybridInspectResponse { + +} + +// Operators available for comparing the value of fields. +enum RelationalOperator { + // Unused + RELATIONAL_OPERATOR_UNSPECIFIED = 0; + + // Equal. Attempts to match even with incompatible types. + EQUAL_TO = 1; + + // Not equal to. Attempts to match even with incompatible types. + NOT_EQUAL_TO = 2; + + // Greater than. + GREATER_THAN = 3; + + // Less than. + LESS_THAN = 4; + + // Greater than or equals. + GREATER_THAN_OR_EQUALS = 5; + + // Less than or equals. + LESS_THAN_OR_EQUALS = 6; + + // Exists + EXISTS = 7; +} + +// Type of the match which can be applied to different ways of matching, like +// Dictionary, regular expression and intersecting with findings of another +// info type. +enum MatchingType { + // Invalid. + MATCHING_TYPE_UNSPECIFIED = 0; + + // Full match. + // + // - Dictionary: join of Dictionary results matched complete finding quote + // - Regex: all regex matches fill a finding quote start to end + // - Exclude info type: completely inside affecting info types findings + MATCHING_TYPE_FULL_MATCH = 1; + + // Partial match. + // + // - Dictionary: at least one of the tokens in the finding matches + // - Regex: substring of the finding matches + // - Exclude info type: intersects with affecting info types findings + MATCHING_TYPE_PARTIAL_MATCH = 2; + + // Inverse match. + // + // - Dictionary: no tokens in the finding match the dictionary + // - Regex: finding doesn't match the regex + // - Exclude info type: no intersection with affecting info types findings + MATCHING_TYPE_INVERSE_MATCH = 3; +} + +// Deprecated and unused. +enum ContentOption { + // Includes entire content of a file or a data stream. + CONTENT_UNSPECIFIED = 0; + + // Text content within the data, excluding any metadata. + CONTENT_TEXT = 1; + + // Images found in the data. + CONTENT_IMAGE = 2; +} + +// Type of metadata containing the finding. +enum MetadataType { + // Unused + METADATATYPE_UNSPECIFIED = 0; + + // General file metadata provided by Cloud Storage. + STORAGE_METADATA = 2; +} + +// Parts of the APIs which use certain infoTypes. +enum InfoTypeSupportedBy { + // Unused. + ENUM_TYPE_UNSPECIFIED = 0; + + // Supported by the inspect operations. + INSPECT = 1; + + // Supported by the risk analysis operations. + RISK_ANALYSIS = 2; +} + +// An enum to represent the various types of DLP jobs. +enum DlpJobType { + // Defaults to INSPECT_JOB. + DLP_JOB_TYPE_UNSPECIFIED = 0; + + // The job inspected Google Cloud for sensitive data. + INSPECT_JOB = 1; + + // The job executed a Risk Analysis computation. + RISK_ANALYSIS_JOB = 2; +} + +// State of a StoredInfoType version. +enum StoredInfoTypeState { + // Unused + STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; + + // StoredInfoType version is being created. + PENDING = 1; + + // StoredInfoType version is ready for use. + READY = 2; + + // StoredInfoType creation failed. All relevant error messages are returned in + // the `StoredInfoTypeVersion` message. + FAILED = 3; + + // StoredInfoType is no longer valid because artifacts stored in + // user-controlled storage were modified. To fix an invalid StoredInfoType, + // use the `UpdateStoredInfoType` method to create a new version. + INVALID = 4; +} + +// Score is a summary of all elements in the data profile. +// A higher number means more risk. +message DataRiskLevel { + // Various score levels for resources. + enum DataRiskLevelScore { + // Unused. + RISK_SCORE_UNSPECIFIED = 0; + + // Low risk - Lower indication of sensitive data that appears to have + // additional access restrictions in place or no indication of sensitive + // data found. + RISK_LOW = 10; + + // Medium risk - Sensitive data may be present but additional access or fine + // grain access restrictions appear to be present. Consider limiting + // access even further or transform data to mask. + RISK_MODERATE = 20; + + // High risk – SPII may be present. Access controls may include public + // ACLs. Exfiltration of data may lead to user data loss. Re-identification + // of users may be possible. Consider limiting usage and or removing SPII. + RISK_HIGH = 30; + } + + // The score applied to the resource. + DataRiskLevelScore score = 1; +} + +// How broadly a resource has been shared. New items may be added over time. +// A higher number means more restricted. +enum ResourceVisibility { + // Unused. + RESOURCE_VISIBILITY_UNSPECIFIED = 0; + + // Visible to any user. + RESOURCE_VISIBILITY_PUBLIC = 10; + + // Visible only to specific users. + RESOURCE_VISIBILITY_RESTRICTED = 20; +} + +// Snapshot of the configurations used to generate the profile. +message DataProfileConfigSnapshot { + // A copy of the inspection config used to generate this profile. This + // is a copy of the inspect_template specified in `DataProfileJobConfig`. + InspectConfig inspect_config = 2; + + // A copy of the configuration used to generate this profile. + DataProfileJobConfig data_profile_job = 3; +} + +// The profile for a scanned table. +message TableDataProfile { + // Possible states of a profile. New items may be added. + enum State { + // Unused. + STATE_UNSPECIFIED = 0; + + // The profile is currently running. Once a profile has finished it will + // transition to DONE. + RUNNING = 1; + + // The profile is no longer generating. + // If profile_status.status.code is 0, the profile succeeded, otherwise, it + // failed. + DONE = 2; + } + + // The name of the profile. + string name = 1; + + // The resource name to the project data profile for this table. + string project_data_profile = 2; + + // The GCP project ID that owns the BigQuery dataset. + string dataset_project_id = 24; + + // The BigQuery location where the dataset's data is stored. + // See https://cloud.google.com/bigquery/docs/locations for supported + // locations. + string dataset_location = 29; + + // The BigQuery dataset ID. + string dataset_id = 25; + + // The BigQuery table ID. + string table_id = 26; + + // The resource name of the table. + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string full_resource = 3; + + // Success or error status from the most recent profile generation attempt. + // May be empty if the profile is still being generated. + ProfileStatus profile_status = 21; + + // State of a profile. + State state = 22; + + // The sensitivity score of this table. + SensitivityScore sensitivity_score = 5; + + // The data risk level of this table. + DataRiskLevel data_risk_level = 6; + + // The infoTypes predicted from this table's data. + repeated InfoTypeSummary predicted_info_types = 27; + + // Other infoTypes found in this table's data. + repeated OtherInfoTypeSummary other_info_types = 28; + + // The snapshot of the configurations used to generate the profile. + DataProfileConfigSnapshot config_snapshot = 7; + + // The time when this table was last modified + google.protobuf.Timestamp last_modified_time = 8; + + // Optional. The time when this table expires. + google.protobuf.Timestamp expiration_time = 9; + + // The number of columns profiled in the table. + int64 scanned_column_count = 10; + + // The number of columns skipped in the table because of an error. + int64 failed_column_count = 11; + + // The size of the table when the profile was generated. + int64 table_size_bytes = 12; + + // Number of rows in the table when the profile was generated. + int64 row_count = 13; + + // How the table is encrypted. + EncryptionStatus encryption_status = 14; + + // How broadly a resource has been shared. + ResourceVisibility resource_visibility = 15; + + // The last time the profile was generated. + google.protobuf.Timestamp profile_last_generated = 16; + + // The labels applied to the resource at the time the profile was generated. + map resource_labels = 17; + + // The time at which the table was created. + google.protobuf.Timestamp create_time = 23; +} + +message ProfileStatus { + // Profiling status code and optional message + google.rpc.Status status = 1; + + // Time when the profile generation status was updated + google.protobuf.Timestamp timestamp = 3; +} + +// How a resource is encrypted. +enum EncryptionStatus { + // Unused. + ENCRYPTION_STATUS_UNSPECIFIED = 0; + + // Google manages server-side encryption keys on your behalf. + ENCRYPTION_GOOGLE_MANAGED = 1; + + // Customer provides the key. + ENCRYPTION_CUSTOMER_MANAGED = 2; +} + +// The infoType details for this column. +message InfoTypeSummary { + // The infoType. + InfoType info_type = 1; + + // Approximate percentage of non-null rows that contained data detected by + // this infotype. + int32 estimated_prevalence = 2; +} + +// Infotype details for other infoTypes found within a column. +message OtherInfoTypeSummary { + // The other infoType. + InfoType info_type = 1; + + // Approximate percentage of non-null rows that contained data detected by + // this infotype. + int32 estimated_prevalence = 2; +} + +// A condition for determining whether a Pub/Sub should be triggered. +message DataProfilePubSubCondition { + // Various score levels for resources. + enum ProfileScoreBucket { + // Unused. + PROFILE_SCORE_BUCKET_UNSPECIFIED = 0; + + // High risk/sensitivity detected. + HIGH = 1; + + // Medium or high risk/sensitivity detected. + MEDIUM_OR_HIGH = 2; + } + + // A condition consisting of a value. + message PubSubCondition { + // The value for the condition to trigger. + oneof value { + // The minimum data risk score that triggers the condition. + ProfileScoreBucket minimum_risk_score = 1; + + // The minimum sensitivity level that triggers the condition. + ProfileScoreBucket minimum_sensitivity_score = 2; + } + } + + // An expression, consisting of an operator and conditions. + message PubSubExpressions { + // Logical operators for conditional checks. + enum PubSubLogicalOperator { + // Unused. + LOGICAL_OPERATOR_UNSPECIFIED = 0; + + // Conditional OR. + OR = 1; + + // Conditional AND. + AND = 2; + } + + // The operator to apply to the collection of conditions. + PubSubLogicalOperator logical_operator = 1; + + // Conditions to apply to the expression. + repeated PubSubCondition conditions = 2; + } + + // An expression. + PubSubExpressions expressions = 1; +} + +// Pub/Sub topic message for a DataProfileAction.PubSubNotification event. +// To receive a message of protocol buffer schema type, convert the message data +// to an object of this proto class. +message DataProfilePubSubMessage { + // If `DetailLevel` is `TABLE_PROFILE` this will be fully populated. + // Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and + // `full_resource` will be populated. + TableDataProfile profile = 1; + + // The event that caused the Pub/Sub message to be sent. + DataProfileAction.EventType event = 2; +} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto new file mode 100644 index 000000000000..7709f546be5b --- /dev/null +++ b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto @@ -0,0 +1,808 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.privacy.dlp.v2; + +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Dlp.V2"; +option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp"; +option java_multiple_files = true; +option java_outer_classname = "DlpStorage"; +option java_package = "com.google.privacy.dlp.v2"; +option php_namespace = "Google\\Cloud\\Dlp\\V2"; +option ruby_package = "Google::Cloud::Dlp::V2"; + +// Type of information detected by the API. +message InfoType { + // Name of the information type. Either a name of your choosing when + // creating a CustomInfoType, or one of the names listed + // at https://cloud.google.com/dlp/docs/infotypes-reference when specifying + // a built-in type. When sending Cloud DLP results to Data Catalog, infoType + // names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`. + string name = 1; + + // Optional version name for this InfoType. + string version = 2; +} + +// Score is a summary of all elements in the data profile. +// A higher number means more sensitive. +message SensitivityScore { + // Various score levels for resources. + enum SensitivityScoreLevel { + // Unused. + SENSITIVITY_SCORE_UNSPECIFIED = 0; + + // No sensitive information detected. Limited access. + SENSITIVITY_LOW = 10; + + // Medium risk - PII, potentially sensitive data, or fields with free-text + // data that are at higher risk of having intermittent sensitive data. + // Consider limiting access. + SENSITIVITY_MODERATE = 20; + + // High risk – SPII may be present. Exfiltration of data may lead to user + // data loss. Re-identification of users may be possible. Consider limiting + // usage and or removing SPII. + SENSITIVITY_HIGH = 30; + } + + // The score applied to the resource. + SensitivityScoreLevel score = 1; +} + +// Categorization of results based on how likely they are to represent a match, +// based on the number of elements they contain which imply a match. +enum Likelihood { + // Default value; same as POSSIBLE. + LIKELIHOOD_UNSPECIFIED = 0; + + // Few matching elements. + VERY_UNLIKELY = 1; + + UNLIKELY = 2; + + // Some matching elements. + POSSIBLE = 3; + + LIKELY = 4; + + // Many matching elements. + VERY_LIKELY = 5; +} + +// A reference to a StoredInfoType to use with scanning. +message StoredType { + // Resource name of the requested `StoredInfoType`, for example + // `organizations/433245324/storedInfoTypes/432452342` or + // `projects/project-id/storedInfoTypes/432452342`. + string name = 1; + + // Timestamp indicating when the version of the `StoredInfoType` used for + // inspection was created. Output-only field, populated by the system. + google.protobuf.Timestamp create_time = 2; +} + +// Custom information type provided by the user. Used to find domain-specific +// sensitive information configurable to the data in question. +message CustomInfoType { + // Custom information type based on a dictionary of words or phrases. This can + // be used to match sensitive information specific to the data, such as a list + // of employee IDs or job titles. + // + // Dictionary words are case-insensitive and all characters other than letters + // and digits in the unicode [Basic Multilingual + // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) + // will be replaced with whitespace when scanning for matches, so the + // dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", + // "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters + // surrounding any match must be of a different type than the adjacent + // characters within the word, so letters must be next to non-letters and + // digits next to non-digits. For example, the dictionary word "jen" will + // match the first three letters of the text "jen123" but will return no + // matches for "jennifer". + // + // Dictionary words containing a large number of characters that are not + // letters or digits may result in unexpected findings because such characters + // are treated as whitespace. The + // [limits](https://cloud.google.com/dlp/limits) page contains details about + // the size limits of dictionaries. For dictionaries that do not fit within + // these constraints, consider using `LargeCustomDictionaryConfig` in the + // `StoredInfoType` API. + message Dictionary { + // Message defining a list of words or phrases to search for in the data. + message WordList { + // Words or phrases defining the dictionary. The dictionary must contain + // at least one phrase and every phrase must contain at least 2 characters + // that are letters or digits. [required] + repeated string words = 1; + } + + oneof source { + // List of words or phrases to search for. + WordList word_list = 1; + + // Newline-delimited file of words in Cloud Storage. Only a single file + // is accepted. + CloudStoragePath cloud_storage_path = 3; + } + } + + // Message defining a custom regular expression. + message Regex { + // Pattern defining the regular expression. Its syntax + // (https://github.com/google/re2/wiki/Syntax) can be found under the + // google/re2 repository on GitHub. + string pattern = 1; + + // The index of the submatch to extract as findings. When not + // specified, the entire match is returned. No more than 3 may be included. + repeated int32 group_indexes = 2; + } + + // Message for detecting output from deidentification transformations + // such as + // [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). + // These types of transformations are + // those that perform pseudonymization, thereby producing a "surrogate" as + // output. This should be used in conjunction with a field on the + // transformation such as `surrogate_info_type`. This CustomInfoType does + // not support the use of `detection_rules`. + message SurrogateType { + + } + + // Deprecated; use `InspectionRuleSet` instead. Rule for modifying a + // `CustomInfoType` to alter behavior under certain circumstances, depending + // on the specific details of the rule. Not supported for the `surrogate_type` + // custom infoType. + message DetectionRule { + // Message for specifying a window around a finding to apply a detection + // rule. + message Proximity { + // Number of characters before the finding to consider. For tabular data, + // if you want to modify the likelihood of an entire column of findngs, + // set this to 1. For more information, see + // [Hotword example: Set the match likelihood of a table column] + // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). + int32 window_before = 1; + + // Number of characters after the finding to consider. + int32 window_after = 2; + } + + // Message for specifying an adjustment to the likelihood of a finding as + // part of a detection rule. + message LikelihoodAdjustment { + oneof adjustment { + // Set the likelihood of a finding to a fixed value. + Likelihood fixed_likelihood = 1; + + // Increase or decrease the likelihood by the specified number of + // levels. For example, if a finding would be `POSSIBLE` without the + // detection rule and `relative_likelihood` is 1, then it is upgraded to + // `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. + // Likelihood may never drop below `VERY_UNLIKELY` or exceed + // `VERY_LIKELY`, so applying an adjustment of 1 followed by an + // adjustment of -1 when base likelihood is `VERY_LIKELY` will result in + // a final likelihood of `LIKELY`. + int32 relative_likelihood = 2; + } + } + + // The rule that adjusts the likelihood of findings within a certain + // proximity of hotwords. + message HotwordRule { + // Regular expression pattern defining what qualifies as a hotword. + Regex hotword_regex = 1; + + // Range of characters within which the entire hotword must reside. + // The total length of the window cannot exceed 1000 characters. + // The finding itself will be included in the window, so that hotwords can + // be used to match substrings of the finding itself. Suppose you + // want Cloud DLP to promote the likelihood of the phone number + // regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the + // area code of a company's office. In this case, use the hotword regex + // "\(xxx\)", where "xxx" is the area code in question. + // + // For tabular data, if you want to modify the likelihood of an entire + // column of findngs, see + // [Hotword example: Set the match likelihood of a table column] + // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). + Proximity proximity = 2; + + // Likelihood adjustment to apply to all matching findings. + LikelihoodAdjustment likelihood_adjustment = 3; + } + + oneof type { + // Hotword-based detection rule. + HotwordRule hotword_rule = 1; + } + } + + enum ExclusionType { + // A finding of this custom info type will not be excluded from results. + EXCLUSION_TYPE_UNSPECIFIED = 0; + + // A finding of this custom info type will be excluded from final results, + // but can still affect rule execution. + EXCLUSION_TYPE_EXCLUDE = 1; + } + + // CustomInfoType can either be a new infoType, or an extension of built-in + // infoType, when the name matches one of existing infoTypes and that infoType + // is specified in `InspectContent.info_types` field. Specifying the latter + // adds findings to the one detected by the system. If built-in info type is + // not specified in `InspectContent.info_types` list then the name is treated + // as a custom info type. + InfoType info_type = 1; + + // Likelihood to return for this CustomInfoType. This base value can be + // altered by a detection rule if the finding meets the criteria specified by + // the rule. Defaults to `VERY_LIKELY` if not specified. + Likelihood likelihood = 6; + + oneof type { + // A list of phrases to detect as a CustomInfoType. + Dictionary dictionary = 2; + + // Regular expression based CustomInfoType. + Regex regex = 3; + + // Message for detecting output from deidentification transformations that + // support reversing. + SurrogateType surrogate_type = 4; + + // Load an existing `StoredInfoType` resource for use in + // `InspectDataSource`. Not currently supported in `InspectContent`. + StoredType stored_type = 5; + } + + // Set of detection rules to apply to all findings of this CustomInfoType. + // Rules are applied in order that they are specified. Not supported for the + // `surrogate_type` CustomInfoType. + repeated DetectionRule detection_rules = 7; + + // If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding + // to be returned. It still can be used for rules matching. + ExclusionType exclusion_type = 8; +} + +// General identifier of a data field in a storage service. +message FieldId { + // Name describing the field. + string name = 1; +} + +// Datastore partition ID. +// A partition ID identifies a grouping of entities. The grouping is always +// by project and namespace, however the namespace ID may be empty. +// +// A partition ID contains several dimensions: +// project ID and namespace ID. +message PartitionId { + // The ID of the project to which the entities belong. + string project_id = 2; + + // If not empty, the ID of the namespace to which the entities belong. + string namespace_id = 4; +} + +// A representation of a Datastore kind. +message KindExpression { + // The name of the kind. + string name = 1; +} + +// Options defining a data set within Google Cloud Datastore. +message DatastoreOptions { + // A partition ID identifies a grouping of entities. The grouping is always + // by project and namespace, however the namespace ID may be empty. + PartitionId partition_id = 1; + + // The kind to process. + KindExpression kind = 2; +} + +// Definitions of file type groups to scan. New types will be added to this +// list. +enum FileType { + // Includes all files. + FILE_TYPE_UNSPECIFIED = 0; + + // Includes all file extensions not covered by another entry. Binary + // scanning attempts to convert the content of the file to utf_8 to scan + // the file. + // If you wish to avoid this fall back, specify one or more of the other + // FileType's in your storage scan. + BINARY_FILE = 1; + + // Included file extensions: + // asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart, + // dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm, + // mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht, + // properties, py, pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex, + // shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md, + // txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml. + TEXT_FILE = 2; + + // Included file extensions: + // bmp, gif, jpg, jpeg, jpe, png. + // bytes_limit_per_file has no effect on image files. + // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'. + IMAGE = 3; + + // Word files >30 MB will be scanned as binary files. + // Included file extensions: + // docx, dotx, docm, dotm + WORD = 5; + + // PDF files >30 MB will be scanned as binary files. + // Included file extensions: + // pdf + PDF = 6; + + // Included file extensions: + // avro + AVRO = 7; + + // Included file extensions: + // csv + CSV = 8; + + // Included file extensions: + // tsv + TSV = 9; + + // Powerpoint files >30 MB will be scanned as binary files. + // Included file extensions: + // pptx, pptm, potx, potm, pot + POWERPOINT = 11; + + // Excel files >30 MB will be scanned as binary files. + // Included file extensions: + // xlsx, xlsm, xltx, xltm + EXCEL = 12; +} + +// Message representing a set of files in a Cloud Storage bucket. Regular +// expressions are used to allow fine-grained control over which files in the +// bucket to include. +// +// Included files are those that match at least one item in `include_regex` and +// do not match any items in `exclude_regex`. Note that a file that matches +// items from both lists will _not_ be included. For a match to occur, the +// entire file path (i.e., everything in the url after the bucket name) must +// match the regular expression. +// +// For example, given the input `{bucket_name: "mybucket", include_regex: +// ["directory1/.*"], exclude_regex: +// ["directory1/excluded.*"]}`: +// +// * `gs://mybucket/directory1/myfile` will be included +// * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches +// across `/`) +// * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the +// full path doesn't match any items in `include_regex`) +// * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path +// matches an item in `exclude_regex`) +// +// If `include_regex` is left empty, it will match all files by default +// (this is equivalent to setting `include_regex: [".*"]`). +// +// Some other common use cases: +// +// * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all +// files in `mybucket` except for .pdf files +// * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will +// include all files directly under `gs://mybucket/directory/`, without matching +// across `/` +message CloudStorageRegexFileSet { + // The name of a Cloud Storage bucket. Required. + string bucket_name = 1; + + // A list of regular expressions matching file paths to include. All files in + // the bucket that match at least one of these regular expressions will be + // included in the set of files, except for those that also match an item in + // `exclude_regex`. Leaving this field empty will match all files by default + // (this is equivalent to including `.*` in the list). + // + // Regular expressions use RE2 + // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + // under the google/re2 repository on GitHub. + repeated string include_regex = 2; + + // A list of regular expressions matching file paths to exclude. All files in + // the bucket that match at least one of these regular expressions will be + // excluded from the scan. + // + // Regular expressions use RE2 + // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + // under the google/re2 repository on GitHub. + repeated string exclude_regex = 3; +} + +// Options defining a file or a set of files within a Cloud Storage +// bucket. +message CloudStorageOptions { + // Set of files to scan. + message FileSet { + // The Cloud Storage url of the file(s) to scan, in the format + // `gs:///`. Trailing wildcard in the path is allowed. + // + // If the url ends in a trailing slash, the bucket or directory represented + // by the url will be scanned non-recursively (content in sub-directories + // will not be scanned). This means that `gs://mybucket/` is equivalent to + // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to + // `gs://mybucket/directory/*`. + // + // Exactly one of `url` or `regex_file_set` must be set. + string url = 1; + + // The regex-filtered set of files to scan. Exactly one of `url` or + // `regex_file_set` must be set. + CloudStorageRegexFileSet regex_file_set = 2; + } + + // How to sample bytes if not all bytes are scanned. Meaningful only when used + // in conjunction with bytes_limit_per_file. If not specified, scanning would + // start from the top. + enum SampleMethod { + SAMPLE_METHOD_UNSPECIFIED = 0; + + // Scan from the top (default). + TOP = 1; + + // For each file larger than bytes_limit_per_file, randomly pick the offset + // to start scanning. The scanned bytes are contiguous. + RANDOM_START = 2; + } + + // The set of one or more files to scan. + FileSet file_set = 1; + + // Max number of bytes to scan from a file. If a scanned file's size is bigger + // than this value then the rest of the bytes are omitted. Only one + // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. + // Cannot be set if de-identification is requested. + int64 bytes_limit_per_file = 4; + + // Max percentage of bytes to scan from a file. The rest are omitted. The + // number of bytes scanned is rounded down. Must be between 0 and 100, + // inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one + // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. + // Cannot be set if de-identification is requested. + int32 bytes_limit_per_file_percent = 8; + + // List of file type groups to include in the scan. + // 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'. + repeated FileType file_types = 5; + + SampleMethod sample_method = 6; + + // Limits the number of files to scan to this percentage of the input FileSet. + // Number of files scanned is rounded down. Must be between 0 and 100, + // inclusively. Both 0 and 100 means no limit. Defaults to 0. + int32 files_limit_percent = 7; +} + +// Message representing a set of files in Cloud Storage. +message CloudStorageFileSet { + // The url, in the format `gs:///`. Trailing wildcard in the + // path is allowed. + string url = 1; +} + +// Message representing a single file or path in Cloud Storage. +message CloudStoragePath { + // A url representing a file or path (no wildcards) in Cloud Storage. + // Example: gs://[BUCKET_NAME]/dictionary.txt + string path = 1; +} + +// Options defining BigQuery table and row identifiers. +message BigQueryOptions { + // How to sample rows if not all rows are scanned. Meaningful only when used + // in conjunction with either rows_limit or rows_limit_percent. If not + // specified, rows are scanned in the order BigQuery reads them. + enum SampleMethod { + SAMPLE_METHOD_UNSPECIFIED = 0; + + // Scan groups of rows in the order BigQuery provides (default). Multiple + // groups of rows may be scanned in parallel, so results may not appear in + // the same order the rows are read. + TOP = 1; + + // Randomly pick groups of rows to scan. + RANDOM_START = 2; + } + + // Complete BigQuery table reference. + BigQueryTable table_reference = 1; + + // Table fields that may uniquely identify a row within the table. When + // `actions.saveFindings.outputConfig.table` is specified, the values of + // columns specified here are available in the output table under + // `location.content_locations.record_location.record_key.id_values`. Nested + // fields such as `person.birthdate.year` are allowed. + repeated FieldId identifying_fields = 2; + + // Max number of rows to scan. If the table has more rows than this value, the + // rest of the rows are omitted. If not set, or if set to 0, all rows will be + // scanned. Only one of rows_limit and rows_limit_percent can be specified. + // Cannot be used in conjunction with TimespanConfig. + int64 rows_limit = 3; + + // Max percentage of rows to scan. The rest are omitted. The number of rows + // scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and + // 100 means no limit. Defaults to 0. Only one of rows_limit and + // rows_limit_percent can be specified. Cannot be used in conjunction with + // TimespanConfig. + int32 rows_limit_percent = 6; + + SampleMethod sample_method = 4; + + // References to fields excluded from scanning. This allows you to skip + // inspection of entire columns which you know have no findings. + repeated FieldId excluded_fields = 5; + + // Limit scanning only to these fields. + repeated FieldId included_fields = 7; +} + +// Shared message indicating Cloud storage type. +message StorageConfig { + // Configuration of the timespan of the items to include in scanning. + // Currently only supported when inspecting Cloud Storage and BigQuery. + message TimespanConfig { + // Exclude files, tables, or rows older than this value. + // If not set, no lower time limit is applied. + google.protobuf.Timestamp start_time = 1; + + // Exclude files, tables, or rows newer than this value. + // If not set, no upper time limit is applied. + google.protobuf.Timestamp end_time = 2; + + // Specification of the field containing the timestamp of scanned items. + // Used for data sources like Datastore and BigQuery. + // + // For BigQuery + // + // If this value is not specified and the table was modified between the + // given start and end times, the entire table will be scanned. If this + // value is specified, then rows are filtered based on the given start and + // end times. Rows with a `NULL` value in the provided BigQuery column are + // skipped. + // Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, + // `TIMESTAMP`, and `DATETIME`. + // + // If your BigQuery table is [partitioned at ingestion + // time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), + // you can use any of the following pseudo-columns as your timestamp field. + // When used with Cloud DLP, these pseudo-column names are case sensitive. + // + //
    + //
  • _PARTITIONTIME
  • + //
  • _PARTITIONDATE
  • + //
  • _PARTITION_LOAD_TIME
  • + //
+ // + // For Datastore + // + // If this value is specified, then entities are filtered based on the given + // start and end times. If an entity does not contain the provided timestamp + // property or contains empty or invalid values, then it is included. + // Valid data types of the provided timestamp property are: `TIMESTAMP`. + // + // See the + // [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan) + // related to this operation. + FieldId timestamp_field = 3; + + // When the job is started by a JobTrigger we will automatically figure out + // a valid start_time to avoid scanning files that have not been modified + // since the last time the JobTrigger executed. This will be based on the + // time of the execution of the last run of the JobTrigger or the timespan + // end_time used in the last run of the JobTrigger. + bool enable_auto_population_of_timespan_config = 4; + } + + oneof type { + // Google Cloud Datastore options. + DatastoreOptions datastore_options = 2; + + // Cloud Storage options. + CloudStorageOptions cloud_storage_options = 3; + + // BigQuery options. + BigQueryOptions big_query_options = 4; + + // Hybrid inspection options. + HybridOptions hybrid_options = 9; + } + + TimespanConfig timespan_config = 6; +} + +// Configuration to control jobs where the content being inspected is outside +// of Google Cloud Platform. +message HybridOptions { + // A short description of where the data is coming from. Will be stored once + // in the job. 256 max length. + string description = 1; + + // These are labels that each inspection request must include within their + // 'finding_labels' map. Request may contain others, but any missing one of + // these will be rejected. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // No more than 10 keys can be required. + repeated string required_finding_label_keys = 2; + + // To organize findings, these labels will be added to each finding. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // + // No more than 10 labels can be associated with a given finding. + // + // Examples: + // * `"environment" : "production"` + // * `"pipeline" : "etl"` + map labels = 3; + + // If the container is a table, additional information to make findings + // meaningful such as the columns that are primary keys. + TableOptions table_options = 4; +} + +// Row key for identifying a record in BigQuery table. +message BigQueryKey { + // Complete BigQuery table reference. + BigQueryTable table_reference = 1; + + // Row number inferred at the time the table was scanned. This value is + // nondeterministic, cannot be queried, and may be null for inspection + // jobs. To locate findings within a table, specify + // `inspect_job.storage_config.big_query_options.identifying_fields` in + // `CreateDlpJobRequest`. + int64 row_number = 2; +} + +// Record key for a finding in Cloud Datastore. +message DatastoreKey { + // Datastore entity key. + Key entity_key = 1; +} + +// A unique identifier for a Datastore entity. +// If a key's partition ID or any of its path kinds or names are +// reserved/read-only, the key is reserved/read-only. +// A reserved/read-only key is forbidden in certain documented contexts. +message Key { + // A (kind, ID/name) pair used to construct a key path. + // + // If either name or ID is set, the element is complete. + // If neither is set, the element is incomplete. + message PathElement { + // The kind of the entity. + // A kind matching regex `__.*__` is reserved/read-only. + // A kind must not contain more than 1500 bytes when UTF-8 encoded. + // Cannot be `""`. + string kind = 1; + + // The type of ID. + oneof id_type { + // The auto-allocated ID of the entity. + // Never equal to zero. Values less than zero are discouraged and may not + // be supported in the future. + int64 id = 2; + + // The name of the entity. + // A name matching regex `__.*__` is reserved/read-only. + // A name must not be more than 1500 bytes when UTF-8 encoded. + // Cannot be `""`. + string name = 3; + } + } + + // Entities are partitioned into subsets, currently identified by a project + // ID and namespace ID. + // Queries are scoped to a single partition. + PartitionId partition_id = 1; + + // The entity path. + // An entity path consists of one or more elements composed of a kind and a + // string or numerical identifier, which identify entities. The first + // element identifies a _root entity_, the second element identifies + // a _child_ of the root entity, the third element identifies a child of the + // second entity, and so forth. The entities identified by all prefixes of + // the path are called the element's _ancestors_. + // + // A path can never be empty, and a path can have at most 100 elements. + repeated PathElement path = 2; +} + +// Message for a unique key indicating a record that contains a finding. +message RecordKey { + oneof type { + DatastoreKey datastore_key = 2; + + BigQueryKey big_query_key = 3; + } + + // Values of identifying columns in the given row. Order of values matches + // the order of `identifying_fields` specified in the scanning request. + repeated string id_values = 5; +} + +// Message defining the location of a BigQuery table. A table is uniquely +// identified by its project_id, dataset_id, and table_name. Within a query +// a table is often referenced with a string in the format of: +// `:.` or +// `..`. +message BigQueryTable { + // The Google Cloud Platform project ID of the project containing the table. + // If omitted, project ID is inferred from the API call. + string project_id = 1; + + // Dataset ID of the table. + string dataset_id = 2; + + // Name of the table. + string table_id = 3; +} + +// Message defining a field of a BigQuery table. +message BigQueryField { + // Source table of the field. + BigQueryTable table = 1; + + // Designated field in the BigQuery table. + FieldId field = 2; +} + +// An entity in a dataset is a field or set of fields that correspond to a +// single person. For example, in medical records the `EntityId` might be a +// patient identifier, or for financial records it might be an account +// identifier. This message is used when generalizations or analysis must take +// into account that multiple rows correspond to the same entity. +message EntityId { + // Composite key indicating which field contains the entity identifier. + FieldId field = 1; +} + +// Instructions regarding the table content being inspected. +message TableOptions { + // The columns that are the primary keys for table objects included in + // ContentItem. A copy of this cell's value will stored alongside alongside + // each finding so that the finding can be traced to the specific row it came + // from. No more than 3 may be provided. + repeated FieldId identifying_fields = 1; +} From e1671daf2d8f9758a4dbc4f24215958b4534533c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sat, 3 Sep 2022 03:07:16 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- java-dlp/README.md | 4 +- .../google/cloud/dlp/v2/DlpServiceClient.java | 72 +- .../google/privacy/dlp/v2/DlpServiceGrpc.java | 32 +- .../com/google/privacy/dlp/v2/Action.java | 2742 +- .../privacy/dlp/v2/ActionOrBuilder.java | 41 +- .../dlp/v2/AnalyzeDataSourceRiskDetails.java | 40 +- .../privacy/dlp/v2/CharacterMaskConfig.java | 48 + .../dlp/v2/CharacterMaskConfigOrBuilder.java | 12 + .../google/privacy/dlp/v2/CharsToIgnore.java | 2 +- .../privacy/dlp/v2/CloudStorageOptions.java | 4 +- .../com/google/privacy/dlp/v2/Container.java | 166 +- .../privacy/dlp/v2/ContainerOrBuilder.java | 44 +- .../privacy/dlp/v2/ContentLocation.java | 138 +- .../dlp/v2/ContentLocationOrBuilder.java | 36 +- .../google/privacy/dlp/v2/ContentOption.java | 2 +- .../dlp/v2/CryptoDeterministicConfig.java | 24 +- .../CryptoDeterministicConfigOrBuilder.java | 6 +- .../dlp/v2/CryptoReplaceFfxFpeConfig.java | 26 +- .../CryptoReplaceFfxFpeConfigOrBuilder.java | 6 +- .../dlp/v2/DataProfilePubSubCondition.java | 4 +- .../dlp/v2/DataProfilePubSubMessage.java | 6 +- .../google/privacy/dlp/v2/DataRiskLevel.java | 12 +- .../privacy/dlp/v2/DeidentifyConfig.java | 312 + .../dlp/v2/DeidentifyConfigOrBuilder.java | 35 + .../dlp/v2/DeidentifyContentRequest.java | 4 +- .../com/google/privacy/dlp/v2/DlpJob.java | 8 +- .../com/google/privacy/dlp/v2/DlpJobType.java | 2 +- .../com/google/privacy/dlp/v2/DlpProto.java | 2540 +- .../com/google/privacy/dlp/v2/DlpStorage.java | 322 +- .../privacy/dlp/v2/EncryptionStatus.java | 2 +- .../privacy/dlp/v2/ExcludeInfoTypes.java | 4 +- .../privacy/dlp/v2/ImageTransformations.java | 2938 ++- .../dlp/v2/ImageTransformationsOrBuilder.java | 55 + .../privacy/dlp/v2/InfoTypeDescription.java | 511 +- .../dlp/v2/InfoTypeDescriptionOrBuilder.java | 52 + .../privacy/dlp/v2/InfoTypeSummary.java | 94 + .../dlp/v2/InfoTypeSummaryOrBuilder.java | 14 + .../privacy/dlp/v2/InfoTypeSupportedBy.java | 2 +- .../google/privacy/dlp/v2/InspectConfig.java | 70 + .../dlp/v2/InspectConfigOrBuilder.java | 15 + .../dlp/v2/LargeCustomDictionaryConfig.java | 28 +- .../LargeCustomDictionaryConfigOrBuilder.java | 6 +- .../v2/ListDeidentifyTemplatesRequest.java | 64 +- ...stDeidentifyTemplatesRequestOrBuilder.java | 18 +- .../privacy/dlp/v2/ListDlpJobsRequest.java | 112 +- .../dlp/v2/ListDlpJobsRequestOrBuilder.java | 32 +- .../dlp/v2/ListInspectTemplatesRequest.java | 64 +- .../ListInspectTemplatesRequestOrBuilder.java | 18 +- .../dlp/v2/ListJobTriggersRequest.java | 56 +- .../v2/ListJobTriggersRequestOrBuilder.java | 16 +- .../dlp/v2/ListStoredInfoTypesRequest.java | 50 +- .../ListStoredInfoTypesRequestOrBuilder.java | 14 +- .../google/privacy/dlp/v2/MatchingType.java | 2 +- .../google/privacy/dlp/v2/MetadataType.java | 2 +- .../privacy/dlp/v2/OtherInfoTypeSummary.java | 94 + .../dlp/v2/OtherInfoTypeSummaryOrBuilder.java | 14 + .../privacy/dlp/v2/OutputStorageConfig.java | 52 +- .../dlp/v2/OutputStorageConfigOrBuilder.java | 12 +- .../privacy/dlp/v2/RecordCondition.java | 4 +- .../privacy/dlp/v2/RecordTransformation.java | 497 +- .../dlp/v2/RecordTransformationOrBuilder.java | 43 +- .../dlp/v2/ReidentifyContentResponse.java | 4 +- .../privacy/dlp/v2/RelationalOperator.java | 2 +- .../privacy/dlp/v2/ResourceVisibility.java | 2 +- .../com/google/privacy/dlp/v2/Schedule.java | 24 +- .../privacy/dlp/v2/ScheduleOrBuilder.java | 6 +- .../privacy/dlp/v2/SensitivityScore.java | 12 +- .../dlp/v2/SensitivityScoreOrBuilder.java | 2 +- .../google/privacy/dlp/v2/StorageConfig.java | 283 +- .../dlp/v2/StorageConfigOrBuilder.java | 6 +- .../privacy/dlp/v2/StoredInfoTypeState.java | 2 +- .../privacy/dlp/v2/StoredInfoTypeVersion.java | 46 +- .../v2/StoredInfoTypeVersionOrBuilder.java | 10 +- .../privacy/dlp/v2/TransformationConfig.java | 466 +- .../dlp/v2/TransformationConfigOrBuilder.java | 45 +- .../dlp/v2/TransformationContainerType.java | 100 +- .../dlp/v2/TransformationDescription.java | 550 +- .../TransformationDescriptionOrBuilder.java | 50 +- .../privacy/dlp/v2/TransformationDetails.java | 772 +- .../v2/TransformationDetailsOrBuilder.java | 70 +- .../TransformationDetailsStorageConfig.java | 399 +- ...ormationDetailsStorageConfigOrBuilder.java | 26 +- .../dlp/v2/TransformationLocation.java | 551 +- .../v2/TransformationLocationOrBuilder.java | 44 +- .../dlp/v2/TransformationResultStatus.java | 394 +- .../TransformationResultStatusOrBuilder.java | 32 +- .../v2/TransformationResultStatusType.java | 95 +- .../privacy/dlp/v2/TransformationType.java | 162 +- .../privacy/dlp/v2/VersionDescription.java | 380 +- .../dlp/v2/VersionDescriptionOrBuilder.java | 36 +- .../proto/google/privacy/dlp/v2/dlp.proto | 589 +- .../proto/google/privacy/dlp/v2/storage.proto | 57 +- .../google/cloud/dlp/v2/DlpServiceClient.java | 5835 ----- .../cloud/dlp/v2/DlpServiceSettings.java | 648 - .../google/cloud/dlp/v2/gapic_metadata.json | 120 - .../com/google/cloud/dlp/v2/package-info.java | 51 - .../cloud/dlp/v2/stub/DlpServiceStub.java | 264 - .../dlp/v2/stub/DlpServiceStubSettings.java | 1549 -- .../stub/GrpcDlpServiceCallableFactory.java | 113 - .../cloud/dlp/v2/stub/GrpcDlpServiceStub.java | 1323 - .../HttpJsonDlpServiceCallableFactory.java | 105 - .../dlp/v2/stub/HttpJsonDlpServiceStub.java | 2157 -- .../dlp/v2/DlpServiceClientHttpJsonTest.java | 4449 ---- .../cloud/dlp/v2/DlpServiceClientTest.java | 4075 --- .../google/cloud/dlp/v2/MockDlpService.java | 59 - .../cloud/dlp/v2/MockDlpServiceImpl.java | 828 - .../google/privacy/dlp/v2/DlpServiceGrpc.java | 3496 --- .../com/google/privacy/dlp/v2/Action.java | 7431 ------ .../privacy/dlp/v2/ActionOrBuilder.java | 203 - .../dlp/v2/ActivateJobTriggerRequest.java | 602 - .../ActivateJobTriggerRequestOrBuilder.java | 31 - .../dlp/v2/AnalyzeDataSourceRiskDetails.java | 21216 ---------------- ...AnalyzeDataSourceRiskDetailsOrBuilder.java | 254 - .../google/privacy/dlp/v2/BigQueryField.java | 901 - .../dlp/v2/BigQueryFieldOrBuilder.java | 63 - .../google/privacy/dlp/v2/BigQueryKey.java | 762 - .../privacy/dlp/v2/BigQueryKeyOrBuilder.java | 50 - .../privacy/dlp/v2/BigQueryOptions.java | 2531 -- .../dlp/v2/BigQueryOptionsOrBuilder.java | 231 - .../google/privacy/dlp/v2/BigQueryTable.java | 942 - .../dlp/v2/BigQueryTableOrBuilder.java | 71 - .../google/privacy/dlp/v2/BoundingBox.java | 749 - .../privacy/dlp/v2/BoundingBoxOrBuilder.java | 49 - .../privacy/dlp/v2/BucketingConfig.java | 2120 -- .../dlp/v2/BucketingConfigOrBuilder.java | 53 - .../privacy/dlp/v2/ByteContentItem.java | 971 - .../dlp/v2/ByteContentItemOrBuilder.java | 38 - .../privacy/dlp/v2/CancelDlpJobRequest.java | 595 - .../dlp/v2/CancelDlpJobRequestOrBuilder.java | 29 - .../privacy/dlp/v2/CharacterMaskConfig.java | 1367 - .../dlp/v2/CharacterMaskConfigOrBuilder.java | 131 - .../google/privacy/dlp/v2/CharsToIgnore.java | 1090 - .../dlp/v2/CharsToIgnoreOrBuilder.java | 71 - .../privacy/dlp/v2/CloudStorageFileSet.java | 602 - .../dlp/v2/CloudStorageFileSetOrBuilder.java | 31 - .../privacy/dlp/v2/CloudStorageOptions.java | 2576 -- .../dlp/v2/CloudStorageOptionsOrBuilder.java | 165 - .../privacy/dlp/v2/CloudStoragePath.java | 602 - .../dlp/v2/CloudStoragePathOrBuilder.java | 31 - .../dlp/v2/CloudStorageRegexFileSet.java | 1292 - .../v2/CloudStorageRegexFileSetOrBuilder.java | 159 - .../java/com/google/privacy/dlp/v2/Color.java | 675 - .../google/privacy/dlp/v2/ColorOrBuilder.java | 39 - .../com/google/privacy/dlp/v2/Container.java | 1804 -- .../privacy/dlp/v2/ContainerOrBuilder.java | 195 - .../google/privacy/dlp/v2/ContentItem.java | 1264 - .../privacy/dlp/v2/ContentItemOrBuilder.java | 100 - .../privacy/dlp/v2/ContentLocation.java | 2212 -- .../dlp/v2/ContentLocationOrBuilder.java | 211 - .../google/privacy/dlp/v2/ContentOption.java | 150 - .../v2/CreateDeidentifyTemplateRequest.java | 1289 - ...ateDeidentifyTemplateRequestOrBuilder.java | 132 - .../privacy/dlp/v2/CreateDlpJobRequest.java | 1636 -- .../dlp/v2/CreateDlpJobRequestOrBuilder.java | 156 - .../dlp/v2/CreateInspectTemplateRequest.java | 1289 - ...CreateInspectTemplateRequestOrBuilder.java | 132 - .../dlp/v2/CreateJobTriggerRequest.java | 1261 - .../v2/CreateJobTriggerRequestOrBuilder.java | 124 - .../dlp/v2/CreateStoredInfoTypeRequest.java | 1289 - .../CreateStoredInfoTypeRequestOrBuilder.java | 132 - .../dlp/v2/CryptoDeterministicConfig.java | 1621 -- .../CryptoDeterministicConfigOrBuilder.java | 210 - .../privacy/dlp/v2/CryptoHashConfig.java | 677 - .../dlp/v2/CryptoHashConfigOrBuilder.java | 36 - .../com/google/privacy/dlp/v2/CryptoKey.java | 1297 - .../privacy/dlp/v2/CryptoKeyOrBuilder.java | 92 - .../dlp/v2/CryptoReplaceFfxFpeConfig.java | 2400 -- .../CryptoReplaceFfxFpeConfigOrBuilder.java | 297 - .../google/privacy/dlp/v2/CustomInfoType.java | 9675 ------- .../dlp/v2/CustomInfoTypeOrBuilder.java | 265 - .../privacy/dlp/v2/DataProfileAction.java | 3301 --- .../dlp/v2/DataProfileActionOrBuilder.java | 65 - .../dlp/v2/DataProfileConfigSnapshot.java | 913 - .../DataProfileConfigSnapshotOrBuilder.java | 66 - .../privacy/dlp/v2/DataProfileJobConfig.java | 1698 -- .../dlp/v2/DataProfileJobConfigOrBuilder.java | 193 - .../privacy/dlp/v2/DataProfileLocation.java | 734 - .../dlp/v2/DataProfileLocationOrBuilder.java | 49 - .../dlp/v2/DataProfilePubSubCondition.java | 2906 --- .../DataProfilePubSubConditionOrBuilder.java | 36 - .../dlp/v2/DataProfilePubSubMessage.java | 817 - .../v2/DataProfilePubSubMessageOrBuilder.java | 61 - .../google/privacy/dlp/v2/DataRiskLevel.java | 729 - .../dlp/v2/DataRiskLevelOrBuilder.java | 28 - .../google/privacy/dlp/v2/DatastoreKey.java | 665 - .../privacy/dlp/v2/DatastoreKeyOrBuilder.java | 36 - .../privacy/dlp/v2/DatastoreOptions.java | 913 - .../dlp/v2/DatastoreOptionsOrBuilder.java | 66 - .../privacy/dlp/v2/DateShiftConfig.java | 1221 - .../dlp/v2/DateShiftConfigOrBuilder.java | 100 - .../com/google/privacy/dlp/v2/DateTime.java | 1798 -- .../privacy/dlp/v2/DateTimeOrBuilder.java | 112 - .../privacy/dlp/v2/DeidentifyConfig.java | 1571 -- .../dlp/v2/DeidentifyConfigOrBuilder.java | 131 - .../dlp/v2/DeidentifyContentRequest.java | 1982 -- .../v2/DeidentifyContentRequestOrBuilder.java | 220 - .../dlp/v2/DeidentifyContentResponse.java | 901 - .../DeidentifyContentResponseOrBuilder.java | 63 - .../privacy/dlp/v2/DeidentifyTemplate.java | 1658 -- .../dlp/v2/DeidentifyTemplateName.java | 512 - .../dlp/v2/DeidentifyTemplateOrBuilder.java | 156 - .../v2/DeleteDeidentifyTemplateRequest.java | 609 - ...eteDeidentifyTemplateRequestOrBuilder.java | 33 - .../privacy/dlp/v2/DeleteDlpJobRequest.java | 595 - .../dlp/v2/DeleteDlpJobRequestOrBuilder.java | 29 - .../dlp/v2/DeleteInspectTemplateRequest.java | 609 - ...DeleteInspectTemplateRequestOrBuilder.java | 33 - .../dlp/v2/DeleteJobTriggerRequest.java | 602 - .../v2/DeleteJobTriggerRequestOrBuilder.java | 31 - .../dlp/v2/DeleteStoredInfoTypeRequest.java | 609 - .../DeleteStoredInfoTypeRequestOrBuilder.java | 33 - .../google/privacy/dlp/v2/DlpContentName.java | 264 - .../com/google/privacy/dlp/v2/DlpJob.java | 2983 --- .../com/google/privacy/dlp/v2/DlpJobName.java | 313 - .../privacy/dlp/v2/DlpJobOrBuilder.java | 270 - .../com/google/privacy/dlp/v2/DlpJobType.java | 150 - .../com/google/privacy/dlp/v2/DlpProto.java | 3641 --- .../com/google/privacy/dlp/v2/DlpStorage.java | 560 - .../privacy/dlp/v2/DocumentLocation.java | 514 - .../dlp/v2/DocumentLocationOrBuilder.java | 20 - .../privacy/dlp/v2/EncryptionStatus.java | 150 - .../com/google/privacy/dlp/v2/EntityId.java | 673 - .../privacy/dlp/v2/EntityIdOrBuilder.java | 36 - .../java/com/google/privacy/dlp/v2/Error.java | 1110 - .../google/privacy/dlp/v2/ErrorOrBuilder.java | 80 - .../privacy/dlp/v2/ExcludeInfoTypes.java | 1033 - .../dlp/v2/ExcludeInfoTypesOrBuilder.java | 88 - .../google/privacy/dlp/v2/ExclusionRule.java | 1413 - .../dlp/v2/ExclusionRuleOrBuilder.java | 111 - .../com/google/privacy/dlp/v2/FieldId.java | 595 - .../privacy/dlp/v2/FieldIdOrBuilder.java | 29 - .../privacy/dlp/v2/FieldTransformation.java | 1856 -- .../dlp/v2/FieldTransformationOrBuilder.java | 172 - .../com/google/privacy/dlp/v2/FileType.java | 335 - .../com/google/privacy/dlp/v2/Finding.java | 3228 --- .../privacy/dlp/v2/FindingOrBuilder.java | 400 - .../privacy/dlp/v2/FinishDlpJobRequest.java | 595 - .../dlp/v2/FinishDlpJobRequestOrBuilder.java | 29 - .../dlp/v2/FixedSizeBucketingConfig.java | 1065 - .../v2/FixedSizeBucketingConfigOrBuilder.java | 88 - .../dlp/v2/GetDeidentifyTemplateRequest.java | 609 - ...GetDeidentifyTemplateRequestOrBuilder.java | 33 - .../privacy/dlp/v2/GetDlpJobRequest.java | 595 - .../dlp/v2/GetDlpJobRequestOrBuilder.java | 29 - .../dlp/v2/GetInspectTemplateRequest.java | 609 - .../GetInspectTemplateRequestOrBuilder.java | 33 - .../privacy/dlp/v2/GetJobTriggerRequest.java | 602 - .../dlp/v2/GetJobTriggerRequestOrBuilder.java | 31 - .../dlp/v2/GetStoredInfoTypeRequest.java | 609 - .../v2/GetStoredInfoTypeRequestOrBuilder.java | 33 - .../privacy/dlp/v2/HybridContentItem.java | 903 - .../dlp/v2/HybridContentItemOrBuilder.java | 63 - .../privacy/dlp/v2/HybridFindingDetails.java | 1585 -- .../dlp/v2/HybridFindingDetailsOrBuilder.java | 211 - .../dlp/v2/HybridInspectDlpJobRequest.java | 838 - .../HybridInspectDlpJobRequestOrBuilder.java | 58 - .../v2/HybridInspectJobTriggerRequest.java | 838 - ...bridInspectJobTriggerRequestOrBuilder.java | 58 - .../privacy/dlp/v2/HybridInspectResponse.java | 429 - .../v2/HybridInspectResponseOrBuilder.java | 9 - .../dlp/v2/HybridInspectStatistics.java | 692 - .../v2/HybridInspectStatisticsOrBuilder.java | 44 - .../google/privacy/dlp/v2/HybridOptions.java | 1582 -- .../dlp/v2/HybridOptionsOrBuilder.java | 218 - .../google/privacy/dlp/v2/ImageLocation.java | 872 - .../dlp/v2/ImageLocationOrBuilder.java | 53 - .../dlp/v2/ImageTransformationsOrBuilder.java | 33 - .../com/google/privacy/dlp/v2/InfoType.java | 789 - .../privacy/dlp/v2/InfoTypeCategory.java | 2212 -- .../dlp/v2/InfoTypeCategoryOrBuilder.java | 98 - .../privacy/dlp/v2/InfoTypeDescription.java | 2152 -- .../dlp/v2/InfoTypeDescriptionOrBuilder.java | 208 - .../privacy/dlp/v2/InfoTypeOrBuilder.java | 57 - .../google/privacy/dlp/v2/InfoTypeStats.java | 746 - .../dlp/v2/InfoTypeStatsOrBuilder.java | 46 - .../privacy/dlp/v2/InfoTypeSummary.java | 749 - .../dlp/v2/InfoTypeSummaryOrBuilder.java | 47 - .../privacy/dlp/v2/InfoTypeSupportedBy.java | 150 - .../dlp/v2/InfoTypeTransformations.java | 2137 -- .../v2/InfoTypeTransformationsOrBuilder.java | 58 - .../google/privacy/dlp/v2/InspectConfig.java | 4924 ---- .../dlp/v2/InspectConfigOrBuilder.java | 336 - .../privacy/dlp/v2/InspectContentRequest.java | 1516 -- .../v2/InspectContentRequestOrBuilder.java | 156 - .../dlp/v2/InspectContentResponse.java | 665 - .../v2/InspectContentResponseOrBuilder.java | 36 - .../dlp/v2/InspectDataSourceDetails.java | 3258 --- .../v2/InspectDataSourceDetailsOrBuilder.java | 63 - .../privacy/dlp/v2/InspectJobConfig.java | 1524 -- .../dlp/v2/InspectJobConfigOrBuilder.java | 131 - .../google/privacy/dlp/v2/InspectResult.java | 973 - .../dlp/v2/InspectResultOrBuilder.java | 68 - .../privacy/dlp/v2/InspectTemplate.java | 1662 -- .../privacy/dlp/v2/InspectTemplateName.java | 496 - .../dlp/v2/InspectTemplateOrBuilder.java | 156 - .../google/privacy/dlp/v2/InspectionRule.java | 1026 - .../dlp/v2/InspectionRuleOrBuilder.java | 65 - .../privacy/dlp/v2/InspectionRuleSet.java | 1314 - .../dlp/v2/InspectionRuleSetOrBuilder.java | 97 - .../com/google/privacy/dlp/v2/JobTrigger.java | 4349 ---- .../google/privacy/dlp/v2/JobTriggerName.java | 313 - .../privacy/dlp/v2/JobTriggerOrBuilder.java | 315 - .../java/com/google/privacy/dlp/v2/Key.java | 2449 -- .../google/privacy/dlp/v2/KeyOrBuilder.java | 121 - .../google/privacy/dlp/v2/KindExpression.java | 595 - .../dlp/v2/KindExpressionOrBuilder.java | 29 - .../privacy/dlp/v2/KmsWrappedCryptoKey.java | 695 - .../dlp/v2/KmsWrappedCryptoKeyOrBuilder.java | 39 - .../dlp/v2/LargeCustomDictionaryConfig.java | 1306 - .../LargeCustomDictionaryConfigOrBuilder.java | 101 - .../dlp/v2/LargeCustomDictionaryStats.java | 510 - .../LargeCustomDictionaryStatsOrBuilder.java | 19 - .../com/google/privacy/dlp/v2/Likelihood.java | 186 - .../v2/ListDeidentifyTemplatesRequest.java | 1352 - ...stDeidentifyTemplatesRequestOrBuilder.java | 150 - .../v2/ListDeidentifyTemplatesResponse.java | 1068 - ...tDeidentifyTemplatesResponseOrBuilder.java | 80 - .../privacy/dlp/v2/ListDlpJobsRequest.java | 1757 -- .../dlp/v2/ListDlpJobsRequestOrBuilder.java | 222 - .../privacy/dlp/v2/ListDlpJobsResponse.java | 1038 - .../dlp/v2/ListDlpJobsResponseOrBuilder.java | 73 - .../privacy/dlp/v2/ListInfoTypesRequest.java | 1128 - .../dlp/v2/ListInfoTypesRequestOrBuilder.java | 99 - .../privacy/dlp/v2/ListInfoTypesResponse.java | 872 - .../v2/ListInfoTypesResponseOrBuilder.java | 53 - .../dlp/v2/ListInspectTemplatesRequest.java | 1352 - .../ListInspectTemplatesRequestOrBuilder.java | 150 - .../dlp/v2/ListInspectTemplatesResponse.java | 1045 - ...ListInspectTemplatesResponseOrBuilder.java | 75 - .../dlp/v2/ListJobTriggersRequest.java | 1757 -- .../v2/ListJobTriggersRequestOrBuilder.java | 222 - .../dlp/v2/ListJobTriggersResponse.java | 1045 - .../v2/ListJobTriggersResponseOrBuilder.java | 75 - .../dlp/v2/ListStoredInfoTypesRequest.java | 1331 - .../ListStoredInfoTypesRequestOrBuilder.java | 144 - .../dlp/v2/ListStoredInfoTypesResponse.java | 1045 - .../ListStoredInfoTypesResponseOrBuilder.java | 75 - .../com/google/privacy/dlp/v2/Location.java | 1675 -- .../google/privacy/dlp/v2/LocationName.java | 192 - .../privacy/dlp/v2/LocationOrBuilder.java | 157 - .../com/google/privacy/dlp/v2/Manual.java | 431 - .../privacy/dlp/v2/ManualOrBuilder.java | 9 - .../google/privacy/dlp/v2/MatchingType.java | 187 - .../privacy/dlp/v2/MetadataLocation.java | 885 - .../dlp/v2/MetadataLocationOrBuilder.java | 57 - .../google/privacy/dlp/v2/MetadataType.java | 133 - .../dlp/v2/OrganizationLocationName.java | 192 - .../privacy/dlp/v2/OrganizationName.java | 168 - .../privacy/dlp/v2/OtherInfoTypeSummary.java | 749 - .../dlp/v2/OtherInfoTypeSummaryOrBuilder.java | 47 - .../privacy/dlp/v2/OutputStorageConfig.java | 1272 - .../dlp/v2/OutputStorageConfigOrBuilder.java | 106 - .../google/privacy/dlp/v2/PartitionId.java | 769 - .../privacy/dlp/v2/PartitionIdOrBuilder.java | 49 - .../dlp/v2/PrimitiveTransformation.java | 3654 --- .../v2/PrimitiveTransformationOrBuilder.java | 335 - .../google/privacy/dlp/v2/PrivacyMetric.java | 13589 ---------- .../dlp/v2/PrivacyMetricOrBuilder.java | 173 - .../google/privacy/dlp/v2/ProfileStatus.java | 893 - .../dlp/v2/ProfileStatusOrBuilder.java | 63 - .../google/privacy/dlp/v2/ProjectName.java | 168 - .../com/google/privacy/dlp/v2/QuasiId.java | 1554 -- .../privacy/dlp/v2/QuasiIdOrBuilder.java | 142 - .../com/google/privacy/dlp/v2/QuoteInfo.java | 761 - .../privacy/dlp/v2/QuoteInfoOrBuilder.java | 38 - .../java/com/google/privacy/dlp/v2/Range.java | 591 - .../google/privacy/dlp/v2/RangeOrBuilder.java | 29 - .../privacy/dlp/v2/RecordCondition.java | 3780 --- .../dlp/v2/RecordConditionOrBuilder.java | 36 - .../com/google/privacy/dlp/v2/RecordKey.java | 1188 - .../privacy/dlp/v2/RecordKeyOrBuilder.java | 86 - .../google/privacy/dlp/v2/RecordLocation.java | 1137 - .../dlp/v2/RecordLocationOrBuilder.java | 90 - .../privacy/dlp/v2/RecordSuppression.java | 679 - .../dlp/v2/RecordSuppressionOrBuilder.java | 39 - .../privacy/dlp/v2/RecordTransformations.java | 1337 - .../v2/RecordTransformationsOrBuilder.java | 102 - .../google/privacy/dlp/v2/RedactConfig.java | 433 - .../privacy/dlp/v2/RedactConfigOrBuilder.java | 9 - .../privacy/dlp/v2/RedactImageRequest.java | 3097 --- .../dlp/v2/RedactImageRequestOrBuilder.java | 180 - .../privacy/dlp/v2/RedactImageResponse.java | 929 - .../dlp/v2/RedactImageResponseOrBuilder.java | 70 - .../dlp/v2/ReidentifyContentRequest.java | 2044 -- .../v2/ReidentifyContentRequestOrBuilder.java | 236 - .../dlp/v2/ReidentifyContentResponse.java | 901 - .../ReidentifyContentResponseOrBuilder.java | 63 - .../privacy/dlp/v2/RelationalOperator.java | 235 - .../dlp/v2/ReplaceDictionaryConfig.java | 785 - .../v2/ReplaceDictionaryConfigOrBuilder.java | 44 - .../privacy/dlp/v2/ReplaceValueConfig.java | 665 - .../dlp/v2/ReplaceValueConfigOrBuilder.java | 36 - .../dlp/v2/ReplaceWithInfoTypeConfig.java | 429 - .../ReplaceWithInfoTypeConfigOrBuilder.java | 9 - .../privacy/dlp/v2/ResourceVisibility.java | 151 - .../privacy/dlp/v2/RiskAnalysisJobConfig.java | 1369 - .../v2/RiskAnalysisJobConfigOrBuilder.java | 112 - .../com/google/privacy/dlp/v2/Schedule.java | 821 - .../privacy/dlp/v2/ScheduleOrBuilder.java | 53 - .../privacy/dlp/v2/SensitivityScore.java | 725 - .../dlp/v2/SensitivityScoreOrBuilder.java | 28 - .../privacy/dlp/v2/StatisticalTable.java | 2265 -- .../dlp/v2/StatisticalTableOrBuilder.java | 110 - .../google/privacy/dlp/v2/StorageConfig.java | 3488 --- .../dlp/v2/StorageConfigOrBuilder.java | 134 - .../privacy/dlp/v2/StorageMetadataLabel.java | 567 - .../dlp/v2/StorageMetadataLabelOrBuilder.java | 21 - .../google/privacy/dlp/v2/StoredInfoType.java | 1299 - .../privacy/dlp/v2/StoredInfoTypeConfig.java | 1623 -- .../dlp/v2/StoredInfoTypeConfigOrBuilder.java | 132 - .../privacy/dlp/v2/StoredInfoTypeName.java | 495 - .../dlp/v2/StoredInfoTypeOrBuilder.java | 105 - .../privacy/dlp/v2/StoredInfoTypeState.java | 190 - .../privacy/dlp/v2/StoredInfoTypeStats.java | 761 - .../dlp/v2/StoredInfoTypeStatsOrBuilder.java | 38 - .../privacy/dlp/v2/StoredInfoTypeVersion.java | 1955 -- .../v2/StoredInfoTypeVersionOrBuilder.java | 208 - .../com/google/privacy/dlp/v2/StoredType.java | 857 - .../privacy/dlp/v2/StoredTypeOrBuilder.java | 63 - .../java/com/google/privacy/dlp/v2/Table.java | 2231 -- .../privacy/dlp/v2/TableDataProfile.java | 5572 ---- .../dlp/v2/TableDataProfileOrBuilder.java | 615 - .../google/privacy/dlp/v2/TableLocation.java | 530 - .../dlp/v2/TableLocationOrBuilder.java | 24 - .../google/privacy/dlp/v2/TableOptions.java | 941 - .../privacy/dlp/v2/TableOptionsOrBuilder.java | 68 - .../google/privacy/dlp/v2/TableOrBuilder.java | 97 - .../google/privacy/dlp/v2/TimePartConfig.java | 768 - .../dlp/v2/TimePartConfigOrBuilder.java | 28 - .../dlp/v2/TransformationErrorHandling.java | 1900 -- .../TransformationErrorHandlingOrBuilder.java | 65 - .../dlp/v2/TransformationOverview.java | 953 - .../v2/TransformationOverviewOrBuilder.java | 63 - .../privacy/dlp/v2/TransformationSummary.java | 3391 --- .../v2/TransformationSummaryOrBuilder.java | 225 - .../privacy/dlp/v2/TransientCryptoKey.java | 632 - .../dlp/v2/TransientCryptoKeyOrBuilder.java | 39 - .../privacy/dlp/v2/UnwrappedCryptoKey.java | 515 - .../dlp/v2/UnwrappedCryptoKeyOrBuilder.java | 19 - .../v2/UpdateDeidentifyTemplateRequest.java | 1081 - ...ateDeidentifyTemplateRequestOrBuilder.java | 87 - .../dlp/v2/UpdateInspectTemplateRequest.java | 1081 - ...UpdateInspectTemplateRequestOrBuilder.java | 87 - .../dlp/v2/UpdateJobTriggerRequest.java | 1074 - .../v2/UpdateJobTriggerRequestOrBuilder.java | 85 - .../dlp/v2/UpdateStoredInfoTypeRequest.java | 1105 - .../UpdateStoredInfoTypeRequestOrBuilder.java | 93 - .../java/com/google/privacy/dlp/v2/Value.java | 2037 -- .../google/privacy/dlp/v2/ValueFrequency.java | 746 - .../dlp/v2/ValueFrequencyOrBuilder.java | 46 - .../google/privacy/dlp/v2/ValueOrBuilder.java | 206 - .../proto/google/privacy/dlp/v2/dlp.proto | 5372 ---- .../proto/google/privacy/dlp/v2/storage.proto | 808 - 453 files changed, 11853 insertions(+), 322115 deletions(-) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java (60%) create mode 100644 java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java (71%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java (72%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java (76%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java (78%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java (59%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java (73%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java (79%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java (78%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java (86%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java (71%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java (74%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java (73%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java (80%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java (69%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java (69%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java (72%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java (74%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java (69%) rename {owl-bot-staging/java-dlp/v2 => java-dlp}/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java (52%) delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/gapic_metadata.json delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceStub.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientTest.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpService.java delete mode 100644 owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpServiceImpl.java delete mode 100644 owl-bot-staging/java-dlp/v2/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryField.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryFieldOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKey.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKeyOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptions.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptionsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTable.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTableOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBox.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBoxOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItemOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnoreOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSet.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSetOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePathOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSet.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSetOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Color.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ColorOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKey.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKeyOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileAction.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileActionOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshot.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshotOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocation.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubConditionOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessageOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevelOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKey.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKeyOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptions.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptionsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTime.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTimeOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpContentName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocation.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityId.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityIdOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Error.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ErrorOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypesOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRule.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRuleOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldId.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldIdOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformation.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItem.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItemOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetails.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetailsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatisticsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptions.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptionsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocation.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategory.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategoryOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStats.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStatsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformationsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetails.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetailsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResult.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResultOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRule.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSet.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSetOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Key.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KeyOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpression.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpressionOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKey.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKeyOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStats.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStatsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Location.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Manual.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ManualOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocation.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationLocationName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionId.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionIdOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformation.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatus.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatusOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfo.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfoOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Range.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RangeOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordConditionOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKey.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKeyOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocation.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppression.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppressionOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformations.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabel.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabelOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoType.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeName.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStats.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStatsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredType.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredTypeOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfile.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfileOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocation.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocationOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptions.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptionsOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfig.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandling.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandlingOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverview.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverviewOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummary.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummaryOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKey.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKeyOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKey.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKeyOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequest.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Value.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequency.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequencyOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueOrBuilder.java delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto delete mode 100644 owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto diff --git a/java-dlp/README.md b/java-dlp/README.md index 9c15b07045fe..76550c4f6802 100644 --- a/java-dlp/README.md +++ b/java-dlp/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.1.0 + 26.1.1 pom import @@ -50,7 +50,7 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.1.0') +implementation platform('com.google.cloud:libraries-bom:26.1.1') implementation 'com.google.cloud:google-cloud-dlp' ``` diff --git a/java-dlp/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java b/java-dlp/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java index 2a7392d8c349..a257231cc257 100644 --- a/java-dlp/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java +++ b/java-dlp/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java @@ -528,7 +528,7 @@ public final ReidentifyContentResponse reidentifyContent(ReidentifyContentReques // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of the sensitive information types that the DLP API supports. See + * Returns a list of the sensitive information types that DLP API supports. See * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. * *

Sample code: @@ -554,7 +554,7 @@ public final ListInfoTypesResponse listInfoTypes(String parent) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of the sensitive information types that the DLP API supports. See + * Returns a list of the sensitive information types that DLP API supports. See * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. * *

Sample code: @@ -583,7 +583,7 @@ public final ListInfoTypesResponse listInfoTypes(ListInfoTypesRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of the sensitive information types that the DLP API supports. See + * Returns a list of the sensitive information types that DLP API supports. See * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. * *

Sample code: @@ -612,7 +612,7 @@ public final UnaryCallable listInfo // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an InspectTemplate for re-using frequently used configuration for inspecting content, + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: @@ -657,7 +657,7 @@ public final InspectTemplate createInspectTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an InspectTemplate for re-using frequently used configuration for inspecting content, + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: @@ -702,7 +702,7 @@ public final InspectTemplate createInspectTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an InspectTemplate for re-using frequently used configuration for inspecting content, + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: @@ -747,7 +747,7 @@ public final InspectTemplate createInspectTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an InspectTemplate for re-using frequently used configuration for inspecting content, + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: @@ -792,7 +792,7 @@ public final InspectTemplate createInspectTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an InspectTemplate for re-using frequently used configuration for inspecting content, + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: @@ -837,7 +837,7 @@ public final InspectTemplate createInspectTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an InspectTemplate for re-using frequently used configuration for inspecting content, + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: @@ -866,7 +866,7 @@ public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates an InspectTemplate for re-using frequently used configuration for inspecting content, + * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: @@ -1589,7 +1589,7 @@ public final UnaryCallable deleteInspectTem // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to * learn more. * @@ -1636,7 +1636,7 @@ public final DeidentifyTemplate createDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to * learn more. * @@ -1683,7 +1683,7 @@ public final DeidentifyTemplate createDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to * learn more. * @@ -1730,7 +1730,7 @@ public final DeidentifyTemplate createDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to * learn more. * @@ -1777,7 +1777,7 @@ public final DeidentifyTemplate createDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to * learn more. * @@ -1824,7 +1824,7 @@ public final DeidentifyTemplate createDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to * learn more. * @@ -1855,7 +1855,7 @@ public final DeidentifyTemplate createDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying + * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to * learn more. * @@ -4142,7 +4142,7 @@ public final UnaryCallable getDlpJobCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be cancelled if possible. See + * the DlpJob result. The job will be canceled if possible. See * https://cloud.google.com/dlp/docs/inspecting-storage and * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * @@ -4169,7 +4169,7 @@ public final void deleteDlpJob(DlpJobName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be cancelled if possible. See + * the DlpJob result. The job will be canceled if possible. See * https://cloud.google.com/dlp/docs/inspecting-storage and * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * @@ -4195,7 +4195,7 @@ public final void deleteDlpJob(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be cancelled if possible. See + * the DlpJob result. The job will be canceled if possible. See * https://cloud.google.com/dlp/docs/inspecting-storage and * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * @@ -4223,7 +4223,7 @@ public final void deleteDlpJob(DeleteDlpJobRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be cancelled if possible. See + * the DlpJob result. The job will be canceled if possible. See * https://cloud.google.com/dlp/docs/inspecting-storage and * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * @@ -4871,11 +4871,7 @@ public final UnaryCallable getStoredIn *

+ Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> + * `projects/`<var>PROJECT_ID</var> *

The following example `parent` string specifies a parent project with the identifier * `example-project`, and specifies the `europe-west3` location for processing data: *

parent=projects/example-project/locations/europe-west3 @@ -4914,11 +4910,7 @@ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(LocationName p *

+ Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> + * `projects/`<var>PROJECT_ID</var> *

The following example `parent` string specifies a parent project with the identifier * `example-project`, and specifies the `europe-west3` location for processing data: *

parent=projects/example-project/locations/europe-west3 @@ -4958,11 +4950,7 @@ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes( *

+ Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> + * `projects/`<var>PROJECT_ID</var> *

The following example `parent` string specifies a parent project with the identifier * `example-project`, and specifies the `europe-west3` location for processing data: *

parent=projects/example-project/locations/europe-west3 @@ -5001,11 +4989,7 @@ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(OrganizationNa *

+ Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> + * `projects/`<var>PROJECT_ID</var> *

The following example `parent` string specifies a parent project with the identifier * `example-project`, and specifies the `europe-west3` location for processing data: *

parent=projects/example-project/locations/europe-west3 @@ -5044,11 +5028,7 @@ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(ProjectName pa *

+ Projects scope, location specified:<br/> * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> + * `projects/`<var>PROJECT_ID</var> *

The following example `parent` string specifies a parent project with the identifier * `example-project`, and specifies the `europe-west3` location for processing data: *

parent=projects/example-project/locations/europe-west3 diff --git a/java-dlp/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java b/java-dlp/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java index 6f4b5922ea30..d5f3bc09e241 100644 --- a/java-dlp/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java +++ b/java-dlp/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java @@ -1725,7 +1725,7 @@ public void reidentifyContent( * * *

-     * Returns a list of the sensitive information types that the DLP API
+     * Returns a list of the sensitive information types that DLP API
      * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
      * learn more.
      * 
@@ -1742,7 +1742,7 @@ public void listInfoTypes( * * *
-     * Creates an InspectTemplate for re-using frequently used configuration
+     * Creates an InspectTemplate for reusing frequently used configuration
      * for inspecting content, images, and storage.
      * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
@@ -1819,7 +1819,7 @@ public void deleteInspectTemplate( * * *
-     * Creates a DeidentifyTemplate for re-using frequently used configuration
+     * Creates a DeidentifyTemplate for reusing frequently used configuration
      * for de-identifying content, images, and storage.
      * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
      * more.
@@ -2065,7 +2065,7 @@ public void getDlpJob(
      *
      * 
      * Deletes a long-running DlpJob. This method indicates that the client is
-     * no longer interested in the DlpJob result. The job will be cancelled if
+     * no longer interested in the DlpJob result. The job will be canceled if
      * possible.
      * See https://cloud.google.com/dlp/docs/inspecting-storage and
      * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
@@ -2557,7 +2557,7 @@ public void reidentifyContent(
      *
      *
      * 
-     * Returns a list of the sensitive information types that the DLP API
+     * Returns a list of the sensitive information types that DLP API
      * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
      * learn more.
      * 
@@ -2576,7 +2576,7 @@ public void listInfoTypes( * * *
-     * Creates an InspectTemplate for re-using frequently used configuration
+     * Creates an InspectTemplate for reusing frequently used configuration
      * for inspecting content, images, and storage.
      * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
@@ -2663,7 +2663,7 @@ public void deleteInspectTemplate( * * *
-     * Creates a DeidentifyTemplate for re-using frequently used configuration
+     * Creates a DeidentifyTemplate for reusing frequently used configuration
      * for de-identifying content, images, and storage.
      * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
      * more.
@@ -2938,7 +2938,7 @@ public void getDlpJob(
      *
      * 
      * Deletes a long-running DlpJob. This method indicates that the client is
-     * no longer interested in the DlpJob result. The job will be cancelled if
+     * no longer interested in the DlpJob result. The job will be canceled if
      * possible.
      * See https://cloud.google.com/dlp/docs/inspecting-storage and
      * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
@@ -3205,7 +3205,7 @@ public com.google.privacy.dlp.v2.ReidentifyContentResponse reidentifyContent(
      *
      *
      * 
-     * Returns a list of the sensitive information types that the DLP API
+     * Returns a list of the sensitive information types that DLP API
      * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
      * learn more.
      * 
@@ -3220,7 +3220,7 @@ public com.google.privacy.dlp.v2.ListInfoTypesResponse listInfoTypes( * * *
-     * Creates an InspectTemplate for re-using frequently used configuration
+     * Creates an InspectTemplate for reusing frequently used configuration
      * for inspecting content, images, and storage.
      * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
@@ -3291,7 +3291,7 @@ public com.google.protobuf.Empty deleteInspectTemplate( * * *
-     * Creates a DeidentifyTemplate for re-using frequently used configuration
+     * Creates a DeidentifyTemplate for reusing frequently used configuration
      * for de-identifying content, images, and storage.
      * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
      * more.
@@ -3516,7 +3516,7 @@ public com.google.privacy.dlp.v2.DlpJob getDlpJob(
      *
      * 
      * Deletes a long-running DlpJob. This method indicates that the client is
-     * no longer interested in the DlpJob result. The job will be cancelled if
+     * no longer interested in the DlpJob result. The job will be canceled if
      * possible.
      * See https://cloud.google.com/dlp/docs/inspecting-storage and
      * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
@@ -3757,7 +3757,7 @@ protected DlpServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      *
      *
      * 
-     * Returns a list of the sensitive information types that the DLP API
+     * Returns a list of the sensitive information types that DLP API
      * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
      * learn more.
      * 
@@ -3773,7 +3773,7 @@ protected DlpServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption * * *
-     * Creates an InspectTemplate for re-using frequently used configuration
+     * Creates an InspectTemplate for reusing frequently used configuration
      * for inspecting content, images, and storage.
      * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
@@ -3848,7 +3848,7 @@ protected DlpServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption * * *
-     * Creates a DeidentifyTemplate for re-using frequently used configuration
+     * Creates a DeidentifyTemplate for reusing frequently used configuration
      * for de-identifying content, images, and storage.
      * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
      * more.
@@ -4083,7 +4083,7 @@ protected DlpServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption
      *
      * 
      * Deletes a long-running DlpJob. This method indicates that the client is
-     * no longer interested in the DlpJob result. The job will be cancelled if
+     * no longer interested in the DlpJob result. The job will be canceled if
      * possible.
      * See https://cloud.google.com/dlp/docs/inspecting-storage and
      * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java
index cf357f4ee8f5..a53a5ea978a4 100644
--- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java
@@ -142,6 +142,22 @@ private Action(
               actionCase_ = 5;
               break;
             }
+          case 58:
+            {
+              com.google.privacy.dlp.v2.Action.Deidentify.Builder subBuilder = null;
+              if (actionCase_ == 7) {
+                subBuilder = ((com.google.privacy.dlp.v2.Action.Deidentify) action_).toBuilder();
+              }
+              action_ =
+                  input.readMessage(
+                      com.google.privacy.dlp.v2.Action.Deidentify.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.Deidentify) action_);
+                action_ = subBuilder.buildPartial();
+              }
+              actionCase_ = 7;
+              break;
+            }
           case 66:
             {
               com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder subBuilder = null;
@@ -1022,7 +1038,7 @@ public interface PublishToPubSubOrBuilder
    *
    *
    * 
-   * Publish a message into given Pub/Sub topic when DlpJob has completed. The
+   * Publish a message into a given Pub/Sub topic when DlpJob has completed. The
    * message contains a single field, `DlpJobName`, which is equal to the
    * finished job's
    * [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob).
@@ -1336,7 +1352,7 @@ protected Builder newBuilderForType(
      *
      *
      * 
-     * Publish a message into given Pub/Sub topic when DlpJob has completed. The
+     * Publish a message into a given Pub/Sub topic when DlpJob has completed. The
      * message contains a single field, `DlpJobName`, which is equal to the
      * finished job's
      * [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob).
@@ -1684,11 +1700,11 @@ public interface PublishSummaryToCsccOrBuilder
    * This action is only available for projects which are parts of
    * an organization and whitelisted for the alpha Cloud Security Command
    * Center.
-   * The action will publish count of finding instances and their info types.
-   * The summary of findings will be persisted in CSCC and are governed by CSCC
-   * service-specific policy, see https://cloud.google.com/terms/service-terms
-   * Only a single instance of this action can be specified.
-   * Compatible with: Inspect
+   * The action will publish the count of finding instances and their info
+   * types. The summary of findings will be persisted in CSCC and are governed
+   * by CSCC service-specific policy, see
+   * https://cloud.google.com/terms/service-terms Only a single instance of this
+   * action can be specified. Compatible with: Inspect
    * 
* * Protobuf type {@code google.privacy.dlp.v2.Action.PublishSummaryToCscc} @@ -1931,11 +1947,11 @@ protected Builder newBuilderForType( * This action is only available for projects which are parts of * an organization and whitelisted for the alpha Cloud Security Command * Center. - * The action will publish count of finding instances and their info types. - * The summary of findings will be persisted in CSCC and are governed by CSCC - * service-specific policy, see https://cloud.google.com/terms/service-terms - * Only a single instance of this action can be specified. - * Compatible with: Inspect + * The action will publish the count of finding instances and their info + * types. The summary of findings will be persisted in CSCC and are governed + * by CSCC service-specific policy, see + * https://cloud.google.com/terms/service-terms Only a single instance of this + * action can be specified. Compatible with: Inspect *
* * Protobuf type {@code google.privacy.dlp.v2.Action.PublishSummaryToCscc} @@ -2146,15 +2162,21 @@ public interface PublishFindingsToCloudDataCatalogOrBuilder * * *
-   * Publish findings of a DlpJob to Data Catalog. Labels summarizing the
-   * results of the DlpJob will be applied to the entry for the resource scanned
-   * in Data Catalog. Any labels previously written by another DlpJob will
-   * be deleted. InfoType naming patterns are strictly enforced when using this
-   * feature. Note that the findings will be persisted in Data Catalog
-   * storage and are governed by Data Catalog service-specific policy, see
-   * https://cloud.google.com/terms/service-terms
-   * Only a single instance of this action can be specified and only allowed if
-   * all resources being scanned are BigQuery tables.
+   * Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag
+   * templates are applied to the resource that Cloud DLP scanned. Data
+   * Catalog tag templates are stored in the same project and region where the
+   * BigQuery table exists. For Cloud DLP to create and apply the tag template,
+   * the Cloud DLP service agent must have the
+   * `roles/datacatalog.tagTemplateOwner` permission on the project. The tag
+   * template contains fields summarizing the results of the DlpJob. Any field
+   * values previously written by another DlpJob are deleted. [InfoType naming
+   * patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using
+   * this feature.
+   * Findings are persisted in Data Catalog storage and are governed by
+   * service-specific policies for Data Catalog. For more information, see
+   * [Service Specific Terms](https://cloud.google.com/terms/service-terms).
+   * Only a single instance of this action can be specified. This action is
+   * allowed only if all resources being scanned are BigQuery tables.
    * Compatible with: Inspect
    * 
* @@ -2396,15 +2418,21 @@ protected Builder newBuilderForType( * * *
-     * Publish findings of a DlpJob to Data Catalog. Labels summarizing the
-     * results of the DlpJob will be applied to the entry for the resource scanned
-     * in Data Catalog. Any labels previously written by another DlpJob will
-     * be deleted. InfoType naming patterns are strictly enforced when using this
-     * feature. Note that the findings will be persisted in Data Catalog
-     * storage and are governed by Data Catalog service-specific policy, see
-     * https://cloud.google.com/terms/service-terms
-     * Only a single instance of this action can be specified and only allowed if
-     * all resources being scanned are BigQuery tables.
+     * Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag
+     * templates are applied to the resource that Cloud DLP scanned. Data
+     * Catalog tag templates are stored in the same project and region where the
+     * BigQuery table exists. For Cloud DLP to create and apply the tag template,
+     * the Cloud DLP service agent must have the
+     * `roles/datacatalog.tagTemplateOwner` permission on the project. The tag
+     * template contains fields summarizing the results of the DlpJob. Any field
+     * values previously written by another DlpJob are deleted. [InfoType naming
+     * patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using
+     * this feature.
+     * Findings are persisted in Data Catalog storage and are governed by
+     * service-specific policies for Data Catalog. For more information, see
+     * [Service Specific Terms](https://cloud.google.com/terms/service-terms).
+     * Only a single instance of this action can be specified. This action is
+     * allowed only if all resources being scanned are BigQuery tables.
      * Compatible with: Inspect
      * 
* @@ -2526,40 +2554,2284 @@ public Builder mergeFrom(com.google.protobuf.Message other) { return this; } } - - public Builder mergeFrom( - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog other) { - if (other - == com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog - .getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + + public Builder mergeFrom( + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog other) { + if (other + == com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + private static final com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog(); + } + + public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublishFindingsToCloudDataCatalog parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PublishFindingsToCloudDataCatalog(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeidentifyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.Deidentify) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * + * @return Whether the transformationConfig field is set. + */ + boolean hasTransformationConfig(); + /** + * + * + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * + * @return The transformationConfig. + */ + com.google.privacy.dlp.v2.TransformationConfig getTransformationConfig(); + /** + * + * + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + com.google.privacy.dlp.v2.TransformationConfigOrBuilder getTransformationConfigOrBuilder(); + + /** + * + * + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + * + * @return Whether the transformationDetailsStorageConfig field is set. + */ + boolean hasTransformationDetailsStorageConfig(); + /** + * + * + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + * + * @return The transformationDetailsStorageConfig. + */ + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig + getTransformationDetailsStorageConfig(); + /** + * + * + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + */ + com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder + getTransformationDetailsStorageConfigOrBuilder(); + + /** + * + * + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the cloudStorageOutput field is set. + */ + boolean hasCloudStorageOutput(); + /** + * + * + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cloudStorageOutput. + */ + java.lang.String getCloudStorageOutput(); + /** + * + * + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for cloudStorageOutput. + */ + com.google.protobuf.ByteString getCloudStorageOutputBytes(); + + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return A list containing the fileTypesToTransform. + */ + java.util.List getFileTypesToTransformList(); + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return The count of fileTypesToTransform. + */ + int getFileTypesToTransformCount(); + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param index The index of the element to return. + * @return The fileTypesToTransform at the given index. + */ + com.google.privacy.dlp.v2.FileType getFileTypesToTransform(int index); + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return A list containing the enum numeric values on the wire for fileTypesToTransform. + */ + java.util.List getFileTypesToTransformValueList(); + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fileTypesToTransform at the given index. + */ + int getFileTypesToTransformValue(int index); + + public com.google.privacy.dlp.v2.Action.Deidentify.OutputCase getOutputCase(); + } + /** + * + * + *
+   * Create a de-identified copy of the requested table or files.
+   * A TransformationDetail will be created for each transformation.
+   * If any rows in BigQuery are skipped during de-identification
+   * (transformation errors or row size exceeds BigQuery insert API limits) they
+   * are placed in the failure output table. If the original row exceeds
+   * the BigQuery insert API limit it will be truncated when written to the
+   * failure output table. The failure output table can be set in the
+   * action.deidentify.output.big_query_output.deidentified_failure_output_table
+   * field, if no table is set, a table will be automatically created in the
+   * same project and dataset as the original table.
+   * Compatible with: Inspect
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.Deidentify} + */ + public static final class Deidentify extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.Deidentify) + DeidentifyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Deidentify.newBuilder() to construct. + private Deidentify(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Deidentify() { + fileTypesToTransform_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Deidentify(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Deidentify( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder subBuilder = + null; + if (transformationDetailsStorageConfig_ != null) { + subBuilder = transformationDetailsStorageConfig_.toBuilder(); + } + transformationDetailsStorageConfig_ = + input.readMessage( + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transformationDetailsStorageConfig_); + transformationDetailsStorageConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.privacy.dlp.v2.TransformationConfig.Builder subBuilder = null; + if (transformationConfig_ != null) { + subBuilder = transformationConfig_.toBuilder(); + } + transformationConfig_ = + input.readMessage( + com.google.privacy.dlp.v2.TransformationConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transformationConfig_); + transformationConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fileTypesToTransform_.add(rawValue); + break; + } + case 66: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fileTypesToTransform_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + outputCase_ = 9; + output_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = java.util.Collections.unmodifiableList(fileTypesToTransform_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.Deidentify.class, + com.google.privacy.dlp.v2.Action.Deidentify.Builder.class); + } + + private int outputCase_ = 0; + private java.lang.Object output_; + + public enum OutputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_STORAGE_OUTPUT(9), + OUTPUT_NOT_SET(0); + private final int value; + + private OutputCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OutputCase valueOf(int value) { + return forNumber(value); + } + + public static OutputCase forNumber(int value) { + switch (value) { + case 9: + return CLOUD_STORAGE_OUTPUT; + case 0: + return OUTPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public static final int TRANSFORMATION_CONFIG_FIELD_NUMBER = 7; + private com.google.privacy.dlp.v2.TransformationConfig transformationConfig_; + /** + * + * + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * + * @return Whether the transformationConfig field is set. + */ + @java.lang.Override + public boolean hasTransformationConfig() { + return transformationConfig_ != null; + } + /** + * + * + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * + * @return The transformationConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationConfig getTransformationConfig() { + return transformationConfig_ == null + ? com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance() + : transformationConfig_; + } + /** + * + * + *
+     * User specified deidentify templates and configs for structured,
+     * unstructured, and image files.
+     * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationConfigOrBuilder + getTransformationConfigOrBuilder() { + return getTransformationConfig(); + } + + public static final int TRANSFORMATION_DETAILS_STORAGE_CONFIG_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.TransformationDetailsStorageConfig + transformationDetailsStorageConfig_; + /** + * + * + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + * + * @return Whether the transformationDetailsStorageConfig field is set. + */ + @java.lang.Override + public boolean hasTransformationDetailsStorageConfig() { + return transformationDetailsStorageConfig_ != null; + } + /** + * + * + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + * + * @return The transformationDetailsStorageConfig. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig + getTransformationDetailsStorageConfig() { + return transformationDetailsStorageConfig_ == null + ? com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance() + : transformationDetailsStorageConfig_; + } + /** + * + * + *
+     * Config for storing transformation details. This is separate from the
+     * de-identified content, and contains metadata about the successful
+     * transformations and/or failures that occurred while de-identifying. This
+     * needs to be set in order for users to access information about the status
+     * of each transformation (see
+     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+     * message for more information about what is noted).
+     * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + */ + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder + getTransformationDetailsStorageConfigOrBuilder() { + return getTransformationDetailsStorageConfig(); + } + + public static final int CLOUD_STORAGE_OUTPUT_FIELD_NUMBER = 9; + /** + * + * + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the cloudStorageOutput field is set. + */ + public boolean hasCloudStorageOutput() { + return outputCase_ == 9; + } + /** + * + * + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cloudStorageOutput. + */ + public java.lang.String getCloudStorageOutput() { + java.lang.Object ref = ""; + if (outputCase_ == 9) { + ref = output_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (outputCase_ == 9) { + output_ = s; + } + return s; + } + } + /** + * + * + *
+     * Required. User settable Cloud Storage bucket and folders to store de-identified
+     * files. This field must be set for cloud storage deidentification. The
+     * output Cloud Storage bucket must be different from the input bucket.
+     * De-identified files will overwrite files in the output path.
+     * Form of: gs://bucket/folder/ or gs://bucket
+     * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for cloudStorageOutput. + */ + public com.google.protobuf.ByteString getCloudStorageOutputBytes() { + java.lang.Object ref = ""; + if (outputCase_ == 9) { + ref = output_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (outputCase_ == 9) { + output_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_TYPES_TO_TRANSFORM_FIELD_NUMBER = 8; + private java.util.List fileTypesToTransform_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType> + fileTypesToTransform_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType>() { + public com.google.privacy.dlp.v2.FileType convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.privacy.dlp.v2.FileType result = + com.google.privacy.dlp.v2.FileType.valueOf(from); + return result == null ? com.google.privacy.dlp.v2.FileType.UNRECOGNIZED : result; + } + }; + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return A list containing the fileTypesToTransform. + */ + @java.lang.Override + public java.util.List getFileTypesToTransformList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType>( + fileTypesToTransform_, fileTypesToTransform_converter_); + } + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return The count of fileTypesToTransform. + */ + @java.lang.Override + public int getFileTypesToTransformCount() { + return fileTypesToTransform_.size(); + } + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param index The index of the element to return. + * @return The fileTypesToTransform at the given index. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.FileType getFileTypesToTransform(int index) { + return fileTypesToTransform_converter_.convert(fileTypesToTransform_.get(index)); + } + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return A list containing the enum numeric values on the wire for fileTypesToTransform. + */ + @java.lang.Override + public java.util.List getFileTypesToTransformValueList() { + return fileTypesToTransform_; + } + /** + * + * + *
+     * List of user-specified file type groups to transform. If specified, only
+     * the files with these filetypes will be transformed. If empty, all
+     * supported files will be transformed. Supported types may be automatically
+     * added over time. If a file type is set in this field that isn't supported
+     * by the Deidentify action then the job will fail and will not be
+     * successfully created/started. Currently the only filetypes supported are:
+     * IMAGES, TEXT_FILES, CSV, TSV.
+     * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fileTypesToTransform at the given index. + */ + @java.lang.Override + public int getFileTypesToTransformValue(int index) { + return fileTypesToTransform_.get(index); + } + + private int fileTypesToTransformMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (transformationDetailsStorageConfig_ != null) { + output.writeMessage(3, getTransformationDetailsStorageConfig()); + } + if (transformationConfig_ != null) { + output.writeMessage(7, getTransformationConfig()); + } + if (getFileTypesToTransformList().size() > 0) { + output.writeUInt32NoTag(66); + output.writeUInt32NoTag(fileTypesToTransformMemoizedSerializedSize); + } + for (int i = 0; i < fileTypesToTransform_.size(); i++) { + output.writeEnumNoTag(fileTypesToTransform_.get(i)); + } + if (outputCase_ == 9) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, output_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transformationDetailsStorageConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getTransformationDetailsStorageConfig()); + } + if (transformationConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTransformationConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < fileTypesToTransform_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + fileTypesToTransform_.get(i)); + } + size += dataSize; + if (!getFileTypesToTransformList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + fileTypesToTransformMemoizedSerializedSize = dataSize; + } + if (outputCase_ == 9) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, output_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.privacy.dlp.v2.Action.Deidentify)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.Action.Deidentify other = + (com.google.privacy.dlp.v2.Action.Deidentify) obj; + + if (hasTransformationConfig() != other.hasTransformationConfig()) return false; + if (hasTransformationConfig()) { + if (!getTransformationConfig().equals(other.getTransformationConfig())) return false; + } + if (hasTransformationDetailsStorageConfig() != other.hasTransformationDetailsStorageConfig()) + return false; + if (hasTransformationDetailsStorageConfig()) { + if (!getTransformationDetailsStorageConfig() + .equals(other.getTransformationDetailsStorageConfig())) return false; + } + if (!fileTypesToTransform_.equals(other.fileTypesToTransform_)) return false; + if (!getOutputCase().equals(other.getOutputCase())) return false; + switch (outputCase_) { + case 9: + if (!getCloudStorageOutput().equals(other.getCloudStorageOutput())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTransformationConfig()) { + hash = (37 * hash) + TRANSFORMATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTransformationConfig().hashCode(); + } + if (hasTransformationDetailsStorageConfig()) { + hash = (37 * hash) + TRANSFORMATION_DETAILS_STORAGE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTransformationDetailsStorageConfig().hashCode(); + } + if (getFileTypesToTransformCount() > 0) { + hash = (37 * hash) + FILE_TYPES_TO_TRANSFORM_FIELD_NUMBER; + hash = (53 * hash) + fileTypesToTransform_.hashCode(); + } + switch (outputCase_) { + case 9: + hash = (37 * hash) + CLOUD_STORAGE_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getCloudStorageOutput().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.privacy.dlp.v2.Action.Deidentify prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Create a de-identified copy of the requested table or files.
+     * A TransformationDetail will be created for each transformation.
+     * If any rows in BigQuery are skipped during de-identification
+     * (transformation errors or row size exceeds BigQuery insert API limits) they
+     * are placed in the failure output table. If the original row exceeds
+     * the BigQuery insert API limit it will be truncated when written to the
+     * failure output table. The failure output table can be set in the
+     * action.deidentify.output.big_query_output.deidentified_failure_output_table
+     * field, if no table is set, a table will be automatically created in the
+     * same project and dataset as the original table.
+     * Compatible with: Inspect
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.Action.Deidentify} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.Deidentify) + com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.Action.Deidentify.class, + com.google.privacy.dlp.v2.Action.Deidentify.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.Action.Deidentify.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (transformationConfigBuilder_ == null) { + transformationConfig_ = null; + } else { + transformationConfig_ = null; + transformationConfigBuilder_ = null; + } + if (transformationDetailsStorageConfigBuilder_ == null) { + transformationDetailsStorageConfig_ = null; + } else { + transformationDetailsStorageConfig_ = null; + transformationDetailsStorageConfigBuilder_ = null; + } + fileTypesToTransform_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + outputCase_ = 0; + output_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify build() { + com.google.privacy.dlp.v2.Action.Deidentify result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify buildPartial() { + com.google.privacy.dlp.v2.Action.Deidentify result = + new com.google.privacy.dlp.v2.Action.Deidentify(this); + int from_bitField0_ = bitField0_; + if (transformationConfigBuilder_ == null) { + result.transformationConfig_ = transformationConfig_; + } else { + result.transformationConfig_ = transformationConfigBuilder_.build(); + } + if (transformationDetailsStorageConfigBuilder_ == null) { + result.transformationDetailsStorageConfig_ = transformationDetailsStorageConfig_; + } else { + result.transformationDetailsStorageConfig_ = + transformationDetailsStorageConfigBuilder_.build(); + } + if (outputCase_ == 9) { + result.output_ = output_; + } + if (((bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = java.util.Collections.unmodifiableList(fileTypesToTransform_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fileTypesToTransform_ = fileTypesToTransform_; + result.outputCase_ = outputCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.Action.Deidentify) { + return mergeFrom((com.google.privacy.dlp.v2.Action.Deidentify) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.Action.Deidentify other) { + if (other == com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance()) return this; + if (other.hasTransformationConfig()) { + mergeTransformationConfig(other.getTransformationConfig()); + } + if (other.hasTransformationDetailsStorageConfig()) { + mergeTransformationDetailsStorageConfig(other.getTransformationDetailsStorageConfig()); + } + if (!other.fileTypesToTransform_.isEmpty()) { + if (fileTypesToTransform_.isEmpty()) { + fileTypesToTransform_ = other.fileTypesToTransform_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.addAll(other.fileTypesToTransform_); + } + onChanged(); + } + switch (other.getOutputCase()) { + case CLOUD_STORAGE_OUTPUT: + { + outputCase_ = 9; + output_ = other.output_; + onChanged(); + break; + } + case OUTPUT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.Action.Deidentify parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.Action.Deidentify) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int outputCase_ = 0; + private java.lang.Object output_; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public Builder clearOutput() { + outputCase_ = 0; + output_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.privacy.dlp.v2.TransformationConfig transformationConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationConfig, + com.google.privacy.dlp.v2.TransformationConfig.Builder, + com.google.privacy.dlp.v2.TransformationConfigOrBuilder> + transformationConfigBuilder_; + /** + * + * + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * + * @return Whether the transformationConfig field is set. + */ + public boolean hasTransformationConfig() { + return transformationConfigBuilder_ != null || transformationConfig_ != null; + } + /** + * + * + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + * + * @return The transformationConfig. + */ + public com.google.privacy.dlp.v2.TransformationConfig getTransformationConfig() { + if (transformationConfigBuilder_ == null) { + return transformationConfig_ == null + ? com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance() + : transformationConfig_; + } else { + return transformationConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public Builder setTransformationConfig(com.google.privacy.dlp.v2.TransformationConfig value) { + if (transformationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationConfig_ = value; + onChanged(); + } else { + transformationConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public Builder setTransformationConfig( + com.google.privacy.dlp.v2.TransformationConfig.Builder builderForValue) { + if (transformationConfigBuilder_ == null) { + transformationConfig_ = builderForValue.build(); + onChanged(); + } else { + transformationConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public Builder mergeTransformationConfig( + com.google.privacy.dlp.v2.TransformationConfig value) { + if (transformationConfigBuilder_ == null) { + if (transformationConfig_ != null) { + transformationConfig_ = + com.google.privacy.dlp.v2.TransformationConfig.newBuilder(transformationConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationConfig_ = value; + } + onChanged(); + } else { + transformationConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public Builder clearTransformationConfig() { + if (transformationConfigBuilder_ == null) { + transformationConfig_ = null; + onChanged(); + } else { + transformationConfig_ = null; + transformationConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public com.google.privacy.dlp.v2.TransformationConfig.Builder + getTransformationConfigBuilder() { + + onChanged(); + return getTransformationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + public com.google.privacy.dlp.v2.TransformationConfigOrBuilder + getTransformationConfigOrBuilder() { + if (transformationConfigBuilder_ != null) { + return transformationConfigBuilder_.getMessageOrBuilder(); + } else { + return transformationConfig_ == null + ? com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance() + : transformationConfig_; + } + } + /** + * + * + *
+       * User specified deidentify templates and configs for structured,
+       * unstructured, and image files.
+       * 
+ * + * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationConfig, + com.google.privacy.dlp.v2.TransformationConfig.Builder, + com.google.privacy.dlp.v2.TransformationConfigOrBuilder> + getTransformationConfigFieldBuilder() { + if (transformationConfigBuilder_ == null) { + transformationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationConfig, + com.google.privacy.dlp.v2.TransformationConfig.Builder, + com.google.privacy.dlp.v2.TransformationConfigOrBuilder>( + getTransformationConfig(), getParentForChildren(), isClean()); + transformationConfig_ = null; + } + return transformationConfigBuilder_; + } + + private com.google.privacy.dlp.v2.TransformationDetailsStorageConfig + transformationDetailsStorageConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig, + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder, + com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder> + transformationDetailsStorageConfigBuilder_; + /** + * + * + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + * + * @return Whether the transformationDetailsStorageConfig field is set. + */ + public boolean hasTransformationDetailsStorageConfig() { + return transformationDetailsStorageConfigBuilder_ != null + || transformationDetailsStorageConfig_ != null; + } + /** + * + * + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + * + * @return The transformationDetailsStorageConfig. + */ + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig + getTransformationDetailsStorageConfig() { + if (transformationDetailsStorageConfigBuilder_ == null) { + return transformationDetailsStorageConfig_ == null + ? com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance() + : transformationDetailsStorageConfig_; + } else { + return transformationDetailsStorageConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + */ + public Builder setTransformationDetailsStorageConfig( + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig value) { + if (transformationDetailsStorageConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformationDetailsStorageConfig_ = value; + onChanged(); + } else { + transformationDetailsStorageConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + */ + public Builder setTransformationDetailsStorageConfig( + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder builderForValue) { + if (transformationDetailsStorageConfigBuilder_ == null) { + transformationDetailsStorageConfig_ = builderForValue.build(); + onChanged(); + } else { + transformationDetailsStorageConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + */ + public Builder mergeTransformationDetailsStorageConfig( + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig value) { + if (transformationDetailsStorageConfigBuilder_ == null) { + if (transformationDetailsStorageConfig_ != null) { + transformationDetailsStorageConfig_ = + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.newBuilder( + transformationDetailsStorageConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + transformationDetailsStorageConfig_ = value; + } + onChanged(); + } else { + transformationDetailsStorageConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + */ + public Builder clearTransformationDetailsStorageConfig() { + if (transformationDetailsStorageConfigBuilder_ == null) { + transformationDetailsStorageConfig_ = null; + onChanged(); + } else { + transformationDetailsStorageConfig_ = null; + transformationDetailsStorageConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + */ + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder + getTransformationDetailsStorageConfigBuilder() { + + onChanged(); + return getTransformationDetailsStorageConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + */ + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder + getTransformationDetailsStorageConfigOrBuilder() { + if (transformationDetailsStorageConfigBuilder_ != null) { + return transformationDetailsStorageConfigBuilder_.getMessageOrBuilder(); + } else { + return transformationDetailsStorageConfig_ == null + ? com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance() + : transformationDetailsStorageConfig_; + } + } + /** + * + * + *
+       * Config for storing transformation details. This is separate from the
+       * de-identified content, and contains metadata about the successful
+       * transformations and/or failures that occurred while de-identifying. This
+       * needs to be set in order for users to access information about the status
+       * of each transformation (see
+       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
+       * message for more information about what is noted).
+       * 
+ * + * + * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig, + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder, + com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder> + getTransformationDetailsStorageConfigFieldBuilder() { + if (transformationDetailsStorageConfigBuilder_ == null) { + transformationDetailsStorageConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig, + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder, + com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder>( + getTransformationDetailsStorageConfig(), getParentForChildren(), isClean()); + transformationDetailsStorageConfig_ = null; + } + return transformationDetailsStorageConfigBuilder_; + } + + /** + * + * + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the cloudStorageOutput field is set. + */ + @java.lang.Override + public boolean hasCloudStorageOutput() { + return outputCase_ == 9; + } + /** + * + * + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cloudStorageOutput. + */ + @java.lang.Override + public java.lang.String getCloudStorageOutput() { + java.lang.Object ref = ""; + if (outputCase_ == 9) { + ref = output_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (outputCase_ == 9) { + output_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for cloudStorageOutput. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudStorageOutputBytes() { + java.lang.Object ref = ""; + if (outputCase_ == 9) { + ref = output_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (outputCase_ == 9) { + output_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The cloudStorageOutput to set. + * @return This builder for chaining. + */ + public Builder setCloudStorageOutput(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + outputCase_ = 9; + output_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCloudStorageOutput() { + if (outputCase_ == 9) { + outputCase_ = 0; + output_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Required. User settable Cloud Storage bucket and folders to store de-identified
+       * files. This field must be set for cloud storage deidentification. The
+       * output Cloud Storage bucket must be different from the input bucket.
+       * De-identified files will overwrite files in the output path.
+       * Form of: gs://bucket/folder/ or gs://bucket
+       * 
+ * + * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for cloudStorageOutput to set. + * @return This builder for chaining. + */ + public Builder setCloudStorageOutputBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + outputCase_ = 9; + output_ = value; + onChanged(); + return this; + } + + private java.util.List fileTypesToTransform_ = + java.util.Collections.emptyList(); + + private void ensureFileTypesToTransformIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fileTypesToTransform_ = new java.util.ArrayList(fileTypesToTransform_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return A list containing the fileTypesToTransform. + */ + public java.util.List getFileTypesToTransformList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.privacy.dlp.v2.FileType>( + fileTypesToTransform_, fileTypesToTransform_converter_); + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return The count of fileTypesToTransform. + */ + public int getFileTypesToTransformCount() { + return fileTypesToTransform_.size(); + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param index The index of the element to return. + * @return The fileTypesToTransform at the given index. + */ + public com.google.privacy.dlp.v2.FileType getFileTypesToTransform(int index) { + return fileTypesToTransform_converter_.convert(fileTypesToTransform_.get(index)); + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param index The index to set the value at. + * @param value The fileTypesToTransform to set. + * @return This builder for chaining. + */ + public Builder setFileTypesToTransform(int index, com.google.privacy.dlp.v2.FileType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param value The fileTypesToTransform to add. + * @return This builder for chaining. + */ + public Builder addFileTypesToTransform(com.google.privacy.dlp.v2.FileType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param values The fileTypesToTransform to add. + * @return This builder for chaining. + */ + public Builder addAllFileTypesToTransform( + java.lang.Iterable values) { + ensureFileTypesToTransformIsMutable(); + for (com.google.privacy.dlp.v2.FileType value : values) { + fileTypesToTransform_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return This builder for chaining. + */ + public Builder clearFileTypesToTransform() { + fileTypesToTransform_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @return A list containing the enum numeric values on the wire for fileTypesToTransform. + */ + public java.util.List getFileTypesToTransformValueList() { + return java.util.Collections.unmodifiableList(fileTypesToTransform_); + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fileTypesToTransform at the given index. + */ + public int getFileTypesToTransformValue(int index) { + return fileTypesToTransform_.get(index); + } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for fileTypesToTransform to set. + * @return This builder for chaining. + */ + public Builder setFileTypesToTransformValue(int index, int value) { + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.set(index, value); onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param value The enum numeric value on the wire for fileTypesToTransform to add. + * @return This builder for chaining. + */ + public Builder addFileTypesToTransformValue(int value) { + ensureFileTypesToTransformIsMutable(); + fileTypesToTransform_.add(value); + onChanged(); + return this; } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + /** + * + * + *
+       * List of user-specified file type groups to transform. If specified, only
+       * the files with these filetypes will be transformed. If empty, all
+       * supported files will be transformed. Supported types may be automatically
+       * added over time. If a file type is set in this field that isn't supported
+       * by the Deidentify action then the job will fail and will not be
+       * successfully created/started. Currently the only filetypes supported are:
+       * IMAGES, TEXT_FILES, CSV, TSV.
+       * 
+ * + * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; + * + * @param values The enum numeric values on the wire for fileTypesToTransform to add. + * @return This builder for chaining. + */ + public Builder addAllFileTypesToTransformValue(java.lang.Iterable values) { + ensureFileTypesToTransformIsMutable(); + for (int value : values) { + fileTypesToTransform_.add(value); } + onChanged(); return this; } @@ -2575,45 +4847,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.Deidentify) } - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) - private static final com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog - DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.Deidentify) + private static final com.google.privacy.dlp.v2.Action.Deidentify DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog(); + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.Deidentify(); } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog - getDefaultInstance() { + public static com.google.privacy.dlp.v2.Action.Deidentify getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public PublishFindingsToCloudDataCatalog parsePartialFrom( + public Deidentify parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PublishFindingsToCloudDataCatalog(input, extensionRegistry); + return new Deidentify(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog - getDefaultInstanceForType() { + public com.google.privacy.dlp.v2.Action.Deidentify getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -2626,8 +4895,9 @@ public interface JobNotificationEmailsOrBuilder * * *
-   * Enable email notification to project owners and editors on jobs's
-   * completion/failure.
+   * Sends an email when the job completes. The email goes to IAM project owners
+   * and technical [Essential
+   * Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).
    * 
* * Protobuf type {@code google.privacy.dlp.v2.Action.JobNotificationEmails} @@ -2865,8 +5135,9 @@ protected Builder newBuilderForType( * * *
-     * Enable email notification to project owners and editors on jobs's
-     * completion/failure.
+     * Sends an email when the job completes. The email goes to IAM project owners
+     * and technical [Essential
+     * Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).
      * 
* * Protobuf type {@code google.privacy.dlp.v2.Action.JobNotificationEmails} @@ -3535,6 +5806,7 @@ public enum ActionCase PUB_SUB(2), PUBLISH_SUMMARY_TO_CSCC(3), PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG(5), + DEIDENTIFY(7), JOB_NOTIFICATION_EMAILS(8), PUBLISH_TO_STACKDRIVER(9), ACTION_NOT_SET(0); @@ -3563,6 +5835,8 @@ public static ActionCase forNumber(int value) { return PUBLISH_SUMMARY_TO_CSCC; case 5: return PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG; + case 7: + return DEIDENTIFY; case 8: return JOB_NOTIFICATION_EMAILS; case 9: @@ -3639,7 +5913,7 @@ public com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder getSaveFindingsOrB * * *
-   * Publish a notification to a pubsub topic.
+   * Publish a notification to a Pub/Sub topic.
    * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -3654,7 +5928,7 @@ public boolean hasPubSub() { * * *
-   * Publish a notification to a pubsub topic.
+   * Publish a notification to a Pub/Sub topic.
    * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -3672,7 +5946,7 @@ public com.google.privacy.dlp.v2.Action.PublishToPubSub getPubSub() { * * *
-   * Publish a notification to a pubsub topic.
+   * Publish a notification to a Pub/Sub topic.
    * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -3796,6 +6070,57 @@ public boolean hasPublishFindingsToCloudDataCatalog() { return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); } + public static final int DEIDENTIFY_FIELD_NUMBER = 7; + /** + * + * + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * + * @return Whether the deidentify field is set. + */ + @java.lang.Override + public boolean hasDeidentify() { + return actionCase_ == 7; + } + /** + * + * + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * + * @return The deidentify. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify getDeidentify() { + if (actionCase_ == 7) { + return (com.google.privacy.dlp.v2.Action.Deidentify) action_; + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + /** + * + * + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder getDeidentifyOrBuilder() { + if (actionCase_ == 7) { + return (com.google.privacy.dlp.v2.Action.Deidentify) action_; + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + public static final int JOB_NOTIFICATION_EMAILS_FIELD_NUMBER = 8; /** * @@ -3930,6 +6255,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 5, (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_); } + if (actionCase_ == 7) { + output.writeMessage(7, (com.google.privacy.dlp.v2.Action.Deidentify) action_); + } if (actionCase_ == 8) { output.writeMessage(8, (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_); } @@ -3965,6 +6293,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 5, (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_); } + if (actionCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.privacy.dlp.v2.Action.Deidentify) action_); + } if (actionCase_ == 8) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -4005,6 +6338,9 @@ public boolean equals(final java.lang.Object obj) { if (!getPublishFindingsToCloudDataCatalog() .equals(other.getPublishFindingsToCloudDataCatalog())) return false; break; + case 7: + if (!getDeidentify().equals(other.getDeidentify())) return false; + break; case 8: if (!getJobNotificationEmails().equals(other.getJobNotificationEmails())) return false; break; @@ -4042,6 +6378,10 @@ public int hashCode() { hash = (37 * hash) + PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG_FIELD_NUMBER; hash = (53 * hash) + getPublishFindingsToCloudDataCatalog().hashCode(); break; + case 7: + hash = (37 * hash) + DEIDENTIFY_FIELD_NUMBER; + hash = (53 * hash) + getDeidentify().hashCode(); + break; case 8: hash = (37 * hash) + JOB_NOTIFICATION_EMAILS_FIELD_NUMBER; hash = (53 * hash) + getJobNotificationEmails().hashCode(); @@ -4254,6 +6594,13 @@ public com.google.privacy.dlp.v2.Action buildPartial() { result.action_ = publishFindingsToCloudDataCatalogBuilder_.build(); } } + if (actionCase_ == 7) { + if (deidentifyBuilder_ == null) { + result.action_ = action_; + } else { + result.action_ = deidentifyBuilder_.build(); + } + } if (actionCase_ == 8) { if (jobNotificationEmailsBuilder_ == null) { result.action_ = action_; @@ -4339,6 +6686,11 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.Action other) { mergePublishFindingsToCloudDataCatalog(other.getPublishFindingsToCloudDataCatalog()); break; } + case DEIDENTIFY: + { + mergeDeidentify(other.getDeidentify()); + break; + } case JOB_NOTIFICATION_EMAILS: { mergeJobNotificationEmails(other.getJobNotificationEmails()); @@ -4616,7 +6968,7 @@ public com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder getSaveFindingsOrB * * *
-     * Publish a notification to a pubsub topic.
+     * Publish a notification to a Pub/Sub topic.
      * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -4631,7 +6983,7 @@ public boolean hasPubSub() { * * *
-     * Publish a notification to a pubsub topic.
+     * Publish a notification to a Pub/Sub topic.
      * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -4656,7 +7008,7 @@ public com.google.privacy.dlp.v2.Action.PublishToPubSub getPubSub() { * * *
-     * Publish a notification to a pubsub topic.
+     * Publish a notification to a Pub/Sub topic.
      * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -4678,7 +7030,7 @@ public Builder setPubSub(com.google.privacy.dlp.v2.Action.PublishToPubSub value) * * *
-     * Publish a notification to a pubsub topic.
+     * Publish a notification to a Pub/Sub topic.
      * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -4698,7 +7050,7 @@ public Builder setPubSub( * * *
-     * Publish a notification to a pubsub topic.
+     * Publish a notification to a Pub/Sub topic.
      * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -4730,7 +7082,7 @@ public Builder mergePubSub(com.google.privacy.dlp.v2.Action.PublishToPubSub valu * * *
-     * Publish a notification to a pubsub topic.
+     * Publish a notification to a Pub/Sub topic.
      * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -4755,7 +7107,7 @@ public Builder clearPubSub() { * * *
-     * Publish a notification to a pubsub topic.
+     * Publish a notification to a Pub/Sub topic.
      * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -4767,7 +7119,7 @@ public com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder getPubSubBuilder * * *
-     * Publish a notification to a pubsub topic.
+     * Publish a notification to a Pub/Sub topic.
      * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -4787,7 +7139,7 @@ public com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder getPubSubOrBuil * * *
-     * Publish a notification to a pubsub topic.
+     * Publish a notification to a Pub/Sub topic.
      * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -5273,6 +7625,216 @@ public Builder clearPublishFindingsToCloudDataCatalog() { return publishFindingsToCloudDataCatalogBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.Deidentify, + com.google.privacy.dlp.v2.Action.Deidentify.Builder, + com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder> + deidentifyBuilder_; + /** + * + * + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * + * @return Whether the deidentify field is set. + */ + @java.lang.Override + public boolean hasDeidentify() { + return actionCase_ == 7; + } + /** + * + * + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * + * @return The deidentify. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.Deidentify getDeidentify() { + if (deidentifyBuilder_ == null) { + if (actionCase_ == 7) { + return (com.google.privacy.dlp.v2.Action.Deidentify) action_; + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } else { + if (actionCase_ == 7) { + return deidentifyBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + } + /** + * + * + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public Builder setDeidentify(com.google.privacy.dlp.v2.Action.Deidentify value) { + if (deidentifyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + deidentifyBuilder_.setMessage(value); + } + actionCase_ = 7; + return this; + } + /** + * + * + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public Builder setDeidentify( + com.google.privacy.dlp.v2.Action.Deidentify.Builder builderForValue) { + if (deidentifyBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + deidentifyBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 7; + return this; + } + /** + * + * + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public Builder mergeDeidentify(com.google.privacy.dlp.v2.Action.Deidentify value) { + if (deidentifyBuilder_ == null) { + if (actionCase_ == 7 + && action_ != com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance()) { + action_ = + com.google.privacy.dlp.v2.Action.Deidentify.newBuilder( + (com.google.privacy.dlp.v2.Action.Deidentify) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 7) { + deidentifyBuilder_.mergeFrom(value); + } else { + deidentifyBuilder_.setMessage(value); + } + } + actionCase_ = 7; + return this; + } + /** + * + * + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public Builder clearDeidentify() { + if (deidentifyBuilder_ == null) { + if (actionCase_ == 7) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 7) { + actionCase_ = 0; + action_ = null; + } + deidentifyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + public com.google.privacy.dlp.v2.Action.Deidentify.Builder getDeidentifyBuilder() { + return getDeidentifyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder getDeidentifyOrBuilder() { + if ((actionCase_ == 7) && (deidentifyBuilder_ != null)) { + return deidentifyBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 7) { + return (com.google.privacy.dlp.v2.Action.Deidentify) action_; + } + return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + } + /** + * + * + *
+     * Create a de-identified copy of the input data.
+     * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.Deidentify, + com.google.privacy.dlp.v2.Action.Deidentify.Builder, + com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder> + getDeidentifyFieldBuilder() { + if (deidentifyBuilder_ == null) { + if (!(actionCase_ == 7)) { + action_ = com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); + } + deidentifyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.Action.Deidentify, + com.google.privacy.dlp.v2.Action.Deidentify.Builder, + com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder>( + (com.google.privacy.dlp.v2.Action.Deidentify) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 7; + onChanged(); + ; + return deidentifyBuilder_; + } + private com.google.protobuf.SingleFieldBuilderV3< com.google.privacy.dlp.v2.Action.JobNotificationEmails, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder, diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java index b0179083cb34..6c6bfd38f412 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java @@ -62,7 +62,7 @@ public interface ActionOrBuilder * * *
-   * Publish a notification to a pubsub topic.
+   * Publish a notification to a Pub/Sub topic.
    * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -74,7 +74,7 @@ public interface ActionOrBuilder * * *
-   * Publish a notification to a pubsub topic.
+   * Publish a notification to a Pub/Sub topic.
    * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -86,7 +86,7 @@ public interface ActionOrBuilder * * *
-   * Publish a notification to a pubsub topic.
+   * Publish a notification to a Pub/Sub topic.
    * 
* * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; @@ -171,6 +171,41 @@ public interface ActionOrBuilder com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder getPublishFindingsToCloudDataCatalogOrBuilder(); + /** + * + * + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * + * @return Whether the deidentify field is set. + */ + boolean hasDeidentify(); + /** + * + * + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + * + * @return The deidentify. + */ + com.google.privacy.dlp.v2.Action.Deidentify getDeidentify(); + /** + * + * + *
+   * Create a de-identified copy of the input data.
+   * 
+ * + * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; + */ + com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder getDeidentifyOrBuilder(); + /** * * diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java index 59cd0d249380..33e5025c0168 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java @@ -17970,10 +17970,10 @@ public interface DeltaPresenceEstimationQuasiIdValuesOrBuilder * *
        * The estimated probability that a given individual sharing these
-       * quasi-identifier values is in the dataset. This value, typically called
-       * δ, is the ratio between the number of records in the dataset with these
-       * quasi-identifier values, and the total number of individuals (inside
-       * *and* outside the dataset) with these quasi-identifier values.
+       * quasi-identifier values is in the dataset. This value, typically
+       * called δ, is the ratio between the number of records in the dataset
+       * with these quasi-identifier values, and the total number of individuals
+       * (inside *and* outside the dataset) with these quasi-identifier values.
        * For example, if there are 15 individuals in the dataset who share the
        * same quasi-identifier values, and an estimated 100 people in the entire
        * population with these values, then δ is 0.15.
@@ -18175,10 +18175,10 @@ public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder(int i
        *
        * 
        * The estimated probability that a given individual sharing these
-       * quasi-identifier values is in the dataset. This value, typically called
-       * δ, is the ratio between the number of records in the dataset with these
-       * quasi-identifier values, and the total number of individuals (inside
-       * *and* outside the dataset) with these quasi-identifier values.
+       * quasi-identifier values is in the dataset. This value, typically
+       * called δ, is the ratio between the number of records in the dataset
+       * with these quasi-identifier values, and the total number of individuals
+       * (inside *and* outside the dataset) with these quasi-identifier values.
        * For example, if there are 15 individuals in the dataset who share the
        * same quasi-identifier values, and an estimated 100 people in the entire
        * population with these values, then δ is 0.15.
@@ -19000,10 +19000,10 @@ public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder(int inde
          *
          * 
          * The estimated probability that a given individual sharing these
-         * quasi-identifier values is in the dataset. This value, typically called
-         * δ, is the ratio between the number of records in the dataset with these
-         * quasi-identifier values, and the total number of individuals (inside
-         * *and* outside the dataset) with these quasi-identifier values.
+         * quasi-identifier values is in the dataset. This value, typically
+         * called δ, is the ratio between the number of records in the dataset
+         * with these quasi-identifier values, and the total number of individuals
+         * (inside *and* outside the dataset) with these quasi-identifier values.
          * For example, if there are 15 individuals in the dataset who share the
          * same quasi-identifier values, and an estimated 100 people in the entire
          * population with these values, then δ is 0.15.
@@ -19022,10 +19022,10 @@ public double getEstimatedProbability() {
          *
          * 
          * The estimated probability that a given individual sharing these
-         * quasi-identifier values is in the dataset. This value, typically called
-         * δ, is the ratio between the number of records in the dataset with these
-         * quasi-identifier values, and the total number of individuals (inside
-         * *and* outside the dataset) with these quasi-identifier values.
+         * quasi-identifier values is in the dataset. This value, typically
+         * called δ, is the ratio between the number of records in the dataset
+         * with these quasi-identifier values, and the total number of individuals
+         * (inside *and* outside the dataset) with these quasi-identifier values.
          * For example, if there are 15 individuals in the dataset who share the
          * same quasi-identifier values, and an estimated 100 people in the entire
          * population with these values, then δ is 0.15.
@@ -19047,10 +19047,10 @@ public Builder setEstimatedProbability(double value) {
          *
          * 
          * The estimated probability that a given individual sharing these
-         * quasi-identifier values is in the dataset. This value, typically called
-         * δ, is the ratio between the number of records in the dataset with these
-         * quasi-identifier values, and the total number of individuals (inside
-         * *and* outside the dataset) with these quasi-identifier values.
+         * quasi-identifier values is in the dataset. This value, typically
+         * called δ, is the ratio between the number of records in the dataset
+         * with these quasi-identifier values, and the total number of individuals
+         * (inside *and* outside the dataset) with these quasi-identifier values.
          * For example, if there are 15 individuals in the dataset who share the
          * same quasi-identifier values, and an estimated 100 people in the entire
          * population with these values, then δ is 0.15.
diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java
index 4e0ba1c0d6fd..7e7f3590080d 100644
--- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java
@@ -208,6 +208,18 @@ public com.google.protobuf.ByteString getMaskingCharacterBytes() {
    * 
    * Number of characters to mask. If not set, all matching chars will be
    * masked. Skipped characters do not count towards this tally.
+   * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+   * masks all but a number of characters.
+   * For example, suppose you have the following values:
+   * - `masking_character` is `*`
+   * - `number_to_mask` is `-4`
+   * - `reverse_order` is `false`
+   * - `CharsToIgnore` includes `-`
+   * - Input string is `1234-5678-9012-3456`
+   * The resulting de-identified string is
+   * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+   * If `reverse_order` is `true`, all but the first four characters are masked
+   * as `1234-****-****-****`.
    * 
* * int32 number_to_mask = 2; @@ -864,6 +876,18 @@ public Builder setMaskingCharacterBytes(com.google.protobuf.ByteString value) { *
      * Number of characters to mask. If not set, all matching chars will be
      * masked. Skipped characters do not count towards this tally.
+     * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+     * masks all but a number of characters.
+     * For example, suppose you have the following values:
+     * - `masking_character` is `*`
+     * - `number_to_mask` is `-4`
+     * - `reverse_order` is `false`
+     * - `CharsToIgnore` includes `-`
+     * - Input string is `1234-5678-9012-3456`
+     * The resulting de-identified string is
+     * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+     * If `reverse_order` is `true`, all but the first four characters are masked
+     * as `1234-****-****-****`.
      * 
* * int32 number_to_mask = 2; @@ -880,6 +904,18 @@ public int getNumberToMask() { *
      * Number of characters to mask. If not set, all matching chars will be
      * masked. Skipped characters do not count towards this tally.
+     * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+     * masks all but a number of characters.
+     * For example, suppose you have the following values:
+     * - `masking_character` is `*`
+     * - `number_to_mask` is `-4`
+     * - `reverse_order` is `false`
+     * - `CharsToIgnore` includes `-`
+     * - Input string is `1234-5678-9012-3456`
+     * The resulting de-identified string is
+     * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+     * If `reverse_order` is `true`, all but the first four characters are masked
+     * as `1234-****-****-****`.
      * 
* * int32 number_to_mask = 2; @@ -899,6 +935,18 @@ public Builder setNumberToMask(int value) { *
      * Number of characters to mask. If not set, all matching chars will be
      * masked. Skipped characters do not count towards this tally.
+     * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+     * masks all but a number of characters.
+     * For example, suppose you have the following values:
+     * - `masking_character` is `*`
+     * - `number_to_mask` is `-4`
+     * - `reverse_order` is `false`
+     * - `CharsToIgnore` includes `-`
+     * - Input string is `1234-5678-9012-3456`
+     * The resulting de-identified string is
+     * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+     * If `reverse_order` is `true`, all but the first four characters are masked
+     * as `1234-****-****-****`.
      * 
* * int32 number_to_mask = 2; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java index 3a3f668dd1be..c8b555992f10 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java @@ -60,6 +60,18 @@ public interface CharacterMaskConfigOrBuilder *
    * Number of characters to mask. If not set, all matching chars will be
    * masked. Skipped characters do not count towards this tally.
+   * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
+   * masks all but a number of characters.
+   * For example, suppose you have the following values:
+   * - `masking_character` is `*`
+   * - `number_to_mask` is `-4`
+   * - `reverse_order` is `false`
+   * - `CharsToIgnore` includes `-`
+   * - Input string is `1234-5678-9012-3456`
+   * The resulting de-identified string is
+   * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
+   * If `reverse_order` is `true`, all but the first four characters are masked
+   * as `1234-****-****-****`.
    * 
* * int32 number_to_mask = 2; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java index 85c5734965c4..db75c520ac7e 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java @@ -123,7 +123,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Convenience enum for indication common characters to not transform.
+   * Convenience enum for indicating common characters to not transform.
    * 
* * Protobuf enum {@code google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore} diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java index aef6599d570f..ebdbaa78fc06 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java @@ -22,7 +22,7 @@ * * *
- * Options defining a file or a set of files within a Google Cloud Storage
+ * Options defining a file or a set of files within a Cloud Storage
  * bucket.
  * 
* @@ -1864,7 +1864,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Options defining a file or a set of files within a Google Cloud Storage
+   * Options defining a file or a set of files within a Cloud Storage
    * bucket.
    * 
* diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java index 4dfedde78689..4f9cbfe2f05b 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java @@ -175,7 +175,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Container type, for example BigQuery or Google Cloud Storage.
+   * Container type, for example BigQuery or Cloud Storage.
    * 
* * string type = 1; @@ -198,7 +198,7 @@ public java.lang.String getType() { * * *
-   * Container type, for example BigQuery or Google Cloud Storage.
+   * Container type, for example BigQuery or Cloud Storage.
    * 
* * string type = 1; @@ -278,7 +278,7 @@ public com.google.protobuf.ByteString getProjectIdBytes() { * A string representation of the full container name. * Examples: * - BigQuery: 'Project:DataSetId.TableId' - * - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + * - Cloud Storage: 'gs://Bucket/folders/filename.txt' *
* * string full_path = 3; @@ -304,7 +304,7 @@ public java.lang.String getFullPath() { * A string representation of the full container name. * Examples: * - BigQuery: 'Project:DataSetId.TableId' - * - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + * - Cloud Storage: 'gs://Bucket/folders/filename.txt' *
* * string full_path = 3; @@ -334,7 +334,7 @@ public com.google.protobuf.ByteString getFullPathBytes() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the root is * `dataset_id` - * - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root * is `gs://bucket` *
* @@ -362,7 +362,7 @@ public java.lang.String getRootPath() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the root is * `dataset_id` - * - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root * is `gs://bucket` *
* @@ -393,7 +393,7 @@ public com.google.protobuf.ByteString getRootPathBytes() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is * `table_id` - * - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative * path is `folder/filename.txt` *
* @@ -421,7 +421,7 @@ public java.lang.String getRelativePath() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is * `table_id` - * - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative * path is `folder/filename.txt` *
* @@ -448,10 +448,10 @@ public com.google.protobuf.ByteString getRelativePathBytes() { * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
    * 
* * .google.protobuf.Timestamp update_time = 6; @@ -466,10 +466,10 @@ public boolean hasUpdateTime() { * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
    * 
* * .google.protobuf.Timestamp update_time = 6; @@ -484,10 +484,10 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
    * 
* * .google.protobuf.Timestamp update_time = 6; @@ -504,7 +504,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * *
    * Findings container version, if available
-   * ("generation" for Google Cloud Storage).
+   * ("generation" for Cloud Storage).
    * 
* * string version = 7; @@ -528,7 +528,7 @@ public java.lang.String getVersion() { * *
    * Findings container version, if available
-   * ("generation" for Google Cloud Storage).
+   * ("generation" for Cloud Storage).
    * 
* * string version = 7; @@ -975,7 +975,7 @@ public Builder mergeFrom( * * *
-     * Container type, for example BigQuery or Google Cloud Storage.
+     * Container type, for example BigQuery or Cloud Storage.
      * 
* * string type = 1; @@ -997,7 +997,7 @@ public java.lang.String getType() { * * *
-     * Container type, for example BigQuery or Google Cloud Storage.
+     * Container type, for example BigQuery or Cloud Storage.
      * 
* * string type = 1; @@ -1019,7 +1019,7 @@ public com.google.protobuf.ByteString getTypeBytes() { * * *
-     * Container type, for example BigQuery or Google Cloud Storage.
+     * Container type, for example BigQuery or Cloud Storage.
      * 
* * string type = 1; @@ -1040,7 +1040,7 @@ public Builder setType(java.lang.String value) { * * *
-     * Container type, for example BigQuery or Google Cloud Storage.
+     * Container type, for example BigQuery or Cloud Storage.
      * 
* * string type = 1; @@ -1057,7 +1057,7 @@ public Builder clearType() { * * *
-     * Container type, for example BigQuery or Google Cloud Storage.
+     * Container type, for example BigQuery or Cloud Storage.
      * 
* * string type = 1; @@ -1195,7 +1195,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { * A string representation of the full container name. * Examples: * - BigQuery: 'Project:DataSetId.TableId' - * - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + * - Cloud Storage: 'gs://Bucket/folders/filename.txt' *
* * string full_path = 3; @@ -1220,7 +1220,7 @@ public java.lang.String getFullPath() { * A string representation of the full container name. * Examples: * - BigQuery: 'Project:DataSetId.TableId' - * - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + * - Cloud Storage: 'gs://Bucket/folders/filename.txt' *
* * string full_path = 3; @@ -1245,7 +1245,7 @@ public com.google.protobuf.ByteString getFullPathBytes() { * A string representation of the full container name. * Examples: * - BigQuery: 'Project:DataSetId.TableId' - * - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + * - Cloud Storage: 'gs://Bucket/folders/filename.txt' *
* * string full_path = 3; @@ -1269,7 +1269,7 @@ public Builder setFullPath(java.lang.String value) { * A string representation of the full container name. * Examples: * - BigQuery: 'Project:DataSetId.TableId' - * - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + * - Cloud Storage: 'gs://Bucket/folders/filename.txt' *
* * string full_path = 3; @@ -1289,7 +1289,7 @@ public Builder clearFullPath() { * A string representation of the full container name. * Examples: * - BigQuery: 'Project:DataSetId.TableId' - * - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + * - Cloud Storage: 'gs://Bucket/folders/filename.txt' *
* * string full_path = 3; @@ -1317,7 +1317,7 @@ public Builder setFullPathBytes(com.google.protobuf.ByteString value) { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the root is * `dataset_id` - * - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root * is `gs://bucket` *
* @@ -1344,7 +1344,7 @@ public java.lang.String getRootPath() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the root is * `dataset_id` - * - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root * is `gs://bucket` *
* @@ -1371,7 +1371,7 @@ public com.google.protobuf.ByteString getRootPathBytes() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the root is * `dataset_id` - * - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root * is `gs://bucket` * * @@ -1397,7 +1397,7 @@ public Builder setRootPath(java.lang.String value) { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the root is * `dataset_id` - * - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root * is `gs://bucket` * * @@ -1419,7 +1419,7 @@ public Builder clearRootPath() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the root is * `dataset_id` - * - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root * is `gs://bucket` * * @@ -1448,7 +1448,7 @@ public Builder setRootPathBytes(com.google.protobuf.ByteString value) { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is * `table_id` - * - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative * path is `folder/filename.txt` * * @@ -1475,7 +1475,7 @@ public java.lang.String getRelativePath() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is * `table_id` - * - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative * path is `folder/filename.txt` * * @@ -1502,7 +1502,7 @@ public com.google.protobuf.ByteString getRelativePathBytes() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is * `table_id` - * - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative * path is `folder/filename.txt` * * @@ -1528,7 +1528,7 @@ public Builder setRelativePath(java.lang.String value) { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is * `table_id` - * - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative * path is `folder/filename.txt` * * @@ -1550,7 +1550,7 @@ public Builder clearRelativePath() { * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is * `table_id` - * - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative * path is `folder/filename.txt` * * @@ -1580,10 +1580,10 @@ public Builder setRelativePathBytes(com.google.protobuf.ByteString value) { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
      * 
* * .google.protobuf.Timestamp update_time = 6; @@ -1597,10 +1597,10 @@ public boolean hasUpdateTime() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
      * 
* * .google.protobuf.Timestamp update_time = 6; @@ -1620,10 +1620,10 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
      * 
* * .google.protobuf.Timestamp update_time = 6; @@ -1645,10 +1645,10 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
      * 
* * .google.protobuf.Timestamp update_time = 6; @@ -1667,10 +1667,10 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
      * 
* * .google.protobuf.Timestamp update_time = 6; @@ -1694,10 +1694,10 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
      * 
* * .google.protobuf.Timestamp update_time = 6; @@ -1717,10 +1717,10 @@ public Builder clearUpdateTime() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
      * 
* * .google.protobuf.Timestamp update_time = 6; @@ -1734,10 +1734,10 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
      * 
* * .google.protobuf.Timestamp update_time = 6; @@ -1755,10 +1755,10 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Findings container modification timestamp, if applicable. For Cloud
+     * Storage, this field contains the last file modification timestamp. For a
+     * BigQuery table, this field contains the last_modified_time property. For
+     * Datastore, this field isn't populated.
      * 
* * .google.protobuf.Timestamp update_time = 6; @@ -1786,7 +1786,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * *
      * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * ("generation" for Cloud Storage).
      * 
* * string version = 7; @@ -1809,7 +1809,7 @@ public java.lang.String getVersion() { * *
      * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * ("generation" for Cloud Storage).
      * 
* * string version = 7; @@ -1832,7 +1832,7 @@ public com.google.protobuf.ByteString getVersionBytes() { * *
      * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * ("generation" for Cloud Storage).
      * 
* * string version = 7; @@ -1854,7 +1854,7 @@ public Builder setVersion(java.lang.String value) { * *
      * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * ("generation" for Cloud Storage).
      * 
* * string version = 7; @@ -1872,7 +1872,7 @@ public Builder clearVersion() { * *
      * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * ("generation" for Cloud Storage).
      * 
* * string version = 7; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java index 074399ded235..2f36fdba755b 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java @@ -27,7 +27,7 @@ public interface ContainerOrBuilder * * *
-   * Container type, for example BigQuery or Google Cloud Storage.
+   * Container type, for example BigQuery or Cloud Storage.
    * 
* * string type = 1; @@ -39,7 +39,7 @@ public interface ContainerOrBuilder * * *
-   * Container type, for example BigQuery or Google Cloud Storage.
+   * Container type, for example BigQuery or Cloud Storage.
    * 
* * string type = 1; @@ -82,7 +82,7 @@ public interface ContainerOrBuilder * A string representation of the full container name. * Examples: * - BigQuery: 'Project:DataSetId.TableId' - * - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + * - Cloud Storage: 'gs://Bucket/folders/filename.txt' * * * string full_path = 3; @@ -97,7 +97,7 @@ public interface ContainerOrBuilder * A string representation of the full container name. * Examples: * - BigQuery: 'Project:DataSetId.TableId' - * - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + * - Cloud Storage: 'gs://Bucket/folders/filename.txt' * * * string full_path = 3; @@ -114,7 +114,7 @@ public interface ContainerOrBuilder * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the root is * `dataset_id` - * - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root * is `gs://bucket` * * @@ -131,7 +131,7 @@ public interface ContainerOrBuilder * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the root is * `dataset_id` - * - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root * is `gs://bucket` * * @@ -149,7 +149,7 @@ public interface ContainerOrBuilder * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is * `table_id` - * - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative * path is `folder/filename.txt` * * @@ -166,7 +166,7 @@ public interface ContainerOrBuilder * Examples: * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is * `table_id` - * - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative * path is `folder/filename.txt` * * @@ -180,10 +180,10 @@ public interface ContainerOrBuilder * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
    * 
* * .google.protobuf.Timestamp update_time = 6; @@ -195,10 +195,10 @@ public interface ContainerOrBuilder * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
    * 
* * .google.protobuf.Timestamp update_time = 6; @@ -210,10 +210,10 @@ public interface ContainerOrBuilder * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Findings container modification timestamp, if applicable. For Cloud
+   * Storage, this field contains the last file modification timestamp. For a
+   * BigQuery table, this field contains the last_modified_time property. For
+   * Datastore, this field isn't populated.
    * 
* * .google.protobuf.Timestamp update_time = 6; @@ -225,7 +225,7 @@ public interface ContainerOrBuilder * *
    * Findings container version, if available
-   * ("generation" for Google Cloud Storage).
+   * ("generation" for Cloud Storage).
    * 
* * string version = 7; @@ -238,7 +238,7 @@ public interface ContainerOrBuilder * *
    * Findings container version, if available
-   * ("generation" for Google Cloud Storage).
+   * ("generation" for Cloud Storage).
    * 
* * string version = 7; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java index 1786d50d3529..cce9249a75e6 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java @@ -267,7 +267,7 @@ public LocationCase getLocationCase() { * * Cloud Storage files: `gs://{bucket}/{path}` * * Datastore namespace: {namespace} * Nested names could be absent if the embedded object has no string - * identifier (for an example an image contained within a document). + * identifier (for example, an image contained within a document). * * * string container_name = 1; @@ -297,7 +297,7 @@ public java.lang.String getContainerName() { * * Cloud Storage files: `gs://{bucket}/{path}` * * Datastore namespace: {namespace} * Nested names could be absent if the embedded object has no string - * identifier (for an example an image contained within a document). + * identifier (for example, an image contained within a document). * * * string container_name = 1; @@ -527,10 +527,10 @@ public com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOr * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
    * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -545,10 +545,10 @@ public boolean hasContainerTimestamp() { * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
    * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -565,10 +565,10 @@ public com.google.protobuf.Timestamp getContainerTimestamp() { * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
    * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -584,8 +584,8 @@ public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { * * *
-   * Findings container version, if available
-   * ("generation" for Google Cloud Storage).
+   * Finding container version, if available
+   * ("generation" for Cloud Storage).
    * 
* * string container_version = 7; @@ -608,8 +608,8 @@ public java.lang.String getContainerVersion() { * * *
-   * Findings container version, if available
-   * ("generation" for Google Cloud Storage).
+   * Finding container version, if available
+   * ("generation" for Cloud Storage).
    * 
* * string container_version = 7; @@ -1142,7 +1142,7 @@ public Builder clearLocation() { * * Cloud Storage files: `gs://{bucket}/{path}` * * Datastore namespace: {namespace} * Nested names could be absent if the embedded object has no string - * identifier (for an example an image contained within a document). + * identifier (for example, an image contained within a document). * * * string container_name = 1; @@ -1171,7 +1171,7 @@ public java.lang.String getContainerName() { * * Cloud Storage files: `gs://{bucket}/{path}` * * Datastore namespace: {namespace} * Nested names could be absent if the embedded object has no string - * identifier (for an example an image contained within a document). + * identifier (for example, an image contained within a document). * * * string container_name = 1; @@ -1200,7 +1200,7 @@ public com.google.protobuf.ByteString getContainerNameBytes() { * * Cloud Storage files: `gs://{bucket}/{path}` * * Datastore namespace: {namespace} * Nested names could be absent if the embedded object has no string - * identifier (for an example an image contained within a document). + * identifier (for example, an image contained within a document). * * * string container_name = 1; @@ -1228,7 +1228,7 @@ public Builder setContainerName(java.lang.String value) { * * Cloud Storage files: `gs://{bucket}/{path}` * * Datastore namespace: {namespace} * Nested names could be absent if the embedded object has no string - * identifier (for an example an image contained within a document). + * identifier (for example, an image contained within a document). * * * string container_name = 1; @@ -1252,7 +1252,7 @@ public Builder clearContainerName() { * * Cloud Storage files: `gs://{bucket}/{path}` * * Datastore namespace: {namespace} * Nested names could be absent if the embedded object has no string - * identifier (for an example an image contained within a document). + * identifier (for example, an image contained within a document). * * * string container_name = 1; @@ -2121,10 +2121,10 @@ public com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOr * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
      * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -2138,10 +2138,10 @@ public boolean hasContainerTimestamp() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
      * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -2161,10 +2161,10 @@ public com.google.protobuf.Timestamp getContainerTimestamp() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
      * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -2186,10 +2186,10 @@ public Builder setContainerTimestamp(com.google.protobuf.Timestamp value) { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
      * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -2208,10 +2208,10 @@ public Builder setContainerTimestamp(com.google.protobuf.Timestamp.Builder build * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
      * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -2237,10 +2237,10 @@ public Builder mergeContainerTimestamp(com.google.protobuf.Timestamp value) { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
      * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -2260,10 +2260,10 @@ public Builder clearContainerTimestamp() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
      * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -2277,10 +2277,10 @@ public com.google.protobuf.Timestamp.Builder getContainerTimestampBuilder() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
      * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -2298,10 +2298,10 @@ public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { * * *
-     * Findings container modification timestamp, if applicable.
-     * For Google Cloud Storage contains last file modification timestamp.
-     * For BigQuery table contains last_modified_time property.
-     * For Datastore - not populated.
+     * Finding container modification timestamp, if applicable. For Cloud Storage,
+     * this field contains the last file modification timestamp. For a BigQuery
+     * table, this field contains the last_modified_time property. For Datastore,
+     * this field isn't populated.
      * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -2328,8 +2328,8 @@ public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { * * *
-     * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
      * 
* * string container_version = 7; @@ -2351,8 +2351,8 @@ public java.lang.String getContainerVersion() { * * *
-     * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
      * 
* * string container_version = 7; @@ -2374,8 +2374,8 @@ public com.google.protobuf.ByteString getContainerVersionBytes() { * * *
-     * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
      * 
* * string container_version = 7; @@ -2396,8 +2396,8 @@ public Builder setContainerVersion(java.lang.String value) { * * *
-     * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
      * 
* * string container_version = 7; @@ -2414,8 +2414,8 @@ public Builder clearContainerVersion() { * * *
-     * Findings container version, if available
-     * ("generation" for Google Cloud Storage).
+     * Finding container version, if available
+     * ("generation" for Cloud Storage).
      * 
* * string container_version = 7; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java index d37ce023e872..abe65cc512de 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java @@ -34,7 +34,7 @@ public interface ContentLocationOrBuilder * * Cloud Storage files: `gs://{bucket}/{path}` * * Datastore namespace: {namespace} * Nested names could be absent if the embedded object has no string - * identifier (for an example an image contained within a document). + * identifier (for example, an image contained within a document). * * * string container_name = 1; @@ -53,7 +53,7 @@ public interface ContentLocationOrBuilder * * Cloud Storage files: `gs://{bucket}/{path}` * * Datastore namespace: {namespace} * Nested names could be absent if the embedded object has no string - * identifier (for an example an image contained within a document). + * identifier (for example, an image contained within a document). * * * string container_name = 1; @@ -206,10 +206,10 @@ public interface ContentLocationOrBuilder * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
    * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -221,10 +221,10 @@ public interface ContentLocationOrBuilder * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
    * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -236,10 +236,10 @@ public interface ContentLocationOrBuilder * * *
-   * Findings container modification timestamp, if applicable.
-   * For Google Cloud Storage contains last file modification timestamp.
-   * For BigQuery table contains last_modified_time property.
-   * For Datastore - not populated.
+   * Finding container modification timestamp, if applicable. For Cloud Storage,
+   * this field contains the last file modification timestamp. For a BigQuery
+   * table, this field contains the last_modified_time property. For Datastore,
+   * this field isn't populated.
    * 
* * .google.protobuf.Timestamp container_timestamp = 6; @@ -250,8 +250,8 @@ public interface ContentLocationOrBuilder * * *
-   * Findings container version, if available
-   * ("generation" for Google Cloud Storage).
+   * Finding container version, if available
+   * ("generation" for Cloud Storage).
    * 
* * string container_version = 7; @@ -263,8 +263,8 @@ public interface ContentLocationOrBuilder * * *
-   * Findings container version, if available
-   * ("generation" for Google Cloud Storage).
+   * Finding container version, if available
+   * ("generation" for Cloud Storage).
    * 
* * string container_version = 7; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java index 488026585aac..c0467b3d4802 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java @@ -151,7 +151,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(2); + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(5); } private static final ContentOption[] VALUES = values(); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java index cbd4989b0904..a81ae48583fa 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java @@ -348,7 +348,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -376,7 +376,7 @@ public boolean hasContext() { * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -404,7 +404,7 @@ public com.google.privacy.dlp.v2.FieldId getContext() { * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -1439,7 +1439,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -1466,7 +1466,7 @@ public boolean hasContext() { * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -1497,7 +1497,7 @@ public com.google.privacy.dlp.v2.FieldId getContext() { * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -1532,7 +1532,7 @@ public Builder setContext(com.google.privacy.dlp.v2.FieldId value) { * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -1564,7 +1564,7 @@ public Builder setContext(com.google.privacy.dlp.v2.FieldId.Builder builderForVa * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -1603,7 +1603,7 @@ public Builder mergeContext(com.google.privacy.dlp.v2.FieldId value) { * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -1636,7 +1636,7 @@ public Builder clearContext() { * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -1663,7 +1663,7 @@ public com.google.privacy.dlp.v2.FieldId.Builder getContextBuilder() { * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -1692,7 +1692,7 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java index 14513ed46188..b3f77dd315c2 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java @@ -191,7 +191,7 @@ public interface CryptoDeterministicConfigOrBuilder * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -216,7 +216,7 @@ public interface CryptoDeterministicConfigOrBuilder * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; @@ -241,7 +241,7 @@ public interface CryptoDeterministicConfigOrBuilder * 2. the field is not present when transforming a given value, * plaintext would be used as is for encryption. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * * * .google.privacy.dlp.v2.FieldId context = 3; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java index dcfeb5fb4e2b..d01d1f7be93c 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java @@ -187,7 +187,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * These are commonly used subsets of the alphabet that the FFX mode
    * natively supports. In the algorithm, the alphabet is selected using
-   * the "radix". Therefore each corresponds to particular radix.
+   * the "radix". Therefore each corresponds to a particular radix.
    * 
* * Protobuf enum {@code google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet} @@ -507,7 +507,7 @@ public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -535,7 +535,7 @@ public boolean hasContext() { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -563,7 +563,7 @@ public com.google.privacy.dlp.v2.FieldId getContext() { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -1603,7 +1603,7 @@ public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -1630,7 +1630,7 @@ public boolean hasContext() { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -1661,7 +1661,7 @@ public com.google.privacy.dlp.v2.FieldId getContext() { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -1696,7 +1696,7 @@ public Builder setContext(com.google.privacy.dlp.v2.FieldId value) { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -1728,7 +1728,7 @@ public Builder setContext(com.google.privacy.dlp.v2.FieldId.Builder builderForVa * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -1767,7 +1767,7 @@ public Builder mergeContext(com.google.privacy.dlp.v2.FieldId value) { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -1800,7 +1800,7 @@ public Builder clearContext() { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -1827,7 +1827,7 @@ public com.google.privacy.dlp.v2.FieldId.Builder getContextBuilder() { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -1856,7 +1856,7 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java index 0241d7e2c465..247e097361d8 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java @@ -76,7 +76,7 @@ public interface CryptoReplaceFfxFpeConfigOrBuilder * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -101,7 +101,7 @@ public interface CryptoReplaceFfxFpeConfigOrBuilder * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: @@ -126,7 +126,7 @@ public interface CryptoReplaceFfxFpeConfigOrBuilder * 1. the field is not present when transforming a given value, * a default tweak will be used. * Note that case (1) is expected when an `InfoTypeTransformation` is - * applied to both structured and non-structured `ContentItem`s. + * applied to both structured and unstructured `ContentItem`s. * Currently, the referenced field may be of value type integer or string. * The tweak is constructed as a sequence of bytes in big endian byte order * such that: diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java index 6f1148727f5d..3104aa0edae5 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java @@ -22,7 +22,7 @@ * * *
- * A condition for determining whether a PubSub should be triggered.
+ * A condition for determining whether a Pub/Sub should be triggered.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition} @@ -3074,7 +3074,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A condition for determining whether a PubSub should be triggered.
+   * A condition for determining whether a Pub/Sub should be triggered.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition} diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java index 4a9bade75398..3c5e18c3da07 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java @@ -22,10 +22,9 @@ * * *
- * The message that will be published to a Pub/Sub topic.
+ * Pub/Sub topic message for a DataProfileAction.PubSubNotification event.
  * To receive a message of protocol buffer schema type, convert the message data
  * to an object of this proto class.
- * https://cloud.google.com/pubsub/docs/samples/pubsub-subscribe-proto-messages
  * 
* * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubMessage} @@ -405,10 +404,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * The message that will be published to a Pub/Sub topic.
+   * Pub/Sub topic message for a DataProfileAction.PubSubNotification event.
    * To receive a message of protocol buffer schema type, convert the message data
    * to an object of this proto class.
-   * https://cloud.google.com/pubsub/docs/samples/pubsub-subscribe-proto-messages
    * 
* * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubMessage} diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java index 1a147062d7c9..db7248c2d07d 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java @@ -23,7 +23,7 @@ * *
  * Score is a summary of all elements in the data profile.
- * A higher number means more risky.
+ * A higher number means more risk.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.DataRiskLevel} @@ -151,8 +151,8 @@ public enum DataRiskLevelScore implements com.google.protobuf.ProtocolMessageEnu * *
      * Medium risk - Sensitive data may be present but additional access or fine
-     * grain access restrictions appears to be present.  Consider limiting
-     * access even further or transforming data to mask.
+     * grain access restrictions appear to be present.  Consider limiting
+     * access even further or transform data to mask.
      * 
* * RISK_MODERATE = 20; @@ -200,8 +200,8 @@ public enum DataRiskLevelScore implements com.google.protobuf.ProtocolMessageEnu * *
      * Medium risk - Sensitive data may be present but additional access or fine
-     * grain access restrictions appears to be present.  Consider limiting
-     * access even further or transforming data to mask.
+     * grain access restrictions appear to be present.  Consider limiting
+     * access even further or transform data to mask.
      * 
* * RISK_MODERATE = 20; @@ -513,7 +513,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Score is a summary of all elements in the data profile.
-   * A higher number means more risky.
+   * A higher number means more risk.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.DataRiskLevel} diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java index 05886c944899..8af0b3eaf841 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java @@ -121,6 +121,24 @@ private DeidentifyConfig( transformationErrorHandling_ = subBuilder.buildPartial(); } + break; + } + case 34: + { + com.google.privacy.dlp.v2.ImageTransformations.Builder subBuilder = null; + if (transformationCase_ == 4) { + subBuilder = + ((com.google.privacy.dlp.v2.ImageTransformations) transformation_).toBuilder(); + } + transformation_ = + input.readMessage( + com.google.privacy.dlp.v2.ImageTransformations.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.privacy.dlp.v2.ImageTransformations) transformation_); + transformation_ = subBuilder.buildPartial(); + } + transformationCase_ = 4; break; } default: @@ -168,6 +186,7 @@ public enum TransformationCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { INFO_TYPE_TRANSFORMATIONS(1), RECORD_TRANSFORMATIONS(2), + IMAGE_TRANSFORMATIONS(4), TRANSFORMATION_NOT_SET(0); private final int value; @@ -190,6 +209,8 @@ public static TransformationCase forNumber(int value) { return INFO_TYPE_TRANSFORMATIONS; case 2: return RECORD_TRANSFORMATIONS; + case 4: + return IMAGE_TRANSFORMATIONS; case 0: return TRANSFORMATION_NOT_SET; default: @@ -319,6 +340,58 @@ public com.google.privacy.dlp.v2.RecordTransformations getRecordTransformations( return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); } + public static final int IMAGE_TRANSFORMATIONS_FIELD_NUMBER = 4; + /** + * + * + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * + * @return Whether the imageTransformations field is set. + */ + @java.lang.Override + public boolean hasImageTransformations() { + return transformationCase_ == 4; + } + /** + * + * + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * + * @return The imageTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations getImageTransformations() { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + /** + * + * + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformationsOrBuilder + getImageTransformationsOrBuilder() { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + public static final int TRANSFORMATION_ERROR_HANDLING_FIELD_NUMBER = 3; private com.google.privacy.dlp.v2.TransformationErrorHandling transformationErrorHandling_; /** @@ -397,6 +470,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (transformationErrorHandling_ != null) { output.writeMessage(3, getTransformationErrorHandling()); } + if (transformationCase_ == 4) { + output.writeMessage(4, (com.google.privacy.dlp.v2.ImageTransformations) transformation_); + } unknownFields.writeTo(output); } @@ -421,6 +497,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, getTransformationErrorHandling()); } + if (transformationCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.privacy.dlp.v2.ImageTransformations) transformation_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -450,6 +531,9 @@ public boolean equals(final java.lang.Object obj) { case 2: if (!getRecordTransformations().equals(other.getRecordTransformations())) return false; break; + case 4: + if (!getImageTransformations().equals(other.getImageTransformations())) return false; + break; case 0: default: } @@ -477,6 +561,10 @@ public int hashCode() { hash = (37 * hash) + RECORD_TRANSFORMATIONS_FIELD_NUMBER; hash = (53 * hash) + getRecordTransformations().hashCode(); break; + case 4: + hash = (37 * hash) + IMAGE_TRANSFORMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getImageTransformations().hashCode(); + break; case 0: default: } @@ -674,6 +762,13 @@ public com.google.privacy.dlp.v2.DeidentifyConfig buildPartial() { result.transformation_ = recordTransformationsBuilder_.build(); } } + if (transformationCase_ == 4) { + if (imageTransformationsBuilder_ == null) { + result.transformation_ = transformation_; + } else { + result.transformation_ = imageTransformationsBuilder_.build(); + } + } if (transformationErrorHandlingBuilder_ == null) { result.transformationErrorHandling_ = transformationErrorHandling_; } else { @@ -743,6 +838,11 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyConfig other) { mergeRecordTransformations(other.getRecordTransformations()); break; } + case IMAGE_TRANSFORMATIONS: + { + mergeImageTransformations(other.getImageTransformations()); + break; + } case TRANSFORMATION_NOT_SET: { break; @@ -1247,6 +1347,218 @@ public Builder clearRecordTransformations() { return recordTransformationsBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations, + com.google.privacy.dlp.v2.ImageTransformations.Builder, + com.google.privacy.dlp.v2.ImageTransformationsOrBuilder> + imageTransformationsBuilder_; + /** + * + * + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * + * @return Whether the imageTransformations field is set. + */ + @java.lang.Override + public boolean hasImageTransformations() { + return transformationCase_ == 4; + } + /** + * + * + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * + * @return The imageTransformations. + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformations getImageTransformations() { + if (imageTransformationsBuilder_ == null) { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } else { + if (transformationCase_ == 4) { + return imageTransformationsBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + } + /** + * + * + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public Builder setImageTransformations(com.google.privacy.dlp.v2.ImageTransformations value) { + if (imageTransformationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transformation_ = value; + onChanged(); + } else { + imageTransformationsBuilder_.setMessage(value); + } + transformationCase_ = 4; + return this; + } + /** + * + * + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public Builder setImageTransformations( + com.google.privacy.dlp.v2.ImageTransformations.Builder builderForValue) { + if (imageTransformationsBuilder_ == null) { + transformation_ = builderForValue.build(); + onChanged(); + } else { + imageTransformationsBuilder_.setMessage(builderForValue.build()); + } + transformationCase_ = 4; + return this; + } + /** + * + * + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public Builder mergeImageTransformations(com.google.privacy.dlp.v2.ImageTransformations value) { + if (imageTransformationsBuilder_ == null) { + if (transformationCase_ == 4 + && transformation_ + != com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance()) { + transformation_ = + com.google.privacy.dlp.v2.ImageTransformations.newBuilder( + (com.google.privacy.dlp.v2.ImageTransformations) transformation_) + .mergeFrom(value) + .buildPartial(); + } else { + transformation_ = value; + } + onChanged(); + } else { + if (transformationCase_ == 4) { + imageTransformationsBuilder_.mergeFrom(value); + } else { + imageTransformationsBuilder_.setMessage(value); + } + } + transformationCase_ = 4; + return this; + } + /** + * + * + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public Builder clearImageTransformations() { + if (imageTransformationsBuilder_ == null) { + if (transformationCase_ == 4) { + transformationCase_ = 0; + transformation_ = null; + onChanged(); + } + } else { + if (transformationCase_ == 4) { + transformationCase_ = 0; + transformation_ = null; + } + imageTransformationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + public com.google.privacy.dlp.v2.ImageTransformations.Builder getImageTransformationsBuilder() { + return getImageTransformationsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.ImageTransformationsOrBuilder + getImageTransformationsOrBuilder() { + if ((transformationCase_ == 4) && (imageTransformationsBuilder_ != null)) { + return imageTransformationsBuilder_.getMessageOrBuilder(); + } else { + if (transformationCase_ == 4) { + return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; + } + return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + } + /** + * + * + *
+     * Treat the dataset as an image and redact.
+     * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations, + com.google.privacy.dlp.v2.ImageTransformations.Builder, + com.google.privacy.dlp.v2.ImageTransformationsOrBuilder> + getImageTransformationsFieldBuilder() { + if (imageTransformationsBuilder_ == null) { + if (!(transformationCase_ == 4)) { + transformation_ = com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); + } + imageTransformationsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations, + com.google.privacy.dlp.v2.ImageTransformations.Builder, + com.google.privacy.dlp.v2.ImageTransformationsOrBuilder>( + (com.google.privacy.dlp.v2.ImageTransformations) transformation_, + getParentForChildren(), + isClean()); + transformation_ = null; + } + transformationCase_ = 4; + onChanged(); + ; + return imageTransformationsBuilder_; + } + private com.google.privacy.dlp.v2.TransformationErrorHandling transformationErrorHandling_; private com.google.protobuf.SingleFieldBuilderV3< com.google.privacy.dlp.v2.TransformationErrorHandling, diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java index c9640fb9a89b..6822488a342c 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java @@ -102,6 +102,41 @@ public interface DeidentifyConfigOrBuilder */ com.google.privacy.dlp.v2.RecordTransformationsOrBuilder getRecordTransformationsOrBuilder(); + /** + * + * + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * + * @return Whether the imageTransformations field is set. + */ + boolean hasImageTransformations(); + /** + * + * + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + * + * @return The imageTransformations. + */ + com.google.privacy.dlp.v2.ImageTransformations getImageTransformations(); + /** + * + * + *
+   * Treat the dataset as an image and redact.
+   * 
+ * + * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; + */ + com.google.privacy.dlp.v2.ImageTransformationsOrBuilder getImageTransformationsOrBuilder(); + /** * * diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java index d1a5e84c6762..82658168c317 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java @@ -22,7 +22,7 @@ * * *
- * Request to de-identify a list of items.
+ * Request to de-identify a ContentItem.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentRequest} @@ -805,7 +805,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request to de-identify a list of items.
+   * Request to de-identify a ContentItem.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentRequest} diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java index 0add15681efa..b81c989cc6ec 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java @@ -288,7 +288,7 @@ public enum JobState implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The job was canceled before it could complete.
+     * The job was canceled before it could be completed.
      * 
* * CANCELED = 4; @@ -310,7 +310,7 @@ public enum JobState implements com.google.protobuf.ProtocolMessageEnum { *
      * The job is currently accepting findings via hybridInspect.
      * A hybrid job in ACTIVE state may continue to have findings added to it
-     * through calling of hybridInspect. After the job has finished no more
+     * through the calling of hybridInspect. After the job has finished no more
      * calls to hybridInspect may be made. ACTIVE jobs can transition to DONE.
      * 
* @@ -365,7 +365,7 @@ public enum JobState implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The job was canceled before it could complete.
+     * The job was canceled before it could be completed.
      * 
* * CANCELED = 4; @@ -387,7 +387,7 @@ public enum JobState implements com.google.protobuf.ProtocolMessageEnum { *
      * The job is currently accepting findings via hybridInspect.
      * A hybrid job in ACTIVE state may continue to have findings added to it
-     * through calling of hybridInspect. After the job has finished no more
+     * through the calling of hybridInspect. After the job has finished no more
      * calls to hybridInspect may be made. ACTIVE jobs can transition to DONE.
      * 
* diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java index ada686bf6295..cc26c0f4a064 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java @@ -151,7 +151,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(5); + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(8); } private static final DlpJobType[] VALUES = values(); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java index 9e114030f6c7..558ceb742f28 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java @@ -199,6 +199,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_InfoTypeCategory_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -355,6 +359,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -491,6 +515,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_Schedule_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -539,6 +587,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -547,6 +599,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -751,10 +807,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -1003,1041 +1055,1114 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "privacy.dlp.v2.HybridInspectStatistics\"`" + "\n\027HybridInspectStatistics\022\027\n\017processed_c" + "ount\030\001 \001(\003\022\025\n\raborted_count\030\002 \001(\003\022\025\n\rpen" - + "ding_count\030\003 \001(\003\"\315\001\n\023InfoTypeDescription" + + "ding_count\030\003 \001(\003\"\212\002\n\023InfoTypeDescription" + "\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022@\n\014" + "supported_by\030\003 \003(\0162*.google.privacy.dlp." + "v2.InfoTypeSupportedBy\022\023\n\013description\030\004 " - + "\001(\t\022;\n\ncategories\030\n \003(\0132\'.google.privacy" - + ".dlp.v2.InfoTypeCategory\"\330\010\n\020InfoTypeCat" - + "egory\022U\n\021location_category\030\001 \001(\01628.googl" - + "e.privacy.dlp.v2.InfoTypeCategory.Locati" - + "onCategoryH\000\022U\n\021industry_category\030\002 \001(\0162" - + "8.google.privacy.dlp.v2.InfoTypeCategory" - + ".IndustryCategoryH\000\022M\n\rtype_category\030\003 \001" - + "(\01624.google.privacy.dlp.v2.InfoTypeCateg" - + "ory.TypeCategoryH\000\"\303\004\n\020LocationCategory\022" - + "\030\n\024LOCATION_UNSPECIFIED\020\000\022\n\n\006GLOBAL\020\001\022\r\n" - + "\tARGENTINA\020\002\022\r\n\tAUSTRALIA\020\003\022\013\n\007BELGIUM\020\004" - + "\022\n\n\006BRAZIL\020\005\022\n\n\006CANADA\020\006\022\t\n\005CHILE\020\007\022\t\n\005C" - + "HINA\020\010\022\014\n\010COLOMBIA\020\t\022\013\n\007DENMARK\020\n\022\n\n\006FRA" - + "NCE\020\013\022\013\n\007FINLAND\020\014\022\013\n\007GERMANY\020\r\022\r\n\tHONG_" - + "KONG\020\016\022\t\n\005INDIA\020\017\022\r\n\tINDONESIA\020\020\022\013\n\007IREL" - + "AND\020\021\022\n\n\006ISRAEL\020\022\022\t\n\005ITALY\020\023\022\t\n\005JAPAN\020\024\022" - + "\t\n\005KOREA\020\025\022\n\n\006MEXICO\020\026\022\023\n\017THE_NETHERLAND" - + "S\020\027\022\n\n\006NORWAY\020\030\022\014\n\010PARAGUAY\020\031\022\010\n\004PERU\020\032\022" - + "\n\n\006POLAND\020\033\022\014\n\010PORTUGAL\020\034\022\r\n\tSINGAPORE\020\035" - + "\022\020\n\014SOUTH_AFRICA\020\036\022\t\n\005SPAIN\020\037\022\n\n\006SWEDEN\020" - + " \022\n\n\006TAIWAN\020!\022\014\n\010THAILAND\020\"\022\n\n\006TURKEY\020#\022" - + "\022\n\016UNITED_KINGDOM\020$\022\021\n\rUNITED_STATES\020%\022\013" - + "\n\007URUGUAY\020&\022\r\n\tVENEZUELA\020\'\022\014\n\010INTERNAL\020(" - + "\"]\n\020IndustryCategory\022\030\n\024INDUSTRY_UNSPECI" - + "FIED\020\000\022\013\n\007FINANCE\020\001\022\n\n\006HEALTH\020\002\022\026\n\022TELEC" - + "OMMUNICATIONS\020\003\"\225\001\n\014TypeCategory\022\024\n\020TYPE" - + "_UNSPECIFIED\020\000\022\007\n\003PII\020\001\022\010\n\004SPII\020\002\022\017\n\013DEM" - + "OGRAPHIC\020\003\022\016\n\nCREDENTIAL\020\004\022\021\n\rGOVERNMENT" - + "_ID\020\005\022\014\n\010DOCUMENT\020\006\022\032\n\026CONTEXTUAL_INFORM" - + "ATION\020\007B\n\n\010category\"b\n\024ListInfoTypesRequ" - + "est\022\016\n\006parent\030\004 \001(\t\022\025\n\rlanguage_code\030\001 \001" - + "(\t\022\016\n\006filter\030\002 \001(\t\022\023\n\013location_id\030\003 \001(\t\"" - + "W\n\025ListInfoTypesResponse\022>\n\ninfo_types\030\001" - + " \003(\0132*.google.privacy.dlp.v2.InfoTypeDes" - + "cription\"\301\001\n\025RiskAnalysisJobConfig\022<\n\016pr" - + "ivacy_metric\030\001 \001(\0132$.google.privacy.dlp." - + "v2.PrivacyMetric\022:\n\014source_table\030\002 \001(\0132$" - + ".google.privacy.dlp.v2.BigQueryTable\022.\n\007" - + "actions\030\003 \003(\0132\035.google.privacy.dlp.v2.Ac" - + "tion\"\274\001\n\007QuasiId\0222\n\005field\030\001 \001(\0132\036.google" - + ".privacy.dlp.v2.FieldIdB\003\340A\002\0224\n\tinfo_typ" - + "e\030\002 \001(\0132\037.google.privacy.dlp.v2.InfoType" - + "H\000\022\024\n\ncustom_tag\030\003 \001(\tH\000\022*\n\010inferred\030\004 \001" - + "(\0132\026.google.protobuf.EmptyH\000B\005\n\003tag\"\276\002\n\020" - + "StatisticalTable\0228\n\005table\030\003 \001(\0132$.google" - + ".privacy.dlp.v2.BigQueryTableB\003\340A\002\022T\n\tqu" - + "asi_ids\030\001 \003(\0132<.google.privacy.dlp.v2.St" - + "atisticalTable.QuasiIdentifierFieldB\003\340A\002" - + "\022?\n\022relative_frequency\030\002 \001(\0132\036.google.pr" - + "ivacy.dlp.v2.FieldIdB\003\340A\002\032Y\n\024QuasiIdenti" - + "fierField\022-\n\005field\030\001 \001(\0132\036.google.privac" - + "y.dlp.v2.FieldId\022\022\n\ncustom_tag\030\002 \001(\t\"\223\017\n" - + "\rPrivacyMetric\022[\n\026numerical_stats_config" - + "\030\001 \001(\01329.google.privacy.dlp.v2.PrivacyMe" - + "tric.NumericalStatsConfigH\000\022_\n\030categoric" - + "al_stats_config\030\002 \001(\0132;.google.privacy.d" - + "lp.v2.PrivacyMetric.CategoricalStatsConf" - + "igH\000\022S\n\022k_anonymity_config\030\003 \001(\01325.googl" - + "e.privacy.dlp.v2.PrivacyMetric.KAnonymit" - + "yConfigH\000\022S\n\022l_diversity_config\030\004 \001(\01325." - + "google.privacy.dlp.v2.PrivacyMetric.LDiv" - + "ersityConfigH\000\022\\\n\027k_map_estimation_confi" - + "g\030\005 \001(\01329.google.privacy.dlp.v2.PrivacyM" - + "etric.KMapEstimationConfigH\000\022n\n delta_pr" - + "esence_estimation_config\030\006 \001(\0132B.google." - + "privacy.dlp.v2.PrivacyMetric.DeltaPresen" - + "ceEstimationConfigH\000\032E\n\024NumericalStatsCo" - + "nfig\022-\n\005field\030\001 \001(\0132\036.google.privacy.dlp" - + ".v2.FieldId\032G\n\026CategoricalStatsConfig\022-\n" - + "\005field\030\001 \001(\0132\036.google.privacy.dlp.v2.Fie" - + "ldId\032y\n\020KAnonymityConfig\0221\n\tquasi_ids\030\001 " - + "\003(\0132\036.google.privacy.dlp.v2.FieldId\0222\n\te" - + "ntity_id\030\002 \001(\0132\037.google.privacy.dlp.v2.E" - + "ntityId\032\202\001\n\020LDiversityConfig\0221\n\tquasi_id" - + "s\030\001 \003(\0132\036.google.privacy.dlp.v2.FieldId\022" - + ";\n\023sensitive_attribute\030\002 \001(\0132\036.google.pr" - + "ivacy.dlp.v2.FieldId\032\201\006\n\024KMapEstimationC" - + "onfig\022]\n\tquasi_ids\030\001 \003(\0132E.google.privac" - + "y.dlp.v2.PrivacyMetric.KMapEstimationCon" - + "fig.TaggedFieldB\003\340A\002\022\023\n\013region_code\030\002 \001(" - + "\t\022b\n\020auxiliary_tables\030\003 \003(\0132H.google.pri" - + "vacy.dlp.v2.PrivacyMetric.KMapEstimation" - + "Config.AuxiliaryTable\032\300\001\n\013TaggedField\0222\n" - + "\005field\030\001 \001(\0132\036.google.privacy.dlp.v2.Fie" - + "ldIdB\003\340A\002\0224\n\tinfo_type\030\002 \001(\0132\037.google.pr" - + "ivacy.dlp.v2.InfoTypeH\000\022\024\n\ncustom_tag\030\003 " - + "\001(\tH\000\022*\n\010inferred\030\004 \001(\0132\026.google.protobu" - + "f.EmptyH\000B\005\n\003tag\032\315\002\n\016AuxiliaryTable\0228\n\005t" - + "able\030\003 \001(\0132$.google.privacy.dlp.v2.BigQu" - + "eryTableB\003\340A\002\022m\n\tquasi_ids\030\001 \003(\0132U.googl" - + "e.privacy.dlp.v2.PrivacyMetric.KMapEstim" - + "ationConfig.AuxiliaryTable.QuasiIdFieldB" - + "\003\340A\002\022?\n\022relative_frequency\030\002 \001(\0132\036.googl" - + "e.privacy.dlp.v2.FieldIdB\003\340A\002\032Q\n\014QuasiId" - + "Field\022-\n\005field\030\001 \001(\0132\036.google.privacy.dl" - + "p.v2.FieldId\022\022\n\ncustom_tag\030\002 \001(\t\032\257\001\n\035Del" - + "taPresenceEstimationConfig\0226\n\tquasi_ids\030" - + "\001 \003(\0132\036.google.privacy.dlp.v2.QuasiIdB\003\340" - + "A\002\022\023\n\013region_code\030\002 \001(\t\022A\n\020auxiliary_tab" - + "les\030\003 \003(\0132\'.google.privacy.dlp.v2.Statis" - + "ticalTableB\006\n\004type\"\301\037\n\034AnalyzeDataSource" - + "RiskDetails\022F\n\030requested_privacy_metric\030" - + "\001 \001(\0132$.google.privacy.dlp.v2.PrivacyMet" - + "ric\022D\n\026requested_source_table\030\002 \001(\0132$.go" - + "ogle.privacy.dlp.v2.BigQueryTable\022j\n\026num" - + "erical_stats_result\030\003 \001(\0132H.google.priva" - + "cy.dlp.v2.AnalyzeDataSourceRiskDetails.N" - + "umericalStatsResultH\000\022n\n\030categorical_sta" - + "ts_result\030\004 \001(\0132J.google.privacy.dlp.v2." - + "AnalyzeDataSourceRiskDetails.Categorical" - + "StatsResultH\000\022b\n\022k_anonymity_result\030\005 \001(" - + "\0132D.google.privacy.dlp.v2.AnalyzeDataSou" - + "rceRiskDetails.KAnonymityResultH\000\022b\n\022l_d" - + "iversity_result\030\006 \001(\0132D.google.privacy.d" - + "lp.v2.AnalyzeDataSourceRiskDetails.LDive" - + "rsityResultH\000\022k\n\027k_map_estimation_result" - + "\030\007 \001(\0132H.google.privacy.dlp.v2.AnalyzeDa" - + "taSourceRiskDetails.KMapEstimationResult" - + "H\000\022}\n delta_presence_estimation_result\030\t" - + " \001(\0132Q.google.privacy.dlp.v2.AnalyzeData" - + "SourceRiskDetails.DeltaPresenceEstimatio" - + "nResultH\000\022k\n\021requested_options\030\n \001(\0132P.g" - + "oogle.privacy.dlp.v2.AnalyzeDataSourceRi" - + "skDetails.RequestedRiskAnalysisOptions\032\257" - + "\001\n\024NumericalStatsResult\022/\n\tmin_value\030\001 \001" - + "(\0132\034.google.privacy.dlp.v2.Value\022/\n\tmax_" - + "value\030\002 \001(\0132\034.google.privacy.dlp.v2.Valu" - + "e\0225\n\017quantile_values\030\004 \003(\0132\034.google.priv" - + "acy.dlp.v2.Value\032\215\003\n\026CategoricalStatsRes" - + "ult\022\225\001\n!value_frequency_histogram_bucket" - + "s\030\005 \003(\0132j.google.privacy.dlp.v2.AnalyzeD" - + "ataSourceRiskDetails.CategoricalStatsRes" - + "ult.CategoricalStatsHistogramBucket\032\332\001\n\037" - + "CategoricalStatsHistogramBucket\022#\n\033value" - + "_frequency_lower_bound\030\001 \001(\003\022#\n\033value_fr" - + "equency_upper_bound\030\002 \001(\003\022\023\n\013bucket_size" - + "\030\003 \001(\003\022<\n\rbucket_values\030\004 \003(\0132%.google.p" - + "rivacy.dlp.v2.ValueFrequency\022\032\n\022bucket_v" - + "alue_count\030\005 \001(\003\032\265\004\n\020KAnonymityResult\022\213\001" - + "\n#equivalence_class_histogram_buckets\030\005 " - + "\003(\0132^.google.privacy.dlp.v2.AnalyzeDataS" - + "ourceRiskDetails.KAnonymityResult.KAnony" - + "mityHistogramBucket\032t\n\032KAnonymityEquival" - + "enceClass\0226\n\020quasi_ids_values\030\001 \003(\0132\034.go" - + "ogle.privacy.dlp.v2.Value\022\036\n\026equivalence" - + "_class_size\030\002 \001(\003\032\234\002\n\031KAnonymityHistogra" - + "mBucket\022*\n\"equivalence_class_size_lower_" - + "bound\030\001 \001(\003\022*\n\"equivalence_class_size_up" - + "per_bound\030\002 \001(\003\022\023\n\013bucket_size\030\003 \001(\003\022v\n\r" - + "bucket_values\030\004 \003(\0132_.google.privacy.dlp" - + ".v2.AnalyzeDataSourceRiskDetails.KAnonym" - + "ityResult.KAnonymityEquivalenceClass\022\032\n\022" - + "bucket_value_count\030\005 \001(\003\032\260\005\n\020LDiversityR" - + "esult\022\223\001\n+sensitive_value_frequency_hist" - + "ogram_buckets\030\005 \003(\0132^.google.privacy.dlp" - + ".v2.AnalyzeDataSourceRiskDetails.LDivers" - + "ityResult.LDiversityHistogramBucket\032\340\001\n\032" - + "LDiversityEquivalenceClass\0226\n\020quasi_ids_" - + "values\030\001 \003(\0132\034.google.privacy.dlp.v2.Val" - + "ue\022\036\n\026equivalence_class_size\030\002 \001(\003\022%\n\035nu" - + "m_distinct_sensitive_values\030\003 \001(\003\022C\n\024top" - + "_sensitive_values\030\004 \003(\0132%.google.privacy" - + ".dlp.v2.ValueFrequency\032\242\002\n\031LDiversityHis" - + "togramBucket\022-\n%sensitive_value_frequenc" - + "y_lower_bound\030\001 \001(\003\022-\n%sensitive_value_f" + + "\001(\t\022;\n\010versions\030\t \003(\0132).google.privacy.d" + + "lp.v2.VersionDescription\022;\n\ncategories\030\n" + + " \003(\0132\'.google.privacy.dlp.v2.InfoTypeCat" + + "egory\"\330\010\n\020InfoTypeCategory\022U\n\021location_c" + + "ategory\030\001 \001(\01628.google.privacy.dlp.v2.In" + + "foTypeCategory.LocationCategoryH\000\022U\n\021ind" + + "ustry_category\030\002 \001(\01628.google.privacy.dl" + + "p.v2.InfoTypeCategory.IndustryCategoryH\000" + + "\022M\n\rtype_category\030\003 \001(\01624.google.privacy" + + ".dlp.v2.InfoTypeCategory.TypeCategoryH\000\"" + + "\303\004\n\020LocationCategory\022\030\n\024LOCATION_UNSPECI" + + "FIED\020\000\022\n\n\006GLOBAL\020\001\022\r\n\tARGENTINA\020\002\022\r\n\tAUS" + + "TRALIA\020\003\022\013\n\007BELGIUM\020\004\022\n\n\006BRAZIL\020\005\022\n\n\006CAN" + + "ADA\020\006\022\t\n\005CHILE\020\007\022\t\n\005CHINA\020\010\022\014\n\010COLOMBIA\020" + + "\t\022\013\n\007DENMARK\020\n\022\n\n\006FRANCE\020\013\022\013\n\007FINLAND\020\014\022" + + "\013\n\007GERMANY\020\r\022\r\n\tHONG_KONG\020\016\022\t\n\005INDIA\020\017\022\r" + + "\n\tINDONESIA\020\020\022\013\n\007IRELAND\020\021\022\n\n\006ISRAEL\020\022\022\t" + + "\n\005ITALY\020\023\022\t\n\005JAPAN\020\024\022\t\n\005KOREA\020\025\022\n\n\006MEXIC" + + "O\020\026\022\023\n\017THE_NETHERLANDS\020\027\022\n\n\006NORWAY\020\030\022\014\n\010" + + "PARAGUAY\020\031\022\010\n\004PERU\020\032\022\n\n\006POLAND\020\033\022\014\n\010PORT" + + "UGAL\020\034\022\r\n\tSINGAPORE\020\035\022\020\n\014SOUTH_AFRICA\020\036\022" + + "\t\n\005SPAIN\020\037\022\n\n\006SWEDEN\020 \022\n\n\006TAIWAN\020!\022\014\n\010TH" + + "AILAND\020\"\022\n\n\006TURKEY\020#\022\022\n\016UNITED_KINGDOM\020$" + + "\022\021\n\rUNITED_STATES\020%\022\013\n\007URUGUAY\020&\022\r\n\tVENE" + + "ZUELA\020\'\022\014\n\010INTERNAL\020(\"]\n\020IndustryCategor" + + "y\022\030\n\024INDUSTRY_UNSPECIFIED\020\000\022\013\n\007FINANCE\020\001" + + "\022\n\n\006HEALTH\020\002\022\026\n\022TELECOMMUNICATIONS\020\003\"\225\001\n" + + "\014TypeCategory\022\024\n\020TYPE_UNSPECIFIED\020\000\022\007\n\003P" + + "II\020\001\022\010\n\004SPII\020\002\022\017\n\013DEMOGRAPHIC\020\003\022\016\n\nCREDE" + + "NTIAL\020\004\022\021\n\rGOVERNMENT_ID\020\005\022\014\n\010DOCUMENT\020\006" + + "\022\032\n\026CONTEXTUAL_INFORMATION\020\007B\n\n\010category" + + "\":\n\022VersionDescription\022\017\n\007version\030\001 \001(\t\022" + + "\023\n\013description\030\002 \001(\t\"b\n\024ListInfoTypesReq" + + "uest\022\016\n\006parent\030\004 \001(\t\022\025\n\rlanguage_code\030\001 " + + "\001(\t\022\016\n\006filter\030\002 \001(\t\022\023\n\013location_id\030\003 \001(\t" + + "\"W\n\025ListInfoTypesResponse\022>\n\ninfo_types\030" + + "\001 \003(\0132*.google.privacy.dlp.v2.InfoTypeDe" + + "scription\"\301\001\n\025RiskAnalysisJobConfig\022<\n\016p" + + "rivacy_metric\030\001 \001(\0132$.google.privacy.dlp" + + ".v2.PrivacyMetric\022:\n\014source_table\030\002 \001(\0132" + + "$.google.privacy.dlp.v2.BigQueryTable\022.\n" + + "\007actions\030\003 \003(\0132\035.google.privacy.dlp.v2.A" + + "ction\"\274\001\n\007QuasiId\0222\n\005field\030\001 \001(\0132\036.googl" + + "e.privacy.dlp.v2.FieldIdB\003\340A\002\0224\n\tinfo_ty" + + "pe\030\002 \001(\0132\037.google.privacy.dlp.v2.InfoTyp" + + "eH\000\022\024\n\ncustom_tag\030\003 \001(\tH\000\022*\n\010inferred\030\004 " + + "\001(\0132\026.google.protobuf.EmptyH\000B\005\n\003tag\"\276\002\n" + + "\020StatisticalTable\0228\n\005table\030\003 \001(\0132$.googl" + + "e.privacy.dlp.v2.BigQueryTableB\003\340A\002\022T\n\tq" + + "uasi_ids\030\001 \003(\0132<.google.privacy.dlp.v2.S" + + "tatisticalTable.QuasiIdentifierFieldB\003\340A" + + "\002\022?\n\022relative_frequency\030\002 \001(\0132\036.google.p" + + "rivacy.dlp.v2.FieldIdB\003\340A\002\032Y\n\024QuasiIdent" + + "ifierField\022-\n\005field\030\001 \001(\0132\036.google.priva" + + "cy.dlp.v2.FieldId\022\022\n\ncustom_tag\030\002 \001(\t\"\223\017" + + "\n\rPrivacyMetric\022[\n\026numerical_stats_confi" + + "g\030\001 \001(\01329.google.privacy.dlp.v2.PrivacyM" + + "etric.NumericalStatsConfigH\000\022_\n\030categori" + + "cal_stats_config\030\002 \001(\0132;.google.privacy." + + "dlp.v2.PrivacyMetric.CategoricalStatsCon" + + "figH\000\022S\n\022k_anonymity_config\030\003 \001(\01325.goog" + + "le.privacy.dlp.v2.PrivacyMetric.KAnonymi" + + "tyConfigH\000\022S\n\022l_diversity_config\030\004 \001(\01325" + + ".google.privacy.dlp.v2.PrivacyMetric.LDi" + + "versityConfigH\000\022\\\n\027k_map_estimation_conf" + + "ig\030\005 \001(\01329.google.privacy.dlp.v2.Privacy" + + "Metric.KMapEstimationConfigH\000\022n\n delta_p" + + "resence_estimation_config\030\006 \001(\0132B.google" + + ".privacy.dlp.v2.PrivacyMetric.DeltaPrese" + + "nceEstimationConfigH\000\032E\n\024NumericalStatsC" + + "onfig\022-\n\005field\030\001 \001(\0132\036.google.privacy.dl" + + "p.v2.FieldId\032G\n\026CategoricalStatsConfig\022-" + + "\n\005field\030\001 \001(\0132\036.google.privacy.dlp.v2.Fi" + + "eldId\032y\n\020KAnonymityConfig\0221\n\tquasi_ids\030\001" + + " \003(\0132\036.google.privacy.dlp.v2.FieldId\0222\n\t" + + "entity_id\030\002 \001(\0132\037.google.privacy.dlp.v2." + + "EntityId\032\202\001\n\020LDiversityConfig\0221\n\tquasi_i" + + "ds\030\001 \003(\0132\036.google.privacy.dlp.v2.FieldId" + + "\022;\n\023sensitive_attribute\030\002 \001(\0132\036.google.p" + + "rivacy.dlp.v2.FieldId\032\201\006\n\024KMapEstimation" + + "Config\022]\n\tquasi_ids\030\001 \003(\0132E.google.priva" + + "cy.dlp.v2.PrivacyMetric.KMapEstimationCo" + + "nfig.TaggedFieldB\003\340A\002\022\023\n\013region_code\030\002 \001" + + "(\t\022b\n\020auxiliary_tables\030\003 \003(\0132H.google.pr" + + "ivacy.dlp.v2.PrivacyMetric.KMapEstimatio" + + "nConfig.AuxiliaryTable\032\300\001\n\013TaggedField\0222" + + "\n\005field\030\001 \001(\0132\036.google.privacy.dlp.v2.Fi" + + "eldIdB\003\340A\002\0224\n\tinfo_type\030\002 \001(\0132\037.google.p" + + "rivacy.dlp.v2.InfoTypeH\000\022\024\n\ncustom_tag\030\003" + + " \001(\tH\000\022*\n\010inferred\030\004 \001(\0132\026.google.protob" + + "uf.EmptyH\000B\005\n\003tag\032\315\002\n\016AuxiliaryTable\0228\n\005" + + "table\030\003 \001(\0132$.google.privacy.dlp.v2.BigQ" + + "ueryTableB\003\340A\002\022m\n\tquasi_ids\030\001 \003(\0132U.goog" + + "le.privacy.dlp.v2.PrivacyMetric.KMapEsti" + + "mationConfig.AuxiliaryTable.QuasiIdField" + + "B\003\340A\002\022?\n\022relative_frequency\030\002 \001(\0132\036.goog" + + "le.privacy.dlp.v2.FieldIdB\003\340A\002\032Q\n\014QuasiI" + + "dField\022-\n\005field\030\001 \001(\0132\036.google.privacy.d" + + "lp.v2.FieldId\022\022\n\ncustom_tag\030\002 \001(\t\032\257\001\n\035De" + + "ltaPresenceEstimationConfig\0226\n\tquasi_ids" + + "\030\001 \003(\0132\036.google.privacy.dlp.v2.QuasiIdB\003" + + "\340A\002\022\023\n\013region_code\030\002 \001(\t\022A\n\020auxiliary_ta" + + "bles\030\003 \003(\0132\'.google.privacy.dlp.v2.Stati" + + "sticalTableB\006\n\004type\"\301\037\n\034AnalyzeDataSourc" + + "eRiskDetails\022F\n\030requested_privacy_metric" + + "\030\001 \001(\0132$.google.privacy.dlp.v2.PrivacyMe" + + "tric\022D\n\026requested_source_table\030\002 \001(\0132$.g" + + "oogle.privacy.dlp.v2.BigQueryTable\022j\n\026nu" + + "merical_stats_result\030\003 \001(\0132H.google.priv" + + "acy.dlp.v2.AnalyzeDataSourceRiskDetails." + + "NumericalStatsResultH\000\022n\n\030categorical_st" + + "ats_result\030\004 \001(\0132J.google.privacy.dlp.v2" + + ".AnalyzeDataSourceRiskDetails.Categorica" + + "lStatsResultH\000\022b\n\022k_anonymity_result\030\005 \001" + + "(\0132D.google.privacy.dlp.v2.AnalyzeDataSo" + + "urceRiskDetails.KAnonymityResultH\000\022b\n\022l_" + + "diversity_result\030\006 \001(\0132D.google.privacy." + + "dlp.v2.AnalyzeDataSourceRiskDetails.LDiv" + + "ersityResultH\000\022k\n\027k_map_estimation_resul" + + "t\030\007 \001(\0132H.google.privacy.dlp.v2.AnalyzeD" + + "ataSourceRiskDetails.KMapEstimationResul" + + "tH\000\022}\n delta_presence_estimation_result\030" + + "\t \001(\0132Q.google.privacy.dlp.v2.AnalyzeDat" + + "aSourceRiskDetails.DeltaPresenceEstimati" + + "onResultH\000\022k\n\021requested_options\030\n \001(\0132P." + + "google.privacy.dlp.v2.AnalyzeDataSourceR" + + "iskDetails.RequestedRiskAnalysisOptions\032" + + "\257\001\n\024NumericalStatsResult\022/\n\tmin_value\030\001 " + + "\001(\0132\034.google.privacy.dlp.v2.Value\022/\n\tmax" + + "_value\030\002 \001(\0132\034.google.privacy.dlp.v2.Val" + + "ue\0225\n\017quantile_values\030\004 \003(\0132\034.google.pri" + + "vacy.dlp.v2.Value\032\215\003\n\026CategoricalStatsRe" + + "sult\022\225\001\n!value_frequency_histogram_bucke" + + "ts\030\005 \003(\0132j.google.privacy.dlp.v2.Analyze" + + "DataSourceRiskDetails.CategoricalStatsRe" + + "sult.CategoricalStatsHistogramBucket\032\332\001\n" + + "\037CategoricalStatsHistogramBucket\022#\n\033valu" + + "e_frequency_lower_bound\030\001 \001(\003\022#\n\033value_f" + "requency_upper_bound\030\002 \001(\003\022\023\n\013bucket_siz" - + "e\030\003 \001(\003\022v\n\rbucket_values\030\004 \003(\0132_.google." - + "privacy.dlp.v2.AnalyzeDataSourceRiskDeta" - + "ils.LDiversityResult.LDiversityEquivalen" - + "ceClass\022\032\n\022bucket_value_count\030\005 \001(\003\032\225\004\n\024" - + "KMapEstimationResult\022\212\001\n\032k_map_estimatio" - + "n_histogram\030\001 \003(\0132f.google.privacy.dlp.v" - + "2.AnalyzeDataSourceRiskDetails.KMapEstim" - + "ationResult.KMapEstimationHistogramBucke" - + "t\032r\n\033KMapEstimationQuasiIdValues\0226\n\020quas" - + "i_ids_values\030\001 \003(\0132\034.google.privacy.dlp." - + "v2.Value\022\033\n\023estimated_anonymity\030\002 \001(\003\032\373\001" - + "\n\035KMapEstimationHistogramBucket\022\025\n\rmin_a" - + "nonymity\030\001 \001(\003\022\025\n\rmax_anonymity\030\002 \001(\003\022\023\n" - + "\013bucket_size\030\005 \001(\003\022{\n\rbucket_values\030\006 \003(" - + "\0132d.google.privacy.dlp.v2.AnalyzeDataSou" - + "rceRiskDetails.KMapEstimationResult.KMap" - + "EstimationQuasiIdValues\022\032\n\022bucket_value_" - + "count\030\007 \001(\003\032\344\004\n\035DeltaPresenceEstimationR" - + "esult\022\245\001\n#delta_presence_estimation_hist" - + "ogram\030\001 \003(\0132x.google.privacy.dlp.v2.Anal" - + "yzeDataSourceRiskDetails.DeltaPresenceEs" - + "timationResult.DeltaPresenceEstimationHi" - + "stogramBucket\032}\n$DeltaPresenceEstimation" - + "QuasiIdValues\0226\n\020quasi_ids_values\030\001 \003(\0132" - + "\034.google.privacy.dlp.v2.Value\022\035\n\025estimat" - + "ed_probability\030\002 \001(\001\032\233\002\n&DeltaPresenceEs" - + "timationHistogramBucket\022\027\n\017min_probabili" - + "ty\030\001 \001(\001\022\027\n\017max_probability\030\002 \001(\001\022\023\n\013buc" - + "ket_size\030\005 \001(\003\022\215\001\n\rbucket_values\030\006 \003(\0132v" - + ".google.privacy.dlp.v2.AnalyzeDataSource" - + "RiskDetails.DeltaPresenceEstimationResul" - + "t.DeltaPresenceEstimationQuasiIdValues\022\032" - + "\n\022bucket_value_count\030\007 \001(\003\032`\n\034RequestedR" - + "iskAnalysisOptions\022@\n\njob_config\030\001 \001(\0132," - + ".google.privacy.dlp.v2.RiskAnalysisJobCo", - "nfigB\010\n\006result\"L\n\016ValueFrequency\022+\n\005valu" - + "e\030\001 \001(\0132\034.google.privacy.dlp.v2.Value\022\r\n" - + "\005count\030\002 \001(\003\"\263\002\n\005Value\022\027\n\rinteger_value\030" - + "\001 \001(\003H\000\022\025\n\013float_value\030\002 \001(\001H\000\022\026\n\014string" - + "_value\030\003 \001(\tH\000\022\027\n\rboolean_value\030\004 \001(\010H\000\022" - + "5\n\017timestamp_value\030\005 \001(\0132\032.google.protob" - + "uf.TimestampH\000\022,\n\ntime_value\030\006 \001(\0132\026.goo" - + "gle.type.TimeOfDayH\000\022\'\n\ndate_value\030\007 \001(\013" - + "2\021.google.type.DateH\000\0223\n\021day_of_week_val" - + "ue\030\010 \001(\0162\026.google.type.DayOfWeekH\000B\006\n\004ty" - + "pe\"Q\n\tQuoteInfo\0224\n\tdate_time\030\002 \001(\0132\037.goo" - + "gle.privacy.dlp.v2.DateTimeH\000B\016\n\014parsed_" - + "quote\"\337\001\n\010DateTime\022\037\n\004date\030\001 \001(\0132\021.googl" - + "e.type.Date\022+\n\013day_of_week\030\002 \001(\0162\026.googl" - + "e.type.DayOfWeek\022$\n\004time\030\003 \001(\0132\026.google." - + "type.TimeOfDay\022;\n\ttime_zone\030\004 \001(\0132(.goog" - + "le.privacy.dlp.v2.DateTime.TimeZone\032\"\n\010T" - + "imeZone\022\026\n\016offset_minutes\030\001 \001(\005\"\244\002\n\020Deid" - + "entifyConfig\022S\n\031info_type_transformation" - + "s\030\001 \001(\0132..google.privacy.dlp.v2.InfoType" - + "TransformationsH\000\022N\n\026record_transformati" - + "ons\030\002 \001(\0132,.google.privacy.dlp.v2.Record" - + "TransformationsH\000\022Y\n\035transformation_erro" - + "r_handling\030\003 \001(\01322.google.privacy.dlp.v2" - + ".TransformationErrorHandlingB\020\n\016transfor" - + "mation\"\205\002\n\033TransformationErrorHandling\022T" - + "\n\013throw_error\030\001 \001(\0132=.google.privacy.dlp" - + ".v2.TransformationErrorHandling.ThrowErr" - + "orH\000\022d\n\023leave_untransformed\030\002 \001(\0132E.goog" - + "le.privacy.dlp.v2.TransformationErrorHan" - + "dling.LeaveUntransformedH\000\032\014\n\nThrowError" - + "\032\024\n\022LeaveUntransformedB\006\n\004mode\"\312\007\n\027Primi" - + "tiveTransformation\022C\n\016replace_config\030\001 \001" - + "(\0132).google.privacy.dlp.v2.ReplaceValueC" - + "onfigH\000\022<\n\rredact_config\030\002 \001(\0132#.google." - + "privacy.dlp.v2.RedactConfigH\000\022K\n\025charact" - + "er_mask_config\030\003 \001(\0132*.google.privacy.dl" - + "p.v2.CharacterMaskConfigH\000\022Y\n\035crypto_rep" - + "lace_ffx_fpe_config\030\004 \001(\01320.google.priva" - + "cy.dlp.v2.CryptoReplaceFfxFpeConfigH\000\022V\n" - + "\033fixed_size_bucketing_config\030\005 \001(\0132/.goo" - + "gle.privacy.dlp.v2.FixedSizeBucketingCon" - + "figH\000\022B\n\020bucketing_config\030\006 \001(\0132&.google" - + ".privacy.dlp.v2.BucketingConfigH\000\022Y\n\035rep" - + "lace_with_info_type_config\030\007 \001(\01320.googl" - + "e.privacy.dlp.v2.ReplaceWithInfoTypeConf" - + "igH\000\022A\n\020time_part_config\030\010 \001(\0132%.google." - + "privacy.dlp.v2.TimePartConfigH\000\022E\n\022crypt" - + "o_hash_config\030\t \001(\0132\'.google.privacy.dlp" - + ".v2.CryptoHashConfigH\000\022C\n\021date_shift_con" - + "fig\030\013 \001(\0132&.google.privacy.dlp.v2.DateSh" - + "iftConfigH\000\022W\n\033crypto_deterministic_conf" - + "ig\030\014 \001(\01320.google.privacy.dlp.v2.CryptoD" - + "eterministicConfigH\000\022S\n\031replace_dictiona" - + "ry_config\030\r \001(\0132..google.privacy.dlp.v2." - + "ReplaceDictionaryConfigH\000B\020\n\016transformat" - + "ion\"\334\001\n\016TimePartConfig\022G\n\017part_to_extrac" - + "t\030\001 \001(\0162..google.privacy.dlp.v2.TimePart" - + "Config.TimePart\"\200\001\n\010TimePart\022\031\n\025TIME_PAR" - + "T_UNSPECIFIED\020\000\022\010\n\004YEAR\020\001\022\t\n\005MONTH\020\002\022\020\n\014" - + "DAY_OF_MONTH\020\003\022\017\n\013DAY_OF_WEEK\020\004\022\020\n\014WEEK_" - + "OF_YEAR\020\005\022\017\n\013HOUR_OF_DAY\020\006\"H\n\020CryptoHash" - + "Config\0224\n\ncrypto_key\030\001 \001(\0132 .google.priv" - + "acy.dlp.v2.CryptoKey\"\300\001\n\031CryptoDetermini" - + "sticConfig\0224\n\ncrypto_key\030\001 \001(\0132 .google." - + "privacy.dlp.v2.CryptoKey\022<\n\023surrogate_in" - + "fo_type\030\002 \001(\0132\037.google.privacy.dlp.v2.In" - + "foType\022/\n\007context\030\003 \001(\0132\036.google.privacy" - + ".dlp.v2.FieldId\"E\n\022ReplaceValueConfig\022/\n" - + "\tnew_value\030\001 \001(\0132\034.google.privacy.dlp.v2" - + ".Value\"q\n\027ReplaceDictionaryConfig\022N\n\twor" - + "d_list\030\001 \001(\01329.google.privacy.dlp.v2.Cus" - + "tomInfoType.Dictionary.WordListH\000B\006\n\004typ" - + "e\"\033\n\031ReplaceWithInfoTypeConfig\"\016\n\014Redact" - + "Config\"\266\002\n\rCharsToIgnore\022\034\n\022characters_t" - + "o_skip\030\001 \001(\tH\000\022_\n\033common_characters_to_i" - + "gnore\030\002 \001(\01628.google.privacy.dlp.v2.Char" - + "sToIgnore.CommonCharsToIgnoreH\000\"\227\001\n\023Comm" - + "onCharsToIgnore\022&\n\"COMMON_CHARS_TO_IGNOR" - + "E_UNSPECIFIED\020\000\022\013\n\007NUMERIC\020\001\022\024\n\020ALPHA_UP" - + "PER_CASE\020\002\022\024\n\020ALPHA_LOWER_CASE\020\003\022\017\n\013PUNC" - + "TUATION\020\004\022\016\n\nWHITESPACE\020\005B\014\n\ncharacters\"" - + "\243\001\n\023CharacterMaskConfig\022\031\n\021masking_chara" - + "cter\030\001 \001(\t\022\026\n\016number_to_mask\030\002 \001(\005\022\025\n\rre" - + "verse_order\030\003 \001(\010\022B\n\024characters_to_ignor" - + "e\030\004 \003(\0132$.google.privacy.dlp.v2.CharsToI" - + "gnore\"\244\001\n\030FixedSizeBucketingConfig\0226\n\013lo" - + "wer_bound\030\001 \001(\0132\034.google.privacy.dlp.v2." - + "ValueB\003\340A\002\0226\n\013upper_bound\030\002 \001(\0132\034.google" - + ".privacy.dlp.v2.ValueB\003\340A\002\022\030\n\013bucket_siz" - + "e\030\003 \001(\001B\003\340A\002\"\360\001\n\017BucketingConfig\022>\n\007buck" - + "ets\030\001 \003(\0132-.google.privacy.dlp.v2.Bucket" - + "ingConfig.Bucket\032\234\001\n\006Bucket\022)\n\003min\030\001 \001(\013" - + "2\034.google.privacy.dlp.v2.Value\022)\n\003max\030\002 " - + "\001(\0132\034.google.privacy.dlp.v2.Value\022<\n\021rep" - + "lacement_value\030\003 \001(\0132\034.google.privacy.dl" - + "p.v2.ValueB\003\340A\002\"\371\003\n\031CryptoReplaceFfxFpeC" - + "onfig\0229\n\ncrypto_key\030\001 \001(\0132 .google.priva" - + "cy.dlp.v2.CryptoKeyB\003\340A\002\022/\n\007context\030\002 \001(" - + "\0132\036.google.privacy.dlp.v2.FieldId\022c\n\017com" - + "mon_alphabet\030\004 \001(\0162H.google.privacy.dlp." - + "v2.CryptoReplaceFfxFpeConfig.FfxCommonNa" - + "tiveAlphabetH\000\022\031\n\017custom_alphabet\030\005 \001(\tH" - + "\000\022\017\n\005radix\030\006 \001(\005H\000\022<\n\023surrogate_info_typ" - + "e\030\010 \001(\0132\037.google.privacy.dlp.v2.InfoType" - + "\"\224\001\n\027FfxCommonNativeAlphabet\022*\n&FFX_COMM" - + "ON_NATIVE_ALPHABET_UNSPECIFIED\020\000\022\013\n\007NUME" - + "RIC\020\001\022\017\n\013HEXADECIMAL\020\002\022\034\n\030UPPER_CASE_ALP" - + "HA_NUMERIC\020\003\022\021\n\rALPHA_NUMERIC\020\004B\n\n\010alpha" - + "bet\"\330\001\n\tCryptoKey\022>\n\ttransient\030\001 \001(\0132).g" - + "oogle.privacy.dlp.v2.TransientCryptoKeyH" - + "\000\022>\n\tunwrapped\030\002 \001(\0132).google.privacy.dl" - + "p.v2.UnwrappedCryptoKeyH\000\022A\n\013kms_wrapped" - + "\030\003 \001(\0132*.google.privacy.dlp.v2.KmsWrappe" - + "dCryptoKeyH\000B\010\n\006source\"\'\n\022TransientCrypt" - + "oKey\022\021\n\004name\030\001 \001(\tB\003\340A\002\"&\n\022UnwrappedCryp" - + "toKey\022\020\n\003key\030\001 \001(\014B\003\340A\002\"M\n\023KmsWrappedCry" - + "ptoKey\022\030\n\013wrapped_key\030\001 \001(\014B\003\340A\002\022\034\n\017cryp" - + "to_key_name\030\002 \001(\tB\003\340A\002\"\302\001\n\017DateShiftConf" - + "ig\022\035\n\020upper_bound_days\030\001 \001(\005B\003\340A\002\022\035\n\020low" - + "er_bound_days\030\002 \001(\005B\003\340A\002\022/\n\007context\030\003 \001(" - + "\0132\036.google.privacy.dlp.v2.FieldId\0226\n\ncry" - + "pto_key\030\004 \001(\0132 .google.privacy.dlp.v2.Cr" - + "yptoKeyH\000B\010\n\006method\"\245\002\n\027InfoTypeTransfor" - + "mations\022c\n\017transformations\030\001 \003(\0132E.googl" - + "e.privacy.dlp.v2.InfoTypeTransformations" - + ".InfoTypeTransformationB\003\340A\002\032\244\001\n\026InfoTyp" - + "eTransformation\0223\n\ninfo_types\030\001 \003(\0132\037.go" - + "ogle.privacy.dlp.v2.InfoType\022U\n\030primitiv" - + "e_transformation\030\002 \001(\0132..google.privacy." - + "dlp.v2.PrimitiveTransformationB\003\340A\002\"\300\002\n\023" - + "FieldTransformation\0223\n\006fields\030\001 \003(\0132\036.go" - + "ogle.privacy.dlp.v2.FieldIdB\003\340A\002\0229\n\tcond" - + "ition\030\003 \001(\0132&.google.privacy.dlp.v2.Reco" - + "rdCondition\022R\n\030primitive_transformation\030" - + "\004 \001(\0132..google.privacy.dlp.v2.PrimitiveT" - + "ransformationH\000\022S\n\031info_type_transformat" - + "ions\030\005 \001(\0132..google.privacy.dlp.v2.InfoT" - + "ypeTransformationsH\000B\020\n\016transformation\"\251" - + "\001\n\025RecordTransformations\022I\n\025field_transf" - + "ormations\030\001 \003(\0132*.google.privacy.dlp.v2." - + "FieldTransformation\022E\n\023record_suppressio" - + "ns\030\002 \003(\0132(.google.privacy.dlp.v2.RecordS" - + "uppression\"N\n\021RecordSuppression\0229\n\tcondi" - + "tion\030\001 \001(\0132&.google.privacy.dlp.v2.Recor" - + "dCondition\"\334\004\n\017RecordCondition\022G\n\013expres" - + "sions\030\003 \001(\01322.google.privacy.dlp.v2.Reco" - + "rdCondition.Expressions\032\256\001\n\tCondition\0222\n" - + "\005field\030\001 \001(\0132\036.google.privacy.dlp.v2.Fie" - + "ldIdB\003\340A\002\022@\n\010operator\030\003 \001(\0162).google.pri" - + "vacy.dlp.v2.RelationalOperatorB\003\340A\002\022+\n\005v" - + "alue\030\004 \001(\0132\034.google.privacy.dlp.v2.Value" - + "\032R\n\nConditions\022D\n\nconditions\030\001 \003(\01320.goo" - + "gle.privacy.dlp.v2.RecordCondition.Condi" - + "tion\032\372\001\n\013Expressions\022\\\n\020logical_operator" - + "\030\001 \001(\0162B.google.privacy.dlp.v2.RecordCon" - + "dition.Expressions.LogicalOperator\022G\n\nco" - + "nditions\030\003 \001(\01321.google.privacy.dlp.v2.R" - + "ecordCondition.ConditionsH\000\"<\n\017LogicalOp" - + "erator\022 \n\034LOGICAL_OPERATOR_UNSPECIFIED\020\000" - + "\022\007\n\003AND\020\001B\006\n\004type\"\203\001\n\026TransformationOver" - + "view\022\031\n\021transformed_bytes\030\002 \001(\003\022N\n\030trans" - + "formation_summaries\030\003 \003(\0132,.google.priva" - + "cy.dlp.v2.TransformationSummary\"\237\005\n\025Tran" - + "sformationSummary\0222\n\tinfo_type\030\001 \001(\0132\037.g" - + "oogle.privacy.dlp.v2.InfoType\022-\n\005field\030\002" - + " \001(\0132\036.google.privacy.dlp.v2.FieldId\022F\n\016" - + "transformation\030\003 \001(\0132..google.privacy.dl" - + "p.v2.PrimitiveTransformation\022I\n\025field_tr" - + "ansformations\030\005 \003(\0132*.google.privacy.dlp" - + ".v2.FieldTransformation\022A\n\017record_suppre" - + "ss\030\006 \001(\0132(.google.privacy.dlp.v2.RecordS" - + "uppression\022K\n\007results\030\004 \003(\0132:.google.pri" - + "vacy.dlp.v2.TransformationSummary.Summar" - + "yResult\022\031\n\021transformed_bytes\030\007 \001(\003\032\204\001\n\rS" - + "ummaryResult\022\r\n\005count\030\001 \001(\003\022S\n\004code\030\002 \001(" - + "\0162E.google.privacy.dlp.v2.Transformation" - + "Summary.TransformationResultCode\022\017\n\007deta" - + "ils\030\003 \001(\t\"^\n\030TransformationResultCode\022*\n" - + "&TRANSFORMATION_RESULT_CODE_UNSPECIFIED\020" - + "\000\022\013\n\007SUCCESS\020\001\022\t\n\005ERROR\020\002\"U\n\010Schedule\022?\n" - + "\032recurrence_period_duration\030\001 \001(\0132\031.goog" - + "le.protobuf.DurationH\000B\010\n\006option\"\010\n\006Manu" - + "al\"\302\004\n\017InspectTemplate\022\021\n\004name\030\001 \001(\tB\003\340A" - + "\003\022\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\003" - + " \001(\t\0224\n\013create_time\030\004 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003\0224\n\013update_time\030\005 \001(\0132" - + "\032.google.protobuf.TimestampB\003\340A\003\022<\n\016insp" - + "ect_config\030\006 \001(\0132$.google.privacy.dlp.v2" - + ".InspectConfig:\306\002\352A\302\002\n\"dlp.googleapis.co" - + "m/InspectTemplate\022@organizations/{organi" - + "zation}/inspectTemplates/{inspect_templa" - + "te}\0226projects/{project}/inspectTemplates" - + "/{inspect_template}\022Uorganizations/{orga" - + "nization}/locations/{location}/inspectTe" - + "mplates/{inspect_template}\022Kprojects/{pr" - + "oject}/locations/{location}/inspectTempl" - + "ates/{inspect_template}\"\346\004\n\022DeidentifyTe" - + "mplate\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014display_nam" - + "e\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\0224\n\013create_t" - + "ime\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340" - + "A\003\0224\n\013update_time\030\005 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\022B\n\021deidentify_config\030\006 " - + "\001(\0132\'.google.privacy.dlp.v2.DeidentifyCo" - + "nfig:\341\002\352A\335\002\n%dlp.googleapis.com/Deidenti" - + "fyTemplate\022Forganizations/{organization}" - + "/deidentifyTemplates/{deidentify_templat" - + "e}\022\n\013inspect_job\030\004 \001(\0132\'.google.pri" - + "vacy.dlp.v2.InspectJobConfigH\000\022;\n\010trigge" - + "rs\030\005 \003(\0132).google.privacy.dlp.v2.JobTrig" - + "ger.Trigger\0221\n\006errors\030\006 \003(\0132\034.google.pri" - + "vacy.dlp.v2.ErrorB\003\340A\003\0224\n\013create_time\030\007 " + + "e\030\003 \001(\003\022<\n\rbucket_values\030\004 \003(\0132%.google." + + "privacy.dlp.v2.ValueFrequency\022\032\n\022bucket_" + + "value_count\030\005 \001(\003\032\265\004\n\020KAnonymityResult\022\213" + + "\001\n#equivalence_class_histogram_buckets\030\005" + + " \003(\0132^.google.privacy.dlp.v2.AnalyzeData" + + "SourceRiskDetails.KAnonymityResult.KAnon" + + "ymityHistogramBucket\032t\n\032KAnonymityEquiva" + + "lenceClass\0226\n\020quasi_ids_values\030\001 \003(\0132\034.g" + + "oogle.privacy.dlp.v2.Value\022\036\n\026equivalenc" + + "e_class_size\030\002 \001(\003\032\234\002\n\031KAnonymityHistogr" + + "amBucket\022*\n\"equivalence_class_size_lower" + + "_bound\030\001 \001(\003\022*\n\"equivalence_class_size_u" + + "pper_bound\030\002 \001(\003\022\023\n\013bucket_size\030\003 \001(\003\022v\n" + + "\rbucket_values\030\004 \003(\0132_.google.privacy.dl" + + "p.v2.AnalyzeDataSourceRiskDetails.KAnony" + + "mityResult.KAnonymityEquivalenceClass\022\032\n" + + "\022bucket_value_count\030\005 \001(\003\032\260\005\n\020LDiversity" + + "Result\022\223\001\n+sensitive_value_frequency_his" + + "togram_buckets\030\005 \003(\0132^.google.privacy.dl" + + "p.v2.AnalyzeDataSourceRiskDetails.LDiver" + + "sityResult.LDiversityHistogramBucket\032\340\001\n" + + "\032LDiversityEquivalenceClass\0226\n\020quasi_ids" + + "_values\030\001 \003(\0132\034.google.privacy.dlp.v2.Va" + + "lue\022\036\n\026equivalence_class_size\030\002 \001(\003\022%\n\035n" + + "um_distinct_sensitive_values\030\003 \001(\003\022C\n\024to" + + "p_sensitive_values\030\004 \003(\0132%.google.privac" + + "y.dlp.v2.ValueFrequency\032\242\002\n\031LDiversityHi" + + "stogramBucket\022-\n%sensitive_value_frequen" + + "cy_lower_bound\030\001 \001(\003\022-\n%sensitive_value_" + + "frequency_upper_bound\030\002 \001(\003\022\023\n\013bucket_si" + + "ze\030\003 \001(\003\022v\n\rbucket_values\030\004 \003(\0132_.google" + + ".privacy.dlp.v2.AnalyzeDataSourceRiskDet" + + "ails.LDiversityResult.LDiversityEquivale" + + "nceClass\022\032\n\022bucket_value_count\030\005 \001(\003\032\225\004\n" + + "\024KMapEstimationResult\022\212\001\n\032k_map_estimati" + + "on_histogram\030\001 \003(\0132f.google.privacy.dlp." + + "v2.AnalyzeDataSourceRiskDetails.KMapEsti" + + "mationResult.KMapEstimationHistogramBuck" + + "et\032r\n\033KMapEstimationQuasiIdValues\0226\n\020qua" + + "si_ids_values\030\001 \003(\0132\034.google.privacy.dlp" + + ".v2.Value\022\033\n\023estimated_anonymity\030\002 \001(\003\032\373" + + "\001\n\035KMapEstimationHistogramBucket\022\025\n\rmin_" + + "anonymity\030\001 \001(\003\022\025\n\rmax_anonymity\030\002 \001(\003\022\023" + + "\n\013bucket_size\030\005 \001(\003\022{\n\rbucket_values\030\006 \003" + + "(\0132d.google.privacy.dlp.v2.AnalyzeDataSo" + + "urceRiskDetails.KMapEstimationResult.KMa" + + "pEstimationQuasiIdValues\022\032\n\022bucket_value" + + "_count\030\007 \001(\003\032\344\004\n\035DeltaPresenceEstimation" + + "Result\022\245\001\n#delta_presence_estimation_his" + + "togram\030\001 \003(\0132x.google.privacy.dlp.v2.Ana" + + "lyzeDataSourceRiskDetails.DeltaPresenceE" + + "stimationResult.DeltaPresenceEstimationH" + + "istogramBucket\032}\n$DeltaPresenceEstimatio" + + "nQuasiIdValues\0226\n\020quasi_ids_values\030\001 \003(\013" + + "2\034.google.privacy.dlp.v2.Value\022\035\n\025estima" + + "ted_probability\030\002 \001(\001\032\233\002\n&DeltaPresenceE" + + "stimationHistogramBucket\022\027\n\017min_probabil" + + "ity\030\001 \001(\001\022\027\n\017max_probability\030\002 \001(\001\022\023\n\013bu" + + "cket_size\030\005 \001(\003\022\215\001\n\rbucket_values\030\006 \003(\0132" + + "v.google.privacy.dlp.v2.AnalyzeDataSourc" + + "eRiskDetails.DeltaPresenceEstimationResu" + + "lt.DeltaPresenceEstimationQuasiIdValues\022", + "\032\n\022bucket_value_count\030\007 \001(\003\032`\n\034Requested" + + "RiskAnalysisOptions\022@\n\njob_config\030\001 \001(\0132" + + ",.google.privacy.dlp.v2.RiskAnalysisJobC" + + "onfigB\010\n\006result\"L\n\016ValueFrequency\022+\n\005val" + + "ue\030\001 \001(\0132\034.google.privacy.dlp.v2.Value\022\r" + + "\n\005count\030\002 \001(\003\"\263\002\n\005Value\022\027\n\rinteger_value" + + "\030\001 \001(\003H\000\022\025\n\013float_value\030\002 \001(\001H\000\022\026\n\014strin" + + "g_value\030\003 \001(\tH\000\022\027\n\rboolean_value\030\004 \001(\010H\000" + + "\0225\n\017timestamp_value\030\005 \001(\0132\032.google.proto" + + "buf.TimestampH\000\022,\n\ntime_value\030\006 \001(\0132\026.go" + + "ogle.type.TimeOfDayH\000\022\'\n\ndate_value\030\007 \001(" + + "\0132\021.google.type.DateH\000\0223\n\021day_of_week_va" + + "lue\030\010 \001(\0162\026.google.type.DayOfWeekH\000B\006\n\004t" + + "ype\"Q\n\tQuoteInfo\0224\n\tdate_time\030\002 \001(\0132\037.go" + + "ogle.privacy.dlp.v2.DateTimeH\000B\016\n\014parsed" + + "_quote\"\337\001\n\010DateTime\022\037\n\004date\030\001 \001(\0132\021.goog" + + "le.type.Date\022+\n\013day_of_week\030\002 \001(\0162\026.goog" + + "le.type.DayOfWeek\022$\n\004time\030\003 \001(\0132\026.google" + + ".type.TimeOfDay\022;\n\ttime_zone\030\004 \001(\0132(.goo" + + "gle.privacy.dlp.v2.DateTime.TimeZone\032\"\n\010" + + "TimeZone\022\026\n\016offset_minutes\030\001 \001(\005\"\362\002\n\020Dei" + + "dentifyConfig\022S\n\031info_type_transformatio" + + "ns\030\001 \001(\0132..google.privacy.dlp.v2.InfoTyp" + + "eTransformationsH\000\022N\n\026record_transformat" + + "ions\030\002 \001(\0132,.google.privacy.dlp.v2.Recor" + + "dTransformationsH\000\022L\n\025image_transformati" + + "ons\030\004 \001(\0132+.google.privacy.dlp.v2.ImageT" + + "ransformationsH\000\022Y\n\035transformation_error" + + "_handling\030\003 \001(\01322.google.privacy.dlp.v2." + + "TransformationErrorHandlingB\020\n\016transform" + + "ation\"\345\004\n\024ImageTransformations\022S\n\ntransf" + + "orms\030\002 \003(\0132?.google.privacy.dlp.v2.Image" + + "Transformations.ImageTransformation\032\367\003\n\023" + + "ImageTransformation\022p\n\023selected_info_typ" + + "es\030\004 \001(\0132Q.google.privacy.dlp.v2.ImageTr" + + "ansformations.ImageTransformation.Select" + + "edInfoTypesH\000\022f\n\016all_info_types\030\005 \001(\0132L." + + "google.privacy.dlp.v2.ImageTransformatio" + + "ns.ImageTransformation.AllInfoTypesH\000\022[\n" + + "\010all_text\030\006 \001(\0132G.google.privacy.dlp.v2." + + "ImageTransformations.ImageTransformation" + + ".AllTextH\000\0225\n\017redaction_color\030\003 \001(\0132\034.go" + + "ogle.privacy.dlp.v2.Color\032M\n\021SelectedInf" + + "oTypes\0228\n\ninfo_types\030\005 \003(\0132\037.google.priv" + + "acy.dlp.v2.InfoTypeB\003\340A\002\032\016\n\014AllInfoTypes" + + "\032\t\n\007AllTextB\010\n\006target\"\205\002\n\033Transformation" + + "ErrorHandling\022T\n\013throw_error\030\001 \001(\0132=.goo" + + "gle.privacy.dlp.v2.TransformationErrorHa" + + "ndling.ThrowErrorH\000\022d\n\023leave_untransform" + + "ed\030\002 \001(\0132E.google.privacy.dlp.v2.Transfo" + + "rmationErrorHandling.LeaveUntransformedH" + + "\000\032\014\n\nThrowError\032\024\n\022LeaveUntransformedB\006\n" + + "\004mode\"\312\007\n\027PrimitiveTransformation\022C\n\016rep" + + "lace_config\030\001 \001(\0132).google.privacy.dlp.v" + + "2.ReplaceValueConfigH\000\022<\n\rredact_config\030" + + "\002 \001(\0132#.google.privacy.dlp.v2.RedactConf" + + "igH\000\022K\n\025character_mask_config\030\003 \001(\0132*.go" + + "ogle.privacy.dlp.v2.CharacterMaskConfigH" + + "\000\022Y\n\035crypto_replace_ffx_fpe_config\030\004 \001(\013" + + "20.google.privacy.dlp.v2.CryptoReplaceFf" + + "xFpeConfigH\000\022V\n\033fixed_size_bucketing_con" + + "fig\030\005 \001(\0132/.google.privacy.dlp.v2.FixedS" + + "izeBucketingConfigH\000\022B\n\020bucketing_config" + + "\030\006 \001(\0132&.google.privacy.dlp.v2.Bucketing" + + "ConfigH\000\022Y\n\035replace_with_info_type_confi" + + "g\030\007 \001(\01320.google.privacy.dlp.v2.ReplaceW" + + "ithInfoTypeConfigH\000\022A\n\020time_part_config\030" + + "\010 \001(\0132%.google.privacy.dlp.v2.TimePartCo" + + "nfigH\000\022E\n\022crypto_hash_config\030\t \001(\0132\'.goo" + + "gle.privacy.dlp.v2.CryptoHashConfigH\000\022C\n" + + "\021date_shift_config\030\013 \001(\0132&.google.privac" + + "y.dlp.v2.DateShiftConfigH\000\022W\n\033crypto_det" + + "erministic_config\030\014 \001(\01320.google.privacy" + + ".dlp.v2.CryptoDeterministicConfigH\000\022S\n\031r" + + "eplace_dictionary_config\030\r \001(\0132..google." + + "privacy.dlp.v2.ReplaceDictionaryConfigH\000" + + "B\020\n\016transformation\"\334\001\n\016TimePartConfig\022G\n" + + "\017part_to_extract\030\001 \001(\0162..google.privacy." + + "dlp.v2.TimePartConfig.TimePart\"\200\001\n\010TimeP" + + "art\022\031\n\025TIME_PART_UNSPECIFIED\020\000\022\010\n\004YEAR\020\001" + + "\022\t\n\005MONTH\020\002\022\020\n\014DAY_OF_MONTH\020\003\022\017\n\013DAY_OF_" + + "WEEK\020\004\022\020\n\014WEEK_OF_YEAR\020\005\022\017\n\013HOUR_OF_DAY\020" + + "\006\"H\n\020CryptoHashConfig\0224\n\ncrypto_key\030\001 \001(" + + "\0132 .google.privacy.dlp.v2.CryptoKey\"\300\001\n\031" + + "CryptoDeterministicConfig\0224\n\ncrypto_key\030" + + "\001 \001(\0132 .google.privacy.dlp.v2.CryptoKey\022" + + "<\n\023surrogate_info_type\030\002 \001(\0132\037.google.pr" + + "ivacy.dlp.v2.InfoType\022/\n\007context\030\003 \001(\0132\036" + + ".google.privacy.dlp.v2.FieldId\"E\n\022Replac" + + "eValueConfig\022/\n\tnew_value\030\001 \001(\0132\034.google" + + ".privacy.dlp.v2.Value\"q\n\027ReplaceDictiona" + + "ryConfig\022N\n\tword_list\030\001 \001(\01329.google.pri" + + "vacy.dlp.v2.CustomInfoType.Dictionary.Wo" + + "rdListH\000B\006\n\004type\"\033\n\031ReplaceWithInfoTypeC" + + "onfig\"\016\n\014RedactConfig\"\266\002\n\rCharsToIgnore\022" + + "\034\n\022characters_to_skip\030\001 \001(\tH\000\022_\n\033common_" + + "characters_to_ignore\030\002 \001(\01628.google.priv" + + "acy.dlp.v2.CharsToIgnore.CommonCharsToIg" + + "noreH\000\"\227\001\n\023CommonCharsToIgnore\022&\n\"COMMON" + + "_CHARS_TO_IGNORE_UNSPECIFIED\020\000\022\013\n\007NUMERI" + + "C\020\001\022\024\n\020ALPHA_UPPER_CASE\020\002\022\024\n\020ALPHA_LOWER" + + "_CASE\020\003\022\017\n\013PUNCTUATION\020\004\022\016\n\nWHITESPACE\020\005" + + "B\014\n\ncharacters\"\243\001\n\023CharacterMaskConfig\022\031" + + "\n\021masking_character\030\001 \001(\t\022\026\n\016number_to_m" + + "ask\030\002 \001(\005\022\025\n\rreverse_order\030\003 \001(\010\022B\n\024char" + + "acters_to_ignore\030\004 \003(\0132$.google.privacy." + + "dlp.v2.CharsToIgnore\"\244\001\n\030FixedSizeBucket" + + "ingConfig\0226\n\013lower_bound\030\001 \001(\0132\034.google." + + "privacy.dlp.v2.ValueB\003\340A\002\0226\n\013upper_bound" + + "\030\002 \001(\0132\034.google.privacy.dlp.v2.ValueB\003\340A" + + "\002\022\030\n\013bucket_size\030\003 \001(\001B\003\340A\002\"\360\001\n\017Bucketin" + + "gConfig\022>\n\007buckets\030\001 \003(\0132-.google.privac" + + "y.dlp.v2.BucketingConfig.Bucket\032\234\001\n\006Buck" + + "et\022)\n\003min\030\001 \001(\0132\034.google.privacy.dlp.v2." + + "Value\022)\n\003max\030\002 \001(\0132\034.google.privacy.dlp." + + "v2.Value\022<\n\021replacement_value\030\003 \001(\0132\034.go" + + "ogle.privacy.dlp.v2.ValueB\003\340A\002\"\371\003\n\031Crypt" + + "oReplaceFfxFpeConfig\0229\n\ncrypto_key\030\001 \001(\013" + + "2 .google.privacy.dlp.v2.CryptoKeyB\003\340A\002\022" + + "/\n\007context\030\002 \001(\0132\036.google.privacy.dlp.v2" + + ".FieldId\022c\n\017common_alphabet\030\004 \001(\0162H.goog" + + "le.privacy.dlp.v2.CryptoReplaceFfxFpeCon" + + "fig.FfxCommonNativeAlphabetH\000\022\031\n\017custom_" + + "alphabet\030\005 \001(\tH\000\022\017\n\005radix\030\006 \001(\005H\000\022<\n\023sur" + + "rogate_info_type\030\010 \001(\0132\037.google.privacy." + + "dlp.v2.InfoType\"\224\001\n\027FfxCommonNativeAlpha" + + "bet\022*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPEC" + + "IFIED\020\000\022\013\n\007NUMERIC\020\001\022\017\n\013HEXADECIMAL\020\002\022\034\n" + + "\030UPPER_CASE_ALPHA_NUMERIC\020\003\022\021\n\rALPHA_NUM" + + "ERIC\020\004B\n\n\010alphabet\"\330\001\n\tCryptoKey\022>\n\ttran" + + "sient\030\001 \001(\0132).google.privacy.dlp.v2.Tran" + + "sientCryptoKeyH\000\022>\n\tunwrapped\030\002 \001(\0132).go" + + "ogle.privacy.dlp.v2.UnwrappedCryptoKeyH\000" + + "\022A\n\013kms_wrapped\030\003 \001(\0132*.google.privacy.d" + + "lp.v2.KmsWrappedCryptoKeyH\000B\010\n\006source\"\'\n" + + "\022TransientCryptoKey\022\021\n\004name\030\001 \001(\tB\003\340A\002\"&" + + "\n\022UnwrappedCryptoKey\022\020\n\003key\030\001 \001(\014B\003\340A\002\"M" + + "\n\023KmsWrappedCryptoKey\022\030\n\013wrapped_key\030\001 \001" + + "(\014B\003\340A\002\022\034\n\017crypto_key_name\030\002 \001(\tB\003\340A\002\"\302\001" + + "\n\017DateShiftConfig\022\035\n\020upper_bound_days\030\001 " + + "\001(\005B\003\340A\002\022\035\n\020lower_bound_days\030\002 \001(\005B\003\340A\002\022" + + "/\n\007context\030\003 \001(\0132\036.google.privacy.dlp.v2" + + ".FieldId\0226\n\ncrypto_key\030\004 \001(\0132 .google.pr" + + "ivacy.dlp.v2.CryptoKeyH\000B\010\n\006method\"\245\002\n\027I" + + "nfoTypeTransformations\022c\n\017transformation" + + "s\030\001 \003(\0132E.google.privacy.dlp.v2.InfoType" + + "Transformations.InfoTypeTransformationB\003" + + "\340A\002\032\244\001\n\026InfoTypeTransformation\0223\n\ninfo_t" + + "ypes\030\001 \003(\0132\037.google.privacy.dlp.v2.InfoT" + + "ype\022U\n\030primitive_transformation\030\002 \001(\0132.." + + "google.privacy.dlp.v2.PrimitiveTransform" + + "ationB\003\340A\002\"\300\002\n\023FieldTransformation\0223\n\006fi" + + "elds\030\001 \003(\0132\036.google.privacy.dlp.v2.Field" + + "IdB\003\340A\002\0229\n\tcondition\030\003 \001(\0132&.google.priv" + + "acy.dlp.v2.RecordCondition\022R\n\030primitive_" + + "transformation\030\004 \001(\0132..google.privacy.dl" + + "p.v2.PrimitiveTransformationH\000\022S\n\031info_t" + + "ype_transformations\030\005 \001(\0132..google.priva" + + "cy.dlp.v2.InfoTypeTransformationsH\000B\020\n\016t" + + "ransformation\"\251\001\n\025RecordTransformations\022" + + "I\n\025field_transformations\030\001 \003(\0132*.google." + + "privacy.dlp.v2.FieldTransformation\022E\n\023re" + + "cord_suppressions\030\002 \003(\0132(.google.privacy" + + ".dlp.v2.RecordSuppression\"N\n\021RecordSuppr" + + "ession\0229\n\tcondition\030\001 \001(\0132&.google.priva" + + "cy.dlp.v2.RecordCondition\"\334\004\n\017RecordCond" + + "ition\022G\n\013expressions\030\003 \001(\01322.google.priv" + + "acy.dlp.v2.RecordCondition.Expressions\032\256" + + "\001\n\tCondition\0222\n\005field\030\001 \001(\0132\036.google.pri" + + "vacy.dlp.v2.FieldIdB\003\340A\002\022@\n\010operator\030\003 \001" + + "(\0162).google.privacy.dlp.v2.RelationalOpe" + + "ratorB\003\340A\002\022+\n\005value\030\004 \001(\0132\034.google.priva" + + "cy.dlp.v2.Value\032R\n\nConditions\022D\n\nconditi" + + "ons\030\001 \003(\01320.google.privacy.dlp.v2.Record" + + "Condition.Condition\032\372\001\n\013Expressions\022\\\n\020l" + + "ogical_operator\030\001 \001(\0162B.google.privacy.d" + + "lp.v2.RecordCondition.Expressions.Logica" + + "lOperator\022G\n\nconditions\030\003 \001(\01321.google.p" + + "rivacy.dlp.v2.RecordCondition.Conditions" + + "H\000\"<\n\017LogicalOperator\022 \n\034LOGICAL_OPERATO" + + "R_UNSPECIFIED\020\000\022\007\n\003AND\020\001B\006\n\004type\"\203\001\n\026Tra" + + "nsformationOverview\022\031\n\021transformed_bytes" + + "\030\002 \001(\003\022N\n\030transformation_summaries\030\003 \003(\013" + + "2,.google.privacy.dlp.v2.TransformationS" + + "ummary\"\237\005\n\025TransformationSummary\0222\n\tinfo" + + "_type\030\001 \001(\0132\037.google.privacy.dlp.v2.Info" + + "Type\022-\n\005field\030\002 \001(\0132\036.google.privacy.dlp" + + ".v2.FieldId\022F\n\016transformation\030\003 \001(\0132..go" + + "ogle.privacy.dlp.v2.PrimitiveTransformat" + + "ion\022I\n\025field_transformations\030\005 \003(\0132*.goo" + + "gle.privacy.dlp.v2.FieldTransformation\022A" + + "\n\017record_suppress\030\006 \001(\0132(.google.privacy" + + ".dlp.v2.RecordSuppression\022K\n\007results\030\004 \003" + + "(\0132:.google.privacy.dlp.v2.Transformatio" + + "nSummary.SummaryResult\022\031\n\021transformed_by" + + "tes\030\007 \001(\003\032\204\001\n\rSummaryResult\022\r\n\005count\030\001 \001" + + "(\003\022S\n\004code\030\002 \001(\0162E.google.privacy.dlp.v2" + + ".TransformationSummary.TransformationRes" + + "ultCode\022\017\n\007details\030\003 \001(\t\"^\n\030Transformati" + + "onResultCode\022*\n&TRANSFORMATION_RESULT_CO" + + "DE_UNSPECIFIED\020\000\022\013\n\007SUCCESS\020\001\022\t\n\005ERROR\020\002" + + "\"\260\001\n\031TransformationDescription\0227\n\004type\030\001" + + " \001(\0162).google.privacy.dlp.v2.Transformat" + + "ionType\022\023\n\013description\030\002 \001(\t\022\021\n\tconditio" + + "n\030\003 \001(\t\0222\n\tinfo_type\030\004 \001(\0132\037.google.priv" + + "acy.dlp.v2.InfoType\"\306\002\n\025TransformationDe" + + "tails\022\025\n\rresource_name\030\001 \001(\t\022\026\n\016containe" + + "r_name\030\002 \001(\t\022H\n\016transformation\030\003 \003(\01320.g" + + "oogle.privacy.dlp.v2.TransformationDescr" + + "iption\022I\n\016status_details\030\004 \001(\01321.google." + + "privacy.dlp.v2.TransformationResultStatu" + + "s\022\031\n\021transformed_bytes\030\005 \001(\003\022N\n\027transfor" + + "mation_location\030\006 \001(\0132-.google.privacy.d" + + "lp.v2.TransformationLocation\"\331\001\n\026Transfo" + + "rmationLocation\022\024\n\nfinding_id\030\001 \001(\tH\000\022L\n" + + "\025record_transformation\030\002 \001(\0132+.google.pr" + + "ivacy.dlp.v2.RecordTransformationH\000\022J\n\016c" + + "ontainer_type\030\003 \001(\01622.google.privacy.dlp" + + ".v2.TransformationContainerTypeB\017\n\rlocat" + + "ion_type\"\234\001\n\024RecordTransformation\0220\n\010fie" + + "ld_id\030\001 \001(\0132\036.google.privacy.dlp.v2.Fiel" + + "dId\0227\n\023container_timestamp\030\002 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022\031\n\021container_versio" + + "n\030\003 \001(\t\"\224\001\n\032TransformationResultStatus\022Q" + + "\n\022result_status_type\030\001 \001(\01625.google.priv" + + "acy.dlp.v2.TransformationResultStatusTyp" + + "e\022#\n\007details\030\002 \001(\0132\022.google.rpc.Status\"c" + + "\n\"TransformationDetailsStorageConfig\0225\n\005" + + "table\030\001 \001(\0132$.google.privacy.dlp.v2.BigQ" + + "ueryTableH\000B\006\n\004type\"U\n\010Schedule\022?\n\032recur" + + "rence_period_duration\030\001 \001(\0132\031.google.pro" + + "tobuf.DurationH\000B\010\n\006option\"\010\n\006Manual\"\302\004\n" + + "\017InspectTemplate\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014d" + + "isplay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\0224" + + "\n\013create_time\030\004 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\0224\n\013update_time\030\005 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\022<\n\016inspect_co" + + "nfig\030\006 \001(\0132$.google.privacy.dlp.v2.Inspe" + + "ctConfig:\306\002\352A\302\002\n\"dlp.googleapis.com/Insp" + + "ectTemplate\022@organizations/{organization" + + "}/inspectTemplates/{inspect_template}\0226p" + + "rojects/{project}/inspectTemplates/{insp" + + "ect_template}\022Uorganizations/{organizati" + + "on}/locations/{location}/inspectTemplate" + + "s/{inspect_template}\022Kprojects/{project}" + + "/locations/{location}/inspectTemplates/{" + + "inspect_template}\"\346\004\n\022DeidentifyTemplate" + + "\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014display_name\030\002 \001(" + + "\t\022\023\n\013description\030\003 \001(\t\0224\n\013create_time\030\004 " + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013" - + "update_time\030\010 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003\0226\n\rlast_run_time\030\t \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022=\n\006status\030\n \001" - + "(\0162(.google.privacy.dlp.v2.JobTrigger.St" - + "atusB\003\340A\002\032z\n\007Trigger\0223\n\010schedule\030\001 \001(\0132\037" - + ".google.privacy.dlp.v2.ScheduleH\000\022/\n\006man" - + "ual\030\002 \001(\0132\035.google.privacy.dlp.v2.Manual" - + "H\000B\t\n\007trigger\"H\n\006Status\022\026\n\022STATUS_UNSPEC" - + "IFIED\020\000\022\013\n\007HEALTHY\020\001\022\n\n\006PAUSED\020\002\022\r\n\tCANC" - + "ELLED\020\003:\224\001\352A\220\001\n\035dlp.googleapis.com/JobTr" - + "igger\022,projects/{project}/jobTriggers/{j" - + "ob_trigger}\022Aprojects/{project}/location" - + "s/{location}/jobTriggers/{job_trigger}B\005" - + "\n\003job\"\364\005\n\006Action\022C\n\rsave_findings\030\001 \001(\0132" - + "*.google.privacy.dlp.v2.Action.SaveFindi" - + "ngsH\000\022@\n\007pub_sub\030\002 \001(\0132-.google.privacy." - + "dlp.v2.Action.PublishToPubSubH\000\022U\n\027publi" - + "sh_summary_to_cscc\030\003 \001(\01322.google.privac" - + "y.dlp.v2.Action.PublishSummaryToCsccH\000\022q" - + "\n&publish_findings_to_cloud_data_catalog" - + "\030\005 \001(\0132?.google.privacy.dlp.v2.Action.Pu" - + "blishFindingsToCloudDataCatalogH\000\022V\n\027job" - + "_notification_emails\030\010 \001(\01323.google.priv" - + "acy.dlp.v2.Action.JobNotificationEmailsH" - + "\000\022T\n\026publish_to_stackdriver\030\t \001(\01322.goog" - + "le.privacy.dlp.v2.Action.PublishToStackd" - + "riverH\000\032Q\n\014SaveFindings\022A\n\routput_config" - + "\030\001 \001(\0132*.google.privacy.dlp.v2.OutputSto" - + "rageConfig\032 \n\017PublishToPubSub\022\r\n\005topic\030\001" - + " \001(\t\032\026\n\024PublishSummaryToCscc\032#\n!PublishF" - + "indingsToCloudDataCatalog\032\027\n\025JobNotifica" - + "tionEmails\032\026\n\024PublishToStackdriverB\010\n\006ac" - + "tion\"\313\001\n\034CreateInspectTemplateRequest\022:\n" - + "\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dlp.googleapis.co" - + "m/InspectTemplate\022E\n\020inspect_template\030\002 " - + "\001(\0132&.google.privacy.dlp.v2.InspectTempl" - + "ateB\003\340A\002\022\023\n\013template_id\030\003 \001(\t\022\023\n\013locatio" - + "n_id\030\004 \001(\t\"\313\001\n\034UpdateInspectTemplateRequ" - + "est\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dlp.googleapi" - + "s.com/InspectTemplate\022@\n\020inspect_templat" - + "e\030\002 \001(\0132&.google.privacy.dlp.v2.InspectT" - + "emplate\022/\n\013update_mask\030\003 \001(\0132\032.google.pr" - + "otobuf.FieldMask\"U\n\031GetInspectTemplateRe" - + "quest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dlp.googlea" - + "pis.com/InspectTemplate\"\247\001\n\033ListInspectT" - + "emplatesRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022" - + "\"dlp.googleapis.com/InspectTemplate\022\022\n\np" - + "age_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\020\n\010or" - + "der_by\030\004 \001(\t\022\023\n\013location_id\030\005 \001(\t\"z\n\034Lis" - + "tInspectTemplatesResponse\022A\n\021inspect_tem" - + "plates\030\001 \003(\0132&.google.privacy.dlp.v2.Ins" - + "pectTemplate\022\027\n\017next_page_token\030\002 \001(\t\"X\n" - + "\034DeleteInspectTemplateRequest\0228\n\004name\030\001 " - + "\001(\tB*\340A\002\372A$\n\"dlp.googleapis.com/InspectT" - + "emplate\"\266\001\n\027CreateJobTriggerRequest\0225\n\006p" - + "arent\030\001 \001(\tB%\340A\002\372A\037\022\035dlp.googleapis.com/" - + "JobTrigger\022;\n\013job_trigger\030\002 \001(\0132!.google" - + ".privacy.dlp.v2.JobTriggerB\003\340A\002\022\022\n\ntrigg" - + "er_id\030\003 \001(\t\022\023\n\013location_id\030\004 \001(\t\"P\n\031Acti" - + "vateJobTriggerRequest\0223\n\004name\030\001 \001(\tB%\340A\002" - + "\372A\037\n\035dlp.googleapis.com/JobTrigger\"\267\001\n\027U" - + "pdateJobTriggerRequest\0223\n\004name\030\001 \001(\tB%\340A" - + "\002\372A\037\n\035dlp.googleapis.com/JobTrigger\0226\n\013j" - + "ob_trigger\030\002 \001(\0132!.google.privacy.dlp.v2" - + ".JobTrigger\022/\n\013update_mask\030\003 \001(\0132\032.googl" - + "e.protobuf.FieldMask\"K\n\024GetJobTriggerReq" - + "uest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleap" - + "is.com/JobTrigger\"\366\001\n\023CreateDlpJobReques" - + "t\0221\n\006parent\030\001 \001(\tB!\340A\002\372A\033\022\031dlp.googleapi" - + "s.com/DlpJob\022>\n\013inspect_job\030\002 \001(\0132\'.goog" - + "le.privacy.dlp.v2.InspectJobConfigH\000\022@\n\010" - + "risk_job\030\003 \001(\0132,.google.privacy.dlp.v2.R" - + "iskAnalysisJobConfigH\000\022\016\n\006job_id\030\004 \001(\t\022\023" - + "\n\013location_id\030\005 \001(\tB\005\n\003job\"\336\001\n\026ListJobTr" - + "iggersRequest\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\022\035d" - + "lp.googleapis.com/JobTrigger\022\022\n\npage_tok" - + "en\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\020\n\010order_by\030" - + "\004 \001(\t\022\016\n\006filter\030\005 \001(\t\022/\n\004type\030\006 \001(\0162!.go" - + "ogle.privacy.dlp.v2.DlpJobType\022\023\n\013locati" - + "on_id\030\007 \001(\t\"k\n\027ListJobTriggersResponse\0227" - + "\n\014job_triggers\030\001 \003(\0132!.google.privacy.dl" - + "p.v2.JobTrigger\022\027\n\017next_page_token\030\002 \001(\t" - + "\"N\n\027DeleteJobTriggerRequest\0223\n\004name\030\001 \001(" - + "\tB%\340A\002\372A\037\n\035dlp.googleapis.com/JobTrigger" - + "\"\335\001\n\020InspectJobConfig\022<\n\016storage_config\030" - + "\001 \001(\0132$.google.privacy.dlp.v2.StorageCon" - + "fig\022<\n\016inspect_config\030\002 \001(\0132$.google.pri" - + "vacy.dlp.v2.InspectConfig\022\035\n\025inspect_tem" - + "plate_name\030\003 \001(\t\022.\n\007actions\030\004 \003(\0132\035.goog" - + "le.privacy.dlp.v2.Action\"\355\005\n\021DataProfile" - + "Action\022F\n\013export_data\030\001 \001(\0132/.google.pri" - + "vacy.dlp.v2.DataProfileAction.ExportH\000\022[" - + "\n\024pub_sub_notification\030\002 \001(\0132;.google.pr" - + "ivacy.dlp.v2.DataProfileAction.PubSubNot" - + "ificationH\000\032E\n\006Export\022;\n\rprofile_table\030\001" - + " \001(\0132$.google.privacy.dlp.v2.BigQueryTab" - + "le\032\352\002\n\022PubSubNotification\022\r\n\005topic\030\001 \001(\t" - + "\022A\n\005event\030\002 \001(\01622.google.privacy.dlp.v2." - + "DataProfileAction.EventType\022K\n\020pubsub_co" - + "ndition\030\003 \001(\01321.google.privacy.dlp.v2.Da" - + "taProfilePubSubCondition\022b\n\021detail_of_me" - + "ssage\030\004 \001(\0162G.google.privacy.dlp.v2.Data" - + "ProfileAction.PubSubNotification.DetailL" - + "evel\"Q\n\013DetailLevel\022\034\n\030DETAIL_LEVEL_UNSP" - + "ECIFIED\020\000\022\021\n\rTABLE_PROFILE\020\001\022\021\n\rRESOURCE" - + "_NAME\020\002\"u\n\tEventType\022\032\n\026EVENT_TYPE_UNSPE" - + "CIFIED\020\000\022\017\n\013NEW_PROFILE\020\001\022\023\n\017CHANGED_PRO" - + "FILE\020\002\022\023\n\017SCORE_INCREASED\020\003\022\021\n\rERROR_CHA" - + "NGED\020\004B\010\n\006action\"\313\001\n\024DataProfileJobConfi" - + "g\022<\n\010location\030\001 \001(\0132*.google.privacy.dlp" - + ".v2.DataProfileLocation\022\022\n\nproject_id\030\005 " - + "\001(\t\022\031\n\021inspect_templates\030\007 \003(\t\022F\n\024data_p" - + "rofile_actions\030\006 \003(\0132(.google.privacy.dl" - + "p.v2.DataProfileAction\"Q\n\023DataProfileLoc" - + "ation\022\031\n\017organization_id\030\001 \001(\003H\000\022\023\n\tfold" - + "er_id\030\002 \001(\003H\000B\n\n\010location\"\353\005\n\006DlpJob\022\014\n\004" - + "name\030\001 \001(\t\022/\n\004type\030\002 \001(\0162!.google.privac" - + "y.dlp.v2.DlpJobType\0225\n\005state\030\003 \001(\0162&.goo" - + "gle.privacy.dlp.v2.DlpJob.JobState\022K\n\014ri" - + "sk_details\030\004 \001(\01323.google.privacy.dlp.v2" - + ".AnalyzeDataSourceRiskDetailsH\000\022J\n\017inspe" - + "ct_details\030\005 \001(\0132/.google.privacy.dlp.v2" - + ".InspectDataSourceDetailsH\000\022/\n\013create_ti" - + "me\030\006 \001(\0132\032.google.protobuf.Timestamp\022.\n\n" - + "start_time\030\007 \001(\0132\032.google.protobuf.Times" - + "tamp\022,\n\010end_time\030\010 \001(\0132\032.google.protobuf" - + ".Timestamp\022\030\n\020job_trigger_name\030\n \001(\t\022,\n\006" - + "errors\030\013 \003(\0132\034.google.privacy.dlp.v2.Err" - + "or\"o\n\010JobState\022\031\n\025JOB_STATE_UNSPECIFIED\020" - + "\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003\022\014\n" - + "\010CANCELED\020\004\022\n\n\006FAILED\020\005\022\n\n\006ACTIVE\020\006:\177\352A|" - + "\n\031dlp.googleapis.com/DlpJob\022$projects/{p" - + "roject}/dlpJobs/{dlp_job}\0229projects/{pro" - + "ject}/locations/{location}/dlpJobs/{dlp_" - + "job}B\t\n\007details\"C\n\020GetDlpJobRequest\022/\n\004n" - + "ame\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.googleapis.com/Dl" - + "pJob\"\326\001\n\022ListDlpJobsRequest\0221\n\006parent\030\004 " - + "\001(\tB!\340A\002\372A\033\022\031dlp.googleapis.com/DlpJob\022\016" - + "\n\006filter\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" - + "e_token\030\003 \001(\t\022/\n\004type\030\005 \001(\0162!.google.pri" - + "vacy.dlp.v2.DlpJobType\022\020\n\010order_by\030\006 \001(\t" - + "\022\023\n\013location_id\030\007 \001(\t\"[\n\023ListDlpJobsResp" - + "onse\022+\n\004jobs\030\001 \003(\0132\035.google.privacy.dlp." - + "v2.DlpJob\022\027\n\017next_page_token\030\002 \001(\t\"F\n\023Ca" - + "ncelDlpJobRequest\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n" - + "\031dlp.googleapis.com/DlpJob\"F\n\023FinishDlpJ" - + "obRequest\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.goo" - + "gleapis.com/DlpJob\"F\n\023DeleteDlpJobReques" - + "t\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.googleapis." - + "com/DlpJob\"\327\001\n\037CreateDeidentifyTemplateR" - + "equest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\022%dlp.goog" - + "leapis.com/DeidentifyTemplate\022K\n\023deident" - + "ify_template\030\002 \001(\0132).google.privacy.dlp." - + "v2.DeidentifyTemplateB\003\340A\002\022\023\n\013template_i" - + "d\030\003 \001(\t\022\023\n\013location_id\030\004 \001(\t\"\327\001\n\037UpdateD" - + "eidentifyTemplateRequest\022;\n\004name\030\001 \001(\tB-" - + "\340A\002\372A\'\n%dlp.googleapis.com/DeidentifyTem" - + "plate\022F\n\023deidentify_template\030\002 \001(\0132).goo" - + "gle.privacy.dlp.v2.DeidentifyTemplate\022/\n" - + "\013update_mask\030\003 \001(\0132\032.google.protobuf.Fie" - + "ldMask\"[\n\034GetDeidentifyTemplateRequest\022;" - + "\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dlp.googleapis.com" - + "/DeidentifyTemplate\"\255\001\n\036ListDeidentifyTe" - + "mplatesRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\022%" - + "dlp.googleapis.com/DeidentifyTemplate\022\022\n" - + "\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\020\n\010" - + "order_by\030\004 \001(\t\022\023\n\013location_id\030\005 \001(\t\"\203\001\n\037" - + "ListDeidentifyTemplatesResponse\022G\n\024deide" - + "ntify_templates\030\001 \003(\0132).google.privacy.d" - + "lp.v2.DeidentifyTemplate\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\"^\n\037DeleteDeidentifyTemplateReq" - + "uest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dlp.googleap" - + "is.com/DeidentifyTemplate\"\364\001\n\033LargeCusto" - + "mDictionaryConfig\022<\n\013output_path\030\001 \001(\0132\'" - + ".google.privacy.dlp.v2.CloudStoragePath\022" - + "L\n\026cloud_storage_file_set\030\002 \001(\0132*.google" - + ".privacy.dlp.v2.CloudStorageFileSetH\000\022?\n", - "\017big_query_field\030\003 \001(\0132$.google.privacy." - + "dlp.v2.BigQueryFieldH\000B\010\n\006source\"8\n\032Larg" - + "eCustomDictionaryStats\022\032\n\022approx_num_phr" - + "ases\030\001 \001(\003\"\246\002\n\024StoredInfoTypeConfig\022\024\n\014d" - + "isplay_name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022U" - + "\n\027large_custom_dictionary\030\003 \001(\01322.google" - + ".privacy.dlp.v2.LargeCustomDictionaryCon" - + "figH\000\022F\n\ndictionary\030\004 \001(\01320.google.priva" - + "cy.dlp.v2.CustomInfoType.DictionaryH\000\022<\n" - + "\005regex\030\005 \001(\0132+.google.privacy.dlp.v2.Cus" - + "tomInfoType.RegexH\000B\006\n\004type\"s\n\023StoredInf" - + "oTypeStats\022T\n\027large_custom_dictionary\030\001 " - + "\001(\01321.google.privacy.dlp.v2.LargeCustomD" - + "ictionaryStatsH\000B\006\n\004type\"\251\002\n\025StoredInfoT" - + "ypeVersion\022;\n\006config\030\001 \001(\0132+.google.priv" - + "acy.dlp.v2.StoredInfoTypeConfig\022/\n\013creat" - + "e_time\030\002 \001(\0132\032.google.protobuf.Timestamp" - + "\0229\n\005state\030\003 \001(\0162*.google.privacy.dlp.v2." - + "StoredInfoTypeState\022,\n\006errors\030\004 \003(\0132\034.go" - + "ogle.privacy.dlp.v2.Error\0229\n\005stats\030\005 \001(\013" - + "2*.google.privacy.dlp.v2.StoredInfoTypeS" - + "tats\"\361\003\n\016StoredInfoType\022\014\n\004name\030\001 \001(\t\022E\n" - + "\017current_version\030\002 \001(\0132,.google.privacy." - + "dlp.v2.StoredInfoTypeVersion\022F\n\020pending_" - + "versions\030\003 \003(\0132,.google.privacy.dlp.v2.S" - + "toredInfoTypeVersion:\301\002\352A\275\002\n!dlp.googlea" - + "pis.com/StoredInfoType\022?organizations/{o" - + "rganization}/storedInfoTypes/{stored_inf" - + "o_type}\0225projects/{project}/storedInfoTy" - + "pes/{stored_info_type}\022Torganizations/{o" - + "rganization}/locations/{location}/stored" - + "InfoTypes/{stored_info_type}\022Jprojects/{" - + "project}/locations/{location}/storedInfo" - + "Types/{stored_info_type}\"\314\001\n\033CreateStore" - + "dInfoTypeRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#" - + "\022!dlp.googleapis.com/StoredInfoType\022@\n\006c" - + "onfig\030\002 \001(\0132+.google.privacy.dlp.v2.Stor" - + "edInfoTypeConfigB\003\340A\002\022\033\n\023stored_info_typ" - + "e_id\030\003 \001(\t\022\023\n\013location_id\030\004 \001(\t\"\304\001\n\033Upda" - + "teStoredInfoTypeRequest\0227\n\004name\030\001 \001(\tB)\340" - + "A\002\372A#\n!dlp.googleapis.com/StoredInfoType" - + "\022;\n\006config\030\002 \001(\0132+.google.privacy.dlp.v2" - + ".StoredInfoTypeConfig\022/\n\013update_mask\030\003 \001" - + "(\0132\032.google.protobuf.FieldMask\"S\n\030GetSto" - + "redInfoTypeRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#" - + "\n!dlp.googleapis.com/StoredInfoType\"\245\001\n\032" - + "ListStoredInfoTypesRequest\0229\n\006parent\030\001 \001" - + "(\tB)\340A\002\372A#\022!dlp.googleapis.com/StoredInf" - + "oType\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003" - + " \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013location_id\030\005 " - + "\001(\t\"x\n\033ListStoredInfoTypesResponse\022@\n\021st" - + "ored_info_types\030\001 \003(\0132%.google.privacy.d" - + "lp.v2.StoredInfoType\022\027\n\017next_page_token\030" - + "\002 \001(\t\"V\n\033DeleteStoredInfoTypeRequest\0227\n\004" - + "name\030\001 \001(\tB)\340A\002\372A#\n!dlp.googleapis.com/S" - + "toredInfoType\"\224\001\n\036HybridInspectJobTrigge" - + "rRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.goog" - + "leapis.com/JobTrigger\022=\n\013hybrid_item\030\003 \001" - + "(\0132(.google.privacy.dlp.v2.HybridContent" - + "Item\"\214\001\n\032HybridInspectDlpJobRequest\022/\n\004n" - + "ame\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.googleapis.com/Dl" - + "pJob\022=\n\013hybrid_item\030\003 \001(\0132(.google.priva" - + "cy.dlp.v2.HybridContentItem\"\213\001\n\021HybridCo" - + "ntentItem\0220\n\004item\030\001 \001(\0132\".google.privacy" - + ".dlp.v2.ContentItem\022D\n\017finding_details\030\002" - + " \001(\0132+.google.privacy.dlp.v2.HybridFindi" - + "ngDetails\"\260\002\n\024HybridFindingDetails\022;\n\021co" - + "ntainer_details\030\001 \001(\0132 .google.privacy.d" - + "lp.v2.Container\022\023\n\013file_offset\030\002 \001(\003\022\022\n\n" - + "row_offset\030\003 \001(\003\022:\n\rtable_options\030\004 \001(\0132" - + "#.google.privacy.dlp.v2.TableOptions\022G\n\006" - + "labels\030\005 \003(\01327.google.privacy.dlp.v2.Hyb" - + "ridFindingDetails.LabelsEntry\032-\n\013LabelsE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\027\n\025" - + "HybridInspectResponse\"\341\001\n\020SensitivitySco" - + "re\022L\n\005score\030\001 \001(\0162=.google.privacy.dlp.v" - + "2.SensitivityScore.SensitivityScoreLevel" - + "\"\177\n\025SensitivityScoreLevel\022!\n\035SENSITIVITY" - + "_SCORE_UNSPECIFIED\020\000\022\023\n\017SENSITIVITY_LOW\020" - + "\n\022\030\n\024SENSITIVITY_MODERATE\020\024\022\024\n\020SENSITIVI" - + "TY_HIGH\020\036\"\271\001\n\rDataRiskLevel\022F\n\005score\030\001 \001" - + "(\01627.google.privacy.dlp.v2.DataRiskLevel" - + ".DataRiskLevelScore\"`\n\022DataRiskLevelScor" - + "e\022\032\n\026RISK_SCORE_UNSPECIFIED\020\000\022\014\n\010RISK_LO" - + "W\020\n\022\021\n\rRISK_MODERATE\020\024\022\r\n\tRISK_HIGH\020\036\"\240\001" - + "\n\031DataProfileConfigSnapshot\022<\n\016inspect_c" - + "onfig\030\002 \001(\0132$.google.privacy.dlp.v2.Insp" - + "ectConfig\022E\n\020data_profile_job\030\003 \001(\0132+.go" - + "ogle.privacy.dlp.v2.DataProfileJobConfig" - + "\"\232\n\n\020TableDataProfile\022\014\n\004name\030\001 \001(\t\022\034\n\024p" - + "roject_data_profile\030\002 \001(\t\022\032\n\022dataset_pro" - + "ject_id\030\030 \001(\t\022\030\n\020dataset_location\030\035 \001(\t\022" - + "\022\n\ndataset_id\030\031 \001(\t\022\020\n\010table_id\030\032 \001(\t\022\025\n" - + "\rfull_resource\030\003 \001(\t\022<\n\016profile_status\030\025" - + " \001(\0132$.google.privacy.dlp.v2.ProfileStat" - + "us\022<\n\005state\030\026 \001(\0162-.google.privacy.dlp.v" - + "2.TableDataProfile.State\022B\n\021sensitivity_" - + "score\030\005 \001(\0132\'.google.privacy.dlp.v2.Sens" - + "itivityScore\022=\n\017data_risk_level\030\006 \001(\0132$." - + "google.privacy.dlp.v2.DataRiskLevel\022D\n\024p" - + "redicted_info_types\030\033 \003(\0132&.google.priva" - + "cy.dlp.v2.InfoTypeSummary\022E\n\020other_info_" - + "types\030\034 \003(\0132+.google.privacy.dlp.v2.Othe" - + "rInfoTypeSummary\022I\n\017config_snapshot\030\007 \001(" - + "\01320.google.privacy.dlp.v2.DataProfileCon" - + "figSnapshot\0226\n\022last_modified_time\030\010 \001(\0132" - + "\032.google.protobuf.Timestamp\0223\n\017expiratio" - + "n_time\030\t \001(\0132\032.google.protobuf.Timestamp" - + "\022\034\n\024scanned_column_count\030\n \001(\003\022\033\n\023failed" - + "_column_count\030\013 \001(\003\022\030\n\020table_size_bytes\030" - + "\014 \001(\003\022\021\n\trow_count\030\r \001(\003\022B\n\021encryption_s" - + "tatus\030\016 \001(\0162\'.google.privacy.dlp.v2.Encr" - + "yptionStatus\022F\n\023resource_visibility\030\017 \001(" - + "\0162).google.privacy.dlp.v2.ResourceVisibi" - + "lity\022:\n\026profile_last_generated\030\020 \001(\0132\032.g" - + "oogle.protobuf.Timestamp\022T\n\017resource_lab" - + "els\030\021 \003(\0132;.google.privacy.dlp.v2.TableD" - + "ataProfile.ResourceLabelsEntry\022/\n\013create" - + "_time\030\027 \001(\0132\032.google.protobuf.Timestamp\032" - + "5\n\023ResourceLabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\t:\0028\001\"5\n\005State\022\025\n\021STATE_UNSPECI" - + "FIED\020\000\022\013\n\007RUNNING\020\001\022\010\n\004DONE\020\002\"b\n\rProfile" - + "Status\022\"\n\006status\030\001 \001(\0132\022.google.rpc.Stat" - + "us\022-\n\ttimestamp\030\003 \001(\0132\032.google.protobuf." - + "Timestamp\"E\n\017InfoTypeSummary\0222\n\tinfo_typ" - + "e\030\001 \001(\0132\037.google.privacy.dlp.v2.InfoType" - + "\"J\n\024OtherInfoTypeSummary\0222\n\tinfo_type\030\001 " - + "\001(\0132\037.google.privacy.dlp.v2.InfoType\"\352\005\n" - + "\032DataProfilePubSubCondition\022X\n\013expressio" - + "ns\030\001 \001(\0132C.google.privacy.dlp.v2.DataPro" - + "filePubSubCondition.PubSubExpressions\032\351\001" - + "\n\017PubSubCondition\022b\n\022minimum_risk_score\030" - + "\001 \001(\0162D.google.privacy.dlp.v2.DataProfil" - + "ePubSubCondition.ProfileScoreBucketH\000\022i\n" - + "\031minimum_sensitivity_score\030\002 \001(\0162D.googl" - + "e.privacy.dlp.v2.DataProfilePubSubCondit" - + "ion.ProfileScoreBucketH\000B\007\n\005value\032\253\002\n\021Pu" - + "bSubExpressions\022s\n\020logical_operator\030\001 \001(" - + "\0162Y.google.privacy.dlp.v2.DataProfilePub" - + "SubCondition.PubSubExpressions.PubSubLog" - + "icalOperator\022U\n\nconditions\030\002 \003(\0132A.googl" - + "e.privacy.dlp.v2.DataProfilePubSubCondit" - + "ion.PubSubCondition\"J\n\025PubSubLogicalOper" - + "ator\022 \n\034LOGICAL_OPERATOR_UNSPECIFIED\020\000\022\006" - + "\n\002OR\020\001\022\007\n\003AND\020\002\"X\n\022ProfileScoreBucket\022$\n" - + " PROFILE_SCORE_BUCKET_UNSPECIFIED\020\000\022\010\n\004H" - + "IGH\020\001\022\022\n\016MEDIUM_OR_HIGH\020\002\"\227\001\n\030DataProfil" - + "ePubSubMessage\0228\n\007profile\030\001 \001(\0132\'.google" - + ".privacy.dlp.v2.TableDataProfile\022A\n\005even" - + "t\030\002 \001(\01622.google.privacy.dlp.v2.DataProf" - + "ileAction.EventType*\273\001\n\022RelationalOperat" - + "or\022#\n\037RELATIONAL_OPERATOR_UNSPECIFIED\020\000\022" - + "\014\n\010EQUAL_TO\020\001\022\020\n\014NOT_EQUAL_TO\020\002\022\020\n\014GREAT" - + "ER_THAN\020\003\022\r\n\tLESS_THAN\020\004\022\032\n\026GREATER_THAN" - + "_OR_EQUALS\020\005\022\027\n\023LESS_THAN_OR_EQUALS\020\006\022\n\n" - + "\006EXISTS\020\007*\215\001\n\014MatchingType\022\035\n\031MATCHING_T" - + "YPE_UNSPECIFIED\020\000\022\034\n\030MATCHING_TYPE_FULL_" - + "MATCH\020\001\022\037\n\033MATCHING_TYPE_PARTIAL_MATCH\020\002" - + "\022\037\n\033MATCHING_TYPE_INVERSE_MATCH\020\003*M\n\rCon" - + "tentOption\022\027\n\023CONTENT_UNSPECIFIED\020\000\022\020\n\014C" - + "ONTENT_TEXT\020\001\022\021\n\rCONTENT_IMAGE\020\002*B\n\014Meta" - + "dataType\022\034\n\030METADATATYPE_UNSPECIFIED\020\000\022\024" - + "\n\020STORAGE_METADATA\020\002*P\n\023InfoTypeSupporte" - + "dBy\022\031\n\025ENUM_TYPE_UNSPECIFIED\020\000\022\013\n\007INSPEC" - + "T\020\001\022\021\n\rRISK_ANALYSIS\020\002*R\n\nDlpJobType\022\034\n\030" - + "DLP_JOB_TYPE_UNSPECIFIED\020\000\022\017\n\013INSPECT_JO" - + "B\020\001\022\025\n\021RISK_ANALYSIS_JOB\020\002*n\n\023StoredInfo" - + "TypeState\022&\n\"STORED_INFO_TYPE_STATE_UNSP" - + "ECIFIED\020\000\022\013\n\007PENDING\020\001\022\t\n\005READY\020\002\022\n\n\006FAI" - + "LED\020\003\022\013\n\007INVALID\020\004*}\n\022ResourceVisibility" - + "\022#\n\037RESOURCE_VISIBILITY_UNSPECIFIED\020\000\022\036\n" - + "\032RESOURCE_VISIBILITY_PUBLIC\020\n\022\"\n\036RESOURC" - + "E_VISIBILITY_RESTRICTED\020\024*u\n\020EncryptionS" - + "tatus\022!\n\035ENCRYPTION_STATUS_UNSPECIFIED\020\000" - + "\022\035\n\031ENCRYPTION_GOOGLE_MANAGED\020\001\022\037\n\033ENCRY" - + "PTION_CUSTOMER_MANAGED\020\0022\240L\n\nDlpService\022" - + "\333\001\n\016InspectContent\022,.google.privacy.dlp." - + "v2.InspectContentRequest\032-.google.privac" - + "y.dlp.v2.InspectContentResponse\"l\202\323\344\223\002f\"" - + "\'/v2/{parent=projects/*}/content:inspect" - + ":\001*Z8\"3/v2/{parent=projects/*/locations/" - + "*}/content:inspect:\001*\022\314\001\n\013RedactImage\022)." - + "google.privacy.dlp.v2.RedactImageRequest" - + "\032*.google.privacy.dlp.v2.RedactImageResp" - + "onse\"f\202\323\344\223\002`\"$/v2/{parent=projects/*}/im" - + "age:redact:\001*Z5\"0/v2/{parent=projects/*/" - + "locations/*}/image:redact:\001*\022\352\001\n\021Deident" - + "ifyContent\022/.google.privacy.dlp.v2.Deide" - + "ntifyContentRequest\0320.google.privacy.dlp" - + ".v2.DeidentifyContentResponse\"r\202\323\344\223\002l\"*/" - + "v2/{parent=projects/*}/content:deidentif" - + "y:\001*Z;\"6/v2/{parent=projects/*/locations" - + "/*}/content:deidentify:\001*\022\352\001\n\021Reidentify" - + "Content\022/.google.privacy.dlp.v2.Reidenti" - + "fyContentRequest\0320.google.privacy.dlp.v2" - + ".ReidentifyContentResponse\"r\202\323\344\223\002l\"*/v2/" - + "{parent=projects/*}/content:reidentify:\001" - + "*Z;\"6/v2/{parent=projects/*/locations/*}" - + "/content:reidentify:\001*\022\260\001\n\rListInfoTypes" - + "\022+.google.privacy.dlp.v2.ListInfoTypesRe" - + "quest\032,.google.privacy.dlp.v2.ListInfoTy" - + "pesResponse\"D\202\323\344\223\0025\022\r/v2/infoTypesZ$\022\"/v" - + "2/{parent=locations/*}/infoTypes\332A\006paren" - + "t\022\364\002\n\025CreateInspectTemplate\0223.google.pri" - + "vacy.dlp.v2.CreateInspectTemplateRequest" - + "\032&.google.privacy.dlp.v2.InspectTemplate" - + "\"\375\001\202\323\344\223\002\334\001\"-/v2/{parent=organizations/*}" - + "/inspectTemplates:\001*Z>\"9/v2/{parent=orga" - + "nizations/*/locations/*}/inspectTemplate" - + "s:\001*Z-\"(/v2/{parent=projects/*}/inspectT" - + "emplates:\001*Z9\"4/v2/{parent=projects/*/lo" - + "cations/*}/inspectTemplates:\001*\332A\027parent," - + "inspect_template\022\376\002\n\025UpdateInspectTempla" - + "te\0223.google.privacy.dlp.v2.UpdateInspect" - + "TemplateRequest\032&.google.privacy.dlp.v2." - + "InspectTemplate\"\207\002\202\323\344\223\002\334\0012-/v2/{name=org" - + "anizations/*/inspectTemplates/*}:\001*Z>29/" - + "v2/{name=organizations/*/locations/*/ins" - + "pectTemplates/*}:\001*Z-2(/v2/{name=project" - + "s/*/inspectTemplates/*}:\001*Z924/v2/{name=" - + "projects/*/locations/*/inspectTemplates/" - + "*}:\001*\332A!name,inspect_template,update_mas" - + "k\022\317\002\n\022GetInspectTemplate\0220.google.privac" - + "y.dlp.v2.GetInspectTemplateRequest\032&.goo" - + "gle.privacy.dlp.v2.InspectTemplate\"\336\001\202\323\344" - + "\223\002\320\001\022-/v2/{name=organizations/*/inspectT" - + "emplates/*}Z;\0229/v2/{name=organizations/*" - + "/locations/*/inspectTemplates/*}Z*\022(/v2/" - + "{name=projects/*/inspectTemplates/*}Z6\0224" - + "/v2/{name=projects/*/locations/*/inspect" - + "Templates/*}\332A\004name\022\342\002\n\024ListInspectTempl" - + "ates\0222.google.privacy.dlp.v2.ListInspect" - + "TemplatesRequest\0323.google.privacy.dlp.v2" - + ".ListInspectTemplatesResponse\"\340\001\202\323\344\223\002\320\001\022" - + "-/v2/{parent=organizations/*}/inspectTem" - + "platesZ;\0229/v2/{parent=organizations/*/lo" - + "cations/*}/inspectTemplatesZ*\022(/v2/{pare" - + "nt=projects/*}/inspectTemplatesZ6\0224/v2/{" - + "parent=projects/*/locations/*}/inspectTe" - + "mplates\332A\006parent\022\305\002\n\025DeleteInspectTempla" - + "te\0223.google.privacy.dlp.v2.DeleteInspect" - + "TemplateRequest\032\026.google.protobuf.Empty\"" - + "\336\001\202\323\344\223\002\320\001*-/v2/{name=organizations/*/ins" - + "pectTemplates/*}Z;*9/v2/{name=organizati" - + "ons/*/locations/*/inspectTemplates/*}Z**" - + "(/v2/{name=projects/*/inspectTemplates/*" - + "}Z6*4/v2/{name=projects/*/locations/*/in" - + "spectTemplates/*}\332A\004name\022\214\003\n\030CreateDeide" - + "ntifyTemplate\0226.google.privacy.dlp.v2.Cr" - + "eateDeidentifyTemplateRequest\032).google.p" - + "rivacy.dlp.v2.DeidentifyTemplate\"\214\002\202\323\344\223\002" - + "\350\001\"0/v2/{parent=organizations/*}/deident" - + "ifyTemplates:\001*ZA\"\022\022*\"9/v2/{name=projects/*" - + "/locations/*/dlpJobs/*}:hybridInspect:\001*" - + "\332A\004name\022\221\001\n\014FinishDlpJob\022*.google.privac" - + "y.dlp.v2.FinishDlpJobRequest\032\026.google.pr" - + "otobuf.Empty\"=\202\323\344\223\0027\"2/v2/{name=projects" - + "/*/locations/*/dlpJobs/*}:finish:\001*\032F\312A\022" - + "dlp.googleapis.com\322A.https://www.googlea" - + "pis.com/auth/cloud-platformB\372\002\n\031com.goog" - + "le.privacy.dlp.v2B\010DlpProtoP\001Z8google.go" - + "lang.org/genproto/googleapis/privacy/dlp" - + "/v2;dlp\252\002\023Google.Cloud.Dlp.V2\312\002\023Google\\C" - + "loud\\Dlp\\V2\352\002\026Google::Cloud::Dlp::V2\352Ar\n" - + "\035dlp.googleapis.com/DlpContent\022\035projects" - + "/{project}/dlpContent\0222projects/{project" - + "}/locations/{location}/dlpContent\352A\\\n\'dl" - + "p.googleapis.com/OrganizationLocation\0221o" - + "rganizations/{organization}/locations/{l" - + "ocation}b\006proto3" + + "update_time\030\005 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\022B\n\021deidentify_config\030\006 \001(\0132\'." + + "google.privacy.dlp.v2.DeidentifyConfig:\341" + + "\002\352A\335\002\n%dlp.googleapis.com/DeidentifyTemp" + + "late\022Forganizations/{organization}/deide" + + "ntifyTemplates/{deidentify_template}\022\n\013inspect_job\030\004 \001(\0132\'.google.privacy.d" + + "lp.v2.InspectJobConfigH\000\022;\n\010triggers\030\005 \003" + + "(\0132).google.privacy.dlp.v2.JobTrigger.Tr" + + "igger\0221\n\006errors\030\006 \003(\0132\034.google.privacy.d" + + "lp.v2.ErrorB\003\340A\003\0224\n\013create_time\030\007 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\0224\n\013update" + + "_time\030\010 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\0226\n\rlast_run_time\030\t \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022=\n\006status\030\n \001(\0162(.g" + + "oogle.privacy.dlp.v2.JobTrigger.StatusB\003" + + "\340A\002\032z\n\007Trigger\0223\n\010schedule\030\001 \001(\0132\037.googl" + + "e.privacy.dlp.v2.ScheduleH\000\022/\n\006manual\030\002 " + + "\001(\0132\035.google.privacy.dlp.v2.ManualH\000B\t\n\007" + + "trigger\"H\n\006Status\022\026\n\022STATUS_UNSPECIFIED\020" + + "\000\022\013\n\007HEALTHY\020\001\022\n\n\006PAUSED\020\002\022\r\n\tCANCELLED\020" + + "\003:\224\001\352A\220\001\n\035dlp.googleapis.com/JobTrigger\022" + + ",projects/{project}/jobTriggers/{job_tri" + + "gger}\022Aprojects/{project}/locations/{loc" + + "ation}/jobTriggers/{job_trigger}B\005\n\003job\"" + + "\352\010\n\006Action\022C\n\rsave_findings\030\001 \001(\0132*.goog" + + "le.privacy.dlp.v2.Action.SaveFindingsH\000\022" + + "@\n\007pub_sub\030\002 \001(\0132-.google.privacy.dlp.v2" + + ".Action.PublishToPubSubH\000\022U\n\027publish_sum" + + "mary_to_cscc\030\003 \001(\01322.google.privacy.dlp." + + "v2.Action.PublishSummaryToCsccH\000\022q\n&publ" + + "ish_findings_to_cloud_data_catalog\030\005 \001(\013" + + "2?.google.privacy.dlp.v2.Action.PublishF" + + "indingsToCloudDataCatalogH\000\022>\n\ndeidentif" + + "y\030\007 \001(\0132(.google.privacy.dlp.v2.Action.D" + + "eidentifyH\000\022V\n\027job_notification_emails\030\010" + + " \001(\01323.google.privacy.dlp.v2.Action.JobN" + + "otificationEmailsH\000\022T\n\026publish_to_stackd" + + "river\030\t \001(\01322.google.privacy.dlp.v2.Acti" + + "on.PublishToStackdriverH\000\032Q\n\014SaveFinding" + + "s\022A\n\routput_config\030\001 \001(\0132*.google.privac" + + "y.dlp.v2.OutputStorageConfig\032 \n\017PublishT" + + "oPubSub\022\r\n\005topic\030\001 \001(\t\032\026\n\024PublishSummary" + + "ToCscc\032#\n!PublishFindingsToCloudDataCata" + + "log\032\263\002\n\nDeidentify\022J\n\025transformation_con" + + "fig\030\007 \001(\0132+.google.privacy.dlp.v2.Transf" + + "ormationConfig\022h\n%transformation_details" + + "_storage_config\030\003 \001(\01329.google.privacy.d" + + "lp.v2.TransformationDetailsStorageConfig" + + "\022#\n\024cloud_storage_output\030\t \001(\tB\003\340A\002H\000\022@\n" + + "\027file_types_to_transform\030\010 \003(\0162\037.google." + + "privacy.dlp.v2.FileTypeB\010\n\006output\032\027\n\025Job" + + "NotificationEmails\032\026\n\024PublishToStackdriv" + + "erB\010\n\006action\"z\n\024TransformationConfig\022\033\n\023" + + "deidentify_template\030\001 \001(\t\022&\n\036structured_" + + "deidentify_template\030\002 \001(\t\022\035\n\025image_redac" + + "t_template\030\004 \001(\t\"\313\001\n\034CreateInspectTempla" + + "teRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dlp.g" + + "oogleapis.com/InspectTemplate\022E\n\020inspect" + + "_template\030\002 \001(\0132&.google.privacy.dlp.v2." + + "InspectTemplateB\003\340A\002\022\023\n\013template_id\030\003 \001(" + + "\t\022\023\n\013location_id\030\004 \001(\t\"\313\001\n\034UpdateInspect" + + "TemplateRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"d" + + "lp.googleapis.com/InspectTemplate\022@\n\020ins" + + "pect_template\030\002 \001(\0132&.google.privacy.dlp" + + ".v2.InspectTemplate\022/\n\013update_mask\030\003 \001(\013" + + "2\032.google.protobuf.FieldMask\"U\n\031GetInspe" + + "ctTemplateRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"dlp.googleapis.com/InspectTemplate\"\247\001\n\033" + + "ListInspectTemplatesRequest\022:\n\006parent\030\001 " + + "\001(\tB*\340A\002\372A$\022\"dlp.googleapis.com/InspectT" + + "emplate\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size" + + "\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013location_id\030" + + "\005 \001(\t\"z\n\034ListInspectTemplatesResponse\022A\n" + + "\021inspect_templates\030\001 \003(\0132&.google.privac" + + "y.dlp.v2.InspectTemplate\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\"X\n\034DeleteInspectTemplateReques" + + "t\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dlp.googleapis." + + "com/InspectTemplate\"\266\001\n\027CreateJobTrigger" + + "Request\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\022\035dlp.goo" + + "gleapis.com/JobTrigger\022;\n\013job_trigger\030\002 " + + "\001(\0132!.google.privacy.dlp.v2.JobTriggerB\003" + + "\340A\002\022\022\n\ntrigger_id\030\003 \001(\t\022\023\n\013location_id\030\004" + + " \001(\t\"P\n\031ActivateJobTriggerRequest\0223\n\004nam" + + "e\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleapis.com/JobT" + + "rigger\"\267\001\n\027UpdateJobTriggerRequest\0223\n\004na" + + "me\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleapis.com/Job" + + "Trigger\0226\n\013job_trigger\030\002 \001(\0132!.google.pr" + + "ivacy.dlp.v2.JobTrigger\022/\n\013update_mask\030\003" + + " \001(\0132\032.google.protobuf.FieldMask\"K\n\024GetJ" + + "obTriggerRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035" + + "dlp.googleapis.com/JobTrigger\"\366\001\n\023Create" + + "DlpJobRequest\0221\n\006parent\030\001 \001(\tB!\340A\002\372A\033\022\031d" + + "lp.googleapis.com/DlpJob\022>\n\013inspect_job\030" + + "\002 \001(\0132\'.google.privacy.dlp.v2.InspectJob" + + "ConfigH\000\022@\n\010risk_job\030\003 \001(\0132,.google.priv" + + "acy.dlp.v2.RiskAnalysisJobConfigH\000\022\016\n\006jo" + + "b_id\030\004 \001(\t\022\023\n\013location_id\030\005 \001(\tB\005\n\003job\"\336" + + "\001\n\026ListJobTriggersRequest\0225\n\006parent\030\001 \001(" + + "\tB%\340A\002\372A\037\022\035dlp.googleapis.com/JobTrigger" + + "\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022" + + "\020\n\010order_by\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t\022/\n\004typ" + + "e\030\006 \001(\0162!.google.privacy.dlp.v2.DlpJobTy" + + "pe\022\023\n\013location_id\030\007 \001(\t\"k\n\027ListJobTrigge" + + "rsResponse\0227\n\014job_triggers\030\001 \003(\0132!.googl" + + "e.privacy.dlp.v2.JobTrigger\022\027\n\017next_page" + + "_token\030\002 \001(\t\"N\n\027DeleteJobTriggerRequest\022" + + "3\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleapis.co" + + "m/JobTrigger\"\335\001\n\020InspectJobConfig\022<\n\016sto" + + "rage_config\030\001 \001(\0132$.google.privacy.dlp.v" + + "2.StorageConfig\022<\n\016inspect_config\030\002 \001(\0132" + + "$.google.privacy.dlp.v2.InspectConfig\022\035\n" + + "\025inspect_template_name\030\003 \001(\t\022.\n\007actions\030" + + "\004 \003(\0132\035.google.privacy.dlp.v2.Action\"\355\005\n" + + "\021DataProfileAction\022F\n\013export_data\030\001 \001(\0132" + + "/.google.privacy.dlp.v2.DataProfileActio" + + "n.ExportH\000\022[\n\024pub_sub_notification\030\002 \001(\013" + + "2;.google.privacy.dlp.v2.DataProfileActi" + + "on.PubSubNotificationH\000\032E\n\006Export\022;\n\rpro" + + "file_table\030\001 \001(\0132$.google.privacy.dlp.v2" + + ".BigQueryTable\032\352\002\n\022PubSubNotification\022\r\n" + + "\005topic\030\001 \001(\t\022A\n\005event\030\002 \001(\01622.google.pri" + + "vacy.dlp.v2.DataProfileAction.EventType\022" + + "K\n\020pubsub_condition\030\003 \001(\01321.google.priva" + + "cy.dlp.v2.DataProfilePubSubCondition\022b\n\021" + + "detail_of_message\030\004 \001(\0162G.google.privacy" + + ".dlp.v2.DataProfileAction.PubSubNotifica" + + "tion.DetailLevel\"Q\n\013DetailLevel\022\034\n\030DETAI" + + "L_LEVEL_UNSPECIFIED\020\000\022\021\n\rTABLE_PROFILE\020\001" + + "\022\021\n\rRESOURCE_NAME\020\002\"u\n\tEventType\022\032\n\026EVEN" + + "T_TYPE_UNSPECIFIED\020\000\022\017\n\013NEW_PROFILE\020\001\022\023\n" + + "\017CHANGED_PROFILE\020\002\022\023\n\017SCORE_INCREASED\020\003\022" + + "\021\n\rERROR_CHANGED\020\004B\010\n\006action\"\313\001\n\024DataPro" + + "fileJobConfig\022<\n\010location\030\001 \001(\0132*.google" + + ".privacy.dlp.v2.DataProfileLocation\022\022\n\np" + + "roject_id\030\005 \001(\t\022\031\n\021inspect_templates\030\007 \003" + + "(\t\022F\n\024data_profile_actions\030\006 \003(\0132(.googl" + + "e.privacy.dlp.v2.DataProfileAction\"Q\n\023Da" + + "taProfileLocation\022\031\n\017organization_id\030\001 \001" + + "(\003H\000\022\023\n\tfolder_id\030\002 \001(\003H\000B\n\n\010location\"\353\005", + "\n\006DlpJob\022\014\n\004name\030\001 \001(\t\022/\n\004type\030\002 \001(\0162!.g" + + "oogle.privacy.dlp.v2.DlpJobType\0225\n\005state" + + "\030\003 \001(\0162&.google.privacy.dlp.v2.DlpJob.Jo" + + "bState\022K\n\014risk_details\030\004 \001(\01323.google.pr" + + "ivacy.dlp.v2.AnalyzeDataSourceRiskDetail" + + "sH\000\022J\n\017inspect_details\030\005 \001(\0132/.google.pr" + + "ivacy.dlp.v2.InspectDataSourceDetailsH\000\022" + + "/\n\013create_time\030\006 \001(\0132\032.google.protobuf.T" + + "imestamp\022.\n\nstart_time\030\007 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022,\n\010end_time\030\010 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022\030\n\020job_trigger_na" + + "me\030\n \001(\t\022,\n\006errors\030\013 \003(\0132\034.google.privac" + + "y.dlp.v2.Error\"o\n\010JobState\022\031\n\025JOB_STATE_" + + "UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022" + + "\010\n\004DONE\020\003\022\014\n\010CANCELED\020\004\022\n\n\006FAILED\020\005\022\n\n\006A" + + "CTIVE\020\006:\177\352A|\n\031dlp.googleapis.com/DlpJob\022" + + "$projects/{project}/dlpJobs/{dlp_job}\0229p" + + "rojects/{project}/locations/{location}/d" + + "lpJobs/{dlp_job}B\t\n\007details\"C\n\020GetDlpJob" + + "Request\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.googl" + + "eapis.com/DlpJob\"\326\001\n\022ListDlpJobsRequest\022" + + "1\n\006parent\030\004 \001(\tB!\340A\002\372A\033\022\031dlp.googleapis." + + "com/DlpJob\022\016\n\006filter\030\001 \001(\t\022\021\n\tpage_size\030" + + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022/\n\004type\030\005 \001(\0162" + + "!.google.privacy.dlp.v2.DlpJobType\022\020\n\010or" + + "der_by\030\006 \001(\t\022\023\n\013location_id\030\007 \001(\t\"[\n\023Lis" + + "tDlpJobsResponse\022+\n\004jobs\030\001 \003(\0132\035.google." + + "privacy.dlp.v2.DlpJob\022\027\n\017next_page_token" + + "\030\002 \001(\t\"F\n\023CancelDlpJobRequest\022/\n\004name\030\001 " + + "\001(\tB!\340A\002\372A\033\n\031dlp.googleapis.com/DlpJob\"F" + + "\n\023FinishDlpJobRequest\022/\n\004name\030\001 \001(\tB!\340A\002" + + "\372A\033\n\031dlp.googleapis.com/DlpJob\"F\n\023Delete" + + "DlpJobRequest\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp" + + ".googleapis.com/DlpJob\"\327\001\n\037CreateDeident" + + "ifyTemplateRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372" + + "A\'\022%dlp.googleapis.com/DeidentifyTemplat" + + "e\022K\n\023deidentify_template\030\002 \001(\0132).google." + + "privacy.dlp.v2.DeidentifyTemplateB\003\340A\002\022\023" + + "\n\013template_id\030\003 \001(\t\022\023\n\013location_id\030\004 \001(\t" + + "\"\327\001\n\037UpdateDeidentifyTemplateRequest\022;\n\004" + + "name\030\001 \001(\tB-\340A\002\372A\'\n%dlp.googleapis.com/D" + + "eidentifyTemplate\022F\n\023deidentify_template" + + "\030\002 \001(\0132).google.privacy.dlp.v2.Deidentif" + + "yTemplate\022/\n\013update_mask\030\003 \001(\0132\032.google." + + "protobuf.FieldMask\"[\n\034GetDeidentifyTempl" + + "ateRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dlp.go" + + "ogleapis.com/DeidentifyTemplate\"\255\001\n\036List" + + "DeidentifyTemplatesRequest\022=\n\006parent\030\001 \001" + + "(\tB-\340A\002\372A\'\022%dlp.googleapis.com/Deidentif" + + "yTemplate\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_si" + + "ze\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013location_i" + + "d\030\005 \001(\t\"\203\001\n\037ListDeidentifyTemplatesRespo" + + "nse\022G\n\024deidentify_templates\030\001 \003(\0132).goog" + + "le.privacy.dlp.v2.DeidentifyTemplate\022\027\n\017" + + "next_page_token\030\002 \001(\t\"^\n\037DeleteDeidentif" + + "yTemplateRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%" + + "dlp.googleapis.com/DeidentifyTemplate\"\364\001" + + "\n\033LargeCustomDictionaryConfig\022<\n\013output_" + + "path\030\001 \001(\0132\'.google.privacy.dlp.v2.Cloud" + + "StoragePath\022L\n\026cloud_storage_file_set\030\002 " + + "\001(\0132*.google.privacy.dlp.v2.CloudStorage" + + "FileSetH\000\022?\n\017big_query_field\030\003 \001(\0132$.goo" + + "gle.privacy.dlp.v2.BigQueryFieldH\000B\010\n\006so" + + "urce\"8\n\032LargeCustomDictionaryStats\022\032\n\022ap" + + "prox_num_phrases\030\001 \001(\003\"\246\002\n\024StoredInfoTyp" + + "eConfig\022\024\n\014display_name\030\001 \001(\t\022\023\n\013descrip" + + "tion\030\002 \001(\t\022U\n\027large_custom_dictionary\030\003 " + + "\001(\01322.google.privacy.dlp.v2.LargeCustomD" + + "ictionaryConfigH\000\022F\n\ndictionary\030\004 \001(\01320." + + "google.privacy.dlp.v2.CustomInfoType.Dic" + + "tionaryH\000\022<\n\005regex\030\005 \001(\0132+.google.privac" + + "y.dlp.v2.CustomInfoType.RegexH\000B\006\n\004type\"" + + "s\n\023StoredInfoTypeStats\022T\n\027large_custom_d" + + "ictionary\030\001 \001(\01321.google.privacy.dlp.v2." + + "LargeCustomDictionaryStatsH\000B\006\n\004type\"\251\002\n" + + "\025StoredInfoTypeVersion\022;\n\006config\030\001 \001(\0132+" + + ".google.privacy.dlp.v2.StoredInfoTypeCon" + + "fig\022/\n\013create_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\0229\n\005state\030\003 \001(\0162*.google.pri" + + "vacy.dlp.v2.StoredInfoTypeState\022,\n\006error" + + "s\030\004 \003(\0132\034.google.privacy.dlp.v2.Error\0229\n" + + "\005stats\030\005 \001(\0132*.google.privacy.dlp.v2.Sto" + + "redInfoTypeStats\"\361\003\n\016StoredInfoType\022\014\n\004n" + + "ame\030\001 \001(\t\022E\n\017current_version\030\002 \001(\0132,.goo" + + "gle.privacy.dlp.v2.StoredInfoTypeVersion" + + "\022F\n\020pending_versions\030\003 \003(\0132,.google.priv" + + "acy.dlp.v2.StoredInfoTypeVersion:\301\002\352A\275\002\n" + + "!dlp.googleapis.com/StoredInfoType\022?orga" + + "nizations/{organization}/storedInfoTypes" + + "/{stored_info_type}\0225projects/{project}/" + + "storedInfoTypes/{stored_info_type}\022Torga" + + "nizations/{organization}/locations/{loca" + + "tion}/storedInfoTypes/{stored_info_type}" + + "\022Jprojects/{project}/locations/{location" + + "}/storedInfoTypes/{stored_info_type}\"\314\001\n" + + "\033CreateStoredInfoTypeRequest\0229\n\006parent\030\001" + + " \001(\tB)\340A\002\372A#\022!dlp.googleapis.com/StoredI" + + "nfoType\022@\n\006config\030\002 \001(\0132+.google.privacy" + + ".dlp.v2.StoredInfoTypeConfigB\003\340A\002\022\033\n\023sto" + + "red_info_type_id\030\003 \001(\t\022\023\n\013location_id\030\004 " + + "\001(\t\"\304\001\n\033UpdateStoredInfoTypeRequest\0227\n\004n" + + "ame\030\001 \001(\tB)\340A\002\372A#\n!dlp.googleapis.com/St" + + "oredInfoType\022;\n\006config\030\002 \001(\0132+.google.pr" + + "ivacy.dlp.v2.StoredInfoTypeConfig\022/\n\013upd" + + "ate_mask\030\003 \001(\0132\032.google.protobuf.FieldMa" + + "sk\"S\n\030GetStoredInfoTypeRequest\0227\n\004name\030\001" + + " \001(\tB)\340A\002\372A#\n!dlp.googleapis.com/StoredI" + + "nfoType\"\245\001\n\032ListStoredInfoTypesRequest\0229" + + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!dlp.googleapis.c" + + "om/StoredInfoType\022\022\n\npage_token\030\002 \001(\t\022\021\n" + + "\tpage_size\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013lo" + + "cation_id\030\005 \001(\t\"x\n\033ListStoredInfoTypesRe" + + "sponse\022@\n\021stored_info_types\030\001 \003(\0132%.goog" + + "le.privacy.dlp.v2.StoredInfoType\022\027\n\017next" + + "_page_token\030\002 \001(\t\"V\n\033DeleteStoredInfoTyp" + + "eRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!dlp.goog" + + "leapis.com/StoredInfoType\"\224\001\n\036HybridInsp" + + "ectJobTriggerRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372" + + "A\037\n\035dlp.googleapis.com/JobTrigger\022=\n\013hyb" + + "rid_item\030\003 \001(\0132(.google.privacy.dlp.v2.H" + + "ybridContentItem\"\214\001\n\032HybridInspectDlpJob" + + "Request\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.googl" + + "eapis.com/DlpJob\022=\n\013hybrid_item\030\003 \001(\0132(." + + "google.privacy.dlp.v2.HybridContentItem\"" + + "\213\001\n\021HybridContentItem\0220\n\004item\030\001 \001(\0132\".go" + + "ogle.privacy.dlp.v2.ContentItem\022D\n\017findi" + + "ng_details\030\002 \001(\0132+.google.privacy.dlp.v2" + + ".HybridFindingDetails\"\260\002\n\024HybridFindingD" + + "etails\022;\n\021container_details\030\001 \001(\0132 .goog" + + "le.privacy.dlp.v2.Container\022\023\n\013file_offs" + + "et\030\002 \001(\003\022\022\n\nrow_offset\030\003 \001(\003\022:\n\rtable_op" + + "tions\030\004 \001(\0132#.google.privacy.dlp.v2.Tabl" + + "eOptions\022G\n\006labels\030\005 \003(\01327.google.privac" + + "y.dlp.v2.HybridFindingDetails.LabelsEntr" + + "y\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"\027\n\025HybridInspectResponse\"\271\001\n\rDa" + + "taRiskLevel\022F\n\005score\030\001 \001(\01627.google.priv" + + "acy.dlp.v2.DataRiskLevel.DataRiskLevelSc" + + "ore\"`\n\022DataRiskLevelScore\022\032\n\026RISK_SCORE_" + + "UNSPECIFIED\020\000\022\014\n\010RISK_LOW\020\n\022\021\n\rRISK_MODE" + + "RATE\020\024\022\r\n\tRISK_HIGH\020\036\"\240\001\n\031DataProfileCon" + + "figSnapshot\022<\n\016inspect_config\030\002 \001(\0132$.go" + + "ogle.privacy.dlp.v2.InspectConfig\022E\n\020dat" + + "a_profile_job\030\003 \001(\0132+.google.privacy.dlp" + + ".v2.DataProfileJobConfig\"\232\n\n\020TableDataPr" + + "ofile\022\014\n\004name\030\001 \001(\t\022\034\n\024project_data_prof" + + "ile\030\002 \001(\t\022\032\n\022dataset_project_id\030\030 \001(\t\022\030\n" + + "\020dataset_location\030\035 \001(\t\022\022\n\ndataset_id\030\031 " + + "\001(\t\022\020\n\010table_id\030\032 \001(\t\022\025\n\rfull_resource\030\003" + + " \001(\t\022<\n\016profile_status\030\025 \001(\0132$.google.pr" + + "ivacy.dlp.v2.ProfileStatus\022<\n\005state\030\026 \001(" + + "\0162-.google.privacy.dlp.v2.TableDataProfi" + + "le.State\022B\n\021sensitivity_score\030\005 \001(\0132\'.go" + + "ogle.privacy.dlp.v2.SensitivityScore\022=\n\017" + + "data_risk_level\030\006 \001(\0132$.google.privacy.d" + + "lp.v2.DataRiskLevel\022D\n\024predicted_info_ty" + + "pes\030\033 \003(\0132&.google.privacy.dlp.v2.InfoTy" + + "peSummary\022E\n\020other_info_types\030\034 \003(\0132+.go" + + "ogle.privacy.dlp.v2.OtherInfoTypeSummary" + + "\022I\n\017config_snapshot\030\007 \001(\01320.google.priva" + + "cy.dlp.v2.DataProfileConfigSnapshot\0226\n\022l" + + "ast_modified_time\030\010 \001(\0132\032.google.protobu" + + "f.Timestamp\0223\n\017expiration_time\030\t \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022\034\n\024scanned_colu" + + "mn_count\030\n \001(\003\022\033\n\023failed_column_count\030\013 " + + "\001(\003\022\030\n\020table_size_bytes\030\014 \001(\003\022\021\n\trow_cou" + + "nt\030\r \001(\003\022B\n\021encryption_status\030\016 \001(\0162\'.go" + + "ogle.privacy.dlp.v2.EncryptionStatus\022F\n\023" + + "resource_visibility\030\017 \001(\0162).google.priva" + + "cy.dlp.v2.ResourceVisibility\022:\n\026profile_" + + "last_generated\030\020 \001(\0132\032.google.protobuf.T" + + "imestamp\022T\n\017resource_labels\030\021 \003(\0132;.goog" + + "le.privacy.dlp.v2.TableDataProfile.Resou" + + "rceLabelsEntry\022/\n\013create_time\030\027 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\0325\n\023ResourceLabel" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"5" + + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNIN" + + "G\020\001\022\010\n\004DONE\020\002\"b\n\rProfileStatus\022\"\n\006status" + + "\030\001 \001(\0132\022.google.rpc.Status\022-\n\ttimestamp\030" + + "\003 \001(\0132\032.google.protobuf.Timestamp\"c\n\017Inf" + + "oTypeSummary\0222\n\tinfo_type\030\001 \001(\0132\037.google" + + ".privacy.dlp.v2.InfoType\022\034\n\024estimated_pr" + + "evalence\030\002 \001(\005\"h\n\024OtherInfoTypeSummary\0222" + + "\n\tinfo_type\030\001 \001(\0132\037.google.privacy.dlp.v" + + "2.InfoType\022\034\n\024estimated_prevalence\030\002 \001(\005" + + "\"\352\005\n\032DataProfilePubSubCondition\022X\n\013expre" + + "ssions\030\001 \001(\0132C.google.privacy.dlp.v2.Dat" + + "aProfilePubSubCondition.PubSubExpression" + + "s\032\351\001\n\017PubSubCondition\022b\n\022minimum_risk_sc" + + "ore\030\001 \001(\0162D.google.privacy.dlp.v2.DataPr" + + "ofilePubSubCondition.ProfileScoreBucketH" + + "\000\022i\n\031minimum_sensitivity_score\030\002 \001(\0162D.g" + + "oogle.privacy.dlp.v2.DataProfilePubSubCo" + + "ndition.ProfileScoreBucketH\000B\007\n\005value\032\253\002" + + "\n\021PubSubExpressions\022s\n\020logical_operator\030" + + "\001 \001(\0162Y.google.privacy.dlp.v2.DataProfil" + + "ePubSubCondition.PubSubExpressions.PubSu" + + "bLogicalOperator\022U\n\nconditions\030\002 \003(\0132A.g" + + "oogle.privacy.dlp.v2.DataProfilePubSubCo" + + "ndition.PubSubCondition\"J\n\025PubSubLogical" + + "Operator\022 \n\034LOGICAL_OPERATOR_UNSPECIFIED" + + "\020\000\022\006\n\002OR\020\001\022\007\n\003AND\020\002\"X\n\022ProfileScoreBucke" + + "t\022$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\020\000\022" + + "\010\n\004HIGH\020\001\022\022\n\016MEDIUM_OR_HIGH\020\002\"\227\001\n\030DataPr" + + "ofilePubSubMessage\0228\n\007profile\030\001 \001(\0132\'.go" + + "ogle.privacy.dlp.v2.TableDataProfile\022A\n\005" + + "event\030\002 \001(\01622.google.privacy.dlp.v2.Data" + + "ProfileAction.EventType*\240\001\n\036Transformati" + + "onResultStatusType\022\032\n\026STATE_TYPE_UNSPECI" + + "FIED\020\000\022\025\n\021INVALID_TRANSFORM\020\001\022\"\n\036BIGQUER" + + "Y_MAX_ROW_SIZE_EXCEEDED\020\002\022\032\n\026METADATA_UN" + + "RETRIEVABLE\020\003\022\013\n\007SUCCESS\020\004*\177\n\033Transforma" + + "tionContainerType\022\037\n\033TRANSFORM_UNKNOWN_C" + + "ONTAINER\020\000\022\022\n\016TRANSFORM_BODY\020\001\022\026\n\022TRANSF" + + "ORM_METADATA\020\002\022\023\n\017TRANSFORM_TABLE\020\003*\340\002\n\022" + + "TransformationType\022#\n\037TRANSFORMATION_TYP" + + "E_UNSPECIFIED\020\000\022\026\n\022RECORD_SUPPRESSION\020\001\022" + + "\021\n\rREPLACE_VALUE\020\002\022\026\n\022REPLACE_DICTIONARY" + + "\020\017\022\n\n\006REDACT\020\003\022\022\n\016CHARACTER_MASK\020\004\022\032\n\026CR" + + "YPTO_REPLACE_FFX_FPE\020\005\022\030\n\024FIXED_SIZE_BUC" + + "KETING\020\006\022\r\n\tBUCKETING\020\007\022\032\n\026REPLACE_WITH_" + + "INFO_TYPE\020\010\022\r\n\tTIME_PART\020\t\022\017\n\013CRYPTO_HAS" + + "H\020\n\022\016\n\nDATE_SHIFT\020\014\022\037\n\033CRYPTO_DETERMINIS" + + "TIC_CONFIG\020\r\022\020\n\014REDACT_IMAGE\020\016*\273\001\n\022Relat" + + "ionalOperator\022#\n\037RELATIONAL_OPERATOR_UNS" + + "PECIFIED\020\000\022\014\n\010EQUAL_TO\020\001\022\020\n\014NOT_EQUAL_TO" + + "\020\002\022\020\n\014GREATER_THAN\020\003\022\r\n\tLESS_THAN\020\004\022\032\n\026G" + + "REATER_THAN_OR_EQUALS\020\005\022\027\n\023LESS_THAN_OR_" + + "EQUALS\020\006\022\n\n\006EXISTS\020\007*\215\001\n\014MatchingType\022\035\n" + + "\031MATCHING_TYPE_UNSPECIFIED\020\000\022\034\n\030MATCHING" + + "_TYPE_FULL_MATCH\020\001\022\037\n\033MATCHING_TYPE_PART" + + "IAL_MATCH\020\002\022\037\n\033MATCHING_TYPE_INVERSE_MAT" + + "CH\020\003*M\n\rContentOption\022\027\n\023CONTENT_UNSPECI" + + "FIED\020\000\022\020\n\014CONTENT_TEXT\020\001\022\021\n\rCONTENT_IMAG" + + "E\020\002*B\n\014MetadataType\022\034\n\030METADATATYPE_UNSP" + + "ECIFIED\020\000\022\024\n\020STORAGE_METADATA\020\002*P\n\023InfoT" + + "ypeSupportedBy\022\031\n\025ENUM_TYPE_UNSPECIFIED\020" + + "\000\022\013\n\007INSPECT\020\001\022\021\n\rRISK_ANALYSIS\020\002*R\n\nDlp" + + "JobType\022\034\n\030DLP_JOB_TYPE_UNSPECIFIED\020\000\022\017\n" + + "\013INSPECT_JOB\020\001\022\025\n\021RISK_ANALYSIS_JOB\020\002*n\n" + + "\023StoredInfoTypeState\022&\n\"STORED_INFO_TYPE" + + "_STATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\t\n\005REA" + + "DY\020\002\022\n\n\006FAILED\020\003\022\013\n\007INVALID\020\004*}\n\022Resourc" + + "eVisibility\022#\n\037RESOURCE_VISIBILITY_UNSPE" + + "CIFIED\020\000\022\036\n\032RESOURCE_VISIBILITY_PUBLIC\020\n" + + "\022\"\n\036RESOURCE_VISIBILITY_RESTRICTED\020\024*u\n\020" + + "EncryptionStatus\022!\n\035ENCRYPTION_STATUS_UN" + + "SPECIFIED\020\000\022\035\n\031ENCRYPTION_GOOGLE_MANAGED" + + "\020\001\022\037\n\033ENCRYPTION_CUSTOMER_MANAGED\020\0022\240L\n\n" + + "DlpService\022\333\001\n\016InspectContent\022,.google.p" + + "rivacy.dlp.v2.InspectContentRequest\032-.go" + + "ogle.privacy.dlp.v2.InspectContentRespon" + + "se\"l\202\323\344\223\002f\"\'/v2/{parent=projects/*}/cont" + + "ent:inspect:\001*Z8\"3/v2/{parent=projects/*" + + "/locations/*}/content:inspect:\001*\022\314\001\n\013Red" + + "actImage\022).google.privacy.dlp.v2.RedactI" + + "mageRequest\032*.google.privacy.dlp.v2.Reda" + + "ctImageResponse\"f\202\323\344\223\002`\"$/v2/{parent=pro" + + "jects/*}/image:redact:\001*Z5\"0/v2/{parent=" + + "projects/*/locations/*}/image:redact:\001*\022" + + "\352\001\n\021DeidentifyContent\022/.google.privacy.d" + + "lp.v2.DeidentifyContentRequest\0320.google." + + "privacy.dlp.v2.DeidentifyContentResponse" + + "\"r\202\323\344\223\002l\"*/v2/{parent=projects/*}/conten" + + "t:deidentify:\001*Z;\"6/v2/{parent=projects/" + + "*/locations/*}/content:deidentify:\001*\022\352\001\n" + + "\021ReidentifyContent\022/.google.privacy.dlp." + + "v2.ReidentifyContentRequest\0320.google.pri" + + "vacy.dlp.v2.ReidentifyContentResponse\"r\202" + + "\323\344\223\002l\"*/v2/{parent=projects/*}/content:r" + + "eidentify:\001*Z;\"6/v2/{parent=projects/*/l" + + "ocations/*}/content:reidentify:\001*\022\260\001\n\rLi" + + "stInfoTypes\022+.google.privacy.dlp.v2.List" + + "InfoTypesRequest\032,.google.privacy.dlp.v2" + + ".ListInfoTypesResponse\"D\202\323\344\223\0025\022\r/v2/info" + + "TypesZ$\022\"/v2/{parent=locations/*}/infoTy" + + "pes\332A\006parent\022\364\002\n\025CreateInspectTemplate\0223" + + ".google.privacy.dlp.v2.CreateInspectTemp" + + "lateRequest\032&.google.privacy.dlp.v2.Insp" + + "ectTemplate\"\375\001\202\323\344\223\002\334\001\"-/v2/{parent=organ" + + "izations/*}/inspectTemplates:\001*Z>\"9/v2/{" + + "parent=organizations/*/locations/*}/insp" + + "ectTemplates:\001*Z-\"(/v2/{parent=projects/" + + "*}/inspectTemplates:\001*Z9\"4/v2/{parent=pr" + + "ojects/*/locations/*}/inspectTemplates:\001" + + "*\332A\027parent,inspect_template\022\376\002\n\025UpdateIn" + + "spectTemplate\0223.google.privacy.dlp.v2.Up" + + "dateInspectTemplateRequest\032&.google.priv" + + "acy.dlp.v2.InspectTemplate\"\207\002\202\323\344\223\002\334\0012-/v" + + "2/{name=organizations/*/inspectTemplates" + + "/*}:\001*Z>29/v2/{name=organizations/*/loca" + + "tions/*/inspectTemplates/*}:\001*Z-2(/v2/{n" + + "ame=projects/*/inspectTemplates/*}:\001*Z92" + + "4/v2/{name=projects/*/locations/*/inspec" + + "tTemplates/*}:\001*\332A!name,inspect_template" + + ",update_mask\022\317\002\n\022GetInspectTemplate\0220.go" + + "ogle.privacy.dlp.v2.GetInspectTemplateRe" + + "quest\032&.google.privacy.dlp.v2.InspectTem" + + "plate\"\336\001\202\323\344\223\002\320\001\022-/v2/{name=organizations" + + "/*/inspectTemplates/*}Z;\0229/v2/{name=orga" + + "nizations/*/locations/*/inspectTemplates" + + "/*}Z*\022(/v2/{name=projects/*/inspectTempl" + + "ates/*}Z6\0224/v2/{name=projects/*/location" + + "s/*/inspectTemplates/*}\332A\004name\022\342\002\n\024ListI" + + "nspectTemplates\0222.google.privacy.dlp.v2." + + "ListInspectTemplatesRequest\0323.google.pri" + + "vacy.dlp.v2.ListInspectTemplatesResponse" + + "\"\340\001\202\323\344\223\002\320\001\022-/v2/{parent=organizations/*}" + + "/inspectTemplatesZ;\0229/v2/{parent=organiz" + + "ations/*/locations/*}/inspectTemplatesZ*" + + "\022(/v2/{parent=projects/*}/inspectTemplat" + + "esZ6\0224/v2/{parent=projects/*/locations/*" + + "}/inspectTemplates\332A\006parent\022\305\002\n\025DeleteIn" + + "spectTemplate\0223.google.privacy.dlp.v2.De" + + "leteInspectTemplateRequest\032\026.google.prot" + + "obuf.Empty\"\336\001\202\323\344\223\002\320\001*-/v2/{name=organiza" + + "tions/*/inspectTemplates/*}Z;*9/v2/{name" + + "=organizations/*/locations/*/inspectTemp" + + "lates/*}Z**(/v2/{name=projects/*/inspect" + + "Templates/*}Z6*4/v2/{name=projects/*/loc" + + "ations/*/inspectTemplates/*}\332A\004name\022\214\003\n\030" + + "CreateDeidentifyTemplate\0226.google.privac" + + "y.dlp.v2.CreateDeidentifyTemplateRequest" + + "\032).google.privacy.dlp.v2.DeidentifyTempl" + + "ate\"\214\002\202\323\344\223\002\350\001\"0/v2/{parent=organizations" + + "/*}/deidentifyTemplates:\001*ZA\"\022\022*\"9/v2/{name" + + "=projects/*/locations/*/dlpJobs/*}:hybri" + + "dInspect:\001*\332A\004name\022\221\001\n\014FinishDlpJob\022*.go" + + "ogle.privacy.dlp.v2.FinishDlpJobRequest\032" + + "\026.google.protobuf.Empty\"=\202\323\344\223\0027\"2/v2/{na" + + "me=projects/*/locations/*/dlpJobs/*}:fin" + + "ish:\001*\032F\312A\022dlp.googleapis.com\322A.https://" + + "www.googleapis.com/auth/cloud-platformB\372" + + "\002\n\031com.google.privacy.dlp.v2B\010DlpProtoP\001" + + "Z8google.golang.org/genproto/googleapis/" + + "privacy/dlp/v2;dlp\252\002\023Google.Cloud.Dlp.V2" + + "\312\002\023Google\\Cloud\\Dlp\\V2\352\002\026Google::Cloud::" + + "Dlp::V2\352Ar\n\035dlp.googleapis.com/DlpConten" + + "t\022\035projects/{project}/dlpContent\0222projec" + + "ts/{project}/locations/{location}/dlpCon" + + "tent\352A\\\n\'dlp.googleapis.com/Organization" + + "Location\0221organizations/{organization}/l" + + "ocations/{location}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -2440,7 +2565,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor, new java.lang.String[] { - "Name", "DisplayName", "SupportedBy", "Description", "Categories", + "Name", "DisplayName", "SupportedBy", "Description", "Versions", "Categories", }); internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor = getDescriptor().getMessageTypes().get(35); @@ -2450,8 +2575,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "LocationCategory", "IndustryCategory", "TypeCategory", "Category", }); - internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor = + internal_static_google_privacy_dlp_v2_VersionDescription_descriptor = getDescriptor().getMessageTypes().get(36); + internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_VersionDescription_descriptor, + new java.lang.String[] { + "Version", "Description", + }); + internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor = + getDescriptor().getMessageTypes().get(37); internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor, @@ -2459,7 +2592,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "LanguageCode", "Filter", "LocationId", }); internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(38); internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor, @@ -2467,7 +2600,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InfoTypes", }); internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(39); internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor, @@ -2475,7 +2608,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PrivacyMetric", "SourceTable", "Actions", }); internal_static_google_privacy_dlp_v2_QuasiId_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(40); internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_QuasiId_descriptor, @@ -2483,7 +2616,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Field", "InfoType", "CustomTag", "Inferred", "Tag", }); internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(41); internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor, @@ -2499,7 +2632,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Field", "CustomTag", }); internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(42); internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor, @@ -2591,7 +2724,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "QuasiIds", "RegionCode", "AuxiliaryTables", }); internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(43); internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor, @@ -2783,7 +2916,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "JobConfig", }); internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(44); internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor, @@ -2791,7 +2924,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Value", "Count", }); internal_static_google_privacy_dlp_v2_Value_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(45); internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Value_descriptor, @@ -2807,7 +2940,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Type", }); internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(46); internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor, @@ -2815,7 +2948,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DateTime", "ParsedQuote", }); internal_static_google_privacy_dlp_v2_DateTime_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(47); internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DateTime_descriptor, @@ -2831,18 +2964,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OffsetMinutes", }); internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(48); internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor, new java.lang.String[] { "InfoTypeTransformations", "RecordTransformations", + "ImageTransformations", "TransformationErrorHandling", "Transformation", }); + internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor, + new java.lang.String[] { + "Transforms", + }); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor = + internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor + .getNestedTypes() + .get(0); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor, + new java.lang.String[] { + "SelectedInfoTypes", "AllInfoTypes", "AllText", "RedactionColor", "Target", + }); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor = + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor + .getNestedTypes() + .get(0); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor, + new java.lang.String[] { + "InfoTypes", + }); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor = + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor + .getNestedTypes() + .get(1); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor, + new java.lang.String[] {}); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor = + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor + .getNestedTypes() + .get(2); + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor, + new java.lang.String[] {}); internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(50); internal_static_google_privacy_dlp_v2_TransformationErrorHandling_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor, @@ -2866,7 +3044,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor, new java.lang.String[] {}); internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageTypes().get(51); internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor, @@ -2886,7 +3064,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Transformation", }); internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(52); internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor, @@ -2894,7 +3072,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PartToExtract", }); internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor = - getDescriptor().getMessageTypes().get(51); + getDescriptor().getMessageTypes().get(53); internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor, @@ -2902,7 +3080,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CryptoKey", }); internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor = - getDescriptor().getMessageTypes().get(52); + getDescriptor().getMessageTypes().get(54); internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor, @@ -2910,7 +3088,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CryptoKey", "SurrogateInfoType", "Context", }); internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor = - getDescriptor().getMessageTypes().get(53); + getDescriptor().getMessageTypes().get(55); internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor, @@ -2918,7 +3096,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NewValue", }); internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor = - getDescriptor().getMessageTypes().get(54); + getDescriptor().getMessageTypes().get(56); internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor, @@ -2926,19 +3104,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WordList", "Type", }); internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor = - getDescriptor().getMessageTypes().get(55); + getDescriptor().getMessageTypes().get(57); internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor, new java.lang.String[] {}); internal_static_google_privacy_dlp_v2_RedactConfig_descriptor = - getDescriptor().getMessageTypes().get(56); + getDescriptor().getMessageTypes().get(58); internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RedactConfig_descriptor, new java.lang.String[] {}); internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor = - getDescriptor().getMessageTypes().get(57); + getDescriptor().getMessageTypes().get(59); internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor, @@ -2946,7 +3124,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CharactersToSkip", "CommonCharactersToIgnore", "Characters", }); internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor = - getDescriptor().getMessageTypes().get(58); + getDescriptor().getMessageTypes().get(60); internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor, @@ -2954,7 +3132,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MaskingCharacter", "NumberToMask", "ReverseOrder", "CharactersToIgnore", }); internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor = - getDescriptor().getMessageTypes().get(59); + getDescriptor().getMessageTypes().get(61); internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor, @@ -2962,7 +3140,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LowerBound", "UpperBound", "BucketSize", }); internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor = - getDescriptor().getMessageTypes().get(60); + getDescriptor().getMessageTypes().get(62); internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor, @@ -2978,7 +3156,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Min", "Max", "ReplacementValue", }); internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor = - getDescriptor().getMessageTypes().get(61); + getDescriptor().getMessageTypes().get(63); internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor, @@ -2992,7 +3170,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Alphabet", }); internal_static_google_privacy_dlp_v2_CryptoKey_descriptor = - getDescriptor().getMessageTypes().get(62); + getDescriptor().getMessageTypes().get(64); internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CryptoKey_descriptor, @@ -3000,7 +3178,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Transient", "Unwrapped", "KmsWrapped", "Source", }); internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor = - getDescriptor().getMessageTypes().get(63); + getDescriptor().getMessageTypes().get(65); internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor, @@ -3008,7 +3186,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor = - getDescriptor().getMessageTypes().get(64); + getDescriptor().getMessageTypes().get(66); internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor, @@ -3016,7 +3194,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", }); internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor = - getDescriptor().getMessageTypes().get(65); + getDescriptor().getMessageTypes().get(67); internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor, @@ -3024,7 +3202,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WrappedKey", "CryptoKeyName", }); internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor = - getDescriptor().getMessageTypes().get(66); + getDescriptor().getMessageTypes().get(68); internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor, @@ -3032,7 +3210,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpperBoundDays", "LowerBoundDays", "Context", "CryptoKey", "Method", }); internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor = - getDescriptor().getMessageTypes().get(67); + getDescriptor().getMessageTypes().get(69); internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor, @@ -3050,7 +3228,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InfoTypes", "PrimitiveTransformation", }); internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor = - getDescriptor().getMessageTypes().get(68); + getDescriptor().getMessageTypes().get(70); internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor, @@ -3062,7 +3240,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Transformation", }); internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor = - getDescriptor().getMessageTypes().get(69); + getDescriptor().getMessageTypes().get(71); internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor, @@ -3070,7 +3248,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FieldTransformations", "RecordSuppressions", }); internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor = - getDescriptor().getMessageTypes().get(70); + getDescriptor().getMessageTypes().get(72); internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor, @@ -3078,7 +3256,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Condition", }); internal_static_google_privacy_dlp_v2_RecordCondition_descriptor = - getDescriptor().getMessageTypes().get(71); + getDescriptor().getMessageTypes().get(73); internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RecordCondition_descriptor, @@ -3110,7 +3288,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LogicalOperator", "Conditions", "Type", }); internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor = - getDescriptor().getMessageTypes().get(72); + getDescriptor().getMessageTypes().get(74); internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor, @@ -3118,7 +3296,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TransformedBytes", "TransformationSummaries", }); internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor = - getDescriptor().getMessageTypes().get(73); + getDescriptor().getMessageTypes().get(75); internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor, @@ -3141,8 +3319,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Count", "Code", "Details", }); + internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor = + getDescriptor().getMessageTypes().get(76); + internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor, + new java.lang.String[] { + "Type", "Description", "Condition", "InfoType", + }); + internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor = + getDescriptor().getMessageTypes().get(77); + internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor, + new java.lang.String[] { + "ResourceName", + "ContainerName", + "Transformation", + "StatusDetails", + "TransformedBytes", + "TransformationLocation", + }); + internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor = + getDescriptor().getMessageTypes().get(78); + internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor, + new java.lang.String[] { + "FindingId", "RecordTransformation", "ContainerType", "LocationType", + }); + internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor = + getDescriptor().getMessageTypes().get(79); + internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor, + new java.lang.String[] { + "FieldId", "ContainerTimestamp", "ContainerVersion", + }); + internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor = + getDescriptor().getMessageTypes().get(80); + internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor, + new java.lang.String[] { + "ResultStatusType", "Details", + }); + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor = + getDescriptor().getMessageTypes().get(81); + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor, + new java.lang.String[] { + "Table", "Type", + }); internal_static_google_privacy_dlp_v2_Schedule_descriptor = - getDescriptor().getMessageTypes().get(74); + getDescriptor().getMessageTypes().get(82); internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Schedule_descriptor, @@ -3150,12 +3381,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RecurrencePeriodDuration", "Option", }); internal_static_google_privacy_dlp_v2_Manual_descriptor = - getDescriptor().getMessageTypes().get(75); + getDescriptor().getMessageTypes().get(83); internal_static_google_privacy_dlp_v2_Manual_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Manual_descriptor, new java.lang.String[] {}); internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor = - getDescriptor().getMessageTypes().get(76); + getDescriptor().getMessageTypes().get(84); internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor, @@ -3163,7 +3394,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", "InspectConfig", }); internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor = - getDescriptor().getMessageTypes().get(77); + getDescriptor().getMessageTypes().get(85); internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor, @@ -3171,7 +3402,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", "DeidentifyConfig", }); internal_static_google_privacy_dlp_v2_Error_descriptor = - getDescriptor().getMessageTypes().get(78); + getDescriptor().getMessageTypes().get(86); internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Error_descriptor, @@ -3179,7 +3410,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Details", "Timestamps", }); internal_static_google_privacy_dlp_v2_JobTrigger_descriptor = - getDescriptor().getMessageTypes().get(79); + getDescriptor().getMessageTypes().get(87); internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_JobTrigger_descriptor, @@ -3205,7 +3436,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Schedule", "Manual", "Trigger", }); internal_static_google_privacy_dlp_v2_Action_descriptor = - getDescriptor().getMessageTypes().get(80); + getDescriptor().getMessageTypes().get(88); internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Action_descriptor, @@ -3214,6 +3445,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PubSub", "PublishSummaryToCscc", "PublishFindingsToCloudDataCatalog", + "Deidentify", "JobNotificationEmails", "PublishToStackdriver", "Action", @@ -3246,20 +3478,40 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor, new java.lang.String[] {}); - internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor = + internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor = internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(4); + internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor, + new java.lang.String[] { + "TransformationConfig", + "TransformationDetailsStorageConfig", + "CloudStorageOutput", + "FileTypesToTransform", + "Output", + }); + internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor = + internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(5); internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor, new java.lang.String[] {}); internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor = - internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(5); + internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(6); internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor, new java.lang.String[] {}); + internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor = + getDescriptor().getMessageTypes().get(89); + internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor, + new java.lang.String[] { + "DeidentifyTemplate", "StructuredDeidentifyTemplate", "ImageRedactTemplate", + }); internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(81); + getDescriptor().getMessageTypes().get(90); internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor, @@ -3267,7 +3519,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "InspectTemplate", "TemplateId", "LocationId", }); internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(82); + getDescriptor().getMessageTypes().get(91); internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor, @@ -3275,7 +3527,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "InspectTemplate", "UpdateMask", }); internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(83); + getDescriptor().getMessageTypes().get(92); internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor, @@ -3283,7 +3535,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor = - getDescriptor().getMessageTypes().get(84); + getDescriptor().getMessageTypes().get(93); internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor, @@ -3291,7 +3543,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", "OrderBy", "LocationId", }); internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor = - getDescriptor().getMessageTypes().get(85); + getDescriptor().getMessageTypes().get(94); internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor, @@ -3299,7 +3551,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InspectTemplates", "NextPageToken", }); internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(86); + getDescriptor().getMessageTypes().get(95); internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor, @@ -3307,7 +3559,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(87); + getDescriptor().getMessageTypes().get(96); internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor, @@ -3315,7 +3567,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "JobTrigger", "TriggerId", "LocationId", }); internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(88); + getDescriptor().getMessageTypes().get(97); internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor, @@ -3323,7 +3575,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(89); + getDescriptor().getMessageTypes().get(98); internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor, @@ -3331,7 +3583,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "JobTrigger", "UpdateMask", }); internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(90); + getDescriptor().getMessageTypes().get(99); internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor, @@ -3339,7 +3591,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(91); + getDescriptor().getMessageTypes().get(100); internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor, @@ -3347,7 +3599,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "InspectJob", "RiskJob", "JobId", "LocationId", "Job", }); internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor = - getDescriptor().getMessageTypes().get(92); + getDescriptor().getMessageTypes().get(101); internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor, @@ -3355,7 +3607,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", "OrderBy", "Filter", "Type", "LocationId", }); internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor = - getDescriptor().getMessageTypes().get(93); + getDescriptor().getMessageTypes().get(102); internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor, @@ -3363,7 +3615,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "JobTriggers", "NextPageToken", }); internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(94); + getDescriptor().getMessageTypes().get(103); internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor, @@ -3371,7 +3623,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor = - getDescriptor().getMessageTypes().get(95); + getDescriptor().getMessageTypes().get(104); internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor, @@ -3379,7 +3631,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StorageConfig", "InspectConfig", "InspectTemplateName", "Actions", }); internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor = - getDescriptor().getMessageTypes().get(96); + getDescriptor().getMessageTypes().get(105); internal_static_google_privacy_dlp_v2_DataProfileAction_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor, @@ -3403,7 +3655,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topic", "Event", "PubsubCondition", "DetailOfMessage", }); internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor = - getDescriptor().getMessageTypes().get(97); + getDescriptor().getMessageTypes().get(106); internal_static_google_privacy_dlp_v2_DataProfileJobConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor, @@ -3411,7 +3663,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Location", "ProjectId", "InspectTemplates", "DataProfileActions", }); internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor = - getDescriptor().getMessageTypes().get(98); + getDescriptor().getMessageTypes().get(107); internal_static_google_privacy_dlp_v2_DataProfileLocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor, @@ -3419,7 +3671,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OrganizationId", "FolderId", "Location", }); internal_static_google_privacy_dlp_v2_DlpJob_descriptor = - getDescriptor().getMessageTypes().get(99); + getDescriptor().getMessageTypes().get(108); internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DlpJob_descriptor, @@ -3437,7 +3689,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Details", }); internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(100); + getDescriptor().getMessageTypes().get(109); internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor, @@ -3445,7 +3697,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor = - getDescriptor().getMessageTypes().get(101); + getDescriptor().getMessageTypes().get(110); internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor, @@ -3453,7 +3705,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "Type", "OrderBy", "LocationId", }); internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor = - getDescriptor().getMessageTypes().get(102); + getDescriptor().getMessageTypes().get(111); internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor, @@ -3461,7 +3713,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Jobs", "NextPageToken", }); internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(103); + getDescriptor().getMessageTypes().get(112); internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor, @@ -3469,7 +3721,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(104); + getDescriptor().getMessageTypes().get(113); internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor, @@ -3477,7 +3729,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(105); + getDescriptor().getMessageTypes().get(114); internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor, @@ -3485,7 +3737,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(106); + getDescriptor().getMessageTypes().get(115); internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor, @@ -3493,7 +3745,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "DeidentifyTemplate", "TemplateId", "LocationId", }); internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(107); + getDescriptor().getMessageTypes().get(116); internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor, @@ -3501,7 +3753,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "DeidentifyTemplate", "UpdateMask", }); internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(108); + getDescriptor().getMessageTypes().get(117); internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor, @@ -3509,7 +3761,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor = - getDescriptor().getMessageTypes().get(109); + getDescriptor().getMessageTypes().get(118); internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor, @@ -3517,7 +3769,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", "OrderBy", "LocationId", }); internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor = - getDescriptor().getMessageTypes().get(110); + getDescriptor().getMessageTypes().get(119); internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor, @@ -3525,7 +3777,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeidentifyTemplates", "NextPageToken", }); internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(111); + getDescriptor().getMessageTypes().get(120); internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor, @@ -3533,7 +3785,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor = - getDescriptor().getMessageTypes().get(112); + getDescriptor().getMessageTypes().get(121); internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor, @@ -3541,7 +3793,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OutputPath", "CloudStorageFileSet", "BigQueryField", "Source", }); internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor = - getDescriptor().getMessageTypes().get(113); + getDescriptor().getMessageTypes().get(122); internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor, @@ -3549,7 +3801,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ApproxNumPhrases", }); internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor = - getDescriptor().getMessageTypes().get(114); + getDescriptor().getMessageTypes().get(123); internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor, @@ -3557,7 +3809,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayName", "Description", "LargeCustomDictionary", "Dictionary", "Regex", "Type", }); internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor = - getDescriptor().getMessageTypes().get(115); + getDescriptor().getMessageTypes().get(124); internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor, @@ -3565,7 +3817,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LargeCustomDictionary", "Type", }); internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor = - getDescriptor().getMessageTypes().get(116); + getDescriptor().getMessageTypes().get(125); internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor, @@ -3573,7 +3825,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Config", "CreateTime", "State", "Errors", "Stats", }); internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor = - getDescriptor().getMessageTypes().get(117); + getDescriptor().getMessageTypes().get(126); internal_static_google_privacy_dlp_v2_StoredInfoType_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor, @@ -3581,7 +3833,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "CurrentVersion", "PendingVersions", }); internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(118); + getDescriptor().getMessageTypes().get(127); internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor, @@ -3589,7 +3841,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Config", "StoredInfoTypeId", "LocationId", }); internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(119); + getDescriptor().getMessageTypes().get(128); internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor, @@ -3597,7 +3849,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Config", "UpdateMask", }); internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(120); + getDescriptor().getMessageTypes().get(129); internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor, @@ -3605,7 +3857,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor = - getDescriptor().getMessageTypes().get(121); + getDescriptor().getMessageTypes().get(130); internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor, @@ -3613,7 +3865,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageToken", "PageSize", "OrderBy", "LocationId", }); internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor = - getDescriptor().getMessageTypes().get(122); + getDescriptor().getMessageTypes().get(131); internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor, @@ -3621,7 +3873,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StoredInfoTypes", "NextPageToken", }); internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(123); + getDescriptor().getMessageTypes().get(132); internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor, @@ -3629,7 +3881,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(124); + getDescriptor().getMessageTypes().get(133); internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor, @@ -3637,7 +3889,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "HybridItem", }); internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(125); + getDescriptor().getMessageTypes().get(134); internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor, @@ -3645,7 +3897,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "HybridItem", }); internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor = - getDescriptor().getMessageTypes().get(126); + getDescriptor().getMessageTypes().get(135); internal_static_google_privacy_dlp_v2_HybridContentItem_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor, @@ -3653,7 +3905,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Item", "FindingDetails", }); internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor = - getDescriptor().getMessageTypes().get(127); + getDescriptor().getMessageTypes().get(136); internal_static_google_privacy_dlp_v2_HybridFindingDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor, @@ -3671,21 +3923,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor = - getDescriptor().getMessageTypes().get(128); + getDescriptor().getMessageTypes().get(137); internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor, new java.lang.String[] {}); - internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor = - getDescriptor().getMessageTypes().get(129); - internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor, - new java.lang.String[] { - "Score", - }); internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor = - getDescriptor().getMessageTypes().get(130); + getDescriptor().getMessageTypes().get(138); internal_static_google_privacy_dlp_v2_DataRiskLevel_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor, @@ -3693,7 +3937,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Score", }); internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor = - getDescriptor().getMessageTypes().get(131); + getDescriptor().getMessageTypes().get(139); internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor, @@ -3701,7 +3945,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "InspectConfig", "DataProfileJob", }); internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor = - getDescriptor().getMessageTypes().get(132); + getDescriptor().getMessageTypes().get(140); internal_static_google_privacy_dlp_v2_TableDataProfile_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor, @@ -3741,7 +3985,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor = - getDescriptor().getMessageTypes().get(133); + getDescriptor().getMessageTypes().get(141); internal_static_google_privacy_dlp_v2_ProfileStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor, @@ -3749,23 +3993,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Status", "Timestamp", }); internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor = - getDescriptor().getMessageTypes().get(134); + getDescriptor().getMessageTypes().get(142); internal_static_google_privacy_dlp_v2_InfoTypeSummary_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor, new java.lang.String[] { - "InfoType", + "InfoType", "EstimatedPrevalence", }); internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor = - getDescriptor().getMessageTypes().get(135); + getDescriptor().getMessageTypes().get(143); internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor, new java.lang.String[] { - "InfoType", + "InfoType", "EstimatedPrevalence", }); internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor = - getDescriptor().getMessageTypes().get(136); + getDescriptor().getMessageTypes().get(144); internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor, @@ -3793,7 +4037,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LogicalOperator", "Conditions", }); internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor = - getDescriptor().getMessageTypes().get(137); + getDescriptor().getMessageTypes().get(145); internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor, diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java index 1240a04eb441..41e99f97ea2c 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java @@ -31,6 +31,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_privacy_dlp_v2_InfoType_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_InfoType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_StoredType_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -173,141 +177,148 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n#google/privacy/dlp/v2/storage.proto\022\025g" - + "oogle.privacy.dlp.v2\032\037google/protobuf/ti" - + "mestamp.proto\")\n\010InfoType\022\014\n\004name\030\001 \001(\t\022" - + "\017\n\007version\030\002 \001(\t\"K\n\nStoredType\022\014\n\004name\030\001" - + " \001(\t\022/\n\013create_time\030\002 \001(\0132\032.google.proto" - + "buf.Timestamp\"\310\013\n\016CustomInfoType\0222\n\tinfo" - + "_type\030\001 \001(\0132\037.google.privacy.dlp.v2.Info" - + "Type\0225\n\nlikelihood\030\006 \001(\0162!.google.privac" - + "y.dlp.v2.Likelihood\022F\n\ndictionary\030\002 \001(\0132" - + "0.google.privacy.dlp.v2.CustomInfoType.D" - + "ictionaryH\000\022<\n\005regex\030\003 \001(\0132+.google.priv" - + "acy.dlp.v2.CustomInfoType.RegexH\000\022M\n\016sur" - + "rogate_type\030\004 \001(\01323.google.privacy.dlp.v" - + "2.CustomInfoType.SurrogateTypeH\000\0228\n\013stor" - + "ed_type\030\005 \001(\0132!.google.privacy.dlp.v2.St" - + "oredTypeH\000\022L\n\017detection_rules\030\007 \003(\01323.go" - + "ogle.privacy.dlp.v2.CustomInfoType.Detec" - + "tionRule\022K\n\016exclusion_type\030\010 \001(\01623.googl" - + "e.privacy.dlp.v2.CustomInfoType.Exclusio" - + "nType\032\310\001\n\nDictionary\022N\n\tword_list\030\001 \001(\0132" - + "9.google.privacy.dlp.v2.CustomInfoType.D" - + "ictionary.WordListH\000\022E\n\022cloud_storage_pa" - + "th\030\003 \001(\0132\'.google.privacy.dlp.v2.CloudSt" - + "oragePathH\000\032\031\n\010WordList\022\r\n\005words\030\001 \003(\tB\010" - + "\n\006source\032/\n\005Regex\022\017\n\007pattern\030\001 \001(\t\022\025\n\rgr" - + "oup_indexes\030\002 \003(\005\032\017\n\rSurrogateType\032\276\004\n\rD" - + "etectionRule\022W\n\014hotword_rule\030\001 \001(\0132?.goo" - + "gle.privacy.dlp.v2.CustomInfoType.Detect" - + "ionRule.HotwordRuleH\000\0328\n\tProximity\022\025\n\rwi" - + "ndow_before\030\001 \001(\005\022\024\n\014window_after\030\002 \001(\005\032" - + "\202\001\n\024LikelihoodAdjustment\022=\n\020fixed_likeli" - + "hood\030\001 \001(\0162!.google.privacy.dlp.v2.Likel" - + "ihoodH\000\022\035\n\023relative_likelihood\030\002 \001(\005H\000B\014" - + "\n\nadjustment\032\214\002\n\013HotwordRule\022B\n\rhotword_" - + "regex\030\001 \001(\0132+.google.privacy.dlp.v2.Cust" - + "omInfoType.Regex\022P\n\tproximity\030\002 \001(\0132=.go" - + "ogle.privacy.dlp.v2.CustomInfoType.Detec" - + "tionRule.Proximity\022g\n\025likelihood_adjustm" - + "ent\030\003 \001(\0132H.google.privacy.dlp.v2.Custom" - + "InfoType.DetectionRule.LikelihoodAdjustm" - + "entB\006\n\004type\"K\n\rExclusionType\022\036\n\032EXCLUSIO" - + "N_TYPE_UNSPECIFIED\020\000\022\032\n\026EXCLUSION_TYPE_E" - + "XCLUDE\020\001B\006\n\004type\"\027\n\007FieldId\022\014\n\004name\030\001 \001(" - + "\t\"7\n\013PartitionId\022\022\n\nproject_id\030\002 \001(\t\022\024\n\014" - + "namespace_id\030\004 \001(\t\"\036\n\016KindExpression\022\014\n\004" - + "name\030\001 \001(\t\"\201\001\n\020DatastoreOptions\0228\n\014parti" - + "tion_id\030\001 \001(\0132\".google.privacy.dlp.v2.Pa" - + "rtitionId\0223\n\004kind\030\002 \001(\0132%.google.privacy" - + ".dlp.v2.KindExpression\"]\n\030CloudStorageRe" - + "gexFileSet\022\023\n\013bucket_name\030\001 \001(\t\022\025\n\rinclu" - + "de_regex\030\002 \003(\t\022\025\n\rexclude_regex\030\003 \003(\t\"\354\003" - + "\n\023CloudStorageOptions\022D\n\010file_set\030\001 \001(\0132" - + "2.google.privacy.dlp.v2.CloudStorageOpti" - + "ons.FileSet\022\034\n\024bytes_limit_per_file\030\004 \001(" - + "\003\022$\n\034bytes_limit_per_file_percent\030\010 \001(\005\022" - + "3\n\nfile_types\030\005 \003(\0162\037.google.privacy.dlp" - + ".v2.FileType\022N\n\rsample_method\030\006 \001(\01627.go" - + "ogle.privacy.dlp.v2.CloudStorageOptions." - + "SampleMethod\022\033\n\023files_limit_percent\030\007 \001(" - + "\005\032_\n\007FileSet\022\013\n\003url\030\001 \001(\t\022G\n\016regex_file_" - + "set\030\002 \001(\0132/.google.privacy.dlp.v2.CloudS" - + "torageRegexFileSet\"H\n\014SampleMethod\022\035\n\031SA" - + "MPLE_METHOD_UNSPECIFIED\020\000\022\007\n\003TOP\020\001\022\020\n\014RA" - + "NDOM_START\020\002\"\"\n\023CloudStorageFileSet\022\013\n\003u" - + "rl\030\001 \001(\t\" \n\020CloudStoragePath\022\014\n\004path\030\001 \001" - + "(\t\"\304\003\n\017BigQueryOptions\022=\n\017table_referenc" - + "e\030\001 \001(\0132$.google.privacy.dlp.v2.BigQuery" - + "Table\022:\n\022identifying_fields\030\002 \003(\0132\036.goog" - + "le.privacy.dlp.v2.FieldId\022\022\n\nrows_limit\030" - + "\003 \001(\003\022\032\n\022rows_limit_percent\030\006 \001(\005\022J\n\rsam" - + "ple_method\030\004 \001(\01623.google.privacy.dlp.v2" - + ".BigQueryOptions.SampleMethod\0227\n\017exclude" - + "d_fields\030\005 \003(\0132\036.google.privacy.dlp.v2.F" - + "ieldId\0227\n\017included_fields\030\007 \003(\0132\036.google" - + ".privacy.dlp.v2.FieldId\"H\n\014SampleMethod\022" - + "\035\n\031SAMPLE_METHOD_UNSPECIFIED\020\000\022\007\n\003TOP\020\001\022" - + "\020\n\014RANDOM_START\020\002\"\332\004\n\rStorageConfig\022D\n\021d" - + "atastore_options\030\002 \001(\0132\'.google.privacy." - + "dlp.v2.DatastoreOptionsH\000\022K\n\025cloud_stora" - + "ge_options\030\003 \001(\0132*.google.privacy.dlp.v2" - + ".CloudStorageOptionsH\000\022C\n\021big_query_opti" - + "ons\030\004 \001(\0132&.google.privacy.dlp.v2.BigQue" - + "ryOptionsH\000\022>\n\016hybrid_options\030\t \001(\0132$.go" - + "ogle.privacy.dlp.v2.HybridOptionsH\000\022L\n\017t" - + "imespan_config\030\006 \001(\01323.google.privacy.dl" - + "p.v2.StorageConfig.TimespanConfig\032\332\001\n\016Ti" - + "mespanConfig\022.\n\nstart_time\030\001 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032" - + ".google.protobuf.Timestamp\0227\n\017timestamp_" - + "field\030\003 \001(\0132\036.google.privacy.dlp.v2.Fiel" - + "dId\0221\n)enable_auto_population_of_timespa" - + "n_config\030\004 \001(\010B\006\n\004type\"\366\001\n\rHybridOptions" - + "\022\023\n\013description\030\001 \001(\t\022#\n\033required_findin" - + "g_label_keys\030\002 \003(\t\022@\n\006labels\030\003 \003(\01320.goo" - + "gle.privacy.dlp.v2.HybridOptions.LabelsE" - + "ntry\022:\n\rtable_options\030\004 \001(\0132#.google.pri" - + "vacy.dlp.v2.TableOptions\032-\n\013LabelsEntry\022" - + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"`\n\013BigQu" - + "eryKey\022=\n\017table_reference\030\001 \001(\0132$.google" - + ".privacy.dlp.v2.BigQueryTable\022\022\n\nrow_num" - + "ber\030\002 \001(\003\">\n\014DatastoreKey\022.\n\nentity_key\030" - + "\001 \001(\0132\032.google.privacy.dlp.v2.Key\"\273\001\n\003Ke" - + "y\0228\n\014partition_id\030\001 \001(\0132\".google.privacy" - + ".dlp.v2.PartitionId\0224\n\004path\030\002 \003(\0132&.goog" - + "le.privacy.dlp.v2.Key.PathElement\032D\n\013Pat" - + "hElement\022\014\n\004kind\030\001 \001(\t\022\014\n\002id\030\002 \001(\003H\000\022\016\n\004" - + "name\030\003 \001(\tH\000B\t\n\007id_type\"\241\001\n\tRecordKey\022<\n" - + "\rdatastore_key\030\002 \001(\0132#.google.privacy.dl" - + "p.v2.DatastoreKeyH\000\022;\n\rbig_query_key\030\003 \001" - + "(\0132\".google.privacy.dlp.v2.BigQueryKeyH\000" - + "\022\021\n\tid_values\030\005 \003(\tB\006\n\004type\"I\n\rBigQueryT" - + "able\022\022\n\nproject_id\030\001 \001(\t\022\022\n\ndataset_id\030\002" - + " \001(\t\022\020\n\010table_id\030\003 \001(\t\"s\n\rBigQueryField\022" - + "3\n\005table\030\001 \001(\0132$.google.privacy.dlp.v2.B" - + "igQueryTable\022-\n\005field\030\002 \001(\0132\036.google.pri" - + "vacy.dlp.v2.FieldId\"9\n\010EntityId\022-\n\005field" - + "\030\001 \001(\0132\036.google.privacy.dlp.v2.FieldId\"J" - + "\n\014TableOptions\022:\n\022identifying_fields\030\001 \003" - + "(\0132\036.google.privacy.dlp.v2.FieldId*t\n\nLi" - + "kelihood\022\032\n\026LIKELIHOOD_UNSPECIFIED\020\000\022\021\n\r" - + "VERY_UNLIKELY\020\001\022\014\n\010UNLIKELY\020\002\022\014\n\010POSSIBL" - + "E\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_LIKELY\020\005*\232\001\n\010Fil" - + "eType\022\031\n\025FILE_TYPE_UNSPECIFIED\020\000\022\017\n\013BINA" - + "RY_FILE\020\001\022\r\n\tTEXT_FILE\020\002\022\t\n\005IMAGE\020\003\022\010\n\004W" - + "ORD\020\005\022\007\n\003PDF\020\006\022\010\n\004AVRO\020\007\022\007\n\003CSV\020\010\022\007\n\003TSV" - + "\020\t\022\016\n\nPOWERPOINT\020\013\022\t\n\005EXCEL\020\014B\250\001\n\031com.go" - + "ogle.privacy.dlp.v2B\nDlpStorageP\001Z8googl" - + "e.golang.org/genproto/googleapis/privacy" - + "/dlp/v2;dlp\252\002\023Google.Cloud.Dlp.V2\312\002\023Goog" - + "le\\Cloud\\Dlp\\V2\352\002\026Google::Cloud::Dlp::V2" - + "b\006proto3" + + "oogle.privacy.dlp.v2\032\031google/api/resourc" + + "e.proto\032\037google/protobuf/timestamp.proto" + + "\")\n\010InfoType\022\014\n\004name\030\001 \001(\t\022\017\n\007version\030\002 " + + "\001(\t\"\341\001\n\020SensitivityScore\022L\n\005score\030\001 \001(\0162" + + "=.google.privacy.dlp.v2.SensitivityScore" + + ".SensitivityScoreLevel\"\177\n\025SensitivitySco" + + "reLevel\022!\n\035SENSITIVITY_SCORE_UNSPECIFIED" + + "\020\000\022\023\n\017SENSITIVITY_LOW\020\n\022\030\n\024SENSITIVITY_M" + + "ODERATE\020\024\022\024\n\020SENSITIVITY_HIGH\020\036\"K\n\nStore" + + "dType\022\014\n\004name\030\001 \001(\t\022/\n\013create_time\030\002 \001(\013" + + "2\032.google.protobuf.Timestamp\"\310\013\n\016CustomI" + + "nfoType\0222\n\tinfo_type\030\001 \001(\0132\037.google.priv" + + "acy.dlp.v2.InfoType\0225\n\nlikelihood\030\006 \001(\0162" + + "!.google.privacy.dlp.v2.Likelihood\022F\n\ndi" + + "ctionary\030\002 \001(\01320.google.privacy.dlp.v2.C" + + "ustomInfoType.DictionaryH\000\022<\n\005regex\030\003 \001(" + + "\0132+.google.privacy.dlp.v2.CustomInfoType" + + ".RegexH\000\022M\n\016surrogate_type\030\004 \001(\01323.googl" + + "e.privacy.dlp.v2.CustomInfoType.Surrogat" + + "eTypeH\000\0228\n\013stored_type\030\005 \001(\0132!.google.pr" + + "ivacy.dlp.v2.StoredTypeH\000\022L\n\017detection_r" + + "ules\030\007 \003(\01323.google.privacy.dlp.v2.Custo" + + "mInfoType.DetectionRule\022K\n\016exclusion_typ" + + "e\030\010 \001(\01623.google.privacy.dlp.v2.CustomIn" + + "foType.ExclusionType\032\310\001\n\nDictionary\022N\n\tw" + + "ord_list\030\001 \001(\01329.google.privacy.dlp.v2.C" + + "ustomInfoType.Dictionary.WordListH\000\022E\n\022c" + + "loud_storage_path\030\003 \001(\0132\'.google.privacy" + + ".dlp.v2.CloudStoragePathH\000\032\031\n\010WordList\022\r" + + "\n\005words\030\001 \003(\tB\010\n\006source\032/\n\005Regex\022\017\n\007patt" + + "ern\030\001 \001(\t\022\025\n\rgroup_indexes\030\002 \003(\005\032\017\n\rSurr" + + "ogateType\032\276\004\n\rDetectionRule\022W\n\014hotword_r" + + "ule\030\001 \001(\0132?.google.privacy.dlp.v2.Custom" + + "InfoType.DetectionRule.HotwordRuleH\000\0328\n\t" + + "Proximity\022\025\n\rwindow_before\030\001 \001(\005\022\024\n\014wind" + + "ow_after\030\002 \001(\005\032\202\001\n\024LikelihoodAdjustment\022" + + "=\n\020fixed_likelihood\030\001 \001(\0162!.google.priva" + + "cy.dlp.v2.LikelihoodH\000\022\035\n\023relative_likel" + + "ihood\030\002 \001(\005H\000B\014\n\nadjustment\032\214\002\n\013HotwordR" + + "ule\022B\n\rhotword_regex\030\001 \001(\0132+.google.priv" + + "acy.dlp.v2.CustomInfoType.Regex\022P\n\tproxi" + + "mity\030\002 \001(\0132=.google.privacy.dlp.v2.Custo" + + "mInfoType.DetectionRule.Proximity\022g\n\025lik" + + "elihood_adjustment\030\003 \001(\0132H.google.privac" + + "y.dlp.v2.CustomInfoType.DetectionRule.Li" + + "kelihoodAdjustmentB\006\n\004type\"K\n\rExclusionT" + + "ype\022\036\n\032EXCLUSION_TYPE_UNSPECIFIED\020\000\022\032\n\026E" + + "XCLUSION_TYPE_EXCLUDE\020\001B\006\n\004type\"\027\n\007Field" + + "Id\022\014\n\004name\030\001 \001(\t\"7\n\013PartitionId\022\022\n\nproje" + + "ct_id\030\002 \001(\t\022\024\n\014namespace_id\030\004 \001(\t\"\036\n\016Kin" + + "dExpression\022\014\n\004name\030\001 \001(\t\"\201\001\n\020DatastoreO" + + "ptions\0228\n\014partition_id\030\001 \001(\0132\".google.pr" + + "ivacy.dlp.v2.PartitionId\0223\n\004kind\030\002 \001(\0132%" + + ".google.privacy.dlp.v2.KindExpression\"]\n" + + "\030CloudStorageRegexFileSet\022\023\n\013bucket_name" + + "\030\001 \001(\t\022\025\n\rinclude_regex\030\002 \003(\t\022\025\n\rexclude" + + "_regex\030\003 \003(\t\"\354\003\n\023CloudStorageOptions\022D\n\010" + + "file_set\030\001 \001(\01322.google.privacy.dlp.v2.C" + + "loudStorageOptions.FileSet\022\034\n\024bytes_limi" + + "t_per_file\030\004 \001(\003\022$\n\034bytes_limit_per_file" + + "_percent\030\010 \001(\005\0223\n\nfile_types\030\005 \003(\0162\037.goo" + + "gle.privacy.dlp.v2.FileType\022N\n\rsample_me" + + "thod\030\006 \001(\01627.google.privacy.dlp.v2.Cloud" + + "StorageOptions.SampleMethod\022\033\n\023files_lim" + + "it_percent\030\007 \001(\005\032_\n\007FileSet\022\013\n\003url\030\001 \001(\t" + + "\022G\n\016regex_file_set\030\002 \001(\0132/.google.privac" + + "y.dlp.v2.CloudStorageRegexFileSet\"H\n\014Sam" + + "pleMethod\022\035\n\031SAMPLE_METHOD_UNSPECIFIED\020\000" + + "\022\007\n\003TOP\020\001\022\020\n\014RANDOM_START\020\002\"\"\n\023CloudStor" + + "ageFileSet\022\013\n\003url\030\001 \001(\t\" \n\020CloudStorageP" + + "ath\022\014\n\004path\030\001 \001(\t\"\304\003\n\017BigQueryOptions\022=\n" + + "\017table_reference\030\001 \001(\0132$.google.privacy." + + "dlp.v2.BigQueryTable\022:\n\022identifying_fiel" + + "ds\030\002 \003(\0132\036.google.privacy.dlp.v2.FieldId" + + "\022\022\n\nrows_limit\030\003 \001(\003\022\032\n\022rows_limit_perce" + + "nt\030\006 \001(\005\022J\n\rsample_method\030\004 \001(\01623.google" + + ".privacy.dlp.v2.BigQueryOptions.SampleMe" + + "thod\0227\n\017excluded_fields\030\005 \003(\0132\036.google.p" + + "rivacy.dlp.v2.FieldId\0227\n\017included_fields" + + "\030\007 \003(\0132\036.google.privacy.dlp.v2.FieldId\"H" + + "\n\014SampleMethod\022\035\n\031SAMPLE_METHOD_UNSPECIF" + + "IED\020\000\022\007\n\003TOP\020\001\022\020\n\014RANDOM_START\020\002\"\332\004\n\rSto" + + "rageConfig\022D\n\021datastore_options\030\002 \001(\0132\'." + + "google.privacy.dlp.v2.DatastoreOptionsH\000" + + "\022K\n\025cloud_storage_options\030\003 \001(\0132*.google" + + ".privacy.dlp.v2.CloudStorageOptionsH\000\022C\n" + + "\021big_query_options\030\004 \001(\0132&.google.privac" + + "y.dlp.v2.BigQueryOptionsH\000\022>\n\016hybrid_opt" + + "ions\030\t \001(\0132$.google.privacy.dlp.v2.Hybri" + + "dOptionsH\000\022L\n\017timespan_config\030\006 \001(\01323.go" + + "ogle.privacy.dlp.v2.StorageConfig.Timesp" + + "anConfig\032\332\001\n\016TimespanConfig\022.\n\nstart_tim" + + "e\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n\010e" + + "nd_time\030\002 \001(\0132\032.google.protobuf.Timestam" + + "p\0227\n\017timestamp_field\030\003 \001(\0132\036.google.priv" + + "acy.dlp.v2.FieldId\0221\n)enable_auto_popula" + + "tion_of_timespan_config\030\004 \001(\010B\006\n\004type\"\366\001" + + "\n\rHybridOptions\022\023\n\013description\030\001 \001(\t\022#\n\033" + + "required_finding_label_keys\030\002 \003(\t\022@\n\006lab" + + "els\030\003 \003(\01320.google.privacy.dlp.v2.Hybrid" + + "Options.LabelsEntry\022:\n\rtable_options\030\004 \001" + + "(\0132#.google.privacy.dlp.v2.TableOptions\032" + + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\"`\n\013BigQueryKey\022=\n\017table_reference" + + "\030\001 \001(\0132$.google.privacy.dlp.v2.BigQueryT" + + "able\022\022\n\nrow_number\030\002 \001(\003\">\n\014DatastoreKey" + + "\022.\n\nentity_key\030\001 \001(\0132\032.google.privacy.dl" + + "p.v2.Key\"\273\001\n\003Key\0228\n\014partition_id\030\001 \001(\0132\"" + + ".google.privacy.dlp.v2.PartitionId\0224\n\004pa" + + "th\030\002 \003(\0132&.google.privacy.dlp.v2.Key.Pat" + + "hElement\032D\n\013PathElement\022\014\n\004kind\030\001 \001(\t\022\014\n" + + "\002id\030\002 \001(\003H\000\022\016\n\004name\030\003 \001(\tH\000B\t\n\007id_type\"\241" + + "\001\n\tRecordKey\022<\n\rdatastore_key\030\002 \001(\0132#.go" + + "ogle.privacy.dlp.v2.DatastoreKeyH\000\022;\n\rbi" + + "g_query_key\030\003 \001(\0132\".google.privacy.dlp.v" + + "2.BigQueryKeyH\000\022\021\n\tid_values\030\005 \003(\tB\006\n\004ty" + + "pe\"I\n\rBigQueryTable\022\022\n\nproject_id\030\001 \001(\t\022" + + "\022\n\ndataset_id\030\002 \001(\t\022\020\n\010table_id\030\003 \001(\t\"s\n" + + "\rBigQueryField\0223\n\005table\030\001 \001(\0132$.google.p" + + "rivacy.dlp.v2.BigQueryTable\022-\n\005field\030\002 \001" + + "(\0132\036.google.privacy.dlp.v2.FieldId\"9\n\010En" + + "tityId\022-\n\005field\030\001 \001(\0132\036.google.privacy.d" + + "lp.v2.FieldId\"J\n\014TableOptions\022:\n\022identif" + + "ying_fields\030\001 \003(\0132\036.google.privacy.dlp.v" + + "2.FieldId*t\n\nLikelihood\022\032\n\026LIKELIHOOD_UN" + + "SPECIFIED\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKE" + + "LY\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_L" + + "IKELY\020\005*\232\001\n\010FileType\022\031\n\025FILE_TYPE_UNSPEC" + + "IFIED\020\000\022\017\n\013BINARY_FILE\020\001\022\r\n\tTEXT_FILE\020\002\022" + + "\t\n\005IMAGE\020\003\022\010\n\004WORD\020\005\022\007\n\003PDF\020\006\022\010\n\004AVRO\020\007\022" + + "\007\n\003CSV\020\010\022\007\n\003TSV\020\t\022\016\n\nPOWERPOINT\020\013\022\t\n\005EXC" + + "EL\020\014B\250\001\n\031com.google.privacy.dlp.v2B\nDlpS" + + "torageP\001Z8google.golang.org/genproto/goo" + + "gleapis/privacy/dlp/v2;dlp\252\002\023Google.Clou" + + "d.Dlp.V2\312\002\023Google\\Cloud\\Dlp\\V2\352\002\026Google:" + + ":Cloud::Dlp::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_privacy_dlp_v2_InfoType_descriptor = @@ -318,8 +329,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Version", }); - internal_static_google_privacy_dlp_v2_StoredType_descriptor = + internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor, + new java.lang.String[] { + "Score", + }); + internal_static_google_privacy_dlp_v2_StoredType_descriptor = + getDescriptor().getMessageTypes().get(2); internal_static_google_privacy_dlp_v2_StoredType_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_StoredType_descriptor, @@ -327,7 +346,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "CreateTime", }); internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor, @@ -413,7 +432,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "HotwordRegex", "Proximity", "LikelihoodAdjustment", }); internal_static_google_privacy_dlp_v2_FieldId_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_google_privacy_dlp_v2_FieldId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_FieldId_descriptor, @@ -421,7 +440,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_PartitionId_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_privacy_dlp_v2_PartitionId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_PartitionId_descriptor, @@ -429,7 +448,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "NamespaceId", }); internal_static_google_privacy_dlp_v2_KindExpression_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_privacy_dlp_v2_KindExpression_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_KindExpression_descriptor, @@ -437,7 +456,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_privacy_dlp_v2_DatastoreOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor, @@ -445,7 +464,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PartitionId", "Kind", }); internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor, @@ -453,7 +472,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BucketName", "IncludeRegex", "ExcludeRegex", }); internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor, @@ -476,7 +495,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Url", "RegexFileSet", }); internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_google_privacy_dlp_v2_CloudStorageFileSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor, @@ -484,7 +503,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Url", }); internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor, @@ -492,7 +511,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Path", }); internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(12); internal_static_google_privacy_dlp_v2_BigQueryOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor, @@ -506,7 +525,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IncludedFields", }); internal_static_google_privacy_dlp_v2_StorageConfig_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(13); internal_static_google_privacy_dlp_v2_StorageConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_StorageConfig_descriptor, @@ -527,7 +546,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartTime", "EndTime", "TimestampField", "EnableAutoPopulationOfTimespanConfig", }); internal_static_google_privacy_dlp_v2_HybridOptions_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(14); internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_HybridOptions_descriptor, @@ -543,7 +562,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_privacy_dlp_v2_BigQueryKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor, @@ -551,7 +570,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TableReference", "RowNumber", }); internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_privacy_dlp_v2_DatastoreKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor, @@ -559,7 +578,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EntityKey", }); internal_static_google_privacy_dlp_v2_Key_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_privacy_dlp_v2_Key_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Key_descriptor, @@ -575,7 +594,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Kind", "Id", "Name", "IdType", }); internal_static_google_privacy_dlp_v2_RecordKey_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_privacy_dlp_v2_RecordKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RecordKey_descriptor, @@ -583,7 +602,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DatastoreKey", "BigQueryKey", "IdValues", "Type", }); internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_privacy_dlp_v2_BigQueryTable_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor, @@ -591,7 +610,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectId", "DatasetId", "TableId", }); internal_static_google_privacy_dlp_v2_BigQueryField_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_privacy_dlp_v2_BigQueryField_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_BigQueryField_descriptor, @@ -599,7 +618,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Table", "Field", }); internal_static_google_privacy_dlp_v2_EntityId_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_privacy_dlp_v2_EntityId_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_EntityId_descriptor, @@ -607,13 +626,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Field", }); internal_static_google_privacy_dlp_v2_TableOptions_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_privacy_dlp_v2_TableOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TableOptions_descriptor, new java.lang.String[] { "IdentifyingFields", }); + com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java index afc71279d824..5590e7f09c05 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java @@ -151,7 +151,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(8); + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(11); } private static final EncryptionStatus[] VALUES = values(); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java index b71101c0aa85..195548e8c968 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java @@ -22,7 +22,7 @@ * * *
- * List of exclude infoTypes.
+ * List of excluded infoTypes.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.ExcludeInfoTypes} @@ -390,7 +390,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * List of exclude infoTypes.
+   * List of excluded infoTypes.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.ExcludeInfoTypes} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java similarity index 60% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java index 7843de5642d7..1dd743a524c0 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformations.java @@ -1,40 +1,57 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; /** + * + * *
  * A type of transformation that is applied over images.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations} */ -public final class ImageTransformations extends - com.google.protobuf.GeneratedMessageV3 implements +public final class ImageTransformations extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations) ImageTransformationsOrBuilder { -private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use ImageTransformations.newBuilder() to construct. private ImageTransformations(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } + private ImageTransformations() { transforms_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ImageTransformations(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private ImageTransformations( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -54,22 +71,27 @@ private ImageTransformations( case 0: done = true; break; - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - transforms_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + transforms_ = + new java.util.ArrayList< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation>(); + mutable_bitField0_ |= 0x00000001; + } + transforms_.add( + input.readMessage( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.parser(), + extensionRegistry)); + break; } - transforms_.add( - input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -77,8 +99,7 @@ private ImageTransformations( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { transforms_ = java.util.Collections.unmodifiableList(transforms_); @@ -87,134 +108,190 @@ private ImageTransformations( makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.class, com.google.privacy.dlp.v2.ImageTransformations.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.class, + com.google.privacy.dlp.v2.ImageTransformations.Builder.class); } - public interface ImageTransformationOrBuilder extends + public interface ImageTransformationOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations.ImageTransformation) com.google.protobuf.MessageOrBuilder { /** + * + * *
      * Apply transformation to the selected info_types.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * * @return Whether the selectedInfoTypes field is set. */ boolean hasSelectedInfoTypes(); /** + * + * *
      * Apply transformation to the selected info_types.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * * @return The selectedInfoTypes. */ - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getSelectedInfoTypes(); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + getSelectedInfoTypes(); /** + * + * *
      * Apply transformation to the selected info_types.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * */ - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder getSelectedInfoTypesOrBuilder(); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder + getSelectedInfoTypesOrBuilder(); /** + * + * *
      * Apply transformation to all findings not specified in other
      * ImageTransformation's selected_info_types. Only one instance is allowed
      * within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * * @return Whether the allInfoTypes field is set. */ boolean hasAllInfoTypes(); /** + * + * *
      * Apply transformation to all findings not specified in other
      * ImageTransformation's selected_info_types. Only one instance is allowed
      * within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * * @return The allInfoTypes. */ - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getAllInfoTypes(); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + getAllInfoTypes(); /** + * + * *
      * Apply transformation to all findings not specified in other
      * ImageTransformation's selected_info_types. Only one instance is allowed
      * within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * */ - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder getAllInfoTypesOrBuilder(); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder + getAllInfoTypesOrBuilder(); /** + * + * *
      * Apply transformation to all text that doesn't match an infoType. Only
      * one instance is allowed within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * + * * @return Whether the allText field is set. */ boolean hasAllText(); /** + * + * *
      * Apply transformation to all text that doesn't match an infoType. Only
      * one instance is allowed within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * + * * @return The allText. */ com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getAllText(); /** + * + * *
      * Apply transformation to all text that doesn't match an infoType. Only
      * one instance is allowed within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * */ - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder getAllTextOrBuilder(); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder + getAllTextOrBuilder(); /** + * + * *
      * The color to use when redacting content from an image. If not
      * specified, the default is black.
      * 
* * .google.privacy.dlp.v2.Color redaction_color = 3; + * * @return Whether the redactionColor field is set. */ boolean hasRedactionColor(); /** + * + * *
      * The color to use when redacting content from an image. If not
      * specified, the default is black.
      * 
* * .google.privacy.dlp.v2.Color redaction_color = 3; + * * @return The redactionColor. */ com.google.privacy.dlp.v2.Color getRedactionColor(); /** + * + * *
      * The color to use when redacting content from an image. If not
      * specified, the default is black.
@@ -224,39 +301,41 @@ public interface ImageTransformationOrBuilder extends
      */
     com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder();
 
-    public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.TargetCase getTargetCase();
+    public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.TargetCase
+        getTargetCase();
   }
   /**
+   *
+   *
    * 
    * Configuration for determining how redaction of images should occur.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation} */ - public static final class ImageTransformation extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class ImageTransformation extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation) ImageTransformationOrBuilder { - private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use ImageTransformation.newBuilder() to construct. private ImageTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ImageTransformation() { - } + + private ImageTransformation() {} @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ImageTransformation(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private ImageTransformation( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -275,68 +354,106 @@ private ImageTransformation( case 0: done = true; break; - case 26: { - com.google.privacy.dlp.v2.Color.Builder subBuilder = null; - if (redactionColor_ != null) { - subBuilder = redactionColor_.toBuilder(); - } - redactionColor_ = input.readMessage(com.google.privacy.dlp.v2.Color.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(redactionColor_); - redactionColor_ = subBuilder.buildPartial(); - } + case 26: + { + com.google.privacy.dlp.v2.Color.Builder subBuilder = null; + if (redactionColor_ != null) { + subBuilder = redactionColor_.toBuilder(); + } + redactionColor_ = + input.readMessage(com.google.privacy.dlp.v2.Color.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(redactionColor_); + redactionColor_ = subBuilder.buildPartial(); + } - break; - } - case 34: { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder subBuilder = null; - if (targetCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_).toBuilder(); - } - target_ = - input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_); - target_ = subBuilder.buildPartial(); - } - targetCase_ = 4; - break; - } - case 42: { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder subBuilder = null; - if (targetCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_).toBuilder(); + break; } - target_ = - input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_); - target_ = subBuilder.buildPartial(); + case 34: + { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .Builder + subBuilder = null; + if (targetCase_ == 4) { + subBuilder = + ((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + target_) + .toBuilder(); + } + target_ = + input.readMessage( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + target_); + target_ = subBuilder.buildPartial(); + } + targetCase_ = 4; + break; } - targetCase_ = 5; - break; - } - case 50: { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder subBuilder = null; - if (targetCase_ == 6) { - subBuilder = ((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_).toBuilder(); + case 42: + { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .Builder + subBuilder = null; + if (targetCase_ == 5) { + subBuilder = + ((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllInfoTypes) + target_) + .toBuilder(); + } + target_ = + input.readMessage( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllInfoTypes.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllInfoTypes) + target_); + target_ = subBuilder.buildPartial(); + } + targetCase_ = 5; + break; } - target_ = - input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_); - target_ = subBuilder.buildPartial(); + case 50: + { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder + subBuilder = null; + if (targetCase_ == 6) { + subBuilder = + ((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + target_) + .toBuilder(); + } + target_ = + input.readMessage( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + target_); + target_ = subBuilder.buildPartial(); + } + targetCase_ = 6; + break; } - targetCase_ = 6; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -344,111 +461,135 @@ private ImageTransformation( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.class, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder.class); } - public interface SelectedInfoTypesOrBuilder extends + public interface SelectedInfoTypesOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) com.google.protobuf.MessageOrBuilder { /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - java.util.List - getInfoTypesList(); + java.util.List getInfoTypesList(); /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ int getInfoTypesCount(); /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - java.util.List + java.util.List getInfoTypesOrBuilderList(); /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index); + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder(int index); } /** + * + * *
      * Apply transformation to the selected info_types.
      * 
* - * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} + * Protobuf type {@code + * google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} */ - public static final class SelectedInfoTypes extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class SelectedInfoTypes extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) SelectedInfoTypesOrBuilder { - private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use SelectedInfoTypes.newBuilder() to construct. private SelectedInfoTypes(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } + private SelectedInfoTypes() { infoTypes_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SelectedInfoTypes(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private SelectedInfoTypes( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -468,22 +609,24 @@ private SelectedInfoTypes( case 0: done = true; break; - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + infoTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + infoTypes_.add( + input.readMessage( + com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); + break; } - infoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -491,8 +634,8 @@ private SelectedInfoTypes( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); @@ -501,85 +644,110 @@ private SelectedInfoTypes( makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .class, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .Builder.class); } public static final int INFO_TYPES_FIELD_NUMBER = 5; private java.util.List infoTypes_; /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ @java.lang.Override public java.util.List getInfoTypesList() { return infoTypes_; } /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ @java.lang.Override - public java.util.List + public java.util.List getInfoTypesOrBuilderList() { return infoTypes_; } /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ @java.lang.Override public int getInfoTypesCount() { return infoTypes_.size(); } /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ @java.lang.Override public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { return infoTypes_.get(index); } /** + * + * *
        * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
        * must be unique within the ImageTransformations message.
        * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder(int index) { return infoTypes_.get(index); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -591,8 +759,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < infoTypes_.size(); i++) { output.writeMessage(5, infoTypes_.get(i)); } @@ -606,8 +773,7 @@ public int getSerializedSize() { size = 0; for (int i = 0; i < infoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, infoTypes_.get(i)); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, infoTypes_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -617,15 +783,18 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes)) { + if (!(obj + instanceof + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes)) { return super.equals(obj); } - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes other = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) obj; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes other = + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) + obj; - if (!getInfoTypesList() - .equals(other.getInfoTypesList())) return false; + if (!getInfoTypesList().equals(other.getInfoTypesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -646,88 +815,116 @@ public int hashCode() { return hash; } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes prototype) { + + public static Builder newBuilder( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -737,45 +934,55 @@ protected Builder newBuilderForType( return builder; } /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} + * Protobuf type {@code + * google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.class, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.Builder.class); } - // Construct using com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.newBuilder() + // Construct using + // com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getInfoTypesFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); @@ -789,19 +996,23 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.getDefaultInstance(); } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes build() { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes result = buildPartial(); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + build() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -809,8 +1020,12 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Select } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes buildPartial() { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes result = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes(this); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + buildPartial() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + result = + new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes(this); int from_bitField0_ = bitField0_; if (infoTypesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -829,46 +1044,59 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Select public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) { - return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes)other); + if (other + instanceof + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) { + return mergeFrom( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes other) { - if (other == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance()) return this; + public Builder mergeFrom( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + other) { + if (other + == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.getDefaultInstance()) return this; if (infoTypesBuilder_ == null) { if (!other.infoTypes_.isEmpty()) { if (infoTypes_.isEmpty()) { @@ -887,9 +1115,10 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations.ImageTra infoTypesBuilder_ = null; infoTypes_ = other.infoTypes_; bitField0_ = (bitField0_ & ~0x00000001); - infoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInfoTypesFieldBuilder() : null; + infoTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInfoTypesFieldBuilder() + : null; } else { infoTypesBuilder_.addAllMessages(other.infoTypes_); } @@ -910,11 +1139,15 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes parsedMessage = null; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) e.getUnfinishedMessage(); + parsedMessage = + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -923,27 +1156,36 @@ public Builder mergeFrom( } return this; } + private int bitField0_; private java.util.List infoTypes_ = - java.util.Collections.emptyList(); + java.util.Collections.emptyList(); + private void ensureInfoTypesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { infoTypes_ = new java.util.ArrayList(infoTypes_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; + com.google.privacy.dlp.v2.InfoType, + com.google.privacy.dlp.v2.InfoType.Builder, + com.google.privacy.dlp.v2.InfoTypeOrBuilder> + infoTypesBuilder_; /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.List getInfoTypesList() { if (infoTypesBuilder_ == null) { @@ -953,12 +1195,16 @@ public java.util.List getInfoTypesList() { } } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public int getInfoTypesCount() { if (infoTypesBuilder_ == null) { @@ -968,12 +1214,16 @@ public int getInfoTypesCount() { } } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { if (infoTypesBuilder_ == null) { @@ -983,15 +1233,18 @@ public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { } } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { + public Builder setInfoTypes(int index, com.google.privacy.dlp.v2.InfoType value) { if (infoTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1005,12 +1258,16 @@ public Builder setInfoTypes( return this; } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setInfoTypes( int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { @@ -1024,12 +1281,16 @@ public Builder setInfoTypes( return this; } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { if (infoTypesBuilder_ == null) { @@ -1045,15 +1306,18 @@ public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { return this; } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { + public Builder addInfoTypes(int index, com.google.privacy.dlp.v2.InfoType value) { if (infoTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1067,15 +1331,18 @@ public Builder addInfoTypes( return this; } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - public Builder addInfoTypes( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { if (infoTypesBuilder_ == null) { ensureInfoTypesIsMutable(); infoTypes_.add(builderForValue.build()); @@ -1086,12 +1353,16 @@ public Builder addInfoTypes( return this; } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addInfoTypes( int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { @@ -1105,19 +1376,22 @@ public Builder addInfoTypes( return this; } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addAllInfoTypes( java.lang.Iterable values) { if (infoTypesBuilder_ == null) { ensureInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, infoTypes_); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, infoTypes_); onChanged(); } else { infoTypesBuilder_.addAllMessages(values); @@ -1125,12 +1399,16 @@ public Builder addAllInfoTypes( return this; } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearInfoTypes() { if (infoTypesBuilder_ == null) { @@ -1143,12 +1421,16 @@ public Builder clearInfoTypes() { return this; } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder removeInfoTypes(int index) { if (infoTypesBuilder_ == null) { @@ -1161,42 +1443,53 @@ public Builder removeInfoTypes(int index) { return this; } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( - int index) { + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder(int index) { return getInfoTypesFieldBuilder().getBuilder(index); } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder(int index) { if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); } else { + return infoTypes_.get(index); + } else { return infoTypesBuilder_.getMessageOrBuilder(index); } } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - public java.util.List - getInfoTypesOrBuilderList() { + public java.util.List + getInfoTypesOrBuilderList() { if (infoTypesBuilder_ != null) { return infoTypesBuilder_.getMessageOrBuilderList(); } else { @@ -1204,48 +1497,65 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( } } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { - return getInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + return getInfoTypesFieldBuilder() + .addBuilder(com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); + public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder(int index) { + return getInfoTypesFieldBuilder() + .addBuilder(index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); } /** + * + * *
          * Required. InfoTypes to apply the transformation to. Required. Provided InfoType
          * must be unique within the ImageTransformations message.
          * 
* - * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * repeated .google.privacy.dlp.v2.InfoType info_types = 5 [(.google.api.field_behavior) = REQUIRED]; + * */ - public java.util.List - getInfoTypesBuilderList() { + public java.util.List + getInfoTypesBuilderList() { return getInfoTypesFieldBuilder().getBuilderList(); } + private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + com.google.privacy.dlp.v2.InfoType, + com.google.privacy.dlp.v2.InfoType.Builder, + com.google.privacy.dlp.v2.InfoTypeOrBuilder> getInfoTypesFieldBuilder() { if (infoTypesBuilder_ == null) { - infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + infoTypesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, + com.google.privacy.dlp.v2.InfoType.Builder, + com.google.privacy.dlp.v2.InfoTypeOrBuilder>( infoTypes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -1254,6 +1564,7 @@ public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( } return infoTypesBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1266,30 +1577,36 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) - private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes DEFAULT_INSTANCE; + private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + DEFAULT_INSTANCE; + static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes(); + DEFAULT_INSTANCE = + new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes(); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getDefaultInstance() { + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SelectedInfoTypes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SelectedInfoTypes(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SelectedInfoTypes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SelectedInfoTypes(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1301,47 +1618,49 @@ public com.google.protobuf.Parser getParserForType() { } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getDefaultInstanceForType() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - public interface AllInfoTypesOrBuilder extends + public interface AllInfoTypesOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) - com.google.protobuf.MessageOrBuilder { - } + com.google.protobuf.MessageOrBuilder {} /** + * + * *
      * Apply transformation to all findings.
      * 
* - * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} + * Protobuf type {@code + * google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} */ - public static final class AllInfoTypes extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class AllInfoTypes extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) AllInfoTypesOrBuilder { - private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use AllInfoTypes.newBuilder() to construct. private AllInfoTypes(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AllInfoTypes() { - } + + private AllInfoTypes() {} @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new AllInfoTypes(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private AllInfoTypes( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1360,13 +1679,13 @@ private AllInfoTypes( case 0: done = true; break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -1374,27 +1693,33 @@ private AllInfoTypes( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .class, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .Builder.class); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1406,8 +1731,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { unknownFields.writeTo(output); } @@ -1425,12 +1749,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes)) { + if (!(obj + instanceof + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes)) { return super.equals(obj); } - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes other = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) obj; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes other = + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) obj; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -1448,88 +1775,104 @@ public int hashCode() { return hash; } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes prototype) { + + public static Builder newBuilder( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -1539,44 +1882,52 @@ protected Builder newBuilderForType( return builder; } /** + * + * *
        * Apply transformation to all findings.
        * 
* - * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} + * Protobuf type {@code + * google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .class, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .Builder.class); } - // Construct using com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.newBuilder() + // Construct using + // com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -1584,19 +1935,23 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .getDefaultInstance(); } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes build() { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes result = buildPartial(); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + build() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1604,8 +1959,11 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInf } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes buildPartial() { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes result = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes(this); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + buildPartial() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes result = + new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes( + this); onBuilt(); return result; } @@ -1614,46 +1972,56 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInf public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) { - return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes)other); + if (other + instanceof + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) { + return mergeFrom( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes other) { - if (other == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance()) return this; + public Builder mergeFrom( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes other) { + if (other + == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .getDefaultInstance()) return this; this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1669,11 +2037,14 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes parsedMessage = null; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) e.getUnfinishedMessage(); + parsedMessage = + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -1682,6 +2053,7 @@ public Builder mergeFrom( } return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1694,30 +2066,34 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) - private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes DEFAULT_INSTANCE; + private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllInfoTypes + DEFAULT_INSTANCE; + static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes(); + DEFAULT_INSTANCE = + new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes(); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getDefaultInstance() { + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AllInfoTypes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AllInfoTypes(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllInfoTypes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllInfoTypes(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1729,47 +2105,48 @@ public com.google.protobuf.Parser getParserForType() { } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getDefaultInstanceForType() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - public interface AllTextOrBuilder extends + public interface AllTextOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) - com.google.protobuf.MessageOrBuilder { - } + com.google.protobuf.MessageOrBuilder {} /** + * + * *
      * Apply to all text.
      * 
* * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} */ - public static final class AllText extends - com.google.protobuf.GeneratedMessageV3 implements + public static final class AllText extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) AllTextOrBuilder { - private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use AllText.newBuilder() to construct. private AllText(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private AllText() { - } + + private AllText() {} @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new AllText(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private AllText( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1788,13 +2165,13 @@ private AllText( case 0: done = true; break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -1802,27 +2179,32 @@ private AllText( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.class, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder + .class); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -1834,8 +2216,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { unknownFields.writeTo(output); } @@ -1853,12 +2234,15 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText)) { + if (!(obj + instanceof + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText)) { return super.equals(obj); } - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText other = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) obj; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText other = + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) obj; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -1876,88 +2260,103 @@ public int hashCode() { return hash; } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText prototype) { + + public static Builder newBuilder( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override @@ -1967,44 +2366,51 @@ protected Builder newBuilderForType( return builder; } /** + * + * *
        * Apply to all text.
        * 
* - * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} + * Protobuf type {@code + * google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.class, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder + .class); } - // Construct using com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.newBuilder() + // Construct using + // com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -2012,19 +2418,22 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .getDefaultInstance(); } @java.lang.Override public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText build() { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText result = buildPartial(); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -2032,8 +2441,10 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTex } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText buildPartial() { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText result = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText(this); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + buildPartial() { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText result = + new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText(this); onBuilt(); return result; } @@ -2042,46 +2453,55 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTex public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) { - return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText)other); + if (other + instanceof + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) { + return mergeFrom( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText other) { - if (other == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance()) return this; + public Builder mergeFrom( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText other) { + if (other + == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .getDefaultInstance()) return this; this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2097,11 +2517,14 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parsedMessage = null; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) e.getUnfinishedMessage(); + parsedMessage = + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -2110,6 +2533,7 @@ public Builder mergeFrom( } return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2122,30 +2546,34 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) - private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText DEFAULT_INSTANCE; + private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllText + DEFAULT_INSTANCE; + static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText(); + DEFAULT_INSTANCE = + new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText(); } - public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getDefaultInstance() { + public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AllText parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AllText(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllText parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllText(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -2157,22 +2585,25 @@ public com.google.protobuf.Parser getParserForType() { } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getDefaultInstanceForType() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } private int targetCase_ = 0; private java.lang.Object target_; + public enum TargetCase - implements com.google.protobuf.Internal.EnumLite, + implements + com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { SELECTED_INFO_TYPES(4), ALL_INFO_TYPES(5), ALL_TEXT(6), TARGET_NOT_SET(0); private final int value; + private TargetCase(int value) { this.value = value; } @@ -2188,31 +2619,40 @@ public static TargetCase valueOf(int value) { public static TargetCase forNumber(int value) { switch (value) { - case 4: return SELECTED_INFO_TYPES; - case 5: return ALL_INFO_TYPES; - case 6: return ALL_TEXT; - case 0: return TARGET_NOT_SET; - default: return null; + case 4: + return SELECTED_INFO_TYPES; + case 5: + return ALL_INFO_TYPES; + case 6: + return ALL_TEXT; + case 0: + return TARGET_NOT_SET; + default: + return null; } } + public int getNumber() { return this.value; } }; - public TargetCase - getTargetCase() { - return TargetCase.forNumber( - targetCase_); + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); } public static final int SELECTED_INFO_TYPES_FIELD_NUMBER = 4; /** + * + * *
      * Apply transformation to the selected info_types.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * * @return Whether the selectedInfoTypes field is set. */ @java.lang.Override @@ -2220,44 +2660,67 @@ public boolean hasSelectedInfoTypes() { return targetCase_ == 4; } /** + * + * *
      * Apply transformation to the selected info_types.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * * @return The selectedInfoTypes. */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getSelectedInfoTypes() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + getSelectedInfoTypes() { if (targetCase_ == 4) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .getDefaultInstance(); } /** + * + * *
      * Apply transformation to the selected info_types.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder getSelectedInfoTypesOrBuilder() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypesOrBuilder + getSelectedInfoTypesOrBuilder() { if (targetCase_ == 4) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .getDefaultInstance(); } public static final int ALL_INFO_TYPES_FIELD_NUMBER = 5; /** + * + * *
      * Apply transformation to all findings not specified in other
      * ImageTransformation's selected_info_types. Only one instance is allowed
      * within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * * @return Whether the allInfoTypes field is set. */ @java.lang.Override @@ -2265,47 +2728,66 @@ public boolean hasAllInfoTypes() { return targetCase_ == 5; } /** + * + * *
      * Apply transformation to all findings not specified in other
      * ImageTransformation's selected_info_types. Only one instance is allowed
      * within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * * @return The allInfoTypes. */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getAllInfoTypes() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + getAllInfoTypes() { if (targetCase_ == 5) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .getDefaultInstance(); } /** + * + * *
      * Apply transformation to all findings not specified in other
      * ImageTransformation's selected_info_types. Only one instance is allowed
      * within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder getAllInfoTypesOrBuilder() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder + getAllInfoTypesOrBuilder() { if (targetCase_ == 5) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .getDefaultInstance(); } public static final int ALL_TEXT_FIELD_NUMBER = 6; /** + * + * *
      * Apply transformation to all text that doesn't match an infoType. Only
      * one instance is allowed within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * + * * @return Whether the allText field is set. */ @java.lang.Override @@ -2313,46 +2795,59 @@ public boolean hasAllText() { return targetCase_ == 6; } /** + * + * *
      * Apply transformation to all text that doesn't match an infoType. Only
      * one instance is allowed within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * + * * @return The allText. */ @java.lang.Override public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getAllText() { if (targetCase_ == 6) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .getDefaultInstance(); } /** + * + * *
      * Apply transformation to all text that doesn't match an infoType. Only
      * one instance is allowed within the ImageTransformations message.
      * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder getAllTextOrBuilder() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder + getAllTextOrBuilder() { if (targetCase_ == 6) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .getDefaultInstance(); } public static final int REDACTION_COLOR_FIELD_NUMBER = 3; private com.google.privacy.dlp.v2.Color redactionColor_; /** + * + * *
      * The color to use when redacting content from an image. If not
      * specified, the default is black.
      * 
* * .google.privacy.dlp.v2.Color redaction_color = 3; + * * @return Whether the redactionColor field is set. */ @java.lang.Override @@ -2360,19 +2855,26 @@ public boolean hasRedactionColor() { return redactionColor_ != null; } /** + * + * *
      * The color to use when redacting content from an image. If not
      * specified, the default is black.
      * 
* * .google.privacy.dlp.v2.Color redaction_color = 3; + * * @return The redactionColor. */ @java.lang.Override public com.google.privacy.dlp.v2.Color getRedactionColor() { - return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; + return redactionColor_ == null + ? com.google.privacy.dlp.v2.Color.getDefaultInstance() + : redactionColor_; } /** + * + * *
      * The color to use when redacting content from an image. If not
      * specified, the default is black.
@@ -2386,6 +2888,7 @@ public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() {
     }
 
     private byte memoizedIsInitialized = -1;
+
     @java.lang.Override
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
@@ -2397,19 +2900,26 @@ public final boolean isInitialized() {
     }
 
     @java.lang.Override
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
+    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
       if (redactionColor_ != null) {
         output.writeMessage(3, getRedactionColor());
       }
       if (targetCase_ == 4) {
-        output.writeMessage(4, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_);
+        output.writeMessage(
+            4,
+            (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes)
+                target_);
       }
       if (targetCase_ == 5) {
-        output.writeMessage(5, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_);
+        output.writeMessage(
+            5,
+            (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes)
+                target_);
       }
       if (targetCase_ == 6) {
-        output.writeMessage(6, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_);
+        output.writeMessage(
+            6,
+            (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_);
       }
       unknownFields.writeTo(output);
     }
@@ -2421,20 +2931,29 @@ public int getSerializedSize() {
 
       size = 0;
       if (redactionColor_ != null) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeMessageSize(3, getRedactionColor());
+        size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRedactionColor());
       }
       if (targetCase_ == 4) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeMessageSize(4, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_);
+        size +=
+            com.google.protobuf.CodedOutputStream.computeMessageSize(
+                4,
+                (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+                        .SelectedInfoTypes)
+                    target_);
       }
       if (targetCase_ == 5) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeMessageSize(5, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_);
+        size +=
+            com.google.protobuf.CodedOutputStream.computeMessageSize(
+                5,
+                (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes)
+                    target_);
       }
       if (targetCase_ == 6) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeMessageSize(6, (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_);
+        size +=
+            com.google.protobuf.CodedOutputStream.computeMessageSize(
+                6,
+                (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText)
+                    target_);
       }
       size += unknownFields.getSerializedSize();
       memoizedSize = size;
@@ -2444,31 +2963,28 @@ public int getSerializedSize() {
     @java.lang.Override
     public boolean equals(final java.lang.Object obj) {
       if (obj == this) {
-       return true;
+        return true;
       }
       if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation)) {
         return super.equals(obj);
       }
-      com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation other = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) obj;
+      com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation other =
+          (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) obj;
 
       if (hasRedactionColor() != other.hasRedactionColor()) return false;
       if (hasRedactionColor()) {
-        if (!getRedactionColor()
-            .equals(other.getRedactionColor())) return false;
+        if (!getRedactionColor().equals(other.getRedactionColor())) return false;
       }
       if (!getTargetCase().equals(other.getTargetCase())) return false;
       switch (targetCase_) {
         case 4:
-          if (!getSelectedInfoTypes()
-              .equals(other.getSelectedInfoTypes())) return false;
+          if (!getSelectedInfoTypes().equals(other.getSelectedInfoTypes())) return false;
           break;
         case 5:
-          if (!getAllInfoTypes()
-              .equals(other.getAllInfoTypes())) return false;
+          if (!getAllInfoTypes().equals(other.getAllInfoTypes())) return false;
           break;
         case 6:
-          if (!getAllText()
-              .equals(other.getAllText())) return false;
+          if (!getAllText().equals(other.getAllText())) return false;
           break;
         case 0:
         default:
@@ -2510,87 +3026,95 @@ public int hashCode() {
     }
 
     public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
-        java.nio.ByteBuffer data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
+
     public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
-        java.nio.ByteBuffer data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
+
     public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
+
     public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
+
+    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
+        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
+
     public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
+
+    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
+        java.io.InputStream input) throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
     }
+
     public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+          PARSER, input, extensionRegistry);
     }
-    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
+
+    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
     }
-    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+
+    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+        parseDelimitedFrom(
+            java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+          PARSER, input, extensionRegistry);
     }
+
     public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
+        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
     }
+
     public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
+      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+          PARSER, input, extensionRegistry);
     }
 
     @java.lang.Override
-    public Builder newBuilderForType() { return newBuilder(); }
+    public Builder newBuilderForType() {
+      return newBuilder();
+    }
+
     public static Builder newBuilder() {
       return DEFAULT_INSTANCE.toBuilder();
     }
-    public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation prototype) {
+
+    public static Builder newBuilder(
+        com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation prototype) {
       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
     }
+
     @java.lang.Override
     public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
+      return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
     }
 
     @java.lang.Override
@@ -2600,44 +3124,49 @@ protected Builder newBuilderForType(
       return builder;
     }
     /**
+     *
+     *
      * 
      * Configuration for determining how redaction of images should occur.
      * 
* * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations.ImageTransformation} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations.ImageTransformation) com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.class, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.class, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder.class); } - // Construct using com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.newBuilder() + // Construct using + // com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -2653,14 +3182,16 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; } @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.getDefaultInstance(); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .getDefaultInstance(); } @java.lang.Override @@ -2674,7 +3205,8 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation build( @java.lang.Override public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation buildPartial() { - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation result = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation(this); + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation result = + new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation(this); if (targetCase_ == 4) { if (selectedInfoTypesBuilder_ == null) { result.target_ = target_; @@ -2710,65 +3242,76 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation buildP public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) { - return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation)other); + return mergeFrom( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation other) { - if (other == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.getDefaultInstance()) return this; + public Builder mergeFrom( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation other) { + if (other + == com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .getDefaultInstance()) return this; if (other.hasRedactionColor()) { mergeRedactionColor(other.getRedactionColor()); } switch (other.getTargetCase()) { - case SELECTED_INFO_TYPES: { - mergeSelectedInfoTypes(other.getSelectedInfoTypes()); - break; - } - case ALL_INFO_TYPES: { - mergeAllInfoTypes(other.getAllInfoTypes()); - break; - } - case ALL_TEXT: { - mergeAllText(other.getAllText()); - break; - } - case TARGET_NOT_SET: { - break; - } + case SELECTED_INFO_TYPES: + { + mergeSelectedInfoTypes(other.getSelectedInfoTypes()); + break; + } + case ALL_INFO_TYPES: + { + mergeAllInfoTypes(other.getAllInfoTypes()); + break; + } + case ALL_TEXT: + { + mergeAllText(other.getAllText()); + break; + } + case TARGET_NOT_SET: + { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -2789,7 +3332,9 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) e.getUnfinishedMessage(); + parsedMessage = + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -2798,12 +3343,12 @@ public Builder mergeFrom( } return this; } + private int targetCase_ = 0; private java.lang.Object target_; - public TargetCase - getTargetCase() { - return TargetCase.forNumber( - targetCase_); + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); } public Builder clearTarget() { @@ -2813,15 +3358,24 @@ public Builder clearTarget() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder> selectedInfoTypesBuilder_; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypesOrBuilder> + selectedInfoTypesBuilder_; /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * * @return Whether the selectedInfoTypes field is set. */ @java.lang.Override @@ -2829,35 +3383,51 @@ public boolean hasSelectedInfoTypes() { return targetCase_ == 4; } /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * * @return The selectedInfoTypes. */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes getSelectedInfoTypes() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + getSelectedInfoTypes() { if (selectedInfoTypesBuilder_ == null) { if (targetCase_ == 4) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.getDefaultInstance(); } else { if (targetCase_ == 4) { return selectedInfoTypesBuilder_.getMessage(); } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.getDefaultInstance(); } } /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * */ - public Builder setSelectedInfoTypes(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes value) { + public Builder setSelectedInfoTypes( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + value) { if (selectedInfoTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2871,14 +3441,20 @@ public Builder setSelectedInfoTypes(com.google.privacy.dlp.v2.ImageTransformatio return this; } /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * */ public Builder setSelectedInfoTypes( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder builderForValue) { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .Builder + builderForValue) { if (selectedInfoTypesBuilder_ == null) { target_ = builderForValue.build(); onChanged(); @@ -2889,18 +3465,32 @@ public Builder setSelectedInfoTypes( return this; } /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * */ - public Builder mergeSelectedInfoTypes(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes value) { + public Builder mergeSelectedInfoTypes( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + value) { if (selectedInfoTypesBuilder_ == null) { - if (targetCase_ == 4 && - target_ != com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance()) { - target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.newBuilder((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_) - .mergeFrom(value).buildPartial(); + if (targetCase_ == 4 + && target_ + != com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.getDefaultInstance()) { + target_ = + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .newBuilder( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + target_) + .mergeFrom(value) + .buildPartial(); } else { target_ = value; } @@ -2916,11 +3506,15 @@ public Builder mergeSelectedInfoTypes(com.google.privacy.dlp.v2.ImageTransformat return this; } /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * */ public Builder clearSelectedInfoTypes() { if (selectedInfoTypesBuilder_ == null) { @@ -2939,69 +3533,113 @@ public Builder clearSelectedInfoTypes() { return this; } /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * */ - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder getSelectedInfoTypesBuilder() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .Builder + getSelectedInfoTypesBuilder() { return getSelectedInfoTypesFieldBuilder().getBuilder(); } /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder getSelectedInfoTypesOrBuilder() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypesOrBuilder + getSelectedInfoTypesOrBuilder() { if ((targetCase_ == 4) && (selectedInfoTypesBuilder_ != null)) { return selectedInfoTypesBuilder_.getMessageOrBuilder(); } else { if (targetCase_ == 4) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.getDefaultInstance(); } } /** + * + * *
        * Apply transformation to the selected info_types.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes selected_info_types = 4; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder> + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypesOrBuilder> getSelectedInfoTypesFieldBuilder() { if (selectedInfoTypesBuilder_ == null) { if (!(targetCase_ == 4)) { - target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.getDefaultInstance(); + target_ = + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + .getDefaultInstance(); } - selectedInfoTypesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypesOrBuilder>( - (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) target_, + selectedInfoTypesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes.Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypesOrBuilder>( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .SelectedInfoTypes) + target_, getParentForChildren(), isClean()); target_ = null; } targetCase_ = 4; - onChanged();; + onChanged(); + ; return selectedInfoTypesBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder> allInfoTypesBuilder_; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllInfoTypesOrBuilder> + allInfoTypesBuilder_; /** + * + * *
        * Apply transformation to all findings not specified in other
        * ImageTransformation's selected_info_types. Only one instance is allowed
        * within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * * @return Whether the allInfoTypes field is set. */ @java.lang.Override @@ -3009,39 +3647,53 @@ public boolean hasAllInfoTypes() { return targetCase_ == 5; } /** + * + * *
        * Apply transformation to all findings not specified in other
        * ImageTransformation's selected_info_types. Only one instance is allowed
        * within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * * @return The allInfoTypes. */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes getAllInfoTypes() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + getAllInfoTypes() { if (allInfoTypesBuilder_ == null) { if (targetCase_ == 5) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .getDefaultInstance(); } else { if (targetCase_ == 5) { return allInfoTypesBuilder_.getMessage(); } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .getDefaultInstance(); } } /** + * + * *
        * Apply transformation to all findings not specified in other
        * ImageTransformation's selected_info_types. Only one instance is allowed
        * within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * */ - public Builder setAllInfoTypes(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes value) { + public Builder setAllInfoTypes( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes value) { if (allInfoTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3055,16 +3707,21 @@ public Builder setAllInfoTypes(com.google.privacy.dlp.v2.ImageTransformations.Im return this; } /** + * + * *
        * Apply transformation to all findings not specified in other
        * ImageTransformation's selected_info_types. Only one instance is allowed
        * within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * */ public Builder setAllInfoTypes( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder builderForValue) { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder + builderForValue) { if (allInfoTypesBuilder_ == null) { target_ = builderForValue.build(); onChanged(); @@ -3075,20 +3732,33 @@ public Builder setAllInfoTypes( return this; } /** + * + * *
        * Apply transformation to all findings not specified in other
        * ImageTransformation's selected_info_types. Only one instance is allowed
        * within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * */ - public Builder mergeAllInfoTypes(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes value) { + public Builder mergeAllInfoTypes( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes value) { if (allInfoTypesBuilder_ == null) { - if (targetCase_ == 5 && - target_ != com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance()) { - target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.newBuilder((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_) - .mergeFrom(value).buildPartial(); + if (targetCase_ == 5 + && target_ + != com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .getDefaultInstance()) { + target_ = + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .newBuilder( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllInfoTypes) + target_) + .mergeFrom(value) + .buildPartial(); } else { target_ = value; } @@ -3104,13 +3774,17 @@ public Builder mergeAllInfoTypes(com.google.privacy.dlp.v2.ImageTransformations. return this; } /** + * + * *
        * Apply transformation to all findings not specified in other
        * ImageTransformation's selected_info_types. Only one instance is allowed
        * within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * */ public Builder clearAllInfoTypes() { if (allInfoTypesBuilder_ == null) { @@ -3129,74 +3803,111 @@ public Builder clearAllInfoTypes() { return this; } /** + * + * *
        * Apply transformation to all findings not specified in other
        * ImageTransformation's selected_info_types. Only one instance is allowed
        * within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * */ - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder getAllInfoTypesBuilder() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder + getAllInfoTypesBuilder() { return getAllInfoTypesFieldBuilder().getBuilder(); } /** + * + * *
        * Apply transformation to all findings not specified in other
        * ImageTransformation's selected_info_types. Only one instance is allowed
        * within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder getAllInfoTypesOrBuilder() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllInfoTypesOrBuilder + getAllInfoTypesOrBuilder() { if ((targetCase_ == 5) && (allInfoTypesBuilder_ != null)) { return allInfoTypesBuilder_.getMessageOrBuilder(); } else { if (targetCase_ == 5) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .getDefaultInstance(); } } /** + * + * *
        * Apply transformation to all findings not specified in other
        * ImageTransformation's selected_info_types. Only one instance is allowed
        * within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes all_info_types = 5; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder> + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllInfoTypesOrBuilder> getAllInfoTypesFieldBuilder() { if (allInfoTypesBuilder_ == null) { if (!(targetCase_ == 5)) { - target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.getDefaultInstance(); + target_ = + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .getDefaultInstance(); } - allInfoTypesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypesOrBuilder>( - (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) target_, + allInfoTypesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + .Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllInfoTypesOrBuilder>( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + target_, getParentForChildren(), isClean()); target_ = null; } targetCase_ = 5; - onChanged();; + onChanged(); + ; return allInfoTypesBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder> allTextBuilder_; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder> + allTextBuilder_; /** + * + * *
        * Apply transformation to all text that doesn't match an infoType. Only
        * one instance is allowed within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * + * * @return Whether the allText field is set. */ @java.lang.Override @@ -3204,37 +3915,49 @@ public boolean hasAllText() { return targetCase_ == 6; } /** + * + * *
        * Apply transformation to all text that doesn't match an infoType. Only
        * one instance is allowed within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * + * * @return The allText. */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText getAllText() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + getAllText() { if (allTextBuilder_ == null) { if (targetCase_ == 6) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .getDefaultInstance(); } else { if (targetCase_ == 6) { return allTextBuilder_.getMessage(); } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .getDefaultInstance(); } } /** + * + * *
        * Apply transformation to all text that doesn't match an infoType. Only
        * one instance is allowed within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * */ - public Builder setAllText(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText value) { + public Builder setAllText( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText value) { if (allTextBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3248,15 +3971,19 @@ public Builder setAllText(com.google.privacy.dlp.v2.ImageTransformations.ImageTr return this; } /** + * + * *
        * Apply transformation to all text that doesn't match an infoType. Only
        * one instance is allowed within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * */ public Builder setAllText( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder builderForValue) { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder + builderForValue) { if (allTextBuilder_ == null) { target_ = builderForValue.build(); onChanged(); @@ -3267,19 +3994,30 @@ public Builder setAllText( return this; } /** + * + * *
        * Apply transformation to all text that doesn't match an infoType. Only
        * one instance is allowed within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * */ - public Builder mergeAllText(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText value) { + public Builder mergeAllText( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText value) { if (allTextBuilder_ == null) { - if (targetCase_ == 6 && - target_ != com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance()) { - target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.newBuilder((com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_) - .mergeFrom(value).buildPartial(); + if (targetCase_ == 6 + && target_ + != com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .getDefaultInstance()) { + target_ = + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .newBuilder( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + target_) + .mergeFrom(value) + .buildPartial(); } else { target_ = value; } @@ -3295,12 +4033,15 @@ public Builder mergeAllText(com.google.privacy.dlp.v2.ImageTransformations.Image return this; } /** + * + * *
        * Apply transformation to all text that doesn't match an infoType. Only
        * one instance is allowed within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * */ public Builder clearAllText() { if (allTextBuilder_ == null) { @@ -3319,94 +4060,131 @@ public Builder clearAllText() { return this; } /** + * + * *
        * Apply transformation to all text that doesn't match an infoType. Only
        * one instance is allowed within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * */ - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder getAllTextBuilder() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder + getAllTextBuilder() { return getAllTextFieldBuilder().getBuilder(); } /** + * + * *
        * Apply transformation to all text that doesn't match an infoType. Only
        * one instance is allowed within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * */ @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder getAllTextOrBuilder() { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder + getAllTextOrBuilder() { if ((targetCase_ == 6) && (allTextBuilder_ != null)) { return allTextBuilder_.getMessageOrBuilder(); } else { if (targetCase_ == 6) { - return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_; + return (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + target_; } - return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + return com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .getDefaultInstance(); } } /** + * + * *
        * Apply transformation to all text that doesn't match an infoType. Only
        * one instance is allowed within the ImageTransformations message.
        * 
* - * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * .google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText all_text = 6; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder> + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder> getAllTextFieldBuilder() { if (allTextBuilder_ == null) { if (!(targetCase_ == 6)) { - target_ = com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.getDefaultInstance(); + target_ = + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .getDefaultInstance(); } - allTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllTextOrBuilder>( - (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) target_, + allTextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + .Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .AllTextOrBuilder>( + (com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + target_, getParentForChildren(), isClean()); target_ = null; } targetCase_ = 6; - onChanged();; + onChanged(); + ; return allTextBuilder_; } private com.google.privacy.dlp.v2.Color redactionColor_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> redactionColorBuilder_; + com.google.privacy.dlp.v2.Color, + com.google.privacy.dlp.v2.Color.Builder, + com.google.privacy.dlp.v2.ColorOrBuilder> + redactionColorBuilder_; /** + * + * *
        * The color to use when redacting content from an image. If not
        * specified, the default is black.
        * 
* * .google.privacy.dlp.v2.Color redaction_color = 3; + * * @return Whether the redactionColor field is set. */ public boolean hasRedactionColor() { return redactionColorBuilder_ != null || redactionColor_ != null; } /** + * + * *
        * The color to use when redacting content from an image. If not
        * specified, the default is black.
        * 
* * .google.privacy.dlp.v2.Color redaction_color = 3; + * * @return The redactionColor. */ public com.google.privacy.dlp.v2.Color getRedactionColor() { if (redactionColorBuilder_ == null) { - return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; + return redactionColor_ == null + ? com.google.privacy.dlp.v2.Color.getDefaultInstance() + : redactionColor_; } else { return redactionColorBuilder_.getMessage(); } } /** + * + * *
        * The color to use when redacting content from an image. If not
        * specified, the default is black.
@@ -3428,6 +4206,8 @@ public Builder setRedactionColor(com.google.privacy.dlp.v2.Color value) {
         return this;
       }
       /**
+       *
+       *
        * 
        * The color to use when redacting content from an image. If not
        * specified, the default is black.
@@ -3435,8 +4215,7 @@ public Builder setRedactionColor(com.google.privacy.dlp.v2.Color value) {
        *
        * .google.privacy.dlp.v2.Color redaction_color = 3;
        */
-      public Builder setRedactionColor(
-          com.google.privacy.dlp.v2.Color.Builder builderForValue) {
+      public Builder setRedactionColor(com.google.privacy.dlp.v2.Color.Builder builderForValue) {
         if (redactionColorBuilder_ == null) {
           redactionColor_ = builderForValue.build();
           onChanged();
@@ -3447,6 +4226,8 @@ public Builder setRedactionColor(
         return this;
       }
       /**
+       *
+       *
        * 
        * The color to use when redacting content from an image. If not
        * specified, the default is black.
@@ -3458,7 +4239,9 @@ public Builder mergeRedactionColor(com.google.privacy.dlp.v2.Color value) {
         if (redactionColorBuilder_ == null) {
           if (redactionColor_ != null) {
             redactionColor_ =
-              com.google.privacy.dlp.v2.Color.newBuilder(redactionColor_).mergeFrom(value).buildPartial();
+                com.google.privacy.dlp.v2.Color.newBuilder(redactionColor_)
+                    .mergeFrom(value)
+                    .buildPartial();
           } else {
             redactionColor_ = value;
           }
@@ -3470,6 +4253,8 @@ public Builder mergeRedactionColor(com.google.privacy.dlp.v2.Color value) {
         return this;
       }
       /**
+       *
+       *
        * 
        * The color to use when redacting content from an image. If not
        * specified, the default is black.
@@ -3489,6 +4274,8 @@ public Builder clearRedactionColor() {
         return this;
       }
       /**
+       *
+       *
        * 
        * The color to use when redacting content from an image. If not
        * specified, the default is black.
@@ -3497,11 +4284,13 @@ public Builder clearRedactionColor() {
        * .google.privacy.dlp.v2.Color redaction_color = 3;
        */
       public com.google.privacy.dlp.v2.Color.Builder getRedactionColorBuilder() {
-        
+
         onChanged();
         return getRedactionColorFieldBuilder().getBuilder();
       }
       /**
+       *
+       *
        * 
        * The color to use when redacting content from an image. If not
        * specified, the default is black.
@@ -3513,11 +4302,14 @@ public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() {
         if (redactionColorBuilder_ != null) {
           return redactionColorBuilder_.getMessageOrBuilder();
         } else {
-          return redactionColor_ == null ?
-              com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_;
+          return redactionColor_ == null
+              ? com.google.privacy.dlp.v2.Color.getDefaultInstance()
+              : redactionColor_;
         }
       }
       /**
+       *
+       *
        * 
        * The color to use when redacting content from an image. If not
        * specified, the default is black.
@@ -3526,18 +4318,22 @@ public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() {
        * .google.privacy.dlp.v2.Color redaction_color = 3;
        */
       private com.google.protobuf.SingleFieldBuilderV3<
-          com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> 
+              com.google.privacy.dlp.v2.Color,
+              com.google.privacy.dlp.v2.Color.Builder,
+              com.google.privacy.dlp.v2.ColorOrBuilder>
           getRedactionColorFieldBuilder() {
         if (redactionColorBuilder_ == null) {
-          redactionColorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
-              com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder>(
-                  getRedactionColor(),
-                  getParentForChildren(),
-                  isClean());
+          redactionColorBuilder_ =
+              new com.google.protobuf.SingleFieldBuilderV3<
+                  com.google.privacy.dlp.v2.Color,
+                  com.google.privacy.dlp.v2.Color.Builder,
+                  com.google.privacy.dlp.v2.ColorOrBuilder>(
+                  getRedactionColor(), getParentForChildren(), isClean());
           redactionColor_ = null;
         }
         return redactionColorBuilder_;
       }
+
       @java.lang.Override
       public final Builder setUnknownFields(
           final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -3550,30 +4346,32 @@ public final Builder mergeUnknownFields(
         return super.mergeUnknownFields(unknownFields);
       }
 
-
       // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation)
     }
 
     // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations.ImageTransformation)
-    private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation DEFAULT_INSTANCE;
+    private static final com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+        DEFAULT_INSTANCE;
+
     static {
       DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation();
     }
 
-    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getDefaultInstance() {
+    public static com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+        getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
-    private static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public ImageTransformation parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new ImageTransformation(input, extensionRegistry);
-      }
-    };
+    private static final com.google.protobuf.Parser PARSER =
+        new com.google.protobuf.AbstractParser() {
+          @java.lang.Override
+          public ImageTransformation parsePartialFrom(
+              com.google.protobuf.CodedInputStream input,
+              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+              throws com.google.protobuf.InvalidProtocolBufferException {
+            return new ImageTransformation(input, extensionRegistry);
+          }
+        };
 
     public static com.google.protobuf.Parser parser() {
       return PARSER;
@@ -3585,53 +4383,63 @@ public com.google.protobuf.Parser getParserForType() {
     }
 
     @java.lang.Override
-    public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getDefaultInstanceForType() {
+    public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation
+        getDefaultInstanceForType() {
       return DEFAULT_INSTANCE;
     }
-
   }
 
   public static final int TRANSFORMS_FIELD_NUMBER = 2;
-  private java.util.List transforms_;
+  private java.util.List
+      transforms_;
   /**
-   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * 
    */
   @java.lang.Override
-  public java.util.List getTransformsList() {
+  public java.util.List
+      getTransformsList() {
     return transforms_;
   }
   /**
-   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * 
    */
   @java.lang.Override
-  public java.util.List 
+  public java.util.List<
+          ? extends com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder>
       getTransformsOrBuilderList() {
     return transforms_;
   }
   /**
-   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * 
    */
   @java.lang.Override
   public int getTransformsCount() {
     return transforms_.size();
   }
   /**
-   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * 
    */
   @java.lang.Override
-  public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTransforms(int index) {
+  public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTransforms(
+      int index) {
     return transforms_.get(index);
   }
   /**
-   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2;
+   * 
    */
   @java.lang.Override
-  public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder getTransformsOrBuilder(
-      int index) {
+  public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder
+      getTransformsOrBuilder(int index) {
     return transforms_.get(index);
   }
 
   private byte memoizedIsInitialized = -1;
+
   @java.lang.Override
   public final boolean isInitialized() {
     byte isInitialized = memoizedIsInitialized;
@@ -3643,8 +4451,7 @@ public final boolean isInitialized() {
   }
 
   @java.lang.Override
-  public void writeTo(com.google.protobuf.CodedOutputStream output)
-                      throws java.io.IOException {
+  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
     for (int i = 0; i < transforms_.size(); i++) {
       output.writeMessage(2, transforms_.get(i));
     }
@@ -3658,8 +4465,7 @@ public int getSerializedSize() {
 
     size = 0;
     for (int i = 0; i < transforms_.size(); i++) {
-      size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(2, transforms_.get(i));
+      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, transforms_.get(i));
     }
     size += unknownFields.getSerializedSize();
     memoizedSize = size;
@@ -3669,15 +4475,15 @@ public int getSerializedSize() {
   @java.lang.Override
   public boolean equals(final java.lang.Object obj) {
     if (obj == this) {
-     return true;
+      return true;
     }
     if (!(obj instanceof com.google.privacy.dlp.v2.ImageTransformations)) {
       return super.equals(obj);
     }
-    com.google.privacy.dlp.v2.ImageTransformations other = (com.google.privacy.dlp.v2.ImageTransformations) obj;
+    com.google.privacy.dlp.v2.ImageTransformations other =
+        (com.google.privacy.dlp.v2.ImageTransformations) obj;
 
-    if (!getTransformsList()
-        .equals(other.getTransformsList())) return false;
+    if (!getTransformsList().equals(other.getTransformsList())) return false;
     if (!unknownFields.equals(other.unknownFields)) return false;
     return true;
   }
@@ -3698,118 +4504,127 @@ public int hashCode() {
     return hash;
   }
 
-  public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(
-      java.nio.ByteBuffer data)
+  public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(java.nio.ByteBuffer data)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(
-      java.nio.ByteBuffer data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data, extensionRegistry);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(
       com.google.protobuf.ByteString data)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(
       com.google.protobuf.ByteString data,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data, extensionRegistry);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(byte[] data)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(
-      byte[] data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data, extensionRegistry);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(java.io.InputStream input)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
+    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
+    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+        PARSER, input, extensionRegistry);
   }
-  public static com.google.privacy.dlp.v2.ImageTransformations parseDelimitedFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input);
+
+  public static com.google.privacy.dlp.v2.ImageTransformations parseDelimitedFrom(
+      java.io.InputStream input) throws java.io.IOException {
+    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseDelimitedFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+        PARSER, input, extensionRegistry);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(
-      com.google.protobuf.CodedInputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
+      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
   }
+
   public static com.google.privacy.dlp.v2.ImageTransformations parseFrom(
       com.google.protobuf.CodedInputStream input,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
+    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+        PARSER, input, extensionRegistry);
   }
 
   @java.lang.Override
-  public Builder newBuilderForType() { return newBuilder(); }
+  public Builder newBuilderForType() {
+    return newBuilder();
+  }
+
   public static Builder newBuilder() {
     return DEFAULT_INSTANCE.toBuilder();
   }
+
   public static Builder newBuilder(com.google.privacy.dlp.v2.ImageTransformations prototype) {
     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
   }
+
   @java.lang.Override
   public Builder toBuilder() {
-    return this == DEFAULT_INSTANCE
-        ? new Builder() : new Builder().mergeFrom(this);
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
   }
 
   @java.lang.Override
-  protected Builder newBuilderForType(
-      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
     Builder builder = new Builder(parent);
     return builder;
   }
   /**
+   *
+   *
    * 
    * A type of transformation that is applied over images.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.ImageTransformations} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageTransformations) com.google.privacy.dlp.v2.ImageTransformationsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageTransformations.class, com.google.privacy.dlp.v2.ImageTransformations.Builder.class); + com.google.privacy.dlp.v2.ImageTransformations.class, + com.google.privacy.dlp.v2.ImageTransformations.Builder.class); } // Construct using com.google.privacy.dlp.v2.ImageTransformations.newBuilder() @@ -3817,17 +4632,17 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getTransformsFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); @@ -3841,9 +4656,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; } @java.lang.Override @@ -3862,7 +4677,8 @@ public com.google.privacy.dlp.v2.ImageTransformations build() { @java.lang.Override public com.google.privacy.dlp.v2.ImageTransformations buildPartial() { - com.google.privacy.dlp.v2.ImageTransformations result = new com.google.privacy.dlp.v2.ImageTransformations(this); + com.google.privacy.dlp.v2.ImageTransformations result = + new com.google.privacy.dlp.v2.ImageTransformations(this); int from_bitField0_ = bitField0_; if (transformsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { @@ -3881,38 +4697,39 @@ public com.google.privacy.dlp.v2.ImageTransformations buildPartial() { public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.privacy.dlp.v2.ImageTransformations) { - return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations)other); + return mergeFrom((com.google.privacy.dlp.v2.ImageTransformations) other); } else { super.mergeFrom(other); return this; @@ -3939,9 +4756,10 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.ImageTransformations other) { transformsBuilder_ = null; transforms_ = other.transforms_; bitField0_ = (bitField0_ & ~0x00000001); - transformsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTransformsFieldBuilder() : null; + transformsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransformsFieldBuilder() + : null; } else { transformsBuilder_.addAllMessages(other.transforms_); } @@ -3975,24 +4793,34 @@ public Builder mergeFrom( } return this; } + private int bitField0_; - private java.util.List transforms_ = - java.util.Collections.emptyList(); + private java.util.List + transforms_ = java.util.Collections.emptyList(); + private void ensureTransformsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - transforms_ = new java.util.ArrayList(transforms_); + transforms_ = + new java.util.ArrayList< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation>(transforms_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder> transformsBuilder_; + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder> + transformsBuilder_; /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ - public java.util.List getTransformsList() { + public java.util.List + getTransformsList() { if (transformsBuilder_ == null) { return java.util.Collections.unmodifiableList(transforms_); } else { @@ -4000,7 +4828,9 @@ public java.util.Listrepeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ public int getTransformsCount() { if (transformsBuilder_ == null) { @@ -4010,9 +4840,12 @@ public int getTransformsCount() { } } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTransforms(int index) { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTransforms( + int index) { if (transformsBuilder_ == null) { return transforms_.get(index); } else { @@ -4020,7 +4853,9 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTra } } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ public Builder setTransforms( int index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation value) { @@ -4037,10 +4872,14 @@ public Builder setTransforms( return this; } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ public Builder setTransforms( - int index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder builderForValue) { + int index, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder + builderForValue) { if (transformsBuilder_ == null) { ensureTransformsIsMutable(); transforms_.set(index, builderForValue.build()); @@ -4051,9 +4890,12 @@ public Builder setTransforms( return this; } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ - public Builder addTransforms(com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation value) { + public Builder addTransforms( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation value) { if (transformsBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -4067,7 +4909,9 @@ public Builder addTransforms(com.google.privacy.dlp.v2.ImageTransformations.Imag return this; } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ public Builder addTransforms( int index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation value) { @@ -4084,10 +4928,13 @@ public Builder addTransforms( return this; } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ public Builder addTransforms( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder builderForValue) { + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder + builderForValue) { if (transformsBuilder_ == null) { ensureTransformsIsMutable(); transforms_.add(builderForValue.build()); @@ -4098,10 +4945,14 @@ public Builder addTransforms( return this; } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ public Builder addTransforms( - int index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder builderForValue) { + int index, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder + builderForValue) { if (transformsBuilder_ == null) { ensureTransformsIsMutable(); transforms_.add(index, builderForValue.build()); @@ -4112,14 +4963,17 @@ public Builder addTransforms( return this; } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ public Builder addAllTransforms( - java.lang.Iterable values) { + java.lang.Iterable< + ? extends com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation> + values) { if (transformsBuilder_ == null) { ensureTransformsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, transforms_); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transforms_); onChanged(); } else { transformsBuilder_.addAllMessages(values); @@ -4127,7 +4981,9 @@ public Builder addAllTransforms( return this; } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ public Builder clearTransforms() { if (transformsBuilder_ == null) { @@ -4140,7 +4996,9 @@ public Builder clearTransforms() { return this; } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ public Builder removeTransforms(int index) { if (transformsBuilder_ == null) { @@ -4153,27 +5011,35 @@ public Builder removeTransforms(int index) { return this; } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder getTransformsBuilder( - int index) { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder + getTransformsBuilder(int index) { return getTransformsFieldBuilder().getBuilder(index); } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder getTransformsOrBuilder( - int index) { + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder + getTransformsOrBuilder(int index) { if (transformsBuilder_ == null) { - return transforms_.get(index); } else { + return transforms_.get(index); + } else { return transformsBuilder_.getMessageOrBuilder(index); } } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ - public java.util.List - getTransformsOrBuilderList() { + public java.util.List< + ? extends com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder> + getTransformsOrBuilderList() { if (transformsBuilder_ != null) { return transformsBuilder_.getMessageOrBuilderList(); } else { @@ -4181,44 +5047,60 @@ public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuild } } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder addTransformsBuilder() { - return getTransformsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.getDefaultInstance()); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder + addTransformsBuilder() { + return getTransformsFieldBuilder() + .addBuilder( + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .getDefaultInstance()); } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ - public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder addTransformsBuilder( - int index) { - return getTransformsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.getDefaultInstance()); + public com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder + addTransformsBuilder(int index) { + return getTransformsFieldBuilder() + .addBuilder( + index, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation + .getDefaultInstance()); } /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * */ - public java.util.List - getTransformsBuilderList() { + public java.util.List< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder> + getTransformsBuilderList() { return getTransformsFieldBuilder().getBuilderList(); } + private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder> + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder> getTransformsFieldBuilder() { if (transformsBuilder_ == null) { - transformsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder, com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder>( - transforms_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); + transformsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.Builder, + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder>( + transforms_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); transforms_ = null; } return transformsBuilder_; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -4228,12 +5110,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageTransformations) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageTransformations) private static final com.google.privacy.dlp.v2.ImageTransformations DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageTransformations(); } @@ -4242,16 +5124,16 @@ public static com.google.privacy.dlp.v2.ImageTransformations getDefaultInstance( return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageTransformations parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageTransformations(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageTransformations parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageTransformations(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -4266,6 +5148,4 @@ public com.google.protobuf.Parser getParserForType() { public com.google.privacy.dlp.v2.ImageTransformations getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java new file mode 100644 index 000000000000..afbf878fd46b --- /dev/null +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface ImageTransformationsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + */ + java.util.List + getTransformsList(); + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTransforms(int index); + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + */ + int getTransformsCount(); + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + */ + java.util.List< + ? extends com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder> + getTransformsOrBuilderList(); + /** + * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; + * + */ + com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder + getTransformsOrBuilder(int index); +} diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java index c27ca6685f14..a8b235c84e8f 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java @@ -42,6 +42,7 @@ private InfoTypeDescription() { displayName_ = ""; supportedBy_ = java.util.Collections.emptyList(); description_ = ""; + versions_ = java.util.Collections.emptyList(); categories_ = java.util.Collections.emptyList(); } @@ -121,12 +122,23 @@ private InfoTypeDescription( description_ = s; break; } - case 82: + case 74: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { - categories_ = new java.util.ArrayList(); + versions_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } + versions_.add( + input.readMessage( + com.google.privacy.dlp.v2.VersionDescription.parser(), extensionRegistry)); + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + categories_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } categories_.add( input.readMessage( com.google.privacy.dlp.v2.InfoTypeCategory.parser(), extensionRegistry)); @@ -152,6 +164,9 @@ private InfoTypeDescription( supportedBy_ = java.util.Collections.unmodifiableList(supportedBy_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { + versions_ = java.util.Collections.unmodifiableList(versions_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { categories_ = java.util.Collections.unmodifiableList(categories_); } this.unknownFields = unknownFields.build(); @@ -421,6 +436,75 @@ public com.google.protobuf.ByteString getDescriptionBytes() { } } + public static final int VERSIONS_FIELD_NUMBER = 9; + private java.util.List versions_; + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public java.util.List getVersionsList() { + return versions_; + } + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public java.util.List + getVersionsOrBuilderList() { + return versions_; + } + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public int getVersionsCount() { + return versions_.size(); + } + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.VersionDescription getVersions(int index) { + return versions_.get(index); + } + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + @java.lang.Override + public com.google.privacy.dlp.v2.VersionDescriptionOrBuilder getVersionsOrBuilder(int index) { + return versions_.get(index); + } + public static final int CATEGORIES_FIELD_NUMBER = 10; private java.util.List categories_; /** @@ -521,6 +605,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); } + for (int i = 0; i < versions_.size(); i++) { + output.writeMessage(9, versions_.get(i)); + } for (int i = 0; i < categories_.size(); i++) { output.writeMessage(10, categories_.get(i)); } @@ -554,6 +641,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); } + for (int i = 0; i < versions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, versions_.get(i)); + } for (int i = 0; i < categories_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, categories_.get(i)); } @@ -577,6 +667,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDisplayName().equals(other.getDisplayName())) return false; if (!supportedBy_.equals(other.supportedBy_)) return false; if (!getDescription().equals(other.getDescription())) return false; + if (!getVersionsList().equals(other.getVersionsList())) return false; if (!getCategoriesList().equals(other.getCategoriesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -599,6 +690,10 @@ public int hashCode() { } hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); + if (getVersionsCount() > 0) { + hash = (37 * hash) + VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getVersionsList().hashCode(); + } if (getCategoriesCount() > 0) { hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; hash = (53 * hash) + getCategoriesList().hashCode(); @@ -743,6 +838,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVersionsFieldBuilder(); getCategoriesFieldBuilder(); } } @@ -758,9 +854,15 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); description_ = ""; + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + versionsBuilder_.clear(); + } if (categoriesBuilder_ == null) { categories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } else { categoriesBuilder_.clear(); } @@ -800,11 +902,20 @@ public com.google.privacy.dlp.v2.InfoTypeDescription buildPartial() { } result.supportedBy_ = supportedBy_; result.description_ = description_; - if (categoriesBuilder_ == null) { + if (versionsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { - categories_ = java.util.Collections.unmodifiableList(categories_); + versions_ = java.util.Collections.unmodifiableList(versions_); bitField0_ = (bitField0_ & ~0x00000002); } + result.versions_ = versions_; + } else { + result.versions_ = versionsBuilder_.build(); + } + if (categoriesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + categories_ = java.util.Collections.unmodifiableList(categories_); + bitField0_ = (bitField0_ & ~0x00000004); + } result.categories_ = categories_; } else { result.categories_ = categoriesBuilder_.build(); @@ -880,11 +991,38 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeDescription other) { description_ = other.description_; onChanged(); } + if (versionsBuilder_ == null) { + if (!other.versions_.isEmpty()) { + if (versions_.isEmpty()) { + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureVersionsIsMutable(); + versions_.addAll(other.versions_); + } + onChanged(); + } + } else { + if (!other.versions_.isEmpty()) { + if (versionsBuilder_.isEmpty()) { + versionsBuilder_.dispose(); + versionsBuilder_ = null; + versions_ = other.versions_; + bitField0_ = (bitField0_ & ~0x00000002); + versionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVersionsFieldBuilder() + : null; + } else { + versionsBuilder_.addAllMessages(other.versions_); + } + } + } if (categoriesBuilder_ == null) { if (!other.categories_.isEmpty()) { if (categories_.isEmpty()) { categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureCategoriesIsMutable(); categories_.addAll(other.categories_); @@ -897,7 +1035,7 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeDescription other) { categoriesBuilder_.dispose(); categoriesBuilder_ = null; categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); categoriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getCategoriesFieldBuilder() @@ -1482,14 +1620,365 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { return this; } + private java.util.List versions_ = + java.util.Collections.emptyList(); + + private void ensureVersionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + versions_ = + new java.util.ArrayList(versions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.VersionDescription, + com.google.privacy.dlp.v2.VersionDescription.Builder, + com.google.privacy.dlp.v2.VersionDescriptionOrBuilder> + versionsBuilder_; + + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public java.util.List getVersionsList() { + if (versionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(versions_); + } else { + return versionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public int getVersionsCount() { + if (versionsBuilder_ == null) { + return versions_.size(); + } else { + return versionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescription getVersions(int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); + } else { + return versionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder setVersions(int index, com.google.privacy.dlp.v2.VersionDescription value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.set(index, value); + onChanged(); + } else { + versionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder setVersions( + int index, com.google.privacy.dlp.v2.VersionDescription.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.set(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addVersions(com.google.privacy.dlp.v2.VersionDescription value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(value); + onChanged(); + } else { + versionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addVersions(int index, com.google.privacy.dlp.v2.VersionDescription value) { + if (versionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionsIsMutable(); + versions_.add(index, value); + onChanged(); + } else { + versionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addVersions( + com.google.privacy.dlp.v2.VersionDescription.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addVersions( + int index, com.google.privacy.dlp.v2.VersionDescription.Builder builderForValue) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(index, builderForValue.build()); + onChanged(); + } else { + versionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder addAllVersions( + java.lang.Iterable values) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, versions_); + onChanged(); + } else { + versionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder clearVersions() { + if (versionsBuilder_ == null) { + versions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + versionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public Builder removeVersions(int index) { + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.remove(index); + onChanged(); + } else { + versionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescription.Builder getVersionsBuilder(int index) { + return getVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescriptionOrBuilder getVersionsOrBuilder(int index) { + if (versionsBuilder_ == null) { + return versions_.get(index); + } else { + return versionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public java.util.List + getVersionsOrBuilderList() { + if (versionsBuilder_ != null) { + return versionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(versions_); + } + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescription.Builder addVersionsBuilder() { + return getVersionsFieldBuilder() + .addBuilder(com.google.privacy.dlp.v2.VersionDescription.getDefaultInstance()); + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public com.google.privacy.dlp.v2.VersionDescription.Builder addVersionsBuilder(int index) { + return getVersionsFieldBuilder() + .addBuilder(index, com.google.privacy.dlp.v2.VersionDescription.getDefaultInstance()); + } + /** + * + * + *
+     * A list of available versions for the infotype.
+     * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + public java.util.List + getVersionsBuilderList() { + return getVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.VersionDescription, + com.google.privacy.dlp.v2.VersionDescription.Builder, + com.google.privacy.dlp.v2.VersionDescriptionOrBuilder> + getVersionsFieldBuilder() { + if (versionsBuilder_ == null) { + versionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.VersionDescription, + com.google.privacy.dlp.v2.VersionDescription.Builder, + com.google.privacy.dlp.v2.VersionDescriptionOrBuilder>( + versions_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + versions_ = null; + } + return versionsBuilder_; + } + private java.util.List categories_ = java.util.Collections.emptyList(); private void ensureCategoriesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { categories_ = new java.util.ArrayList(categories_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; } } @@ -1705,7 +2194,7 @@ public Builder addAllCategories( public Builder clearCategories() { if (categoriesBuilder_ == null) { categories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { categoriesBuilder_.clear(); @@ -1827,7 +2316,7 @@ public com.google.privacy.dlp.v2.InfoTypeCategory.Builder addCategoriesBuilder(i com.google.privacy.dlp.v2.InfoTypeCategory, com.google.privacy.dlp.v2.InfoTypeCategory.Builder, com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder>( - categories_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + categories_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); categories_ = null; } return categoriesBuilder_; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java index 8344ac23a57a..cf0ba1b5aa3a 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java @@ -163,6 +163,58 @@ public interface InfoTypeDescriptionOrBuilder */ com.google.protobuf.ByteString getDescriptionBytes(); + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + java.util.List getVersionsList(); + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + com.google.privacy.dlp.v2.VersionDescription getVersions(int index); + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + int getVersionsCount(); + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + java.util.List + getVersionsOrBuilderList(); + /** + * + * + *
+   * A list of available versions for the infotype.
+   * 
+ * + * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; + */ + com.google.privacy.dlp.v2.VersionDescriptionOrBuilder getVersionsOrBuilder(int index); + /** * * diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java index 1b050df72c06..43d1b74ee2b6 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java @@ -81,6 +81,11 @@ private InfoTypeSummary( infoType_ = subBuilder.buildPartial(); } + break; + } + case 16: + { + estimatedPrevalence_ = input.readInt32(); break; } default: @@ -165,6 +170,25 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { return getInfoType(); } + public static final int ESTIMATED_PREVALENCE_FIELD_NUMBER = 2; + private int estimatedPrevalence_; + /** + * + * + *
+   * Approximate percentage of non-null rows that contained data detected by
+   * this infotype.
+   * 
+ * + * int32 estimated_prevalence = 2; + * + * @return The estimatedPrevalence. + */ + @java.lang.Override + public int getEstimatedPrevalence() { + return estimatedPrevalence_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -182,6 +206,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (infoType_ != null) { output.writeMessage(1, getInfoType()); } + if (estimatedPrevalence_ != 0) { + output.writeInt32(2, estimatedPrevalence_); + } unknownFields.writeTo(output); } @@ -194,6 +221,9 @@ public int getSerializedSize() { if (infoType_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInfoType()); } + if (estimatedPrevalence_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, estimatedPrevalence_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -214,6 +244,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInfoType()) { if (!getInfoType().equals(other.getInfoType())) return false; } + if (getEstimatedPrevalence() != other.getEstimatedPrevalence()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -229,6 +260,8 @@ public int hashCode() { hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; hash = (53 * hash) + getInfoType().hashCode(); } + hash = (37 * hash) + ESTIMATED_PREVALENCE_FIELD_NUMBER; + hash = (53 * hash) + getEstimatedPrevalence(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -380,6 +413,8 @@ public Builder clear() { infoType_ = null; infoTypeBuilder_ = null; } + estimatedPrevalence_ = 0; + return this; } @@ -412,6 +447,7 @@ public com.google.privacy.dlp.v2.InfoTypeSummary buildPartial() { } else { result.infoType_ = infoTypeBuilder_.build(); } + result.estimatedPrevalence_ = estimatedPrevalence_; onBuilt(); return result; } @@ -464,6 +500,9 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeSummary other) { if (other.hasInfoType()) { mergeInfoType(other.getInfoType()); } + if (other.getEstimatedPrevalence() != 0) { + setEstimatedPrevalence(other.getEstimatedPrevalence()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -678,6 +717,61 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { return infoTypeBuilder_; } + private int estimatedPrevalence_; + /** + * + * + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * + * @return The estimatedPrevalence. + */ + @java.lang.Override + public int getEstimatedPrevalence() { + return estimatedPrevalence_; + } + /** + * + * + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * + * @param value The estimatedPrevalence to set. + * @return This builder for chaining. + */ + public Builder setEstimatedPrevalence(int value) { + + estimatedPrevalence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * + * @return This builder for chaining. + */ + public Builder clearEstimatedPrevalence() { + + estimatedPrevalence_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java index 59cc8e504b31..336a0e8586a3 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java @@ -57,4 +57,18 @@ public interface InfoTypeSummaryOrBuilder * .google.privacy.dlp.v2.InfoType info_type = 1; */ com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + * + * + *
+   * Approximate percentage of non-null rows that contained data detected by
+   * this infotype.
+   * 
+ * + * int32 estimated_prevalence = 2; + * + * @return The estimatedPrevalence. + */ + int getEstimatedPrevalence(); } diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java index db393fc4a2fd..405aea6065f3 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java @@ -153,7 +153,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(4); + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(7); } private static final InfoTypeSupportedBy[] VALUES = values(); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java index 3d7a375e6676..2f47ce95486c 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java @@ -326,6 +326,11 @@ com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindin *
    * Configuration to control the number of findings returned for inspection.
    * This is not used for de-identification or data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits} @@ -1682,6 +1687,11 @@ protected Builder newBuilderForType( *
      * Configuration to control the number of findings returned for inspection.
      * This is not used for de-identification or data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits} @@ -2636,6 +2646,11 @@ public com.google.privacy.dlp.v2.Likelihood getMinLikelihood() { *
    * Configuration to control the number of findings returned.
    * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
    * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -2652,6 +2667,11 @@ public boolean hasLimits() { *
    * Configuration to control the number of findings returned.
    * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
    * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -2670,6 +2690,11 @@ public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits() { *
    * Configuration to control the number of findings returned.
    * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
    * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -4155,6 +4180,11 @@ public Builder clearMinLikelihood() { *
      * Configuration to control the number of findings returned.
      * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -4170,6 +4200,11 @@ public boolean hasLimits() { *
      * Configuration to control the number of findings returned.
      * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -4191,6 +4226,11 @@ public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits() { *
      * Configuration to control the number of findings returned.
      * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -4214,6 +4254,11 @@ public Builder setLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits v *
      * Configuration to control the number of findings returned.
      * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -4235,6 +4280,11 @@ public Builder setLimits( *
      * Configuration to control the number of findings returned.
      * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -4262,6 +4312,11 @@ public Builder mergeLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits *
      * Configuration to control the number of findings returned.
      * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -4283,6 +4338,11 @@ public Builder clearLimits() { *
      * Configuration to control the number of findings returned.
      * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -4298,6 +4358,11 @@ public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder getLimitsBu *
      * Configuration to control the number of findings returned.
      * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -4317,6 +4382,11 @@ public com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder getLimitsO *
      * Configuration to control the number of findings returned.
      * This is not used for data profiling.
+     * When redacting sensitive data from images, finding limits don't apply. They
+     * can cause unexpected or inconsistent results, where only some data is
+     * redacted. Don't include finding limits in
+     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+     * requests. Otherwise, Cloud DLP returns an error.
      * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java index a90b9563e7fe..1278105bb75b 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java @@ -149,6 +149,11 @@ public interface InspectConfigOrBuilder *
    * Configuration to control the number of findings returned.
    * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
    * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -162,6 +167,11 @@ public interface InspectConfigOrBuilder *
    * Configuration to control the number of findings returned.
    * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
    * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; @@ -175,6 +185,11 @@ public interface InspectConfigOrBuilder *
    * Configuration to control the number of findings returned.
    * This is not used for data profiling.
+   * When redacting sensitive data from images, finding limits don't apply. They
+   * can cause unexpected or inconsistent results, where only some data is
+   * redacted. Don't include finding limits in
+   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
+   * requests. Otherwise, Cloud DLP returns an error.
    * 
* * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java index 1d97aa32e0a8..7b0fc3d93d2a 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java @@ -25,7 +25,7 @@ * Configuration for a custom dictionary created from a data source of any size * up to the maximum size defined in the * [limits](https://cloud.google.com/dlp/limits) page. The artifacts of - * dictionary creation are stored in the specified Google Cloud Storage + * dictionary creation are stored in the specified Cloud Storage * location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries * that satisfy the size requirements. *
@@ -210,7 +210,7 @@ public SourceCase getSourceCase() { * * *
-   * Location to store dictionary artifacts in Google Cloud Storage. These files
+   * Location to store dictionary artifacts in Cloud Storage. These files
    * will only be accessible by project owners and the DLP API. If any of these
    * artifacts are modified, the dictionary is considered invalid and can no
    * longer be used.
@@ -228,7 +228,7 @@ public boolean hasOutputPath() {
    *
    *
    * 
-   * Location to store dictionary artifacts in Google Cloud Storage. These files
+   * Location to store dictionary artifacts in Cloud Storage. These files
    * will only be accessible by project owners and the DLP API. If any of these
    * artifacts are modified, the dictionary is considered invalid and can no
    * longer be used.
@@ -248,7 +248,7 @@ public com.google.privacy.dlp.v2.CloudStoragePath getOutputPath() {
    *
    *
    * 
-   * Location to store dictionary artifacts in Google Cloud Storage. These files
+   * Location to store dictionary artifacts in Cloud Storage. These files
    * will only be accessible by project owners and the DLP API. If any of these
    * artifacts are modified, the dictionary is considered invalid and can no
    * longer be used.
@@ -574,7 +574,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
    * Configuration for a custom dictionary created from a data source of any size
    * up to the maximum size defined in the
    * [limits](https://cloud.google.com/dlp/limits) page. The artifacts of
-   * dictionary creation are stored in the specified Google Cloud Storage
+   * dictionary creation are stored in the specified Cloud Storage
    * location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries
    * that satisfy the size requirements.
    * 
@@ -795,7 +795,7 @@ public Builder clearSource() { * * *
-     * Location to store dictionary artifacts in Google Cloud Storage. These files
+     * Location to store dictionary artifacts in Cloud Storage. These files
      * will only be accessible by project owners and the DLP API. If any of these
      * artifacts are modified, the dictionary is considered invalid and can no
      * longer be used.
@@ -812,7 +812,7 @@ public boolean hasOutputPath() {
      *
      *
      * 
-     * Location to store dictionary artifacts in Google Cloud Storage. These files
+     * Location to store dictionary artifacts in Cloud Storage. These files
      * will only be accessible by project owners and the DLP API. If any of these
      * artifacts are modified, the dictionary is considered invalid and can no
      * longer be used.
@@ -835,7 +835,7 @@ public com.google.privacy.dlp.v2.CloudStoragePath getOutputPath() {
      *
      *
      * 
-     * Location to store dictionary artifacts in Google Cloud Storage. These files
+     * Location to store dictionary artifacts in Cloud Storage. These files
      * will only be accessible by project owners and the DLP API. If any of these
      * artifacts are modified, the dictionary is considered invalid and can no
      * longer be used.
@@ -860,7 +860,7 @@ public Builder setOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value) {
      *
      *
      * 
-     * Location to store dictionary artifacts in Google Cloud Storage. These files
+     * Location to store dictionary artifacts in Cloud Storage. These files
      * will only be accessible by project owners and the DLP API. If any of these
      * artifacts are modified, the dictionary is considered invalid and can no
      * longer be used.
@@ -883,7 +883,7 @@ public Builder setOutputPath(
      *
      *
      * 
-     * Location to store dictionary artifacts in Google Cloud Storage. These files
+     * Location to store dictionary artifacts in Cloud Storage. These files
      * will only be accessible by project owners and the DLP API. If any of these
      * artifacts are modified, the dictionary is considered invalid and can no
      * longer be used.
@@ -912,7 +912,7 @@ public Builder mergeOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value)
      *
      *
      * 
-     * Location to store dictionary artifacts in Google Cloud Storage. These files
+     * Location to store dictionary artifacts in Cloud Storage. These files
      * will only be accessible by project owners and the DLP API. If any of these
      * artifacts are modified, the dictionary is considered invalid and can no
      * longer be used.
@@ -935,7 +935,7 @@ public Builder clearOutputPath() {
      *
      *
      * 
-     * Location to store dictionary artifacts in Google Cloud Storage. These files
+     * Location to store dictionary artifacts in Cloud Storage. These files
      * will only be accessible by project owners and the DLP API. If any of these
      * artifacts are modified, the dictionary is considered invalid and can no
      * longer be used.
@@ -952,7 +952,7 @@ public com.google.privacy.dlp.v2.CloudStoragePath.Builder getOutputPathBuilder()
      *
      *
      * 
-     * Location to store dictionary artifacts in Google Cloud Storage. These files
+     * Location to store dictionary artifacts in Cloud Storage. These files
      * will only be accessible by project owners and the DLP API. If any of these
      * artifacts are modified, the dictionary is considered invalid and can no
      * longer be used.
@@ -973,7 +973,7 @@ public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getOutputPathOrBuilde
      *
      *
      * 
-     * Location to store dictionary artifacts in Google Cloud Storage. These files
+     * Location to store dictionary artifacts in Cloud Storage. These files
      * will only be accessible by project owners and the DLP API. If any of these
      * artifacts are modified, the dictionary is considered invalid and can no
      * longer be used.
diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java
index 29d55de25186..b32bb12ea586 100644
--- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java
@@ -27,7 +27,7 @@ public interface LargeCustomDictionaryConfigOrBuilder
    *
    *
    * 
-   * Location to store dictionary artifacts in Google Cloud Storage. These files
+   * Location to store dictionary artifacts in Cloud Storage. These files
    * will only be accessible by project owners and the DLP API. If any of these
    * artifacts are modified, the dictionary is considered invalid and can no
    * longer be used.
@@ -42,7 +42,7 @@ public interface LargeCustomDictionaryConfigOrBuilder
    *
    *
    * 
-   * Location to store dictionary artifacts in Google Cloud Storage. These files
+   * Location to store dictionary artifacts in Cloud Storage. These files
    * will only be accessible by project owners and the DLP API. If any of these
    * artifacts are modified, the dictionary is considered invalid and can no
    * longer be used.
@@ -57,7 +57,7 @@ public interface LargeCustomDictionaryConfigOrBuilder
    *
    *
    * 
-   * Location to store dictionary artifacts in Google Cloud Storage. These files
+   * Location to store dictionary artifacts in Cloud Storage. These files
    * will only be accessible by project owners and the DLP API. If any of these
    * artifacts are modified, the dictionary is considered invalid and can no
    * longer be used.
diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java
index 2babac620730..1b88f38e4bd7 100644
--- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java
@@ -283,7 +283,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
    *
    *
    * 
-   * Size of the page, can be limited by server. If zero server returns
+   * Size of the page, can be limited by the server. If zero server returns
    * a page of max size 100.
    * 
* @@ -308,10 +308,10 @@ public int getPageSize() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -340,10 +340,10 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -1101,7 +1101,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
-     * Size of the page, can be limited by server. If zero server returns
+     * Size of the page, can be limited by the server. If zero server returns
      * a page of max size 100.
      * 
* @@ -1117,7 +1117,7 @@ public int getPageSize() { * * *
-     * Size of the page, can be limited by server. If zero server returns
+     * Size of the page, can be limited by the server. If zero server returns
      * a page of max size 100.
      * 
* @@ -1136,7 +1136,7 @@ public Builder setPageSize(int value) { * * *
-     * Size of the page, can be limited by server. If zero server returns
+     * Size of the page, can be limited by the server. If zero server returns
      * a page of max size 100.
      * 
* @@ -1162,10 +1162,10 @@ public Builder clearPageSize() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -1193,10 +1193,10 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -1224,10 +1224,10 @@ public com.google.protobuf.ByteString getOrderByBytes() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -1254,10 +1254,10 @@ public Builder setOrderBy(java.lang.String value) { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -1280,10 +1280,10 @@ public Builder clearOrderBy() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java index 51f579783245..0344d0403019 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java @@ -113,7 +113,7 @@ public interface ListDeidentifyTemplatesRequestOrBuilder * * *
-   * Size of the page, can be limited by server. If zero server returns
+   * Size of the page, can be limited by the server. If zero server returns
    * a page of max size 100.
    * 
* @@ -133,10 +133,10 @@ public interface ListDeidentifyTemplatesRequestOrBuilder * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -154,10 +154,10 @@ public interface ListDeidentifyTemplatesRequestOrBuilder * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java index c600b42a881e..f7fc1b20060f 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java @@ -248,13 +248,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - * - `trigger_name` - The resource name of the trigger that created job. - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done @@ -293,13 +293,13 @@ public java.lang.String getFilter() { * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - * - `trigger_name` - The resource name of the trigger that created job. - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done @@ -441,9 +441,9 @@ public com.google.privacy.dlp.v2.DlpJobType getType() { * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the job was created. - * - `end_time`: corresponds to time the job ended. - * - `name`: corresponds to job's name. + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. * - `state`: corresponds to `state` *
* @@ -473,9 +473,9 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the job was created. - * - `end_time`: corresponds to time the job ended. - * - `name`: corresponds to job's name. + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. * - `state`: corresponds to `state` *
* @@ -1140,13 +1140,13 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - * - `trigger_name` - The resource name of the trigger that created job. - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done @@ -1184,13 +1184,13 @@ public java.lang.String getFilter() { * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - * - `trigger_name` - The resource name of the trigger that created job. - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done @@ -1228,13 +1228,13 @@ public com.google.protobuf.ByteString getFilterBytes() { * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - * - `trigger_name` - The resource name of the trigger that created job. - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done @@ -1271,13 +1271,13 @@ public Builder setFilter(java.lang.String value) { * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - * - `trigger_name` - The resource name of the trigger that created job. - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done @@ -1310,13 +1310,13 @@ public Builder clearFilter() { * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - * - `trigger_name` - The resource name of the trigger that created job. - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done @@ -1602,9 +1602,9 @@ public Builder clearType() { * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the job was created. - * - `end_time`: corresponds to time the job ended. - * - `name`: corresponds to job's name. + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. * - `state`: corresponds to `state` *
* @@ -1633,9 +1633,9 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the job was created. - * - `end_time`: corresponds to time the job ended. - * - `name`: corresponds to job's name. + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. * - `state`: corresponds to `state` *
* @@ -1664,9 +1664,9 @@ public com.google.protobuf.ByteString getOrderByBytes() { * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the job was created. - * - `end_time`: corresponds to time the job ended. - * - `name`: corresponds to job's name. + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. * - `state`: corresponds to `state` *
* @@ -1694,9 +1694,9 @@ public Builder setOrderBy(java.lang.String value) { * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the job was created. - * - `end_time`: corresponds to time the job ended. - * - `name`: corresponds to job's name. + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. * - `state`: corresponds to `state` *
* @@ -1720,9 +1720,9 @@ public Builder clearOrderBy() { * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the job was created. - * - `end_time`: corresponds to time the job ended. - * - `name`: corresponds to job's name. + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. * - `state`: corresponds to `state` *
* diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java index e1a95847fdd8..c8cccf797091 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java @@ -87,13 +87,13 @@ public interface ListDlpJobsRequestOrBuilder * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - * - `trigger_name` - The resource name of the trigger that created job. - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done @@ -121,13 +121,13 @@ public interface ListDlpJobsRequestOrBuilder * * Supported fields/values for inspect jobs: * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - * - `trigger_name` - The resource name of the trigger that created job. - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * Supported fields for risk analysis jobs: * - `state` - RUNNING|CANCELED|FINISHED|FAILED - * - 'end_time` - Corresponds to time the job finished. - * - 'start_time` - Corresponds to time the job finished. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. * * The operator must be `=` or `!=`. * Examples: * * inspected_storage = cloud_storage AND state = done @@ -216,9 +216,9 @@ public interface ListDlpJobsRequestOrBuilder * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the job was created. - * - `end_time`: corresponds to time the job ended. - * - `name`: corresponds to job's name. + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. * - `state`: corresponds to `state` *
* @@ -237,9 +237,9 @@ public interface ListDlpJobsRequestOrBuilder * insignificant. * Example: `name asc, end_time asc, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the job was created. - * - `end_time`: corresponds to time the job ended. - * - `name`: corresponds to job's name. + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. * - `state`: corresponds to `state` *
* diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java index f1b640d3f075..21285f353ed5 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java @@ -282,7 +282,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-   * Size of the page, can be limited by server. If zero server returns
+   * Size of the page, can be limited by the server. If zero server returns
    * a page of max size 100.
    * 
* @@ -307,10 +307,10 @@ public int getPageSize() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -339,10 +339,10 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -1100,7 +1100,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
-     * Size of the page, can be limited by server. If zero server returns
+     * Size of the page, can be limited by the server. If zero server returns
      * a page of max size 100.
      * 
* @@ -1116,7 +1116,7 @@ public int getPageSize() { * * *
-     * Size of the page, can be limited by server. If zero server returns
+     * Size of the page, can be limited by the server. If zero server returns
      * a page of max size 100.
      * 
* @@ -1135,7 +1135,7 @@ public Builder setPageSize(int value) { * * *
-     * Size of the page, can be limited by server. If zero server returns
+     * Size of the page, can be limited by the server. If zero server returns
      * a page of max size 100.
      * 
* @@ -1161,10 +1161,10 @@ public Builder clearPageSize() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -1192,10 +1192,10 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. *
* * string order_by = 4; @@ -1223,10 +1223,10 @@ public com.google.protobuf.ByteString getOrderByBytes() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. * * * string order_by = 4; @@ -1253,10 +1253,10 @@ public Builder setOrderBy(java.lang.String value) { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. * * * string order_by = 4; @@ -1279,10 +1279,10 @@ public Builder clearOrderBy() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. * * * string order_by = 4; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java index 12323ef33a90..3047a260c780 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java @@ -113,7 +113,7 @@ public interface ListInspectTemplatesRequestOrBuilder * * *
-   * Size of the page, can be limited by server. If zero server returns
+   * Size of the page, can be limited by the server. If zero server returns
    * a page of max size 100.
    * 
* @@ -133,10 +133,10 @@ public interface ListInspectTemplatesRequestOrBuilder * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. * * * string order_by = 4; @@ -154,10 +154,10 @@ public interface ListInspectTemplatesRequestOrBuilder * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the template was created. - * - `update_time`: corresponds to time the template was last updated. - * - `name`: corresponds to template's name. - * - `display_name`: corresponds to template's display name. + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. * * * string order_by = 4; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java index 7974d420a833..fd18c6dbe1a3 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java @@ -316,11 +316,11 @@ public int getPageSize() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the JobTrigger was created. - * - `update_time`: corresponds to time the JobTrigger was last updated. + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. - * - `name`: corresponds to JobTrigger's name. - * - `display_name`: corresponds to JobTrigger's display name. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. * * @@ -350,11 +350,11 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the JobTrigger was created. - * - `update_time`: corresponds to time the JobTrigger was last updated. + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. - * - `name`: corresponds to JobTrigger's name. - * - `display_name`: corresponds to JobTrigger's display name. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. * * @@ -1306,11 +1306,11 @@ public Builder clearPageSize() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the JobTrigger was created. - * - `update_time`: corresponds to time the JobTrigger was last updated. + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. - * - `name`: corresponds to JobTrigger's name. - * - `display_name`: corresponds to JobTrigger's display name. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. * * @@ -1339,11 +1339,11 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the JobTrigger was created. - * - `update_time`: corresponds to time the JobTrigger was last updated. + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. - * - `name`: corresponds to JobTrigger's name. - * - `display_name`: corresponds to JobTrigger's display name. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. * * @@ -1372,11 +1372,11 @@ public com.google.protobuf.ByteString getOrderByBytes() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the JobTrigger was created. - * - `update_time`: corresponds to time the JobTrigger was last updated. + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. - * - `name`: corresponds to JobTrigger's name. - * - `display_name`: corresponds to JobTrigger's display name. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. * * @@ -1404,11 +1404,11 @@ public Builder setOrderBy(java.lang.String value) { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the JobTrigger was created. - * - `update_time`: corresponds to time the JobTrigger was last updated. + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. - * - `name`: corresponds to JobTrigger's name. - * - `display_name`: corresponds to JobTrigger's display name. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. * * @@ -1432,11 +1432,11 @@ public Builder clearOrderBy() { * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the JobTrigger was created. - * - `update_time`: corresponds to time the JobTrigger was last updated. + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. - * - `name`: corresponds to JobTrigger's name. - * - `display_name`: corresponds to JobTrigger's display name. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. * * diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java index b5337bce4ef3..5099ae37ba99 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java @@ -126,11 +126,11 @@ public interface ListJobTriggersRequestOrBuilder * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the JobTrigger was created. - * - `update_time`: corresponds to time the JobTrigger was last updated. + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. - * - `name`: corresponds to JobTrigger's name. - * - `display_name`: corresponds to JobTrigger's display name. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. * * @@ -149,11 +149,11 @@ public interface ListJobTriggersRequestOrBuilder * insignificant. * Example: `name asc,update_time, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the JobTrigger was created. - * - `update_time`: corresponds to time the JobTrigger was last updated. + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. * - `last_run_time`: corresponds to the last time the JobTrigger ran. - * - `name`: corresponds to JobTrigger's name. - * - `display_name`: corresponds to JobTrigger's display name. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. * - `status`: corresponds to JobTrigger's status. * * diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java index af5eb393eaf8..0077ea749bc7 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java @@ -156,10 +156,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> - * + Organizations scope, location specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: @@ -196,10 +192,6 @@ public java.lang.String getParent() { * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> - * + Organizations scope, location specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: @@ -282,7 +274,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-   * Size of the page, can be limited by server. If zero server returns
+   * Size of the page, can be limited by the server. If zero server returns
    * a page of max size 100.
    * 
* @@ -307,7 +299,7 @@ public int getPageSize() { * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the most recent version of the + * - `create_time`: corresponds to the time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. @@ -340,7 +332,7 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the most recent version of the + * - `create_time`: corresponds to the time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. @@ -807,10 +799,6 @@ public Builder mergeFrom( * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> - * + Organizations scope, location specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: @@ -846,10 +834,6 @@ public java.lang.String getParent() { * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> - * + Organizations scope, location specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: @@ -885,10 +869,6 @@ public com.google.protobuf.ByteString getParentBytes() { * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> - * + Organizations scope, location specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: @@ -923,10 +903,6 @@ public Builder setParent(java.lang.String value) { * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> - * + Organizations scope, location specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: @@ -957,10 +933,6 @@ public Builder clearParent() { * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> - * + Organizations scope, location specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: @@ -1101,7 +1073,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
-     * Size of the page, can be limited by server. If zero server returns
+     * Size of the page, can be limited by the server. If zero server returns
      * a page of max size 100.
      * 
* @@ -1117,7 +1089,7 @@ public int getPageSize() { * * *
-     * Size of the page, can be limited by server. If zero server returns
+     * Size of the page, can be limited by the server. If zero server returns
      * a page of max size 100.
      * 
* @@ -1136,7 +1108,7 @@ public Builder setPageSize(int value) { * * *
-     * Size of the page, can be limited by server. If zero server returns
+     * Size of the page, can be limited by the server. If zero server returns
      * a page of max size 100.
      * 
* @@ -1162,7 +1134,7 @@ public Builder clearPageSize() { * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the most recent version of the + * - `create_time`: corresponds to the time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. @@ -1194,7 +1166,7 @@ public java.lang.String getOrderBy() { * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the most recent version of the + * - `create_time`: corresponds to the time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. @@ -1226,7 +1198,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the most recent version of the + * - `create_time`: corresponds to the time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. @@ -1257,7 +1229,7 @@ public Builder setOrderBy(java.lang.String value) { * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the most recent version of the + * - `create_time`: corresponds to the time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. @@ -1284,7 +1256,7 @@ public Builder clearOrderBy() { * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the most recent version of the + * - `create_time`: corresponds to the time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java index 5e85a54a74d3..c354e9ddda75 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java @@ -35,10 +35,6 @@ public interface ListStoredInfoTypesRequestOrBuilder * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> - * + Organizations scope, location specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: @@ -64,10 +60,6 @@ public interface ListStoredInfoTypesRequestOrBuilder * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> * + Projects scope, no location specified (defaults to global):<br/> * `projects/`<var>PROJECT_ID</var> - * + Organizations scope, location specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> * The following example `parent` string specifies a parent project with the * identifier `example-project`, and specifies the `europe-west3` location * for processing data: @@ -113,7 +105,7 @@ public interface ListStoredInfoTypesRequestOrBuilder * * *
-   * Size of the page, can be limited by server. If zero server returns
+   * Size of the page, can be limited by the server. If zero server returns
    * a page of max size 100.
    * 
* @@ -133,7 +125,7 @@ public interface ListStoredInfoTypesRequestOrBuilder * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the most recent version of the + * - `create_time`: corresponds to the time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. @@ -155,7 +147,7 @@ public interface ListStoredInfoTypesRequestOrBuilder * insignificant. * Example: `name asc, display_name, create_time desc` * Supported fields are: - * - `create_time`: corresponds to time the most recent version of the + * - `create_time`: corresponds to the time the most recent version of the * resource was created. * - `state`: corresponds to the state of the resource. * - `name`: corresponds to resource name. diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java index 90d30b094b4c..b57c84af50a9 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java @@ -193,7 +193,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(1); + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(4); } private static final MatchingType[] VALUES = values(); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java index ec7c0ce66022..4b6dd93dbc6b 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java @@ -129,7 +129,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(3); + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(6); } private static final MetadataType[] VALUES = values(); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java index 33293db29ce3..0de4357f4f1a 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java @@ -81,6 +81,11 @@ private OtherInfoTypeSummary( infoType_ = subBuilder.buildPartial(); } + break; + } + case 16: + { + estimatedPrevalence_ = input.readInt32(); break; } default: @@ -165,6 +170,25 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { return getInfoType(); } + public static final int ESTIMATED_PREVALENCE_FIELD_NUMBER = 2; + private int estimatedPrevalence_; + /** + * + * + *
+   * Approximate percentage of non-null rows that contained data detected by
+   * this infotype.
+   * 
+ * + * int32 estimated_prevalence = 2; + * + * @return The estimatedPrevalence. + */ + @java.lang.Override + public int getEstimatedPrevalence() { + return estimatedPrevalence_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -182,6 +206,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (infoType_ != null) { output.writeMessage(1, getInfoType()); } + if (estimatedPrevalence_ != 0) { + output.writeInt32(2, estimatedPrevalence_); + } unknownFields.writeTo(output); } @@ -194,6 +221,9 @@ public int getSerializedSize() { if (infoType_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInfoType()); } + if (estimatedPrevalence_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, estimatedPrevalence_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -214,6 +244,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInfoType()) { if (!getInfoType().equals(other.getInfoType())) return false; } + if (getEstimatedPrevalence() != other.getEstimatedPrevalence()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -229,6 +260,8 @@ public int hashCode() { hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; hash = (53 * hash) + getInfoType().hashCode(); } + hash = (37 * hash) + ESTIMATED_PREVALENCE_FIELD_NUMBER; + hash = (53 * hash) + getEstimatedPrevalence(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -380,6 +413,8 @@ public Builder clear() { infoType_ = null; infoTypeBuilder_ = null; } + estimatedPrevalence_ = 0; + return this; } @@ -412,6 +447,7 @@ public com.google.privacy.dlp.v2.OtherInfoTypeSummary buildPartial() { } else { result.infoType_ = infoTypeBuilder_.build(); } + result.estimatedPrevalence_ = estimatedPrevalence_; onBuilt(); return result; } @@ -464,6 +500,9 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.OtherInfoTypeSummary other) { if (other.hasInfoType()) { mergeInfoType(other.getInfoType()); } + if (other.getEstimatedPrevalence() != 0) { + setEstimatedPrevalence(other.getEstimatedPrevalence()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -678,6 +717,61 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { return infoTypeBuilder_; } + private int estimatedPrevalence_; + /** + * + * + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * + * @return The estimatedPrevalence. + */ + @java.lang.Override + public int getEstimatedPrevalence() { + return estimatedPrevalence_; + } + /** + * + * + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * + * @param value The estimatedPrevalence to set. + * @return This builder for chaining. + */ + public Builder setEstimatedPrevalence(int value) { + + estimatedPrevalence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Approximate percentage of non-null rows that contained data detected by
+     * this infotype.
+     * 
+ * + * int32 estimated_prevalence = 2; + * + * @return This builder for chaining. + */ + public Builder clearEstimatedPrevalence() { + + estimatedPrevalence_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java index 254dc6ecbe8f..f9f80b3deaf3 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java @@ -57,4 +57,18 @@ public interface OtherInfoTypeSummaryOrBuilder * .google.privacy.dlp.v2.InfoType info_type = 1; */ com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + * + * + *
+   * Approximate percentage of non-null rows that contained data detected by
+   * this infotype.
+   * 
+ * + * int32 estimated_prevalence = 2; + * + * @return The estimatedPrevalence. + */ + int getEstimatedPrevalence(); } diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java index 5ba9ff716e02..664060bd49e3 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java @@ -165,7 +165,7 @@ public enum OutputSchema implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Schema tailored to findings from scanning Google Cloud Storage.
+     * Schema tailored to findings from scanning Cloud Storage.
      * 
* * GCS_COLUMNS = 2; @@ -229,7 +229,7 @@ public enum OutputSchema implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Schema tailored to findings from scanning Google Cloud Storage.
+     * Schema tailored to findings from scanning Cloud Storage.
      * 
* * GCS_COLUMNS = 2; @@ -407,8 +407,8 @@ public TypeCase getTypeCase() { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -433,8 +433,8 @@ public boolean hasTable() { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -462,8 +462,8 @@ public com.google.privacy.dlp.v2.BigQueryTable getTable() { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -927,8 +927,8 @@ public Builder clearType() { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -953,8 +953,8 @@ public boolean hasTable() { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -989,8 +989,8 @@ public com.google.privacy.dlp.v2.BigQueryTable getTable() { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -1022,8 +1022,8 @@ public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -1052,8 +1052,8 @@ public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable.Builder builderF * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -1095,8 +1095,8 @@ public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -1131,8 +1131,8 @@ public Builder clearTable() { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -1154,8 +1154,8 @@ public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -1185,8 +1185,8 @@ public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java index d949dab457de..258fee82f499 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java @@ -30,8 +30,8 @@ public interface OutputStorageConfigOrBuilder * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -53,8 +53,8 @@ public interface OutputStorageConfigOrBuilder * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous @@ -76,8 +76,8 @@ public interface OutputStorageConfigOrBuilder * Store findings in an existing table or a new table in an existing * dataset. If table_id is not set a new one will be generated * for you with the following format: - * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - * generating the date details. + * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + * for generating the date details. * For Inspect, each column in an existing output table must have the same * name, type, and mode of a field in the `Finding` object. * For Risk, an existing output table should be the output of a previous diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java index dad16cd68206..6fc733559b60 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java @@ -2513,7 +2513,7 @@ public interface ExpressionsOrBuilder * * *
-   * An expression, consisting or an operator and conditions.
+   * An expression, consisting of an operator and conditions.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Expressions} @@ -3099,7 +3099,7 @@ protected Builder newBuilderForType( * * *
-     * An expression, consisting or an operator and conditions.
+     * An expression, consisting of an operator and conditions.
      * 
* * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Expressions} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java similarity index 71% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java index a0e1b01e8622..6f59bb29c903 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformation.java @@ -1,36 +1,49 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; -/** - * Protobuf type {@code google.privacy.dlp.v2.RecordTransformation} - */ -public final class RecordTransformation extends - com.google.protobuf.GeneratedMessageV3 implements +/** Protobuf type {@code google.privacy.dlp.v2.RecordTransformation} */ +public final class RecordTransformation extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordTransformation) RecordTransformationOrBuilder { -private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use RecordTransformation.newBuilder() to construct. private RecordTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } + private RecordTransformation() { containerVersion_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new RecordTransformation(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private RecordTransformation( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -49,45 +62,50 @@ private RecordTransformation( case 0: done = true; break; - case 10: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (fieldId_ != null) { - subBuilder = fieldId_.toBuilder(); - } - fieldId_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fieldId_); - fieldId_ = subBuilder.buildPartial(); - } + case 10: + { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (fieldId_ != null) { + subBuilder = fieldId_.toBuilder(); + } + fieldId_ = + input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fieldId_); + fieldId_ = subBuilder.buildPartial(); + } - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (containerTimestamp_ != null) { - subBuilder = containerTimestamp_.toBuilder(); - } - containerTimestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(containerTimestamp_); - containerTimestamp_ = subBuilder.buildPartial(); + break; } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (containerTimestamp_ != null) { + subBuilder = containerTimestamp_.toBuilder(); + } + containerTimestamp_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(containerTimestamp_); + containerTimestamp_ = subBuilder.buildPartial(); + } - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); - containerVersion_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + containerVersion_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -95,34 +113,39 @@ private RecordTransformation( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordTransformation.class, com.google.privacy.dlp.v2.RecordTransformation.Builder.class); + com.google.privacy.dlp.v2.RecordTransformation.class, + com.google.privacy.dlp.v2.RecordTransformation.Builder.class); } public static final int FIELD_ID_FIELD_NUMBER = 1; private com.google.privacy.dlp.v2.FieldId fieldId_; /** + * + * *
    * For record transformations, provide a field.
    * 
* * .google.privacy.dlp.v2.FieldId field_id = 1; + * * @return Whether the fieldId field is set. */ @java.lang.Override @@ -130,11 +153,14 @@ public boolean hasFieldId() { return fieldId_ != null; } /** + * + * *
    * For record transformations, provide a field.
    * 
* * .google.privacy.dlp.v2.FieldId field_id = 1; + * * @return The fieldId. */ @java.lang.Override @@ -142,6 +168,8 @@ public com.google.privacy.dlp.v2.FieldId getFieldId() { return fieldId_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; } /** + * + * *
    * For record transformations, provide a field.
    * 
@@ -156,11 +184,14 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { public static final int CONTAINER_TIMESTAMP_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp containerTimestamp_; /** + * + * *
    * Findings container modification timestamp, if applicable.
    * 
* * .google.protobuf.Timestamp container_timestamp = 2; + * * @return Whether the containerTimestamp field is set. */ @java.lang.Override @@ -168,18 +199,25 @@ public boolean hasContainerTimestamp() { return containerTimestamp_ != null; } /** + * + * *
    * Findings container modification timestamp, if applicable.
    * 
* * .google.protobuf.Timestamp container_timestamp = 2; + * * @return The containerTimestamp. */ @java.lang.Override public com.google.protobuf.Timestamp getContainerTimestamp() { - return containerTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; + return containerTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : containerTimestamp_; } /** + * + * *
    * Findings container modification timestamp, if applicable.
    * 
@@ -194,11 +232,14 @@ public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { public static final int CONTAINER_VERSION_FIELD_NUMBER = 3; private volatile java.lang.Object containerVersion_; /** + * + * *
    * Container version, if available ("generation" for Cloud Storage).
    * 
* * string container_version = 3; + * * @return The containerVersion. */ @java.lang.Override @@ -207,29 +248,29 @@ public java.lang.String getContainerVersion() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); containerVersion_ = s; return s; } } /** + * + * *
    * Container version, if available ("generation" for Cloud Storage).
    * 
* * string container_version = 3; + * * @return The bytes for containerVersion. */ @java.lang.Override - public com.google.protobuf.ByteString - getContainerVersionBytes() { + public com.google.protobuf.ByteString getContainerVersionBytes() { java.lang.Object ref = containerVersion_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); containerVersion_ = b; return b; } else { @@ -238,6 +279,7 @@ public java.lang.String getContainerVersion() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -249,8 +291,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (fieldId_ != null) { output.writeMessage(1, getFieldId()); } @@ -270,12 +311,10 @@ public int getSerializedSize() { size = 0; if (fieldId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getFieldId()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFieldId()); } if (containerTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getContainerTimestamp()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContainerTimestamp()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, containerVersion_); @@ -288,25 +327,23 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.privacy.dlp.v2.RecordTransformation)) { return super.equals(obj); } - com.google.privacy.dlp.v2.RecordTransformation other = (com.google.privacy.dlp.v2.RecordTransformation) obj; + com.google.privacy.dlp.v2.RecordTransformation other = + (com.google.privacy.dlp.v2.RecordTransformation) obj; if (hasFieldId() != other.hasFieldId()) return false; if (hasFieldId()) { - if (!getFieldId() - .equals(other.getFieldId())) return false; + if (!getFieldId().equals(other.getFieldId())) return false; } if (hasContainerTimestamp() != other.hasContainerTimestamp()) return false; if (hasContainerTimestamp()) { - if (!getContainerTimestamp() - .equals(other.getContainerTimestamp())) return false; + if (!getContainerTimestamp().equals(other.getContainerTimestamp())) return false; } - if (!getContainerVersion() - .equals(other.getContainerVersion())) return false; + if (!getContainerVersion().equals(other.getContainerVersion())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -333,114 +370,119 @@ public int hashCode() { return hash; } - public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( - java.nio.ByteBuffer data) + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.RecordTransformation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.RecordTransformation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.RecordTransformation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.RecordTransformation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(com.google.privacy.dlp.v2.RecordTransformation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code google.privacy.dlp.v2.RecordTransformation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + /** Protobuf type {@code google.privacy.dlp.v2.RecordTransformation} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordTransformation) com.google.privacy.dlp.v2.RecordTransformationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordTransformation.class, com.google.privacy.dlp.v2.RecordTransformation.Builder.class); + com.google.privacy.dlp.v2.RecordTransformation.class, + com.google.privacy.dlp.v2.RecordTransformation.Builder.class); } // Construct using com.google.privacy.dlp.v2.RecordTransformation.newBuilder() @@ -448,16 +490,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -479,9 +520,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; } @java.lang.Override @@ -500,7 +541,8 @@ public com.google.privacy.dlp.v2.RecordTransformation build() { @java.lang.Override public com.google.privacy.dlp.v2.RecordTransformation buildPartial() { - com.google.privacy.dlp.v2.RecordTransformation result = new com.google.privacy.dlp.v2.RecordTransformation(this); + com.google.privacy.dlp.v2.RecordTransformation result = + new com.google.privacy.dlp.v2.RecordTransformation(this); if (fieldIdBuilder_ == null) { result.fieldId_ = fieldId_; } else { @@ -520,38 +562,39 @@ public com.google.privacy.dlp.v2.RecordTransformation buildPartial() { public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.privacy.dlp.v2.RecordTransformation) { - return mergeFrom((com.google.privacy.dlp.v2.RecordTransformation)other); + return mergeFrom((com.google.privacy.dlp.v2.RecordTransformation) other); } else { super.mergeFrom(other); return this; @@ -601,24 +644,33 @@ public Builder mergeFrom( private com.google.privacy.dlp.v2.FieldId fieldId_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldIdBuilder_; + com.google.privacy.dlp.v2.FieldId, + com.google.privacy.dlp.v2.FieldId.Builder, + com.google.privacy.dlp.v2.FieldIdOrBuilder> + fieldIdBuilder_; /** + * + * *
      * For record transformations, provide a field.
      * 
* * .google.privacy.dlp.v2.FieldId field_id = 1; + * * @return Whether the fieldId field is set. */ public boolean hasFieldId() { return fieldIdBuilder_ != null || fieldId_ != null; } /** + * + * *
      * For record transformations, provide a field.
      * 
* * .google.privacy.dlp.v2.FieldId field_id = 1; + * * @return The fieldId. */ public com.google.privacy.dlp.v2.FieldId getFieldId() { @@ -629,6 +681,8 @@ public com.google.privacy.dlp.v2.FieldId getFieldId() { } } /** + * + * *
      * For record transformations, provide a field.
      * 
@@ -649,14 +703,15 @@ public Builder setFieldId(com.google.privacy.dlp.v2.FieldId value) { return this; } /** + * + * *
      * For record transformations, provide a field.
      * 
* * .google.privacy.dlp.v2.FieldId field_id = 1; */ - public Builder setFieldId( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + public Builder setFieldId(com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { if (fieldIdBuilder_ == null) { fieldId_ = builderForValue.build(); onChanged(); @@ -667,6 +722,8 @@ public Builder setFieldId( return this; } /** + * + * *
      * For record transformations, provide a field.
      * 
@@ -677,7 +734,9 @@ public Builder mergeFieldId(com.google.privacy.dlp.v2.FieldId value) { if (fieldIdBuilder_ == null) { if (fieldId_ != null) { fieldId_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(fieldId_).mergeFrom(value).buildPartial(); + com.google.privacy.dlp.v2.FieldId.newBuilder(fieldId_) + .mergeFrom(value) + .buildPartial(); } else { fieldId_ = value; } @@ -689,6 +748,8 @@ public Builder mergeFieldId(com.google.privacy.dlp.v2.FieldId value) { return this; } /** + * + * *
      * For record transformations, provide a field.
      * 
@@ -707,6 +768,8 @@ public Builder clearFieldId() { return this; } /** + * + * *
      * For record transformations, provide a field.
      * 
@@ -714,11 +777,13 @@ public Builder clearFieldId() { * .google.privacy.dlp.v2.FieldId field_id = 1; */ public com.google.privacy.dlp.v2.FieldId.Builder getFieldIdBuilder() { - + onChanged(); return getFieldIdFieldBuilder().getBuilder(); } /** + * + * *
      * For record transformations, provide a field.
      * 
@@ -729,11 +794,12 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { if (fieldIdBuilder_ != null) { return fieldIdBuilder_.getMessageOrBuilder(); } else { - return fieldId_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; + return fieldId_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; } } /** + * + * *
      * For record transformations, provide a field.
      * 
@@ -741,14 +807,17 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { * .google.privacy.dlp.v2.FieldId field_id = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + com.google.privacy.dlp.v2.FieldId, + com.google.privacy.dlp.v2.FieldId.Builder, + com.google.privacy.dlp.v2.FieldIdOrBuilder> getFieldIdFieldBuilder() { if (fieldIdBuilder_ == null) { - fieldIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getFieldId(), - getParentForChildren(), - isClean()); + fieldIdBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, + com.google.privacy.dlp.v2.FieldId.Builder, + com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getFieldId(), getParentForChildren(), isClean()); fieldId_ = null; } return fieldIdBuilder_; @@ -756,34 +825,47 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { private com.google.protobuf.Timestamp containerTimestamp_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> containerTimestampBuilder_; + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + containerTimestampBuilder_; /** + * + * *
      * Findings container modification timestamp, if applicable.
      * 
* * .google.protobuf.Timestamp container_timestamp = 2; + * * @return Whether the containerTimestamp field is set. */ public boolean hasContainerTimestamp() { return containerTimestampBuilder_ != null || containerTimestamp_ != null; } /** + * + * *
      * Findings container modification timestamp, if applicable.
      * 
* * .google.protobuf.Timestamp container_timestamp = 2; + * * @return The containerTimestamp. */ public com.google.protobuf.Timestamp getContainerTimestamp() { if (containerTimestampBuilder_ == null) { - return containerTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; + return containerTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : containerTimestamp_; } else { return containerTimestampBuilder_.getMessage(); } } /** + * + * *
      * Findings container modification timestamp, if applicable.
      * 
@@ -804,14 +886,15 @@ public Builder setContainerTimestamp(com.google.protobuf.Timestamp value) { return this; } /** + * + * *
      * Findings container modification timestamp, if applicable.
      * 
* * .google.protobuf.Timestamp container_timestamp = 2; */ - public Builder setContainerTimestamp( - com.google.protobuf.Timestamp.Builder builderForValue) { + public Builder setContainerTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { if (containerTimestampBuilder_ == null) { containerTimestamp_ = builderForValue.build(); onChanged(); @@ -822,6 +905,8 @@ public Builder setContainerTimestamp( return this; } /** + * + * *
      * Findings container modification timestamp, if applicable.
      * 
@@ -832,7 +917,9 @@ public Builder mergeContainerTimestamp(com.google.protobuf.Timestamp value) { if (containerTimestampBuilder_ == null) { if (containerTimestamp_ != null) { containerTimestamp_ = - com.google.protobuf.Timestamp.newBuilder(containerTimestamp_).mergeFrom(value).buildPartial(); + com.google.protobuf.Timestamp.newBuilder(containerTimestamp_) + .mergeFrom(value) + .buildPartial(); } else { containerTimestamp_ = value; } @@ -844,6 +931,8 @@ public Builder mergeContainerTimestamp(com.google.protobuf.Timestamp value) { return this; } /** + * + * *
      * Findings container modification timestamp, if applicable.
      * 
@@ -862,6 +951,8 @@ public Builder clearContainerTimestamp() { return this; } /** + * + * *
      * Findings container modification timestamp, if applicable.
      * 
@@ -869,11 +960,13 @@ public Builder clearContainerTimestamp() { * .google.protobuf.Timestamp container_timestamp = 2; */ public com.google.protobuf.Timestamp.Builder getContainerTimestampBuilder() { - + onChanged(); return getContainerTimestampFieldBuilder().getBuilder(); } /** + * + * *
      * Findings container modification timestamp, if applicable.
      * 
@@ -884,11 +977,14 @@ public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { if (containerTimestampBuilder_ != null) { return containerTimestampBuilder_.getMessageOrBuilder(); } else { - return containerTimestamp_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; + return containerTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : containerTimestamp_; } } /** + * + * *
      * Findings container modification timestamp, if applicable.
      * 
@@ -896,14 +992,17 @@ public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { * .google.protobuf.Timestamp container_timestamp = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> getContainerTimestampFieldBuilder() { if (containerTimestampBuilder_ == null) { - containerTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getContainerTimestamp(), - getParentForChildren(), - isClean()); + containerTimestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getContainerTimestamp(), getParentForChildren(), isClean()); containerTimestamp_ = null; } return containerTimestampBuilder_; @@ -911,18 +1010,20 @@ public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { private java.lang.Object containerVersion_ = ""; /** + * + * *
      * Container version, if available ("generation" for Cloud Storage).
      * 
* * string container_version = 3; + * * @return The containerVersion. */ public java.lang.String getContainerVersion() { java.lang.Object ref = containerVersion_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); containerVersion_ = s; return s; @@ -931,20 +1032,21 @@ public java.lang.String getContainerVersion() { } } /** + * + * *
      * Container version, if available ("generation" for Cloud Storage).
      * 
* * string container_version = 3; + * * @return The bytes for containerVersion. */ - public com.google.protobuf.ByteString - getContainerVersionBytes() { + public com.google.protobuf.ByteString getContainerVersionBytes() { java.lang.Object ref = containerVersion_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); containerVersion_ = b; return b; } else { @@ -952,61 +1054,68 @@ public java.lang.String getContainerVersion() { } } /** + * + * *
      * Container version, if available ("generation" for Cloud Storage).
      * 
* * string container_version = 3; + * * @param value The containerVersion to set. * @return This builder for chaining. */ - public Builder setContainerVersion( - java.lang.String value) { + public Builder setContainerVersion(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + containerVersion_ = value; onChanged(); return this; } /** + * + * *
      * Container version, if available ("generation" for Cloud Storage).
      * 
* * string container_version = 3; + * * @return This builder for chaining. */ public Builder clearContainerVersion() { - + containerVersion_ = getDefaultInstance().getContainerVersion(); onChanged(); return this; } /** + * + * *
      * Container version, if available ("generation" for Cloud Storage).
      * 
* * string container_version = 3; + * * @param value The bytes for containerVersion to set. * @return This builder for chaining. */ - public Builder setContainerVersionBytes( - com.google.protobuf.ByteString value) { + public Builder setContainerVersionBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + containerVersion_ = value; onChanged(); return this; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1016,12 +1125,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordTransformation) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordTransformation) private static final com.google.privacy.dlp.v2.RecordTransformation DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordTransformation(); } @@ -1030,16 +1139,16 @@ public static com.google.privacy.dlp.v2.RecordTransformation getDefaultInstance( return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RecordTransformation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RecordTransformation(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecordTransformation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RecordTransformation(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1054,6 +1163,4 @@ public com.google.protobuf.Parser getParserForType() { public com.google.privacy.dlp.v2.RecordTransformation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java similarity index 72% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java index 0d0990a303ca..e9253af09cc2 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationOrBuilder.java @@ -1,31 +1,55 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; -public interface RecordTransformationOrBuilder extends +public interface RecordTransformationOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordTransformation) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * For record transformations, provide a field.
    * 
* * .google.privacy.dlp.v2.FieldId field_id = 1; + * * @return Whether the fieldId field is set. */ boolean hasFieldId(); /** + * + * *
    * For record transformations, provide a field.
    * 
* * .google.privacy.dlp.v2.FieldId field_id = 1; + * * @return The fieldId. */ com.google.privacy.dlp.v2.FieldId getFieldId(); /** + * + * *
    * For record transformations, provide a field.
    * 
@@ -35,24 +59,32 @@ public interface RecordTransformationOrBuilder extends com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder(); /** + * + * *
    * Findings container modification timestamp, if applicable.
    * 
* * .google.protobuf.Timestamp container_timestamp = 2; + * * @return Whether the containerTimestamp field is set. */ boolean hasContainerTimestamp(); /** + * + * *
    * Findings container modification timestamp, if applicable.
    * 
* * .google.protobuf.Timestamp container_timestamp = 2; + * * @return The containerTimestamp. */ com.google.protobuf.Timestamp getContainerTimestamp(); /** + * + * *
    * Findings container modification timestamp, if applicable.
    * 
@@ -62,22 +94,27 @@ public interface RecordTransformationOrBuilder extends com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder(); /** + * + * *
    * Container version, if available ("generation" for Cloud Storage).
    * 
* * string container_version = 3; + * * @return The containerVersion. */ java.lang.String getContainerVersion(); /** + * + * *
    * Container version, if available ("generation" for Cloud Storage).
    * 
* * string container_version = 3; + * * @return The bytes for containerVersion. */ - com.google.protobuf.ByteString - getContainerVersionBytes(); + com.google.protobuf.ByteString getContainerVersionBytes(); } diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java index a69ceaa09788..d020c9e28ad6 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java @@ -22,7 +22,7 @@ * * *
- * Results of re-identifying a item.
+ * Results of re-identifying an item.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentResponse} @@ -412,7 +412,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Results of re-identifying a item.
+   * Results of re-identifying an item.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentResponse} diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java index 3057f215c2a3..117e32da8054 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java @@ -262,7 +262,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(0); + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(3); } private static final RelationalOperator[] VALUES = values(); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java index 292665247e96..4ac4fb7a8ee2 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java @@ -153,7 +153,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(7); + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(10); } private static final ResourceVisibility[] VALUES = values(); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java index 2cbe42ce37b5..2b0a0c9a74a3 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java @@ -167,7 +167,7 @@ public OptionCase getOptionCase() { * * *
-   * With this option a job is started a regular periodic basis. For
+   * With this option a job is started on a regular periodic basis. For
    * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
@@ -187,7 +187,7 @@ public boolean hasRecurrencePeriodDuration() {
    *
    *
    * 
-   * With this option a job is started a regular periodic basis. For
+   * With this option a job is started on a regular periodic basis. For
    * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
@@ -210,7 +210,7 @@ public com.google.protobuf.Duration getRecurrencePeriodDuration() {
    *
    *
    * 
-   * With this option a job is started a regular periodic basis. For
+   * With this option a job is started on a regular periodic basis. For
    * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
@@ -594,7 +594,7 @@ public Builder clearOption() {
      *
      *
      * 
-     * With this option a job is started a regular periodic basis. For
+     * With this option a job is started on a regular periodic basis. For
      * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
@@ -614,7 +614,7 @@ public boolean hasRecurrencePeriodDuration() {
      *
      *
      * 
-     * With this option a job is started a regular periodic basis. For
+     * With this option a job is started on a regular periodic basis. For
      * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
@@ -644,7 +644,7 @@ public com.google.protobuf.Duration getRecurrencePeriodDuration() {
      *
      *
      * 
-     * With this option a job is started a regular periodic basis. For
+     * With this option a job is started on a regular periodic basis. For
      * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
@@ -671,7 +671,7 @@ public Builder setRecurrencePeriodDuration(com.google.protobuf.Duration value) {
      *
      *
      * 
-     * With this option a job is started a regular periodic basis. For
+     * With this option a job is started on a regular periodic basis. For
      * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
@@ -696,7 +696,7 @@ public Builder setRecurrencePeriodDuration(
      *
      *
      * 
-     * With this option a job is started a regular periodic basis. For
+     * With this option a job is started on a regular periodic basis. For
      * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
@@ -731,7 +731,7 @@ public Builder mergeRecurrencePeriodDuration(com.google.protobuf.Duration value)
      *
      *
      * 
-     * With this option a job is started a regular periodic basis. For
+     * With this option a job is started on a regular periodic basis. For
      * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
@@ -761,7 +761,7 @@ public Builder clearRecurrencePeriodDuration() {
      *
      *
      * 
-     * With this option a job is started a regular periodic basis. For
+     * With this option a job is started on a regular periodic basis. For
      * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
@@ -778,7 +778,7 @@ public com.google.protobuf.Duration.Builder getRecurrencePeriodDurationBuilder()
      *
      *
      * 
-     * With this option a job is started a regular periodic basis. For
+     * With this option a job is started on a regular periodic basis. For
      * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
@@ -803,7 +803,7 @@ public com.google.protobuf.DurationOrBuilder getRecurrencePeriodDurationOrBuilde
      *
      *
      * 
-     * With this option a job is started a regular periodic basis. For
+     * With this option a job is started on a regular periodic basis. For
      * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java
index 29d27eb9becb..70d73a970a0a 100644
--- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java
@@ -27,7 +27,7 @@ public interface ScheduleOrBuilder
    *
    *
    * 
-   * With this option a job is started a regular periodic basis. For
+   * With this option a job is started on a regular periodic basis. For
    * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
@@ -44,7 +44,7 @@ public interface ScheduleOrBuilder
    *
    *
    * 
-   * With this option a job is started a regular periodic basis. For
+   * With this option a job is started on a regular periodic basis. For
    * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
@@ -61,7 +61,7 @@ public interface ScheduleOrBuilder
    *
    *
    * 
-   * With this option a job is started a regular periodic basis. For
+   * With this option a job is started on a regular periodic basis. For
    * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java
index 6eee209467cc..6840f3b26766 100644
--- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: google/privacy/dlp/v2/dlp.proto
+// source: google/privacy/dlp/v2/storage.proto
 
 package com.google.privacy.dlp.v2;
 
@@ -100,14 +100,14 @@ private SensitivityScore(
   }
 
   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-    return com.google.privacy.dlp.v2.DlpProto
+    return com.google.privacy.dlp.v2.DlpStorage
         .internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor;
   }
 
   @java.lang.Override
   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internalGetFieldAccessorTable() {
-    return com.google.privacy.dlp.v2.DlpProto
+    return com.google.privacy.dlp.v2.DlpStorage
         .internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable
         .ensureFieldAccessorsInitialized(
             com.google.privacy.dlp.v2.SensitivityScore.class,
@@ -522,14 +522,14 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3
       // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.SensitivityScore)
       com.google.privacy.dlp.v2.SensitivityScoreOrBuilder {
     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
-      return com.google.privacy.dlp.v2.DlpProto
+      return com.google.privacy.dlp.v2.DlpStorage
           .internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return com.google.privacy.dlp.v2.DlpProto
+      return com.google.privacy.dlp.v2.DlpStorage
           .internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
               com.google.privacy.dlp.v2.SensitivityScore.class,
@@ -560,7 +560,7 @@ public Builder clear() {
 
     @java.lang.Override
     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
-      return com.google.privacy.dlp.v2.DlpProto
+      return com.google.privacy.dlp.v2.DlpStorage
           .internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor;
     }
 
diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java
index 81f41487f8c3..711206d36a90 100644
--- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
-// source: google/privacy/dlp/v2/dlp.proto
+// source: google/privacy/dlp/v2/storage.proto
 
 package com.google.privacy.dlp.v2;
 
diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java
index 58892c9b98d7..9939122342a6 100644
--- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java
@@ -272,7 +272,7 @@ public interface TimespanConfigOrBuilder
      * 
      * Specification of the field containing the timestamp of scanned items.
      * Used for data sources like Datastore and BigQuery.
-     * For BigQuery:
+     * <b>For BigQuery</b>
      * If this value is not specified and the table was modified between the
      * given start and end times, the entire table will be scanned. If this
      * value is specified, then rows are filtered based on the given start and
@@ -280,11 +280,23 @@ public interface TimespanConfigOrBuilder
      * skipped.
      * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
      * `TIMESTAMP`, and `DATETIME`.
-     * For Datastore:
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
      * If this value is specified, then entities are filtered based on the given
      * start and end times. If an entity does not contain the provided timestamp
      * property or contains empty or invalid values, then it is included.
      * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
      * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -298,7 +310,7 @@ public interface TimespanConfigOrBuilder *
      * Specification of the field containing the timestamp of scanned items.
      * Used for data sources like Datastore and BigQuery.
-     * For BigQuery:
+     * <b>For BigQuery</b>
      * If this value is not specified and the table was modified between the
      * given start and end times, the entire table will be scanned. If this
      * value is specified, then rows are filtered based on the given start and
@@ -306,11 +318,23 @@ public interface TimespanConfigOrBuilder
      * skipped.
      * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
      * `TIMESTAMP`, and `DATETIME`.
-     * For Datastore:
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
      * If this value is specified, then entities are filtered based on the given
      * start and end times. If an entity does not contain the provided timestamp
      * property or contains empty or invalid values, then it is included.
      * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
      * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -324,7 +348,7 @@ public interface TimespanConfigOrBuilder *
      * Specification of the field containing the timestamp of scanned items.
      * Used for data sources like Datastore and BigQuery.
-     * For BigQuery:
+     * <b>For BigQuery</b>
      * If this value is not specified and the table was modified between the
      * given start and end times, the entire table will be scanned. If this
      * value is specified, then rows are filtered based on the given start and
@@ -332,11 +356,23 @@ public interface TimespanConfigOrBuilder
      * skipped.
      * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
      * `TIMESTAMP`, and `DATETIME`.
-     * For Datastore:
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
      * If this value is specified, then entities are filtered based on the given
      * start and end times. If an entity does not contain the provided timestamp
      * property or contains empty or invalid values, then it is included.
      * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
      * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -350,7 +386,8 @@ public interface TimespanConfigOrBuilder * When the job is started by a JobTrigger we will automatically figure out * a valid start_time to avoid scanning files that have not been modified * since the last time the JobTrigger executed. This will be based on the - * time of the execution of the last run of the JobTrigger. + * time of the execution of the last run of the JobTrigger or the timespan + * end_time used in the last run of the JobTrigger. *
* * bool enable_auto_population_of_timespan_config = 4; @@ -364,7 +401,7 @@ public interface TimespanConfigOrBuilder * *
    * Configuration of the timespan of the items to include in scanning.
-   * Currently only supported when inspecting Google Cloud Storage and BigQuery.
+   * Currently only supported when inspecting Cloud Storage and BigQuery.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.StorageConfig.TimespanConfig} @@ -603,7 +640,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { *
      * Specification of the field containing the timestamp of scanned items.
      * Used for data sources like Datastore and BigQuery.
-     * For BigQuery:
+     * <b>For BigQuery</b>
      * If this value is not specified and the table was modified between the
      * given start and end times, the entire table will be scanned. If this
      * value is specified, then rows are filtered based on the given start and
@@ -611,11 +648,23 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
      * skipped.
      * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
      * `TIMESTAMP`, and `DATETIME`.
-     * For Datastore:
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
      * If this value is specified, then entities are filtered based on the given
      * start and end times. If an entity does not contain the provided timestamp
      * property or contains empty or invalid values, then it is included.
      * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
      * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -632,7 +681,7 @@ public boolean hasTimestampField() { *
      * Specification of the field containing the timestamp of scanned items.
      * Used for data sources like Datastore and BigQuery.
-     * For BigQuery:
+     * <b>For BigQuery</b>
      * If this value is not specified and the table was modified between the
      * given start and end times, the entire table will be scanned. If this
      * value is specified, then rows are filtered based on the given start and
@@ -640,11 +689,23 @@ public boolean hasTimestampField() {
      * skipped.
      * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
      * `TIMESTAMP`, and `DATETIME`.
-     * For Datastore:
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
      * If this value is specified, then entities are filtered based on the given
      * start and end times. If an entity does not contain the provided timestamp
      * property or contains empty or invalid values, then it is included.
      * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
      * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -663,7 +724,7 @@ public com.google.privacy.dlp.v2.FieldId getTimestampField() { *
      * Specification of the field containing the timestamp of scanned items.
      * Used for data sources like Datastore and BigQuery.
-     * For BigQuery:
+     * <b>For BigQuery</b>
      * If this value is not specified and the table was modified between the
      * given start and end times, the entire table will be scanned. If this
      * value is specified, then rows are filtered based on the given start and
@@ -671,11 +732,23 @@ public com.google.privacy.dlp.v2.FieldId getTimestampField() {
      * skipped.
      * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
      * `TIMESTAMP`, and `DATETIME`.
-     * For Datastore:
+     * If your BigQuery table is [partitioned at ingestion
+     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+     * you can use any of the following pseudo-columns as your timestamp field.
+     * When used with Cloud DLP, these pseudo-column names are case sensitive.
+     * <ul>
+     * <li><code>_PARTITIONTIME</code></li>
+     * <li><code>_PARTITIONDATE</code></li>
+     * <li><code>_PARTITION_LOAD_TIME</code></li>
+     * </ul>
+     * <b>For Datastore</b>
      * If this value is specified, then entities are filtered based on the given
      * start and end times. If an entity does not contain the provided timestamp
      * property or contains empty or invalid values, then it is included.
      * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+     * See the
+     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+     * related to this operation.
      * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -694,7 +767,8 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder() { * When the job is started by a JobTrigger we will automatically figure out * a valid start_time to avoid scanning files that have not been modified * since the last time the JobTrigger executed. This will be based on the - * time of the execution of the last run of the JobTrigger. + * time of the execution of the last run of the JobTrigger or the timespan + * end_time used in the last run of the JobTrigger. *
* * bool enable_auto_population_of_timespan_config = 4; @@ -919,7 +993,7 @@ protected Builder newBuilderForType( * *
      * Configuration of the timespan of the items to include in scanning.
-     * Currently only supported when inspecting Google Cloud Storage and BigQuery.
+     * Currently only supported when inspecting Cloud Storage and BigQuery.
      * 
* * Protobuf type {@code google.privacy.dlp.v2.StorageConfig.TimespanConfig} @@ -1512,7 +1586,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { *
        * Specification of the field containing the timestamp of scanned items.
        * Used for data sources like Datastore and BigQuery.
-       * For BigQuery:
+       * <b>For BigQuery</b>
        * If this value is not specified and the table was modified between the
        * given start and end times, the entire table will be scanned. If this
        * value is specified, then rows are filtered based on the given start and
@@ -1520,11 +1594,23 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
        * skipped.
        * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
        * `TIMESTAMP`, and `DATETIME`.
-       * For Datastore:
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
        * If this value is specified, then entities are filtered based on the given
        * start and end times. If an entity does not contain the provided timestamp
        * property or contains empty or invalid values, then it is included.
        * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
        * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -1540,7 +1626,7 @@ public boolean hasTimestampField() { *
        * Specification of the field containing the timestamp of scanned items.
        * Used for data sources like Datastore and BigQuery.
-       * For BigQuery:
+       * <b>For BigQuery</b>
        * If this value is not specified and the table was modified between the
        * given start and end times, the entire table will be scanned. If this
        * value is specified, then rows are filtered based on the given start and
@@ -1548,11 +1634,23 @@ public boolean hasTimestampField() {
        * skipped.
        * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
        * `TIMESTAMP`, and `DATETIME`.
-       * For Datastore:
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
        * If this value is specified, then entities are filtered based on the given
        * start and end times. If an entity does not contain the provided timestamp
        * property or contains empty or invalid values, then it is included.
        * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
        * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -1574,7 +1672,7 @@ public com.google.privacy.dlp.v2.FieldId getTimestampField() { *
        * Specification of the field containing the timestamp of scanned items.
        * Used for data sources like Datastore and BigQuery.
-       * For BigQuery:
+       * <b>For BigQuery</b>
        * If this value is not specified and the table was modified between the
        * given start and end times, the entire table will be scanned. If this
        * value is specified, then rows are filtered based on the given start and
@@ -1582,11 +1680,23 @@ public com.google.privacy.dlp.v2.FieldId getTimestampField() {
        * skipped.
        * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
        * `TIMESTAMP`, and `DATETIME`.
-       * For Datastore:
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
        * If this value is specified, then entities are filtered based on the given
        * start and end times. If an entity does not contain the provided timestamp
        * property or contains empty or invalid values, then it is included.
        * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
        * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -1610,7 +1720,7 @@ public Builder setTimestampField(com.google.privacy.dlp.v2.FieldId value) { *
        * Specification of the field containing the timestamp of scanned items.
        * Used for data sources like Datastore and BigQuery.
-       * For BigQuery:
+       * <b>For BigQuery</b>
        * If this value is not specified and the table was modified between the
        * given start and end times, the entire table will be scanned. If this
        * value is specified, then rows are filtered based on the given start and
@@ -1618,11 +1728,23 @@ public Builder setTimestampField(com.google.privacy.dlp.v2.FieldId value) {
        * skipped.
        * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
        * `TIMESTAMP`, and `DATETIME`.
-       * For Datastore:
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
        * If this value is specified, then entities are filtered based on the given
        * start and end times. If an entity does not contain the provided timestamp
        * property or contains empty or invalid values, then it is included.
        * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
        * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -1643,7 +1765,7 @@ public Builder setTimestampField(com.google.privacy.dlp.v2.FieldId.Builder build *
        * Specification of the field containing the timestamp of scanned items.
        * Used for data sources like Datastore and BigQuery.
-       * For BigQuery:
+       * <b>For BigQuery</b>
        * If this value is not specified and the table was modified between the
        * given start and end times, the entire table will be scanned. If this
        * value is specified, then rows are filtered based on the given start and
@@ -1651,11 +1773,23 @@ public Builder setTimestampField(com.google.privacy.dlp.v2.FieldId.Builder build
        * skipped.
        * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
        * `TIMESTAMP`, and `DATETIME`.
-       * For Datastore:
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
        * If this value is specified, then entities are filtered based on the given
        * start and end times. If an entity does not contain the provided timestamp
        * property or contains empty or invalid values, then it is included.
        * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
        * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -1683,7 +1817,7 @@ public Builder mergeTimestampField(com.google.privacy.dlp.v2.FieldId value) { *
        * Specification of the field containing the timestamp of scanned items.
        * Used for data sources like Datastore and BigQuery.
-       * For BigQuery:
+       * <b>For BigQuery</b>
        * If this value is not specified and the table was modified between the
        * given start and end times, the entire table will be scanned. If this
        * value is specified, then rows are filtered based on the given start and
@@ -1691,11 +1825,23 @@ public Builder mergeTimestampField(com.google.privacy.dlp.v2.FieldId value) {
        * skipped.
        * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
        * `TIMESTAMP`, and `DATETIME`.
-       * For Datastore:
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
        * If this value is specified, then entities are filtered based on the given
        * start and end times. If an entity does not contain the provided timestamp
        * property or contains empty or invalid values, then it is included.
        * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
        * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -1717,7 +1863,7 @@ public Builder clearTimestampField() { *
        * Specification of the field containing the timestamp of scanned items.
        * Used for data sources like Datastore and BigQuery.
-       * For BigQuery:
+       * <b>For BigQuery</b>
        * If this value is not specified and the table was modified between the
        * given start and end times, the entire table will be scanned. If this
        * value is specified, then rows are filtered based on the given start and
@@ -1725,11 +1871,23 @@ public Builder clearTimestampField() {
        * skipped.
        * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
        * `TIMESTAMP`, and `DATETIME`.
-       * For Datastore:
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
        * If this value is specified, then entities are filtered based on the given
        * start and end times. If an entity does not contain the provided timestamp
        * property or contains empty or invalid values, then it is included.
        * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
        * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -1745,7 +1903,7 @@ public com.google.privacy.dlp.v2.FieldId.Builder getTimestampFieldBuilder() { *
        * Specification of the field containing the timestamp of scanned items.
        * Used for data sources like Datastore and BigQuery.
-       * For BigQuery:
+       * <b>For BigQuery</b>
        * If this value is not specified and the table was modified between the
        * given start and end times, the entire table will be scanned. If this
        * value is specified, then rows are filtered based on the given start and
@@ -1753,11 +1911,23 @@ public com.google.privacy.dlp.v2.FieldId.Builder getTimestampFieldBuilder() {
        * skipped.
        * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
        * `TIMESTAMP`, and `DATETIME`.
-       * For Datastore:
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
        * If this value is specified, then entities are filtered based on the given
        * start and end times. If an entity does not contain the provided timestamp
        * property or contains empty or invalid values, then it is included.
        * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
        * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -1777,7 +1947,7 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder() { *
        * Specification of the field containing the timestamp of scanned items.
        * Used for data sources like Datastore and BigQuery.
-       * For BigQuery:
+       * <b>For BigQuery</b>
        * If this value is not specified and the table was modified between the
        * given start and end times, the entire table will be scanned. If this
        * value is specified, then rows are filtered based on the given start and
@@ -1785,11 +1955,23 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder() {
        * skipped.
        * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
        * `TIMESTAMP`, and `DATETIME`.
-       * For Datastore:
+       * If your BigQuery table is [partitioned at ingestion
+       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
+       * you can use any of the following pseudo-columns as your timestamp field.
+       * When used with Cloud DLP, these pseudo-column names are case sensitive.
+       * <ul>
+       * <li><code>_PARTITIONTIME</code></li>
+       * <li><code>_PARTITIONDATE</code></li>
+       * <li><code>_PARTITION_LOAD_TIME</code></li>
+       * </ul>
+       * <b>For Datastore</b>
        * If this value is specified, then entities are filtered based on the given
        * start and end times. If an entity does not contain the provided timestamp
        * property or contains empty or invalid values, then it is included.
        * Valid data types of the provided timestamp property are: `TIMESTAMP`.
+       * See the
+       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
+       * related to this operation.
        * 
* * .google.privacy.dlp.v2.FieldId timestamp_field = 3; @@ -1819,7 +2001,8 @@ public com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder() { * When the job is started by a JobTrigger we will automatically figure out * a valid start_time to avoid scanning files that have not been modified * since the last time the JobTrigger executed. This will be based on the - * time of the execution of the last run of the JobTrigger. + * time of the execution of the last run of the JobTrigger or the timespan + * end_time used in the last run of the JobTrigger. *
* * bool enable_auto_population_of_timespan_config = 4; @@ -1837,7 +2020,8 @@ public boolean getEnableAutoPopulationOfTimespanConfig() { * When the job is started by a JobTrigger we will automatically figure out * a valid start_time to avoid scanning files that have not been modified * since the last time the JobTrigger executed. This will be based on the - * time of the execution of the last run of the JobTrigger. + * time of the execution of the last run of the JobTrigger or the timespan + * end_time used in the last run of the JobTrigger. *
* * bool enable_auto_population_of_timespan_config = 4; @@ -1858,7 +2042,8 @@ public Builder setEnableAutoPopulationOfTimespanConfig(boolean value) { * When the job is started by a JobTrigger we will automatically figure out * a valid start_time to avoid scanning files that have not been modified * since the last time the JobTrigger executed. This will be based on the - * time of the execution of the last run of the JobTrigger. + * time of the execution of the last run of the JobTrigger or the timespan + * end_time used in the last run of the JobTrigger. *
* * bool enable_auto_population_of_timespan_config = 4; @@ -2033,7 +2218,7 @@ public com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder getDatastoreOptionsOr * * *
-   * Google Cloud Storage options.
+   * Cloud Storage options.
    * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -2048,7 +2233,7 @@ public boolean hasCloudStorageOptions() { * * *
-   * Google Cloud Storage options.
+   * Cloud Storage options.
    * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -2066,7 +2251,7 @@ public com.google.privacy.dlp.v2.CloudStorageOptions getCloudStorageOptions() { * * *
-   * Google Cloud Storage options.
+   * Cloud Storage options.
    * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -2896,7 +3081,7 @@ public com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder getDatastoreOptionsOr * * *
-     * Google Cloud Storage options.
+     * Cloud Storage options.
      * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -2911,7 +3096,7 @@ public boolean hasCloudStorageOptions() { * * *
-     * Google Cloud Storage options.
+     * Cloud Storage options.
      * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -2936,7 +3121,7 @@ public com.google.privacy.dlp.v2.CloudStorageOptions getCloudStorageOptions() { * * *
-     * Google Cloud Storage options.
+     * Cloud Storage options.
      * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -2958,7 +3143,7 @@ public Builder setCloudStorageOptions(com.google.privacy.dlp.v2.CloudStorageOpti * * *
-     * Google Cloud Storage options.
+     * Cloud Storage options.
      * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -2978,7 +3163,7 @@ public Builder setCloudStorageOptions( * * *
-     * Google Cloud Storage options.
+     * Cloud Storage options.
      * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -3010,7 +3195,7 @@ public Builder mergeCloudStorageOptions(com.google.privacy.dlp.v2.CloudStorageOp * * *
-     * Google Cloud Storage options.
+     * Cloud Storage options.
      * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -3035,7 +3220,7 @@ public Builder clearCloudStorageOptions() { * * *
-     * Google Cloud Storage options.
+     * Cloud Storage options.
      * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -3047,7 +3232,7 @@ public com.google.privacy.dlp.v2.CloudStorageOptions.Builder getCloudStorageOpti * * *
-     * Google Cloud Storage options.
+     * Cloud Storage options.
      * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -3068,7 +3253,7 @@ public com.google.privacy.dlp.v2.CloudStorageOptions.Builder getCloudStorageOpti * * *
-     * Google Cloud Storage options.
+     * Cloud Storage options.
      * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java index 172abf1aaf4c..69187e9989c7 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java @@ -62,7 +62,7 @@ public interface StorageConfigOrBuilder * * *
-   * Google Cloud Storage options.
+   * Cloud Storage options.
    * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -74,7 +74,7 @@ public interface StorageConfigOrBuilder * * *
-   * Google Cloud Storage options.
+   * Cloud Storage options.
    * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; @@ -86,7 +86,7 @@ public interface StorageConfigOrBuilder * * *
-   * Google Cloud Storage options.
+   * Cloud Storage options.
    * 
* * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java index 0db5f67e9e9b..45d6fd1f374d 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java @@ -203,7 +203,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(6); + return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(9); } private static final StoredInfoTypeState[] VALUES = values(); diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java index f3724a696a9a..b9a8987108af 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java @@ -322,7 +322,7 @@ public com.google.privacy.dlp.v2.StoredInfoTypeState getState() { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -345,7 +345,7 @@ public java.util.List getErrorsList() { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -369,7 +369,7 @@ public java.util.List getErrorsList() { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -392,7 +392,7 @@ public int getErrorsCount() { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -415,7 +415,7 @@ public com.google.privacy.dlp.v2.Error getErrors(int index) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1440,7 +1440,7 @@ private void ensureErrorsIsMutable() { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1466,7 +1466,7 @@ public java.util.List getErrorsList() { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1492,7 +1492,7 @@ public int getErrorsCount() { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1518,7 +1518,7 @@ public com.google.privacy.dlp.v2.Error getErrors(int index) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1550,7 +1550,7 @@ public Builder setErrors(int index, com.google.privacy.dlp.v2.Error value) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1579,7 +1579,7 @@ public Builder setErrors(int index, com.google.privacy.dlp.v2.Error.Builder buil * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1611,7 +1611,7 @@ public Builder addErrors(com.google.privacy.dlp.v2.Error value) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1643,7 +1643,7 @@ public Builder addErrors(int index, com.google.privacy.dlp.v2.Error value) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1672,7 +1672,7 @@ public Builder addErrors(com.google.privacy.dlp.v2.Error.Builder builderForValue * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1701,7 +1701,7 @@ public Builder addErrors(int index, com.google.privacy.dlp.v2.Error.Builder buil * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1731,7 +1731,7 @@ public Builder addAllErrors( * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1760,7 +1760,7 @@ public Builder clearErrors() { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1789,7 +1789,7 @@ public Builder removeErrors(int index) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1811,7 +1811,7 @@ public com.google.privacy.dlp.v2.Error.Builder getErrorsBuilder(int index) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1837,7 +1837,7 @@ public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder(int index) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1864,7 +1864,7 @@ public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder(int index) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1887,7 +1887,7 @@ public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder() { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -1910,7 +1910,7 @@ public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder(int index) { * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java index 2bc0782d24c8..e8a16d0888e5 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java @@ -132,7 +132,7 @@ public interface StoredInfoTypeVersionOrBuilder * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -152,7 +152,7 @@ public interface StoredInfoTypeVersionOrBuilder * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -172,7 +172,7 @@ public interface StoredInfoTypeVersionOrBuilder * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -192,7 +192,7 @@ public interface StoredInfoTypeVersionOrBuilder * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the @@ -212,7 +212,7 @@ public interface StoredInfoTypeVersionOrBuilder * the five most recent errors will be displayed, with the most recent error * appearing first. * For example, some of the data for stored custom dictionaries is put in - * the user's Google Cloud Storage bucket, and if this data is modified or + * the user's Cloud Storage bucket, and if this data is modified or * deleted by the user or another system, the dictionary becomes invalid. * If any errors occur, fix the problem indicated by the error message and * use the UpdateStoredInfoType API method to create another version of the diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java similarity index 76% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java index 9fbb92a348d8..2823e01cb83c 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfig.java @@ -1,9 +1,26 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; /** + * + * *
  * User specified templates and configs for how to deidentify structured,
  * unstructures, and image files. User must provide either a unstructured
@@ -12,15 +29,16 @@
  *
  * Protobuf type {@code google.privacy.dlp.v2.TransformationConfig}
  */
-public final class TransformationConfig extends
-    com.google.protobuf.GeneratedMessageV3 implements
+public final class TransformationConfig extends com.google.protobuf.GeneratedMessageV3
+    implements
     // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationConfig)
     TransformationConfigOrBuilder {
-private static final long serialVersionUID = 0L;
+  private static final long serialVersionUID = 0L;
   // Use TransformationConfig.newBuilder() to construct.
   private TransformationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) {
     super(builder);
   }
+
   private TransformationConfig() {
     deidentifyTemplate_ = "";
     structuredDeidentifyTemplate_ = "";
@@ -29,16 +47,15 @@ private TransformationConfig() {
 
   @java.lang.Override
   @SuppressWarnings({"unused"})
-  protected java.lang.Object newInstance(
-      UnusedPrivateParameter unused) {
+  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
     return new TransformationConfig();
   }
 
   @java.lang.Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
+  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
+
   private TransformationConfig(
       com.google.protobuf.CodedInputStream input,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -57,31 +74,34 @@ private TransformationConfig(
           case 0:
             done = true;
             break;
-          case 10: {
-            java.lang.String s = input.readStringRequireUtf8();
+          case 10:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            deidentifyTemplate_ = s;
-            break;
-          }
-          case 18: {
-            java.lang.String s = input.readStringRequireUtf8();
+              deidentifyTemplate_ = s;
+              break;
+            }
+          case 18:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            structuredDeidentifyTemplate_ = s;
-            break;
-          }
-          case 34: {
-            java.lang.String s = input.readStringRequireUtf8();
+              structuredDeidentifyTemplate_ = s;
+              break;
+            }
+          case 34:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            imageRedactTemplate_ = s;
-            break;
-          }
-          default: {
-            if (!parseUnknownField(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
+              imageRedactTemplate_ = s;
+              break;
+            }
+          default:
+            {
+              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
             }
-            break;
-          }
         }
       }
     } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -89,29 +109,33 @@ private TransformationConfig(
     } catch (com.google.protobuf.UninitializedMessageException e) {
       throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
     } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
+      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
     } finally {
       this.unknownFields = unknownFields.build();
       makeExtensionsImmutable();
     }
   }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor;
+
+  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+    return com.google.privacy.dlp.v2.DlpProto
+        .internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor;
   }
 
   @java.lang.Override
   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internalGetFieldAccessorTable() {
-    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable
+    return com.google.privacy.dlp.v2.DlpProto
+        .internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable
         .ensureFieldAccessorsInitialized(
-            com.google.privacy.dlp.v2.TransformationConfig.class, com.google.privacy.dlp.v2.TransformationConfig.Builder.class);
+            com.google.privacy.dlp.v2.TransformationConfig.class,
+            com.google.privacy.dlp.v2.TransformationConfig.Builder.class);
   }
 
   public static final int DEIDENTIFY_TEMPLATE_FIELD_NUMBER = 1;
   private volatile java.lang.Object deidentifyTemplate_;
   /**
+   *
+   *
    * 
    * De-identify template.
    * If this template is specified, it will serve as the default de-identify
@@ -122,6 +146,7 @@ private TransformationConfig(
    * 
* * string deidentify_template = 1; + * * @return The deidentifyTemplate. */ @java.lang.Override @@ -130,14 +155,15 @@ public java.lang.String getDeidentifyTemplate() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); deidentifyTemplate_ = s; return s; } } /** + * + * *
    * De-identify template.
    * If this template is specified, it will serve as the default de-identify
@@ -148,16 +174,15 @@ public java.lang.String getDeidentifyTemplate() {
    * 
* * string deidentify_template = 1; + * * @return The bytes for deidentifyTemplate. */ @java.lang.Override - public com.google.protobuf.ByteString - getDeidentifyTemplateBytes() { + public com.google.protobuf.ByteString getDeidentifyTemplateBytes() { java.lang.Object ref = deidentifyTemplate_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); deidentifyTemplate_ = b; return b; } else { @@ -168,6 +193,8 @@ public java.lang.String getDeidentifyTemplate() { public static final int STRUCTURED_DEIDENTIFY_TEMPLATE_FIELD_NUMBER = 2; private volatile java.lang.Object structuredDeidentifyTemplate_; /** + * + * *
    * Structured de-identify template.
    * If this template is specified, it will serve as the de-identify template
@@ -179,6 +206,7 @@ public java.lang.String getDeidentifyTemplate() {
    * 
* * string structured_deidentify_template = 2; + * * @return The structuredDeidentifyTemplate. */ @java.lang.Override @@ -187,14 +215,15 @@ public java.lang.String getStructuredDeidentifyTemplate() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); structuredDeidentifyTemplate_ = s; return s; } } /** + * + * *
    * Structured de-identify template.
    * If this template is specified, it will serve as the de-identify template
@@ -206,16 +235,15 @@ public java.lang.String getStructuredDeidentifyTemplate() {
    * 
* * string structured_deidentify_template = 2; + * * @return The bytes for structuredDeidentifyTemplate. */ @java.lang.Override - public com.google.protobuf.ByteString - getStructuredDeidentifyTemplateBytes() { + public com.google.protobuf.ByteString getStructuredDeidentifyTemplateBytes() { java.lang.Object ref = structuredDeidentifyTemplate_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); structuredDeidentifyTemplate_ = b; return b; } else { @@ -226,6 +254,8 @@ public java.lang.String getStructuredDeidentifyTemplate() { public static final int IMAGE_REDACT_TEMPLATE_FIELD_NUMBER = 4; private volatile java.lang.Object imageRedactTemplate_; /** + * + * *
    * Image redact template.
    * If this template is specified, it will serve as the de-identify template
@@ -234,6 +264,7 @@ public java.lang.String getStructuredDeidentifyTemplate() {
    * 
* * string image_redact_template = 4; + * * @return The imageRedactTemplate. */ @java.lang.Override @@ -242,14 +273,15 @@ public java.lang.String getImageRedactTemplate() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); imageRedactTemplate_ = s; return s; } } /** + * + * *
    * Image redact template.
    * If this template is specified, it will serve as the de-identify template
@@ -258,16 +290,15 @@ public java.lang.String getImageRedactTemplate() {
    * 
* * string image_redact_template = 4; + * * @return The bytes for imageRedactTemplate. */ @java.lang.Override - public com.google.protobuf.ByteString - getImageRedactTemplateBytes() { + public com.google.protobuf.ByteString getImageRedactTemplateBytes() { java.lang.Object ref = imageRedactTemplate_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); imageRedactTemplate_ = b; return b; } else { @@ -276,6 +307,7 @@ public java.lang.String getImageRedactTemplate() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -287,8 +319,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deidentifyTemplate_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deidentifyTemplate_); } @@ -311,7 +342,9 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deidentifyTemplate_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(structuredDeidentifyTemplate_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, structuredDeidentifyTemplate_); + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 2, structuredDeidentifyTemplate_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageRedactTemplate_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, imageRedactTemplate_); @@ -324,19 +357,18 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.privacy.dlp.v2.TransformationConfig)) { return super.equals(obj); } - com.google.privacy.dlp.v2.TransformationConfig other = (com.google.privacy.dlp.v2.TransformationConfig) obj; - - if (!getDeidentifyTemplate() - .equals(other.getDeidentifyTemplate())) return false; - if (!getStructuredDeidentifyTemplate() - .equals(other.getStructuredDeidentifyTemplate())) return false; - if (!getImageRedactTemplate() - .equals(other.getImageRedactTemplate())) return false; + com.google.privacy.dlp.v2.TransformationConfig other = + (com.google.privacy.dlp.v2.TransformationConfig) obj; + + if (!getDeidentifyTemplate().equals(other.getDeidentifyTemplate())) return false; + if (!getStructuredDeidentifyTemplate().equals(other.getStructuredDeidentifyTemplate())) + return false; + if (!getImageRedactTemplate().equals(other.getImageRedactTemplate())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -359,97 +391,104 @@ public int hashCode() { return hash; } - public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( - java.nio.ByteBuffer data) + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.TransformationConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.TransformationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** + * + * *
    * User specified templates and configs for how to deidentify structured,
    * unstructures, and image files. User must provide either a unstructured
@@ -458,21 +497,23 @@ protected Builder newBuilderForType(
    *
    * Protobuf type {@code google.privacy.dlp.v2.TransformationConfig}
    */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
+  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+      implements
       // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationConfig)
       com.google.privacy.dlp.v2.TransformationConfigOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor;
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+      return com.google.privacy.dlp.v2.DlpProto
+          .internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable
+      return com.google.privacy.dlp.v2.DlpProto
+          .internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              com.google.privacy.dlp.v2.TransformationConfig.class, com.google.privacy.dlp.v2.TransformationConfig.Builder.class);
+              com.google.privacy.dlp.v2.TransformationConfig.class,
+              com.google.privacy.dlp.v2.TransformationConfig.Builder.class);
     }
 
     // Construct using com.google.privacy.dlp.v2.TransformationConfig.newBuilder()
@@ -480,16 +521,15 @@ private Builder() {
       maybeForceBuilderInitialization();
     }
 
-    private Builder(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
       maybeForceBuilderInitialization();
     }
+
     private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
-      }
+      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
     }
+
     @java.lang.Override
     public Builder clear() {
       super.clear();
@@ -503,9 +543,9 @@ public Builder clear() {
     }
 
     @java.lang.Override
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor;
+    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+      return com.google.privacy.dlp.v2.DlpProto
+          .internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor;
     }
 
     @java.lang.Override
@@ -524,7 +564,8 @@ public com.google.privacy.dlp.v2.TransformationConfig build() {
 
     @java.lang.Override
     public com.google.privacy.dlp.v2.TransformationConfig buildPartial() {
-      com.google.privacy.dlp.v2.TransformationConfig result = new com.google.privacy.dlp.v2.TransformationConfig(this);
+      com.google.privacy.dlp.v2.TransformationConfig result =
+          new com.google.privacy.dlp.v2.TransformationConfig(this);
       result.deidentifyTemplate_ = deidentifyTemplate_;
       result.structuredDeidentifyTemplate_ = structuredDeidentifyTemplate_;
       result.imageRedactTemplate_ = imageRedactTemplate_;
@@ -536,38 +577,39 @@ public com.google.privacy.dlp.v2.TransformationConfig buildPartial() {
     public Builder clone() {
       return super.clone();
     }
+
     @java.lang.Override
     public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.setField(field, value);
     }
+
     @java.lang.Override
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
+    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
       return super.clearField(field);
     }
+
     @java.lang.Override
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
       return super.clearOneof(oneof);
     }
+
     @java.lang.Override
     public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
       return super.setRepeatedField(field, index, value);
     }
+
     @java.lang.Override
     public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.addRepeatedField(field, value);
     }
+
     @java.lang.Override
     public Builder mergeFrom(com.google.protobuf.Message other) {
       if (other instanceof com.google.privacy.dlp.v2.TransformationConfig) {
-        return mergeFrom((com.google.privacy.dlp.v2.TransformationConfig)other);
+        return mergeFrom((com.google.privacy.dlp.v2.TransformationConfig) other);
       } else {
         super.mergeFrom(other);
         return this;
@@ -619,6 +661,8 @@ public Builder mergeFrom(
 
     private java.lang.Object deidentifyTemplate_ = "";
     /**
+     *
+     *
      * 
      * De-identify template.
      * If this template is specified, it will serve as the default de-identify
@@ -629,13 +673,13 @@ public Builder mergeFrom(
      * 
* * string deidentify_template = 1; + * * @return The deidentifyTemplate. */ public java.lang.String getDeidentifyTemplate() { java.lang.Object ref = deidentifyTemplate_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); deidentifyTemplate_ = s; return s; @@ -644,6 +688,8 @@ public java.lang.String getDeidentifyTemplate() { } } /** + * + * *
      * De-identify template.
      * If this template is specified, it will serve as the default de-identify
@@ -654,15 +700,14 @@ public java.lang.String getDeidentifyTemplate() {
      * 
* * string deidentify_template = 1; + * * @return The bytes for deidentifyTemplate. */ - public com.google.protobuf.ByteString - getDeidentifyTemplateBytes() { + public com.google.protobuf.ByteString getDeidentifyTemplateBytes() { java.lang.Object ref = deidentifyTemplate_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); deidentifyTemplate_ = b; return b; } else { @@ -670,6 +715,8 @@ public java.lang.String getDeidentifyTemplate() { } } /** + * + * *
      * De-identify template.
      * If this template is specified, it will serve as the default de-identify
@@ -680,20 +727,22 @@ public java.lang.String getDeidentifyTemplate() {
      * 
* * string deidentify_template = 1; + * * @param value The deidentifyTemplate to set. * @return This builder for chaining. */ - public Builder setDeidentifyTemplate( - java.lang.String value) { + public Builder setDeidentifyTemplate(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + deidentifyTemplate_ = value; onChanged(); return this; } /** + * + * *
      * De-identify template.
      * If this template is specified, it will serve as the default de-identify
@@ -704,15 +753,18 @@ public Builder setDeidentifyTemplate(
      * 
* * string deidentify_template = 1; + * * @return This builder for chaining. */ public Builder clearDeidentifyTemplate() { - + deidentifyTemplate_ = getDefaultInstance().getDeidentifyTemplate(); onChanged(); return this; } /** + * + * *
      * De-identify template.
      * If this template is specified, it will serve as the default de-identify
@@ -723,16 +775,16 @@ public Builder clearDeidentifyTemplate() {
      * 
* * string deidentify_template = 1; + * * @param value The bytes for deidentifyTemplate to set. * @return This builder for chaining. */ - public Builder setDeidentifyTemplateBytes( - com.google.protobuf.ByteString value) { + public Builder setDeidentifyTemplateBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deidentifyTemplate_ = value; onChanged(); return this; @@ -740,6 +792,8 @@ public Builder setDeidentifyTemplateBytes( private java.lang.Object structuredDeidentifyTemplate_ = ""; /** + * + * *
      * Structured de-identify template.
      * If this template is specified, it will serve as the de-identify template
@@ -751,13 +805,13 @@ public Builder setDeidentifyTemplateBytes(
      * 
* * string structured_deidentify_template = 2; + * * @return The structuredDeidentifyTemplate. */ public java.lang.String getStructuredDeidentifyTemplate() { java.lang.Object ref = structuredDeidentifyTemplate_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); structuredDeidentifyTemplate_ = s; return s; @@ -766,6 +820,8 @@ public java.lang.String getStructuredDeidentifyTemplate() { } } /** + * + * *
      * Structured de-identify template.
      * If this template is specified, it will serve as the de-identify template
@@ -777,15 +833,14 @@ public java.lang.String getStructuredDeidentifyTemplate() {
      * 
* * string structured_deidentify_template = 2; + * * @return The bytes for structuredDeidentifyTemplate. */ - public com.google.protobuf.ByteString - getStructuredDeidentifyTemplateBytes() { + public com.google.protobuf.ByteString getStructuredDeidentifyTemplateBytes() { java.lang.Object ref = structuredDeidentifyTemplate_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); structuredDeidentifyTemplate_ = b; return b; } else { @@ -793,6 +848,8 @@ public java.lang.String getStructuredDeidentifyTemplate() { } } /** + * + * *
      * Structured de-identify template.
      * If this template is specified, it will serve as the de-identify template
@@ -804,20 +861,22 @@ public java.lang.String getStructuredDeidentifyTemplate() {
      * 
* * string structured_deidentify_template = 2; + * * @param value The structuredDeidentifyTemplate to set. * @return This builder for chaining. */ - public Builder setStructuredDeidentifyTemplate( - java.lang.String value) { + public Builder setStructuredDeidentifyTemplate(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + structuredDeidentifyTemplate_ = value; onChanged(); return this; } /** + * + * *
      * Structured de-identify template.
      * If this template is specified, it will serve as the de-identify template
@@ -829,15 +888,18 @@ public Builder setStructuredDeidentifyTemplate(
      * 
* * string structured_deidentify_template = 2; + * * @return This builder for chaining. */ public Builder clearStructuredDeidentifyTemplate() { - + structuredDeidentifyTemplate_ = getDefaultInstance().getStructuredDeidentifyTemplate(); onChanged(); return this; } /** + * + * *
      * Structured de-identify template.
      * If this template is specified, it will serve as the de-identify template
@@ -849,16 +911,16 @@ public Builder clearStructuredDeidentifyTemplate() {
      * 
* * string structured_deidentify_template = 2; + * * @param value The bytes for structuredDeidentifyTemplate to set. * @return This builder for chaining. */ - public Builder setStructuredDeidentifyTemplateBytes( - com.google.protobuf.ByteString value) { + public Builder setStructuredDeidentifyTemplateBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + structuredDeidentifyTemplate_ = value; onChanged(); return this; @@ -866,6 +928,8 @@ public Builder setStructuredDeidentifyTemplateBytes( private java.lang.Object imageRedactTemplate_ = ""; /** + * + * *
      * Image redact template.
      * If this template is specified, it will serve as the de-identify template
@@ -874,13 +938,13 @@ public Builder setStructuredDeidentifyTemplateBytes(
      * 
* * string image_redact_template = 4; + * * @return The imageRedactTemplate. */ public java.lang.String getImageRedactTemplate() { java.lang.Object ref = imageRedactTemplate_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); imageRedactTemplate_ = s; return s; @@ -889,6 +953,8 @@ public java.lang.String getImageRedactTemplate() { } } /** + * + * *
      * Image redact template.
      * If this template is specified, it will serve as the de-identify template
@@ -897,15 +963,14 @@ public java.lang.String getImageRedactTemplate() {
      * 
* * string image_redact_template = 4; + * * @return The bytes for imageRedactTemplate. */ - public com.google.protobuf.ByteString - getImageRedactTemplateBytes() { + public com.google.protobuf.ByteString getImageRedactTemplateBytes() { java.lang.Object ref = imageRedactTemplate_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); imageRedactTemplate_ = b; return b; } else { @@ -913,6 +978,8 @@ public java.lang.String getImageRedactTemplate() { } } /** + * + * *
      * Image redact template.
      * If this template is specified, it will serve as the de-identify template
@@ -921,20 +988,22 @@ public java.lang.String getImageRedactTemplate() {
      * 
* * string image_redact_template = 4; + * * @param value The imageRedactTemplate to set. * @return This builder for chaining. */ - public Builder setImageRedactTemplate( - java.lang.String value) { + public Builder setImageRedactTemplate(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + imageRedactTemplate_ = value; onChanged(); return this; } /** + * + * *
      * Image redact template.
      * If this template is specified, it will serve as the de-identify template
@@ -943,15 +1012,18 @@ public Builder setImageRedactTemplate(
      * 
* * string image_redact_template = 4; + * * @return This builder for chaining. */ public Builder clearImageRedactTemplate() { - + imageRedactTemplate_ = getDefaultInstance().getImageRedactTemplate(); onChanged(); return this; } /** + * + * *
      * Image redact template.
      * If this template is specified, it will serve as the de-identify template
@@ -960,23 +1032,23 @@ public Builder clearImageRedactTemplate() {
      * 
* * string image_redact_template = 4; + * * @param value The bytes for imageRedactTemplate to set. * @return This builder for chaining. */ - public Builder setImageRedactTemplateBytes( - com.google.protobuf.ByteString value) { + public Builder setImageRedactTemplateBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageRedactTemplate_ = value; onChanged(); return this; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -986,12 +1058,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationConfig) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationConfig) private static final com.google.privacy.dlp.v2.TransformationConfig DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationConfig(); } @@ -1000,16 +1072,16 @@ public static com.google.privacy.dlp.v2.TransformationConfig getDefaultInstance( return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransformationConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransformationConfig(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationConfig(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1024,6 +1096,4 @@ public com.google.protobuf.Parser getParserForType() { public com.google.privacy.dlp.v2.TransformationConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java similarity index 78% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java index 026ab337bb29..605211c865ac 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationConfigOrBuilder.java @@ -1,13 +1,31 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; -public interface TransformationConfigOrBuilder extends +public interface TransformationConfigOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationConfig) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * De-identify template.
    * If this template is specified, it will serve as the default de-identify
@@ -18,10 +36,13 @@ public interface TransformationConfigOrBuilder extends
    * 
* * string deidentify_template = 1; + * * @return The deidentifyTemplate. */ java.lang.String getDeidentifyTemplate(); /** + * + * *
    * De-identify template.
    * If this template is specified, it will serve as the default de-identify
@@ -32,12 +53,14 @@ public interface TransformationConfigOrBuilder extends
    * 
* * string deidentify_template = 1; + * * @return The bytes for deidentifyTemplate. */ - com.google.protobuf.ByteString - getDeidentifyTemplateBytes(); + com.google.protobuf.ByteString getDeidentifyTemplateBytes(); /** + * + * *
    * Structured de-identify template.
    * If this template is specified, it will serve as the de-identify template
@@ -49,10 +72,13 @@ public interface TransformationConfigOrBuilder extends
    * 
* * string structured_deidentify_template = 2; + * * @return The structuredDeidentifyTemplate. */ java.lang.String getStructuredDeidentifyTemplate(); /** + * + * *
    * Structured de-identify template.
    * If this template is specified, it will serve as the de-identify template
@@ -64,12 +90,14 @@ public interface TransformationConfigOrBuilder extends
    * 
* * string structured_deidentify_template = 2; + * * @return The bytes for structuredDeidentifyTemplate. */ - com.google.protobuf.ByteString - getStructuredDeidentifyTemplateBytes(); + com.google.protobuf.ByteString getStructuredDeidentifyTemplateBytes(); /** + * + * *
    * Image redact template.
    * If this template is specified, it will serve as the de-identify template
@@ -78,10 +106,13 @@ public interface TransformationConfigOrBuilder extends
    * 
* * string image_redact_template = 4; + * * @return The imageRedactTemplate. */ java.lang.String getImageRedactTemplate(); /** + * + * *
    * Image redact template.
    * If this template is specified, it will serve as the de-identify template
@@ -90,8 +121,8 @@ public interface TransformationConfigOrBuilder extends
    * 
* * string image_redact_template = 4; + * * @return The bytes for imageRedactTemplate. */ - com.google.protobuf.ByteString - getImageRedactTemplateBytes(); + com.google.protobuf.ByteString getImageRedactTemplateBytes(); } diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java similarity index 59% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java index 4154463240b6..ee9293930b3e 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationContainerType.java @@ -1,54 +1,53 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; /** + * + * *
  * Describes functionality of a given container in its original format.
  * 
* * Protobuf enum {@code google.privacy.dlp.v2.TransformationContainerType} */ -public enum TransformationContainerType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * TRANSFORM_UNKNOWN_CONTAINER = 0; - */ +public enum TransformationContainerType implements com.google.protobuf.ProtocolMessageEnum { + /** TRANSFORM_UNKNOWN_CONTAINER = 0; */ TRANSFORM_UNKNOWN_CONTAINER(0), - /** - * TRANSFORM_BODY = 1; - */ + /** TRANSFORM_BODY = 1; */ TRANSFORM_BODY(1), - /** - * TRANSFORM_METADATA = 2; - */ + /** TRANSFORM_METADATA = 2; */ TRANSFORM_METADATA(2), - /** - * TRANSFORM_TABLE = 3; - */ + /** TRANSFORM_TABLE = 3; */ TRANSFORM_TABLE(3), UNRECOGNIZED(-1), ; - /** - * TRANSFORM_UNKNOWN_CONTAINER = 0; - */ + /** TRANSFORM_UNKNOWN_CONTAINER = 0; */ public static final int TRANSFORM_UNKNOWN_CONTAINER_VALUE = 0; - /** - * TRANSFORM_BODY = 1; - */ + /** TRANSFORM_BODY = 1; */ public static final int TRANSFORM_BODY_VALUE = 1; - /** - * TRANSFORM_METADATA = 2; - */ + /** TRANSFORM_METADATA = 2; */ public static final int TRANSFORM_METADATA_VALUE = 2; - /** - * TRANSFORM_TABLE = 3; - */ + /** TRANSFORM_TABLE = 3; */ public static final int TRANSFORM_TABLE_VALUE = 3; - public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -73,11 +72,16 @@ public static TransformationContainerType valueOf(int value) { */ public static TransformationContainerType forNumber(int value) { switch (value) { - case 0: return TRANSFORM_UNKNOWN_CONTAINER; - case 1: return TRANSFORM_BODY; - case 2: return TRANSFORM_METADATA; - case 3: return TRANSFORM_TABLE; - default: return null; + case 0: + return TRANSFORM_UNKNOWN_CONTAINER; + case 1: + return TRANSFORM_BODY; + case 2: + return TRANSFORM_METADATA; + case 3: + return TRANSFORM_TABLE; + default: + return null; } } @@ -85,28 +89,28 @@ public static TransformationContainerType forNumber(int value) { internalGetValueMap() { return internalValueMap; } - private static final com.google.protobuf.Internal.EnumLiteMap< - TransformationContainerType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TransformationContainerType findValueByNumber(int number) { - return TransformationContainerType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransformationContainerType findValueByNumber(int number) { + return TransformationContainerType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(1); } @@ -115,8 +119,7 @@ public TransformationContainerType findValueByNumber(int number) { public static TransformationContainerType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -132,4 +135,3 @@ private TransformationContainerType(int value) { // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TransformationContainerType) } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java similarity index 73% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java index e77be554628e..8f9895087a5f 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescription.java @@ -1,9 +1,26 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; /** + * + * *
  * A flattened description of a `PrimitiveTransformation` or
  * `RecordSuppression`.
@@ -11,15 +28,16 @@
  *
  * Protobuf type {@code google.privacy.dlp.v2.TransformationDescription}
  */
-public final class TransformationDescription extends
-    com.google.protobuf.GeneratedMessageV3 implements
+public final class TransformationDescription extends com.google.protobuf.GeneratedMessageV3
+    implements
     // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationDescription)
     TransformationDescriptionOrBuilder {
-private static final long serialVersionUID = 0L;
+  private static final long serialVersionUID = 0L;
   // Use TransformationDescription.newBuilder() to construct.
   private TransformationDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) {
     super(builder);
   }
+
   private TransformationDescription() {
     type_ = 0;
     description_ = "";
@@ -28,16 +46,15 @@ private TransformationDescription() {
 
   @java.lang.Override
   @SuppressWarnings({"unused"})
-  protected java.lang.Object newInstance(
-      UnusedPrivateParameter unused) {
+  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
     return new TransformationDescription();
   }
 
   @java.lang.Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
+  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
+
   private TransformationDescription(
       com.google.protobuf.CodedInputStream input,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -56,44 +73,49 @@ private TransformationDescription(
           case 0:
             done = true;
             break;
-          case 8: {
-            int rawValue = input.readEnum();
-
-            type_ = rawValue;
-            break;
-          }
-          case 18: {
-            java.lang.String s = input.readStringRequireUtf8();
+          case 8:
+            {
+              int rawValue = input.readEnum();
 
-            description_ = s;
-            break;
-          }
-          case 26: {
-            java.lang.String s = input.readStringRequireUtf8();
+              type_ = rawValue;
+              break;
+            }
+          case 18:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            condition_ = s;
-            break;
-          }
-          case 34: {
-            com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null;
-            if (infoType_ != null) {
-              subBuilder = infoType_.toBuilder();
+              description_ = s;
+              break;
             }
-            infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry);
-            if (subBuilder != null) {
-              subBuilder.mergeFrom(infoType_);
-              infoType_ = subBuilder.buildPartial();
+          case 26:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              condition_ = s;
+              break;
             }
+          case 34:
+            {
+              com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null;
+              if (infoType_ != null) {
+                subBuilder = infoType_.toBuilder();
+              }
+              infoType_ =
+                  input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(infoType_);
+                infoType_ = subBuilder.buildPartial();
+              }
 
-            break;
-          }
-          default: {
-            if (!parseUnknownField(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
+              break;
+            }
+          default:
+            {
+              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
             }
-            break;
-          }
         }
       }
     } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -101,56 +123,69 @@ private TransformationDescription(
     } catch (com.google.protobuf.UninitializedMessageException e) {
       throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
     } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
+      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
     } finally {
       this.unknownFields = unknownFields.build();
       makeExtensionsImmutable();
     }
   }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor;
+
+  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+    return com.google.privacy.dlp.v2.DlpProto
+        .internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor;
   }
 
   @java.lang.Override
   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internalGetFieldAccessorTable() {
-    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable
+    return com.google.privacy.dlp.v2.DlpProto
+        .internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable
         .ensureFieldAccessorsInitialized(
-            com.google.privacy.dlp.v2.TransformationDescription.class, com.google.privacy.dlp.v2.TransformationDescription.Builder.class);
+            com.google.privacy.dlp.v2.TransformationDescription.class,
+            com.google.privacy.dlp.v2.TransformationDescription.Builder.class);
   }
 
   public static final int TYPE_FIELD_NUMBER = 1;
   private int type_;
   /**
+   *
+   *
    * 
    * The transformation type.
    * 
* * .google.privacy.dlp.v2.TransformationType type = 1; + * * @return The enum numeric value on the wire for type. */ - @java.lang.Override public int getTypeValue() { + @java.lang.Override + public int getTypeValue() { return type_; } /** + * + * *
    * The transformation type.
    * 
* * .google.privacy.dlp.v2.TransformationType type = 1; + * * @return The type. */ - @java.lang.Override public com.google.privacy.dlp.v2.TransformationType getType() { + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationType getType() { @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TransformationType result = com.google.privacy.dlp.v2.TransformationType.valueOf(type_); + com.google.privacy.dlp.v2.TransformationType result = + com.google.privacy.dlp.v2.TransformationType.valueOf(type_); return result == null ? com.google.privacy.dlp.v2.TransformationType.UNRECOGNIZED : result; } public static final int DESCRIPTION_FIELD_NUMBER = 2; private volatile java.lang.Object description_; /** + * + * *
    * A description of the transformation. This is empty for a
    * RECORD_SUPPRESSION, or is the output of calling toString() on the
@@ -159,6 +194,7 @@ private TransformationDescription(
    * 
* * string description = 2; + * * @return The description. */ @java.lang.Override @@ -167,14 +203,15 @@ public java.lang.String getDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** + * + * *
    * A description of the transformation. This is empty for a
    * RECORD_SUPPRESSION, or is the output of calling toString() on the
@@ -183,16 +220,15 @@ public java.lang.String getDescription() {
    * 
* * string description = 2; + * * @return The bytes for description. */ @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { + public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { @@ -203,6 +239,8 @@ public java.lang.String getDescription() { public static final int CONDITION_FIELD_NUMBER = 3; private volatile java.lang.Object condition_; /** + * + * *
    * A human-readable string representation of the `RecordCondition`
    * corresponding to this transformation. Set if a `RecordCondition` was used
@@ -216,6 +254,7 @@ public java.lang.String getDescription() {
    * 
* * string condition = 3; + * * @return The condition. */ @java.lang.Override @@ -224,14 +263,15 @@ public java.lang.String getCondition() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); condition_ = s; return s; } } /** + * + * *
    * A human-readable string representation of the `RecordCondition`
    * corresponding to this transformation. Set if a `RecordCondition` was used
@@ -245,16 +285,15 @@ public java.lang.String getCondition() {
    * 
* * string condition = 3; + * * @return The bytes for condition. */ @java.lang.Override - public com.google.protobuf.ByteString - getConditionBytes() { + public com.google.protobuf.ByteString getConditionBytes() { java.lang.Object ref = condition_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); condition_ = b; return b; } else { @@ -265,11 +304,14 @@ public java.lang.String getCondition() { public static final int INFO_TYPE_FIELD_NUMBER = 4; private com.google.privacy.dlp.v2.InfoType infoType_; /** + * + * *
    * Set if the transformation was limited to a specific `InfoType`.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 4; + * * @return Whether the infoType field is set. */ @java.lang.Override @@ -277,11 +319,14 @@ public boolean hasInfoType() { return infoType_ != null; } /** + * + * *
    * Set if the transformation was limited to a specific `InfoType`.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 4; + * * @return The infoType. */ @java.lang.Override @@ -289,6 +334,8 @@ public com.google.privacy.dlp.v2.InfoType getInfoType() { return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; } /** + * + * *
    * Set if the transformation was limited to a specific `InfoType`.
    * 
@@ -301,6 +348,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -312,9 +360,10 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.privacy.dlp.v2.TransformationType.TRANSFORMATION_TYPE_UNSPECIFIED.getNumber()) { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.privacy.dlp.v2.TransformationType.TRANSFORMATION_TYPE_UNSPECIFIED + .getNumber()) { output.writeEnum(1, type_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { @@ -335,9 +384,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (type_ != com.google.privacy.dlp.v2.TransformationType.TRANSFORMATION_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); + if (type_ + != com.google.privacy.dlp.v2.TransformationType.TRANSFORMATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); @@ -346,8 +396,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, condition_); } if (infoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getInfoType()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getInfoType()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -357,22 +406,20 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.privacy.dlp.v2.TransformationDescription)) { return super.equals(obj); } - com.google.privacy.dlp.v2.TransformationDescription other = (com.google.privacy.dlp.v2.TransformationDescription) obj; + com.google.privacy.dlp.v2.TransformationDescription other = + (com.google.privacy.dlp.v2.TransformationDescription) obj; if (type_ != other.type_) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getCondition() - .equals(other.getCondition())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getCondition().equals(other.getCondition())) return false; if (hasInfoType() != other.hasInfoType()) return false; if (hasInfoType()) { - if (!getInfoType() - .equals(other.getInfoType())) return false; + if (!getInfoType().equals(other.getInfoType())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -401,96 +448,103 @@ public int hashCode() { } public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.TransformationDescription parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.TransformationDescription parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.TransformationDescription parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationDescription parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationDescription parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationDescription prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** + * + * *
    * A flattened description of a `PrimitiveTransformation` or
    * `RecordSuppression`.
@@ -498,21 +552,23 @@ protected Builder newBuilderForType(
    *
    * Protobuf type {@code google.privacy.dlp.v2.TransformationDescription}
    */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
+  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+      implements
       // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationDescription)
       com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor;
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+      return com.google.privacy.dlp.v2.DlpProto
+          .internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable
+      return com.google.privacy.dlp.v2.DlpProto
+          .internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              com.google.privacy.dlp.v2.TransformationDescription.class, com.google.privacy.dlp.v2.TransformationDescription.Builder.class);
+              com.google.privacy.dlp.v2.TransformationDescription.class,
+              com.google.privacy.dlp.v2.TransformationDescription.Builder.class);
     }
 
     // Construct using com.google.privacy.dlp.v2.TransformationDescription.newBuilder()
@@ -520,16 +576,15 @@ private Builder() {
       maybeForceBuilderInitialization();
     }
 
-    private Builder(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
       maybeForceBuilderInitialization();
     }
+
     private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
-      }
+      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
     }
+
     @java.lang.Override
     public Builder clear() {
       super.clear();
@@ -549,9 +604,9 @@ public Builder clear() {
     }
 
     @java.lang.Override
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor;
+    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+      return com.google.privacy.dlp.v2.DlpProto
+          .internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor;
     }
 
     @java.lang.Override
@@ -570,7 +625,8 @@ public com.google.privacy.dlp.v2.TransformationDescription build() {
 
     @java.lang.Override
     public com.google.privacy.dlp.v2.TransformationDescription buildPartial() {
-      com.google.privacy.dlp.v2.TransformationDescription result = new com.google.privacy.dlp.v2.TransformationDescription(this);
+      com.google.privacy.dlp.v2.TransformationDescription result =
+          new com.google.privacy.dlp.v2.TransformationDescription(this);
       result.type_ = type_;
       result.description_ = description_;
       result.condition_ = condition_;
@@ -587,38 +643,39 @@ public com.google.privacy.dlp.v2.TransformationDescription buildPartial() {
     public Builder clone() {
       return super.clone();
     }
+
     @java.lang.Override
     public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.setField(field, value);
     }
+
     @java.lang.Override
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
+    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
       return super.clearField(field);
     }
+
     @java.lang.Override
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
       return super.clearOneof(oneof);
     }
+
     @java.lang.Override
     public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
       return super.setRepeatedField(field, index, value);
     }
+
     @java.lang.Override
     public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.addRepeatedField(field, value);
     }
+
     @java.lang.Override
     public Builder mergeFrom(com.google.protobuf.Message other) {
       if (other instanceof com.google.privacy.dlp.v2.TransformationDescription) {
-        return mergeFrom((com.google.privacy.dlp.v2.TransformationDescription)other);
+        return mergeFrom((com.google.privacy.dlp.v2.TransformationDescription) other);
       } else {
         super.mergeFrom(other);
         return this;
@@ -626,7 +683,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
     }
 
     public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationDescription other) {
-      if (other == com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance()) return this;
+      if (other == com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance())
+        return this;
       if (other.type_ != 0) {
         setTypeValue(other.getTypeValue());
       }
@@ -660,7 +718,8 @@ public Builder mergeFrom(
       try {
         parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        parsedMessage = (com.google.privacy.dlp.v2.TransformationDescription) e.getUnfinishedMessage();
+        parsedMessage =
+            (com.google.privacy.dlp.v2.TransformationDescription) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
         if (parsedMessage != null) {
@@ -672,51 +731,65 @@ public Builder mergeFrom(
 
     private int type_ = 0;
     /**
+     *
+     *
      * 
      * The transformation type.
      * 
* * .google.privacy.dlp.v2.TransformationType type = 1; + * * @return The enum numeric value on the wire for type. */ - @java.lang.Override public int getTypeValue() { + @java.lang.Override + public int getTypeValue() { return type_; } /** + * + * *
      * The transformation type.
      * 
* * .google.privacy.dlp.v2.TransformationType type = 1; + * * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { - + type_ = value; onChanged(); return this; } /** + * + * *
      * The transformation type.
      * 
* * .google.privacy.dlp.v2.TransformationType type = 1; + * * @return The type. */ @java.lang.Override public com.google.privacy.dlp.v2.TransformationType getType() { @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TransformationType result = com.google.privacy.dlp.v2.TransformationType.valueOf(type_); + com.google.privacy.dlp.v2.TransformationType result = + com.google.privacy.dlp.v2.TransformationType.valueOf(type_); return result == null ? com.google.privacy.dlp.v2.TransformationType.UNRECOGNIZED : result; } /** + * + * *
      * The transformation type.
      * 
* * .google.privacy.dlp.v2.TransformationType type = 1; + * * @param value The type to set. * @return This builder for chaining. */ @@ -724,21 +797,24 @@ public Builder setType(com.google.privacy.dlp.v2.TransformationType value) { if (value == null) { throw new NullPointerException(); } - + type_ = value.getNumber(); onChanged(); return this; } /** + * + * *
      * The transformation type.
      * 
* * .google.privacy.dlp.v2.TransformationType type = 1; + * * @return This builder for chaining. */ public Builder clearType() { - + type_ = 0; onChanged(); return this; @@ -746,6 +822,8 @@ public Builder clearType() { private java.lang.Object description_ = ""; /** + * + * *
      * A description of the transformation. This is empty for a
      * RECORD_SUPPRESSION, or is the output of calling toString() on the
@@ -754,13 +832,13 @@ public Builder clearType() {
      * 
* * string description = 2; + * * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; @@ -769,6 +847,8 @@ public java.lang.String getDescription() { } } /** + * + * *
      * A description of the transformation. This is empty for a
      * RECORD_SUPPRESSION, or is the output of calling toString() on the
@@ -777,15 +857,14 @@ public java.lang.String getDescription() {
      * 
* * string description = 2; + * * @return The bytes for description. */ - public com.google.protobuf.ByteString - getDescriptionBytes() { + public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { @@ -793,6 +872,8 @@ public java.lang.String getDescription() { } } /** + * + * *
      * A description of the transformation. This is empty for a
      * RECORD_SUPPRESSION, or is the output of calling toString() on the
@@ -801,20 +882,22 @@ public java.lang.String getDescription() {
      * 
* * string description = 2; + * * @param value The description to set. * @return This builder for chaining. */ - public Builder setDescription( - java.lang.String value) { + public Builder setDescription(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + description_ = value; onChanged(); return this; } /** + * + * *
      * A description of the transformation. This is empty for a
      * RECORD_SUPPRESSION, or is the output of calling toString() on the
@@ -823,15 +906,18 @@ public Builder setDescription(
      * 
* * string description = 2; + * * @return This builder for chaining. */ public Builder clearDescription() { - + description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** + * + * *
      * A description of the transformation. This is empty for a
      * RECORD_SUPPRESSION, or is the output of calling toString() on the
@@ -840,16 +926,16 @@ public Builder clearDescription() {
      * 
* * string description = 2; + * * @param value The bytes for description to set. * @return This builder for chaining. */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; onChanged(); return this; @@ -857,6 +943,8 @@ public Builder setDescriptionBytes( private java.lang.Object condition_ = ""; /** + * + * *
      * A human-readable string representation of the `RecordCondition`
      * corresponding to this transformation. Set if a `RecordCondition` was used
@@ -870,13 +958,13 @@ public Builder setDescriptionBytes(
      * 
* * string condition = 3; + * * @return The condition. */ public java.lang.String getCondition() { java.lang.Object ref = condition_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); condition_ = s; return s; @@ -885,6 +973,8 @@ public java.lang.String getCondition() { } } /** + * + * *
      * A human-readable string representation of the `RecordCondition`
      * corresponding to this transformation. Set if a `RecordCondition` was used
@@ -898,15 +988,14 @@ public java.lang.String getCondition() {
      * 
* * string condition = 3; + * * @return The bytes for condition. */ - public com.google.protobuf.ByteString - getConditionBytes() { + public com.google.protobuf.ByteString getConditionBytes() { java.lang.Object ref = condition_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); condition_ = b; return b; } else { @@ -914,6 +1003,8 @@ public java.lang.String getCondition() { } } /** + * + * *
      * A human-readable string representation of the `RecordCondition`
      * corresponding to this transformation. Set if a `RecordCondition` was used
@@ -927,20 +1018,22 @@ public java.lang.String getCondition() {
      * 
* * string condition = 3; + * * @param value The condition to set. * @return This builder for chaining. */ - public Builder setCondition( - java.lang.String value) { + public Builder setCondition(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + condition_ = value; onChanged(); return this; } /** + * + * *
      * A human-readable string representation of the `RecordCondition`
      * corresponding to this transformation. Set if a `RecordCondition` was used
@@ -954,15 +1047,18 @@ public Builder setCondition(
      * 
* * string condition = 3; + * * @return This builder for chaining. */ public Builder clearCondition() { - + condition_ = getDefaultInstance().getCondition(); onChanged(); return this; } /** + * + * *
      * A human-readable string representation of the `RecordCondition`
      * corresponding to this transformation. Set if a `RecordCondition` was used
@@ -976,16 +1072,16 @@ public Builder clearCondition() {
      * 
* * string condition = 3; + * * @param value The bytes for condition to set. * @return This builder for chaining. */ - public Builder setConditionBytes( - com.google.protobuf.ByteString value) { + public Builder setConditionBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + condition_ = value; onChanged(); return this; @@ -993,34 +1089,47 @@ public Builder setConditionBytes( private com.google.privacy.dlp.v2.InfoType infoType_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + com.google.privacy.dlp.v2.InfoType, + com.google.privacy.dlp.v2.InfoType.Builder, + com.google.privacy.dlp.v2.InfoTypeOrBuilder> + infoTypeBuilder_; /** + * + * *
      * Set if the transformation was limited to a specific `InfoType`.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 4; + * * @return Whether the infoType field is set. */ public boolean hasInfoType() { return infoTypeBuilder_ != null || infoType_ != null; } /** + * + * *
      * Set if the transformation was limited to a specific `InfoType`.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 4; + * * @return The infoType. */ public com.google.privacy.dlp.v2.InfoType getInfoType() { if (infoTypeBuilder_ == null) { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + return infoType_ == null + ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() + : infoType_; } else { return infoTypeBuilder_.getMessage(); } } /** + * + * *
      * Set if the transformation was limited to a specific `InfoType`.
      * 
@@ -1041,14 +1150,15 @@ public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { return this; } /** + * + * *
      * Set if the transformation was limited to a specific `InfoType`.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 4; */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { if (infoTypeBuilder_ == null) { infoType_ = builderForValue.build(); onChanged(); @@ -1059,6 +1169,8 @@ public Builder setInfoType( return this; } /** + * + * *
      * Set if the transformation was limited to a specific `InfoType`.
      * 
@@ -1069,7 +1181,9 @@ public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { if (infoTypeBuilder_ == null) { if (infoType_ != null) { infoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); + com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_) + .mergeFrom(value) + .buildPartial(); } else { infoType_ = value; } @@ -1081,6 +1195,8 @@ public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { return this; } /** + * + * *
      * Set if the transformation was limited to a specific `InfoType`.
      * 
@@ -1099,6 +1215,8 @@ public Builder clearInfoType() { return this; } /** + * + * *
      * Set if the transformation was limited to a specific `InfoType`.
      * 
@@ -1106,11 +1224,13 @@ public Builder clearInfoType() { * .google.privacy.dlp.v2.InfoType info_type = 4; */ public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - + onChanged(); return getInfoTypeFieldBuilder().getBuilder(); } /** + * + * *
      * Set if the transformation was limited to a specific `InfoType`.
      * 
@@ -1121,11 +1241,14 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { if (infoTypeBuilder_ != null) { return infoTypeBuilder_.getMessageOrBuilder(); } else { - return infoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; + return infoType_ == null + ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() + : infoType_; } } /** + * + * *
      * Set if the transformation was limited to a specific `InfoType`.
      * 
@@ -1133,21 +1256,24 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { * .google.privacy.dlp.v2.InfoType info_type = 4; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + com.google.privacy.dlp.v2.InfoType, + com.google.privacy.dlp.v2.InfoType.Builder, + com.google.privacy.dlp.v2.InfoTypeOrBuilder> getInfoTypeFieldBuilder() { if (infoTypeBuilder_ == null) { - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getInfoType(), - getParentForChildren(), - isClean()); + infoTypeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, + com.google.privacy.dlp.v2.InfoType.Builder, + com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + getInfoType(), getParentForChildren(), isClean()); infoType_ = null; } return infoTypeBuilder_; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1157,12 +1283,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationDescription) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationDescription) private static final com.google.privacy.dlp.v2.TransformationDescription DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationDescription(); } @@ -1171,16 +1297,16 @@ public static com.google.privacy.dlp.v2.TransformationDescription getDefaultInst return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransformationDescription parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransformationDescription(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationDescription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationDescription(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1195,6 +1321,4 @@ public com.google.protobuf.Parser getParserForType() public com.google.privacy.dlp.v2.TransformationDescription getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java similarity index 79% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java index 304c5c1daf48..f592c00090f0 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDescriptionOrBuilder.java @@ -1,32 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; -public interface TransformationDescriptionOrBuilder extends +public interface TransformationDescriptionOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationDescription) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * The transformation type.
    * 
* * .google.privacy.dlp.v2.TransformationType type = 1; + * * @return The enum numeric value on the wire for type. */ int getTypeValue(); /** + * + * *
    * The transformation type.
    * 
* * .google.privacy.dlp.v2.TransformationType type = 1; + * * @return The type. */ com.google.privacy.dlp.v2.TransformationType getType(); /** + * + * *
    * A description of the transformation. This is empty for a
    * RECORD_SUPPRESSION, or is the output of calling toString() on the
@@ -35,10 +59,13 @@ public interface TransformationDescriptionOrBuilder extends
    * 
* * string description = 2; + * * @return The description. */ java.lang.String getDescription(); /** + * + * *
    * A description of the transformation. This is empty for a
    * RECORD_SUPPRESSION, or is the output of calling toString() on the
@@ -47,12 +74,14 @@ public interface TransformationDescriptionOrBuilder extends
    * 
* * string description = 2; + * * @return The bytes for description. */ - com.google.protobuf.ByteString - getDescriptionBytes(); + com.google.protobuf.ByteString getDescriptionBytes(); /** + * + * *
    * A human-readable string representation of the `RecordCondition`
    * corresponding to this transformation. Set if a `RecordCondition` was used
@@ -66,10 +95,13 @@ public interface TransformationDescriptionOrBuilder extends
    * 
* * string condition = 3; + * * @return The condition. */ java.lang.String getCondition(); /** + * + * *
    * A human-readable string representation of the `RecordCondition`
    * corresponding to this transformation. Set if a `RecordCondition` was used
@@ -83,30 +115,38 @@ public interface TransformationDescriptionOrBuilder extends
    * 
* * string condition = 3; + * * @return The bytes for condition. */ - com.google.protobuf.ByteString - getConditionBytes(); + com.google.protobuf.ByteString getConditionBytes(); /** + * + * *
    * Set if the transformation was limited to a specific `InfoType`.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 4; + * * @return Whether the infoType field is set. */ boolean hasInfoType(); /** + * + * *
    * Set if the transformation was limited to a specific `InfoType`.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 4; + * * @return The infoType. */ com.google.privacy.dlp.v2.InfoType getInfoType(); /** + * + * *
    * Set if the transformation was limited to a specific `InfoType`.
    * 
diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java similarity index 78% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java index 999ba82c59ec..80c6389a36c3 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetails.java @@ -1,9 +1,26 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; /** + * + * *
  * Details about a single transformation. This object contains a description of
  * the transformation, information about whether the transformation was
@@ -13,15 +30,16 @@
  *
  * Protobuf type {@code google.privacy.dlp.v2.TransformationDetails}
  */
-public final class TransformationDetails extends
-    com.google.protobuf.GeneratedMessageV3 implements
+public final class TransformationDetails extends com.google.protobuf.GeneratedMessageV3
+    implements
     // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationDetails)
     TransformationDetailsOrBuilder {
-private static final long serialVersionUID = 0L;
+  private static final long serialVersionUID = 0L;
   // Use TransformationDetails.newBuilder() to construct.
   private TransformationDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) {
     super(builder);
   }
+
   private TransformationDetails() {
     resourceName_ = "";
     containerName_ = "";
@@ -30,16 +48,15 @@ private TransformationDetails() {
 
   @java.lang.Override
   @SuppressWarnings({"unused"})
-  protected java.lang.Object newInstance(
-      UnusedPrivateParameter unused) {
+  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
     return new TransformationDetails();
   }
 
   @java.lang.Override
-  public final com.google.protobuf.UnknownFieldSet
-  getUnknownFields() {
+  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
+
   private TransformationDetails(
       com.google.protobuf.CodedInputStream input,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -59,65 +76,78 @@ private TransformationDetails(
           case 0:
             done = true;
             break;
-          case 10: {
-            java.lang.String s = input.readStringRequireUtf8();
+          case 10:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            resourceName_ = s;
-            break;
-          }
-          case 18: {
-            java.lang.String s = input.readStringRequireUtf8();
+              resourceName_ = s;
+              break;
+            }
+          case 18:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
 
-            containerName_ = s;
-            break;
-          }
-          case 26: {
-            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-              transformation_ = new java.util.ArrayList();
-              mutable_bitField0_ |= 0x00000001;
+              containerName_ = s;
+              break;
             }
-            transformation_.add(
-                input.readMessage(com.google.privacy.dlp.v2.TransformationDescription.parser(), extensionRegistry));
-            break;
-          }
-          case 34: {
-            com.google.privacy.dlp.v2.TransformationResultStatus.Builder subBuilder = null;
-            if (statusDetails_ != null) {
-              subBuilder = statusDetails_.toBuilder();
+          case 26:
+            {
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                transformation_ =
+                    new java.util.ArrayList();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              transformation_.add(
+                  input.readMessage(
+                      com.google.privacy.dlp.v2.TransformationDescription.parser(),
+                      extensionRegistry));
+              break;
             }
-            statusDetails_ = input.readMessage(com.google.privacy.dlp.v2.TransformationResultStatus.parser(), extensionRegistry);
-            if (subBuilder != null) {
-              subBuilder.mergeFrom(statusDetails_);
-              statusDetails_ = subBuilder.buildPartial();
+          case 34:
+            {
+              com.google.privacy.dlp.v2.TransformationResultStatus.Builder subBuilder = null;
+              if (statusDetails_ != null) {
+                subBuilder = statusDetails_.toBuilder();
+              }
+              statusDetails_ =
+                  input.readMessage(
+                      com.google.privacy.dlp.v2.TransformationResultStatus.parser(),
+                      extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(statusDetails_);
+                statusDetails_ = subBuilder.buildPartial();
+              }
+
+              break;
             }
-
-            break;
-          }
-          case 40: {
-
-            transformedBytes_ = input.readInt64();
-            break;
-          }
-          case 50: {
-            com.google.privacy.dlp.v2.TransformationLocation.Builder subBuilder = null;
-            if (transformationLocation_ != null) {
-              subBuilder = transformationLocation_.toBuilder();
+          case 40:
+            {
+              transformedBytes_ = input.readInt64();
+              break;
             }
-            transformationLocation_ = input.readMessage(com.google.privacy.dlp.v2.TransformationLocation.parser(), extensionRegistry);
-            if (subBuilder != null) {
-              subBuilder.mergeFrom(transformationLocation_);
-              transformationLocation_ = subBuilder.buildPartial();
+          case 50:
+            {
+              com.google.privacy.dlp.v2.TransformationLocation.Builder subBuilder = null;
+              if (transformationLocation_ != null) {
+                subBuilder = transformationLocation_.toBuilder();
+              }
+              transformationLocation_ =
+                  input.readMessage(
+                      com.google.privacy.dlp.v2.TransformationLocation.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(transformationLocation_);
+                transformationLocation_ = subBuilder.buildPartial();
+              }
+
+              break;
             }
-
-            break;
-          }
-          default: {
-            if (!parseUnknownField(
-                input, unknownFields, extensionRegistry, tag)) {
-              done = true;
+          default:
+            {
+              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
             }
-            break;
-          }
         }
       }
     } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -125,8 +155,7 @@ private TransformationDetails(
     } catch (com.google.protobuf.UninitializedMessageException e) {
       throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
     } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(
-          e).setUnfinishedMessage(this);
+      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
     } finally {
       if (((mutable_bitField0_ & 0x00000001) != 0)) {
         transformation_ = java.util.Collections.unmodifiableList(transformation_);
@@ -135,27 +164,33 @@ private TransformationDetails(
       makeExtensionsImmutable();
     }
   }
-  public static final com.google.protobuf.Descriptors.Descriptor
-      getDescriptor() {
-    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor;
+
+  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+    return com.google.privacy.dlp.v2.DlpProto
+        .internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor;
   }
 
   @java.lang.Override
   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internalGetFieldAccessorTable() {
-    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable
+    return com.google.privacy.dlp.v2.DlpProto
+        .internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable
         .ensureFieldAccessorsInitialized(
-            com.google.privacy.dlp.v2.TransformationDetails.class, com.google.privacy.dlp.v2.TransformationDetails.Builder.class);
+            com.google.privacy.dlp.v2.TransformationDetails.class,
+            com.google.privacy.dlp.v2.TransformationDetails.Builder.class);
   }
 
   public static final int RESOURCE_NAME_FIELD_NUMBER = 1;
   private volatile java.lang.Object resourceName_;
   /**
+   *
+   *
    * 
    * The name of the job that completed the transformation.
    * 
* * string resource_name = 1; + * * @return The resourceName. */ @java.lang.Override @@ -164,29 +199,29 @@ public java.lang.String getResourceName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resourceName_ = s; return s; } } /** + * + * *
    * The name of the job that completed the transformation.
    * 
* * string resource_name = 1; + * * @return The bytes for resourceName. */ @java.lang.Override - public com.google.protobuf.ByteString - getResourceNameBytes() { + public com.google.protobuf.ByteString getResourceNameBytes() { java.lang.Object ref = resourceName_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); resourceName_ = b; return b; } else { @@ -197,12 +232,15 @@ public java.lang.String getResourceName() { public static final int CONTAINER_NAME_FIELD_NUMBER = 2; private volatile java.lang.Object containerName_; /** + * + * *
    * The top level name of the container where the transformation is located
    * (this will be the source file name or table name).
    * 
* * string container_name = 2; + * * @return The containerName. */ @java.lang.Override @@ -211,30 +249,30 @@ public java.lang.String getContainerName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); containerName_ = s; return s; } } /** + * + * *
    * The top level name of the container where the transformation is located
    * (this will be the source file name or table name).
    * 
* * string container_name = 2; + * * @return The bytes for containerName. */ @java.lang.Override - public com.google.protobuf.ByteString - getContainerNameBytes() { + public com.google.protobuf.ByteString getContainerNameBytes() { java.lang.Object ref = containerName_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); containerName_ = b; return b; } else { @@ -245,6 +283,8 @@ public java.lang.String getContainerName() { public static final int TRANSFORMATION_FIELD_NUMBER = 3; private java.util.List transformation_; /** + * + * *
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -256,10 +296,13 @@ public java.lang.String getContainerName() {
    * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3;
    */
   @java.lang.Override
-  public java.util.List getTransformationList() {
+  public java.util.List
+      getTransformationList() {
     return transformation_;
   }
   /**
+   *
+   *
    * 
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -271,11 +314,13 @@ public java.util.List getTr
    * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3;
    */
   @java.lang.Override
-  public java.util.List 
+  public java.util.List
       getTransformationOrBuilderList() {
     return transformation_;
   }
   /**
+   *
+   *
    * 
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -291,6 +336,8 @@ public int getTransformationCount() {
     return transformation_.size();
   }
   /**
+   *
+   *
    * 
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -306,6 +353,8 @@ public com.google.privacy.dlp.v2.TransformationDescription getTransformation(int
     return transformation_.get(index);
   }
   /**
+   *
+   *
    * 
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -325,6 +374,8 @@ public com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransform
   public static final int STATUS_DETAILS_FIELD_NUMBER = 4;
   private com.google.privacy.dlp.v2.TransformationResultStatus statusDetails_;
   /**
+   *
+   *
    * 
    * Status of the transformation, if transformation was not successful, this
    * will specify what caused it to fail, otherwise it will show that the
@@ -332,6 +383,7 @@ public com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransform
    * 
* * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * * @return Whether the statusDetails field is set. */ @java.lang.Override @@ -339,6 +391,8 @@ public boolean hasStatusDetails() { return statusDetails_ != null; } /** + * + * *
    * Status of the transformation, if transformation was not successful, this
    * will specify what caused it to fail, otherwise it will show that the
@@ -346,13 +400,18 @@ public boolean hasStatusDetails() {
    * 
* * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * * @return The statusDetails. */ @java.lang.Override public com.google.privacy.dlp.v2.TransformationResultStatus getStatusDetails() { - return statusDetails_ == null ? com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance() : statusDetails_; + return statusDetails_ == null + ? com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance() + : statusDetails_; } /** + * + * *
    * Status of the transformation, if transformation was not successful, this
    * will specify what caused it to fail, otherwise it will show that the
@@ -369,6 +428,8 @@ public com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder getStatusDe
   public static final int TRANSFORMED_BYTES_FIELD_NUMBER = 5;
   private long transformedBytes_;
   /**
+   *
+   *
    * 
    * The number of bytes that were transformed. If transformation was
    * unsuccessful or did not take place because there was no content to
@@ -376,6 +437,7 @@ public com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder getStatusDe
    * 
* * int64 transformed_bytes = 5; + * * @return The transformedBytes. */ @java.lang.Override @@ -386,11 +448,14 @@ public long getTransformedBytes() { public static final int TRANSFORMATION_LOCATION_FIELD_NUMBER = 6; private com.google.privacy.dlp.v2.TransformationLocation transformationLocation_; /** + * + * *
    * The precise location of the transformed content in the original container.
    * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * * @return Whether the transformationLocation field is set. */ @java.lang.Override @@ -398,18 +463,25 @@ public boolean hasTransformationLocation() { return transformationLocation_ != null; } /** + * + * *
    * The precise location of the transformed content in the original container.
    * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * * @return The transformationLocation. */ @java.lang.Override public com.google.privacy.dlp.v2.TransformationLocation getTransformationLocation() { - return transformationLocation_ == null ? com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance() : transformationLocation_; + return transformationLocation_ == null + ? com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance() + : transformationLocation_; } /** + * + * *
    * The precise location of the transformed content in the original container.
    * 
@@ -417,11 +489,13 @@ public com.google.privacy.dlp.v2.TransformationLocation getTransformationLocatio * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; */ @java.lang.Override - public com.google.privacy.dlp.v2.TransformationLocationOrBuilder getTransformationLocationOrBuilder() { + public com.google.privacy.dlp.v2.TransformationLocationOrBuilder + getTransformationLocationOrBuilder() { return getTransformationLocation(); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -433,8 +507,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceName_); } @@ -469,20 +542,17 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, containerName_); } for (int i = 0; i < transformation_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, transformation_.get(i)); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, transformation_.get(i)); } if (statusDetails_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getStatusDetails()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStatusDetails()); } if (transformedBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, transformedBytes_); + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, transformedBytes_); } if (transformationLocation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getTransformationLocation()); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTransformationLocation()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -492,30 +562,25 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.privacy.dlp.v2.TransformationDetails)) { return super.equals(obj); } - com.google.privacy.dlp.v2.TransformationDetails other = (com.google.privacy.dlp.v2.TransformationDetails) obj; + com.google.privacy.dlp.v2.TransformationDetails other = + (com.google.privacy.dlp.v2.TransformationDetails) obj; - if (!getResourceName() - .equals(other.getResourceName())) return false; - if (!getContainerName() - .equals(other.getContainerName())) return false; - if (!getTransformationList() - .equals(other.getTransformationList())) return false; + if (!getResourceName().equals(other.getResourceName())) return false; + if (!getContainerName().equals(other.getContainerName())) return false; + if (!getTransformationList().equals(other.getTransformationList())) return false; if (hasStatusDetails() != other.hasStatusDetails()) return false; if (hasStatusDetails()) { - if (!getStatusDetails() - .equals(other.getStatusDetails())) return false; + if (!getStatusDetails().equals(other.getStatusDetails())) return false; } - if (getTransformedBytes() - != other.getTransformedBytes()) return false; + if (getTransformedBytes() != other.getTransformedBytes()) return false; if (hasTransformationLocation() != other.hasTransformationLocation()) return false; if (hasTransformationLocation()) { - if (!getTransformationLocation() - .equals(other.getTransformationLocation())) return false; + if (!getTransformationLocation().equals(other.getTransformationLocation())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -541,8 +606,7 @@ public int hashCode() { hash = (53 * hash) + getStatusDetails().hashCode(); } hash = (37 * hash) + TRANSFORMED_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTransformedBytes()); + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTransformedBytes()); if (hasTransformationLocation()) { hash = (37 * hash) + TRANSFORMATION_LOCATION_FIELD_NUMBER; hash = (53 * hash) + getTransformationLocation().hashCode(); @@ -552,97 +616,104 @@ public int hashCode() { return hash; } - public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( - java.nio.ByteBuffer data) + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.TransformationDetails parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.TransformationDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationDetails parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationDetails parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationDetails prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** + * + * *
    * Details about a single transformation. This object contains a description of
    * the transformation, information about whether the transformation was
@@ -652,21 +723,23 @@ protected Builder newBuilderForType(
    *
    * Protobuf type {@code google.privacy.dlp.v2.TransformationDetails}
    */
-  public static final class Builder extends
-      com.google.protobuf.GeneratedMessageV3.Builder implements
+  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+      implements
       // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationDetails)
       com.google.privacy.dlp.v2.TransformationDetailsOrBuilder {
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor;
+    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+      return com.google.privacy.dlp.v2.DlpProto
+          .internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable
+      return com.google.privacy.dlp.v2.DlpProto
+          .internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              com.google.privacy.dlp.v2.TransformationDetails.class, com.google.privacy.dlp.v2.TransformationDetails.Builder.class);
+              com.google.privacy.dlp.v2.TransformationDetails.class,
+              com.google.privacy.dlp.v2.TransformationDetails.Builder.class);
     }
 
     // Construct using com.google.privacy.dlp.v2.TransformationDetails.newBuilder()
@@ -674,17 +747,17 @@ private Builder() {
       maybeForceBuilderInitialization();
     }
 
-    private Builder(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
       maybeForceBuilderInitialization();
     }
+
     private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3
-              .alwaysUseFieldBuilders) {
+      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
         getTransformationFieldBuilder();
       }
     }
+
     @java.lang.Override
     public Builder clear() {
       super.clear();
@@ -716,9 +789,9 @@ public Builder clear() {
     }
 
     @java.lang.Override
-    public com.google.protobuf.Descriptors.Descriptor
-        getDescriptorForType() {
-      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor;
+    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+      return com.google.privacy.dlp.v2.DlpProto
+          .internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor;
     }
 
     @java.lang.Override
@@ -737,7 +810,8 @@ public com.google.privacy.dlp.v2.TransformationDetails build() {
 
     @java.lang.Override
     public com.google.privacy.dlp.v2.TransformationDetails buildPartial() {
-      com.google.privacy.dlp.v2.TransformationDetails result = new com.google.privacy.dlp.v2.TransformationDetails(this);
+      com.google.privacy.dlp.v2.TransformationDetails result =
+          new com.google.privacy.dlp.v2.TransformationDetails(this);
       int from_bitField0_ = bitField0_;
       result.resourceName_ = resourceName_;
       result.containerName_ = containerName_;
@@ -769,38 +843,39 @@ public com.google.privacy.dlp.v2.TransformationDetails buildPartial() {
     public Builder clone() {
       return super.clone();
     }
+
     @java.lang.Override
     public Builder setField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.setField(field, value);
     }
+
     @java.lang.Override
-    public Builder clearField(
-        com.google.protobuf.Descriptors.FieldDescriptor field) {
+    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
       return super.clearField(field);
     }
+
     @java.lang.Override
-    public Builder clearOneof(
-        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
       return super.clearOneof(oneof);
     }
+
     @java.lang.Override
     public Builder setRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        int index, java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
       return super.setRepeatedField(field, index, value);
     }
+
     @java.lang.Override
     public Builder addRepeatedField(
-        com.google.protobuf.Descriptors.FieldDescriptor field,
-        java.lang.Object value) {
+        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
       return super.addRepeatedField(field, value);
     }
+
     @java.lang.Override
     public Builder mergeFrom(com.google.protobuf.Message other) {
       if (other instanceof com.google.privacy.dlp.v2.TransformationDetails) {
-        return mergeFrom((com.google.privacy.dlp.v2.TransformationDetails)other);
+        return mergeFrom((com.google.privacy.dlp.v2.TransformationDetails) other);
       } else {
         super.mergeFrom(other);
         return this;
@@ -808,7 +883,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
     }
 
     public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationDetails other) {
-      if (other == com.google.privacy.dlp.v2.TransformationDetails.getDefaultInstance()) return this;
+      if (other == com.google.privacy.dlp.v2.TransformationDetails.getDefaultInstance())
+        return this;
       if (!other.getResourceName().isEmpty()) {
         resourceName_ = other.resourceName_;
         onChanged();
@@ -835,9 +911,10 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationDetails other)
             transformationBuilder_ = null;
             transformation_ = other.transformation_;
             bitField0_ = (bitField0_ & ~0x00000001);
-            transformationBuilder_ = 
-              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
-                 getTransformationFieldBuilder() : null;
+            transformationBuilder_ =
+                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+                    ? getTransformationFieldBuilder()
+                    : null;
           } else {
             transformationBuilder_.addAllMessages(other.transformation_);
           }
@@ -880,22 +957,25 @@ public Builder mergeFrom(
       }
       return this;
     }
+
     private int bitField0_;
 
     private java.lang.Object resourceName_ = "";
     /**
+     *
+     *
      * 
      * The name of the job that completed the transformation.
      * 
* * string resource_name = 1; + * * @return The resourceName. */ public java.lang.String getResourceName() { java.lang.Object ref = resourceName_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resourceName_ = s; return s; @@ -904,20 +984,21 @@ public java.lang.String getResourceName() { } } /** + * + * *
      * The name of the job that completed the transformation.
      * 
* * string resource_name = 1; + * * @return The bytes for resourceName. */ - public com.google.protobuf.ByteString - getResourceNameBytes() { + public com.google.protobuf.ByteString getResourceNameBytes() { java.lang.Object ref = resourceName_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); resourceName_ = b; return b; } else { @@ -925,54 +1006,61 @@ public java.lang.String getResourceName() { } } /** + * + * *
      * The name of the job that completed the transformation.
      * 
* * string resource_name = 1; + * * @param value The resourceName to set. * @return This builder for chaining. */ - public Builder setResourceName( - java.lang.String value) { + public Builder setResourceName(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + resourceName_ = value; onChanged(); return this; } /** + * + * *
      * The name of the job that completed the transformation.
      * 
* * string resource_name = 1; + * * @return This builder for chaining. */ public Builder clearResourceName() { - + resourceName_ = getDefaultInstance().getResourceName(); onChanged(); return this; } /** + * + * *
      * The name of the job that completed the transformation.
      * 
* * string resource_name = 1; + * * @param value The bytes for resourceName to set. * @return This builder for chaining. */ - public Builder setResourceNameBytes( - com.google.protobuf.ByteString value) { + public Builder setResourceNameBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceName_ = value; onChanged(); return this; @@ -980,19 +1068,21 @@ public Builder setResourceNameBytes( private java.lang.Object containerName_ = ""; /** + * + * *
      * The top level name of the container where the transformation is located
      * (this will be the source file name or table name).
      * 
* * string container_name = 2; + * * @return The containerName. */ public java.lang.String getContainerName() { java.lang.Object ref = containerName_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); containerName_ = s; return s; @@ -1001,21 +1091,22 @@ public java.lang.String getContainerName() { } } /** + * + * *
      * The top level name of the container where the transformation is located
      * (this will be the source file name or table name).
      * 
* * string container_name = 2; + * * @return The bytes for containerName. */ - public com.google.protobuf.ByteString - getContainerNameBytes() { + public com.google.protobuf.ByteString getContainerNameBytes() { java.lang.Object ref = containerName_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); containerName_ = b; return b; } else { @@ -1023,75 +1114,90 @@ public java.lang.String getContainerName() { } } /** + * + * *
      * The top level name of the container where the transformation is located
      * (this will be the source file name or table name).
      * 
* * string container_name = 2; + * * @param value The containerName to set. * @return This builder for chaining. */ - public Builder setContainerName( - java.lang.String value) { + public Builder setContainerName(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + containerName_ = value; onChanged(); return this; } /** + * + * *
      * The top level name of the container where the transformation is located
      * (this will be the source file name or table name).
      * 
* * string container_name = 2; + * * @return This builder for chaining. */ public Builder clearContainerName() { - + containerName_ = getDefaultInstance().getContainerName(); onChanged(); return this; } /** + * + * *
      * The top level name of the container where the transformation is located
      * (this will be the source file name or table name).
      * 
* * string container_name = 2; + * * @param value The bytes for containerName to set. * @return This builder for chaining. */ - public Builder setContainerNameBytes( - com.google.protobuf.ByteString value) { + public Builder setContainerNameBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + containerName_ = value; onChanged(); return this; } private java.util.List transformation_ = - java.util.Collections.emptyList(); + java.util.Collections.emptyList(); + private void ensureTransformationIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - transformation_ = new java.util.ArrayList(transformation_); + transformation_ = + new java.util.ArrayList( + transformation_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationDescription, com.google.privacy.dlp.v2.TransformationDescription.Builder, com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder> transformationBuilder_; + com.google.privacy.dlp.v2.TransformationDescription, + com.google.privacy.dlp.v2.TransformationDescription.Builder, + com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder> + transformationBuilder_; /** + * + * *
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1102,7 +1208,8 @@ private void ensureTransformationIsMutable() {
      *
      * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3;
      */
-    public java.util.List getTransformationList() {
+    public java.util.List
+        getTransformationList() {
       if (transformationBuilder_ == null) {
         return java.util.Collections.unmodifiableList(transformation_);
       } else {
@@ -1110,6 +1217,8 @@ public java.util.List getTr
       }
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1128,6 +1237,8 @@ public int getTransformationCount() {
       }
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1146,6 +1257,8 @@ public com.google.privacy.dlp.v2.TransformationDescription getTransformation(int
       }
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1171,6 +1284,8 @@ public Builder setTransformation(
       return this;
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1193,6 +1308,8 @@ public Builder setTransformation(
       return this;
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1217,6 +1334,8 @@ public Builder addTransformation(com.google.privacy.dlp.v2.TransformationDescrip
       return this;
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1242,6 +1361,8 @@ public Builder addTransformation(
       return this;
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1264,6 +1385,8 @@ public Builder addTransformation(
       return this;
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1286,6 +1409,8 @@ public Builder addTransformation(
       return this;
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1300,8 +1425,7 @@ public Builder addAllTransformation(
         java.lang.Iterable values) {
       if (transformationBuilder_ == null) {
         ensureTransformationIsMutable();
-        com.google.protobuf.AbstractMessageLite.Builder.addAll(
-            values, transformation_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transformation_);
         onChanged();
       } else {
         transformationBuilder_.addAllMessages(values);
@@ -1309,6 +1433,8 @@ public Builder addAllTransformation(
       return this;
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1330,6 +1456,8 @@ public Builder clearTransformation() {
       return this;
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1351,6 +1479,8 @@ public Builder removeTransformation(int index) {
       return this;
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1366,6 +1496,8 @@ public com.google.privacy.dlp.v2.TransformationDescription.Builder getTransforma
       return getTransformationFieldBuilder().getBuilder(index);
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1379,11 +1511,14 @@ public com.google.privacy.dlp.v2.TransformationDescription.Builder getTransforma
     public com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransformationOrBuilder(
         int index) {
       if (transformationBuilder_ == null) {
-        return transformation_.get(index);  } else {
+        return transformation_.get(index);
+      } else {
         return transformationBuilder_.getMessageOrBuilder(index);
       }
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1394,8 +1529,8 @@ public com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransform
      *
      * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3;
      */
-    public java.util.List 
-         getTransformationOrBuilderList() {
+    public java.util.List
+        getTransformationOrBuilderList() {
       if (transformationBuilder_ != null) {
         return transformationBuilder_.getMessageOrBuilderList();
       } else {
@@ -1403,6 +1538,8 @@ public com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransform
       }
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1414,10 +1551,12 @@ public com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransform
      * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3;
      */
     public com.google.privacy.dlp.v2.TransformationDescription.Builder addTransformationBuilder() {
-      return getTransformationFieldBuilder().addBuilder(
-          com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance());
+      return getTransformationFieldBuilder()
+          .addBuilder(com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance());
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1430,10 +1569,13 @@ public com.google.privacy.dlp.v2.TransformationDescription.Builder addTransforma
      */
     public com.google.privacy.dlp.v2.TransformationDescription.Builder addTransformationBuilder(
         int index) {
-      return getTransformationFieldBuilder().addBuilder(
-          index, com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance());
+      return getTransformationFieldBuilder()
+          .addBuilder(
+              index, com.google.privacy.dlp.v2.TransformationDescription.getDefaultInstance());
     }
     /**
+     *
+     *
      * 
      * Description of transformation. This would only contain more than one
      * element if there were multiple matching transformations and which one to
@@ -1444,16 +1586,22 @@ public com.google.privacy.dlp.v2.TransformationDescription.Builder addTransforma
      *
      * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3;
      */
-    public java.util.List 
-         getTransformationBuilderList() {
+    public java.util.List
+        getTransformationBuilderList() {
       return getTransformationFieldBuilder().getBuilderList();
     }
+
     private com.google.protobuf.RepeatedFieldBuilderV3<
-        com.google.privacy.dlp.v2.TransformationDescription, com.google.privacy.dlp.v2.TransformationDescription.Builder, com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder> 
+            com.google.privacy.dlp.v2.TransformationDescription,
+            com.google.privacy.dlp.v2.TransformationDescription.Builder,
+            com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder>
         getTransformationFieldBuilder() {
       if (transformationBuilder_ == null) {
-        transformationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
-            com.google.privacy.dlp.v2.TransformationDescription, com.google.privacy.dlp.v2.TransformationDescription.Builder, com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder>(
+        transformationBuilder_ =
+            new com.google.protobuf.RepeatedFieldBuilderV3<
+                com.google.privacy.dlp.v2.TransformationDescription,
+                com.google.privacy.dlp.v2.TransformationDescription.Builder,
+                com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder>(
                 transformation_,
                 ((bitField0_ & 0x00000001) != 0),
                 getParentForChildren(),
@@ -1465,8 +1613,13 @@ public com.google.privacy.dlp.v2.TransformationDescription.Builder addTransforma
 
     private com.google.privacy.dlp.v2.TransformationResultStatus statusDetails_;
     private com.google.protobuf.SingleFieldBuilderV3<
-        com.google.privacy.dlp.v2.TransformationResultStatus, com.google.privacy.dlp.v2.TransformationResultStatus.Builder, com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder> statusDetailsBuilder_;
+            com.google.privacy.dlp.v2.TransformationResultStatus,
+            com.google.privacy.dlp.v2.TransformationResultStatus.Builder,
+            com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder>
+        statusDetailsBuilder_;
     /**
+     *
+     *
      * 
      * Status of the transformation, if transformation was not successful, this
      * will specify what caused it to fail, otherwise it will show that the
@@ -1474,12 +1627,15 @@ public com.google.privacy.dlp.v2.TransformationDescription.Builder addTransforma
      * 
* * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * * @return Whether the statusDetails field is set. */ public boolean hasStatusDetails() { return statusDetailsBuilder_ != null || statusDetails_ != null; } /** + * + * *
      * Status of the transformation, if transformation was not successful, this
      * will specify what caused it to fail, otherwise it will show that the
@@ -1487,16 +1643,21 @@ public boolean hasStatusDetails() {
      * 
* * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * * @return The statusDetails. */ public com.google.privacy.dlp.v2.TransformationResultStatus getStatusDetails() { if (statusDetailsBuilder_ == null) { - return statusDetails_ == null ? com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance() : statusDetails_; + return statusDetails_ == null + ? com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance() + : statusDetails_; } else { return statusDetailsBuilder_.getMessage(); } } /** + * + * *
      * Status of the transformation, if transformation was not successful, this
      * will specify what caused it to fail, otherwise it will show that the
@@ -1519,6 +1680,8 @@ public Builder setStatusDetails(com.google.privacy.dlp.v2.TransformationResultSt
       return this;
     }
     /**
+     *
+     *
      * 
      * Status of the transformation, if transformation was not successful, this
      * will specify what caused it to fail, otherwise it will show that the
@@ -1539,6 +1702,8 @@ public Builder setStatusDetails(
       return this;
     }
     /**
+     *
+     *
      * 
      * Status of the transformation, if transformation was not successful, this
      * will specify what caused it to fail, otherwise it will show that the
@@ -1551,7 +1716,9 @@ public Builder mergeStatusDetails(com.google.privacy.dlp.v2.TransformationResult
       if (statusDetailsBuilder_ == null) {
         if (statusDetails_ != null) {
           statusDetails_ =
-            com.google.privacy.dlp.v2.TransformationResultStatus.newBuilder(statusDetails_).mergeFrom(value).buildPartial();
+              com.google.privacy.dlp.v2.TransformationResultStatus.newBuilder(statusDetails_)
+                  .mergeFrom(value)
+                  .buildPartial();
         } else {
           statusDetails_ = value;
         }
@@ -1563,6 +1730,8 @@ public Builder mergeStatusDetails(com.google.privacy.dlp.v2.TransformationResult
       return this;
     }
     /**
+     *
+     *
      * 
      * Status of the transformation, if transformation was not successful, this
      * will specify what caused it to fail, otherwise it will show that the
@@ -1583,6 +1752,8 @@ public Builder clearStatusDetails() {
       return this;
     }
     /**
+     *
+     *
      * 
      * Status of the transformation, if transformation was not successful, this
      * will specify what caused it to fail, otherwise it will show that the
@@ -1592,11 +1763,13 @@ public Builder clearStatusDetails() {
      * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4;
      */
     public com.google.privacy.dlp.v2.TransformationResultStatus.Builder getStatusDetailsBuilder() {
-      
+
       onChanged();
       return getStatusDetailsFieldBuilder().getBuilder();
     }
     /**
+     *
+     *
      * 
      * Status of the transformation, if transformation was not successful, this
      * will specify what caused it to fail, otherwise it will show that the
@@ -1605,15 +1778,19 @@ public com.google.privacy.dlp.v2.TransformationResultStatus.Builder getStatusDet
      *
      * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4;
      */
-    public com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder getStatusDetailsOrBuilder() {
+    public com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder
+        getStatusDetailsOrBuilder() {
       if (statusDetailsBuilder_ != null) {
         return statusDetailsBuilder_.getMessageOrBuilder();
       } else {
-        return statusDetails_ == null ?
-            com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance() : statusDetails_;
+        return statusDetails_ == null
+            ? com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance()
+            : statusDetails_;
       }
     }
     /**
+     *
+     *
      * 
      * Status of the transformation, if transformation was not successful, this
      * will specify what caused it to fail, otherwise it will show that the
@@ -1623,21 +1800,26 @@ public com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder getStatusDe
      * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4;
      */
     private com.google.protobuf.SingleFieldBuilderV3<
-        com.google.privacy.dlp.v2.TransformationResultStatus, com.google.privacy.dlp.v2.TransformationResultStatus.Builder, com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder> 
+            com.google.privacy.dlp.v2.TransformationResultStatus,
+            com.google.privacy.dlp.v2.TransformationResultStatus.Builder,
+            com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder>
         getStatusDetailsFieldBuilder() {
       if (statusDetailsBuilder_ == null) {
-        statusDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
-            com.google.privacy.dlp.v2.TransformationResultStatus, com.google.privacy.dlp.v2.TransformationResultStatus.Builder, com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder>(
-                getStatusDetails(),
-                getParentForChildren(),
-                isClean());
+        statusDetailsBuilder_ =
+            new com.google.protobuf.SingleFieldBuilderV3<
+                com.google.privacy.dlp.v2.TransformationResultStatus,
+                com.google.privacy.dlp.v2.TransformationResultStatus.Builder,
+                com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder>(
+                getStatusDetails(), getParentForChildren(), isClean());
         statusDetails_ = null;
       }
       return statusDetailsBuilder_;
     }
 
-    private long transformedBytes_ ;
+    private long transformedBytes_;
     /**
+     *
+     *
      * 
      * The number of bytes that were transformed. If transformation was
      * unsuccessful or did not take place because there was no content to
@@ -1645,6 +1827,7 @@ public com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder getStatusDe
      * 
* * int64 transformed_bytes = 5; + * * @return The transformedBytes. */ @java.lang.Override @@ -1652,6 +1835,8 @@ public long getTransformedBytes() { return transformedBytes_; } /** + * + * *
      * The number of bytes that were transformed. If transformation was
      * unsuccessful or did not take place because there was no content to
@@ -1659,16 +1844,19 @@ public long getTransformedBytes() {
      * 
* * int64 transformed_bytes = 5; + * * @param value The transformedBytes to set. * @return This builder for chaining. */ public Builder setTransformedBytes(long value) { - + transformedBytes_ = value; onChanged(); return this; } /** + * + * *
      * The number of bytes that were transformed. If transformation was
      * unsuccessful or did not take place because there was no content to
@@ -1676,10 +1864,11 @@ public Builder setTransformedBytes(long value) {
      * 
* * int64 transformed_bytes = 5; + * * @return This builder for chaining. */ public Builder clearTransformedBytes() { - + transformedBytes_ = 0L; onChanged(); return this; @@ -1687,41 +1876,55 @@ public Builder clearTransformedBytes() { private com.google.privacy.dlp.v2.TransformationLocation transformationLocation_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationLocation, com.google.privacy.dlp.v2.TransformationLocation.Builder, com.google.privacy.dlp.v2.TransformationLocationOrBuilder> transformationLocationBuilder_; + com.google.privacy.dlp.v2.TransformationLocation, + com.google.privacy.dlp.v2.TransformationLocation.Builder, + com.google.privacy.dlp.v2.TransformationLocationOrBuilder> + transformationLocationBuilder_; /** + * + * *
      * The precise location of the transformed content in the original container.
      * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * * @return Whether the transformationLocation field is set. */ public boolean hasTransformationLocation() { return transformationLocationBuilder_ != null || transformationLocation_ != null; } /** + * + * *
      * The precise location of the transformed content in the original container.
      * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * * @return The transformationLocation. */ public com.google.privacy.dlp.v2.TransformationLocation getTransformationLocation() { if (transformationLocationBuilder_ == null) { - return transformationLocation_ == null ? com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance() : transformationLocation_; + return transformationLocation_ == null + ? com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance() + : transformationLocation_; } else { return transformationLocationBuilder_.getMessage(); } } /** + * + * *
      * The precise location of the transformed content in the original container.
      * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; */ - public Builder setTransformationLocation(com.google.privacy.dlp.v2.TransformationLocation value) { + public Builder setTransformationLocation( + com.google.privacy.dlp.v2.TransformationLocation value) { if (transformationLocationBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1735,6 +1938,8 @@ public Builder setTransformationLocation(com.google.privacy.dlp.v2.Transformatio return this; } /** + * + * *
      * The precise location of the transformed content in the original container.
      * 
@@ -1753,17 +1958,22 @@ public Builder setTransformationLocation( return this; } /** + * + * *
      * The precise location of the transformed content in the original container.
      * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; */ - public Builder mergeTransformationLocation(com.google.privacy.dlp.v2.TransformationLocation value) { + public Builder mergeTransformationLocation( + com.google.privacy.dlp.v2.TransformationLocation value) { if (transformationLocationBuilder_ == null) { if (transformationLocation_ != null) { transformationLocation_ = - com.google.privacy.dlp.v2.TransformationLocation.newBuilder(transformationLocation_).mergeFrom(value).buildPartial(); + com.google.privacy.dlp.v2.TransformationLocation.newBuilder(transformationLocation_) + .mergeFrom(value) + .buildPartial(); } else { transformationLocation_ = value; } @@ -1775,6 +1985,8 @@ public Builder mergeTransformationLocation(com.google.privacy.dlp.v2.Transformat return this; } /** + * + * *
      * The precise location of the transformed content in the original container.
      * 
@@ -1793,33 +2005,42 @@ public Builder clearTransformationLocation() { return this; } /** + * + * *
      * The precise location of the transformed content in the original container.
      * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; */ - public com.google.privacy.dlp.v2.TransformationLocation.Builder getTransformationLocationBuilder() { - + public com.google.privacy.dlp.v2.TransformationLocation.Builder + getTransformationLocationBuilder() { + onChanged(); return getTransformationLocationFieldBuilder().getBuilder(); } /** + * + * *
      * The precise location of the transformed content in the original container.
      * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; */ - public com.google.privacy.dlp.v2.TransformationLocationOrBuilder getTransformationLocationOrBuilder() { + public com.google.privacy.dlp.v2.TransformationLocationOrBuilder + getTransformationLocationOrBuilder() { if (transformationLocationBuilder_ != null) { return transformationLocationBuilder_.getMessageOrBuilder(); } else { - return transformationLocation_ == null ? - com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance() : transformationLocation_; + return transformationLocation_ == null + ? com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance() + : transformationLocation_; } } /** + * + * *
      * The precise location of the transformed content in the original container.
      * 
@@ -1827,21 +2048,24 @@ public com.google.privacy.dlp.v2.TransformationLocationOrBuilder getTransformati * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationLocation, com.google.privacy.dlp.v2.TransformationLocation.Builder, com.google.privacy.dlp.v2.TransformationLocationOrBuilder> + com.google.privacy.dlp.v2.TransformationLocation, + com.google.privacy.dlp.v2.TransformationLocation.Builder, + com.google.privacy.dlp.v2.TransformationLocationOrBuilder> getTransformationLocationFieldBuilder() { if (transformationLocationBuilder_ == null) { - transformationLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationLocation, com.google.privacy.dlp.v2.TransformationLocation.Builder, com.google.privacy.dlp.v2.TransformationLocationOrBuilder>( - getTransformationLocation(), - getParentForChildren(), - isClean()); + transformationLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.TransformationLocation, + com.google.privacy.dlp.v2.TransformationLocation.Builder, + com.google.privacy.dlp.v2.TransformationLocationOrBuilder>( + getTransformationLocation(), getParentForChildren(), isClean()); transformationLocation_ = null; } return transformationLocationBuilder_; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1851,12 +2075,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationDetails) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationDetails) private static final com.google.privacy.dlp.v2.TransformationDetails DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationDetails(); } @@ -1865,16 +2089,16 @@ public static com.google.privacy.dlp.v2.TransformationDetails getDefaultInstance return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransformationDetails parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransformationDetails(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationDetails(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1889,6 +2113,4 @@ public com.google.protobuf.Parser getParserForType() { public com.google.privacy.dlp.v2.TransformationDetails getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java similarity index 86% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java index 01f49cd09ca2..a644ddb7fa1c 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsOrBuilder.java @@ -1,55 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; -public interface TransformationDetailsOrBuilder extends +public interface TransformationDetailsOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationDetails) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * The name of the job that completed the transformation.
    * 
* * string resource_name = 1; + * * @return The resourceName. */ java.lang.String getResourceName(); /** + * + * *
    * The name of the job that completed the transformation.
    * 
* * string resource_name = 1; + * * @return The bytes for resourceName. */ - com.google.protobuf.ByteString - getResourceNameBytes(); + com.google.protobuf.ByteString getResourceNameBytes(); /** + * + * *
    * The top level name of the container where the transformation is located
    * (this will be the source file name or table name).
    * 
* * string container_name = 2; + * * @return The containerName. */ java.lang.String getContainerName(); /** + * + * *
    * The top level name of the container where the transformation is located
    * (this will be the source file name or table name).
    * 
* * string container_name = 2; + * * @return The bytes for containerName. */ - com.google.protobuf.ByteString - getContainerNameBytes(); + com.google.protobuf.ByteString getContainerNameBytes(); /** + * + * *
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -60,9 +88,10 @@ public interface TransformationDetailsOrBuilder extends
    *
    * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3;
    */
-  java.util.List 
-      getTransformationList();
+  java.util.List getTransformationList();
   /**
+   *
+   *
    * 
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -75,6 +104,8 @@ public interface TransformationDetailsOrBuilder extends
    */
   com.google.privacy.dlp.v2.TransformationDescription getTransformation(int index);
   /**
+   *
+   *
    * 
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -87,6 +118,8 @@ public interface TransformationDetailsOrBuilder extends
    */
   int getTransformationCount();
   /**
+   *
+   *
    * 
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -97,9 +130,11 @@ public interface TransformationDetailsOrBuilder extends
    *
    * repeated .google.privacy.dlp.v2.TransformationDescription transformation = 3;
    */
-  java.util.List 
+  java.util.List
       getTransformationOrBuilderList();
   /**
+   *
+   *
    * 
    * Description of transformation. This would only contain more than one
    * element if there were multiple matching transformations and which one to
@@ -114,6 +149,8 @@ com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransformationOr
       int index);
 
   /**
+   *
+   *
    * 
    * Status of the transformation, if transformation was not successful, this
    * will specify what caused it to fail, otherwise it will show that the
@@ -121,10 +158,13 @@ com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransformationOr
    * 
* * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * * @return Whether the statusDetails field is set. */ boolean hasStatusDetails(); /** + * + * *
    * Status of the transformation, if transformation was not successful, this
    * will specify what caused it to fail, otherwise it will show that the
@@ -132,10 +172,13 @@ com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransformationOr
    * 
* * .google.privacy.dlp.v2.TransformationResultStatus status_details = 4; + * * @return The statusDetails. */ com.google.privacy.dlp.v2.TransformationResultStatus getStatusDetails(); /** + * + * *
    * Status of the transformation, if transformation was not successful, this
    * will specify what caused it to fail, otherwise it will show that the
@@ -147,6 +190,8 @@ com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransformationOr
   com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder getStatusDetailsOrBuilder();
 
   /**
+   *
+   *
    * 
    * The number of bytes that were transformed. If transformation was
    * unsuccessful or did not take place because there was no content to
@@ -154,29 +199,38 @@ com.google.privacy.dlp.v2.TransformationDescriptionOrBuilder getTransformationOr
    * 
* * int64 transformed_bytes = 5; + * * @return The transformedBytes. */ long getTransformedBytes(); /** + * + * *
    * The precise location of the transformed content in the original container.
    * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * * @return Whether the transformationLocation field is set. */ boolean hasTransformationLocation(); /** + * + * *
    * The precise location of the transformed content in the original container.
    * 
* * .google.privacy.dlp.v2.TransformationLocation transformation_location = 6; + * * @return The transformationLocation. */ com.google.privacy.dlp.v2.TransformationLocation getTransformationLocation(); /** + * + * *
    * The precise location of the transformed content in the original container.
    * 
diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java similarity index 71% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java index 8a947da68aa2..0e2e53a6d5e8 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfig.java @@ -1,39 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; /** + * + * *
  * Config for storing transformation details.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.TransformationDetailsStorageConfig} */ -public final class TransformationDetailsStorageConfig extends - com.google.protobuf.GeneratedMessageV3 implements +public final class TransformationDetailsStorageConfig extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationDetailsStorageConfig) TransformationDetailsStorageConfigOrBuilder { -private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use TransformationDetailsStorageConfig.newBuilder() to construct. - private TransformationDetailsStorageConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private TransformationDetailsStorageConfig( + com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private TransformationDetailsStorageConfig() { - } + + private TransformationDetailsStorageConfig() {} @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new TransformationDetailsStorageConfig(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private TransformationDetailsStorageConfig( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -52,27 +69,29 @@ private TransformationDetailsStorageConfig( case 0: done = true; break; - case 10: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (typeCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.BigQueryTable) type_).toBuilder(); + case 10: + { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (typeCase_ == 1) { + subBuilder = ((com.google.privacy.dlp.v2.BigQueryTable) type_).toBuilder(); + } + type_ = + input.readMessage( + com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryTable) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; } - type_ = - input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryTable) type_); - type_ = subBuilder.buildPartial(); + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - typeCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -80,34 +99,39 @@ private TransformationDetailsStorageConfig( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.class, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder.class); + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.class, + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder.class); } private int typeCase_ = 0; private java.lang.Object type_; + public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, + implements + com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { TABLE(1), TYPE_NOT_SET(0); private final int value; + private TypeCase(int value) { this.value = value; } @@ -123,24 +147,28 @@ public static TypeCase valueOf(int value) { public static TypeCase forNumber(int value) { switch (value) { - case 1: return TABLE; - case 0: return TYPE_NOT_SET; - default: return null; + case 1: + return TABLE; + case 0: + return TYPE_NOT_SET; + default: + return null; } } + public int getNumber() { return this.value; } }; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); } public static final int TABLE_FIELD_NUMBER = 1; /** + * + * *
    * The BigQuery table in which to store the output. This may be an existing
    * table or in a new table in an existing dataset.
@@ -151,6 +179,7 @@ public int getNumber() {
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; + * * @return Whether the table field is set. */ @java.lang.Override @@ -158,6 +187,8 @@ public boolean hasTable() { return typeCase_ == 1; } /** + * + * *
    * The BigQuery table in which to store the output. This may be an existing
    * table or in a new table in an existing dataset.
@@ -168,16 +199,19 @@ public boolean hasTable() {
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; + * * @return The table. */ @java.lang.Override public com.google.privacy.dlp.v2.BigQueryTable getTable() { if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.BigQueryTable) type_; + return (com.google.privacy.dlp.v2.BigQueryTable) type_; } return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); } /** + * + * *
    * The BigQuery table in which to store the output. This may be an existing
    * table or in a new table in an existing dataset.
@@ -192,12 +226,13 @@ public com.google.privacy.dlp.v2.BigQueryTable getTable() {
   @java.lang.Override
   public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() {
     if (typeCase_ == 1) {
-       return (com.google.privacy.dlp.v2.BigQueryTable) type_;
+      return (com.google.privacy.dlp.v2.BigQueryTable) type_;
     }
     return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance();
   }
 
   private byte memoizedIsInitialized = -1;
+
   @java.lang.Override
   public final boolean isInitialized() {
     byte isInitialized = memoizedIsInitialized;
@@ -209,8 +244,7 @@ public final boolean isInitialized() {
   }
 
   @java.lang.Override
-  public void writeTo(com.google.protobuf.CodedOutputStream output)
-                      throws java.io.IOException {
+  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
     if (typeCase_ == 1) {
       output.writeMessage(1, (com.google.privacy.dlp.v2.BigQueryTable) type_);
     }
@@ -224,8 +258,9 @@ public int getSerializedSize() {
 
     size = 0;
     if (typeCase_ == 1) {
-      size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(1, (com.google.privacy.dlp.v2.BigQueryTable) type_);
+      size +=
+          com.google.protobuf.CodedOutputStream.computeMessageSize(
+              1, (com.google.privacy.dlp.v2.BigQueryTable) type_);
     }
     size += unknownFields.getSerializedSize();
     memoizedSize = size;
@@ -235,18 +270,18 @@ public int getSerializedSize() {
   @java.lang.Override
   public boolean equals(final java.lang.Object obj) {
     if (obj == this) {
-     return true;
+      return true;
     }
     if (!(obj instanceof com.google.privacy.dlp.v2.TransformationDetailsStorageConfig)) {
       return super.equals(obj);
     }
-    com.google.privacy.dlp.v2.TransformationDetailsStorageConfig other = (com.google.privacy.dlp.v2.TransformationDetailsStorageConfig) obj;
+    com.google.privacy.dlp.v2.TransformationDetailsStorageConfig other =
+        (com.google.privacy.dlp.v2.TransformationDetailsStorageConfig) obj;
 
     if (!getTypeCase().equals(other.getTypeCase())) return false;
     switch (typeCase_) {
       case 1:
-        if (!getTable()
-            .equals(other.getTable())) return false;
+        if (!getTable().equals(other.getTable())) return false;
         break;
       case 0:
       default:
@@ -276,117 +311,127 @@ public int hashCode() {
   }
 
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(
-      java.nio.ByteBuffer data)
-      throws com.google.protobuf.InvalidProtocolBufferException {
+      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data);
   }
+
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(
-      java.nio.ByteBuffer data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data, extensionRegistry);
   }
+
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(
       com.google.protobuf.ByteString data)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data);
   }
+
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(
       com.google.protobuf.ByteString data,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data, extensionRegistry);
   }
+
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(byte[] data)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data);
   }
+
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(
-      byte[] data,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws com.google.protobuf.InvalidProtocolBufferException {
     return PARSER.parseFrom(data, extensionRegistry);
   }
-  public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
+
+  public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(
+      java.io.InputStream input) throws java.io.IOException {
+    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
   }
+
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
+    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+        PARSER, input, extensionRegistry);
   }
-  public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseDelimitedFrom(java.io.InputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input);
+
+  public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseDelimitedFrom(
+      java.io.InputStream input) throws java.io.IOException {
+    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
   }
+
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseDelimitedFrom(
-      java.io.InputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+        PARSER, input, extensionRegistry);
   }
+
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(
-      com.google.protobuf.CodedInputStream input)
-      throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input);
+      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
   }
+
   public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig parseFrom(
       com.google.protobuf.CodedInputStream input,
       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
       throws java.io.IOException {
-    return com.google.protobuf.GeneratedMessageV3
-        .parseWithIOException(PARSER, input, extensionRegistry);
+    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+        PARSER, input, extensionRegistry);
   }
 
   @java.lang.Override
-  public Builder newBuilderForType() { return newBuilder(); }
+  public Builder newBuilderForType() {
+    return newBuilder();
+  }
+
   public static Builder newBuilder() {
     return DEFAULT_INSTANCE.toBuilder();
   }
-  public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig prototype) {
+
+  public static Builder newBuilder(
+      com.google.privacy.dlp.v2.TransformationDetailsStorageConfig prototype) {
     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
   }
+
   @java.lang.Override
   public Builder toBuilder() {
-    return this == DEFAULT_INSTANCE
-        ? new Builder() : new Builder().mergeFrom(this);
+    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
   }
 
   @java.lang.Override
-  protected Builder newBuilderForType(
-      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
     Builder builder = new Builder(parent);
     return builder;
   }
   /**
+   *
+   *
    * 
    * Config for storing transformation details.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.TransformationDetailsStorageConfig} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationDetailsStorageConfig) com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.class, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder.class); + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.class, + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder.class); } // Construct using com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.newBuilder() @@ -394,16 +439,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -413,13 +457,14 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; } @java.lang.Override - public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getDefaultInstanceForType() { + public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig + getDefaultInstanceForType() { return com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance(); } @@ -434,7 +479,8 @@ public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig build() { @java.lang.Override public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig buildPartial() { - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig result = new com.google.privacy.dlp.v2.TransformationDetailsStorageConfig(this); + com.google.privacy.dlp.v2.TransformationDetailsStorageConfig result = + new com.google.privacy.dlp.v2.TransformationDetailsStorageConfig(this); if (typeCase_ == 1) { if (tableBuilder_ == null) { result.type_ = type_; @@ -451,38 +497,39 @@ public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig buildPartial public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.privacy.dlp.v2.TransformationDetailsStorageConfig) { - return mergeFrom((com.google.privacy.dlp.v2.TransformationDetailsStorageConfig)other); + return mergeFrom((com.google.privacy.dlp.v2.TransformationDetailsStorageConfig) other); } else { super.mergeFrom(other); return this; @@ -490,15 +537,19 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig other) { - if (other == com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance()) return this; + if (other + == com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance()) + return this; switch (other.getTypeCase()) { - case TABLE: { - mergeTable(other.getTable()); - break; - } - case TYPE_NOT_SET: { - break; - } + case TABLE: + { + mergeTable(other.getTable()); + break; + } + case TYPE_NOT_SET: + { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -519,7 +570,8 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TransformationDetailsStorageConfig) e.getUnfinishedMessage(); + parsedMessage = + (com.google.privacy.dlp.v2.TransformationDetailsStorageConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -528,12 +580,12 @@ public Builder mergeFrom( } return this; } + private int typeCase_ = 0; private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); } public Builder clearType() { @@ -543,10 +595,14 @@ public Builder clearType() { return this; } - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; + com.google.privacy.dlp.v2.BigQueryTable, + com.google.privacy.dlp.v2.BigQueryTable.Builder, + com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + tableBuilder_; /** + * + * *
      * The BigQuery table in which to store the output. This may be an existing
      * table or in a new table in an existing dataset.
@@ -557,6 +613,7 @@ public Builder clearType() {
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; + * * @return Whether the table field is set. */ @java.lang.Override @@ -564,6 +621,8 @@ public boolean hasTable() { return typeCase_ == 1; } /** + * + * *
      * The BigQuery table in which to store the output. This may be an existing
      * table or in a new table in an existing dataset.
@@ -574,6 +633,7 @@ public boolean hasTable() {
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; + * * @return The table. */ @java.lang.Override @@ -591,6 +651,8 @@ public com.google.privacy.dlp.v2.BigQueryTable getTable() { } } /** + * + * *
      * The BigQuery table in which to store the output. This may be an existing
      * table or in a new table in an existing dataset.
@@ -616,6 +678,8 @@ public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) {
       return this;
     }
     /**
+     *
+     *
      * 
      * The BigQuery table in which to store the output. This may be an existing
      * table or in a new table in an existing dataset.
@@ -627,8 +691,7 @@ public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) {
      *
      * .google.privacy.dlp.v2.BigQueryTable table = 1;
      */
-    public Builder setTable(
-        com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) {
+    public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) {
       if (tableBuilder_ == null) {
         type_ = builderForValue.build();
         onChanged();
@@ -639,6 +702,8 @@ public Builder setTable(
       return this;
     }
     /**
+     *
+     *
      * 
      * The BigQuery table in which to store the output. This may be an existing
      * table or in a new table in an existing dataset.
@@ -652,10 +717,13 @@ public Builder setTable(
      */
     public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) {
       if (tableBuilder_ == null) {
-        if (typeCase_ == 1 &&
-            type_ != com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance()) {
-          type_ = com.google.privacy.dlp.v2.BigQueryTable.newBuilder((com.google.privacy.dlp.v2.BigQueryTable) type_)
-              .mergeFrom(value).buildPartial();
+        if (typeCase_ == 1
+            && type_ != com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance()) {
+          type_ =
+              com.google.privacy.dlp.v2.BigQueryTable.newBuilder(
+                      (com.google.privacy.dlp.v2.BigQueryTable) type_)
+                  .mergeFrom(value)
+                  .buildPartial();
         } else {
           type_ = value;
         }
@@ -671,6 +739,8 @@ public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) {
       return this;
     }
     /**
+     *
+     *
      * 
      * The BigQuery table in which to store the output. This may be an existing
      * table or in a new table in an existing dataset.
@@ -699,6 +769,8 @@ public Builder clearTable() {
       return this;
     }
     /**
+     *
+     *
      * 
      * The BigQuery table in which to store the output. This may be an existing
      * table or in a new table in an existing dataset.
@@ -714,6 +786,8 @@ public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() {
       return getTableFieldBuilder().getBuilder();
     }
     /**
+     *
+     *
      * 
      * The BigQuery table in which to store the output. This may be an existing
      * table or in a new table in an existing dataset.
@@ -737,6 +811,8 @@ public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() {
       }
     }
     /**
+     *
+     *
      * 
      * The BigQuery table in which to store the output. This may be an existing
      * table or in a new table in an existing dataset.
@@ -749,26 +825,30 @@ public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() {
      * .google.privacy.dlp.v2.BigQueryTable table = 1;
      */
     private com.google.protobuf.SingleFieldBuilderV3<
-        com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> 
+            com.google.privacy.dlp.v2.BigQueryTable,
+            com.google.privacy.dlp.v2.BigQueryTable.Builder,
+            com.google.privacy.dlp.v2.BigQueryTableOrBuilder>
         getTableFieldBuilder() {
       if (tableBuilder_ == null) {
         if (!(typeCase_ == 1)) {
           type_ = com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance();
         }
-        tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
-            com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>(
-                (com.google.privacy.dlp.v2.BigQueryTable) type_,
-                getParentForChildren(),
-                isClean());
+        tableBuilder_ =
+            new com.google.protobuf.SingleFieldBuilderV3<
+                com.google.privacy.dlp.v2.BigQueryTable,
+                com.google.privacy.dlp.v2.BigQueryTable.Builder,
+                com.google.privacy.dlp.v2.BigQueryTableOrBuilder>(
+                (com.google.privacy.dlp.v2.BigQueryTable) type_, getParentForChildren(), isClean());
         type_ = null;
       }
       typeCase_ = 1;
-      onChanged();;
+      onChanged();
+      ;
       return tableBuilder_;
     }
+
     @java.lang.Override
-    public final Builder setUnknownFields(
-        final com.google.protobuf.UnknownFieldSet unknownFields) {
+    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
       return super.setUnknownFields(unknownFields);
     }
 
@@ -778,12 +858,13 @@ public final Builder mergeUnknownFields(
       return super.mergeUnknownFields(unknownFields);
     }
 
-
     // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationDetailsStorageConfig)
   }
 
   // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationDetailsStorageConfig)
-  private static final com.google.privacy.dlp.v2.TransformationDetailsStorageConfig DEFAULT_INSTANCE;
+  private static final com.google.privacy.dlp.v2.TransformationDetailsStorageConfig
+      DEFAULT_INSTANCE;
+
   static {
     DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationDetailsStorageConfig();
   }
@@ -792,16 +873,16 @@ public static com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getDe
     return DEFAULT_INSTANCE;
   }
 
-  private static final com.google.protobuf.Parser
-      PARSER = new com.google.protobuf.AbstractParser() {
-    @java.lang.Override
-    public TransformationDetailsStorageConfig parsePartialFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return new TransformationDetailsStorageConfig(input, extensionRegistry);
-    }
-  };
+  private static final com.google.protobuf.Parser PARSER =
+      new com.google.protobuf.AbstractParser() {
+        @java.lang.Override
+        public TransformationDetailsStorageConfig parsePartialFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+          return new TransformationDetailsStorageConfig(input, extensionRegistry);
+        }
+      };
 
   public static com.google.protobuf.Parser parser() {
     return PARSER;
@@ -816,6 +897,4 @@ public com.google.protobuf.Parser getParserF
   public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getDefaultInstanceForType() {
     return DEFAULT_INSTANCE;
   }
-
 }
-
diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java
similarity index 74%
rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java
rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java
index 4c06560d6be8..ecdbfb5bb387 100644
--- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationDetailsStorageConfigOrBuilder.java
@@ -1,13 +1,31 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: google/privacy/dlp/v2/dlp.proto
 
 package com.google.privacy.dlp.v2;
 
-public interface TransformationDetailsStorageConfigOrBuilder extends
+public interface TransformationDetailsStorageConfigOrBuilder
+    extends
     // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationDetailsStorageConfig)
     com.google.protobuf.MessageOrBuilder {
 
   /**
+   *
+   *
    * 
    * The BigQuery table in which to store the output. This may be an existing
    * table or in a new table in an existing dataset.
@@ -18,10 +36,13 @@ public interface TransformationDetailsStorageConfigOrBuilder extends
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; + * * @return Whether the table field is set. */ boolean hasTable(); /** + * + * *
    * The BigQuery table in which to store the output. This may be an existing
    * table or in a new table in an existing dataset.
@@ -32,10 +53,13 @@ public interface TransformationDetailsStorageConfigOrBuilder extends
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; + * * @return The table. */ com.google.privacy.dlp.v2.BigQueryTable getTable(); /** + * + * *
    * The BigQuery table in which to store the output. This may be an existing
    * table or in a new table in an existing dataset.
diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java
similarity index 73%
rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java
rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java
index ac07635ab0ee..71f51794cae0 100644
--- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java
+++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocation.java
@@ -1,40 +1,57 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 // Generated by the protocol buffer compiler.  DO NOT EDIT!
 // source: google/privacy/dlp/v2/dlp.proto
 
 package com.google.privacy.dlp.v2;
 
 /**
+ *
+ *
  * 
  * Specifies the location of a transformation.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.TransformationLocation} */ -public final class TransformationLocation extends - com.google.protobuf.GeneratedMessageV3 implements +public final class TransformationLocation extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationLocation) TransformationLocationOrBuilder { -private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use TransformationLocation.newBuilder() to construct. private TransformationLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } + private TransformationLocation() { containerType_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new TransformationLocation(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private TransformationLocation( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -53,39 +70,45 @@ private TransformationLocation( case 0: done = true; break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - locationTypeCase_ = 1; - locationType_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.RecordTransformation.Builder subBuilder = null; - if (locationTypeCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.RecordTransformation) locationType_).toBuilder(); + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + locationTypeCase_ = 1; + locationType_ = s; + break; } - locationType_ = - input.readMessage(com.google.privacy.dlp.v2.RecordTransformation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.RecordTransformation) locationType_); - locationType_ = subBuilder.buildPartial(); + case 18: + { + com.google.privacy.dlp.v2.RecordTransformation.Builder subBuilder = null; + if (locationTypeCase_ == 2) { + subBuilder = + ((com.google.privacy.dlp.v2.RecordTransformation) locationType_).toBuilder(); + } + locationType_ = + input.readMessage( + com.google.privacy.dlp.v2.RecordTransformation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.privacy.dlp.v2.RecordTransformation) locationType_); + locationType_ = subBuilder.buildPartial(); + } + locationTypeCase_ = 2; + break; } - locationTypeCase_ = 2; - break; - } - case 24: { - int rawValue = input.readEnum(); + case 24: + { + int rawValue = input.readEnum(); - containerType_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + containerType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -93,35 +116,40 @@ private TransformationLocation( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationLocation.class, com.google.privacy.dlp.v2.TransformationLocation.Builder.class); + com.google.privacy.dlp.v2.TransformationLocation.class, + com.google.privacy.dlp.v2.TransformationLocation.Builder.class); } private int locationTypeCase_ = 0; private java.lang.Object locationType_; + public enum LocationTypeCase - implements com.google.protobuf.Internal.EnumLite, + implements + com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { FINDING_ID(1), RECORD_TRANSFORMATION(2), LOCATIONTYPE_NOT_SET(0); private final int value; + private LocationTypeCase(int value) { this.value = value; } @@ -137,25 +165,30 @@ public static LocationTypeCase valueOf(int value) { public static LocationTypeCase forNumber(int value) { switch (value) { - case 1: return FINDING_ID; - case 2: return RECORD_TRANSFORMATION; - case 0: return LOCATIONTYPE_NOT_SET; - default: return null; + case 1: + return FINDING_ID; + case 2: + return RECORD_TRANSFORMATION; + case 0: + return LOCATIONTYPE_NOT_SET; + default: + return null; } } + public int getNumber() { return this.value; } }; - public LocationTypeCase - getLocationTypeCase() { - return LocationTypeCase.forNumber( - locationTypeCase_); + public LocationTypeCase getLocationTypeCase() { + return LocationTypeCase.forNumber(locationTypeCase_); } public static final int FINDING_ID_FIELD_NUMBER = 1; /** + * + * *
    * For infotype transformations, link to the corresponding findings ID so
    * that location information does not need to be duplicated. Each findings
@@ -165,12 +198,15 @@ public int getNumber() {
    * 
* * string finding_id = 1; + * * @return Whether the findingId field is set. */ public boolean hasFindingId() { return locationTypeCase_ == 1; } /** + * + * *
    * For infotype transformations, link to the corresponding findings ID so
    * that location information does not need to be duplicated. Each findings
@@ -180,6 +216,7 @@ public boolean hasFindingId() {
    * 
* * string finding_id = 1; + * * @return The findingId. */ public java.lang.String getFindingId() { @@ -190,8 +227,7 @@ public java.lang.String getFindingId() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (locationTypeCase_ == 1) { locationType_ = s; @@ -200,6 +236,8 @@ public java.lang.String getFindingId() { } } /** + * + * *
    * For infotype transformations, link to the corresponding findings ID so
    * that location information does not need to be duplicated. Each findings
@@ -209,18 +247,17 @@ public java.lang.String getFindingId() {
    * 
* * string finding_id = 1; + * * @return The bytes for findingId. */ - public com.google.protobuf.ByteString - getFindingIdBytes() { + public com.google.protobuf.ByteString getFindingIdBytes() { java.lang.Object ref = ""; if (locationTypeCase_ == 1) { ref = locationType_; } if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (locationTypeCase_ == 1) { locationType_ = b; } @@ -232,11 +269,14 @@ public java.lang.String getFindingId() { public static final int RECORD_TRANSFORMATION_FIELD_NUMBER = 2; /** + * + * *
    * For record transformations, provide a field and container information.
    * 
* * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * * @return Whether the recordTransformation field is set. */ @java.lang.Override @@ -244,21 +284,26 @@ public boolean hasRecordTransformation() { return locationTypeCase_ == 2; } /** + * + * *
    * For record transformations, provide a field and container information.
    * 
* * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * * @return The recordTransformation. */ @java.lang.Override public com.google.privacy.dlp.v2.RecordTransformation getRecordTransformation() { if (locationTypeCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordTransformation) locationType_; + return (com.google.privacy.dlp.v2.RecordTransformation) locationType_; } return com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); } /** + * + * *
    * For record transformations, provide a field and container information.
    * 
@@ -266,9 +311,10 @@ public com.google.privacy.dlp.v2.RecordTransformation getRecordTransformation() * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; */ @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformationOrBuilder getRecordTransformationOrBuilder() { + public com.google.privacy.dlp.v2.RecordTransformationOrBuilder + getRecordTransformationOrBuilder() { if (locationTypeCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordTransformation) locationType_; + return (com.google.privacy.dlp.v2.RecordTransformation) locationType_; } return com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); } @@ -276,33 +322,45 @@ public com.google.privacy.dlp.v2.RecordTransformationOrBuilder getRecordTransfor public static final int CONTAINER_TYPE_FIELD_NUMBER = 3; private int containerType_; /** + * + * *
    * Information about the functionality of the container where this finding
    * occurred, if available.
    * 
* * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * * @return The enum numeric value on the wire for containerType. */ - @java.lang.Override public int getContainerTypeValue() { + @java.lang.Override + public int getContainerTypeValue() { return containerType_; } /** + * + * *
    * Information about the functionality of the container where this finding
    * occurred, if available.
    * 
* * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * * @return The containerType. */ - @java.lang.Override public com.google.privacy.dlp.v2.TransformationContainerType getContainerType() { + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationContainerType getContainerType() { @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TransformationContainerType result = com.google.privacy.dlp.v2.TransformationContainerType.valueOf(containerType_); - return result == null ? com.google.privacy.dlp.v2.TransformationContainerType.UNRECOGNIZED : result; + com.google.privacy.dlp.v2.TransformationContainerType result = + com.google.privacy.dlp.v2.TransformationContainerType.valueOf(containerType_); + return result == null + ? com.google.privacy.dlp.v2.TransformationContainerType.UNRECOGNIZED + : result; } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -314,15 +372,16 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (locationTypeCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, locationType_); } if (locationTypeCase_ == 2) { output.writeMessage(2, (com.google.privacy.dlp.v2.RecordTransformation) locationType_); } - if (containerType_ != com.google.privacy.dlp.v2.TransformationContainerType.TRANSFORM_UNKNOWN_CONTAINER.getNumber()) { + if (containerType_ + != com.google.privacy.dlp.v2.TransformationContainerType.TRANSFORM_UNKNOWN_CONTAINER + .getNumber()) { output.writeEnum(3, containerType_); } unknownFields.writeTo(output); @@ -338,12 +397,14 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, locationType_); } if (locationTypeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.RecordTransformation) locationType_); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.privacy.dlp.v2.RecordTransformation) locationType_); } - if (containerType_ != com.google.privacy.dlp.v2.TransformationContainerType.TRANSFORM_UNKNOWN_CONTAINER.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, containerType_); + if (containerType_ + != com.google.privacy.dlp.v2.TransformationContainerType.TRANSFORM_UNKNOWN_CONTAINER + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, containerType_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -353,23 +414,22 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.privacy.dlp.v2.TransformationLocation)) { return super.equals(obj); } - com.google.privacy.dlp.v2.TransformationLocation other = (com.google.privacy.dlp.v2.TransformationLocation) obj; + com.google.privacy.dlp.v2.TransformationLocation other = + (com.google.privacy.dlp.v2.TransformationLocation) obj; if (containerType_ != other.containerType_) return false; if (!getLocationTypeCase().equals(other.getLocationTypeCase())) return false; switch (locationTypeCase_) { case 1: - if (!getFindingId() - .equals(other.getFindingId())) return false; + if (!getFindingId().equals(other.getFindingId())) return false; break; case 2: - if (!getRecordTransformation() - .equals(other.getRecordTransformation())) return false; + if (!getRecordTransformation().equals(other.getRecordTransformation())) return false; break; case 0: default: @@ -404,118 +464,127 @@ public int hashCode() { return hash; } - public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( - java.nio.ByteBuffer data) + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.TransformationLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.TransformationLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.TransformationLocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationLocation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationLocation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** + * + * *
    * Specifies the location of a transformation.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.TransformationLocation} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationLocation) com.google.privacy.dlp.v2.TransformationLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationLocation.class, com.google.privacy.dlp.v2.TransformationLocation.Builder.class); + com.google.privacy.dlp.v2.TransformationLocation.class, + com.google.privacy.dlp.v2.TransformationLocation.Builder.class); } // Construct using com.google.privacy.dlp.v2.TransformationLocation.newBuilder() @@ -523,16 +592,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -544,9 +612,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; } @java.lang.Override @@ -565,7 +633,8 @@ public com.google.privacy.dlp.v2.TransformationLocation build() { @java.lang.Override public com.google.privacy.dlp.v2.TransformationLocation buildPartial() { - com.google.privacy.dlp.v2.TransformationLocation result = new com.google.privacy.dlp.v2.TransformationLocation(this); + com.google.privacy.dlp.v2.TransformationLocation result = + new com.google.privacy.dlp.v2.TransformationLocation(this); if (locationTypeCase_ == 1) { result.locationType_ = locationType_; } @@ -586,38 +655,39 @@ public com.google.privacy.dlp.v2.TransformationLocation buildPartial() { public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.privacy.dlp.v2.TransformationLocation) { - return mergeFrom((com.google.privacy.dlp.v2.TransformationLocation)other); + return mergeFrom((com.google.privacy.dlp.v2.TransformationLocation) other); } else { super.mergeFrom(other); return this; @@ -625,24 +695,28 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationLocation other) { - if (other == com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance()) return this; + if (other == com.google.privacy.dlp.v2.TransformationLocation.getDefaultInstance()) + return this; if (other.containerType_ != 0) { setContainerTypeValue(other.getContainerTypeValue()); } switch (other.getLocationTypeCase()) { - case FINDING_ID: { - locationTypeCase_ = 1; - locationType_ = other.locationType_; - onChanged(); - break; - } - case RECORD_TRANSFORMATION: { - mergeRecordTransformation(other.getRecordTransformation()); - break; - } - case LOCATIONTYPE_NOT_SET: { - break; - } + case FINDING_ID: + { + locationTypeCase_ = 1; + locationType_ = other.locationType_; + onChanged(); + break; + } + case RECORD_TRANSFORMATION: + { + mergeRecordTransformation(other.getRecordTransformation()); + break; + } + case LOCATIONTYPE_NOT_SET: + { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -672,12 +746,12 @@ public Builder mergeFrom( } return this; } + private int locationTypeCase_ = 0; private java.lang.Object locationType_; - public LocationTypeCase - getLocationTypeCase() { - return LocationTypeCase.forNumber( - locationTypeCase_); + + public LocationTypeCase getLocationTypeCase() { + return LocationTypeCase.forNumber(locationTypeCase_); } public Builder clearLocationType() { @@ -687,8 +761,9 @@ public Builder clearLocationType() { return this; } - /** + * + * *
      * For infotype transformations, link to the corresponding findings ID so
      * that location information does not need to be duplicated. Each findings
@@ -698,6 +773,7 @@ public Builder clearLocationType() {
      * 
* * string finding_id = 1; + * * @return Whether the findingId field is set. */ @java.lang.Override @@ -705,6 +781,8 @@ public boolean hasFindingId() { return locationTypeCase_ == 1; } /** + * + * *
      * For infotype transformations, link to the corresponding findings ID so
      * that location information does not need to be duplicated. Each findings
@@ -714,6 +792,7 @@ public boolean hasFindingId() {
      * 
* * string finding_id = 1; + * * @return The findingId. */ @java.lang.Override @@ -723,8 +802,7 @@ public java.lang.String getFindingId() { ref = locationType_; } if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (locationTypeCase_ == 1) { locationType_ = s; @@ -735,6 +813,8 @@ public java.lang.String getFindingId() { } } /** + * + * *
      * For infotype transformations, link to the corresponding findings ID so
      * that location information does not need to be duplicated. Each findings
@@ -744,19 +824,18 @@ public java.lang.String getFindingId() {
      * 
* * string finding_id = 1; + * * @return The bytes for findingId. */ @java.lang.Override - public com.google.protobuf.ByteString - getFindingIdBytes() { + public com.google.protobuf.ByteString getFindingIdBytes() { java.lang.Object ref = ""; if (locationTypeCase_ == 1) { ref = locationType_; } if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (locationTypeCase_ == 1) { locationType_ = b; } @@ -766,6 +845,8 @@ public java.lang.String getFindingId() { } } /** + * + * *
      * For infotype transformations, link to the corresponding findings ID so
      * that location information does not need to be duplicated. Each findings
@@ -775,20 +856,22 @@ public java.lang.String getFindingId() {
      * 
* * string finding_id = 1; + * * @param value The findingId to set. * @return This builder for chaining. */ - public Builder setFindingId( - java.lang.String value) { + public Builder setFindingId(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - locationTypeCase_ = 1; + throw new NullPointerException(); + } + locationTypeCase_ = 1; locationType_ = value; onChanged(); return this; } /** + * + * *
      * For infotype transformations, link to the corresponding findings ID so
      * that location information does not need to be duplicated. Each findings
@@ -798,6 +881,7 @@ public Builder setFindingId(
      * 
* * string finding_id = 1; + * * @return This builder for chaining. */ public Builder clearFindingId() { @@ -809,6 +893,8 @@ public Builder clearFindingId() { return this; } /** + * + * *
      * For infotype transformations, link to the corresponding findings ID so
      * that location information does not need to be duplicated. Each findings
@@ -818,15 +904,15 @@ public Builder clearFindingId() {
      * 
* * string finding_id = 1; + * * @param value The bytes for findingId to set. * @return This builder for chaining. */ - public Builder setFindingIdBytes( - com.google.protobuf.ByteString value) { + public Builder setFindingIdBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); locationTypeCase_ = 1; locationType_ = value; onChanged(); @@ -834,13 +920,19 @@ public Builder setFindingIdBytes( } private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordTransformation, com.google.privacy.dlp.v2.RecordTransformation.Builder, com.google.privacy.dlp.v2.RecordTransformationOrBuilder> recordTransformationBuilder_; + com.google.privacy.dlp.v2.RecordTransformation, + com.google.privacy.dlp.v2.RecordTransformation.Builder, + com.google.privacy.dlp.v2.RecordTransformationOrBuilder> + recordTransformationBuilder_; /** + * + * *
      * For record transformations, provide a field and container information.
      * 
* * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * * @return Whether the recordTransformation field is set. */ @java.lang.Override @@ -848,11 +940,14 @@ public boolean hasRecordTransformation() { return locationTypeCase_ == 2; } /** + * + * *
      * For record transformations, provide a field and container information.
      * 
* * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * * @return The recordTransformation. */ @java.lang.Override @@ -870,6 +965,8 @@ public com.google.privacy.dlp.v2.RecordTransformation getRecordTransformation() } } /** + * + * *
      * For record transformations, provide a field and container information.
      * 
@@ -890,6 +987,8 @@ public Builder setRecordTransformation(com.google.privacy.dlp.v2.RecordTransform return this; } /** + * + * *
      * For record transformations, provide a field and container information.
      * 
@@ -908,6 +1007,8 @@ public Builder setRecordTransformation( return this; } /** + * + * *
      * For record transformations, provide a field and container information.
      * 
@@ -916,10 +1017,14 @@ public Builder setRecordTransformation( */ public Builder mergeRecordTransformation(com.google.privacy.dlp.v2.RecordTransformation value) { if (recordTransformationBuilder_ == null) { - if (locationTypeCase_ == 2 && - locationType_ != com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance()) { - locationType_ = com.google.privacy.dlp.v2.RecordTransformation.newBuilder((com.google.privacy.dlp.v2.RecordTransformation) locationType_) - .mergeFrom(value).buildPartial(); + if (locationTypeCase_ == 2 + && locationType_ + != com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance()) { + locationType_ = + com.google.privacy.dlp.v2.RecordTransformation.newBuilder( + (com.google.privacy.dlp.v2.RecordTransformation) locationType_) + .mergeFrom(value) + .buildPartial(); } else { locationType_ = value; } @@ -935,6 +1040,8 @@ public Builder mergeRecordTransformation(com.google.privacy.dlp.v2.RecordTransfo return this; } /** + * + * *
      * For record transformations, provide a field and container information.
      * 
@@ -958,6 +1065,8 @@ public Builder clearRecordTransformation() { return this; } /** + * + * *
      * For record transformations, provide a field and container information.
      * 
@@ -968,6 +1077,8 @@ public com.google.privacy.dlp.v2.RecordTransformation.Builder getRecordTransform return getRecordTransformationFieldBuilder().getBuilder(); } /** + * + * *
      * For record transformations, provide a field and container information.
      * 
@@ -975,7 +1086,8 @@ public com.google.privacy.dlp.v2.RecordTransformation.Builder getRecordTransform * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; */ @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformationOrBuilder getRecordTransformationOrBuilder() { + public com.google.privacy.dlp.v2.RecordTransformationOrBuilder + getRecordTransformationOrBuilder() { if ((locationTypeCase_ == 2) && (recordTransformationBuilder_ != null)) { return recordTransformationBuilder_.getMessageOrBuilder(); } else { @@ -986,6 +1098,8 @@ public com.google.privacy.dlp.v2.RecordTransformationOrBuilder getRecordTransfor } } /** + * + * *
      * For record transformations, provide a field and container information.
      * 
@@ -993,75 +1107,97 @@ public com.google.privacy.dlp.v2.RecordTransformationOrBuilder getRecordTransfor * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordTransformation, com.google.privacy.dlp.v2.RecordTransformation.Builder, com.google.privacy.dlp.v2.RecordTransformationOrBuilder> + com.google.privacy.dlp.v2.RecordTransformation, + com.google.privacy.dlp.v2.RecordTransformation.Builder, + com.google.privacy.dlp.v2.RecordTransformationOrBuilder> getRecordTransformationFieldBuilder() { if (recordTransformationBuilder_ == null) { if (!(locationTypeCase_ == 2)) { locationType_ = com.google.privacy.dlp.v2.RecordTransformation.getDefaultInstance(); } - recordTransformationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordTransformation, com.google.privacy.dlp.v2.RecordTransformation.Builder, com.google.privacy.dlp.v2.RecordTransformationOrBuilder>( + recordTransformationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.RecordTransformation, + com.google.privacy.dlp.v2.RecordTransformation.Builder, + com.google.privacy.dlp.v2.RecordTransformationOrBuilder>( (com.google.privacy.dlp.v2.RecordTransformation) locationType_, getParentForChildren(), isClean()); locationType_ = null; } locationTypeCase_ = 2; - onChanged();; + onChanged(); + ; return recordTransformationBuilder_; } private int containerType_ = 0; /** + * + * *
      * Information about the functionality of the container where this finding
      * occurred, if available.
      * 
* * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * * @return The enum numeric value on the wire for containerType. */ - @java.lang.Override public int getContainerTypeValue() { + @java.lang.Override + public int getContainerTypeValue() { return containerType_; } /** + * + * *
      * Information about the functionality of the container where this finding
      * occurred, if available.
      * 
* * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * * @param value The enum numeric value on the wire for containerType to set. * @return This builder for chaining. */ public Builder setContainerTypeValue(int value) { - + containerType_ = value; onChanged(); return this; } /** + * + * *
      * Information about the functionality of the container where this finding
      * occurred, if available.
      * 
* * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * * @return The containerType. */ @java.lang.Override public com.google.privacy.dlp.v2.TransformationContainerType getContainerType() { @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TransformationContainerType result = com.google.privacy.dlp.v2.TransformationContainerType.valueOf(containerType_); - return result == null ? com.google.privacy.dlp.v2.TransformationContainerType.UNRECOGNIZED : result; + com.google.privacy.dlp.v2.TransformationContainerType result = + com.google.privacy.dlp.v2.TransformationContainerType.valueOf(containerType_); + return result == null + ? com.google.privacy.dlp.v2.TransformationContainerType.UNRECOGNIZED + : result; } /** + * + * *
      * Information about the functionality of the container where this finding
      * occurred, if available.
      * 
* * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * * @param value The containerType to set. * @return This builder for chaining. */ @@ -1069,29 +1205,32 @@ public Builder setContainerType(com.google.privacy.dlp.v2.TransformationContaine if (value == null) { throw new NullPointerException(); } - + containerType_ = value.getNumber(); onChanged(); return this; } /** + * + * *
      * Information about the functionality of the container where this finding
      * occurred, if available.
      * 
* * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * * @return This builder for chaining. */ public Builder clearContainerType() { - + containerType_ = 0; onChanged(); return this; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -1101,12 +1240,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationLocation) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationLocation) private static final com.google.privacy.dlp.v2.TransformationLocation DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationLocation(); } @@ -1115,16 +1254,16 @@ public static com.google.privacy.dlp.v2.TransformationLocation getDefaultInstanc return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransformationLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransformationLocation(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationLocation(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -1139,6 +1278,4 @@ public com.google.protobuf.Parser getParserForType() { public com.google.privacy.dlp.v2.TransformationLocation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java similarity index 80% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java index d944788cde5f..c5ac2d41e581 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationLocationOrBuilder.java @@ -1,13 +1,31 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; -public interface TransformationLocationOrBuilder extends +public interface TransformationLocationOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationLocation) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * For infotype transformations, link to the corresponding findings ID so
    * that location information does not need to be duplicated. Each findings
@@ -17,10 +35,13 @@ public interface TransformationLocationOrBuilder extends
    * 
* * string finding_id = 1; + * * @return Whether the findingId field is set. */ boolean hasFindingId(); /** + * + * *
    * For infotype transformations, link to the corresponding findings ID so
    * that location information does not need to be duplicated. Each findings
@@ -30,10 +51,13 @@ public interface TransformationLocationOrBuilder extends
    * 
* * string finding_id = 1; + * * @return The findingId. */ java.lang.String getFindingId(); /** + * + * *
    * For infotype transformations, link to the corresponding findings ID so
    * that location information does not need to be duplicated. Each findings
@@ -43,30 +67,38 @@ public interface TransformationLocationOrBuilder extends
    * 
* * string finding_id = 1; + * * @return The bytes for findingId. */ - com.google.protobuf.ByteString - getFindingIdBytes(); + com.google.protobuf.ByteString getFindingIdBytes(); /** + * + * *
    * For record transformations, provide a field and container information.
    * 
* * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * * @return Whether the recordTransformation field is set. */ boolean hasRecordTransformation(); /** + * + * *
    * For record transformations, provide a field and container information.
    * 
* * .google.privacy.dlp.v2.RecordTransformation record_transformation = 2; + * * @return The recordTransformation. */ com.google.privacy.dlp.v2.RecordTransformation getRecordTransformation(); /** + * + * *
    * For record transformations, provide a field and container information.
    * 
@@ -76,22 +108,28 @@ public interface TransformationLocationOrBuilder extends com.google.privacy.dlp.v2.RecordTransformationOrBuilder getRecordTransformationOrBuilder(); /** + * + * *
    * Information about the functionality of the container where this finding
    * occurred, if available.
    * 
* * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * * @return The enum numeric value on the wire for containerType. */ int getContainerTypeValue(); /** + * + * *
    * Information about the functionality of the container where this finding
    * occurred, if available.
    * 
* * .google.privacy.dlp.v2.TransformationContainerType container_type = 3; + * * @return The containerType. */ com.google.privacy.dlp.v2.TransformationContainerType getContainerType(); diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java similarity index 69% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java index 148195253e31..44d5311f608d 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatus.java @@ -1,36 +1,49 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; -/** - * Protobuf type {@code google.privacy.dlp.v2.TransformationResultStatus} - */ -public final class TransformationResultStatus extends - com.google.protobuf.GeneratedMessageV3 implements +/** Protobuf type {@code google.privacy.dlp.v2.TransformationResultStatus} */ +public final class TransformationResultStatus extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationResultStatus) TransformationResultStatusOrBuilder { -private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use TransformationResultStatus.newBuilder() to construct. private TransformationResultStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } + private TransformationResultStatus() { resultStatusType_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new TransformationResultStatus(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private TransformationResultStatus( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -49,32 +62,34 @@ private TransformationResultStatus( case 0: done = true; break; - case 8: { - int rawValue = input.readEnum(); + case 8: + { + int rawValue = input.readEnum(); - resultStatusType_ = rawValue; - break; - } - case 18: { - com.google.rpc.Status.Builder subBuilder = null; - if (details_ != null) { - subBuilder = details_.toBuilder(); + resultStatusType_ = rawValue; + break; } - details_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(details_); - details_ = subBuilder.buildPartial(); + case 18: + { + com.google.rpc.Status.Builder subBuilder = null; + if (details_ != null) { + subBuilder = details_.toBuilder(); + } + details_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(details_); + details_ = subBuilder.buildPartial(); + } + + break; } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -82,63 +97,79 @@ private TransformationResultStatus( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationResultStatus.class, com.google.privacy.dlp.v2.TransformationResultStatus.Builder.class); + com.google.privacy.dlp.v2.TransformationResultStatus.class, + com.google.privacy.dlp.v2.TransformationResultStatus.Builder.class); } public static final int RESULT_STATUS_TYPE_FIELD_NUMBER = 1; private int resultStatusType_; /** + * + * *
    * Transformation result status type, this will be either SUCCESS, or it will
    * be the reason for why the transformation was not completely successful.
    * 
* * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * * @return The enum numeric value on the wire for resultStatusType. */ - @java.lang.Override public int getResultStatusTypeValue() { + @java.lang.Override + public int getResultStatusTypeValue() { return resultStatusType_; } /** + * + * *
    * Transformation result status type, this will be either SUCCESS, or it will
    * be the reason for why the transformation was not completely successful.
    * 
* * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * * @return The resultStatusType. */ - @java.lang.Override public com.google.privacy.dlp.v2.TransformationResultStatusType getResultStatusType() { + @java.lang.Override + public com.google.privacy.dlp.v2.TransformationResultStatusType getResultStatusType() { @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TransformationResultStatusType result = com.google.privacy.dlp.v2.TransformationResultStatusType.valueOf(resultStatusType_); - return result == null ? com.google.privacy.dlp.v2.TransformationResultStatusType.UNRECOGNIZED : result; + com.google.privacy.dlp.v2.TransformationResultStatusType result = + com.google.privacy.dlp.v2.TransformationResultStatusType.valueOf(resultStatusType_); + return result == null + ? com.google.privacy.dlp.v2.TransformationResultStatusType.UNRECOGNIZED + : result; } public static final int DETAILS_FIELD_NUMBER = 2; private com.google.rpc.Status details_; /** + * + * *
    * Detailed error codes and messages
    * 
* * .google.rpc.Status details = 2; + * * @return Whether the details field is set. */ @java.lang.Override @@ -146,11 +177,14 @@ public boolean hasDetails() { return details_ != null; } /** + * + * *
    * Detailed error codes and messages
    * 
* * .google.rpc.Status details = 2; + * * @return The details. */ @java.lang.Override @@ -158,6 +192,8 @@ public com.google.rpc.Status getDetails() { return details_ == null ? com.google.rpc.Status.getDefaultInstance() : details_; } /** + * + * *
    * Detailed error codes and messages
    * 
@@ -170,6 +206,7 @@ public com.google.rpc.StatusOrBuilder getDetailsOrBuilder() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -181,9 +218,10 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (resultStatusType_ != com.google.privacy.dlp.v2.TransformationResultStatusType.STATE_TYPE_UNSPECIFIED.getNumber()) { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (resultStatusType_ + != com.google.privacy.dlp.v2.TransformationResultStatusType.STATE_TYPE_UNSPECIFIED + .getNumber()) { output.writeEnum(1, resultStatusType_); } if (details_ != null) { @@ -198,13 +236,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (resultStatusType_ != com.google.privacy.dlp.v2.TransformationResultStatusType.STATE_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, resultStatusType_); + if (resultStatusType_ + != com.google.privacy.dlp.v2.TransformationResultStatusType.STATE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, resultStatusType_); } if (details_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDetails()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDetails()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -214,18 +252,18 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.privacy.dlp.v2.TransformationResultStatus)) { return super.equals(obj); } - com.google.privacy.dlp.v2.TransformationResultStatus other = (com.google.privacy.dlp.v2.TransformationResultStatus) obj; + com.google.privacy.dlp.v2.TransformationResultStatus other = + (com.google.privacy.dlp.v2.TransformationResultStatus) obj; if (resultStatusType_ != other.resultStatusType_) return false; if (hasDetails() != other.hasDetails()) return false; if (hasDetails()) { - if (!getDetails() - .equals(other.getDetails())) return false; + if (!getDetails().equals(other.getDetails())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -250,113 +288,118 @@ public int hashCode() { } public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.TransformationResultStatus parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.TransformationResultStatus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.TransformationResultStatus parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationResultStatus prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code google.privacy.dlp.v2.TransformationResultStatus} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + /** Protobuf type {@code google.privacy.dlp.v2.TransformationResultStatus} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationResultStatus) com.google.privacy.dlp.v2.TransformationResultStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationResultStatus.class, com.google.privacy.dlp.v2.TransformationResultStatus.Builder.class); + com.google.privacy.dlp.v2.TransformationResultStatus.class, + com.google.privacy.dlp.v2.TransformationResultStatus.Builder.class); } // Construct using com.google.privacy.dlp.v2.TransformationResultStatus.newBuilder() @@ -364,16 +407,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -389,9 +431,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; } @java.lang.Override @@ -410,7 +452,8 @@ public com.google.privacy.dlp.v2.TransformationResultStatus build() { @java.lang.Override public com.google.privacy.dlp.v2.TransformationResultStatus buildPartial() { - com.google.privacy.dlp.v2.TransformationResultStatus result = new com.google.privacy.dlp.v2.TransformationResultStatus(this); + com.google.privacy.dlp.v2.TransformationResultStatus result = + new com.google.privacy.dlp.v2.TransformationResultStatus(this); result.resultStatusType_ = resultStatusType_; if (detailsBuilder_ == null) { result.details_ = details_; @@ -425,38 +468,39 @@ public com.google.privacy.dlp.v2.TransformationResultStatus buildPartial() { public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.privacy.dlp.v2.TransformationResultStatus) { - return mergeFrom((com.google.privacy.dlp.v2.TransformationResultStatus)other); + return mergeFrom((com.google.privacy.dlp.v2.TransformationResultStatus) other); } else { super.mergeFrom(other); return this; @@ -464,7 +508,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationResultStatus other) { - if (other == com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance()) return this; + if (other == com.google.privacy.dlp.v2.TransformationResultStatus.getDefaultInstance()) + return this; if (other.resultStatusType_ != 0) { setResultStatusTypeValue(other.getResultStatusTypeValue()); } @@ -490,7 +535,8 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TransformationResultStatus) e.getUnfinishedMessage(); + parsedMessage = + (com.google.privacy.dlp.v2.TransformationResultStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -502,78 +548,98 @@ public Builder mergeFrom( private int resultStatusType_ = 0; /** + * + * *
      * Transformation result status type, this will be either SUCCESS, or it will
      * be the reason for why the transformation was not completely successful.
      * 
* * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * * @return The enum numeric value on the wire for resultStatusType. */ - @java.lang.Override public int getResultStatusTypeValue() { + @java.lang.Override + public int getResultStatusTypeValue() { return resultStatusType_; } /** + * + * *
      * Transformation result status type, this will be either SUCCESS, or it will
      * be the reason for why the transformation was not completely successful.
      * 
* * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * * @param value The enum numeric value on the wire for resultStatusType to set. * @return This builder for chaining. */ public Builder setResultStatusTypeValue(int value) { - + resultStatusType_ = value; onChanged(); return this; } /** + * + * *
      * Transformation result status type, this will be either SUCCESS, or it will
      * be the reason for why the transformation was not completely successful.
      * 
* * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * * @return The resultStatusType. */ @java.lang.Override public com.google.privacy.dlp.v2.TransformationResultStatusType getResultStatusType() { @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TransformationResultStatusType result = com.google.privacy.dlp.v2.TransformationResultStatusType.valueOf(resultStatusType_); - return result == null ? com.google.privacy.dlp.v2.TransformationResultStatusType.UNRECOGNIZED : result; + com.google.privacy.dlp.v2.TransformationResultStatusType result = + com.google.privacy.dlp.v2.TransformationResultStatusType.valueOf(resultStatusType_); + return result == null + ? com.google.privacy.dlp.v2.TransformationResultStatusType.UNRECOGNIZED + : result; } /** + * + * *
      * Transformation result status type, this will be either SUCCESS, or it will
      * be the reason for why the transformation was not completely successful.
      * 
* * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * * @param value The resultStatusType to set. * @return This builder for chaining. */ - public Builder setResultStatusType(com.google.privacy.dlp.v2.TransformationResultStatusType value) { + public Builder setResultStatusType( + com.google.privacy.dlp.v2.TransformationResultStatusType value) { if (value == null) { throw new NullPointerException(); } - + resultStatusType_ = value.getNumber(); onChanged(); return this; } /** + * + * *
      * Transformation result status type, this will be either SUCCESS, or it will
      * be the reason for why the transformation was not completely successful.
      * 
* * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * * @return This builder for chaining. */ public Builder clearResultStatusType() { - + resultStatusType_ = 0; onChanged(); return this; @@ -581,24 +647,31 @@ public Builder clearResultStatusType() { private com.google.rpc.Status details_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> detailsBuilder_; + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + detailsBuilder_; /** + * + * *
      * Detailed error codes and messages
      * 
* * .google.rpc.Status details = 2; + * * @return Whether the details field is set. */ public boolean hasDetails() { return detailsBuilder_ != null || details_ != null; } /** + * + * *
      * Detailed error codes and messages
      * 
* * .google.rpc.Status details = 2; + * * @return The details. */ public com.google.rpc.Status getDetails() { @@ -609,6 +682,8 @@ public com.google.rpc.Status getDetails() { } } /** + * + * *
      * Detailed error codes and messages
      * 
@@ -629,14 +704,15 @@ public Builder setDetails(com.google.rpc.Status value) { return this; } /** + * + * *
      * Detailed error codes and messages
      * 
* * .google.rpc.Status details = 2; */ - public Builder setDetails( - com.google.rpc.Status.Builder builderForValue) { + public Builder setDetails(com.google.rpc.Status.Builder builderForValue) { if (detailsBuilder_ == null) { details_ = builderForValue.build(); onChanged(); @@ -647,6 +723,8 @@ public Builder setDetails( return this; } /** + * + * *
      * Detailed error codes and messages
      * 
@@ -656,8 +734,7 @@ public Builder setDetails( public Builder mergeDetails(com.google.rpc.Status value) { if (detailsBuilder_ == null) { if (details_ != null) { - details_ = - com.google.rpc.Status.newBuilder(details_).mergeFrom(value).buildPartial(); + details_ = com.google.rpc.Status.newBuilder(details_).mergeFrom(value).buildPartial(); } else { details_ = value; } @@ -669,6 +746,8 @@ public Builder mergeDetails(com.google.rpc.Status value) { return this; } /** + * + * *
      * Detailed error codes and messages
      * 
@@ -687,6 +766,8 @@ public Builder clearDetails() { return this; } /** + * + * *
      * Detailed error codes and messages
      * 
@@ -694,11 +775,13 @@ public Builder clearDetails() { * .google.rpc.Status details = 2; */ public com.google.rpc.Status.Builder getDetailsBuilder() { - + onChanged(); return getDetailsFieldBuilder().getBuilder(); } /** + * + * *
      * Detailed error codes and messages
      * 
@@ -709,11 +792,12 @@ public com.google.rpc.StatusOrBuilder getDetailsOrBuilder() { if (detailsBuilder_ != null) { return detailsBuilder_.getMessageOrBuilder(); } else { - return details_ == null ? - com.google.rpc.Status.getDefaultInstance() : details_; + return details_ == null ? com.google.rpc.Status.getDefaultInstance() : details_; } } /** + * + * *
      * Detailed error codes and messages
      * 
@@ -721,21 +805,21 @@ public com.google.rpc.StatusOrBuilder getDetailsOrBuilder() { * .google.rpc.Status details = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> getDetailsFieldBuilder() { if (detailsBuilder_ == null) { - detailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getDetails(), - getParentForChildren(), - isClean()); + detailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getDetails(), getParentForChildren(), isClean()); details_ = null; } return detailsBuilder_; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -745,12 +829,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationResultStatus) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationResultStatus) private static final com.google.privacy.dlp.v2.TransformationResultStatus DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationResultStatus(); } @@ -759,16 +843,16 @@ public static com.google.privacy.dlp.v2.TransformationResultStatus getDefaultIns return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransformationResultStatus parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransformationResultStatus(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransformationResultStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransformationResultStatus(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -783,6 +867,4 @@ public com.google.protobuf.Parser getParserForType() public com.google.privacy.dlp.v2.TransformationResultStatus getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java similarity index 69% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java index 6cab1b0a3b14..3b5d125e65f5 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusOrBuilder.java @@ -1,52 +1,82 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; -public interface TransformationResultStatusOrBuilder extends +public interface TransformationResultStatusOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationResultStatus) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * Transformation result status type, this will be either SUCCESS, or it will
    * be the reason for why the transformation was not completely successful.
    * 
* * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * * @return The enum numeric value on the wire for resultStatusType. */ int getResultStatusTypeValue(); /** + * + * *
    * Transformation result status type, this will be either SUCCESS, or it will
    * be the reason for why the transformation was not completely successful.
    * 
* * .google.privacy.dlp.v2.TransformationResultStatusType result_status_type = 1; + * * @return The resultStatusType. */ com.google.privacy.dlp.v2.TransformationResultStatusType getResultStatusType(); /** + * + * *
    * Detailed error codes and messages
    * 
* * .google.rpc.Status details = 2; + * * @return Whether the details field is set. */ boolean hasDetails(); /** + * + * *
    * Detailed error codes and messages
    * 
* * .google.rpc.Status details = 2; + * * @return The details. */ com.google.rpc.Status getDetails(); /** + * + * *
    * Detailed error codes and messages
    * 
diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java similarity index 72% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java index 9c1eb3be93e4..bd2a89148962 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationResultStatusType.java @@ -1,9 +1,26 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; /** + * + * *
  * Enum of possible outcomes of transformations. SUCCESS if transformation and
  * storing of transformation was successful, otherwise, reason for not
@@ -12,13 +29,12 @@
  *
  * Protobuf enum {@code google.privacy.dlp.v2.TransformationResultStatusType}
  */
-public enum TransformationResultStatusType
-    implements com.google.protobuf.ProtocolMessageEnum {
-  /**
-   * STATE_TYPE_UNSPECIFIED = 0;
-   */
+public enum TransformationResultStatusType implements com.google.protobuf.ProtocolMessageEnum {
+  /** STATE_TYPE_UNSPECIFIED = 0; */
   STATE_TYPE_UNSPECIFIED(0),
   /**
+   *
+   *
    * 
    * This will be set when a finding could not be transformed (i.e. outside user
    * set bucket range).
@@ -28,6 +44,8 @@ public enum TransformationResultStatusType
    */
   INVALID_TRANSFORM(1),
   /**
+   *
+   *
    * 
    * This will be set when a BigQuery transformation was successful but could
    * not be stored back in BigQuery because the transformed row exceeds
@@ -38,6 +56,8 @@ public enum TransformationResultStatusType
    */
   BIGQUERY_MAX_ROW_SIZE_EXCEEDED(2),
   /**
+   *
+   *
    * 
    * This will be set when there is a finding in the custom metadata of a file,
    * but at the write time of the transformed file, this key / value pair is
@@ -48,6 +68,8 @@ public enum TransformationResultStatusType
    */
   METADATA_UNRETRIEVABLE(3),
   /**
+   *
+   *
    * 
    * This will be set when the transformation and storing of it is successful.
    * 
@@ -58,11 +80,11 @@ public enum TransformationResultStatusType UNRECOGNIZED(-1), ; - /** - * STATE_TYPE_UNSPECIFIED = 0; - */ + /** STATE_TYPE_UNSPECIFIED = 0; */ public static final int STATE_TYPE_UNSPECIFIED_VALUE = 0; /** + * + * *
    * This will be set when a finding could not be transformed (i.e. outside user
    * set bucket range).
@@ -72,6 +94,8 @@ public enum TransformationResultStatusType
    */
   public static final int INVALID_TRANSFORM_VALUE = 1;
   /**
+   *
+   *
    * 
    * This will be set when a BigQuery transformation was successful but could
    * not be stored back in BigQuery because the transformed row exceeds
@@ -82,6 +106,8 @@ public enum TransformationResultStatusType
    */
   public static final int BIGQUERY_MAX_ROW_SIZE_EXCEEDED_VALUE = 2;
   /**
+   *
+   *
    * 
    * This will be set when there is a finding in the custom metadata of a file,
    * but at the write time of the transformed file, this key / value pair is
@@ -92,6 +118,8 @@ public enum TransformationResultStatusType
    */
   public static final int METADATA_UNRETRIEVABLE_VALUE = 3;
   /**
+   *
+   *
    * 
    * This will be set when the transformation and storing of it is successful.
    * 
@@ -100,7 +128,6 @@ public enum TransformationResultStatusType */ public static final int SUCCESS_VALUE = 4; - public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -125,12 +152,18 @@ public static TransformationResultStatusType valueOf(int value) { */ public static TransformationResultStatusType forNumber(int value) { switch (value) { - case 0: return STATE_TYPE_UNSPECIFIED; - case 1: return INVALID_TRANSFORM; - case 2: return BIGQUERY_MAX_ROW_SIZE_EXCEEDED; - case 3: return METADATA_UNRETRIEVABLE; - case 4: return SUCCESS; - default: return null; + case 0: + return STATE_TYPE_UNSPECIFIED; + case 1: + return INVALID_TRANSFORM; + case 2: + return BIGQUERY_MAX_ROW_SIZE_EXCEEDED; + case 3: + return METADATA_UNRETRIEVABLE; + case 4: + return SUCCESS; + default: + return null; } } @@ -138,28 +171,28 @@ public static TransformationResultStatusType forNumber(int value) { internalGetValueMap() { return internalValueMap; } - private static final com.google.protobuf.Internal.EnumLiteMap< - TransformationResultStatusType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TransformationResultStatusType findValueByNumber(int number) { - return TransformationResultStatusType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransformationResultStatusType findValueByNumber(int number) { + return TransformationResultStatusType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(0); } @@ -168,8 +201,7 @@ public TransformationResultStatusType findValueByNumber(int number) { public static TransformationResultStatusType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -185,4 +217,3 @@ private TransformationResultStatusType(int value) { // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TransformationResultStatusType) } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java similarity index 74% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java index d9e523caa8f3..f99389cdc6ed 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationType.java @@ -1,9 +1,26 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; /** + * + * *
  * An enum of rules that can be used to transform a value. Can be a
  * record suppression, or one of the transformation rules specified under
@@ -12,9 +29,10 @@
  *
  * Protobuf enum {@code google.privacy.dlp.v2.TransformationType}
  */
-public enum TransformationType
-    implements com.google.protobuf.ProtocolMessageEnum {
+public enum TransformationType implements com.google.protobuf.ProtocolMessageEnum {
   /**
+   *
+   *
    * 
    * Unused
    * 
@@ -23,6 +41,8 @@ public enum TransformationType */ TRANSFORMATION_TYPE_UNSPECIFIED(0), /** + * + * *
    * Record suppression
    * 
@@ -31,6 +51,8 @@ public enum TransformationType */ RECORD_SUPPRESSION(1), /** + * + * *
    * Replace value
    * 
@@ -39,6 +61,8 @@ public enum TransformationType */ REPLACE_VALUE(2), /** + * + * *
    * Replace value using a dictionary.
    * 
@@ -47,6 +71,8 @@ public enum TransformationType */ REPLACE_DICTIONARY(15), /** + * + * *
    * Redact
    * 
@@ -55,6 +81,8 @@ public enum TransformationType */ REDACT(3), /** + * + * *
    * Character mask
    * 
@@ -63,6 +91,8 @@ public enum TransformationType */ CHARACTER_MASK(4), /** + * + * *
    * FFX-FPE
    * 
@@ -71,6 +101,8 @@ public enum TransformationType */ CRYPTO_REPLACE_FFX_FPE(5), /** + * + * *
    * Fixed size bucketing
    * 
@@ -79,6 +111,8 @@ public enum TransformationType */ FIXED_SIZE_BUCKETING(6), /** + * + * *
    * Bucketing
    * 
@@ -87,6 +121,8 @@ public enum TransformationType */ BUCKETING(7), /** + * + * *
    * Replace with info type
    * 
@@ -95,6 +131,8 @@ public enum TransformationType */ REPLACE_WITH_INFO_TYPE(8), /** + * + * *
    * Time part
    * 
@@ -103,6 +141,8 @@ public enum TransformationType */ TIME_PART(9), /** + * + * *
    * Crypto hash
    * 
@@ -111,6 +151,8 @@ public enum TransformationType */ CRYPTO_HASH(10), /** + * + * *
    * Date shift
    * 
@@ -119,6 +161,8 @@ public enum TransformationType */ DATE_SHIFT(12), /** + * + * *
    * Deterministic crypto
    * 
@@ -127,6 +171,8 @@ public enum TransformationType */ CRYPTO_DETERMINISTIC_CONFIG(13), /** + * + * *
    * Redact image
    * 
@@ -138,6 +184,8 @@ public enum TransformationType ; /** + * + * *
    * Unused
    * 
@@ -146,6 +194,8 @@ public enum TransformationType */ public static final int TRANSFORMATION_TYPE_UNSPECIFIED_VALUE = 0; /** + * + * *
    * Record suppression
    * 
@@ -154,6 +204,8 @@ public enum TransformationType */ public static final int RECORD_SUPPRESSION_VALUE = 1; /** + * + * *
    * Replace value
    * 
@@ -162,6 +214,8 @@ public enum TransformationType */ public static final int REPLACE_VALUE_VALUE = 2; /** + * + * *
    * Replace value using a dictionary.
    * 
@@ -170,6 +224,8 @@ public enum TransformationType */ public static final int REPLACE_DICTIONARY_VALUE = 15; /** + * + * *
    * Redact
    * 
@@ -178,6 +234,8 @@ public enum TransformationType */ public static final int REDACT_VALUE = 3; /** + * + * *
    * Character mask
    * 
@@ -186,6 +244,8 @@ public enum TransformationType */ public static final int CHARACTER_MASK_VALUE = 4; /** + * + * *
    * FFX-FPE
    * 
@@ -194,6 +254,8 @@ public enum TransformationType */ public static final int CRYPTO_REPLACE_FFX_FPE_VALUE = 5; /** + * + * *
    * Fixed size bucketing
    * 
@@ -202,6 +264,8 @@ public enum TransformationType */ public static final int FIXED_SIZE_BUCKETING_VALUE = 6; /** + * + * *
    * Bucketing
    * 
@@ -210,6 +274,8 @@ public enum TransformationType */ public static final int BUCKETING_VALUE = 7; /** + * + * *
    * Replace with info type
    * 
@@ -218,6 +284,8 @@ public enum TransformationType */ public static final int REPLACE_WITH_INFO_TYPE_VALUE = 8; /** + * + * *
    * Time part
    * 
@@ -226,6 +294,8 @@ public enum TransformationType */ public static final int TIME_PART_VALUE = 9; /** + * + * *
    * Crypto hash
    * 
@@ -234,6 +304,8 @@ public enum TransformationType */ public static final int CRYPTO_HASH_VALUE = 10; /** + * + * *
    * Date shift
    * 
@@ -242,6 +314,8 @@ public enum TransformationType */ public static final int DATE_SHIFT_VALUE = 12; /** + * + * *
    * Deterministic crypto
    * 
@@ -250,6 +324,8 @@ public enum TransformationType */ public static final int CRYPTO_DETERMINISTIC_CONFIG_VALUE = 13; /** + * + * *
    * Redact image
    * 
@@ -258,7 +334,6 @@ public enum TransformationType */ public static final int REDACT_IMAGE_VALUE = 14; - public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -283,51 +358,66 @@ public static TransformationType valueOf(int value) { */ public static TransformationType forNumber(int value) { switch (value) { - case 0: return TRANSFORMATION_TYPE_UNSPECIFIED; - case 1: return RECORD_SUPPRESSION; - case 2: return REPLACE_VALUE; - case 15: return REPLACE_DICTIONARY; - case 3: return REDACT; - case 4: return CHARACTER_MASK; - case 5: return CRYPTO_REPLACE_FFX_FPE; - case 6: return FIXED_SIZE_BUCKETING; - case 7: return BUCKETING; - case 8: return REPLACE_WITH_INFO_TYPE; - case 9: return TIME_PART; - case 10: return CRYPTO_HASH; - case 12: return DATE_SHIFT; - case 13: return CRYPTO_DETERMINISTIC_CONFIG; - case 14: return REDACT_IMAGE; - default: return null; + case 0: + return TRANSFORMATION_TYPE_UNSPECIFIED; + case 1: + return RECORD_SUPPRESSION; + case 2: + return REPLACE_VALUE; + case 15: + return REPLACE_DICTIONARY; + case 3: + return REDACT; + case 4: + return CHARACTER_MASK; + case 5: + return CRYPTO_REPLACE_FFX_FPE; + case 6: + return FIXED_SIZE_BUCKETING; + case 7: + return BUCKETING; + case 8: + return REPLACE_WITH_INFO_TYPE; + case 9: + return TIME_PART; + case 10: + return CRYPTO_HASH; + case 12: + return DATE_SHIFT; + case 13: + return CRYPTO_DETERMINISTIC_CONFIG; + case 14: + return REDACT_IMAGE; + default: + return null; } } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } - private static final com.google.protobuf.Internal.EnumLiteMap< - TransformationType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TransformationType findValueByNumber(int number) { - return TransformationType.forNumber(number); - } - }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransformationType findValueByNumber(int number) { + return TransformationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(2); } @@ -336,8 +426,7 @@ public TransformationType findValueByNumber(int number) { public static TransformationType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -353,4 +442,3 @@ private TransformationType(int value) { // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TransformationType) } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java similarity index 69% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java index 9b080232c895..6710077b332b 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescription.java @@ -1,24 +1,42 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; /** + * + * *
  * Details about each available version for an infotype.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.VersionDescription} */ -public final class VersionDescription extends - com.google.protobuf.GeneratedMessageV3 implements +public final class VersionDescription extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.VersionDescription) VersionDescriptionOrBuilder { -private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use VersionDescription.newBuilder() to construct. private VersionDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } + private VersionDescription() { version_ = ""; description_ = ""; @@ -26,16 +44,15 @@ private VersionDescription() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new VersionDescription(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private VersionDescription( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -54,25 +71,27 @@ private VersionDescription( case 0: done = true; break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); - version_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); + version_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); - description_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + description_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -80,34 +99,39 @@ private VersionDescription( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.VersionDescription.class, com.google.privacy.dlp.v2.VersionDescription.Builder.class); + com.google.privacy.dlp.v2.VersionDescription.class, + com.google.privacy.dlp.v2.VersionDescription.Builder.class); } public static final int VERSION_FIELD_NUMBER = 1; private volatile java.lang.Object version_; /** + * + * *
    * Name of the version
    * 
* * string version = 1; + * * @return The version. */ @java.lang.Override @@ -116,29 +140,29 @@ public java.lang.String getVersion() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); version_ = s; return s; } } /** + * + * *
    * Name of the version
    * 
* * string version = 1; + * * @return The bytes for version. */ @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { + public com.google.protobuf.ByteString getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); version_ = b; return b; } else { @@ -149,11 +173,14 @@ public java.lang.String getVersion() { public static final int DESCRIPTION_FIELD_NUMBER = 2; private volatile java.lang.Object description_; /** + * + * *
    * Description of the version.
    * 
* * string description = 2; + * * @return The description. */ @java.lang.Override @@ -162,29 +189,29 @@ public java.lang.String getDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** + * + * *
    * Description of the version.
    * 
* * string description = 2; + * * @return The bytes for description. */ @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { + public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { @@ -193,6 +220,7 @@ public java.lang.String getDescription() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -204,8 +232,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); } @@ -235,17 +262,16 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.privacy.dlp.v2.VersionDescription)) { return super.equals(obj); } - com.google.privacy.dlp.v2.VersionDescription other = (com.google.privacy.dlp.v2.VersionDescription) obj; + com.google.privacy.dlp.v2.VersionDescription other = + (com.google.privacy.dlp.v2.VersionDescription) obj; - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getDescription().equals(other.getDescription())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -266,118 +292,127 @@ public int hashCode() { return hash; } - public static com.google.privacy.dlp.v2.VersionDescription parseFrom( - java.nio.ByteBuffer data) + public static com.google.privacy.dlp.v2.VersionDescription parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.privacy.dlp.v2.VersionDescription parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.privacy.dlp.v2.VersionDescription parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.VersionDescription parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.privacy.dlp.v2.VersionDescription parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(com.google.privacy.dlp.v2.VersionDescription prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** + * + * *
    * Details about each available version for an infotype.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.VersionDescription} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.VersionDescription) com.google.privacy.dlp.v2.VersionDescriptionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.VersionDescription.class, com.google.privacy.dlp.v2.VersionDescription.Builder.class); + com.google.privacy.dlp.v2.VersionDescription.class, + com.google.privacy.dlp.v2.VersionDescription.Builder.class); } // Construct using com.google.privacy.dlp.v2.VersionDescription.newBuilder() @@ -385,16 +420,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -406,9 +440,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto + .internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; } @java.lang.Override @@ -427,7 +461,8 @@ public com.google.privacy.dlp.v2.VersionDescription build() { @java.lang.Override public com.google.privacy.dlp.v2.VersionDescription buildPartial() { - com.google.privacy.dlp.v2.VersionDescription result = new com.google.privacy.dlp.v2.VersionDescription(this); + com.google.privacy.dlp.v2.VersionDescription result = + new com.google.privacy.dlp.v2.VersionDescription(this); result.version_ = version_; result.description_ = description_; onBuilt(); @@ -438,38 +473,39 @@ public com.google.privacy.dlp.v2.VersionDescription buildPartial() { public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.privacy.dlp.v2.VersionDescription) { - return mergeFrom((com.google.privacy.dlp.v2.VersionDescription)other); + return mergeFrom((com.google.privacy.dlp.v2.VersionDescription) other); } else { super.mergeFrom(other); return this; @@ -517,18 +553,20 @@ public Builder mergeFrom( private java.lang.Object version_ = ""; /** + * + * *
      * Name of the version
      * 
* * string version = 1; + * * @return The version. */ public java.lang.String getVersion() { java.lang.Object ref = version_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); version_ = s; return s; @@ -537,20 +575,21 @@ public java.lang.String getVersion() { } } /** + * + * *
      * Name of the version
      * 
* * string version = 1; + * * @return The bytes for version. */ - public com.google.protobuf.ByteString - getVersionBytes() { + public com.google.protobuf.ByteString getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); version_ = b; return b; } else { @@ -558,54 +597,61 @@ public java.lang.String getVersion() { } } /** + * + * *
      * Name of the version
      * 
* * string version = 1; + * * @param value The version to set. * @return This builder for chaining. */ - public Builder setVersion( - java.lang.String value) { + public Builder setVersion(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + version_ = value; onChanged(); return this; } /** + * + * *
      * Name of the version
      * 
* * string version = 1; + * * @return This builder for chaining. */ public Builder clearVersion() { - + version_ = getDefaultInstance().getVersion(); onChanged(); return this; } /** + * + * *
      * Name of the version
      * 
* * string version = 1; + * * @param value The bytes for version to set. * @return This builder for chaining. */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { + public Builder setVersionBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; onChanged(); return this; @@ -613,18 +659,20 @@ public Builder setVersionBytes( private java.lang.Object description_ = ""; /** + * + * *
      * Description of the version.
      * 
* * string description = 2; + * * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; @@ -633,20 +681,21 @@ public java.lang.String getDescription() { } } /** + * + * *
      * Description of the version.
      * 
* * string description = 2; + * * @return The bytes for description. */ - public com.google.protobuf.ByteString - getDescriptionBytes() { + public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { @@ -654,61 +703,68 @@ public java.lang.String getDescription() { } } /** + * + * *
      * Description of the version.
      * 
* * string description = 2; + * * @param value The description to set. * @return This builder for chaining. */ - public Builder setDescription( - java.lang.String value) { + public Builder setDescription(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + description_ = value; onChanged(); return this; } /** + * + * *
      * Description of the version.
      * 
* * string description = 2; + * * @return This builder for chaining. */ public Builder clearDescription() { - + description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** + * + * *
      * Description of the version.
      * 
* * string description = 2; + * * @param value The bytes for description to set. * @return This builder for chaining. */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; onChanged(); return this; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -718,12 +774,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.VersionDescription) } // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.VersionDescription) private static final com.google.privacy.dlp.v2.VersionDescription DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.VersionDescription(); } @@ -732,16 +788,16 @@ public static com.google.privacy.dlp.v2.VersionDescription getDefaultInstance() return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VersionDescription parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VersionDescription(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionDescription parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionDescription(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -756,6 +812,4 @@ public com.google.protobuf.Parser getParserForType() { public com.google.privacy.dlp.v2.VersionDescription getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java similarity index 52% rename from owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java rename to java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java index 744cf81c2693..191e22309727 100644 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/VersionDescriptionOrBuilder.java @@ -1,49 +1,75 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/privacy/dlp/v2/dlp.proto package com.google.privacy.dlp.v2; -public interface VersionDescriptionOrBuilder extends +public interface VersionDescriptionOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.VersionDescription) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * Name of the version
    * 
* * string version = 1; + * * @return The version. */ java.lang.String getVersion(); /** + * + * *
    * Name of the version
    * 
* * string version = 1; + * * @return The bytes for version. */ - com.google.protobuf.ByteString - getVersionBytes(); + com.google.protobuf.ByteString getVersionBytes(); /** + * + * *
    * Description of the version.
    * 
* * string description = 2; + * * @return The description. */ java.lang.String getDescription(); /** + * + * *
    * Description of the version.
    * 
* * string description = 2; + * * @return The bytes for description. */ - com.google.protobuf.ByteString - getDescriptionBytes(); + com.google.protobuf.ByteString getDescriptionBytes(); } diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto b/java-dlp/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto index 866a5748f661..4dc3a3862d00 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto @@ -133,7 +133,7 @@ service DlpService { }; } - // Returns a list of the sensitive information types that the DLP API + // Returns a list of the sensitive information types that DLP API // supports. See https://cloud.google.com/dlp/docs/infotypes-reference to // learn more. rpc ListInfoTypes(ListInfoTypesRequest) returns (ListInfoTypesResponse) { @@ -146,7 +146,7 @@ service DlpService { option (google.api.method_signature) = "parent"; } - // Creates an InspectTemplate for re-using frequently used configuration + // Creates an InspectTemplate for reusing frequently used configuration // for inspecting content, images, and storage. // See https://cloud.google.com/dlp/docs/creating-templates to learn more. rpc CreateInspectTemplate(CreateInspectTemplateRequest) returns (InspectTemplate) { @@ -245,7 +245,7 @@ service DlpService { option (google.api.method_signature) = "name"; } - // Creates a DeidentifyTemplate for re-using frequently used configuration + // Creates a DeidentifyTemplate for reusing frequently used configuration // for de-identifying content, images, and storage. // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. @@ -505,7 +505,7 @@ service DlpService { } // Deletes a long-running DlpJob. This method indicates that the client is - // no longer interested in the DlpJob result. The job will be cancelled if + // no longer interested in the DlpJob result. The job will be canceled if // possible. // See https://cloud.google.com/dlp/docs/inspecting-storage and // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. @@ -660,7 +660,7 @@ service DlpService { } } -// List of exclude infoTypes. +// List of excluded infoTypes. message ExcludeInfoTypes { // InfoType list in ExclusionRule rule drops a finding when it overlaps or // contained within with a finding of an infoType from this list. For @@ -721,6 +721,12 @@ message InspectionRuleSet { message InspectConfig { // Configuration to control the number of findings returned for inspection. // This is not used for de-identification or data profiling. + // + // When redacting sensitive data from images, finding limits don't apply. They + // can cause unexpected or inconsistent results, where only some data is + // redacted. Don't include finding limits in + // [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] + // requests. Otherwise, Cloud DLP returns an error. message FindingLimits { // Max findings configuration per infoType, per content item or long // running DlpJob. @@ -770,6 +776,12 @@ message InspectConfig { // Configuration to control the number of findings returned. // This is not used for data profiling. + // + // When redacting sensitive data from images, finding limits don't apply. They + // can cause unexpected or inconsistent results, where only some data is + // redacted. Don't include finding limits in + // [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] + // requests. Otherwise, Cloud DLP returns an error. FindingLimits limits = 3; // When true, a contextual quote from the data that triggered a finding is @@ -1006,7 +1018,7 @@ message ContentLocation { // * Datastore namespace: {namespace} // // Nested names could be absent if the embedded object has no string - // identifier (for an example an image contained within a document). + // identifier (for example, an image contained within a document). string container_name = 1; // Type of the container within the file with location of the finding. @@ -1024,14 +1036,14 @@ message ContentLocation { MetadataLocation metadata_location = 8; } - // Findings container modification timestamp, if applicable. - // For Google Cloud Storage contains last file modification timestamp. - // For BigQuery table contains last_modified_time property. - // For Datastore - not populated. + // Finding container modification timestamp, if applicable. For Cloud Storage, + // this field contains the last file modification timestamp. For a BigQuery + // table, this field contains the last_modified_time property. For Datastore, + // this field isn't populated. google.protobuf.Timestamp container_timestamp = 6; - // Findings container version, if available - // ("generation" for Google Cloud Storage). + // Finding container version, if available + // ("generation" for Cloud Storage). string container_version = 7; } @@ -1086,7 +1098,7 @@ message TableLocation { // Represents a container that may contain DLP findings. // Examples of a container include a file, table, or database record. message Container { - // Container type, for example BigQuery or Google Cloud Storage. + // Container type, for example BigQuery or Cloud Storage. string type = 1; // Project where the finding was found. @@ -1096,33 +1108,35 @@ message Container { // A string representation of the full container name. // Examples: // - BigQuery: 'Project:DataSetId.TableId' - // - Google Cloud Storage: 'gs://Bucket/folders/filename.txt' + // - Cloud Storage: 'gs://Bucket/folders/filename.txt' string full_path = 3; // The root of the container. // Examples: + // // - For BigQuery table `project_id:dataset_id.table_id`, the root is // `dataset_id` - // - For Google Cloud Storage file `gs://bucket/folder/filename.txt`, the root + // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root // is `gs://bucket` string root_path = 4; // The rest of the path after the root. // Examples: + // // - For BigQuery table `project_id:dataset_id.table_id`, the relative path is // `table_id` - // - Google Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative // path is `folder/filename.txt` string relative_path = 5; - // Findings container modification timestamp, if applicable. - // For Google Cloud Storage contains last file modification timestamp. - // For BigQuery table contains last_modified_time property. - // For Datastore - not populated. + // Findings container modification timestamp, if applicable. For Cloud + // Storage, this field contains the last file modification timestamp. For a + // BigQuery table, this field contains the last_modified_time property. For + // Datastore, this field isn't populated. google.protobuf.Timestamp update_time = 6; // Findings container version, if available - // ("generation" for Google Cloud Storage). + // ("generation" for Cloud Storage). string version = 7; } @@ -1242,7 +1256,7 @@ message RedactImageResponse { InspectResult inspect_result = 3; } -// Request to de-identify a list of items. +// Request to de-identify a ContentItem. message DeidentifyContentRequest { // Parent resource name. // @@ -1367,7 +1381,7 @@ message ReidentifyContentRequest { string location_id = 7; } -// Results of re-identifying a item. +// Results of re-identifying an item. message ReidentifyContentResponse { // The re-identified item. ContentItem item = 1; @@ -1434,7 +1448,7 @@ message OutputStorageConfig { // `timestamp`. BASIC_COLUMNS = 1; - // Schema tailored to findings from scanning Google Cloud Storage. + // Schema tailored to findings from scanning Cloud Storage. GCS_COLUMNS = 2; // Schema tailored to findings from scanning Google Datastore. @@ -1452,8 +1466,8 @@ message OutputStorageConfig { // Store findings in an existing table or a new table in an existing // dataset. If table_id is not set a new one will be generated // for you with the following format: - // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for - // generating the date details. + // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + // for generating the date details. // // For Inspect, each column in an existing output table must have the same // name, type, and mode of a field in the `Finding` object. @@ -1555,6 +1569,9 @@ message InfoTypeDescription { // request. string description = 4; + // A list of available versions for the infotype. + repeated VersionDescription versions = 9; + // The category of the infoType. repeated InfoTypeCategory categories = 10; } @@ -1751,6 +1768,15 @@ message InfoTypeCategory { } } +// Details about each available version for an infotype. +message VersionDescription { + // Name of the version + string version = 1; + + // Description of the version. + string description = 2; +} + // Request for the list of infoTypes. message ListInfoTypesRequest { // The parent resource name. @@ -2202,10 +2228,10 @@ message AnalyzeDataSourceRiskDetails { repeated Value quasi_ids_values = 1; // The estimated probability that a given individual sharing these - // quasi-identifier values is in the dataset. This value, typically called - // δ, is the ratio between the number of records in the dataset with these - // quasi-identifier values, and the total number of individuals (inside - // *and* outside the dataset) with these quasi-identifier values. + // quasi-identifier values is in the dataset. This value, typically + // called δ, is the ratio between the number of records in the dataset + // with these quasi-identifier values, and the total number of individuals + // (inside *and* outside the dataset) with these quasi-identifier values. // For example, if there are 15 individuals in the dataset who share the // same quasi-identifier values, and an estimated 100 people in the entire // population with these values, then δ is 0.15. @@ -2375,6 +2401,9 @@ message DeidentifyConfig { // specific locations within structured datasets, such as transforming // a column within a table. RecordTransformations record_transformations = 2; + + // Treat the dataset as an image and redact. + ImageTransformations image_transformations = 4; } // Mode for handling transformation errors. If left unspecified, the default @@ -2382,6 +2411,49 @@ message DeidentifyConfig { TransformationErrorHandling transformation_error_handling = 3; } +// A type of transformation that is applied over images. +message ImageTransformations { + // Configuration for determining how redaction of images should occur. + message ImageTransformation { + // Apply transformation to the selected info_types. + message SelectedInfoTypes { + // Required. InfoTypes to apply the transformation to. Required. Provided InfoType + // must be unique within the ImageTransformations message. + repeated InfoType info_types = 5 [(google.api.field_behavior) = REQUIRED]; + } + + // Apply transformation to all findings. + message AllInfoTypes { + + } + + // Apply to all text. + message AllText { + + } + + oneof target { + // Apply transformation to the selected info_types. + SelectedInfoTypes selected_info_types = 4; + + // Apply transformation to all findings not specified in other + // ImageTransformation's selected_info_types. Only one instance is allowed + // within the ImageTransformations message. + AllInfoTypes all_info_types = 5; + + // Apply transformation to all text that doesn't match an infoType. Only + // one instance is allowed within the ImageTransformations message. + AllText all_text = 6; + } + + // The color to use when redacting content from an image. If not + // specified, the default is black. + Color redaction_color = 3; + } + + repeated ImageTransformation transforms = 2; +} + // How to handle transformation errors during de-identification. A // transformation error occurs when the requested transformation is incompatible // with the data. For example, trying to de-identify an IP address using a @@ -2558,7 +2630,7 @@ message CryptoDeterministicConfig { // plaintext would be used as is for encryption. // // Note that case (1) is expected when an `InfoTypeTransformation` is - // applied to both structured and non-structured `ContentItem`s. + // applied to both structured and unstructured `ContentItem`s. FieldId context = 3; } @@ -2593,7 +2665,7 @@ message RedactConfig { // Characters to skip when doing deidentification of a value. These will be left // alone and skipped. message CharsToIgnore { - // Convenience enum for indication common characters to not transform. + // Convenience enum for indicating common characters to not transform. enum CommonCharsToIgnore { // Unused. COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0; @@ -2639,6 +2711,21 @@ message CharacterMaskConfig { // Number of characters to mask. If not set, all matching chars will be // masked. Skipped characters do not count towards this tally. + // + // If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP + // masks all but a number of characters. + // For example, suppose you have the following values: + // + // - `masking_character` is `*` + // - `number_to_mask` is `-4` + // - `reverse_order` is `false` + // - `CharsToIgnore` includes `-` + // - Input string is `1234-5678-9012-3456` + // + // The resulting de-identified string is + // `****-****-****-3456`. Cloud DLP masks all but the last four characters. + // If `reverse_order` is `true`, all but the first four characters are masked + // as `1234-****-****-****`. int32 number_to_mask = 2; // Mask characters in reverse order. For example, if `masking_character` is @@ -2732,7 +2819,7 @@ message BucketingConfig { message CryptoReplaceFfxFpeConfig { // These are commonly used subsets of the alphabet that the FFX mode // natively supports. In the algorithm, the alphabet is selected using - // the "radix". Therefore each corresponds to particular radix. + // the "radix". Therefore each corresponds to a particular radix. enum FfxCommonNativeAlphabet { // Unused. FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; @@ -2765,7 +2852,7 @@ message CryptoReplaceFfxFpeConfig { // a default tweak will be used. // // Note that case (1) is expected when an `InfoTypeTransformation` is - // applied to both structured and non-structured `ContentItem`s. + // applied to both structured and unstructured `ContentItem`s. // Currently, the referenced field may be of value type integer or string. // // The tweak is constructed as a sequence of bytes in big endian byte order @@ -3021,7 +3108,7 @@ message RecordCondition { repeated Condition conditions = 1; } - // An expression, consisting or an operator and conditions. + // An expression, consisting of an operator and conditions. message Expressions { // Logical operators for conditional checks. enum LogicalOperator { @@ -3110,10 +3197,209 @@ message TransformationSummary { int64 transformed_bytes = 7; } +// A flattened description of a `PrimitiveTransformation` or +// `RecordSuppression`. +message TransformationDescription { + // The transformation type. + TransformationType type = 1; + + // A description of the transformation. This is empty for a + // RECORD_SUPPRESSION, or is the output of calling toString() on the + // `PrimitiveTransformation` protocol buffer message for any other type of + // transformation. + string description = 2; + + // A human-readable string representation of the `RecordCondition` + // corresponding to this transformation. Set if a `RecordCondition` was used + // to determine whether or not to apply this transformation. + // + // Examples: + // * (age_field > 85) + // * (age_field <= 18) + // * (zip_field exists) + // * (zip_field == 01234) && (city_field != "Springville") + // * (zip_field == 01234) && (age_field <= 18) && (city_field exists) + string condition = 3; + + // Set if the transformation was limited to a specific `InfoType`. + InfoType info_type = 4; +} + +// Details about a single transformation. This object contains a description of +// the transformation, information about whether the transformation was +// successfully applied, and the precise location where the transformation +// occurred. These details are stored in a user-specified BigQuery table. +message TransformationDetails { + // The name of the job that completed the transformation. + string resource_name = 1; + + // The top level name of the container where the transformation is located + // (this will be the source file name or table name). + string container_name = 2; + + // Description of transformation. This would only contain more than one + // element if there were multiple matching transformations and which one to + // apply was ambiguous. Not set for states that contain no transformation, + // currently only state that contains no transformation is + // TransformationResultStateType.METADATA_UNRETRIEVABLE. + repeated TransformationDescription transformation = 3; + + // Status of the transformation, if transformation was not successful, this + // will specify what caused it to fail, otherwise it will show that the + // transformation was successful. + TransformationResultStatus status_details = 4; + + // The number of bytes that were transformed. If transformation was + // unsuccessful or did not take place because there was no content to + // transform, this will be zero. + int64 transformed_bytes = 5; + + // The precise location of the transformed content in the original container. + TransformationLocation transformation_location = 6; +} + +// Specifies the location of a transformation. +message TransformationLocation { + oneof location_type { + // For infotype transformations, link to the corresponding findings ID so + // that location information does not need to be duplicated. Each findings + // ID correlates to an entry in the findings output table, this table only + // gets created when users specify to save findings (add the save findings + // action to the request). + string finding_id = 1; + + // For record transformations, provide a field and container information. + RecordTransformation record_transformation = 2; + } + + // Information about the functionality of the container where this finding + // occurred, if available. + TransformationContainerType container_type = 3; +} + +message RecordTransformation { + // For record transformations, provide a field. + FieldId field_id = 1; + + // Findings container modification timestamp, if applicable. + google.protobuf.Timestamp container_timestamp = 2; + + // Container version, if available ("generation" for Cloud Storage). + string container_version = 3; +} + +message TransformationResultStatus { + // Transformation result status type, this will be either SUCCESS, or it will + // be the reason for why the transformation was not completely successful. + TransformationResultStatusType result_status_type = 1; + + // Detailed error codes and messages + google.rpc.Status details = 2; +} + +// Enum of possible outcomes of transformations. SUCCESS if transformation and +// storing of transformation was successful, otherwise, reason for not +// transforming. +enum TransformationResultStatusType { + STATE_TYPE_UNSPECIFIED = 0; + + // This will be set when a finding could not be transformed (i.e. outside user + // set bucket range). + INVALID_TRANSFORM = 1; + + // This will be set when a BigQuery transformation was successful but could + // not be stored back in BigQuery because the transformed row exceeds + // BigQuery's max row size. + BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2; + + // This will be set when there is a finding in the custom metadata of a file, + // but at the write time of the transformed file, this key / value pair is + // unretrievable. + METADATA_UNRETRIEVABLE = 3; + + // This will be set when the transformation and storing of it is successful. + SUCCESS = 4; +} + +// Describes functionality of a given container in its original format. +enum TransformationContainerType { + TRANSFORM_UNKNOWN_CONTAINER = 0; + + TRANSFORM_BODY = 1; + + TRANSFORM_METADATA = 2; + + TRANSFORM_TABLE = 3; +} + +// An enum of rules that can be used to transform a value. Can be a +// record suppression, or one of the transformation rules specified under +// `PrimitiveTransformation`. +enum TransformationType { + // Unused + TRANSFORMATION_TYPE_UNSPECIFIED = 0; + + // Record suppression + RECORD_SUPPRESSION = 1; + + // Replace value + REPLACE_VALUE = 2; + + // Replace value using a dictionary. + REPLACE_DICTIONARY = 15; + + // Redact + REDACT = 3; + + // Character mask + CHARACTER_MASK = 4; + + // FFX-FPE + CRYPTO_REPLACE_FFX_FPE = 5; + + // Fixed size bucketing + FIXED_SIZE_BUCKETING = 6; + + // Bucketing + BUCKETING = 7; + + // Replace with info type + REPLACE_WITH_INFO_TYPE = 8; + + // Time part + TIME_PART = 9; + + // Crypto hash + CRYPTO_HASH = 10; + + // Date shift + DATE_SHIFT = 12; + + // Deterministic crypto + CRYPTO_DETERMINISTIC_CONFIG = 13; + + // Redact image + REDACT_IMAGE = 14; +} + +// Config for storing transformation details. +message TransformationDetailsStorageConfig { + // Location to store the transformation summary. + oneof type { + // The BigQuery table in which to store the output. This may be an existing + // table or in a new table in an existing dataset. + // If table_id is not set a new one will be generated for you with the + // following format: + // dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific + // time zone will be used for generating the date details. + BigQueryTable table = 1; + } +} + // Schedule for inspect job triggers. message Schedule { oneof option { - // With this option a job is started a regular periodic basis. For + // With this option a job is started on a regular periodic basis. For // example: every day (86400 seconds). // // A scheduled start time will be skipped if the previous @@ -3302,7 +3588,7 @@ message Action { OutputStorageConfig output_config = 1; } - // Publish a message into given Pub/Sub topic when DlpJob has completed. The + // Publish a message into a given Pub/Sub topic when DlpJob has completed. The // message contains a single field, `DlpJobName`, which is equal to the // finished job's // [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob). @@ -3320,31 +3606,88 @@ message Action { // This action is only available for projects which are parts of // an organization and whitelisted for the alpha Cloud Security Command // Center. - // The action will publish count of finding instances and their info types. - // The summary of findings will be persisted in CSCC and are governed by CSCC - // service-specific policy, see https://cloud.google.com/terms/service-terms - // Only a single instance of this action can be specified. - // Compatible with: Inspect + // The action will publish the count of finding instances and their info + // types. The summary of findings will be persisted in CSCC and are governed + // by CSCC service-specific policy, see + // https://cloud.google.com/terms/service-terms Only a single instance of this + // action can be specified. Compatible with: Inspect message PublishSummaryToCscc { } - // Publish findings of a DlpJob to Data Catalog. Labels summarizing the - // results of the DlpJob will be applied to the entry for the resource scanned - // in Data Catalog. Any labels previously written by another DlpJob will - // be deleted. InfoType naming patterns are strictly enforced when using this - // feature. Note that the findings will be persisted in Data Catalog - // storage and are governed by Data Catalog service-specific policy, see - // https://cloud.google.com/terms/service-terms - // Only a single instance of this action can be specified and only allowed if - // all resources being scanned are BigQuery tables. + // Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag + // templates are applied to the resource that Cloud DLP scanned. Data + // Catalog tag templates are stored in the same project and region where the + // BigQuery table exists. For Cloud DLP to create and apply the tag template, + // the Cloud DLP service agent must have the + // `roles/datacatalog.tagTemplateOwner` permission on the project. The tag + // template contains fields summarizing the results of the DlpJob. Any field + // values previously written by another DlpJob are deleted. [InfoType naming + // patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using + // this feature. + // + // Findings are persisted in Data Catalog storage and are governed by + // service-specific policies for Data Catalog. For more information, see + // [Service Specific Terms](https://cloud.google.com/terms/service-terms). + // + // Only a single instance of this action can be specified. This action is + // allowed only if all resources being scanned are BigQuery tables. // Compatible with: Inspect message PublishFindingsToCloudDataCatalog { } - // Enable email notification to project owners and editors on jobs's - // completion/failure. + // Create a de-identified copy of the requested table or files. + // + // A TransformationDetail will be created for each transformation. + // + // If any rows in BigQuery are skipped during de-identification + // (transformation errors or row size exceeds BigQuery insert API limits) they + // are placed in the failure output table. If the original row exceeds + // the BigQuery insert API limit it will be truncated when written to the + // failure output table. The failure output table can be set in the + // action.deidentify.output.big_query_output.deidentified_failure_output_table + // field, if no table is set, a table will be automatically created in the + // same project and dataset as the original table. + // + // Compatible with: Inspect + message Deidentify { + // User specified deidentify templates and configs for structured, + // unstructured, and image files. + TransformationConfig transformation_config = 7; + + // Config for storing transformation details. This is separate from the + // de-identified content, and contains metadata about the successful + // transformations and/or failures that occurred while de-identifying. This + // needs to be set in order for users to access information about the status + // of each transformation (see + // [TransformationDetails][google.privacy.dlp.v2.TransformationDetails] + // message for more information about what is noted). + TransformationDetailsStorageConfig transformation_details_storage_config = 3; + + oneof output { + // Required. User settable Cloud Storage bucket and folders to store de-identified + // files. This field must be set for cloud storage deidentification. The + // output Cloud Storage bucket must be different from the input bucket. + // De-identified files will overwrite files in the output path. + // + // Form of: gs://bucket/folder/ or gs://bucket + string cloud_storage_output = 9 [(google.api.field_behavior) = REQUIRED]; + } + + // List of user-specified file type groups to transform. If specified, only + // the files with these filetypes will be transformed. If empty, all + // supported files will be transformed. Supported types may be automatically + // added over time. If a file type is set in this field that isn't supported + // by the Deidentify action then the job will fail and will not be + // successfully created/started. Currently the only filetypes supported are: + // IMAGES, TEXT_FILES, CSV, TSV. + repeated FileType file_types_to_transform = 8; + } + + // Sends an email when the job completes. The email goes to IAM project owners + // and technical [Essential + // Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts). message JobNotificationEmails { } @@ -3361,7 +3704,7 @@ message Action { // Save resulting findings in a provided location. SaveFindings save_findings = 1; - // Publish a notification to a pubsub topic. + // Publish a notification to a Pub/Sub topic. PublishToPubSub pub_sub = 2; // Publish summary to Cloud Security Command Center (Alpha). @@ -3370,6 +3713,9 @@ message Action { // Publish findings to Cloud Datahub. PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; + // Create a de-identified copy of the input data. + Deidentify deidentify = 7; + // Enable email notification for project owners and editors on job's // completion/failure. JobNotificationEmails job_notification_emails = 8; @@ -3379,6 +3725,34 @@ message Action { } } +// User specified templates and configs for how to deidentify structured, +// unstructures, and image files. User must provide either a unstructured +// deidentify template or at least one redact image config. +message TransformationConfig { + // De-identify template. + // If this template is specified, it will serve as the default de-identify + // template. This template cannot contain `record_transformations` since it + // can be used for unstructured content such as free-form text files. If this + // template is not set, a default `ReplaceWithInfoTypeConfig` will be used to + // de-identify unstructured content. + string deidentify_template = 1; + + // Structured de-identify template. + // If this template is specified, it will serve as the de-identify template + // for structured content such as delimited files and tables. If this template + // is not set but the `deidentify_template` is set, then `deidentify_template` + // will also apply to the structured content. If neither template is set, a + // default `ReplaceWithInfoTypeConfig` will be used to de-identify structured + // content. + string structured_deidentify_template = 2; + + // Image redact template. + // If this template is specified, it will serve as the de-identify template + // for images. If this template is not set, all findings in the image will be + // redacted with a black box. + string image_redact_template = 4; +} + // Request message for CreateInspectTemplate. message CreateInspectTemplateRequest { // Required. Parent resource name. @@ -3486,7 +3860,7 @@ message ListInspectTemplatesRequest { // to `ListInspectTemplates`. string page_token = 2; - // Size of the page, can be limited by server. If zero server returns + // Size of the page, can be limited by the server. If zero server returns // a page of max size 100. int32 page_size = 3; @@ -3499,10 +3873,10 @@ message ListInspectTemplatesRequest { // // Supported fields are: // - // - `create_time`: corresponds to time the template was created. - // - `update_time`: corresponds to time the template was last updated. - // - `name`: corresponds to template's name. - // - `display_name`: corresponds to template's display name. + // - `create_time`: corresponds to the time the template was created. + // - `update_time`: corresponds to the time the template was last updated. + // - `name`: corresponds to the template's name. + // - `display_name`: corresponds to the template's display name. string order_by = 4; // Deprecated. This field has no effect. @@ -3701,11 +4075,11 @@ message ListJobTriggersRequest { // // Supported fields are: // - // - `create_time`: corresponds to time the JobTrigger was created. - // - `update_time`: corresponds to time the JobTrigger was last updated. + // - `create_time`: corresponds to the time the JobTrigger was created. + // - `update_time`: corresponds to the time the JobTrigger was last updated. // - `last_run_time`: corresponds to the last time the JobTrigger ran. - // - `name`: corresponds to JobTrigger's name. - // - `display_name`: corresponds to JobTrigger's display name. + // - `name`: corresponds to the JobTrigger's name. + // - `display_name`: corresponds to the JobTrigger's display name. // - `status`: corresponds to JobTrigger's status. string order_by = 4; @@ -3932,7 +4306,7 @@ message DlpJob { // The job is no longer running. DONE = 3; - // The job was canceled before it could complete. + // The job was canceled before it could be completed. CANCELED = 4; // The job had an error and did not complete. @@ -3940,7 +4314,7 @@ message DlpJob { // The job is currently accepting findings via hybridInspect. // A hybrid job in ACTIVE state may continue to have findings added to it - // through calling of hybridInspect. After the job has finished no more + // through the calling of hybridInspect. After the job has finished no more // calls to hybridInspect may be made. ACTIVE jobs can transition to DONE. ACTIVE = 6; } @@ -4026,13 +4400,13 @@ message ListDlpJobsRequest { // * Supported fields/values for inspect jobs: // - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - // - `trigger_name` - The resource name of the trigger that created job. - // - 'end_time` - Corresponds to time the job finished. - // - 'start_time` - Corresponds to time the job finished. + // - `trigger_name` - The name of the trigger that created the job. + // - 'end_time` - Corresponds to the time the job finished. + // - 'start_time` - Corresponds to the time the job finished. // * Supported fields for risk analysis jobs: // - `state` - RUNNING|CANCELED|FINISHED|FAILED - // - 'end_time` - Corresponds to time the job finished. - // - 'start_time` - Corresponds to time the job finished. + // - 'end_time` - Corresponds to the time the job finished. + // - 'start_time` - Corresponds to the time the job finished. // * The operator must be `=` or `!=`. // // Examples: @@ -4063,9 +4437,9 @@ message ListDlpJobsRequest { // // Supported fields are: // - // - `create_time`: corresponds to time the job was created. - // - `end_time`: corresponds to time the job ended. - // - `name`: corresponds to job's name. + // - `create_time`: corresponds to the time the job was created. + // - `end_time`: corresponds to the time the job ended. + // - `name`: corresponds to the job's name. // - `state`: corresponds to `state` string order_by = 6; @@ -4222,7 +4596,7 @@ message ListDeidentifyTemplatesRequest { // to `ListDeidentifyTemplates`. string page_token = 2; - // Size of the page, can be limited by server. If zero server returns + // Size of the page, can be limited by the server. If zero server returns // a page of max size 100. int32 page_size = 3; @@ -4235,10 +4609,10 @@ message ListDeidentifyTemplatesRequest { // // Supported fields are: // - // - `create_time`: corresponds to time the template was created. - // - `update_time`: corresponds to time the template was last updated. - // - `name`: corresponds to template's name. - // - `display_name`: corresponds to template's display name. + // - `create_time`: corresponds to the time the template was created. + // - `update_time`: corresponds to the time the template was last updated. + // - `name`: corresponds to the template's name. + // - `display_name`: corresponds to the template's display name. string order_by = 4; // Deprecated. This field has no effect. @@ -4272,11 +4646,11 @@ message DeleteDeidentifyTemplateRequest { // Configuration for a custom dictionary created from a data source of any size // up to the maximum size defined in the // [limits](https://cloud.google.com/dlp/limits) page. The artifacts of -// dictionary creation are stored in the specified Google Cloud Storage +// dictionary creation are stored in the specified Cloud Storage // location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries // that satisfy the size requirements. message LargeCustomDictionaryConfig { - // Location to store dictionary artifacts in Google Cloud Storage. These files + // Location to store dictionary artifacts in Cloud Storage. These files // will only be accessible by project owners and the DLP API. If any of these // artifacts are modified, the dictionary is considered invalid and can no // longer be used. @@ -4349,7 +4723,7 @@ message StoredInfoTypeVersion { // appearing first. // // For example, some of the data for stored custom dictionaries is put in - // the user's Google Cloud Storage bucket, and if this data is modified or + // the user's Cloud Storage bucket, and if this data is modified or // deleted by the user or another system, the dictionary becomes invalid. // // If any errors occur, fix the problem indicated by the error message and @@ -4472,10 +4846,6 @@ message ListStoredInfoTypesRequest { // `projects/`PROJECT_ID`/locations/`LOCATION_ID // + Projects scope, no location specified (defaults to global):
// `projects/`PROJECT_ID - // + Organizations scope, location specified:
- // `organizations/`ORG_ID`/locations/`LOCATION_ID - // + Organizations scope, no location specified (defaults to global):
- // `organizations/`ORG_ID // // The following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location @@ -4493,7 +4863,7 @@ message ListStoredInfoTypesRequest { // to `ListStoredInfoTypes`. string page_token = 2; - // Size of the page, can be limited by server. If zero server returns + // Size of the page, can be limited by the server. If zero server returns // a page of max size 100. int32 page_size = 3; @@ -4506,7 +4876,7 @@ message ListStoredInfoTypesRequest { // // Supported fields are: // - // - `create_time`: corresponds to time the most recent version of the + // - `create_time`: corresponds to the time the most recent version of the // resource was created. // - `state`: corresponds to the state of the resource. // - `name`: corresponds to resource name. @@ -4750,33 +5120,7 @@ enum StoredInfoTypeState { } // Score is a summary of all elements in the data profile. -// A higher number means more sensitive. -message SensitivityScore { - // Various score levels for resources. - enum SensitivityScoreLevel { - // Unused. - SENSITIVITY_SCORE_UNSPECIFIED = 0; - - // No sensitive information detected. Limited access. - SENSITIVITY_LOW = 10; - - // Medium risk - PII, potentially sensitive data, or fields with free-text - // data that are at higher risk of having intermittent sensitive data. - // Consider limiting access. - SENSITIVITY_MODERATE = 20; - - // High risk – SPII may be present. Exfiltration of data may lead to user - // data loss. Re-identification of users may be possible. Consider limiting - // usage and or removing SPII. - SENSITIVITY_HIGH = 30; - } - - // The score applied to the resource. - SensitivityScoreLevel score = 1; -} - -// Score is a summary of all elements in the data profile. -// A higher number means more risky. +// A higher number means more risk. message DataRiskLevel { // Various score levels for resources. enum DataRiskLevelScore { @@ -4789,8 +5133,8 @@ message DataRiskLevel { RISK_LOW = 10; // Medium risk - Sensitive data may be present but additional access or fine - // grain access restrictions appears to be present. Consider limiting - // access even further or transforming data to mask. + // grain access restrictions appear to be present. Consider limiting + // access even further or transform data to mask. RISK_MODERATE = 20; // High risk – SPII may be present. Access controls may include public @@ -4947,15 +5291,23 @@ enum EncryptionStatus { message InfoTypeSummary { // The infoType. InfoType info_type = 1; + + // Approximate percentage of non-null rows that contained data detected by + // this infotype. + int32 estimated_prevalence = 2; } // Infotype details for other infoTypes found within a column. message OtherInfoTypeSummary { // The other infoType. InfoType info_type = 1; + + // Approximate percentage of non-null rows that contained data detected by + // this infotype. + int32 estimated_prevalence = 2; } -// A condition for determining whether a PubSub should be triggered. +// A condition for determining whether a Pub/Sub should be triggered. message DataProfilePubSubCondition { // Various score levels for resources. enum ProfileScoreBucket { @@ -5006,10 +5358,9 @@ message DataProfilePubSubCondition { PubSubExpressions expressions = 1; } -// The message that will be published to a Pub/Sub topic. +// Pub/Sub topic message for a DataProfileAction.PubSubNotification event. // To receive a message of protocol buffer schema type, convert the message data // to an object of this proto class. -// https://cloud.google.com/pubsub/docs/samples/pubsub-subscribe-proto-messages message DataProfilePubSubMessage { // If `DetailLevel` is `TABLE_PROFILE` this will be fully populated. // Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and diff --git a/java-dlp/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto b/java-dlp/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto index a0002b33f561..7709f546be5b 100644 --- a/java-dlp/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto +++ b/java-dlp/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.privacy.dlp.v2; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Dlp.V2"; @@ -39,6 +40,32 @@ message InfoType { string version = 2; } +// Score is a summary of all elements in the data profile. +// A higher number means more sensitive. +message SensitivityScore { + // Various score levels for resources. + enum SensitivityScoreLevel { + // Unused. + SENSITIVITY_SCORE_UNSPECIFIED = 0; + + // No sensitive information detected. Limited access. + SENSITIVITY_LOW = 10; + + // Medium risk - PII, potentially sensitive data, or fields with free-text + // data that are at higher risk of having intermittent sensitive data. + // Consider limiting access. + SENSITIVITY_MODERATE = 20; + + // High risk – SPII may be present. Exfiltration of data may lead to user + // data loss. Re-identification of users may be possible. Consider limiting + // usage and or removing SPII. + SENSITIVITY_HIGH = 30; + } + + // The score applied to the resource. + SensitivityScoreLevel score = 1; +} + // Categorization of results based on how likely they are to represent a match, // based on the number of elements they contain which imply a match. enum Likelihood { @@ -411,7 +438,7 @@ message CloudStorageRegexFileSet { repeated string exclude_regex = 3; } -// Options defining a file or a set of files within a Google Cloud Storage +// Options defining a file or a set of files within a Cloud Storage // bucket. message CloudStorageOptions { // Set of files to scan. @@ -547,7 +574,7 @@ message BigQueryOptions { // Shared message indicating Cloud storage type. message StorageConfig { // Configuration of the timespan of the items to include in scanning. - // Currently only supported when inspecting Google Cloud Storage and BigQuery. + // Currently only supported when inspecting Cloud Storage and BigQuery. message TimespanConfig { // Exclude files, tables, or rows older than this value. // If not set, no lower time limit is applied. @@ -560,7 +587,8 @@ message StorageConfig { // Specification of the field containing the timestamp of scanned items. // Used for data sources like Datastore and BigQuery. // - // For BigQuery: + // For BigQuery + // // If this value is not specified and the table was modified between the // given start and end times, the entire table will be scanned. If this // value is specified, then rows are filtered based on the given start and @@ -569,17 +597,34 @@ message StorageConfig { // Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, // `TIMESTAMP`, and `DATETIME`. // - // For Datastore: + // If your BigQuery table is [partitioned at ingestion + // time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), + // you can use any of the following pseudo-columns as your timestamp field. + // When used with Cloud DLP, these pseudo-column names are case sensitive. + // + //
    + //
  • _PARTITIONTIME
  • + //
  • _PARTITIONDATE
  • + //
  • _PARTITION_LOAD_TIME
  • + //
+ // + // For Datastore + // // If this value is specified, then entities are filtered based on the given // start and end times. If an entity does not contain the provided timestamp // property or contains empty or invalid values, then it is included. // Valid data types of the provided timestamp property are: `TIMESTAMP`. + // + // See the + // [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan) + // related to this operation. FieldId timestamp_field = 3; // When the job is started by a JobTrigger we will automatically figure out // a valid start_time to avoid scanning files that have not been modified // since the last time the JobTrigger executed. This will be based on the - // time of the execution of the last run of the JobTrigger. + // time of the execution of the last run of the JobTrigger or the timespan + // end_time used in the last run of the JobTrigger. bool enable_auto_population_of_timespan_config = 4; } @@ -587,7 +632,7 @@ message StorageConfig { // Google Cloud Datastore options. DatastoreOptions datastore_options = 2; - // Google Cloud Storage options. + // Cloud Storage options. CloudStorageOptions cloud_storage_options = 3; // BigQuery options. diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java deleted file mode 100644 index 0dcb903b1df1..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java +++ /dev/null @@ -1,5835 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dlp.v2.stub.DlpServiceStub; -import com.google.cloud.dlp.v2.stub.DlpServiceStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; -import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; -import com.google.privacy.dlp.v2.CreateJobTriggerRequest; -import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.DeidentifyTemplate; -import com.google.privacy.dlp.v2.DeidentifyTemplateName; -import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.DeleteDlpJobRequest; -import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; -import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; -import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.DlpJobName; -import com.google.privacy.dlp.v2.FinishDlpJobRequest; -import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.GetInspectTemplateRequest; -import com.google.privacy.dlp.v2.GetJobTriggerRequest; -import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; -import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; -import com.google.privacy.dlp.v2.HybridInspectResponse; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectJobConfig; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.InspectTemplateName; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.JobTriggerName; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; -import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ListDlpJobsResponse; -import com.google.privacy.dlp.v2.ListInfoTypesRequest; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ListJobTriggersResponse; -import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; -import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; -import com.google.privacy.dlp.v2.LocationName; -import com.google.privacy.dlp.v2.OrganizationLocationName; -import com.google.privacy.dlp.v2.OrganizationName; -import com.google.privacy.dlp.v2.ProjectName; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; -import com.google.privacy.dlp.v2.StoredInfoType; -import com.google.privacy.dlp.v2.StoredInfoTypeConfig; -import com.google.privacy.dlp.v2.StoredInfoTypeName; -import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; -import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; -import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: The Cloud Data Loss Prevention (DLP) API is a service that allows clients to - * detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive data - * in user-supplied, unstructured data streams, like text blocks or images. The service also - * includes methods for sensitive data redaction and scheduling of data scans on Google Cloud - * Platform based data sets. - * - *

To learn more about concepts and find how-to guides see https://cloud.google.com/dlp/docs/. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- *   InspectContentRequest request =
- *       InspectContentRequest.newBuilder()
- *           .setParent(ProjectName.of("[PROJECT]").toString())
- *           .setInspectConfig(InspectConfig.newBuilder().build())
- *           .setItem(ContentItem.newBuilder().build())
- *           .setInspectTemplateName("inspectTemplateName1828857433")
- *           .setLocationId("locationId1541836720")
- *           .build();
- *   InspectContentResponse response = dlpServiceClient.inspectContent(request);
- * }
- * }
- * - *

Note: close() needs to be called on the DlpServiceClient object to clean up resources such as - * threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of DlpServiceSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * DlpServiceSettings dlpServiceSettings =
- *     DlpServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * DlpServiceSettings dlpServiceSettings =
- *     DlpServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * DlpServiceSettings dlpServiceSettings =
- *     DlpServiceSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             DlpServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class DlpServiceClient implements BackgroundResource { - private final DlpServiceSettings settings; - private final DlpServiceStub stub; - - /** Constructs an instance of DlpServiceClient with default settings. */ - public static final DlpServiceClient create() throws IOException { - return create(DlpServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of DlpServiceClient, using the given settings. The channels are created - * based on the settings passed in, or defaults for any settings that are not set. - */ - public static final DlpServiceClient create(DlpServiceSettings settings) throws IOException { - return new DlpServiceClient(settings); - } - - /** - * Constructs an instance of DlpServiceClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(DlpServiceSettings). - */ - public static final DlpServiceClient create(DlpServiceStub stub) { - return new DlpServiceClient(stub); - } - - /** - * Constructs an instance of DlpServiceClient, using the given settings. This is protected so that - * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected DlpServiceClient(DlpServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((DlpServiceStubSettings) settings.getStubSettings()).createStub(); - } - - protected DlpServiceClient(DlpServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final DlpServiceSettings getSettings() { - return settings; - } - - public DlpServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Finds potentially sensitive info in content. This method has limits on input size, processing - * time, and output size. - * - *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and - * https://cloud.google.com/dlp/docs/inspecting-text, - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   InspectContentRequest request =
-   *       InspectContentRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setInspectConfig(InspectConfig.newBuilder().build())
-   *           .setItem(ContentItem.newBuilder().build())
-   *           .setInspectTemplateName("inspectTemplateName1828857433")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   InspectContentResponse response = dlpServiceClient.inspectContent(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectContentResponse inspectContent(InspectContentRequest request) { - return inspectContentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Finds potentially sensitive info in content. This method has limits on input size, processing - * time, and output size. - * - *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and - * https://cloud.google.com/dlp/docs/inspecting-text, - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   InspectContentRequest request =
-   *       InspectContentRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setInspectConfig(InspectConfig.newBuilder().build())
-   *           .setItem(ContentItem.newBuilder().build())
-   *           .setInspectTemplateName("inspectTemplateName1828857433")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.inspectContentCallable().futureCall(request);
-   *   // Do something.
-   *   InspectContentResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - inspectContentCallable() { - return stub.inspectContentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Redacts potentially sensitive info from an image. This method has limits on input size, - * processing time, and output size. See - * https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   RedactImageRequest request =
-   *       RedactImageRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setLocationId("locationId1541836720")
-   *           .setInspectConfig(InspectConfig.newBuilder().build())
-   *           .addAllImageRedactionConfigs(new ArrayList())
-   *           .setIncludeFindings(true)
-   *           .setByteItem(ByteContentItem.newBuilder().build())
-   *           .build();
-   *   RedactImageResponse response = dlpServiceClient.redactImage(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final RedactImageResponse redactImage(RedactImageRequest request) { - return redactImageCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Redacts potentially sensitive info from an image. This method has limits on input size, - * processing time, and output size. See - * https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   RedactImageRequest request =
-   *       RedactImageRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setLocationId("locationId1541836720")
-   *           .setInspectConfig(InspectConfig.newBuilder().build())
-   *           .addAllImageRedactionConfigs(new ArrayList())
-   *           .setIncludeFindings(true)
-   *           .setByteItem(ByteContentItem.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.redactImageCallable().futureCall(request);
-   *   // Do something.
-   *   RedactImageResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable redactImageCallable() { - return stub.redactImageCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * De-identifies potentially sensitive info from a ContentItem. This method has limits on input - * size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn - * more. - * - *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeidentifyContentRequest request =
-   *       DeidentifyContentRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setDeidentifyConfig(DeidentifyConfig.newBuilder().build())
-   *           .setInspectConfig(InspectConfig.newBuilder().build())
-   *           .setItem(ContentItem.newBuilder().build())
-   *           .setInspectTemplateName("inspectTemplateName1828857433")
-   *           .setDeidentifyTemplateName("deidentifyTemplateName-1374666414")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyContentResponse deidentifyContent(DeidentifyContentRequest request) { - return deidentifyContentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * De-identifies potentially sensitive info from a ContentItem. This method has limits on input - * size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn - * more. - * - *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeidentifyContentRequest request =
-   *       DeidentifyContentRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setDeidentifyConfig(DeidentifyConfig.newBuilder().build())
-   *           .setInspectConfig(InspectConfig.newBuilder().build())
-   *           .setItem(ContentItem.newBuilder().build())
-   *           .setInspectTemplateName("inspectTemplateName1828857433")
-   *           .setDeidentifyTemplateName("deidentifyTemplateName-1374666414")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.deidentifyContentCallable().futureCall(request);
-   *   // Do something.
-   *   DeidentifyContentResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - deidentifyContentCallable() { - return stub.deidentifyContentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Re-identifies content that has been de-identified. See - * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example - * to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ReidentifyContentRequest request =
-   *       ReidentifyContentRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setReidentifyConfig(DeidentifyConfig.newBuilder().build())
-   *           .setInspectConfig(InspectConfig.newBuilder().build())
-   *           .setItem(ContentItem.newBuilder().build())
-   *           .setInspectTemplateName("inspectTemplateName1828857433")
-   *           .setReidentifyTemplateName("reidentifyTemplateName157316612")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ReidentifyContentResponse response = dlpServiceClient.reidentifyContent(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ReidentifyContentResponse reidentifyContent(ReidentifyContentRequest request) { - return reidentifyContentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Re-identifies content that has been de-identified. See - * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example - * to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ReidentifyContentRequest request =
-   *       ReidentifyContentRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setReidentifyConfig(DeidentifyConfig.newBuilder().build())
-   *           .setInspectConfig(InspectConfig.newBuilder().build())
-   *           .setItem(ContentItem.newBuilder().build())
-   *           .setInspectTemplateName("inspectTemplateName1828857433")
-   *           .setReidentifyTemplateName("reidentifyTemplateName157316612")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.reidentifyContentCallable().futureCall(request);
-   *   // Do something.
-   *   ReidentifyContentResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - reidentifyContentCallable() { - return stub.reidentifyContentCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a list of the sensitive information types that DLP API supports. See - * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = "parent-995424086";
-   *   ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(parent);
-   * }
-   * }
- * - * @param parent The parent resource name. - *

The format of this value is as follows: - *

locations/<var>LOCATION_ID</var> - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInfoTypesResponse listInfoTypes(String parent) { - ListInfoTypesRequest request = ListInfoTypesRequest.newBuilder().setParent(parent).build(); - return listInfoTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a list of the sensitive information types that DLP API supports. See - * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListInfoTypesRequest request =
-   *       ListInfoTypesRequest.newBuilder()
-   *           .setParent("parent-995424086")
-   *           .setLanguageCode("languageCode-2092349083")
-   *           .setFilter("filter-1274492040")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInfoTypesResponse listInfoTypes(ListInfoTypesRequest request) { - return listInfoTypesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns a list of the sensitive information types that DLP API supports. See - * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListInfoTypesRequest request =
-   *       ListInfoTypesRequest.newBuilder()
-   *           .setParent("parent-995424086")
-   *           .setLanguageCode("languageCode-2092349083")
-   *           .setFilter("filter-1274492040")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.listInfoTypesCallable().futureCall(request);
-   *   // Do something.
-   *   ListInfoTypesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable listInfoTypesCallable() { - return stub.listInfoTypesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, - * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
-   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param inspectTemplate Required. The InspectTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate createInspectTemplate( - LocationName parent, InspectTemplate inspectTemplate) { - CreateInspectTemplateRequest request = - CreateInspectTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInspectTemplate(inspectTemplate) - .build(); - return createInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, - * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
-   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
-   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param inspectTemplate Required. The InspectTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate createInspectTemplate( - OrganizationLocationName parent, InspectTemplate inspectTemplate) { - CreateInspectTemplateRequest request = - CreateInspectTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInspectTemplate(inspectTemplate) - .build(); - return createInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, - * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
-   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param inspectTemplate Required. The InspectTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate createInspectTemplate( - OrganizationName parent, InspectTemplate inspectTemplate) { - CreateInspectTemplateRequest request = - CreateInspectTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInspectTemplate(inspectTemplate) - .build(); - return createInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, - * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
-   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param inspectTemplate Required. The InspectTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate createInspectTemplate( - ProjectName parent, InspectTemplate inspectTemplate) { - CreateInspectTemplateRequest request = - CreateInspectTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInspectTemplate(inspectTemplate) - .build(); - return createInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, - * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
-   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param inspectTemplate Required. The InspectTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate createInspectTemplate( - String parent, InspectTemplate inspectTemplate) { - CreateInspectTemplateRequest request = - CreateInspectTemplateRequest.newBuilder() - .setParent(parent) - .setInspectTemplate(inspectTemplate) - .build(); - return createInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, - * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateInspectTemplateRequest request =
-   *       CreateInspectTemplateRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setInspectTemplate(InspectTemplate.newBuilder().build())
-   *           .setTemplateId("templateId1304010549")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   InspectTemplate response = dlpServiceClient.createInspectTemplate(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest request) { - return createInspectTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an InspectTemplate for reusing frequently used configuration for inspecting content, - * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateInspectTemplateRequest request =
-   *       CreateInspectTemplateRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setInspectTemplate(InspectTemplate.newBuilder().build())
-   *           .setTemplateId("templateId1304010549")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.createInspectTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   InspectTemplate response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createInspectTemplateCallable() { - return stub.createInspectTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   InspectTemplateName name =
-   *       InspectTemplateName.ofOrganizationInspectTemplateName(
-   *           "[ORGANIZATION]", "[INSPECT_TEMPLATE]");
-   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   InspectTemplate response =
-   *       dlpServiceClient.updateInspectTemplate(name, inspectTemplate, updateMask);
-   * }
-   * }
- * - * @param name Required. Resource name of organization and inspectTemplate to be updated, for - * example `organizations/433245324/inspectTemplates/432452342` or - * projects/project-id/inspectTemplates/432452342. - * @param inspectTemplate New InspectTemplate value. - * @param updateMask Mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate updateInspectTemplate( - InspectTemplateName name, InspectTemplate inspectTemplate, FieldMask updateMask) { - UpdateInspectTemplateRequest request = - UpdateInspectTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setInspectTemplate(inspectTemplate) - .setUpdateMask(updateMask) - .build(); - return updateInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name =
-   *       InspectTemplateName.ofOrganizationInspectTemplateName(
-   *               "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
-   *           .toString();
-   *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   InspectTemplate response =
-   *       dlpServiceClient.updateInspectTemplate(name, inspectTemplate, updateMask);
-   * }
-   * }
- * - * @param name Required. Resource name of organization and inspectTemplate to be updated, for - * example `organizations/433245324/inspectTemplates/432452342` or - * projects/project-id/inspectTemplates/432452342. - * @param inspectTemplate New InspectTemplate value. - * @param updateMask Mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate updateInspectTemplate( - String name, InspectTemplate inspectTemplate, FieldMask updateMask) { - UpdateInspectTemplateRequest request = - UpdateInspectTemplateRequest.newBuilder() - .setName(name) - .setInspectTemplate(inspectTemplate) - .setUpdateMask(updateMask) - .build(); - return updateInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   UpdateInspectTemplateRequest request =
-   *       UpdateInspectTemplateRequest.newBuilder()
-   *           .setName(
-   *               InspectTemplateName.ofOrganizationInspectTemplateName(
-   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
-   *                   .toString())
-   *           .setInspectTemplate(InspectTemplate.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   InspectTemplate response = dlpServiceClient.updateInspectTemplate(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate updateInspectTemplate(UpdateInspectTemplateRequest request) { - return updateInspectTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   UpdateInspectTemplateRequest request =
-   *       UpdateInspectTemplateRequest.newBuilder()
-   *           .setName(
-   *               InspectTemplateName.ofOrganizationInspectTemplateName(
-   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
-   *                   .toString())
-   *           .setInspectTemplate(InspectTemplate.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.updateInspectTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   InspectTemplate response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateInspectTemplateCallable() { - return stub.updateInspectTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   InspectTemplateName name =
-   *       InspectTemplateName.ofOrganizationInspectTemplateName(
-   *           "[ORGANIZATION]", "[INSPECT_TEMPLATE]");
-   *   InspectTemplate response = dlpServiceClient.getInspectTemplate(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and inspectTemplate to be read, for - * example `organizations/433245324/inspectTemplates/432452342` or - * projects/project-id/inspectTemplates/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate getInspectTemplate(InspectTemplateName name) { - GetInspectTemplateRequest request = - GetInspectTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name =
-   *       InspectTemplateName.ofOrganizationInspectTemplateName(
-   *               "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
-   *           .toString();
-   *   InspectTemplate response = dlpServiceClient.getInspectTemplate(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and inspectTemplate to be read, for - * example `organizations/433245324/inspectTemplates/432452342` or - * projects/project-id/inspectTemplates/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate getInspectTemplate(String name) { - GetInspectTemplateRequest request = - GetInspectTemplateRequest.newBuilder().setName(name).build(); - return getInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetInspectTemplateRequest request =
-   *       GetInspectTemplateRequest.newBuilder()
-   *           .setName(
-   *               InspectTemplateName.ofOrganizationInspectTemplateName(
-   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
-   *                   .toString())
-   *           .build();
-   *   InspectTemplate response = dlpServiceClient.getInspectTemplate(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final InspectTemplate getInspectTemplate(GetInspectTemplateRequest request) { - return getInspectTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetInspectTemplateRequest request =
-   *       GetInspectTemplateRequest.newBuilder()
-   *           .setName(
-   *               InspectTemplateName.ofOrganizationInspectTemplateName(
-   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.getInspectTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   InspectTemplate response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - getInspectTemplateCallable() { - return stub.getInspectTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInspectTemplatesPagedResponse listInspectTemplates(LocationName parent) { - ListInspectTemplatesRequest request = - ListInspectTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listInspectTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
-   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInspectTemplatesPagedResponse listInspectTemplates( - OrganizationLocationName parent) { - ListInspectTemplatesRequest request = - ListInspectTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listInspectTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInspectTemplatesPagedResponse listInspectTemplates(OrganizationName parent) { - ListInspectTemplatesRequest request = - ListInspectTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listInspectTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInspectTemplatesPagedResponse listInspectTemplates(ProjectName parent) { - ListInspectTemplatesRequest request = - ListInspectTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listInspectTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInspectTemplatesPagedResponse listInspectTemplates(String parent) { - ListInspectTemplatesRequest request = - ListInspectTemplatesRequest.newBuilder().setParent(parent).build(); - return listInspectTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListInspectTemplatesRequest request =
-   *       ListInspectTemplatesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListInspectTemplatesPagedResponse listInspectTemplates( - ListInspectTemplatesRequest request) { - return listInspectTemplatesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListInspectTemplatesRequest request =
-   *       ListInspectTemplatesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.listInspectTemplatesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (InspectTemplate element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listInspectTemplatesPagedCallable() { - return stub.listInspectTemplatesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListInspectTemplatesRequest request =
-   *       ListInspectTemplatesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   while (true) {
-   *     ListInspectTemplatesResponse response =
-   *         dlpServiceClient.listInspectTemplatesCallable().call(request);
-   *     for (InspectTemplate element : response.getInspectTemplatesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listInspectTemplatesCallable() { - return stub.listInspectTemplatesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   InspectTemplateName name =
-   *       InspectTemplateName.ofOrganizationInspectTemplateName(
-   *           "[ORGANIZATION]", "[INSPECT_TEMPLATE]");
-   *   dlpServiceClient.deleteInspectTemplate(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and inspectTemplate to be deleted, for - * example `organizations/433245324/inspectTemplates/432452342` or - * projects/project-id/inspectTemplates/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteInspectTemplate(InspectTemplateName name) { - DeleteInspectTemplateRequest request = - DeleteInspectTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name =
-   *       InspectTemplateName.ofOrganizationInspectTemplateName(
-   *               "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
-   *           .toString();
-   *   dlpServiceClient.deleteInspectTemplate(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and inspectTemplate to be deleted, for - * example `organizations/433245324/inspectTemplates/432452342` or - * projects/project-id/inspectTemplates/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteInspectTemplate(String name) { - DeleteInspectTemplateRequest request = - DeleteInspectTemplateRequest.newBuilder().setName(name).build(); - deleteInspectTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteInspectTemplateRequest request =
-   *       DeleteInspectTemplateRequest.newBuilder()
-   *           .setName(
-   *               InspectTemplateName.ofOrganizationInspectTemplateName(
-   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
-   *                   .toString())
-   *           .build();
-   *   dlpServiceClient.deleteInspectTemplate(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteInspectTemplate(DeleteInspectTemplateRequest request) { - deleteInspectTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteInspectTemplateRequest request =
-   *       DeleteInspectTemplateRequest.newBuilder()
-   *           .setName(
-   *               InspectTemplateName.ofOrganizationInspectTemplateName(
-   *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.deleteInspectTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteInspectTemplateCallable() { - return stub.deleteInspectTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying - * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
-   *   DeidentifyTemplate response =
-   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param deidentifyTemplate Required. The DeidentifyTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate createDeidentifyTemplate( - LocationName parent, DeidentifyTemplate deidentifyTemplate) { - CreateDeidentifyTemplateRequest request = - CreateDeidentifyTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - return createDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying - * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
-   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
-   *   DeidentifyTemplate response =
-   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param deidentifyTemplate Required. The DeidentifyTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate createDeidentifyTemplate( - OrganizationLocationName parent, DeidentifyTemplate deidentifyTemplate) { - CreateDeidentifyTemplateRequest request = - CreateDeidentifyTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - return createDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying - * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
-   *   DeidentifyTemplate response =
-   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param deidentifyTemplate Required. The DeidentifyTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate createDeidentifyTemplate( - OrganizationName parent, DeidentifyTemplate deidentifyTemplate) { - CreateDeidentifyTemplateRequest request = - CreateDeidentifyTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - return createDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying - * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
-   *   DeidentifyTemplate response =
-   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param deidentifyTemplate Required. The DeidentifyTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate createDeidentifyTemplate( - ProjectName parent, DeidentifyTemplate deidentifyTemplate) { - CreateDeidentifyTemplateRequest request = - CreateDeidentifyTemplateRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - return createDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying - * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
-   *   DeidentifyTemplate response =
-   *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param deidentifyTemplate Required. The DeidentifyTemplate to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate createDeidentifyTemplate( - String parent, DeidentifyTemplate deidentifyTemplate) { - CreateDeidentifyTemplateRequest request = - CreateDeidentifyTemplateRequest.newBuilder() - .setParent(parent) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - return createDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying - * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateDeidentifyTemplateRequest request =
-   *       CreateDeidentifyTemplateRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
-   *           .setTemplateId("templateId1304010549")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate createDeidentifyTemplate( - CreateDeidentifyTemplateRequest request) { - return createDeidentifyTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying - * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateDeidentifyTemplateRequest request =
-   *       CreateDeidentifyTemplateRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
-   *           .setTemplateId("templateId1304010549")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.createDeidentifyTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   DeidentifyTemplate response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createDeidentifyTemplateCallable() { - return stub.createDeidentifyTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid - * to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeidentifyTemplateName name =
-   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *           "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
-   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   DeidentifyTemplate response =
-   *       dlpServiceClient.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask);
-   * }
-   * }
- * - * @param name Required. Resource name of organization and deidentify template to be updated, for - * example `organizations/433245324/deidentifyTemplates/432452342` or - * projects/project-id/deidentifyTemplates/432452342. - * @param deidentifyTemplate New DeidentifyTemplate value. - * @param updateMask Mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate updateDeidentifyTemplate( - DeidentifyTemplateName name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask) { - UpdateDeidentifyTemplateRequest request = - UpdateDeidentifyTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setDeidentifyTemplate(deidentifyTemplate) - .setUpdateMask(updateMask) - .build(); - return updateDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid - * to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name =
-   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *               "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
-   *           .toString();
-   *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   DeidentifyTemplate response =
-   *       dlpServiceClient.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask);
-   * }
-   * }
- * - * @param name Required. Resource name of organization and deidentify template to be updated, for - * example `organizations/433245324/deidentifyTemplates/432452342` or - * projects/project-id/deidentifyTemplates/432452342. - * @param deidentifyTemplate New DeidentifyTemplate value. - * @param updateMask Mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate updateDeidentifyTemplate( - String name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask) { - UpdateDeidentifyTemplateRequest request = - UpdateDeidentifyTemplateRequest.newBuilder() - .setName(name) - .setDeidentifyTemplate(deidentifyTemplate) - .setUpdateMask(updateMask) - .build(); - return updateDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid - * to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   UpdateDeidentifyTemplateRequest request =
-   *       UpdateDeidentifyTemplateRequest.newBuilder()
-   *           .setName(
-   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
-   *                   .toString())
-   *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   DeidentifyTemplate response = dlpServiceClient.updateDeidentifyTemplate(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate updateDeidentifyTemplate( - UpdateDeidentifyTemplateRequest request) { - return updateDeidentifyTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid - * to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   UpdateDeidentifyTemplateRequest request =
-   *       UpdateDeidentifyTemplateRequest.newBuilder()
-   *           .setName(
-   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
-   *                   .toString())
-   *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.updateDeidentifyTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   DeidentifyTemplate response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateDeidentifyTemplateCallable() { - return stub.updateDeidentifyTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeidentifyTemplateName name =
-   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *           "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
-   *   DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and deidentify template to be read, for - * example `organizations/433245324/deidentifyTemplates/432452342` or - * projects/project-id/deidentifyTemplates/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate getDeidentifyTemplate(DeidentifyTemplateName name) { - GetDeidentifyTemplateRequest request = - GetDeidentifyTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name =
-   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *               "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
-   *           .toString();
-   *   DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and deidentify template to be read, for - * example `organizations/433245324/deidentifyTemplates/432452342` or - * projects/project-id/deidentifyTemplates/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate getDeidentifyTemplate(String name) { - GetDeidentifyTemplateRequest request = - GetDeidentifyTemplateRequest.newBuilder().setName(name).build(); - return getDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetDeidentifyTemplateRequest request =
-   *       GetDeidentifyTemplateRequest.newBuilder()
-   *           .setName(
-   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
-   *                   .toString())
-   *           .build();
-   *   DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DeidentifyTemplate getDeidentifyTemplate(GetDeidentifyTemplateRequest request) { - return getDeidentifyTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetDeidentifyTemplateRequest request =
-   *       GetDeidentifyTemplateRequest.newBuilder()
-   *           .setName(
-   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.getDeidentifyTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   DeidentifyTemplate response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - getDeidentifyTemplateCallable() { - return stub.getDeidentifyTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (DeidentifyTemplate element :
-   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(LocationName parent) { - ListDeidentifyTemplatesRequest request = - ListDeidentifyTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listDeidentifyTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
-   *   for (DeidentifyTemplate element :
-   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates( - OrganizationLocationName parent) { - ListDeidentifyTemplatesRequest request = - ListDeidentifyTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listDeidentifyTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   for (DeidentifyTemplate element :
-   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates( - OrganizationName parent) { - ListDeidentifyTemplatesRequest request = - ListDeidentifyTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listDeidentifyTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (DeidentifyTemplate element :
-   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(ProjectName parent) { - ListDeidentifyTemplatesRequest request = - ListDeidentifyTemplatesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listDeidentifyTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   for (DeidentifyTemplate element :
-   *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(String parent) { - ListDeidentifyTemplatesRequest request = - ListDeidentifyTemplatesRequest.newBuilder().setParent(parent).build(); - return listDeidentifyTemplates(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListDeidentifyTemplatesRequest request =
-   *       ListDeidentifyTemplatesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   for (DeidentifyTemplate element :
-   *       dlpServiceClient.listDeidentifyTemplates(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates( - ListDeidentifyTemplatesRequest request) { - return listDeidentifyTemplatesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListDeidentifyTemplatesRequest request =
-   *       ListDeidentifyTemplatesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.listDeidentifyTemplatesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (DeidentifyTemplate element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listDeidentifyTemplatesPagedCallable() { - return stub.listDeidentifyTemplatesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListDeidentifyTemplatesRequest request =
-   *       ListDeidentifyTemplatesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   while (true) {
-   *     ListDeidentifyTemplatesResponse response =
-   *         dlpServiceClient.listDeidentifyTemplatesCallable().call(request);
-   *     for (DeidentifyTemplate element : response.getDeidentifyTemplatesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listDeidentifyTemplatesCallable() { - return stub.listDeidentifyTemplatesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeidentifyTemplateName name =
-   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *           "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
-   *   dlpServiceClient.deleteDeidentifyTemplate(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and deidentify template to be deleted, - * for example `organizations/433245324/deidentifyTemplates/432452342` or - * projects/project-id/deidentifyTemplates/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteDeidentifyTemplate(DeidentifyTemplateName name) { - DeleteDeidentifyTemplateRequest request = - DeleteDeidentifyTemplateRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name =
-   *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *               "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
-   *           .toString();
-   *   dlpServiceClient.deleteDeidentifyTemplate(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and deidentify template to be deleted, - * for example `organizations/433245324/deidentifyTemplates/432452342` or - * projects/project-id/deidentifyTemplates/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteDeidentifyTemplate(String name) { - DeleteDeidentifyTemplateRequest request = - DeleteDeidentifyTemplateRequest.newBuilder().setName(name).build(); - deleteDeidentifyTemplate(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteDeidentifyTemplateRequest request =
-   *       DeleteDeidentifyTemplateRequest.newBuilder()
-   *           .setName(
-   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
-   *                   .toString())
-   *           .build();
-   *   dlpServiceClient.deleteDeidentifyTemplate(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest request) { - deleteDeidentifyTemplateCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteDeidentifyTemplateRequest request =
-   *       DeleteDeidentifyTemplateRequest.newBuilder()
-   *           .setName(
-   *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
-   *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.deleteDeidentifyTemplateCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable - deleteDeidentifyTemplateCallable() { - return stub.deleteDeidentifyTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on - * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
-   *   JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param jobTrigger Required. The JobTrigger to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger createJobTrigger(LocationName parent, JobTrigger jobTrigger) { - CreateJobTriggerRequest request = - CreateJobTriggerRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setJobTrigger(jobTrigger) - .build(); - return createJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on - * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
-   *   JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param jobTrigger Required. The JobTrigger to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger createJobTrigger(ProjectName parent, JobTrigger jobTrigger) { - CreateJobTriggerRequest request = - CreateJobTriggerRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setJobTrigger(jobTrigger) - .build(); - return createJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on - * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
-   *   JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param jobTrigger Required. The JobTrigger to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger createJobTrigger(String parent, JobTrigger jobTrigger) { - CreateJobTriggerRequest request = - CreateJobTriggerRequest.newBuilder().setParent(parent).setJobTrigger(jobTrigger).build(); - return createJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on - * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateJobTriggerRequest request =
-   *       CreateJobTriggerRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setJobTrigger(JobTrigger.newBuilder().build())
-   *           .setTriggerId("triggerId-648752909")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   JobTrigger response = dlpServiceClient.createJobTrigger(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger createJobTrigger(CreateJobTriggerRequest request) { - return createJobTriggerCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on - * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateJobTriggerRequest request =
-   *       CreateJobTriggerRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setJobTrigger(JobTrigger.newBuilder().build())
-   *           .setTriggerId("triggerId-648752909")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.createJobTriggerCallable().futureCall(request);
-   *   // Do something.
-   *   JobTrigger response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createJobTriggerCallable() { - return stub.createJobTriggerCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
-   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   JobTrigger response = dlpServiceClient.updateJobTrigger(name, jobTrigger, updateMask);
-   * }
-   * }
- * - * @param name Required. Resource name of the project and the triggeredJob, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @param jobTrigger New JobTrigger value. - * @param updateMask Mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger updateJobTrigger( - JobTriggerName name, JobTrigger jobTrigger, FieldMask updateMask) { - UpdateJobTriggerRequest request = - UpdateJobTriggerRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setJobTrigger(jobTrigger) - .setUpdateMask(updateMask) - .build(); - return updateJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
-   *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   JobTrigger response = dlpServiceClient.updateJobTrigger(name, jobTrigger, updateMask);
-   * }
-   * }
- * - * @param name Required. Resource name of the project and the triggeredJob, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @param jobTrigger New JobTrigger value. - * @param updateMask Mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger updateJobTrigger( - String name, JobTrigger jobTrigger, FieldMask updateMask) { - UpdateJobTriggerRequest request = - UpdateJobTriggerRequest.newBuilder() - .setName(name) - .setJobTrigger(jobTrigger) - .setUpdateMask(updateMask) - .build(); - return updateJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   UpdateJobTriggerRequest request =
-   *       UpdateJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
-   *           .setJobTrigger(JobTrigger.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   JobTrigger response = dlpServiceClient.updateJobTrigger(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger updateJobTrigger(UpdateJobTriggerRequest request) { - return updateJobTriggerCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   UpdateJobTriggerRequest request =
-   *       UpdateJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
-   *           .setJobTrigger(JobTrigger.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.updateJobTriggerCallable().futureCall(request);
-   *   // Do something.
-   *   JobTrigger response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateJobTriggerCallable() { - return stub.updateJobTriggerCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Inspect hybrid content and store findings to a trigger. The inspection will be processed - * asynchronously. To review the findings monitor the jobs within the trigger. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   JobTriggerName name =
-   *       JobTriggerName.ofProjectLocationJobTriggerName(
-   *           "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]");
-   *   HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the trigger to execute a hybrid inspect on, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HybridInspectResponse hybridInspectJobTrigger(JobTriggerName name) { - HybridInspectJobTriggerRequest request = - HybridInspectJobTriggerRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return hybridInspectJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Inspect hybrid content and store findings to a trigger. The inspection will be processed - * asynchronously. To review the findings monitor the jobs within the trigger. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
-   *   HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the trigger to execute a hybrid inspect on, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HybridInspectResponse hybridInspectJobTrigger(String name) { - HybridInspectJobTriggerRequest request = - HybridInspectJobTriggerRequest.newBuilder().setName(name).build(); - return hybridInspectJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Inspect hybrid content and store findings to a trigger. The inspection will be processed - * asynchronously. To review the findings monitor the jobs within the trigger. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   HybridInspectJobTriggerRequest request =
-   *       HybridInspectJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectLocationJobTriggerName(
-   *                       "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
-   *                   .toString())
-   *           .setHybridItem(HybridContentItem.newBuilder().build())
-   *           .build();
-   *   HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HybridInspectResponse hybridInspectJobTrigger( - HybridInspectJobTriggerRequest request) { - return hybridInspectJobTriggerCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Inspect hybrid content and store findings to a trigger. The inspection will be processed - * asynchronously. To review the findings monitor the jobs within the trigger. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   HybridInspectJobTriggerRequest request =
-   *       HybridInspectJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectLocationJobTriggerName(
-   *                       "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
-   *                   .toString())
-   *           .setHybridItem(HybridContentItem.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.hybridInspectJobTriggerCallable().futureCall(request);
-   *   // Do something.
-   *   HybridInspectResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - hybridInspectJobTriggerCallable() { - return stub.hybridInspectJobTriggerCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
-   *   JobTrigger response = dlpServiceClient.getJobTrigger(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the project and the triggeredJob, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger getJobTrigger(JobTriggerName name) { - GetJobTriggerRequest request = - GetJobTriggerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
-   *   JobTrigger response = dlpServiceClient.getJobTrigger(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the project and the triggeredJob, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger getJobTrigger(String name) { - GetJobTriggerRequest request = GetJobTriggerRequest.newBuilder().setName(name).build(); - return getJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetJobTriggerRequest request =
-   *       GetJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
-   *           .build();
-   *   JobTrigger response = dlpServiceClient.getJobTrigger(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final JobTrigger getJobTrigger(GetJobTriggerRequest request) { - return getJobTriggerCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetJobTriggerRequest request =
-   *       GetJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.getJobTriggerCallable().futureCall(request);
-   *   // Do something.
-   *   JobTrigger response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getJobTriggerCallable() { - return stub.getJobTriggerCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListJobTriggersPagedResponse listJobTriggers(LocationName parent) { - ListJobTriggersRequest request = - ListJobTriggersRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listJobTriggers(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListJobTriggersPagedResponse listJobTriggers(ProjectName parent) { - ListJobTriggersRequest request = - ListJobTriggersRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listJobTriggers(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListJobTriggersPagedResponse listJobTriggers(String parent) { - ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder().setParent(parent).build(); - return listJobTriggers(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListJobTriggersRequest request =
-   *       ListJobTriggersRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .setType(DlpJobType.forNumber(0))
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   for (JobTrigger element : dlpServiceClient.listJobTriggers(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest request) { - return listJobTriggersPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListJobTriggersRequest request =
-   *       ListJobTriggersRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .setType(DlpJobType.forNumber(0))
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.listJobTriggersPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (JobTrigger element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listJobTriggersPagedCallable() { - return stub.listJobTriggersPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListJobTriggersRequest request =
-   *       ListJobTriggersRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setFilter("filter-1274492040")
-   *           .setType(DlpJobType.forNumber(0))
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   while (true) {
-   *     ListJobTriggersResponse response = dlpServiceClient.listJobTriggersCallable().call(request);
-   *     for (JobTrigger element : response.getJobTriggersList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listJobTriggersCallable() { - return stub.listJobTriggersCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
-   *   dlpServiceClient.deleteJobTrigger(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the project and the triggeredJob, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteJobTrigger(JobTriggerName name) { - DeleteJobTriggerRequest request = - DeleteJobTriggerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
-   *   dlpServiceClient.deleteJobTrigger(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the project and the triggeredJob, for example - * `projects/dlp-test-project/jobTriggers/53234423`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteJobTrigger(String name) { - DeleteJobTriggerRequest request = DeleteJobTriggerRequest.newBuilder().setName(name).build(); - deleteJobTrigger(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteJobTriggerRequest request =
-   *       DeleteJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
-   *           .build();
-   *   dlpServiceClient.deleteJobTrigger(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteJobTrigger(DeleteJobTriggerRequest request) { - deleteJobTriggerCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn - * more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteJobTriggerRequest request =
-   *       DeleteJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.deleteJobTriggerCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteJobTriggerCallable() { - return stub.deleteJobTriggerCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the - * trigger event to occur. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ActivateJobTriggerRequest request =
-   *       ActivateJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
-   *           .build();
-   *   DlpJob response = dlpServiceClient.activateJobTrigger(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob activateJobTrigger(ActivateJobTriggerRequest request) { - return activateJobTriggerCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the - * trigger event to occur. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ActivateJobTriggerRequest request =
-   *       ActivateJobTriggerRequest.newBuilder()
-   *           .setName(
-   *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.activateJobTriggerCallable().futureCall(request);
-   *   // Do something.
-   *   DlpJob response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable activateJobTriggerCallable() { - return stub.activateJobTriggerCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new job to inspect storage or calculate risk metrics. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
-   *   DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param inspectJob An inspection job scans a storage repository for InfoTypes. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob createDlpJob(LocationName parent, InspectJobConfig inspectJob) { - CreateDlpJobRequest request = - CreateDlpJobRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInspectJob(inspectJob) - .build(); - return createDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new job to inspect storage or calculate risk metrics. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
-   *   DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param riskJob A risk analysis job calculates re-identification risk metrics for a BigQuery - * table. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob createDlpJob(LocationName parent, RiskAnalysisJobConfig riskJob) { - CreateDlpJobRequest request = - CreateDlpJobRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setRiskJob(riskJob) - .build(); - return createDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new job to inspect storage or calculate risk metrics. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
-   *   DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param inspectJob An inspection job scans a storage repository for InfoTypes. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob createDlpJob(ProjectName parent, InspectJobConfig inspectJob) { - CreateDlpJobRequest request = - CreateDlpJobRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setInspectJob(inspectJob) - .build(); - return createDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new job to inspect storage or calculate risk metrics. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
-   *   DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param riskJob A risk analysis job calculates re-identification risk metrics for a BigQuery - * table. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob createDlpJob(ProjectName parent, RiskAnalysisJobConfig riskJob) { - CreateDlpJobRequest request = - CreateDlpJobRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setRiskJob(riskJob) - .build(); - return createDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new job to inspect storage or calculate risk metrics. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
-   *   DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param inspectJob An inspection job scans a storage repository for InfoTypes. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob createDlpJob(String parent, InspectJobConfig inspectJob) { - CreateDlpJobRequest request = - CreateDlpJobRequest.newBuilder().setParent(parent).setInspectJob(inspectJob).build(); - return createDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new job to inspect storage or calculate risk metrics. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
-   *   DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param riskJob A risk analysis job calculates re-identification risk metrics for a BigQuery - * table. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob createDlpJob(String parent, RiskAnalysisJobConfig riskJob) { - CreateDlpJobRequest request = - CreateDlpJobRequest.newBuilder().setParent(parent).setRiskJob(riskJob).build(); - return createDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new job to inspect storage or calculate risk metrics. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateDlpJobRequest request =
-   *       CreateDlpJobRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setJobId("jobId101296568")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   DlpJob response = dlpServiceClient.createDlpJob(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob createDlpJob(CreateDlpJobRequest request) { - return createDlpJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new job to inspect storage or calculate risk metrics. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will - * automatically choose what detectors to run. By default this may be all types, but may change - * over time as detectors are updated. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateDlpJobRequest request =
-   *       CreateDlpJobRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setJobId("jobId101296568")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.createDlpJobCallable().futureCall(request);
-   *   // Do something.
-   *   DlpJob response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createDlpJobCallable() { - return stub.createDlpJobCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DlpJobs that match the specified filter in the request. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDlpJobsPagedResponse listDlpJobs(LocationName parent) { - ListDlpJobsRequest request = - ListDlpJobsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listDlpJobs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DlpJobs that match the specified filter in the request. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDlpJobsPagedResponse listDlpJobs(ProjectName parent) { - ListDlpJobsRequest request = - ListDlpJobsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listDlpJobs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DlpJobs that match the specified filter in the request. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDlpJobsPagedResponse listDlpJobs(String parent) { - ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder().setParent(parent).build(); - return listDlpJobs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DlpJobs that match the specified filter in the request. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListDlpJobsRequest request =
-   *       ListDlpJobsRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setType(DlpJobType.forNumber(0))
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   for (DlpJob element : dlpServiceClient.listDlpJobs(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request) { - return listDlpJobsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DlpJobs that match the specified filter in the request. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListDlpJobsRequest request =
-   *       ListDlpJobsRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setType(DlpJobType.forNumber(0))
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.listDlpJobsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (DlpJob element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listDlpJobsPagedCallable() { - return stub.listDlpJobsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists DlpJobs that match the specified filter in the request. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListDlpJobsRequest request =
-   *       ListDlpJobsRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setType(DlpJobType.forNumber(0))
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   while (true) {
-   *     ListDlpJobsResponse response = dlpServiceClient.listDlpJobsCallable().call(request);
-   *     for (DlpJob element : response.getJobsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listDlpJobsCallable() { - return stub.listDlpJobsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the latest state of a long-running DlpJob. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
-   *   DlpJob response = dlpServiceClient.getDlpJob(name);
-   * }
-   * }
- * - * @param name Required. The name of the DlpJob resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob getDlpJob(DlpJobName name) { - GetDlpJobRequest request = - GetDlpJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the latest state of a long-running DlpJob. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
-   *   DlpJob response = dlpServiceClient.getDlpJob(name);
-   * }
-   * }
- * - * @param name Required. The name of the DlpJob resource. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob getDlpJob(String name) { - GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(name).build(); - return getDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the latest state of a long-running DlpJob. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetDlpJobRequest request =
-   *       GetDlpJobRequest.newBuilder()
-   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
-   *           .build();
-   *   DlpJob response = dlpServiceClient.getDlpJob(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final DlpJob getDlpJob(GetDlpJobRequest request) { - return getDlpJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the latest state of a long-running DlpJob. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetDlpJobRequest request =
-   *       GetDlpJobRequest.newBuilder()
-   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.getDlpJobCallable().futureCall(request);
-   *   // Do something.
-   *   DlpJob response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getDlpJobCallable() { - return stub.getDlpJobCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be canceled if possible. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
-   *   dlpServiceClient.deleteDlpJob(name);
-   * }
-   * }
- * - * @param name Required. The name of the DlpJob resource to be deleted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteDlpJob(DlpJobName name) { - DeleteDlpJobRequest request = - DeleteDlpJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be canceled if possible. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
-   *   dlpServiceClient.deleteDlpJob(name);
-   * }
-   * }
- * - * @param name Required. The name of the DlpJob resource to be deleted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteDlpJob(String name) { - DeleteDlpJobRequest request = DeleteDlpJobRequest.newBuilder().setName(name).build(); - deleteDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be canceled if possible. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteDlpJobRequest request =
-   *       DeleteDlpJobRequest.newBuilder()
-   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
-   *           .build();
-   *   dlpServiceClient.deleteDlpJob(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteDlpJob(DeleteDlpJobRequest request) { - deleteDlpJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be canceled if possible. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteDlpJobRequest request =
-   *       DeleteDlpJobRequest.newBuilder()
-   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.deleteDlpJobCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteDlpJobCallable() { - return stub.deleteDlpJobCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to - * cancel the DlpJob, but success is not guaranteed. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CancelDlpJobRequest request =
-   *       CancelDlpJobRequest.newBuilder()
-   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
-   *           .build();
-   *   dlpServiceClient.cancelDlpJob(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void cancelDlpJob(CancelDlpJobRequest request) { - cancelDlpJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to - * cancel the DlpJob, but success is not guaranteed. See - * https://cloud.google.com/dlp/docs/inspecting-storage and - * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CancelDlpJobRequest request =
-   *       CancelDlpJobRequest.newBuilder()
-   *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.cancelDlpJobCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable cancelDlpJobCallable() { - return stub.cancelDlpJobCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a pre-built stored infoType to be used for inspection. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
-   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param config Required. Configuration of the storedInfoType to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType createStoredInfoType( - LocationName parent, StoredInfoTypeConfig config) { - CreateStoredInfoTypeRequest request = - CreateStoredInfoTypeRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setConfig(config) - .build(); - return createStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a pre-built stored infoType to be used for inspection. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
-   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
-   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param config Required. Configuration of the storedInfoType to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType createStoredInfoType( - OrganizationLocationName parent, StoredInfoTypeConfig config) { - CreateStoredInfoTypeRequest request = - CreateStoredInfoTypeRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setConfig(config) - .build(); - return createStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a pre-built stored infoType to be used for inspection. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
-   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param config Required. Configuration of the storedInfoType to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType createStoredInfoType( - OrganizationName parent, StoredInfoTypeConfig config) { - CreateStoredInfoTypeRequest request = - CreateStoredInfoTypeRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setConfig(config) - .build(); - return createStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a pre-built stored infoType to be used for inspection. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
-   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param config Required. Configuration of the storedInfoType to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType createStoredInfoType( - ProjectName parent, StoredInfoTypeConfig config) { - CreateStoredInfoTypeRequest request = - CreateStoredInfoTypeRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setConfig(config) - .build(); - return createStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a pre-built stored infoType to be used for inspection. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
-   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> + Organizations scope, location - * specified:<br/> - * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Organizations scope, no location specified (defaults to global):<br/> - * `organizations/`<var>ORG_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @param config Required. Configuration of the storedInfoType to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType createStoredInfoType(String parent, StoredInfoTypeConfig config) { - CreateStoredInfoTypeRequest request = - CreateStoredInfoTypeRequest.newBuilder().setParent(parent).setConfig(config).build(); - return createStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a pre-built stored infoType to be used for inspection. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateStoredInfoTypeRequest request =
-   *       CreateStoredInfoTypeRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
-   *           .setStoredInfoTypeId("storedInfoTypeId-1409591226")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   StoredInfoType response = dlpServiceClient.createStoredInfoType(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType createStoredInfoType(CreateStoredInfoTypeRequest request) { - return createStoredInfoTypeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a pre-built stored infoType to be used for inspection. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   CreateStoredInfoTypeRequest request =
-   *       CreateStoredInfoTypeRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
-   *           .setStoredInfoTypeId("storedInfoTypeId-1409591226")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.createStoredInfoTypeCallable().futureCall(request);
-   *   // Do something.
-   *   StoredInfoType response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createStoredInfoTypeCallable() { - return stub.createStoredInfoTypeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the stored infoType by creating a new version. The existing version will continue to be - * used until the new version is ready. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   StoredInfoTypeName name =
-   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *           "[ORGANIZATION]", "[STORED_INFO_TYPE]");
-   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   StoredInfoType response = dlpServiceClient.updateStoredInfoType(name, config, updateMask);
-   * }
-   * }
- * - * @param name Required. Resource name of organization and storedInfoType to be updated, for - * example `organizations/433245324/storedInfoTypes/432452342` or - * projects/project-id/storedInfoTypes/432452342. - * @param config Updated configuration for the storedInfoType. If not provided, a new version of - * the storedInfoType will be created with the existing configuration. - * @param updateMask Mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType updateStoredInfoType( - StoredInfoTypeName name, StoredInfoTypeConfig config, FieldMask updateMask) { - UpdateStoredInfoTypeRequest request = - UpdateStoredInfoTypeRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setConfig(config) - .setUpdateMask(updateMask) - .build(); - return updateStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the stored infoType by creating a new version. The existing version will continue to be - * used until the new version is ready. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name =
-   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *               "[ORGANIZATION]", "[STORED_INFO_TYPE]")
-   *           .toString();
-   *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   StoredInfoType response = dlpServiceClient.updateStoredInfoType(name, config, updateMask);
-   * }
-   * }
- * - * @param name Required. Resource name of organization and storedInfoType to be updated, for - * example `organizations/433245324/storedInfoTypes/432452342` or - * projects/project-id/storedInfoTypes/432452342. - * @param config Updated configuration for the storedInfoType. If not provided, a new version of - * the storedInfoType will be created with the existing configuration. - * @param updateMask Mask to control which fields get updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType updateStoredInfoType( - String name, StoredInfoTypeConfig config, FieldMask updateMask) { - UpdateStoredInfoTypeRequest request = - UpdateStoredInfoTypeRequest.newBuilder() - .setName(name) - .setConfig(config) - .setUpdateMask(updateMask) - .build(); - return updateStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the stored infoType by creating a new version. The existing version will continue to be - * used until the new version is ready. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   UpdateStoredInfoTypeRequest request =
-   *       UpdateStoredInfoTypeRequest.newBuilder()
-   *           .setName(
-   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
-   *                   .toString())
-   *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   StoredInfoType response = dlpServiceClient.updateStoredInfoType(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType updateStoredInfoType(UpdateStoredInfoTypeRequest request) { - return updateStoredInfoTypeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates the stored infoType by creating a new version. The existing version will continue to be - * used until the new version is ready. See - * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   UpdateStoredInfoTypeRequest request =
-   *       UpdateStoredInfoTypeRequest.newBuilder()
-   *           .setName(
-   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
-   *                   .toString())
-   *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.updateStoredInfoTypeCallable().futureCall(request);
-   *   // Do something.
-   *   StoredInfoType response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateStoredInfoTypeCallable() { - return stub.updateStoredInfoTypeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   StoredInfoTypeName name =
-   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *           "[ORGANIZATION]", "[STORED_INFO_TYPE]");
-   *   StoredInfoType response = dlpServiceClient.getStoredInfoType(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and storedInfoType to be read, for - * example `organizations/433245324/storedInfoTypes/432452342` or - * projects/project-id/storedInfoTypes/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType getStoredInfoType(StoredInfoTypeName name) { - GetStoredInfoTypeRequest request = - GetStoredInfoTypeRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name =
-   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *               "[ORGANIZATION]", "[STORED_INFO_TYPE]")
-   *           .toString();
-   *   StoredInfoType response = dlpServiceClient.getStoredInfoType(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and storedInfoType to be read, for - * example `organizations/433245324/storedInfoTypes/432452342` or - * projects/project-id/storedInfoTypes/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType getStoredInfoType(String name) { - GetStoredInfoTypeRequest request = GetStoredInfoTypeRequest.newBuilder().setName(name).build(); - return getStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetStoredInfoTypeRequest request =
-   *       GetStoredInfoTypeRequest.newBuilder()
-   *           .setName(
-   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
-   *                   .toString())
-   *           .build();
-   *   StoredInfoType response = dlpServiceClient.getStoredInfoType(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final StoredInfoType getStoredInfoType(GetStoredInfoTypeRequest request) { - return getStoredInfoTypeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   GetStoredInfoTypeRequest request =
-   *       GetStoredInfoTypeRequest.newBuilder()
-   *           .setName(
-   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.getStoredInfoTypeCallable().futureCall(request);
-   *   // Do something.
-   *   StoredInfoType response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getStoredInfoTypeCallable() { - return stub.getStoredInfoTypeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(LocationName parent) { - ListStoredInfoTypesRequest request = - ListStoredInfoTypesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listStoredInfoTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
-   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListStoredInfoTypesPagedResponse listStoredInfoTypes( - OrganizationLocationName parent) { - ListStoredInfoTypesRequest request = - ListStoredInfoTypesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listStoredInfoTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(OrganizationName parent) { - ListStoredInfoTypesRequest request = - ListStoredInfoTypesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listStoredInfoTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(ProjectName parent) { - ListStoredInfoTypesRequest request = - ListStoredInfoTypesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listStoredInfoTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
-   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Parent resource name. - *

The format of this value varies depending on the scope of the request (project or - * organization) and whether you have [specified a processing - * location](https://cloud.google.com/dlp/docs/specifying-location): - *

+ Projects scope, location specified:<br/> - * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var> - * + Projects scope, no location specified (defaults to global):<br/> - * `projects/`<var>PROJECT_ID</var> - *

The following example `parent` string specifies a parent project with the identifier - * `example-project`, and specifies the `europe-west3` location for processing data: - *

parent=projects/example-project/locations/europe-west3 - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(String parent) { - ListStoredInfoTypesRequest request = - ListStoredInfoTypesRequest.newBuilder().setParent(parent).build(); - return listStoredInfoTypes(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListStoredInfoTypesRequest request =
-   *       ListStoredInfoTypesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListStoredInfoTypesPagedResponse listStoredInfoTypes( - ListStoredInfoTypesRequest request) { - return listStoredInfoTypesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListStoredInfoTypesRequest request =
-   *       ListStoredInfoTypesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.listStoredInfoTypesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (StoredInfoType element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listStoredInfoTypesPagedCallable() { - return stub.listStoredInfoTypesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   ListStoredInfoTypesRequest request =
-   *       ListStoredInfoTypesRequest.newBuilder()
-   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setLocationId("locationId1541836720")
-   *           .build();
-   *   while (true) {
-   *     ListStoredInfoTypesResponse response =
-   *         dlpServiceClient.listStoredInfoTypesCallable().call(request);
-   *     for (StoredInfoType element : response.getStoredInfoTypesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listStoredInfoTypesCallable() { - return stub.listStoredInfoTypesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   StoredInfoTypeName name =
-   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *           "[ORGANIZATION]", "[STORED_INFO_TYPE]");
-   *   dlpServiceClient.deleteStoredInfoType(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and storedInfoType to be deleted, for - * example `organizations/433245324/storedInfoTypes/432452342` or - * projects/project-id/storedInfoTypes/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteStoredInfoType(StoredInfoTypeName name) { - DeleteStoredInfoTypeRequest request = - DeleteStoredInfoTypeRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name =
-   *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *               "[ORGANIZATION]", "[STORED_INFO_TYPE]")
-   *           .toString();
-   *   dlpServiceClient.deleteStoredInfoType(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the organization and storedInfoType to be deleted, for - * example `organizations/433245324/storedInfoTypes/432452342` or - * projects/project-id/storedInfoTypes/432452342. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteStoredInfoType(String name) { - DeleteStoredInfoTypeRequest request = - DeleteStoredInfoTypeRequest.newBuilder().setName(name).build(); - deleteStoredInfoType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteStoredInfoTypeRequest request =
-   *       DeleteStoredInfoTypeRequest.newBuilder()
-   *           .setName(
-   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
-   *                   .toString())
-   *           .build();
-   *   dlpServiceClient.deleteStoredInfoType(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteStoredInfoType(DeleteStoredInfoTypeRequest request) { - deleteStoredInfoTypeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - * learn more. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DeleteStoredInfoTypeRequest request =
-   *       DeleteStoredInfoTypeRequest.newBuilder()
-   *           .setName(
-   *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
-   *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.deleteStoredInfoTypeCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteStoredInfoTypeCallable() { - return stub.deleteStoredInfoTypeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Inspect hybrid content and store findings to a job. To review the findings, inspect the job. - * Inspection will occur asynchronously. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   DlpJobName name =
-   *       DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]");
-   *   HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the job to execute a hybrid inspect on, for example - * `projects/dlp-test-project/dlpJob/53234423`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HybridInspectResponse hybridInspectDlpJob(DlpJobName name) { - HybridInspectDlpJobRequest request = - HybridInspectDlpJobRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return hybridInspectDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Inspect hybrid content and store findings to a job. To review the findings, inspect the job. - * Inspection will occur asynchronously. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
-   *   HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
-   * }
-   * }
- * - * @param name Required. Resource name of the job to execute a hybrid inspect on, for example - * `projects/dlp-test-project/dlpJob/53234423`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HybridInspectResponse hybridInspectDlpJob(String name) { - HybridInspectDlpJobRequest request = - HybridInspectDlpJobRequest.newBuilder().setName(name).build(); - return hybridInspectDlpJob(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Inspect hybrid content and store findings to a job. To review the findings, inspect the job. - * Inspection will occur asynchronously. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   HybridInspectDlpJobRequest request =
-   *       HybridInspectDlpJobRequest.newBuilder()
-   *           .setName(
-   *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
-   *                   .toString())
-   *           .setHybridItem(HybridContentItem.newBuilder().build())
-   *           .build();
-   *   HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final HybridInspectResponse hybridInspectDlpJob(HybridInspectDlpJobRequest request) { - return hybridInspectDlpJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Inspect hybrid content and store findings to a job. To review the findings, inspect the job. - * Inspection will occur asynchronously. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   HybridInspectDlpJobRequest request =
-   *       HybridInspectDlpJobRequest.newBuilder()
-   *           .setName(
-   *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
-   *                   .toString())
-   *           .setHybridItem(HybridContentItem.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       dlpServiceClient.hybridInspectDlpJobCallable().futureCall(request);
-   *   // Do something.
-   *   HybridInspectResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - hybridInspectDlpJobCallable() { - return stub.hybridInspectDlpJobCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled - * actions that have not yet run. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   FinishDlpJobRequest request =
-   *       FinishDlpJobRequest.newBuilder()
-   *           .setName(
-   *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
-   *                   .toString())
-   *           .build();
-   *   dlpServiceClient.finishDlpJob(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void finishDlpJob(FinishDlpJobRequest request) { - finishDlpJobCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled - * actions that have not yet run. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
-   * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
-   *   FinishDlpJobRequest request =
-   *       FinishDlpJobRequest.newBuilder()
-   *           .setName(
-   *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future = dlpServiceClient.finishDlpJobCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable finishDlpJobCallable() { - return stub.finishDlpJobCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListInspectTemplatesPagedResponse - extends AbstractPagedListResponse< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate, - ListInspectTemplatesPage, ListInspectTemplatesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListInspectTemplatesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListInspectTemplatesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListInspectTemplatesPagedResponse(ListInspectTemplatesPage page) { - super(page, ListInspectTemplatesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListInspectTemplatesPage - extends AbstractPage< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate, - ListInspectTemplatesPage> { - - private ListInspectTemplatesPage( - PageContext - context, - ListInspectTemplatesResponse response) { - super(context, response); - } - - private static ListInspectTemplatesPage createEmptyPage() { - return new ListInspectTemplatesPage(null, null); - } - - @Override - protected ListInspectTemplatesPage createPage( - PageContext - context, - ListInspectTemplatesResponse response) { - return new ListInspectTemplatesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListInspectTemplatesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate, - ListInspectTemplatesPage, ListInspectTemplatesFixedSizeCollection> { - - private ListInspectTemplatesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListInspectTemplatesFixedSizeCollection createEmptyCollection() { - return new ListInspectTemplatesFixedSizeCollection(null, 0); - } - - @Override - protected ListInspectTemplatesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListInspectTemplatesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListDeidentifyTemplatesPagedResponse - extends AbstractPagedListResponse< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate, - ListDeidentifyTemplatesPage, ListDeidentifyTemplatesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListDeidentifyTemplatesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListDeidentifyTemplatesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListDeidentifyTemplatesPagedResponse(ListDeidentifyTemplatesPage page) { - super(page, ListDeidentifyTemplatesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListDeidentifyTemplatesPage - extends AbstractPage< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate, - ListDeidentifyTemplatesPage> { - - private ListDeidentifyTemplatesPage( - PageContext< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> - context, - ListDeidentifyTemplatesResponse response) { - super(context, response); - } - - private static ListDeidentifyTemplatesPage createEmptyPage() { - return new ListDeidentifyTemplatesPage(null, null); - } - - @Override - protected ListDeidentifyTemplatesPage createPage( - PageContext< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> - context, - ListDeidentifyTemplatesResponse response) { - return new ListDeidentifyTemplatesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListDeidentifyTemplatesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate, - ListDeidentifyTemplatesPage, ListDeidentifyTemplatesFixedSizeCollection> { - - private ListDeidentifyTemplatesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListDeidentifyTemplatesFixedSizeCollection createEmptyCollection() { - return new ListDeidentifyTemplatesFixedSizeCollection(null, 0); - } - - @Override - protected ListDeidentifyTemplatesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListDeidentifyTemplatesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListJobTriggersPagedResponse - extends AbstractPagedListResponse< - ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger, ListJobTriggersPage, - ListJobTriggersFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListJobTriggersPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListJobTriggersPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListJobTriggersPagedResponse(ListJobTriggersPage page) { - super(page, ListJobTriggersFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListJobTriggersPage - extends AbstractPage< - ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger, ListJobTriggersPage> { - - private ListJobTriggersPage( - PageContext context, - ListJobTriggersResponse response) { - super(context, response); - } - - private static ListJobTriggersPage createEmptyPage() { - return new ListJobTriggersPage(null, null); - } - - @Override - protected ListJobTriggersPage createPage( - PageContext context, - ListJobTriggersResponse response) { - return new ListJobTriggersPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListJobTriggersFixedSizeCollection - extends AbstractFixedSizeCollection< - ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger, ListJobTriggersPage, - ListJobTriggersFixedSizeCollection> { - - private ListJobTriggersFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListJobTriggersFixedSizeCollection createEmptyCollection() { - return new ListJobTriggersFixedSizeCollection(null, 0); - } - - @Override - protected ListJobTriggersFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListJobTriggersFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListDlpJobsPagedResponse - extends AbstractPagedListResponse< - ListDlpJobsRequest, ListDlpJobsResponse, DlpJob, ListDlpJobsPage, - ListDlpJobsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListDlpJobsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListDlpJobsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListDlpJobsPagedResponse(ListDlpJobsPage page) { - super(page, ListDlpJobsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListDlpJobsPage - extends AbstractPage { - - private ListDlpJobsPage( - PageContext context, - ListDlpJobsResponse response) { - super(context, response); - } - - private static ListDlpJobsPage createEmptyPage() { - return new ListDlpJobsPage(null, null); - } - - @Override - protected ListDlpJobsPage createPage( - PageContext context, - ListDlpJobsResponse response) { - return new ListDlpJobsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListDlpJobsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListDlpJobsRequest, ListDlpJobsResponse, DlpJob, ListDlpJobsPage, - ListDlpJobsFixedSizeCollection> { - - private ListDlpJobsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListDlpJobsFixedSizeCollection createEmptyCollection() { - return new ListDlpJobsFixedSizeCollection(null, 0); - } - - @Override - protected ListDlpJobsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListDlpJobsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListStoredInfoTypesPagedResponse - extends AbstractPagedListResponse< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType, - ListStoredInfoTypesPage, ListStoredInfoTypesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListStoredInfoTypesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListStoredInfoTypesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListStoredInfoTypesPagedResponse(ListStoredInfoTypesPage page) { - super(page, ListStoredInfoTypesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListStoredInfoTypesPage - extends AbstractPage< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType, - ListStoredInfoTypesPage> { - - private ListStoredInfoTypesPage( - PageContext - context, - ListStoredInfoTypesResponse response) { - super(context, response); - } - - private static ListStoredInfoTypesPage createEmptyPage() { - return new ListStoredInfoTypesPage(null, null); - } - - @Override - protected ListStoredInfoTypesPage createPage( - PageContext - context, - ListStoredInfoTypesResponse response) { - return new ListStoredInfoTypesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListStoredInfoTypesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType, - ListStoredInfoTypesPage, ListStoredInfoTypesFixedSizeCollection> { - - private ListStoredInfoTypesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListStoredInfoTypesFixedSizeCollection createEmptyCollection() { - return new ListStoredInfoTypesFixedSizeCollection(null, 0); - } - - @Override - protected ListStoredInfoTypesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListStoredInfoTypesFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java deleted file mode 100644 index 179b7a8a2539..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java +++ /dev/null @@ -1,648 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2; - -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.dlp.v2.stub.DlpServiceStubSettings; -import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; -import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; -import com.google.privacy.dlp.v2.CreateJobTriggerRequest; -import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.DeidentifyTemplate; -import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.DeleteDlpJobRequest; -import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; -import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; -import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.FinishDlpJobRequest; -import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.GetInspectTemplateRequest; -import com.google.privacy.dlp.v2.GetJobTriggerRequest; -import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; -import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; -import com.google.privacy.dlp.v2.HybridInspectResponse; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; -import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ListDlpJobsResponse; -import com.google.privacy.dlp.v2.ListInfoTypesRequest; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ListJobTriggersResponse; -import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; -import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.StoredInfoType; -import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; -import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; -import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DlpServiceClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (dlp.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of inspectContent to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * DlpServiceSettings.Builder dlpServiceSettingsBuilder = DlpServiceSettings.newBuilder();
- * dlpServiceSettingsBuilder
- *     .inspectContentSettings()
- *     .setRetrySettings(
- *         dlpServiceSettingsBuilder
- *             .inspectContentSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * DlpServiceSettings dlpServiceSettings = dlpServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class DlpServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to inspectContent. */ - public UnaryCallSettings inspectContentSettings() { - return ((DlpServiceStubSettings) getStubSettings()).inspectContentSettings(); - } - - /** Returns the object with the settings used for calls to redactImage. */ - public UnaryCallSettings redactImageSettings() { - return ((DlpServiceStubSettings) getStubSettings()).redactImageSettings(); - } - - /** Returns the object with the settings used for calls to deidentifyContent. */ - public UnaryCallSettings - deidentifyContentSettings() { - return ((DlpServiceStubSettings) getStubSettings()).deidentifyContentSettings(); - } - - /** Returns the object with the settings used for calls to reidentifyContent. */ - public UnaryCallSettings - reidentifyContentSettings() { - return ((DlpServiceStubSettings) getStubSettings()).reidentifyContentSettings(); - } - - /** Returns the object with the settings used for calls to listInfoTypes. */ - public UnaryCallSettings listInfoTypesSettings() { - return ((DlpServiceStubSettings) getStubSettings()).listInfoTypesSettings(); - } - - /** Returns the object with the settings used for calls to createInspectTemplate. */ - public UnaryCallSettings - createInspectTemplateSettings() { - return ((DlpServiceStubSettings) getStubSettings()).createInspectTemplateSettings(); - } - - /** Returns the object with the settings used for calls to updateInspectTemplate. */ - public UnaryCallSettings - updateInspectTemplateSettings() { - return ((DlpServiceStubSettings) getStubSettings()).updateInspectTemplateSettings(); - } - - /** Returns the object with the settings used for calls to getInspectTemplate. */ - public UnaryCallSettings - getInspectTemplateSettings() { - return ((DlpServiceStubSettings) getStubSettings()).getInspectTemplateSettings(); - } - - /** Returns the object with the settings used for calls to listInspectTemplates. */ - public PagedCallSettings< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, - ListInspectTemplatesPagedResponse> - listInspectTemplatesSettings() { - return ((DlpServiceStubSettings) getStubSettings()).listInspectTemplatesSettings(); - } - - /** Returns the object with the settings used for calls to deleteInspectTemplate. */ - public UnaryCallSettings deleteInspectTemplateSettings() { - return ((DlpServiceStubSettings) getStubSettings()).deleteInspectTemplateSettings(); - } - - /** Returns the object with the settings used for calls to createDeidentifyTemplate. */ - public UnaryCallSettings - createDeidentifyTemplateSettings() { - return ((DlpServiceStubSettings) getStubSettings()).createDeidentifyTemplateSettings(); - } - - /** Returns the object with the settings used for calls to updateDeidentifyTemplate. */ - public UnaryCallSettings - updateDeidentifyTemplateSettings() { - return ((DlpServiceStubSettings) getStubSettings()).updateDeidentifyTemplateSettings(); - } - - /** Returns the object with the settings used for calls to getDeidentifyTemplate. */ - public UnaryCallSettings - getDeidentifyTemplateSettings() { - return ((DlpServiceStubSettings) getStubSettings()).getDeidentifyTemplateSettings(); - } - - /** Returns the object with the settings used for calls to listDeidentifyTemplates. */ - public PagedCallSettings< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - ListDeidentifyTemplatesPagedResponse> - listDeidentifyTemplatesSettings() { - return ((DlpServiceStubSettings) getStubSettings()).listDeidentifyTemplatesSettings(); - } - - /** Returns the object with the settings used for calls to deleteDeidentifyTemplate. */ - public UnaryCallSettings - deleteDeidentifyTemplateSettings() { - return ((DlpServiceStubSettings) getStubSettings()).deleteDeidentifyTemplateSettings(); - } - - /** Returns the object with the settings used for calls to createJobTrigger. */ - public UnaryCallSettings createJobTriggerSettings() { - return ((DlpServiceStubSettings) getStubSettings()).createJobTriggerSettings(); - } - - /** Returns the object with the settings used for calls to updateJobTrigger. */ - public UnaryCallSettings updateJobTriggerSettings() { - return ((DlpServiceStubSettings) getStubSettings()).updateJobTriggerSettings(); - } - - /** Returns the object with the settings used for calls to hybridInspectJobTrigger. */ - public UnaryCallSettings - hybridInspectJobTriggerSettings() { - return ((DlpServiceStubSettings) getStubSettings()).hybridInspectJobTriggerSettings(); - } - - /** Returns the object with the settings used for calls to getJobTrigger. */ - public UnaryCallSettings getJobTriggerSettings() { - return ((DlpServiceStubSettings) getStubSettings()).getJobTriggerSettings(); - } - - /** Returns the object with the settings used for calls to listJobTriggers. */ - public PagedCallSettings< - ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> - listJobTriggersSettings() { - return ((DlpServiceStubSettings) getStubSettings()).listJobTriggersSettings(); - } - - /** Returns the object with the settings used for calls to deleteJobTrigger. */ - public UnaryCallSettings deleteJobTriggerSettings() { - return ((DlpServiceStubSettings) getStubSettings()).deleteJobTriggerSettings(); - } - - /** Returns the object with the settings used for calls to activateJobTrigger. */ - public UnaryCallSettings activateJobTriggerSettings() { - return ((DlpServiceStubSettings) getStubSettings()).activateJobTriggerSettings(); - } - - /** Returns the object with the settings used for calls to createDlpJob. */ - public UnaryCallSettings createDlpJobSettings() { - return ((DlpServiceStubSettings) getStubSettings()).createDlpJobSettings(); - } - - /** Returns the object with the settings used for calls to listDlpJobs. */ - public PagedCallSettings - listDlpJobsSettings() { - return ((DlpServiceStubSettings) getStubSettings()).listDlpJobsSettings(); - } - - /** Returns the object with the settings used for calls to getDlpJob. */ - public UnaryCallSettings getDlpJobSettings() { - return ((DlpServiceStubSettings) getStubSettings()).getDlpJobSettings(); - } - - /** Returns the object with the settings used for calls to deleteDlpJob. */ - public UnaryCallSettings deleteDlpJobSettings() { - return ((DlpServiceStubSettings) getStubSettings()).deleteDlpJobSettings(); - } - - /** Returns the object with the settings used for calls to cancelDlpJob. */ - public UnaryCallSettings cancelDlpJobSettings() { - return ((DlpServiceStubSettings) getStubSettings()).cancelDlpJobSettings(); - } - - /** Returns the object with the settings used for calls to createStoredInfoType. */ - public UnaryCallSettings - createStoredInfoTypeSettings() { - return ((DlpServiceStubSettings) getStubSettings()).createStoredInfoTypeSettings(); - } - - /** Returns the object with the settings used for calls to updateStoredInfoType. */ - public UnaryCallSettings - updateStoredInfoTypeSettings() { - return ((DlpServiceStubSettings) getStubSettings()).updateStoredInfoTypeSettings(); - } - - /** Returns the object with the settings used for calls to getStoredInfoType. */ - public UnaryCallSettings getStoredInfoTypeSettings() { - return ((DlpServiceStubSettings) getStubSettings()).getStoredInfoTypeSettings(); - } - - /** Returns the object with the settings used for calls to listStoredInfoTypes. */ - public PagedCallSettings< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, ListStoredInfoTypesPagedResponse> - listStoredInfoTypesSettings() { - return ((DlpServiceStubSettings) getStubSettings()).listStoredInfoTypesSettings(); - } - - /** Returns the object with the settings used for calls to deleteStoredInfoType. */ - public UnaryCallSettings deleteStoredInfoTypeSettings() { - return ((DlpServiceStubSettings) getStubSettings()).deleteStoredInfoTypeSettings(); - } - - /** Returns the object with the settings used for calls to hybridInspectDlpJob. */ - public UnaryCallSettings - hybridInspectDlpJobSettings() { - return ((DlpServiceStubSettings) getStubSettings()).hybridInspectDlpJobSettings(); - } - - /** Returns the object with the settings used for calls to finishDlpJob. */ - public UnaryCallSettings finishDlpJobSettings() { - return ((DlpServiceStubSettings) getStubSettings()).finishDlpJobSettings(); - } - - public static final DlpServiceSettings create(DlpServiceStubSettings stub) throws IOException { - return new DlpServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return DlpServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return DlpServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DlpServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return DlpServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return DlpServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return DlpServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return DlpServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DlpServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DlpServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for DlpServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(DlpServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(DlpServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(DlpServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(DlpServiceStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(DlpServiceStubSettings.newHttpJsonBuilder()); - } - - public DlpServiceStubSettings.Builder getStubSettingsBuilder() { - return ((DlpServiceStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to inspectContent. */ - public UnaryCallSettings.Builder - inspectContentSettings() { - return getStubSettingsBuilder().inspectContentSettings(); - } - - /** Returns the builder for the settings used for calls to redactImage. */ - public UnaryCallSettings.Builder - redactImageSettings() { - return getStubSettingsBuilder().redactImageSettings(); - } - - /** Returns the builder for the settings used for calls to deidentifyContent. */ - public UnaryCallSettings.Builder - deidentifyContentSettings() { - return getStubSettingsBuilder().deidentifyContentSettings(); - } - - /** Returns the builder for the settings used for calls to reidentifyContent. */ - public UnaryCallSettings.Builder - reidentifyContentSettings() { - return getStubSettingsBuilder().reidentifyContentSettings(); - } - - /** Returns the builder for the settings used for calls to listInfoTypes. */ - public UnaryCallSettings.Builder - listInfoTypesSettings() { - return getStubSettingsBuilder().listInfoTypesSettings(); - } - - /** Returns the builder for the settings used for calls to createInspectTemplate. */ - public UnaryCallSettings.Builder - createInspectTemplateSettings() { - return getStubSettingsBuilder().createInspectTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to updateInspectTemplate. */ - public UnaryCallSettings.Builder - updateInspectTemplateSettings() { - return getStubSettingsBuilder().updateInspectTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to getInspectTemplate. */ - public UnaryCallSettings.Builder - getInspectTemplateSettings() { - return getStubSettingsBuilder().getInspectTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to listInspectTemplates. */ - public PagedCallSettings.Builder< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, - ListInspectTemplatesPagedResponse> - listInspectTemplatesSettings() { - return getStubSettingsBuilder().listInspectTemplatesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteInspectTemplate. */ - public UnaryCallSettings.Builder - deleteInspectTemplateSettings() { - return getStubSettingsBuilder().deleteInspectTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to createDeidentifyTemplate. */ - public UnaryCallSettings.Builder - createDeidentifyTemplateSettings() { - return getStubSettingsBuilder().createDeidentifyTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to updateDeidentifyTemplate. */ - public UnaryCallSettings.Builder - updateDeidentifyTemplateSettings() { - return getStubSettingsBuilder().updateDeidentifyTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to getDeidentifyTemplate. */ - public UnaryCallSettings.Builder - getDeidentifyTemplateSettings() { - return getStubSettingsBuilder().getDeidentifyTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to listDeidentifyTemplates. */ - public PagedCallSettings.Builder< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - ListDeidentifyTemplatesPagedResponse> - listDeidentifyTemplatesSettings() { - return getStubSettingsBuilder().listDeidentifyTemplatesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteDeidentifyTemplate. */ - public UnaryCallSettings.Builder - deleteDeidentifyTemplateSettings() { - return getStubSettingsBuilder().deleteDeidentifyTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to createJobTrigger. */ - public UnaryCallSettings.Builder - createJobTriggerSettings() { - return getStubSettingsBuilder().createJobTriggerSettings(); - } - - /** Returns the builder for the settings used for calls to updateJobTrigger. */ - public UnaryCallSettings.Builder - updateJobTriggerSettings() { - return getStubSettingsBuilder().updateJobTriggerSettings(); - } - - /** Returns the builder for the settings used for calls to hybridInspectJobTrigger. */ - public UnaryCallSettings.Builder - hybridInspectJobTriggerSettings() { - return getStubSettingsBuilder().hybridInspectJobTriggerSettings(); - } - - /** Returns the builder for the settings used for calls to getJobTrigger. */ - public UnaryCallSettings.Builder getJobTriggerSettings() { - return getStubSettingsBuilder().getJobTriggerSettings(); - } - - /** Returns the builder for the settings used for calls to listJobTriggers. */ - public PagedCallSettings.Builder< - ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> - listJobTriggersSettings() { - return getStubSettingsBuilder().listJobTriggersSettings(); - } - - /** Returns the builder for the settings used for calls to deleteJobTrigger. */ - public UnaryCallSettings.Builder deleteJobTriggerSettings() { - return getStubSettingsBuilder().deleteJobTriggerSettings(); - } - - /** Returns the builder for the settings used for calls to activateJobTrigger. */ - public UnaryCallSettings.Builder - activateJobTriggerSettings() { - return getStubSettingsBuilder().activateJobTriggerSettings(); - } - - /** Returns the builder for the settings used for calls to createDlpJob. */ - public UnaryCallSettings.Builder createDlpJobSettings() { - return getStubSettingsBuilder().createDlpJobSettings(); - } - - /** Returns the builder for the settings used for calls to listDlpJobs. */ - public PagedCallSettings.Builder< - ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse> - listDlpJobsSettings() { - return getStubSettingsBuilder().listDlpJobsSettings(); - } - - /** Returns the builder for the settings used for calls to getDlpJob. */ - public UnaryCallSettings.Builder getDlpJobSettings() { - return getStubSettingsBuilder().getDlpJobSettings(); - } - - /** Returns the builder for the settings used for calls to deleteDlpJob. */ - public UnaryCallSettings.Builder deleteDlpJobSettings() { - return getStubSettingsBuilder().deleteDlpJobSettings(); - } - - /** Returns the builder for the settings used for calls to cancelDlpJob. */ - public UnaryCallSettings.Builder cancelDlpJobSettings() { - return getStubSettingsBuilder().cancelDlpJobSettings(); - } - - /** Returns the builder for the settings used for calls to createStoredInfoType. */ - public UnaryCallSettings.Builder - createStoredInfoTypeSettings() { - return getStubSettingsBuilder().createStoredInfoTypeSettings(); - } - - /** Returns the builder for the settings used for calls to updateStoredInfoType. */ - public UnaryCallSettings.Builder - updateStoredInfoTypeSettings() { - return getStubSettingsBuilder().updateStoredInfoTypeSettings(); - } - - /** Returns the builder for the settings used for calls to getStoredInfoType. */ - public UnaryCallSettings.Builder - getStoredInfoTypeSettings() { - return getStubSettingsBuilder().getStoredInfoTypeSettings(); - } - - /** Returns the builder for the settings used for calls to listStoredInfoTypes. */ - public PagedCallSettings.Builder< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, - ListStoredInfoTypesPagedResponse> - listStoredInfoTypesSettings() { - return getStubSettingsBuilder().listStoredInfoTypesSettings(); - } - - /** Returns the builder for the settings used for calls to deleteStoredInfoType. */ - public UnaryCallSettings.Builder - deleteStoredInfoTypeSettings() { - return getStubSettingsBuilder().deleteStoredInfoTypeSettings(); - } - - /** Returns the builder for the settings used for calls to hybridInspectDlpJob. */ - public UnaryCallSettings.Builder - hybridInspectDlpJobSettings() { - return getStubSettingsBuilder().hybridInspectDlpJobSettings(); - } - - /** Returns the builder for the settings used for calls to finishDlpJob. */ - public UnaryCallSettings.Builder finishDlpJobSettings() { - return getStubSettingsBuilder().finishDlpJobSettings(); - } - - @Override - public DlpServiceSettings build() throws IOException { - return new DlpServiceSettings(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/gapic_metadata.json b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/gapic_metadata.json deleted file mode 100644 index 3afc787269d5..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/gapic_metadata.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.privacy.dlp.v2", - "libraryPackage": "com.google.cloud.dlp.v2", - "services": { - "DlpService": { - "clients": { - "grpc": { - "libraryClient": "DlpServiceClient", - "rpcs": { - "ActivateJobTrigger": { - "methods": ["activateJobTrigger", "activateJobTriggerCallable"] - }, - "CancelDlpJob": { - "methods": ["cancelDlpJob", "cancelDlpJobCallable"] - }, - "CreateDeidentifyTemplate": { - "methods": ["createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplate", "createDeidentifyTemplateCallable"] - }, - "CreateDlpJob": { - "methods": ["createDlpJob", "createDlpJob", "createDlpJob", "createDlpJob", "createDlpJob", "createDlpJob", "createDlpJob", "createDlpJobCallable"] - }, - "CreateInspectTemplate": { - "methods": ["createInspectTemplate", "createInspectTemplate", "createInspectTemplate", "createInspectTemplate", "createInspectTemplate", "createInspectTemplate", "createInspectTemplateCallable"] - }, - "CreateJobTrigger": { - "methods": ["createJobTrigger", "createJobTrigger", "createJobTrigger", "createJobTrigger", "createJobTriggerCallable"] - }, - "CreateStoredInfoType": { - "methods": ["createStoredInfoType", "createStoredInfoType", "createStoredInfoType", "createStoredInfoType", "createStoredInfoType", "createStoredInfoType", "createStoredInfoTypeCallable"] - }, - "DeidentifyContent": { - "methods": ["deidentifyContent", "deidentifyContentCallable"] - }, - "DeleteDeidentifyTemplate": { - "methods": ["deleteDeidentifyTemplate", "deleteDeidentifyTemplate", "deleteDeidentifyTemplate", "deleteDeidentifyTemplateCallable"] - }, - "DeleteDlpJob": { - "methods": ["deleteDlpJob", "deleteDlpJob", "deleteDlpJob", "deleteDlpJobCallable"] - }, - "DeleteInspectTemplate": { - "methods": ["deleteInspectTemplate", "deleteInspectTemplate", "deleteInspectTemplate", "deleteInspectTemplateCallable"] - }, - "DeleteJobTrigger": { - "methods": ["deleteJobTrigger", "deleteJobTrigger", "deleteJobTrigger", "deleteJobTriggerCallable"] - }, - "DeleteStoredInfoType": { - "methods": ["deleteStoredInfoType", "deleteStoredInfoType", "deleteStoredInfoType", "deleteStoredInfoTypeCallable"] - }, - "FinishDlpJob": { - "methods": ["finishDlpJob", "finishDlpJobCallable"] - }, - "GetDeidentifyTemplate": { - "methods": ["getDeidentifyTemplate", "getDeidentifyTemplate", "getDeidentifyTemplate", "getDeidentifyTemplateCallable"] - }, - "GetDlpJob": { - "methods": ["getDlpJob", "getDlpJob", "getDlpJob", "getDlpJobCallable"] - }, - "GetInspectTemplate": { - "methods": ["getInspectTemplate", "getInspectTemplate", "getInspectTemplate", "getInspectTemplateCallable"] - }, - "GetJobTrigger": { - "methods": ["getJobTrigger", "getJobTrigger", "getJobTrigger", "getJobTriggerCallable"] - }, - "GetStoredInfoType": { - "methods": ["getStoredInfoType", "getStoredInfoType", "getStoredInfoType", "getStoredInfoTypeCallable"] - }, - "HybridInspectDlpJob": { - "methods": ["hybridInspectDlpJob", "hybridInspectDlpJob", "hybridInspectDlpJob", "hybridInspectDlpJobCallable"] - }, - "HybridInspectJobTrigger": { - "methods": ["hybridInspectJobTrigger", "hybridInspectJobTrigger", "hybridInspectJobTrigger", "hybridInspectJobTriggerCallable"] - }, - "InspectContent": { - "methods": ["inspectContent", "inspectContentCallable"] - }, - "ListDeidentifyTemplates": { - "methods": ["listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplates", "listDeidentifyTemplatesPagedCallable", "listDeidentifyTemplatesCallable"] - }, - "ListDlpJobs": { - "methods": ["listDlpJobs", "listDlpJobs", "listDlpJobs", "listDlpJobs", "listDlpJobsPagedCallable", "listDlpJobsCallable"] - }, - "ListInfoTypes": { - "methods": ["listInfoTypes", "listInfoTypes", "listInfoTypesCallable"] - }, - "ListInspectTemplates": { - "methods": ["listInspectTemplates", "listInspectTemplates", "listInspectTemplates", "listInspectTemplates", "listInspectTemplates", "listInspectTemplates", "listInspectTemplatesPagedCallable", "listInspectTemplatesCallable"] - }, - "ListJobTriggers": { - "methods": ["listJobTriggers", "listJobTriggers", "listJobTriggers", "listJobTriggers", "listJobTriggersPagedCallable", "listJobTriggersCallable"] - }, - "ListStoredInfoTypes": { - "methods": ["listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypes", "listStoredInfoTypesPagedCallable", "listStoredInfoTypesCallable"] - }, - "RedactImage": { - "methods": ["redactImage", "redactImageCallable"] - }, - "ReidentifyContent": { - "methods": ["reidentifyContent", "reidentifyContentCallable"] - }, - "UpdateDeidentifyTemplate": { - "methods": ["updateDeidentifyTemplate", "updateDeidentifyTemplate", "updateDeidentifyTemplate", "updateDeidentifyTemplateCallable"] - }, - "UpdateInspectTemplate": { - "methods": ["updateInspectTemplate", "updateInspectTemplate", "updateInspectTemplate", "updateInspectTemplateCallable"] - }, - "UpdateJobTrigger": { - "methods": ["updateJobTrigger", "updateJobTrigger", "updateJobTrigger", "updateJobTriggerCallable"] - }, - "UpdateStoredInfoType": { - "methods": ["updateStoredInfoType", "updateStoredInfoType", "updateStoredInfoType", "updateStoredInfoTypeCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java deleted file mode 100644 index ed4f1afe278a..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= DlpServiceClient ======================= - * - *

Service Description: The Cloud Data Loss Prevention (DLP) API is a service that allows clients - * to detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive - * data in user-supplied, unstructured data streams, like text blocks or images. The service also - * includes methods for sensitive data redaction and scheduling of data scans on Google Cloud - * Platform based data sets. - * - *

To learn more about concepts and find how-to guides see https://cloud.google.com/dlp/docs/. - * - *

Sample for DlpServiceClient: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- *   InspectContentRequest request =
- *       InspectContentRequest.newBuilder()
- *           .setParent(ProjectName.of("[PROJECT]").toString())
- *           .setInspectConfig(InspectConfig.newBuilder().build())
- *           .setItem(ContentItem.newBuilder().build())
- *           .setInspectTemplateName("inspectTemplateName1828857433")
- *           .setLocationId("locationId1541836720")
- *           .build();
- *   InspectContentResponse response = dlpServiceClient.inspectContent(request);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.dlp.v2; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java deleted file mode 100644 index 5b8b410748f8..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2.stub; - -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; -import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; -import com.google.privacy.dlp.v2.CreateJobTriggerRequest; -import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.DeidentifyTemplate; -import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.DeleteDlpJobRequest; -import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; -import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; -import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.FinishDlpJobRequest; -import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.GetInspectTemplateRequest; -import com.google.privacy.dlp.v2.GetJobTriggerRequest; -import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; -import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; -import com.google.privacy.dlp.v2.HybridInspectResponse; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; -import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ListDlpJobsResponse; -import com.google.privacy.dlp.v2.ListInfoTypesRequest; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ListJobTriggersResponse; -import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; -import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.StoredInfoType; -import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; -import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; -import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the DlpService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class DlpServiceStub implements BackgroundResource { - - public UnaryCallable inspectContentCallable() { - throw new UnsupportedOperationException("Not implemented: inspectContentCallable()"); - } - - public UnaryCallable redactImageCallable() { - throw new UnsupportedOperationException("Not implemented: redactImageCallable()"); - } - - public UnaryCallable - deidentifyContentCallable() { - throw new UnsupportedOperationException("Not implemented: deidentifyContentCallable()"); - } - - public UnaryCallable - reidentifyContentCallable() { - throw new UnsupportedOperationException("Not implemented: reidentifyContentCallable()"); - } - - public UnaryCallable listInfoTypesCallable() { - throw new UnsupportedOperationException("Not implemented: listInfoTypesCallable()"); - } - - public UnaryCallable - createInspectTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: createInspectTemplateCallable()"); - } - - public UnaryCallable - updateInspectTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: updateInspectTemplateCallable()"); - } - - public UnaryCallable getInspectTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: getInspectTemplateCallable()"); - } - - public UnaryCallable - listInspectTemplatesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listInspectTemplatesPagedCallable()"); - } - - public UnaryCallable - listInspectTemplatesCallable() { - throw new UnsupportedOperationException("Not implemented: listInspectTemplatesCallable()"); - } - - public UnaryCallable deleteInspectTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: deleteInspectTemplateCallable()"); - } - - public UnaryCallable - createDeidentifyTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: createDeidentifyTemplateCallable()"); - } - - public UnaryCallable - updateDeidentifyTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: updateDeidentifyTemplateCallable()"); - } - - public UnaryCallable - getDeidentifyTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: getDeidentifyTemplateCallable()"); - } - - public UnaryCallable - listDeidentifyTemplatesPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listDeidentifyTemplatesPagedCallable()"); - } - - public UnaryCallable - listDeidentifyTemplatesCallable() { - throw new UnsupportedOperationException("Not implemented: listDeidentifyTemplatesCallable()"); - } - - public UnaryCallable deleteDeidentifyTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: deleteDeidentifyTemplateCallable()"); - } - - public UnaryCallable createJobTriggerCallable() { - throw new UnsupportedOperationException("Not implemented: createJobTriggerCallable()"); - } - - public UnaryCallable updateJobTriggerCallable() { - throw new UnsupportedOperationException("Not implemented: updateJobTriggerCallable()"); - } - - public UnaryCallable - hybridInspectJobTriggerCallable() { - throw new UnsupportedOperationException("Not implemented: hybridInspectJobTriggerCallable()"); - } - - public UnaryCallable getJobTriggerCallable() { - throw new UnsupportedOperationException("Not implemented: getJobTriggerCallable()"); - } - - public UnaryCallable - listJobTriggersPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listJobTriggersPagedCallable()"); - } - - public UnaryCallable listJobTriggersCallable() { - throw new UnsupportedOperationException("Not implemented: listJobTriggersCallable()"); - } - - public UnaryCallable deleteJobTriggerCallable() { - throw new UnsupportedOperationException("Not implemented: deleteJobTriggerCallable()"); - } - - public UnaryCallable activateJobTriggerCallable() { - throw new UnsupportedOperationException("Not implemented: activateJobTriggerCallable()"); - } - - public UnaryCallable createDlpJobCallable() { - throw new UnsupportedOperationException("Not implemented: createDlpJobCallable()"); - } - - public UnaryCallable listDlpJobsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listDlpJobsPagedCallable()"); - } - - public UnaryCallable listDlpJobsCallable() { - throw new UnsupportedOperationException("Not implemented: listDlpJobsCallable()"); - } - - public UnaryCallable getDlpJobCallable() { - throw new UnsupportedOperationException("Not implemented: getDlpJobCallable()"); - } - - public UnaryCallable deleteDlpJobCallable() { - throw new UnsupportedOperationException("Not implemented: deleteDlpJobCallable()"); - } - - public UnaryCallable cancelDlpJobCallable() { - throw new UnsupportedOperationException("Not implemented: cancelDlpJobCallable()"); - } - - public UnaryCallable createStoredInfoTypeCallable() { - throw new UnsupportedOperationException("Not implemented: createStoredInfoTypeCallable()"); - } - - public UnaryCallable updateStoredInfoTypeCallable() { - throw new UnsupportedOperationException("Not implemented: updateStoredInfoTypeCallable()"); - } - - public UnaryCallable getStoredInfoTypeCallable() { - throw new UnsupportedOperationException("Not implemented: getStoredInfoTypeCallable()"); - } - - public UnaryCallable - listStoredInfoTypesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listStoredInfoTypesPagedCallable()"); - } - - public UnaryCallable - listStoredInfoTypesCallable() { - throw new UnsupportedOperationException("Not implemented: listStoredInfoTypesCallable()"); - } - - public UnaryCallable deleteStoredInfoTypeCallable() { - throw new UnsupportedOperationException("Not implemented: deleteStoredInfoTypeCallable()"); - } - - public UnaryCallable - hybridInspectDlpJobCallable() { - throw new UnsupportedOperationException("Not implemented: hybridInspectDlpJobCallable()"); - } - - public UnaryCallable finishDlpJobCallable() { - throw new UnsupportedOperationException("Not implemented: finishDlpJobCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java deleted file mode 100644 index 2536c4c11343..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java +++ /dev/null @@ -1,1549 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2.stub; - -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; -import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; -import com.google.privacy.dlp.v2.CreateJobTriggerRequest; -import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.DeidentifyTemplate; -import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.DeleteDlpJobRequest; -import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; -import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; -import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.FinishDlpJobRequest; -import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.GetInspectTemplateRequest; -import com.google.privacy.dlp.v2.GetJobTriggerRequest; -import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; -import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; -import com.google.privacy.dlp.v2.HybridInspectResponse; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; -import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ListDlpJobsResponse; -import com.google.privacy.dlp.v2.ListInfoTypesRequest; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ListJobTriggersResponse; -import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; -import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.StoredInfoType; -import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; -import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; -import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link DlpServiceStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (dlp.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of inspectContent to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
- * DlpServiceStubSettings.Builder dlpServiceSettingsBuilder = DlpServiceStubSettings.newBuilder();
- * dlpServiceSettingsBuilder
- *     .inspectContentSettings()
- *     .setRetrySettings(
- *         dlpServiceSettingsBuilder
- *             .inspectContentSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * DlpServiceStubSettings dlpServiceSettings = dlpServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class DlpServiceStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final UnaryCallSettings - inspectContentSettings; - private final UnaryCallSettings redactImageSettings; - private final UnaryCallSettings - deidentifyContentSettings; - private final UnaryCallSettings - reidentifyContentSettings; - private final UnaryCallSettings - listInfoTypesSettings; - private final UnaryCallSettings - createInspectTemplateSettings; - private final UnaryCallSettings - updateInspectTemplateSettings; - private final UnaryCallSettings - getInspectTemplateSettings; - private final PagedCallSettings< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, - ListInspectTemplatesPagedResponse> - listInspectTemplatesSettings; - private final UnaryCallSettings - deleteInspectTemplateSettings; - private final UnaryCallSettings - createDeidentifyTemplateSettings; - private final UnaryCallSettings - updateDeidentifyTemplateSettings; - private final UnaryCallSettings - getDeidentifyTemplateSettings; - private final PagedCallSettings< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - ListDeidentifyTemplatesPagedResponse> - listDeidentifyTemplatesSettings; - private final UnaryCallSettings - deleteDeidentifyTemplateSettings; - private final UnaryCallSettings createJobTriggerSettings; - private final UnaryCallSettings updateJobTriggerSettings; - private final UnaryCallSettings - hybridInspectJobTriggerSettings; - private final UnaryCallSettings getJobTriggerSettings; - private final PagedCallSettings< - ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> - listJobTriggersSettings; - private final UnaryCallSettings deleteJobTriggerSettings; - private final UnaryCallSettings activateJobTriggerSettings; - private final UnaryCallSettings createDlpJobSettings; - private final PagedCallSettings - listDlpJobsSettings; - private final UnaryCallSettings getDlpJobSettings; - private final UnaryCallSettings deleteDlpJobSettings; - private final UnaryCallSettings cancelDlpJobSettings; - private final UnaryCallSettings - createStoredInfoTypeSettings; - private final UnaryCallSettings - updateStoredInfoTypeSettings; - private final UnaryCallSettings - getStoredInfoTypeSettings; - private final PagedCallSettings< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, ListStoredInfoTypesPagedResponse> - listStoredInfoTypesSettings; - private final UnaryCallSettings deleteStoredInfoTypeSettings; - private final UnaryCallSettings - hybridInspectDlpJobSettings; - private final UnaryCallSettings finishDlpJobSettings; - - private static final PagedListDescriptor< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate> - LIST_INSPECT_TEMPLATES_PAGE_STR_DESC = - new PagedListDescriptor< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListInspectTemplatesRequest injectToken( - ListInspectTemplatesRequest payload, String token) { - return ListInspectTemplatesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListInspectTemplatesRequest injectPageSize( - ListInspectTemplatesRequest payload, int pageSize) { - return ListInspectTemplatesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListInspectTemplatesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListInspectTemplatesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListInspectTemplatesResponse payload) { - return payload.getInspectTemplatesList() == null - ? ImmutableList.of() - : payload.getInspectTemplatesList(); - } - }; - - private static final PagedListDescriptor< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> - LIST_DEIDENTIFY_TEMPLATES_PAGE_STR_DESC = - new PagedListDescriptor< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - DeidentifyTemplate>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListDeidentifyTemplatesRequest injectToken( - ListDeidentifyTemplatesRequest payload, String token) { - return ListDeidentifyTemplatesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListDeidentifyTemplatesRequest injectPageSize( - ListDeidentifyTemplatesRequest payload, int pageSize) { - return ListDeidentifyTemplatesRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListDeidentifyTemplatesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListDeidentifyTemplatesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListDeidentifyTemplatesResponse payload) { - return payload.getDeidentifyTemplatesList() == null - ? ImmutableList.of() - : payload.getDeidentifyTemplatesList(); - } - }; - - private static final PagedListDescriptor< - ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> - LIST_JOB_TRIGGERS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListJobTriggersRequest injectToken( - ListJobTriggersRequest payload, String token) { - return ListJobTriggersRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListJobTriggersRequest injectPageSize( - ListJobTriggersRequest payload, int pageSize) { - return ListJobTriggersRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListJobTriggersRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListJobTriggersResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListJobTriggersResponse payload) { - return payload.getJobTriggersList() == null - ? ImmutableList.of() - : payload.getJobTriggersList(); - } - }; - - private static final PagedListDescriptor - LIST_DLP_JOBS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListDlpJobsRequest injectToken(ListDlpJobsRequest payload, String token) { - return ListDlpJobsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListDlpJobsRequest injectPageSize(ListDlpJobsRequest payload, int pageSize) { - return ListDlpJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListDlpJobsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListDlpJobsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListDlpJobsResponse payload) { - return payload.getJobsList() == null - ? ImmutableList.of() - : payload.getJobsList(); - } - }; - - private static final PagedListDescriptor< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType> - LIST_STORED_INFO_TYPES_PAGE_STR_DESC = - new PagedListDescriptor< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListStoredInfoTypesRequest injectToken( - ListStoredInfoTypesRequest payload, String token) { - return ListStoredInfoTypesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListStoredInfoTypesRequest injectPageSize( - ListStoredInfoTypesRequest payload, int pageSize) { - return ListStoredInfoTypesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListStoredInfoTypesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListStoredInfoTypesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListStoredInfoTypesResponse payload) { - return payload.getStoredInfoTypesList() == null - ? ImmutableList.of() - : payload.getStoredInfoTypesList(); - } - }; - - private static final PagedListResponseFactory< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, - ListInspectTemplatesPagedResponse> - LIST_INSPECT_TEMPLATES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, - ListInspectTemplatesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListInspectTemplatesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate> - pageContext = - PageContext.create( - callable, LIST_INSPECT_TEMPLATES_PAGE_STR_DESC, request, context); - return ListInspectTemplatesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - ListDeidentifyTemplatesPagedResponse> - LIST_DEIDENTIFY_TEMPLATES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - ListDeidentifyTemplatesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListDeidentifyTemplatesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - DeidentifyTemplate> - pageContext = - PageContext.create( - callable, LIST_DEIDENTIFY_TEMPLATES_PAGE_STR_DESC, request, context); - return ListDeidentifyTemplatesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> - LIST_JOB_TRIGGERS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListJobTriggersRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_JOB_TRIGGERS_PAGE_STR_DESC, request, context); - return ListJobTriggersPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse> - LIST_DLP_JOBS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListDlpJobsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_DLP_JOBS_PAGE_STR_DESC, request, context); - return ListDlpJobsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, ListStoredInfoTypesPagedResponse> - LIST_STORED_INFO_TYPES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, - ListStoredInfoTypesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListStoredInfoTypesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_STORED_INFO_TYPES_PAGE_STR_DESC, request, context); - return ListStoredInfoTypesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to inspectContent. */ - public UnaryCallSettings inspectContentSettings() { - return inspectContentSettings; - } - - /** Returns the object with the settings used for calls to redactImage. */ - public UnaryCallSettings redactImageSettings() { - return redactImageSettings; - } - - /** Returns the object with the settings used for calls to deidentifyContent. */ - public UnaryCallSettings - deidentifyContentSettings() { - return deidentifyContentSettings; - } - - /** Returns the object with the settings used for calls to reidentifyContent. */ - public UnaryCallSettings - reidentifyContentSettings() { - return reidentifyContentSettings; - } - - /** Returns the object with the settings used for calls to listInfoTypes. */ - public UnaryCallSettings listInfoTypesSettings() { - return listInfoTypesSettings; - } - - /** Returns the object with the settings used for calls to createInspectTemplate. */ - public UnaryCallSettings - createInspectTemplateSettings() { - return createInspectTemplateSettings; - } - - /** Returns the object with the settings used for calls to updateInspectTemplate. */ - public UnaryCallSettings - updateInspectTemplateSettings() { - return updateInspectTemplateSettings; - } - - /** Returns the object with the settings used for calls to getInspectTemplate. */ - public UnaryCallSettings - getInspectTemplateSettings() { - return getInspectTemplateSettings; - } - - /** Returns the object with the settings used for calls to listInspectTemplates. */ - public PagedCallSettings< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, - ListInspectTemplatesPagedResponse> - listInspectTemplatesSettings() { - return listInspectTemplatesSettings; - } - - /** Returns the object with the settings used for calls to deleteInspectTemplate. */ - public UnaryCallSettings deleteInspectTemplateSettings() { - return deleteInspectTemplateSettings; - } - - /** Returns the object with the settings used for calls to createDeidentifyTemplate. */ - public UnaryCallSettings - createDeidentifyTemplateSettings() { - return createDeidentifyTemplateSettings; - } - - /** Returns the object with the settings used for calls to updateDeidentifyTemplate. */ - public UnaryCallSettings - updateDeidentifyTemplateSettings() { - return updateDeidentifyTemplateSettings; - } - - /** Returns the object with the settings used for calls to getDeidentifyTemplate. */ - public UnaryCallSettings - getDeidentifyTemplateSettings() { - return getDeidentifyTemplateSettings; - } - - /** Returns the object with the settings used for calls to listDeidentifyTemplates. */ - public PagedCallSettings< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - ListDeidentifyTemplatesPagedResponse> - listDeidentifyTemplatesSettings() { - return listDeidentifyTemplatesSettings; - } - - /** Returns the object with the settings used for calls to deleteDeidentifyTemplate. */ - public UnaryCallSettings - deleteDeidentifyTemplateSettings() { - return deleteDeidentifyTemplateSettings; - } - - /** Returns the object with the settings used for calls to createJobTrigger. */ - public UnaryCallSettings createJobTriggerSettings() { - return createJobTriggerSettings; - } - - /** Returns the object with the settings used for calls to updateJobTrigger. */ - public UnaryCallSettings updateJobTriggerSettings() { - return updateJobTriggerSettings; - } - - /** Returns the object with the settings used for calls to hybridInspectJobTrigger. */ - public UnaryCallSettings - hybridInspectJobTriggerSettings() { - return hybridInspectJobTriggerSettings; - } - - /** Returns the object with the settings used for calls to getJobTrigger. */ - public UnaryCallSettings getJobTriggerSettings() { - return getJobTriggerSettings; - } - - /** Returns the object with the settings used for calls to listJobTriggers. */ - public PagedCallSettings< - ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> - listJobTriggersSettings() { - return listJobTriggersSettings; - } - - /** Returns the object with the settings used for calls to deleteJobTrigger. */ - public UnaryCallSettings deleteJobTriggerSettings() { - return deleteJobTriggerSettings; - } - - /** Returns the object with the settings used for calls to activateJobTrigger. */ - public UnaryCallSettings activateJobTriggerSettings() { - return activateJobTriggerSettings; - } - - /** Returns the object with the settings used for calls to createDlpJob. */ - public UnaryCallSettings createDlpJobSettings() { - return createDlpJobSettings; - } - - /** Returns the object with the settings used for calls to listDlpJobs. */ - public PagedCallSettings - listDlpJobsSettings() { - return listDlpJobsSettings; - } - - /** Returns the object with the settings used for calls to getDlpJob. */ - public UnaryCallSettings getDlpJobSettings() { - return getDlpJobSettings; - } - - /** Returns the object with the settings used for calls to deleteDlpJob. */ - public UnaryCallSettings deleteDlpJobSettings() { - return deleteDlpJobSettings; - } - - /** Returns the object with the settings used for calls to cancelDlpJob. */ - public UnaryCallSettings cancelDlpJobSettings() { - return cancelDlpJobSettings; - } - - /** Returns the object with the settings used for calls to createStoredInfoType. */ - public UnaryCallSettings - createStoredInfoTypeSettings() { - return createStoredInfoTypeSettings; - } - - /** Returns the object with the settings used for calls to updateStoredInfoType. */ - public UnaryCallSettings - updateStoredInfoTypeSettings() { - return updateStoredInfoTypeSettings; - } - - /** Returns the object with the settings used for calls to getStoredInfoType. */ - public UnaryCallSettings getStoredInfoTypeSettings() { - return getStoredInfoTypeSettings; - } - - /** Returns the object with the settings used for calls to listStoredInfoTypes. */ - public PagedCallSettings< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, ListStoredInfoTypesPagedResponse> - listStoredInfoTypesSettings() { - return listStoredInfoTypesSettings; - } - - /** Returns the object with the settings used for calls to deleteStoredInfoType. */ - public UnaryCallSettings deleteStoredInfoTypeSettings() { - return deleteStoredInfoTypeSettings; - } - - /** Returns the object with the settings used for calls to hybridInspectDlpJob. */ - public UnaryCallSettings - hybridInspectDlpJobSettings() { - return hybridInspectDlpJobSettings; - } - - /** Returns the object with the settings used for calls to finishDlpJob. */ - public UnaryCallSettings finishDlpJobSettings() { - return finishDlpJobSettings; - } - - public DlpServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcDlpServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonDlpServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "dlp.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "dlp.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DlpServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(DlpServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return DlpServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected DlpServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - inspectContentSettings = settingsBuilder.inspectContentSettings().build(); - redactImageSettings = settingsBuilder.redactImageSettings().build(); - deidentifyContentSettings = settingsBuilder.deidentifyContentSettings().build(); - reidentifyContentSettings = settingsBuilder.reidentifyContentSettings().build(); - listInfoTypesSettings = settingsBuilder.listInfoTypesSettings().build(); - createInspectTemplateSettings = settingsBuilder.createInspectTemplateSettings().build(); - updateInspectTemplateSettings = settingsBuilder.updateInspectTemplateSettings().build(); - getInspectTemplateSettings = settingsBuilder.getInspectTemplateSettings().build(); - listInspectTemplatesSettings = settingsBuilder.listInspectTemplatesSettings().build(); - deleteInspectTemplateSettings = settingsBuilder.deleteInspectTemplateSettings().build(); - createDeidentifyTemplateSettings = settingsBuilder.createDeidentifyTemplateSettings().build(); - updateDeidentifyTemplateSettings = settingsBuilder.updateDeidentifyTemplateSettings().build(); - getDeidentifyTemplateSettings = settingsBuilder.getDeidentifyTemplateSettings().build(); - listDeidentifyTemplatesSettings = settingsBuilder.listDeidentifyTemplatesSettings().build(); - deleteDeidentifyTemplateSettings = settingsBuilder.deleteDeidentifyTemplateSettings().build(); - createJobTriggerSettings = settingsBuilder.createJobTriggerSettings().build(); - updateJobTriggerSettings = settingsBuilder.updateJobTriggerSettings().build(); - hybridInspectJobTriggerSettings = settingsBuilder.hybridInspectJobTriggerSettings().build(); - getJobTriggerSettings = settingsBuilder.getJobTriggerSettings().build(); - listJobTriggersSettings = settingsBuilder.listJobTriggersSettings().build(); - deleteJobTriggerSettings = settingsBuilder.deleteJobTriggerSettings().build(); - activateJobTriggerSettings = settingsBuilder.activateJobTriggerSettings().build(); - createDlpJobSettings = settingsBuilder.createDlpJobSettings().build(); - listDlpJobsSettings = settingsBuilder.listDlpJobsSettings().build(); - getDlpJobSettings = settingsBuilder.getDlpJobSettings().build(); - deleteDlpJobSettings = settingsBuilder.deleteDlpJobSettings().build(); - cancelDlpJobSettings = settingsBuilder.cancelDlpJobSettings().build(); - createStoredInfoTypeSettings = settingsBuilder.createStoredInfoTypeSettings().build(); - updateStoredInfoTypeSettings = settingsBuilder.updateStoredInfoTypeSettings().build(); - getStoredInfoTypeSettings = settingsBuilder.getStoredInfoTypeSettings().build(); - listStoredInfoTypesSettings = settingsBuilder.listStoredInfoTypesSettings().build(); - deleteStoredInfoTypeSettings = settingsBuilder.deleteStoredInfoTypeSettings().build(); - hybridInspectDlpJobSettings = settingsBuilder.hybridInspectDlpJobSettings().build(); - finishDlpJobSettings = settingsBuilder.finishDlpJobSettings().build(); - } - - /** Builder for DlpServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - inspectContentSettings; - private final UnaryCallSettings.Builder - redactImageSettings; - private final UnaryCallSettings.Builder - deidentifyContentSettings; - private final UnaryCallSettings.Builder - reidentifyContentSettings; - private final UnaryCallSettings.Builder - listInfoTypesSettings; - private final UnaryCallSettings.Builder - createInspectTemplateSettings; - private final UnaryCallSettings.Builder - updateInspectTemplateSettings; - private final UnaryCallSettings.Builder - getInspectTemplateSettings; - private final PagedCallSettings.Builder< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, - ListInspectTemplatesPagedResponse> - listInspectTemplatesSettings; - private final UnaryCallSettings.Builder - deleteInspectTemplateSettings; - private final UnaryCallSettings.Builder - createDeidentifyTemplateSettings; - private final UnaryCallSettings.Builder - updateDeidentifyTemplateSettings; - private final UnaryCallSettings.Builder - getDeidentifyTemplateSettings; - private final PagedCallSettings.Builder< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - ListDeidentifyTemplatesPagedResponse> - listDeidentifyTemplatesSettings; - private final UnaryCallSettings.Builder - deleteDeidentifyTemplateSettings; - private final UnaryCallSettings.Builder - createJobTriggerSettings; - private final UnaryCallSettings.Builder - updateJobTriggerSettings; - private final UnaryCallSettings.Builder - hybridInspectJobTriggerSettings; - private final UnaryCallSettings.Builder getJobTriggerSettings; - private final PagedCallSettings.Builder< - ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> - listJobTriggersSettings; - private final UnaryCallSettings.Builder - deleteJobTriggerSettings; - private final UnaryCallSettings.Builder - activateJobTriggerSettings; - private final UnaryCallSettings.Builder createDlpJobSettings; - private final PagedCallSettings.Builder< - ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse> - listDlpJobsSettings; - private final UnaryCallSettings.Builder getDlpJobSettings; - private final UnaryCallSettings.Builder deleteDlpJobSettings; - private final UnaryCallSettings.Builder cancelDlpJobSettings; - private final UnaryCallSettings.Builder - createStoredInfoTypeSettings; - private final UnaryCallSettings.Builder - updateStoredInfoTypeSettings; - private final UnaryCallSettings.Builder - getStoredInfoTypeSettings; - private final PagedCallSettings.Builder< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, - ListStoredInfoTypesPagedResponse> - listStoredInfoTypesSettings; - private final UnaryCallSettings.Builder - deleteStoredInfoTypeSettings; - private final UnaryCallSettings.Builder - hybridInspectDlpJobSettings; - private final UnaryCallSettings.Builder finishDlpJobSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.UNAVAILABLE, StatusCode.Code.DEADLINE_EXCEEDED))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(300000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(300000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build(); - definitions.put("no_retry_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - inspectContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - redactImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deidentifyContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - reidentifyContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listInfoTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createInspectTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateInspectTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getInspectTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listInspectTemplatesSettings = - PagedCallSettings.newBuilder(LIST_INSPECT_TEMPLATES_PAGE_STR_FACT); - deleteInspectTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createDeidentifyTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateDeidentifyTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getDeidentifyTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listDeidentifyTemplatesSettings = - PagedCallSettings.newBuilder(LIST_DEIDENTIFY_TEMPLATES_PAGE_STR_FACT); - deleteDeidentifyTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - hybridInspectJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listJobTriggersSettings = PagedCallSettings.newBuilder(LIST_JOB_TRIGGERS_PAGE_STR_FACT); - deleteJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - activateJobTriggerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listDlpJobsSettings = PagedCallSettings.newBuilder(LIST_DLP_JOBS_PAGE_STR_FACT); - getDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - cancelDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createStoredInfoTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateStoredInfoTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getStoredInfoTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listStoredInfoTypesSettings = - PagedCallSettings.newBuilder(LIST_STORED_INFO_TYPES_PAGE_STR_FACT); - deleteStoredInfoTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - hybridInspectDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - finishDlpJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - inspectContentSettings, - redactImageSettings, - deidentifyContentSettings, - reidentifyContentSettings, - listInfoTypesSettings, - createInspectTemplateSettings, - updateInspectTemplateSettings, - getInspectTemplateSettings, - listInspectTemplatesSettings, - deleteInspectTemplateSettings, - createDeidentifyTemplateSettings, - updateDeidentifyTemplateSettings, - getDeidentifyTemplateSettings, - listDeidentifyTemplatesSettings, - deleteDeidentifyTemplateSettings, - createJobTriggerSettings, - updateJobTriggerSettings, - hybridInspectJobTriggerSettings, - getJobTriggerSettings, - listJobTriggersSettings, - deleteJobTriggerSettings, - activateJobTriggerSettings, - createDlpJobSettings, - listDlpJobsSettings, - getDlpJobSettings, - deleteDlpJobSettings, - cancelDlpJobSettings, - createStoredInfoTypeSettings, - updateStoredInfoTypeSettings, - getStoredInfoTypeSettings, - listStoredInfoTypesSettings, - deleteStoredInfoTypeSettings, - hybridInspectDlpJobSettings, - finishDlpJobSettings); - initDefaults(this); - } - - protected Builder(DlpServiceStubSettings settings) { - super(settings); - - inspectContentSettings = settings.inspectContentSettings.toBuilder(); - redactImageSettings = settings.redactImageSettings.toBuilder(); - deidentifyContentSettings = settings.deidentifyContentSettings.toBuilder(); - reidentifyContentSettings = settings.reidentifyContentSettings.toBuilder(); - listInfoTypesSettings = settings.listInfoTypesSettings.toBuilder(); - createInspectTemplateSettings = settings.createInspectTemplateSettings.toBuilder(); - updateInspectTemplateSettings = settings.updateInspectTemplateSettings.toBuilder(); - getInspectTemplateSettings = settings.getInspectTemplateSettings.toBuilder(); - listInspectTemplatesSettings = settings.listInspectTemplatesSettings.toBuilder(); - deleteInspectTemplateSettings = settings.deleteInspectTemplateSettings.toBuilder(); - createDeidentifyTemplateSettings = settings.createDeidentifyTemplateSettings.toBuilder(); - updateDeidentifyTemplateSettings = settings.updateDeidentifyTemplateSettings.toBuilder(); - getDeidentifyTemplateSettings = settings.getDeidentifyTemplateSettings.toBuilder(); - listDeidentifyTemplatesSettings = settings.listDeidentifyTemplatesSettings.toBuilder(); - deleteDeidentifyTemplateSettings = settings.deleteDeidentifyTemplateSettings.toBuilder(); - createJobTriggerSettings = settings.createJobTriggerSettings.toBuilder(); - updateJobTriggerSettings = settings.updateJobTriggerSettings.toBuilder(); - hybridInspectJobTriggerSettings = settings.hybridInspectJobTriggerSettings.toBuilder(); - getJobTriggerSettings = settings.getJobTriggerSettings.toBuilder(); - listJobTriggersSettings = settings.listJobTriggersSettings.toBuilder(); - deleteJobTriggerSettings = settings.deleteJobTriggerSettings.toBuilder(); - activateJobTriggerSettings = settings.activateJobTriggerSettings.toBuilder(); - createDlpJobSettings = settings.createDlpJobSettings.toBuilder(); - listDlpJobsSettings = settings.listDlpJobsSettings.toBuilder(); - getDlpJobSettings = settings.getDlpJobSettings.toBuilder(); - deleteDlpJobSettings = settings.deleteDlpJobSettings.toBuilder(); - cancelDlpJobSettings = settings.cancelDlpJobSettings.toBuilder(); - createStoredInfoTypeSettings = settings.createStoredInfoTypeSettings.toBuilder(); - updateStoredInfoTypeSettings = settings.updateStoredInfoTypeSettings.toBuilder(); - getStoredInfoTypeSettings = settings.getStoredInfoTypeSettings.toBuilder(); - listStoredInfoTypesSettings = settings.listStoredInfoTypesSettings.toBuilder(); - deleteStoredInfoTypeSettings = settings.deleteStoredInfoTypeSettings.toBuilder(); - hybridInspectDlpJobSettings = settings.hybridInspectDlpJobSettings.toBuilder(); - finishDlpJobSettings = settings.finishDlpJobSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - inspectContentSettings, - redactImageSettings, - deidentifyContentSettings, - reidentifyContentSettings, - listInfoTypesSettings, - createInspectTemplateSettings, - updateInspectTemplateSettings, - getInspectTemplateSettings, - listInspectTemplatesSettings, - deleteInspectTemplateSettings, - createDeidentifyTemplateSettings, - updateDeidentifyTemplateSettings, - getDeidentifyTemplateSettings, - listDeidentifyTemplatesSettings, - deleteDeidentifyTemplateSettings, - createJobTriggerSettings, - updateJobTriggerSettings, - hybridInspectJobTriggerSettings, - getJobTriggerSettings, - listJobTriggersSettings, - deleteJobTriggerSettings, - activateJobTriggerSettings, - createDlpJobSettings, - listDlpJobsSettings, - getDlpJobSettings, - deleteDlpJobSettings, - cancelDlpJobSettings, - createStoredInfoTypeSettings, - updateStoredInfoTypeSettings, - getStoredInfoTypeSettings, - listStoredInfoTypesSettings, - deleteStoredInfoTypeSettings, - hybridInspectDlpJobSettings, - finishDlpJobSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .inspectContentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .redactImageSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deidentifyContentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .reidentifyContentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listInfoTypesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createInspectTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateInspectTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .getInspectTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listInspectTemplatesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteInspectTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createDeidentifyTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateDeidentifyTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .getDeidentifyTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listDeidentifyTemplatesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteDeidentifyTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createJobTriggerSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateJobTriggerSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .hybridInspectJobTriggerSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .getJobTriggerSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listJobTriggersSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteJobTriggerSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .activateJobTriggerSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .createDlpJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .listDlpJobsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getDlpJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteDlpJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .cancelDlpJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .createStoredInfoTypeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .updateStoredInfoTypeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .getStoredInfoTypeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listStoredInfoTypesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteStoredInfoTypeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .hybridInspectDlpJobSettings() - .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("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to inspectContent. */ - public UnaryCallSettings.Builder - inspectContentSettings() { - return inspectContentSettings; - } - - /** Returns the builder for the settings used for calls to redactImage. */ - public UnaryCallSettings.Builder - redactImageSettings() { - return redactImageSettings; - } - - /** Returns the builder for the settings used for calls to deidentifyContent. */ - public UnaryCallSettings.Builder - deidentifyContentSettings() { - return deidentifyContentSettings; - } - - /** Returns the builder for the settings used for calls to reidentifyContent. */ - public UnaryCallSettings.Builder - reidentifyContentSettings() { - return reidentifyContentSettings; - } - - /** Returns the builder for the settings used for calls to listInfoTypes. */ - public UnaryCallSettings.Builder - listInfoTypesSettings() { - return listInfoTypesSettings; - } - - /** Returns the builder for the settings used for calls to createInspectTemplate. */ - public UnaryCallSettings.Builder - createInspectTemplateSettings() { - return createInspectTemplateSettings; - } - - /** Returns the builder for the settings used for calls to updateInspectTemplate. */ - public UnaryCallSettings.Builder - updateInspectTemplateSettings() { - return updateInspectTemplateSettings; - } - - /** Returns the builder for the settings used for calls to getInspectTemplate. */ - public UnaryCallSettings.Builder - getInspectTemplateSettings() { - return getInspectTemplateSettings; - } - - /** Returns the builder for the settings used for calls to listInspectTemplates. */ - public PagedCallSettings.Builder< - ListInspectTemplatesRequest, ListInspectTemplatesResponse, - ListInspectTemplatesPagedResponse> - listInspectTemplatesSettings() { - return listInspectTemplatesSettings; - } - - /** Returns the builder for the settings used for calls to deleteInspectTemplate. */ - public UnaryCallSettings.Builder - deleteInspectTemplateSettings() { - return deleteInspectTemplateSettings; - } - - /** Returns the builder for the settings used for calls to createDeidentifyTemplate. */ - public UnaryCallSettings.Builder - createDeidentifyTemplateSettings() { - return createDeidentifyTemplateSettings; - } - - /** Returns the builder for the settings used for calls to updateDeidentifyTemplate. */ - public UnaryCallSettings.Builder - updateDeidentifyTemplateSettings() { - return updateDeidentifyTemplateSettings; - } - - /** Returns the builder for the settings used for calls to getDeidentifyTemplate. */ - public UnaryCallSettings.Builder - getDeidentifyTemplateSettings() { - return getDeidentifyTemplateSettings; - } - - /** Returns the builder for the settings used for calls to listDeidentifyTemplates. */ - public PagedCallSettings.Builder< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, - ListDeidentifyTemplatesPagedResponse> - listDeidentifyTemplatesSettings() { - return listDeidentifyTemplatesSettings; - } - - /** Returns the builder for the settings used for calls to deleteDeidentifyTemplate. */ - public UnaryCallSettings.Builder - deleteDeidentifyTemplateSettings() { - return deleteDeidentifyTemplateSettings; - } - - /** Returns the builder for the settings used for calls to createJobTrigger. */ - public UnaryCallSettings.Builder - createJobTriggerSettings() { - return createJobTriggerSettings; - } - - /** Returns the builder for the settings used for calls to updateJobTrigger. */ - public UnaryCallSettings.Builder - updateJobTriggerSettings() { - return updateJobTriggerSettings; - } - - /** Returns the builder for the settings used for calls to hybridInspectJobTrigger. */ - public UnaryCallSettings.Builder - hybridInspectJobTriggerSettings() { - return hybridInspectJobTriggerSettings; - } - - /** Returns the builder for the settings used for calls to getJobTrigger. */ - public UnaryCallSettings.Builder getJobTriggerSettings() { - return getJobTriggerSettings; - } - - /** Returns the builder for the settings used for calls to listJobTriggers. */ - public PagedCallSettings.Builder< - ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse> - listJobTriggersSettings() { - return listJobTriggersSettings; - } - - /** Returns the builder for the settings used for calls to deleteJobTrigger. */ - public UnaryCallSettings.Builder deleteJobTriggerSettings() { - return deleteJobTriggerSettings; - } - - /** Returns the builder for the settings used for calls to activateJobTrigger. */ - public UnaryCallSettings.Builder - activateJobTriggerSettings() { - return activateJobTriggerSettings; - } - - /** Returns the builder for the settings used for calls to createDlpJob. */ - public UnaryCallSettings.Builder createDlpJobSettings() { - return createDlpJobSettings; - } - - /** Returns the builder for the settings used for calls to listDlpJobs. */ - public PagedCallSettings.Builder< - ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse> - listDlpJobsSettings() { - return listDlpJobsSettings; - } - - /** Returns the builder for the settings used for calls to getDlpJob. */ - public UnaryCallSettings.Builder getDlpJobSettings() { - return getDlpJobSettings; - } - - /** Returns the builder for the settings used for calls to deleteDlpJob. */ - public UnaryCallSettings.Builder deleteDlpJobSettings() { - return deleteDlpJobSettings; - } - - /** Returns the builder for the settings used for calls to cancelDlpJob. */ - public UnaryCallSettings.Builder cancelDlpJobSettings() { - return cancelDlpJobSettings; - } - - /** Returns the builder for the settings used for calls to createStoredInfoType. */ - public UnaryCallSettings.Builder - createStoredInfoTypeSettings() { - return createStoredInfoTypeSettings; - } - - /** Returns the builder for the settings used for calls to updateStoredInfoType. */ - public UnaryCallSettings.Builder - updateStoredInfoTypeSettings() { - return updateStoredInfoTypeSettings; - } - - /** Returns the builder for the settings used for calls to getStoredInfoType. */ - public UnaryCallSettings.Builder - getStoredInfoTypeSettings() { - return getStoredInfoTypeSettings; - } - - /** Returns the builder for the settings used for calls to listStoredInfoTypes. */ - public PagedCallSettings.Builder< - ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, - ListStoredInfoTypesPagedResponse> - listStoredInfoTypesSettings() { - return listStoredInfoTypesSettings; - } - - /** Returns the builder for the settings used for calls to deleteStoredInfoType. */ - public UnaryCallSettings.Builder - deleteStoredInfoTypeSettings() { - return deleteStoredInfoTypeSettings; - } - - /** Returns the builder for the settings used for calls to hybridInspectDlpJob. */ - public UnaryCallSettings.Builder - hybridInspectDlpJobSettings() { - return hybridInspectDlpJobSettings; - } - - /** Returns the builder for the settings used for calls to finishDlpJob. */ - public UnaryCallSettings.Builder finishDlpJobSettings() { - return finishDlpJobSettings; - } - - @Override - public DlpServiceStubSettings build() throws IOException { - return new DlpServiceStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceCallableFactory.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceCallableFactory.java deleted file mode 100644 index 3ca44b42c58c..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the DlpService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcDlpServiceCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java deleted file mode 100644 index d50ba9f2b9c0..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/GrpcDlpServiceStub.java +++ /dev/null @@ -1,1323 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2.stub; - -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; -import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; -import com.google.privacy.dlp.v2.CreateJobTriggerRequest; -import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.DeidentifyTemplate; -import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.DeleteDlpJobRequest; -import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; -import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; -import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.FinishDlpJobRequest; -import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.GetInspectTemplateRequest; -import com.google.privacy.dlp.v2.GetJobTriggerRequest; -import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; -import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; -import com.google.privacy.dlp.v2.HybridInspectResponse; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; -import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ListDlpJobsResponse; -import com.google.privacy.dlp.v2.ListInfoTypesRequest; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ListJobTriggersResponse; -import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; -import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.StoredInfoType; -import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; -import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; -import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the DlpService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcDlpServiceStub extends DlpServiceStub { - private static final MethodDescriptor - inspectContentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/InspectContent") - .setRequestMarshaller( - ProtoUtils.marshaller(InspectContentRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(InspectContentResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - redactImageMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/RedactImage") - .setRequestMarshaller(ProtoUtils.marshaller(RedactImageRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(RedactImageResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deidentifyContentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeidentifyContent") - .setRequestMarshaller( - ProtoUtils.marshaller(DeidentifyContentRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(DeidentifyContentResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - reidentifyContentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/ReidentifyContent") - .setRequestMarshaller( - ProtoUtils.marshaller(ReidentifyContentRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ReidentifyContentResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listInfoTypesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListInfoTypes") - .setRequestMarshaller( - ProtoUtils.marshaller(ListInfoTypesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListInfoTypesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createInspectTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateInspectTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateInspectTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(InspectTemplate.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateInspectTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateInspectTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateInspectTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(InspectTemplate.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getInspectTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetInspectTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(GetInspectTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(InspectTemplate.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listInspectTemplatesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListInspectTemplates") - .setRequestMarshaller( - ProtoUtils.marshaller(ListInspectTemplatesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListInspectTemplatesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteInspectTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteInspectTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteInspectTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createDeidentifyTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateDeidentifyTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateDeidentifyTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(DeidentifyTemplate.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateDeidentifyTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateDeidentifyTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateDeidentifyTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(DeidentifyTemplate.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getDeidentifyTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetDeidentifyTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(GetDeidentifyTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(DeidentifyTemplate.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse> - listDeidentifyTemplatesMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListDeidentifyTemplates") - .setRequestMarshaller( - ProtoUtils.marshaller(ListDeidentifyTemplatesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListDeidentifyTemplatesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteDeidentifyTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteDeidentifyTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteDeidentifyTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createJobTriggerMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateJobTrigger") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(JobTrigger.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateJobTriggerMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateJobTrigger") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(JobTrigger.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - hybridInspectJobTriggerMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/HybridInspectJobTrigger") - .setRequestMarshaller( - ProtoUtils.marshaller(HybridInspectJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(HybridInspectResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getJobTriggerMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetJobTrigger") - .setRequestMarshaller( - ProtoUtils.marshaller(GetJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(JobTrigger.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listJobTriggersMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListJobTriggers") - .setRequestMarshaller( - ProtoUtils.marshaller(ListJobTriggersRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListJobTriggersResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteJobTriggerMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteJobTrigger") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - activateJobTriggerMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/ActivateJobTrigger") - .setRequestMarshaller( - ProtoUtils.marshaller(ActivateJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(DlpJob.getDefaultInstance())) - .build(); - - private static final MethodDescriptor createDlpJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateDlpJob") - .setRequestMarshaller(ProtoUtils.marshaller(CreateDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(DlpJob.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listDlpJobsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListDlpJobs") - .setRequestMarshaller(ProtoUtils.marshaller(ListDlpJobsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListDlpJobsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getDlpJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetDlpJob") - .setRequestMarshaller(ProtoUtils.marshaller(GetDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(DlpJob.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteDlpJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteDlpJob") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor cancelDlpJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/CancelDlpJob") - .setRequestMarshaller(ProtoUtils.marshaller(CancelDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createStoredInfoTypeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateStoredInfoType") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateStoredInfoTypeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(StoredInfoType.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateStoredInfoTypeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateStoredInfoType") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateStoredInfoTypeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(StoredInfoType.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getStoredInfoTypeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetStoredInfoType") - .setRequestMarshaller( - ProtoUtils.marshaller(GetStoredInfoTypeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(StoredInfoType.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listStoredInfoTypesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListStoredInfoTypes") - .setRequestMarshaller( - ProtoUtils.marshaller(ListStoredInfoTypesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListStoredInfoTypesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteStoredInfoTypeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteStoredInfoType") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteStoredInfoTypeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - hybridInspectDlpJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/HybridInspectDlpJob") - .setRequestMarshaller( - ProtoUtils.marshaller(HybridInspectDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(HybridInspectResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor finishDlpJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.privacy.dlp.v2.DlpService/FinishDlpJob") - .setRequestMarshaller(ProtoUtils.marshaller(FinishDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final UnaryCallable inspectContentCallable; - private final UnaryCallable redactImageCallable; - private final UnaryCallable - deidentifyContentCallable; - private final UnaryCallable - reidentifyContentCallable; - private final UnaryCallable listInfoTypesCallable; - private final UnaryCallable - createInspectTemplateCallable; - private final UnaryCallable - updateInspectTemplateCallable; - private final UnaryCallable - getInspectTemplateCallable; - private final UnaryCallable - listInspectTemplatesCallable; - private final UnaryCallable - listInspectTemplatesPagedCallable; - private final UnaryCallable deleteInspectTemplateCallable; - private final UnaryCallable - createDeidentifyTemplateCallable; - private final UnaryCallable - updateDeidentifyTemplateCallable; - private final UnaryCallable - getDeidentifyTemplateCallable; - private final UnaryCallable - listDeidentifyTemplatesCallable; - private final UnaryCallable - listDeidentifyTemplatesPagedCallable; - private final UnaryCallable - deleteDeidentifyTemplateCallable; - private final UnaryCallable createJobTriggerCallable; - private final UnaryCallable updateJobTriggerCallable; - private final UnaryCallable - hybridInspectJobTriggerCallable; - private final UnaryCallable getJobTriggerCallable; - private final UnaryCallable - listJobTriggersCallable; - private final UnaryCallable - listJobTriggersPagedCallable; - private final UnaryCallable deleteJobTriggerCallable; - private final UnaryCallable activateJobTriggerCallable; - private final UnaryCallable createDlpJobCallable; - private final UnaryCallable listDlpJobsCallable; - private final UnaryCallable - listDlpJobsPagedCallable; - private final UnaryCallable getDlpJobCallable; - private final UnaryCallable deleteDlpJobCallable; - private final UnaryCallable cancelDlpJobCallable; - private final UnaryCallable - createStoredInfoTypeCallable; - private final UnaryCallable - updateStoredInfoTypeCallable; - private final UnaryCallable getStoredInfoTypeCallable; - private final UnaryCallable - listStoredInfoTypesCallable; - private final UnaryCallable - listStoredInfoTypesPagedCallable; - private final UnaryCallable deleteStoredInfoTypeCallable; - private final UnaryCallable - hybridInspectDlpJobCallable; - private final UnaryCallable finishDlpJobCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcDlpServiceStub create(DlpServiceStubSettings settings) - throws IOException { - return new GrpcDlpServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcDlpServiceStub create(ClientContext clientContext) throws IOException { - return new GrpcDlpServiceStub(DlpServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcDlpServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcDlpServiceStub( - DlpServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcDlpServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcDlpServiceStub(DlpServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcDlpServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcDlpServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcDlpServiceStub( - DlpServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - inspectContentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(inspectContentMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings redactImageTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(redactImageMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - deidentifyContentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deidentifyContentMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - reidentifyContentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(reidentifyContentMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings listInfoTypesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listInfoTypesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - createInspectTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createInspectTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateInspectTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateInspectTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - getInspectTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getInspectTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listInspectTemplatesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listInspectTemplatesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteInspectTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteInspectTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - createDeidentifyTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createDeidentifyTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateDeidentifyTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateDeidentifyTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - getDeidentifyTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getDeidentifyTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listDeidentifyTemplatesTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listDeidentifyTemplatesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - deleteDeidentifyTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteDeidentifyTemplateMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createJobTriggerTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createJobTriggerMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateJobTriggerTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateJobTriggerMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - hybridInspectJobTriggerTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(hybridInspectJobTriggerMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getJobTriggerTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getJobTriggerMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listJobTriggersTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listJobTriggersMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteJobTriggerTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteJobTriggerMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings activateJobTriggerTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(activateJobTriggerMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createDlpJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createDlpJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings listDlpJobsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listDlpJobsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getDlpJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getDlpJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteDlpJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteDlpJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings cancelDlpJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(cancelDlpJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - createStoredInfoTypeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createStoredInfoTypeMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateStoredInfoTypeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateStoredInfoTypeMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings getStoredInfoTypeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getStoredInfoTypeMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listStoredInfoTypesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listStoredInfoTypesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteStoredInfoTypeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteStoredInfoTypeMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - hybridInspectDlpJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(hybridInspectDlpJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings finishDlpJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(finishDlpJobMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.inspectContentCallable = - callableFactory.createUnaryCallable( - inspectContentTransportSettings, settings.inspectContentSettings(), clientContext); - this.redactImageCallable = - callableFactory.createUnaryCallable( - redactImageTransportSettings, settings.redactImageSettings(), clientContext); - this.deidentifyContentCallable = - callableFactory.createUnaryCallable( - deidentifyContentTransportSettings, - settings.deidentifyContentSettings(), - clientContext); - this.reidentifyContentCallable = - callableFactory.createUnaryCallable( - reidentifyContentTransportSettings, - settings.reidentifyContentSettings(), - clientContext); - this.listInfoTypesCallable = - callableFactory.createUnaryCallable( - listInfoTypesTransportSettings, settings.listInfoTypesSettings(), clientContext); - this.createInspectTemplateCallable = - callableFactory.createUnaryCallable( - createInspectTemplateTransportSettings, - settings.createInspectTemplateSettings(), - clientContext); - this.updateInspectTemplateCallable = - callableFactory.createUnaryCallable( - updateInspectTemplateTransportSettings, - settings.updateInspectTemplateSettings(), - clientContext); - this.getInspectTemplateCallable = - callableFactory.createUnaryCallable( - getInspectTemplateTransportSettings, - settings.getInspectTemplateSettings(), - clientContext); - this.listInspectTemplatesCallable = - callableFactory.createUnaryCallable( - listInspectTemplatesTransportSettings, - settings.listInspectTemplatesSettings(), - clientContext); - this.listInspectTemplatesPagedCallable = - callableFactory.createPagedCallable( - listInspectTemplatesTransportSettings, - settings.listInspectTemplatesSettings(), - clientContext); - this.deleteInspectTemplateCallable = - callableFactory.createUnaryCallable( - deleteInspectTemplateTransportSettings, - settings.deleteInspectTemplateSettings(), - clientContext); - this.createDeidentifyTemplateCallable = - callableFactory.createUnaryCallable( - createDeidentifyTemplateTransportSettings, - settings.createDeidentifyTemplateSettings(), - clientContext); - this.updateDeidentifyTemplateCallable = - callableFactory.createUnaryCallable( - updateDeidentifyTemplateTransportSettings, - settings.updateDeidentifyTemplateSettings(), - clientContext); - this.getDeidentifyTemplateCallable = - callableFactory.createUnaryCallable( - getDeidentifyTemplateTransportSettings, - settings.getDeidentifyTemplateSettings(), - clientContext); - this.listDeidentifyTemplatesCallable = - callableFactory.createUnaryCallable( - listDeidentifyTemplatesTransportSettings, - settings.listDeidentifyTemplatesSettings(), - clientContext); - this.listDeidentifyTemplatesPagedCallable = - callableFactory.createPagedCallable( - listDeidentifyTemplatesTransportSettings, - settings.listDeidentifyTemplatesSettings(), - clientContext); - this.deleteDeidentifyTemplateCallable = - callableFactory.createUnaryCallable( - deleteDeidentifyTemplateTransportSettings, - settings.deleteDeidentifyTemplateSettings(), - clientContext); - this.createJobTriggerCallable = - callableFactory.createUnaryCallable( - createJobTriggerTransportSettings, settings.createJobTriggerSettings(), clientContext); - this.updateJobTriggerCallable = - callableFactory.createUnaryCallable( - updateJobTriggerTransportSettings, settings.updateJobTriggerSettings(), clientContext); - this.hybridInspectJobTriggerCallable = - callableFactory.createUnaryCallable( - hybridInspectJobTriggerTransportSettings, - settings.hybridInspectJobTriggerSettings(), - clientContext); - this.getJobTriggerCallable = - callableFactory.createUnaryCallable( - getJobTriggerTransportSettings, settings.getJobTriggerSettings(), clientContext); - this.listJobTriggersCallable = - callableFactory.createUnaryCallable( - listJobTriggersTransportSettings, settings.listJobTriggersSettings(), clientContext); - this.listJobTriggersPagedCallable = - callableFactory.createPagedCallable( - listJobTriggersTransportSettings, settings.listJobTriggersSettings(), clientContext); - this.deleteJobTriggerCallable = - callableFactory.createUnaryCallable( - deleteJobTriggerTransportSettings, settings.deleteJobTriggerSettings(), clientContext); - this.activateJobTriggerCallable = - callableFactory.createUnaryCallable( - activateJobTriggerTransportSettings, - settings.activateJobTriggerSettings(), - clientContext); - this.createDlpJobCallable = - callableFactory.createUnaryCallable( - createDlpJobTransportSettings, settings.createDlpJobSettings(), clientContext); - this.listDlpJobsCallable = - callableFactory.createUnaryCallable( - listDlpJobsTransportSettings, settings.listDlpJobsSettings(), clientContext); - this.listDlpJobsPagedCallable = - callableFactory.createPagedCallable( - listDlpJobsTransportSettings, settings.listDlpJobsSettings(), clientContext); - this.getDlpJobCallable = - callableFactory.createUnaryCallable( - getDlpJobTransportSettings, settings.getDlpJobSettings(), clientContext); - this.deleteDlpJobCallable = - callableFactory.createUnaryCallable( - deleteDlpJobTransportSettings, settings.deleteDlpJobSettings(), clientContext); - this.cancelDlpJobCallable = - callableFactory.createUnaryCallable( - cancelDlpJobTransportSettings, settings.cancelDlpJobSettings(), clientContext); - this.createStoredInfoTypeCallable = - callableFactory.createUnaryCallable( - createStoredInfoTypeTransportSettings, - settings.createStoredInfoTypeSettings(), - clientContext); - this.updateStoredInfoTypeCallable = - callableFactory.createUnaryCallable( - updateStoredInfoTypeTransportSettings, - settings.updateStoredInfoTypeSettings(), - clientContext); - this.getStoredInfoTypeCallable = - callableFactory.createUnaryCallable( - getStoredInfoTypeTransportSettings, - settings.getStoredInfoTypeSettings(), - clientContext); - this.listStoredInfoTypesCallable = - callableFactory.createUnaryCallable( - listStoredInfoTypesTransportSettings, - settings.listStoredInfoTypesSettings(), - clientContext); - this.listStoredInfoTypesPagedCallable = - callableFactory.createPagedCallable( - listStoredInfoTypesTransportSettings, - settings.listStoredInfoTypesSettings(), - clientContext); - this.deleteStoredInfoTypeCallable = - callableFactory.createUnaryCallable( - deleteStoredInfoTypeTransportSettings, - settings.deleteStoredInfoTypeSettings(), - clientContext); - this.hybridInspectDlpJobCallable = - callableFactory.createUnaryCallable( - hybridInspectDlpJobTransportSettings, - settings.hybridInspectDlpJobSettings(), - clientContext); - this.finishDlpJobCallable = - callableFactory.createUnaryCallable( - finishDlpJobTransportSettings, settings.finishDlpJobSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable inspectContentCallable() { - return inspectContentCallable; - } - - @Override - public UnaryCallable redactImageCallable() { - return redactImageCallable; - } - - @Override - public UnaryCallable - deidentifyContentCallable() { - return deidentifyContentCallable; - } - - @Override - public UnaryCallable - reidentifyContentCallable() { - return reidentifyContentCallable; - } - - @Override - public UnaryCallable listInfoTypesCallable() { - return listInfoTypesCallable; - } - - @Override - public UnaryCallable - createInspectTemplateCallable() { - return createInspectTemplateCallable; - } - - @Override - public UnaryCallable - updateInspectTemplateCallable() { - return updateInspectTemplateCallable; - } - - @Override - public UnaryCallable getInspectTemplateCallable() { - return getInspectTemplateCallable; - } - - @Override - public UnaryCallable - listInspectTemplatesCallable() { - return listInspectTemplatesCallable; - } - - @Override - public UnaryCallable - listInspectTemplatesPagedCallable() { - return listInspectTemplatesPagedCallable; - } - - @Override - public UnaryCallable deleteInspectTemplateCallable() { - return deleteInspectTemplateCallable; - } - - @Override - public UnaryCallable - createDeidentifyTemplateCallable() { - return createDeidentifyTemplateCallable; - } - - @Override - public UnaryCallable - updateDeidentifyTemplateCallable() { - return updateDeidentifyTemplateCallable; - } - - @Override - public UnaryCallable - getDeidentifyTemplateCallable() { - return getDeidentifyTemplateCallable; - } - - @Override - public UnaryCallable - listDeidentifyTemplatesCallable() { - return listDeidentifyTemplatesCallable; - } - - @Override - public UnaryCallable - listDeidentifyTemplatesPagedCallable() { - return listDeidentifyTemplatesPagedCallable; - } - - @Override - public UnaryCallable deleteDeidentifyTemplateCallable() { - return deleteDeidentifyTemplateCallable; - } - - @Override - public UnaryCallable createJobTriggerCallable() { - return createJobTriggerCallable; - } - - @Override - public UnaryCallable updateJobTriggerCallable() { - return updateJobTriggerCallable; - } - - @Override - public UnaryCallable - hybridInspectJobTriggerCallable() { - return hybridInspectJobTriggerCallable; - } - - @Override - public UnaryCallable getJobTriggerCallable() { - return getJobTriggerCallable; - } - - @Override - public UnaryCallable listJobTriggersCallable() { - return listJobTriggersCallable; - } - - @Override - public UnaryCallable - listJobTriggersPagedCallable() { - return listJobTriggersPagedCallable; - } - - @Override - public UnaryCallable deleteJobTriggerCallable() { - return deleteJobTriggerCallable; - } - - @Override - public UnaryCallable activateJobTriggerCallable() { - return activateJobTriggerCallable; - } - - @Override - public UnaryCallable createDlpJobCallable() { - return createDlpJobCallable; - } - - @Override - public UnaryCallable listDlpJobsCallable() { - return listDlpJobsCallable; - } - - @Override - public UnaryCallable listDlpJobsPagedCallable() { - return listDlpJobsPagedCallable; - } - - @Override - public UnaryCallable getDlpJobCallable() { - return getDlpJobCallable; - } - - @Override - public UnaryCallable deleteDlpJobCallable() { - return deleteDlpJobCallable; - } - - @Override - public UnaryCallable cancelDlpJobCallable() { - return cancelDlpJobCallable; - } - - @Override - public UnaryCallable createStoredInfoTypeCallable() { - return createStoredInfoTypeCallable; - } - - @Override - public UnaryCallable updateStoredInfoTypeCallable() { - return updateStoredInfoTypeCallable; - } - - @Override - public UnaryCallable getStoredInfoTypeCallable() { - return getStoredInfoTypeCallable; - } - - @Override - public UnaryCallable - listStoredInfoTypesCallable() { - return listStoredInfoTypesCallable; - } - - @Override - public UnaryCallable - listStoredInfoTypesPagedCallable() { - return listStoredInfoTypesPagedCallable; - } - - @Override - public UnaryCallable deleteStoredInfoTypeCallable() { - return deleteStoredInfoTypeCallable; - } - - @Override - public UnaryCallable - hybridInspectDlpJobCallable() { - return hybridInspectDlpJobCallable; - } - - @Override - public UnaryCallable finishDlpJobCallable() { - return finishDlpJobCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceCallableFactory.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceCallableFactory.java deleted file mode 100644 index 65d19fac3652..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the DlpService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonDlpServiceCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceStub.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceStub.java deleted file mode 100644 index 627f54d01a15..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/HttpJsonDlpServiceStub.java +++ /dev/null @@ -1,2157 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2.stub; - -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; -import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; -import com.google.privacy.dlp.v2.CreateJobTriggerRequest; -import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.DeidentifyTemplate; -import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.DeleteDlpJobRequest; -import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; -import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; -import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.FinishDlpJobRequest; -import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.GetInspectTemplateRequest; -import com.google.privacy.dlp.v2.GetJobTriggerRequest; -import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; -import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; -import com.google.privacy.dlp.v2.HybridInspectResponse; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; -import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ListDlpJobsResponse; -import com.google.privacy.dlp.v2.ListInfoTypesRequest; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ListJobTriggersResponse; -import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; -import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.StoredInfoType; -import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; -import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; -import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the DlpService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonDlpServiceStub extends DlpServiceStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - inspectContentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/InspectContent") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=projects/*}/content:inspect", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/content:inspect") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(InspectContentResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - redactImageMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/RedactImage") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=projects/*}/image:redact", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/image:redact") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(RedactImageResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deidentifyContentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeidentifyContent") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=projects/*}/content:deidentify", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/content:deidentify") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DeidentifyContentResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - reidentifyContentMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/ReidentifyContent") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=projects/*}/content:reidentify", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/content:reidentify") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ReidentifyContentResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listInfoTypesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListInfoTypes") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/infoTypes", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths("/v2/{parent=locations/*}/infoTypes") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam( - fields, "languageCode", request.getLanguageCode()); - serializer.putQueryParam(fields, "locationId", request.getLocationId()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListInfoTypesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createInspectTemplateMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateInspectTemplate") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=organizations/*}/inspectTemplates", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v2/{parent=organizations/*/locations/*}/inspectTemplates", - "/v2/{parent=projects/*}/inspectTemplates", - "/v2/{parent=projects/*/locations/*}/inspectTemplates") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(InspectTemplate.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateInspectTemplateMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateInspectTemplate") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=organizations/*/inspectTemplates/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=organizations/*/locations/*/inspectTemplates/*}", - "/v2/{name=projects/*/inspectTemplates/*}", - "/v2/{name=projects/*/locations/*/inspectTemplates/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(InspectTemplate.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getInspectTemplateMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetInspectTemplate") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=organizations/*/inspectTemplates/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=organizations/*/locations/*/inspectTemplates/*}", - "/v2/{name=projects/*/inspectTemplates/*}", - "/v2/{name=projects/*/locations/*/inspectTemplates/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(InspectTemplate.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - ListInspectTemplatesRequest, ListInspectTemplatesResponse> - listInspectTemplatesMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListInspectTemplates") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=organizations/*}/inspectTemplates", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v2/{parent=organizations/*/locations/*}/inspectTemplates", - "/v2/{parent=projects/*}/inspectTemplates", - "/v2/{parent=projects/*/locations/*}/inspectTemplates") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "locationId", request.getLocationId()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListInspectTemplatesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteInspectTemplateMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteInspectTemplate") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=organizations/*/inspectTemplates/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=organizations/*/locations/*/inspectTemplates/*}", - "/v2/{name=projects/*/inspectTemplates/*}", - "/v2/{name=projects/*/locations/*/inspectTemplates/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createDeidentifyTemplateMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateDeidentifyTemplate") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=organizations/*}/deidentifyTemplates", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates", - "/v2/{parent=projects/*}/deidentifyTemplates", - "/v2/{parent=projects/*/locations/*}/deidentifyTemplates") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DeidentifyTemplate.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateDeidentifyTemplateMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateDeidentifyTemplate") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=organizations/*/deidentifyTemplates/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}", - "/v2/{name=projects/*/deidentifyTemplates/*}", - "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DeidentifyTemplate.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getDeidentifyTemplateMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetDeidentifyTemplate") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=organizations/*/deidentifyTemplates/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}", - "/v2/{name=projects/*/deidentifyTemplates/*}", - "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DeidentifyTemplate.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse> - listDeidentifyTemplatesMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListDeidentifyTemplates") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=organizations/*}/deidentifyTemplates", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates", - "/v2/{parent=projects/*}/deidentifyTemplates", - "/v2/{parent=projects/*/locations/*}/deidentifyTemplates") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "locationId", request.getLocationId()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListDeidentifyTemplatesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteDeidentifyTemplateMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteDeidentifyTemplate") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=organizations/*/deidentifyTemplates/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}", - "/v2/{name=projects/*/deidentifyTemplates/*}", - "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createJobTriggerMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateJobTrigger") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=projects/*}/jobTriggers", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v2/{parent=projects/*/locations/*}/jobTriggers", - "/v2/{parent=organizations/*/locations/*}/jobTriggers") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(JobTrigger.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateJobTriggerMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateJobTrigger") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/jobTriggers/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=projects/*/locations/*/jobTriggers/*}", - "/v2/{name=organizations/*/locations/*/jobTriggers/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(JobTrigger.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - hybridInspectJobTriggerMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/HybridInspectJobTrigger") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(HybridInspectResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getJobTriggerMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetJobTrigger") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/jobTriggers/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=projects/*/locations/*/jobTriggers/*}", - "/v2/{name=organizations/*/locations/*/jobTriggers/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(JobTrigger.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listJobTriggersMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListJobTriggers") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=projects/*}/jobTriggers", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v2/{parent=projects/*/locations/*}/jobTriggers", - "/v2/{parent=organizations/*/locations/*}/jobTriggers") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "locationId", request.getLocationId()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "type", request.getType()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListJobTriggersResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteJobTriggerMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteJobTrigger") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/jobTriggers/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=projects/*/locations/*/jobTriggers/*}", - "/v2/{name=organizations/*/locations/*/jobTriggers/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - activateJobTriggerMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/ActivateJobTrigger") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/jobTriggers/*}:activate", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=projects/*/locations/*/jobTriggers/*}:activate") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DlpJob.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createDlpJobMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateDlpJob") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=projects/*}/dlpJobs", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths("/v2/{parent=projects/*/locations/*}/dlpJobs") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DlpJob.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listDlpJobsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListDlpJobs") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=projects/*}/dlpJobs", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v2/{parent=projects/*/locations/*}/dlpJobs", - "/v2/{parent=organizations/*/locations/*}/dlpJobs") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "locationId", request.getLocationId()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "type", request.getType()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListDlpJobsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getDlpJobMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetDlpJob") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/dlpJobs/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths("/v2/{name=projects/*/locations/*/dlpJobs/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(DlpJob.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteDlpJobMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteDlpJob") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/dlpJobs/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths("/v2/{name=projects/*/locations/*/dlpJobs/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - cancelDlpJobMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/CancelDlpJob") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/dlpJobs/*}:cancel", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths("/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createStoredInfoTypeMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/CreateStoredInfoType") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=organizations/*}/storedInfoTypes", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v2/{parent=organizations/*/locations/*}/storedInfoTypes", - "/v2/{parent=projects/*}/storedInfoTypes", - "/v2/{parent=projects/*/locations/*}/storedInfoTypes") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(StoredInfoType.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateStoredInfoTypeMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/UpdateStoredInfoType") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=organizations/*/storedInfoTypes/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}", - "/v2/{name=projects/*/storedInfoTypes/*}", - "/v2/{name=projects/*/locations/*/storedInfoTypes/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(StoredInfoType.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getStoredInfoTypeMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/GetStoredInfoType") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=organizations/*/storedInfoTypes/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}", - "/v2/{name=projects/*/storedInfoTypes/*}", - "/v2/{name=projects/*/locations/*/storedInfoTypes/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(StoredInfoType.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listStoredInfoTypesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/ListStoredInfoTypes") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{parent=organizations/*}/storedInfoTypes", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setAdditionalPaths( - "/v2/{parent=organizations/*/locations/*}/storedInfoTypes", - "/v2/{parent=projects/*}/storedInfoTypes", - "/v2/{parent=projects/*/locations/*}/storedInfoTypes") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "locationId", request.getLocationId()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListStoredInfoTypesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteStoredInfoTypeMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/DeleteStoredInfoType") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=organizations/*/storedInfoTypes/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setAdditionalPaths( - "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}", - "/v2/{name=projects/*/storedInfoTypes/*}", - "/v2/{name=projects/*/locations/*/storedInfoTypes/*}") - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - hybridInspectDlpJobMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/HybridInspectDlpJob") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(HybridInspectResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - finishDlpJobMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.privacy.dlp.v2.DlpService/FinishDlpJob") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearName().build())) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable inspectContentCallable; - private final UnaryCallable redactImageCallable; - private final UnaryCallable - deidentifyContentCallable; - private final UnaryCallable - reidentifyContentCallable; - private final UnaryCallable listInfoTypesCallable; - private final UnaryCallable - createInspectTemplateCallable; - private final UnaryCallable - updateInspectTemplateCallable; - private final UnaryCallable - getInspectTemplateCallable; - private final UnaryCallable - listInspectTemplatesCallable; - private final UnaryCallable - listInspectTemplatesPagedCallable; - private final UnaryCallable deleteInspectTemplateCallable; - private final UnaryCallable - createDeidentifyTemplateCallable; - private final UnaryCallable - updateDeidentifyTemplateCallable; - private final UnaryCallable - getDeidentifyTemplateCallable; - private final UnaryCallable - listDeidentifyTemplatesCallable; - private final UnaryCallable - listDeidentifyTemplatesPagedCallable; - private final UnaryCallable - deleteDeidentifyTemplateCallable; - private final UnaryCallable createJobTriggerCallable; - private final UnaryCallable updateJobTriggerCallable; - private final UnaryCallable - hybridInspectJobTriggerCallable; - private final UnaryCallable getJobTriggerCallable; - private final UnaryCallable - listJobTriggersCallable; - private final UnaryCallable - listJobTriggersPagedCallable; - private final UnaryCallable deleteJobTriggerCallable; - private final UnaryCallable activateJobTriggerCallable; - private final UnaryCallable createDlpJobCallable; - private final UnaryCallable listDlpJobsCallable; - private final UnaryCallable - listDlpJobsPagedCallable; - private final UnaryCallable getDlpJobCallable; - private final UnaryCallable deleteDlpJobCallable; - private final UnaryCallable cancelDlpJobCallable; - private final UnaryCallable - createStoredInfoTypeCallable; - private final UnaryCallable - updateStoredInfoTypeCallable; - private final UnaryCallable getStoredInfoTypeCallable; - private final UnaryCallable - listStoredInfoTypesCallable; - private final UnaryCallable - listStoredInfoTypesPagedCallable; - private final UnaryCallable deleteStoredInfoTypeCallable; - private final UnaryCallable - hybridInspectDlpJobCallable; - private final UnaryCallable finishDlpJobCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonDlpServiceStub create(DlpServiceStubSettings settings) - throws IOException { - return new HttpJsonDlpServiceStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonDlpServiceStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonDlpServiceStub( - DlpServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonDlpServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonDlpServiceStub( - DlpServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonDlpServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonDlpServiceStub(DlpServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonDlpServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonDlpServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonDlpServiceStub( - DlpServiceStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings - inspectContentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(inspectContentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings redactImageTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(redactImageMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - deidentifyContentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deidentifyContentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - reidentifyContentTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(reidentifyContentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listInfoTypesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listInfoTypesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createInspectTemplateTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createInspectTemplateMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateInspectTemplateTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateInspectTemplateMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getInspectTemplateTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getInspectTemplateMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listInspectTemplatesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listInspectTemplatesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - deleteInspectTemplateTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteInspectTemplateMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createDeidentifyTemplateTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createDeidentifyTemplateMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateDeidentifyTemplateTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateDeidentifyTemplateMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getDeidentifyTemplateTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getDeidentifyTemplateMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listDeidentifyTemplatesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listDeidentifyTemplatesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - deleteDeidentifyTemplateTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteDeidentifyTemplateMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createJobTriggerTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createJobTriggerMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateJobTriggerTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateJobTriggerMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - hybridInspectJobTriggerTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(hybridInspectJobTriggerMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getJobTriggerTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getJobTriggerMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listJobTriggersTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listJobTriggersMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteJobTriggerTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteJobTriggerMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings activateJobTriggerTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(activateJobTriggerMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createDlpJobTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createDlpJobMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listDlpJobsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listDlpJobsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getDlpJobTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getDlpJobMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteDlpJobTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteDlpJobMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings cancelDlpJobTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(cancelDlpJobMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createStoredInfoTypeTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createStoredInfoTypeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateStoredInfoTypeTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateStoredInfoTypeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getStoredInfoTypeTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getStoredInfoTypeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listStoredInfoTypesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listStoredInfoTypesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteStoredInfoTypeTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteStoredInfoTypeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - hybridInspectDlpJobTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(hybridInspectDlpJobMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings finishDlpJobTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(finishDlpJobMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.inspectContentCallable = - callableFactory.createUnaryCallable( - inspectContentTransportSettings, settings.inspectContentSettings(), clientContext); - this.redactImageCallable = - callableFactory.createUnaryCallable( - redactImageTransportSettings, settings.redactImageSettings(), clientContext); - this.deidentifyContentCallable = - callableFactory.createUnaryCallable( - deidentifyContentTransportSettings, - settings.deidentifyContentSettings(), - clientContext); - this.reidentifyContentCallable = - callableFactory.createUnaryCallable( - reidentifyContentTransportSettings, - settings.reidentifyContentSettings(), - clientContext); - this.listInfoTypesCallable = - callableFactory.createUnaryCallable( - listInfoTypesTransportSettings, settings.listInfoTypesSettings(), clientContext); - this.createInspectTemplateCallable = - callableFactory.createUnaryCallable( - createInspectTemplateTransportSettings, - settings.createInspectTemplateSettings(), - clientContext); - this.updateInspectTemplateCallable = - callableFactory.createUnaryCallable( - updateInspectTemplateTransportSettings, - settings.updateInspectTemplateSettings(), - clientContext); - this.getInspectTemplateCallable = - callableFactory.createUnaryCallable( - getInspectTemplateTransportSettings, - settings.getInspectTemplateSettings(), - clientContext); - this.listInspectTemplatesCallable = - callableFactory.createUnaryCallable( - listInspectTemplatesTransportSettings, - settings.listInspectTemplatesSettings(), - clientContext); - this.listInspectTemplatesPagedCallable = - callableFactory.createPagedCallable( - listInspectTemplatesTransportSettings, - settings.listInspectTemplatesSettings(), - clientContext); - this.deleteInspectTemplateCallable = - callableFactory.createUnaryCallable( - deleteInspectTemplateTransportSettings, - settings.deleteInspectTemplateSettings(), - clientContext); - this.createDeidentifyTemplateCallable = - callableFactory.createUnaryCallable( - createDeidentifyTemplateTransportSettings, - settings.createDeidentifyTemplateSettings(), - clientContext); - this.updateDeidentifyTemplateCallable = - callableFactory.createUnaryCallable( - updateDeidentifyTemplateTransportSettings, - settings.updateDeidentifyTemplateSettings(), - clientContext); - this.getDeidentifyTemplateCallable = - callableFactory.createUnaryCallable( - getDeidentifyTemplateTransportSettings, - settings.getDeidentifyTemplateSettings(), - clientContext); - this.listDeidentifyTemplatesCallable = - callableFactory.createUnaryCallable( - listDeidentifyTemplatesTransportSettings, - settings.listDeidentifyTemplatesSettings(), - clientContext); - this.listDeidentifyTemplatesPagedCallable = - callableFactory.createPagedCallable( - listDeidentifyTemplatesTransportSettings, - settings.listDeidentifyTemplatesSettings(), - clientContext); - this.deleteDeidentifyTemplateCallable = - callableFactory.createUnaryCallable( - deleteDeidentifyTemplateTransportSettings, - settings.deleteDeidentifyTemplateSettings(), - clientContext); - this.createJobTriggerCallable = - callableFactory.createUnaryCallable( - createJobTriggerTransportSettings, settings.createJobTriggerSettings(), clientContext); - this.updateJobTriggerCallable = - callableFactory.createUnaryCallable( - updateJobTriggerTransportSettings, settings.updateJobTriggerSettings(), clientContext); - this.hybridInspectJobTriggerCallable = - callableFactory.createUnaryCallable( - hybridInspectJobTriggerTransportSettings, - settings.hybridInspectJobTriggerSettings(), - clientContext); - this.getJobTriggerCallable = - callableFactory.createUnaryCallable( - getJobTriggerTransportSettings, settings.getJobTriggerSettings(), clientContext); - this.listJobTriggersCallable = - callableFactory.createUnaryCallable( - listJobTriggersTransportSettings, settings.listJobTriggersSettings(), clientContext); - this.listJobTriggersPagedCallable = - callableFactory.createPagedCallable( - listJobTriggersTransportSettings, settings.listJobTriggersSettings(), clientContext); - this.deleteJobTriggerCallable = - callableFactory.createUnaryCallable( - deleteJobTriggerTransportSettings, settings.deleteJobTriggerSettings(), clientContext); - this.activateJobTriggerCallable = - callableFactory.createUnaryCallable( - activateJobTriggerTransportSettings, - settings.activateJobTriggerSettings(), - clientContext); - this.createDlpJobCallable = - callableFactory.createUnaryCallable( - createDlpJobTransportSettings, settings.createDlpJobSettings(), clientContext); - this.listDlpJobsCallable = - callableFactory.createUnaryCallable( - listDlpJobsTransportSettings, settings.listDlpJobsSettings(), clientContext); - this.listDlpJobsPagedCallable = - callableFactory.createPagedCallable( - listDlpJobsTransportSettings, settings.listDlpJobsSettings(), clientContext); - this.getDlpJobCallable = - callableFactory.createUnaryCallable( - getDlpJobTransportSettings, settings.getDlpJobSettings(), clientContext); - this.deleteDlpJobCallable = - callableFactory.createUnaryCallable( - deleteDlpJobTransportSettings, settings.deleteDlpJobSettings(), clientContext); - this.cancelDlpJobCallable = - callableFactory.createUnaryCallable( - cancelDlpJobTransportSettings, settings.cancelDlpJobSettings(), clientContext); - this.createStoredInfoTypeCallable = - callableFactory.createUnaryCallable( - createStoredInfoTypeTransportSettings, - settings.createStoredInfoTypeSettings(), - clientContext); - this.updateStoredInfoTypeCallable = - callableFactory.createUnaryCallable( - updateStoredInfoTypeTransportSettings, - settings.updateStoredInfoTypeSettings(), - clientContext); - this.getStoredInfoTypeCallable = - callableFactory.createUnaryCallable( - getStoredInfoTypeTransportSettings, - settings.getStoredInfoTypeSettings(), - clientContext); - this.listStoredInfoTypesCallable = - callableFactory.createUnaryCallable( - listStoredInfoTypesTransportSettings, - settings.listStoredInfoTypesSettings(), - clientContext); - this.listStoredInfoTypesPagedCallable = - callableFactory.createPagedCallable( - listStoredInfoTypesTransportSettings, - settings.listStoredInfoTypesSettings(), - clientContext); - this.deleteStoredInfoTypeCallable = - callableFactory.createUnaryCallable( - deleteStoredInfoTypeTransportSettings, - settings.deleteStoredInfoTypeSettings(), - clientContext); - this.hybridInspectDlpJobCallable = - callableFactory.createUnaryCallable( - hybridInspectDlpJobTransportSettings, - settings.hybridInspectDlpJobSettings(), - clientContext); - this.finishDlpJobCallable = - callableFactory.createUnaryCallable( - finishDlpJobTransportSettings, settings.finishDlpJobSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(inspectContentMethodDescriptor); - methodDescriptors.add(redactImageMethodDescriptor); - methodDescriptors.add(deidentifyContentMethodDescriptor); - methodDescriptors.add(reidentifyContentMethodDescriptor); - methodDescriptors.add(listInfoTypesMethodDescriptor); - methodDescriptors.add(createInspectTemplateMethodDescriptor); - methodDescriptors.add(updateInspectTemplateMethodDescriptor); - methodDescriptors.add(getInspectTemplateMethodDescriptor); - methodDescriptors.add(listInspectTemplatesMethodDescriptor); - methodDescriptors.add(deleteInspectTemplateMethodDescriptor); - methodDescriptors.add(createDeidentifyTemplateMethodDescriptor); - methodDescriptors.add(updateDeidentifyTemplateMethodDescriptor); - methodDescriptors.add(getDeidentifyTemplateMethodDescriptor); - methodDescriptors.add(listDeidentifyTemplatesMethodDescriptor); - methodDescriptors.add(deleteDeidentifyTemplateMethodDescriptor); - methodDescriptors.add(createJobTriggerMethodDescriptor); - methodDescriptors.add(updateJobTriggerMethodDescriptor); - methodDescriptors.add(hybridInspectJobTriggerMethodDescriptor); - methodDescriptors.add(getJobTriggerMethodDescriptor); - methodDescriptors.add(listJobTriggersMethodDescriptor); - methodDescriptors.add(deleteJobTriggerMethodDescriptor); - methodDescriptors.add(activateJobTriggerMethodDescriptor); - methodDescriptors.add(createDlpJobMethodDescriptor); - methodDescriptors.add(listDlpJobsMethodDescriptor); - methodDescriptors.add(getDlpJobMethodDescriptor); - methodDescriptors.add(deleteDlpJobMethodDescriptor); - methodDescriptors.add(cancelDlpJobMethodDescriptor); - methodDescriptors.add(createStoredInfoTypeMethodDescriptor); - methodDescriptors.add(updateStoredInfoTypeMethodDescriptor); - methodDescriptors.add(getStoredInfoTypeMethodDescriptor); - methodDescriptors.add(listStoredInfoTypesMethodDescriptor); - methodDescriptors.add(deleteStoredInfoTypeMethodDescriptor); - methodDescriptors.add(hybridInspectDlpJobMethodDescriptor); - methodDescriptors.add(finishDlpJobMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable inspectContentCallable() { - return inspectContentCallable; - } - - @Override - public UnaryCallable redactImageCallable() { - return redactImageCallable; - } - - @Override - public UnaryCallable - deidentifyContentCallable() { - return deidentifyContentCallable; - } - - @Override - public UnaryCallable - reidentifyContentCallable() { - return reidentifyContentCallable; - } - - @Override - public UnaryCallable listInfoTypesCallable() { - return listInfoTypesCallable; - } - - @Override - public UnaryCallable - createInspectTemplateCallable() { - return createInspectTemplateCallable; - } - - @Override - public UnaryCallable - updateInspectTemplateCallable() { - return updateInspectTemplateCallable; - } - - @Override - public UnaryCallable getInspectTemplateCallable() { - return getInspectTemplateCallable; - } - - @Override - public UnaryCallable - listInspectTemplatesCallable() { - return listInspectTemplatesCallable; - } - - @Override - public UnaryCallable - listInspectTemplatesPagedCallable() { - return listInspectTemplatesPagedCallable; - } - - @Override - public UnaryCallable deleteInspectTemplateCallable() { - return deleteInspectTemplateCallable; - } - - @Override - public UnaryCallable - createDeidentifyTemplateCallable() { - return createDeidentifyTemplateCallable; - } - - @Override - public UnaryCallable - updateDeidentifyTemplateCallable() { - return updateDeidentifyTemplateCallable; - } - - @Override - public UnaryCallable - getDeidentifyTemplateCallable() { - return getDeidentifyTemplateCallable; - } - - @Override - public UnaryCallable - listDeidentifyTemplatesCallable() { - return listDeidentifyTemplatesCallable; - } - - @Override - public UnaryCallable - listDeidentifyTemplatesPagedCallable() { - return listDeidentifyTemplatesPagedCallable; - } - - @Override - public UnaryCallable deleteDeidentifyTemplateCallable() { - return deleteDeidentifyTemplateCallable; - } - - @Override - public UnaryCallable createJobTriggerCallable() { - return createJobTriggerCallable; - } - - @Override - public UnaryCallable updateJobTriggerCallable() { - return updateJobTriggerCallable; - } - - @Override - public UnaryCallable - hybridInspectJobTriggerCallable() { - return hybridInspectJobTriggerCallable; - } - - @Override - public UnaryCallable getJobTriggerCallable() { - return getJobTriggerCallable; - } - - @Override - public UnaryCallable listJobTriggersCallable() { - return listJobTriggersCallable; - } - - @Override - public UnaryCallable - listJobTriggersPagedCallable() { - return listJobTriggersPagedCallable; - } - - @Override - public UnaryCallable deleteJobTriggerCallable() { - return deleteJobTriggerCallable; - } - - @Override - public UnaryCallable activateJobTriggerCallable() { - return activateJobTriggerCallable; - } - - @Override - public UnaryCallable createDlpJobCallable() { - return createDlpJobCallable; - } - - @Override - public UnaryCallable listDlpJobsCallable() { - return listDlpJobsCallable; - } - - @Override - public UnaryCallable listDlpJobsPagedCallable() { - return listDlpJobsPagedCallable; - } - - @Override - public UnaryCallable getDlpJobCallable() { - return getDlpJobCallable; - } - - @Override - public UnaryCallable deleteDlpJobCallable() { - return deleteDlpJobCallable; - } - - @Override - public UnaryCallable cancelDlpJobCallable() { - return cancelDlpJobCallable; - } - - @Override - public UnaryCallable createStoredInfoTypeCallable() { - return createStoredInfoTypeCallable; - } - - @Override - public UnaryCallable updateStoredInfoTypeCallable() { - return updateStoredInfoTypeCallable; - } - - @Override - public UnaryCallable getStoredInfoTypeCallable() { - return getStoredInfoTypeCallable; - } - - @Override - public UnaryCallable - listStoredInfoTypesCallable() { - return listStoredInfoTypesCallable; - } - - @Override - public UnaryCallable - listStoredInfoTypesPagedCallable() { - return listStoredInfoTypesPagedCallable; - } - - @Override - public UnaryCallable deleteStoredInfoTypeCallable() { - return deleteStoredInfoTypeCallable; - } - - @Override - public UnaryCallable - hybridInspectDlpJobCallable() { - return hybridInspectDlpJobCallable; - } - - @Override - public UnaryCallable finishDlpJobCallable() { - return finishDlpJobCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientHttpJsonTest.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientHttpJsonTest.java deleted file mode 100644 index deeff4d39358..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientHttpJsonTest.java +++ /dev/null @@ -1,4449 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2; - -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.dlp.v2.stub.HttpJsonDlpServiceStub; -import com.google.common.collect.Lists; -import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; -import com.google.privacy.dlp.v2.ByteContentItem; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; -import com.google.privacy.dlp.v2.ContentItem; -import com.google.privacy.dlp.v2.DeidentifyConfig; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.DeidentifyTemplate; -import com.google.privacy.dlp.v2.DeidentifyTemplateName; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.DlpJobName; -import com.google.privacy.dlp.v2.DlpJobType; -import com.google.privacy.dlp.v2.Error; -import com.google.privacy.dlp.v2.FinishDlpJobRequest; -import com.google.privacy.dlp.v2.HybridInspectResponse; -import com.google.privacy.dlp.v2.InfoTypeDescription; -import com.google.privacy.dlp.v2.InspectConfig; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectJobConfig; -import com.google.privacy.dlp.v2.InspectResult; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.InspectTemplateName; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.JobTriggerName; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; -import com.google.privacy.dlp.v2.ListDlpJobsResponse; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ListJobTriggersResponse; -import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; -import com.google.privacy.dlp.v2.LocationName; -import com.google.privacy.dlp.v2.OrganizationLocationName; -import com.google.privacy.dlp.v2.OrganizationName; -import com.google.privacy.dlp.v2.ProjectName; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; -import com.google.privacy.dlp.v2.StoredInfoType; -import com.google.privacy.dlp.v2.StoredInfoTypeConfig; -import com.google.privacy.dlp.v2.StoredInfoTypeName; -import com.google.privacy.dlp.v2.StoredInfoTypeVersion; -import com.google.privacy.dlp.v2.TransformationOverview; -import com.google.protobuf.ByteString; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DlpServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static DlpServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonDlpServiceStub.getMethodDescriptors(), DlpServiceSettings.getDefaultEndpoint()); - DlpServiceSettings settings = - DlpServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - DlpServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DlpServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void inspectContentTest() throws Exception { - InspectContentResponse expectedResponse = - InspectContentResponse.newBuilder().setResult(InspectResult.newBuilder().build()).build(); - mockService.addResponse(expectedResponse); - - InspectContentRequest request = - InspectContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setLocationId("locationId1541836720") - .build(); - - InspectContentResponse actualResponse = client.inspectContent(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void inspectContentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - InspectContentRequest request = - InspectContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setLocationId("locationId1541836720") - .build(); - client.inspectContent(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void redactImageTest() throws Exception { - RedactImageResponse expectedResponse = - RedactImageResponse.newBuilder() - .setRedactedImage(ByteString.EMPTY) - .setExtractedText("extractedText-106686931") - .setInspectResult(InspectResult.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - RedactImageRequest request = - RedactImageRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setLocationId("locationId1541836720") - .setInspectConfig(InspectConfig.newBuilder().build()) - .addAllImageRedactionConfigs(new ArrayList()) - .setIncludeFindings(true) - .setByteItem(ByteContentItem.newBuilder().build()) - .build(); - - RedactImageResponse actualResponse = client.redactImage(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void redactImageExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - RedactImageRequest request = - RedactImageRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setLocationId("locationId1541836720") - .setInspectConfig(InspectConfig.newBuilder().build()) - .addAllImageRedactionConfigs(new ArrayList()) - .setIncludeFindings(true) - .setByteItem(ByteContentItem.newBuilder().build()) - .build(); - client.redactImage(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deidentifyContentTest() throws Exception { - DeidentifyContentResponse expectedResponse = - DeidentifyContentResponse.newBuilder() - .setItem(ContentItem.newBuilder().build()) - .setOverview(TransformationOverview.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - DeidentifyContentRequest request = - DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setDeidentifyTemplateName("deidentifyTemplateName-1374666414") - .setLocationId("locationId1541836720") - .build(); - - DeidentifyContentResponse actualResponse = client.deidentifyContent(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deidentifyContentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DeidentifyContentRequest request = - DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setDeidentifyTemplateName("deidentifyTemplateName-1374666414") - .setLocationId("locationId1541836720") - .build(); - client.deidentifyContent(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void reidentifyContentTest() throws Exception { - ReidentifyContentResponse expectedResponse = - ReidentifyContentResponse.newBuilder() - .setItem(ContentItem.newBuilder().build()) - .setOverview(TransformationOverview.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ReidentifyContentRequest request = - ReidentifyContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setReidentifyConfig(DeidentifyConfig.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setReidentifyTemplateName("reidentifyTemplateName157316612") - .setLocationId("locationId1541836720") - .build(); - - ReidentifyContentResponse actualResponse = client.reidentifyContent(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void reidentifyContentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ReidentifyContentRequest request = - ReidentifyContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setReidentifyConfig(DeidentifyConfig.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setReidentifyTemplateName("reidentifyTemplateName157316612") - .setLocationId("locationId1541836720") - .build(); - client.reidentifyContent(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInfoTypesTest() throws Exception { - ListInfoTypesResponse expectedResponse = - ListInfoTypesResponse.newBuilder() - .addAllInfoTypes(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListInfoTypesResponse actualResponse = client.listInfoTypes(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listInfoTypesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createInspectTemplateExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest2() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createInspectTemplateExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest3() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createInspectTemplateExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest4() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createInspectTemplateExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest5() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createInspectTemplateExceptionTest5() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateInspectTemplateTest() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - InspectTemplate actualResponse = - client.updateInspectTemplate(name, inspectTemplate, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateInspectTemplateExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateInspectTemplate(name, inspectTemplate, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateInspectTemplateTest2() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - InspectTemplate actualResponse = - client.updateInspectTemplate(name, inspectTemplate, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateInspectTemplateExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateInspectTemplate(name, inspectTemplate, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getInspectTemplateTest() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - - InspectTemplate actualResponse = client.getInspectTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getInspectTemplateExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - client.getInspectTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getInspectTemplateTest2() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; - - InspectTemplate actualResponse = client.getInspectTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getInspectTemplateExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; - client.getInspectTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listInspectTemplatesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest2() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listInspectTemplatesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest3() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listInspectTemplatesExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest4() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listInspectTemplatesExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest5() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listInspectTemplatesExceptionTest5() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteInspectTemplateTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - - client.deleteInspectTemplate(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteInspectTemplateExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - client.deleteInspectTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteInspectTemplateTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; - - client.deleteInspectTemplate(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteInspectTemplateExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-353/inspectTemplates/inspectTemplate-353"; - client.deleteInspectTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDeidentifyTemplateExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest2() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDeidentifyTemplateExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest3() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDeidentifyTemplateExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest4() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDeidentifyTemplateExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest5() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDeidentifyTemplateExceptionTest5() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateDeidentifyTemplateTest() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - DeidentifyTemplate actualResponse = - client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateDeidentifyTemplateExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateDeidentifyTemplateTest2() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - DeidentifyTemplate actualResponse = - client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateDeidentifyTemplateExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDeidentifyTemplateTest() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - - DeidentifyTemplate actualResponse = client.getDeidentifyTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getDeidentifyTemplateExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - client.getDeidentifyTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDeidentifyTemplateTest2() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; - - DeidentifyTemplate actualResponse = client.getDeidentifyTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getDeidentifyTemplateExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; - client.getDeidentifyTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDeidentifyTemplatesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest2() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDeidentifyTemplatesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest3() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDeidentifyTemplatesExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest4() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDeidentifyTemplatesExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest5() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDeidentifyTemplatesExceptionTest5() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDeidentifyTemplateTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - - client.deleteDeidentifyTemplate(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteDeidentifyTemplateExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - client.deleteDeidentifyTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDeidentifyTemplateTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; - - client.deleteDeidentifyTemplate(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteDeidentifyTemplateExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-136/deidentifyTemplates/deidentifyTemplate-136"; - client.deleteDeidentifyTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createJobTriggerTest() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - - JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createJobTriggerExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - client.createJobTrigger(parent, jobTrigger); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createJobTriggerTest2() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - - JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createJobTriggerExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - client.createJobTrigger(parent, jobTrigger); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createJobTriggerTest3() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-2353"; - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - - JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createJobTriggerExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-2353"; - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - client.createJobTrigger(parent, jobTrigger); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateJobTriggerTest() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - JobTrigger actualResponse = client.updateJobTrigger(name, jobTrigger, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateJobTriggerExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateJobTrigger(name, jobTrigger, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateJobTriggerTest2() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - JobTrigger actualResponse = client.updateJobTrigger(name, jobTrigger, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateJobTriggerExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateJobTrigger(name, jobTrigger, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void hybridInspectJobTriggerTest() throws Exception { - HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); - mockService.addResponse(expectedResponse); - - JobTriggerName name = - JobTriggerName.ofProjectLocationJobTriggerName("[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]"); - - HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void hybridInspectJobTriggerExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - JobTriggerName name = - JobTriggerName.ofProjectLocationJobTriggerName( - "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]"); - client.hybridInspectJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void hybridInspectJobTriggerTest2() throws Exception { - HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-6030/locations/location-6030/jobTriggers/jobTrigger-6030"; - - HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void hybridInspectJobTriggerExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-6030/locations/location-6030/jobTriggers/jobTrigger-6030"; - client.hybridInspectJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getJobTriggerTest() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - - JobTrigger actualResponse = client.getJobTrigger(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getJobTriggerExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - client.getJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getJobTriggerTest2() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; - - JobTrigger actualResponse = client.getJobTrigger(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getJobTriggerExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; - client.getJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listJobTriggersTest() throws Exception { - JobTrigger responsesElement = JobTrigger.newBuilder().build(); - ListJobTriggersResponse expectedResponse = - ListJobTriggersResponse.newBuilder() - .setNextPageToken("") - .addAllJobTriggers(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listJobTriggersExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listJobTriggers(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listJobTriggersTest2() throws Exception { - JobTrigger responsesElement = JobTrigger.newBuilder().build(); - ListJobTriggersResponse expectedResponse = - ListJobTriggersResponse.newBuilder() - .setNextPageToken("") - .addAllJobTriggers(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listJobTriggersExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listJobTriggers(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listJobTriggersTest3() throws Exception { - JobTrigger responsesElement = JobTrigger.newBuilder().build(); - ListJobTriggersResponse expectedResponse = - ListJobTriggersResponse.newBuilder() - .setNextPageToken("") - .addAllJobTriggers(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-2353"; - - ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listJobTriggersExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-2353"; - client.listJobTriggers(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteJobTriggerTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - - client.deleteJobTrigger(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteJobTriggerExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - client.deleteJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteJobTriggerTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; - - client.deleteJobTrigger(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteJobTriggerExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2172/jobTriggers/jobTrigger-2172"; - client.deleteJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void activateJobTriggerTest() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ActivateJobTriggerRequest request = - ActivateJobTriggerRequest.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .build(); - - DlpJob actualResponse = client.activateJobTrigger(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void activateJobTriggerExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ActivateJobTriggerRequest request = - ActivateJobTriggerRequest.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .build(); - client.activateJobTrigger(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, inspectJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDlpJobExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - client.createDlpJob(parent, inspectJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest2() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, riskJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDlpJobExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - client.createDlpJob(parent, riskJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest3() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, inspectJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDlpJobExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - client.createDlpJob(parent, inspectJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest4() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, riskJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDlpJobExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - client.createDlpJob(parent, riskJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest5() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-2353"; - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, inspectJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDlpJobExceptionTest5() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-2353"; - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - client.createDlpJob(parent, inspectJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest6() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-2353"; - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, riskJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createDlpJobExceptionTest6() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-2353"; - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - client.createDlpJob(parent, riskJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDlpJobsTest() throws Exception { - DlpJob responsesElement = DlpJob.newBuilder().build(); - ListDlpJobsResponse expectedResponse = - ListDlpJobsResponse.newBuilder() - .setNextPageToken("") - .addAllJobs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDlpJobsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listDlpJobs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDlpJobsTest2() throws Exception { - DlpJob responsesElement = DlpJob.newBuilder().build(); - ListDlpJobsResponse expectedResponse = - ListDlpJobsResponse.newBuilder() - .setNextPageToken("") - .addAllJobs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDlpJobsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listDlpJobs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDlpJobsTest3() throws Exception { - DlpJob responsesElement = DlpJob.newBuilder().build(); - ListDlpJobsResponse expectedResponse = - ListDlpJobsResponse.newBuilder() - .setNextPageToken("") - .addAllJobs(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-2353"; - - ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listDlpJobsExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-2353"; - client.listDlpJobs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDlpJobTest() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); - - DlpJob actualResponse = client.getDlpJob(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getDlpJobExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); - client.getDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDlpJobTest2() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2726/dlpJobs/dlpJob-2726"; - - DlpJob actualResponse = client.getDlpJob(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getDlpJobExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2726/dlpJobs/dlpJob-2726"; - client.getDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDlpJobTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); - - client.deleteDlpJob(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteDlpJobExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); - client.deleteDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDlpJobTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2726/dlpJobs/dlpJob-2726"; - - client.deleteDlpJob(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteDlpJobExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2726/dlpJobs/dlpJob-2726"; - client.deleteDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void cancelDlpJobTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - CancelDlpJobRequest request = - CancelDlpJobRequest.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .build(); - - client.cancelDlpJob(request); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void cancelDlpJobExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - CancelDlpJobRequest request = - CancelDlpJobRequest.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .build(); - client.cancelDlpJob(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createStoredInfoTypeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest2() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createStoredInfoTypeExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest3() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createStoredInfoTypeExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest4() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createStoredInfoTypeExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest5() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createStoredInfoTypeExceptionTest5() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateStoredInfoTypeTest() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - StoredInfoType actualResponse = client.updateStoredInfoType(name, config, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateStoredInfoTypeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateStoredInfoType(name, config, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateStoredInfoTypeTest2() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - StoredInfoType actualResponse = client.updateStoredInfoType(name, config, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateStoredInfoTypeExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateStoredInfoType(name, config, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getStoredInfoTypeTest() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); - - StoredInfoType actualResponse = client.getStoredInfoType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getStoredInfoTypeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]"); - client.getStoredInfoType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getStoredInfoTypeTest2() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; - - StoredInfoType actualResponse = client.getStoredInfoType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getStoredInfoTypeExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; - client.getStoredInfoType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listStoredInfoTypesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest2() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listStoredInfoTypesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest3() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listStoredInfoTypesExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest4() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listStoredInfoTypesExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest5() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "organizations/organization-8287"; - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listStoredInfoTypesExceptionTest5() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "organizations/organization-8287"; - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteStoredInfoTypeTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); - - client.deleteStoredInfoType(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteStoredInfoTypeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]"); - client.deleteStoredInfoType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteStoredInfoTypeTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; - - client.deleteStoredInfoType(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteStoredInfoTypeExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "organizations/organization-6364/storedInfoTypes/storedInfoType-6364"; - client.deleteStoredInfoType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void hybridInspectDlpJobTest() throws Exception { - HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); - mockService.addResponse(expectedResponse); - - DlpJobName name = - DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]"); - - HybridInspectResponse actualResponse = client.hybridInspectDlpJob(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void hybridInspectDlpJobExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - DlpJobName name = - DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]"); - client.hybridInspectDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void hybridInspectDlpJobTest2() throws Exception { - HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-7036/locations/location-7036/dlpJobs/dlpJob-7036"; - - HybridInspectResponse actualResponse = client.hybridInspectDlpJob(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void hybridInspectDlpJobExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-7036/locations/location-7036/dlpJobs/dlpJob-7036"; - client.hybridInspectDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void finishDlpJobTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - FinishDlpJobRequest request = - FinishDlpJobRequest.newBuilder() - .setName( - DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]") - .toString()) - .build(); - - client.finishDlpJob(request); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void finishDlpJobExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FinishDlpJobRequest request = - FinishDlpJobRequest.newBuilder() - .setName( - DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]") - .toString()) - .build(); - client.finishDlpJob(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientTest.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientTest.java deleted file mode 100644 index 62090829c3e1..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/DlpServiceClientTest.java +++ /dev/null @@ -1,4075 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2; - -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDeidentifyTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListDlpJobsPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListInspectTemplatesPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListJobTriggersPagedResponse; -import static com.google.cloud.dlp.v2.DlpServiceClient.ListStoredInfoTypesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.common.collect.Lists; -import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; -import com.google.privacy.dlp.v2.ByteContentItem; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; -import com.google.privacy.dlp.v2.ContentItem; -import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; -import com.google.privacy.dlp.v2.CreateJobTriggerRequest; -import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DeidentifyConfig; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.DeidentifyTemplate; -import com.google.privacy.dlp.v2.DeidentifyTemplateName; -import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.DeleteDlpJobRequest; -import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; -import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; -import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.DlpJobName; -import com.google.privacy.dlp.v2.DlpJobType; -import com.google.privacy.dlp.v2.Error; -import com.google.privacy.dlp.v2.FinishDlpJobRequest; -import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.GetInspectTemplateRequest; -import com.google.privacy.dlp.v2.GetJobTriggerRequest; -import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; -import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; -import com.google.privacy.dlp.v2.HybridInspectResponse; -import com.google.privacy.dlp.v2.InfoTypeDescription; -import com.google.privacy.dlp.v2.InspectConfig; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectJobConfig; -import com.google.privacy.dlp.v2.InspectResult; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.InspectTemplateName; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.JobTriggerName; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; -import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ListDlpJobsResponse; -import com.google.privacy.dlp.v2.ListInfoTypesRequest; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ListJobTriggersResponse; -import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; -import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; -import com.google.privacy.dlp.v2.LocationName; -import com.google.privacy.dlp.v2.OrganizationLocationName; -import com.google.privacy.dlp.v2.OrganizationName; -import com.google.privacy.dlp.v2.ProjectName; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; -import com.google.privacy.dlp.v2.StoredInfoType; -import com.google.privacy.dlp.v2.StoredInfoTypeConfig; -import com.google.privacy.dlp.v2.StoredInfoTypeName; -import com.google.privacy.dlp.v2.StoredInfoTypeVersion; -import com.google.privacy.dlp.v2.TransformationOverview; -import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; -import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; -import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.ByteString; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class DlpServiceClientTest { - private static MockDlpService mockDlpService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private DlpServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockDlpService = new MockDlpService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockDlpService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - DlpServiceSettings settings = - DlpServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = DlpServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void inspectContentTest() throws Exception { - InspectContentResponse expectedResponse = - InspectContentResponse.newBuilder().setResult(InspectResult.newBuilder().build()).build(); - mockDlpService.addResponse(expectedResponse); - - InspectContentRequest request = - InspectContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setLocationId("locationId1541836720") - .build(); - - InspectContentResponse actualResponse = client.inspectContent(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InspectContentRequest actualRequest = ((InspectContentRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getInspectConfig(), actualRequest.getInspectConfig()); - Assert.assertEquals(request.getItem(), actualRequest.getItem()); - Assert.assertEquals(request.getInspectTemplateName(), actualRequest.getInspectTemplateName()); - Assert.assertEquals(request.getLocationId(), actualRequest.getLocationId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void inspectContentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - InspectContentRequest request = - InspectContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setLocationId("locationId1541836720") - .build(); - client.inspectContent(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void redactImageTest() throws Exception { - RedactImageResponse expectedResponse = - RedactImageResponse.newBuilder() - .setRedactedImage(ByteString.EMPTY) - .setExtractedText("extractedText-106686931") - .setInspectResult(InspectResult.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - RedactImageRequest request = - RedactImageRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setLocationId("locationId1541836720") - .setInspectConfig(InspectConfig.newBuilder().build()) - .addAllImageRedactionConfigs(new ArrayList()) - .setIncludeFindings(true) - .setByteItem(ByteContentItem.newBuilder().build()) - .build(); - - RedactImageResponse actualResponse = client.redactImage(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - RedactImageRequest actualRequest = ((RedactImageRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getLocationId(), actualRequest.getLocationId()); - Assert.assertEquals(request.getInspectConfig(), actualRequest.getInspectConfig()); - Assert.assertEquals( - request.getImageRedactionConfigsList(), actualRequest.getImageRedactionConfigsList()); - Assert.assertEquals(request.getIncludeFindings(), actualRequest.getIncludeFindings()); - Assert.assertEquals(request.getByteItem(), actualRequest.getByteItem()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void redactImageExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - RedactImageRequest request = - RedactImageRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setLocationId("locationId1541836720") - .setInspectConfig(InspectConfig.newBuilder().build()) - .addAllImageRedactionConfigs(new ArrayList()) - .setIncludeFindings(true) - .setByteItem(ByteContentItem.newBuilder().build()) - .build(); - client.redactImage(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deidentifyContentTest() throws Exception { - DeidentifyContentResponse expectedResponse = - DeidentifyContentResponse.newBuilder() - .setItem(ContentItem.newBuilder().build()) - .setOverview(TransformationOverview.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - DeidentifyContentRequest request = - DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setDeidentifyTemplateName("deidentifyTemplateName-1374666414") - .setLocationId("locationId1541836720") - .build(); - - DeidentifyContentResponse actualResponse = client.deidentifyContent(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeidentifyContentRequest actualRequest = ((DeidentifyContentRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getDeidentifyConfig(), actualRequest.getDeidentifyConfig()); - Assert.assertEquals(request.getInspectConfig(), actualRequest.getInspectConfig()); - Assert.assertEquals(request.getItem(), actualRequest.getItem()); - Assert.assertEquals(request.getInspectTemplateName(), actualRequest.getInspectTemplateName()); - Assert.assertEquals( - request.getDeidentifyTemplateName(), actualRequest.getDeidentifyTemplateName()); - Assert.assertEquals(request.getLocationId(), actualRequest.getLocationId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deidentifyContentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - DeidentifyContentRequest request = - DeidentifyContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setDeidentifyTemplateName("deidentifyTemplateName-1374666414") - .setLocationId("locationId1541836720") - .build(); - client.deidentifyContent(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void reidentifyContentTest() throws Exception { - ReidentifyContentResponse expectedResponse = - ReidentifyContentResponse.newBuilder() - .setItem(ContentItem.newBuilder().build()) - .setOverview(TransformationOverview.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - ReidentifyContentRequest request = - ReidentifyContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setReidentifyConfig(DeidentifyConfig.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setReidentifyTemplateName("reidentifyTemplateName157316612") - .setLocationId("locationId1541836720") - .build(); - - ReidentifyContentResponse actualResponse = client.reidentifyContent(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ReidentifyContentRequest actualRequest = ((ReidentifyContentRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getReidentifyConfig(), actualRequest.getReidentifyConfig()); - Assert.assertEquals(request.getInspectConfig(), actualRequest.getInspectConfig()); - Assert.assertEquals(request.getItem(), actualRequest.getItem()); - Assert.assertEquals(request.getInspectTemplateName(), actualRequest.getInspectTemplateName()); - Assert.assertEquals( - request.getReidentifyTemplateName(), actualRequest.getReidentifyTemplateName()); - Assert.assertEquals(request.getLocationId(), actualRequest.getLocationId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void reidentifyContentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ReidentifyContentRequest request = - ReidentifyContentRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setReidentifyConfig(DeidentifyConfig.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .setItem(ContentItem.newBuilder().build()) - .setInspectTemplateName("inspectTemplateName1828857433") - .setReidentifyTemplateName("reidentifyTemplateName157316612") - .setLocationId("locationId1541836720") - .build(); - client.reidentifyContent(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInfoTypesTest() throws Exception { - ListInfoTypesResponse expectedResponse = - ListInfoTypesResponse.newBuilder() - .addAllInfoTypes(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListInfoTypesResponse actualResponse = client.listInfoTypes(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInfoTypesRequest actualRequest = ((ListInfoTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInfoTypesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInspectTemplateRequest actualRequest = - ((CreateInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInspectTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest2() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInspectTemplateRequest actualRequest = - ((CreateInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInspectTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest3() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInspectTemplateRequest actualRequest = - ((CreateInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInspectTemplateExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest4() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInspectTemplateRequest actualRequest = - ((CreateInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInspectTemplateExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createInspectTemplateTest5() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - - InspectTemplate actualResponse = client.createInspectTemplate(parent, inspectTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateInspectTemplateRequest actualRequest = - ((CreateInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createInspectTemplateExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - client.createInspectTemplate(parent, inspectTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateInspectTemplateTest() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - InspectTemplate actualResponse = - client.updateInspectTemplate(name, inspectTemplate, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateInspectTemplateRequest actualRequest = - ((UpdateInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateInspectTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateInspectTemplate(name, inspectTemplate, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateInspectTemplateTest2() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - InspectTemplate actualResponse = - client.updateInspectTemplate(name, inspectTemplate, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateInspectTemplateRequest actualRequest = - ((UpdateInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(inspectTemplate, actualRequest.getInspectTemplate()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateInspectTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateInspectTemplate(name, inspectTemplate, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getInspectTemplateTest() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - - InspectTemplate actualResponse = client.getInspectTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetInspectTemplateRequest actualRequest = ((GetInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getInspectTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - client.getInspectTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getInspectTemplateTest2() throws Exception { - InspectTemplate expectedResponse = - InspectTemplate.newBuilder() - .setName( - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setInspectConfig(InspectConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - InspectTemplate actualResponse = client.getInspectTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetInspectTemplateRequest actualRequest = ((GetInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getInspectTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.getInspectTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInspectTemplatesRequest actualRequest = - ((ListInspectTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInspectTemplatesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest2() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInspectTemplatesRequest actualRequest = - ((ListInspectTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInspectTemplatesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest3() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInspectTemplatesRequest actualRequest = - ((ListInspectTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInspectTemplatesExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest4() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInspectTemplatesRequest actualRequest = - ((ListInspectTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInspectTemplatesExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listInspectTemplatesTest5() throws Exception { - InspectTemplate responsesElement = InspectTemplate.newBuilder().build(); - ListInspectTemplatesResponse expectedResponse = - ListInspectTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllInspectTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListInspectTemplatesPagedResponse pagedListResponse = client.listInspectTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getInspectTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListInspectTemplatesRequest actualRequest = - ((ListInspectTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listInspectTemplatesExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listInspectTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteInspectTemplateTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - - client.deleteInspectTemplate(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteInspectTemplateRequest actualRequest = - ((DeleteInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteInspectTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - InspectTemplateName name = - InspectTemplateName.ofOrganizationInspectTemplateName( - "[ORGANIZATION]", "[INSPECT_TEMPLATE]"); - client.deleteInspectTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteInspectTemplateTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteInspectTemplate(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteInspectTemplateRequest actualRequest = - ((DeleteInspectTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteInspectTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.deleteInspectTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDeidentifyTemplateRequest actualRequest = - ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDeidentifyTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest2() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDeidentifyTemplateRequest actualRequest = - ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDeidentifyTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest3() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDeidentifyTemplateRequest actualRequest = - ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDeidentifyTemplateExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest4() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDeidentifyTemplateRequest actualRequest = - ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDeidentifyTemplateExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDeidentifyTemplateTest5() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - - DeidentifyTemplate actualResponse = client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDeidentifyTemplateRequest actualRequest = - ((CreateDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDeidentifyTemplateExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - client.createDeidentifyTemplate(parent, deidentifyTemplate); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateDeidentifyTemplateTest() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - DeidentifyTemplate actualResponse = - client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateDeidentifyTemplateRequest actualRequest = - ((UpdateDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateDeidentifyTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateDeidentifyTemplateTest2() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - DeidentifyTemplate actualResponse = - client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateDeidentifyTemplateRequest actualRequest = - ((UpdateDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(deidentifyTemplate, actualRequest.getDeidentifyTemplate()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateDeidentifyTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDeidentifyTemplateTest() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - - DeidentifyTemplate actualResponse = client.getDeidentifyTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetDeidentifyTemplateRequest actualRequest = - ((GetDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getDeidentifyTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - client.getDeidentifyTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDeidentifyTemplateTest2() throws Exception { - DeidentifyTemplate expectedResponse = - DeidentifyTemplate.newBuilder() - .setName( - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]") - .toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setDeidentifyConfig(DeidentifyConfig.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - DeidentifyTemplate actualResponse = client.getDeidentifyTemplate(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetDeidentifyTemplateRequest actualRequest = - ((GetDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getDeidentifyTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.getDeidentifyTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDeidentifyTemplatesRequest actualRequest = - ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDeidentifyTemplatesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest2() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDeidentifyTemplatesRequest actualRequest = - ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDeidentifyTemplatesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest3() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDeidentifyTemplatesRequest actualRequest = - ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDeidentifyTemplatesExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest4() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDeidentifyTemplatesRequest actualRequest = - ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDeidentifyTemplatesExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDeidentifyTemplatesTest5() throws Exception { - DeidentifyTemplate responsesElement = DeidentifyTemplate.newBuilder().build(); - ListDeidentifyTemplatesResponse expectedResponse = - ListDeidentifyTemplatesResponse.newBuilder() - .setNextPageToken("") - .addAllDeidentifyTemplates(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListDeidentifyTemplatesPagedResponse pagedListResponse = client.listDeidentifyTemplates(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDeidentifyTemplatesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDeidentifyTemplatesRequest actualRequest = - ((ListDeidentifyTemplatesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDeidentifyTemplatesExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listDeidentifyTemplates(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDeidentifyTemplateTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - - client.deleteDeidentifyTemplate(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteDeidentifyTemplateRequest actualRequest = - ((DeleteDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteDeidentifyTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - DeidentifyTemplateName name = - DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName( - "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]"); - client.deleteDeidentifyTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDeidentifyTemplateTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteDeidentifyTemplate(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteDeidentifyTemplateRequest actualRequest = - ((DeleteDeidentifyTemplateRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteDeidentifyTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.deleteDeidentifyTemplate(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createJobTriggerTest() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - - JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateJobTriggerRequest actualRequest = ((CreateJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createJobTriggerExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - client.createJobTrigger(parent, jobTrigger); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createJobTriggerTest2() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - - JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateJobTriggerRequest actualRequest = ((CreateJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createJobTriggerExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - client.createJobTrigger(parent, jobTrigger); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createJobTriggerTest3() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - - JobTrigger actualResponse = client.createJobTrigger(parent, jobTrigger); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateJobTriggerRequest actualRequest = ((CreateJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createJobTriggerExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - client.createJobTrigger(parent, jobTrigger); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateJobTriggerTest() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - JobTrigger actualResponse = client.updateJobTrigger(name, jobTrigger, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateJobTriggerRequest actualRequest = ((UpdateJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateJobTriggerExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateJobTrigger(name, jobTrigger, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateJobTriggerTest2() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - JobTrigger actualResponse = client.updateJobTrigger(name, jobTrigger, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateJobTriggerRequest actualRequest = ((UpdateJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(jobTrigger, actualRequest.getJobTrigger()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateJobTriggerExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - JobTrigger jobTrigger = JobTrigger.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateJobTrigger(name, jobTrigger, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void hybridInspectJobTriggerTest() throws Exception { - HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - JobTriggerName name = - JobTriggerName.ofProjectLocationJobTriggerName("[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]"); - - HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - HybridInspectJobTriggerRequest actualRequest = - ((HybridInspectJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void hybridInspectJobTriggerExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - JobTriggerName name = - JobTriggerName.ofProjectLocationJobTriggerName( - "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]"); - client.hybridInspectJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void hybridInspectJobTriggerTest2() throws Exception { - HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - HybridInspectResponse actualResponse = client.hybridInspectJobTrigger(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - HybridInspectJobTriggerRequest actualRequest = - ((HybridInspectJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void hybridInspectJobTriggerExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.hybridInspectJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getJobTriggerTest() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - - JobTrigger actualResponse = client.getJobTrigger(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetJobTriggerRequest actualRequest = ((GetJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getJobTriggerExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - client.getJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getJobTriggerTest2() throws Exception { - JobTrigger expectedResponse = - JobTrigger.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .setDisplayName("displayName1714148973") - .setDescription("description-1724546052") - .addAllTriggers(new ArrayList()) - .addAllErrors(new ArrayList()) - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setLastRunTime(Timestamp.newBuilder().build()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - JobTrigger actualResponse = client.getJobTrigger(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetJobTriggerRequest actualRequest = ((GetJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getJobTriggerExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.getJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listJobTriggersTest() throws Exception { - JobTrigger responsesElement = JobTrigger.newBuilder().build(); - ListJobTriggersResponse expectedResponse = - ListJobTriggersResponse.newBuilder() - .setNextPageToken("") - .addAllJobTriggers(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListJobTriggersRequest actualRequest = ((ListJobTriggersRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listJobTriggersExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listJobTriggers(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listJobTriggersTest2() throws Exception { - JobTrigger responsesElement = JobTrigger.newBuilder().build(); - ListJobTriggersResponse expectedResponse = - ListJobTriggersResponse.newBuilder() - .setNextPageToken("") - .addAllJobTriggers(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListJobTriggersRequest actualRequest = ((ListJobTriggersRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listJobTriggersExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listJobTriggers(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listJobTriggersTest3() throws Exception { - JobTrigger responsesElement = JobTrigger.newBuilder().build(); - ListJobTriggersResponse expectedResponse = - ListJobTriggersResponse.newBuilder() - .setNextPageToken("") - .addAllJobTriggers(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListJobTriggersPagedResponse pagedListResponse = client.listJobTriggers(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobTriggersList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListJobTriggersRequest actualRequest = ((ListJobTriggersRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listJobTriggersExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listJobTriggers(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteJobTriggerTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - - client.deleteJobTrigger(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteJobTriggerRequest actualRequest = ((DeleteJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteJobTriggerExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]"); - client.deleteJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteJobTriggerTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteJobTrigger(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteJobTriggerRequest actualRequest = ((DeleteJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteJobTriggerExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.deleteJobTrigger(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void activateJobTriggerTest() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - ActivateJobTriggerRequest request = - ActivateJobTriggerRequest.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .build(); - - DlpJob actualResponse = client.activateJobTrigger(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ActivateJobTriggerRequest actualRequest = ((ActivateJobTriggerRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void activateJobTriggerExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ActivateJobTriggerRequest request = - ActivateJobTriggerRequest.newBuilder() - .setName( - JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString()) - .build(); - client.activateJobTrigger(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, inspectJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(inspectJob, actualRequest.getInspectJob()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDlpJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - client.createDlpJob(parent, inspectJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest2() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, riskJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(riskJob, actualRequest.getRiskJob()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDlpJobExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - client.createDlpJob(parent, riskJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest3() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, inspectJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(inspectJob, actualRequest.getInspectJob()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDlpJobExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - client.createDlpJob(parent, inspectJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest4() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, riskJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(riskJob, actualRequest.getRiskJob()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDlpJobExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - client.createDlpJob(parent, riskJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest5() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, inspectJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(inspectJob, actualRequest.getInspectJob()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDlpJobExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build(); - client.createDlpJob(parent, inspectJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createDlpJobTest6() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - - DlpJob actualResponse = client.createDlpJob(parent, riskJob); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDlpJobRequest actualRequest = ((CreateDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(riskJob, actualRequest.getRiskJob()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createDlpJobExceptionTest6() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build(); - client.createDlpJob(parent, riskJob); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDlpJobsTest() throws Exception { - DlpJob responsesElement = DlpJob.newBuilder().build(); - ListDlpJobsResponse expectedResponse = - ListDlpJobsResponse.newBuilder() - .setNextPageToken("") - .addAllJobs(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDlpJobsRequest actualRequest = ((ListDlpJobsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDlpJobsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listDlpJobs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDlpJobsTest2() throws Exception { - DlpJob responsesElement = DlpJob.newBuilder().build(); - ListDlpJobsResponse expectedResponse = - ListDlpJobsResponse.newBuilder() - .setNextPageToken("") - .addAllJobs(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDlpJobsRequest actualRequest = ((ListDlpJobsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDlpJobsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listDlpJobs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listDlpJobsTest3() throws Exception { - DlpJob responsesElement = DlpJob.newBuilder().build(); - ListDlpJobsResponse expectedResponse = - ListDlpJobsResponse.newBuilder() - .setNextPageToken("") - .addAllJobs(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListDlpJobsPagedResponse pagedListResponse = client.listDlpJobs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getJobsList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDlpJobsRequest actualRequest = ((ListDlpJobsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listDlpJobsExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listDlpJobs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDlpJobTest() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); - - DlpJob actualResponse = client.getDlpJob(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetDlpJobRequest actualRequest = ((GetDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getDlpJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); - client.getDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getDlpJobTest2() throws Exception { - DlpJob expectedResponse = - DlpJob.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .setType(DlpJobType.forNumber(0)) - .setCreateTime(Timestamp.newBuilder().build()) - .setStartTime(Timestamp.newBuilder().build()) - .setEndTime(Timestamp.newBuilder().build()) - .setJobTriggerName("jobTriggerName494333030") - .addAllErrors(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - DlpJob actualResponse = client.getDlpJob(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetDlpJobRequest actualRequest = ((GetDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getDlpJobExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.getDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDlpJobTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); - - client.deleteDlpJob(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteDlpJobRequest actualRequest = ((DeleteDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteDlpJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]"); - client.deleteDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteDlpJobTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteDlpJob(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteDlpJobRequest actualRequest = ((DeleteDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteDlpJobExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.deleteDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void cancelDlpJobTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - CancelDlpJobRequest request = - CancelDlpJobRequest.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .build(); - - client.cancelDlpJob(request); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CancelDlpJobRequest actualRequest = ((CancelDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void cancelDlpJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - CancelDlpJobRequest request = - CancelDlpJobRequest.newBuilder() - .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString()) - .build(); - client.cancelDlpJob(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateStoredInfoTypeRequest actualRequest = - ((CreateStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(config, actualRequest.getConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createStoredInfoTypeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest2() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateStoredInfoTypeRequest actualRequest = - ((CreateStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(config, actualRequest.getConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createStoredInfoTypeExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest3() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateStoredInfoTypeRequest actualRequest = - ((CreateStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(config, actualRequest.getConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createStoredInfoTypeExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest4() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateStoredInfoTypeRequest actualRequest = - ((CreateStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(config, actualRequest.getConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createStoredInfoTypeExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createStoredInfoTypeTest5() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - - StoredInfoType actualResponse = client.createStoredInfoType(parent, config); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateStoredInfoTypeRequest actualRequest = - ((CreateStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(config, actualRequest.getConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createStoredInfoTypeExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - client.createStoredInfoType(parent, config); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateStoredInfoTypeTest() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - StoredInfoType actualResponse = client.updateStoredInfoType(name, config, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateStoredInfoTypeRequest actualRequest = - ((UpdateStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertEquals(config, actualRequest.getConfig()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateStoredInfoTypeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]"); - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateStoredInfoType(name, config, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateStoredInfoTypeTest2() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - StoredInfoType actualResponse = client.updateStoredInfoType(name, config, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateStoredInfoTypeRequest actualRequest = - ((UpdateStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertEquals(config, actualRequest.getConfig()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateStoredInfoTypeExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateStoredInfoType(name, config, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getStoredInfoTypeTest() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); - - StoredInfoType actualResponse = client.getStoredInfoType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetStoredInfoTypeRequest actualRequest = ((GetStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getStoredInfoTypeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]"); - client.getStoredInfoType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getStoredInfoTypeTest2() throws Exception { - StoredInfoType expectedResponse = - StoredInfoType.newBuilder() - .setName( - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]") - .toString()) - .setCurrentVersion(StoredInfoTypeVersion.newBuilder().build()) - .addAllPendingVersions(new ArrayList()) - .build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - StoredInfoType actualResponse = client.getStoredInfoType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetStoredInfoTypeRequest actualRequest = ((GetStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getStoredInfoTypeExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.getStoredInfoType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listStoredInfoTypesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest2() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listStoredInfoTypesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest3() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listStoredInfoTypesExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest4() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listStoredInfoTypesExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listStoredInfoTypesTest5() throws Exception { - StoredInfoType responsesElement = StoredInfoType.newBuilder().build(); - ListStoredInfoTypesResponse expectedResponse = - ListStoredInfoTypesResponse.newBuilder() - .setNextPageToken("") - .addAllStoredInfoTypes(Arrays.asList(responsesElement)) - .build(); - mockDlpService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListStoredInfoTypesPagedResponse pagedListResponse = client.listStoredInfoTypes(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getStoredInfoTypesList().get(0), resources.get(0)); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListStoredInfoTypesRequest actualRequest = ((ListStoredInfoTypesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listStoredInfoTypesExceptionTest5() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listStoredInfoTypes(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteStoredInfoTypeTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]"); - - client.deleteStoredInfoType(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteStoredInfoTypeRequest actualRequest = - ((DeleteStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteStoredInfoTypeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - StoredInfoTypeName name = - StoredInfoTypeName.ofOrganizationStoredInfoTypeName( - "[ORGANIZATION]", "[STORED_INFO_TYPE]"); - client.deleteStoredInfoType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteStoredInfoTypeTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteStoredInfoType(name); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteStoredInfoTypeRequest actualRequest = - ((DeleteStoredInfoTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteStoredInfoTypeExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.deleteStoredInfoType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void hybridInspectDlpJobTest() throws Exception { - HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - DlpJobName name = - DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]"); - - HybridInspectResponse actualResponse = client.hybridInspectDlpJob(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - HybridInspectDlpJobRequest actualRequest = ((HybridInspectDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void hybridInspectDlpJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - DlpJobName name = - DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]"); - client.hybridInspectDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void hybridInspectDlpJobTest2() throws Exception { - HybridInspectResponse expectedResponse = HybridInspectResponse.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - String name = "name3373707"; - - HybridInspectResponse actualResponse = client.hybridInspectDlpJob(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - HybridInspectDlpJobRequest actualRequest = ((HybridInspectDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void hybridInspectDlpJobExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - String name = "name3373707"; - client.hybridInspectDlpJob(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void finishDlpJobTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockDlpService.addResponse(expectedResponse); - - FinishDlpJobRequest request = - FinishDlpJobRequest.newBuilder() - .setName( - DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]") - .toString()) - .build(); - - client.finishDlpJob(request); - - List actualRequests = mockDlpService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - FinishDlpJobRequest actualRequest = ((FinishDlpJobRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getName(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void finishDlpJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockDlpService.addException(exception); - - try { - FinishDlpJobRequest request = - FinishDlpJobRequest.newBuilder() - .setName( - DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]") - .toString()) - .build(); - client.finishDlpJob(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpService.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpService.java deleted file mode 100644 index c6070b99e2eb..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockDlpService implements MockGrpcService { - private final MockDlpServiceImpl serviceImpl; - - public MockDlpService() { - serviceImpl = new MockDlpServiceImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpServiceImpl.java b/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpServiceImpl.java deleted file mode 100644 index 9bc133f0b16a..000000000000 --- a/owl-bot-staging/java-dlp/v2/google-cloud-dlp/src/test/java/com/google/cloud/dlp/v2/MockDlpServiceImpl.java +++ /dev/null @@ -1,828 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.dlp.v2; - -import com.google.api.core.BetaApi; -import com.google.privacy.dlp.v2.ActivateJobTriggerRequest; -import com.google.privacy.dlp.v2.CancelDlpJobRequest; -import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.CreateDlpJobRequest; -import com.google.privacy.dlp.v2.CreateInspectTemplateRequest; -import com.google.privacy.dlp.v2.CreateJobTriggerRequest; -import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DeidentifyContentRequest; -import com.google.privacy.dlp.v2.DeidentifyContentResponse; -import com.google.privacy.dlp.v2.DeidentifyTemplate; -import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.DeleteDlpJobRequest; -import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; -import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; -import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.DlpJob; -import com.google.privacy.dlp.v2.DlpServiceGrpc.DlpServiceImplBase; -import com.google.privacy.dlp.v2.FinishDlpJobRequest; -import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.GetDlpJobRequest; -import com.google.privacy.dlp.v2.GetInspectTemplateRequest; -import com.google.privacy.dlp.v2.GetJobTriggerRequest; -import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest; -import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest; -import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest; -import com.google.privacy.dlp.v2.HybridInspectResponse; -import com.google.privacy.dlp.v2.InspectContentRequest; -import com.google.privacy.dlp.v2.InspectContentResponse; -import com.google.privacy.dlp.v2.InspectTemplate; -import com.google.privacy.dlp.v2.JobTrigger; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; -import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; -import com.google.privacy.dlp.v2.ListDlpJobsRequest; -import com.google.privacy.dlp.v2.ListDlpJobsResponse; -import com.google.privacy.dlp.v2.ListInfoTypesRequest; -import com.google.privacy.dlp.v2.ListInfoTypesResponse; -import com.google.privacy.dlp.v2.ListInspectTemplatesRequest; -import com.google.privacy.dlp.v2.ListInspectTemplatesResponse; -import com.google.privacy.dlp.v2.ListJobTriggersRequest; -import com.google.privacy.dlp.v2.ListJobTriggersResponse; -import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; -import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; -import com.google.privacy.dlp.v2.RedactImageRequest; -import com.google.privacy.dlp.v2.RedactImageResponse; -import com.google.privacy.dlp.v2.ReidentifyContentRequest; -import com.google.privacy.dlp.v2.ReidentifyContentResponse; -import com.google.privacy.dlp.v2.StoredInfoType; -import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; -import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; -import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; -import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockDlpServiceImpl extends DlpServiceImplBase { - private List requests; - private Queue responses; - - public MockDlpServiceImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void inspectContent( - InspectContentRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof InspectContentResponse) { - requests.add(request); - responseObserver.onNext(((InspectContentResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method InspectContent, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - InspectContentResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void redactImage( - RedactImageRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof RedactImageResponse) { - requests.add(request); - responseObserver.onNext(((RedactImageResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method RedactImage, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - RedactImageResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deidentifyContent( - DeidentifyContentRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DeidentifyContentResponse) { - requests.add(request); - responseObserver.onNext(((DeidentifyContentResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeidentifyContent, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DeidentifyContentResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void reidentifyContent( - ReidentifyContentRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ReidentifyContentResponse) { - requests.add(request); - responseObserver.onNext(((ReidentifyContentResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ReidentifyContent, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ReidentifyContentResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listInfoTypes( - ListInfoTypesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListInfoTypesResponse) { - requests.add(request); - responseObserver.onNext(((ListInfoTypesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListInfoTypes, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListInfoTypesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createInspectTemplate( - CreateInspectTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof InspectTemplate) { - requests.add(request); - responseObserver.onNext(((InspectTemplate) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateInspectTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - InspectTemplate.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateInspectTemplate( - UpdateInspectTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof InspectTemplate) { - requests.add(request); - responseObserver.onNext(((InspectTemplate) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateInspectTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - InspectTemplate.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getInspectTemplate( - GetInspectTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof InspectTemplate) { - requests.add(request); - responseObserver.onNext(((InspectTemplate) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetInspectTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - InspectTemplate.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listInspectTemplates( - ListInspectTemplatesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListInspectTemplatesResponse) { - requests.add(request); - responseObserver.onNext(((ListInspectTemplatesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListInspectTemplates, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListInspectTemplatesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteInspectTemplate( - DeleteInspectTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteInspectTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createDeidentifyTemplate( - CreateDeidentifyTemplateRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DeidentifyTemplate) { - requests.add(request); - responseObserver.onNext(((DeidentifyTemplate) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateDeidentifyTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DeidentifyTemplate.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateDeidentifyTemplate( - UpdateDeidentifyTemplateRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DeidentifyTemplate) { - requests.add(request); - responseObserver.onNext(((DeidentifyTemplate) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateDeidentifyTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DeidentifyTemplate.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getDeidentifyTemplate( - GetDeidentifyTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DeidentifyTemplate) { - requests.add(request); - responseObserver.onNext(((DeidentifyTemplate) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetDeidentifyTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DeidentifyTemplate.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listDeidentifyTemplates( - ListDeidentifyTemplatesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListDeidentifyTemplatesResponse) { - requests.add(request); - responseObserver.onNext(((ListDeidentifyTemplatesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListDeidentifyTemplates, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListDeidentifyTemplatesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteDeidentifyTemplate( - DeleteDeidentifyTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteDeidentifyTemplate, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createJobTrigger( - CreateJobTriggerRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof JobTrigger) { - requests.add(request); - responseObserver.onNext(((JobTrigger) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateJobTrigger, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - JobTrigger.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateJobTrigger( - UpdateJobTriggerRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof JobTrigger) { - requests.add(request); - responseObserver.onNext(((JobTrigger) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateJobTrigger, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - JobTrigger.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void hybridInspectJobTrigger( - HybridInspectJobTriggerRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof HybridInspectResponse) { - requests.add(request); - responseObserver.onNext(((HybridInspectResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method HybridInspectJobTrigger, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HybridInspectResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getJobTrigger( - GetJobTriggerRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof JobTrigger) { - requests.add(request); - responseObserver.onNext(((JobTrigger) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetJobTrigger, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - JobTrigger.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listJobTriggers( - ListJobTriggersRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListJobTriggersResponse) { - requests.add(request); - responseObserver.onNext(((ListJobTriggersResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListJobTriggers, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListJobTriggersResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteJobTrigger( - DeleteJobTriggerRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteJobTrigger, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void activateJobTrigger( - ActivateJobTriggerRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DlpJob) { - requests.add(request); - responseObserver.onNext(((DlpJob) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ActivateJobTrigger, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DlpJob.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createDlpJob(CreateDlpJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DlpJob) { - requests.add(request); - responseObserver.onNext(((DlpJob) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateDlpJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DlpJob.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listDlpJobs( - ListDlpJobsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListDlpJobsResponse) { - requests.add(request); - responseObserver.onNext(((ListDlpJobsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListDlpJobs, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListDlpJobsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getDlpJob(GetDlpJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof DlpJob) { - requests.add(request); - responseObserver.onNext(((DlpJob) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetDlpJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - DlpJob.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteDlpJob(DeleteDlpJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteDlpJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void cancelDlpJob(CancelDlpJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CancelDlpJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createStoredInfoType( - CreateStoredInfoTypeRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof StoredInfoType) { - requests.add(request); - responseObserver.onNext(((StoredInfoType) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateStoredInfoType, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - StoredInfoType.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateStoredInfoType( - UpdateStoredInfoTypeRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof StoredInfoType) { - requests.add(request); - responseObserver.onNext(((StoredInfoType) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateStoredInfoType, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - StoredInfoType.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getStoredInfoType( - GetStoredInfoTypeRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof StoredInfoType) { - requests.add(request); - responseObserver.onNext(((StoredInfoType) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetStoredInfoType, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - StoredInfoType.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listStoredInfoTypes( - ListStoredInfoTypesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListStoredInfoTypesResponse) { - requests.add(request); - responseObserver.onNext(((ListStoredInfoTypesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListStoredInfoTypes, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListStoredInfoTypesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteStoredInfoType( - DeleteStoredInfoTypeRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteStoredInfoType, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void hybridInspectDlpJob( - HybridInspectDlpJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof HybridInspectResponse) { - requests.add(request); - responseObserver.onNext(((HybridInspectResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method HybridInspectDlpJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HybridInspectResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void finishDlpJob(FinishDlpJobRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method FinishDlpJob, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java b/owl-bot-staging/java-dlp/v2/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java deleted file mode 100644 index b513b785c61e..000000000000 --- a/owl-bot-staging/java-dlp/v2/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java +++ /dev/null @@ -1,3496 +0,0 @@ -package com.google.privacy.dlp.v2; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
- * to detect the presence of Personally Identifiable Information (PII) and other
- * privacy-sensitive data in user-supplied, unstructured data streams, like text
- * blocks or images.
- * The service also includes methods for sensitive data redaction and
- * scheduling of data scans on Google Cloud Platform based data sets.
- * To learn more about concepts and find how-to guides see
- * https://cloud.google.com/dlp/docs/.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/privacy/dlp/v2/dlp.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class DlpServiceGrpc { - - private DlpServiceGrpc() {} - - public static final String SERVICE_NAME = "google.privacy.dlp.v2.DlpService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getInspectContentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "InspectContent", - requestType = com.google.privacy.dlp.v2.InspectContentRequest.class, - responseType = com.google.privacy.dlp.v2.InspectContentResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getInspectContentMethod() { - io.grpc.MethodDescriptor getInspectContentMethod; - if ((getInspectContentMethod = DlpServiceGrpc.getInspectContentMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getInspectContentMethod = DlpServiceGrpc.getInspectContentMethod) == null) { - DlpServiceGrpc.getInspectContentMethod = getInspectContentMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "InspectContent")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.InspectContentRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.InspectContentResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("InspectContent")) - .build(); - } - } - } - return getInspectContentMethod; - } - - private static volatile io.grpc.MethodDescriptor getRedactImageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RedactImage", - requestType = com.google.privacy.dlp.v2.RedactImageRequest.class, - responseType = com.google.privacy.dlp.v2.RedactImageResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRedactImageMethod() { - io.grpc.MethodDescriptor getRedactImageMethod; - if ((getRedactImageMethod = DlpServiceGrpc.getRedactImageMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getRedactImageMethod = DlpServiceGrpc.getRedactImageMethod) == null) { - DlpServiceGrpc.getRedactImageMethod = getRedactImageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RedactImage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.RedactImageResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("RedactImage")) - .build(); - } - } - } - return getRedactImageMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeidentifyContentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeidentifyContent", - requestType = com.google.privacy.dlp.v2.DeidentifyContentRequest.class, - responseType = com.google.privacy.dlp.v2.DeidentifyContentResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeidentifyContentMethod() { - io.grpc.MethodDescriptor getDeidentifyContentMethod; - if ((getDeidentifyContentMethod = DlpServiceGrpc.getDeidentifyContentMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getDeidentifyContentMethod = DlpServiceGrpc.getDeidentifyContentMethod) == null) { - DlpServiceGrpc.getDeidentifyContentMethod = getDeidentifyContentMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeidentifyContent")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeidentifyContentRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeidentifyContentResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeidentifyContent")) - .build(); - } - } - } - return getDeidentifyContentMethod; - } - - private static volatile io.grpc.MethodDescriptor getReidentifyContentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ReidentifyContent", - requestType = com.google.privacy.dlp.v2.ReidentifyContentRequest.class, - responseType = com.google.privacy.dlp.v2.ReidentifyContentResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getReidentifyContentMethod() { - io.grpc.MethodDescriptor getReidentifyContentMethod; - if ((getReidentifyContentMethod = DlpServiceGrpc.getReidentifyContentMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getReidentifyContentMethod = DlpServiceGrpc.getReidentifyContentMethod) == null) { - DlpServiceGrpc.getReidentifyContentMethod = getReidentifyContentMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReidentifyContent")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ReidentifyContentRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ReidentifyContentResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ReidentifyContent")) - .build(); - } - } - } - return getReidentifyContentMethod; - } - - private static volatile io.grpc.MethodDescriptor getListInfoTypesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListInfoTypes", - requestType = com.google.privacy.dlp.v2.ListInfoTypesRequest.class, - responseType = com.google.privacy.dlp.v2.ListInfoTypesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListInfoTypesMethod() { - io.grpc.MethodDescriptor getListInfoTypesMethod; - if ((getListInfoTypesMethod = DlpServiceGrpc.getListInfoTypesMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getListInfoTypesMethod = DlpServiceGrpc.getListInfoTypesMethod) == null) { - DlpServiceGrpc.getListInfoTypesMethod = getListInfoTypesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInfoTypes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListInfoTypesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListInfoTypesResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListInfoTypes")) - .build(); - } - } - } - return getListInfoTypesMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateInspectTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateInspectTemplate", - requestType = com.google.privacy.dlp.v2.CreateInspectTemplateRequest.class, - responseType = com.google.privacy.dlp.v2.InspectTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateInspectTemplateMethod() { - io.grpc.MethodDescriptor getCreateInspectTemplateMethod; - if ((getCreateInspectTemplateMethod = DlpServiceGrpc.getCreateInspectTemplateMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getCreateInspectTemplateMethod = DlpServiceGrpc.getCreateInspectTemplateMethod) == null) { - DlpServiceGrpc.getCreateInspectTemplateMethod = getCreateInspectTemplateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInspectTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.CreateInspectTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateInspectTemplate")) - .build(); - } - } - } - return getCreateInspectTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateInspectTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateInspectTemplate", - requestType = com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.class, - responseType = com.google.privacy.dlp.v2.InspectTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateInspectTemplateMethod() { - io.grpc.MethodDescriptor getUpdateInspectTemplateMethod; - if ((getUpdateInspectTemplateMethod = DlpServiceGrpc.getUpdateInspectTemplateMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getUpdateInspectTemplateMethod = DlpServiceGrpc.getUpdateInspectTemplateMethod) == null) { - DlpServiceGrpc.getUpdateInspectTemplateMethod = getUpdateInspectTemplateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInspectTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("UpdateInspectTemplate")) - .build(); - } - } - } - return getUpdateInspectTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetInspectTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetInspectTemplate", - requestType = com.google.privacy.dlp.v2.GetInspectTemplateRequest.class, - responseType = com.google.privacy.dlp.v2.InspectTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetInspectTemplateMethod() { - io.grpc.MethodDescriptor getGetInspectTemplateMethod; - if ((getGetInspectTemplateMethod = DlpServiceGrpc.getGetInspectTemplateMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getGetInspectTemplateMethod = DlpServiceGrpc.getGetInspectTemplateMethod) == null) { - DlpServiceGrpc.getGetInspectTemplateMethod = getGetInspectTemplateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInspectTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.GetInspectTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetInspectTemplate")) - .build(); - } - } - } - return getGetInspectTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor getListInspectTemplatesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListInspectTemplates", - requestType = com.google.privacy.dlp.v2.ListInspectTemplatesRequest.class, - responseType = com.google.privacy.dlp.v2.ListInspectTemplatesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListInspectTemplatesMethod() { - io.grpc.MethodDescriptor getListInspectTemplatesMethod; - if ((getListInspectTemplatesMethod = DlpServiceGrpc.getListInspectTemplatesMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getListInspectTemplatesMethod = DlpServiceGrpc.getListInspectTemplatesMethod) == null) { - DlpServiceGrpc.getListInspectTemplatesMethod = getListInspectTemplatesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInspectTemplates")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListInspectTemplatesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListInspectTemplatesResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListInspectTemplates")) - .build(); - } - } - } - return getListInspectTemplatesMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteInspectTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteInspectTemplate", - requestType = com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteInspectTemplateMethod() { - io.grpc.MethodDescriptor getDeleteInspectTemplateMethod; - if ((getDeleteInspectTemplateMethod = DlpServiceGrpc.getDeleteInspectTemplateMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getDeleteInspectTemplateMethod = DlpServiceGrpc.getDeleteInspectTemplateMethod) == null) { - DlpServiceGrpc.getDeleteInspectTemplateMethod = getDeleteInspectTemplateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInspectTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteInspectTemplate")) - .build(); - } - } - } - return getDeleteInspectTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateDeidentifyTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateDeidentifyTemplate", - requestType = com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.class, - responseType = com.google.privacy.dlp.v2.DeidentifyTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateDeidentifyTemplateMethod() { - io.grpc.MethodDescriptor getCreateDeidentifyTemplateMethod; - if ((getCreateDeidentifyTemplateMethod = DlpServiceGrpc.getCreateDeidentifyTemplateMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getCreateDeidentifyTemplateMethod = DlpServiceGrpc.getCreateDeidentifyTemplateMethod) == null) { - DlpServiceGrpc.getCreateDeidentifyTemplateMethod = getCreateDeidentifyTemplateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDeidentifyTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateDeidentifyTemplate")) - .build(); - } - } - } - return getCreateDeidentifyTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateDeidentifyTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateDeidentifyTemplate", - requestType = com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.class, - responseType = com.google.privacy.dlp.v2.DeidentifyTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateDeidentifyTemplateMethod() { - io.grpc.MethodDescriptor getUpdateDeidentifyTemplateMethod; - if ((getUpdateDeidentifyTemplateMethod = DlpServiceGrpc.getUpdateDeidentifyTemplateMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getUpdateDeidentifyTemplateMethod = DlpServiceGrpc.getUpdateDeidentifyTemplateMethod) == null) { - DlpServiceGrpc.getUpdateDeidentifyTemplateMethod = getUpdateDeidentifyTemplateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDeidentifyTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("UpdateDeidentifyTemplate")) - .build(); - } - } - } - return getUpdateDeidentifyTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetDeidentifyTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetDeidentifyTemplate", - requestType = com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.class, - responseType = com.google.privacy.dlp.v2.DeidentifyTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetDeidentifyTemplateMethod() { - io.grpc.MethodDescriptor getGetDeidentifyTemplateMethod; - if ((getGetDeidentifyTemplateMethod = DlpServiceGrpc.getGetDeidentifyTemplateMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getGetDeidentifyTemplateMethod = DlpServiceGrpc.getGetDeidentifyTemplateMethod) == null) { - DlpServiceGrpc.getGetDeidentifyTemplateMethod = getGetDeidentifyTemplateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDeidentifyTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetDeidentifyTemplate")) - .build(); - } - } - } - return getGetDeidentifyTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor getListDeidentifyTemplatesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListDeidentifyTemplates", - requestType = com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.class, - responseType = com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListDeidentifyTemplatesMethod() { - io.grpc.MethodDescriptor getListDeidentifyTemplatesMethod; - if ((getListDeidentifyTemplatesMethod = DlpServiceGrpc.getListDeidentifyTemplatesMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getListDeidentifyTemplatesMethod = DlpServiceGrpc.getListDeidentifyTemplatesMethod) == null) { - DlpServiceGrpc.getListDeidentifyTemplatesMethod = getListDeidentifyTemplatesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDeidentifyTemplates")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListDeidentifyTemplates")) - .build(); - } - } - } - return getListDeidentifyTemplatesMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteDeidentifyTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteDeidentifyTemplate", - requestType = com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteDeidentifyTemplateMethod() { - io.grpc.MethodDescriptor getDeleteDeidentifyTemplateMethod; - if ((getDeleteDeidentifyTemplateMethod = DlpServiceGrpc.getDeleteDeidentifyTemplateMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getDeleteDeidentifyTemplateMethod = DlpServiceGrpc.getDeleteDeidentifyTemplateMethod) == null) { - DlpServiceGrpc.getDeleteDeidentifyTemplateMethod = getDeleteDeidentifyTemplateMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDeidentifyTemplate")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteDeidentifyTemplate")) - .build(); - } - } - } - return getDeleteDeidentifyTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateJobTriggerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateJobTrigger", - requestType = com.google.privacy.dlp.v2.CreateJobTriggerRequest.class, - responseType = com.google.privacy.dlp.v2.JobTrigger.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateJobTriggerMethod() { - io.grpc.MethodDescriptor getCreateJobTriggerMethod; - if ((getCreateJobTriggerMethod = DlpServiceGrpc.getCreateJobTriggerMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getCreateJobTriggerMethod = DlpServiceGrpc.getCreateJobTriggerMethod) == null) { - DlpServiceGrpc.getCreateJobTriggerMethod = getCreateJobTriggerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateJobTrigger")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.CreateJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateJobTrigger")) - .build(); - } - } - } - return getCreateJobTriggerMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateJobTriggerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateJobTrigger", - requestType = com.google.privacy.dlp.v2.UpdateJobTriggerRequest.class, - responseType = com.google.privacy.dlp.v2.JobTrigger.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateJobTriggerMethod() { - io.grpc.MethodDescriptor getUpdateJobTriggerMethod; - if ((getUpdateJobTriggerMethod = DlpServiceGrpc.getUpdateJobTriggerMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getUpdateJobTriggerMethod = DlpServiceGrpc.getUpdateJobTriggerMethod) == null) { - DlpServiceGrpc.getUpdateJobTriggerMethod = getUpdateJobTriggerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateJobTrigger")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.UpdateJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("UpdateJobTrigger")) - .build(); - } - } - } - return getUpdateJobTriggerMethod; - } - - private static volatile io.grpc.MethodDescriptor getHybridInspectJobTriggerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "HybridInspectJobTrigger", - requestType = com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.class, - responseType = com.google.privacy.dlp.v2.HybridInspectResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getHybridInspectJobTriggerMethod() { - io.grpc.MethodDescriptor getHybridInspectJobTriggerMethod; - if ((getHybridInspectJobTriggerMethod = DlpServiceGrpc.getHybridInspectJobTriggerMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getHybridInspectJobTriggerMethod = DlpServiceGrpc.getHybridInspectJobTriggerMethod) == null) { - DlpServiceGrpc.getHybridInspectJobTriggerMethod = getHybridInspectJobTriggerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "HybridInspectJobTrigger")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.HybridInspectResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("HybridInspectJobTrigger")) - .build(); - } - } - } - return getHybridInspectJobTriggerMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetJobTriggerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetJobTrigger", - requestType = com.google.privacy.dlp.v2.GetJobTriggerRequest.class, - responseType = com.google.privacy.dlp.v2.JobTrigger.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetJobTriggerMethod() { - io.grpc.MethodDescriptor getGetJobTriggerMethod; - if ((getGetJobTriggerMethod = DlpServiceGrpc.getGetJobTriggerMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getGetJobTriggerMethod = DlpServiceGrpc.getGetJobTriggerMethod) == null) { - DlpServiceGrpc.getGetJobTriggerMethod = getGetJobTriggerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetJobTrigger")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.GetJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetJobTrigger")) - .build(); - } - } - } - return getGetJobTriggerMethod; - } - - private static volatile io.grpc.MethodDescriptor getListJobTriggersMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListJobTriggers", - requestType = com.google.privacy.dlp.v2.ListJobTriggersRequest.class, - responseType = com.google.privacy.dlp.v2.ListJobTriggersResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListJobTriggersMethod() { - io.grpc.MethodDescriptor getListJobTriggersMethod; - if ((getListJobTriggersMethod = DlpServiceGrpc.getListJobTriggersMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getListJobTriggersMethod = DlpServiceGrpc.getListJobTriggersMethod) == null) { - DlpServiceGrpc.getListJobTriggersMethod = getListJobTriggersMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListJobTriggers")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListJobTriggersRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListJobTriggersResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListJobTriggers")) - .build(); - } - } - } - return getListJobTriggersMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteJobTriggerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteJobTrigger", - requestType = com.google.privacy.dlp.v2.DeleteJobTriggerRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteJobTriggerMethod() { - io.grpc.MethodDescriptor getDeleteJobTriggerMethod; - if ((getDeleteJobTriggerMethod = DlpServiceGrpc.getDeleteJobTriggerMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getDeleteJobTriggerMethod = DlpServiceGrpc.getDeleteJobTriggerMethod) == null) { - DlpServiceGrpc.getDeleteJobTriggerMethod = getDeleteJobTriggerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteJobTrigger")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeleteJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteJobTrigger")) - .build(); - } - } - } - return getDeleteJobTriggerMethod; - } - - private static volatile io.grpc.MethodDescriptor getActivateJobTriggerMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ActivateJobTrigger", - requestType = com.google.privacy.dlp.v2.ActivateJobTriggerRequest.class, - responseType = com.google.privacy.dlp.v2.DlpJob.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getActivateJobTriggerMethod() { - io.grpc.MethodDescriptor getActivateJobTriggerMethod; - if ((getActivateJobTriggerMethod = DlpServiceGrpc.getActivateJobTriggerMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getActivateJobTriggerMethod = DlpServiceGrpc.getActivateJobTriggerMethod) == null) { - DlpServiceGrpc.getActivateJobTriggerMethod = getActivateJobTriggerMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ActivateJobTrigger")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ActivateJobTriggerRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DlpJob.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ActivateJobTrigger")) - .build(); - } - } - } - return getActivateJobTriggerMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateDlpJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateDlpJob", - requestType = com.google.privacy.dlp.v2.CreateDlpJobRequest.class, - responseType = com.google.privacy.dlp.v2.DlpJob.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateDlpJobMethod() { - io.grpc.MethodDescriptor getCreateDlpJobMethod; - if ((getCreateDlpJobMethod = DlpServiceGrpc.getCreateDlpJobMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getCreateDlpJobMethod = DlpServiceGrpc.getCreateDlpJobMethod) == null) { - DlpServiceGrpc.getCreateDlpJobMethod = getCreateDlpJobMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDlpJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.CreateDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DlpJob.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateDlpJob")) - .build(); - } - } - } - return getCreateDlpJobMethod; - } - - private static volatile io.grpc.MethodDescriptor getListDlpJobsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListDlpJobs", - requestType = com.google.privacy.dlp.v2.ListDlpJobsRequest.class, - responseType = com.google.privacy.dlp.v2.ListDlpJobsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListDlpJobsMethod() { - io.grpc.MethodDescriptor getListDlpJobsMethod; - if ((getListDlpJobsMethod = DlpServiceGrpc.getListDlpJobsMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getListDlpJobsMethod = DlpServiceGrpc.getListDlpJobsMethod) == null) { - DlpServiceGrpc.getListDlpJobsMethod = getListDlpJobsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDlpJobs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListDlpJobsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListDlpJobsResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListDlpJobs")) - .build(); - } - } - } - return getListDlpJobsMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetDlpJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetDlpJob", - requestType = com.google.privacy.dlp.v2.GetDlpJobRequest.class, - responseType = com.google.privacy.dlp.v2.DlpJob.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetDlpJobMethod() { - io.grpc.MethodDescriptor getGetDlpJobMethod; - if ((getGetDlpJobMethod = DlpServiceGrpc.getGetDlpJobMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getGetDlpJobMethod = DlpServiceGrpc.getGetDlpJobMethod) == null) { - DlpServiceGrpc.getGetDlpJobMethod = getGetDlpJobMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDlpJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.GetDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DlpJob.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetDlpJob")) - .build(); - } - } - } - return getGetDlpJobMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteDlpJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteDlpJob", - requestType = com.google.privacy.dlp.v2.DeleteDlpJobRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteDlpJobMethod() { - io.grpc.MethodDescriptor getDeleteDlpJobMethod; - if ((getDeleteDlpJobMethod = DlpServiceGrpc.getDeleteDlpJobMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getDeleteDlpJobMethod = DlpServiceGrpc.getDeleteDlpJobMethod) == null) { - DlpServiceGrpc.getDeleteDlpJobMethod = getDeleteDlpJobMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDlpJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeleteDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteDlpJob")) - .build(); - } - } - } - return getDeleteDlpJobMethod; - } - - private static volatile io.grpc.MethodDescriptor getCancelDlpJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CancelDlpJob", - requestType = com.google.privacy.dlp.v2.CancelDlpJobRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCancelDlpJobMethod() { - io.grpc.MethodDescriptor getCancelDlpJobMethod; - if ((getCancelDlpJobMethod = DlpServiceGrpc.getCancelDlpJobMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getCancelDlpJobMethod = DlpServiceGrpc.getCancelDlpJobMethod) == null) { - DlpServiceGrpc.getCancelDlpJobMethod = getCancelDlpJobMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelDlpJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.CancelDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CancelDlpJob")) - .build(); - } - } - } - return getCancelDlpJobMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateStoredInfoTypeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateStoredInfoType", - requestType = com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.class, - responseType = com.google.privacy.dlp.v2.StoredInfoType.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateStoredInfoTypeMethod() { - io.grpc.MethodDescriptor getCreateStoredInfoTypeMethod; - if ((getCreateStoredInfoTypeMethod = DlpServiceGrpc.getCreateStoredInfoTypeMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getCreateStoredInfoTypeMethod = DlpServiceGrpc.getCreateStoredInfoTypeMethod) == null) { - DlpServiceGrpc.getCreateStoredInfoTypeMethod = getCreateStoredInfoTypeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateStoredInfoType")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("CreateStoredInfoType")) - .build(); - } - } - } - return getCreateStoredInfoTypeMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateStoredInfoTypeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateStoredInfoType", - requestType = com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.class, - responseType = com.google.privacy.dlp.v2.StoredInfoType.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateStoredInfoTypeMethod() { - io.grpc.MethodDescriptor getUpdateStoredInfoTypeMethod; - if ((getUpdateStoredInfoTypeMethod = DlpServiceGrpc.getUpdateStoredInfoTypeMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getUpdateStoredInfoTypeMethod = DlpServiceGrpc.getUpdateStoredInfoTypeMethod) == null) { - DlpServiceGrpc.getUpdateStoredInfoTypeMethod = getUpdateStoredInfoTypeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateStoredInfoType")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("UpdateStoredInfoType")) - .build(); - } - } - } - return getUpdateStoredInfoTypeMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetStoredInfoTypeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetStoredInfoType", - requestType = com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.class, - responseType = com.google.privacy.dlp.v2.StoredInfoType.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetStoredInfoTypeMethod() { - io.grpc.MethodDescriptor getGetStoredInfoTypeMethod; - if ((getGetStoredInfoTypeMethod = DlpServiceGrpc.getGetStoredInfoTypeMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getGetStoredInfoTypeMethod = DlpServiceGrpc.getGetStoredInfoTypeMethod) == null) { - DlpServiceGrpc.getGetStoredInfoTypeMethod = getGetStoredInfoTypeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStoredInfoType")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("GetStoredInfoType")) - .build(); - } - } - } - return getGetStoredInfoTypeMethod; - } - - private static volatile io.grpc.MethodDescriptor getListStoredInfoTypesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListStoredInfoTypes", - requestType = com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.class, - responseType = com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListStoredInfoTypesMethod() { - io.grpc.MethodDescriptor getListStoredInfoTypesMethod; - if ((getListStoredInfoTypesMethod = DlpServiceGrpc.getListStoredInfoTypesMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getListStoredInfoTypesMethod = DlpServiceGrpc.getListStoredInfoTypesMethod) == null) { - DlpServiceGrpc.getListStoredInfoTypesMethod = getListStoredInfoTypesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListStoredInfoTypes")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("ListStoredInfoTypes")) - .build(); - } - } - } - return getListStoredInfoTypesMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteStoredInfoTypeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteStoredInfoType", - requestType = com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteStoredInfoTypeMethod() { - io.grpc.MethodDescriptor getDeleteStoredInfoTypeMethod; - if ((getDeleteStoredInfoTypeMethod = DlpServiceGrpc.getDeleteStoredInfoTypeMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getDeleteStoredInfoTypeMethod = DlpServiceGrpc.getDeleteStoredInfoTypeMethod) == null) { - DlpServiceGrpc.getDeleteStoredInfoTypeMethod = getDeleteStoredInfoTypeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteStoredInfoType")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("DeleteStoredInfoType")) - .build(); - } - } - } - return getDeleteStoredInfoTypeMethod; - } - - private static volatile io.grpc.MethodDescriptor getHybridInspectDlpJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "HybridInspectDlpJob", - requestType = com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.class, - responseType = com.google.privacy.dlp.v2.HybridInspectResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getHybridInspectDlpJobMethod() { - io.grpc.MethodDescriptor getHybridInspectDlpJobMethod; - if ((getHybridInspectDlpJobMethod = DlpServiceGrpc.getHybridInspectDlpJobMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getHybridInspectDlpJobMethod = DlpServiceGrpc.getHybridInspectDlpJobMethod) == null) { - DlpServiceGrpc.getHybridInspectDlpJobMethod = getHybridInspectDlpJobMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "HybridInspectDlpJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.HybridInspectResponse.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("HybridInspectDlpJob")) - .build(); - } - } - } - return getHybridInspectDlpJobMethod; - } - - private static volatile io.grpc.MethodDescriptor getFinishDlpJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "FinishDlpJob", - requestType = com.google.privacy.dlp.v2.FinishDlpJobRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getFinishDlpJobMethod() { - io.grpc.MethodDescriptor getFinishDlpJobMethod; - if ((getFinishDlpJobMethod = DlpServiceGrpc.getFinishDlpJobMethod) == null) { - synchronized (DlpServiceGrpc.class) { - if ((getFinishDlpJobMethod = DlpServiceGrpc.getFinishDlpJobMethod) == null) { - DlpServiceGrpc.getFinishDlpJobMethod = getFinishDlpJobMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FinishDlpJob")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.privacy.dlp.v2.FinishDlpJobRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new DlpServiceMethodDescriptorSupplier("FinishDlpJob")) - .build(); - } - } - } - return getFinishDlpJobMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static DlpServiceStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DlpServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DlpServiceStub(channel, callOptions); - } - }; - return DlpServiceStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static DlpServiceBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DlpServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DlpServiceBlockingStub(channel, callOptions); - } - }; - return DlpServiceBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static DlpServiceFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public DlpServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DlpServiceFutureStub(channel, callOptions); - } - }; - return DlpServiceFutureStub.newStub(factory, channel); - } - - /** - *
-   * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
-   * to detect the presence of Personally Identifiable Information (PII) and other
-   * privacy-sensitive data in user-supplied, unstructured data streams, like text
-   * blocks or images.
-   * The service also includes methods for sensitive data redaction and
-   * scheduling of data scans on Google Cloud Platform based data sets.
-   * To learn more about concepts and find how-to guides see
-   * https://cloud.google.com/dlp/docs/.
-   * 
- */ - public static abstract class DlpServiceImplBase implements io.grpc.BindableService { - - /** - *
-     * Finds potentially sensitive info in content.
-     * This method has limits on input size, processing time, and output size.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
-     * and https://cloud.google.com/dlp/docs/inspecting-text,
-     * 
- */ - public void inspectContent(com.google.privacy.dlp.v2.InspectContentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getInspectContentMethod(), responseObserver); - } - - /** - *
-     * Redacts potentially sensitive info from an image.
-     * This method has limits on input size, processing time, and output size.
-     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
-     * learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public void redactImage(com.google.privacy.dlp.v2.RedactImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRedactImageMethod(), responseObserver); - } - - /** - *
-     * De-identifies potentially sensitive info from a ContentItem.
-     * This method has limits on input size and output size.
-     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
-     * learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public void deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeidentifyContentMethod(), responseObserver); - } - - /** - *
-     * Re-identifies content that has been de-identified.
-     * See
-     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
-     * to learn more.
-     * 
- */ - public void reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReidentifyContentMethod(), responseObserver); - } - - /** - *
-     * Returns a list of the sensitive information types that DLP API
-     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
-     * learn more.
-     * 
- */ - public void listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListInfoTypesMethod(), responseObserver); - } - - /** - *
-     * Creates an InspectTemplate for reusing frequently used configuration
-     * for inspecting content, images, and storage.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateInspectTemplateMethod(), responseObserver); - } - - /** - *
-     * Updates the InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateInspectTemplateMethod(), responseObserver); - } - - /** - *
-     * Gets an InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInspectTemplateMethod(), responseObserver); - } - - /** - *
-     * Lists InspectTemplates.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListInspectTemplatesMethod(), responseObserver); - } - - /** - *
-     * Deletes an InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteInspectTemplateMethod(), responseObserver); - } - - /** - *
-     * Creates a DeidentifyTemplate for reusing frequently used configuration
-     * for de-identifying content, images, and storage.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateDeidentifyTemplateMethod(), responseObserver); - } - - /** - *
-     * Updates the DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateDeidentifyTemplateMethod(), responseObserver); - } - - /** - *
-     * Gets a DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeidentifyTemplateMethod(), responseObserver); - } - - /** - *
-     * Lists DeidentifyTemplates.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDeidentifyTemplatesMethod(), responseObserver); - } - - /** - *
-     * Deletes a DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDeidentifyTemplateMethod(), responseObserver); - } - - /** - *
-     * Creates a job trigger to run DLP actions such as scanning storage for
-     * sensitive information on a set schedule.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateJobTriggerMethod(), responseObserver); - } - - /** - *
-     * Updates a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateJobTriggerMethod(), responseObserver); - } - - /** - *
-     * Inspect hybrid content and store findings to a trigger. The inspection
-     * will be processed asynchronously. To review the findings monitor the
-     * jobs within the trigger.
-     * 
- */ - public void hybridInspectJobTrigger(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHybridInspectJobTriggerMethod(), responseObserver); - } - - /** - *
-     * Gets a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetJobTriggerMethod(), responseObserver); - } - - /** - *
-     * Lists job triggers.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListJobTriggersMethod(), responseObserver); - } - - /** - *
-     * Deletes a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteJobTriggerMethod(), responseObserver); - } - - /** - *
-     * Activate a job trigger. Causes the immediate execute of a trigger
-     * instead of waiting on the trigger event to occur.
-     * 
- */ - public void activateJobTrigger(com.google.privacy.dlp.v2.ActivateJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getActivateJobTriggerMethod(), responseObserver); - } - - /** - *
-     * Creates a new job to inspect storage or calculate risk metrics.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public void createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateDlpJobMethod(), responseObserver); - } - - /** - *
-     * Lists DlpJobs that match the specified filter in the request.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public void listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDlpJobsMethod(), responseObserver); - } - - /** - *
-     * Gets the latest state of a long-running DlpJob.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public void getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDlpJobMethod(), responseObserver); - } - - /** - *
-     * Deletes a long-running DlpJob. This method indicates that the client is
-     * no longer interested in the DlpJob result. The job will be canceled if
-     * possible.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public void deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDlpJobMethod(), responseObserver); - } - - /** - *
-     * Starts asynchronous cancellation on a long-running DlpJob. The server
-     * makes a best effort to cancel the DlpJob, but success is not
-     * guaranteed.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public void cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCancelDlpJobMethod(), responseObserver); - } - - /** - *
-     * Creates a pre-built stored infoType to be used for inspection.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void createStoredInfoType(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateStoredInfoTypeMethod(), responseObserver); - } - - /** - *
-     * Updates the stored infoType by creating a new version. The existing version
-     * will continue to be used until the new version is ready.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void updateStoredInfoType(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateStoredInfoTypeMethod(), responseObserver); - } - - /** - *
-     * Gets a stored infoType.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void getStoredInfoType(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStoredInfoTypeMethod(), responseObserver); - } - - /** - *
-     * Lists stored infoTypes.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void listStoredInfoTypes(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListStoredInfoTypesMethod(), responseObserver); - } - - /** - *
-     * Deletes a stored infoType.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void deleteStoredInfoType(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteStoredInfoTypeMethod(), responseObserver); - } - - /** - *
-     * Inspect hybrid content and store findings to a job.
-     * To review the findings, inspect the job. Inspection will occur
-     * asynchronously.
-     * 
- */ - public void hybridInspectDlpJob(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getHybridInspectDlpJobMethod(), responseObserver); - } - - /** - *
-     * Finish a running hybrid DlpJob. Triggers the finalization steps and running
-     * of any enabled actions that have not yet run.
-     * 
- */ - public void finishDlpJob(com.google.privacy.dlp.v2.FinishDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFinishDlpJobMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getInspectContentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.InspectContentRequest, - com.google.privacy.dlp.v2.InspectContentResponse>( - this, METHODID_INSPECT_CONTENT))) - .addMethod( - getRedactImageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.RedactImageRequest, - com.google.privacy.dlp.v2.RedactImageResponse>( - this, METHODID_REDACT_IMAGE))) - .addMethod( - getDeidentifyContentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.DeidentifyContentRequest, - com.google.privacy.dlp.v2.DeidentifyContentResponse>( - this, METHODID_DEIDENTIFY_CONTENT))) - .addMethod( - getReidentifyContentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.ReidentifyContentRequest, - com.google.privacy.dlp.v2.ReidentifyContentResponse>( - this, METHODID_REIDENTIFY_CONTENT))) - .addMethod( - getListInfoTypesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.ListInfoTypesRequest, - com.google.privacy.dlp.v2.ListInfoTypesResponse>( - this, METHODID_LIST_INFO_TYPES))) - .addMethod( - getCreateInspectTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.CreateInspectTemplateRequest, - com.google.privacy.dlp.v2.InspectTemplate>( - this, METHODID_CREATE_INSPECT_TEMPLATE))) - .addMethod( - getUpdateInspectTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.UpdateInspectTemplateRequest, - com.google.privacy.dlp.v2.InspectTemplate>( - this, METHODID_UPDATE_INSPECT_TEMPLATE))) - .addMethod( - getGetInspectTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.GetInspectTemplateRequest, - com.google.privacy.dlp.v2.InspectTemplate>( - this, METHODID_GET_INSPECT_TEMPLATE))) - .addMethod( - getListInspectTemplatesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.ListInspectTemplatesRequest, - com.google.privacy.dlp.v2.ListInspectTemplatesResponse>( - this, METHODID_LIST_INSPECT_TEMPLATES))) - .addMethod( - getDeleteInspectTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.DeleteInspectTemplateRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_INSPECT_TEMPLATE))) - .addMethod( - getCreateDeidentifyTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest, - com.google.privacy.dlp.v2.DeidentifyTemplate>( - this, METHODID_CREATE_DEIDENTIFY_TEMPLATE))) - .addMethod( - getUpdateDeidentifyTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest, - com.google.privacy.dlp.v2.DeidentifyTemplate>( - this, METHODID_UPDATE_DEIDENTIFY_TEMPLATE))) - .addMethod( - getGetDeidentifyTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest, - com.google.privacy.dlp.v2.DeidentifyTemplate>( - this, METHODID_GET_DEIDENTIFY_TEMPLATE))) - .addMethod( - getListDeidentifyTemplatesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest, - com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse>( - this, METHODID_LIST_DEIDENTIFY_TEMPLATES))) - .addMethod( - getDeleteDeidentifyTemplateMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_DEIDENTIFY_TEMPLATE))) - .addMethod( - getCreateJobTriggerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.CreateJobTriggerRequest, - com.google.privacy.dlp.v2.JobTrigger>( - this, METHODID_CREATE_JOB_TRIGGER))) - .addMethod( - getUpdateJobTriggerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.UpdateJobTriggerRequest, - com.google.privacy.dlp.v2.JobTrigger>( - this, METHODID_UPDATE_JOB_TRIGGER))) - .addMethod( - getHybridInspectJobTriggerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest, - com.google.privacy.dlp.v2.HybridInspectResponse>( - this, METHODID_HYBRID_INSPECT_JOB_TRIGGER))) - .addMethod( - getGetJobTriggerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.GetJobTriggerRequest, - com.google.privacy.dlp.v2.JobTrigger>( - this, METHODID_GET_JOB_TRIGGER))) - .addMethod( - getListJobTriggersMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.ListJobTriggersRequest, - com.google.privacy.dlp.v2.ListJobTriggersResponse>( - this, METHODID_LIST_JOB_TRIGGERS))) - .addMethod( - getDeleteJobTriggerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.DeleteJobTriggerRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_JOB_TRIGGER))) - .addMethod( - getActivateJobTriggerMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.ActivateJobTriggerRequest, - com.google.privacy.dlp.v2.DlpJob>( - this, METHODID_ACTIVATE_JOB_TRIGGER))) - .addMethod( - getCreateDlpJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.CreateDlpJobRequest, - com.google.privacy.dlp.v2.DlpJob>( - this, METHODID_CREATE_DLP_JOB))) - .addMethod( - getListDlpJobsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.ListDlpJobsRequest, - com.google.privacy.dlp.v2.ListDlpJobsResponse>( - this, METHODID_LIST_DLP_JOBS))) - .addMethod( - getGetDlpJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.GetDlpJobRequest, - com.google.privacy.dlp.v2.DlpJob>( - this, METHODID_GET_DLP_JOB))) - .addMethod( - getDeleteDlpJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.DeleteDlpJobRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_DLP_JOB))) - .addMethod( - getCancelDlpJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.CancelDlpJobRequest, - com.google.protobuf.Empty>( - this, METHODID_CANCEL_DLP_JOB))) - .addMethod( - getCreateStoredInfoTypeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest, - com.google.privacy.dlp.v2.StoredInfoType>( - this, METHODID_CREATE_STORED_INFO_TYPE))) - .addMethod( - getUpdateStoredInfoTypeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest, - com.google.privacy.dlp.v2.StoredInfoType>( - this, METHODID_UPDATE_STORED_INFO_TYPE))) - .addMethod( - getGetStoredInfoTypeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.GetStoredInfoTypeRequest, - com.google.privacy.dlp.v2.StoredInfoType>( - this, METHODID_GET_STORED_INFO_TYPE))) - .addMethod( - getListStoredInfoTypesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.ListStoredInfoTypesRequest, - com.google.privacy.dlp.v2.ListStoredInfoTypesResponse>( - this, METHODID_LIST_STORED_INFO_TYPES))) - .addMethod( - getDeleteStoredInfoTypeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_STORED_INFO_TYPE))) - .addMethod( - getHybridInspectDlpJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.HybridInspectDlpJobRequest, - com.google.privacy.dlp.v2.HybridInspectResponse>( - this, METHODID_HYBRID_INSPECT_DLP_JOB))) - .addMethod( - getFinishDlpJobMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.privacy.dlp.v2.FinishDlpJobRequest, - com.google.protobuf.Empty>( - this, METHODID_FINISH_DLP_JOB))) - .build(); - } - } - - /** - *
-   * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
-   * to detect the presence of Personally Identifiable Information (PII) and other
-   * privacy-sensitive data in user-supplied, unstructured data streams, like text
-   * blocks or images.
-   * The service also includes methods for sensitive data redaction and
-   * scheduling of data scans on Google Cloud Platform based data sets.
-   * To learn more about concepts and find how-to guides see
-   * https://cloud.google.com/dlp/docs/.
-   * 
- */ - public static final class DlpServiceStub extends io.grpc.stub.AbstractAsyncStub { - private DlpServiceStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DlpServiceStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DlpServiceStub(channel, callOptions); - } - - /** - *
-     * Finds potentially sensitive info in content.
-     * This method has limits on input size, processing time, and output size.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
-     * and https://cloud.google.com/dlp/docs/inspecting-text,
-     * 
- */ - public void inspectContent(com.google.privacy.dlp.v2.InspectContentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getInspectContentMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Redacts potentially sensitive info from an image.
-     * This method has limits on input size, processing time, and output size.
-     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
-     * learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public void redactImage(com.google.privacy.dlp.v2.RedactImageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRedactImageMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * De-identifies potentially sensitive info from a ContentItem.
-     * This method has limits on input size and output size.
-     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
-     * learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public void deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeidentifyContentMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Re-identifies content that has been de-identified.
-     * See
-     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
-     * to learn more.
-     * 
- */ - public void reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getReidentifyContentMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Returns a list of the sensitive information types that DLP API
-     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
-     * learn more.
-     * 
- */ - public void listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListInfoTypesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates an InspectTemplate for reusing frequently used configuration
-     * for inspecting content, images, and storage.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateInspectTemplateMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateInspectTemplateMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets an InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetInspectTemplateMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists InspectTemplates.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListInspectTemplatesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes an InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public void deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteInspectTemplateMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a DeidentifyTemplate for reusing frequently used configuration
-     * for de-identifying content, images, and storage.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateDeidentifyTemplateMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateDeidentifyTemplateMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets a DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetDeidentifyTemplateMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists DeidentifyTemplates.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListDeidentifyTemplatesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public void deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteDeidentifyTemplateMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a job trigger to run DLP actions such as scanning storage for
-     * sensitive information on a set schedule.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateJobTriggerMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateJobTriggerMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Inspect hybrid content and store findings to a trigger. The inspection
-     * will be processed asynchronously. To review the findings monitor the
-     * jobs within the trigger.
-     * 
- */ - public void hybridInspectJobTrigger(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getHybridInspectJobTriggerMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetJobTriggerMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists job triggers.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListJobTriggersMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public void deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteJobTriggerMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Activate a job trigger. Causes the immediate execute of a trigger
-     * instead of waiting on the trigger event to occur.
-     * 
- */ - public void activateJobTrigger(com.google.privacy.dlp.v2.ActivateJobTriggerRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getActivateJobTriggerMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a new job to inspect storage or calculate risk metrics.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public void createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateDlpJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists DlpJobs that match the specified filter in the request.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public void listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListDlpJobsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets the latest state of a long-running DlpJob.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public void getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetDlpJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a long-running DlpJob. This method indicates that the client is
-     * no longer interested in the DlpJob result. The job will be canceled if
-     * possible.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public void deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteDlpJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Starts asynchronous cancellation on a long-running DlpJob. The server
-     * makes a best effort to cancel the DlpJob, but success is not
-     * guaranteed.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public void cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCancelDlpJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a pre-built stored infoType to be used for inspection.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void createStoredInfoType(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateStoredInfoTypeMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates the stored infoType by creating a new version. The existing version
-     * will continue to be used until the new version is ready.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void updateStoredInfoType(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateStoredInfoTypeMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets a stored infoType.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void getStoredInfoType(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetStoredInfoTypeMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists stored infoTypes.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void listStoredInfoTypes(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListStoredInfoTypesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a stored infoType.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public void deleteStoredInfoType(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteStoredInfoTypeMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Inspect hybrid content and store findings to a job.
-     * To review the findings, inspect the job. Inspection will occur
-     * asynchronously.
-     * 
- */ - public void hybridInspectDlpJob(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getHybridInspectDlpJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Finish a running hybrid DlpJob. Triggers the finalization steps and running
-     * of any enabled actions that have not yet run.
-     * 
- */ - public void finishDlpJob(com.google.privacy.dlp.v2.FinishDlpJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getFinishDlpJobMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
-   * to detect the presence of Personally Identifiable Information (PII) and other
-   * privacy-sensitive data in user-supplied, unstructured data streams, like text
-   * blocks or images.
-   * The service also includes methods for sensitive data redaction and
-   * scheduling of data scans on Google Cloud Platform based data sets.
-   * To learn more about concepts and find how-to guides see
-   * https://cloud.google.com/dlp/docs/.
-   * 
- */ - public static final class DlpServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private DlpServiceBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DlpServiceBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DlpServiceBlockingStub(channel, callOptions); - } - - /** - *
-     * Finds potentially sensitive info in content.
-     * This method has limits on input size, processing time, and output size.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
-     * and https://cloud.google.com/dlp/docs/inspecting-text,
-     * 
- */ - public com.google.privacy.dlp.v2.InspectContentResponse inspectContent(com.google.privacy.dlp.v2.InspectContentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getInspectContentMethod(), getCallOptions(), request); - } - - /** - *
-     * Redacts potentially sensitive info from an image.
-     * This method has limits on input size, processing time, and output size.
-     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
-     * learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public com.google.privacy.dlp.v2.RedactImageResponse redactImage(com.google.privacy.dlp.v2.RedactImageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRedactImageMethod(), getCallOptions(), request); - } - - /** - *
-     * De-identifies potentially sensitive info from a ContentItem.
-     * This method has limits on input size and output size.
-     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
-     * learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public com.google.privacy.dlp.v2.DeidentifyContentResponse deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeidentifyContentMethod(), getCallOptions(), request); - } - - /** - *
-     * Re-identifies content that has been de-identified.
-     * See
-     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
-     * to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.ReidentifyContentResponse reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getReidentifyContentMethod(), getCallOptions(), request); - } - - /** - *
-     * Returns a list of the sensitive information types that DLP API
-     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
-     * learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.ListInfoTypesResponse listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListInfoTypesMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates an InspectTemplate for reusing frequently used configuration
-     * for inspecting content, images, and storage.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.InspectTemplate createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateInspectTemplateMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.InspectTemplate updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateInspectTemplateMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets an InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetInspectTemplateMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists InspectTemplates.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.ListInspectTemplatesResponse listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListInspectTemplatesMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes an InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.protobuf.Empty deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteInspectTemplateMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a DeidentifyTemplate for reusing frequently used configuration
-     * for de-identifying content, images, and storage.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.privacy.dlp.v2.DeidentifyTemplate createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateDeidentifyTemplateMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.privacy.dlp.v2.DeidentifyTemplate updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateDeidentifyTemplateMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets a DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetDeidentifyTemplateMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists DeidentifyTemplates.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListDeidentifyTemplatesMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes a DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.protobuf.Empty deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteDeidentifyTemplateMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a job trigger to run DLP actions such as scanning storage for
-     * sensitive information on a set schedule.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.JobTrigger createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateJobTriggerMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.JobTrigger updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateJobTriggerMethod(), getCallOptions(), request); - } - - /** - *
-     * Inspect hybrid content and store findings to a trigger. The inspection
-     * will be processed asynchronously. To review the findings monitor the
-     * jobs within the trigger.
-     * 
- */ - public com.google.privacy.dlp.v2.HybridInspectResponse hybridInspectJobTrigger(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getHybridInspectJobTriggerMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.JobTrigger getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetJobTriggerMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists job triggers.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.ListJobTriggersResponse listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListJobTriggersMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.protobuf.Empty deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteJobTriggerMethod(), getCallOptions(), request); - } - - /** - *
-     * Activate a job trigger. Causes the immediate execute of a trigger
-     * instead of waiting on the trigger event to occur.
-     * 
- */ - public com.google.privacy.dlp.v2.DlpJob activateJobTrigger(com.google.privacy.dlp.v2.ActivateJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getActivateJobTriggerMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a new job to inspect storage or calculate risk metrics.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public com.google.privacy.dlp.v2.DlpJob createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateDlpJobMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists DlpJobs that match the specified filter in the request.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.ListDlpJobsResponse listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListDlpJobsMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets the latest state of a long-running DlpJob.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.DlpJob getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetDlpJobMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes a long-running DlpJob. This method indicates that the client is
-     * no longer interested in the DlpJob result. The job will be canceled if
-     * possible.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public com.google.protobuf.Empty deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteDlpJobMethod(), getCallOptions(), request); - } - - /** - *
-     * Starts asynchronous cancellation on a long-running DlpJob. The server
-     * makes a best effort to cancel the DlpJob, but success is not
-     * guaranteed.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public com.google.protobuf.Empty cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCancelDlpJobMethod(), getCallOptions(), request); - } - - /** - *
-     * Creates a pre-built stored infoType to be used for inspection.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.StoredInfoType createStoredInfoType(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateStoredInfoTypeMethod(), getCallOptions(), request); - } - - /** - *
-     * Updates the stored infoType by creating a new version. The existing version
-     * will continue to be used until the new version is ready.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.StoredInfoType updateStoredInfoType(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateStoredInfoTypeMethod(), getCallOptions(), request); - } - - /** - *
-     * Gets a stored infoType.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.StoredInfoType getStoredInfoType(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetStoredInfoTypeMethod(), getCallOptions(), request); - } - - /** - *
-     * Lists stored infoTypes.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse listStoredInfoTypes(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListStoredInfoTypesMethod(), getCallOptions(), request); - } - - /** - *
-     * Deletes a stored infoType.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.protobuf.Empty deleteStoredInfoType(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteStoredInfoTypeMethod(), getCallOptions(), request); - } - - /** - *
-     * Inspect hybrid content and store findings to a job.
-     * To review the findings, inspect the job. Inspection will occur
-     * asynchronously.
-     * 
- */ - public com.google.privacy.dlp.v2.HybridInspectResponse hybridInspectDlpJob(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getHybridInspectDlpJobMethod(), getCallOptions(), request); - } - - /** - *
-     * Finish a running hybrid DlpJob. Triggers the finalization steps and running
-     * of any enabled actions that have not yet run.
-     * 
- */ - public com.google.protobuf.Empty finishDlpJob(com.google.privacy.dlp.v2.FinishDlpJobRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getFinishDlpJobMethod(), getCallOptions(), request); - } - } - - /** - *
-   * The Cloud Data Loss Prevention (DLP) API is a service that allows clients
-   * to detect the presence of Personally Identifiable Information (PII) and other
-   * privacy-sensitive data in user-supplied, unstructured data streams, like text
-   * blocks or images.
-   * The service also includes methods for sensitive data redaction and
-   * scheduling of data scans on Google Cloud Platform based data sets.
-   * To learn more about concepts and find how-to guides see
-   * https://cloud.google.com/dlp/docs/.
-   * 
- */ - public static final class DlpServiceFutureStub extends io.grpc.stub.AbstractFutureStub { - private DlpServiceFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected DlpServiceFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new DlpServiceFutureStub(channel, callOptions); - } - - /** - *
-     * Finds potentially sensitive info in content.
-     * This method has limits on input size, processing time, and output size.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
-     * and https://cloud.google.com/dlp/docs/inspecting-text,
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture inspectContent( - com.google.privacy.dlp.v2.InspectContentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getInspectContentMethod(), getCallOptions()), request); - } - - /** - *
-     * Redacts potentially sensitive info from an image.
-     * This method has limits on input size, processing time, and output size.
-     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
-     * learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture redactImage( - com.google.privacy.dlp.v2.RedactImageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRedactImageMethod(), getCallOptions()), request); - } - - /** - *
-     * De-identifies potentially sensitive info from a ContentItem.
-     * This method has limits on input size and output size.
-     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
-     * learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in this request, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deidentifyContent( - com.google.privacy.dlp.v2.DeidentifyContentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeidentifyContentMethod(), getCallOptions()), request); - } - - /** - *
-     * Re-identifies content that has been de-identified.
-     * See
-     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
-     * to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture reidentifyContent( - com.google.privacy.dlp.v2.ReidentifyContentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getReidentifyContentMethod(), getCallOptions()), request); - } - - /** - *
-     * Returns a list of the sensitive information types that DLP API
-     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
-     * learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listInfoTypes( - com.google.privacy.dlp.v2.ListInfoTypesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListInfoTypesMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates an InspectTemplate for reusing frequently used configuration
-     * for inspecting content, images, and storage.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createInspectTemplate( - com.google.privacy.dlp.v2.CreateInspectTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateInspectTemplateMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateInspectTemplate( - com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateInspectTemplateMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets an InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getInspectTemplate( - com.google.privacy.dlp.v2.GetInspectTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetInspectTemplateMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists InspectTemplates.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listInspectTemplates( - com.google.privacy.dlp.v2.ListInspectTemplatesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListInspectTemplatesMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes an InspectTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteInspectTemplate( - com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteInspectTemplateMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a DeidentifyTemplate for reusing frequently used configuration
-     * for de-identifying content, images, and storage.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createDeidentifyTemplate( - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateDeidentifyTemplateMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateDeidentifyTemplate( - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateDeidentifyTemplateMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets a DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getDeidentifyTemplate( - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetDeidentifyTemplateMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists DeidentifyTemplates.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listDeidentifyTemplates( - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListDeidentifyTemplatesMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a DeidentifyTemplate.
-     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
-     * more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteDeidentifyTemplate( - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteDeidentifyTemplateMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a job trigger to run DLP actions such as scanning storage for
-     * sensitive information on a set schedule.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createJobTrigger( - com.google.privacy.dlp.v2.CreateJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateJobTriggerMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateJobTrigger( - com.google.privacy.dlp.v2.UpdateJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateJobTriggerMethod(), getCallOptions()), request); - } - - /** - *
-     * Inspect hybrid content and store findings to a trigger. The inspection
-     * will be processed asynchronously. To review the findings monitor the
-     * jobs within the trigger.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture hybridInspectJobTrigger( - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getHybridInspectJobTriggerMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getJobTrigger( - com.google.privacy.dlp.v2.GetJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetJobTriggerMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists job triggers.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listJobTriggers( - com.google.privacy.dlp.v2.ListJobTriggersRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListJobTriggersMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a job trigger.
-     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteJobTrigger( - com.google.privacy.dlp.v2.DeleteJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteJobTriggerMethod(), getCallOptions()), request); - } - - /** - *
-     * Activate a job trigger. Causes the immediate execute of a trigger
-     * instead of waiting on the trigger event to occur.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture activateJobTrigger( - com.google.privacy.dlp.v2.ActivateJobTriggerRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getActivateJobTriggerMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a new job to inspect storage or calculate risk metrics.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
-     * system will automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createDlpJob( - com.google.privacy.dlp.v2.CreateDlpJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateDlpJobMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists DlpJobs that match the specified filter in the request.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listDlpJobs( - com.google.privacy.dlp.v2.ListDlpJobsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListDlpJobsMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets the latest state of a long-running DlpJob.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getDlpJob( - com.google.privacy.dlp.v2.GetDlpJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetDlpJobMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a long-running DlpJob. This method indicates that the client is
-     * no longer interested in the DlpJob result. The job will be canceled if
-     * possible.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteDlpJob( - com.google.privacy.dlp.v2.DeleteDlpJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteDlpJobMethod(), getCallOptions()), request); - } - - /** - *
-     * Starts asynchronous cancellation on a long-running DlpJob. The server
-     * makes a best effort to cancel the DlpJob, but success is not
-     * guaranteed.
-     * See https://cloud.google.com/dlp/docs/inspecting-storage and
-     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture cancelDlpJob( - com.google.privacy.dlp.v2.CancelDlpJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCancelDlpJobMethod(), getCallOptions()), request); - } - - /** - *
-     * Creates a pre-built stored infoType to be used for inspection.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createStoredInfoType( - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateStoredInfoTypeMethod(), getCallOptions()), request); - } - - /** - *
-     * Updates the stored infoType by creating a new version. The existing version
-     * will continue to be used until the new version is ready.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture updateStoredInfoType( - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateStoredInfoTypeMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets a stored infoType.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getStoredInfoType( - com.google.privacy.dlp.v2.GetStoredInfoTypeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetStoredInfoTypeMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists stored infoTypes.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listStoredInfoTypes( - com.google.privacy.dlp.v2.ListStoredInfoTypesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListStoredInfoTypesMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a stored infoType.
-     * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
-     * learn more.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteStoredInfoType( - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteStoredInfoTypeMethod(), getCallOptions()), request); - } - - /** - *
-     * Inspect hybrid content and store findings to a job.
-     * To review the findings, inspect the job. Inspection will occur
-     * asynchronously.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture hybridInspectDlpJob( - com.google.privacy.dlp.v2.HybridInspectDlpJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getHybridInspectDlpJobMethod(), getCallOptions()), request); - } - - /** - *
-     * Finish a running hybrid DlpJob. Triggers the finalization steps and running
-     * of any enabled actions that have not yet run.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture finishDlpJob( - com.google.privacy.dlp.v2.FinishDlpJobRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getFinishDlpJobMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_INSPECT_CONTENT = 0; - private static final int METHODID_REDACT_IMAGE = 1; - private static final int METHODID_DEIDENTIFY_CONTENT = 2; - private static final int METHODID_REIDENTIFY_CONTENT = 3; - private static final int METHODID_LIST_INFO_TYPES = 4; - private static final int METHODID_CREATE_INSPECT_TEMPLATE = 5; - private static final int METHODID_UPDATE_INSPECT_TEMPLATE = 6; - private static final int METHODID_GET_INSPECT_TEMPLATE = 7; - private static final int METHODID_LIST_INSPECT_TEMPLATES = 8; - private static final int METHODID_DELETE_INSPECT_TEMPLATE = 9; - private static final int METHODID_CREATE_DEIDENTIFY_TEMPLATE = 10; - private static final int METHODID_UPDATE_DEIDENTIFY_TEMPLATE = 11; - private static final int METHODID_GET_DEIDENTIFY_TEMPLATE = 12; - private static final int METHODID_LIST_DEIDENTIFY_TEMPLATES = 13; - private static final int METHODID_DELETE_DEIDENTIFY_TEMPLATE = 14; - private static final int METHODID_CREATE_JOB_TRIGGER = 15; - private static final int METHODID_UPDATE_JOB_TRIGGER = 16; - private static final int METHODID_HYBRID_INSPECT_JOB_TRIGGER = 17; - private static final int METHODID_GET_JOB_TRIGGER = 18; - private static final int METHODID_LIST_JOB_TRIGGERS = 19; - private static final int METHODID_DELETE_JOB_TRIGGER = 20; - private static final int METHODID_ACTIVATE_JOB_TRIGGER = 21; - private static final int METHODID_CREATE_DLP_JOB = 22; - private static final int METHODID_LIST_DLP_JOBS = 23; - private static final int METHODID_GET_DLP_JOB = 24; - private static final int METHODID_DELETE_DLP_JOB = 25; - private static final int METHODID_CANCEL_DLP_JOB = 26; - private static final int METHODID_CREATE_STORED_INFO_TYPE = 27; - private static final int METHODID_UPDATE_STORED_INFO_TYPE = 28; - private static final int METHODID_GET_STORED_INFO_TYPE = 29; - private static final int METHODID_LIST_STORED_INFO_TYPES = 30; - private static final int METHODID_DELETE_STORED_INFO_TYPE = 31; - private static final int METHODID_HYBRID_INSPECT_DLP_JOB = 32; - private static final int METHODID_FINISH_DLP_JOB = 33; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final DlpServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(DlpServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_INSPECT_CONTENT: - serviceImpl.inspectContent((com.google.privacy.dlp.v2.InspectContentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REDACT_IMAGE: - serviceImpl.redactImage((com.google.privacy.dlp.v2.RedactImageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DEIDENTIFY_CONTENT: - serviceImpl.deidentifyContent((com.google.privacy.dlp.v2.DeidentifyContentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_REIDENTIFY_CONTENT: - serviceImpl.reidentifyContent((com.google.privacy.dlp.v2.ReidentifyContentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_INFO_TYPES: - serviceImpl.listInfoTypes((com.google.privacy.dlp.v2.ListInfoTypesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_INSPECT_TEMPLATE: - serviceImpl.createInspectTemplate((com.google.privacy.dlp.v2.CreateInspectTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_INSPECT_TEMPLATE: - serviceImpl.updateInspectTemplate((com.google.privacy.dlp.v2.UpdateInspectTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_INSPECT_TEMPLATE: - serviceImpl.getInspectTemplate((com.google.privacy.dlp.v2.GetInspectTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_INSPECT_TEMPLATES: - serviceImpl.listInspectTemplates((com.google.privacy.dlp.v2.ListInspectTemplatesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_INSPECT_TEMPLATE: - serviceImpl.deleteInspectTemplate((com.google.privacy.dlp.v2.DeleteInspectTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_DEIDENTIFY_TEMPLATE: - serviceImpl.createDeidentifyTemplate((com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_DEIDENTIFY_TEMPLATE: - serviceImpl.updateDeidentifyTemplate((com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_DEIDENTIFY_TEMPLATE: - serviceImpl.getDeidentifyTemplate((com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_DEIDENTIFY_TEMPLATES: - serviceImpl.listDeidentifyTemplates((com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_DEIDENTIFY_TEMPLATE: - serviceImpl.deleteDeidentifyTemplate((com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_JOB_TRIGGER: - serviceImpl.createJobTrigger((com.google.privacy.dlp.v2.CreateJobTriggerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_JOB_TRIGGER: - serviceImpl.updateJobTrigger((com.google.privacy.dlp.v2.UpdateJobTriggerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_HYBRID_INSPECT_JOB_TRIGGER: - serviceImpl.hybridInspectJobTrigger((com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_JOB_TRIGGER: - serviceImpl.getJobTrigger((com.google.privacy.dlp.v2.GetJobTriggerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_JOB_TRIGGERS: - serviceImpl.listJobTriggers((com.google.privacy.dlp.v2.ListJobTriggersRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_JOB_TRIGGER: - serviceImpl.deleteJobTrigger((com.google.privacy.dlp.v2.DeleteJobTriggerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ACTIVATE_JOB_TRIGGER: - serviceImpl.activateJobTrigger((com.google.privacy.dlp.v2.ActivateJobTriggerRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_DLP_JOB: - serviceImpl.createDlpJob((com.google.privacy.dlp.v2.CreateDlpJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_DLP_JOBS: - serviceImpl.listDlpJobs((com.google.privacy.dlp.v2.ListDlpJobsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_DLP_JOB: - serviceImpl.getDlpJob((com.google.privacy.dlp.v2.GetDlpJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_DLP_JOB: - serviceImpl.deleteDlpJob((com.google.privacy.dlp.v2.DeleteDlpJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CANCEL_DLP_JOB: - serviceImpl.cancelDlpJob((com.google.privacy.dlp.v2.CancelDlpJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_STORED_INFO_TYPE: - serviceImpl.createStoredInfoType((com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_STORED_INFO_TYPE: - serviceImpl.updateStoredInfoType((com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_STORED_INFO_TYPE: - serviceImpl.getStoredInfoType((com.google.privacy.dlp.v2.GetStoredInfoTypeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_STORED_INFO_TYPES: - serviceImpl.listStoredInfoTypes((com.google.privacy.dlp.v2.ListStoredInfoTypesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_STORED_INFO_TYPE: - serviceImpl.deleteStoredInfoType((com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_HYBRID_INSPECT_DLP_JOB: - serviceImpl.hybridInspectDlpJob((com.google.privacy.dlp.v2.HybridInspectDlpJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_FINISH_DLP_JOB: - serviceImpl.finishDlpJob((com.google.privacy.dlp.v2.FinishDlpJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class DlpServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - DlpServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("DlpService"); - } - } - - private static final class DlpServiceFileDescriptorSupplier - extends DlpServiceBaseDescriptorSupplier { - DlpServiceFileDescriptorSupplier() {} - } - - private static final class DlpServiceMethodDescriptorSupplier - extends DlpServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - DlpServiceMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (DlpServiceGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new DlpServiceFileDescriptorSupplier()) - .addMethod(getInspectContentMethod()) - .addMethod(getRedactImageMethod()) - .addMethod(getDeidentifyContentMethod()) - .addMethod(getReidentifyContentMethod()) - .addMethod(getListInfoTypesMethod()) - .addMethod(getCreateInspectTemplateMethod()) - .addMethod(getUpdateInspectTemplateMethod()) - .addMethod(getGetInspectTemplateMethod()) - .addMethod(getListInspectTemplatesMethod()) - .addMethod(getDeleteInspectTemplateMethod()) - .addMethod(getCreateDeidentifyTemplateMethod()) - .addMethod(getUpdateDeidentifyTemplateMethod()) - .addMethod(getGetDeidentifyTemplateMethod()) - .addMethod(getListDeidentifyTemplatesMethod()) - .addMethod(getDeleteDeidentifyTemplateMethod()) - .addMethod(getCreateJobTriggerMethod()) - .addMethod(getUpdateJobTriggerMethod()) - .addMethod(getHybridInspectJobTriggerMethod()) - .addMethod(getGetJobTriggerMethod()) - .addMethod(getListJobTriggersMethod()) - .addMethod(getDeleteJobTriggerMethod()) - .addMethod(getActivateJobTriggerMethod()) - .addMethod(getCreateDlpJobMethod()) - .addMethod(getListDlpJobsMethod()) - .addMethod(getGetDlpJobMethod()) - .addMethod(getDeleteDlpJobMethod()) - .addMethod(getCancelDlpJobMethod()) - .addMethod(getCreateStoredInfoTypeMethod()) - .addMethod(getUpdateStoredInfoTypeMethod()) - .addMethod(getGetStoredInfoTypeMethod()) - .addMethod(getListStoredInfoTypesMethod()) - .addMethod(getDeleteStoredInfoTypeMethod()) - .addMethod(getHybridInspectDlpJobMethod()) - .addMethod(getFinishDlpJobMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java deleted file mode 100644 index 65f4eeca3e68..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java +++ /dev/null @@ -1,7431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A task to execute on the completion of a job.
- * See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action} - */ -public final class Action extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action) - ActionOrBuilder { -private static final long serialVersionUID = 0L; - // Use Action.newBuilder() to construct. - private Action(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Action() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Action(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Action( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Action.SaveFindings.Builder subBuilder = null; - if (actionCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.Action.SaveFindings) action_).toBuilder(); - } - action_ = - input.readMessage(com.google.privacy.dlp.v2.Action.SaveFindings.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.SaveFindings) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder subBuilder = null; - if (actionCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.Action.PublishToPubSub) action_).toBuilder(); - } - action_ = - input.readMessage(com.google.privacy.dlp.v2.Action.PublishToPubSub.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.PublishToPubSub) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder subBuilder = null; - if (actionCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_).toBuilder(); - } - action_ = - input.readMessage(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 3; - break; - } - case 42: { - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder subBuilder = null; - if (actionCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_).toBuilder(); - } - action_ = - input.readMessage(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 5; - break; - } - case 58: { - com.google.privacy.dlp.v2.Action.Deidentify.Builder subBuilder = null; - if (actionCase_ == 7) { - subBuilder = ((com.google.privacy.dlp.v2.Action.Deidentify) action_).toBuilder(); - } - action_ = - input.readMessage(com.google.privacy.dlp.v2.Action.Deidentify.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.Deidentify) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 7; - break; - } - case 66: { - com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder subBuilder = null; - if (actionCase_ == 8) { - subBuilder = ((com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_).toBuilder(); - } - action_ = - input.readMessage(com.google.privacy.dlp.v2.Action.JobNotificationEmails.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 8; - break; - } - case 74: { - com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder subBuilder = null; - if (actionCase_ == 9) { - subBuilder = ((com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_).toBuilder(); - } - action_ = - input.readMessage(com.google.privacy.dlp.v2.Action.PublishToStackdriver.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 9; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.class, com.google.privacy.dlp.v2.Action.Builder.class); - } - - public interface SaveFindingsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.SaveFindings) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Location to store findings outside of DLP.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-     * Location to store findings outside of DLP.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - * @return The outputConfig. - */ - com.google.privacy.dlp.v2.OutputStorageConfig getOutputConfig(); - /** - *
-     * Location to store findings outside of DLP.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - */ - com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder getOutputConfigOrBuilder(); - } - /** - *
-   * If set, the detailed findings will be persisted to the specified
-   * OutputStorageConfig. Only a single instance of this action can be
-   * specified.
-   * Compatible with: Inspect, Risk
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.SaveFindings} - */ - public static final class SaveFindings extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.SaveFindings) - SaveFindingsOrBuilder { - private static final long serialVersionUID = 0L; - // Use SaveFindings.newBuilder() to construct. - private SaveFindings(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SaveFindings() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SaveFindings(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SaveFindings( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.OutputStorageConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.privacy.dlp.v2.OutputStorageConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.SaveFindings.class, com.google.privacy.dlp.v2.Action.SaveFindings.Builder.class); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.OutputStorageConfig outputConfig_; - /** - *
-     * Location to store findings outside of DLP.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-     * Location to store findings outside of DLP.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.OutputStorageConfig getOutputConfig() { - return outputConfig_ == null ? com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-     * Location to store findings outside of DLP.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (outputConfig_ != null) { - output.writeMessage(1, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Action.SaveFindings)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Action.SaveFindings other = (com.google.privacy.dlp.v2.Action.SaveFindings) obj; - - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.SaveFindings parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Action.SaveFindings prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * If set, the detailed findings will be persisted to the specified
-     * OutputStorageConfig. Only a single instance of this action can be
-     * specified.
-     * Compatible with: Inspect, Risk
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.SaveFindings} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.SaveFindings) - com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.SaveFindings.class, com.google.privacy.dlp.v2.Action.SaveFindings.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Action.SaveFindings.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.SaveFindings getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.SaveFindings build() { - com.google.privacy.dlp.v2.Action.SaveFindings result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.SaveFindings buildPartial() { - com.google.privacy.dlp.v2.Action.SaveFindings result = new com.google.privacy.dlp.v2.Action.SaveFindings(this); - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Action.SaveFindings) { - return mergeFrom((com.google.privacy.dlp.v2.Action.SaveFindings)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Action.SaveFindings other) { - if (other == com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance()) return this; - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Action.SaveFindings parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Action.SaveFindings) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.OutputStorageConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.OutputStorageConfig, com.google.privacy.dlp.v2.OutputStorageConfig.Builder, com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder> outputConfigBuilder_; - /** - *
-       * Location to store findings outside of DLP.
-       * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-       * Location to store findings outside of DLP.
-       * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - * @return The outputConfig. - */ - public com.google.privacy.dlp.v2.OutputStorageConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-       * Location to store findings outside of DLP.
-       * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - */ - public Builder setOutputConfig(com.google.privacy.dlp.v2.OutputStorageConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Location to store findings outside of DLP.
-       * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - */ - public Builder setOutputConfig( - com.google.privacy.dlp.v2.OutputStorageConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Location to store findings outside of DLP.
-       * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - */ - public Builder mergeOutputConfig(com.google.privacy.dlp.v2.OutputStorageConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.privacy.dlp.v2.OutputStorageConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Location to store findings outside of DLP.
-       * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-       * Location to store findings outside of DLP.
-       * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - */ - public com.google.privacy.dlp.v2.OutputStorageConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-       * Location to store findings outside of DLP.
-       * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - */ - public com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-       * Location to store findings outside of DLP.
-       * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig output_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.OutputStorageConfig, com.google.privacy.dlp.v2.OutputStorageConfig.Builder, com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.OutputStorageConfig, com.google.privacy.dlp.v2.OutputStorageConfig.Builder, com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.SaveFindings) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.SaveFindings) - private static final com.google.privacy.dlp.v2.Action.SaveFindings DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.SaveFindings(); - } - - public static com.google.privacy.dlp.v2.Action.SaveFindings getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SaveFindings parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SaveFindings(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.SaveFindings getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PublishToPubSubOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.PublishToPubSub) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Cloud Pub/Sub topic to send notifications to. The topic must have given
-     * publishing access rights to the DLP API service account executing
-     * the long running DlpJob sending the notifications.
-     * Format is projects/{project}/topics/{topic}.
-     * 
- * - * string topic = 1; - * @return The topic. - */ - java.lang.String getTopic(); - /** - *
-     * Cloud Pub/Sub topic to send notifications to. The topic must have given
-     * publishing access rights to the DLP API service account executing
-     * the long running DlpJob sending the notifications.
-     * Format is projects/{project}/topics/{topic}.
-     * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - com.google.protobuf.ByteString - getTopicBytes(); - } - /** - *
-   * Publish a message into a given Pub/Sub topic when DlpJob has completed. The
-   * message contains a single field, `DlpJobName`, which is equal to the
-   * finished job's
-   * [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob).
-   * Compatible with: Inspect, Risk
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.PublishToPubSub} - */ - public static final class PublishToPubSub extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.PublishToPubSub) - PublishToPubSubOrBuilder { - private static final long serialVersionUID = 0L; - // Use PublishToPubSub.newBuilder() to construct. - private PublishToPubSub(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PublishToPubSub() { - topic_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PublishToPubSub(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PublishToPubSub( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.PublishToPubSub.class, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder.class); - } - - public static final int TOPIC_FIELD_NUMBER = 1; - private volatile java.lang.Object topic_; - /** - *
-     * Cloud Pub/Sub topic to send notifications to. The topic must have given
-     * publishing access rights to the DLP API service account executing
-     * the long running DlpJob sending the notifications.
-     * Format is projects/{project}/topics/{topic}.
-     * 
- * - * string topic = 1; - * @return The topic. - */ - @java.lang.Override - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } - } - /** - *
-     * Cloud Pub/Sub topic to send notifications to. The topic must have given
-     * publishing access rights to the DLP API service account executing
-     * the long running DlpJob sending the notifications.
-     * Format is projects/{project}/topics/{topic}.
-     * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Action.PublishToPubSub)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Action.PublishToPubSub other = (com.google.privacy.dlp.v2.Action.PublishToPubSub) obj; - - if (!getTopic() - .equals(other.getTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TOPIC_FIELD_NUMBER; - hash = (53 * hash) + getTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishToPubSub parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Action.PublishToPubSub prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Publish a message into a given Pub/Sub topic when DlpJob has completed. The
-     * message contains a single field, `DlpJobName`, which is equal to the
-     * finished job's
-     * [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob).
-     * Compatible with: Inspect, Risk
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.PublishToPubSub} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.PublishToPubSub) - com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.PublishToPubSub.class, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Action.PublishToPubSub.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - topic_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToPubSub getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToPubSub build() { - com.google.privacy.dlp.v2.Action.PublishToPubSub result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToPubSub buildPartial() { - com.google.privacy.dlp.v2.Action.PublishToPubSub result = new com.google.privacy.dlp.v2.Action.PublishToPubSub(this); - result.topic_ = topic_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Action.PublishToPubSub) { - return mergeFrom((com.google.privacy.dlp.v2.Action.PublishToPubSub)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Action.PublishToPubSub other) { - if (other == com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance()) return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Action.PublishToPubSub parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Action.PublishToPubSub) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object topic_ = ""; - /** - *
-       * Cloud Pub/Sub topic to send notifications to. The topic must have given
-       * publishing access rights to the DLP API service account executing
-       * the long running DlpJob sending the notifications.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @return The topic. - */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Cloud Pub/Sub topic to send notifications to. The topic must have given
-       * publishing access rights to the DLP API service account executing
-       * the long running DlpJob sending the notifications.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Cloud Pub/Sub topic to send notifications to. The topic must have given
-       * publishing access rights to the DLP API service account executing
-       * the long running DlpJob sending the notifications.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @param value The topic to set. - * @return This builder for chaining. - */ - public Builder setTopic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - *
-       * Cloud Pub/Sub topic to send notifications to. The topic must have given
-       * publishing access rights to the DLP API service account executing
-       * the long running DlpJob sending the notifications.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @return This builder for chaining. - */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - *
-       * Cloud Pub/Sub topic to send notifications to. The topic must have given
-       * publishing access rights to the DLP API service account executing
-       * the long running DlpJob sending the notifications.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @param value The bytes for topic to set. - * @return This builder for chaining. - */ - public Builder setTopicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishToPubSub) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishToPubSub) - private static final com.google.privacy.dlp.v2.Action.PublishToPubSub DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishToPubSub(); - } - - public static com.google.privacy.dlp.v2.Action.PublishToPubSub getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublishToPubSub parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PublishToPubSub(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToPubSub getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PublishSummaryToCsccOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.PublishSummaryToCscc) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Publish the result summary of a DlpJob to the Cloud Security
-   * Command Center (CSCC Alpha).
-   * This action is only available for projects which are parts of
-   * an organization and whitelisted for the alpha Cloud Security Command
-   * Center.
-   * The action will publish the count of finding instances and their info
-   * types. The summary of findings will be persisted in CSCC and are governed
-   * by CSCC service-specific policy, see
-   * https://cloud.google.com/terms/service-terms Only a single instance of this
-   * action can be specified. Compatible with: Inspect
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.PublishSummaryToCscc} - */ - public static final class PublishSummaryToCscc extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.PublishSummaryToCscc) - PublishSummaryToCsccOrBuilder { - private static final long serialVersionUID = 0L; - // Use PublishSummaryToCscc.newBuilder() to construct. - private PublishSummaryToCscc(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PublishSummaryToCscc() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PublishSummaryToCscc(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PublishSummaryToCscc( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.class, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Action.PublishSummaryToCscc)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc other = (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Publish the result summary of a DlpJob to the Cloud Security
-     * Command Center (CSCC Alpha).
-     * This action is only available for projects which are parts of
-     * an organization and whitelisted for the alpha Cloud Security Command
-     * Center.
-     * The action will publish the count of finding instances and their info
-     * types. The summary of findings will be persisted in CSCC and are governed
-     * by CSCC service-specific policy, see
-     * https://cloud.google.com/terms/service-terms Only a single instance of this
-     * action can be specified. Compatible with: Inspect
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.PublishSummaryToCscc} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.PublishSummaryToCscc) - com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.class, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc build() { - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc buildPartial() { - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc result = new com.google.privacy.dlp.v2.Action.PublishSummaryToCscc(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) { - return mergeFrom((com.google.privacy.dlp.v2.Action.PublishSummaryToCscc)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc other) { - if (other == com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishSummaryToCscc) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishSummaryToCscc) - private static final com.google.privacy.dlp.v2.Action.PublishSummaryToCscc DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishSummaryToCscc(); - } - - public static com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublishSummaryToCscc parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PublishSummaryToCscc(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PublishFindingsToCloudDataCatalogOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag
-   * templates are applied to the resource that Cloud DLP scanned. Data
-   * Catalog tag templates are stored in the same project and region where the
-   * BigQuery table exists. For Cloud DLP to create and apply the tag template,
-   * the Cloud DLP service agent must have the
-   * `roles/datacatalog.tagTemplateOwner` permission on the project. The tag
-   * template contains fields summarizing the results of the DlpJob. Any field
-   * values previously written by another DlpJob are deleted. [InfoType naming
-   * patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using
-   * this feature.
-   * Findings are persisted in Data Catalog storage and are governed by
-   * service-specific policies for Data Catalog. For more information, see
-   * [Service Specific Terms](https://cloud.google.com/terms/service-terms).
-   * Only a single instance of this action can be specified. This action is
-   * allowed only if all resources being scanned are BigQuery tables.
-   * Compatible with: Inspect
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog} - */ - public static final class PublishFindingsToCloudDataCatalog extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) - PublishFindingsToCloudDataCatalogOrBuilder { - private static final long serialVersionUID = 0L; - // Use PublishFindingsToCloudDataCatalog.newBuilder() to construct. - private PublishFindingsToCloudDataCatalog(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PublishFindingsToCloudDataCatalog() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PublishFindingsToCloudDataCatalog(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PublishFindingsToCloudDataCatalog( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.class, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog other = (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag
-     * templates are applied to the resource that Cloud DLP scanned. Data
-     * Catalog tag templates are stored in the same project and region where the
-     * BigQuery table exists. For Cloud DLP to create and apply the tag template,
-     * the Cloud DLP service agent must have the
-     * `roles/datacatalog.tagTemplateOwner` permission on the project. The tag
-     * template contains fields summarizing the results of the DlpJob. Any field
-     * values previously written by another DlpJob are deleted. [InfoType naming
-     * patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using
-     * this feature.
-     * Findings are persisted in Data Catalog storage and are governed by
-     * service-specific policies for Data Catalog. For more information, see
-     * [Service Specific Terms](https://cloud.google.com/terms/service-terms).
-     * Only a single instance of this action can be specified. This action is
-     * allowed only if all resources being scanned are BigQuery tables.
-     * Compatible with: Inspect
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.class, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog build() { - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog buildPartial() { - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog result = new com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) { - return mergeFrom((com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog other) { - if (other == com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) - private static final com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog(); - } - - public static com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublishFindingsToCloudDataCatalog parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PublishFindingsToCloudDataCatalog(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DeidentifyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.Deidentify) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * User specified deidentify templates and configs for structured,
-     * unstructured, and image files.
-     * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - * @return Whether the transformationConfig field is set. - */ - boolean hasTransformationConfig(); - /** - *
-     * User specified deidentify templates and configs for structured,
-     * unstructured, and image files.
-     * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - * @return The transformationConfig. - */ - com.google.privacy.dlp.v2.TransformationConfig getTransformationConfig(); - /** - *
-     * User specified deidentify templates and configs for structured,
-     * unstructured, and image files.
-     * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - */ - com.google.privacy.dlp.v2.TransformationConfigOrBuilder getTransformationConfigOrBuilder(); - - /** - *
-     * Config for storing transformation details. This is separate from the
-     * de-identified content, and contains metadata about the successful
-     * transformations and/or failures that occurred while de-identifying. This
-     * needs to be set in order for users to access information about the status
-     * of each transformation (see
-     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-     * message for more information about what is noted).
-     * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - * @return Whether the transformationDetailsStorageConfig field is set. - */ - boolean hasTransformationDetailsStorageConfig(); - /** - *
-     * Config for storing transformation details. This is separate from the
-     * de-identified content, and contains metadata about the successful
-     * transformations and/or failures that occurred while de-identifying. This
-     * needs to be set in order for users to access information about the status
-     * of each transformation (see
-     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-     * message for more information about what is noted).
-     * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - * @return The transformationDetailsStorageConfig. - */ - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getTransformationDetailsStorageConfig(); - /** - *
-     * Config for storing transformation details. This is separate from the
-     * de-identified content, and contains metadata about the successful
-     * transformations and/or failures that occurred while de-identifying. This
-     * needs to be set in order for users to access information about the status
-     * of each transformation (see
-     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-     * message for more information about what is noted).
-     * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - */ - com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder getTransformationDetailsStorageConfigOrBuilder(); - - /** - *
-     * Required. User settable Cloud Storage bucket and folders to store de-identified
-     * files. This field must be set for cloud storage deidentification. The
-     * output Cloud Storage bucket must be different from the input bucket.
-     * De-identified files will overwrite files in the output path.
-     * Form of: gs://bucket/folder/ or gs://bucket
-     * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the cloudStorageOutput field is set. - */ - boolean hasCloudStorageOutput(); - /** - *
-     * Required. User settable Cloud Storage bucket and folders to store de-identified
-     * files. This field must be set for cloud storage deidentification. The
-     * output Cloud Storage bucket must be different from the input bucket.
-     * De-identified files will overwrite files in the output path.
-     * Form of: gs://bucket/folder/ or gs://bucket
-     * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return The cloudStorageOutput. - */ - java.lang.String getCloudStorageOutput(); - /** - *
-     * Required. User settable Cloud Storage bucket and folders to store de-identified
-     * files. This field must be set for cloud storage deidentification. The
-     * output Cloud Storage bucket must be different from the input bucket.
-     * De-identified files will overwrite files in the output path.
-     * Form of: gs://bucket/folder/ or gs://bucket
-     * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cloudStorageOutput. - */ - com.google.protobuf.ByteString - getCloudStorageOutputBytes(); - - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return A list containing the fileTypesToTransform. - */ - java.util.List getFileTypesToTransformList(); - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return The count of fileTypesToTransform. - */ - int getFileTypesToTransformCount(); - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param index The index of the element to return. - * @return The fileTypesToTransform at the given index. - */ - com.google.privacy.dlp.v2.FileType getFileTypesToTransform(int index); - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return A list containing the enum numeric values on the wire for fileTypesToTransform. - */ - java.util.List - getFileTypesToTransformValueList(); - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of fileTypesToTransform at the given index. - */ - int getFileTypesToTransformValue(int index); - - public com.google.privacy.dlp.v2.Action.Deidentify.OutputCase getOutputCase(); - } - /** - *
-   * Create a de-identified copy of the requested table or files.
-   * A TransformationDetail will be created for each transformation.
-   * If any rows in BigQuery are skipped during de-identification
-   * (transformation errors or row size exceeds BigQuery insert API limits) they
-   * are placed in the failure output table. If the original row exceeds
-   * the BigQuery insert API limit it will be truncated when written to the
-   * failure output table. The failure output table can be set in the
-   * action.deidentify.output.big_query_output.deidentified_failure_output_table
-   * field, if no table is set, a table will be automatically created in the
-   * same project and dataset as the original table.
-   * Compatible with: Inspect
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.Deidentify} - */ - public static final class Deidentify extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.Deidentify) - DeidentifyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Deidentify.newBuilder() to construct. - private Deidentify(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Deidentify() { - fileTypesToTransform_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Deidentify(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Deidentify( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 26: { - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder subBuilder = null; - if (transformationDetailsStorageConfig_ != null) { - subBuilder = transformationDetailsStorageConfig_.toBuilder(); - } - transformationDetailsStorageConfig_ = input.readMessage(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(transformationDetailsStorageConfig_); - transformationDetailsStorageConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - com.google.privacy.dlp.v2.TransformationConfig.Builder subBuilder = null; - if (transformationConfig_ != null) { - subBuilder = transformationConfig_.toBuilder(); - } - transformationConfig_ = input.readMessage(com.google.privacy.dlp.v2.TransformationConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(transformationConfig_); - transformationConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 64: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fileTypesToTransform_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fileTypesToTransform_.add(rawValue); - break; - } - case 66: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fileTypesToTransform_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fileTypesToTransform_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - outputCase_ = 9; - output_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fileTypesToTransform_ = java.util.Collections.unmodifiableList(fileTypesToTransform_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.Deidentify.class, com.google.privacy.dlp.v2.Action.Deidentify.Builder.class); - } - - private int outputCase_ = 0; - private java.lang.Object output_; - public enum OutputCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CLOUD_STORAGE_OUTPUT(9), - OUTPUT_NOT_SET(0); - private final int value; - private OutputCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OutputCase valueOf(int value) { - return forNumber(value); - } - - public static OutputCase forNumber(int value) { - switch (value) { - case 9: return CLOUD_STORAGE_OUTPUT; - case 0: return OUTPUT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OutputCase - getOutputCase() { - return OutputCase.forNumber( - outputCase_); - } - - public static final int TRANSFORMATION_CONFIG_FIELD_NUMBER = 7; - private com.google.privacy.dlp.v2.TransformationConfig transformationConfig_; - /** - *
-     * User specified deidentify templates and configs for structured,
-     * unstructured, and image files.
-     * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - * @return Whether the transformationConfig field is set. - */ - @java.lang.Override - public boolean hasTransformationConfig() { - return transformationConfig_ != null; - } - /** - *
-     * User specified deidentify templates and configs for structured,
-     * unstructured, and image files.
-     * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - * @return The transformationConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationConfig getTransformationConfig() { - return transformationConfig_ == null ? com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance() : transformationConfig_; - } - /** - *
-     * User specified deidentify templates and configs for structured,
-     * unstructured, and image files.
-     * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationConfigOrBuilder getTransformationConfigOrBuilder() { - return getTransformationConfig(); - } - - public static final int TRANSFORMATION_DETAILS_STORAGE_CONFIG_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.TransformationDetailsStorageConfig transformationDetailsStorageConfig_; - /** - *
-     * Config for storing transformation details. This is separate from the
-     * de-identified content, and contains metadata about the successful
-     * transformations and/or failures that occurred while de-identifying. This
-     * needs to be set in order for users to access information about the status
-     * of each transformation (see
-     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-     * message for more information about what is noted).
-     * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - * @return Whether the transformationDetailsStorageConfig field is set. - */ - @java.lang.Override - public boolean hasTransformationDetailsStorageConfig() { - return transformationDetailsStorageConfig_ != null; - } - /** - *
-     * Config for storing transformation details. This is separate from the
-     * de-identified content, and contains metadata about the successful
-     * transformations and/or failures that occurred while de-identifying. This
-     * needs to be set in order for users to access information about the status
-     * of each transformation (see
-     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-     * message for more information about what is noted).
-     * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - * @return The transformationDetailsStorageConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getTransformationDetailsStorageConfig() { - return transformationDetailsStorageConfig_ == null ? com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance() : transformationDetailsStorageConfig_; - } - /** - *
-     * Config for storing transformation details. This is separate from the
-     * de-identified content, and contains metadata about the successful
-     * transformations and/or failures that occurred while de-identifying. This
-     * needs to be set in order for users to access information about the status
-     * of each transformation (see
-     * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-     * message for more information about what is noted).
-     * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder getTransformationDetailsStorageConfigOrBuilder() { - return getTransformationDetailsStorageConfig(); - } - - public static final int CLOUD_STORAGE_OUTPUT_FIELD_NUMBER = 9; - /** - *
-     * Required. User settable Cloud Storage bucket and folders to store de-identified
-     * files. This field must be set for cloud storage deidentification. The
-     * output Cloud Storage bucket must be different from the input bucket.
-     * De-identified files will overwrite files in the output path.
-     * Form of: gs://bucket/folder/ or gs://bucket
-     * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the cloudStorageOutput field is set. - */ - public boolean hasCloudStorageOutput() { - return outputCase_ == 9; - } - /** - *
-     * Required. User settable Cloud Storage bucket and folders to store de-identified
-     * files. This field must be set for cloud storage deidentification. The
-     * output Cloud Storage bucket must be different from the input bucket.
-     * De-identified files will overwrite files in the output path.
-     * Form of: gs://bucket/folder/ or gs://bucket
-     * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return The cloudStorageOutput. - */ - public java.lang.String getCloudStorageOutput() { - java.lang.Object ref = ""; - if (outputCase_ == 9) { - ref = output_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (outputCase_ == 9) { - output_ = s; - } - return s; - } - } - /** - *
-     * Required. User settable Cloud Storage bucket and folders to store de-identified
-     * files. This field must be set for cloud storage deidentification. The
-     * output Cloud Storage bucket must be different from the input bucket.
-     * De-identified files will overwrite files in the output path.
-     * Form of: gs://bucket/folder/ or gs://bucket
-     * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cloudStorageOutput. - */ - public com.google.protobuf.ByteString - getCloudStorageOutputBytes() { - java.lang.Object ref = ""; - if (outputCase_ == 9) { - ref = output_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (outputCase_ == 9) { - output_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILE_TYPES_TO_TRANSFORM_FIELD_NUMBER = 8; - private java.util.List fileTypesToTransform_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.privacy.dlp.v2.FileType> fileTypesToTransform_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.privacy.dlp.v2.FileType>() { - public com.google.privacy.dlp.v2.FileType convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.FileType result = com.google.privacy.dlp.v2.FileType.valueOf(from); - return result == null ? com.google.privacy.dlp.v2.FileType.UNRECOGNIZED : result; - } - }; - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return A list containing the fileTypesToTransform. - */ - @java.lang.Override - public java.util.List getFileTypesToTransformList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypesToTransform_, fileTypesToTransform_converter_); - } - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return The count of fileTypesToTransform. - */ - @java.lang.Override - public int getFileTypesToTransformCount() { - return fileTypesToTransform_.size(); - } - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param index The index of the element to return. - * @return The fileTypesToTransform at the given index. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FileType getFileTypesToTransform(int index) { - return fileTypesToTransform_converter_.convert(fileTypesToTransform_.get(index)); - } - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return A list containing the enum numeric values on the wire for fileTypesToTransform. - */ - @java.lang.Override - public java.util.List - getFileTypesToTransformValueList() { - return fileTypesToTransform_; - } - /** - *
-     * List of user-specified file type groups to transform. If specified, only
-     * the files with these filetypes will be transformed. If empty, all
-     * supported files will be transformed. Supported types may be automatically
-     * added over time. If a file type is set in this field that isn't supported
-     * by the Deidentify action then the job will fail and will not be
-     * successfully created/started. Currently the only filetypes supported are:
-     * IMAGES, TEXT_FILES, CSV, TSV.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of fileTypesToTransform at the given index. - */ - @java.lang.Override - public int getFileTypesToTransformValue(int index) { - return fileTypesToTransform_.get(index); - } - private int fileTypesToTransformMemoizedSerializedSize; - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (transformationDetailsStorageConfig_ != null) { - output.writeMessage(3, getTransformationDetailsStorageConfig()); - } - if (transformationConfig_ != null) { - output.writeMessage(7, getTransformationConfig()); - } - if (getFileTypesToTransformList().size() > 0) { - output.writeUInt32NoTag(66); - output.writeUInt32NoTag(fileTypesToTransformMemoizedSerializedSize); - } - for (int i = 0; i < fileTypesToTransform_.size(); i++) { - output.writeEnumNoTag(fileTypesToTransform_.get(i)); - } - if (outputCase_ == 9) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, output_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (transformationDetailsStorageConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTransformationDetailsStorageConfig()); - } - if (transformationConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getTransformationConfig()); - } - { - int dataSize = 0; - for (int i = 0; i < fileTypesToTransform_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(fileTypesToTransform_.get(i)); - } - size += dataSize; - if (!getFileTypesToTransformList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }fileTypesToTransformMemoizedSerializedSize = dataSize; - } - if (outputCase_ == 9) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, output_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Action.Deidentify)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Action.Deidentify other = (com.google.privacy.dlp.v2.Action.Deidentify) obj; - - if (hasTransformationConfig() != other.hasTransformationConfig()) return false; - if (hasTransformationConfig()) { - if (!getTransformationConfig() - .equals(other.getTransformationConfig())) return false; - } - if (hasTransformationDetailsStorageConfig() != other.hasTransformationDetailsStorageConfig()) return false; - if (hasTransformationDetailsStorageConfig()) { - if (!getTransformationDetailsStorageConfig() - .equals(other.getTransformationDetailsStorageConfig())) return false; - } - if (!fileTypesToTransform_.equals(other.fileTypesToTransform_)) return false; - if (!getOutputCase().equals(other.getOutputCase())) return false; - switch (outputCase_) { - case 9: - if (!getCloudStorageOutput() - .equals(other.getCloudStorageOutput())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTransformationConfig()) { - hash = (37 * hash) + TRANSFORMATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getTransformationConfig().hashCode(); - } - if (hasTransformationDetailsStorageConfig()) { - hash = (37 * hash) + TRANSFORMATION_DETAILS_STORAGE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getTransformationDetailsStorageConfig().hashCode(); - } - if (getFileTypesToTransformCount() > 0) { - hash = (37 * hash) + FILE_TYPES_TO_TRANSFORM_FIELD_NUMBER; - hash = (53 * hash) + fileTypesToTransform_.hashCode(); - } - switch (outputCase_) { - case 9: - hash = (37 * hash) + CLOUD_STORAGE_OUTPUT_FIELD_NUMBER; - hash = (53 * hash) + getCloudStorageOutput().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.Deidentify parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Action.Deidentify prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Create a de-identified copy of the requested table or files.
-     * A TransformationDetail will be created for each transformation.
-     * If any rows in BigQuery are skipped during de-identification
-     * (transformation errors or row size exceeds BigQuery insert API limits) they
-     * are placed in the failure output table. If the original row exceeds
-     * the BigQuery insert API limit it will be truncated when written to the
-     * failure output table. The failure output table can be set in the
-     * action.deidentify.output.big_query_output.deidentified_failure_output_table
-     * field, if no table is set, a table will be automatically created in the
-     * same project and dataset as the original table.
-     * Compatible with: Inspect
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.Deidentify} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.Deidentify) - com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.Deidentify.class, com.google.privacy.dlp.v2.Action.Deidentify.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Action.Deidentify.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (transformationConfigBuilder_ == null) { - transformationConfig_ = null; - } else { - transformationConfig_ = null; - transformationConfigBuilder_ = null; - } - if (transformationDetailsStorageConfigBuilder_ == null) { - transformationDetailsStorageConfig_ = null; - } else { - transformationDetailsStorageConfig_ = null; - transformationDetailsStorageConfigBuilder_ = null; - } - fileTypesToTransform_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - outputCase_ = 0; - output_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.Deidentify getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.Deidentify build() { - com.google.privacy.dlp.v2.Action.Deidentify result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.Deidentify buildPartial() { - com.google.privacy.dlp.v2.Action.Deidentify result = new com.google.privacy.dlp.v2.Action.Deidentify(this); - int from_bitField0_ = bitField0_; - if (transformationConfigBuilder_ == null) { - result.transformationConfig_ = transformationConfig_; - } else { - result.transformationConfig_ = transformationConfigBuilder_.build(); - } - if (transformationDetailsStorageConfigBuilder_ == null) { - result.transformationDetailsStorageConfig_ = transformationDetailsStorageConfig_; - } else { - result.transformationDetailsStorageConfig_ = transformationDetailsStorageConfigBuilder_.build(); - } - if (outputCase_ == 9) { - result.output_ = output_; - } - if (((bitField0_ & 0x00000001) != 0)) { - fileTypesToTransform_ = java.util.Collections.unmodifiableList(fileTypesToTransform_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fileTypesToTransform_ = fileTypesToTransform_; - result.outputCase_ = outputCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Action.Deidentify) { - return mergeFrom((com.google.privacy.dlp.v2.Action.Deidentify)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Action.Deidentify other) { - if (other == com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance()) return this; - if (other.hasTransformationConfig()) { - mergeTransformationConfig(other.getTransformationConfig()); - } - if (other.hasTransformationDetailsStorageConfig()) { - mergeTransformationDetailsStorageConfig(other.getTransformationDetailsStorageConfig()); - } - if (!other.fileTypesToTransform_.isEmpty()) { - if (fileTypesToTransform_.isEmpty()) { - fileTypesToTransform_ = other.fileTypesToTransform_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFileTypesToTransformIsMutable(); - fileTypesToTransform_.addAll(other.fileTypesToTransform_); - } - onChanged(); - } - switch (other.getOutputCase()) { - case CLOUD_STORAGE_OUTPUT: { - outputCase_ = 9; - output_ = other.output_; - onChanged(); - break; - } - case OUTPUT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Action.Deidentify parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Action.Deidentify) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int outputCase_ = 0; - private java.lang.Object output_; - public OutputCase - getOutputCase() { - return OutputCase.forNumber( - outputCase_); - } - - public Builder clearOutput() { - outputCase_ = 0; - output_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.privacy.dlp.v2.TransformationConfig transformationConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationConfig, com.google.privacy.dlp.v2.TransformationConfig.Builder, com.google.privacy.dlp.v2.TransformationConfigOrBuilder> transformationConfigBuilder_; - /** - *
-       * User specified deidentify templates and configs for structured,
-       * unstructured, and image files.
-       * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - * @return Whether the transformationConfig field is set. - */ - public boolean hasTransformationConfig() { - return transformationConfigBuilder_ != null || transformationConfig_ != null; - } - /** - *
-       * User specified deidentify templates and configs for structured,
-       * unstructured, and image files.
-       * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - * @return The transformationConfig. - */ - public com.google.privacy.dlp.v2.TransformationConfig getTransformationConfig() { - if (transformationConfigBuilder_ == null) { - return transformationConfig_ == null ? com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance() : transformationConfig_; - } else { - return transformationConfigBuilder_.getMessage(); - } - } - /** - *
-       * User specified deidentify templates and configs for structured,
-       * unstructured, and image files.
-       * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - */ - public Builder setTransformationConfig(com.google.privacy.dlp.v2.TransformationConfig value) { - if (transformationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformationConfig_ = value; - onChanged(); - } else { - transformationConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * User specified deidentify templates and configs for structured,
-       * unstructured, and image files.
-       * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - */ - public Builder setTransformationConfig( - com.google.privacy.dlp.v2.TransformationConfig.Builder builderForValue) { - if (transformationConfigBuilder_ == null) { - transformationConfig_ = builderForValue.build(); - onChanged(); - } else { - transformationConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * User specified deidentify templates and configs for structured,
-       * unstructured, and image files.
-       * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - */ - public Builder mergeTransformationConfig(com.google.privacy.dlp.v2.TransformationConfig value) { - if (transformationConfigBuilder_ == null) { - if (transformationConfig_ != null) { - transformationConfig_ = - com.google.privacy.dlp.v2.TransformationConfig.newBuilder(transformationConfig_).mergeFrom(value).buildPartial(); - } else { - transformationConfig_ = value; - } - onChanged(); - } else { - transformationConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * User specified deidentify templates and configs for structured,
-       * unstructured, and image files.
-       * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - */ - public Builder clearTransformationConfig() { - if (transformationConfigBuilder_ == null) { - transformationConfig_ = null; - onChanged(); - } else { - transformationConfig_ = null; - transformationConfigBuilder_ = null; - } - - return this; - } - /** - *
-       * User specified deidentify templates and configs for structured,
-       * unstructured, and image files.
-       * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - */ - public com.google.privacy.dlp.v2.TransformationConfig.Builder getTransformationConfigBuilder() { - - onChanged(); - return getTransformationConfigFieldBuilder().getBuilder(); - } - /** - *
-       * User specified deidentify templates and configs for structured,
-       * unstructured, and image files.
-       * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - */ - public com.google.privacy.dlp.v2.TransformationConfigOrBuilder getTransformationConfigOrBuilder() { - if (transformationConfigBuilder_ != null) { - return transformationConfigBuilder_.getMessageOrBuilder(); - } else { - return transformationConfig_ == null ? - com.google.privacy.dlp.v2.TransformationConfig.getDefaultInstance() : transformationConfig_; - } - } - /** - *
-       * User specified deidentify templates and configs for structured,
-       * unstructured, and image files.
-       * 
- * - * .google.privacy.dlp.v2.TransformationConfig transformation_config = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationConfig, com.google.privacy.dlp.v2.TransformationConfig.Builder, com.google.privacy.dlp.v2.TransformationConfigOrBuilder> - getTransformationConfigFieldBuilder() { - if (transformationConfigBuilder_ == null) { - transformationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationConfig, com.google.privacy.dlp.v2.TransformationConfig.Builder, com.google.privacy.dlp.v2.TransformationConfigOrBuilder>( - getTransformationConfig(), - getParentForChildren(), - isClean()); - transformationConfig_ = null; - } - return transformationConfigBuilder_; - } - - private com.google.privacy.dlp.v2.TransformationDetailsStorageConfig transformationDetailsStorageConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder, com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder> transformationDetailsStorageConfigBuilder_; - /** - *
-       * Config for storing transformation details. This is separate from the
-       * de-identified content, and contains metadata about the successful
-       * transformations and/or failures that occurred while de-identifying. This
-       * needs to be set in order for users to access information about the status
-       * of each transformation (see
-       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-       * message for more information about what is noted).
-       * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - * @return Whether the transformationDetailsStorageConfig field is set. - */ - public boolean hasTransformationDetailsStorageConfig() { - return transformationDetailsStorageConfigBuilder_ != null || transformationDetailsStorageConfig_ != null; - } - /** - *
-       * Config for storing transformation details. This is separate from the
-       * de-identified content, and contains metadata about the successful
-       * transformations and/or failures that occurred while de-identifying. This
-       * needs to be set in order for users to access information about the status
-       * of each transformation (see
-       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-       * message for more information about what is noted).
-       * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - * @return The transformationDetailsStorageConfig. - */ - public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig getTransformationDetailsStorageConfig() { - if (transformationDetailsStorageConfigBuilder_ == null) { - return transformationDetailsStorageConfig_ == null ? com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance() : transformationDetailsStorageConfig_; - } else { - return transformationDetailsStorageConfigBuilder_.getMessage(); - } - } - /** - *
-       * Config for storing transformation details. This is separate from the
-       * de-identified content, and contains metadata about the successful
-       * transformations and/or failures that occurred while de-identifying. This
-       * needs to be set in order for users to access information about the status
-       * of each transformation (see
-       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-       * message for more information about what is noted).
-       * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - */ - public Builder setTransformationDetailsStorageConfig(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig value) { - if (transformationDetailsStorageConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformationDetailsStorageConfig_ = value; - onChanged(); - } else { - transformationDetailsStorageConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Config for storing transformation details. This is separate from the
-       * de-identified content, and contains metadata about the successful
-       * transformations and/or failures that occurred while de-identifying. This
-       * needs to be set in order for users to access information about the status
-       * of each transformation (see
-       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-       * message for more information about what is noted).
-       * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - */ - public Builder setTransformationDetailsStorageConfig( - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder builderForValue) { - if (transformationDetailsStorageConfigBuilder_ == null) { - transformationDetailsStorageConfig_ = builderForValue.build(); - onChanged(); - } else { - transformationDetailsStorageConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Config for storing transformation details. This is separate from the
-       * de-identified content, and contains metadata about the successful
-       * transformations and/or failures that occurred while de-identifying. This
-       * needs to be set in order for users to access information about the status
-       * of each transformation (see
-       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-       * message for more information about what is noted).
-       * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - */ - public Builder mergeTransformationDetailsStorageConfig(com.google.privacy.dlp.v2.TransformationDetailsStorageConfig value) { - if (transformationDetailsStorageConfigBuilder_ == null) { - if (transformationDetailsStorageConfig_ != null) { - transformationDetailsStorageConfig_ = - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.newBuilder(transformationDetailsStorageConfig_).mergeFrom(value).buildPartial(); - } else { - transformationDetailsStorageConfig_ = value; - } - onChanged(); - } else { - transformationDetailsStorageConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Config for storing transformation details. This is separate from the
-       * de-identified content, and contains metadata about the successful
-       * transformations and/or failures that occurred while de-identifying. This
-       * needs to be set in order for users to access information about the status
-       * of each transformation (see
-       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-       * message for more information about what is noted).
-       * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - */ - public Builder clearTransformationDetailsStorageConfig() { - if (transformationDetailsStorageConfigBuilder_ == null) { - transformationDetailsStorageConfig_ = null; - onChanged(); - } else { - transformationDetailsStorageConfig_ = null; - transformationDetailsStorageConfigBuilder_ = null; - } - - return this; - } - /** - *
-       * Config for storing transformation details. This is separate from the
-       * de-identified content, and contains metadata about the successful
-       * transformations and/or failures that occurred while de-identifying. This
-       * needs to be set in order for users to access information about the status
-       * of each transformation (see
-       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-       * message for more information about what is noted).
-       * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - */ - public com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder getTransformationDetailsStorageConfigBuilder() { - - onChanged(); - return getTransformationDetailsStorageConfigFieldBuilder().getBuilder(); - } - /** - *
-       * Config for storing transformation details. This is separate from the
-       * de-identified content, and contains metadata about the successful
-       * transformations and/or failures that occurred while de-identifying. This
-       * needs to be set in order for users to access information about the status
-       * of each transformation (see
-       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-       * message for more information about what is noted).
-       * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - */ - public com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder getTransformationDetailsStorageConfigOrBuilder() { - if (transformationDetailsStorageConfigBuilder_ != null) { - return transformationDetailsStorageConfigBuilder_.getMessageOrBuilder(); - } else { - return transformationDetailsStorageConfig_ == null ? - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.getDefaultInstance() : transformationDetailsStorageConfig_; - } - } - /** - *
-       * Config for storing transformation details. This is separate from the
-       * de-identified content, and contains metadata about the successful
-       * transformations and/or failures that occurred while de-identifying. This
-       * needs to be set in order for users to access information about the status
-       * of each transformation (see
-       * [TransformationDetails][google.privacy.dlp.v2.TransformationDetails]
-       * message for more information about what is noted).
-       * 
- * - * .google.privacy.dlp.v2.TransformationDetailsStorageConfig transformation_details_storage_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder, com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder> - getTransformationDetailsStorageConfigFieldBuilder() { - if (transformationDetailsStorageConfigBuilder_ == null) { - transformationDetailsStorageConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationDetailsStorageConfig, com.google.privacy.dlp.v2.TransformationDetailsStorageConfig.Builder, com.google.privacy.dlp.v2.TransformationDetailsStorageConfigOrBuilder>( - getTransformationDetailsStorageConfig(), - getParentForChildren(), - isClean()); - transformationDetailsStorageConfig_ = null; - } - return transformationDetailsStorageConfigBuilder_; - } - - /** - *
-       * Required. User settable Cloud Storage bucket and folders to store de-identified
-       * files. This field must be set for cloud storage deidentification. The
-       * output Cloud Storage bucket must be different from the input bucket.
-       * De-identified files will overwrite files in the output path.
-       * Form of: gs://bucket/folder/ or gs://bucket
-       * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the cloudStorageOutput field is set. - */ - @java.lang.Override - public boolean hasCloudStorageOutput() { - return outputCase_ == 9; - } - /** - *
-       * Required. User settable Cloud Storage bucket and folders to store de-identified
-       * files. This field must be set for cloud storage deidentification. The
-       * output Cloud Storage bucket must be different from the input bucket.
-       * De-identified files will overwrite files in the output path.
-       * Form of: gs://bucket/folder/ or gs://bucket
-       * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return The cloudStorageOutput. - */ - @java.lang.Override - public java.lang.String getCloudStorageOutput() { - java.lang.Object ref = ""; - if (outputCase_ == 9) { - ref = output_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (outputCase_ == 9) { - output_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. User settable Cloud Storage bucket and folders to store de-identified
-       * files. This field must be set for cloud storage deidentification. The
-       * output Cloud Storage bucket must be different from the input bucket.
-       * De-identified files will overwrite files in the output path.
-       * Form of: gs://bucket/folder/ or gs://bucket
-       * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cloudStorageOutput. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCloudStorageOutputBytes() { - java.lang.Object ref = ""; - if (outputCase_ == 9) { - ref = output_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (outputCase_ == 9) { - output_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. User settable Cloud Storage bucket and folders to store de-identified
-       * files. This field must be set for cloud storage deidentification. The
-       * output Cloud Storage bucket must be different from the input bucket.
-       * De-identified files will overwrite files in the output path.
-       * Form of: gs://bucket/folder/ or gs://bucket
-       * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param value The cloudStorageOutput to set. - * @return This builder for chaining. - */ - public Builder setCloudStorageOutput( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - outputCase_ = 9; - output_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. User settable Cloud Storage bucket and folders to store de-identified
-       * files. This field must be set for cloud storage deidentification. The
-       * output Cloud Storage bucket must be different from the input bucket.
-       * De-identified files will overwrite files in the output path.
-       * Form of: gs://bucket/folder/ or gs://bucket
-       * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearCloudStorageOutput() { - if (outputCase_ == 9) { - outputCase_ = 0; - output_ = null; - onChanged(); - } - return this; - } - /** - *
-       * Required. User settable Cloud Storage bucket and folders to store de-identified
-       * files. This field must be set for cloud storage deidentification. The
-       * output Cloud Storage bucket must be different from the input bucket.
-       * De-identified files will overwrite files in the output path.
-       * Form of: gs://bucket/folder/ or gs://bucket
-       * 
- * - * string cloud_storage_output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for cloudStorageOutput to set. - * @return This builder for chaining. - */ - public Builder setCloudStorageOutputBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - outputCase_ = 9; - output_ = value; - onChanged(); - return this; - } - - private java.util.List fileTypesToTransform_ = - java.util.Collections.emptyList(); - private void ensureFileTypesToTransformIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fileTypesToTransform_ = new java.util.ArrayList(fileTypesToTransform_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return A list containing the fileTypesToTransform. - */ - public java.util.List getFileTypesToTransformList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypesToTransform_, fileTypesToTransform_converter_); - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return The count of fileTypesToTransform. - */ - public int getFileTypesToTransformCount() { - return fileTypesToTransform_.size(); - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param index The index of the element to return. - * @return The fileTypesToTransform at the given index. - */ - public com.google.privacy.dlp.v2.FileType getFileTypesToTransform(int index) { - return fileTypesToTransform_converter_.convert(fileTypesToTransform_.get(index)); - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param index The index to set the value at. - * @param value The fileTypesToTransform to set. - * @return This builder for chaining. - */ - public Builder setFileTypesToTransform( - int index, com.google.privacy.dlp.v2.FileType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileTypesToTransformIsMutable(); - fileTypesToTransform_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param value The fileTypesToTransform to add. - * @return This builder for chaining. - */ - public Builder addFileTypesToTransform(com.google.privacy.dlp.v2.FileType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileTypesToTransformIsMutable(); - fileTypesToTransform_.add(value.getNumber()); - onChanged(); - return this; - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param values The fileTypesToTransform to add. - * @return This builder for chaining. - */ - public Builder addAllFileTypesToTransform( - java.lang.Iterable values) { - ensureFileTypesToTransformIsMutable(); - for (com.google.privacy.dlp.v2.FileType value : values) { - fileTypesToTransform_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return This builder for chaining. - */ - public Builder clearFileTypesToTransform() { - fileTypesToTransform_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @return A list containing the enum numeric values on the wire for fileTypesToTransform. - */ - public java.util.List - getFileTypesToTransformValueList() { - return java.util.Collections.unmodifiableList(fileTypesToTransform_); - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of fileTypesToTransform at the given index. - */ - public int getFileTypesToTransformValue(int index) { - return fileTypesToTransform_.get(index); - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for fileTypesToTransform to set. - * @return This builder for chaining. - */ - public Builder setFileTypesToTransformValue( - int index, int value) { - ensureFileTypesToTransformIsMutable(); - fileTypesToTransform_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param value The enum numeric value on the wire for fileTypesToTransform to add. - * @return This builder for chaining. - */ - public Builder addFileTypesToTransformValue(int value) { - ensureFileTypesToTransformIsMutable(); - fileTypesToTransform_.add(value); - onChanged(); - return this; - } - /** - *
-       * List of user-specified file type groups to transform. If specified, only
-       * the files with these filetypes will be transformed. If empty, all
-       * supported files will be transformed. Supported types may be automatically
-       * added over time. If a file type is set in this field that isn't supported
-       * by the Deidentify action then the job will fail and will not be
-       * successfully created/started. Currently the only filetypes supported are:
-       * IMAGES, TEXT_FILES, CSV, TSV.
-       * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types_to_transform = 8; - * @param values The enum numeric values on the wire for fileTypesToTransform to add. - * @return This builder for chaining. - */ - public Builder addAllFileTypesToTransformValue( - java.lang.Iterable values) { - ensureFileTypesToTransformIsMutable(); - for (int value : values) { - fileTypesToTransform_.add(value); - } - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.Deidentify) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.Deidentify) - private static final com.google.privacy.dlp.v2.Action.Deidentify DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.Deidentify(); - } - - public static com.google.privacy.dlp.v2.Action.Deidentify getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Deidentify parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Deidentify(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.Deidentify getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface JobNotificationEmailsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.JobNotificationEmails) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Sends an email when the job completes. The email goes to IAM project owners
-   * and technical [Essential
-   * Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.JobNotificationEmails} - */ - public static final class JobNotificationEmails extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.JobNotificationEmails) - JobNotificationEmailsOrBuilder { - private static final long serialVersionUID = 0L; - // Use JobNotificationEmails.newBuilder() to construct. - private JobNotificationEmails(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private JobNotificationEmails() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new JobNotificationEmails(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private JobNotificationEmails( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.JobNotificationEmails.class, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Action.JobNotificationEmails)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Action.JobNotificationEmails other = (com.google.privacy.dlp.v2.Action.JobNotificationEmails) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Action.JobNotificationEmails prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Sends an email when the job completes. The email goes to IAM project owners
-     * and technical [Essential
-     * Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts).
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.JobNotificationEmails} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.JobNotificationEmails) - com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.JobNotificationEmails.class, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Action.JobNotificationEmails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.JobNotificationEmails getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.JobNotificationEmails build() { - com.google.privacy.dlp.v2.Action.JobNotificationEmails result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.JobNotificationEmails buildPartial() { - com.google.privacy.dlp.v2.Action.JobNotificationEmails result = new com.google.privacy.dlp.v2.Action.JobNotificationEmails(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Action.JobNotificationEmails) { - return mergeFrom((com.google.privacy.dlp.v2.Action.JobNotificationEmails)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Action.JobNotificationEmails other) { - if (other == com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Action.JobNotificationEmails parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Action.JobNotificationEmails) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.JobNotificationEmails) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.JobNotificationEmails) - private static final com.google.privacy.dlp.v2.Action.JobNotificationEmails DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.JobNotificationEmails(); - } - - public static com.google.privacy.dlp.v2.Action.JobNotificationEmails getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JobNotificationEmails parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JobNotificationEmails(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.JobNotificationEmails getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PublishToStackdriverOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action.PublishToStackdriver) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Enable Stackdriver metric dlp.googleapis.com/finding_count. This
-   * will publish a metric to stack driver on each infotype requested and
-   * how many findings were found for it. CustomDetectors will be bucketed
-   * as 'Custom' under the Stackdriver label 'info_type'.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.PublishToStackdriver} - */ - public static final class PublishToStackdriver extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Action.PublishToStackdriver) - PublishToStackdriverOrBuilder { - private static final long serialVersionUID = 0L; - // Use PublishToStackdriver.newBuilder() to construct. - private PublishToStackdriver(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PublishToStackdriver() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PublishToStackdriver(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PublishToStackdriver( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.PublishToStackdriver.class, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Action.PublishToStackdriver)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Action.PublishToStackdriver other = (com.google.privacy.dlp.v2.Action.PublishToStackdriver) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Action.PublishToStackdriver prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count. This
-     * will publish a metric to stack driver on each infotype requested and
-     * how many findings were found for it. CustomDetectors will be bucketed
-     * as 'Custom' under the Stackdriver label 'info_type'.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action.PublishToStackdriver} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action.PublishToStackdriver) - com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.PublishToStackdriver.class, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Action.PublishToStackdriver.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToStackdriver getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToStackdriver build() { - com.google.privacy.dlp.v2.Action.PublishToStackdriver result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToStackdriver buildPartial() { - com.google.privacy.dlp.v2.Action.PublishToStackdriver result = new com.google.privacy.dlp.v2.Action.PublishToStackdriver(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Action.PublishToStackdriver) { - return mergeFrom((com.google.privacy.dlp.v2.Action.PublishToStackdriver)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Action.PublishToStackdriver other) { - if (other == com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Action.PublishToStackdriver parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Action.PublishToStackdriver) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action.PublishToStackdriver) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action.PublishToStackdriver) - private static final com.google.privacy.dlp.v2.Action.PublishToStackdriver DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action.PublishToStackdriver(); - } - - public static com.google.privacy.dlp.v2.Action.PublishToStackdriver getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PublishToStackdriver parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PublishToStackdriver(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToStackdriver getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int actionCase_ = 0; - private java.lang.Object action_; - public enum ActionCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SAVE_FINDINGS(1), - PUB_SUB(2), - PUBLISH_SUMMARY_TO_CSCC(3), - PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG(5), - DEIDENTIFY(7), - JOB_NOTIFICATION_EMAILS(8), - PUBLISH_TO_STACKDRIVER(9), - ACTION_NOT_SET(0); - private final int value; - private ActionCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ActionCase valueOf(int value) { - return forNumber(value); - } - - public static ActionCase forNumber(int value) { - switch (value) { - case 1: return SAVE_FINDINGS; - case 2: return PUB_SUB; - case 3: return PUBLISH_SUMMARY_TO_CSCC; - case 5: return PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG; - case 7: return DEIDENTIFY; - case 8: return JOB_NOTIFICATION_EMAILS; - case 9: return PUBLISH_TO_STACKDRIVER; - case 0: return ACTION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ActionCase - getActionCase() { - return ActionCase.forNumber( - actionCase_); - } - - public static final int SAVE_FINDINGS_FIELD_NUMBER = 1; - /** - *
-   * Save resulting findings in a provided location.
-   * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - * @return Whether the saveFindings field is set. - */ - @java.lang.Override - public boolean hasSaveFindings() { - return actionCase_ == 1; - } - /** - *
-   * Save resulting findings in a provided location.
-   * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - * @return The saveFindings. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.SaveFindings getSaveFindings() { - if (actionCase_ == 1) { - return (com.google.privacy.dlp.v2.Action.SaveFindings) action_; - } - return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); - } - /** - *
-   * Save resulting findings in a provided location.
-   * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder getSaveFindingsOrBuilder() { - if (actionCase_ == 1) { - return (com.google.privacy.dlp.v2.Action.SaveFindings) action_; - } - return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); - } - - public static final int PUB_SUB_FIELD_NUMBER = 2; - /** - *
-   * Publish a notification to a Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - * @return Whether the pubSub field is set. - */ - @java.lang.Override - public boolean hasPubSub() { - return actionCase_ == 2; - } - /** - *
-   * Publish a notification to a Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - * @return The pubSub. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToPubSub getPubSub() { - if (actionCase_ == 2) { - return (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_; - } - return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); - } - /** - *
-   * Publish a notification to a Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder getPubSubOrBuilder() { - if (actionCase_ == 2) { - return (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_; - } - return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); - } - - public static final int PUBLISH_SUMMARY_TO_CSCC_FIELD_NUMBER = 3; - /** - *
-   * Publish summary to Cloud Security Command Center (Alpha).
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - * @return Whether the publishSummaryToCscc field is set. - */ - @java.lang.Override - public boolean hasPublishSummaryToCscc() { - return actionCase_ == 3; - } - /** - *
-   * Publish summary to Cloud Security Command Center (Alpha).
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - * @return The publishSummaryToCscc. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getPublishSummaryToCscc() { - if (actionCase_ == 3) { - return (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_; - } - return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); - } - /** - *
-   * Publish summary to Cloud Security Command Center (Alpha).
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder getPublishSummaryToCsccOrBuilder() { - if (actionCase_ == 3) { - return (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_; - } - return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); - } - - public static final int PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG_FIELD_NUMBER = 5; - /** - *
-   * Publish findings to Cloud Datahub.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - * @return Whether the publishFindingsToCloudDataCatalog field is set. - */ - @java.lang.Override - public boolean hasPublishFindingsToCloudDataCatalog() { - return actionCase_ == 5; - } - /** - *
-   * Publish findings to Cloud Datahub.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - * @return The publishFindingsToCloudDataCatalog. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getPublishFindingsToCloudDataCatalog() { - if (actionCase_ == 5) { - return (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_; - } - return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); - } - /** - *
-   * Publish findings to Cloud Datahub.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder getPublishFindingsToCloudDataCatalogOrBuilder() { - if (actionCase_ == 5) { - return (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_; - } - return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); - } - - public static final int DEIDENTIFY_FIELD_NUMBER = 7; - /** - *
-   * Create a de-identified copy of the input data.
-   * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - * @return Whether the deidentify field is set. - */ - @java.lang.Override - public boolean hasDeidentify() { - return actionCase_ == 7; - } - /** - *
-   * Create a de-identified copy of the input data.
-   * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - * @return The deidentify. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.Deidentify getDeidentify() { - if (actionCase_ == 7) { - return (com.google.privacy.dlp.v2.Action.Deidentify) action_; - } - return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); - } - /** - *
-   * Create a de-identified copy of the input data.
-   * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder getDeidentifyOrBuilder() { - if (actionCase_ == 7) { - return (com.google.privacy.dlp.v2.Action.Deidentify) action_; - } - return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); - } - - public static final int JOB_NOTIFICATION_EMAILS_FIELD_NUMBER = 8; - /** - *
-   * Enable email notification for project owners and editors on job's
-   * completion/failure.
-   * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - * @return Whether the jobNotificationEmails field is set. - */ - @java.lang.Override - public boolean hasJobNotificationEmails() { - return actionCase_ == 8; - } - /** - *
-   * Enable email notification for project owners and editors on job's
-   * completion/failure.
-   * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - * @return The jobNotificationEmails. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.JobNotificationEmails getJobNotificationEmails() { - if (actionCase_ == 8) { - return (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_; - } - return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); - } - /** - *
-   * Enable email notification for project owners and editors on job's
-   * completion/failure.
-   * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder getJobNotificationEmailsOrBuilder() { - if (actionCase_ == 8) { - return (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_; - } - return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); - } - - public static final int PUBLISH_TO_STACKDRIVER_FIELD_NUMBER = 9; - /** - *
-   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - * @return Whether the publishToStackdriver field is set. - */ - @java.lang.Override - public boolean hasPublishToStackdriver() { - return actionCase_ == 9; - } - /** - *
-   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - * @return The publishToStackdriver. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToStackdriver getPublishToStackdriver() { - if (actionCase_ == 9) { - return (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_; - } - return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); - } - /** - *
-   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder getPublishToStackdriverOrBuilder() { - if (actionCase_ == 9) { - return (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_; - } - return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (actionCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.Action.SaveFindings) action_); - } - if (actionCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_); - } - if (actionCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_); - } - if (actionCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_); - } - if (actionCase_ == 7) { - output.writeMessage(7, (com.google.privacy.dlp.v2.Action.Deidentify) action_); - } - if (actionCase_ == 8) { - output.writeMessage(8, (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_); - } - if (actionCase_ == 9) { - output.writeMessage(9, (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (actionCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.Action.SaveFindings) action_); - } - if (actionCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_); - } - if (actionCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_); - } - if (actionCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_); - } - if (actionCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (com.google.privacy.dlp.v2.Action.Deidentify) action_); - } - if (actionCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_); - } - if (actionCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Action)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Action other = (com.google.privacy.dlp.v2.Action) obj; - - if (!getActionCase().equals(other.getActionCase())) return false; - switch (actionCase_) { - case 1: - if (!getSaveFindings() - .equals(other.getSaveFindings())) return false; - break; - case 2: - if (!getPubSub() - .equals(other.getPubSub())) return false; - break; - case 3: - if (!getPublishSummaryToCscc() - .equals(other.getPublishSummaryToCscc())) return false; - break; - case 5: - if (!getPublishFindingsToCloudDataCatalog() - .equals(other.getPublishFindingsToCloudDataCatalog())) return false; - break; - case 7: - if (!getDeidentify() - .equals(other.getDeidentify())) return false; - break; - case 8: - if (!getJobNotificationEmails() - .equals(other.getJobNotificationEmails())) return false; - break; - case 9: - if (!getPublishToStackdriver() - .equals(other.getPublishToStackdriver())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (actionCase_) { - case 1: - hash = (37 * hash) + SAVE_FINDINGS_FIELD_NUMBER; - hash = (53 * hash) + getSaveFindings().hashCode(); - break; - case 2: - hash = (37 * hash) + PUB_SUB_FIELD_NUMBER; - hash = (53 * hash) + getPubSub().hashCode(); - break; - case 3: - hash = (37 * hash) + PUBLISH_SUMMARY_TO_CSCC_FIELD_NUMBER; - hash = (53 * hash) + getPublishSummaryToCscc().hashCode(); - break; - case 5: - hash = (37 * hash) + PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG_FIELD_NUMBER; - hash = (53 * hash) + getPublishFindingsToCloudDataCatalog().hashCode(); - break; - case 7: - hash = (37 * hash) + DEIDENTIFY_FIELD_NUMBER; - hash = (53 * hash) + getDeidentify().hashCode(); - break; - case 8: - hash = (37 * hash) + JOB_NOTIFICATION_EMAILS_FIELD_NUMBER; - hash = (53 * hash) + getJobNotificationEmails().hashCode(); - break; - case 9: - hash = (37 * hash) + PUBLISH_TO_STACKDRIVER_FIELD_NUMBER; - hash = (53 * hash) + getPublishToStackdriver().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Action parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Action parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Action parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Action parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Action prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A task to execute on the completion of a job.
-   * See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Action} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Action) - com.google.privacy.dlp.v2.ActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Action.class, com.google.privacy.dlp.v2.Action.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Action.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - actionCase_ = 0; - action_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Action_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Action.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action build() { - com.google.privacy.dlp.v2.Action result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action buildPartial() { - com.google.privacy.dlp.v2.Action result = new com.google.privacy.dlp.v2.Action(this); - if (actionCase_ == 1) { - if (saveFindingsBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = saveFindingsBuilder_.build(); - } - } - if (actionCase_ == 2) { - if (pubSubBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = pubSubBuilder_.build(); - } - } - if (actionCase_ == 3) { - if (publishSummaryToCsccBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = publishSummaryToCsccBuilder_.build(); - } - } - if (actionCase_ == 5) { - if (publishFindingsToCloudDataCatalogBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = publishFindingsToCloudDataCatalogBuilder_.build(); - } - } - if (actionCase_ == 7) { - if (deidentifyBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = deidentifyBuilder_.build(); - } - } - if (actionCase_ == 8) { - if (jobNotificationEmailsBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = jobNotificationEmailsBuilder_.build(); - } - } - if (actionCase_ == 9) { - if (publishToStackdriverBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = publishToStackdriverBuilder_.build(); - } - } - result.actionCase_ = actionCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Action) { - return mergeFrom((com.google.privacy.dlp.v2.Action)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Action other) { - if (other == com.google.privacy.dlp.v2.Action.getDefaultInstance()) return this; - switch (other.getActionCase()) { - case SAVE_FINDINGS: { - mergeSaveFindings(other.getSaveFindings()); - break; - } - case PUB_SUB: { - mergePubSub(other.getPubSub()); - break; - } - case PUBLISH_SUMMARY_TO_CSCC: { - mergePublishSummaryToCscc(other.getPublishSummaryToCscc()); - break; - } - case PUBLISH_FINDINGS_TO_CLOUD_DATA_CATALOG: { - mergePublishFindingsToCloudDataCatalog(other.getPublishFindingsToCloudDataCatalog()); - break; - } - case DEIDENTIFY: { - mergeDeidentify(other.getDeidentify()); - break; - } - case JOB_NOTIFICATION_EMAILS: { - mergeJobNotificationEmails(other.getJobNotificationEmails()); - break; - } - case PUBLISH_TO_STACKDRIVER: { - mergePublishToStackdriver(other.getPublishToStackdriver()); - break; - } - case ACTION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Action parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Action) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int actionCase_ = 0; - private java.lang.Object action_; - public ActionCase - getActionCase() { - return ActionCase.forNumber( - actionCase_); - } - - public Builder clearAction() { - actionCase_ = 0; - action_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.SaveFindings, com.google.privacy.dlp.v2.Action.SaveFindings.Builder, com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder> saveFindingsBuilder_; - /** - *
-     * Save resulting findings in a provided location.
-     * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - * @return Whether the saveFindings field is set. - */ - @java.lang.Override - public boolean hasSaveFindings() { - return actionCase_ == 1; - } - /** - *
-     * Save resulting findings in a provided location.
-     * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - * @return The saveFindings. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.SaveFindings getSaveFindings() { - if (saveFindingsBuilder_ == null) { - if (actionCase_ == 1) { - return (com.google.privacy.dlp.v2.Action.SaveFindings) action_; - } - return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); - } else { - if (actionCase_ == 1) { - return saveFindingsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); - } - } - /** - *
-     * Save resulting findings in a provided location.
-     * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - */ - public Builder setSaveFindings(com.google.privacy.dlp.v2.Action.SaveFindings value) { - if (saveFindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - saveFindingsBuilder_.setMessage(value); - } - actionCase_ = 1; - return this; - } - /** - *
-     * Save resulting findings in a provided location.
-     * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - */ - public Builder setSaveFindings( - com.google.privacy.dlp.v2.Action.SaveFindings.Builder builderForValue) { - if (saveFindingsBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - saveFindingsBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 1; - return this; - } - /** - *
-     * Save resulting findings in a provided location.
-     * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - */ - public Builder mergeSaveFindings(com.google.privacy.dlp.v2.Action.SaveFindings value) { - if (saveFindingsBuilder_ == null) { - if (actionCase_ == 1 && - action_ != com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance()) { - action_ = com.google.privacy.dlp.v2.Action.SaveFindings.newBuilder((com.google.privacy.dlp.v2.Action.SaveFindings) action_) - .mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 1) { - saveFindingsBuilder_.mergeFrom(value); - } else { - saveFindingsBuilder_.setMessage(value); - } - } - actionCase_ = 1; - return this; - } - /** - *
-     * Save resulting findings in a provided location.
-     * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - */ - public Builder clearSaveFindings() { - if (saveFindingsBuilder_ == null) { - if (actionCase_ == 1) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 1) { - actionCase_ = 0; - action_ = null; - } - saveFindingsBuilder_.clear(); - } - return this; - } - /** - *
-     * Save resulting findings in a provided location.
-     * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - */ - public com.google.privacy.dlp.v2.Action.SaveFindings.Builder getSaveFindingsBuilder() { - return getSaveFindingsFieldBuilder().getBuilder(); - } - /** - *
-     * Save resulting findings in a provided location.
-     * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder getSaveFindingsOrBuilder() { - if ((actionCase_ == 1) && (saveFindingsBuilder_ != null)) { - return saveFindingsBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 1) { - return (com.google.privacy.dlp.v2.Action.SaveFindings) action_; - } - return com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); - } - } - /** - *
-     * Save resulting findings in a provided location.
-     * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.SaveFindings, com.google.privacy.dlp.v2.Action.SaveFindings.Builder, com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder> - getSaveFindingsFieldBuilder() { - if (saveFindingsBuilder_ == null) { - if (!(actionCase_ == 1)) { - action_ = com.google.privacy.dlp.v2.Action.SaveFindings.getDefaultInstance(); - } - saveFindingsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.SaveFindings, com.google.privacy.dlp.v2.Action.SaveFindings.Builder, com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder>( - (com.google.privacy.dlp.v2.Action.SaveFindings) action_, - getParentForChildren(), - isClean()); - action_ = null; - } - actionCase_ = 1; - onChanged();; - return saveFindingsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishToPubSub, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder, com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder> pubSubBuilder_; - /** - *
-     * Publish a notification to a Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - * @return Whether the pubSub field is set. - */ - @java.lang.Override - public boolean hasPubSub() { - return actionCase_ == 2; - } - /** - *
-     * Publish a notification to a Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - * @return The pubSub. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToPubSub getPubSub() { - if (pubSubBuilder_ == null) { - if (actionCase_ == 2) { - return (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_; - } - return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); - } else { - if (actionCase_ == 2) { - return pubSubBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); - } - } - /** - *
-     * Publish a notification to a Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - */ - public Builder setPubSub(com.google.privacy.dlp.v2.Action.PublishToPubSub value) { - if (pubSubBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - pubSubBuilder_.setMessage(value); - } - actionCase_ = 2; - return this; - } - /** - *
-     * Publish a notification to a Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - */ - public Builder setPubSub( - com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder builderForValue) { - if (pubSubBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - pubSubBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 2; - return this; - } - /** - *
-     * Publish a notification to a Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - */ - public Builder mergePubSub(com.google.privacy.dlp.v2.Action.PublishToPubSub value) { - if (pubSubBuilder_ == null) { - if (actionCase_ == 2 && - action_ != com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance()) { - action_ = com.google.privacy.dlp.v2.Action.PublishToPubSub.newBuilder((com.google.privacy.dlp.v2.Action.PublishToPubSub) action_) - .mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 2) { - pubSubBuilder_.mergeFrom(value); - } else { - pubSubBuilder_.setMessage(value); - } - } - actionCase_ = 2; - return this; - } - /** - *
-     * Publish a notification to a Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - */ - public Builder clearPubSub() { - if (pubSubBuilder_ == null) { - if (actionCase_ == 2) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 2) { - actionCase_ = 0; - action_ = null; - } - pubSubBuilder_.clear(); - } - return this; - } - /** - *
-     * Publish a notification to a Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - */ - public com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder getPubSubBuilder() { - return getPubSubFieldBuilder().getBuilder(); - } - /** - *
-     * Publish a notification to a Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder getPubSubOrBuilder() { - if ((actionCase_ == 2) && (pubSubBuilder_ != null)) { - return pubSubBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 2) { - return (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_; - } - return com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); - } - } - /** - *
-     * Publish a notification to a Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishToPubSub, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder, com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder> - getPubSubFieldBuilder() { - if (pubSubBuilder_ == null) { - if (!(actionCase_ == 2)) { - action_ = com.google.privacy.dlp.v2.Action.PublishToPubSub.getDefaultInstance(); - } - pubSubBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishToPubSub, com.google.privacy.dlp.v2.Action.PublishToPubSub.Builder, com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder>( - (com.google.privacy.dlp.v2.Action.PublishToPubSub) action_, - getParentForChildren(), - isClean()); - action_ = null; - } - actionCase_ = 2; - onChanged();; - return pubSubBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder, com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder> publishSummaryToCsccBuilder_; - /** - *
-     * Publish summary to Cloud Security Command Center (Alpha).
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - * @return Whether the publishSummaryToCscc field is set. - */ - @java.lang.Override - public boolean hasPublishSummaryToCscc() { - return actionCase_ == 3; - } - /** - *
-     * Publish summary to Cloud Security Command Center (Alpha).
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - * @return The publishSummaryToCscc. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getPublishSummaryToCscc() { - if (publishSummaryToCsccBuilder_ == null) { - if (actionCase_ == 3) { - return (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_; - } - return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); - } else { - if (actionCase_ == 3) { - return publishSummaryToCsccBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); - } - } - /** - *
-     * Publish summary to Cloud Security Command Center (Alpha).
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - */ - public Builder setPublishSummaryToCscc(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc value) { - if (publishSummaryToCsccBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - publishSummaryToCsccBuilder_.setMessage(value); - } - actionCase_ = 3; - return this; - } - /** - *
-     * Publish summary to Cloud Security Command Center (Alpha).
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - */ - public Builder setPublishSummaryToCscc( - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder builderForValue) { - if (publishSummaryToCsccBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - publishSummaryToCsccBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 3; - return this; - } - /** - *
-     * Publish summary to Cloud Security Command Center (Alpha).
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - */ - public Builder mergePublishSummaryToCscc(com.google.privacy.dlp.v2.Action.PublishSummaryToCscc value) { - if (publishSummaryToCsccBuilder_ == null) { - if (actionCase_ == 3 && - action_ != com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance()) { - action_ = com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.newBuilder((com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_) - .mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 3) { - publishSummaryToCsccBuilder_.mergeFrom(value); - } else { - publishSummaryToCsccBuilder_.setMessage(value); - } - } - actionCase_ = 3; - return this; - } - /** - *
-     * Publish summary to Cloud Security Command Center (Alpha).
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - */ - public Builder clearPublishSummaryToCscc() { - if (publishSummaryToCsccBuilder_ == null) { - if (actionCase_ == 3) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 3) { - actionCase_ = 0; - action_ = null; - } - publishSummaryToCsccBuilder_.clear(); - } - return this; - } - /** - *
-     * Publish summary to Cloud Security Command Center (Alpha).
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - */ - public com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder getPublishSummaryToCsccBuilder() { - return getPublishSummaryToCsccFieldBuilder().getBuilder(); - } - /** - *
-     * Publish summary to Cloud Security Command Center (Alpha).
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder getPublishSummaryToCsccOrBuilder() { - if ((actionCase_ == 3) && (publishSummaryToCsccBuilder_ != null)) { - return publishSummaryToCsccBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 3) { - return (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_; - } - return com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); - } - } - /** - *
-     * Publish summary to Cloud Security Command Center (Alpha).
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder, com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder> - getPublishSummaryToCsccFieldBuilder() { - if (publishSummaryToCsccBuilder_ == null) { - if (!(actionCase_ == 3)) { - action_ = com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.getDefaultInstance(); - } - publishSummaryToCsccBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc, com.google.privacy.dlp.v2.Action.PublishSummaryToCscc.Builder, com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder>( - (com.google.privacy.dlp.v2.Action.PublishSummaryToCscc) action_, - getParentForChildren(), - isClean()); - action_ = null; - } - actionCase_ = 3; - onChanged();; - return publishSummaryToCsccBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder> publishFindingsToCloudDataCatalogBuilder_; - /** - *
-     * Publish findings to Cloud Datahub.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - * @return Whether the publishFindingsToCloudDataCatalog field is set. - */ - @java.lang.Override - public boolean hasPublishFindingsToCloudDataCatalog() { - return actionCase_ == 5; - } - /** - *
-     * Publish findings to Cloud Datahub.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - * @return The publishFindingsToCloudDataCatalog. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getPublishFindingsToCloudDataCatalog() { - if (publishFindingsToCloudDataCatalogBuilder_ == null) { - if (actionCase_ == 5) { - return (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_; - } - return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); - } else { - if (actionCase_ == 5) { - return publishFindingsToCloudDataCatalogBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); - } - } - /** - *
-     * Publish findings to Cloud Datahub.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - */ - public Builder setPublishFindingsToCloudDataCatalog(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog value) { - if (publishFindingsToCloudDataCatalogBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - publishFindingsToCloudDataCatalogBuilder_.setMessage(value); - } - actionCase_ = 5; - return this; - } - /** - *
-     * Publish findings to Cloud Datahub.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - */ - public Builder setPublishFindingsToCloudDataCatalog( - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder builderForValue) { - if (publishFindingsToCloudDataCatalogBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - publishFindingsToCloudDataCatalogBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 5; - return this; - } - /** - *
-     * Publish findings to Cloud Datahub.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - */ - public Builder mergePublishFindingsToCloudDataCatalog(com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog value) { - if (publishFindingsToCloudDataCatalogBuilder_ == null) { - if (actionCase_ == 5 && - action_ != com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance()) { - action_ = com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.newBuilder((com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_) - .mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 5) { - publishFindingsToCloudDataCatalogBuilder_.mergeFrom(value); - } else { - publishFindingsToCloudDataCatalogBuilder_.setMessage(value); - } - } - actionCase_ = 5; - return this; - } - /** - *
-     * Publish findings to Cloud Datahub.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - */ - public Builder clearPublishFindingsToCloudDataCatalog() { - if (publishFindingsToCloudDataCatalogBuilder_ == null) { - if (actionCase_ == 5) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 5) { - actionCase_ = 0; - action_ = null; - } - publishFindingsToCloudDataCatalogBuilder_.clear(); - } - return this; - } - /** - *
-     * Publish findings to Cloud Datahub.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - */ - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder getPublishFindingsToCloudDataCatalogBuilder() { - return getPublishFindingsToCloudDataCatalogFieldBuilder().getBuilder(); - } - /** - *
-     * Publish findings to Cloud Datahub.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder getPublishFindingsToCloudDataCatalogOrBuilder() { - if ((actionCase_ == 5) && (publishFindingsToCloudDataCatalogBuilder_ != null)) { - return publishFindingsToCloudDataCatalogBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 5) { - return (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_; - } - return com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); - } - } - /** - *
-     * Publish findings to Cloud Datahub.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder> - getPublishFindingsToCloudDataCatalogFieldBuilder() { - if (publishFindingsToCloudDataCatalogBuilder_ == null) { - if (!(actionCase_ == 5)) { - action_ = com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.getDefaultInstance(); - } - publishFindingsToCloudDataCatalogBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.Builder, com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder>( - (com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) action_, - getParentForChildren(), - isClean()); - action_ = null; - } - actionCase_ = 5; - onChanged();; - return publishFindingsToCloudDataCatalogBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.Deidentify, com.google.privacy.dlp.v2.Action.Deidentify.Builder, com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder> deidentifyBuilder_; - /** - *
-     * Create a de-identified copy of the input data.
-     * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - * @return Whether the deidentify field is set. - */ - @java.lang.Override - public boolean hasDeidentify() { - return actionCase_ == 7; - } - /** - *
-     * Create a de-identified copy of the input data.
-     * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - * @return The deidentify. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.Deidentify getDeidentify() { - if (deidentifyBuilder_ == null) { - if (actionCase_ == 7) { - return (com.google.privacy.dlp.v2.Action.Deidentify) action_; - } - return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); - } else { - if (actionCase_ == 7) { - return deidentifyBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); - } - } - /** - *
-     * Create a de-identified copy of the input data.
-     * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - */ - public Builder setDeidentify(com.google.privacy.dlp.v2.Action.Deidentify value) { - if (deidentifyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - deidentifyBuilder_.setMessage(value); - } - actionCase_ = 7; - return this; - } - /** - *
-     * Create a de-identified copy of the input data.
-     * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - */ - public Builder setDeidentify( - com.google.privacy.dlp.v2.Action.Deidentify.Builder builderForValue) { - if (deidentifyBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - deidentifyBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 7; - return this; - } - /** - *
-     * Create a de-identified copy of the input data.
-     * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - */ - public Builder mergeDeidentify(com.google.privacy.dlp.v2.Action.Deidentify value) { - if (deidentifyBuilder_ == null) { - if (actionCase_ == 7 && - action_ != com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance()) { - action_ = com.google.privacy.dlp.v2.Action.Deidentify.newBuilder((com.google.privacy.dlp.v2.Action.Deidentify) action_) - .mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 7) { - deidentifyBuilder_.mergeFrom(value); - } else { - deidentifyBuilder_.setMessage(value); - } - } - actionCase_ = 7; - return this; - } - /** - *
-     * Create a de-identified copy of the input data.
-     * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - */ - public Builder clearDeidentify() { - if (deidentifyBuilder_ == null) { - if (actionCase_ == 7) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 7) { - actionCase_ = 0; - action_ = null; - } - deidentifyBuilder_.clear(); - } - return this; - } - /** - *
-     * Create a de-identified copy of the input data.
-     * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - */ - public com.google.privacy.dlp.v2.Action.Deidentify.Builder getDeidentifyBuilder() { - return getDeidentifyFieldBuilder().getBuilder(); - } - /** - *
-     * Create a de-identified copy of the input data.
-     * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder getDeidentifyOrBuilder() { - if ((actionCase_ == 7) && (deidentifyBuilder_ != null)) { - return deidentifyBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 7) { - return (com.google.privacy.dlp.v2.Action.Deidentify) action_; - } - return com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); - } - } - /** - *
-     * Create a de-identified copy of the input data.
-     * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.Deidentify, com.google.privacy.dlp.v2.Action.Deidentify.Builder, com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder> - getDeidentifyFieldBuilder() { - if (deidentifyBuilder_ == null) { - if (!(actionCase_ == 7)) { - action_ = com.google.privacy.dlp.v2.Action.Deidentify.getDefaultInstance(); - } - deidentifyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.Deidentify, com.google.privacy.dlp.v2.Action.Deidentify.Builder, com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder>( - (com.google.privacy.dlp.v2.Action.Deidentify) action_, - getParentForChildren(), - isClean()); - action_ = null; - } - actionCase_ = 7; - onChanged();; - return deidentifyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.JobNotificationEmails, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder, com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder> jobNotificationEmailsBuilder_; - /** - *
-     * Enable email notification for project owners and editors on job's
-     * completion/failure.
-     * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - * @return Whether the jobNotificationEmails field is set. - */ - @java.lang.Override - public boolean hasJobNotificationEmails() { - return actionCase_ == 8; - } - /** - *
-     * Enable email notification for project owners and editors on job's
-     * completion/failure.
-     * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - * @return The jobNotificationEmails. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.JobNotificationEmails getJobNotificationEmails() { - if (jobNotificationEmailsBuilder_ == null) { - if (actionCase_ == 8) { - return (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_; - } - return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); - } else { - if (actionCase_ == 8) { - return jobNotificationEmailsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); - } - } - /** - *
-     * Enable email notification for project owners and editors on job's
-     * completion/failure.
-     * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - */ - public Builder setJobNotificationEmails(com.google.privacy.dlp.v2.Action.JobNotificationEmails value) { - if (jobNotificationEmailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - jobNotificationEmailsBuilder_.setMessage(value); - } - actionCase_ = 8; - return this; - } - /** - *
-     * Enable email notification for project owners and editors on job's
-     * completion/failure.
-     * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - */ - public Builder setJobNotificationEmails( - com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder builderForValue) { - if (jobNotificationEmailsBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - jobNotificationEmailsBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 8; - return this; - } - /** - *
-     * Enable email notification for project owners and editors on job's
-     * completion/failure.
-     * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - */ - public Builder mergeJobNotificationEmails(com.google.privacy.dlp.v2.Action.JobNotificationEmails value) { - if (jobNotificationEmailsBuilder_ == null) { - if (actionCase_ == 8 && - action_ != com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance()) { - action_ = com.google.privacy.dlp.v2.Action.JobNotificationEmails.newBuilder((com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_) - .mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 8) { - jobNotificationEmailsBuilder_.mergeFrom(value); - } else { - jobNotificationEmailsBuilder_.setMessage(value); - } - } - actionCase_ = 8; - return this; - } - /** - *
-     * Enable email notification for project owners and editors on job's
-     * completion/failure.
-     * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - */ - public Builder clearJobNotificationEmails() { - if (jobNotificationEmailsBuilder_ == null) { - if (actionCase_ == 8) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 8) { - actionCase_ = 0; - action_ = null; - } - jobNotificationEmailsBuilder_.clear(); - } - return this; - } - /** - *
-     * Enable email notification for project owners and editors on job's
-     * completion/failure.
-     * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - */ - public com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder getJobNotificationEmailsBuilder() { - return getJobNotificationEmailsFieldBuilder().getBuilder(); - } - /** - *
-     * Enable email notification for project owners and editors on job's
-     * completion/failure.
-     * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder getJobNotificationEmailsOrBuilder() { - if ((actionCase_ == 8) && (jobNotificationEmailsBuilder_ != null)) { - return jobNotificationEmailsBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 8) { - return (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_; - } - return com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); - } - } - /** - *
-     * Enable email notification for project owners and editors on job's
-     * completion/failure.
-     * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.JobNotificationEmails, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder, com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder> - getJobNotificationEmailsFieldBuilder() { - if (jobNotificationEmailsBuilder_ == null) { - if (!(actionCase_ == 8)) { - action_ = com.google.privacy.dlp.v2.Action.JobNotificationEmails.getDefaultInstance(); - } - jobNotificationEmailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.JobNotificationEmails, com.google.privacy.dlp.v2.Action.JobNotificationEmails.Builder, com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder>( - (com.google.privacy.dlp.v2.Action.JobNotificationEmails) action_, - getParentForChildren(), - isClean()); - action_ = null; - } - actionCase_ = 8; - onChanged();; - return jobNotificationEmailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishToStackdriver, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder, com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder> publishToStackdriverBuilder_; - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - * @return Whether the publishToStackdriver field is set. - */ - @java.lang.Override - public boolean hasPublishToStackdriver() { - return actionCase_ == 9; - } - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - * @return The publishToStackdriver. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToStackdriver getPublishToStackdriver() { - if (publishToStackdriverBuilder_ == null) { - if (actionCase_ == 9) { - return (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_; - } - return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); - } else { - if (actionCase_ == 9) { - return publishToStackdriverBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); - } - } - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - */ - public Builder setPublishToStackdriver(com.google.privacy.dlp.v2.Action.PublishToStackdriver value) { - if (publishToStackdriverBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - publishToStackdriverBuilder_.setMessage(value); - } - actionCase_ = 9; - return this; - } - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - */ - public Builder setPublishToStackdriver( - com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder builderForValue) { - if (publishToStackdriverBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - publishToStackdriverBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 9; - return this; - } - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - */ - public Builder mergePublishToStackdriver(com.google.privacy.dlp.v2.Action.PublishToStackdriver value) { - if (publishToStackdriverBuilder_ == null) { - if (actionCase_ == 9 && - action_ != com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance()) { - action_ = com.google.privacy.dlp.v2.Action.PublishToStackdriver.newBuilder((com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_) - .mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 9) { - publishToStackdriverBuilder_.mergeFrom(value); - } else { - publishToStackdriverBuilder_.setMessage(value); - } - } - actionCase_ = 9; - return this; - } - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - */ - public Builder clearPublishToStackdriver() { - if (publishToStackdriverBuilder_ == null) { - if (actionCase_ == 9) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 9) { - actionCase_ = 0; - action_ = null; - } - publishToStackdriverBuilder_.clear(); - } - return this; - } - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - */ - public com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder getPublishToStackdriverBuilder() { - return getPublishToStackdriverFieldBuilder().getBuilder(); - } - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder getPublishToStackdriverOrBuilder() { - if ((actionCase_ == 9) && (publishToStackdriverBuilder_ != null)) { - return publishToStackdriverBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 9) { - return (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_; - } - return com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); - } - } - /** - *
-     * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-     * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishToStackdriver, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder, com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder> - getPublishToStackdriverFieldBuilder() { - if (publishToStackdriverBuilder_ == null) { - if (!(actionCase_ == 9)) { - action_ = com.google.privacy.dlp.v2.Action.PublishToStackdriver.getDefaultInstance(); - } - publishToStackdriverBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Action.PublishToStackdriver, com.google.privacy.dlp.v2.Action.PublishToStackdriver.Builder, com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder>( - (com.google.privacy.dlp.v2.Action.PublishToStackdriver) action_, - getParentForChildren(), - isClean()); - action_ = null; - } - actionCase_ = 9; - onChanged();; - return publishToStackdriverBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Action) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Action) - private static final com.google.privacy.dlp.v2.Action DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Action(); - } - - public static com.google.privacy.dlp.v2.Action getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Action parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Action(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Action getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java deleted file mode 100644 index 4afee7fcd5f6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActionOrBuilder.java +++ /dev/null @@ -1,203 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Action) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Save resulting findings in a provided location.
-   * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - * @return Whether the saveFindings field is set. - */ - boolean hasSaveFindings(); - /** - *
-   * Save resulting findings in a provided location.
-   * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - * @return The saveFindings. - */ - com.google.privacy.dlp.v2.Action.SaveFindings getSaveFindings(); - /** - *
-   * Save resulting findings in a provided location.
-   * 
- * - * .google.privacy.dlp.v2.Action.SaveFindings save_findings = 1; - */ - com.google.privacy.dlp.v2.Action.SaveFindingsOrBuilder getSaveFindingsOrBuilder(); - - /** - *
-   * Publish a notification to a Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - * @return Whether the pubSub field is set. - */ - boolean hasPubSub(); - /** - *
-   * Publish a notification to a Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - * @return The pubSub. - */ - com.google.privacy.dlp.v2.Action.PublishToPubSub getPubSub(); - /** - *
-   * Publish a notification to a Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToPubSub pub_sub = 2; - */ - com.google.privacy.dlp.v2.Action.PublishToPubSubOrBuilder getPubSubOrBuilder(); - - /** - *
-   * Publish summary to Cloud Security Command Center (Alpha).
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - * @return Whether the publishSummaryToCscc field is set. - */ - boolean hasPublishSummaryToCscc(); - /** - *
-   * Publish summary to Cloud Security Command Center (Alpha).
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - * @return The publishSummaryToCscc. - */ - com.google.privacy.dlp.v2.Action.PublishSummaryToCscc getPublishSummaryToCscc(); - /** - *
-   * Publish summary to Cloud Security Command Center (Alpha).
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishSummaryToCscc publish_summary_to_cscc = 3; - */ - com.google.privacy.dlp.v2.Action.PublishSummaryToCsccOrBuilder getPublishSummaryToCsccOrBuilder(); - - /** - *
-   * Publish findings to Cloud Datahub.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - * @return Whether the publishFindingsToCloudDataCatalog field is set. - */ - boolean hasPublishFindingsToCloudDataCatalog(); - /** - *
-   * Publish findings to Cloud Datahub.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - * @return The publishFindingsToCloudDataCatalog. - */ - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog getPublishFindingsToCloudDataCatalog(); - /** - *
-   * Publish findings to Cloud Datahub.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - */ - com.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalogOrBuilder getPublishFindingsToCloudDataCatalogOrBuilder(); - - /** - *
-   * Create a de-identified copy of the input data.
-   * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - * @return Whether the deidentify field is set. - */ - boolean hasDeidentify(); - /** - *
-   * Create a de-identified copy of the input data.
-   * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - * @return The deidentify. - */ - com.google.privacy.dlp.v2.Action.Deidentify getDeidentify(); - /** - *
-   * Create a de-identified copy of the input data.
-   * 
- * - * .google.privacy.dlp.v2.Action.Deidentify deidentify = 7; - */ - com.google.privacy.dlp.v2.Action.DeidentifyOrBuilder getDeidentifyOrBuilder(); - - /** - *
-   * Enable email notification for project owners and editors on job's
-   * completion/failure.
-   * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - * @return Whether the jobNotificationEmails field is set. - */ - boolean hasJobNotificationEmails(); - /** - *
-   * Enable email notification for project owners and editors on job's
-   * completion/failure.
-   * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - * @return The jobNotificationEmails. - */ - com.google.privacy.dlp.v2.Action.JobNotificationEmails getJobNotificationEmails(); - /** - *
-   * Enable email notification for project owners and editors on job's
-   * completion/failure.
-   * 
- * - * .google.privacy.dlp.v2.Action.JobNotificationEmails job_notification_emails = 8; - */ - com.google.privacy.dlp.v2.Action.JobNotificationEmailsOrBuilder getJobNotificationEmailsOrBuilder(); - - /** - *
-   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - * @return Whether the publishToStackdriver field is set. - */ - boolean hasPublishToStackdriver(); - /** - *
-   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - * @return The publishToStackdriver. - */ - com.google.privacy.dlp.v2.Action.PublishToStackdriver getPublishToStackdriver(); - /** - *
-   * Enable Stackdriver metric dlp.googleapis.com/finding_count.
-   * 
- * - * .google.privacy.dlp.v2.Action.PublishToStackdriver publish_to_stackdriver = 9; - */ - com.google.privacy.dlp.v2.Action.PublishToStackdriverOrBuilder getPublishToStackdriverOrBuilder(); - - public com.google.privacy.dlp.v2.Action.ActionCase getActionCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequest.java deleted file mode 100644 index d1384c4308be..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for ActivateJobTrigger.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ActivateJobTriggerRequest} - */ -public final class ActivateJobTriggerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ActivateJobTriggerRequest) - ActivateJobTriggerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ActivateJobTriggerRequest.newBuilder() to construct. - private ActivateJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ActivateJobTriggerRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ActivateJobTriggerRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ActivateJobTriggerRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ActivateJobTriggerRequest.class, com.google.privacy.dlp.v2.ActivateJobTriggerRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the trigger to activate, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the trigger to activate, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ActivateJobTriggerRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ActivateJobTriggerRequest other = (com.google.privacy.dlp.v2.ActivateJobTriggerRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ActivateJobTriggerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ActivateJobTrigger.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ActivateJobTriggerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ActivateJobTriggerRequest) - com.google.privacy.dlp.v2.ActivateJobTriggerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ActivateJobTriggerRequest.class, com.google.privacy.dlp.v2.ActivateJobTriggerRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ActivateJobTriggerRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ActivateJobTriggerRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ActivateJobTriggerRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ActivateJobTriggerRequest build() { - com.google.privacy.dlp.v2.ActivateJobTriggerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ActivateJobTriggerRequest buildPartial() { - com.google.privacy.dlp.v2.ActivateJobTriggerRequest result = new com.google.privacy.dlp.v2.ActivateJobTriggerRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ActivateJobTriggerRequest) { - return mergeFrom((com.google.privacy.dlp.v2.ActivateJobTriggerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ActivateJobTriggerRequest other) { - if (other == com.google.privacy.dlp.v2.ActivateJobTriggerRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ActivateJobTriggerRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ActivateJobTriggerRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the trigger to activate, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the trigger to activate, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the trigger to activate, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the trigger to activate, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the trigger to activate, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ActivateJobTriggerRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ActivateJobTriggerRequest) - private static final com.google.privacy.dlp.v2.ActivateJobTriggerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ActivateJobTriggerRequest(); - } - - public static com.google.privacy.dlp.v2.ActivateJobTriggerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ActivateJobTriggerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ActivateJobTriggerRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ActivateJobTriggerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequestOrBuilder.java deleted file mode 100644 index 0b4eeaa439bf..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ActivateJobTriggerRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ActivateJobTriggerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ActivateJobTriggerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the trigger to activate, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the trigger to activate, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java deleted file mode 100644 index 9ef5f2a3a20a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java +++ /dev/null @@ -1,21216 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Result of a risk analysis operation request.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails} - */ -public final class AnalyzeDataSourceRiskDetails extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) - AnalyzeDataSourceRiskDetailsOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnalyzeDataSourceRiskDetails.newBuilder() to construct. - private AnalyzeDataSourceRiskDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalyzeDataSourceRiskDetails() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalyzeDataSourceRiskDetails(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeDataSourceRiskDetails( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.PrivacyMetric.Builder subBuilder = null; - if (requestedPrivacyMetric_ != null) { - subBuilder = requestedPrivacyMetric_.toBuilder(); - } - requestedPrivacyMetric_ = input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestedPrivacyMetric_); - requestedPrivacyMetric_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (requestedSourceTable_ != null) { - subBuilder = requestedSourceTable_.toBuilder(); - } - requestedSourceTable_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestedSourceTable_); - requestedSourceTable_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder subBuilder = null; - if (resultCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 3; - break; - } - case 34: { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder subBuilder = null; - if (resultCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 4; - break; - } - case 42: { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder subBuilder = null; - if (resultCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 5; - break; - } - case 50: { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder subBuilder = null; - if (resultCase_ == 6) { - subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 6; - break; - } - case 58: { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder subBuilder = null; - if (resultCase_ == 7) { - subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 7; - break; - } - case 74: { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder subBuilder = null; - if (resultCase_ == 9) { - subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 9; - break; - } - case 82: { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder subBuilder = null; - if (requestedOptions_ != null) { - subBuilder = requestedOptions_.toBuilder(); - } - requestedOptions_ = input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestedOptions_); - requestedOptions_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder.class); - } - - public interface NumericalStatsResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Minimum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - * @return Whether the minValue field is set. - */ - boolean hasMinValue(); - /** - *
-     * Minimum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - * @return The minValue. - */ - com.google.privacy.dlp.v2.Value getMinValue(); - /** - *
-     * Minimum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getMinValueOrBuilder(); - - /** - *
-     * Maximum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - * @return Whether the maxValue field is set. - */ - boolean hasMaxValue(); - /** - *
-     * Maximum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - * @return The maxValue. - */ - com.google.privacy.dlp.v2.Value getMaxValue(); - /** - *
-     * Maximum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getMaxValueOrBuilder(); - - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - java.util.List - getQuantileValuesList(); - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - com.google.privacy.dlp.v2.Value getQuantileValues(int index); - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - int getQuantileValuesCount(); - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - java.util.List - getQuantileValuesOrBuilderList(); - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getQuantileValuesOrBuilder( - int index); - } - /** - *
-   * Result of the numerical stats computation.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult} - */ - public static final class NumericalStatsResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) - NumericalStatsResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use NumericalStatsResult.newBuilder() to construct. - private NumericalStatsResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NumericalStatsResult() { - quantileValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NumericalStatsResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NumericalStatsResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (minValue_ != null) { - subBuilder = minValue_.toBuilder(); - } - minValue_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(minValue_); - minValue_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (maxValue_ != null) { - subBuilder = maxValue_.toBuilder(); - } - maxValue_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxValue_); - maxValue_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quantileValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quantileValues_.add( - input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quantileValues_ = java.util.Collections.unmodifiableList(quantileValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder.class); - } - - public static final int MIN_VALUE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.Value minValue_; - /** - *
-     * Minimum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - * @return Whether the minValue field is set. - */ - @java.lang.Override - public boolean hasMinValue() { - return minValue_ != null; - } - /** - *
-     * Minimum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - * @return The minValue. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getMinValue() { - return minValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : minValue_; - } - /** - *
-     * Minimum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getMinValueOrBuilder() { - return getMinValue(); - } - - public static final int MAX_VALUE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.Value maxValue_; - /** - *
-     * Maximum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - * @return Whether the maxValue field is set. - */ - @java.lang.Override - public boolean hasMaxValue() { - return maxValue_ != null; - } - /** - *
-     * Maximum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - * @return The maxValue. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getMaxValue() { - return maxValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : maxValue_; - } - /** - *
-     * Maximum value appearing in the column.
-     * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getMaxValueOrBuilder() { - return getMaxValue(); - } - - public static final int QUANTILE_VALUES_FIELD_NUMBER = 4; - private java.util.List quantileValues_; - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - @java.lang.Override - public java.util.List getQuantileValuesList() { - return quantileValues_; - } - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - @java.lang.Override - public java.util.List - getQuantileValuesOrBuilderList() { - return quantileValues_; - } - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - @java.lang.Override - public int getQuantileValuesCount() { - return quantileValues_.size(); - } - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getQuantileValues(int index) { - return quantileValues_.get(index); - } - /** - *
-     * List of 99 values that partition the set of field values into 100 equal
-     * sized buckets.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getQuantileValuesOrBuilder( - int index) { - return quantileValues_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (minValue_ != null) { - output.writeMessage(1, getMinValue()); - } - if (maxValue_ != null) { - output.writeMessage(2, getMaxValue()); - } - for (int i = 0; i < quantileValues_.size(); i++) { - output.writeMessage(4, quantileValues_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMinValue()); - } - if (maxValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMaxValue()); - } - for (int i = 0; i < quantileValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, quantileValues_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) obj; - - if (hasMinValue() != other.hasMinValue()) return false; - if (hasMinValue()) { - if (!getMinValue() - .equals(other.getMinValue())) return false; - } - if (hasMaxValue() != other.hasMaxValue()) return false; - if (hasMaxValue()) { - if (!getMaxValue() - .equals(other.getMaxValue())) return false; - } - if (!getQuantileValuesList() - .equals(other.getQuantileValuesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMinValue()) { - hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getMinValue().hashCode(); - } - if (hasMaxValue()) { - hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getMaxValue().hashCode(); - } - if (getQuantileValuesCount() > 0) { - hash = (37 * hash) + QUANTILE_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getQuantileValuesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Result of the numerical stats computation.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuantileValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (minValueBuilder_ == null) { - minValue_ = null; - } else { - minValue_ = null; - minValueBuilder_ = null; - } - if (maxValueBuilder_ == null) { - maxValue_ = null; - } else { - maxValue_ = null; - maxValueBuilder_ = null; - } - if (quantileValuesBuilder_ == null) { - quantileValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quantileValuesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult(this); - int from_bitField0_ = bitField0_; - if (minValueBuilder_ == null) { - result.minValue_ = minValue_; - } else { - result.minValue_ = minValueBuilder_.build(); - } - if (maxValueBuilder_ == null) { - result.maxValue_ = maxValue_; - } else { - result.maxValue_ = maxValueBuilder_.build(); - } - if (quantileValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quantileValues_ = java.util.Collections.unmodifiableList(quantileValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quantileValues_ = quantileValues_; - } else { - result.quantileValues_ = quantileValuesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance()) return this; - if (other.hasMinValue()) { - mergeMinValue(other.getMinValue()); - } - if (other.hasMaxValue()) { - mergeMaxValue(other.getMaxValue()); - } - if (quantileValuesBuilder_ == null) { - if (!other.quantileValues_.isEmpty()) { - if (quantileValues_.isEmpty()) { - quantileValues_ = other.quantileValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuantileValuesIsMutable(); - quantileValues_.addAll(other.quantileValues_); - } - onChanged(); - } - } else { - if (!other.quantileValues_.isEmpty()) { - if (quantileValuesBuilder_.isEmpty()) { - quantileValuesBuilder_.dispose(); - quantileValuesBuilder_ = null; - quantileValues_ = other.quantileValues_; - bitField0_ = (bitField0_ & ~0x00000001); - quantileValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuantileValuesFieldBuilder() : null; - } else { - quantileValuesBuilder_.addAllMessages(other.quantileValues_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.Value minValue_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> minValueBuilder_; - /** - *
-       * Minimum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - * @return Whether the minValue field is set. - */ - public boolean hasMinValue() { - return minValueBuilder_ != null || minValue_ != null; - } - /** - *
-       * Minimum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - * @return The minValue. - */ - public com.google.privacy.dlp.v2.Value getMinValue() { - if (minValueBuilder_ == null) { - return minValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : minValue_; - } else { - return minValueBuilder_.getMessage(); - } - } - /** - *
-       * Minimum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - */ - public Builder setMinValue(com.google.privacy.dlp.v2.Value value) { - if (minValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - minValue_ = value; - onChanged(); - } else { - minValueBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Minimum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - */ - public Builder setMinValue( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (minValueBuilder_ == null) { - minValue_ = builderForValue.build(); - onChanged(); - } else { - minValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Minimum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - */ - public Builder mergeMinValue(com.google.privacy.dlp.v2.Value value) { - if (minValueBuilder_ == null) { - if (minValue_ != null) { - minValue_ = - com.google.privacy.dlp.v2.Value.newBuilder(minValue_).mergeFrom(value).buildPartial(); - } else { - minValue_ = value; - } - onChanged(); - } else { - minValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Minimum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - */ - public Builder clearMinValue() { - if (minValueBuilder_ == null) { - minValue_ = null; - onChanged(); - } else { - minValue_ = null; - minValueBuilder_ = null; - } - - return this; - } - /** - *
-       * Minimum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder getMinValueBuilder() { - - onChanged(); - return getMinValueFieldBuilder().getBuilder(); - } - /** - *
-       * Minimum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getMinValueOrBuilder() { - if (minValueBuilder_ != null) { - return minValueBuilder_.getMessageOrBuilder(); - } else { - return minValue_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : minValue_; - } - } - /** - *
-       * Minimum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value min_value = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getMinValueFieldBuilder() { - if (minValueBuilder_ == null) { - minValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getMinValue(), - getParentForChildren(), - isClean()); - minValue_ = null; - } - return minValueBuilder_; - } - - private com.google.privacy.dlp.v2.Value maxValue_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> maxValueBuilder_; - /** - *
-       * Maximum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - * @return Whether the maxValue field is set. - */ - public boolean hasMaxValue() { - return maxValueBuilder_ != null || maxValue_ != null; - } - /** - *
-       * Maximum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - * @return The maxValue. - */ - public com.google.privacy.dlp.v2.Value getMaxValue() { - if (maxValueBuilder_ == null) { - return maxValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : maxValue_; - } else { - return maxValueBuilder_.getMessage(); - } - } - /** - *
-       * Maximum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - */ - public Builder setMaxValue(com.google.privacy.dlp.v2.Value value) { - if (maxValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - maxValue_ = value; - onChanged(); - } else { - maxValueBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Maximum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - */ - public Builder setMaxValue( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (maxValueBuilder_ == null) { - maxValue_ = builderForValue.build(); - onChanged(); - } else { - maxValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Maximum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - */ - public Builder mergeMaxValue(com.google.privacy.dlp.v2.Value value) { - if (maxValueBuilder_ == null) { - if (maxValue_ != null) { - maxValue_ = - com.google.privacy.dlp.v2.Value.newBuilder(maxValue_).mergeFrom(value).buildPartial(); - } else { - maxValue_ = value; - } - onChanged(); - } else { - maxValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Maximum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - */ - public Builder clearMaxValue() { - if (maxValueBuilder_ == null) { - maxValue_ = null; - onChanged(); - } else { - maxValue_ = null; - maxValueBuilder_ = null; - } - - return this; - } - /** - *
-       * Maximum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - */ - public com.google.privacy.dlp.v2.Value.Builder getMaxValueBuilder() { - - onChanged(); - return getMaxValueFieldBuilder().getBuilder(); - } - /** - *
-       * Maximum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getMaxValueOrBuilder() { - if (maxValueBuilder_ != null) { - return maxValueBuilder_.getMessageOrBuilder(); - } else { - return maxValue_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : maxValue_; - } - } - /** - *
-       * Maximum value appearing in the column.
-       * 
- * - * .google.privacy.dlp.v2.Value max_value = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getMaxValueFieldBuilder() { - if (maxValueBuilder_ == null) { - maxValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getMaxValue(), - getParentForChildren(), - isClean()); - maxValue_ = null; - } - return maxValueBuilder_; - } - - private java.util.List quantileValues_ = - java.util.Collections.emptyList(); - private void ensureQuantileValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quantileValues_ = new java.util.ArrayList(quantileValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quantileValuesBuilder_; - - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public java.util.List getQuantileValuesList() { - if (quantileValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(quantileValues_); - } else { - return quantileValuesBuilder_.getMessageList(); - } - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public int getQuantileValuesCount() { - if (quantileValuesBuilder_ == null) { - return quantileValues_.size(); - } else { - return quantileValuesBuilder_.getCount(); - } - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public com.google.privacy.dlp.v2.Value getQuantileValues(int index) { - if (quantileValuesBuilder_ == null) { - return quantileValues_.get(index); - } else { - return quantileValuesBuilder_.getMessage(index); - } - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public Builder setQuantileValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quantileValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuantileValuesIsMutable(); - quantileValues_.set(index, value); - onChanged(); - } else { - quantileValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public Builder setQuantileValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quantileValuesBuilder_ == null) { - ensureQuantileValuesIsMutable(); - quantileValues_.set(index, builderForValue.build()); - onChanged(); - } else { - quantileValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public Builder addQuantileValues(com.google.privacy.dlp.v2.Value value) { - if (quantileValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuantileValuesIsMutable(); - quantileValues_.add(value); - onChanged(); - } else { - quantileValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public Builder addQuantileValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quantileValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuantileValuesIsMutable(); - quantileValues_.add(index, value); - onChanged(); - } else { - quantileValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public Builder addQuantileValues( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quantileValuesBuilder_ == null) { - ensureQuantileValuesIsMutable(); - quantileValues_.add(builderForValue.build()); - onChanged(); - } else { - quantileValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public Builder addQuantileValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quantileValuesBuilder_ == null) { - ensureQuantileValuesIsMutable(); - quantileValues_.add(index, builderForValue.build()); - onChanged(); - } else { - quantileValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public Builder addAllQuantileValues( - java.lang.Iterable values) { - if (quantileValuesBuilder_ == null) { - ensureQuantileValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quantileValues_); - onChanged(); - } else { - quantileValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public Builder clearQuantileValues() { - if (quantileValuesBuilder_ == null) { - quantileValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quantileValuesBuilder_.clear(); - } - return this; - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public Builder removeQuantileValues(int index) { - if (quantileValuesBuilder_ == null) { - ensureQuantileValuesIsMutable(); - quantileValues_.remove(index); - onChanged(); - } else { - quantileValuesBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public com.google.privacy.dlp.v2.Value.Builder getQuantileValuesBuilder( - int index) { - return getQuantileValuesFieldBuilder().getBuilder(index); - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getQuantileValuesOrBuilder( - int index) { - if (quantileValuesBuilder_ == null) { - return quantileValues_.get(index); } else { - return quantileValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public java.util.List - getQuantileValuesOrBuilderList() { - if (quantileValuesBuilder_ != null) { - return quantileValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quantileValues_); - } - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuantileValuesBuilder() { - return getQuantileValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuantileValuesBuilder( - int index) { - return getQuantileValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-       * List of 99 values that partition the set of field values into 100 equal
-       * sized buckets.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quantile_values = 4; - */ - public java.util.List - getQuantileValuesBuilderList() { - return getQuantileValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getQuantileValuesFieldBuilder() { - if (quantileValuesBuilder_ == null) { - quantileValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - quantileValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quantileValues_ = null; - } - return quantileValuesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NumericalStatsResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NumericalStatsResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface CategoricalStatsResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - java.util.List - getValueFrequencyHistogramBucketsList(); - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getValueFrequencyHistogramBuckets(int index); - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - int getValueFrequencyHistogramBucketsCount(); - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - java.util.List - getValueFrequencyHistogramBucketsOrBuilderList(); - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder getValueFrequencyHistogramBucketsOrBuilder( - int index); - } - /** - *
-   * Result of the categorical stats computation.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult} - */ - public static final class CategoricalStatsResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) - CategoricalStatsResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use CategoricalStatsResult.newBuilder() to construct. - private CategoricalStatsResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CategoricalStatsResult() { - valueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CategoricalStatsResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CategoricalStatsResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - valueFrequencyHistogramBuckets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - valueFrequencyHistogramBuckets_.add( - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - valueFrequencyHistogramBuckets_ = java.util.Collections.unmodifiableList(valueFrequencyHistogramBuckets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder.class); - } - - public interface CategoricalStatsHistogramBucketOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Lower bound on the value frequency of the values in this bucket.
-       * 
- * - * int64 value_frequency_lower_bound = 1; - * @return The valueFrequencyLowerBound. - */ - long getValueFrequencyLowerBound(); - - /** - *
-       * Upper bound on the value frequency of the values in this bucket.
-       * 
- * - * int64 value_frequency_upper_bound = 2; - * @return The valueFrequencyUpperBound. - */ - long getValueFrequencyUpperBound(); - - /** - *
-       * Total number of values in this bucket.
-       * 
- * - * int64 bucket_size = 3; - * @return The bucketSize. - */ - long getBucketSize(); - - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - java.util.List - getBucketValuesList(); - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - com.google.privacy.dlp.v2.ValueFrequency getBucketValues(int index); - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - int getBucketValuesCount(); - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - java.util.List - getBucketValuesOrBuilderList(); - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getBucketValuesOrBuilder( - int index); - - /** - *
-       * Total number of distinct values in this bucket.
-       * 
- * - * int64 bucket_value_count = 5; - * @return The bucketValueCount. - */ - long getBucketValueCount(); - } - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket} - */ - public static final class CategoricalStatsHistogramBucket extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) - CategoricalStatsHistogramBucketOrBuilder { - private static final long serialVersionUID = 0L; - // Use CategoricalStatsHistogramBucket.newBuilder() to construct. - private CategoricalStatsHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CategoricalStatsHistogramBucket() { - bucketValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CategoricalStatsHistogramBucket(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CategoricalStatsHistogramBucket( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - valueFrequencyLowerBound_ = input.readInt64(); - break; - } - case 16: { - - valueFrequencyUpperBound_ = input.readInt64(); - break; - } - case 24: { - - bucketSize_ = input.readInt64(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bucketValues_.add( - input.readMessage(com.google.privacy.dlp.v2.ValueFrequency.parser(), extensionRegistry)); - break; - } - case 40: { - - bucketValueCount_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder.class); - } - - public static final int VALUE_FREQUENCY_LOWER_BOUND_FIELD_NUMBER = 1; - private long valueFrequencyLowerBound_; - /** - *
-       * Lower bound on the value frequency of the values in this bucket.
-       * 
- * - * int64 value_frequency_lower_bound = 1; - * @return The valueFrequencyLowerBound. - */ - @java.lang.Override - public long getValueFrequencyLowerBound() { - return valueFrequencyLowerBound_; - } - - public static final int VALUE_FREQUENCY_UPPER_BOUND_FIELD_NUMBER = 2; - private long valueFrequencyUpperBound_; - /** - *
-       * Upper bound on the value frequency of the values in this bucket.
-       * 
- * - * int64 value_frequency_upper_bound = 2; - * @return The valueFrequencyUpperBound. - */ - @java.lang.Override - public long getValueFrequencyUpperBound() { - return valueFrequencyUpperBound_; - } - - public static final int BUCKET_SIZE_FIELD_NUMBER = 3; - private long bucketSize_; - /** - *
-       * Total number of values in this bucket.
-       * 
- * - * int64 bucket_size = 3; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - - public static final int BUCKET_VALUES_FIELD_NUMBER = 4; - private java.util.List bucketValues_; - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - @java.lang.Override - public java.util.List getBucketValuesList() { - return bucketValues_; - } - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - @java.lang.Override - public java.util.List - getBucketValuesOrBuilderList() { - return bucketValues_; - } - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - @java.lang.Override - public int getBucketValuesCount() { - return bucketValues_.size(); - } - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueFrequency getBucketValues(int index) { - return bucketValues_.get(index); - } - /** - *
-       * Sample of value frequencies in this bucket. The total number of
-       * values returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getBucketValuesOrBuilder( - int index) { - return bucketValues_.get(index); - } - - public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 5; - private long bucketValueCount_; - /** - *
-       * Total number of distinct values in this bucket.
-       * 
- * - * int64 bucket_value_count = 5; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (valueFrequencyLowerBound_ != 0L) { - output.writeInt64(1, valueFrequencyLowerBound_); - } - if (valueFrequencyUpperBound_ != 0L) { - output.writeInt64(2, valueFrequencyUpperBound_); - } - if (bucketSize_ != 0L) { - output.writeInt64(3, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - output.writeMessage(4, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - output.writeInt64(5, bucketValueCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valueFrequencyLowerBound_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, valueFrequencyLowerBound_); - } - if (valueFrequencyUpperBound_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, valueFrequencyUpperBound_); - } - if (bucketSize_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, bucketValueCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) obj; - - if (getValueFrequencyLowerBound() - != other.getValueFrequencyLowerBound()) return false; - if (getValueFrequencyUpperBound() - != other.getValueFrequencyUpperBound()) return false; - if (getBucketSize() - != other.getBucketSize()) return false; - if (!getBucketValuesList() - .equals(other.getBucketValuesList())) return false; - if (getBucketValueCount() - != other.getBucketValueCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VALUE_FREQUENCY_LOWER_BOUND_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getValueFrequencyLowerBound()); - hash = (37 * hash) + VALUE_FREQUENCY_UPPER_BOUND_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getValueFrequencyUpperBound()); - hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketSize()); - if (getBucketValuesCount() > 0) { - hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getBucketValuesList().hashCode(); - } - hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketValueCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBucketValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - valueFrequencyLowerBound_ = 0L; - - valueFrequencyUpperBound_ = 0L; - - bucketSize_ = 0L; - - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - bucketValuesBuilder_.clear(); - } - bucketValueCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket(this); - int from_bitField0_ = bitField0_; - result.valueFrequencyLowerBound_ = valueFrequencyLowerBound_; - result.valueFrequencyUpperBound_ = valueFrequencyUpperBound_; - result.bucketSize_ = bucketSize_; - if (bucketValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bucketValues_ = bucketValues_; - } else { - result.bucketValues_ = bucketValuesBuilder_.build(); - } - result.bucketValueCount_ = bucketValueCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.getDefaultInstance()) return this; - if (other.getValueFrequencyLowerBound() != 0L) { - setValueFrequencyLowerBound(other.getValueFrequencyLowerBound()); - } - if (other.getValueFrequencyUpperBound() != 0L) { - setValueFrequencyUpperBound(other.getValueFrequencyUpperBound()); - } - if (other.getBucketSize() != 0L) { - setBucketSize(other.getBucketSize()); - } - if (bucketValuesBuilder_ == null) { - if (!other.bucketValues_.isEmpty()) { - if (bucketValues_.isEmpty()) { - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBucketValuesIsMutable(); - bucketValues_.addAll(other.bucketValues_); - } - onChanged(); - } - } else { - if (!other.bucketValues_.isEmpty()) { - if (bucketValuesBuilder_.isEmpty()) { - bucketValuesBuilder_.dispose(); - bucketValuesBuilder_ = null; - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - bucketValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBucketValuesFieldBuilder() : null; - } else { - bucketValuesBuilder_.addAllMessages(other.bucketValues_); - } - } - } - if (other.getBucketValueCount() != 0L) { - setBucketValueCount(other.getBucketValueCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long valueFrequencyLowerBound_ ; - /** - *
-         * Lower bound on the value frequency of the values in this bucket.
-         * 
- * - * int64 value_frequency_lower_bound = 1; - * @return The valueFrequencyLowerBound. - */ - @java.lang.Override - public long getValueFrequencyLowerBound() { - return valueFrequencyLowerBound_; - } - /** - *
-         * Lower bound on the value frequency of the values in this bucket.
-         * 
- * - * int64 value_frequency_lower_bound = 1; - * @param value The valueFrequencyLowerBound to set. - * @return This builder for chaining. - */ - public Builder setValueFrequencyLowerBound(long value) { - - valueFrequencyLowerBound_ = value; - onChanged(); - return this; - } - /** - *
-         * Lower bound on the value frequency of the values in this bucket.
-         * 
- * - * int64 value_frequency_lower_bound = 1; - * @return This builder for chaining. - */ - public Builder clearValueFrequencyLowerBound() { - - valueFrequencyLowerBound_ = 0L; - onChanged(); - return this; - } - - private long valueFrequencyUpperBound_ ; - /** - *
-         * Upper bound on the value frequency of the values in this bucket.
-         * 
- * - * int64 value_frequency_upper_bound = 2; - * @return The valueFrequencyUpperBound. - */ - @java.lang.Override - public long getValueFrequencyUpperBound() { - return valueFrequencyUpperBound_; - } - /** - *
-         * Upper bound on the value frequency of the values in this bucket.
-         * 
- * - * int64 value_frequency_upper_bound = 2; - * @param value The valueFrequencyUpperBound to set. - * @return This builder for chaining. - */ - public Builder setValueFrequencyUpperBound(long value) { - - valueFrequencyUpperBound_ = value; - onChanged(); - return this; - } - /** - *
-         * Upper bound on the value frequency of the values in this bucket.
-         * 
- * - * int64 value_frequency_upper_bound = 2; - * @return This builder for chaining. - */ - public Builder clearValueFrequencyUpperBound() { - - valueFrequencyUpperBound_ = 0L; - onChanged(); - return this; - } - - private long bucketSize_ ; - /** - *
-         * Total number of values in this bucket.
-         * 
- * - * int64 bucket_size = 3; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - /** - *
-         * Total number of values in this bucket.
-         * 
- * - * int64 bucket_size = 3; - * @param value The bucketSize to set. - * @return This builder for chaining. - */ - public Builder setBucketSize(long value) { - - bucketSize_ = value; - onChanged(); - return this; - } - /** - *
-         * Total number of values in this bucket.
-         * 
- * - * int64 bucket_size = 3; - * @return This builder for chaining. - */ - public Builder clearBucketSize() { - - bucketSize_ = 0L; - onChanged(); - return this; - } - - private java.util.List bucketValues_ = - java.util.Collections.emptyList(); - private void ensureBucketValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(bucketValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder> bucketValuesBuilder_; - - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public java.util.List getBucketValuesList() { - if (bucketValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(bucketValues_); - } else { - return bucketValuesBuilder_.getMessageList(); - } - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public int getBucketValuesCount() { - if (bucketValuesBuilder_ == null) { - return bucketValues_.size(); - } else { - return bucketValuesBuilder_.getCount(); - } - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequency getBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); - } else { - return bucketValuesBuilder_.getMessage(index); - } - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.ValueFrequency value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.set(index, value); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.set(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public Builder addBucketValues(com.google.privacy.dlp.v2.ValueFrequency value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.ValueFrequency value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(index, value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public Builder addBucketValues( - com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public Builder addAllBucketValues( - java.lang.Iterable values) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bucketValues_); - onChanged(); - } else { - bucketValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public Builder clearBucketValues() { - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - bucketValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public Builder removeBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.remove(index); - onChanged(); - } else { - bucketValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequency.Builder getBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getBucketValuesOrBuilder( - int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); } else { - return bucketValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public java.util.List - getBucketValuesOrBuilderList() { - if (bucketValuesBuilder_ != null) { - return bucketValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bucketValues_); - } - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequency.Builder addBucketValuesBuilder() { - return getBucketValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()); - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequency.Builder addBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()); - } - /** - *
-         * Sample of value frequencies in this bucket. The total number of
-         * values returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency bucket_values = 4; - */ - public java.util.List - getBucketValuesBuilderList() { - return getBucketValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder> - getBucketValuesFieldBuilder() { - if (bucketValuesBuilder_ == null) { - bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder>( - bucketValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - bucketValues_ = null; - } - return bucketValuesBuilder_; - } - - private long bucketValueCount_ ; - /** - *
-         * Total number of distinct values in this bucket.
-         * 
- * - * int64 bucket_value_count = 5; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - /** - *
-         * Total number of distinct values in this bucket.
-         * 
- * - * int64 bucket_value_count = 5; - * @param value The bucketValueCount to set. - * @return This builder for chaining. - */ - public Builder setBucketValueCount(long value) { - - bucketValueCount_ = value; - onChanged(); - return this; - } - /** - *
-         * Total number of distinct values in this bucket.
-         * 
- * - * int64 bucket_value_count = 5; - * @return This builder for chaining. - */ - public Builder clearBucketValueCount() { - - bucketValueCount_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CategoricalStatsHistogramBucket parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CategoricalStatsHistogramBucket(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int VALUE_FREQUENCY_HISTOGRAM_BUCKETS_FIELD_NUMBER = 5; - private java.util.List valueFrequencyHistogramBuckets_; - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public java.util.List getValueFrequencyHistogramBucketsList() { - return valueFrequencyHistogramBuckets_; - } - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public java.util.List - getValueFrequencyHistogramBucketsOrBuilderList() { - return valueFrequencyHistogramBuckets_; - } - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public int getValueFrequencyHistogramBucketsCount() { - return valueFrequencyHistogramBuckets_.size(); - } - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getValueFrequencyHistogramBuckets(int index) { - return valueFrequencyHistogramBuckets_.get(index); - } - /** - *
-     * Histogram of value frequencies in the column.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder getValueFrequencyHistogramBucketsOrBuilder( - int index) { - return valueFrequencyHistogramBuckets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < valueFrequencyHistogramBuckets_.size(); i++) { - output.writeMessage(5, valueFrequencyHistogramBuckets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < valueFrequencyHistogramBuckets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, valueFrequencyHistogramBuckets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) obj; - - if (!getValueFrequencyHistogramBucketsList() - .equals(other.getValueFrequencyHistogramBucketsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getValueFrequencyHistogramBucketsCount() > 0) { - hash = (37 * hash) + VALUE_FREQUENCY_HISTOGRAM_BUCKETS_FIELD_NUMBER; - hash = (53 * hash) + getValueFrequencyHistogramBucketsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Result of the categorical stats computation.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValueFrequencyHistogramBucketsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (valueFrequencyHistogramBucketsBuilder_ == null) { - valueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - valueFrequencyHistogramBucketsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult(this); - int from_bitField0_ = bitField0_; - if (valueFrequencyHistogramBucketsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - valueFrequencyHistogramBuckets_ = java.util.Collections.unmodifiableList(valueFrequencyHistogramBuckets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.valueFrequencyHistogramBuckets_ = valueFrequencyHistogramBuckets_; - } else { - result.valueFrequencyHistogramBuckets_ = valueFrequencyHistogramBucketsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance()) return this; - if (valueFrequencyHistogramBucketsBuilder_ == null) { - if (!other.valueFrequencyHistogramBuckets_.isEmpty()) { - if (valueFrequencyHistogramBuckets_.isEmpty()) { - valueFrequencyHistogramBuckets_ = other.valueFrequencyHistogramBuckets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValueFrequencyHistogramBucketsIsMutable(); - valueFrequencyHistogramBuckets_.addAll(other.valueFrequencyHistogramBuckets_); - } - onChanged(); - } - } else { - if (!other.valueFrequencyHistogramBuckets_.isEmpty()) { - if (valueFrequencyHistogramBucketsBuilder_.isEmpty()) { - valueFrequencyHistogramBucketsBuilder_.dispose(); - valueFrequencyHistogramBucketsBuilder_ = null; - valueFrequencyHistogramBuckets_ = other.valueFrequencyHistogramBuckets_; - bitField0_ = (bitField0_ & ~0x00000001); - valueFrequencyHistogramBucketsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getValueFrequencyHistogramBucketsFieldBuilder() : null; - } else { - valueFrequencyHistogramBucketsBuilder_.addAllMessages(other.valueFrequencyHistogramBuckets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List valueFrequencyHistogramBuckets_ = - java.util.Collections.emptyList(); - private void ensureValueFrequencyHistogramBucketsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - valueFrequencyHistogramBuckets_ = new java.util.ArrayList(valueFrequencyHistogramBuckets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder> valueFrequencyHistogramBucketsBuilder_; - - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public java.util.List getValueFrequencyHistogramBucketsList() { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - return java.util.Collections.unmodifiableList(valueFrequencyHistogramBuckets_); - } else { - return valueFrequencyHistogramBucketsBuilder_.getMessageList(); - } - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public int getValueFrequencyHistogramBucketsCount() { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - return valueFrequencyHistogramBuckets_.size(); - } else { - return valueFrequencyHistogramBucketsBuilder_.getCount(); - } - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket getValueFrequencyHistogramBuckets(int index) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - return valueFrequencyHistogramBuckets_.get(index); - } else { - return valueFrequencyHistogramBucketsBuilder_.getMessage(index); - } - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public Builder setValueFrequencyHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueFrequencyHistogramBucketsIsMutable(); - valueFrequencyHistogramBuckets_.set(index, value); - onChanged(); - } else { - valueFrequencyHistogramBucketsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public Builder setValueFrequencyHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder builderForValue) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - ensureValueFrequencyHistogramBucketsIsMutable(); - valueFrequencyHistogramBuckets_.set(index, builderForValue.build()); - onChanged(); - } else { - valueFrequencyHistogramBucketsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public Builder addValueFrequencyHistogramBuckets(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueFrequencyHistogramBucketsIsMutable(); - valueFrequencyHistogramBuckets_.add(value); - onChanged(); - } else { - valueFrequencyHistogramBucketsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public Builder addValueFrequencyHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValueFrequencyHistogramBucketsIsMutable(); - valueFrequencyHistogramBuckets_.add(index, value); - onChanged(); - } else { - valueFrequencyHistogramBucketsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public Builder addValueFrequencyHistogramBuckets( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder builderForValue) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - ensureValueFrequencyHistogramBucketsIsMutable(); - valueFrequencyHistogramBuckets_.add(builderForValue.build()); - onChanged(); - } else { - valueFrequencyHistogramBucketsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public Builder addValueFrequencyHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder builderForValue) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - ensureValueFrequencyHistogramBucketsIsMutable(); - valueFrequencyHistogramBuckets_.add(index, builderForValue.build()); - onChanged(); - } else { - valueFrequencyHistogramBucketsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public Builder addAllValueFrequencyHistogramBuckets( - java.lang.Iterable values) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - ensureValueFrequencyHistogramBucketsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, valueFrequencyHistogramBuckets_); - onChanged(); - } else { - valueFrequencyHistogramBucketsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public Builder clearValueFrequencyHistogramBuckets() { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - valueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - valueFrequencyHistogramBucketsBuilder_.clear(); - } - return this; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public Builder removeValueFrequencyHistogramBuckets(int index) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - ensureValueFrequencyHistogramBucketsIsMutable(); - valueFrequencyHistogramBuckets_.remove(index); - onChanged(); - } else { - valueFrequencyHistogramBucketsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder getValueFrequencyHistogramBucketsBuilder( - int index) { - return getValueFrequencyHistogramBucketsFieldBuilder().getBuilder(index); - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder getValueFrequencyHistogramBucketsOrBuilder( - int index) { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - return valueFrequencyHistogramBuckets_.get(index); } else { - return valueFrequencyHistogramBucketsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public java.util.List - getValueFrequencyHistogramBucketsOrBuilderList() { - if (valueFrequencyHistogramBucketsBuilder_ != null) { - return valueFrequencyHistogramBucketsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(valueFrequencyHistogramBuckets_); - } - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder addValueFrequencyHistogramBucketsBuilder() { - return getValueFrequencyHistogramBucketsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.getDefaultInstance()); - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder addValueFrequencyHistogramBucketsBuilder( - int index) { - return getValueFrequencyHistogramBucketsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.getDefaultInstance()); - } - /** - *
-       * Histogram of value frequencies in the column.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - */ - public java.util.List - getValueFrequencyHistogramBucketsBuilderList() { - return getValueFrequencyHistogramBucketsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder> - getValueFrequencyHistogramBucketsFieldBuilder() { - if (valueFrequencyHistogramBucketsBuilder_ == null) { - valueFrequencyHistogramBucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucketOrBuilder>( - valueFrequencyHistogramBuckets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - valueFrequencyHistogramBuckets_ = null; - } - return valueFrequencyHistogramBucketsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CategoricalStatsResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CategoricalStatsResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface KAnonymityResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - java.util.List - getEquivalenceClassHistogramBucketsList(); - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getEquivalenceClassHistogramBuckets(int index); - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - int getEquivalenceClassHistogramBucketsCount(); - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - java.util.List - getEquivalenceClassHistogramBucketsOrBuilderList(); - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder getEquivalenceClassHistogramBucketsOrBuilder( - int index); - } - /** - *
-   * Result of the k-anonymity computation.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult} - */ - public static final class KAnonymityResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) - KAnonymityResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use KAnonymityResult.newBuilder() to construct. - private KAnonymityResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KAnonymityResult() { - equivalenceClassHistogramBuckets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KAnonymityResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KAnonymityResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - equivalenceClassHistogramBuckets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - equivalenceClassHistogramBuckets_.add( - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - equivalenceClassHistogramBuckets_ = java.util.Collections.unmodifiableList(equivalenceClassHistogramBuckets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder.class); - } - - public interface KAnonymityEquivalenceClassOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - java.util.List - getQuasiIdsValuesList(); - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index); - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - int getQuasiIdsValuesCount(); - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - java.util.List - getQuasiIdsValuesOrBuilderList(); - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index); - - /** - *
-       * Size of the equivalence class, for example number of rows with the
-       * above set of values.
-       * 
- * - * int64 equivalence_class_size = 2; - * @return The equivalenceClassSize. - */ - long getEquivalenceClassSize(); - } - /** - *
-     * The set of columns' values that share the same ldiversity value
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass} - */ - public static final class KAnonymityEquivalenceClass extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) - KAnonymityEquivalenceClassOrBuilder { - private static final long serialVersionUID = 0L; - // Use KAnonymityEquivalenceClass.newBuilder() to construct. - private KAnonymityEquivalenceClass(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KAnonymityEquivalenceClass() { - quasiIdsValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KAnonymityEquivalenceClass(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KAnonymityEquivalenceClass( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIdsValues_.add( - input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); - break; - } - case 16: { - - equivalenceClassSize_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder.class); - } - - public static final int QUASI_IDS_VALUES_FIELD_NUMBER = 1; - private java.util.List quasiIdsValues_; - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public java.util.List getQuasiIdsValuesList() { - return quasiIdsValues_; - } - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public java.util.List - getQuasiIdsValuesOrBuilderList() { - return quasiIdsValues_; - } - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public int getQuasiIdsValuesCount() { - return quasiIdsValues_.size(); - } - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { - return quasiIdsValues_.get(index); - } - /** - *
-       * Set of values defining the equivalence class. One value per
-       * quasi-identifier column in the original KAnonymity metric message.
-       * The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index) { - return quasiIdsValues_.get(index); - } - - public static final int EQUIVALENCE_CLASS_SIZE_FIELD_NUMBER = 2; - private long equivalenceClassSize_; - /** - *
-       * Size of the equivalence class, for example number of rows with the
-       * above set of values.
-       * 
- * - * int64 equivalence_class_size = 2; - * @return The equivalenceClassSize. - */ - @java.lang.Override - public long getEquivalenceClassSize() { - return equivalenceClassSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIdsValues_.size(); i++) { - output.writeMessage(1, quasiIdsValues_.get(i)); - } - if (equivalenceClassSize_ != 0L) { - output.writeInt64(2, equivalenceClassSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIdsValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIdsValues_.get(i)); - } - if (equivalenceClassSize_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, equivalenceClassSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) obj; - - if (!getQuasiIdsValuesList() - .equals(other.getQuasiIdsValuesList())) return false; - if (getEquivalenceClassSize() - != other.getEquivalenceClassSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getQuasiIdsValuesCount() > 0) { - hash = (37 * hash) + QUASI_IDS_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsValuesList().hashCode(); - } - hash = (37 * hash) + EQUIVALENCE_CLASS_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getEquivalenceClassSize()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * The set of columns' values that share the same ldiversity value
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsValuesBuilder_.clear(); - } - equivalenceClassSize_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass(this); - int from_bitField0_ = bitField0_; - if (quasiIdsValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIdsValues_ = quasiIdsValues_; - } else { - result.quasiIdsValues_ = quasiIdsValuesBuilder_.build(); - } - result.equivalenceClassSize_ = equivalenceClassSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.getDefaultInstance()) return this; - if (quasiIdsValuesBuilder_ == null) { - if (!other.quasiIdsValues_.isEmpty()) { - if (quasiIdsValues_.isEmpty()) { - quasiIdsValues_ = other.quasiIdsValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.addAll(other.quasiIdsValues_); - } - onChanged(); - } - } else { - if (!other.quasiIdsValues_.isEmpty()) { - if (quasiIdsValuesBuilder_.isEmpty()) { - quasiIdsValuesBuilder_.dispose(); - quasiIdsValuesBuilder_ = null; - quasiIdsValues_ = other.quasiIdsValues_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsValuesFieldBuilder() : null; - } else { - quasiIdsValuesBuilder_.addAllMessages(other.quasiIdsValues_); - } - } - } - if (other.getEquivalenceClassSize() != 0L) { - setEquivalenceClassSize(other.getEquivalenceClassSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List quasiIdsValues_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = new java.util.ArrayList(quasiIdsValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quasiIdsValuesBuilder_; - - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List getQuasiIdsValuesList() { - if (quasiIdsValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIdsValues_); - } else { - return quasiIdsValuesBuilder_.getMessageList(); - } - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public int getQuasiIdsValuesCount() { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.size(); - } else { - return quasiIdsValuesBuilder_.getCount(); - } - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.get(index); - } else { - return quasiIdsValuesBuilder_.getMessage(index); - } - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder setQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.set(index, value); - onChanged(); - } else { - quasiIdsValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder setQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues(com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(value); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(index, value); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addAllQuasiIdsValues( - java.lang.Iterable values) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIdsValues_); - onChanged(); - } else { - quasiIdsValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder clearQuasiIdsValues() { - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder removeQuasiIdsValues(int index) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.remove(index); - onChanged(); - } else { - quasiIdsValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder getQuasiIdsValuesBuilder( - int index) { - return getQuasiIdsValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index) { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.get(index); } else { - return quasiIdsValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List - getQuasiIdsValuesOrBuilderList() { - if (quasiIdsValuesBuilder_ != null) { - return quasiIdsValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIdsValues_); - } - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder() { - return getQuasiIdsValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder( - int index) { - return getQuasiIdsValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-         * Set of values defining the equivalence class. One value per
-         * quasi-identifier column in the original KAnonymity metric message.
-         * The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List - getQuasiIdsValuesBuilderList() { - return getQuasiIdsValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getQuasiIdsValuesFieldBuilder() { - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - quasiIdsValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIdsValues_ = null; - } - return quasiIdsValuesBuilder_; - } - - private long equivalenceClassSize_ ; - /** - *
-         * Size of the equivalence class, for example number of rows with the
-         * above set of values.
-         * 
- * - * int64 equivalence_class_size = 2; - * @return The equivalenceClassSize. - */ - @java.lang.Override - public long getEquivalenceClassSize() { - return equivalenceClassSize_; - } - /** - *
-         * Size of the equivalence class, for example number of rows with the
-         * above set of values.
-         * 
- * - * int64 equivalence_class_size = 2; - * @param value The equivalenceClassSize to set. - * @return This builder for chaining. - */ - public Builder setEquivalenceClassSize(long value) { - - equivalenceClassSize_ = value; - onChanged(); - return this; - } - /** - *
-         * Size of the equivalence class, for example number of rows with the
-         * above set of values.
-         * 
- * - * int64 equivalence_class_size = 2; - * @return This builder for chaining. - */ - public Builder clearEquivalenceClassSize() { - - equivalenceClassSize_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KAnonymityEquivalenceClass parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KAnonymityEquivalenceClass(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface KAnonymityHistogramBucketOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Lower bound on the size of the equivalence classes in this bucket.
-       * 
- * - * int64 equivalence_class_size_lower_bound = 1; - * @return The equivalenceClassSizeLowerBound. - */ - long getEquivalenceClassSizeLowerBound(); - - /** - *
-       * Upper bound on the size of the equivalence classes in this bucket.
-       * 
- * - * int64 equivalence_class_size_upper_bound = 2; - * @return The equivalenceClassSizeUpperBound. - */ - long getEquivalenceClassSizeUpperBound(); - - /** - *
-       * Total number of equivalence classes in this bucket.
-       * 
- * - * int64 bucket_size = 3; - * @return The bucketSize. - */ - long getBucketSize(); - - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - java.util.List - getBucketValuesList(); - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getBucketValues(int index); - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - int getBucketValuesCount(); - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - java.util.List - getBucketValuesOrBuilderList(); - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder getBucketValuesOrBuilder( - int index); - - /** - *
-       * Total number of distinct equivalence classes in this bucket.
-       * 
- * - * int64 bucket_value_count = 5; - * @return The bucketValueCount. - */ - long getBucketValueCount(); - } - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket} - */ - public static final class KAnonymityHistogramBucket extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) - KAnonymityHistogramBucketOrBuilder { - private static final long serialVersionUID = 0L; - // Use KAnonymityHistogramBucket.newBuilder() to construct. - private KAnonymityHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KAnonymityHistogramBucket() { - bucketValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KAnonymityHistogramBucket(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KAnonymityHistogramBucket( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - equivalenceClassSizeLowerBound_ = input.readInt64(); - break; - } - case 16: { - - equivalenceClassSizeUpperBound_ = input.readInt64(); - break; - } - case 24: { - - bucketSize_ = input.readInt64(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bucketValues_.add( - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.parser(), extensionRegistry)); - break; - } - case 40: { - - bucketValueCount_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder.class); - } - - public static final int EQUIVALENCE_CLASS_SIZE_LOWER_BOUND_FIELD_NUMBER = 1; - private long equivalenceClassSizeLowerBound_; - /** - *
-       * Lower bound on the size of the equivalence classes in this bucket.
-       * 
- * - * int64 equivalence_class_size_lower_bound = 1; - * @return The equivalenceClassSizeLowerBound. - */ - @java.lang.Override - public long getEquivalenceClassSizeLowerBound() { - return equivalenceClassSizeLowerBound_; - } - - public static final int EQUIVALENCE_CLASS_SIZE_UPPER_BOUND_FIELD_NUMBER = 2; - private long equivalenceClassSizeUpperBound_; - /** - *
-       * Upper bound on the size of the equivalence classes in this bucket.
-       * 
- * - * int64 equivalence_class_size_upper_bound = 2; - * @return The equivalenceClassSizeUpperBound. - */ - @java.lang.Override - public long getEquivalenceClassSizeUpperBound() { - return equivalenceClassSizeUpperBound_; - } - - public static final int BUCKET_SIZE_FIELD_NUMBER = 3; - private long bucketSize_; - /** - *
-       * Total number of equivalence classes in this bucket.
-       * 
- * - * int64 bucket_size = 3; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - - public static final int BUCKET_VALUES_FIELD_NUMBER = 4; - private java.util.List bucketValues_; - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public java.util.List getBucketValuesList() { - return bucketValues_; - } - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public java.util.List - getBucketValuesOrBuilderList() { - return bucketValues_; - } - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public int getBucketValuesCount() { - return bucketValues_.size(); - } - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getBucketValues(int index) { - return bucketValues_.get(index); - } - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder getBucketValuesOrBuilder( - int index) { - return bucketValues_.get(index); - } - - public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 5; - private long bucketValueCount_; - /** - *
-       * Total number of distinct equivalence classes in this bucket.
-       * 
- * - * int64 bucket_value_count = 5; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (equivalenceClassSizeLowerBound_ != 0L) { - output.writeInt64(1, equivalenceClassSizeLowerBound_); - } - if (equivalenceClassSizeUpperBound_ != 0L) { - output.writeInt64(2, equivalenceClassSizeUpperBound_); - } - if (bucketSize_ != 0L) { - output.writeInt64(3, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - output.writeMessage(4, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - output.writeInt64(5, bucketValueCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (equivalenceClassSizeLowerBound_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, equivalenceClassSizeLowerBound_); - } - if (equivalenceClassSizeUpperBound_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, equivalenceClassSizeUpperBound_); - } - if (bucketSize_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, bucketValueCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) obj; - - if (getEquivalenceClassSizeLowerBound() - != other.getEquivalenceClassSizeLowerBound()) return false; - if (getEquivalenceClassSizeUpperBound() - != other.getEquivalenceClassSizeUpperBound()) return false; - if (getBucketSize() - != other.getBucketSize()) return false; - if (!getBucketValuesList() - .equals(other.getBucketValuesList())) return false; - if (getBucketValueCount() - != other.getBucketValueCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EQUIVALENCE_CLASS_SIZE_LOWER_BOUND_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getEquivalenceClassSizeLowerBound()); - hash = (37 * hash) + EQUIVALENCE_CLASS_SIZE_UPPER_BOUND_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getEquivalenceClassSizeUpperBound()); - hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketSize()); - if (getBucketValuesCount() > 0) { - hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getBucketValuesList().hashCode(); - } - hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketValueCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBucketValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - equivalenceClassSizeLowerBound_ = 0L; - - equivalenceClassSizeUpperBound_ = 0L; - - bucketSize_ = 0L; - - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - bucketValuesBuilder_.clear(); - } - bucketValueCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket(this); - int from_bitField0_ = bitField0_; - result.equivalenceClassSizeLowerBound_ = equivalenceClassSizeLowerBound_; - result.equivalenceClassSizeUpperBound_ = equivalenceClassSizeUpperBound_; - result.bucketSize_ = bucketSize_; - if (bucketValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bucketValues_ = bucketValues_; - } else { - result.bucketValues_ = bucketValuesBuilder_.build(); - } - result.bucketValueCount_ = bucketValueCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.getDefaultInstance()) return this; - if (other.getEquivalenceClassSizeLowerBound() != 0L) { - setEquivalenceClassSizeLowerBound(other.getEquivalenceClassSizeLowerBound()); - } - if (other.getEquivalenceClassSizeUpperBound() != 0L) { - setEquivalenceClassSizeUpperBound(other.getEquivalenceClassSizeUpperBound()); - } - if (other.getBucketSize() != 0L) { - setBucketSize(other.getBucketSize()); - } - if (bucketValuesBuilder_ == null) { - if (!other.bucketValues_.isEmpty()) { - if (bucketValues_.isEmpty()) { - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBucketValuesIsMutable(); - bucketValues_.addAll(other.bucketValues_); - } - onChanged(); - } - } else { - if (!other.bucketValues_.isEmpty()) { - if (bucketValuesBuilder_.isEmpty()) { - bucketValuesBuilder_.dispose(); - bucketValuesBuilder_ = null; - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - bucketValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBucketValuesFieldBuilder() : null; - } else { - bucketValuesBuilder_.addAllMessages(other.bucketValues_); - } - } - } - if (other.getBucketValueCount() != 0L) { - setBucketValueCount(other.getBucketValueCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long equivalenceClassSizeLowerBound_ ; - /** - *
-         * Lower bound on the size of the equivalence classes in this bucket.
-         * 
- * - * int64 equivalence_class_size_lower_bound = 1; - * @return The equivalenceClassSizeLowerBound. - */ - @java.lang.Override - public long getEquivalenceClassSizeLowerBound() { - return equivalenceClassSizeLowerBound_; - } - /** - *
-         * Lower bound on the size of the equivalence classes in this bucket.
-         * 
- * - * int64 equivalence_class_size_lower_bound = 1; - * @param value The equivalenceClassSizeLowerBound to set. - * @return This builder for chaining. - */ - public Builder setEquivalenceClassSizeLowerBound(long value) { - - equivalenceClassSizeLowerBound_ = value; - onChanged(); - return this; - } - /** - *
-         * Lower bound on the size of the equivalence classes in this bucket.
-         * 
- * - * int64 equivalence_class_size_lower_bound = 1; - * @return This builder for chaining. - */ - public Builder clearEquivalenceClassSizeLowerBound() { - - equivalenceClassSizeLowerBound_ = 0L; - onChanged(); - return this; - } - - private long equivalenceClassSizeUpperBound_ ; - /** - *
-         * Upper bound on the size of the equivalence classes in this bucket.
-         * 
- * - * int64 equivalence_class_size_upper_bound = 2; - * @return The equivalenceClassSizeUpperBound. - */ - @java.lang.Override - public long getEquivalenceClassSizeUpperBound() { - return equivalenceClassSizeUpperBound_; - } - /** - *
-         * Upper bound on the size of the equivalence classes in this bucket.
-         * 
- * - * int64 equivalence_class_size_upper_bound = 2; - * @param value The equivalenceClassSizeUpperBound to set. - * @return This builder for chaining. - */ - public Builder setEquivalenceClassSizeUpperBound(long value) { - - equivalenceClassSizeUpperBound_ = value; - onChanged(); - return this; - } - /** - *
-         * Upper bound on the size of the equivalence classes in this bucket.
-         * 
- * - * int64 equivalence_class_size_upper_bound = 2; - * @return This builder for chaining. - */ - public Builder clearEquivalenceClassSizeUpperBound() { - - equivalenceClassSizeUpperBound_ = 0L; - onChanged(); - return this; - } - - private long bucketSize_ ; - /** - *
-         * Total number of equivalence classes in this bucket.
-         * 
- * - * int64 bucket_size = 3; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - /** - *
-         * Total number of equivalence classes in this bucket.
-         * 
- * - * int64 bucket_size = 3; - * @param value The bucketSize to set. - * @return This builder for chaining. - */ - public Builder setBucketSize(long value) { - - bucketSize_ = value; - onChanged(); - return this; - } - /** - *
-         * Total number of equivalence classes in this bucket.
-         * 
- * - * int64 bucket_size = 3; - * @return This builder for chaining. - */ - public Builder clearBucketSize() { - - bucketSize_ = 0L; - onChanged(); - return this; - } - - private java.util.List bucketValues_ = - java.util.Collections.emptyList(); - private void ensureBucketValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(bucketValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder> bucketValuesBuilder_; - - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public java.util.List getBucketValuesList() { - if (bucketValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(bucketValues_); - } else { - return bucketValuesBuilder_.getMessageList(); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public int getBucketValuesCount() { - if (bucketValuesBuilder_ == null) { - return bucketValues_.size(); - } else { - return bucketValuesBuilder_.getCount(); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass getBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); - } else { - return bucketValuesBuilder_.getMessage(index); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.set(index, value); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.set(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public Builder addBucketValues(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(index, value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public Builder addBucketValues( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public Builder addAllBucketValues( - java.lang.Iterable values) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bucketValues_); - onChanged(); - } else { - bucketValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public Builder clearBucketValues() { - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - bucketValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public Builder removeBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.remove(index); - onChanged(); - } else { - bucketValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder getBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder getBucketValuesOrBuilder( - int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); } else { - return bucketValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public java.util.List - getBucketValuesOrBuilderList() { - if (bucketValuesBuilder_ != null) { - return bucketValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bucketValues_); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder addBucketValuesBuilder() { - return getBucketValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.getDefaultInstance()); - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder addBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.getDefaultInstance()); - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass bucket_values = 4; - */ - public java.util.List - getBucketValuesBuilderList() { - return getBucketValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder> - getBucketValuesFieldBuilder() { - if (bucketValuesBuilder_ == null) { - bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClassOrBuilder>( - bucketValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - bucketValues_ = null; - } - return bucketValuesBuilder_; - } - - private long bucketValueCount_ ; - /** - *
-         * Total number of distinct equivalence classes in this bucket.
-         * 
- * - * int64 bucket_value_count = 5; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - /** - *
-         * Total number of distinct equivalence classes in this bucket.
-         * 
- * - * int64 bucket_value_count = 5; - * @param value The bucketValueCount to set. - * @return This builder for chaining. - */ - public Builder setBucketValueCount(long value) { - - bucketValueCount_ = value; - onChanged(); - return this; - } - /** - *
-         * Total number of distinct equivalence classes in this bucket.
-         * 
- * - * int64 bucket_value_count = 5; - * @return This builder for chaining. - */ - public Builder clearBucketValueCount() { - - bucketValueCount_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KAnonymityHistogramBucket parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KAnonymityHistogramBucket(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int EQUIVALENCE_CLASS_HISTOGRAM_BUCKETS_FIELD_NUMBER = 5; - private java.util.List equivalenceClassHistogramBuckets_; - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - @java.lang.Override - public java.util.List getEquivalenceClassHistogramBucketsList() { - return equivalenceClassHistogramBuckets_; - } - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - @java.lang.Override - public java.util.List - getEquivalenceClassHistogramBucketsOrBuilderList() { - return equivalenceClassHistogramBuckets_; - } - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - @java.lang.Override - public int getEquivalenceClassHistogramBucketsCount() { - return equivalenceClassHistogramBuckets_.size(); - } - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getEquivalenceClassHistogramBuckets(int index) { - return equivalenceClassHistogramBuckets_.get(index); - } - /** - *
-     * Histogram of k-anonymity equivalence classes.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder getEquivalenceClassHistogramBucketsOrBuilder( - int index) { - return equivalenceClassHistogramBuckets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < equivalenceClassHistogramBuckets_.size(); i++) { - output.writeMessage(5, equivalenceClassHistogramBuckets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < equivalenceClassHistogramBuckets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, equivalenceClassHistogramBuckets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) obj; - - if (!getEquivalenceClassHistogramBucketsList() - .equals(other.getEquivalenceClassHistogramBucketsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getEquivalenceClassHistogramBucketsCount() > 0) { - hash = (37 * hash) + EQUIVALENCE_CLASS_HISTOGRAM_BUCKETS_FIELD_NUMBER; - hash = (53 * hash) + getEquivalenceClassHistogramBucketsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Result of the k-anonymity computation.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getEquivalenceClassHistogramBucketsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (equivalenceClassHistogramBucketsBuilder_ == null) { - equivalenceClassHistogramBuckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - equivalenceClassHistogramBucketsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult(this); - int from_bitField0_ = bitField0_; - if (equivalenceClassHistogramBucketsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - equivalenceClassHistogramBuckets_ = java.util.Collections.unmodifiableList(equivalenceClassHistogramBuckets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.equivalenceClassHistogramBuckets_ = equivalenceClassHistogramBuckets_; - } else { - result.equivalenceClassHistogramBuckets_ = equivalenceClassHistogramBucketsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance()) return this; - if (equivalenceClassHistogramBucketsBuilder_ == null) { - if (!other.equivalenceClassHistogramBuckets_.isEmpty()) { - if (equivalenceClassHistogramBuckets_.isEmpty()) { - equivalenceClassHistogramBuckets_ = other.equivalenceClassHistogramBuckets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEquivalenceClassHistogramBucketsIsMutable(); - equivalenceClassHistogramBuckets_.addAll(other.equivalenceClassHistogramBuckets_); - } - onChanged(); - } - } else { - if (!other.equivalenceClassHistogramBuckets_.isEmpty()) { - if (equivalenceClassHistogramBucketsBuilder_.isEmpty()) { - equivalenceClassHistogramBucketsBuilder_.dispose(); - equivalenceClassHistogramBucketsBuilder_ = null; - equivalenceClassHistogramBuckets_ = other.equivalenceClassHistogramBuckets_; - bitField0_ = (bitField0_ & ~0x00000001); - equivalenceClassHistogramBucketsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getEquivalenceClassHistogramBucketsFieldBuilder() : null; - } else { - equivalenceClassHistogramBucketsBuilder_.addAllMessages(other.equivalenceClassHistogramBuckets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List equivalenceClassHistogramBuckets_ = - java.util.Collections.emptyList(); - private void ensureEquivalenceClassHistogramBucketsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - equivalenceClassHistogramBuckets_ = new java.util.ArrayList(equivalenceClassHistogramBuckets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder> equivalenceClassHistogramBucketsBuilder_; - - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public java.util.List getEquivalenceClassHistogramBucketsList() { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - return java.util.Collections.unmodifiableList(equivalenceClassHistogramBuckets_); - } else { - return equivalenceClassHistogramBucketsBuilder_.getMessageList(); - } - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public int getEquivalenceClassHistogramBucketsCount() { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - return equivalenceClassHistogramBuckets_.size(); - } else { - return equivalenceClassHistogramBucketsBuilder_.getCount(); - } - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket getEquivalenceClassHistogramBuckets(int index) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - return equivalenceClassHistogramBuckets_.get(index); - } else { - return equivalenceClassHistogramBucketsBuilder_.getMessage(index); - } - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public Builder setEquivalenceClassHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket value) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEquivalenceClassHistogramBucketsIsMutable(); - equivalenceClassHistogramBuckets_.set(index, value); - onChanged(); - } else { - equivalenceClassHistogramBucketsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public Builder setEquivalenceClassHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder builderForValue) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - ensureEquivalenceClassHistogramBucketsIsMutable(); - equivalenceClassHistogramBuckets_.set(index, builderForValue.build()); - onChanged(); - } else { - equivalenceClassHistogramBucketsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public Builder addEquivalenceClassHistogramBuckets(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket value) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEquivalenceClassHistogramBucketsIsMutable(); - equivalenceClassHistogramBuckets_.add(value); - onChanged(); - } else { - equivalenceClassHistogramBucketsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public Builder addEquivalenceClassHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket value) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEquivalenceClassHistogramBucketsIsMutable(); - equivalenceClassHistogramBuckets_.add(index, value); - onChanged(); - } else { - equivalenceClassHistogramBucketsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public Builder addEquivalenceClassHistogramBuckets( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder builderForValue) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - ensureEquivalenceClassHistogramBucketsIsMutable(); - equivalenceClassHistogramBuckets_.add(builderForValue.build()); - onChanged(); - } else { - equivalenceClassHistogramBucketsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public Builder addEquivalenceClassHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder builderForValue) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - ensureEquivalenceClassHistogramBucketsIsMutable(); - equivalenceClassHistogramBuckets_.add(index, builderForValue.build()); - onChanged(); - } else { - equivalenceClassHistogramBucketsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public Builder addAllEquivalenceClassHistogramBuckets( - java.lang.Iterable values) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - ensureEquivalenceClassHistogramBucketsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, equivalenceClassHistogramBuckets_); - onChanged(); - } else { - equivalenceClassHistogramBucketsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public Builder clearEquivalenceClassHistogramBuckets() { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - equivalenceClassHistogramBuckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - equivalenceClassHistogramBucketsBuilder_.clear(); - } - return this; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public Builder removeEquivalenceClassHistogramBuckets(int index) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - ensureEquivalenceClassHistogramBucketsIsMutable(); - equivalenceClassHistogramBuckets_.remove(index); - onChanged(); - } else { - equivalenceClassHistogramBucketsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder getEquivalenceClassHistogramBucketsBuilder( - int index) { - return getEquivalenceClassHistogramBucketsFieldBuilder().getBuilder(index); - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder getEquivalenceClassHistogramBucketsOrBuilder( - int index) { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - return equivalenceClassHistogramBuckets_.get(index); } else { - return equivalenceClassHistogramBucketsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public java.util.List - getEquivalenceClassHistogramBucketsOrBuilderList() { - if (equivalenceClassHistogramBucketsBuilder_ != null) { - return equivalenceClassHistogramBucketsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(equivalenceClassHistogramBuckets_); - } - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder addEquivalenceClassHistogramBucketsBuilder() { - return getEquivalenceClassHistogramBucketsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.getDefaultInstance()); - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder addEquivalenceClassHistogramBucketsBuilder( - int index) { - return getEquivalenceClassHistogramBucketsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.getDefaultInstance()); - } - /** - *
-       * Histogram of k-anonymity equivalence classes.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - */ - public java.util.List - getEquivalenceClassHistogramBucketsBuilderList() { - return getEquivalenceClassHistogramBucketsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder> - getEquivalenceClassHistogramBucketsFieldBuilder() { - if (equivalenceClassHistogramBucketsBuilder_ == null) { - equivalenceClassHistogramBucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucketOrBuilder>( - equivalenceClassHistogramBuckets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - equivalenceClassHistogramBuckets_ = null; - } - return equivalenceClassHistogramBucketsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KAnonymityResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KAnonymityResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LDiversityResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - java.util.List - getSensitiveValueFrequencyHistogramBucketsList(); - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getSensitiveValueFrequencyHistogramBuckets(int index); - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - int getSensitiveValueFrequencyHistogramBucketsCount(); - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - java.util.List - getSensitiveValueFrequencyHistogramBucketsOrBuilderList(); - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder getSensitiveValueFrequencyHistogramBucketsOrBuilder( - int index); - } - /** - *
-   * Result of the l-diversity computation.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult} - */ - public static final class LDiversityResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) - LDiversityResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use LDiversityResult.newBuilder() to construct. - private LDiversityResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LDiversityResult() { - sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LDiversityResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LDiversityResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sensitiveValueFrequencyHistogramBuckets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sensitiveValueFrequencyHistogramBuckets_.add( - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.unmodifiableList(sensitiveValueFrequencyHistogramBuckets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder.class); - } - - public interface LDiversityEquivalenceClassOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - java.util.List - getQuasiIdsValuesList(); - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index); - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - int getQuasiIdsValuesCount(); - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - java.util.List - getQuasiIdsValuesOrBuilderList(); - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index); - - /** - *
-       * Size of the k-anonymity equivalence class.
-       * 
- * - * int64 equivalence_class_size = 2; - * @return The equivalenceClassSize. - */ - long getEquivalenceClassSize(); - - /** - *
-       * Number of distinct sensitive values in this equivalence class.
-       * 
- * - * int64 num_distinct_sensitive_values = 3; - * @return The numDistinctSensitiveValues. - */ - long getNumDistinctSensitiveValues(); - - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - java.util.List - getTopSensitiveValuesList(); - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - com.google.privacy.dlp.v2.ValueFrequency getTopSensitiveValues(int index); - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - int getTopSensitiveValuesCount(); - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - java.util.List - getTopSensitiveValuesOrBuilderList(); - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getTopSensitiveValuesOrBuilder( - int index); - } - /** - *
-     * The set of columns' values that share the same ldiversity value.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass} - */ - public static final class LDiversityEquivalenceClass extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) - LDiversityEquivalenceClassOrBuilder { - private static final long serialVersionUID = 0L; - // Use LDiversityEquivalenceClass.newBuilder() to construct. - private LDiversityEquivalenceClass(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LDiversityEquivalenceClass() { - quasiIdsValues_ = java.util.Collections.emptyList(); - topSensitiveValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LDiversityEquivalenceClass(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LDiversityEquivalenceClass( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIdsValues_.add( - input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); - break; - } - case 16: { - - equivalenceClassSize_ = input.readInt64(); - break; - } - case 24: { - - numDistinctSensitiveValues_ = input.readInt64(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - topSensitiveValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - topSensitiveValues_.add( - input.readMessage(com.google.privacy.dlp.v2.ValueFrequency.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - topSensitiveValues_ = java.util.Collections.unmodifiableList(topSensitiveValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder.class); - } - - public static final int QUASI_IDS_VALUES_FIELD_NUMBER = 1; - private java.util.List quasiIdsValues_; - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public java.util.List getQuasiIdsValuesList() { - return quasiIdsValues_; - } - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public java.util.List - getQuasiIdsValuesOrBuilderList() { - return quasiIdsValues_; - } - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public int getQuasiIdsValuesCount() { - return quasiIdsValues_.size(); - } - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { - return quasiIdsValues_.get(index); - } - /** - *
-       * Quasi-identifier values defining the k-anonymity equivalence
-       * class. The order is always the same as the original request.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index) { - return quasiIdsValues_.get(index); - } - - public static final int EQUIVALENCE_CLASS_SIZE_FIELD_NUMBER = 2; - private long equivalenceClassSize_; - /** - *
-       * Size of the k-anonymity equivalence class.
-       * 
- * - * int64 equivalence_class_size = 2; - * @return The equivalenceClassSize. - */ - @java.lang.Override - public long getEquivalenceClassSize() { - return equivalenceClassSize_; - } - - public static final int NUM_DISTINCT_SENSITIVE_VALUES_FIELD_NUMBER = 3; - private long numDistinctSensitiveValues_; - /** - *
-       * Number of distinct sensitive values in this equivalence class.
-       * 
- * - * int64 num_distinct_sensitive_values = 3; - * @return The numDistinctSensitiveValues. - */ - @java.lang.Override - public long getNumDistinctSensitiveValues() { - return numDistinctSensitiveValues_; - } - - public static final int TOP_SENSITIVE_VALUES_FIELD_NUMBER = 4; - private java.util.List topSensitiveValues_; - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - @java.lang.Override - public java.util.List getTopSensitiveValuesList() { - return topSensitiveValues_; - } - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - @java.lang.Override - public java.util.List - getTopSensitiveValuesOrBuilderList() { - return topSensitiveValues_; - } - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - @java.lang.Override - public int getTopSensitiveValuesCount() { - return topSensitiveValues_.size(); - } - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueFrequency getTopSensitiveValues(int index) { - return topSensitiveValues_.get(index); - } - /** - *
-       * Estimated frequencies of top sensitive values.
-       * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getTopSensitiveValuesOrBuilder( - int index) { - return topSensitiveValues_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIdsValues_.size(); i++) { - output.writeMessage(1, quasiIdsValues_.get(i)); - } - if (equivalenceClassSize_ != 0L) { - output.writeInt64(2, equivalenceClassSize_); - } - if (numDistinctSensitiveValues_ != 0L) { - output.writeInt64(3, numDistinctSensitiveValues_); - } - for (int i = 0; i < topSensitiveValues_.size(); i++) { - output.writeMessage(4, topSensitiveValues_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIdsValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIdsValues_.get(i)); - } - if (equivalenceClassSize_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, equivalenceClassSize_); - } - if (numDistinctSensitiveValues_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, numDistinctSensitiveValues_); - } - for (int i = 0; i < topSensitiveValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, topSensitiveValues_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) obj; - - if (!getQuasiIdsValuesList() - .equals(other.getQuasiIdsValuesList())) return false; - if (getEquivalenceClassSize() - != other.getEquivalenceClassSize()) return false; - if (getNumDistinctSensitiveValues() - != other.getNumDistinctSensitiveValues()) return false; - if (!getTopSensitiveValuesList() - .equals(other.getTopSensitiveValuesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getQuasiIdsValuesCount() > 0) { - hash = (37 * hash) + QUASI_IDS_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsValuesList().hashCode(); - } - hash = (37 * hash) + EQUIVALENCE_CLASS_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getEquivalenceClassSize()); - hash = (37 * hash) + NUM_DISTINCT_SENSITIVE_VALUES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getNumDistinctSensitiveValues()); - if (getTopSensitiveValuesCount() > 0) { - hash = (37 * hash) + TOP_SENSITIVE_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getTopSensitiveValuesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * The set of columns' values that share the same ldiversity value.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsValuesFieldBuilder(); - getTopSensitiveValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsValuesBuilder_.clear(); - } - equivalenceClassSize_ = 0L; - - numDistinctSensitiveValues_ = 0L; - - if (topSensitiveValuesBuilder_ == null) { - topSensitiveValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - topSensitiveValuesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass(this); - int from_bitField0_ = bitField0_; - if (quasiIdsValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIdsValues_ = quasiIdsValues_; - } else { - result.quasiIdsValues_ = quasiIdsValuesBuilder_.build(); - } - result.equivalenceClassSize_ = equivalenceClassSize_; - result.numDistinctSensitiveValues_ = numDistinctSensitiveValues_; - if (topSensitiveValuesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - topSensitiveValues_ = java.util.Collections.unmodifiableList(topSensitiveValues_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.topSensitiveValues_ = topSensitiveValues_; - } else { - result.topSensitiveValues_ = topSensitiveValuesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.getDefaultInstance()) return this; - if (quasiIdsValuesBuilder_ == null) { - if (!other.quasiIdsValues_.isEmpty()) { - if (quasiIdsValues_.isEmpty()) { - quasiIdsValues_ = other.quasiIdsValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.addAll(other.quasiIdsValues_); - } - onChanged(); - } - } else { - if (!other.quasiIdsValues_.isEmpty()) { - if (quasiIdsValuesBuilder_.isEmpty()) { - quasiIdsValuesBuilder_.dispose(); - quasiIdsValuesBuilder_ = null; - quasiIdsValues_ = other.quasiIdsValues_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsValuesFieldBuilder() : null; - } else { - quasiIdsValuesBuilder_.addAllMessages(other.quasiIdsValues_); - } - } - } - if (other.getEquivalenceClassSize() != 0L) { - setEquivalenceClassSize(other.getEquivalenceClassSize()); - } - if (other.getNumDistinctSensitiveValues() != 0L) { - setNumDistinctSensitiveValues(other.getNumDistinctSensitiveValues()); - } - if (topSensitiveValuesBuilder_ == null) { - if (!other.topSensitiveValues_.isEmpty()) { - if (topSensitiveValues_.isEmpty()) { - topSensitiveValues_ = other.topSensitiveValues_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTopSensitiveValuesIsMutable(); - topSensitiveValues_.addAll(other.topSensitiveValues_); - } - onChanged(); - } - } else { - if (!other.topSensitiveValues_.isEmpty()) { - if (topSensitiveValuesBuilder_.isEmpty()) { - topSensitiveValuesBuilder_.dispose(); - topSensitiveValuesBuilder_ = null; - topSensitiveValues_ = other.topSensitiveValues_; - bitField0_ = (bitField0_ & ~0x00000002); - topSensitiveValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTopSensitiveValuesFieldBuilder() : null; - } else { - topSensitiveValuesBuilder_.addAllMessages(other.topSensitiveValues_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List quasiIdsValues_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = new java.util.ArrayList(quasiIdsValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quasiIdsValuesBuilder_; - - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List getQuasiIdsValuesList() { - if (quasiIdsValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIdsValues_); - } else { - return quasiIdsValuesBuilder_.getMessageList(); - } - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public int getQuasiIdsValuesCount() { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.size(); - } else { - return quasiIdsValuesBuilder_.getCount(); - } - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.get(index); - } else { - return quasiIdsValuesBuilder_.getMessage(index); - } - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder setQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.set(index, value); - onChanged(); - } else { - quasiIdsValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder setQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues(com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(value); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(index, value); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addAllQuasiIdsValues( - java.lang.Iterable values) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIdsValues_); - onChanged(); - } else { - quasiIdsValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder clearQuasiIdsValues() { - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder removeQuasiIdsValues(int index) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.remove(index); - onChanged(); - } else { - quasiIdsValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder getQuasiIdsValuesBuilder( - int index) { - return getQuasiIdsValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index) { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.get(index); } else { - return quasiIdsValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List - getQuasiIdsValuesOrBuilderList() { - if (quasiIdsValuesBuilder_ != null) { - return quasiIdsValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIdsValues_); - } - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder() { - return getQuasiIdsValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder( - int index) { - return getQuasiIdsValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-         * Quasi-identifier values defining the k-anonymity equivalence
-         * class. The order is always the same as the original request.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List - getQuasiIdsValuesBuilderList() { - return getQuasiIdsValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getQuasiIdsValuesFieldBuilder() { - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - quasiIdsValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIdsValues_ = null; - } - return quasiIdsValuesBuilder_; - } - - private long equivalenceClassSize_ ; - /** - *
-         * Size of the k-anonymity equivalence class.
-         * 
- * - * int64 equivalence_class_size = 2; - * @return The equivalenceClassSize. - */ - @java.lang.Override - public long getEquivalenceClassSize() { - return equivalenceClassSize_; - } - /** - *
-         * Size of the k-anonymity equivalence class.
-         * 
- * - * int64 equivalence_class_size = 2; - * @param value The equivalenceClassSize to set. - * @return This builder for chaining. - */ - public Builder setEquivalenceClassSize(long value) { - - equivalenceClassSize_ = value; - onChanged(); - return this; - } - /** - *
-         * Size of the k-anonymity equivalence class.
-         * 
- * - * int64 equivalence_class_size = 2; - * @return This builder for chaining. - */ - public Builder clearEquivalenceClassSize() { - - equivalenceClassSize_ = 0L; - onChanged(); - return this; - } - - private long numDistinctSensitiveValues_ ; - /** - *
-         * Number of distinct sensitive values in this equivalence class.
-         * 
- * - * int64 num_distinct_sensitive_values = 3; - * @return The numDistinctSensitiveValues. - */ - @java.lang.Override - public long getNumDistinctSensitiveValues() { - return numDistinctSensitiveValues_; - } - /** - *
-         * Number of distinct sensitive values in this equivalence class.
-         * 
- * - * int64 num_distinct_sensitive_values = 3; - * @param value The numDistinctSensitiveValues to set. - * @return This builder for chaining. - */ - public Builder setNumDistinctSensitiveValues(long value) { - - numDistinctSensitiveValues_ = value; - onChanged(); - return this; - } - /** - *
-         * Number of distinct sensitive values in this equivalence class.
-         * 
- * - * int64 num_distinct_sensitive_values = 3; - * @return This builder for chaining. - */ - public Builder clearNumDistinctSensitiveValues() { - - numDistinctSensitiveValues_ = 0L; - onChanged(); - return this; - } - - private java.util.List topSensitiveValues_ = - java.util.Collections.emptyList(); - private void ensureTopSensitiveValuesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - topSensitiveValues_ = new java.util.ArrayList(topSensitiveValues_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder> topSensitiveValuesBuilder_; - - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public java.util.List getTopSensitiveValuesList() { - if (topSensitiveValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(topSensitiveValues_); - } else { - return topSensitiveValuesBuilder_.getMessageList(); - } - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public int getTopSensitiveValuesCount() { - if (topSensitiveValuesBuilder_ == null) { - return topSensitiveValues_.size(); - } else { - return topSensitiveValuesBuilder_.getCount(); - } - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequency getTopSensitiveValues(int index) { - if (topSensitiveValuesBuilder_ == null) { - return topSensitiveValues_.get(index); - } else { - return topSensitiveValuesBuilder_.getMessage(index); - } - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public Builder setTopSensitiveValues( - int index, com.google.privacy.dlp.v2.ValueFrequency value) { - if (topSensitiveValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopSensitiveValuesIsMutable(); - topSensitiveValues_.set(index, value); - onChanged(); - } else { - topSensitiveValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public Builder setTopSensitiveValues( - int index, com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { - if (topSensitiveValuesBuilder_ == null) { - ensureTopSensitiveValuesIsMutable(); - topSensitiveValues_.set(index, builderForValue.build()); - onChanged(); - } else { - topSensitiveValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public Builder addTopSensitiveValues(com.google.privacy.dlp.v2.ValueFrequency value) { - if (topSensitiveValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopSensitiveValuesIsMutable(); - topSensitiveValues_.add(value); - onChanged(); - } else { - topSensitiveValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public Builder addTopSensitiveValues( - int index, com.google.privacy.dlp.v2.ValueFrequency value) { - if (topSensitiveValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopSensitiveValuesIsMutable(); - topSensitiveValues_.add(index, value); - onChanged(); - } else { - topSensitiveValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public Builder addTopSensitiveValues( - com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { - if (topSensitiveValuesBuilder_ == null) { - ensureTopSensitiveValuesIsMutable(); - topSensitiveValues_.add(builderForValue.build()); - onChanged(); - } else { - topSensitiveValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public Builder addTopSensitiveValues( - int index, com.google.privacy.dlp.v2.ValueFrequency.Builder builderForValue) { - if (topSensitiveValuesBuilder_ == null) { - ensureTopSensitiveValuesIsMutable(); - topSensitiveValues_.add(index, builderForValue.build()); - onChanged(); - } else { - topSensitiveValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public Builder addAllTopSensitiveValues( - java.lang.Iterable values) { - if (topSensitiveValuesBuilder_ == null) { - ensureTopSensitiveValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, topSensitiveValues_); - onChanged(); - } else { - topSensitiveValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public Builder clearTopSensitiveValues() { - if (topSensitiveValuesBuilder_ == null) { - topSensitiveValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - topSensitiveValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public Builder removeTopSensitiveValues(int index) { - if (topSensitiveValuesBuilder_ == null) { - ensureTopSensitiveValuesIsMutable(); - topSensitiveValues_.remove(index); - onChanged(); - } else { - topSensitiveValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequency.Builder getTopSensitiveValuesBuilder( - int index) { - return getTopSensitiveValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequencyOrBuilder getTopSensitiveValuesOrBuilder( - int index) { - if (topSensitiveValuesBuilder_ == null) { - return topSensitiveValues_.get(index); } else { - return topSensitiveValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public java.util.List - getTopSensitiveValuesOrBuilderList() { - if (topSensitiveValuesBuilder_ != null) { - return topSensitiveValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topSensitiveValues_); - } - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequency.Builder addTopSensitiveValuesBuilder() { - return getTopSensitiveValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()); - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public com.google.privacy.dlp.v2.ValueFrequency.Builder addTopSensitiveValuesBuilder( - int index) { - return getTopSensitiveValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()); - } - /** - *
-         * Estimated frequencies of top sensitive values.
-         * 
- * - * repeated .google.privacy.dlp.v2.ValueFrequency top_sensitive_values = 4; - */ - public java.util.List - getTopSensitiveValuesBuilderList() { - return getTopSensitiveValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder> - getTopSensitiveValuesFieldBuilder() { - if (topSensitiveValuesBuilder_ == null) { - topSensitiveValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ValueFrequency, com.google.privacy.dlp.v2.ValueFrequency.Builder, com.google.privacy.dlp.v2.ValueFrequencyOrBuilder>( - topSensitiveValues_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - topSensitiveValues_ = null; - } - return topSensitiveValuesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LDiversityEquivalenceClass parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LDiversityEquivalenceClass(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LDiversityHistogramBucketOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Lower bound on the sensitive value frequencies of the equivalence
-       * classes in this bucket.
-       * 
- * - * int64 sensitive_value_frequency_lower_bound = 1; - * @return The sensitiveValueFrequencyLowerBound. - */ - long getSensitiveValueFrequencyLowerBound(); - - /** - *
-       * Upper bound on the sensitive value frequencies of the equivalence
-       * classes in this bucket.
-       * 
- * - * int64 sensitive_value_frequency_upper_bound = 2; - * @return The sensitiveValueFrequencyUpperBound. - */ - long getSensitiveValueFrequencyUpperBound(); - - /** - *
-       * Total number of equivalence classes in this bucket.
-       * 
- * - * int64 bucket_size = 3; - * @return The bucketSize. - */ - long getBucketSize(); - - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - java.util.List - getBucketValuesList(); - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getBucketValues(int index); - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - int getBucketValuesCount(); - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - java.util.List - getBucketValuesOrBuilderList(); - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder getBucketValuesOrBuilder( - int index); - - /** - *
-       * Total number of distinct equivalence classes in this bucket.
-       * 
- * - * int64 bucket_value_count = 5; - * @return The bucketValueCount. - */ - long getBucketValueCount(); - } - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket} - */ - public static final class LDiversityHistogramBucket extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) - LDiversityHistogramBucketOrBuilder { - private static final long serialVersionUID = 0L; - // Use LDiversityHistogramBucket.newBuilder() to construct. - private LDiversityHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LDiversityHistogramBucket() { - bucketValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LDiversityHistogramBucket(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LDiversityHistogramBucket( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - sensitiveValueFrequencyLowerBound_ = input.readInt64(); - break; - } - case 16: { - - sensitiveValueFrequencyUpperBound_ = input.readInt64(); - break; - } - case 24: { - - bucketSize_ = input.readInt64(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bucketValues_.add( - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.parser(), extensionRegistry)); - break; - } - case 40: { - - bucketValueCount_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder.class); - } - - public static final int SENSITIVE_VALUE_FREQUENCY_LOWER_BOUND_FIELD_NUMBER = 1; - private long sensitiveValueFrequencyLowerBound_; - /** - *
-       * Lower bound on the sensitive value frequencies of the equivalence
-       * classes in this bucket.
-       * 
- * - * int64 sensitive_value_frequency_lower_bound = 1; - * @return The sensitiveValueFrequencyLowerBound. - */ - @java.lang.Override - public long getSensitiveValueFrequencyLowerBound() { - return sensitiveValueFrequencyLowerBound_; - } - - public static final int SENSITIVE_VALUE_FREQUENCY_UPPER_BOUND_FIELD_NUMBER = 2; - private long sensitiveValueFrequencyUpperBound_; - /** - *
-       * Upper bound on the sensitive value frequencies of the equivalence
-       * classes in this bucket.
-       * 
- * - * int64 sensitive_value_frequency_upper_bound = 2; - * @return The sensitiveValueFrequencyUpperBound. - */ - @java.lang.Override - public long getSensitiveValueFrequencyUpperBound() { - return sensitiveValueFrequencyUpperBound_; - } - - public static final int BUCKET_SIZE_FIELD_NUMBER = 3; - private long bucketSize_; - /** - *
-       * Total number of equivalence classes in this bucket.
-       * 
- * - * int64 bucket_size = 3; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - - public static final int BUCKET_VALUES_FIELD_NUMBER = 4; - private java.util.List bucketValues_; - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public java.util.List getBucketValuesList() { - return bucketValues_; - } - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public java.util.List - getBucketValuesOrBuilderList() { - return bucketValues_; - } - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public int getBucketValuesCount() { - return bucketValues_.size(); - } - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getBucketValues(int index) { - return bucketValues_.get(index); - } - /** - *
-       * Sample of equivalence classes in this bucket. The total number of
-       * classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder getBucketValuesOrBuilder( - int index) { - return bucketValues_.get(index); - } - - public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 5; - private long bucketValueCount_; - /** - *
-       * Total number of distinct equivalence classes in this bucket.
-       * 
- * - * int64 bucket_value_count = 5; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sensitiveValueFrequencyLowerBound_ != 0L) { - output.writeInt64(1, sensitiveValueFrequencyLowerBound_); - } - if (sensitiveValueFrequencyUpperBound_ != 0L) { - output.writeInt64(2, sensitiveValueFrequencyUpperBound_); - } - if (bucketSize_ != 0L) { - output.writeInt64(3, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - output.writeMessage(4, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - output.writeInt64(5, bucketValueCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sensitiveValueFrequencyLowerBound_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, sensitiveValueFrequencyLowerBound_); - } - if (sensitiveValueFrequencyUpperBound_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, sensitiveValueFrequencyUpperBound_); - } - if (bucketSize_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, bucketValueCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) obj; - - if (getSensitiveValueFrequencyLowerBound() - != other.getSensitiveValueFrequencyLowerBound()) return false; - if (getSensitiveValueFrequencyUpperBound() - != other.getSensitiveValueFrequencyUpperBound()) return false; - if (getBucketSize() - != other.getBucketSize()) return false; - if (!getBucketValuesList() - .equals(other.getBucketValuesList())) return false; - if (getBucketValueCount() - != other.getBucketValueCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SENSITIVE_VALUE_FREQUENCY_LOWER_BOUND_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getSensitiveValueFrequencyLowerBound()); - hash = (37 * hash) + SENSITIVE_VALUE_FREQUENCY_UPPER_BOUND_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getSensitiveValueFrequencyUpperBound()); - hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketSize()); - if (getBucketValuesCount() > 0) { - hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getBucketValuesList().hashCode(); - } - hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketValueCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBucketValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - sensitiveValueFrequencyLowerBound_ = 0L; - - sensitiveValueFrequencyUpperBound_ = 0L; - - bucketSize_ = 0L; - - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - bucketValuesBuilder_.clear(); - } - bucketValueCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket(this); - int from_bitField0_ = bitField0_; - result.sensitiveValueFrequencyLowerBound_ = sensitiveValueFrequencyLowerBound_; - result.sensitiveValueFrequencyUpperBound_ = sensitiveValueFrequencyUpperBound_; - result.bucketSize_ = bucketSize_; - if (bucketValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bucketValues_ = bucketValues_; - } else { - result.bucketValues_ = bucketValuesBuilder_.build(); - } - result.bucketValueCount_ = bucketValueCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.getDefaultInstance()) return this; - if (other.getSensitiveValueFrequencyLowerBound() != 0L) { - setSensitiveValueFrequencyLowerBound(other.getSensitiveValueFrequencyLowerBound()); - } - if (other.getSensitiveValueFrequencyUpperBound() != 0L) { - setSensitiveValueFrequencyUpperBound(other.getSensitiveValueFrequencyUpperBound()); - } - if (other.getBucketSize() != 0L) { - setBucketSize(other.getBucketSize()); - } - if (bucketValuesBuilder_ == null) { - if (!other.bucketValues_.isEmpty()) { - if (bucketValues_.isEmpty()) { - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBucketValuesIsMutable(); - bucketValues_.addAll(other.bucketValues_); - } - onChanged(); - } - } else { - if (!other.bucketValues_.isEmpty()) { - if (bucketValuesBuilder_.isEmpty()) { - bucketValuesBuilder_.dispose(); - bucketValuesBuilder_ = null; - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - bucketValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBucketValuesFieldBuilder() : null; - } else { - bucketValuesBuilder_.addAllMessages(other.bucketValues_); - } - } - } - if (other.getBucketValueCount() != 0L) { - setBucketValueCount(other.getBucketValueCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long sensitiveValueFrequencyLowerBound_ ; - /** - *
-         * Lower bound on the sensitive value frequencies of the equivalence
-         * classes in this bucket.
-         * 
- * - * int64 sensitive_value_frequency_lower_bound = 1; - * @return The sensitiveValueFrequencyLowerBound. - */ - @java.lang.Override - public long getSensitiveValueFrequencyLowerBound() { - return sensitiveValueFrequencyLowerBound_; - } - /** - *
-         * Lower bound on the sensitive value frequencies of the equivalence
-         * classes in this bucket.
-         * 
- * - * int64 sensitive_value_frequency_lower_bound = 1; - * @param value The sensitiveValueFrequencyLowerBound to set. - * @return This builder for chaining. - */ - public Builder setSensitiveValueFrequencyLowerBound(long value) { - - sensitiveValueFrequencyLowerBound_ = value; - onChanged(); - return this; - } - /** - *
-         * Lower bound on the sensitive value frequencies of the equivalence
-         * classes in this bucket.
-         * 
- * - * int64 sensitive_value_frequency_lower_bound = 1; - * @return This builder for chaining. - */ - public Builder clearSensitiveValueFrequencyLowerBound() { - - sensitiveValueFrequencyLowerBound_ = 0L; - onChanged(); - return this; - } - - private long sensitiveValueFrequencyUpperBound_ ; - /** - *
-         * Upper bound on the sensitive value frequencies of the equivalence
-         * classes in this bucket.
-         * 
- * - * int64 sensitive_value_frequency_upper_bound = 2; - * @return The sensitiveValueFrequencyUpperBound. - */ - @java.lang.Override - public long getSensitiveValueFrequencyUpperBound() { - return sensitiveValueFrequencyUpperBound_; - } - /** - *
-         * Upper bound on the sensitive value frequencies of the equivalence
-         * classes in this bucket.
-         * 
- * - * int64 sensitive_value_frequency_upper_bound = 2; - * @param value The sensitiveValueFrequencyUpperBound to set. - * @return This builder for chaining. - */ - public Builder setSensitiveValueFrequencyUpperBound(long value) { - - sensitiveValueFrequencyUpperBound_ = value; - onChanged(); - return this; - } - /** - *
-         * Upper bound on the sensitive value frequencies of the equivalence
-         * classes in this bucket.
-         * 
- * - * int64 sensitive_value_frequency_upper_bound = 2; - * @return This builder for chaining. - */ - public Builder clearSensitiveValueFrequencyUpperBound() { - - sensitiveValueFrequencyUpperBound_ = 0L; - onChanged(); - return this; - } - - private long bucketSize_ ; - /** - *
-         * Total number of equivalence classes in this bucket.
-         * 
- * - * int64 bucket_size = 3; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - /** - *
-         * Total number of equivalence classes in this bucket.
-         * 
- * - * int64 bucket_size = 3; - * @param value The bucketSize to set. - * @return This builder for chaining. - */ - public Builder setBucketSize(long value) { - - bucketSize_ = value; - onChanged(); - return this; - } - /** - *
-         * Total number of equivalence classes in this bucket.
-         * 
- * - * int64 bucket_size = 3; - * @return This builder for chaining. - */ - public Builder clearBucketSize() { - - bucketSize_ = 0L; - onChanged(); - return this; - } - - private java.util.List bucketValues_ = - java.util.Collections.emptyList(); - private void ensureBucketValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(bucketValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder> bucketValuesBuilder_; - - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public java.util.List getBucketValuesList() { - if (bucketValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(bucketValues_); - } else { - return bucketValuesBuilder_.getMessageList(); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public int getBucketValuesCount() { - if (bucketValuesBuilder_ == null) { - return bucketValues_.size(); - } else { - return bucketValuesBuilder_.getCount(); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass getBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); - } else { - return bucketValuesBuilder_.getMessage(index); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.set(index, value); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.set(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public Builder addBucketValues(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(index, value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public Builder addBucketValues( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public Builder addAllBucketValues( - java.lang.Iterable values) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bucketValues_); - onChanged(); - } else { - bucketValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public Builder clearBucketValues() { - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - bucketValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public Builder removeBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.remove(index); - onChanged(); - } else { - bucketValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder getBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder getBucketValuesOrBuilder( - int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); } else { - return bucketValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public java.util.List - getBucketValuesOrBuilderList() { - if (bucketValuesBuilder_ != null) { - return bucketValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bucketValues_); - } - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder addBucketValuesBuilder() { - return getBucketValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.getDefaultInstance()); - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder addBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.getDefaultInstance()); - } - /** - *
-         * Sample of equivalence classes in this bucket. The total number of
-         * classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass bucket_values = 4; - */ - public java.util.List - getBucketValuesBuilderList() { - return getBucketValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder> - getBucketValuesFieldBuilder() { - if (bucketValuesBuilder_ == null) { - bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClassOrBuilder>( - bucketValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - bucketValues_ = null; - } - return bucketValuesBuilder_; - } - - private long bucketValueCount_ ; - /** - *
-         * Total number of distinct equivalence classes in this bucket.
-         * 
- * - * int64 bucket_value_count = 5; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - /** - *
-         * Total number of distinct equivalence classes in this bucket.
-         * 
- * - * int64 bucket_value_count = 5; - * @param value The bucketValueCount to set. - * @return This builder for chaining. - */ - public Builder setBucketValueCount(long value) { - - bucketValueCount_ = value; - onChanged(); - return this; - } - /** - *
-         * Total number of distinct equivalence classes in this bucket.
-         * 
- * - * int64 bucket_value_count = 5; - * @return This builder for chaining. - */ - public Builder clearBucketValueCount() { - - bucketValueCount_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LDiversityHistogramBucket parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LDiversityHistogramBucket(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int SENSITIVE_VALUE_FREQUENCY_HISTOGRAM_BUCKETS_FIELD_NUMBER = 5; - private java.util.List sensitiveValueFrequencyHistogramBuckets_; - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public java.util.List getSensitiveValueFrequencyHistogramBucketsList() { - return sensitiveValueFrequencyHistogramBuckets_; - } - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public java.util.List - getSensitiveValueFrequencyHistogramBucketsOrBuilderList() { - return sensitiveValueFrequencyHistogramBuckets_; - } - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public int getSensitiveValueFrequencyHistogramBucketsCount() { - return sensitiveValueFrequencyHistogramBuckets_.size(); - } - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getSensitiveValueFrequencyHistogramBuckets(int index) { - return sensitiveValueFrequencyHistogramBuckets_.get(index); - } - /** - *
-     * Histogram of l-diversity equivalence class sensitive value frequencies.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder getSensitiveValueFrequencyHistogramBucketsOrBuilder( - int index) { - return sensitiveValueFrequencyHistogramBuckets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < sensitiveValueFrequencyHistogramBuckets_.size(); i++) { - output.writeMessage(5, sensitiveValueFrequencyHistogramBuckets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < sensitiveValueFrequencyHistogramBuckets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, sensitiveValueFrequencyHistogramBuckets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) obj; - - if (!getSensitiveValueFrequencyHistogramBucketsList() - .equals(other.getSensitiveValueFrequencyHistogramBucketsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSensitiveValueFrequencyHistogramBucketsCount() > 0) { - hash = (37 * hash) + SENSITIVE_VALUE_FREQUENCY_HISTOGRAM_BUCKETS_FIELD_NUMBER; - hash = (53 * hash) + getSensitiveValueFrequencyHistogramBucketsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Result of the l-diversity computation.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSensitiveValueFrequencyHistogramBucketsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult(this); - int from_bitField0_ = bitField0_; - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.unmodifiableList(sensitiveValueFrequencyHistogramBuckets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.sensitiveValueFrequencyHistogramBuckets_ = sensitiveValueFrequencyHistogramBuckets_; - } else { - result.sensitiveValueFrequencyHistogramBuckets_ = sensitiveValueFrequencyHistogramBucketsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance()) return this; - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - if (!other.sensitiveValueFrequencyHistogramBuckets_.isEmpty()) { - if (sensitiveValueFrequencyHistogramBuckets_.isEmpty()) { - sensitiveValueFrequencyHistogramBuckets_ = other.sensitiveValueFrequencyHistogramBuckets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); - sensitiveValueFrequencyHistogramBuckets_.addAll(other.sensitiveValueFrequencyHistogramBuckets_); - } - onChanged(); - } - } else { - if (!other.sensitiveValueFrequencyHistogramBuckets_.isEmpty()) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_.isEmpty()) { - sensitiveValueFrequencyHistogramBucketsBuilder_.dispose(); - sensitiveValueFrequencyHistogramBucketsBuilder_ = null; - sensitiveValueFrequencyHistogramBuckets_ = other.sensitiveValueFrequencyHistogramBuckets_; - bitField0_ = (bitField0_ & ~0x00000001); - sensitiveValueFrequencyHistogramBucketsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSensitiveValueFrequencyHistogramBucketsFieldBuilder() : null; - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.addAllMessages(other.sensitiveValueFrequencyHistogramBuckets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List sensitiveValueFrequencyHistogramBuckets_ = - java.util.Collections.emptyList(); - private void ensureSensitiveValueFrequencyHistogramBucketsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - sensitiveValueFrequencyHistogramBuckets_ = new java.util.ArrayList(sensitiveValueFrequencyHistogramBuckets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder> sensitiveValueFrequencyHistogramBucketsBuilder_; - - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public java.util.List getSensitiveValueFrequencyHistogramBucketsList() { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - return java.util.Collections.unmodifiableList(sensitiveValueFrequencyHistogramBuckets_); - } else { - return sensitiveValueFrequencyHistogramBucketsBuilder_.getMessageList(); - } - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public int getSensitiveValueFrequencyHistogramBucketsCount() { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - return sensitiveValueFrequencyHistogramBuckets_.size(); - } else { - return sensitiveValueFrequencyHistogramBucketsBuilder_.getCount(); - } - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket getSensitiveValueFrequencyHistogramBuckets(int index) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - return sensitiveValueFrequencyHistogramBuckets_.get(index); - } else { - return sensitiveValueFrequencyHistogramBucketsBuilder_.getMessage(index); - } - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public Builder setSensitiveValueFrequencyHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket value) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); - sensitiveValueFrequencyHistogramBuckets_.set(index, value); - onChanged(); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public Builder setSensitiveValueFrequencyHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder builderForValue) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); - sensitiveValueFrequencyHistogramBuckets_.set(index, builderForValue.build()); - onChanged(); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public Builder addSensitiveValueFrequencyHistogramBuckets(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket value) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); - sensitiveValueFrequencyHistogramBuckets_.add(value); - onChanged(); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public Builder addSensitiveValueFrequencyHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket value) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); - sensitiveValueFrequencyHistogramBuckets_.add(index, value); - onChanged(); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public Builder addSensitiveValueFrequencyHistogramBuckets( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder builderForValue) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); - sensitiveValueFrequencyHistogramBuckets_.add(builderForValue.build()); - onChanged(); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public Builder addSensitiveValueFrequencyHistogramBuckets( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder builderForValue) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); - sensitiveValueFrequencyHistogramBuckets_.add(index, builderForValue.build()); - onChanged(); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public Builder addAllSensitiveValueFrequencyHistogramBuckets( - java.lang.Iterable values) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, sensitiveValueFrequencyHistogramBuckets_); - onChanged(); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public Builder clearSensitiveValueFrequencyHistogramBuckets() { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - sensitiveValueFrequencyHistogramBuckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.clear(); - } - return this; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public Builder removeSensitiveValueFrequencyHistogramBuckets(int index) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - ensureSensitiveValueFrequencyHistogramBucketsIsMutable(); - sensitiveValueFrequencyHistogramBuckets_.remove(index); - onChanged(); - } else { - sensitiveValueFrequencyHistogramBucketsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder getSensitiveValueFrequencyHistogramBucketsBuilder( - int index) { - return getSensitiveValueFrequencyHistogramBucketsFieldBuilder().getBuilder(index); - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder getSensitiveValueFrequencyHistogramBucketsOrBuilder( - int index) { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - return sensitiveValueFrequencyHistogramBuckets_.get(index); } else { - return sensitiveValueFrequencyHistogramBucketsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public java.util.List - getSensitiveValueFrequencyHistogramBucketsOrBuilderList() { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ != null) { - return sensitiveValueFrequencyHistogramBucketsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(sensitiveValueFrequencyHistogramBuckets_); - } - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder addSensitiveValueFrequencyHistogramBucketsBuilder() { - return getSensitiveValueFrequencyHistogramBucketsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.getDefaultInstance()); - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder addSensitiveValueFrequencyHistogramBucketsBuilder( - int index) { - return getSensitiveValueFrequencyHistogramBucketsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.getDefaultInstance()); - } - /** - *
-       * Histogram of l-diversity equivalence class sensitive value frequencies.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - */ - public java.util.List - getSensitiveValueFrequencyHistogramBucketsBuilderList() { - return getSensitiveValueFrequencyHistogramBucketsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder> - getSensitiveValueFrequencyHistogramBucketsFieldBuilder() { - if (sensitiveValueFrequencyHistogramBucketsBuilder_ == null) { - sensitiveValueFrequencyHistogramBucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucketOrBuilder>( - sensitiveValueFrequencyHistogramBuckets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - sensitiveValueFrequencyHistogramBuckets_ = null; - } - return sensitiveValueFrequencyHistogramBucketsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LDiversityResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LDiversityResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface KMapEstimationResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - java.util.List - getKMapEstimationHistogramList(); - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getKMapEstimationHistogram(int index); - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - int getKMapEstimationHistogramCount(); - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - java.util.List - getKMapEstimationHistogramOrBuilderList(); - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder getKMapEstimationHistogramOrBuilder( - int index); - } - /** - *
-   * Result of the reidentifiability analysis. Note that these results are an
-   * estimation, not exact values.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult} - */ - public static final class KMapEstimationResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) - KMapEstimationResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use KMapEstimationResult.newBuilder() to construct. - private KMapEstimationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KMapEstimationResult() { - kMapEstimationHistogram_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KMapEstimationResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KMapEstimationResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kMapEstimationHistogram_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - kMapEstimationHistogram_.add( - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kMapEstimationHistogram_ = java.util.Collections.unmodifiableList(kMapEstimationHistogram_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder.class); - } - - public interface KMapEstimationQuasiIdValuesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - java.util.List - getQuasiIdsValuesList(); - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index); - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - int getQuasiIdsValuesCount(); - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - java.util.List - getQuasiIdsValuesOrBuilderList(); - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index); - - /** - *
-       * The estimated anonymity for these quasi-identifier values.
-       * 
- * - * int64 estimated_anonymity = 2; - * @return The estimatedAnonymity. - */ - long getEstimatedAnonymity(); - } - /** - *
-     * A tuple of values for the quasi-identifier columns.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues} - */ - public static final class KMapEstimationQuasiIdValues extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) - KMapEstimationQuasiIdValuesOrBuilder { - private static final long serialVersionUID = 0L; - // Use KMapEstimationQuasiIdValues.newBuilder() to construct. - private KMapEstimationQuasiIdValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KMapEstimationQuasiIdValues() { - quasiIdsValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KMapEstimationQuasiIdValues(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KMapEstimationQuasiIdValues( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIdsValues_.add( - input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); - break; - } - case 16: { - - estimatedAnonymity_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder.class); - } - - public static final int QUASI_IDS_VALUES_FIELD_NUMBER = 1; - private java.util.List quasiIdsValues_; - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public java.util.List getQuasiIdsValuesList() { - return quasiIdsValues_; - } - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public java.util.List - getQuasiIdsValuesOrBuilderList() { - return quasiIdsValues_; - } - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public int getQuasiIdsValuesCount() { - return quasiIdsValues_.size(); - } - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { - return quasiIdsValues_.get(index); - } - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index) { - return quasiIdsValues_.get(index); - } - - public static final int ESTIMATED_ANONYMITY_FIELD_NUMBER = 2; - private long estimatedAnonymity_; - /** - *
-       * The estimated anonymity for these quasi-identifier values.
-       * 
- * - * int64 estimated_anonymity = 2; - * @return The estimatedAnonymity. - */ - @java.lang.Override - public long getEstimatedAnonymity() { - return estimatedAnonymity_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIdsValues_.size(); i++) { - output.writeMessage(1, quasiIdsValues_.get(i)); - } - if (estimatedAnonymity_ != 0L) { - output.writeInt64(2, estimatedAnonymity_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIdsValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIdsValues_.get(i)); - } - if (estimatedAnonymity_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, estimatedAnonymity_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) obj; - - if (!getQuasiIdsValuesList() - .equals(other.getQuasiIdsValuesList())) return false; - if (getEstimatedAnonymity() - != other.getEstimatedAnonymity()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getQuasiIdsValuesCount() > 0) { - hash = (37 * hash) + QUASI_IDS_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsValuesList().hashCode(); - } - hash = (37 * hash) + ESTIMATED_ANONYMITY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getEstimatedAnonymity()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * A tuple of values for the quasi-identifier columns.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsValuesBuilder_.clear(); - } - estimatedAnonymity_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues(this); - int from_bitField0_ = bitField0_; - if (quasiIdsValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIdsValues_ = quasiIdsValues_; - } else { - result.quasiIdsValues_ = quasiIdsValuesBuilder_.build(); - } - result.estimatedAnonymity_ = estimatedAnonymity_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.getDefaultInstance()) return this; - if (quasiIdsValuesBuilder_ == null) { - if (!other.quasiIdsValues_.isEmpty()) { - if (quasiIdsValues_.isEmpty()) { - quasiIdsValues_ = other.quasiIdsValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.addAll(other.quasiIdsValues_); - } - onChanged(); - } - } else { - if (!other.quasiIdsValues_.isEmpty()) { - if (quasiIdsValuesBuilder_.isEmpty()) { - quasiIdsValuesBuilder_.dispose(); - quasiIdsValuesBuilder_ = null; - quasiIdsValues_ = other.quasiIdsValues_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsValuesFieldBuilder() : null; - } else { - quasiIdsValuesBuilder_.addAllMessages(other.quasiIdsValues_); - } - } - } - if (other.getEstimatedAnonymity() != 0L) { - setEstimatedAnonymity(other.getEstimatedAnonymity()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List quasiIdsValues_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = new java.util.ArrayList(quasiIdsValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quasiIdsValuesBuilder_; - - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List getQuasiIdsValuesList() { - if (quasiIdsValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIdsValues_); - } else { - return quasiIdsValuesBuilder_.getMessageList(); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public int getQuasiIdsValuesCount() { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.size(); - } else { - return quasiIdsValuesBuilder_.getCount(); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.get(index); - } else { - return quasiIdsValuesBuilder_.getMessage(index); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder setQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.set(index, value); - onChanged(); - } else { - quasiIdsValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder setQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues(com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(value); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(index, value); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addAllQuasiIdsValues( - java.lang.Iterable values) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIdsValues_); - onChanged(); - } else { - quasiIdsValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder clearQuasiIdsValues() { - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder removeQuasiIdsValues(int index) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.remove(index); - onChanged(); - } else { - quasiIdsValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder getQuasiIdsValuesBuilder( - int index) { - return getQuasiIdsValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index) { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.get(index); } else { - return quasiIdsValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List - getQuasiIdsValuesOrBuilderList() { - if (quasiIdsValuesBuilder_ != null) { - return quasiIdsValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIdsValues_); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder() { - return getQuasiIdsValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder( - int index) { - return getQuasiIdsValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List - getQuasiIdsValuesBuilderList() { - return getQuasiIdsValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getQuasiIdsValuesFieldBuilder() { - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - quasiIdsValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIdsValues_ = null; - } - return quasiIdsValuesBuilder_; - } - - private long estimatedAnonymity_ ; - /** - *
-         * The estimated anonymity for these quasi-identifier values.
-         * 
- * - * int64 estimated_anonymity = 2; - * @return The estimatedAnonymity. - */ - @java.lang.Override - public long getEstimatedAnonymity() { - return estimatedAnonymity_; - } - /** - *
-         * The estimated anonymity for these quasi-identifier values.
-         * 
- * - * int64 estimated_anonymity = 2; - * @param value The estimatedAnonymity to set. - * @return This builder for chaining. - */ - public Builder setEstimatedAnonymity(long value) { - - estimatedAnonymity_ = value; - onChanged(); - return this; - } - /** - *
-         * The estimated anonymity for these quasi-identifier values.
-         * 
- * - * int64 estimated_anonymity = 2; - * @return This builder for chaining. - */ - public Builder clearEstimatedAnonymity() { - - estimatedAnonymity_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KMapEstimationQuasiIdValues parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KMapEstimationQuasiIdValues(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface KMapEstimationHistogramBucketOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Always positive.
-       * 
- * - * int64 min_anonymity = 1; - * @return The minAnonymity. - */ - long getMinAnonymity(); - - /** - *
-       * Always greater than or equal to min_anonymity.
-       * 
- * - * int64 max_anonymity = 2; - * @return The maxAnonymity. - */ - long getMaxAnonymity(); - - /** - *
-       * Number of records within these anonymity bounds.
-       * 
- * - * int64 bucket_size = 5; - * @return The bucketSize. - */ - long getBucketSize(); - - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - java.util.List - getBucketValuesList(); - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getBucketValues(int index); - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - int getBucketValuesCount(); - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - java.util.List - getBucketValuesOrBuilderList(); - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( - int index); - - /** - *
-       * Total number of distinct quasi-identifier tuple values in this bucket.
-       * 
- * - * int64 bucket_value_count = 7; - * @return The bucketValueCount. - */ - long getBucketValueCount(); - } - /** - *
-     * A KMapEstimationHistogramBucket message with the following values:
-     *   min_anonymity: 3
-     *   max_anonymity: 5
-     *   frequency: 42
-     * means that there are 42 records whose quasi-identifier values correspond
-     * to 3, 4 or 5 people in the overlying population. An important particular
-     * case is when min_anonymity = max_anonymity = 1: the frequency field then
-     * corresponds to the number of uniquely identifiable records.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket} - */ - public static final class KMapEstimationHistogramBucket extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) - KMapEstimationHistogramBucketOrBuilder { - private static final long serialVersionUID = 0L; - // Use KMapEstimationHistogramBucket.newBuilder() to construct. - private KMapEstimationHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KMapEstimationHistogramBucket() { - bucketValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KMapEstimationHistogramBucket(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KMapEstimationHistogramBucket( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - minAnonymity_ = input.readInt64(); - break; - } - case 16: { - - maxAnonymity_ = input.readInt64(); - break; - } - case 40: { - - bucketSize_ = input.readInt64(); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bucketValues_.add( - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.parser(), extensionRegistry)); - break; - } - case 56: { - - bucketValueCount_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder.class); - } - - public static final int MIN_ANONYMITY_FIELD_NUMBER = 1; - private long minAnonymity_; - /** - *
-       * Always positive.
-       * 
- * - * int64 min_anonymity = 1; - * @return The minAnonymity. - */ - @java.lang.Override - public long getMinAnonymity() { - return minAnonymity_; - } - - public static final int MAX_ANONYMITY_FIELD_NUMBER = 2; - private long maxAnonymity_; - /** - *
-       * Always greater than or equal to min_anonymity.
-       * 
- * - * int64 max_anonymity = 2; - * @return The maxAnonymity. - */ - @java.lang.Override - public long getMaxAnonymity() { - return maxAnonymity_; - } - - public static final int BUCKET_SIZE_FIELD_NUMBER = 5; - private long bucketSize_; - /** - *
-       * Number of records within these anonymity bounds.
-       * 
- * - * int64 bucket_size = 5; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - - public static final int BUCKET_VALUES_FIELD_NUMBER = 6; - private java.util.List bucketValues_; - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public java.util.List getBucketValuesList() { - return bucketValues_; - } - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public java.util.List - getBucketValuesOrBuilderList() { - return bucketValues_; - } - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public int getBucketValuesCount() { - return bucketValues_.size(); - } - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getBucketValues(int index) { - return bucketValues_.get(index); - } - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( - int index) { - return bucketValues_.get(index); - } - - public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 7; - private long bucketValueCount_; - /** - *
-       * Total number of distinct quasi-identifier tuple values in this bucket.
-       * 
- * - * int64 bucket_value_count = 7; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (minAnonymity_ != 0L) { - output.writeInt64(1, minAnonymity_); - } - if (maxAnonymity_ != 0L) { - output.writeInt64(2, maxAnonymity_); - } - if (bucketSize_ != 0L) { - output.writeInt64(5, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - output.writeMessage(6, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - output.writeInt64(7, bucketValueCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (minAnonymity_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, minAnonymity_); - } - if (maxAnonymity_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, maxAnonymity_); - } - if (bucketSize_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(7, bucketValueCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) obj; - - if (getMinAnonymity() - != other.getMinAnonymity()) return false; - if (getMaxAnonymity() - != other.getMaxAnonymity()) return false; - if (getBucketSize() - != other.getBucketSize()) return false; - if (!getBucketValuesList() - .equals(other.getBucketValuesList())) return false; - if (getBucketValueCount() - != other.getBucketValueCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MIN_ANONYMITY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMinAnonymity()); - hash = (37 * hash) + MAX_ANONYMITY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getMaxAnonymity()); - hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketSize()); - if (getBucketValuesCount() > 0) { - hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getBucketValuesList().hashCode(); - } - hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketValueCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * A KMapEstimationHistogramBucket message with the following values:
-       *   min_anonymity: 3
-       *   max_anonymity: 5
-       *   frequency: 42
-       * means that there are 42 records whose quasi-identifier values correspond
-       * to 3, 4 or 5 people in the overlying population. An important particular
-       * case is when min_anonymity = max_anonymity = 1: the frequency field then
-       * corresponds to the number of uniquely identifiable records.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBucketValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - minAnonymity_ = 0L; - - maxAnonymity_ = 0L; - - bucketSize_ = 0L; - - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - bucketValuesBuilder_.clear(); - } - bucketValueCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket(this); - int from_bitField0_ = bitField0_; - result.minAnonymity_ = minAnonymity_; - result.maxAnonymity_ = maxAnonymity_; - result.bucketSize_ = bucketSize_; - if (bucketValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bucketValues_ = bucketValues_; - } else { - result.bucketValues_ = bucketValuesBuilder_.build(); - } - result.bucketValueCount_ = bucketValueCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.getDefaultInstance()) return this; - if (other.getMinAnonymity() != 0L) { - setMinAnonymity(other.getMinAnonymity()); - } - if (other.getMaxAnonymity() != 0L) { - setMaxAnonymity(other.getMaxAnonymity()); - } - if (other.getBucketSize() != 0L) { - setBucketSize(other.getBucketSize()); - } - if (bucketValuesBuilder_ == null) { - if (!other.bucketValues_.isEmpty()) { - if (bucketValues_.isEmpty()) { - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBucketValuesIsMutable(); - bucketValues_.addAll(other.bucketValues_); - } - onChanged(); - } - } else { - if (!other.bucketValues_.isEmpty()) { - if (bucketValuesBuilder_.isEmpty()) { - bucketValuesBuilder_.dispose(); - bucketValuesBuilder_ = null; - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - bucketValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBucketValuesFieldBuilder() : null; - } else { - bucketValuesBuilder_.addAllMessages(other.bucketValues_); - } - } - } - if (other.getBucketValueCount() != 0L) { - setBucketValueCount(other.getBucketValueCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long minAnonymity_ ; - /** - *
-         * Always positive.
-         * 
- * - * int64 min_anonymity = 1; - * @return The minAnonymity. - */ - @java.lang.Override - public long getMinAnonymity() { - return minAnonymity_; - } - /** - *
-         * Always positive.
-         * 
- * - * int64 min_anonymity = 1; - * @param value The minAnonymity to set. - * @return This builder for chaining. - */ - public Builder setMinAnonymity(long value) { - - minAnonymity_ = value; - onChanged(); - return this; - } - /** - *
-         * Always positive.
-         * 
- * - * int64 min_anonymity = 1; - * @return This builder for chaining. - */ - public Builder clearMinAnonymity() { - - minAnonymity_ = 0L; - onChanged(); - return this; - } - - private long maxAnonymity_ ; - /** - *
-         * Always greater than or equal to min_anonymity.
-         * 
- * - * int64 max_anonymity = 2; - * @return The maxAnonymity. - */ - @java.lang.Override - public long getMaxAnonymity() { - return maxAnonymity_; - } - /** - *
-         * Always greater than or equal to min_anonymity.
-         * 
- * - * int64 max_anonymity = 2; - * @param value The maxAnonymity to set. - * @return This builder for chaining. - */ - public Builder setMaxAnonymity(long value) { - - maxAnonymity_ = value; - onChanged(); - return this; - } - /** - *
-         * Always greater than or equal to min_anonymity.
-         * 
- * - * int64 max_anonymity = 2; - * @return This builder for chaining. - */ - public Builder clearMaxAnonymity() { - - maxAnonymity_ = 0L; - onChanged(); - return this; - } - - private long bucketSize_ ; - /** - *
-         * Number of records within these anonymity bounds.
-         * 
- * - * int64 bucket_size = 5; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - /** - *
-         * Number of records within these anonymity bounds.
-         * 
- * - * int64 bucket_size = 5; - * @param value The bucketSize to set. - * @return This builder for chaining. - */ - public Builder setBucketSize(long value) { - - bucketSize_ = value; - onChanged(); - return this; - } - /** - *
-         * Number of records within these anonymity bounds.
-         * 
- * - * int64 bucket_size = 5; - * @return This builder for chaining. - */ - public Builder clearBucketSize() { - - bucketSize_ = 0L; - onChanged(); - return this; - } - - private java.util.List bucketValues_ = - java.util.Collections.emptyList(); - private void ensureBucketValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(bucketValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder> bucketValuesBuilder_; - - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public java.util.List getBucketValuesList() { - if (bucketValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(bucketValues_); - } else { - return bucketValuesBuilder_.getMessageList(); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public int getBucketValuesCount() { - if (bucketValuesBuilder_ == null) { - return bucketValues_.size(); - } else { - return bucketValuesBuilder_.getCount(); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues getBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); - } else { - return bucketValuesBuilder_.getMessage(index); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.set(index, value); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.set(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addBucketValues(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(index, value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addBucketValues( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addAllBucketValues( - java.lang.Iterable values) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bucketValues_); - onChanged(); - } else { - bucketValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public Builder clearBucketValues() { - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - bucketValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public Builder removeBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.remove(index); - onChanged(); - } else { - bucketValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder getBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( - int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); } else { - return bucketValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public java.util.List - getBucketValuesOrBuilderList() { - if (bucketValuesBuilder_ != null) { - return bucketValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bucketValues_); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder addBucketValuesBuilder() { - return getBucketValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.getDefaultInstance()); - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder addBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.getDefaultInstance()); - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues bucket_values = 6; - */ - public java.util.List - getBucketValuesBuilderList() { - return getBucketValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder> - getBucketValuesFieldBuilder() { - if (bucketValuesBuilder_ == null) { - bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValuesOrBuilder>( - bucketValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - bucketValues_ = null; - } - return bucketValuesBuilder_; - } - - private long bucketValueCount_ ; - /** - *
-         * Total number of distinct quasi-identifier tuple values in this bucket.
-         * 
- * - * int64 bucket_value_count = 7; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - /** - *
-         * Total number of distinct quasi-identifier tuple values in this bucket.
-         * 
- * - * int64 bucket_value_count = 7; - * @param value The bucketValueCount to set. - * @return This builder for chaining. - */ - public Builder setBucketValueCount(long value) { - - bucketValueCount_ = value; - onChanged(); - return this; - } - /** - *
-         * Total number of distinct quasi-identifier tuple values in this bucket.
-         * 
- * - * int64 bucket_value_count = 7; - * @return This builder for chaining. - */ - public Builder clearBucketValueCount() { - - bucketValueCount_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KMapEstimationHistogramBucket parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KMapEstimationHistogramBucket(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int K_MAP_ESTIMATION_HISTOGRAM_FIELD_NUMBER = 1; - private java.util.List kMapEstimationHistogram_; - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - @java.lang.Override - public java.util.List getKMapEstimationHistogramList() { - return kMapEstimationHistogram_; - } - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - @java.lang.Override - public java.util.List - getKMapEstimationHistogramOrBuilderList() { - return kMapEstimationHistogram_; - } - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - @java.lang.Override - public int getKMapEstimationHistogramCount() { - return kMapEstimationHistogram_.size(); - } - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getKMapEstimationHistogram(int index) { - return kMapEstimationHistogram_.get(index); - } - /** - *
-     * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-     * doesn't correspond to any such interval, the associated frequency is
-     * zero. For example, the following records:
-     *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-     *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-     *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-     * mean that there are no record with an estimated anonymity of 4, 5, or
-     * larger than 10.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder getKMapEstimationHistogramOrBuilder( - int index) { - return kMapEstimationHistogram_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < kMapEstimationHistogram_.size(); i++) { - output.writeMessage(1, kMapEstimationHistogram_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < kMapEstimationHistogram_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, kMapEstimationHistogram_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) obj; - - if (!getKMapEstimationHistogramList() - .equals(other.getKMapEstimationHistogramList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getKMapEstimationHistogramCount() > 0) { - hash = (37 * hash) + K_MAP_ESTIMATION_HISTOGRAM_FIELD_NUMBER; - hash = (53 * hash) + getKMapEstimationHistogramList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Result of the reidentifiability analysis. Note that these results are an
-     * estimation, not exact values.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getKMapEstimationHistogramFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (kMapEstimationHistogramBuilder_ == null) { - kMapEstimationHistogram_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - kMapEstimationHistogramBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult(this); - int from_bitField0_ = bitField0_; - if (kMapEstimationHistogramBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - kMapEstimationHistogram_ = java.util.Collections.unmodifiableList(kMapEstimationHistogram_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kMapEstimationHistogram_ = kMapEstimationHistogram_; - } else { - result.kMapEstimationHistogram_ = kMapEstimationHistogramBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance()) return this; - if (kMapEstimationHistogramBuilder_ == null) { - if (!other.kMapEstimationHistogram_.isEmpty()) { - if (kMapEstimationHistogram_.isEmpty()) { - kMapEstimationHistogram_ = other.kMapEstimationHistogram_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureKMapEstimationHistogramIsMutable(); - kMapEstimationHistogram_.addAll(other.kMapEstimationHistogram_); - } - onChanged(); - } - } else { - if (!other.kMapEstimationHistogram_.isEmpty()) { - if (kMapEstimationHistogramBuilder_.isEmpty()) { - kMapEstimationHistogramBuilder_.dispose(); - kMapEstimationHistogramBuilder_ = null; - kMapEstimationHistogram_ = other.kMapEstimationHistogram_; - bitField0_ = (bitField0_ & ~0x00000001); - kMapEstimationHistogramBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getKMapEstimationHistogramFieldBuilder() : null; - } else { - kMapEstimationHistogramBuilder_.addAllMessages(other.kMapEstimationHistogram_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List kMapEstimationHistogram_ = - java.util.Collections.emptyList(); - private void ensureKMapEstimationHistogramIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - kMapEstimationHistogram_ = new java.util.ArrayList(kMapEstimationHistogram_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder> kMapEstimationHistogramBuilder_; - - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public java.util.List getKMapEstimationHistogramList() { - if (kMapEstimationHistogramBuilder_ == null) { - return java.util.Collections.unmodifiableList(kMapEstimationHistogram_); - } else { - return kMapEstimationHistogramBuilder_.getMessageList(); - } - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public int getKMapEstimationHistogramCount() { - if (kMapEstimationHistogramBuilder_ == null) { - return kMapEstimationHistogram_.size(); - } else { - return kMapEstimationHistogramBuilder_.getCount(); - } - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket getKMapEstimationHistogram(int index) { - if (kMapEstimationHistogramBuilder_ == null) { - return kMapEstimationHistogram_.get(index); - } else { - return kMapEstimationHistogramBuilder_.getMessage(index); - } - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public Builder setKMapEstimationHistogram( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket value) { - if (kMapEstimationHistogramBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKMapEstimationHistogramIsMutable(); - kMapEstimationHistogram_.set(index, value); - onChanged(); - } else { - kMapEstimationHistogramBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public Builder setKMapEstimationHistogram( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder builderForValue) { - if (kMapEstimationHistogramBuilder_ == null) { - ensureKMapEstimationHistogramIsMutable(); - kMapEstimationHistogram_.set(index, builderForValue.build()); - onChanged(); - } else { - kMapEstimationHistogramBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public Builder addKMapEstimationHistogram(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket value) { - if (kMapEstimationHistogramBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKMapEstimationHistogramIsMutable(); - kMapEstimationHistogram_.add(value); - onChanged(); - } else { - kMapEstimationHistogramBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public Builder addKMapEstimationHistogram( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket value) { - if (kMapEstimationHistogramBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureKMapEstimationHistogramIsMutable(); - kMapEstimationHistogram_.add(index, value); - onChanged(); - } else { - kMapEstimationHistogramBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public Builder addKMapEstimationHistogram( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder builderForValue) { - if (kMapEstimationHistogramBuilder_ == null) { - ensureKMapEstimationHistogramIsMutable(); - kMapEstimationHistogram_.add(builderForValue.build()); - onChanged(); - } else { - kMapEstimationHistogramBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public Builder addKMapEstimationHistogram( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder builderForValue) { - if (kMapEstimationHistogramBuilder_ == null) { - ensureKMapEstimationHistogramIsMutable(); - kMapEstimationHistogram_.add(index, builderForValue.build()); - onChanged(); - } else { - kMapEstimationHistogramBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public Builder addAllKMapEstimationHistogram( - java.lang.Iterable values) { - if (kMapEstimationHistogramBuilder_ == null) { - ensureKMapEstimationHistogramIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, kMapEstimationHistogram_); - onChanged(); - } else { - kMapEstimationHistogramBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public Builder clearKMapEstimationHistogram() { - if (kMapEstimationHistogramBuilder_ == null) { - kMapEstimationHistogram_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - kMapEstimationHistogramBuilder_.clear(); - } - return this; - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public Builder removeKMapEstimationHistogram(int index) { - if (kMapEstimationHistogramBuilder_ == null) { - ensureKMapEstimationHistogramIsMutable(); - kMapEstimationHistogram_.remove(index); - onChanged(); - } else { - kMapEstimationHistogramBuilder_.remove(index); - } - return this; - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder getKMapEstimationHistogramBuilder( - int index) { - return getKMapEstimationHistogramFieldBuilder().getBuilder(index); - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder getKMapEstimationHistogramOrBuilder( - int index) { - if (kMapEstimationHistogramBuilder_ == null) { - return kMapEstimationHistogram_.get(index); } else { - return kMapEstimationHistogramBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public java.util.List - getKMapEstimationHistogramOrBuilderList() { - if (kMapEstimationHistogramBuilder_ != null) { - return kMapEstimationHistogramBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(kMapEstimationHistogram_); - } - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder addKMapEstimationHistogramBuilder() { - return getKMapEstimationHistogramFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.getDefaultInstance()); - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder addKMapEstimationHistogramBuilder( - int index) { - return getKMapEstimationHistogramFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.getDefaultInstance()); - } - /** - *
-       * The intervals [min_anonymity, max_anonymity] do not overlap. If a value
-       * doesn't correspond to any such interval, the associated frequency is
-       * zero. For example, the following records:
-       *   {min_anonymity: 1, max_anonymity: 1, frequency: 17}
-       *   {min_anonymity: 2, max_anonymity: 3, frequency: 42}
-       *   {min_anonymity: 5, max_anonymity: 10, frequency: 99}
-       * mean that there are no record with an estimated anonymity of 4, 5, or
-       * larger than 10.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - */ - public java.util.List - getKMapEstimationHistogramBuilderList() { - return getKMapEstimationHistogramFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder> - getKMapEstimationHistogramFieldBuilder() { - if (kMapEstimationHistogramBuilder_ == null) { - kMapEstimationHistogramBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucketOrBuilder>( - kMapEstimationHistogram_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - kMapEstimationHistogram_ = null; - } - return kMapEstimationHistogramBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KMapEstimationResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KMapEstimationResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DeltaPresenceEstimationResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - java.util.List - getDeltaPresenceEstimationHistogramList(); - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDeltaPresenceEstimationHistogram(int index); - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - int getDeltaPresenceEstimationHistogramCount(); - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - java.util.List - getDeltaPresenceEstimationHistogramOrBuilderList(); - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder getDeltaPresenceEstimationHistogramOrBuilder( - int index); - } - /** - *
-   * Result of the δ-presence computation. Note that these results are an
-   * estimation, not exact values.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} - */ - public static final class DeltaPresenceEstimationResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) - DeltaPresenceEstimationResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeltaPresenceEstimationResult.newBuilder() to construct. - private DeltaPresenceEstimationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeltaPresenceEstimationResult() { - deltaPresenceEstimationHistogram_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeltaPresenceEstimationResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeltaPresenceEstimationResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deltaPresenceEstimationHistogram_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deltaPresenceEstimationHistogram_.add( - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deltaPresenceEstimationHistogram_ = java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder.class); - } - - public interface DeltaPresenceEstimationQuasiIdValuesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - java.util.List - getQuasiIdsValuesList(); - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index); - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - int getQuasiIdsValuesCount(); - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - java.util.List - getQuasiIdsValuesOrBuilderList(); - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index); - - /** - *
-       * The estimated probability that a given individual sharing these
-       * quasi-identifier values is in the dataset. This value, typically
-       * called δ, is the ratio between the number of records in the dataset
-       * with these quasi-identifier values, and the total number of individuals
-       * (inside *and* outside the dataset) with these quasi-identifier values.
-       * For example, if there are 15 individuals in the dataset who share the
-       * same quasi-identifier values, and an estimated 100 people in the entire
-       * population with these values, then δ is 0.15.
-       * 
- * - * double estimated_probability = 2; - * @return The estimatedProbability. - */ - double getEstimatedProbability(); - } - /** - *
-     * A tuple of values for the quasi-identifier columns.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} - */ - public static final class DeltaPresenceEstimationQuasiIdValues extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) - DeltaPresenceEstimationQuasiIdValuesOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeltaPresenceEstimationQuasiIdValues.newBuilder() to construct. - private DeltaPresenceEstimationQuasiIdValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeltaPresenceEstimationQuasiIdValues() { - quasiIdsValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeltaPresenceEstimationQuasiIdValues(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeltaPresenceEstimationQuasiIdValues( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIdsValues_.add( - input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); - break; - } - case 17: { - - estimatedProbability_ = input.readDouble(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder.class); - } - - public static final int QUASI_IDS_VALUES_FIELD_NUMBER = 1; - private java.util.List quasiIdsValues_; - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public java.util.List getQuasiIdsValuesList() { - return quasiIdsValues_; - } - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public java.util.List - getQuasiIdsValuesOrBuilderList() { - return quasiIdsValues_; - } - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public int getQuasiIdsValuesCount() { - return quasiIdsValues_.size(); - } - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { - return quasiIdsValues_.get(index); - } - /** - *
-       * The quasi-identifier values.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index) { - return quasiIdsValues_.get(index); - } - - public static final int ESTIMATED_PROBABILITY_FIELD_NUMBER = 2; - private double estimatedProbability_; - /** - *
-       * The estimated probability that a given individual sharing these
-       * quasi-identifier values is in the dataset. This value, typically
-       * called δ, is the ratio between the number of records in the dataset
-       * with these quasi-identifier values, and the total number of individuals
-       * (inside *and* outside the dataset) with these quasi-identifier values.
-       * For example, if there are 15 individuals in the dataset who share the
-       * same quasi-identifier values, and an estimated 100 people in the entire
-       * population with these values, then δ is 0.15.
-       * 
- * - * double estimated_probability = 2; - * @return The estimatedProbability. - */ - @java.lang.Override - public double getEstimatedProbability() { - return estimatedProbability_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIdsValues_.size(); i++) { - output.writeMessage(1, quasiIdsValues_.get(i)); - } - if (java.lang.Double.doubleToRawLongBits(estimatedProbability_) != 0) { - output.writeDouble(2, estimatedProbability_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIdsValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIdsValues_.get(i)); - } - if (java.lang.Double.doubleToRawLongBits(estimatedProbability_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, estimatedProbability_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) obj; - - if (!getQuasiIdsValuesList() - .equals(other.getQuasiIdsValuesList())) return false; - if (java.lang.Double.doubleToLongBits(getEstimatedProbability()) - != java.lang.Double.doubleToLongBits( - other.getEstimatedProbability())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getQuasiIdsValuesCount() > 0) { - hash = (37 * hash) + QUASI_IDS_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsValuesList().hashCode(); - } - hash = (37 * hash) + ESTIMATED_PROBABILITY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getEstimatedProbability())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * A tuple of values for the quasi-identifier columns.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsValuesBuilder_.clear(); - } - estimatedProbability_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues(this); - int from_bitField0_ = bitField0_; - if (quasiIdsValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIdsValues_ = quasiIdsValues_; - } else { - result.quasiIdsValues_ = quasiIdsValuesBuilder_.build(); - } - result.estimatedProbability_ = estimatedProbability_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance()) return this; - if (quasiIdsValuesBuilder_ == null) { - if (!other.quasiIdsValues_.isEmpty()) { - if (quasiIdsValues_.isEmpty()) { - quasiIdsValues_ = other.quasiIdsValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.addAll(other.quasiIdsValues_); - } - onChanged(); - } - } else { - if (!other.quasiIdsValues_.isEmpty()) { - if (quasiIdsValuesBuilder_.isEmpty()) { - quasiIdsValuesBuilder_.dispose(); - quasiIdsValuesBuilder_ = null; - quasiIdsValues_ = other.quasiIdsValues_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsValuesFieldBuilder() : null; - } else { - quasiIdsValuesBuilder_.addAllMessages(other.quasiIdsValues_); - } - } - } - if (other.getEstimatedProbability() != 0D) { - setEstimatedProbability(other.getEstimatedProbability()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List quasiIdsValues_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIdsValues_ = new java.util.ArrayList(quasiIdsValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quasiIdsValuesBuilder_; - - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List getQuasiIdsValuesList() { - if (quasiIdsValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIdsValues_); - } else { - return quasiIdsValuesBuilder_.getMessageList(); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public int getQuasiIdsValuesCount() { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.size(); - } else { - return quasiIdsValuesBuilder_.getCount(); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.get(index); - } else { - return quasiIdsValuesBuilder_.getMessage(index); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder setQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.set(index, value); - onChanged(); - } else { - quasiIdsValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder setQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues(com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(value); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (quasiIdsValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(index, value); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addQuasiIdsValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder addAllQuasiIdsValues( - java.lang.Iterable values) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIdsValues_); - onChanged(); - } else { - quasiIdsValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder clearQuasiIdsValues() { - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public Builder removeQuasiIdsValues(int index) { - if (quasiIdsValuesBuilder_ == null) { - ensureQuasiIdsValuesIsMutable(); - quasiIdsValues_.remove(index); - onChanged(); - } else { - quasiIdsValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder getQuasiIdsValuesBuilder( - int index) { - return getQuasiIdsValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( - int index) { - if (quasiIdsValuesBuilder_ == null) { - return quasiIdsValues_.get(index); } else { - return quasiIdsValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List - getQuasiIdsValuesOrBuilderList() { - if (quasiIdsValuesBuilder_ != null) { - return quasiIdsValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIdsValues_); - } - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder() { - return getQuasiIdsValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder( - int index) { - return getQuasiIdsValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-         * The quasi-identifier values.
-         * 
- * - * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; - */ - public java.util.List - getQuasiIdsValuesBuilderList() { - return getQuasiIdsValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getQuasiIdsValuesFieldBuilder() { - if (quasiIdsValuesBuilder_ == null) { - quasiIdsValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - quasiIdsValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIdsValues_ = null; - } - return quasiIdsValuesBuilder_; - } - - private double estimatedProbability_ ; - /** - *
-         * The estimated probability that a given individual sharing these
-         * quasi-identifier values is in the dataset. This value, typically
-         * called δ, is the ratio between the number of records in the dataset
-         * with these quasi-identifier values, and the total number of individuals
-         * (inside *and* outside the dataset) with these quasi-identifier values.
-         * For example, if there are 15 individuals in the dataset who share the
-         * same quasi-identifier values, and an estimated 100 people in the entire
-         * population with these values, then δ is 0.15.
-         * 
- * - * double estimated_probability = 2; - * @return The estimatedProbability. - */ - @java.lang.Override - public double getEstimatedProbability() { - return estimatedProbability_; - } - /** - *
-         * The estimated probability that a given individual sharing these
-         * quasi-identifier values is in the dataset. This value, typically
-         * called δ, is the ratio between the number of records in the dataset
-         * with these quasi-identifier values, and the total number of individuals
-         * (inside *and* outside the dataset) with these quasi-identifier values.
-         * For example, if there are 15 individuals in the dataset who share the
-         * same quasi-identifier values, and an estimated 100 people in the entire
-         * population with these values, then δ is 0.15.
-         * 
- * - * double estimated_probability = 2; - * @param value The estimatedProbability to set. - * @return This builder for chaining. - */ - public Builder setEstimatedProbability(double value) { - - estimatedProbability_ = value; - onChanged(); - return this; - } - /** - *
-         * The estimated probability that a given individual sharing these
-         * quasi-identifier values is in the dataset. This value, typically
-         * called δ, is the ratio between the number of records in the dataset
-         * with these quasi-identifier values, and the total number of individuals
-         * (inside *and* outside the dataset) with these quasi-identifier values.
-         * For example, if there are 15 individuals in the dataset who share the
-         * same quasi-identifier values, and an estimated 100 people in the entire
-         * population with these values, then δ is 0.15.
-         * 
- * - * double estimated_probability = 2; - * @return This builder for chaining. - */ - public Builder clearEstimatedProbability() { - - estimatedProbability_ = 0D; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeltaPresenceEstimationQuasiIdValues parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeltaPresenceEstimationQuasiIdValues(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DeltaPresenceEstimationHistogramBucketOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Between 0 and 1.
-       * 
- * - * double min_probability = 1; - * @return The minProbability. - */ - double getMinProbability(); - - /** - *
-       * Always greater than or equal to min_probability.
-       * 
- * - * double max_probability = 2; - * @return The maxProbability. - */ - double getMaxProbability(); - - /** - *
-       * Number of records within these probability bounds.
-       * 
- * - * int64 bucket_size = 5; - * @return The bucketSize. - */ - long getBucketSize(); - - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - java.util.List - getBucketValuesList(); - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getBucketValues(int index); - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - int getBucketValuesCount(); - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - java.util.List - getBucketValuesOrBuilderList(); - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( - int index); - - /** - *
-       * Total number of distinct quasi-identifier tuple values in this bucket.
-       * 
- * - * int64 bucket_value_count = 7; - * @return The bucketValueCount. - */ - long getBucketValueCount(); - } - /** - *
-     * A DeltaPresenceEstimationHistogramBucket message with the following
-     * values:
-     *   min_probability: 0.1
-     *   max_probability: 0.2
-     *   frequency: 42
-     * means that there are 42 records for which δ is in [0.1, 0.2). An
-     * important particular case is when min_probability = max_probability = 1:
-     * then, every individual who shares this quasi-identifier combination is in
-     * the dataset.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} - */ - public static final class DeltaPresenceEstimationHistogramBucket extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) - DeltaPresenceEstimationHistogramBucketOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeltaPresenceEstimationHistogramBucket.newBuilder() to construct. - private DeltaPresenceEstimationHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeltaPresenceEstimationHistogramBucket() { - bucketValues_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeltaPresenceEstimationHistogramBucket(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeltaPresenceEstimationHistogramBucket( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: { - - minProbability_ = input.readDouble(); - break; - } - case 17: { - - maxProbability_ = input.readDouble(); - break; - } - case 40: { - - bucketSize_ = input.readInt64(); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bucketValues_.add( - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.parser(), extensionRegistry)); - break; - } - case 56: { - - bucketValueCount_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder.class); - } - - public static final int MIN_PROBABILITY_FIELD_NUMBER = 1; - private double minProbability_; - /** - *
-       * Between 0 and 1.
-       * 
- * - * double min_probability = 1; - * @return The minProbability. - */ - @java.lang.Override - public double getMinProbability() { - return minProbability_; - } - - public static final int MAX_PROBABILITY_FIELD_NUMBER = 2; - private double maxProbability_; - /** - *
-       * Always greater than or equal to min_probability.
-       * 
- * - * double max_probability = 2; - * @return The maxProbability. - */ - @java.lang.Override - public double getMaxProbability() { - return maxProbability_; - } - - public static final int BUCKET_SIZE_FIELD_NUMBER = 5; - private long bucketSize_; - /** - *
-       * Number of records within these probability bounds.
-       * 
- * - * int64 bucket_size = 5; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - - public static final int BUCKET_VALUES_FIELD_NUMBER = 6; - private java.util.List bucketValues_; - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public java.util.List getBucketValuesList() { - return bucketValues_; - } - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public java.util.List - getBucketValuesOrBuilderList() { - return bucketValues_; - } - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public int getBucketValuesCount() { - return bucketValues_.size(); - } - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getBucketValues(int index) { - return bucketValues_.get(index); - } - /** - *
-       * Sample of quasi-identifier tuple values in this bucket. The total
-       * number of classes returned per bucket is capped at 20.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( - int index) { - return bucketValues_.get(index); - } - - public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 7; - private long bucketValueCount_; - /** - *
-       * Total number of distinct quasi-identifier tuple values in this bucket.
-       * 
- * - * int64 bucket_value_count = 7; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Double.doubleToRawLongBits(minProbability_) != 0) { - output.writeDouble(1, minProbability_); - } - if (java.lang.Double.doubleToRawLongBits(maxProbability_) != 0) { - output.writeDouble(2, maxProbability_); - } - if (bucketSize_ != 0L) { - output.writeInt64(5, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - output.writeMessage(6, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - output.writeInt64(7, bucketValueCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Double.doubleToRawLongBits(minProbability_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, minProbability_); - } - if (java.lang.Double.doubleToRawLongBits(maxProbability_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, maxProbability_); - } - if (bucketSize_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, bucketSize_); - } - for (int i = 0; i < bucketValues_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, bucketValues_.get(i)); - } - if (bucketValueCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(7, bucketValueCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) obj; - - if (java.lang.Double.doubleToLongBits(getMinProbability()) - != java.lang.Double.doubleToLongBits( - other.getMinProbability())) return false; - if (java.lang.Double.doubleToLongBits(getMaxProbability()) - != java.lang.Double.doubleToLongBits( - other.getMaxProbability())) return false; - if (getBucketSize() - != other.getBucketSize()) return false; - if (!getBucketValuesList() - .equals(other.getBucketValuesList())) return false; - if (getBucketValueCount() - != other.getBucketValueCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MIN_PROBABILITY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMinProbability())); - hash = (37 * hash) + MAX_PROBABILITY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMaxProbability())); - hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketSize()); - if (getBucketValuesCount() > 0) { - hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getBucketValuesList().hashCode(); - } - hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBucketValueCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * A DeltaPresenceEstimationHistogramBucket message with the following
-       * values:
-       *   min_probability: 0.1
-       *   max_probability: 0.2
-       *   frequency: 42
-       * means that there are 42 records for which δ is in [0.1, 0.2). An
-       * important particular case is when min_probability = max_probability = 1:
-       * then, every individual who shares this quasi-identifier combination is in
-       * the dataset.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBucketValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - minProbability_ = 0D; - - maxProbability_ = 0D; - - bucketSize_ = 0L; - - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - bucketValuesBuilder_.clear(); - } - bucketValueCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket(this); - int from_bitField0_ = bitField0_; - result.minProbability_ = minProbability_; - result.maxProbability_ = maxProbability_; - result.bucketSize_ = bucketSize_; - if (bucketValuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bucketValues_ = bucketValues_; - } else { - result.bucketValues_ = bucketValuesBuilder_.build(); - } - result.bucketValueCount_ = bucketValueCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance()) return this; - if (other.getMinProbability() != 0D) { - setMinProbability(other.getMinProbability()); - } - if (other.getMaxProbability() != 0D) { - setMaxProbability(other.getMaxProbability()); - } - if (other.getBucketSize() != 0L) { - setBucketSize(other.getBucketSize()); - } - if (bucketValuesBuilder_ == null) { - if (!other.bucketValues_.isEmpty()) { - if (bucketValues_.isEmpty()) { - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBucketValuesIsMutable(); - bucketValues_.addAll(other.bucketValues_); - } - onChanged(); - } - } else { - if (!other.bucketValues_.isEmpty()) { - if (bucketValuesBuilder_.isEmpty()) { - bucketValuesBuilder_.dispose(); - bucketValuesBuilder_ = null; - bucketValues_ = other.bucketValues_; - bitField0_ = (bitField0_ & ~0x00000001); - bucketValuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBucketValuesFieldBuilder() : null; - } else { - bucketValuesBuilder_.addAllMessages(other.bucketValues_); - } - } - } - if (other.getBucketValueCount() != 0L) { - setBucketValueCount(other.getBucketValueCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private double minProbability_ ; - /** - *
-         * Between 0 and 1.
-         * 
- * - * double min_probability = 1; - * @return The minProbability. - */ - @java.lang.Override - public double getMinProbability() { - return minProbability_; - } - /** - *
-         * Between 0 and 1.
-         * 
- * - * double min_probability = 1; - * @param value The minProbability to set. - * @return This builder for chaining. - */ - public Builder setMinProbability(double value) { - - minProbability_ = value; - onChanged(); - return this; - } - /** - *
-         * Between 0 and 1.
-         * 
- * - * double min_probability = 1; - * @return This builder for chaining. - */ - public Builder clearMinProbability() { - - minProbability_ = 0D; - onChanged(); - return this; - } - - private double maxProbability_ ; - /** - *
-         * Always greater than or equal to min_probability.
-         * 
- * - * double max_probability = 2; - * @return The maxProbability. - */ - @java.lang.Override - public double getMaxProbability() { - return maxProbability_; - } - /** - *
-         * Always greater than or equal to min_probability.
-         * 
- * - * double max_probability = 2; - * @param value The maxProbability to set. - * @return This builder for chaining. - */ - public Builder setMaxProbability(double value) { - - maxProbability_ = value; - onChanged(); - return this; - } - /** - *
-         * Always greater than or equal to min_probability.
-         * 
- * - * double max_probability = 2; - * @return This builder for chaining. - */ - public Builder clearMaxProbability() { - - maxProbability_ = 0D; - onChanged(); - return this; - } - - private long bucketSize_ ; - /** - *
-         * Number of records within these probability bounds.
-         * 
- * - * int64 bucket_size = 5; - * @return The bucketSize. - */ - @java.lang.Override - public long getBucketSize() { - return bucketSize_; - } - /** - *
-         * Number of records within these probability bounds.
-         * 
- * - * int64 bucket_size = 5; - * @param value The bucketSize to set. - * @return This builder for chaining. - */ - public Builder setBucketSize(long value) { - - bucketSize_ = value; - onChanged(); - return this; - } - /** - *
-         * Number of records within these probability bounds.
-         * 
- * - * int64 bucket_size = 5; - * @return This builder for chaining. - */ - public Builder clearBucketSize() { - - bucketSize_ = 0L; - onChanged(); - return this; - } - - private java.util.List bucketValues_ = - java.util.Collections.emptyList(); - private void ensureBucketValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - bucketValues_ = new java.util.ArrayList(bucketValues_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder> bucketValuesBuilder_; - - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public java.util.List getBucketValuesList() { - if (bucketValuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(bucketValues_); - } else { - return bucketValuesBuilder_.getMessageList(); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public int getBucketValuesCount() { - if (bucketValuesBuilder_ == null) { - return bucketValues_.size(); - } else { - return bucketValuesBuilder_.getCount(); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); - } else { - return bucketValuesBuilder_.getMessage(index); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.set(index, value); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public Builder setBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.set(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addBucketValues(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues value) { - if (bucketValuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketValuesIsMutable(); - bucketValues_.add(index, value); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addBucketValues( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addBucketValues( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder builderForValue) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.add(index, builderForValue.build()); - onChanged(); - } else { - bucketValuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public Builder addAllBucketValues( - java.lang.Iterable values) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bucketValues_); - onChanged(); - } else { - bucketValuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public Builder clearBucketValues() { - if (bucketValuesBuilder_ == null) { - bucketValues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - bucketValuesBuilder_.clear(); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public Builder removeBucketValues(int index) { - if (bucketValuesBuilder_ == null) { - ensureBucketValuesIsMutable(); - bucketValues_.remove(index); - onChanged(); - } else { - bucketValuesBuilder_.remove(index); - } - return this; - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder getBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().getBuilder(index); - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( - int index) { - if (bucketValuesBuilder_ == null) { - return bucketValues_.get(index); } else { - return bucketValuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public java.util.List - getBucketValuesOrBuilderList() { - if (bucketValuesBuilder_ != null) { - return bucketValuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(bucketValues_); - } - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder addBucketValuesBuilder() { - return getBucketValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance()); - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder addBucketValuesBuilder( - int index) { - return getBucketValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance()); - } - /** - *
-         * Sample of quasi-identifier tuple values in this bucket. The total
-         * number of classes returned per bucket is capped at 20.
-         * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - */ - public java.util.List - getBucketValuesBuilderList() { - return getBucketValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder> - getBucketValuesFieldBuilder() { - if (bucketValuesBuilder_ == null) { - bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder>( - bucketValues_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - bucketValues_ = null; - } - return bucketValuesBuilder_; - } - - private long bucketValueCount_ ; - /** - *
-         * Total number of distinct quasi-identifier tuple values in this bucket.
-         * 
- * - * int64 bucket_value_count = 7; - * @return The bucketValueCount. - */ - @java.lang.Override - public long getBucketValueCount() { - return bucketValueCount_; - } - /** - *
-         * Total number of distinct quasi-identifier tuple values in this bucket.
-         * 
- * - * int64 bucket_value_count = 7; - * @param value The bucketValueCount to set. - * @return This builder for chaining. - */ - public Builder setBucketValueCount(long value) { - - bucketValueCount_ = value; - onChanged(); - return this; - } - /** - *
-         * Total number of distinct quasi-identifier tuple values in this bucket.
-         * 
- * - * int64 bucket_value_count = 7; - * @return This builder for chaining. - */ - public Builder clearBucketValueCount() { - - bucketValueCount_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeltaPresenceEstimationHistogramBucket parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeltaPresenceEstimationHistogramBucket(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int DELTA_PRESENCE_ESTIMATION_HISTOGRAM_FIELD_NUMBER = 1; - private java.util.List deltaPresenceEstimationHistogram_; - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - @java.lang.Override - public java.util.List getDeltaPresenceEstimationHistogramList() { - return deltaPresenceEstimationHistogram_; - } - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - @java.lang.Override - public java.util.List - getDeltaPresenceEstimationHistogramOrBuilderList() { - return deltaPresenceEstimationHistogram_; - } - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - @java.lang.Override - public int getDeltaPresenceEstimationHistogramCount() { - return deltaPresenceEstimationHistogram_.size(); - } - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDeltaPresenceEstimationHistogram(int index) { - return deltaPresenceEstimationHistogram_.get(index); - } - /** - *
-     * The intervals [min_probability, max_probability) do not overlap. If a
-     * value doesn't correspond to any such interval, the associated frequency
-     * is zero. For example, the following records:
-     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-     * mean that there are no record with an estimated probability in [0.1, 0.2)
-     * nor larger or equal to 0.4.
-     * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder getDeltaPresenceEstimationHistogramOrBuilder( - int index) { - return deltaPresenceEstimationHistogram_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < deltaPresenceEstimationHistogram_.size(); i++) { - output.writeMessage(1, deltaPresenceEstimationHistogram_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < deltaPresenceEstimationHistogram_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, deltaPresenceEstimationHistogram_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) obj; - - if (!getDeltaPresenceEstimationHistogramList() - .equals(other.getDeltaPresenceEstimationHistogramList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDeltaPresenceEstimationHistogramCount() > 0) { - hash = (37 * hash) + DELTA_PRESENCE_ESTIMATION_HISTOGRAM_FIELD_NUMBER; - hash = (53 * hash) + getDeltaPresenceEstimationHistogramList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Result of the δ-presence computation. Note that these results are an
-     * estimation, not exact values.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDeltaPresenceEstimationHistogramFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (deltaPresenceEstimationHistogramBuilder_ == null) { - deltaPresenceEstimationHistogram_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deltaPresenceEstimationHistogramBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult(this); - int from_bitField0_ = bitField0_; - if (deltaPresenceEstimationHistogramBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deltaPresenceEstimationHistogram_ = java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deltaPresenceEstimationHistogram_ = deltaPresenceEstimationHistogram_; - } else { - result.deltaPresenceEstimationHistogram_ = deltaPresenceEstimationHistogramBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance()) return this; - if (deltaPresenceEstimationHistogramBuilder_ == null) { - if (!other.deltaPresenceEstimationHistogram_.isEmpty()) { - if (deltaPresenceEstimationHistogram_.isEmpty()) { - deltaPresenceEstimationHistogram_ = other.deltaPresenceEstimationHistogram_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeltaPresenceEstimationHistogramIsMutable(); - deltaPresenceEstimationHistogram_.addAll(other.deltaPresenceEstimationHistogram_); - } - onChanged(); - } - } else { - if (!other.deltaPresenceEstimationHistogram_.isEmpty()) { - if (deltaPresenceEstimationHistogramBuilder_.isEmpty()) { - deltaPresenceEstimationHistogramBuilder_.dispose(); - deltaPresenceEstimationHistogramBuilder_ = null; - deltaPresenceEstimationHistogram_ = other.deltaPresenceEstimationHistogram_; - bitField0_ = (bitField0_ & ~0x00000001); - deltaPresenceEstimationHistogramBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeltaPresenceEstimationHistogramFieldBuilder() : null; - } else { - deltaPresenceEstimationHistogramBuilder_.addAllMessages(other.deltaPresenceEstimationHistogram_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List deltaPresenceEstimationHistogram_ = - java.util.Collections.emptyList(); - private void ensureDeltaPresenceEstimationHistogramIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deltaPresenceEstimationHistogram_ = new java.util.ArrayList(deltaPresenceEstimationHistogram_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder> deltaPresenceEstimationHistogramBuilder_; - - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public java.util.List getDeltaPresenceEstimationHistogramList() { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - return java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); - } else { - return deltaPresenceEstimationHistogramBuilder_.getMessageList(); - } - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public int getDeltaPresenceEstimationHistogramCount() { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - return deltaPresenceEstimationHistogram_.size(); - } else { - return deltaPresenceEstimationHistogramBuilder_.getCount(); - } - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDeltaPresenceEstimationHistogram(int index) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - return deltaPresenceEstimationHistogram_.get(index); - } else { - return deltaPresenceEstimationHistogramBuilder_.getMessage(index); - } - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public Builder setDeltaPresenceEstimationHistogram( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket value) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeltaPresenceEstimationHistogramIsMutable(); - deltaPresenceEstimationHistogram_.set(index, value); - onChanged(); - } else { - deltaPresenceEstimationHistogramBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public Builder setDeltaPresenceEstimationHistogram( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder builderForValue) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - ensureDeltaPresenceEstimationHistogramIsMutable(); - deltaPresenceEstimationHistogram_.set(index, builderForValue.build()); - onChanged(); - } else { - deltaPresenceEstimationHistogramBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public Builder addDeltaPresenceEstimationHistogram(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket value) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeltaPresenceEstimationHistogramIsMutable(); - deltaPresenceEstimationHistogram_.add(value); - onChanged(); - } else { - deltaPresenceEstimationHistogramBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public Builder addDeltaPresenceEstimationHistogram( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket value) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeltaPresenceEstimationHistogramIsMutable(); - deltaPresenceEstimationHistogram_.add(index, value); - onChanged(); - } else { - deltaPresenceEstimationHistogramBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public Builder addDeltaPresenceEstimationHistogram( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder builderForValue) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - ensureDeltaPresenceEstimationHistogramIsMutable(); - deltaPresenceEstimationHistogram_.add(builderForValue.build()); - onChanged(); - } else { - deltaPresenceEstimationHistogramBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public Builder addDeltaPresenceEstimationHistogram( - int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder builderForValue) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - ensureDeltaPresenceEstimationHistogramIsMutable(); - deltaPresenceEstimationHistogram_.add(index, builderForValue.build()); - onChanged(); - } else { - deltaPresenceEstimationHistogramBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public Builder addAllDeltaPresenceEstimationHistogram( - java.lang.Iterable values) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - ensureDeltaPresenceEstimationHistogramIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deltaPresenceEstimationHistogram_); - onChanged(); - } else { - deltaPresenceEstimationHistogramBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public Builder clearDeltaPresenceEstimationHistogram() { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - deltaPresenceEstimationHistogram_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deltaPresenceEstimationHistogramBuilder_.clear(); - } - return this; - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public Builder removeDeltaPresenceEstimationHistogram(int index) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - ensureDeltaPresenceEstimationHistogramIsMutable(); - deltaPresenceEstimationHistogram_.remove(index); - onChanged(); - } else { - deltaPresenceEstimationHistogramBuilder_.remove(index); - } - return this; - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder getDeltaPresenceEstimationHistogramBuilder( - int index) { - return getDeltaPresenceEstimationHistogramFieldBuilder().getBuilder(index); - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder getDeltaPresenceEstimationHistogramOrBuilder( - int index) { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - return deltaPresenceEstimationHistogram_.get(index); } else { - return deltaPresenceEstimationHistogramBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public java.util.List - getDeltaPresenceEstimationHistogramOrBuilderList() { - if (deltaPresenceEstimationHistogramBuilder_ != null) { - return deltaPresenceEstimationHistogramBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); - } - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder addDeltaPresenceEstimationHistogramBuilder() { - return getDeltaPresenceEstimationHistogramFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance()); - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder addDeltaPresenceEstimationHistogramBuilder( - int index) { - return getDeltaPresenceEstimationHistogramFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance()); - } - /** - *
-       * The intervals [min_probability, max_probability) do not overlap. If a
-       * value doesn't correspond to any such interval, the associated frequency
-       * is zero. For example, the following records:
-       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
-       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
-       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
-       * mean that there are no record with an estimated probability in [0.1, 0.2)
-       * nor larger or equal to 0.4.
-       * 
- * - * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - */ - public java.util.List - getDeltaPresenceEstimationHistogramBuilderList() { - return getDeltaPresenceEstimationHistogramFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder> - getDeltaPresenceEstimationHistogramFieldBuilder() { - if (deltaPresenceEstimationHistogramBuilder_ == null) { - deltaPresenceEstimationHistogramBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder>( - deltaPresenceEstimationHistogram_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - deltaPresenceEstimationHistogram_ = null; - } - return deltaPresenceEstimationHistogramBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeltaPresenceEstimationResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeltaPresenceEstimationResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface RequestedRiskAnalysisOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The job config for the risk job.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - * @return Whether the jobConfig field is set. - */ - boolean hasJobConfig(); - /** - *
-     * The job config for the risk job.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - * @return The jobConfig. - */ - com.google.privacy.dlp.v2.RiskAnalysisJobConfig getJobConfig(); - /** - *
-     * The job config for the risk job.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - */ - com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getJobConfigOrBuilder(); - } - /** - *
-   * Risk analysis options.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions} - */ - public static final class RequestedRiskAnalysisOptions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) - RequestedRiskAnalysisOptionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use RequestedRiskAnalysisOptions.newBuilder() to construct. - private RequestedRiskAnalysisOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RequestedRiskAnalysisOptions() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RequestedRiskAnalysisOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RequestedRiskAnalysisOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder subBuilder = null; - if (jobConfig_ != null) { - subBuilder = jobConfig_.toBuilder(); - } - jobConfig_ = input.readMessage(com.google.privacy.dlp.v2.RiskAnalysisJobConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(jobConfig_); - jobConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder.class); - } - - public static final int JOB_CONFIG_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.RiskAnalysisJobConfig jobConfig_; - /** - *
-     * The job config for the risk job.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - * @return Whether the jobConfig field is set. - */ - @java.lang.Override - public boolean hasJobConfig() { - return jobConfig_ != null; - } - /** - *
-     * The job config for the risk job.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - * @return The jobConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getJobConfig() { - return jobConfig_ == null ? com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance() : jobConfig_; - } - /** - *
-     * The job config for the risk job.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getJobConfigOrBuilder() { - return getJobConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (jobConfig_ != null) { - output.writeMessage(1, getJobConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (jobConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getJobConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) obj; - - if (hasJobConfig() != other.hasJobConfig()) return false; - if (hasJobConfig()) { - if (!getJobConfig() - .equals(other.getJobConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasJobConfig()) { - hash = (37 * hash) + JOB_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getJobConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Risk analysis options.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (jobConfigBuilder_ == null) { - jobConfig_ = null; - } else { - jobConfig_ = null; - jobConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions(this); - if (jobConfigBuilder_ == null) { - result.jobConfig_ = jobConfig_; - } else { - result.jobConfig_ = jobConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance()) return this; - if (other.hasJobConfig()) { - mergeJobConfig(other.getJobConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.RiskAnalysisJobConfig jobConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> jobConfigBuilder_; - /** - *
-       * The job config for the risk job.
-       * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - * @return Whether the jobConfig field is set. - */ - public boolean hasJobConfig() { - return jobConfigBuilder_ != null || jobConfig_ != null; - } - /** - *
-       * The job config for the risk job.
-       * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - * @return The jobConfig. - */ - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getJobConfig() { - if (jobConfigBuilder_ == null) { - return jobConfig_ == null ? com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance() : jobConfig_; - } else { - return jobConfigBuilder_.getMessage(); - } - } - /** - *
-       * The job config for the risk job.
-       * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - */ - public Builder setJobConfig(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) { - if (jobConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobConfig_ = value; - onChanged(); - } else { - jobConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The job config for the risk job.
-       * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - */ - public Builder setJobConfig( - com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder builderForValue) { - if (jobConfigBuilder_ == null) { - jobConfig_ = builderForValue.build(); - onChanged(); - } else { - jobConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The job config for the risk job.
-       * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - */ - public Builder mergeJobConfig(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) { - if (jobConfigBuilder_ == null) { - if (jobConfig_ != null) { - jobConfig_ = - com.google.privacy.dlp.v2.RiskAnalysisJobConfig.newBuilder(jobConfig_).mergeFrom(value).buildPartial(); - } else { - jobConfig_ = value; - } - onChanged(); - } else { - jobConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The job config for the risk job.
-       * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - */ - public Builder clearJobConfig() { - if (jobConfigBuilder_ == null) { - jobConfig_ = null; - onChanged(); - } else { - jobConfig_ = null; - jobConfigBuilder_ = null; - } - - return this; - } - /** - *
-       * The job config for the risk job.
-       * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - */ - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder getJobConfigBuilder() { - - onChanged(); - return getJobConfigFieldBuilder().getBuilder(); - } - /** - *
-       * The job config for the risk job.
-       * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - */ - public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getJobConfigOrBuilder() { - if (jobConfigBuilder_ != null) { - return jobConfigBuilder_.getMessageOrBuilder(); - } else { - return jobConfig_ == null ? - com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance() : jobConfig_; - } - } - /** - *
-       * The job config for the risk job.
-       * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig job_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> - getJobConfigFieldBuilder() { - if (jobConfigBuilder_ == null) { - jobConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder>( - getJobConfig(), - getParentForChildren(), - isClean()); - jobConfig_ = null; - } - return jobConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequestedRiskAnalysisOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RequestedRiskAnalysisOptions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int resultCase_ = 0; - private java.lang.Object result_; - public enum ResultCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - NUMERICAL_STATS_RESULT(3), - CATEGORICAL_STATS_RESULT(4), - K_ANONYMITY_RESULT(5), - L_DIVERSITY_RESULT(6), - K_MAP_ESTIMATION_RESULT(7), - DELTA_PRESENCE_ESTIMATION_RESULT(9), - RESULT_NOT_SET(0); - private final int value; - private ResultCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ResultCase valueOf(int value) { - return forNumber(value); - } - - public static ResultCase forNumber(int value) { - switch (value) { - case 3: return NUMERICAL_STATS_RESULT; - case 4: return CATEGORICAL_STATS_RESULT; - case 5: return K_ANONYMITY_RESULT; - case 6: return L_DIVERSITY_RESULT; - case 7: return K_MAP_ESTIMATION_RESULT; - case 9: return DELTA_PRESENCE_ESTIMATION_RESULT; - case 0: return RESULT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public static final int REQUESTED_PRIVACY_METRIC_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.PrivacyMetric requestedPrivacyMetric_; - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - * @return Whether the requestedPrivacyMetric field is set. - */ - @java.lang.Override - public boolean hasRequestedPrivacyMetric() { - return requestedPrivacyMetric_ != null; - } - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - * @return The requestedPrivacyMetric. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric getRequestedPrivacyMetric() { - return requestedPrivacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : requestedPrivacyMetric_; - } - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getRequestedPrivacyMetricOrBuilder() { - return getRequestedPrivacyMetric(); - } - - public static final int REQUESTED_SOURCE_TABLE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.BigQueryTable requestedSourceTable_; - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - * @return Whether the requestedSourceTable field is set. - */ - @java.lang.Override - public boolean hasRequestedSourceTable() { - return requestedSourceTable_ != null; - } - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - * @return The requestedSourceTable. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getRequestedSourceTable() { - return requestedSourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : requestedSourceTable_; - } - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getRequestedSourceTableOrBuilder() { - return getRequestedSourceTable(); - } - - public static final int NUMERICAL_STATS_RESULT_FIELD_NUMBER = 3; - /** - *
-   * Numerical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - * @return Whether the numericalStatsResult field is set. - */ - @java.lang.Override - public boolean hasNumericalStatsResult() { - return resultCase_ == 3; - } - /** - *
-   * Numerical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - * @return The numericalStatsResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getNumericalStatsResult() { - if (resultCase_ == 3) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); - } - /** - *
-   * Numerical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder getNumericalStatsResultOrBuilder() { - if (resultCase_ == 3) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); - } - - public static final int CATEGORICAL_STATS_RESULT_FIELD_NUMBER = 4; - /** - *
-   * Categorical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - * @return Whether the categoricalStatsResult field is set. - */ - @java.lang.Override - public boolean hasCategoricalStatsResult() { - return resultCase_ == 4; - } - /** - *
-   * Categorical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - * @return The categoricalStatsResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getCategoricalStatsResult() { - if (resultCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); - } - /** - *
-   * Categorical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder getCategoricalStatsResultOrBuilder() { - if (resultCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); - } - - public static final int K_ANONYMITY_RESULT_FIELD_NUMBER = 5; - /** - *
-   * K-anonymity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - * @return Whether the kAnonymityResult field is set. - */ - @java.lang.Override - public boolean hasKAnonymityResult() { - return resultCase_ == 5; - } - /** - *
-   * K-anonymity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - * @return The kAnonymityResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getKAnonymityResult() { - if (resultCase_ == 5) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); - } - /** - *
-   * K-anonymity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder getKAnonymityResultOrBuilder() { - if (resultCase_ == 5) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); - } - - public static final int L_DIVERSITY_RESULT_FIELD_NUMBER = 6; - /** - *
-   * L-divesity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - * @return Whether the lDiversityResult field is set. - */ - @java.lang.Override - public boolean hasLDiversityResult() { - return resultCase_ == 6; - } - /** - *
-   * L-divesity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - * @return The lDiversityResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getLDiversityResult() { - if (resultCase_ == 6) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); - } - /** - *
-   * L-divesity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder getLDiversityResultOrBuilder() { - if (resultCase_ == 6) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); - } - - public static final int K_MAP_ESTIMATION_RESULT_FIELD_NUMBER = 7; - /** - *
-   * K-map result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - * @return Whether the kMapEstimationResult field is set. - */ - @java.lang.Override - public boolean hasKMapEstimationResult() { - return resultCase_ == 7; - } - /** - *
-   * K-map result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - * @return The kMapEstimationResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getKMapEstimationResult() { - if (resultCase_ == 7) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); - } - /** - *
-   * K-map result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder getKMapEstimationResultOrBuilder() { - if (resultCase_ == 7) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); - } - - public static final int DELTA_PRESENCE_ESTIMATION_RESULT_FIELD_NUMBER = 9; - /** - *
-   * Delta-presence result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - * @return Whether the deltaPresenceEstimationResult field is set. - */ - @java.lang.Override - public boolean hasDeltaPresenceEstimationResult() { - return resultCase_ == 9; - } - /** - *
-   * Delta-presence result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - * @return The deltaPresenceEstimationResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDeltaPresenceEstimationResult() { - if (resultCase_ == 9) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); - } - /** - *
-   * Delta-presence result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder getDeltaPresenceEstimationResultOrBuilder() { - if (resultCase_ == 9) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); - } - - public static final int REQUESTED_OPTIONS_FIELD_NUMBER = 10; - private com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requestedOptions_; - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - * @return Whether the requestedOptions field is set. - */ - @java.lang.Override - public boolean hasRequestedOptions() { - return requestedOptions_ != null; - } - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - * @return The requestedOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getRequestedOptions() { - return requestedOptions_ == null ? com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance() : requestedOptions_; - } - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder getRequestedOptionsOrBuilder() { - return getRequestedOptions(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (requestedPrivacyMetric_ != null) { - output.writeMessage(1, getRequestedPrivacyMetric()); - } - if (requestedSourceTable_ != null) { - output.writeMessage(2, getRequestedSourceTable()); - } - if (resultCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_); - } - if (resultCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_); - } - if (resultCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_); - } - if (resultCase_ == 6) { - output.writeMessage(6, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_); - } - if (resultCase_ == 7) { - output.writeMessage(7, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_); - } - if (resultCase_ == 9) { - output.writeMessage(9, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_); - } - if (requestedOptions_ != null) { - output.writeMessage(10, getRequestedOptions()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (requestedPrivacyMetric_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getRequestedPrivacyMetric()); - } - if (requestedSourceTable_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRequestedSourceTable()); - } - if (resultCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_); - } - if (resultCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_); - } - if (resultCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_); - } - if (resultCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_); - } - if (resultCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_); - } - if (resultCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_); - } - if (requestedOptions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getRequestedOptions()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) obj; - - if (hasRequestedPrivacyMetric() != other.hasRequestedPrivacyMetric()) return false; - if (hasRequestedPrivacyMetric()) { - if (!getRequestedPrivacyMetric() - .equals(other.getRequestedPrivacyMetric())) return false; - } - if (hasRequestedSourceTable() != other.hasRequestedSourceTable()) return false; - if (hasRequestedSourceTable()) { - if (!getRequestedSourceTable() - .equals(other.getRequestedSourceTable())) return false; - } - if (hasRequestedOptions() != other.hasRequestedOptions()) return false; - if (hasRequestedOptions()) { - if (!getRequestedOptions() - .equals(other.getRequestedOptions())) return false; - } - if (!getResultCase().equals(other.getResultCase())) return false; - switch (resultCase_) { - case 3: - if (!getNumericalStatsResult() - .equals(other.getNumericalStatsResult())) return false; - break; - case 4: - if (!getCategoricalStatsResult() - .equals(other.getCategoricalStatsResult())) return false; - break; - case 5: - if (!getKAnonymityResult() - .equals(other.getKAnonymityResult())) return false; - break; - case 6: - if (!getLDiversityResult() - .equals(other.getLDiversityResult())) return false; - break; - case 7: - if (!getKMapEstimationResult() - .equals(other.getKMapEstimationResult())) return false; - break; - case 9: - if (!getDeltaPresenceEstimationResult() - .equals(other.getDeltaPresenceEstimationResult())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasRequestedPrivacyMetric()) { - hash = (37 * hash) + REQUESTED_PRIVACY_METRIC_FIELD_NUMBER; - hash = (53 * hash) + getRequestedPrivacyMetric().hashCode(); - } - if (hasRequestedSourceTable()) { - hash = (37 * hash) + REQUESTED_SOURCE_TABLE_FIELD_NUMBER; - hash = (53 * hash) + getRequestedSourceTable().hashCode(); - } - if (hasRequestedOptions()) { - hash = (37 * hash) + REQUESTED_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getRequestedOptions().hashCode(); - } - switch (resultCase_) { - case 3: - hash = (37 * hash) + NUMERICAL_STATS_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getNumericalStatsResult().hashCode(); - break; - case 4: - hash = (37 * hash) + CATEGORICAL_STATS_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getCategoricalStatsResult().hashCode(); - break; - case 5: - hash = (37 * hash) + K_ANONYMITY_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getKAnonymityResult().hashCode(); - break; - case 6: - hash = (37 * hash) + L_DIVERSITY_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getLDiversityResult().hashCode(); - break; - case 7: - hash = (37 * hash) + K_MAP_ESTIMATION_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getKMapEstimationResult().hashCode(); - break; - case 9: - hash = (37 * hash) + DELTA_PRESENCE_ESTIMATION_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getDeltaPresenceEstimationResult().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Result of a risk analysis operation request.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestedPrivacyMetricBuilder_ == null) { - requestedPrivacyMetric_ = null; - } else { - requestedPrivacyMetric_ = null; - requestedPrivacyMetricBuilder_ = null; - } - if (requestedSourceTableBuilder_ == null) { - requestedSourceTable_ = null; - } else { - requestedSourceTable_ = null; - requestedSourceTableBuilder_ = null; - } - if (requestedOptionsBuilder_ == null) { - requestedOptions_ = null; - } else { - requestedOptions_ = null; - requestedOptionsBuilder_ = null; - } - resultCase_ = 0; - result_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails build() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails buildPartial() { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails(this); - if (requestedPrivacyMetricBuilder_ == null) { - result.requestedPrivacyMetric_ = requestedPrivacyMetric_; - } else { - result.requestedPrivacyMetric_ = requestedPrivacyMetricBuilder_.build(); - } - if (requestedSourceTableBuilder_ == null) { - result.requestedSourceTable_ = requestedSourceTable_; - } else { - result.requestedSourceTable_ = requestedSourceTableBuilder_.build(); - } - if (resultCase_ == 3) { - if (numericalStatsResultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = numericalStatsResultBuilder_.build(); - } - } - if (resultCase_ == 4) { - if (categoricalStatsResultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = categoricalStatsResultBuilder_.build(); - } - } - if (resultCase_ == 5) { - if (kAnonymityResultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = kAnonymityResultBuilder_.build(); - } - } - if (resultCase_ == 6) { - if (lDiversityResultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = lDiversityResultBuilder_.build(); - } - } - if (resultCase_ == 7) { - if (kMapEstimationResultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = kMapEstimationResultBuilder_.build(); - } - } - if (resultCase_ == 9) { - if (deltaPresenceEstimationResultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = deltaPresenceEstimationResultBuilder_.build(); - } - } - if (requestedOptionsBuilder_ == null) { - result.requestedOptions_ = requestedOptions_; - } else { - result.requestedOptions_ = requestedOptionsBuilder_.build(); - } - result.resultCase_ = resultCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) { - return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails other) { - if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance()) return this; - if (other.hasRequestedPrivacyMetric()) { - mergeRequestedPrivacyMetric(other.getRequestedPrivacyMetric()); - } - if (other.hasRequestedSourceTable()) { - mergeRequestedSourceTable(other.getRequestedSourceTable()); - } - if (other.hasRequestedOptions()) { - mergeRequestedOptions(other.getRequestedOptions()); - } - switch (other.getResultCase()) { - case NUMERICAL_STATS_RESULT: { - mergeNumericalStatsResult(other.getNumericalStatsResult()); - break; - } - case CATEGORICAL_STATS_RESULT: { - mergeCategoricalStatsResult(other.getCategoricalStatsResult()); - break; - } - case K_ANONYMITY_RESULT: { - mergeKAnonymityResult(other.getKAnonymityResult()); - break; - } - case L_DIVERSITY_RESULT: { - mergeLDiversityResult(other.getLDiversityResult()); - break; - } - case K_MAP_ESTIMATION_RESULT: { - mergeKMapEstimationResult(other.getKMapEstimationResult()); - break; - } - case DELTA_PRESENCE_ESTIMATION_RESULT: { - mergeDeltaPresenceEstimationResult(other.getDeltaPresenceEstimationResult()); - break; - } - case RESULT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int resultCase_ = 0; - private java.lang.Object result_; - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public Builder clearResult() { - resultCase_ = 0; - result_ = null; - onChanged(); - return this; - } - - - private com.google.privacy.dlp.v2.PrivacyMetric requestedPrivacyMetric_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder> requestedPrivacyMetricBuilder_; - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - * @return Whether the requestedPrivacyMetric field is set. - */ - public boolean hasRequestedPrivacyMetric() { - return requestedPrivacyMetricBuilder_ != null || requestedPrivacyMetric_ != null; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - * @return The requestedPrivacyMetric. - */ - public com.google.privacy.dlp.v2.PrivacyMetric getRequestedPrivacyMetric() { - if (requestedPrivacyMetricBuilder_ == null) { - return requestedPrivacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : requestedPrivacyMetric_; - } else { - return requestedPrivacyMetricBuilder_.getMessage(); - } - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - public Builder setRequestedPrivacyMetric(com.google.privacy.dlp.v2.PrivacyMetric value) { - if (requestedPrivacyMetricBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - requestedPrivacyMetric_ = value; - onChanged(); - } else { - requestedPrivacyMetricBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - public Builder setRequestedPrivacyMetric( - com.google.privacy.dlp.v2.PrivacyMetric.Builder builderForValue) { - if (requestedPrivacyMetricBuilder_ == null) { - requestedPrivacyMetric_ = builderForValue.build(); - onChanged(); - } else { - requestedPrivacyMetricBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - public Builder mergeRequestedPrivacyMetric(com.google.privacy.dlp.v2.PrivacyMetric value) { - if (requestedPrivacyMetricBuilder_ == null) { - if (requestedPrivacyMetric_ != null) { - requestedPrivacyMetric_ = - com.google.privacy.dlp.v2.PrivacyMetric.newBuilder(requestedPrivacyMetric_).mergeFrom(value).buildPartial(); - } else { - requestedPrivacyMetric_ = value; - } - onChanged(); - } else { - requestedPrivacyMetricBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - public Builder clearRequestedPrivacyMetric() { - if (requestedPrivacyMetricBuilder_ == null) { - requestedPrivacyMetric_ = null; - onChanged(); - } else { - requestedPrivacyMetric_ = null; - requestedPrivacyMetricBuilder_ = null; - } - - return this; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.Builder getRequestedPrivacyMetricBuilder() { - - onChanged(); - return getRequestedPrivacyMetricFieldBuilder().getBuilder(); - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getRequestedPrivacyMetricOrBuilder() { - if (requestedPrivacyMetricBuilder_ != null) { - return requestedPrivacyMetricBuilder_.getMessageOrBuilder(); - } else { - return requestedPrivacyMetric_ == null ? - com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : requestedPrivacyMetric_; - } - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder> - getRequestedPrivacyMetricFieldBuilder() { - if (requestedPrivacyMetricBuilder_ == null) { - requestedPrivacyMetricBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder>( - getRequestedPrivacyMetric(), - getParentForChildren(), - isClean()); - requestedPrivacyMetric_ = null; - } - return requestedPrivacyMetricBuilder_; - } - - private com.google.privacy.dlp.v2.BigQueryTable requestedSourceTable_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> requestedSourceTableBuilder_; - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - * @return Whether the requestedSourceTable field is set. - */ - public boolean hasRequestedSourceTable() { - return requestedSourceTableBuilder_ != null || requestedSourceTable_ != null; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - * @return The requestedSourceTable. - */ - public com.google.privacy.dlp.v2.BigQueryTable getRequestedSourceTable() { - if (requestedSourceTableBuilder_ == null) { - return requestedSourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : requestedSourceTable_; - } else { - return requestedSourceTableBuilder_.getMessage(); - } - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - public Builder setRequestedSourceTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (requestedSourceTableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - requestedSourceTable_ = value; - onChanged(); - } else { - requestedSourceTableBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - public Builder setRequestedSourceTable( - com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { - if (requestedSourceTableBuilder_ == null) { - requestedSourceTable_ = builderForValue.build(); - onChanged(); - } else { - requestedSourceTableBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - public Builder mergeRequestedSourceTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (requestedSourceTableBuilder_ == null) { - if (requestedSourceTable_ != null) { - requestedSourceTable_ = - com.google.privacy.dlp.v2.BigQueryTable.newBuilder(requestedSourceTable_).mergeFrom(value).buildPartial(); - } else { - requestedSourceTable_ = value; - } - onChanged(); - } else { - requestedSourceTableBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - public Builder clearRequestedSourceTable() { - if (requestedSourceTableBuilder_ == null) { - requestedSourceTable_ = null; - onChanged(); - } else { - requestedSourceTable_ = null; - requestedSourceTableBuilder_ = null; - } - - return this; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - public com.google.privacy.dlp.v2.BigQueryTable.Builder getRequestedSourceTableBuilder() { - - onChanged(); - return getRequestedSourceTableFieldBuilder().getBuilder(); - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getRequestedSourceTableOrBuilder() { - if (requestedSourceTableBuilder_ != null) { - return requestedSourceTableBuilder_.getMessageOrBuilder(); - } else { - return requestedSourceTable_ == null ? - com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : requestedSourceTable_; - } - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> - getRequestedSourceTableFieldBuilder() { - if (requestedSourceTableBuilder_ == null) { - requestedSourceTableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( - getRequestedSourceTable(), - getParentForChildren(), - isClean()); - requestedSourceTable_ = null; - } - return requestedSourceTableBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder> numericalStatsResultBuilder_; - /** - *
-     * Numerical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - * @return Whether the numericalStatsResult field is set. - */ - @java.lang.Override - public boolean hasNumericalStatsResult() { - return resultCase_ == 3; - } - /** - *
-     * Numerical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - * @return The numericalStatsResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getNumericalStatsResult() { - if (numericalStatsResultBuilder_ == null) { - if (resultCase_ == 3) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); - } else { - if (resultCase_ == 3) { - return numericalStatsResultBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); - } - } - /** - *
-     * Numerical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - public Builder setNumericalStatsResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult value) { - if (numericalStatsResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - numericalStatsResultBuilder_.setMessage(value); - } - resultCase_ = 3; - return this; - } - /** - *
-     * Numerical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - public Builder setNumericalStatsResult( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder builderForValue) { - if (numericalStatsResultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - numericalStatsResultBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 3; - return this; - } - /** - *
-     * Numerical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - public Builder mergeNumericalStatsResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult value) { - if (numericalStatsResultBuilder_ == null) { - if (resultCase_ == 3 && - result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance()) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 3) { - numericalStatsResultBuilder_.mergeFrom(value); - } else { - numericalStatsResultBuilder_.setMessage(value); - } - } - resultCase_ = 3; - return this; - } - /** - *
-     * Numerical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - public Builder clearNumericalStatsResult() { - if (numericalStatsResultBuilder_ == null) { - if (resultCase_ == 3) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 3) { - resultCase_ = 0; - result_ = null; - } - numericalStatsResultBuilder_.clear(); - } - return this; - } - /** - *
-     * Numerical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder getNumericalStatsResultBuilder() { - return getNumericalStatsResultFieldBuilder().getBuilder(); - } - /** - *
-     * Numerical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder getNumericalStatsResultOrBuilder() { - if ((resultCase_ == 3) && (numericalStatsResultBuilder_ != null)) { - return numericalStatsResultBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 3) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); - } - } - /** - *
-     * Numerical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder> - getNumericalStatsResultFieldBuilder() { - if (numericalStatsResultBuilder_ == null) { - if (!(resultCase_ == 3)) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); - } - numericalStatsResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder>( - (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 3; - onChanged();; - return numericalStatsResultBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder> categoricalStatsResultBuilder_; - /** - *
-     * Categorical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - * @return Whether the categoricalStatsResult field is set. - */ - @java.lang.Override - public boolean hasCategoricalStatsResult() { - return resultCase_ == 4; - } - /** - *
-     * Categorical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - * @return The categoricalStatsResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getCategoricalStatsResult() { - if (categoricalStatsResultBuilder_ == null) { - if (resultCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); - } else { - if (resultCase_ == 4) { - return categoricalStatsResultBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); - } - } - /** - *
-     * Categorical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - public Builder setCategoricalStatsResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult value) { - if (categoricalStatsResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - categoricalStatsResultBuilder_.setMessage(value); - } - resultCase_ = 4; - return this; - } - /** - *
-     * Categorical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - public Builder setCategoricalStatsResult( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder builderForValue) { - if (categoricalStatsResultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - categoricalStatsResultBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 4; - return this; - } - /** - *
-     * Categorical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - public Builder mergeCategoricalStatsResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult value) { - if (categoricalStatsResultBuilder_ == null) { - if (resultCase_ == 4 && - result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance()) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 4) { - categoricalStatsResultBuilder_.mergeFrom(value); - } else { - categoricalStatsResultBuilder_.setMessage(value); - } - } - resultCase_ = 4; - return this; - } - /** - *
-     * Categorical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - public Builder clearCategoricalStatsResult() { - if (categoricalStatsResultBuilder_ == null) { - if (resultCase_ == 4) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 4) { - resultCase_ = 0; - result_ = null; - } - categoricalStatsResultBuilder_.clear(); - } - return this; - } - /** - *
-     * Categorical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder getCategoricalStatsResultBuilder() { - return getCategoricalStatsResultFieldBuilder().getBuilder(); - } - /** - *
-     * Categorical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder getCategoricalStatsResultOrBuilder() { - if ((resultCase_ == 4) && (categoricalStatsResultBuilder_ != null)) { - return categoricalStatsResultBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); - } - } - /** - *
-     * Categorical stats result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder> - getCategoricalStatsResultFieldBuilder() { - if (categoricalStatsResultBuilder_ == null) { - if (!(resultCase_ == 4)) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); - } - categoricalStatsResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder>( - (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 4; - onChanged();; - return categoricalStatsResultBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder> kAnonymityResultBuilder_; - /** - *
-     * K-anonymity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - * @return Whether the kAnonymityResult field is set. - */ - @java.lang.Override - public boolean hasKAnonymityResult() { - return resultCase_ == 5; - } - /** - *
-     * K-anonymity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - * @return The kAnonymityResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getKAnonymityResult() { - if (kAnonymityResultBuilder_ == null) { - if (resultCase_ == 5) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); - } else { - if (resultCase_ == 5) { - return kAnonymityResultBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); - } - } - /** - *
-     * K-anonymity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - public Builder setKAnonymityResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult value) { - if (kAnonymityResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - kAnonymityResultBuilder_.setMessage(value); - } - resultCase_ = 5; - return this; - } - /** - *
-     * K-anonymity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - public Builder setKAnonymityResult( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder builderForValue) { - if (kAnonymityResultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - kAnonymityResultBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 5; - return this; - } - /** - *
-     * K-anonymity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - public Builder mergeKAnonymityResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult value) { - if (kAnonymityResultBuilder_ == null) { - if (resultCase_ == 5 && - result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance()) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 5) { - kAnonymityResultBuilder_.mergeFrom(value); - } else { - kAnonymityResultBuilder_.setMessage(value); - } - } - resultCase_ = 5; - return this; - } - /** - *
-     * K-anonymity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - public Builder clearKAnonymityResult() { - if (kAnonymityResultBuilder_ == null) { - if (resultCase_ == 5) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 5) { - resultCase_ = 0; - result_ = null; - } - kAnonymityResultBuilder_.clear(); - } - return this; - } - /** - *
-     * K-anonymity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder getKAnonymityResultBuilder() { - return getKAnonymityResultFieldBuilder().getBuilder(); - } - /** - *
-     * K-anonymity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder getKAnonymityResultOrBuilder() { - if ((resultCase_ == 5) && (kAnonymityResultBuilder_ != null)) { - return kAnonymityResultBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 5) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); - } - } - /** - *
-     * K-anonymity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder> - getKAnonymityResultFieldBuilder() { - if (kAnonymityResultBuilder_ == null) { - if (!(resultCase_ == 5)) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); - } - kAnonymityResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder>( - (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 5; - onChanged();; - return kAnonymityResultBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder> lDiversityResultBuilder_; - /** - *
-     * L-divesity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - * @return Whether the lDiversityResult field is set. - */ - @java.lang.Override - public boolean hasLDiversityResult() { - return resultCase_ == 6; - } - /** - *
-     * L-divesity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - * @return The lDiversityResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getLDiversityResult() { - if (lDiversityResultBuilder_ == null) { - if (resultCase_ == 6) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); - } else { - if (resultCase_ == 6) { - return lDiversityResultBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); - } - } - /** - *
-     * L-divesity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - */ - public Builder setLDiversityResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult value) { - if (lDiversityResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - lDiversityResultBuilder_.setMessage(value); - } - resultCase_ = 6; - return this; - } - /** - *
-     * L-divesity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - */ - public Builder setLDiversityResult( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder builderForValue) { - if (lDiversityResultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - lDiversityResultBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 6; - return this; - } - /** - *
-     * L-divesity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - */ - public Builder mergeLDiversityResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult value) { - if (lDiversityResultBuilder_ == null) { - if (resultCase_ == 6 && - result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance()) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 6) { - lDiversityResultBuilder_.mergeFrom(value); - } else { - lDiversityResultBuilder_.setMessage(value); - } - } - resultCase_ = 6; - return this; - } - /** - *
-     * L-divesity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - */ - public Builder clearLDiversityResult() { - if (lDiversityResultBuilder_ == null) { - if (resultCase_ == 6) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 6) { - resultCase_ = 0; - result_ = null; - } - lDiversityResultBuilder_.clear(); - } - return this; - } - /** - *
-     * L-divesity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder getLDiversityResultBuilder() { - return getLDiversityResultFieldBuilder().getBuilder(); - } - /** - *
-     * L-divesity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder getLDiversityResultOrBuilder() { - if ((resultCase_ == 6) && (lDiversityResultBuilder_ != null)) { - return lDiversityResultBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 6) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); - } - } - /** - *
-     * L-divesity result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder> - getLDiversityResultFieldBuilder() { - if (lDiversityResultBuilder_ == null) { - if (!(resultCase_ == 6)) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.getDefaultInstance(); - } - lDiversityResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder>( - (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 6; - onChanged();; - return lDiversityResultBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder> kMapEstimationResultBuilder_; - /** - *
-     * K-map result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - * @return Whether the kMapEstimationResult field is set. - */ - @java.lang.Override - public boolean hasKMapEstimationResult() { - return resultCase_ == 7; - } - /** - *
-     * K-map result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - * @return The kMapEstimationResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getKMapEstimationResult() { - if (kMapEstimationResultBuilder_ == null) { - if (resultCase_ == 7) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); - } else { - if (resultCase_ == 7) { - return kMapEstimationResultBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); - } - } - /** - *
-     * K-map result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - */ - public Builder setKMapEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult value) { - if (kMapEstimationResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - kMapEstimationResultBuilder_.setMessage(value); - } - resultCase_ = 7; - return this; - } - /** - *
-     * K-map result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - */ - public Builder setKMapEstimationResult( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder builderForValue) { - if (kMapEstimationResultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - kMapEstimationResultBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 7; - return this; - } - /** - *
-     * K-map result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - */ - public Builder mergeKMapEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult value) { - if (kMapEstimationResultBuilder_ == null) { - if (resultCase_ == 7 && - result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance()) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 7) { - kMapEstimationResultBuilder_.mergeFrom(value); - } else { - kMapEstimationResultBuilder_.setMessage(value); - } - } - resultCase_ = 7; - return this; - } - /** - *
-     * K-map result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - */ - public Builder clearKMapEstimationResult() { - if (kMapEstimationResultBuilder_ == null) { - if (resultCase_ == 7) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 7) { - resultCase_ = 0; - result_ = null; - } - kMapEstimationResultBuilder_.clear(); - } - return this; - } - /** - *
-     * K-map result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder getKMapEstimationResultBuilder() { - return getKMapEstimationResultFieldBuilder().getBuilder(); - } - /** - *
-     * K-map result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder getKMapEstimationResultOrBuilder() { - if ((resultCase_ == 7) && (kMapEstimationResultBuilder_ != null)) { - return kMapEstimationResultBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 7) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); - } - } - /** - *
-     * K-map result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder> - getKMapEstimationResultFieldBuilder() { - if (kMapEstimationResultBuilder_ == null) { - if (!(resultCase_ == 7)) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); - } - kMapEstimationResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder>( - (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 7; - onChanged();; - return kMapEstimationResultBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder> deltaPresenceEstimationResultBuilder_; - /** - *
-     * Delta-presence result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - * @return Whether the deltaPresenceEstimationResult field is set. - */ - @java.lang.Override - public boolean hasDeltaPresenceEstimationResult() { - return resultCase_ == 9; - } - /** - *
-     * Delta-presence result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - * @return The deltaPresenceEstimationResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDeltaPresenceEstimationResult() { - if (deltaPresenceEstimationResultBuilder_ == null) { - if (resultCase_ == 9) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); - } else { - if (resultCase_ == 9) { - return deltaPresenceEstimationResultBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); - } - } - /** - *
-     * Delta-presence result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - */ - public Builder setDeltaPresenceEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult value) { - if (deltaPresenceEstimationResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - deltaPresenceEstimationResultBuilder_.setMessage(value); - } - resultCase_ = 9; - return this; - } - /** - *
-     * Delta-presence result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - */ - public Builder setDeltaPresenceEstimationResult( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder builderForValue) { - if (deltaPresenceEstimationResultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - deltaPresenceEstimationResultBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 9; - return this; - } - /** - *
-     * Delta-presence result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - */ - public Builder mergeDeltaPresenceEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult value) { - if (deltaPresenceEstimationResultBuilder_ == null) { - if (resultCase_ == 9 && - result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance()) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 9) { - deltaPresenceEstimationResultBuilder_.mergeFrom(value); - } else { - deltaPresenceEstimationResultBuilder_.setMessage(value); - } - } - resultCase_ = 9; - return this; - } - /** - *
-     * Delta-presence result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - */ - public Builder clearDeltaPresenceEstimationResult() { - if (deltaPresenceEstimationResultBuilder_ == null) { - if (resultCase_ == 9) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 9) { - resultCase_ = 0; - result_ = null; - } - deltaPresenceEstimationResultBuilder_.clear(); - } - return this; - } - /** - *
-     * Delta-presence result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder getDeltaPresenceEstimationResultBuilder() { - return getDeltaPresenceEstimationResultFieldBuilder().getBuilder(); - } - /** - *
-     * Delta-presence result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder getDeltaPresenceEstimationResultOrBuilder() { - if ((resultCase_ == 9) && (deltaPresenceEstimationResultBuilder_ != null)) { - return deltaPresenceEstimationResultBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 9) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); - } - } - /** - *
-     * Delta-presence result
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder> - getDeltaPresenceEstimationResultFieldBuilder() { - if (deltaPresenceEstimationResultBuilder_ == null) { - if (!(resultCase_ == 9)) { - result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); - } - deltaPresenceEstimationResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder>( - (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 9; - onChanged();; - return deltaPresenceEstimationResultBuilder_; - } - - private com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requestedOptions_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder> requestedOptionsBuilder_; - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - * @return Whether the requestedOptions field is set. - */ - public boolean hasRequestedOptions() { - return requestedOptionsBuilder_ != null || requestedOptions_ != null; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - * @return The requestedOptions. - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getRequestedOptions() { - if (requestedOptionsBuilder_ == null) { - return requestedOptions_ == null ? com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance() : requestedOptions_; - } else { - return requestedOptionsBuilder_.getMessage(); - } - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - */ - public Builder setRequestedOptions(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions value) { - if (requestedOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - requestedOptions_ = value; - onChanged(); - } else { - requestedOptionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - */ - public Builder setRequestedOptions( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder builderForValue) { - if (requestedOptionsBuilder_ == null) { - requestedOptions_ = builderForValue.build(); - onChanged(); - } else { - requestedOptionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - */ - public Builder mergeRequestedOptions(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions value) { - if (requestedOptionsBuilder_ == null) { - if (requestedOptions_ != null) { - requestedOptions_ = - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.newBuilder(requestedOptions_).mergeFrom(value).buildPartial(); - } else { - requestedOptions_ = value; - } - onChanged(); - } else { - requestedOptionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - */ - public Builder clearRequestedOptions() { - if (requestedOptionsBuilder_ == null) { - requestedOptions_ = null; - onChanged(); - } else { - requestedOptions_ = null; - requestedOptionsBuilder_ = null; - } - - return this; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder getRequestedOptionsBuilder() { - - onChanged(); - return getRequestedOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder getRequestedOptionsOrBuilder() { - if (requestedOptionsBuilder_ != null) { - return requestedOptionsBuilder_.getMessageOrBuilder(); - } else { - return requestedOptions_ == null ? - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.getDefaultInstance() : requestedOptions_; - } - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder> - getRequestedOptionsFieldBuilder() { - if (requestedOptionsBuilder_ == null) { - requestedOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder>( - getRequestedOptions(), - getParentForChildren(), - isClean()); - requestedOptions_ = null; - } - return requestedOptionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) - private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails(); - } - - public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalyzeDataSourceRiskDetails parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeDataSourceRiskDetails(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java deleted file mode 100644 index b1515cacf5bb..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java +++ /dev/null @@ -1,254 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface AnalyzeDataSourceRiskDetailsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - * @return Whether the requestedPrivacyMetric field is set. - */ - boolean hasRequestedPrivacyMetric(); - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - * @return The requestedPrivacyMetric. - */ - com.google.privacy.dlp.v2.PrivacyMetric getRequestedPrivacyMetric(); - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getRequestedPrivacyMetricOrBuilder(); - - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - * @return Whether the requestedSourceTable field is set. - */ - boolean hasRequestedSourceTable(); - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - * @return The requestedSourceTable. - */ - com.google.privacy.dlp.v2.BigQueryTable getRequestedSourceTable(); - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - com.google.privacy.dlp.v2.BigQueryTableOrBuilder getRequestedSourceTableOrBuilder(); - - /** - *
-   * Numerical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - * @return Whether the numericalStatsResult field is set. - */ - boolean hasNumericalStatsResult(); - /** - *
-   * Numerical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - * @return The numericalStatsResult. - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getNumericalStatsResult(); - /** - *
-   * Numerical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder getNumericalStatsResultOrBuilder(); - - /** - *
-   * Categorical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - * @return Whether the categoricalStatsResult field is set. - */ - boolean hasCategoricalStatsResult(); - /** - *
-   * Categorical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - * @return The categoricalStatsResult. - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getCategoricalStatsResult(); - /** - *
-   * Categorical stats result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder getCategoricalStatsResultOrBuilder(); - - /** - *
-   * K-anonymity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - * @return Whether the kAnonymityResult field is set. - */ - boolean hasKAnonymityResult(); - /** - *
-   * K-anonymity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - * @return The kAnonymityResult. - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getKAnonymityResult(); - /** - *
-   * K-anonymity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder getKAnonymityResultOrBuilder(); - - /** - *
-   * L-divesity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - * @return Whether the lDiversityResult field is set. - */ - boolean hasLDiversityResult(); - /** - *
-   * L-divesity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - * @return The lDiversityResult. - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult getLDiversityResult(); - /** - *
-   * L-divesity result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult l_diversity_result = 6; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResultOrBuilder getLDiversityResultOrBuilder(); - - /** - *
-   * K-map result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - * @return Whether the kMapEstimationResult field is set. - */ - boolean hasKMapEstimationResult(); - /** - *
-   * K-map result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - * @return The kMapEstimationResult. - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult getKMapEstimationResult(); - /** - *
-   * K-map result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult k_map_estimation_result = 7; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder getKMapEstimationResultOrBuilder(); - - /** - *
-   * Delta-presence result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - * @return Whether the deltaPresenceEstimationResult field is set. - */ - boolean hasDeltaPresenceEstimationResult(); - /** - *
-   * Delta-presence result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - * @return The deltaPresenceEstimationResult. - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDeltaPresenceEstimationResult(); - /** - *
-   * Delta-presence result
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder getDeltaPresenceEstimationResultOrBuilder(); - - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - * @return Whether the requestedOptions field is set. - */ - boolean hasRequestedOptions(); - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - * @return The requestedOptions. - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions getRequestedOptions(); - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions requested_options = 10; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptionsOrBuilder getRequestedOptionsOrBuilder(); - - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ResultCase getResultCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryField.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryField.java deleted file mode 100644 index 9e8eee0a9580..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryField.java +++ /dev/null @@ -1,901 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Message defining a field of a BigQuery table.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BigQueryField} - */ -public final class BigQueryField extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BigQueryField) - BigQueryFieldOrBuilder { -private static final long serialVersionUID = 0L; - // Use BigQueryField.newBuilder() to construct. - private BigQueryField(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BigQueryField() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BigQueryField(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BigQueryField( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (table_ != null) { - subBuilder = table_.toBuilder(); - } - table_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(table_); - table_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BigQueryField.class, com.google.privacy.dlp.v2.BigQueryField.Builder.class); - } - - public static final int TABLE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.BigQueryTable table_; - /** - *
-   * Source table of the field.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return Whether the table field is set. - */ - @java.lang.Override - public boolean hasTable() { - return table_ != null; - } - /** - *
-   * Source table of the field.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return The table. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getTable() { - return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; - } - /** - *
-   * Source table of the field.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { - return getTable(); - } - - public static final int FIELD_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-   * Designated field in the BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-   * Designated field in the BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-   * Designated field in the BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (table_ != null) { - output.writeMessage(1, getTable()); - } - if (field_ != null) { - output.writeMessage(2, getField()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (table_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTable()); - } - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getField()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.BigQueryField)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.BigQueryField other = (com.google.privacy.dlp.v2.BigQueryField) obj; - - if (hasTable() != other.hasTable()) return false; - if (hasTable()) { - if (!getTable() - .equals(other.getTable())) return false; - } - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTable()) { - hash = (37 * hash) + TABLE_FIELD_NUMBER; - hash = (53 * hash) + getTable().hashCode(); - } - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.BigQueryField parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryField parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryField parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryField parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryField parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryField parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryField parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryField parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryField parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryField parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryField parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryField parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.BigQueryField prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Message defining a field of a BigQuery table.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BigQueryField} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BigQueryField) - com.google.privacy.dlp.v2.BigQueryFieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BigQueryField.class, com.google.privacy.dlp.v2.BigQueryField.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.BigQueryField.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (tableBuilder_ == null) { - table_ = null; - } else { - table_ = null; - tableBuilder_ = null; - } - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryField_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryField getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryField build() { - com.google.privacy.dlp.v2.BigQueryField result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryField buildPartial() { - com.google.privacy.dlp.v2.BigQueryField result = new com.google.privacy.dlp.v2.BigQueryField(this); - if (tableBuilder_ == null) { - result.table_ = table_; - } else { - result.table_ = tableBuilder_.build(); - } - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.BigQueryField) { - return mergeFrom((com.google.privacy.dlp.v2.BigQueryField)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.BigQueryField other) { - if (other == com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance()) return this; - if (other.hasTable()) { - mergeTable(other.getTable()); - } - if (other.hasField()) { - mergeField(other.getField()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.BigQueryField parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.BigQueryField) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.BigQueryTable table_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; - /** - *
-     * Source table of the field.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return Whether the table field is set. - */ - public boolean hasTable() { - return tableBuilder_ != null || table_ != null; - } - /** - *
-     * Source table of the field.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return The table. - */ - public com.google.privacy.dlp.v2.BigQueryTable getTable() { - if (tableBuilder_ == null) { - return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; - } else { - return tableBuilder_.getMessage(); - } - } - /** - *
-     * Source table of the field.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - table_ = value; - onChanged(); - } else { - tableBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Source table of the field.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public Builder setTable( - com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { - if (tableBuilder_ == null) { - table_ = builderForValue.build(); - onChanged(); - } else { - tableBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Source table of the field.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableBuilder_ == null) { - if (table_ != null) { - table_ = - com.google.privacy.dlp.v2.BigQueryTable.newBuilder(table_).mergeFrom(value).buildPartial(); - } else { - table_ = value; - } - onChanged(); - } else { - tableBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Source table of the field.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public Builder clearTable() { - if (tableBuilder_ == null) { - table_ = null; - onChanged(); - } else { - table_ = null; - tableBuilder_ = null; - } - - return this; - } - /** - *
-     * Source table of the field.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { - - onChanged(); - return getTableFieldBuilder().getBuilder(); - } - /** - *
-     * Source table of the field.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { - if (tableBuilder_ != null) { - return tableBuilder_.getMessageOrBuilder(); - } else { - return table_ == null ? - com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; - } - } - /** - *
-     * Source table of the field.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> - getTableFieldBuilder() { - if (tableBuilder_ == null) { - tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( - getTable(), - getParentForChildren(), - isClean()); - table_ = null; - } - return tableBuilder_; - } - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-     * Designated field in the BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-     * Designated field in the BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-     * Designated field in the BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Designated field in the BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Designated field in the BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Designated field in the BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-     * Designated field in the BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-     * Designated field in the BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-     * Designated field in the BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BigQueryField) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BigQueryField) - private static final com.google.privacy.dlp.v2.BigQueryField DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BigQueryField(); - } - - public static com.google.privacy.dlp.v2.BigQueryField getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryField parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryField(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryField getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryFieldOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryFieldOrBuilder.java deleted file mode 100644 index 3bac01196021..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryFieldOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface BigQueryFieldOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BigQueryField) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Source table of the field.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return Whether the table field is set. - */ - boolean hasTable(); - /** - *
-   * Source table of the field.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return The table. - */ - com.google.privacy.dlp.v2.BigQueryTable getTable(); - /** - *
-   * Source table of the field.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); - - /** - *
-   * Designated field in the BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-   * Designated field in the BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-   * Designated field in the BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKey.java deleted file mode 100644 index 375b48cb7d1c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKey.java +++ /dev/null @@ -1,762 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Row key for identifying a record in BigQuery table.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BigQueryKey} - */ -public final class BigQueryKey extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BigQueryKey) - BigQueryKeyOrBuilder { -private static final long serialVersionUID = 0L; - // Use BigQueryKey.newBuilder() to construct. - private BigQueryKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BigQueryKey() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BigQueryKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BigQueryKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (tableReference_ != null) { - subBuilder = tableReference_.toBuilder(); - } - tableReference_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tableReference_); - tableReference_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - rowNumber_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BigQueryKey.class, com.google.privacy.dlp.v2.BigQueryKey.Builder.class); - } - - public static final int TABLE_REFERENCE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.BigQueryTable tableReference_; - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return Whether the tableReference field is set. - */ - @java.lang.Override - public boolean hasTableReference() { - return tableReference_ != null; - } - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return The tableReference. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getTableReference() { - return tableReference_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; - } - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder() { - return getTableReference(); - } - - public static final int ROW_NUMBER_FIELD_NUMBER = 2; - private long rowNumber_; - /** - *
-   * Row number inferred at the time the table was scanned. This value is
-   * nondeterministic, cannot be queried, and may be null for inspection
-   * jobs. To locate findings within a table, specify
-   * `inspect_job.storage_config.big_query_options.identifying_fields` in
-   * `CreateDlpJobRequest`.
-   * 
- * - * int64 row_number = 2; - * @return The rowNumber. - */ - @java.lang.Override - public long getRowNumber() { - return rowNumber_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (tableReference_ != null) { - output.writeMessage(1, getTableReference()); - } - if (rowNumber_ != 0L) { - output.writeInt64(2, rowNumber_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (tableReference_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTableReference()); - } - if (rowNumber_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, rowNumber_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.BigQueryKey)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.BigQueryKey other = (com.google.privacy.dlp.v2.BigQueryKey) obj; - - if (hasTableReference() != other.hasTableReference()) return false; - if (hasTableReference()) { - if (!getTableReference() - .equals(other.getTableReference())) return false; - } - if (getRowNumber() - != other.getRowNumber()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTableReference()) { - hash = (37 * hash) + TABLE_REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getTableReference().hashCode(); - } - hash = (37 * hash) + ROW_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getRowNumber()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.BigQueryKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Row key for identifying a record in BigQuery table.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BigQueryKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BigQueryKey) - com.google.privacy.dlp.v2.BigQueryKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BigQueryKey.class, com.google.privacy.dlp.v2.BigQueryKey.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.BigQueryKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (tableReferenceBuilder_ == null) { - tableReference_ = null; - } else { - tableReference_ = null; - tableReferenceBuilder_ = null; - } - rowNumber_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryKey getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryKey build() { - com.google.privacy.dlp.v2.BigQueryKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryKey buildPartial() { - com.google.privacy.dlp.v2.BigQueryKey result = new com.google.privacy.dlp.v2.BigQueryKey(this); - if (tableReferenceBuilder_ == null) { - result.tableReference_ = tableReference_; - } else { - result.tableReference_ = tableReferenceBuilder_.build(); - } - result.rowNumber_ = rowNumber_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.BigQueryKey) { - return mergeFrom((com.google.privacy.dlp.v2.BigQueryKey)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.BigQueryKey other) { - if (other == com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance()) return this; - if (other.hasTableReference()) { - mergeTableReference(other.getTableReference()); - } - if (other.getRowNumber() != 0L) { - setRowNumber(other.getRowNumber()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.BigQueryKey parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.BigQueryKey) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.BigQueryTable tableReference_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableReferenceBuilder_; - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return Whether the tableReference field is set. - */ - public boolean hasTableReference() { - return tableReferenceBuilder_ != null || tableReference_ != null; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return The tableReference. - */ - public com.google.privacy.dlp.v2.BigQueryTable getTableReference() { - if (tableReferenceBuilder_ == null) { - return tableReference_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; - } else { - return tableReferenceBuilder_.getMessage(); - } - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public Builder setTableReference(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableReferenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableReference_ = value; - onChanged(); - } else { - tableReferenceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public Builder setTableReference( - com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { - if (tableReferenceBuilder_ == null) { - tableReference_ = builderForValue.build(); - onChanged(); - } else { - tableReferenceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public Builder mergeTableReference(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableReferenceBuilder_ == null) { - if (tableReference_ != null) { - tableReference_ = - com.google.privacy.dlp.v2.BigQueryTable.newBuilder(tableReference_).mergeFrom(value).buildPartial(); - } else { - tableReference_ = value; - } - onChanged(); - } else { - tableReferenceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public Builder clearTableReference() { - if (tableReferenceBuilder_ == null) { - tableReference_ = null; - onChanged(); - } else { - tableReference_ = null; - tableReferenceBuilder_ = null; - } - - return this; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableReferenceBuilder() { - - onChanged(); - return getTableReferenceFieldBuilder().getBuilder(); - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder() { - if (tableReferenceBuilder_ != null) { - return tableReferenceBuilder_.getMessageOrBuilder(); - } else { - return tableReference_ == null ? - com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; - } - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> - getTableReferenceFieldBuilder() { - if (tableReferenceBuilder_ == null) { - tableReferenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( - getTableReference(), - getParentForChildren(), - isClean()); - tableReference_ = null; - } - return tableReferenceBuilder_; - } - - private long rowNumber_ ; - /** - *
-     * Row number inferred at the time the table was scanned. This value is
-     * nondeterministic, cannot be queried, and may be null for inspection
-     * jobs. To locate findings within a table, specify
-     * `inspect_job.storage_config.big_query_options.identifying_fields` in
-     * `CreateDlpJobRequest`.
-     * 
- * - * int64 row_number = 2; - * @return The rowNumber. - */ - @java.lang.Override - public long getRowNumber() { - return rowNumber_; - } - /** - *
-     * Row number inferred at the time the table was scanned. This value is
-     * nondeterministic, cannot be queried, and may be null for inspection
-     * jobs. To locate findings within a table, specify
-     * `inspect_job.storage_config.big_query_options.identifying_fields` in
-     * `CreateDlpJobRequest`.
-     * 
- * - * int64 row_number = 2; - * @param value The rowNumber to set. - * @return This builder for chaining. - */ - public Builder setRowNumber(long value) { - - rowNumber_ = value; - onChanged(); - return this; - } - /** - *
-     * Row number inferred at the time the table was scanned. This value is
-     * nondeterministic, cannot be queried, and may be null for inspection
-     * jobs. To locate findings within a table, specify
-     * `inspect_job.storage_config.big_query_options.identifying_fields` in
-     * `CreateDlpJobRequest`.
-     * 
- * - * int64 row_number = 2; - * @return This builder for chaining. - */ - public Builder clearRowNumber() { - - rowNumber_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BigQueryKey) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BigQueryKey) - private static final com.google.privacy.dlp.v2.BigQueryKey DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BigQueryKey(); - } - - public static com.google.privacy.dlp.v2.BigQueryKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryKey(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKeyOrBuilder.java deleted file mode 100644 index 57154373582b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryKeyOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface BigQueryKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BigQueryKey) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return Whether the tableReference field is set. - */ - boolean hasTableReference(); - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return The tableReference. - */ - com.google.privacy.dlp.v2.BigQueryTable getTableReference(); - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder(); - - /** - *
-   * Row number inferred at the time the table was scanned. This value is
-   * nondeterministic, cannot be queried, and may be null for inspection
-   * jobs. To locate findings within a table, specify
-   * `inspect_job.storage_config.big_query_options.identifying_fields` in
-   * `CreateDlpJobRequest`.
-   * 
- * - * int64 row_number = 2; - * @return The rowNumber. - */ - long getRowNumber(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptions.java deleted file mode 100644 index 5e7e84619f60..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptions.java +++ /dev/null @@ -1,2531 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Options defining BigQuery table and row identifiers.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BigQueryOptions} - */ -public final class BigQueryOptions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BigQueryOptions) - BigQueryOptionsOrBuilder { -private static final long serialVersionUID = 0L; - // Use BigQueryOptions.newBuilder() to construct. - private BigQueryOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BigQueryOptions() { - identifyingFields_ = java.util.Collections.emptyList(); - sampleMethod_ = 0; - excludedFields_ = java.util.Collections.emptyList(); - includedFields_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BigQueryOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BigQueryOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (tableReference_ != null) { - subBuilder = tableReference_.toBuilder(); - } - tableReference_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tableReference_); - tableReference_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - identifyingFields_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - identifyingFields_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); - break; - } - case 24: { - - rowsLimit_ = input.readInt64(); - break; - } - case 32: { - int rawValue = input.readEnum(); - - sampleMethod_ = rawValue; - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - excludedFields_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - excludedFields_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); - break; - } - case 48: { - - rowsLimitPercent_ = input.readInt32(); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - includedFields_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - includedFields_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - identifyingFields_ = java.util.Collections.unmodifiableList(identifyingFields_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - excludedFields_ = java.util.Collections.unmodifiableList(excludedFields_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - includedFields_ = java.util.Collections.unmodifiableList(includedFields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BigQueryOptions.class, com.google.privacy.dlp.v2.BigQueryOptions.Builder.class); - } - - /** - *
-   * How to sample rows if not all rows are scanned. Meaningful only when used
-   * in conjunction with either rows_limit or rows_limit_percent. If not
-   * specified, rows are scanned in the order BigQuery reads them.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.BigQueryOptions.SampleMethod} - */ - public enum SampleMethod - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SAMPLE_METHOD_UNSPECIFIED = 0; - */ - SAMPLE_METHOD_UNSPECIFIED(0), - /** - *
-     * Scan groups of rows in the order BigQuery provides (default). Multiple
-     * groups of rows may be scanned in parallel, so results may not appear in
-     * the same order the rows are read.
-     * 
- * - * TOP = 1; - */ - TOP(1), - /** - *
-     * Randomly pick groups of rows to scan.
-     * 
- * - * RANDOM_START = 2; - */ - RANDOM_START(2), - UNRECOGNIZED(-1), - ; - - /** - * SAMPLE_METHOD_UNSPECIFIED = 0; - */ - public static final int SAMPLE_METHOD_UNSPECIFIED_VALUE = 0; - /** - *
-     * Scan groups of rows in the order BigQuery provides (default). Multiple
-     * groups of rows may be scanned in parallel, so results may not appear in
-     * the same order the rows are read.
-     * 
- * - * TOP = 1; - */ - public static final int TOP_VALUE = 1; - /** - *
-     * Randomly pick groups of rows to scan.
-     * 
- * - * RANDOM_START = 2; - */ - public static final int RANDOM_START_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SampleMethod valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static SampleMethod forNumber(int value) { - switch (value) { - case 0: return SAMPLE_METHOD_UNSPECIFIED; - case 1: return TOP; - case 2: return RANDOM_START; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SampleMethod> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SampleMethod findValueByNumber(int number) { - return SampleMethod.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.BigQueryOptions.getDescriptor().getEnumTypes().get(0); - } - - private static final SampleMethod[] VALUES = values(); - - public static SampleMethod valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private SampleMethod(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.BigQueryOptions.SampleMethod) - } - - public static final int TABLE_REFERENCE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.BigQueryTable tableReference_; - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return Whether the tableReference field is set. - */ - @java.lang.Override - public boolean hasTableReference() { - return tableReference_ != null; - } - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return The tableReference. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getTableReference() { - return tableReference_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; - } - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder() { - return getTableReference(); - } - - public static final int IDENTIFYING_FIELDS_FIELD_NUMBER = 2; - private java.util.List identifyingFields_; - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - @java.lang.Override - public java.util.List getIdentifyingFieldsList() { - return identifyingFields_; - } - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - @java.lang.Override - public java.util.List - getIdentifyingFieldsOrBuilderList() { - return identifyingFields_; - } - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - @java.lang.Override - public int getIdentifyingFieldsCount() { - return identifyingFields_.size(); - } - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index) { - return identifyingFields_.get(index); - } - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( - int index) { - return identifyingFields_.get(index); - } - - public static final int ROWS_LIMIT_FIELD_NUMBER = 3; - private long rowsLimit_; - /** - *
-   * Max number of rows to scan. If the table has more rows than this value, the
-   * rest of the rows are omitted. If not set, or if set to 0, all rows will be
-   * scanned. Only one of rows_limit and rows_limit_percent can be specified.
-   * Cannot be used in conjunction with TimespanConfig.
-   * 
- * - * int64 rows_limit = 3; - * @return The rowsLimit. - */ - @java.lang.Override - public long getRowsLimit() { - return rowsLimit_; - } - - public static final int ROWS_LIMIT_PERCENT_FIELD_NUMBER = 6; - private int rowsLimitPercent_; - /** - *
-   * Max percentage of rows to scan. The rest are omitted. The number of rows
-   * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
-   * 100 means no limit. Defaults to 0. Only one of rows_limit and
-   * rows_limit_percent can be specified. Cannot be used in conjunction with
-   * TimespanConfig.
-   * 
- * - * int32 rows_limit_percent = 6; - * @return The rowsLimitPercent. - */ - @java.lang.Override - public int getRowsLimitPercent() { - return rowsLimitPercent_; - } - - public static final int SAMPLE_METHOD_FIELD_NUMBER = 4; - private int sampleMethod_; - /** - * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; - * @return The enum numeric value on the wire for sampleMethod. - */ - @java.lang.Override public int getSampleMethodValue() { - return sampleMethod_; - } - /** - * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; - * @return The sampleMethod. - */ - @java.lang.Override public com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod getSampleMethod() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod result = com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.valueOf(sampleMethod_); - return result == null ? com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.UNRECOGNIZED : result; - } - - public static final int EXCLUDED_FIELDS_FIELD_NUMBER = 5; - private java.util.List excludedFields_; - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - @java.lang.Override - public java.util.List getExcludedFieldsList() { - return excludedFields_; - } - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - @java.lang.Override - public java.util.List - getExcludedFieldsOrBuilderList() { - return excludedFields_; - } - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - @java.lang.Override - public int getExcludedFieldsCount() { - return excludedFields_.size(); - } - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getExcludedFields(int index) { - return excludedFields_.get(index); - } - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getExcludedFieldsOrBuilder( - int index) { - return excludedFields_.get(index); - } - - public static final int INCLUDED_FIELDS_FIELD_NUMBER = 7; - private java.util.List includedFields_; - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - @java.lang.Override - public java.util.List getIncludedFieldsList() { - return includedFields_; - } - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - @java.lang.Override - public java.util.List - getIncludedFieldsOrBuilderList() { - return includedFields_; - } - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - @java.lang.Override - public int getIncludedFieldsCount() { - return includedFields_.size(); - } - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getIncludedFields(int index) { - return includedFields_.get(index); - } - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getIncludedFieldsOrBuilder( - int index) { - return includedFields_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (tableReference_ != null) { - output.writeMessage(1, getTableReference()); - } - for (int i = 0; i < identifyingFields_.size(); i++) { - output.writeMessage(2, identifyingFields_.get(i)); - } - if (rowsLimit_ != 0L) { - output.writeInt64(3, rowsLimit_); - } - if (sampleMethod_ != com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED.getNumber()) { - output.writeEnum(4, sampleMethod_); - } - for (int i = 0; i < excludedFields_.size(); i++) { - output.writeMessage(5, excludedFields_.get(i)); - } - if (rowsLimitPercent_ != 0) { - output.writeInt32(6, rowsLimitPercent_); - } - for (int i = 0; i < includedFields_.size(); i++) { - output.writeMessage(7, includedFields_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (tableReference_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getTableReference()); - } - for (int i = 0; i < identifyingFields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, identifyingFields_.get(i)); - } - if (rowsLimit_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, rowsLimit_); - } - if (sampleMethod_ != com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, sampleMethod_); - } - for (int i = 0; i < excludedFields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, excludedFields_.get(i)); - } - if (rowsLimitPercent_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, rowsLimitPercent_); - } - for (int i = 0; i < includedFields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, includedFields_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.BigQueryOptions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.BigQueryOptions other = (com.google.privacy.dlp.v2.BigQueryOptions) obj; - - if (hasTableReference() != other.hasTableReference()) return false; - if (hasTableReference()) { - if (!getTableReference() - .equals(other.getTableReference())) return false; - } - if (!getIdentifyingFieldsList() - .equals(other.getIdentifyingFieldsList())) return false; - if (getRowsLimit() - != other.getRowsLimit()) return false; - if (getRowsLimitPercent() - != other.getRowsLimitPercent()) return false; - if (sampleMethod_ != other.sampleMethod_) return false; - if (!getExcludedFieldsList() - .equals(other.getExcludedFieldsList())) return false; - if (!getIncludedFieldsList() - .equals(other.getIncludedFieldsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTableReference()) { - hash = (37 * hash) + TABLE_REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getTableReference().hashCode(); - } - if (getIdentifyingFieldsCount() > 0) { - hash = (37 * hash) + IDENTIFYING_FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getIdentifyingFieldsList().hashCode(); - } - hash = (37 * hash) + ROWS_LIMIT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getRowsLimit()); - hash = (37 * hash) + ROWS_LIMIT_PERCENT_FIELD_NUMBER; - hash = (53 * hash) + getRowsLimitPercent(); - hash = (37 * hash) + SAMPLE_METHOD_FIELD_NUMBER; - hash = (53 * hash) + sampleMethod_; - if (getExcludedFieldsCount() > 0) { - hash = (37 * hash) + EXCLUDED_FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getExcludedFieldsList().hashCode(); - } - if (getIncludedFieldsCount() > 0) { - hash = (37 * hash) + INCLUDED_FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getIncludedFieldsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.BigQueryOptions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Options defining BigQuery table and row identifiers.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BigQueryOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BigQueryOptions) - com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BigQueryOptions.class, com.google.privacy.dlp.v2.BigQueryOptions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.BigQueryOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getIdentifyingFieldsFieldBuilder(); - getExcludedFieldsFieldBuilder(); - getIncludedFieldsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (tableReferenceBuilder_ == null) { - tableReference_ = null; - } else { - tableReference_ = null; - tableReferenceBuilder_ = null; - } - if (identifyingFieldsBuilder_ == null) { - identifyingFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - identifyingFieldsBuilder_.clear(); - } - rowsLimit_ = 0L; - - rowsLimitPercent_ = 0; - - sampleMethod_ = 0; - - if (excludedFieldsBuilder_ == null) { - excludedFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - excludedFieldsBuilder_.clear(); - } - if (includedFieldsBuilder_ == null) { - includedFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - includedFieldsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryOptions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryOptions build() { - com.google.privacy.dlp.v2.BigQueryOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryOptions buildPartial() { - com.google.privacy.dlp.v2.BigQueryOptions result = new com.google.privacy.dlp.v2.BigQueryOptions(this); - int from_bitField0_ = bitField0_; - if (tableReferenceBuilder_ == null) { - result.tableReference_ = tableReference_; - } else { - result.tableReference_ = tableReferenceBuilder_.build(); - } - if (identifyingFieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - identifyingFields_ = java.util.Collections.unmodifiableList(identifyingFields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.identifyingFields_ = identifyingFields_; - } else { - result.identifyingFields_ = identifyingFieldsBuilder_.build(); - } - result.rowsLimit_ = rowsLimit_; - result.rowsLimitPercent_ = rowsLimitPercent_; - result.sampleMethod_ = sampleMethod_; - if (excludedFieldsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - excludedFields_ = java.util.Collections.unmodifiableList(excludedFields_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.excludedFields_ = excludedFields_; - } else { - result.excludedFields_ = excludedFieldsBuilder_.build(); - } - if (includedFieldsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - includedFields_ = java.util.Collections.unmodifiableList(includedFields_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.includedFields_ = includedFields_; - } else { - result.includedFields_ = includedFieldsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.BigQueryOptions) { - return mergeFrom((com.google.privacy.dlp.v2.BigQueryOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.BigQueryOptions other) { - if (other == com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance()) return this; - if (other.hasTableReference()) { - mergeTableReference(other.getTableReference()); - } - if (identifyingFieldsBuilder_ == null) { - if (!other.identifyingFields_.isEmpty()) { - if (identifyingFields_.isEmpty()) { - identifyingFields_ = other.identifyingFields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.addAll(other.identifyingFields_); - } - onChanged(); - } - } else { - if (!other.identifyingFields_.isEmpty()) { - if (identifyingFieldsBuilder_.isEmpty()) { - identifyingFieldsBuilder_.dispose(); - identifyingFieldsBuilder_ = null; - identifyingFields_ = other.identifyingFields_; - bitField0_ = (bitField0_ & ~0x00000001); - identifyingFieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getIdentifyingFieldsFieldBuilder() : null; - } else { - identifyingFieldsBuilder_.addAllMessages(other.identifyingFields_); - } - } - } - if (other.getRowsLimit() != 0L) { - setRowsLimit(other.getRowsLimit()); - } - if (other.getRowsLimitPercent() != 0) { - setRowsLimitPercent(other.getRowsLimitPercent()); - } - if (other.sampleMethod_ != 0) { - setSampleMethodValue(other.getSampleMethodValue()); - } - if (excludedFieldsBuilder_ == null) { - if (!other.excludedFields_.isEmpty()) { - if (excludedFields_.isEmpty()) { - excludedFields_ = other.excludedFields_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureExcludedFieldsIsMutable(); - excludedFields_.addAll(other.excludedFields_); - } - onChanged(); - } - } else { - if (!other.excludedFields_.isEmpty()) { - if (excludedFieldsBuilder_.isEmpty()) { - excludedFieldsBuilder_.dispose(); - excludedFieldsBuilder_ = null; - excludedFields_ = other.excludedFields_; - bitField0_ = (bitField0_ & ~0x00000002); - excludedFieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getExcludedFieldsFieldBuilder() : null; - } else { - excludedFieldsBuilder_.addAllMessages(other.excludedFields_); - } - } - } - if (includedFieldsBuilder_ == null) { - if (!other.includedFields_.isEmpty()) { - if (includedFields_.isEmpty()) { - includedFields_ = other.includedFields_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureIncludedFieldsIsMutable(); - includedFields_.addAll(other.includedFields_); - } - onChanged(); - } - } else { - if (!other.includedFields_.isEmpty()) { - if (includedFieldsBuilder_.isEmpty()) { - includedFieldsBuilder_.dispose(); - includedFieldsBuilder_ = null; - includedFields_ = other.includedFields_; - bitField0_ = (bitField0_ & ~0x00000004); - includedFieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getIncludedFieldsFieldBuilder() : null; - } else { - includedFieldsBuilder_.addAllMessages(other.includedFields_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.BigQueryOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.BigQueryOptions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.BigQueryTable tableReference_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableReferenceBuilder_; - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return Whether the tableReference field is set. - */ - public boolean hasTableReference() { - return tableReferenceBuilder_ != null || tableReference_ != null; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return The tableReference. - */ - public com.google.privacy.dlp.v2.BigQueryTable getTableReference() { - if (tableReferenceBuilder_ == null) { - return tableReference_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; - } else { - return tableReferenceBuilder_.getMessage(); - } - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public Builder setTableReference(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableReferenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableReference_ = value; - onChanged(); - } else { - tableReferenceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public Builder setTableReference( - com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { - if (tableReferenceBuilder_ == null) { - tableReference_ = builderForValue.build(); - onChanged(); - } else { - tableReferenceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public Builder mergeTableReference(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableReferenceBuilder_ == null) { - if (tableReference_ != null) { - tableReference_ = - com.google.privacy.dlp.v2.BigQueryTable.newBuilder(tableReference_).mergeFrom(value).buildPartial(); - } else { - tableReference_ = value; - } - onChanged(); - } else { - tableReferenceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public Builder clearTableReference() { - if (tableReferenceBuilder_ == null) { - tableReference_ = null; - onChanged(); - } else { - tableReference_ = null; - tableReferenceBuilder_ = null; - } - - return this; - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableReferenceBuilder() { - - onChanged(); - return getTableReferenceFieldBuilder().getBuilder(); - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder() { - if (tableReferenceBuilder_ != null) { - return tableReferenceBuilder_.getMessageOrBuilder(); - } else { - return tableReference_ == null ? - com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : tableReference_; - } - } - /** - *
-     * Complete BigQuery table reference.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> - getTableReferenceFieldBuilder() { - if (tableReferenceBuilder_ == null) { - tableReferenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( - getTableReference(), - getParentForChildren(), - isClean()); - tableReference_ = null; - } - return tableReferenceBuilder_; - } - - private java.util.List identifyingFields_ = - java.util.Collections.emptyList(); - private void ensureIdentifyingFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - identifyingFields_ = new java.util.ArrayList(identifyingFields_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> identifyingFieldsBuilder_; - - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public java.util.List getIdentifyingFieldsList() { - if (identifyingFieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(identifyingFields_); - } else { - return identifyingFieldsBuilder_.getMessageList(); - } - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public int getIdentifyingFieldsCount() { - if (identifyingFieldsBuilder_ == null) { - return identifyingFields_.size(); - } else { - return identifyingFieldsBuilder_.getCount(); - } - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index) { - if (identifyingFieldsBuilder_ == null) { - return identifyingFields_.get(index); - } else { - return identifyingFieldsBuilder_.getMessage(index); - } - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public Builder setIdentifyingFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (identifyingFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.set(index, value); - onChanged(); - } else { - identifyingFieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public Builder setIdentifyingFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.set(index, builderForValue.build()); - onChanged(); - } else { - identifyingFieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public Builder addIdentifyingFields(com.google.privacy.dlp.v2.FieldId value) { - if (identifyingFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.add(value); - onChanged(); - } else { - identifyingFieldsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public Builder addIdentifyingFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (identifyingFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.add(index, value); - onChanged(); - } else { - identifyingFieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public Builder addIdentifyingFields( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.add(builderForValue.build()); - onChanged(); - } else { - identifyingFieldsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public Builder addIdentifyingFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.add(index, builderForValue.build()); - onChanged(); - } else { - identifyingFieldsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public Builder addAllIdentifyingFields( - java.lang.Iterable values) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, identifyingFields_); - onChanged(); - } else { - identifyingFieldsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public Builder clearIdentifyingFields() { - if (identifyingFieldsBuilder_ == null) { - identifyingFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - identifyingFieldsBuilder_.clear(); - } - return this; - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public Builder removeIdentifyingFields(int index) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.remove(index); - onChanged(); - } else { - identifyingFieldsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getIdentifyingFieldsBuilder( - int index) { - return getIdentifyingFieldsFieldBuilder().getBuilder(index); - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( - int index) { - if (identifyingFieldsBuilder_ == null) { - return identifyingFields_.get(index); } else { - return identifyingFieldsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public java.util.List - getIdentifyingFieldsOrBuilderList() { - if (identifyingFieldsBuilder_ != null) { - return identifyingFieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(identifyingFields_); - } - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addIdentifyingFieldsBuilder() { - return getIdentifyingFieldsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addIdentifyingFieldsBuilder( - int index) { - return getIdentifyingFieldsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * Table fields that may uniquely identify a row within the table. When
-     * `actions.saveFindings.outputConfig.table` is specified, the values of
-     * columns specified here are available in the output table under
-     * `location.content_locations.record_location.record_key.id_values`. Nested
-     * fields such as `person.birthdate.year` are allowed.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - public java.util.List - getIdentifyingFieldsBuilderList() { - return getIdentifyingFieldsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getIdentifyingFieldsFieldBuilder() { - if (identifyingFieldsBuilder_ == null) { - identifyingFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - identifyingFields_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - identifyingFields_ = null; - } - return identifyingFieldsBuilder_; - } - - private long rowsLimit_ ; - /** - *
-     * Max number of rows to scan. If the table has more rows than this value, the
-     * rest of the rows are omitted. If not set, or if set to 0, all rows will be
-     * scanned. Only one of rows_limit and rows_limit_percent can be specified.
-     * Cannot be used in conjunction with TimespanConfig.
-     * 
- * - * int64 rows_limit = 3; - * @return The rowsLimit. - */ - @java.lang.Override - public long getRowsLimit() { - return rowsLimit_; - } - /** - *
-     * Max number of rows to scan. If the table has more rows than this value, the
-     * rest of the rows are omitted. If not set, or if set to 0, all rows will be
-     * scanned. Only one of rows_limit and rows_limit_percent can be specified.
-     * Cannot be used in conjunction with TimespanConfig.
-     * 
- * - * int64 rows_limit = 3; - * @param value The rowsLimit to set. - * @return This builder for chaining. - */ - public Builder setRowsLimit(long value) { - - rowsLimit_ = value; - onChanged(); - return this; - } - /** - *
-     * Max number of rows to scan. If the table has more rows than this value, the
-     * rest of the rows are omitted. If not set, or if set to 0, all rows will be
-     * scanned. Only one of rows_limit and rows_limit_percent can be specified.
-     * Cannot be used in conjunction with TimespanConfig.
-     * 
- * - * int64 rows_limit = 3; - * @return This builder for chaining. - */ - public Builder clearRowsLimit() { - - rowsLimit_ = 0L; - onChanged(); - return this; - } - - private int rowsLimitPercent_ ; - /** - *
-     * Max percentage of rows to scan. The rest are omitted. The number of rows
-     * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
-     * 100 means no limit. Defaults to 0. Only one of rows_limit and
-     * rows_limit_percent can be specified. Cannot be used in conjunction with
-     * TimespanConfig.
-     * 
- * - * int32 rows_limit_percent = 6; - * @return The rowsLimitPercent. - */ - @java.lang.Override - public int getRowsLimitPercent() { - return rowsLimitPercent_; - } - /** - *
-     * Max percentage of rows to scan. The rest are omitted. The number of rows
-     * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
-     * 100 means no limit. Defaults to 0. Only one of rows_limit and
-     * rows_limit_percent can be specified. Cannot be used in conjunction with
-     * TimespanConfig.
-     * 
- * - * int32 rows_limit_percent = 6; - * @param value The rowsLimitPercent to set. - * @return This builder for chaining. - */ - public Builder setRowsLimitPercent(int value) { - - rowsLimitPercent_ = value; - onChanged(); - return this; - } - /** - *
-     * Max percentage of rows to scan. The rest are omitted. The number of rows
-     * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
-     * 100 means no limit. Defaults to 0. Only one of rows_limit and
-     * rows_limit_percent can be specified. Cannot be used in conjunction with
-     * TimespanConfig.
-     * 
- * - * int32 rows_limit_percent = 6; - * @return This builder for chaining. - */ - public Builder clearRowsLimitPercent() { - - rowsLimitPercent_ = 0; - onChanged(); - return this; - } - - private int sampleMethod_ = 0; - /** - * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; - * @return The enum numeric value on the wire for sampleMethod. - */ - @java.lang.Override public int getSampleMethodValue() { - return sampleMethod_; - } - /** - * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; - * @param value The enum numeric value on the wire for sampleMethod to set. - * @return This builder for chaining. - */ - public Builder setSampleMethodValue(int value) { - - sampleMethod_ = value; - onChanged(); - return this; - } - /** - * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; - * @return The sampleMethod. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod getSampleMethod() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod result = com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.valueOf(sampleMethod_); - return result == null ? com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod.UNRECOGNIZED : result; - } - /** - * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; - * @param value The sampleMethod to set. - * @return This builder for chaining. - */ - public Builder setSampleMethod(com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod value) { - if (value == null) { - throw new NullPointerException(); - } - - sampleMethod_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; - * @return This builder for chaining. - */ - public Builder clearSampleMethod() { - - sampleMethod_ = 0; - onChanged(); - return this; - } - - private java.util.List excludedFields_ = - java.util.Collections.emptyList(); - private void ensureExcludedFieldsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - excludedFields_ = new java.util.ArrayList(excludedFields_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> excludedFieldsBuilder_; - - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public java.util.List getExcludedFieldsList() { - if (excludedFieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(excludedFields_); - } else { - return excludedFieldsBuilder_.getMessageList(); - } - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public int getExcludedFieldsCount() { - if (excludedFieldsBuilder_ == null) { - return excludedFields_.size(); - } else { - return excludedFieldsBuilder_.getCount(); - } - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public com.google.privacy.dlp.v2.FieldId getExcludedFields(int index) { - if (excludedFieldsBuilder_ == null) { - return excludedFields_.get(index); - } else { - return excludedFieldsBuilder_.getMessage(index); - } - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public Builder setExcludedFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (excludedFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludedFieldsIsMutable(); - excludedFields_.set(index, value); - onChanged(); - } else { - excludedFieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public Builder setExcludedFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (excludedFieldsBuilder_ == null) { - ensureExcludedFieldsIsMutable(); - excludedFields_.set(index, builderForValue.build()); - onChanged(); - } else { - excludedFieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public Builder addExcludedFields(com.google.privacy.dlp.v2.FieldId value) { - if (excludedFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludedFieldsIsMutable(); - excludedFields_.add(value); - onChanged(); - } else { - excludedFieldsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public Builder addExcludedFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (excludedFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludedFieldsIsMutable(); - excludedFields_.add(index, value); - onChanged(); - } else { - excludedFieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public Builder addExcludedFields( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (excludedFieldsBuilder_ == null) { - ensureExcludedFieldsIsMutable(); - excludedFields_.add(builderForValue.build()); - onChanged(); - } else { - excludedFieldsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public Builder addExcludedFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (excludedFieldsBuilder_ == null) { - ensureExcludedFieldsIsMutable(); - excludedFields_.add(index, builderForValue.build()); - onChanged(); - } else { - excludedFieldsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public Builder addAllExcludedFields( - java.lang.Iterable values) { - if (excludedFieldsBuilder_ == null) { - ensureExcludedFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, excludedFields_); - onChanged(); - } else { - excludedFieldsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public Builder clearExcludedFields() { - if (excludedFieldsBuilder_ == null) { - excludedFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - excludedFieldsBuilder_.clear(); - } - return this; - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public Builder removeExcludedFields(int index) { - if (excludedFieldsBuilder_ == null) { - ensureExcludedFieldsIsMutable(); - excludedFields_.remove(index); - onChanged(); - } else { - excludedFieldsBuilder_.remove(index); - } - return this; - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getExcludedFieldsBuilder( - int index) { - return getExcludedFieldsFieldBuilder().getBuilder(index); - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getExcludedFieldsOrBuilder( - int index) { - if (excludedFieldsBuilder_ == null) { - return excludedFields_.get(index); } else { - return excludedFieldsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public java.util.List - getExcludedFieldsOrBuilderList() { - if (excludedFieldsBuilder_ != null) { - return excludedFieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(excludedFields_); - } - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addExcludedFieldsBuilder() { - return getExcludedFieldsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addExcludedFieldsBuilder( - int index) { - return getExcludedFieldsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * References to fields excluded from scanning. This allows you to skip
-     * inspection of entire columns which you know have no findings.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - public java.util.List - getExcludedFieldsBuilderList() { - return getExcludedFieldsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getExcludedFieldsFieldBuilder() { - if (excludedFieldsBuilder_ == null) { - excludedFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - excludedFields_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - excludedFields_ = null; - } - return excludedFieldsBuilder_; - } - - private java.util.List includedFields_ = - java.util.Collections.emptyList(); - private void ensureIncludedFieldsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - includedFields_ = new java.util.ArrayList(includedFields_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> includedFieldsBuilder_; - - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public java.util.List getIncludedFieldsList() { - if (includedFieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(includedFields_); - } else { - return includedFieldsBuilder_.getMessageList(); - } - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public int getIncludedFieldsCount() { - if (includedFieldsBuilder_ == null) { - return includedFields_.size(); - } else { - return includedFieldsBuilder_.getCount(); - } - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public com.google.privacy.dlp.v2.FieldId getIncludedFields(int index) { - if (includedFieldsBuilder_ == null) { - return includedFields_.get(index); - } else { - return includedFieldsBuilder_.getMessage(index); - } - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public Builder setIncludedFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (includedFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludedFieldsIsMutable(); - includedFields_.set(index, value); - onChanged(); - } else { - includedFieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public Builder setIncludedFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (includedFieldsBuilder_ == null) { - ensureIncludedFieldsIsMutable(); - includedFields_.set(index, builderForValue.build()); - onChanged(); - } else { - includedFieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public Builder addIncludedFields(com.google.privacy.dlp.v2.FieldId value) { - if (includedFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludedFieldsIsMutable(); - includedFields_.add(value); - onChanged(); - } else { - includedFieldsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public Builder addIncludedFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (includedFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludedFieldsIsMutable(); - includedFields_.add(index, value); - onChanged(); - } else { - includedFieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public Builder addIncludedFields( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (includedFieldsBuilder_ == null) { - ensureIncludedFieldsIsMutable(); - includedFields_.add(builderForValue.build()); - onChanged(); - } else { - includedFieldsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public Builder addIncludedFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (includedFieldsBuilder_ == null) { - ensureIncludedFieldsIsMutable(); - includedFields_.add(index, builderForValue.build()); - onChanged(); - } else { - includedFieldsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public Builder addAllIncludedFields( - java.lang.Iterable values) { - if (includedFieldsBuilder_ == null) { - ensureIncludedFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, includedFields_); - onChanged(); - } else { - includedFieldsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public Builder clearIncludedFields() { - if (includedFieldsBuilder_ == null) { - includedFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - includedFieldsBuilder_.clear(); - } - return this; - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public Builder removeIncludedFields(int index) { - if (includedFieldsBuilder_ == null) { - ensureIncludedFieldsIsMutable(); - includedFields_.remove(index); - onChanged(); - } else { - includedFieldsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getIncludedFieldsBuilder( - int index) { - return getIncludedFieldsFieldBuilder().getBuilder(index); - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getIncludedFieldsOrBuilder( - int index) { - if (includedFieldsBuilder_ == null) { - return includedFields_.get(index); } else { - return includedFieldsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public java.util.List - getIncludedFieldsOrBuilderList() { - if (includedFieldsBuilder_ != null) { - return includedFieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(includedFields_); - } - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addIncludedFieldsBuilder() { - return getIncludedFieldsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addIncludedFieldsBuilder( - int index) { - return getIncludedFieldsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * Limit scanning only to these fields.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - public java.util.List - getIncludedFieldsBuilderList() { - return getIncludedFieldsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getIncludedFieldsFieldBuilder() { - if (includedFieldsBuilder_ == null) { - includedFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - includedFields_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - includedFields_ = null; - } - return includedFieldsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BigQueryOptions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BigQueryOptions) - private static final com.google.privacy.dlp.v2.BigQueryOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BigQueryOptions(); - } - - public static com.google.privacy.dlp.v2.BigQueryOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryOptions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptionsOrBuilder.java deleted file mode 100644 index 6b5cb5f22552..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryOptionsOrBuilder.java +++ /dev/null @@ -1,231 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface BigQueryOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BigQueryOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return Whether the tableReference field is set. - */ - boolean hasTableReference(); - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - * @return The tableReference. - */ - com.google.privacy.dlp.v2.BigQueryTable getTableReference(); - /** - *
-   * Complete BigQuery table reference.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table_reference = 1; - */ - com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableReferenceOrBuilder(); - - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - java.util.List - getIdentifyingFieldsList(); - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index); - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - int getIdentifyingFieldsCount(); - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - java.util.List - getIdentifyingFieldsOrBuilderList(); - /** - *
-   * Table fields that may uniquely identify a row within the table. When
-   * `actions.saveFindings.outputConfig.table` is specified, the values of
-   * columns specified here are available in the output table under
-   * `location.content_locations.record_location.record_key.id_values`. Nested
-   * fields such as `person.birthdate.year` are allowed.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 2; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( - int index); - - /** - *
-   * Max number of rows to scan. If the table has more rows than this value, the
-   * rest of the rows are omitted. If not set, or if set to 0, all rows will be
-   * scanned. Only one of rows_limit and rows_limit_percent can be specified.
-   * Cannot be used in conjunction with TimespanConfig.
-   * 
- * - * int64 rows_limit = 3; - * @return The rowsLimit. - */ - long getRowsLimit(); - - /** - *
-   * Max percentage of rows to scan. The rest are omitted. The number of rows
-   * scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
-   * 100 means no limit. Defaults to 0. Only one of rows_limit and
-   * rows_limit_percent can be specified. Cannot be used in conjunction with
-   * TimespanConfig.
-   * 
- * - * int32 rows_limit_percent = 6; - * @return The rowsLimitPercent. - */ - int getRowsLimitPercent(); - - /** - * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; - * @return The enum numeric value on the wire for sampleMethod. - */ - int getSampleMethodValue(); - /** - * .google.privacy.dlp.v2.BigQueryOptions.SampleMethod sample_method = 4; - * @return The sampleMethod. - */ - com.google.privacy.dlp.v2.BigQueryOptions.SampleMethod getSampleMethod(); - - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - java.util.List - getExcludedFieldsList(); - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - com.google.privacy.dlp.v2.FieldId getExcludedFields(int index); - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - int getExcludedFieldsCount(); - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - java.util.List - getExcludedFieldsOrBuilderList(); - /** - *
-   * References to fields excluded from scanning. This allows you to skip
-   * inspection of entire columns which you know have no findings.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId excluded_fields = 5; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getExcludedFieldsOrBuilder( - int index); - - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - java.util.List - getIncludedFieldsList(); - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - com.google.privacy.dlp.v2.FieldId getIncludedFields(int index); - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - int getIncludedFieldsCount(); - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - java.util.List - getIncludedFieldsOrBuilderList(); - /** - *
-   * Limit scanning only to these fields.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId included_fields = 7; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getIncludedFieldsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTable.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTable.java deleted file mode 100644 index e41dbab7ed31..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTable.java +++ /dev/null @@ -1,942 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Message defining the location of a BigQuery table. A table is uniquely
- * identified  by its project_id, dataset_id, and table_name. Within a query
- * a table is often referenced with a string in the format of:
- * `<project_id>:<dataset_id>.<table_id>` or
- * `<project_id>.<dataset_id>.<table_id>`.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BigQueryTable} - */ -public final class BigQueryTable extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BigQueryTable) - BigQueryTableOrBuilder { -private static final long serialVersionUID = 0L; - // Use BigQueryTable.newBuilder() to construct. - private BigQueryTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BigQueryTable() { - projectId_ = ""; - datasetId_ = ""; - tableId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BigQueryTable(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BigQueryTable( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - datasetId_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BigQueryTable.class, com.google.privacy.dlp.v2.BigQueryTable.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object projectId_; - /** - *
-   * The Google Cloud Platform project ID of the project containing the table.
-   * If omitted, project ID is inferred from the API call.
-   * 
- * - * string project_id = 1; - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - *
-   * The Google Cloud Platform project ID of the project containing the table.
-   * If omitted, project ID is inferred from the API call.
-   * 
- * - * string project_id = 1; - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATASET_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object datasetId_; - /** - *
-   * Dataset ID of the table.
-   * 
- * - * string dataset_id = 2; - * @return The datasetId. - */ - @java.lang.Override - public java.lang.String getDatasetId() { - java.lang.Object ref = datasetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetId_ = s; - return s; - } - } - /** - *
-   * Dataset ID of the table.
-   * 
- * - * string dataset_id = 2; - * @return The bytes for datasetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDatasetIdBytes() { - java.lang.Object ref = datasetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - datasetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object tableId_; - /** - *
-   * Name of the table.
-   * 
- * - * string table_id = 3; - * @return The tableId. - */ - @java.lang.Override - public java.lang.String getTableId() { - java.lang.Object ref = tableId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableId_ = s; - return s; - } - } - /** - *
-   * Name of the table.
-   * 
- * - * string table_id = 3; - * @return The bytes for tableId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTableIdBytes() { - java.lang.Object ref = tableId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tableId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, datasetId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, datasetId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.BigQueryTable)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.BigQueryTable other = (com.google.privacy.dlp.v2.BigQueryTable) obj; - - if (!getProjectId() - .equals(other.getProjectId())) return false; - if (!getDatasetId() - .equals(other.getDatasetId())) return false; - if (!getTableId() - .equals(other.getTableId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; - hash = (53 * hash) + getDatasetId().hashCode(); - hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; - hash = (53 * hash) + getTableId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BigQueryTable parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.BigQueryTable prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Message defining the location of a BigQuery table. A table is uniquely
-   * identified  by its project_id, dataset_id, and table_name. Within a query
-   * a table is often referenced with a string in the format of:
-   * `<project_id>:<dataset_id>.<table_id>` or
-   * `<project_id>.<dataset_id>.<table_id>`.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BigQueryTable} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BigQueryTable) - com.google.privacy.dlp.v2.BigQueryTableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BigQueryTable.class, com.google.privacy.dlp.v2.BigQueryTable.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.BigQueryTable.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - projectId_ = ""; - - datasetId_ = ""; - - tableId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable build() { - com.google.privacy.dlp.v2.BigQueryTable result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable buildPartial() { - com.google.privacy.dlp.v2.BigQueryTable result = new com.google.privacy.dlp.v2.BigQueryTable(this); - result.projectId_ = projectId_; - result.datasetId_ = datasetId_; - result.tableId_ = tableId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.BigQueryTable) { - return mergeFrom((com.google.privacy.dlp.v2.BigQueryTable)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.BigQueryTable other) { - if (other == com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getDatasetId().isEmpty()) { - datasetId_ = other.datasetId_; - onChanged(); - } - if (!other.getTableId().isEmpty()) { - tableId_ = other.tableId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.BigQueryTable parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.BigQueryTable) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - *
-     * The Google Cloud Platform project ID of the project containing the table.
-     * If omitted, project ID is inferred from the API call.
-     * 
- * - * string project_id = 1; - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The Google Cloud Platform project ID of the project containing the table.
-     * If omitted, project ID is inferred from the API call.
-     * 
- * - * string project_id = 1; - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The Google Cloud Platform project ID of the project containing the table.
-     * If omitted, project ID is inferred from the API call.
-     * 
- * - * string project_id = 1; - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - *
-     * The Google Cloud Platform project ID of the project containing the table.
-     * If omitted, project ID is inferred from the API call.
-     * 
- * - * string project_id = 1; - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - *
-     * The Google Cloud Platform project ID of the project containing the table.
-     * If omitted, project ID is inferred from the API call.
-     * 
- * - * string project_id = 1; - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object datasetId_ = ""; - /** - *
-     * Dataset ID of the table.
-     * 
- * - * string dataset_id = 2; - * @return The datasetId. - */ - public java.lang.String getDatasetId() { - java.lang.Object ref = datasetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Dataset ID of the table.
-     * 
- * - * string dataset_id = 2; - * @return The bytes for datasetId. - */ - public com.google.protobuf.ByteString - getDatasetIdBytes() { - java.lang.Object ref = datasetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - datasetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Dataset ID of the table.
-     * 
- * - * string dataset_id = 2; - * @param value The datasetId to set. - * @return This builder for chaining. - */ - public Builder setDatasetId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - datasetId_ = value; - onChanged(); - return this; - } - /** - *
-     * Dataset ID of the table.
-     * 
- * - * string dataset_id = 2; - * @return This builder for chaining. - */ - public Builder clearDatasetId() { - - datasetId_ = getDefaultInstance().getDatasetId(); - onChanged(); - return this; - } - /** - *
-     * Dataset ID of the table.
-     * 
- * - * string dataset_id = 2; - * @param value The bytes for datasetId to set. - * @return This builder for chaining. - */ - public Builder setDatasetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - datasetId_ = value; - onChanged(); - return this; - } - - private java.lang.Object tableId_ = ""; - /** - *
-     * Name of the table.
-     * 
- * - * string table_id = 3; - * @return The tableId. - */ - public java.lang.String getTableId() { - java.lang.Object ref = tableId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the table.
-     * 
- * - * string table_id = 3; - * @return The bytes for tableId. - */ - public com.google.protobuf.ByteString - getTableIdBytes() { - java.lang.Object ref = tableId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tableId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the table.
-     * 
- * - * string table_id = 3; - * @param value The tableId to set. - * @return This builder for chaining. - */ - public Builder setTableId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - tableId_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the table.
-     * 
- * - * string table_id = 3; - * @return This builder for chaining. - */ - public Builder clearTableId() { - - tableId_ = getDefaultInstance().getTableId(); - onChanged(); - return this; - } - /** - *
-     * Name of the table.
-     * 
- * - * string table_id = 3; - * @param value The bytes for tableId to set. - * @return This builder for chaining. - */ - public Builder setTableIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - tableId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BigQueryTable) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BigQueryTable) - private static final com.google.privacy.dlp.v2.BigQueryTable DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BigQueryTable(); - } - - public static com.google.privacy.dlp.v2.BigQueryTable getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryTable parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryTable(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTableOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTableOrBuilder.java deleted file mode 100644 index 98f790241772..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BigQueryTableOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface BigQueryTableOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BigQueryTable) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google Cloud Platform project ID of the project containing the table.
-   * If omitted, project ID is inferred from the API call.
-   * 
- * - * string project_id = 1; - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - *
-   * The Google Cloud Platform project ID of the project containing the table.
-   * If omitted, project ID is inferred from the API call.
-   * 
- * - * string project_id = 1; - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString - getProjectIdBytes(); - - /** - *
-   * Dataset ID of the table.
-   * 
- * - * string dataset_id = 2; - * @return The datasetId. - */ - java.lang.String getDatasetId(); - /** - *
-   * Dataset ID of the table.
-   * 
- * - * string dataset_id = 2; - * @return The bytes for datasetId. - */ - com.google.protobuf.ByteString - getDatasetIdBytes(); - - /** - *
-   * Name of the table.
-   * 
- * - * string table_id = 3; - * @return The tableId. - */ - java.lang.String getTableId(); - /** - *
-   * Name of the table.
-   * 
- * - * string table_id = 3; - * @return The bytes for tableId. - */ - com.google.protobuf.ByteString - getTableIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBox.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBox.java deleted file mode 100644 index ad27898ef3ec..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBox.java +++ /dev/null @@ -1,749 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Bounding box encompassing detected text within an image.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BoundingBox} - */ -public final class BoundingBox extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BoundingBox) - BoundingBoxOrBuilder { -private static final long serialVersionUID = 0L; - // Use BoundingBox.newBuilder() to construct. - private BoundingBox(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BoundingBox() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BoundingBox(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BoundingBox( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - top_ = input.readInt32(); - break; - } - case 16: { - - left_ = input.readInt32(); - break; - } - case 24: { - - width_ = input.readInt32(); - break; - } - case 32: { - - height_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BoundingBox.class, com.google.privacy.dlp.v2.BoundingBox.Builder.class); - } - - public static final int TOP_FIELD_NUMBER = 1; - private int top_; - /** - *
-   * Top coordinate of the bounding box. (0,0) is upper left.
-   * 
- * - * int32 top = 1; - * @return The top. - */ - @java.lang.Override - public int getTop() { - return top_; - } - - public static final int LEFT_FIELD_NUMBER = 2; - private int left_; - /** - *
-   * Left coordinate of the bounding box. (0,0) is upper left.
-   * 
- * - * int32 left = 2; - * @return The left. - */ - @java.lang.Override - public int getLeft() { - return left_; - } - - public static final int WIDTH_FIELD_NUMBER = 3; - private int width_; - /** - *
-   * Width of the bounding box in pixels.
-   * 
- * - * int32 width = 3; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - - public static final int HEIGHT_FIELD_NUMBER = 4; - private int height_; - /** - *
-   * Height of the bounding box in pixels.
-   * 
- * - * int32 height = 4; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (top_ != 0) { - output.writeInt32(1, top_); - } - if (left_ != 0) { - output.writeInt32(2, left_); - } - if (width_ != 0) { - output.writeInt32(3, width_); - } - if (height_ != 0) { - output.writeInt32(4, height_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (top_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, top_); - } - if (left_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, left_); - } - if (width_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, width_); - } - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, height_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.BoundingBox)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.BoundingBox other = (com.google.privacy.dlp.v2.BoundingBox) obj; - - if (getTop() - != other.getTop()) return false; - if (getLeft() - != other.getLeft()) return false; - if (getWidth() - != other.getWidth()) return false; - if (getHeight() - != other.getHeight()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TOP_FIELD_NUMBER; - hash = (53 * hash) + getTop(); - hash = (37 * hash) + LEFT_FIELD_NUMBER; - hash = (53 * hash) + getLeft(); - hash = (37 * hash) + WIDTH_FIELD_NUMBER; - hash = (53 * hash) + getWidth(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.BoundingBox parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BoundingBox parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BoundingBox parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BoundingBox parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BoundingBox parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BoundingBox parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BoundingBox parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BoundingBox parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BoundingBox parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BoundingBox parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BoundingBox parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BoundingBox parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.BoundingBox prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Bounding box encompassing detected text within an image.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BoundingBox} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BoundingBox) - com.google.privacy.dlp.v2.BoundingBoxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BoundingBox.class, com.google.privacy.dlp.v2.BoundingBox.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.BoundingBox.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - top_ = 0; - - left_ = 0; - - width_ = 0; - - height_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BoundingBox_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BoundingBox getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BoundingBox build() { - com.google.privacy.dlp.v2.BoundingBox result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BoundingBox buildPartial() { - com.google.privacy.dlp.v2.BoundingBox result = new com.google.privacy.dlp.v2.BoundingBox(this); - result.top_ = top_; - result.left_ = left_; - result.width_ = width_; - result.height_ = height_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.BoundingBox) { - return mergeFrom((com.google.privacy.dlp.v2.BoundingBox)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.BoundingBox other) { - if (other == com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance()) return this; - if (other.getTop() != 0) { - setTop(other.getTop()); - } - if (other.getLeft() != 0) { - setLeft(other.getLeft()); - } - if (other.getWidth() != 0) { - setWidth(other.getWidth()); - } - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.BoundingBox parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.BoundingBox) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int top_ ; - /** - *
-     * Top coordinate of the bounding box. (0,0) is upper left.
-     * 
- * - * int32 top = 1; - * @return The top. - */ - @java.lang.Override - public int getTop() { - return top_; - } - /** - *
-     * Top coordinate of the bounding box. (0,0) is upper left.
-     * 
- * - * int32 top = 1; - * @param value The top to set. - * @return This builder for chaining. - */ - public Builder setTop(int value) { - - top_ = value; - onChanged(); - return this; - } - /** - *
-     * Top coordinate of the bounding box. (0,0) is upper left.
-     * 
- * - * int32 top = 1; - * @return This builder for chaining. - */ - public Builder clearTop() { - - top_ = 0; - onChanged(); - return this; - } - - private int left_ ; - /** - *
-     * Left coordinate of the bounding box. (0,0) is upper left.
-     * 
- * - * int32 left = 2; - * @return The left. - */ - @java.lang.Override - public int getLeft() { - return left_; - } - /** - *
-     * Left coordinate of the bounding box. (0,0) is upper left.
-     * 
- * - * int32 left = 2; - * @param value The left to set. - * @return This builder for chaining. - */ - public Builder setLeft(int value) { - - left_ = value; - onChanged(); - return this; - } - /** - *
-     * Left coordinate of the bounding box. (0,0) is upper left.
-     * 
- * - * int32 left = 2; - * @return This builder for chaining. - */ - public Builder clearLeft() { - - left_ = 0; - onChanged(); - return this; - } - - private int width_ ; - /** - *
-     * Width of the bounding box in pixels.
-     * 
- * - * int32 width = 3; - * @return The width. - */ - @java.lang.Override - public int getWidth() { - return width_; - } - /** - *
-     * Width of the bounding box in pixels.
-     * 
- * - * int32 width = 3; - * @param value The width to set. - * @return This builder for chaining. - */ - public Builder setWidth(int value) { - - width_ = value; - onChanged(); - return this; - } - /** - *
-     * Width of the bounding box in pixels.
-     * 
- * - * int32 width = 3; - * @return This builder for chaining. - */ - public Builder clearWidth() { - - width_ = 0; - onChanged(); - return this; - } - - private int height_ ; - /** - *
-     * Height of the bounding box in pixels.
-     * 
- * - * int32 height = 4; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-     * Height of the bounding box in pixels.
-     * 
- * - * int32 height = 4; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-     * Height of the bounding box in pixels.
-     * 
- * - * int32 height = 4; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BoundingBox) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BoundingBox) - private static final com.google.privacy.dlp.v2.BoundingBox DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BoundingBox(); - } - - public static com.google.privacy.dlp.v2.BoundingBox getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoundingBox parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BoundingBox(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BoundingBox getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBoxOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBoxOrBuilder.java deleted file mode 100644 index ffe253695939..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BoundingBoxOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface BoundingBoxOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BoundingBox) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Top coordinate of the bounding box. (0,0) is upper left.
-   * 
- * - * int32 top = 1; - * @return The top. - */ - int getTop(); - - /** - *
-   * Left coordinate of the bounding box. (0,0) is upper left.
-   * 
- * - * int32 left = 2; - * @return The left. - */ - int getLeft(); - - /** - *
-   * Width of the bounding box in pixels.
-   * 
- * - * int32 width = 3; - * @return The width. - */ - int getWidth(); - - /** - *
-   * Height of the bounding box in pixels.
-   * 
- * - * int32 height = 4; - * @return The height. - */ - int getHeight(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java deleted file mode 100644 index feadd3089d00..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java +++ /dev/null @@ -1,2120 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Generalization function that buckets values based on ranges. The ranges and
- * replacement values are dynamically provided by the user for custom behavior,
- * such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
- * This can be used on
- * data of type: number, long, string, timestamp.
- * If the bound `Value` type differs from the type of data being transformed, we
- * will first attempt converting the type of the data to be transformed to match
- * the type of the bound before comparing.
- * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig} - */ -public final class BucketingConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BucketingConfig) - BucketingConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use BucketingConfig.newBuilder() to construct. - private BucketingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BucketingConfig() { - buckets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BucketingConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BucketingConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - buckets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - buckets_.add( - input.readMessage(com.google.privacy.dlp.v2.BucketingConfig.Bucket.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - buckets_ = java.util.Collections.unmodifiableList(buckets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BucketingConfig.class, com.google.privacy.dlp.v2.BucketingConfig.Builder.class); - } - - public interface BucketOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BucketingConfig.Bucket) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Lower bound of the range, inclusive. Type should be the same as max if
-     * used.
-     * 
- * - * .google.privacy.dlp.v2.Value min = 1; - * @return Whether the min field is set. - */ - boolean hasMin(); - /** - *
-     * Lower bound of the range, inclusive. Type should be the same as max if
-     * used.
-     * 
- * - * .google.privacy.dlp.v2.Value min = 1; - * @return The min. - */ - com.google.privacy.dlp.v2.Value getMin(); - /** - *
-     * Lower bound of the range, inclusive. Type should be the same as max if
-     * used.
-     * 
- * - * .google.privacy.dlp.v2.Value min = 1; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getMinOrBuilder(); - - /** - *
-     * Upper bound of the range, exclusive; type must match min.
-     * 
- * - * .google.privacy.dlp.v2.Value max = 2; - * @return Whether the max field is set. - */ - boolean hasMax(); - /** - *
-     * Upper bound of the range, exclusive; type must match min.
-     * 
- * - * .google.privacy.dlp.v2.Value max = 2; - * @return The max. - */ - com.google.privacy.dlp.v2.Value getMax(); - /** - *
-     * Upper bound of the range, exclusive; type must match min.
-     * 
- * - * .google.privacy.dlp.v2.Value max = 2; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getMaxOrBuilder(); - - /** - *
-     * Required. Replacement value for this bucket.
-     * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the replacementValue field is set. - */ - boolean hasReplacementValue(); - /** - *
-     * Required. Replacement value for this bucket.
-     * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The replacementValue. - */ - com.google.privacy.dlp.v2.Value getReplacementValue(); - /** - *
-     * Required. Replacement value for this bucket.
-     * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder(); - } - /** - *
-   * Bucket is represented as a range, along with replacement values.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig.Bucket} - */ - public static final class Bucket extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.BucketingConfig.Bucket) - BucketOrBuilder { - private static final long serialVersionUID = 0L; - // Use Bucket.newBuilder() to construct. - private Bucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Bucket() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Bucket(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Bucket( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (min_ != null) { - subBuilder = min_.toBuilder(); - } - min_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(min_); - min_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (max_ != null) { - subBuilder = max_.toBuilder(); - } - max_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(max_); - max_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (replacementValue_ != null) { - subBuilder = replacementValue_.toBuilder(); - } - replacementValue_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(replacementValue_); - replacementValue_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BucketingConfig.Bucket.class, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder.class); - } - - public static final int MIN_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.Value min_; - /** - *
-     * Lower bound of the range, inclusive. Type should be the same as max if
-     * used.
-     * 
- * - * .google.privacy.dlp.v2.Value min = 1; - * @return Whether the min field is set. - */ - @java.lang.Override - public boolean hasMin() { - return min_ != null; - } - /** - *
-     * Lower bound of the range, inclusive. Type should be the same as max if
-     * used.
-     * 
- * - * .google.privacy.dlp.v2.Value min = 1; - * @return The min. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getMin() { - return min_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : min_; - } - /** - *
-     * Lower bound of the range, inclusive. Type should be the same as max if
-     * used.
-     * 
- * - * .google.privacy.dlp.v2.Value min = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getMinOrBuilder() { - return getMin(); - } - - public static final int MAX_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.Value max_; - /** - *
-     * Upper bound of the range, exclusive; type must match min.
-     * 
- * - * .google.privacy.dlp.v2.Value max = 2; - * @return Whether the max field is set. - */ - @java.lang.Override - public boolean hasMax() { - return max_ != null; - } - /** - *
-     * Upper bound of the range, exclusive; type must match min.
-     * 
- * - * .google.privacy.dlp.v2.Value max = 2; - * @return The max. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getMax() { - return max_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : max_; - } - /** - *
-     * Upper bound of the range, exclusive; type must match min.
-     * 
- * - * .google.privacy.dlp.v2.Value max = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getMaxOrBuilder() { - return getMax(); - } - - public static final int REPLACEMENT_VALUE_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.Value replacementValue_; - /** - *
-     * Required. Replacement value for this bucket.
-     * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the replacementValue field is set. - */ - @java.lang.Override - public boolean hasReplacementValue() { - return replacementValue_ != null; - } - /** - *
-     * Required. Replacement value for this bucket.
-     * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The replacementValue. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getReplacementValue() { - return replacementValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : replacementValue_; - } - /** - *
-     * Required. Replacement value for this bucket.
-     * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder() { - return getReplacementValue(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (min_ != null) { - output.writeMessage(1, getMin()); - } - if (max_ != null) { - output.writeMessage(2, getMax()); - } - if (replacementValue_ != null) { - output.writeMessage(3, getReplacementValue()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (min_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMin()); - } - if (max_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMax()); - } - if (replacementValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getReplacementValue()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.BucketingConfig.Bucket)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.BucketingConfig.Bucket other = (com.google.privacy.dlp.v2.BucketingConfig.Bucket) obj; - - if (hasMin() != other.hasMin()) return false; - if (hasMin()) { - if (!getMin() - .equals(other.getMin())) return false; - } - if (hasMax() != other.hasMax()) return false; - if (hasMax()) { - if (!getMax() - .equals(other.getMax())) return false; - } - if (hasReplacementValue() != other.hasReplacementValue()) return false; - if (hasReplacementValue()) { - if (!getReplacementValue() - .equals(other.getReplacementValue())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMin()) { - hash = (37 * hash) + MIN_FIELD_NUMBER; - hash = (53 * hash) + getMin().hashCode(); - } - if (hasMax()) { - hash = (37 * hash) + MAX_FIELD_NUMBER; - hash = (53 * hash) + getMax().hashCode(); - } - if (hasReplacementValue()) { - hash = (37 * hash) + REPLACEMENT_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getReplacementValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.BucketingConfig.Bucket prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Bucket is represented as a range, along with replacement values.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig.Bucket} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BucketingConfig.Bucket) - com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BucketingConfig.Bucket.class, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.BucketingConfig.Bucket.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (minBuilder_ == null) { - min_ = null; - } else { - min_ = null; - minBuilder_ = null; - } - if (maxBuilder_ == null) { - max_ = null; - } else { - max_ = null; - maxBuilder_ = null; - } - if (replacementValueBuilder_ == null) { - replacementValue_ = null; - } else { - replacementValue_ = null; - replacementValueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig.Bucket getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.BucketingConfig.Bucket.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig.Bucket build() { - com.google.privacy.dlp.v2.BucketingConfig.Bucket result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig.Bucket buildPartial() { - com.google.privacy.dlp.v2.BucketingConfig.Bucket result = new com.google.privacy.dlp.v2.BucketingConfig.Bucket(this); - if (minBuilder_ == null) { - result.min_ = min_; - } else { - result.min_ = minBuilder_.build(); - } - if (maxBuilder_ == null) { - result.max_ = max_; - } else { - result.max_ = maxBuilder_.build(); - } - if (replacementValueBuilder_ == null) { - result.replacementValue_ = replacementValue_; - } else { - result.replacementValue_ = replacementValueBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.BucketingConfig.Bucket) { - return mergeFrom((com.google.privacy.dlp.v2.BucketingConfig.Bucket)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.BucketingConfig.Bucket other) { - if (other == com.google.privacy.dlp.v2.BucketingConfig.Bucket.getDefaultInstance()) return this; - if (other.hasMin()) { - mergeMin(other.getMin()); - } - if (other.hasMax()) { - mergeMax(other.getMax()); - } - if (other.hasReplacementValue()) { - mergeReplacementValue(other.getReplacementValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.BucketingConfig.Bucket parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.BucketingConfig.Bucket) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.Value min_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> minBuilder_; - /** - *
-       * Lower bound of the range, inclusive. Type should be the same as max if
-       * used.
-       * 
- * - * .google.privacy.dlp.v2.Value min = 1; - * @return Whether the min field is set. - */ - public boolean hasMin() { - return minBuilder_ != null || min_ != null; - } - /** - *
-       * Lower bound of the range, inclusive. Type should be the same as max if
-       * used.
-       * 
- * - * .google.privacy.dlp.v2.Value min = 1; - * @return The min. - */ - public com.google.privacy.dlp.v2.Value getMin() { - if (minBuilder_ == null) { - return min_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : min_; - } else { - return minBuilder_.getMessage(); - } - } - /** - *
-       * Lower bound of the range, inclusive. Type should be the same as max if
-       * used.
-       * 
- * - * .google.privacy.dlp.v2.Value min = 1; - */ - public Builder setMin(com.google.privacy.dlp.v2.Value value) { - if (minBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - min_ = value; - onChanged(); - } else { - minBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Lower bound of the range, inclusive. Type should be the same as max if
-       * used.
-       * 
- * - * .google.privacy.dlp.v2.Value min = 1; - */ - public Builder setMin( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (minBuilder_ == null) { - min_ = builderForValue.build(); - onChanged(); - } else { - minBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Lower bound of the range, inclusive. Type should be the same as max if
-       * used.
-       * 
- * - * .google.privacy.dlp.v2.Value min = 1; - */ - public Builder mergeMin(com.google.privacy.dlp.v2.Value value) { - if (minBuilder_ == null) { - if (min_ != null) { - min_ = - com.google.privacy.dlp.v2.Value.newBuilder(min_).mergeFrom(value).buildPartial(); - } else { - min_ = value; - } - onChanged(); - } else { - minBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Lower bound of the range, inclusive. Type should be the same as max if
-       * used.
-       * 
- * - * .google.privacy.dlp.v2.Value min = 1; - */ - public Builder clearMin() { - if (minBuilder_ == null) { - min_ = null; - onChanged(); - } else { - min_ = null; - minBuilder_ = null; - } - - return this; - } - /** - *
-       * Lower bound of the range, inclusive. Type should be the same as max if
-       * used.
-       * 
- * - * .google.privacy.dlp.v2.Value min = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder getMinBuilder() { - - onChanged(); - return getMinFieldBuilder().getBuilder(); - } - /** - *
-       * Lower bound of the range, inclusive. Type should be the same as max if
-       * used.
-       * 
- * - * .google.privacy.dlp.v2.Value min = 1; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getMinOrBuilder() { - if (minBuilder_ != null) { - return minBuilder_.getMessageOrBuilder(); - } else { - return min_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : min_; - } - } - /** - *
-       * Lower bound of the range, inclusive. Type should be the same as max if
-       * used.
-       * 
- * - * .google.privacy.dlp.v2.Value min = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getMinFieldBuilder() { - if (minBuilder_ == null) { - minBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getMin(), - getParentForChildren(), - isClean()); - min_ = null; - } - return minBuilder_; - } - - private com.google.privacy.dlp.v2.Value max_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> maxBuilder_; - /** - *
-       * Upper bound of the range, exclusive; type must match min.
-       * 
- * - * .google.privacy.dlp.v2.Value max = 2; - * @return Whether the max field is set. - */ - public boolean hasMax() { - return maxBuilder_ != null || max_ != null; - } - /** - *
-       * Upper bound of the range, exclusive; type must match min.
-       * 
- * - * .google.privacy.dlp.v2.Value max = 2; - * @return The max. - */ - public com.google.privacy.dlp.v2.Value getMax() { - if (maxBuilder_ == null) { - return max_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : max_; - } else { - return maxBuilder_.getMessage(); - } - } - /** - *
-       * Upper bound of the range, exclusive; type must match min.
-       * 
- * - * .google.privacy.dlp.v2.Value max = 2; - */ - public Builder setMax(com.google.privacy.dlp.v2.Value value) { - if (maxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - max_ = value; - onChanged(); - } else { - maxBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Upper bound of the range, exclusive; type must match min.
-       * 
- * - * .google.privacy.dlp.v2.Value max = 2; - */ - public Builder setMax( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (maxBuilder_ == null) { - max_ = builderForValue.build(); - onChanged(); - } else { - maxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Upper bound of the range, exclusive; type must match min.
-       * 
- * - * .google.privacy.dlp.v2.Value max = 2; - */ - public Builder mergeMax(com.google.privacy.dlp.v2.Value value) { - if (maxBuilder_ == null) { - if (max_ != null) { - max_ = - com.google.privacy.dlp.v2.Value.newBuilder(max_).mergeFrom(value).buildPartial(); - } else { - max_ = value; - } - onChanged(); - } else { - maxBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Upper bound of the range, exclusive; type must match min.
-       * 
- * - * .google.privacy.dlp.v2.Value max = 2; - */ - public Builder clearMax() { - if (maxBuilder_ == null) { - max_ = null; - onChanged(); - } else { - max_ = null; - maxBuilder_ = null; - } - - return this; - } - /** - *
-       * Upper bound of the range, exclusive; type must match min.
-       * 
- * - * .google.privacy.dlp.v2.Value max = 2; - */ - public com.google.privacy.dlp.v2.Value.Builder getMaxBuilder() { - - onChanged(); - return getMaxFieldBuilder().getBuilder(); - } - /** - *
-       * Upper bound of the range, exclusive; type must match min.
-       * 
- * - * .google.privacy.dlp.v2.Value max = 2; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getMaxOrBuilder() { - if (maxBuilder_ != null) { - return maxBuilder_.getMessageOrBuilder(); - } else { - return max_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : max_; - } - } - /** - *
-       * Upper bound of the range, exclusive; type must match min.
-       * 
- * - * .google.privacy.dlp.v2.Value max = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getMaxFieldBuilder() { - if (maxBuilder_ == null) { - maxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getMax(), - getParentForChildren(), - isClean()); - max_ = null; - } - return maxBuilder_; - } - - private com.google.privacy.dlp.v2.Value replacementValue_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> replacementValueBuilder_; - /** - *
-       * Required. Replacement value for this bucket.
-       * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the replacementValue field is set. - */ - public boolean hasReplacementValue() { - return replacementValueBuilder_ != null || replacementValue_ != null; - } - /** - *
-       * Required. Replacement value for this bucket.
-       * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The replacementValue. - */ - public com.google.privacy.dlp.v2.Value getReplacementValue() { - if (replacementValueBuilder_ == null) { - return replacementValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : replacementValue_; - } else { - return replacementValueBuilder_.getMessage(); - } - } - /** - *
-       * Required. Replacement value for this bucket.
-       * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setReplacementValue(com.google.privacy.dlp.v2.Value value) { - if (replacementValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - replacementValue_ = value; - onChanged(); - } else { - replacementValueBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Required. Replacement value for this bucket.
-       * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setReplacementValue( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (replacementValueBuilder_ == null) { - replacementValue_ = builderForValue.build(); - onChanged(); - } else { - replacementValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Required. Replacement value for this bucket.
-       * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeReplacementValue(com.google.privacy.dlp.v2.Value value) { - if (replacementValueBuilder_ == null) { - if (replacementValue_ != null) { - replacementValue_ = - com.google.privacy.dlp.v2.Value.newBuilder(replacementValue_).mergeFrom(value).buildPartial(); - } else { - replacementValue_ = value; - } - onChanged(); - } else { - replacementValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Required. Replacement value for this bucket.
-       * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearReplacementValue() { - if (replacementValueBuilder_ == null) { - replacementValue_ = null; - onChanged(); - } else { - replacementValue_ = null; - replacementValueBuilder_ = null; - } - - return this; - } - /** - *
-       * Required. Replacement value for this bucket.
-       * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.Value.Builder getReplacementValueBuilder() { - - onChanged(); - return getReplacementValueFieldBuilder().getBuilder(); - } - /** - *
-       * Required. Replacement value for this bucket.
-       * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getReplacementValueOrBuilder() { - if (replacementValueBuilder_ != null) { - return replacementValueBuilder_.getMessageOrBuilder(); - } else { - return replacementValue_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : replacementValue_; - } - } - /** - *
-       * Required. Replacement value for this bucket.
-       * 
- * - * .google.privacy.dlp.v2.Value replacement_value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getReplacementValueFieldBuilder() { - if (replacementValueBuilder_ == null) { - replacementValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getReplacementValue(), - getParentForChildren(), - isClean()); - replacementValue_ = null; - } - return replacementValueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BucketingConfig.Bucket) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BucketingConfig.Bucket) - private static final com.google.privacy.dlp.v2.BucketingConfig.Bucket DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BucketingConfig.Bucket(); - } - - public static com.google.privacy.dlp.v2.BucketingConfig.Bucket getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Bucket parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Bucket(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig.Bucket getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BUCKETS_FIELD_NUMBER = 1; - private java.util.List buckets_; - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - @java.lang.Override - public java.util.List getBucketsList() { - return buckets_; - } - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - @java.lang.Override - public java.util.List - getBucketsOrBuilderList() { - return buckets_; - } - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - @java.lang.Override - public int getBucketsCount() { - return buckets_.size(); - } - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig.Bucket getBuckets(int index) { - return buckets_.get(index); - } - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder getBucketsOrBuilder( - int index) { - return buckets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < buckets_.size(); i++) { - output.writeMessage(1, buckets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < buckets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, buckets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.BucketingConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.BucketingConfig other = (com.google.privacy.dlp.v2.BucketingConfig) obj; - - if (!getBucketsList() - .equals(other.getBucketsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getBucketsCount() > 0) { - hash = (37 * hash) + BUCKETS_FIELD_NUMBER; - hash = (53 * hash) + getBucketsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.BucketingConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.BucketingConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Generalization function that buckets values based on ranges. The ranges and
-   * replacement values are dynamically provided by the user for custom behavior,
-   * such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
-   * This can be used on
-   * data of type: number, long, string, timestamp.
-   * If the bound `Value` type differs from the type of data being transformed, we
-   * will first attempt converting the type of the data to be transformed to match
-   * the type of the bound before comparing.
-   * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.BucketingConfig) - com.google.privacy.dlp.v2.BucketingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.BucketingConfig.class, com.google.privacy.dlp.v2.BucketingConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.BucketingConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBucketsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (bucketsBuilder_ == null) { - buckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - bucketsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig build() { - com.google.privacy.dlp.v2.BucketingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig buildPartial() { - com.google.privacy.dlp.v2.BucketingConfig result = new com.google.privacy.dlp.v2.BucketingConfig(this); - int from_bitField0_ = bitField0_; - if (bucketsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - buckets_ = java.util.Collections.unmodifiableList(buckets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.buckets_ = buckets_; - } else { - result.buckets_ = bucketsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.BucketingConfig) { - return mergeFrom((com.google.privacy.dlp.v2.BucketingConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.BucketingConfig other) { - if (other == com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance()) return this; - if (bucketsBuilder_ == null) { - if (!other.buckets_.isEmpty()) { - if (buckets_.isEmpty()) { - buckets_ = other.buckets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBucketsIsMutable(); - buckets_.addAll(other.buckets_); - } - onChanged(); - } - } else { - if (!other.buckets_.isEmpty()) { - if (bucketsBuilder_.isEmpty()) { - bucketsBuilder_.dispose(); - bucketsBuilder_ = null; - buckets_ = other.buckets_; - bitField0_ = (bitField0_ & ~0x00000001); - bucketsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBucketsFieldBuilder() : null; - } else { - bucketsBuilder_.addAllMessages(other.buckets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.BucketingConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.BucketingConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List buckets_ = - java.util.Collections.emptyList(); - private void ensureBucketsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - buckets_ = new java.util.ArrayList(buckets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.BucketingConfig.Bucket, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder, com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder> bucketsBuilder_; - - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public java.util.List getBucketsList() { - if (bucketsBuilder_ == null) { - return java.util.Collections.unmodifiableList(buckets_); - } else { - return bucketsBuilder_.getMessageList(); - } - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public int getBucketsCount() { - if (bucketsBuilder_ == null) { - return buckets_.size(); - } else { - return bucketsBuilder_.getCount(); - } - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public com.google.privacy.dlp.v2.BucketingConfig.Bucket getBuckets(int index) { - if (bucketsBuilder_ == null) { - return buckets_.get(index); - } else { - return bucketsBuilder_.getMessage(index); - } - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public Builder setBuckets( - int index, com.google.privacy.dlp.v2.BucketingConfig.Bucket value) { - if (bucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketsIsMutable(); - buckets_.set(index, value); - onChanged(); - } else { - bucketsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public Builder setBuckets( - int index, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder builderForValue) { - if (bucketsBuilder_ == null) { - ensureBucketsIsMutable(); - buckets_.set(index, builderForValue.build()); - onChanged(); - } else { - bucketsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public Builder addBuckets(com.google.privacy.dlp.v2.BucketingConfig.Bucket value) { - if (bucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketsIsMutable(); - buckets_.add(value); - onChanged(); - } else { - bucketsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public Builder addBuckets( - int index, com.google.privacy.dlp.v2.BucketingConfig.Bucket value) { - if (bucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBucketsIsMutable(); - buckets_.add(index, value); - onChanged(); - } else { - bucketsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public Builder addBuckets( - com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder builderForValue) { - if (bucketsBuilder_ == null) { - ensureBucketsIsMutable(); - buckets_.add(builderForValue.build()); - onChanged(); - } else { - bucketsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public Builder addBuckets( - int index, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder builderForValue) { - if (bucketsBuilder_ == null) { - ensureBucketsIsMutable(); - buckets_.add(index, builderForValue.build()); - onChanged(); - } else { - bucketsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public Builder addAllBuckets( - java.lang.Iterable values) { - if (bucketsBuilder_ == null) { - ensureBucketsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, buckets_); - onChanged(); - } else { - bucketsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public Builder clearBuckets() { - if (bucketsBuilder_ == null) { - buckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - bucketsBuilder_.clear(); - } - return this; - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public Builder removeBuckets(int index) { - if (bucketsBuilder_ == null) { - ensureBucketsIsMutable(); - buckets_.remove(index); - onChanged(); - } else { - bucketsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder getBucketsBuilder( - int index) { - return getBucketsFieldBuilder().getBuilder(index); - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder getBucketsOrBuilder( - int index) { - if (bucketsBuilder_ == null) { - return buckets_.get(index); } else { - return bucketsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public java.util.List - getBucketsOrBuilderList() { - if (bucketsBuilder_ != null) { - return bucketsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(buckets_); - } - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder addBucketsBuilder() { - return getBucketsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.BucketingConfig.Bucket.getDefaultInstance()); - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder addBucketsBuilder( - int index) { - return getBucketsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.BucketingConfig.Bucket.getDefaultInstance()); - } - /** - *
-     * Set of buckets. Ranges must be non-overlapping.
-     * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - public java.util.List - getBucketsBuilderList() { - return getBucketsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.BucketingConfig.Bucket, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder, com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder> - getBucketsFieldBuilder() { - if (bucketsBuilder_ == null) { - bucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.BucketingConfig.Bucket, com.google.privacy.dlp.v2.BucketingConfig.Bucket.Builder, com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder>( - buckets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - buckets_ = null; - } - return bucketsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.BucketingConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.BucketingConfig) - private static final com.google.privacy.dlp.v2.BucketingConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.BucketingConfig(); - } - - public static com.google.privacy.dlp.v2.BucketingConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BucketingConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BucketingConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfigOrBuilder.java deleted file mode 100644 index 1a8650db7b30..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfigOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface BucketingConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.BucketingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - java.util.List - getBucketsList(); - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - com.google.privacy.dlp.v2.BucketingConfig.Bucket getBuckets(int index); - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - int getBucketsCount(); - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - java.util.List - getBucketsOrBuilderList(); - /** - *
-   * Set of buckets. Ranges must be non-overlapping.
-   * 
- * - * repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1; - */ - com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder getBucketsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java deleted file mode 100644 index 9c67fc150179..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItem.java +++ /dev/null @@ -1,971 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Container for bytes to inspect or redact.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ByteContentItem} - */ -public final class ByteContentItem extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ByteContentItem) - ByteContentItemOrBuilder { -private static final long serialVersionUID = 0L; - // Use ByteContentItem.newBuilder() to construct. - private ByteContentItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ByteContentItem() { - type_ = 0; - data_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ByteContentItem(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ByteContentItem( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 18: { - - data_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ByteContentItem.class, com.google.privacy.dlp.v2.ByteContentItem.Builder.class); - } - - /** - *
-   * The type of data being sent for inspection. To learn more, see
-   * [Supported file
-   * types](https://cloud.google.com/dlp/docs/supported-file-types).
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.ByteContentItem.BytesType} - */ - public enum BytesType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused
-     * 
- * - * BYTES_TYPE_UNSPECIFIED = 0; - */ - BYTES_TYPE_UNSPECIFIED(0), - /** - *
-     * Any image type.
-     * 
- * - * IMAGE = 6; - */ - IMAGE(6), - /** - *
-     * jpeg
-     * 
- * - * IMAGE_JPEG = 1; - */ - IMAGE_JPEG(1), - /** - *
-     * bmp
-     * 
- * - * IMAGE_BMP = 2; - */ - IMAGE_BMP(2), - /** - *
-     * png
-     * 
- * - * IMAGE_PNG = 3; - */ - IMAGE_PNG(3), - /** - *
-     * svg
-     * 
- * - * IMAGE_SVG = 4; - */ - IMAGE_SVG(4), - /** - *
-     * plain text
-     * 
- * - * TEXT_UTF8 = 5; - */ - TEXT_UTF8(5), - /** - *
-     * docx, docm, dotx, dotm
-     * 
- * - * WORD_DOCUMENT = 7; - */ - WORD_DOCUMENT(7), - /** - *
-     * pdf
-     * 
- * - * PDF = 8; - */ - PDF(8), - /** - *
-     * pptx, pptm, potx, potm, pot
-     * 
- * - * POWERPOINT_DOCUMENT = 9; - */ - POWERPOINT_DOCUMENT(9), - /** - *
-     * xlsx, xlsm, xltx, xltm
-     * 
- * - * EXCEL_DOCUMENT = 10; - */ - EXCEL_DOCUMENT(10), - /** - *
-     * avro
-     * 
- * - * AVRO = 11; - */ - AVRO(11), - /** - *
-     * csv
-     * 
- * - * CSV = 12; - */ - CSV(12), - /** - *
-     * tsv
-     * 
- * - * TSV = 13; - */ - TSV(13), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused
-     * 
- * - * BYTES_TYPE_UNSPECIFIED = 0; - */ - public static final int BYTES_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Any image type.
-     * 
- * - * IMAGE = 6; - */ - public static final int IMAGE_VALUE = 6; - /** - *
-     * jpeg
-     * 
- * - * IMAGE_JPEG = 1; - */ - public static final int IMAGE_JPEG_VALUE = 1; - /** - *
-     * bmp
-     * 
- * - * IMAGE_BMP = 2; - */ - public static final int IMAGE_BMP_VALUE = 2; - /** - *
-     * png
-     * 
- * - * IMAGE_PNG = 3; - */ - public static final int IMAGE_PNG_VALUE = 3; - /** - *
-     * svg
-     * 
- * - * IMAGE_SVG = 4; - */ - public static final int IMAGE_SVG_VALUE = 4; - /** - *
-     * plain text
-     * 
- * - * TEXT_UTF8 = 5; - */ - public static final int TEXT_UTF8_VALUE = 5; - /** - *
-     * docx, docm, dotx, dotm
-     * 
- * - * WORD_DOCUMENT = 7; - */ - public static final int WORD_DOCUMENT_VALUE = 7; - /** - *
-     * pdf
-     * 
- * - * PDF = 8; - */ - public static final int PDF_VALUE = 8; - /** - *
-     * pptx, pptm, potx, potm, pot
-     * 
- * - * POWERPOINT_DOCUMENT = 9; - */ - public static final int POWERPOINT_DOCUMENT_VALUE = 9; - /** - *
-     * xlsx, xlsm, xltx, xltm
-     * 
- * - * EXCEL_DOCUMENT = 10; - */ - public static final int EXCEL_DOCUMENT_VALUE = 10; - /** - *
-     * avro
-     * 
- * - * AVRO = 11; - */ - public static final int AVRO_VALUE = 11; - /** - *
-     * csv
-     * 
- * - * CSV = 12; - */ - public static final int CSV_VALUE = 12; - /** - *
-     * tsv
-     * 
- * - * TSV = 13; - */ - public static final int TSV_VALUE = 13; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BytesType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BytesType forNumber(int value) { - switch (value) { - case 0: return BYTES_TYPE_UNSPECIFIED; - case 6: return IMAGE; - case 1: return IMAGE_JPEG; - case 2: return IMAGE_BMP; - case 3: return IMAGE_PNG; - case 4: return IMAGE_SVG; - case 5: return TEXT_UTF8; - case 7: return WORD_DOCUMENT; - case 8: return PDF; - case 9: return POWERPOINT_DOCUMENT; - case 10: return EXCEL_DOCUMENT; - case 11: return AVRO; - case 12: return CSV; - case 13: return TSV; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BytesType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BytesType findValueByNumber(int number) { - return BytesType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.ByteContentItem.getDescriptor().getEnumTypes().get(0); - } - - private static final BytesType[] VALUES = values(); - - public static BytesType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BytesType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.ByteContentItem.BytesType) - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-   * The type of data stored in the bytes string. Default will be TEXT_UTF8.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The type of data stored in the bytes string. Default will be TEXT_UTF8.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; - * @return The type. - */ - @java.lang.Override public com.google.privacy.dlp.v2.ByteContentItem.BytesType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.ByteContentItem.BytesType result = com.google.privacy.dlp.v2.ByteContentItem.BytesType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.ByteContentItem.BytesType.UNRECOGNIZED : result; - } - - public static final int DATA_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString data_; - /** - *
-   * Content data to inspect or redact.
-   * 
- * - * bytes data = 2; - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.ByteString getData() { - return data_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.privacy.dlp.v2.ByteContentItem.BytesType.BYTES_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, type_); - } - if (!data_.isEmpty()) { - output.writeBytes(2, data_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.privacy.dlp.v2.ByteContentItem.BytesType.BYTES_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (!data_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, data_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ByteContentItem)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ByteContentItem other = (com.google.privacy.dlp.v2.ByteContentItem) obj; - - if (type_ != other.type_) return false; - if (!getData() - .equals(other.getData())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ByteContentItem parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ByteContentItem prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Container for bytes to inspect or redact.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ByteContentItem} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ByteContentItem) - com.google.privacy.dlp.v2.ByteContentItemOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ByteContentItem.class, com.google.privacy.dlp.v2.ByteContentItem.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ByteContentItem.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - data_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItem getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItem build() { - com.google.privacy.dlp.v2.ByteContentItem result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItem buildPartial() { - com.google.privacy.dlp.v2.ByteContentItem result = new com.google.privacy.dlp.v2.ByteContentItem(this); - result.type_ = type_; - result.data_ = data_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ByteContentItem) { - return mergeFrom((com.google.privacy.dlp.v2.ByteContentItem)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ByteContentItem other) { - if (other == com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getData() != com.google.protobuf.ByteString.EMPTY) { - setData(other.getData()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ByteContentItem parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ByteContentItem) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - *
-     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItem.BytesType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.ByteContentItem.BytesType result = com.google.privacy.dlp.v2.ByteContentItem.BytesType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.ByteContentItem.BytesType.UNRECOGNIZED : result; - } - /** - *
-     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.privacy.dlp.v2.ByteContentItem.BytesType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The type of data stored in the bytes string. Default will be TEXT_UTF8.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Content data to inspect or redact.
-     * 
- * - * bytes data = 2; - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.ByteString getData() { - return data_; - } - /** - *
-     * Content data to inspect or redact.
-     * 
- * - * bytes data = 2; - * @param value The data to set. - * @return This builder for chaining. - */ - public Builder setData(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - data_ = value; - onChanged(); - return this; - } - /** - *
-     * Content data to inspect or redact.
-     * 
- * - * bytes data = 2; - * @return This builder for chaining. - */ - public Builder clearData() { - - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ByteContentItem) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ByteContentItem) - private static final com.google.privacy.dlp.v2.ByteContentItem DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ByteContentItem(); - } - - public static com.google.privacy.dlp.v2.ByteContentItem getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ByteContentItem parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ByteContentItem(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItem getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItemOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItemOrBuilder.java deleted file mode 100644 index f5da115d9bc2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ByteContentItemOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ByteContentItemOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ByteContentItem) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The type of data stored in the bytes string. Default will be TEXT_UTF8.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The type of data stored in the bytes string. Default will be TEXT_UTF8.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem.BytesType type = 1; - * @return The type. - */ - com.google.privacy.dlp.v2.ByteContentItem.BytesType getType(); - - /** - *
-   * Content data to inspect or redact.
-   * 
- * - * bytes data = 2; - * @return The data. - */ - com.google.protobuf.ByteString getData(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequest.java deleted file mode 100644 index fb70439eea70..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequest.java +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The request message for canceling a DLP job.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CancelDlpJobRequest} - */ -public final class CancelDlpJobRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CancelDlpJobRequest) - CancelDlpJobRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CancelDlpJobRequest.newBuilder() to construct. - private CancelDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CancelDlpJobRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CancelDlpJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CancelDlpJobRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CancelDlpJobRequest.class, com.google.privacy.dlp.v2.CancelDlpJobRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the DlpJob resource to be cancelled.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the DlpJob resource to be cancelled.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CancelDlpJobRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CancelDlpJobRequest other = (com.google.privacy.dlp.v2.CancelDlpJobRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CancelDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CancelDlpJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The request message for canceling a DLP job.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CancelDlpJobRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CancelDlpJobRequest) - com.google.privacy.dlp.v2.CancelDlpJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CancelDlpJobRequest.class, com.google.privacy.dlp.v2.CancelDlpJobRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CancelDlpJobRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CancelDlpJobRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CancelDlpJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CancelDlpJobRequest build() { - com.google.privacy.dlp.v2.CancelDlpJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CancelDlpJobRequest buildPartial() { - com.google.privacy.dlp.v2.CancelDlpJobRequest result = new com.google.privacy.dlp.v2.CancelDlpJobRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CancelDlpJobRequest) { - return mergeFrom((com.google.privacy.dlp.v2.CancelDlpJobRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CancelDlpJobRequest other) { - if (other == com.google.privacy.dlp.v2.CancelDlpJobRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CancelDlpJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CancelDlpJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CancelDlpJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CancelDlpJobRequest) - private static final com.google.privacy.dlp.v2.CancelDlpJobRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CancelDlpJobRequest(); - } - - public static com.google.privacy.dlp.v2.CancelDlpJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CancelDlpJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CancelDlpJobRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CancelDlpJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequestOrBuilder.java deleted file mode 100644 index 79d40840e09c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CancelDlpJobRequestOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CancelDlpJobRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CancelDlpJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the DlpJob resource to be cancelled.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the DlpJob resource to be cancelled.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java deleted file mode 100644 index da14a99d764a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfig.java +++ /dev/null @@ -1,1367 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Partially mask a string by replacing a given number of characters with a
- * fixed character. Masking can start from the beginning or end of the string.
- * This can be used on data of any type (numbers, longs, and so on) and when
- * de-identifying structured data we'll attempt to preserve the original data's
- * type. (This allows you to take a long like 123 and modify it to a string like
- * **3.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CharacterMaskConfig} - */ -public final class CharacterMaskConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CharacterMaskConfig) - CharacterMaskConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use CharacterMaskConfig.newBuilder() to construct. - private CharacterMaskConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CharacterMaskConfig() { - maskingCharacter_ = ""; - charactersToIgnore_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CharacterMaskConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CharacterMaskConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - maskingCharacter_ = s; - break; - } - case 16: { - - numberToMask_ = input.readInt32(); - break; - } - case 24: { - - reverseOrder_ = input.readBool(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - charactersToIgnore_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - charactersToIgnore_.add( - input.readMessage(com.google.privacy.dlp.v2.CharsToIgnore.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - charactersToIgnore_ = java.util.Collections.unmodifiableList(charactersToIgnore_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CharacterMaskConfig.class, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder.class); - } - - public static final int MASKING_CHARACTER_FIELD_NUMBER = 1; - private volatile java.lang.Object maskingCharacter_; - /** - *
-   * Character to use to mask the sensitive values&mdash;for example, `*` for an
-   * alphabetic string such as a name, or `0` for a numeric string such as ZIP
-   * code or credit card number. This string must have a length of 1. If not
-   * supplied, this value defaults to `*` for strings, and `0` for digits.
-   * 
- * - * string masking_character = 1; - * @return The maskingCharacter. - */ - @java.lang.Override - public java.lang.String getMaskingCharacter() { - java.lang.Object ref = maskingCharacter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maskingCharacter_ = s; - return s; - } - } - /** - *
-   * Character to use to mask the sensitive values&mdash;for example, `*` for an
-   * alphabetic string such as a name, or `0` for a numeric string such as ZIP
-   * code or credit card number. This string must have a length of 1. If not
-   * supplied, this value defaults to `*` for strings, and `0` for digits.
-   * 
- * - * string masking_character = 1; - * @return The bytes for maskingCharacter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMaskingCharacterBytes() { - java.lang.Object ref = maskingCharacter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maskingCharacter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NUMBER_TO_MASK_FIELD_NUMBER = 2; - private int numberToMask_; - /** - *
-   * Number of characters to mask. If not set, all matching chars will be
-   * masked. Skipped characters do not count towards this tally.
-   * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
-   * masks all but a number of characters.
-   * For example, suppose you have the following values:
-   * - `masking_character` is `*`
-   * - `number_to_mask` is `-4`
-   * - `reverse_order` is `false`
-   * - `CharsToIgnore` includes `-`
-   * - Input string is `1234-5678-9012-3456`
-   * The resulting de-identified string is
-   * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
-   * If `reverse_order` is `true`, all but the first four characters are masked
-   * as `1234-****-****-****`.
-   * 
- * - * int32 number_to_mask = 2; - * @return The numberToMask. - */ - @java.lang.Override - public int getNumberToMask() { - return numberToMask_; - } - - public static final int REVERSE_ORDER_FIELD_NUMBER = 3; - private boolean reverseOrder_; - /** - *
-   * Mask characters in reverse order. For example, if `masking_character` is
-   * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
-   * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
-   * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
-   * is `true`, then the string `12345` is masked as `12***`.
-   * 
- * - * bool reverse_order = 3; - * @return The reverseOrder. - */ - @java.lang.Override - public boolean getReverseOrder() { - return reverseOrder_; - } - - public static final int CHARACTERS_TO_IGNORE_FIELD_NUMBER = 4; - private java.util.List charactersToIgnore_; - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - @java.lang.Override - public java.util.List getCharactersToIgnoreList() { - return charactersToIgnore_; - } - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - @java.lang.Override - public java.util.List - getCharactersToIgnoreOrBuilderList() { - return charactersToIgnore_; - } - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - @java.lang.Override - public int getCharactersToIgnoreCount() { - return charactersToIgnore_.size(); - } - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CharsToIgnore getCharactersToIgnore(int index) { - return charactersToIgnore_.get(index); - } - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder getCharactersToIgnoreOrBuilder( - int index) { - return charactersToIgnore_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maskingCharacter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, maskingCharacter_); - } - if (numberToMask_ != 0) { - output.writeInt32(2, numberToMask_); - } - if (reverseOrder_ != false) { - output.writeBool(3, reverseOrder_); - } - for (int i = 0; i < charactersToIgnore_.size(); i++) { - output.writeMessage(4, charactersToIgnore_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(maskingCharacter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, maskingCharacter_); - } - if (numberToMask_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, numberToMask_); - } - if (reverseOrder_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, reverseOrder_); - } - for (int i = 0; i < charactersToIgnore_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, charactersToIgnore_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CharacterMaskConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CharacterMaskConfig other = (com.google.privacy.dlp.v2.CharacterMaskConfig) obj; - - if (!getMaskingCharacter() - .equals(other.getMaskingCharacter())) return false; - if (getNumberToMask() - != other.getNumberToMask()) return false; - if (getReverseOrder() - != other.getReverseOrder()) return false; - if (!getCharactersToIgnoreList() - .equals(other.getCharactersToIgnoreList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MASKING_CHARACTER_FIELD_NUMBER; - hash = (53 * hash) + getMaskingCharacter().hashCode(); - hash = (37 * hash) + NUMBER_TO_MASK_FIELD_NUMBER; - hash = (53 * hash) + getNumberToMask(); - hash = (37 * hash) + REVERSE_ORDER_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getReverseOrder()); - if (getCharactersToIgnoreCount() > 0) { - hash = (37 * hash) + CHARACTERS_TO_IGNORE_FIELD_NUMBER; - hash = (53 * hash) + getCharactersToIgnoreList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CharacterMaskConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CharacterMaskConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Partially mask a string by replacing a given number of characters with a
-   * fixed character. Masking can start from the beginning or end of the string.
-   * This can be used on data of any type (numbers, longs, and so on) and when
-   * de-identifying structured data we'll attempt to preserve the original data's
-   * type. (This allows you to take a long like 123 and modify it to a string like
-   * **3.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CharacterMaskConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CharacterMaskConfig) - com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CharacterMaskConfig.class, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CharacterMaskConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getCharactersToIgnoreFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - maskingCharacter_ = ""; - - numberToMask_ = 0; - - reverseOrder_ = false; - - if (charactersToIgnoreBuilder_ == null) { - charactersToIgnore_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - charactersToIgnoreBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CharacterMaskConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CharacterMaskConfig build() { - com.google.privacy.dlp.v2.CharacterMaskConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CharacterMaskConfig buildPartial() { - com.google.privacy.dlp.v2.CharacterMaskConfig result = new com.google.privacy.dlp.v2.CharacterMaskConfig(this); - int from_bitField0_ = bitField0_; - result.maskingCharacter_ = maskingCharacter_; - result.numberToMask_ = numberToMask_; - result.reverseOrder_ = reverseOrder_; - if (charactersToIgnoreBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - charactersToIgnore_ = java.util.Collections.unmodifiableList(charactersToIgnore_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.charactersToIgnore_ = charactersToIgnore_; - } else { - result.charactersToIgnore_ = charactersToIgnoreBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CharacterMaskConfig) { - return mergeFrom((com.google.privacy.dlp.v2.CharacterMaskConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CharacterMaskConfig other) { - if (other == com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance()) return this; - if (!other.getMaskingCharacter().isEmpty()) { - maskingCharacter_ = other.maskingCharacter_; - onChanged(); - } - if (other.getNumberToMask() != 0) { - setNumberToMask(other.getNumberToMask()); - } - if (other.getReverseOrder() != false) { - setReverseOrder(other.getReverseOrder()); - } - if (charactersToIgnoreBuilder_ == null) { - if (!other.charactersToIgnore_.isEmpty()) { - if (charactersToIgnore_.isEmpty()) { - charactersToIgnore_ = other.charactersToIgnore_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCharactersToIgnoreIsMutable(); - charactersToIgnore_.addAll(other.charactersToIgnore_); - } - onChanged(); - } - } else { - if (!other.charactersToIgnore_.isEmpty()) { - if (charactersToIgnoreBuilder_.isEmpty()) { - charactersToIgnoreBuilder_.dispose(); - charactersToIgnoreBuilder_ = null; - charactersToIgnore_ = other.charactersToIgnore_; - bitField0_ = (bitField0_ & ~0x00000001); - charactersToIgnoreBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCharactersToIgnoreFieldBuilder() : null; - } else { - charactersToIgnoreBuilder_.addAllMessages(other.charactersToIgnore_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CharacterMaskConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CharacterMaskConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object maskingCharacter_ = ""; - /** - *
-     * Character to use to mask the sensitive values&mdash;for example, `*` for an
-     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
-     * code or credit card number. This string must have a length of 1. If not
-     * supplied, this value defaults to `*` for strings, and `0` for digits.
-     * 
- * - * string masking_character = 1; - * @return The maskingCharacter. - */ - public java.lang.String getMaskingCharacter() { - java.lang.Object ref = maskingCharacter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - maskingCharacter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Character to use to mask the sensitive values&mdash;for example, `*` for an
-     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
-     * code or credit card number. This string must have a length of 1. If not
-     * supplied, this value defaults to `*` for strings, and `0` for digits.
-     * 
- * - * string masking_character = 1; - * @return The bytes for maskingCharacter. - */ - public com.google.protobuf.ByteString - getMaskingCharacterBytes() { - java.lang.Object ref = maskingCharacter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - maskingCharacter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Character to use to mask the sensitive values&mdash;for example, `*` for an
-     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
-     * code or credit card number. This string must have a length of 1. If not
-     * supplied, this value defaults to `*` for strings, and `0` for digits.
-     * 
- * - * string masking_character = 1; - * @param value The maskingCharacter to set. - * @return This builder for chaining. - */ - public Builder setMaskingCharacter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - maskingCharacter_ = value; - onChanged(); - return this; - } - /** - *
-     * Character to use to mask the sensitive values&mdash;for example, `*` for an
-     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
-     * code or credit card number. This string must have a length of 1. If not
-     * supplied, this value defaults to `*` for strings, and `0` for digits.
-     * 
- * - * string masking_character = 1; - * @return This builder for chaining. - */ - public Builder clearMaskingCharacter() { - - maskingCharacter_ = getDefaultInstance().getMaskingCharacter(); - onChanged(); - return this; - } - /** - *
-     * Character to use to mask the sensitive values&mdash;for example, `*` for an
-     * alphabetic string such as a name, or `0` for a numeric string such as ZIP
-     * code or credit card number. This string must have a length of 1. If not
-     * supplied, this value defaults to `*` for strings, and `0` for digits.
-     * 
- * - * string masking_character = 1; - * @param value The bytes for maskingCharacter to set. - * @return This builder for chaining. - */ - public Builder setMaskingCharacterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - maskingCharacter_ = value; - onChanged(); - return this; - } - - private int numberToMask_ ; - /** - *
-     * Number of characters to mask. If not set, all matching chars will be
-     * masked. Skipped characters do not count towards this tally.
-     * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
-     * masks all but a number of characters.
-     * For example, suppose you have the following values:
-     * - `masking_character` is `*`
-     * - `number_to_mask` is `-4`
-     * - `reverse_order` is `false`
-     * - `CharsToIgnore` includes `-`
-     * - Input string is `1234-5678-9012-3456`
-     * The resulting de-identified string is
-     * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
-     * If `reverse_order` is `true`, all but the first four characters are masked
-     * as `1234-****-****-****`.
-     * 
- * - * int32 number_to_mask = 2; - * @return The numberToMask. - */ - @java.lang.Override - public int getNumberToMask() { - return numberToMask_; - } - /** - *
-     * Number of characters to mask. If not set, all matching chars will be
-     * masked. Skipped characters do not count towards this tally.
-     * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
-     * masks all but a number of characters.
-     * For example, suppose you have the following values:
-     * - `masking_character` is `*`
-     * - `number_to_mask` is `-4`
-     * - `reverse_order` is `false`
-     * - `CharsToIgnore` includes `-`
-     * - Input string is `1234-5678-9012-3456`
-     * The resulting de-identified string is
-     * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
-     * If `reverse_order` is `true`, all but the first four characters are masked
-     * as `1234-****-****-****`.
-     * 
- * - * int32 number_to_mask = 2; - * @param value The numberToMask to set. - * @return This builder for chaining. - */ - public Builder setNumberToMask(int value) { - - numberToMask_ = value; - onChanged(); - return this; - } - /** - *
-     * Number of characters to mask. If not set, all matching chars will be
-     * masked. Skipped characters do not count towards this tally.
-     * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
-     * masks all but a number of characters.
-     * For example, suppose you have the following values:
-     * - `masking_character` is `*`
-     * - `number_to_mask` is `-4`
-     * - `reverse_order` is `false`
-     * - `CharsToIgnore` includes `-`
-     * - Input string is `1234-5678-9012-3456`
-     * The resulting de-identified string is
-     * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
-     * If `reverse_order` is `true`, all but the first four characters are masked
-     * as `1234-****-****-****`.
-     * 
- * - * int32 number_to_mask = 2; - * @return This builder for chaining. - */ - public Builder clearNumberToMask() { - - numberToMask_ = 0; - onChanged(); - return this; - } - - private boolean reverseOrder_ ; - /** - *
-     * Mask characters in reverse order. For example, if `masking_character` is
-     * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
-     * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
-     * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
-     * is `true`, then the string `12345` is masked as `12***`.
-     * 
- * - * bool reverse_order = 3; - * @return The reverseOrder. - */ - @java.lang.Override - public boolean getReverseOrder() { - return reverseOrder_; - } - /** - *
-     * Mask characters in reverse order. For example, if `masking_character` is
-     * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
-     * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
-     * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
-     * is `true`, then the string `12345` is masked as `12***`.
-     * 
- * - * bool reverse_order = 3; - * @param value The reverseOrder to set. - * @return This builder for chaining. - */ - public Builder setReverseOrder(boolean value) { - - reverseOrder_ = value; - onChanged(); - return this; - } - /** - *
-     * Mask characters in reverse order. For example, if `masking_character` is
-     * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
-     * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
-     * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
-     * is `true`, then the string `12345` is masked as `12***`.
-     * 
- * - * bool reverse_order = 3; - * @return This builder for chaining. - */ - public Builder clearReverseOrder() { - - reverseOrder_ = false; - onChanged(); - return this; - } - - private java.util.List charactersToIgnore_ = - java.util.Collections.emptyList(); - private void ensureCharactersToIgnoreIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - charactersToIgnore_ = new java.util.ArrayList(charactersToIgnore_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.CharsToIgnore, com.google.privacy.dlp.v2.CharsToIgnore.Builder, com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder> charactersToIgnoreBuilder_; - - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public java.util.List getCharactersToIgnoreList() { - if (charactersToIgnoreBuilder_ == null) { - return java.util.Collections.unmodifiableList(charactersToIgnore_); - } else { - return charactersToIgnoreBuilder_.getMessageList(); - } - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public int getCharactersToIgnoreCount() { - if (charactersToIgnoreBuilder_ == null) { - return charactersToIgnore_.size(); - } else { - return charactersToIgnoreBuilder_.getCount(); - } - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public com.google.privacy.dlp.v2.CharsToIgnore getCharactersToIgnore(int index) { - if (charactersToIgnoreBuilder_ == null) { - return charactersToIgnore_.get(index); - } else { - return charactersToIgnoreBuilder_.getMessage(index); - } - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public Builder setCharactersToIgnore( - int index, com.google.privacy.dlp.v2.CharsToIgnore value) { - if (charactersToIgnoreBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCharactersToIgnoreIsMutable(); - charactersToIgnore_.set(index, value); - onChanged(); - } else { - charactersToIgnoreBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public Builder setCharactersToIgnore( - int index, com.google.privacy.dlp.v2.CharsToIgnore.Builder builderForValue) { - if (charactersToIgnoreBuilder_ == null) { - ensureCharactersToIgnoreIsMutable(); - charactersToIgnore_.set(index, builderForValue.build()); - onChanged(); - } else { - charactersToIgnoreBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public Builder addCharactersToIgnore(com.google.privacy.dlp.v2.CharsToIgnore value) { - if (charactersToIgnoreBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCharactersToIgnoreIsMutable(); - charactersToIgnore_.add(value); - onChanged(); - } else { - charactersToIgnoreBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public Builder addCharactersToIgnore( - int index, com.google.privacy.dlp.v2.CharsToIgnore value) { - if (charactersToIgnoreBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCharactersToIgnoreIsMutable(); - charactersToIgnore_.add(index, value); - onChanged(); - } else { - charactersToIgnoreBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public Builder addCharactersToIgnore( - com.google.privacy.dlp.v2.CharsToIgnore.Builder builderForValue) { - if (charactersToIgnoreBuilder_ == null) { - ensureCharactersToIgnoreIsMutable(); - charactersToIgnore_.add(builderForValue.build()); - onChanged(); - } else { - charactersToIgnoreBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public Builder addCharactersToIgnore( - int index, com.google.privacy.dlp.v2.CharsToIgnore.Builder builderForValue) { - if (charactersToIgnoreBuilder_ == null) { - ensureCharactersToIgnoreIsMutable(); - charactersToIgnore_.add(index, builderForValue.build()); - onChanged(); - } else { - charactersToIgnoreBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public Builder addAllCharactersToIgnore( - java.lang.Iterable values) { - if (charactersToIgnoreBuilder_ == null) { - ensureCharactersToIgnoreIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, charactersToIgnore_); - onChanged(); - } else { - charactersToIgnoreBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public Builder clearCharactersToIgnore() { - if (charactersToIgnoreBuilder_ == null) { - charactersToIgnore_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - charactersToIgnoreBuilder_.clear(); - } - return this; - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public Builder removeCharactersToIgnore(int index) { - if (charactersToIgnoreBuilder_ == null) { - ensureCharactersToIgnoreIsMutable(); - charactersToIgnore_.remove(index); - onChanged(); - } else { - charactersToIgnoreBuilder_.remove(index); - } - return this; - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public com.google.privacy.dlp.v2.CharsToIgnore.Builder getCharactersToIgnoreBuilder( - int index) { - return getCharactersToIgnoreFieldBuilder().getBuilder(index); - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder getCharactersToIgnoreOrBuilder( - int index) { - if (charactersToIgnoreBuilder_ == null) { - return charactersToIgnore_.get(index); } else { - return charactersToIgnoreBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public java.util.List - getCharactersToIgnoreOrBuilderList() { - if (charactersToIgnoreBuilder_ != null) { - return charactersToIgnoreBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(charactersToIgnore_); - } - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public com.google.privacy.dlp.v2.CharsToIgnore.Builder addCharactersToIgnoreBuilder() { - return getCharactersToIgnoreFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.CharsToIgnore.getDefaultInstance()); - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public com.google.privacy.dlp.v2.CharsToIgnore.Builder addCharactersToIgnoreBuilder( - int index) { - return getCharactersToIgnoreFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.CharsToIgnore.getDefaultInstance()); - } - /** - *
-     * When masking a string, items in this list will be skipped when replacing
-     * characters. For example, if the input string is `555-555-5555` and you
-     * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-     * returns `***-**5-5555`.
-     * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - public java.util.List - getCharactersToIgnoreBuilderList() { - return getCharactersToIgnoreFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.CharsToIgnore, com.google.privacy.dlp.v2.CharsToIgnore.Builder, com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder> - getCharactersToIgnoreFieldBuilder() { - if (charactersToIgnoreBuilder_ == null) { - charactersToIgnoreBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.CharsToIgnore, com.google.privacy.dlp.v2.CharsToIgnore.Builder, com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder>( - charactersToIgnore_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - charactersToIgnore_ = null; - } - return charactersToIgnoreBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CharacterMaskConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CharacterMaskConfig) - private static final com.google.privacy.dlp.v2.CharacterMaskConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CharacterMaskConfig(); - } - - public static com.google.privacy.dlp.v2.CharacterMaskConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CharacterMaskConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CharacterMaskConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CharacterMaskConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java deleted file mode 100644 index 1024f9f0ec49..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharacterMaskConfigOrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CharacterMaskConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CharacterMaskConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Character to use to mask the sensitive values&mdash;for example, `*` for an
-   * alphabetic string such as a name, or `0` for a numeric string such as ZIP
-   * code or credit card number. This string must have a length of 1. If not
-   * supplied, this value defaults to `*` for strings, and `0` for digits.
-   * 
- * - * string masking_character = 1; - * @return The maskingCharacter. - */ - java.lang.String getMaskingCharacter(); - /** - *
-   * Character to use to mask the sensitive values&mdash;for example, `*` for an
-   * alphabetic string such as a name, or `0` for a numeric string such as ZIP
-   * code or credit card number. This string must have a length of 1. If not
-   * supplied, this value defaults to `*` for strings, and `0` for digits.
-   * 
- * - * string masking_character = 1; - * @return The bytes for maskingCharacter. - */ - com.google.protobuf.ByteString - getMaskingCharacterBytes(); - - /** - *
-   * Number of characters to mask. If not set, all matching chars will be
-   * masked. Skipped characters do not count towards this tally.
-   * If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP
-   * masks all but a number of characters.
-   * For example, suppose you have the following values:
-   * - `masking_character` is `*`
-   * - `number_to_mask` is `-4`
-   * - `reverse_order` is `false`
-   * - `CharsToIgnore` includes `-`
-   * - Input string is `1234-5678-9012-3456`
-   * The resulting de-identified string is
-   * `****-****-****-3456`. Cloud DLP masks all but the last four characters.
-   * If `reverse_order` is `true`, all but the first four characters are masked
-   * as `1234-****-****-****`.
-   * 
- * - * int32 number_to_mask = 2; - * @return The numberToMask. - */ - int getNumberToMask(); - - /** - *
-   * Mask characters in reverse order. For example, if `masking_character` is
-   * `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the
-   * input string `1234-5678-9012-3456` is masked as `00000000000000-3456`.
-   * If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order`
-   * is `true`, then the string `12345` is masked as `12***`.
-   * 
- * - * bool reverse_order = 3; - * @return The reverseOrder. - */ - boolean getReverseOrder(); - - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - java.util.List - getCharactersToIgnoreList(); - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - com.google.privacy.dlp.v2.CharsToIgnore getCharactersToIgnore(int index); - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - int getCharactersToIgnoreCount(); - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - java.util.List - getCharactersToIgnoreOrBuilderList(); - /** - *
-   * When masking a string, items in this list will be skipped when replacing
-   * characters. For example, if the input string is `555-555-5555` and you
-   * instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP
-   * returns `***-**5-5555`.
-   * 
- * - * repeated .google.privacy.dlp.v2.CharsToIgnore characters_to_ignore = 4; - */ - com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder getCharactersToIgnoreOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java deleted file mode 100644 index 9017a87346f2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnore.java +++ /dev/null @@ -1,1090 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Characters to skip when doing deidentification of a value. These will be left
- * alone and skipped.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CharsToIgnore} - */ -public final class CharsToIgnore extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CharsToIgnore) - CharsToIgnoreOrBuilder { -private static final long serialVersionUID = 0L; - // Use CharsToIgnore.newBuilder() to construct. - private CharsToIgnore(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CharsToIgnore() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CharsToIgnore(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CharsToIgnore( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - charactersCase_ = 1; - characters_ = s; - break; - } - case 16: { - int rawValue = input.readEnum(); - charactersCase_ = 2; - characters_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CharsToIgnore.class, com.google.privacy.dlp.v2.CharsToIgnore.Builder.class); - } - - /** - *
-   * Convenience enum for indicating common characters to not transform.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore} - */ - public enum CommonCharsToIgnore - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0; - */ - COMMON_CHARS_TO_IGNORE_UNSPECIFIED(0), - /** - *
-     * 0-9
-     * 
- * - * NUMERIC = 1; - */ - NUMERIC(1), - /** - *
-     * A-Z
-     * 
- * - * ALPHA_UPPER_CASE = 2; - */ - ALPHA_UPPER_CASE(2), - /** - *
-     * a-z
-     * 
- * - * ALPHA_LOWER_CASE = 3; - */ - ALPHA_LOWER_CASE(3), - /** - *
-     * US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
-     * 
- * - * PUNCTUATION = 4; - */ - PUNCTUATION(4), - /** - *
-     * Whitespace character, one of [ \t\n\x0B\f\r]
-     * 
- * - * WHITESPACE = 5; - */ - WHITESPACE(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0; - */ - public static final int COMMON_CHARS_TO_IGNORE_UNSPECIFIED_VALUE = 0; - /** - *
-     * 0-9
-     * 
- * - * NUMERIC = 1; - */ - public static final int NUMERIC_VALUE = 1; - /** - *
-     * A-Z
-     * 
- * - * ALPHA_UPPER_CASE = 2; - */ - public static final int ALPHA_UPPER_CASE_VALUE = 2; - /** - *
-     * a-z
-     * 
- * - * ALPHA_LOWER_CASE = 3; - */ - public static final int ALPHA_LOWER_CASE_VALUE = 3; - /** - *
-     * US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
-     * 
- * - * PUNCTUATION = 4; - */ - public static final int PUNCTUATION_VALUE = 4; - /** - *
-     * Whitespace character, one of [ \t\n\x0B\f\r]
-     * 
- * - * WHITESPACE = 5; - */ - public static final int WHITESPACE_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static CommonCharsToIgnore valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static CommonCharsToIgnore forNumber(int value) { - switch (value) { - case 0: return COMMON_CHARS_TO_IGNORE_UNSPECIFIED; - case 1: return NUMERIC; - case 2: return ALPHA_UPPER_CASE; - case 3: return ALPHA_LOWER_CASE; - case 4: return PUNCTUATION; - case 5: return WHITESPACE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - CommonCharsToIgnore> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public CommonCharsToIgnore findValueByNumber(int number) { - return CommonCharsToIgnore.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.CharsToIgnore.getDescriptor().getEnumTypes().get(0); - } - - private static final CommonCharsToIgnore[] VALUES = values(); - - public static CommonCharsToIgnore valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private CommonCharsToIgnore(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore) - } - - private int charactersCase_ = 0; - private java.lang.Object characters_; - public enum CharactersCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CHARACTERS_TO_SKIP(1), - COMMON_CHARACTERS_TO_IGNORE(2), - CHARACTERS_NOT_SET(0); - private final int value; - private CharactersCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static CharactersCase valueOf(int value) { - return forNumber(value); - } - - public static CharactersCase forNumber(int value) { - switch (value) { - case 1: return CHARACTERS_TO_SKIP; - case 2: return COMMON_CHARACTERS_TO_IGNORE; - case 0: return CHARACTERS_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public CharactersCase - getCharactersCase() { - return CharactersCase.forNumber( - charactersCase_); - } - - public static final int CHARACTERS_TO_SKIP_FIELD_NUMBER = 1; - /** - *
-   * Characters to not transform when masking.
-   * 
- * - * string characters_to_skip = 1; - * @return Whether the charactersToSkip field is set. - */ - public boolean hasCharactersToSkip() { - return charactersCase_ == 1; - } - /** - *
-   * Characters to not transform when masking.
-   * 
- * - * string characters_to_skip = 1; - * @return The charactersToSkip. - */ - public java.lang.String getCharactersToSkip() { - java.lang.Object ref = ""; - if (charactersCase_ == 1) { - ref = characters_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (charactersCase_ == 1) { - characters_ = s; - } - return s; - } - } - /** - *
-   * Characters to not transform when masking.
-   * 
- * - * string characters_to_skip = 1; - * @return The bytes for charactersToSkip. - */ - public com.google.protobuf.ByteString - getCharactersToSkipBytes() { - java.lang.Object ref = ""; - if (charactersCase_ == 1) { - ref = characters_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (charactersCase_ == 1) { - characters_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int COMMON_CHARACTERS_TO_IGNORE_FIELD_NUMBER = 2; - /** - *
-   * Common characters to not transform when masking. Useful to avoid removing
-   * punctuation.
-   * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return Whether the commonCharactersToIgnore field is set. - */ - public boolean hasCommonCharactersToIgnore() { - return charactersCase_ == 2; - } - /** - *
-   * Common characters to not transform when masking. Useful to avoid removing
-   * punctuation.
-   * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return The enum numeric value on the wire for commonCharactersToIgnore. - */ - public int getCommonCharactersToIgnoreValue() { - if (charactersCase_ == 2) { - return (java.lang.Integer) characters_; - } - return 0; - } - /** - *
-   * Common characters to not transform when masking. Useful to avoid removing
-   * punctuation.
-   * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return The commonCharactersToIgnore. - */ - public com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore getCommonCharactersToIgnore() { - if (charactersCase_ == 2) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore result = com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.valueOf( - (java.lang.Integer) characters_); - return result == null ? com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.COMMON_CHARS_TO_IGNORE_UNSPECIFIED; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (charactersCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, characters_); - } - if (charactersCase_ == 2) { - output.writeEnum(2, ((java.lang.Integer) characters_)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (charactersCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, characters_); - } - if (charactersCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, ((java.lang.Integer) characters_)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CharsToIgnore)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CharsToIgnore other = (com.google.privacy.dlp.v2.CharsToIgnore) obj; - - if (!getCharactersCase().equals(other.getCharactersCase())) return false; - switch (charactersCase_) { - case 1: - if (!getCharactersToSkip() - .equals(other.getCharactersToSkip())) return false; - break; - case 2: - if (getCommonCharactersToIgnoreValue() - != other.getCommonCharactersToIgnoreValue()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (charactersCase_) { - case 1: - hash = (37 * hash) + CHARACTERS_TO_SKIP_FIELD_NUMBER; - hash = (53 * hash) + getCharactersToSkip().hashCode(); - break; - case 2: - hash = (37 * hash) + COMMON_CHARACTERS_TO_IGNORE_FIELD_NUMBER; - hash = (53 * hash) + getCommonCharactersToIgnoreValue(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CharsToIgnore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CharsToIgnore prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Characters to skip when doing deidentification of a value. These will be left
-   * alone and skipped.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CharsToIgnore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CharsToIgnore) - com.google.privacy.dlp.v2.CharsToIgnoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CharsToIgnore.class, com.google.privacy.dlp.v2.CharsToIgnore.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CharsToIgnore.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - charactersCase_ = 0; - characters_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CharsToIgnore getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CharsToIgnore.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CharsToIgnore build() { - com.google.privacy.dlp.v2.CharsToIgnore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CharsToIgnore buildPartial() { - com.google.privacy.dlp.v2.CharsToIgnore result = new com.google.privacy.dlp.v2.CharsToIgnore(this); - if (charactersCase_ == 1) { - result.characters_ = characters_; - } - if (charactersCase_ == 2) { - result.characters_ = characters_; - } - result.charactersCase_ = charactersCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CharsToIgnore) { - return mergeFrom((com.google.privacy.dlp.v2.CharsToIgnore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CharsToIgnore other) { - if (other == com.google.privacy.dlp.v2.CharsToIgnore.getDefaultInstance()) return this; - switch (other.getCharactersCase()) { - case CHARACTERS_TO_SKIP: { - charactersCase_ = 1; - characters_ = other.characters_; - onChanged(); - break; - } - case COMMON_CHARACTERS_TO_IGNORE: { - setCommonCharactersToIgnoreValue(other.getCommonCharactersToIgnoreValue()); - break; - } - case CHARACTERS_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CharsToIgnore parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CharsToIgnore) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int charactersCase_ = 0; - private java.lang.Object characters_; - public CharactersCase - getCharactersCase() { - return CharactersCase.forNumber( - charactersCase_); - } - - public Builder clearCharacters() { - charactersCase_ = 0; - characters_ = null; - onChanged(); - return this; - } - - - /** - *
-     * Characters to not transform when masking.
-     * 
- * - * string characters_to_skip = 1; - * @return Whether the charactersToSkip field is set. - */ - @java.lang.Override - public boolean hasCharactersToSkip() { - return charactersCase_ == 1; - } - /** - *
-     * Characters to not transform when masking.
-     * 
- * - * string characters_to_skip = 1; - * @return The charactersToSkip. - */ - @java.lang.Override - public java.lang.String getCharactersToSkip() { - java.lang.Object ref = ""; - if (charactersCase_ == 1) { - ref = characters_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (charactersCase_ == 1) { - characters_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Characters to not transform when masking.
-     * 
- * - * string characters_to_skip = 1; - * @return The bytes for charactersToSkip. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCharactersToSkipBytes() { - java.lang.Object ref = ""; - if (charactersCase_ == 1) { - ref = characters_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (charactersCase_ == 1) { - characters_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Characters to not transform when masking.
-     * 
- * - * string characters_to_skip = 1; - * @param value The charactersToSkip to set. - * @return This builder for chaining. - */ - public Builder setCharactersToSkip( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - charactersCase_ = 1; - characters_ = value; - onChanged(); - return this; - } - /** - *
-     * Characters to not transform when masking.
-     * 
- * - * string characters_to_skip = 1; - * @return This builder for chaining. - */ - public Builder clearCharactersToSkip() { - if (charactersCase_ == 1) { - charactersCase_ = 0; - characters_ = null; - onChanged(); - } - return this; - } - /** - *
-     * Characters to not transform when masking.
-     * 
- * - * string characters_to_skip = 1; - * @param value The bytes for charactersToSkip to set. - * @return This builder for chaining. - */ - public Builder setCharactersToSkipBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - charactersCase_ = 1; - characters_ = value; - onChanged(); - return this; - } - - /** - *
-     * Common characters to not transform when masking. Useful to avoid removing
-     * punctuation.
-     * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return Whether the commonCharactersToIgnore field is set. - */ - @java.lang.Override - public boolean hasCommonCharactersToIgnore() { - return charactersCase_ == 2; - } - /** - *
-     * Common characters to not transform when masking. Useful to avoid removing
-     * punctuation.
-     * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return The enum numeric value on the wire for commonCharactersToIgnore. - */ - @java.lang.Override - public int getCommonCharactersToIgnoreValue() { - if (charactersCase_ == 2) { - return ((java.lang.Integer) characters_).intValue(); - } - return 0; - } - /** - *
-     * Common characters to not transform when masking. Useful to avoid removing
-     * punctuation.
-     * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @param value The enum numeric value on the wire for commonCharactersToIgnore to set. - * @return This builder for chaining. - */ - public Builder setCommonCharactersToIgnoreValue(int value) { - charactersCase_ = 2; - characters_ = value; - onChanged(); - return this; - } - /** - *
-     * Common characters to not transform when masking. Useful to avoid removing
-     * punctuation.
-     * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return The commonCharactersToIgnore. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore getCommonCharactersToIgnore() { - if (charactersCase_ == 2) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore result = com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.valueOf( - (java.lang.Integer) characters_); - return result == null ? com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore.COMMON_CHARS_TO_IGNORE_UNSPECIFIED; - } - /** - *
-     * Common characters to not transform when masking. Useful to avoid removing
-     * punctuation.
-     * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @param value The commonCharactersToIgnore to set. - * @return This builder for chaining. - */ - public Builder setCommonCharactersToIgnore(com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore value) { - if (value == null) { - throw new NullPointerException(); - } - charactersCase_ = 2; - characters_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Common characters to not transform when masking. Useful to avoid removing
-     * punctuation.
-     * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return This builder for chaining. - */ - public Builder clearCommonCharactersToIgnore() { - if (charactersCase_ == 2) { - charactersCase_ = 0; - characters_ = null; - onChanged(); - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CharsToIgnore) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CharsToIgnore) - private static final com.google.privacy.dlp.v2.CharsToIgnore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CharsToIgnore(); - } - - public static com.google.privacy.dlp.v2.CharsToIgnore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CharsToIgnore parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CharsToIgnore(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CharsToIgnore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnoreOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnoreOrBuilder.java deleted file mode 100644 index 83336c081cf2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CharsToIgnoreOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CharsToIgnoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CharsToIgnore) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Characters to not transform when masking.
-   * 
- * - * string characters_to_skip = 1; - * @return Whether the charactersToSkip field is set. - */ - boolean hasCharactersToSkip(); - /** - *
-   * Characters to not transform when masking.
-   * 
- * - * string characters_to_skip = 1; - * @return The charactersToSkip. - */ - java.lang.String getCharactersToSkip(); - /** - *
-   * Characters to not transform when masking.
-   * 
- * - * string characters_to_skip = 1; - * @return The bytes for charactersToSkip. - */ - com.google.protobuf.ByteString - getCharactersToSkipBytes(); - - /** - *
-   * Common characters to not transform when masking. Useful to avoid removing
-   * punctuation.
-   * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return Whether the commonCharactersToIgnore field is set. - */ - boolean hasCommonCharactersToIgnore(); - /** - *
-   * Common characters to not transform when masking. Useful to avoid removing
-   * punctuation.
-   * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return The enum numeric value on the wire for commonCharactersToIgnore. - */ - int getCommonCharactersToIgnoreValue(); - /** - *
-   * Common characters to not transform when masking. Useful to avoid removing
-   * punctuation.
-   * 
- * - * .google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore common_characters_to_ignore = 2; - * @return The commonCharactersToIgnore. - */ - com.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore getCommonCharactersToIgnore(); - - public com.google.privacy.dlp.v2.CharsToIgnore.CharactersCase getCharactersCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSet.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSet.java deleted file mode 100644 index 3920225df85d..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSet.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Message representing a set of files in Cloud Storage.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStorageFileSet} - */ -public final class CloudStorageFileSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageFileSet) - CloudStorageFileSetOrBuilder { -private static final long serialVersionUID = 0L; - // Use CloudStorageFileSet.newBuilder() to construct. - private CloudStorageFileSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CloudStorageFileSet() { - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CloudStorageFileSet(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CloudStorageFileSet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStorageFileSet.class, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-   * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
-   * path is allowed.
-   * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-   * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
-   * path is allowed.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageFileSet)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CloudStorageFileSet other = (com.google.privacy.dlp.v2.CloudStorageFileSet) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageFileSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStorageFileSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Message representing a set of files in Cloud Storage.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStorageFileSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageFileSet) - com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStorageFileSet.class, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CloudStorageFileSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageFileSet getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageFileSet build() { - com.google.privacy.dlp.v2.CloudStorageFileSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageFileSet buildPartial() { - com.google.privacy.dlp.v2.CloudStorageFileSet result = new com.google.privacy.dlp.v2.CloudStorageFileSet(this); - result.url_ = url_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CloudStorageFileSet) { - return mergeFrom((com.google.privacy.dlp.v2.CloudStorageFileSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageFileSet other) { - if (other == com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CloudStorageFileSet parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CloudStorageFileSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
-     * path is allowed.
-     * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
-     * path is allowed.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
-     * path is allowed.
-     * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
-     * path is allowed.
-     * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-     * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
-     * path is allowed.
-     * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageFileSet) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageFileSet) - private static final com.google.privacy.dlp.v2.CloudStorageFileSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageFileSet(); - } - - public static com.google.privacy.dlp.v2.CloudStorageFileSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CloudStorageFileSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloudStorageFileSet(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageFileSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSetOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSetOrBuilder.java deleted file mode 100644 index 53a34ad8d59e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageFileSetOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface CloudStorageFileSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStorageFileSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
-   * path is allowed.
-   * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-   * The url, in the format `gs://<bucket>/<path>`. Trailing wildcard in the
-   * path is allowed.
-   * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java deleted file mode 100644 index e679a90d182e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptions.java +++ /dev/null @@ -1,2576 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Options defining a file or a set of files within a Cloud Storage
- * bucket.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions} - */ -public final class CloudStorageOptions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageOptions) - CloudStorageOptionsOrBuilder { -private static final long serialVersionUID = 0L; - // Use CloudStorageOptions.newBuilder() to construct. - private CloudStorageOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CloudStorageOptions() { - fileTypes_ = java.util.Collections.emptyList(); - sampleMethod_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CloudStorageOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CloudStorageOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder subBuilder = null; - if (fileSet_ != null) { - subBuilder = fileSet_.toBuilder(); - } - fileSet_ = input.readMessage(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fileSet_); - fileSet_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - - bytesLimitPerFile_ = input.readInt64(); - break; - } - case 40: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fileTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fileTypes_.add(rawValue); - break; - } - case 42: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fileTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fileTypes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 48: { - int rawValue = input.readEnum(); - - sampleMethod_ = rawValue; - break; - } - case 56: { - - filesLimitPercent_ = input.readInt32(); - break; - } - case 64: { - - bytesLimitPerFilePercent_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fileTypes_ = java.util.Collections.unmodifiableList(fileTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStorageOptions.class, com.google.privacy.dlp.v2.CloudStorageOptions.Builder.class); - } - - /** - *
-   * How to sample bytes if not all bytes are scanned. Meaningful only when used
-   * in conjunction with bytes_limit_per_file. If not specified, scanning would
-   * start from the top.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.CloudStorageOptions.SampleMethod} - */ - public enum SampleMethod - implements com.google.protobuf.ProtocolMessageEnum { - /** - * SAMPLE_METHOD_UNSPECIFIED = 0; - */ - SAMPLE_METHOD_UNSPECIFIED(0), - /** - *
-     * Scan from the top (default).
-     * 
- * - * TOP = 1; - */ - TOP(1), - /** - *
-     * For each file larger than bytes_limit_per_file, randomly pick the offset
-     * to start scanning. The scanned bytes are contiguous.
-     * 
- * - * RANDOM_START = 2; - */ - RANDOM_START(2), - UNRECOGNIZED(-1), - ; - - /** - * SAMPLE_METHOD_UNSPECIFIED = 0; - */ - public static final int SAMPLE_METHOD_UNSPECIFIED_VALUE = 0; - /** - *
-     * Scan from the top (default).
-     * 
- * - * TOP = 1; - */ - public static final int TOP_VALUE = 1; - /** - *
-     * For each file larger than bytes_limit_per_file, randomly pick the offset
-     * to start scanning. The scanned bytes are contiguous.
-     * 
- * - * RANDOM_START = 2; - */ - public static final int RANDOM_START_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SampleMethod valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static SampleMethod forNumber(int value) { - switch (value) { - case 0: return SAMPLE_METHOD_UNSPECIFIED; - case 1: return TOP; - case 2: return RANDOM_START; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SampleMethod> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SampleMethod findValueByNumber(int number) { - return SampleMethod.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.CloudStorageOptions.getDescriptor().getEnumTypes().get(0); - } - - private static final SampleMethod[] VALUES = values(); - - public static SampleMethod valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private SampleMethod(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CloudStorageOptions.SampleMethod) - } - - public interface FileSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStorageOptions.FileSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The Cloud Storage url of the file(s) to scan, in the format
-     * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
-     * If the url ends in a trailing slash, the bucket or directory represented
-     * by the url will be scanned non-recursively (content in sub-directories
-     * will not be scanned). This means that `gs://mybucket/` is equivalent to
-     * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
-     * `gs://mybucket/directory/*`.
-     * Exactly one of `url` or `regex_file_set` must be set.
-     * 
- * - * string url = 1; - * @return The url. - */ - java.lang.String getUrl(); - /** - *
-     * The Cloud Storage url of the file(s) to scan, in the format
-     * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
-     * If the url ends in a trailing slash, the bucket or directory represented
-     * by the url will be scanned non-recursively (content in sub-directories
-     * will not be scanned). This means that `gs://mybucket/` is equivalent to
-     * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
-     * `gs://mybucket/directory/*`.
-     * Exactly one of `url` or `regex_file_set` must be set.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - com.google.protobuf.ByteString - getUrlBytes(); - - /** - *
-     * The regex-filtered set of files to scan. Exactly one of `url` or
-     * `regex_file_set` must be set.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - * @return Whether the regexFileSet field is set. - */ - boolean hasRegexFileSet(); - /** - *
-     * The regex-filtered set of files to scan. Exactly one of `url` or
-     * `regex_file_set` must be set.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - * @return The regexFileSet. - */ - com.google.privacy.dlp.v2.CloudStorageRegexFileSet getRegexFileSet(); - /** - *
-     * The regex-filtered set of files to scan. Exactly one of `url` or
-     * `regex_file_set` must be set.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - */ - com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder getRegexFileSetOrBuilder(); - } - /** - *
-   * Set of files to scan.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions.FileSet} - */ - public static final class FileSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageOptions.FileSet) - FileSetOrBuilder { - private static final long serialVersionUID = 0L; - // Use FileSet.newBuilder() to construct. - private FileSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FileSet() { - url_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FileSet(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FileSet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder subBuilder = null; - if (regexFileSet_ != null) { - subBuilder = regexFileSet_.toBuilder(); - } - regexFileSet_ = input.readMessage(com.google.privacy.dlp.v2.CloudStorageRegexFileSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regexFileSet_); - regexFileSet_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.class, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder.class); - } - - public static final int URL_FIELD_NUMBER = 1; - private volatile java.lang.Object url_; - /** - *
-     * The Cloud Storage url of the file(s) to scan, in the format
-     * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
-     * If the url ends in a trailing slash, the bucket or directory represented
-     * by the url will be scanned non-recursively (content in sub-directories
-     * will not be scanned). This means that `gs://mybucket/` is equivalent to
-     * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
-     * `gs://mybucket/directory/*`.
-     * Exactly one of `url` or `regex_file_set` must be set.
-     * 
- * - * string url = 1; - * @return The url. - */ - @java.lang.Override - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } - } - /** - *
-     * The Cloud Storage url of the file(s) to scan, in the format
-     * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
-     * If the url ends in a trailing slash, the bucket or directory represented
-     * by the url will be scanned non-recursively (content in sub-directories
-     * will not be scanned). This means that `gs://mybucket/` is equivalent to
-     * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
-     * `gs://mybucket/directory/*`.
-     * Exactly one of `url` or `regex_file_set` must be set.
-     * 
- * - * string url = 1; - * @return The bytes for url. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REGEX_FILE_SET_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.CloudStorageRegexFileSet regexFileSet_; - /** - *
-     * The regex-filtered set of files to scan. Exactly one of `url` or
-     * `regex_file_set` must be set.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - * @return Whether the regexFileSet field is set. - */ - @java.lang.Override - public boolean hasRegexFileSet() { - return regexFileSet_ != null; - } - /** - *
-     * The regex-filtered set of files to scan. Exactly one of `url` or
-     * `regex_file_set` must be set.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - * @return The regexFileSet. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getRegexFileSet() { - return regexFileSet_ == null ? com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance() : regexFileSet_; - } - /** - *
-     * The regex-filtered set of files to scan. Exactly one of `url` or
-     * `regex_file_set` must be set.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder getRegexFileSetOrBuilder() { - return getRegexFileSet(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); - } - if (regexFileSet_ != null) { - output.writeMessage(2, getRegexFileSet()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); - } - if (regexFileSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRegexFileSet()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageOptions.FileSet)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet other = (com.google.privacy.dlp.v2.CloudStorageOptions.FileSet) obj; - - if (!getUrl() - .equals(other.getUrl())) return false; - if (hasRegexFileSet() != other.hasRegexFileSet()) return false; - if (hasRegexFileSet()) { - if (!getRegexFileSet() - .equals(other.getRegexFileSet())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URL_FIELD_NUMBER; - hash = (53 * hash) + getUrl().hashCode(); - if (hasRegexFileSet()) { - hash = (37 * hash) + REGEX_FILE_SET_FIELD_NUMBER; - hash = (53 * hash) + getRegexFileSet().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Set of files to scan.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions.FileSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageOptions.FileSet) - com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.class, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - url_ = ""; - - if (regexFileSetBuilder_ == null) { - regexFileSet_ = null; - } else { - regexFileSet_ = null; - regexFileSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet build() { - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet buildPartial() { - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet result = new com.google.privacy.dlp.v2.CloudStorageOptions.FileSet(this); - result.url_ = url_; - if (regexFileSetBuilder_ == null) { - result.regexFileSet_ = regexFileSet_; - } else { - result.regexFileSet_ = regexFileSetBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CloudStorageOptions.FileSet) { - return mergeFrom((com.google.privacy.dlp.v2.CloudStorageOptions.FileSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet other) { - if (other == com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance()) return this; - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - if (other.hasRegexFileSet()) { - mergeRegexFileSet(other.getRegexFileSet()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CloudStorageOptions.FileSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object url_ = ""; - /** - *
-       * The Cloud Storage url of the file(s) to scan, in the format
-       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
-       * If the url ends in a trailing slash, the bucket or directory represented
-       * by the url will be scanned non-recursively (content in sub-directories
-       * will not be scanned). This means that `gs://mybucket/` is equivalent to
-       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
-       * `gs://mybucket/directory/*`.
-       * Exactly one of `url` or `regex_file_set` must be set.
-       * 
- * - * string url = 1; - * @return The url. - */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The Cloud Storage url of the file(s) to scan, in the format
-       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
-       * If the url ends in a trailing slash, the bucket or directory represented
-       * by the url will be scanned non-recursively (content in sub-directories
-       * will not be scanned). This means that `gs://mybucket/` is equivalent to
-       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
-       * `gs://mybucket/directory/*`.
-       * Exactly one of `url` or `regex_file_set` must be set.
-       * 
- * - * string url = 1; - * @return The bytes for url. - */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The Cloud Storage url of the file(s) to scan, in the format
-       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
-       * If the url ends in a trailing slash, the bucket or directory represented
-       * by the url will be scanned non-recursively (content in sub-directories
-       * will not be scanned). This means that `gs://mybucket/` is equivalent to
-       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
-       * `gs://mybucket/directory/*`.
-       * Exactly one of `url` or `regex_file_set` must be set.
-       * 
- * - * string url = 1; - * @param value The url to set. - * @return This builder for chaining. - */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - *
-       * The Cloud Storage url of the file(s) to scan, in the format
-       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
-       * If the url ends in a trailing slash, the bucket or directory represented
-       * by the url will be scanned non-recursively (content in sub-directories
-       * will not be scanned). This means that `gs://mybucket/` is equivalent to
-       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
-       * `gs://mybucket/directory/*`.
-       * Exactly one of `url` or `regex_file_set` must be set.
-       * 
- * - * string url = 1; - * @return This builder for chaining. - */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - *
-       * The Cloud Storage url of the file(s) to scan, in the format
-       * `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
-       * If the url ends in a trailing slash, the bucket or directory represented
-       * by the url will be scanned non-recursively (content in sub-directories
-       * will not be scanned). This means that `gs://mybucket/` is equivalent to
-       * `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to
-       * `gs://mybucket/directory/*`.
-       * Exactly one of `url` or `regex_file_set` must be set.
-       * 
- * - * string url = 1; - * @param value The bytes for url to set. - * @return This builder for chaining. - */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.CloudStorageRegexFileSet regexFileSet_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageRegexFileSet, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder> regexFileSetBuilder_; - /** - *
-       * The regex-filtered set of files to scan. Exactly one of `url` or
-       * `regex_file_set` must be set.
-       * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - * @return Whether the regexFileSet field is set. - */ - public boolean hasRegexFileSet() { - return regexFileSetBuilder_ != null || regexFileSet_ != null; - } - /** - *
-       * The regex-filtered set of files to scan. Exactly one of `url` or
-       * `regex_file_set` must be set.
-       * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - * @return The regexFileSet. - */ - public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getRegexFileSet() { - if (regexFileSetBuilder_ == null) { - return regexFileSet_ == null ? com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance() : regexFileSet_; - } else { - return regexFileSetBuilder_.getMessage(); - } - } - /** - *
-       * The regex-filtered set of files to scan. Exactly one of `url` or
-       * `regex_file_set` must be set.
-       * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - */ - public Builder setRegexFileSet(com.google.privacy.dlp.v2.CloudStorageRegexFileSet value) { - if (regexFileSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - regexFileSet_ = value; - onChanged(); - } else { - regexFileSetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The regex-filtered set of files to scan. Exactly one of `url` or
-       * `regex_file_set` must be set.
-       * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - */ - public Builder setRegexFileSet( - com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder builderForValue) { - if (regexFileSetBuilder_ == null) { - regexFileSet_ = builderForValue.build(); - onChanged(); - } else { - regexFileSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The regex-filtered set of files to scan. Exactly one of `url` or
-       * `regex_file_set` must be set.
-       * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - */ - public Builder mergeRegexFileSet(com.google.privacy.dlp.v2.CloudStorageRegexFileSet value) { - if (regexFileSetBuilder_ == null) { - if (regexFileSet_ != null) { - regexFileSet_ = - com.google.privacy.dlp.v2.CloudStorageRegexFileSet.newBuilder(regexFileSet_).mergeFrom(value).buildPartial(); - } else { - regexFileSet_ = value; - } - onChanged(); - } else { - regexFileSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The regex-filtered set of files to scan. Exactly one of `url` or
-       * `regex_file_set` must be set.
-       * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - */ - public Builder clearRegexFileSet() { - if (regexFileSetBuilder_ == null) { - regexFileSet_ = null; - onChanged(); - } else { - regexFileSet_ = null; - regexFileSetBuilder_ = null; - } - - return this; - } - /** - *
-       * The regex-filtered set of files to scan. Exactly one of `url` or
-       * `regex_file_set` must be set.
-       * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - */ - public com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder getRegexFileSetBuilder() { - - onChanged(); - return getRegexFileSetFieldBuilder().getBuilder(); - } - /** - *
-       * The regex-filtered set of files to scan. Exactly one of `url` or
-       * `regex_file_set` must be set.
-       * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - */ - public com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder getRegexFileSetOrBuilder() { - if (regexFileSetBuilder_ != null) { - return regexFileSetBuilder_.getMessageOrBuilder(); - } else { - return regexFileSet_ == null ? - com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance() : regexFileSet_; - } - } - /** - *
-       * The regex-filtered set of files to scan. Exactly one of `url` or
-       * `regex_file_set` must be set.
-       * 
- * - * .google.privacy.dlp.v2.CloudStorageRegexFileSet regex_file_set = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageRegexFileSet, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder> - getRegexFileSetFieldBuilder() { - if (regexFileSetBuilder_ == null) { - regexFileSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageRegexFileSet, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder>( - getRegexFileSet(), - getParentForChildren(), - isClean()); - regexFileSet_ = null; - } - return regexFileSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageOptions.FileSet) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageOptions.FileSet) - private static final com.google.privacy.dlp.v2.CloudStorageOptions.FileSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageOptions.FileSet(); - } - - public static com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FileSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FileSet(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int FILE_SET_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.CloudStorageOptions.FileSet fileSet_; - /** - *
-   * The set of one or more files to scan.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - * @return Whether the fileSet field is set. - */ - @java.lang.Override - public boolean hasFileSet() { - return fileSet_ != null; - } - /** - *
-   * The set of one or more files to scan.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - * @return The fileSet. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getFileSet() { - return fileSet_ == null ? com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance() : fileSet_; - } - /** - *
-   * The set of one or more files to scan.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder getFileSetOrBuilder() { - return getFileSet(); - } - - public static final int BYTES_LIMIT_PER_FILE_FIELD_NUMBER = 4; - private long bytesLimitPerFile_; - /** - *
-   * Max number of bytes to scan from a file. If a scanned file's size is bigger
-   * than this value then the rest of the bytes are omitted. Only one
-   * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-   * Cannot be set if de-identification is requested.
-   * 
- * - * int64 bytes_limit_per_file = 4; - * @return The bytesLimitPerFile. - */ - @java.lang.Override - public long getBytesLimitPerFile() { - return bytesLimitPerFile_; - } - - public static final int BYTES_LIMIT_PER_FILE_PERCENT_FIELD_NUMBER = 8; - private int bytesLimitPerFilePercent_; - /** - *
-   * Max percentage of bytes to scan from a file. The rest are omitted. The
-   * number of bytes scanned is rounded down. Must be between 0 and 100,
-   * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
-   * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-   * Cannot be set if de-identification is requested.
-   * 
- * - * int32 bytes_limit_per_file_percent = 8; - * @return The bytesLimitPerFilePercent. - */ - @java.lang.Override - public int getBytesLimitPerFilePercent() { - return bytesLimitPerFilePercent_; - } - - public static final int FILE_TYPES_FIELD_NUMBER = 5; - private java.util.List fileTypes_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.privacy.dlp.v2.FileType> fileTypes_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.privacy.dlp.v2.FileType>() { - public com.google.privacy.dlp.v2.FileType convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.FileType result = com.google.privacy.dlp.v2.FileType.valueOf(from); - return result == null ? com.google.privacy.dlp.v2.FileType.UNRECOGNIZED : result; - } - }; - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return A list containing the fileTypes. - */ - @java.lang.Override - public java.util.List getFileTypesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypes_, fileTypes_converter_); - } - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return The count of fileTypes. - */ - @java.lang.Override - public int getFileTypesCount() { - return fileTypes_.size(); - } - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param index The index of the element to return. - * @return The fileTypes at the given index. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FileType getFileTypes(int index) { - return fileTypes_converter_.convert(fileTypes_.get(index)); - } - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return A list containing the enum numeric values on the wire for fileTypes. - */ - @java.lang.Override - public java.util.List - getFileTypesValueList() { - return fileTypes_; - } - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of fileTypes at the given index. - */ - @java.lang.Override - public int getFileTypesValue(int index) { - return fileTypes_.get(index); - } - private int fileTypesMemoizedSerializedSize; - - public static final int SAMPLE_METHOD_FIELD_NUMBER = 6; - private int sampleMethod_; - /** - * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; - * @return The enum numeric value on the wire for sampleMethod. - */ - @java.lang.Override public int getSampleMethodValue() { - return sampleMethod_; - } - /** - * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; - * @return The sampleMethod. - */ - @java.lang.Override public com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod getSampleMethod() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod result = com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.valueOf(sampleMethod_); - return result == null ? com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.UNRECOGNIZED : result; - } - - public static final int FILES_LIMIT_PERCENT_FIELD_NUMBER = 7; - private int filesLimitPercent_; - /** - *
-   * Limits the number of files to scan to this percentage of the input FileSet.
-   * Number of files scanned is rounded down. Must be between 0 and 100,
-   * inclusively. Both 0 and 100 means no limit. Defaults to 0.
-   * 
- * - * int32 files_limit_percent = 7; - * @return The filesLimitPercent. - */ - @java.lang.Override - public int getFilesLimitPercent() { - return filesLimitPercent_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (fileSet_ != null) { - output.writeMessage(1, getFileSet()); - } - if (bytesLimitPerFile_ != 0L) { - output.writeInt64(4, bytesLimitPerFile_); - } - if (getFileTypesList().size() > 0) { - output.writeUInt32NoTag(42); - output.writeUInt32NoTag(fileTypesMemoizedSerializedSize); - } - for (int i = 0; i < fileTypes_.size(); i++) { - output.writeEnumNoTag(fileTypes_.get(i)); - } - if (sampleMethod_ != com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED.getNumber()) { - output.writeEnum(6, sampleMethod_); - } - if (filesLimitPercent_ != 0) { - output.writeInt32(7, filesLimitPercent_); - } - if (bytesLimitPerFilePercent_ != 0) { - output.writeInt32(8, bytesLimitPerFilePercent_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (fileSet_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getFileSet()); - } - if (bytesLimitPerFile_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, bytesLimitPerFile_); - } - { - int dataSize = 0; - for (int i = 0; i < fileTypes_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(fileTypes_.get(i)); - } - size += dataSize; - if (!getFileTypesList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }fileTypesMemoizedSerializedSize = dataSize; - } - if (sampleMethod_ != com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.SAMPLE_METHOD_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, sampleMethod_); - } - if (filesLimitPercent_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(7, filesLimitPercent_); - } - if (bytesLimitPerFilePercent_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(8, bytesLimitPerFilePercent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageOptions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CloudStorageOptions other = (com.google.privacy.dlp.v2.CloudStorageOptions) obj; - - if (hasFileSet() != other.hasFileSet()) return false; - if (hasFileSet()) { - if (!getFileSet() - .equals(other.getFileSet())) return false; - } - if (getBytesLimitPerFile() - != other.getBytesLimitPerFile()) return false; - if (getBytesLimitPerFilePercent() - != other.getBytesLimitPerFilePercent()) return false; - if (!fileTypes_.equals(other.fileTypes_)) return false; - if (sampleMethod_ != other.sampleMethod_) return false; - if (getFilesLimitPercent() - != other.getFilesLimitPercent()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasFileSet()) { - hash = (37 * hash) + FILE_SET_FIELD_NUMBER; - hash = (53 * hash) + getFileSet().hashCode(); - } - hash = (37 * hash) + BYTES_LIMIT_PER_FILE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBytesLimitPerFile()); - hash = (37 * hash) + BYTES_LIMIT_PER_FILE_PERCENT_FIELD_NUMBER; - hash = (53 * hash) + getBytesLimitPerFilePercent(); - if (getFileTypesCount() > 0) { - hash = (37 * hash) + FILE_TYPES_FIELD_NUMBER; - hash = (53 * hash) + fileTypes_.hashCode(); - } - hash = (37 * hash) + SAMPLE_METHOD_FIELD_NUMBER; - hash = (53 * hash) + sampleMethod_; - hash = (37 * hash) + FILES_LIMIT_PERCENT_FIELD_NUMBER; - hash = (53 * hash) + getFilesLimitPercent(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStorageOptions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Options defining a file or a set of files within a Cloud Storage
-   * bucket.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStorageOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageOptions) - com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStorageOptions.class, com.google.privacy.dlp.v2.CloudStorageOptions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CloudStorageOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fileSetBuilder_ == null) { - fileSet_ = null; - } else { - fileSet_ = null; - fileSetBuilder_ = null; - } - bytesLimitPerFile_ = 0L; - - bytesLimitPerFilePercent_ = 0; - - fileTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - sampleMethod_ = 0; - - filesLimitPercent_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions build() { - com.google.privacy.dlp.v2.CloudStorageOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions buildPartial() { - com.google.privacy.dlp.v2.CloudStorageOptions result = new com.google.privacy.dlp.v2.CloudStorageOptions(this); - int from_bitField0_ = bitField0_; - if (fileSetBuilder_ == null) { - result.fileSet_ = fileSet_; - } else { - result.fileSet_ = fileSetBuilder_.build(); - } - result.bytesLimitPerFile_ = bytesLimitPerFile_; - result.bytesLimitPerFilePercent_ = bytesLimitPerFilePercent_; - if (((bitField0_ & 0x00000001) != 0)) { - fileTypes_ = java.util.Collections.unmodifiableList(fileTypes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fileTypes_ = fileTypes_; - result.sampleMethod_ = sampleMethod_; - result.filesLimitPercent_ = filesLimitPercent_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CloudStorageOptions) { - return mergeFrom((com.google.privacy.dlp.v2.CloudStorageOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageOptions other) { - if (other == com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance()) return this; - if (other.hasFileSet()) { - mergeFileSet(other.getFileSet()); - } - if (other.getBytesLimitPerFile() != 0L) { - setBytesLimitPerFile(other.getBytesLimitPerFile()); - } - if (other.getBytesLimitPerFilePercent() != 0) { - setBytesLimitPerFilePercent(other.getBytesLimitPerFilePercent()); - } - if (!other.fileTypes_.isEmpty()) { - if (fileTypes_.isEmpty()) { - fileTypes_ = other.fileTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFileTypesIsMutable(); - fileTypes_.addAll(other.fileTypes_); - } - onChanged(); - } - if (other.sampleMethod_ != 0) { - setSampleMethodValue(other.getSampleMethodValue()); - } - if (other.getFilesLimitPercent() != 0) { - setFilesLimitPercent(other.getFilesLimitPercent()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CloudStorageOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CloudStorageOptions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.CloudStorageOptions.FileSet fileSet_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder, com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder> fileSetBuilder_; - /** - *
-     * The set of one or more files to scan.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - * @return Whether the fileSet field is set. - */ - public boolean hasFileSet() { - return fileSetBuilder_ != null || fileSet_ != null; - } - /** - *
-     * The set of one or more files to scan.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - * @return The fileSet. - */ - public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getFileSet() { - if (fileSetBuilder_ == null) { - return fileSet_ == null ? com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance() : fileSet_; - } else { - return fileSetBuilder_.getMessage(); - } - } - /** - *
-     * The set of one or more files to scan.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - */ - public Builder setFileSet(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet value) { - if (fileSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fileSet_ = value; - onChanged(); - } else { - fileSetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The set of one or more files to scan.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - */ - public Builder setFileSet( - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder builderForValue) { - if (fileSetBuilder_ == null) { - fileSet_ = builderForValue.build(); - onChanged(); - } else { - fileSetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The set of one or more files to scan.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - */ - public Builder mergeFileSet(com.google.privacy.dlp.v2.CloudStorageOptions.FileSet value) { - if (fileSetBuilder_ == null) { - if (fileSet_ != null) { - fileSet_ = - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.newBuilder(fileSet_).mergeFrom(value).buildPartial(); - } else { - fileSet_ = value; - } - onChanged(); - } else { - fileSetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The set of one or more files to scan.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - */ - public Builder clearFileSet() { - if (fileSetBuilder_ == null) { - fileSet_ = null; - onChanged(); - } else { - fileSet_ = null; - fileSetBuilder_ = null; - } - - return this; - } - /** - *
-     * The set of one or more files to scan.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - */ - public com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder getFileSetBuilder() { - - onChanged(); - return getFileSetFieldBuilder().getBuilder(); - } - /** - *
-     * The set of one or more files to scan.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - */ - public com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder getFileSetOrBuilder() { - if (fileSetBuilder_ != null) { - return fileSetBuilder_.getMessageOrBuilder(); - } else { - return fileSet_ == null ? - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.getDefaultInstance() : fileSet_; - } - } - /** - *
-     * The set of one or more files to scan.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder, com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder> - getFileSetFieldBuilder() { - if (fileSetBuilder_ == null) { - fileSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet, com.google.privacy.dlp.v2.CloudStorageOptions.FileSet.Builder, com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder>( - getFileSet(), - getParentForChildren(), - isClean()); - fileSet_ = null; - } - return fileSetBuilder_; - } - - private long bytesLimitPerFile_ ; - /** - *
-     * Max number of bytes to scan from a file. If a scanned file's size is bigger
-     * than this value then the rest of the bytes are omitted. Only one
-     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-     * Cannot be set if de-identification is requested.
-     * 
- * - * int64 bytes_limit_per_file = 4; - * @return The bytesLimitPerFile. - */ - @java.lang.Override - public long getBytesLimitPerFile() { - return bytesLimitPerFile_; - } - /** - *
-     * Max number of bytes to scan from a file. If a scanned file's size is bigger
-     * than this value then the rest of the bytes are omitted. Only one
-     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-     * Cannot be set if de-identification is requested.
-     * 
- * - * int64 bytes_limit_per_file = 4; - * @param value The bytesLimitPerFile to set. - * @return This builder for chaining. - */ - public Builder setBytesLimitPerFile(long value) { - - bytesLimitPerFile_ = value; - onChanged(); - return this; - } - /** - *
-     * Max number of bytes to scan from a file. If a scanned file's size is bigger
-     * than this value then the rest of the bytes are omitted. Only one
-     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-     * Cannot be set if de-identification is requested.
-     * 
- * - * int64 bytes_limit_per_file = 4; - * @return This builder for chaining. - */ - public Builder clearBytesLimitPerFile() { - - bytesLimitPerFile_ = 0L; - onChanged(); - return this; - } - - private int bytesLimitPerFilePercent_ ; - /** - *
-     * Max percentage of bytes to scan from a file. The rest are omitted. The
-     * number of bytes scanned is rounded down. Must be between 0 and 100,
-     * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
-     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-     * Cannot be set if de-identification is requested.
-     * 
- * - * int32 bytes_limit_per_file_percent = 8; - * @return The bytesLimitPerFilePercent. - */ - @java.lang.Override - public int getBytesLimitPerFilePercent() { - return bytesLimitPerFilePercent_; - } - /** - *
-     * Max percentage of bytes to scan from a file. The rest are omitted. The
-     * number of bytes scanned is rounded down. Must be between 0 and 100,
-     * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
-     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-     * Cannot be set if de-identification is requested.
-     * 
- * - * int32 bytes_limit_per_file_percent = 8; - * @param value The bytesLimitPerFilePercent to set. - * @return This builder for chaining. - */ - public Builder setBytesLimitPerFilePercent(int value) { - - bytesLimitPerFilePercent_ = value; - onChanged(); - return this; - } - /** - *
-     * Max percentage of bytes to scan from a file. The rest are omitted. The
-     * number of bytes scanned is rounded down. Must be between 0 and 100,
-     * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
-     * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-     * Cannot be set if de-identification is requested.
-     * 
- * - * int32 bytes_limit_per_file_percent = 8; - * @return This builder for chaining. - */ - public Builder clearBytesLimitPerFilePercent() { - - bytesLimitPerFilePercent_ = 0; - onChanged(); - return this; - } - - private java.util.List fileTypes_ = - java.util.Collections.emptyList(); - private void ensureFileTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fileTypes_ = new java.util.ArrayList(fileTypes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return A list containing the fileTypes. - */ - public java.util.List getFileTypesList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.privacy.dlp.v2.FileType>(fileTypes_, fileTypes_converter_); - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return The count of fileTypes. - */ - public int getFileTypesCount() { - return fileTypes_.size(); - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param index The index of the element to return. - * @return The fileTypes at the given index. - */ - public com.google.privacy.dlp.v2.FileType getFileTypes(int index) { - return fileTypes_converter_.convert(fileTypes_.get(index)); - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param index The index to set the value at. - * @param value The fileTypes to set. - * @return This builder for chaining. - */ - public Builder setFileTypes( - int index, com.google.privacy.dlp.v2.FileType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileTypesIsMutable(); - fileTypes_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param value The fileTypes to add. - * @return This builder for chaining. - */ - public Builder addFileTypes(com.google.privacy.dlp.v2.FileType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFileTypesIsMutable(); - fileTypes_.add(value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param values The fileTypes to add. - * @return This builder for chaining. - */ - public Builder addAllFileTypes( - java.lang.Iterable values) { - ensureFileTypesIsMutable(); - for (com.google.privacy.dlp.v2.FileType value : values) { - fileTypes_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return This builder for chaining. - */ - public Builder clearFileTypes() { - fileTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return A list containing the enum numeric values on the wire for fileTypes. - */ - public java.util.List - getFileTypesValueList() { - return java.util.Collections.unmodifiableList(fileTypes_); - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of fileTypes at the given index. - */ - public int getFileTypesValue(int index) { - return fileTypes_.get(index); - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for fileTypes to set. - * @return This builder for chaining. - */ - public Builder setFileTypesValue( - int index, int value) { - ensureFileTypesIsMutable(); - fileTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param value The enum numeric value on the wire for fileTypes to add. - * @return This builder for chaining. - */ - public Builder addFileTypesValue(int value) { - ensureFileTypesIsMutable(); - fileTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of file type groups to include in the scan.
-     * 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'.
-     * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param values The enum numeric values on the wire for fileTypes to add. - * @return This builder for chaining. - */ - public Builder addAllFileTypesValue( - java.lang.Iterable values) { - ensureFileTypesIsMutable(); - for (int value : values) { - fileTypes_.add(value); - } - onChanged(); - return this; - } - - private int sampleMethod_ = 0; - /** - * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; - * @return The enum numeric value on the wire for sampleMethod. - */ - @java.lang.Override public int getSampleMethodValue() { - return sampleMethod_; - } - /** - * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; - * @param value The enum numeric value on the wire for sampleMethod to set. - * @return This builder for chaining. - */ - public Builder setSampleMethodValue(int value) { - - sampleMethod_ = value; - onChanged(); - return this; - } - /** - * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; - * @return The sampleMethod. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod getSampleMethod() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod result = com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.valueOf(sampleMethod_); - return result == null ? com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod.UNRECOGNIZED : result; - } - /** - * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; - * @param value The sampleMethod to set. - * @return This builder for chaining. - */ - public Builder setSampleMethod(com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod value) { - if (value == null) { - throw new NullPointerException(); - } - - sampleMethod_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; - * @return This builder for chaining. - */ - public Builder clearSampleMethod() { - - sampleMethod_ = 0; - onChanged(); - return this; - } - - private int filesLimitPercent_ ; - /** - *
-     * Limits the number of files to scan to this percentage of the input FileSet.
-     * Number of files scanned is rounded down. Must be between 0 and 100,
-     * inclusively. Both 0 and 100 means no limit. Defaults to 0.
-     * 
- * - * int32 files_limit_percent = 7; - * @return The filesLimitPercent. - */ - @java.lang.Override - public int getFilesLimitPercent() { - return filesLimitPercent_; - } - /** - *
-     * Limits the number of files to scan to this percentage of the input FileSet.
-     * Number of files scanned is rounded down. Must be between 0 and 100,
-     * inclusively. Both 0 and 100 means no limit. Defaults to 0.
-     * 
- * - * int32 files_limit_percent = 7; - * @param value The filesLimitPercent to set. - * @return This builder for chaining. - */ - public Builder setFilesLimitPercent(int value) { - - filesLimitPercent_ = value; - onChanged(); - return this; - } - /** - *
-     * Limits the number of files to scan to this percentage of the input FileSet.
-     * Number of files scanned is rounded down. Must be between 0 and 100,
-     * inclusively. Both 0 and 100 means no limit. Defaults to 0.
-     * 
- * - * int32 files_limit_percent = 7; - * @return This builder for chaining. - */ - public Builder clearFilesLimitPercent() { - - filesLimitPercent_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageOptions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageOptions) - private static final com.google.privacy.dlp.v2.CloudStorageOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageOptions(); - } - - public static com.google.privacy.dlp.v2.CloudStorageOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CloudStorageOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloudStorageOptions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java deleted file mode 100644 index 18e0a6a76e0e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageOptionsOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface CloudStorageOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStorageOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The set of one or more files to scan.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - * @return Whether the fileSet field is set. - */ - boolean hasFileSet(); - /** - *
-   * The set of one or more files to scan.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - * @return The fileSet. - */ - com.google.privacy.dlp.v2.CloudStorageOptions.FileSet getFileSet(); - /** - *
-   * The set of one or more files to scan.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions.FileSet file_set = 1; - */ - com.google.privacy.dlp.v2.CloudStorageOptions.FileSetOrBuilder getFileSetOrBuilder(); - - /** - *
-   * Max number of bytes to scan from a file. If a scanned file's size is bigger
-   * than this value then the rest of the bytes are omitted. Only one
-   * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-   * Cannot be set if de-identification is requested.
-   * 
- * - * int64 bytes_limit_per_file = 4; - * @return The bytesLimitPerFile. - */ - long getBytesLimitPerFile(); - - /** - *
-   * Max percentage of bytes to scan from a file. The rest are omitted. The
-   * number of bytes scanned is rounded down. Must be between 0 and 100,
-   * inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
-   * of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
-   * Cannot be set if de-identification is requested.
-   * 
- * - * int32 bytes_limit_per_file_percent = 8; - * @return The bytesLimitPerFilePercent. - */ - int getBytesLimitPerFilePercent(); - - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return A list containing the fileTypes. - */ - java.util.List getFileTypesList(); - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return The count of fileTypes. - */ - int getFileTypesCount(); - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param index The index of the element to return. - * @return The fileTypes at the given index. - */ - com.google.privacy.dlp.v2.FileType getFileTypes(int index); - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @return A list containing the enum numeric values on the wire for fileTypes. - */ - java.util.List - getFileTypesValueList(); - /** - *
-   * List of file type groups to include in the scan.
-   * 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'.
-   * 
- * - * repeated .google.privacy.dlp.v2.FileType file_types = 5; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of fileTypes at the given index. - */ - int getFileTypesValue(int index); - - /** - * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; - * @return The enum numeric value on the wire for sampleMethod. - */ - int getSampleMethodValue(); - /** - * .google.privacy.dlp.v2.CloudStorageOptions.SampleMethod sample_method = 6; - * @return The sampleMethod. - */ - com.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod getSampleMethod(); - - /** - *
-   * Limits the number of files to scan to this percentage of the input FileSet.
-   * Number of files scanned is rounded down. Must be between 0 and 100,
-   * inclusively. Both 0 and 100 means no limit. Defaults to 0.
-   * 
- * - * int32 files_limit_percent = 7; - * @return The filesLimitPercent. - */ - int getFilesLimitPercent(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java deleted file mode 100644 index 8e97e3cb40d0..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePath.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Message representing a single file or path in Cloud Storage.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStoragePath} - */ -public final class CloudStoragePath extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStoragePath) - CloudStoragePathOrBuilder { -private static final long serialVersionUID = 0L; - // Use CloudStoragePath.newBuilder() to construct. - private CloudStoragePath(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CloudStoragePath() { - path_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CloudStoragePath(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CloudStoragePath( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStoragePath.class, com.google.privacy.dlp.v2.CloudStoragePath.Builder.class); - } - - public static final int PATH_FIELD_NUMBER = 1; - private volatile java.lang.Object path_; - /** - *
-   * A url representing a file or path (no wildcards) in Cloud Storage.
-   * Example: gs://[BUCKET_NAME]/dictionary.txt
-   * 
- * - * string path = 1; - * @return The path. - */ - @java.lang.Override - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } - } - /** - *
-   * A url representing a file or path (no wildcards) in Cloud Storage.
-   * Example: gs://[BUCKET_NAME]/dictionary.txt
-   * 
- * - * string path = 1; - * @return The bytes for path. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CloudStoragePath)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CloudStoragePath other = (com.google.privacy.dlp.v2.CloudStoragePath) obj; - - if (!getPath() - .equals(other.getPath())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPath().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStoragePath parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStoragePath prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Message representing a single file or path in Cloud Storage.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStoragePath} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStoragePath) - com.google.privacy.dlp.v2.CloudStoragePathOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStoragePath.class, com.google.privacy.dlp.v2.CloudStoragePath.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CloudStoragePath.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - path_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePath getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePath build() { - com.google.privacy.dlp.v2.CloudStoragePath result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePath buildPartial() { - com.google.privacy.dlp.v2.CloudStoragePath result = new com.google.privacy.dlp.v2.CloudStoragePath(this); - result.path_ = path_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CloudStoragePath) { - return mergeFrom((com.google.privacy.dlp.v2.CloudStoragePath)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStoragePath other) { - if (other == com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance()) return this; - if (!other.getPath().isEmpty()) { - path_ = other.path_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CloudStoragePath parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CloudStoragePath) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object path_ = ""; - /** - *
-     * A url representing a file or path (no wildcards) in Cloud Storage.
-     * Example: gs://[BUCKET_NAME]/dictionary.txt
-     * 
- * - * string path = 1; - * @return The path. - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A url representing a file or path (no wildcards) in Cloud Storage.
-     * Example: gs://[BUCKET_NAME]/dictionary.txt
-     * 
- * - * string path = 1; - * @return The bytes for path. - */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A url representing a file or path (no wildcards) in Cloud Storage.
-     * Example: gs://[BUCKET_NAME]/dictionary.txt
-     * 
- * - * string path = 1; - * @param value The path to set. - * @return This builder for chaining. - */ - public Builder setPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - path_ = value; - onChanged(); - return this; - } - /** - *
-     * A url representing a file or path (no wildcards) in Cloud Storage.
-     * Example: gs://[BUCKET_NAME]/dictionary.txt
-     * 
- * - * string path = 1; - * @return This builder for chaining. - */ - public Builder clearPath() { - - path_ = getDefaultInstance().getPath(); - onChanged(); - return this; - } - /** - *
-     * A url representing a file or path (no wildcards) in Cloud Storage.
-     * Example: gs://[BUCKET_NAME]/dictionary.txt
-     * 
- * - * string path = 1; - * @param value The bytes for path to set. - * @return This builder for chaining. - */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - path_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStoragePath) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStoragePath) - private static final com.google.privacy.dlp.v2.CloudStoragePath DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStoragePath(); - } - - public static com.google.privacy.dlp.v2.CloudStoragePath getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CloudStoragePath parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloudStoragePath(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePath getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePathOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePathOrBuilder.java deleted file mode 100644 index b3e4adb31d67..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStoragePathOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface CloudStoragePathOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStoragePath) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A url representing a file or path (no wildcards) in Cloud Storage.
-   * Example: gs://[BUCKET_NAME]/dictionary.txt
-   * 
- * - * string path = 1; - * @return The path. - */ - java.lang.String getPath(); - /** - *
-   * A url representing a file or path (no wildcards) in Cloud Storage.
-   * Example: gs://[BUCKET_NAME]/dictionary.txt
-   * 
- * - * string path = 1; - * @return The bytes for path. - */ - com.google.protobuf.ByteString - getPathBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSet.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSet.java deleted file mode 100644 index eb7247ed7ca0..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSet.java +++ /dev/null @@ -1,1292 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Message representing a set of files in a Cloud Storage bucket. Regular
- * expressions are used to allow fine-grained control over which files in the
- * bucket to include.
- * Included files are those that match at least one item in `include_regex` and
- * do not match any items in `exclude_regex`. Note that a file that matches
- * items from both lists will _not_ be included. For a match to occur, the
- * entire file path (i.e., everything in the url after the bucket name) must
- * match the regular expression.
- * For example, given the input `{bucket_name: "mybucket", include_regex:
- * ["directory1/.*"], exclude_regex:
- * ["directory1/excluded.*"]}`:
- * * `gs://mybucket/directory1/myfile` will be included
- * * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches
- * across `/`)
- * * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the
- * full path doesn't match any items in `include_regex`)
- * * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path
- * matches an item in `exclude_regex`)
- * If `include_regex` is left empty, it will match all files by default
- * (this is equivalent to setting `include_regex: [".*"]`).
- * Some other common use cases:
- * * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all
- * files in `mybucket` except for .pdf files
- * * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will
- * include all files directly under `gs://mybucket/directory/`, without matching
- * across `/`
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStorageRegexFileSet} - */ -public final class CloudStorageRegexFileSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CloudStorageRegexFileSet) - CloudStorageRegexFileSetOrBuilder { -private static final long serialVersionUID = 0L; - // Use CloudStorageRegexFileSet.newBuilder() to construct. - private CloudStorageRegexFileSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CloudStorageRegexFileSet() { - bucketName_ = ""; - includeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; - excludeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CloudStorageRegexFileSet(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CloudStorageRegexFileSet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - bucketName_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - includeRegex_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - includeRegex_.add(s); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - excludeRegex_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - excludeRegex_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - includeRegex_ = includeRegex_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - excludeRegex_ = excludeRegex_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStorageRegexFileSet.class, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder.class); - } - - public static final int BUCKET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object bucketName_; - /** - *
-   * The name of a Cloud Storage bucket. Required.
-   * 
- * - * string bucket_name = 1; - * @return The bucketName. - */ - @java.lang.Override - public java.lang.String getBucketName() { - java.lang.Object ref = bucketName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bucketName_ = s; - return s; - } - } - /** - *
-   * The name of a Cloud Storage bucket. Required.
-   * 
- * - * string bucket_name = 1; - * @return The bytes for bucketName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBucketNameBytes() { - java.lang.Object ref = bucketName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - bucketName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INCLUDE_REGEX_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList includeRegex_; - /** - *
-   * A list of regular expressions matching file paths to include. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * included in the set of files, except for those that also match an item in
-   * `exclude_regex`. Leaving this field empty will match all files by default
-   * (this is equivalent to including `.*` in the list).
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string include_regex = 2; - * @return A list containing the includeRegex. - */ - public com.google.protobuf.ProtocolStringList - getIncludeRegexList() { - return includeRegex_; - } - /** - *
-   * A list of regular expressions matching file paths to include. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * included in the set of files, except for those that also match an item in
-   * `exclude_regex`. Leaving this field empty will match all files by default
-   * (this is equivalent to including `.*` in the list).
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string include_regex = 2; - * @return The count of includeRegex. - */ - public int getIncludeRegexCount() { - return includeRegex_.size(); - } - /** - *
-   * A list of regular expressions matching file paths to include. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * included in the set of files, except for those that also match an item in
-   * `exclude_regex`. Leaving this field empty will match all files by default
-   * (this is equivalent to including `.*` in the list).
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string include_regex = 2; - * @param index The index of the element to return. - * @return The includeRegex at the given index. - */ - public java.lang.String getIncludeRegex(int index) { - return includeRegex_.get(index); - } - /** - *
-   * A list of regular expressions matching file paths to include. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * included in the set of files, except for those that also match an item in
-   * `exclude_regex`. Leaving this field empty will match all files by default
-   * (this is equivalent to including `.*` in the list).
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string include_regex = 2; - * @param index The index of the value to return. - * @return The bytes of the includeRegex at the given index. - */ - public com.google.protobuf.ByteString - getIncludeRegexBytes(int index) { - return includeRegex_.getByteString(index); - } - - public static final int EXCLUDE_REGEX_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList excludeRegex_; - /** - *
-   * A list of regular expressions matching file paths to exclude. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * excluded from the scan.
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string exclude_regex = 3; - * @return A list containing the excludeRegex. - */ - public com.google.protobuf.ProtocolStringList - getExcludeRegexList() { - return excludeRegex_; - } - /** - *
-   * A list of regular expressions matching file paths to exclude. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * excluded from the scan.
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string exclude_regex = 3; - * @return The count of excludeRegex. - */ - public int getExcludeRegexCount() { - return excludeRegex_.size(); - } - /** - *
-   * A list of regular expressions matching file paths to exclude. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * excluded from the scan.
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string exclude_regex = 3; - * @param index The index of the element to return. - * @return The excludeRegex at the given index. - */ - public java.lang.String getExcludeRegex(int index) { - return excludeRegex_.get(index); - } - /** - *
-   * A list of regular expressions matching file paths to exclude. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * excluded from the scan.
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string exclude_regex = 3; - * @param index The index of the value to return. - * @return The bytes of the excludeRegex at the given index. - */ - public com.google.protobuf.ByteString - getExcludeRegexBytes(int index) { - return excludeRegex_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucketName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bucketName_); - } - for (int i = 0; i < includeRegex_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, includeRegex_.getRaw(i)); - } - for (int i = 0; i < excludeRegex_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, excludeRegex_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucketName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bucketName_); - } - { - int dataSize = 0; - for (int i = 0; i < includeRegex_.size(); i++) { - dataSize += computeStringSizeNoTag(includeRegex_.getRaw(i)); - } - size += dataSize; - size += 1 * getIncludeRegexList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < excludeRegex_.size(); i++) { - dataSize += computeStringSizeNoTag(excludeRegex_.getRaw(i)); - } - size += dataSize; - size += 1 * getExcludeRegexList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CloudStorageRegexFileSet)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CloudStorageRegexFileSet other = (com.google.privacy.dlp.v2.CloudStorageRegexFileSet) obj; - - if (!getBucketName() - .equals(other.getBucketName())) return false; - if (!getIncludeRegexList() - .equals(other.getIncludeRegexList())) return false; - if (!getExcludeRegexList() - .equals(other.getExcludeRegexList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUCKET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getBucketName().hashCode(); - if (getIncludeRegexCount() > 0) { - hash = (37 * hash) + INCLUDE_REGEX_FIELD_NUMBER; - hash = (53 * hash) + getIncludeRegexList().hashCode(); - } - if (getExcludeRegexCount() > 0) { - hash = (37 * hash) + EXCLUDE_REGEX_FIELD_NUMBER; - hash = (53 * hash) + getExcludeRegexList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CloudStorageRegexFileSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Message representing a set of files in a Cloud Storage bucket. Regular
-   * expressions are used to allow fine-grained control over which files in the
-   * bucket to include.
-   * Included files are those that match at least one item in `include_regex` and
-   * do not match any items in `exclude_regex`. Note that a file that matches
-   * items from both lists will _not_ be included. For a match to occur, the
-   * entire file path (i.e., everything in the url after the bucket name) must
-   * match the regular expression.
-   * For example, given the input `{bucket_name: "mybucket", include_regex:
-   * ["directory1/.*"], exclude_regex:
-   * ["directory1/excluded.*"]}`:
-   * * `gs://mybucket/directory1/myfile` will be included
-   * * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches
-   * across `/`)
-   * * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the
-   * full path doesn't match any items in `include_regex`)
-   * * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path
-   * matches an item in `exclude_regex`)
-   * If `include_regex` is left empty, it will match all files by default
-   * (this is equivalent to setting `include_regex: [".*"]`).
-   * Some other common use cases:
-   * * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all
-   * files in `mybucket` except for .pdf files
-   * * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will
-   * include all files directly under `gs://mybucket/directory/`, without matching
-   * across `/`
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CloudStorageRegexFileSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CloudStorageRegexFileSet) - com.google.privacy.dlp.v2.CloudStorageRegexFileSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CloudStorageRegexFileSet.class, com.google.privacy.dlp.v2.CloudStorageRegexFileSet.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CloudStorageRegexFileSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bucketName_ = ""; - - includeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - excludeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageRegexFileSet build() { - com.google.privacy.dlp.v2.CloudStorageRegexFileSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageRegexFileSet buildPartial() { - com.google.privacy.dlp.v2.CloudStorageRegexFileSet result = new com.google.privacy.dlp.v2.CloudStorageRegexFileSet(this); - int from_bitField0_ = bitField0_; - result.bucketName_ = bucketName_; - if (((bitField0_ & 0x00000001) != 0)) { - includeRegex_ = includeRegex_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.includeRegex_ = includeRegex_; - if (((bitField0_ & 0x00000002) != 0)) { - excludeRegex_ = excludeRegex_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.excludeRegex_ = excludeRegex_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CloudStorageRegexFileSet) { - return mergeFrom((com.google.privacy.dlp.v2.CloudStorageRegexFileSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CloudStorageRegexFileSet other) { - if (other == com.google.privacy.dlp.v2.CloudStorageRegexFileSet.getDefaultInstance()) return this; - if (!other.getBucketName().isEmpty()) { - bucketName_ = other.bucketName_; - onChanged(); - } - if (!other.includeRegex_.isEmpty()) { - if (includeRegex_.isEmpty()) { - includeRegex_ = other.includeRegex_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIncludeRegexIsMutable(); - includeRegex_.addAll(other.includeRegex_); - } - onChanged(); - } - if (!other.excludeRegex_.isEmpty()) { - if (excludeRegex_.isEmpty()) { - excludeRegex_ = other.excludeRegex_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureExcludeRegexIsMutable(); - excludeRegex_.addAll(other.excludeRegex_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CloudStorageRegexFileSet parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CloudStorageRegexFileSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object bucketName_ = ""; - /** - *
-     * The name of a Cloud Storage bucket. Required.
-     * 
- * - * string bucket_name = 1; - * @return The bucketName. - */ - public java.lang.String getBucketName() { - java.lang.Object ref = bucketName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bucketName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of a Cloud Storage bucket. Required.
-     * 
- * - * string bucket_name = 1; - * @return The bytes for bucketName. - */ - public com.google.protobuf.ByteString - getBucketNameBytes() { - java.lang.Object ref = bucketName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - bucketName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of a Cloud Storage bucket. Required.
-     * 
- * - * string bucket_name = 1; - * @param value The bucketName to set. - * @return This builder for chaining. - */ - public Builder setBucketName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - bucketName_ = value; - onChanged(); - return this; - } - /** - *
-     * The name of a Cloud Storage bucket. Required.
-     * 
- * - * string bucket_name = 1; - * @return This builder for chaining. - */ - public Builder clearBucketName() { - - bucketName_ = getDefaultInstance().getBucketName(); - onChanged(); - return this; - } - /** - *
-     * The name of a Cloud Storage bucket. Required.
-     * 
- * - * string bucket_name = 1; - * @param value The bytes for bucketName to set. - * @return This builder for chaining. - */ - public Builder setBucketNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - bucketName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList includeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureIncludeRegexIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - includeRegex_ = new com.google.protobuf.LazyStringArrayList(includeRegex_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of regular expressions matching file paths to include. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * included in the set of files, except for those that also match an item in
-     * `exclude_regex`. Leaving this field empty will match all files by default
-     * (this is equivalent to including `.*` in the list).
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string include_regex = 2; - * @return A list containing the includeRegex. - */ - public com.google.protobuf.ProtocolStringList - getIncludeRegexList() { - return includeRegex_.getUnmodifiableView(); - } - /** - *
-     * A list of regular expressions matching file paths to include. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * included in the set of files, except for those that also match an item in
-     * `exclude_regex`. Leaving this field empty will match all files by default
-     * (this is equivalent to including `.*` in the list).
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string include_regex = 2; - * @return The count of includeRegex. - */ - public int getIncludeRegexCount() { - return includeRegex_.size(); - } - /** - *
-     * A list of regular expressions matching file paths to include. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * included in the set of files, except for those that also match an item in
-     * `exclude_regex`. Leaving this field empty will match all files by default
-     * (this is equivalent to including `.*` in the list).
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string include_regex = 2; - * @param index The index of the element to return. - * @return The includeRegex at the given index. - */ - public java.lang.String getIncludeRegex(int index) { - return includeRegex_.get(index); - } - /** - *
-     * A list of regular expressions matching file paths to include. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * included in the set of files, except for those that also match an item in
-     * `exclude_regex`. Leaving this field empty will match all files by default
-     * (this is equivalent to including `.*` in the list).
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string include_regex = 2; - * @param index The index of the value to return. - * @return The bytes of the includeRegex at the given index. - */ - public com.google.protobuf.ByteString - getIncludeRegexBytes(int index) { - return includeRegex_.getByteString(index); - } - /** - *
-     * A list of regular expressions matching file paths to include. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * included in the set of files, except for those that also match an item in
-     * `exclude_regex`. Leaving this field empty will match all files by default
-     * (this is equivalent to including `.*` in the list).
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string include_regex = 2; - * @param index The index to set the value at. - * @param value The includeRegex to set. - * @return This builder for chaining. - */ - public Builder setIncludeRegex( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludeRegexIsMutable(); - includeRegex_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of regular expressions matching file paths to include. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * included in the set of files, except for those that also match an item in
-     * `exclude_regex`. Leaving this field empty will match all files by default
-     * (this is equivalent to including `.*` in the list).
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string include_regex = 2; - * @param value The includeRegex to add. - * @return This builder for chaining. - */ - public Builder addIncludeRegex( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIncludeRegexIsMutable(); - includeRegex_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of regular expressions matching file paths to include. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * included in the set of files, except for those that also match an item in
-     * `exclude_regex`. Leaving this field empty will match all files by default
-     * (this is equivalent to including `.*` in the list).
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string include_regex = 2; - * @param values The includeRegex to add. - * @return This builder for chaining. - */ - public Builder addAllIncludeRegex( - java.lang.Iterable values) { - ensureIncludeRegexIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, includeRegex_); - onChanged(); - return this; - } - /** - *
-     * A list of regular expressions matching file paths to include. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * included in the set of files, except for those that also match an item in
-     * `exclude_regex`. Leaving this field empty will match all files by default
-     * (this is equivalent to including `.*` in the list).
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string include_regex = 2; - * @return This builder for chaining. - */ - public Builder clearIncludeRegex() { - includeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of regular expressions matching file paths to include. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * included in the set of files, except for those that also match an item in
-     * `exclude_regex`. Leaving this field empty will match all files by default
-     * (this is equivalent to including `.*` in the list).
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string include_regex = 2; - * @param value The bytes of the includeRegex to add. - * @return This builder for chaining. - */ - public Builder addIncludeRegexBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureIncludeRegexIsMutable(); - includeRegex_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList excludeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureExcludeRegexIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - excludeRegex_ = new com.google.protobuf.LazyStringArrayList(excludeRegex_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * A list of regular expressions matching file paths to exclude. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * excluded from the scan.
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string exclude_regex = 3; - * @return A list containing the excludeRegex. - */ - public com.google.protobuf.ProtocolStringList - getExcludeRegexList() { - return excludeRegex_.getUnmodifiableView(); - } - /** - *
-     * A list of regular expressions matching file paths to exclude. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * excluded from the scan.
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string exclude_regex = 3; - * @return The count of excludeRegex. - */ - public int getExcludeRegexCount() { - return excludeRegex_.size(); - } - /** - *
-     * A list of regular expressions matching file paths to exclude. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * excluded from the scan.
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string exclude_regex = 3; - * @param index The index of the element to return. - * @return The excludeRegex at the given index. - */ - public java.lang.String getExcludeRegex(int index) { - return excludeRegex_.get(index); - } - /** - *
-     * A list of regular expressions matching file paths to exclude. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * excluded from the scan.
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string exclude_regex = 3; - * @param index The index of the value to return. - * @return The bytes of the excludeRegex at the given index. - */ - public com.google.protobuf.ByteString - getExcludeRegexBytes(int index) { - return excludeRegex_.getByteString(index); - } - /** - *
-     * A list of regular expressions matching file paths to exclude. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * excluded from the scan.
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string exclude_regex = 3; - * @param index The index to set the value at. - * @param value The excludeRegex to set. - * @return This builder for chaining. - */ - public Builder setExcludeRegex( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeRegexIsMutable(); - excludeRegex_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of regular expressions matching file paths to exclude. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * excluded from the scan.
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string exclude_regex = 3; - * @param value The excludeRegex to add. - * @return This builder for chaining. - */ - public Builder addExcludeRegex( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureExcludeRegexIsMutable(); - excludeRegex_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of regular expressions matching file paths to exclude. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * excluded from the scan.
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string exclude_regex = 3; - * @param values The excludeRegex to add. - * @return This builder for chaining. - */ - public Builder addAllExcludeRegex( - java.lang.Iterable values) { - ensureExcludeRegexIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, excludeRegex_); - onChanged(); - return this; - } - /** - *
-     * A list of regular expressions matching file paths to exclude. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * excluded from the scan.
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string exclude_regex = 3; - * @return This builder for chaining. - */ - public Builder clearExcludeRegex() { - excludeRegex_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A list of regular expressions matching file paths to exclude. All files in
-     * the bucket that match at least one of these regular expressions will be
-     * excluded from the scan.
-     * Regular expressions use RE2
-     * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-     * under the google/re2 repository on GitHub.
-     * 
- * - * repeated string exclude_regex = 3; - * @param value The bytes of the excludeRegex to add. - * @return This builder for chaining. - */ - public Builder addExcludeRegexBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureExcludeRegexIsMutable(); - excludeRegex_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CloudStorageRegexFileSet) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CloudStorageRegexFileSet) - private static final com.google.privacy.dlp.v2.CloudStorageRegexFileSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CloudStorageRegexFileSet(); - } - - public static com.google.privacy.dlp.v2.CloudStorageRegexFileSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CloudStorageRegexFileSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloudStorageRegexFileSet(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageRegexFileSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSetOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSetOrBuilder.java deleted file mode 100644 index 2e045cc960b0..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CloudStorageRegexFileSetOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface CloudStorageRegexFileSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CloudStorageRegexFileSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of a Cloud Storage bucket. Required.
-   * 
- * - * string bucket_name = 1; - * @return The bucketName. - */ - java.lang.String getBucketName(); - /** - *
-   * The name of a Cloud Storage bucket. Required.
-   * 
- * - * string bucket_name = 1; - * @return The bytes for bucketName. - */ - com.google.protobuf.ByteString - getBucketNameBytes(); - - /** - *
-   * A list of regular expressions matching file paths to include. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * included in the set of files, except for those that also match an item in
-   * `exclude_regex`. Leaving this field empty will match all files by default
-   * (this is equivalent to including `.*` in the list).
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string include_regex = 2; - * @return A list containing the includeRegex. - */ - java.util.List - getIncludeRegexList(); - /** - *
-   * A list of regular expressions matching file paths to include. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * included in the set of files, except for those that also match an item in
-   * `exclude_regex`. Leaving this field empty will match all files by default
-   * (this is equivalent to including `.*` in the list).
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string include_regex = 2; - * @return The count of includeRegex. - */ - int getIncludeRegexCount(); - /** - *
-   * A list of regular expressions matching file paths to include. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * included in the set of files, except for those that also match an item in
-   * `exclude_regex`. Leaving this field empty will match all files by default
-   * (this is equivalent to including `.*` in the list).
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string include_regex = 2; - * @param index The index of the element to return. - * @return The includeRegex at the given index. - */ - java.lang.String getIncludeRegex(int index); - /** - *
-   * A list of regular expressions matching file paths to include. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * included in the set of files, except for those that also match an item in
-   * `exclude_regex`. Leaving this field empty will match all files by default
-   * (this is equivalent to including `.*` in the list).
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string include_regex = 2; - * @param index The index of the value to return. - * @return The bytes of the includeRegex at the given index. - */ - com.google.protobuf.ByteString - getIncludeRegexBytes(int index); - - /** - *
-   * A list of regular expressions matching file paths to exclude. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * excluded from the scan.
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string exclude_regex = 3; - * @return A list containing the excludeRegex. - */ - java.util.List - getExcludeRegexList(); - /** - *
-   * A list of regular expressions matching file paths to exclude. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * excluded from the scan.
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string exclude_regex = 3; - * @return The count of excludeRegex. - */ - int getExcludeRegexCount(); - /** - *
-   * A list of regular expressions matching file paths to exclude. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * excluded from the scan.
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string exclude_regex = 3; - * @param index The index of the element to return. - * @return The excludeRegex at the given index. - */ - java.lang.String getExcludeRegex(int index); - /** - *
-   * A list of regular expressions matching file paths to exclude. All files in
-   * the bucket that match at least one of these regular expressions will be
-   * excluded from the scan.
-   * Regular expressions use RE2
-   * [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
-   * under the google/re2 repository on GitHub.
-   * 
- * - * repeated string exclude_regex = 3; - * @param index The index of the value to return. - * @return The bytes of the excludeRegex at the given index. - */ - com.google.protobuf.ByteString - getExcludeRegexBytes(int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Color.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Color.java deleted file mode 100644 index 519c4b27e046..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Color.java +++ /dev/null @@ -1,675 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Represents a color in the RGB color space.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Color} - */ -public final class Color extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Color) - ColorOrBuilder { -private static final long serialVersionUID = 0L; - // Use Color.newBuilder() to construct. - private Color(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Color() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Color(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Color( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: { - - red_ = input.readFloat(); - break; - } - case 21: { - - green_ = input.readFloat(); - break; - } - case 29: { - - blue_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Color.class, com.google.privacy.dlp.v2.Color.Builder.class); - } - - public static final int RED_FIELD_NUMBER = 1; - private float red_; - /** - *
-   * The amount of red in the color as a value in the interval [0, 1].
-   * 
- * - * float red = 1; - * @return The red. - */ - @java.lang.Override - public float getRed() { - return red_; - } - - public static final int GREEN_FIELD_NUMBER = 2; - private float green_; - /** - *
-   * The amount of green in the color as a value in the interval [0, 1].
-   * 
- * - * float green = 2; - * @return The green. - */ - @java.lang.Override - public float getGreen() { - return green_; - } - - public static final int BLUE_FIELD_NUMBER = 3; - private float blue_; - /** - *
-   * The amount of blue in the color as a value in the interval [0, 1].
-   * 
- * - * float blue = 3; - * @return The blue. - */ - @java.lang.Override - public float getBlue() { - return blue_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(red_) != 0) { - output.writeFloat(1, red_); - } - if (java.lang.Float.floatToRawIntBits(green_) != 0) { - output.writeFloat(2, green_); - } - if (java.lang.Float.floatToRawIntBits(blue_) != 0) { - output.writeFloat(3, blue_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (java.lang.Float.floatToRawIntBits(red_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, red_); - } - if (java.lang.Float.floatToRawIntBits(green_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, green_); - } - if (java.lang.Float.floatToRawIntBits(blue_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, blue_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Color)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Color other = (com.google.privacy.dlp.v2.Color) obj; - - if (java.lang.Float.floatToIntBits(getRed()) - != java.lang.Float.floatToIntBits( - other.getRed())) return false; - if (java.lang.Float.floatToIntBits(getGreen()) - != java.lang.Float.floatToIntBits( - other.getGreen())) return false; - if (java.lang.Float.floatToIntBits(getBlue()) - != java.lang.Float.floatToIntBits( - other.getBlue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RED_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getRed()); - hash = (37 * hash) + GREEN_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getGreen()); - hash = (37 * hash) + BLUE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getBlue()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Color parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Color parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Color parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Color parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Color parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Color parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Color parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Color parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Color parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Color parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Color parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Color parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Color prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents a color in the RGB color space.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Color} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Color) - com.google.privacy.dlp.v2.ColorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Color.class, com.google.privacy.dlp.v2.Color.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Color.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - red_ = 0F; - - green_ = 0F; - - blue_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Color_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Color getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Color.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Color build() { - com.google.privacy.dlp.v2.Color result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Color buildPartial() { - com.google.privacy.dlp.v2.Color result = new com.google.privacy.dlp.v2.Color(this); - result.red_ = red_; - result.green_ = green_; - result.blue_ = blue_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Color) { - return mergeFrom((com.google.privacy.dlp.v2.Color)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Color other) { - if (other == com.google.privacy.dlp.v2.Color.getDefaultInstance()) return this; - if (other.getRed() != 0F) { - setRed(other.getRed()); - } - if (other.getGreen() != 0F) { - setGreen(other.getGreen()); - } - if (other.getBlue() != 0F) { - setBlue(other.getBlue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Color parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Color) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float red_ ; - /** - *
-     * The amount of red in the color as a value in the interval [0, 1].
-     * 
- * - * float red = 1; - * @return The red. - */ - @java.lang.Override - public float getRed() { - return red_; - } - /** - *
-     * The amount of red in the color as a value in the interval [0, 1].
-     * 
- * - * float red = 1; - * @param value The red to set. - * @return This builder for chaining. - */ - public Builder setRed(float value) { - - red_ = value; - onChanged(); - return this; - } - /** - *
-     * The amount of red in the color as a value in the interval [0, 1].
-     * 
- * - * float red = 1; - * @return This builder for chaining. - */ - public Builder clearRed() { - - red_ = 0F; - onChanged(); - return this; - } - - private float green_ ; - /** - *
-     * The amount of green in the color as a value in the interval [0, 1].
-     * 
- * - * float green = 2; - * @return The green. - */ - @java.lang.Override - public float getGreen() { - return green_; - } - /** - *
-     * The amount of green in the color as a value in the interval [0, 1].
-     * 
- * - * float green = 2; - * @param value The green to set. - * @return This builder for chaining. - */ - public Builder setGreen(float value) { - - green_ = value; - onChanged(); - return this; - } - /** - *
-     * The amount of green in the color as a value in the interval [0, 1].
-     * 
- * - * float green = 2; - * @return This builder for chaining. - */ - public Builder clearGreen() { - - green_ = 0F; - onChanged(); - return this; - } - - private float blue_ ; - /** - *
-     * The amount of blue in the color as a value in the interval [0, 1].
-     * 
- * - * float blue = 3; - * @return The blue. - */ - @java.lang.Override - public float getBlue() { - return blue_; - } - /** - *
-     * The amount of blue in the color as a value in the interval [0, 1].
-     * 
- * - * float blue = 3; - * @param value The blue to set. - * @return This builder for chaining. - */ - public Builder setBlue(float value) { - - blue_ = value; - onChanged(); - return this; - } - /** - *
-     * The amount of blue in the color as a value in the interval [0, 1].
-     * 
- * - * float blue = 3; - * @return This builder for chaining. - */ - public Builder clearBlue() { - - blue_ = 0F; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Color) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Color) - private static final com.google.privacy.dlp.v2.Color DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Color(); - } - - public static com.google.privacy.dlp.v2.Color getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Color parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Color(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Color getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ColorOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ColorOrBuilder.java deleted file mode 100644 index 56c96b2cbc9c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ColorOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ColorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Color) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The amount of red in the color as a value in the interval [0, 1].
-   * 
- * - * float red = 1; - * @return The red. - */ - float getRed(); - - /** - *
-   * The amount of green in the color as a value in the interval [0, 1].
-   * 
- * - * float green = 2; - * @return The green. - */ - float getGreen(); - - /** - *
-   * The amount of blue in the color as a value in the interval [0, 1].
-   * 
- * - * float blue = 3; - * @return The blue. - */ - float getBlue(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java deleted file mode 100644 index b5ff2fa2bdf5..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Container.java +++ /dev/null @@ -1,1804 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Represents a container that may contain DLP findings.
- * Examples of a container include a file, table, or database record.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Container} - */ -public final class Container extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Container) - ContainerOrBuilder { -private static final long serialVersionUID = 0L; - // Use Container.newBuilder() to construct. - private Container(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Container() { - type_ = ""; - projectId_ = ""; - fullPath_ = ""; - rootPath_ = ""; - relativePath_ = ""; - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Container(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Container( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - fullPath_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - rootPath_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - relativePath_ = s; - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Container.class, com.google.privacy.dlp.v2.Container.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object type_; - /** - *
-   * Container type, for example BigQuery or Cloud Storage.
-   * 
- * - * string type = 1; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * Container type, for example BigQuery or Cloud Storage.
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object projectId_; - /** - *
-   * Project where the finding was found.
-   * Can be different from the project that owns the finding.
-   * 
- * - * string project_id = 2; - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - *
-   * Project where the finding was found.
-   * Can be different from the project that owns the finding.
-   * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FULL_PATH_FIELD_NUMBER = 3; - private volatile java.lang.Object fullPath_; - /** - *
-   * A string representation of the full container name.
-   * Examples:
-   * - BigQuery: 'Project:DataSetId.TableId'
-   * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
-   * 
- * - * string full_path = 3; - * @return The fullPath. - */ - @java.lang.Override - public java.lang.String getFullPath() { - java.lang.Object ref = fullPath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullPath_ = s; - return s; - } - } - /** - *
-   * A string representation of the full container name.
-   * Examples:
-   * - BigQuery: 'Project:DataSetId.TableId'
-   * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
-   * 
- * - * string full_path = 3; - * @return The bytes for fullPath. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFullPathBytes() { - java.lang.Object ref = fullPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ROOT_PATH_FIELD_NUMBER = 4; - private volatile java.lang.Object rootPath_; - /** - *
-   * The root of the container.
-   * Examples:
-   * - For BigQuery table `project_id:dataset_id.table_id`, the root is
-   *  `dataset_id`
-   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
-   *  is `gs://bucket`
-   * 
- * - * string root_path = 4; - * @return The rootPath. - */ - @java.lang.Override - public java.lang.String getRootPath() { - java.lang.Object ref = rootPath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rootPath_ = s; - return s; - } - } - /** - *
-   * The root of the container.
-   * Examples:
-   * - For BigQuery table `project_id:dataset_id.table_id`, the root is
-   *  `dataset_id`
-   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
-   *  is `gs://bucket`
-   * 
- * - * string root_path = 4; - * @return The bytes for rootPath. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRootPathBytes() { - java.lang.Object ref = rootPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rootPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RELATIVE_PATH_FIELD_NUMBER = 5; - private volatile java.lang.Object relativePath_; - /** - *
-   * The rest of the path after the root.
-   * Examples:
-   * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
-   *  `table_id`
-   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
-   *  path is `folder/filename.txt`
-   * 
- * - * string relative_path = 5; - * @return The relativePath. - */ - @java.lang.Override - public java.lang.String getRelativePath() { - java.lang.Object ref = relativePath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - relativePath_ = s; - return s; - } - } - /** - *
-   * The rest of the path after the root.
-   * Examples:
-   * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
-   *  `table_id`
-   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
-   *  path is `folder/filename.txt`
-   * 
- * - * string relative_path = 5; - * @return The bytes for relativePath. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRelativePathBytes() { - java.lang.Object ref = relativePath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - relativePath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Findings container modification timestamp, if applicable. For Cloud
-   * Storage, this field contains the last file modification timestamp. For a
-   * BigQuery table, this field contains the last_modified_time property. For
-   * Datastore, this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * Findings container modification timestamp, if applicable. For Cloud
-   * Storage, this field contains the last file modification timestamp. For a
-   * BigQuery table, this field contains the last_modified_time property. For
-   * Datastore, this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * Findings container modification timestamp, if applicable. For Cloud
-   * Storage, this field contains the last file modification timestamp. For a
-   * BigQuery table, this field contains the last_modified_time property. For
-   * Datastore, this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int VERSION_FIELD_NUMBER = 7; - private volatile java.lang.Object version_; - /** - *
-   * Findings container version, if available
-   * ("generation" for Cloud Storage).
-   * 
- * - * string version = 7; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * Findings container version, if available
-   * ("generation" for Cloud Storage).
-   * 
- * - * string version = 7; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullPath_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fullPath_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rootPath_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, rootPath_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePath_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, relativePath_); - } - if (updateTime_ != null) { - output.writeMessage(6, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, version_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullPath_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, fullPath_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rootPath_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, rootPath_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relativePath_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, relativePath_); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, version_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Container)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Container other = (com.google.privacy.dlp.v2.Container) obj; - - if (!getType() - .equals(other.getType())) return false; - if (!getProjectId() - .equals(other.getProjectId())) return false; - if (!getFullPath() - .equals(other.getFullPath())) return false; - if (!getRootPath() - .equals(other.getRootPath())) return false; - if (!getRelativePath() - .equals(other.getRelativePath())) return false; - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!getVersion() - .equals(other.getVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + FULL_PATH_FIELD_NUMBER; - hash = (53 * hash) + getFullPath().hashCode(); - hash = (37 * hash) + ROOT_PATH_FIELD_NUMBER; - hash = (53 * hash) + getRootPath().hashCode(); - hash = (37 * hash) + RELATIVE_PATH_FIELD_NUMBER; - hash = (53 * hash) + getRelativePath().hashCode(); - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Container parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Container parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Container parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Container parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Container parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Container parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Container parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Container parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Container parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Container parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Container parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Container parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Container prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents a container that may contain DLP findings.
-   * Examples of a container include a file, table, or database record.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Container} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Container) - com.google.privacy.dlp.v2.ContainerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Container.class, com.google.privacy.dlp.v2.Container.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Container.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = ""; - - projectId_ = ""; - - fullPath_ = ""; - - rootPath_ = ""; - - relativePath_ = ""; - - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - version_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Container_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Container getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Container.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Container build() { - com.google.privacy.dlp.v2.Container result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Container buildPartial() { - com.google.privacy.dlp.v2.Container result = new com.google.privacy.dlp.v2.Container(this); - result.type_ = type_; - result.projectId_ = projectId_; - result.fullPath_ = fullPath_; - result.rootPath_ = rootPath_; - result.relativePath_ = relativePath_; - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.version_ = version_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Container) { - return mergeFrom((com.google.privacy.dlp.v2.Container)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Container other) { - if (other == com.google.privacy.dlp.v2.Container.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getFullPath().isEmpty()) { - fullPath_ = other.fullPath_; - onChanged(); - } - if (!other.getRootPath().isEmpty()) { - rootPath_ = other.rootPath_; - onChanged(); - } - if (!other.getRelativePath().isEmpty()) { - relativePath_ = other.relativePath_; - onChanged(); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Container parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Container) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object type_ = ""; - /** - *
-     * Container type, for example BigQuery or Cloud Storage.
-     * 
- * - * string type = 1; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Container type, for example BigQuery or Cloud Storage.
-     * 
- * - * string type = 1; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Container type, for example BigQuery or Cloud Storage.
-     * 
- * - * string type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * Container type, for example BigQuery or Cloud Storage.
-     * 
- * - * string type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - *
-     * Container type, for example BigQuery or Cloud Storage.
-     * 
- * - * string type = 1; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - type_ = value; - onChanged(); - return this; - } - - private java.lang.Object projectId_ = ""; - /** - *
-     * Project where the finding was found.
-     * Can be different from the project that owns the finding.
-     * 
- * - * string project_id = 2; - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Project where the finding was found.
-     * Can be different from the project that owns the finding.
-     * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Project where the finding was found.
-     * Can be different from the project that owns the finding.
-     * 
- * - * string project_id = 2; - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - *
-     * Project where the finding was found.
-     * Can be different from the project that owns the finding.
-     * 
- * - * string project_id = 2; - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - *
-     * Project where the finding was found.
-     * Can be different from the project that owns the finding.
-     * 
- * - * string project_id = 2; - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object fullPath_ = ""; - /** - *
-     * A string representation of the full container name.
-     * Examples:
-     * - BigQuery: 'Project:DataSetId.TableId'
-     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
-     * 
- * - * string full_path = 3; - * @return The fullPath. - */ - public java.lang.String getFullPath() { - java.lang.Object ref = fullPath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullPath_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A string representation of the full container name.
-     * Examples:
-     * - BigQuery: 'Project:DataSetId.TableId'
-     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
-     * 
- * - * string full_path = 3; - * @return The bytes for fullPath. - */ - public com.google.protobuf.ByteString - getFullPathBytes() { - java.lang.Object ref = fullPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A string representation of the full container name.
-     * Examples:
-     * - BigQuery: 'Project:DataSetId.TableId'
-     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
-     * 
- * - * string full_path = 3; - * @param value The fullPath to set. - * @return This builder for chaining. - */ - public Builder setFullPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fullPath_ = value; - onChanged(); - return this; - } - /** - *
-     * A string representation of the full container name.
-     * Examples:
-     * - BigQuery: 'Project:DataSetId.TableId'
-     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
-     * 
- * - * string full_path = 3; - * @return This builder for chaining. - */ - public Builder clearFullPath() { - - fullPath_ = getDefaultInstance().getFullPath(); - onChanged(); - return this; - } - /** - *
-     * A string representation of the full container name.
-     * Examples:
-     * - BigQuery: 'Project:DataSetId.TableId'
-     * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
-     * 
- * - * string full_path = 3; - * @param value The bytes for fullPath to set. - * @return This builder for chaining. - */ - public Builder setFullPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fullPath_ = value; - onChanged(); - return this; - } - - private java.lang.Object rootPath_ = ""; - /** - *
-     * The root of the container.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
-     *  `dataset_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
-     *  is `gs://bucket`
-     * 
- * - * string root_path = 4; - * @return The rootPath. - */ - public java.lang.String getRootPath() { - java.lang.Object ref = rootPath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rootPath_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The root of the container.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
-     *  `dataset_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
-     *  is `gs://bucket`
-     * 
- * - * string root_path = 4; - * @return The bytes for rootPath. - */ - public com.google.protobuf.ByteString - getRootPathBytes() { - java.lang.Object ref = rootPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rootPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The root of the container.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
-     *  `dataset_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
-     *  is `gs://bucket`
-     * 
- * - * string root_path = 4; - * @param value The rootPath to set. - * @return This builder for chaining. - */ - public Builder setRootPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - rootPath_ = value; - onChanged(); - return this; - } - /** - *
-     * The root of the container.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
-     *  `dataset_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
-     *  is `gs://bucket`
-     * 
- * - * string root_path = 4; - * @return This builder for chaining. - */ - public Builder clearRootPath() { - - rootPath_ = getDefaultInstance().getRootPath(); - onChanged(); - return this; - } - /** - *
-     * The root of the container.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the root is
-     *  `dataset_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
-     *  is `gs://bucket`
-     * 
- * - * string root_path = 4; - * @param value The bytes for rootPath to set. - * @return This builder for chaining. - */ - public Builder setRootPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - rootPath_ = value; - onChanged(); - return this; - } - - private java.lang.Object relativePath_ = ""; - /** - *
-     * The rest of the path after the root.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
-     *  `table_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
-     *  path is `folder/filename.txt`
-     * 
- * - * string relative_path = 5; - * @return The relativePath. - */ - public java.lang.String getRelativePath() { - java.lang.Object ref = relativePath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - relativePath_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The rest of the path after the root.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
-     *  `table_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
-     *  path is `folder/filename.txt`
-     * 
- * - * string relative_path = 5; - * @return The bytes for relativePath. - */ - public com.google.protobuf.ByteString - getRelativePathBytes() { - java.lang.Object ref = relativePath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - relativePath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The rest of the path after the root.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
-     *  `table_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
-     *  path is `folder/filename.txt`
-     * 
- * - * string relative_path = 5; - * @param value The relativePath to set. - * @return This builder for chaining. - */ - public Builder setRelativePath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - relativePath_ = value; - onChanged(); - return this; - } - /** - *
-     * The rest of the path after the root.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
-     *  `table_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
-     *  path is `folder/filename.txt`
-     * 
- * - * string relative_path = 5; - * @return This builder for chaining. - */ - public Builder clearRelativePath() { - - relativePath_ = getDefaultInstance().getRelativePath(); - onChanged(); - return this; - } - /** - *
-     * The rest of the path after the root.
-     * Examples:
-     * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
-     *  `table_id`
-     * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
-     *  path is `folder/filename.txt`
-     * 
- * - * string relative_path = 5; - * @param value The bytes for relativePath to set. - * @return This builder for chaining. - */ - public Builder setRelativePathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - relativePath_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Findings container modification timestamp, if applicable. For Cloud
-     * Storage, this field contains the last file modification timestamp. For a
-     * BigQuery table, this field contains the last_modified_time property. For
-     * Datastore, this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * Findings container modification timestamp, if applicable. For Cloud
-     * Storage, this field contains the last file modification timestamp. For a
-     * BigQuery table, this field contains the last_modified_time property. For
-     * Datastore, this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Findings container modification timestamp, if applicable. For Cloud
-     * Storage, this field contains the last file modification timestamp. For a
-     * BigQuery table, this field contains the last_modified_time property. For
-     * Datastore, this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Findings container modification timestamp, if applicable. For Cloud
-     * Storage, this field contains the last file modification timestamp. For a
-     * BigQuery table, this field contains the last_modified_time property. For
-     * Datastore, this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Findings container modification timestamp, if applicable. For Cloud
-     * Storage, this field contains the last file modification timestamp. For a
-     * BigQuery table, this field contains the last_modified_time property. For
-     * Datastore, this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Findings container modification timestamp, if applicable. For Cloud
-     * Storage, this field contains the last file modification timestamp. For a
-     * BigQuery table, this field contains the last_modified_time property. For
-     * Datastore, this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Findings container modification timestamp, if applicable. For Cloud
-     * Storage, this field contains the last file modification timestamp. For a
-     * BigQuery table, this field contains the last_modified_time property. For
-     * Datastore, this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Findings container modification timestamp, if applicable. For Cloud
-     * Storage, this field contains the last file modification timestamp. For a
-     * BigQuery table, this field contains the last_modified_time property. For
-     * Datastore, this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * Findings container modification timestamp, if applicable. For Cloud
-     * Storage, this field contains the last file modification timestamp. For a
-     * BigQuery table, this field contains the last_modified_time property. For
-     * Datastore, this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object version_ = ""; - /** - *
-     * Findings container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string version = 7; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Findings container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string version = 7; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Findings container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string version = 7; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - *
-     * Findings container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string version = 7; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - *
-     * Findings container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string version = 7; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Container) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Container) - private static final com.google.privacy.dlp.v2.Container DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Container(); - } - - public static com.google.privacy.dlp.v2.Container getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Container parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Container(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Container getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java deleted file mode 100644 index 6f9a1e30d0a8..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContainerOrBuilder.java +++ /dev/null @@ -1,195 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ContainerOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Container) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Container type, for example BigQuery or Cloud Storage.
-   * 
- * - * string type = 1; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * Container type, for example BigQuery or Cloud Storage.
-   * 
- * - * string type = 1; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * Project where the finding was found.
-   * Can be different from the project that owns the finding.
-   * 
- * - * string project_id = 2; - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - *
-   * Project where the finding was found.
-   * Can be different from the project that owns the finding.
-   * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString - getProjectIdBytes(); - - /** - *
-   * A string representation of the full container name.
-   * Examples:
-   * - BigQuery: 'Project:DataSetId.TableId'
-   * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
-   * 
- * - * string full_path = 3; - * @return The fullPath. - */ - java.lang.String getFullPath(); - /** - *
-   * A string representation of the full container name.
-   * Examples:
-   * - BigQuery: 'Project:DataSetId.TableId'
-   * - Cloud Storage: 'gs://Bucket/folders/filename.txt'
-   * 
- * - * string full_path = 3; - * @return The bytes for fullPath. - */ - com.google.protobuf.ByteString - getFullPathBytes(); - - /** - *
-   * The root of the container.
-   * Examples:
-   * - For BigQuery table `project_id:dataset_id.table_id`, the root is
-   *  `dataset_id`
-   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
-   *  is `gs://bucket`
-   * 
- * - * string root_path = 4; - * @return The rootPath. - */ - java.lang.String getRootPath(); - /** - *
-   * The root of the container.
-   * Examples:
-   * - For BigQuery table `project_id:dataset_id.table_id`, the root is
-   *  `dataset_id`
-   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root
-   *  is `gs://bucket`
-   * 
- * - * string root_path = 4; - * @return The bytes for rootPath. - */ - com.google.protobuf.ByteString - getRootPathBytes(); - - /** - *
-   * The rest of the path after the root.
-   * Examples:
-   * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
-   *  `table_id`
-   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
-   *  path is `folder/filename.txt`
-   * 
- * - * string relative_path = 5; - * @return The relativePath. - */ - java.lang.String getRelativePath(); - /** - *
-   * The rest of the path after the root.
-   * Examples:
-   * - For BigQuery table `project_id:dataset_id.table_id`, the relative path is
-   *  `table_id`
-   * - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative
-   *  path is `folder/filename.txt`
-   * 
- * - * string relative_path = 5; - * @return The bytes for relativePath. - */ - com.google.protobuf.ByteString - getRelativePathBytes(); - - /** - *
-   * Findings container modification timestamp, if applicable. For Cloud
-   * Storage, this field contains the last file modification timestamp. For a
-   * BigQuery table, this field contains the last_modified_time property. For
-   * Datastore, this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Findings container modification timestamp, if applicable. For Cloud
-   * Storage, this field contains the last file modification timestamp. For a
-   * BigQuery table, this field contains the last_modified_time property. For
-   * Datastore, this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Findings container modification timestamp, if applicable. For Cloud
-   * Storage, this field contains the last file modification timestamp. For a
-   * BigQuery table, this field contains the last_modified_time property. For
-   * Datastore, this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * Findings container version, if available
-   * ("generation" for Cloud Storage).
-   * 
- * - * string version = 7; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * Findings container version, if available
-   * ("generation" for Cloud Storage).
-   * 
- * - * string version = 7; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java deleted file mode 100644 index e480782c6064..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java +++ /dev/null @@ -1,1264 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Container structure for the content to inspect.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ContentItem} - */ -public final class ContentItem extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ContentItem) - ContentItemOrBuilder { -private static final long serialVersionUID = 0L; - // Use ContentItem.newBuilder() to construct. - private ContentItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContentItem() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContentItem(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ContentItem( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - dataItemCase_ = 3; - dataItem_ = s; - break; - } - case 34: { - com.google.privacy.dlp.v2.Table.Builder subBuilder = null; - if (dataItemCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.Table) dataItem_).toBuilder(); - } - dataItem_ = - input.readMessage(com.google.privacy.dlp.v2.Table.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Table) dataItem_); - dataItem_ = subBuilder.buildPartial(); - } - dataItemCase_ = 4; - break; - } - case 42: { - com.google.privacy.dlp.v2.ByteContentItem.Builder subBuilder = null; - if (dataItemCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.ByteContentItem) dataItem_).toBuilder(); - } - dataItem_ = - input.readMessage(com.google.privacy.dlp.v2.ByteContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ByteContentItem) dataItem_); - dataItem_ = subBuilder.buildPartial(); - } - dataItemCase_ = 5; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ContentItem.class, com.google.privacy.dlp.v2.ContentItem.Builder.class); - } - - private int dataItemCase_ = 0; - private java.lang.Object dataItem_; - public enum DataItemCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - VALUE(3), - TABLE(4), - BYTE_ITEM(5), - DATAITEM_NOT_SET(0); - private final int value; - private DataItemCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DataItemCase valueOf(int value) { - return forNumber(value); - } - - public static DataItemCase forNumber(int value) { - switch (value) { - case 3: return VALUE; - case 4: return TABLE; - case 5: return BYTE_ITEM; - case 0: return DATAITEM_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DataItemCase - getDataItemCase() { - return DataItemCase.forNumber( - dataItemCase_); - } - - public static final int VALUE_FIELD_NUMBER = 3; - /** - *
-   * String data to inspect or redact.
-   * 
- * - * string value = 3; - * @return Whether the value field is set. - */ - public boolean hasValue() { - return dataItemCase_ == 3; - } - /** - *
-   * String data to inspect or redact.
-   * 
- * - * string value = 3; - * @return The value. - */ - public java.lang.String getValue() { - java.lang.Object ref = ""; - if (dataItemCase_ == 3) { - ref = dataItem_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (dataItemCase_ == 3) { - dataItem_ = s; - } - return s; - } - } - /** - *
-   * String data to inspect or redact.
-   * 
- * - * string value = 3; - * @return The bytes for value. - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = ""; - if (dataItemCase_ == 3) { - ref = dataItem_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (dataItemCase_ == 3) { - dataItem_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_FIELD_NUMBER = 4; - /** - *
-   * Structured content for inspection. See
-   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-   * learn more.
-   * 
- * - * .google.privacy.dlp.v2.Table table = 4; - * @return Whether the table field is set. - */ - @java.lang.Override - public boolean hasTable() { - return dataItemCase_ == 4; - } - /** - *
-   * Structured content for inspection. See
-   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-   * learn more.
-   * 
- * - * .google.privacy.dlp.v2.Table table = 4; - * @return The table. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Table getTable() { - if (dataItemCase_ == 4) { - return (com.google.privacy.dlp.v2.Table) dataItem_; - } - return com.google.privacy.dlp.v2.Table.getDefaultInstance(); - } - /** - *
-   * Structured content for inspection. See
-   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-   * learn more.
-   * 
- * - * .google.privacy.dlp.v2.Table table = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableOrBuilder getTableOrBuilder() { - if (dataItemCase_ == 4) { - return (com.google.privacy.dlp.v2.Table) dataItem_; - } - return com.google.privacy.dlp.v2.Table.getDefaultInstance(); - } - - public static final int BYTE_ITEM_FIELD_NUMBER = 5; - /** - *
-   * Content data to inspect or redact. Replaces `type` and `data`.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - * @return Whether the byteItem field is set. - */ - @java.lang.Override - public boolean hasByteItem() { - return dataItemCase_ == 5; - } - /** - *
-   * Content data to inspect or redact. Replaces `type` and `data`.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - * @return The byteItem. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItem getByteItem() { - if (dataItemCase_ == 5) { - return (com.google.privacy.dlp.v2.ByteContentItem) dataItem_; - } - return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); - } - /** - *
-   * Content data to inspect or redact. Replaces `type` and `data`.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() { - if (dataItemCase_ == 5) { - return (com.google.privacy.dlp.v2.ByteContentItem) dataItem_; - } - return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (dataItemCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, dataItem_); - } - if (dataItemCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.Table) dataItem_); - } - if (dataItemCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.ByteContentItem) dataItem_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataItemCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, dataItem_); - } - if (dataItemCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.Table) dataItem_); - } - if (dataItemCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.ByteContentItem) dataItem_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ContentItem)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ContentItem other = (com.google.privacy.dlp.v2.ContentItem) obj; - - if (!getDataItemCase().equals(other.getDataItemCase())) return false; - switch (dataItemCase_) { - case 3: - if (!getValue() - .equals(other.getValue())) return false; - break; - case 4: - if (!getTable() - .equals(other.getTable())) return false; - break; - case 5: - if (!getByteItem() - .equals(other.getByteItem())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (dataItemCase_) { - case 3: - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - break; - case 4: - hash = (37 * hash) + TABLE_FIELD_NUMBER; - hash = (53 * hash) + getTable().hashCode(); - break; - case 5: - hash = (37 * hash) + BYTE_ITEM_FIELD_NUMBER; - hash = (53 * hash) + getByteItem().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ContentItem parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ContentItem parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentItem parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ContentItem parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentItem parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ContentItem parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentItem parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ContentItem parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentItem parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ContentItem parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentItem parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ContentItem parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ContentItem prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Container structure for the content to inspect.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ContentItem} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ContentItem) - com.google.privacy.dlp.v2.ContentItemOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ContentItem.class, com.google.privacy.dlp.v2.ContentItem.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ContentItem.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - dataItemCase_ = 0; - dataItem_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentItem_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ContentItem.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem build() { - com.google.privacy.dlp.v2.ContentItem result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem buildPartial() { - com.google.privacy.dlp.v2.ContentItem result = new com.google.privacy.dlp.v2.ContentItem(this); - if (dataItemCase_ == 3) { - result.dataItem_ = dataItem_; - } - if (dataItemCase_ == 4) { - if (tableBuilder_ == null) { - result.dataItem_ = dataItem_; - } else { - result.dataItem_ = tableBuilder_.build(); - } - } - if (dataItemCase_ == 5) { - if (byteItemBuilder_ == null) { - result.dataItem_ = dataItem_; - } else { - result.dataItem_ = byteItemBuilder_.build(); - } - } - result.dataItemCase_ = dataItemCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ContentItem) { - return mergeFrom((com.google.privacy.dlp.v2.ContentItem)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ContentItem other) { - if (other == com.google.privacy.dlp.v2.ContentItem.getDefaultInstance()) return this; - switch (other.getDataItemCase()) { - case VALUE: { - dataItemCase_ = 3; - dataItem_ = other.dataItem_; - onChanged(); - break; - } - case TABLE: { - mergeTable(other.getTable()); - break; - } - case BYTE_ITEM: { - mergeByteItem(other.getByteItem()); - break; - } - case DATAITEM_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ContentItem parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ContentItem) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int dataItemCase_ = 0; - private java.lang.Object dataItem_; - public DataItemCase - getDataItemCase() { - return DataItemCase.forNumber( - dataItemCase_); - } - - public Builder clearDataItem() { - dataItemCase_ = 0; - dataItem_ = null; - onChanged(); - return this; - } - - - /** - *
-     * String data to inspect or redact.
-     * 
- * - * string value = 3; - * @return Whether the value field is set. - */ - @java.lang.Override - public boolean hasValue() { - return dataItemCase_ == 3; - } - /** - *
-     * String data to inspect or redact.
-     * 
- * - * string value = 3; - * @return The value. - */ - @java.lang.Override - public java.lang.String getValue() { - java.lang.Object ref = ""; - if (dataItemCase_ == 3) { - ref = dataItem_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (dataItemCase_ == 3) { - dataItem_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * String data to inspect or redact.
-     * 
- * - * string value = 3; - * @return The bytes for value. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = ""; - if (dataItemCase_ == 3) { - ref = dataItem_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (dataItemCase_ == 3) { - dataItem_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * String data to inspect or redact.
-     * 
- * - * string value = 3; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - dataItemCase_ = 3; - dataItem_ = value; - onChanged(); - return this; - } - /** - *
-     * String data to inspect or redact.
-     * 
- * - * string value = 3; - * @return This builder for chaining. - */ - public Builder clearValue() { - if (dataItemCase_ == 3) { - dataItemCase_ = 0; - dataItem_ = null; - onChanged(); - } - return this; - } - /** - *
-     * String data to inspect or redact.
-     * 
- * - * string value = 3; - * @param value The bytes for value to set. - * @return This builder for chaining. - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - dataItemCase_ = 3; - dataItem_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Table, com.google.privacy.dlp.v2.Table.Builder, com.google.privacy.dlp.v2.TableOrBuilder> tableBuilder_; - /** - *
-     * Structured content for inspection. See
-     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-     * learn more.
-     * 
- * - * .google.privacy.dlp.v2.Table table = 4; - * @return Whether the table field is set. - */ - @java.lang.Override - public boolean hasTable() { - return dataItemCase_ == 4; - } - /** - *
-     * Structured content for inspection. See
-     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-     * learn more.
-     * 
- * - * .google.privacy.dlp.v2.Table table = 4; - * @return The table. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Table getTable() { - if (tableBuilder_ == null) { - if (dataItemCase_ == 4) { - return (com.google.privacy.dlp.v2.Table) dataItem_; - } - return com.google.privacy.dlp.v2.Table.getDefaultInstance(); - } else { - if (dataItemCase_ == 4) { - return tableBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Table.getDefaultInstance(); - } - } - /** - *
-     * Structured content for inspection. See
-     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-     * learn more.
-     * 
- * - * .google.privacy.dlp.v2.Table table = 4; - */ - public Builder setTable(com.google.privacy.dlp.v2.Table value) { - if (tableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataItem_ = value; - onChanged(); - } else { - tableBuilder_.setMessage(value); - } - dataItemCase_ = 4; - return this; - } - /** - *
-     * Structured content for inspection. See
-     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-     * learn more.
-     * 
- * - * .google.privacy.dlp.v2.Table table = 4; - */ - public Builder setTable( - com.google.privacy.dlp.v2.Table.Builder builderForValue) { - if (tableBuilder_ == null) { - dataItem_ = builderForValue.build(); - onChanged(); - } else { - tableBuilder_.setMessage(builderForValue.build()); - } - dataItemCase_ = 4; - return this; - } - /** - *
-     * Structured content for inspection. See
-     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-     * learn more.
-     * 
- * - * .google.privacy.dlp.v2.Table table = 4; - */ - public Builder mergeTable(com.google.privacy.dlp.v2.Table value) { - if (tableBuilder_ == null) { - if (dataItemCase_ == 4 && - dataItem_ != com.google.privacy.dlp.v2.Table.getDefaultInstance()) { - dataItem_ = com.google.privacy.dlp.v2.Table.newBuilder((com.google.privacy.dlp.v2.Table) dataItem_) - .mergeFrom(value).buildPartial(); - } else { - dataItem_ = value; - } - onChanged(); - } else { - if (dataItemCase_ == 4) { - tableBuilder_.mergeFrom(value); - } else { - tableBuilder_.setMessage(value); - } - } - dataItemCase_ = 4; - return this; - } - /** - *
-     * Structured content for inspection. See
-     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-     * learn more.
-     * 
- * - * .google.privacy.dlp.v2.Table table = 4; - */ - public Builder clearTable() { - if (tableBuilder_ == null) { - if (dataItemCase_ == 4) { - dataItemCase_ = 0; - dataItem_ = null; - onChanged(); - } - } else { - if (dataItemCase_ == 4) { - dataItemCase_ = 0; - dataItem_ = null; - } - tableBuilder_.clear(); - } - return this; - } - /** - *
-     * Structured content for inspection. See
-     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-     * learn more.
-     * 
- * - * .google.privacy.dlp.v2.Table table = 4; - */ - public com.google.privacy.dlp.v2.Table.Builder getTableBuilder() { - return getTableFieldBuilder().getBuilder(); - } - /** - *
-     * Structured content for inspection. See
-     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-     * learn more.
-     * 
- * - * .google.privacy.dlp.v2.Table table = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableOrBuilder getTableOrBuilder() { - if ((dataItemCase_ == 4) && (tableBuilder_ != null)) { - return tableBuilder_.getMessageOrBuilder(); - } else { - if (dataItemCase_ == 4) { - return (com.google.privacy.dlp.v2.Table) dataItem_; - } - return com.google.privacy.dlp.v2.Table.getDefaultInstance(); - } - } - /** - *
-     * Structured content for inspection. See
-     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-     * learn more.
-     * 
- * - * .google.privacy.dlp.v2.Table table = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Table, com.google.privacy.dlp.v2.Table.Builder, com.google.privacy.dlp.v2.TableOrBuilder> - getTableFieldBuilder() { - if (tableBuilder_ == null) { - if (!(dataItemCase_ == 4)) { - dataItem_ = com.google.privacy.dlp.v2.Table.getDefaultInstance(); - } - tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Table, com.google.privacy.dlp.v2.Table.Builder, com.google.privacy.dlp.v2.TableOrBuilder>( - (com.google.privacy.dlp.v2.Table) dataItem_, - getParentForChildren(), - isClean()); - dataItem_ = null; - } - dataItemCase_ = 4; - onChanged();; - return tableBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> byteItemBuilder_; - /** - *
-     * Content data to inspect or redact. Replaces `type` and `data`.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - * @return Whether the byteItem field is set. - */ - @java.lang.Override - public boolean hasByteItem() { - return dataItemCase_ == 5; - } - /** - *
-     * Content data to inspect or redact. Replaces `type` and `data`.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - * @return The byteItem. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItem getByteItem() { - if (byteItemBuilder_ == null) { - if (dataItemCase_ == 5) { - return (com.google.privacy.dlp.v2.ByteContentItem) dataItem_; - } - return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); - } else { - if (dataItemCase_ == 5) { - return byteItemBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); - } - } - /** - *
-     * Content data to inspect or redact. Replaces `type` and `data`.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - */ - public Builder setByteItem(com.google.privacy.dlp.v2.ByteContentItem value) { - if (byteItemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataItem_ = value; - onChanged(); - } else { - byteItemBuilder_.setMessage(value); - } - dataItemCase_ = 5; - return this; - } - /** - *
-     * Content data to inspect or redact. Replaces `type` and `data`.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - */ - public Builder setByteItem( - com.google.privacy.dlp.v2.ByteContentItem.Builder builderForValue) { - if (byteItemBuilder_ == null) { - dataItem_ = builderForValue.build(); - onChanged(); - } else { - byteItemBuilder_.setMessage(builderForValue.build()); - } - dataItemCase_ = 5; - return this; - } - /** - *
-     * Content data to inspect or redact. Replaces `type` and `data`.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - */ - public Builder mergeByteItem(com.google.privacy.dlp.v2.ByteContentItem value) { - if (byteItemBuilder_ == null) { - if (dataItemCase_ == 5 && - dataItem_ != com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance()) { - dataItem_ = com.google.privacy.dlp.v2.ByteContentItem.newBuilder((com.google.privacy.dlp.v2.ByteContentItem) dataItem_) - .mergeFrom(value).buildPartial(); - } else { - dataItem_ = value; - } - onChanged(); - } else { - if (dataItemCase_ == 5) { - byteItemBuilder_.mergeFrom(value); - } else { - byteItemBuilder_.setMessage(value); - } - } - dataItemCase_ = 5; - return this; - } - /** - *
-     * Content data to inspect or redact. Replaces `type` and `data`.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - */ - public Builder clearByteItem() { - if (byteItemBuilder_ == null) { - if (dataItemCase_ == 5) { - dataItemCase_ = 0; - dataItem_ = null; - onChanged(); - } - } else { - if (dataItemCase_ == 5) { - dataItemCase_ = 0; - dataItem_ = null; - } - byteItemBuilder_.clear(); - } - return this; - } - /** - *
-     * Content data to inspect or redact. Replaces `type` and `data`.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - */ - public com.google.privacy.dlp.v2.ByteContentItem.Builder getByteItemBuilder() { - return getByteItemFieldBuilder().getBuilder(); - } - /** - *
-     * Content data to inspect or redact. Replaces `type` and `data`.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() { - if ((dataItemCase_ == 5) && (byteItemBuilder_ != null)) { - return byteItemBuilder_.getMessageOrBuilder(); - } else { - if (dataItemCase_ == 5) { - return (com.google.privacy.dlp.v2.ByteContentItem) dataItem_; - } - return com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); - } - } - /** - *
-     * Content data to inspect or redact. Replaces `type` and `data`.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> - getByteItemFieldBuilder() { - if (byteItemBuilder_ == null) { - if (!(dataItemCase_ == 5)) { - dataItem_ = com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance(); - } - byteItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder>( - (com.google.privacy.dlp.v2.ByteContentItem) dataItem_, - getParentForChildren(), - isClean()); - dataItem_ = null; - } - dataItemCase_ = 5; - onChanged();; - return byteItemBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ContentItem) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ContentItem) - private static final com.google.privacy.dlp.v2.ContentItem DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ContentItem(); - } - - public static com.google.privacy.dlp.v2.ContentItem getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ContentItem parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ContentItem(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java deleted file mode 100644 index 09fa56eab258..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java +++ /dev/null @@ -1,100 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ContentItemOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ContentItem) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * String data to inspect or redact.
-   * 
- * - * string value = 3; - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - *
-   * String data to inspect or redact.
-   * 
- * - * string value = 3; - * @return The value. - */ - java.lang.String getValue(); - /** - *
-   * String data to inspect or redact.
-   * 
- * - * string value = 3; - * @return The bytes for value. - */ - com.google.protobuf.ByteString - getValueBytes(); - - /** - *
-   * Structured content for inspection. See
-   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-   * learn more.
-   * 
- * - * .google.privacy.dlp.v2.Table table = 4; - * @return Whether the table field is set. - */ - boolean hasTable(); - /** - *
-   * Structured content for inspection. See
-   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-   * learn more.
-   * 
- * - * .google.privacy.dlp.v2.Table table = 4; - * @return The table. - */ - com.google.privacy.dlp.v2.Table getTable(); - /** - *
-   * Structured content for inspection. See
-   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
-   * learn more.
-   * 
- * - * .google.privacy.dlp.v2.Table table = 4; - */ - com.google.privacy.dlp.v2.TableOrBuilder getTableOrBuilder(); - - /** - *
-   * Content data to inspect or redact. Replaces `type` and `data`.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - * @return Whether the byteItem field is set. - */ - boolean hasByteItem(); - /** - *
-   * Content data to inspect or redact. Replaces `type` and `data`.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - * @return The byteItem. - */ - com.google.privacy.dlp.v2.ByteContentItem getByteItem(); - /** - *
-   * Content data to inspect or redact. Replaces `type` and `data`.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 5; - */ - com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder(); - - public com.google.privacy.dlp.v2.ContentItem.DataItemCase getDataItemCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java deleted file mode 100644 index edd6fa3cd09b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocation.java +++ /dev/null @@ -1,2212 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Precise location of the finding within a document, record, image, or metadata
- * container.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ContentLocation} - */ -public final class ContentLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ContentLocation) - ContentLocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use ContentLocation.newBuilder() to construct. - private ContentLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ContentLocation() { - containerName_ = ""; - containerVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ContentLocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ContentLocation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - containerName_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.RecordLocation.Builder subBuilder = null; - if (locationCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.RecordLocation) location_).toBuilder(); - } - location_ = - input.readMessage(com.google.privacy.dlp.v2.RecordLocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.RecordLocation) location_); - location_ = subBuilder.buildPartial(); - } - locationCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.ImageLocation.Builder subBuilder = null; - if (locationCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.ImageLocation) location_).toBuilder(); - } - location_ = - input.readMessage(com.google.privacy.dlp.v2.ImageLocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageLocation) location_); - location_ = subBuilder.buildPartial(); - } - locationCase_ = 3; - break; - } - case 42: { - com.google.privacy.dlp.v2.DocumentLocation.Builder subBuilder = null; - if (locationCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.DocumentLocation) location_).toBuilder(); - } - location_ = - input.readMessage(com.google.privacy.dlp.v2.DocumentLocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.DocumentLocation) location_); - location_ = subBuilder.buildPartial(); - } - locationCase_ = 5; - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (containerTimestamp_ != null) { - subBuilder = containerTimestamp_.toBuilder(); - } - containerTimestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(containerTimestamp_); - containerTimestamp_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - containerVersion_ = s; - break; - } - case 66: { - com.google.privacy.dlp.v2.MetadataLocation.Builder subBuilder = null; - if (locationCase_ == 8) { - subBuilder = ((com.google.privacy.dlp.v2.MetadataLocation) location_).toBuilder(); - } - location_ = - input.readMessage(com.google.privacy.dlp.v2.MetadataLocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.MetadataLocation) location_); - location_ = subBuilder.buildPartial(); - } - locationCase_ = 8; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ContentLocation.class, com.google.privacy.dlp.v2.ContentLocation.Builder.class); - } - - private int locationCase_ = 0; - private java.lang.Object location_; - public enum LocationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - RECORD_LOCATION(2), - IMAGE_LOCATION(3), - DOCUMENT_LOCATION(5), - METADATA_LOCATION(8), - LOCATION_NOT_SET(0); - private final int value; - private LocationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LocationCase valueOf(int value) { - return forNumber(value); - } - - public static LocationCase forNumber(int value) { - switch (value) { - case 2: return RECORD_LOCATION; - case 3: return IMAGE_LOCATION; - case 5: return DOCUMENT_LOCATION; - case 8: return METADATA_LOCATION; - case 0: return LOCATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LocationCase - getLocationCase() { - return LocationCase.forNumber( - locationCase_); - } - - public static final int CONTAINER_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object containerName_; - /** - *
-   * Name of the container where the finding is located.
-   * The top level name is the source file name or table name. Names of some
-   * common storage containers are formatted as follows:
-   * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
-   * * Cloud Storage files: `gs://{bucket}/{path}`
-   * * Datastore namespace: {namespace}
-   * Nested names could be absent if the embedded object has no string
-   * identifier (for example, an image contained within a document).
-   * 
- * - * string container_name = 1; - * @return The containerName. - */ - @java.lang.Override - public java.lang.String getContainerName() { - java.lang.Object ref = containerName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - containerName_ = s; - return s; - } - } - /** - *
-   * Name of the container where the finding is located.
-   * The top level name is the source file name or table name. Names of some
-   * common storage containers are formatted as follows:
-   * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
-   * * Cloud Storage files: `gs://{bucket}/{path}`
-   * * Datastore namespace: {namespace}
-   * Nested names could be absent if the embedded object has no string
-   * identifier (for example, an image contained within a document).
-   * 
- * - * string container_name = 1; - * @return The bytes for containerName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getContainerNameBytes() { - java.lang.Object ref = containerName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - containerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RECORD_LOCATION_FIELD_NUMBER = 2; - /** - *
-   * Location within a row or record of a database table.
-   * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - * @return Whether the recordLocation field is set. - */ - @java.lang.Override - public boolean hasRecordLocation() { - return locationCase_ == 2; - } - /** - *
-   * Location within a row or record of a database table.
-   * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - * @return The recordLocation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordLocation getRecordLocation() { - if (locationCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordLocation) location_; - } - return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); - } - /** - *
-   * Location within a row or record of a database table.
-   * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordLocationOrBuilder getRecordLocationOrBuilder() { - if (locationCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordLocation) location_; - } - return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); - } - - public static final int IMAGE_LOCATION_FIELD_NUMBER = 3; - /** - *
-   * Location within an image's pixels.
-   * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - * @return Whether the imageLocation field is set. - */ - @java.lang.Override - public boolean hasImageLocation() { - return locationCase_ == 3; - } - /** - *
-   * Location within an image's pixels.
-   * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - * @return The imageLocation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ImageLocation getImageLocation() { - if (locationCase_ == 3) { - return (com.google.privacy.dlp.v2.ImageLocation) location_; - } - return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); - } - /** - *
-   * Location within an image's pixels.
-   * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ImageLocationOrBuilder getImageLocationOrBuilder() { - if (locationCase_ == 3) { - return (com.google.privacy.dlp.v2.ImageLocation) location_; - } - return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); - } - - public static final int DOCUMENT_LOCATION_FIELD_NUMBER = 5; - /** - *
-   * Location data for document files.
-   * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - * @return Whether the documentLocation field is set. - */ - @java.lang.Override - public boolean hasDocumentLocation() { - return locationCase_ == 5; - } - /** - *
-   * Location data for document files.
-   * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - * @return The documentLocation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DocumentLocation getDocumentLocation() { - if (locationCase_ == 5) { - return (com.google.privacy.dlp.v2.DocumentLocation) location_; - } - return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); - } - /** - *
-   * Location data for document files.
-   * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DocumentLocationOrBuilder getDocumentLocationOrBuilder() { - if (locationCase_ == 5) { - return (com.google.privacy.dlp.v2.DocumentLocation) location_; - } - return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); - } - - public static final int METADATA_LOCATION_FIELD_NUMBER = 8; - /** - *
-   * Location within the metadata for inspected content.
-   * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - * @return Whether the metadataLocation field is set. - */ - @java.lang.Override - public boolean hasMetadataLocation() { - return locationCase_ == 8; - } - /** - *
-   * Location within the metadata for inspected content.
-   * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - * @return The metadataLocation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.MetadataLocation getMetadataLocation() { - if (locationCase_ == 8) { - return (com.google.privacy.dlp.v2.MetadataLocation) location_; - } - return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); - } - /** - *
-   * Location within the metadata for inspected content.
-   * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOrBuilder() { - if (locationCase_ == 8) { - return (com.google.privacy.dlp.v2.MetadataLocation) location_; - } - return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); - } - - public static final int CONTAINER_TIMESTAMP_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp containerTimestamp_; - /** - *
-   * Finding container modification timestamp, if applicable. For Cloud Storage,
-   * this field contains the last file modification timestamp. For a BigQuery
-   * table, this field contains the last_modified_time property. For Datastore,
-   * this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - * @return Whether the containerTimestamp field is set. - */ - @java.lang.Override - public boolean hasContainerTimestamp() { - return containerTimestamp_ != null; - } - /** - *
-   * Finding container modification timestamp, if applicable. For Cloud Storage,
-   * this field contains the last file modification timestamp. For a BigQuery
-   * table, this field contains the last_modified_time property. For Datastore,
-   * this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - * @return The containerTimestamp. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getContainerTimestamp() { - return containerTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; - } - /** - *
-   * Finding container modification timestamp, if applicable. For Cloud Storage,
-   * this field contains the last file modification timestamp. For a BigQuery
-   * table, this field contains the last_modified_time property. For Datastore,
-   * this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { - return getContainerTimestamp(); - } - - public static final int CONTAINER_VERSION_FIELD_NUMBER = 7; - private volatile java.lang.Object containerVersion_; - /** - *
-   * Finding container version, if available
-   * ("generation" for Cloud Storage).
-   * 
- * - * string container_version = 7; - * @return The containerVersion. - */ - @java.lang.Override - public java.lang.String getContainerVersion() { - java.lang.Object ref = containerVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - containerVersion_ = s; - return s; - } - } - /** - *
-   * Finding container version, if available
-   * ("generation" for Cloud Storage).
-   * 
- * - * string container_version = 7; - * @return The bytes for containerVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getContainerVersionBytes() { - java.lang.Object ref = containerVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - containerVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, containerName_); - } - if (locationCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.RecordLocation) location_); - } - if (locationCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.ImageLocation) location_); - } - if (locationCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.DocumentLocation) location_); - } - if (containerTimestamp_ != null) { - output.writeMessage(6, getContainerTimestamp()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, containerVersion_); - } - if (locationCase_ == 8) { - output.writeMessage(8, (com.google.privacy.dlp.v2.MetadataLocation) location_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, containerName_); - } - if (locationCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.RecordLocation) location_); - } - if (locationCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.ImageLocation) location_); - } - if (locationCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.DocumentLocation) location_); - } - if (containerTimestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getContainerTimestamp()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, containerVersion_); - } - if (locationCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (com.google.privacy.dlp.v2.MetadataLocation) location_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ContentLocation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ContentLocation other = (com.google.privacy.dlp.v2.ContentLocation) obj; - - if (!getContainerName() - .equals(other.getContainerName())) return false; - if (hasContainerTimestamp() != other.hasContainerTimestamp()) return false; - if (hasContainerTimestamp()) { - if (!getContainerTimestamp() - .equals(other.getContainerTimestamp())) return false; - } - if (!getContainerVersion() - .equals(other.getContainerVersion())) return false; - if (!getLocationCase().equals(other.getLocationCase())) return false; - switch (locationCase_) { - case 2: - if (!getRecordLocation() - .equals(other.getRecordLocation())) return false; - break; - case 3: - if (!getImageLocation() - .equals(other.getImageLocation())) return false; - break; - case 5: - if (!getDocumentLocation() - .equals(other.getDocumentLocation())) return false; - break; - case 8: - if (!getMetadataLocation() - .equals(other.getMetadataLocation())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONTAINER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getContainerName().hashCode(); - if (hasContainerTimestamp()) { - hash = (37 * hash) + CONTAINER_TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getContainerTimestamp().hashCode(); - } - hash = (37 * hash) + CONTAINER_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getContainerVersion().hashCode(); - switch (locationCase_) { - case 2: - hash = (37 * hash) + RECORD_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getRecordLocation().hashCode(); - break; - case 3: - hash = (37 * hash) + IMAGE_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getImageLocation().hashCode(); - break; - case 5: - hash = (37 * hash) + DOCUMENT_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getDocumentLocation().hashCode(); - break; - case 8: - hash = (37 * hash) + METADATA_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getMetadataLocation().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ContentLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ContentLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ContentLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ContentLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ContentLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ContentLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ContentLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ContentLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ContentLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Precise location of the finding within a document, record, image, or metadata
-   * container.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ContentLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ContentLocation) - com.google.privacy.dlp.v2.ContentLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ContentLocation.class, com.google.privacy.dlp.v2.ContentLocation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ContentLocation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - containerName_ = ""; - - if (containerTimestampBuilder_ == null) { - containerTimestamp_ = null; - } else { - containerTimestamp_ = null; - containerTimestampBuilder_ = null; - } - containerVersion_ = ""; - - locationCase_ = 0; - location_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ContentLocation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ContentLocation build() { - com.google.privacy.dlp.v2.ContentLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ContentLocation buildPartial() { - com.google.privacy.dlp.v2.ContentLocation result = new com.google.privacy.dlp.v2.ContentLocation(this); - result.containerName_ = containerName_; - if (locationCase_ == 2) { - if (recordLocationBuilder_ == null) { - result.location_ = location_; - } else { - result.location_ = recordLocationBuilder_.build(); - } - } - if (locationCase_ == 3) { - if (imageLocationBuilder_ == null) { - result.location_ = location_; - } else { - result.location_ = imageLocationBuilder_.build(); - } - } - if (locationCase_ == 5) { - if (documentLocationBuilder_ == null) { - result.location_ = location_; - } else { - result.location_ = documentLocationBuilder_.build(); - } - } - if (locationCase_ == 8) { - if (metadataLocationBuilder_ == null) { - result.location_ = location_; - } else { - result.location_ = metadataLocationBuilder_.build(); - } - } - if (containerTimestampBuilder_ == null) { - result.containerTimestamp_ = containerTimestamp_; - } else { - result.containerTimestamp_ = containerTimestampBuilder_.build(); - } - result.containerVersion_ = containerVersion_; - result.locationCase_ = locationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ContentLocation) { - return mergeFrom((com.google.privacy.dlp.v2.ContentLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ContentLocation other) { - if (other == com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance()) return this; - if (!other.getContainerName().isEmpty()) { - containerName_ = other.containerName_; - onChanged(); - } - if (other.hasContainerTimestamp()) { - mergeContainerTimestamp(other.getContainerTimestamp()); - } - if (!other.getContainerVersion().isEmpty()) { - containerVersion_ = other.containerVersion_; - onChanged(); - } - switch (other.getLocationCase()) { - case RECORD_LOCATION: { - mergeRecordLocation(other.getRecordLocation()); - break; - } - case IMAGE_LOCATION: { - mergeImageLocation(other.getImageLocation()); - break; - } - case DOCUMENT_LOCATION: { - mergeDocumentLocation(other.getDocumentLocation()); - break; - } - case METADATA_LOCATION: { - mergeMetadataLocation(other.getMetadataLocation()); - break; - } - case LOCATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ContentLocation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ContentLocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int locationCase_ = 0; - private java.lang.Object location_; - public LocationCase - getLocationCase() { - return LocationCase.forNumber( - locationCase_); - } - - public Builder clearLocation() { - locationCase_ = 0; - location_ = null; - onChanged(); - return this; - } - - - private java.lang.Object containerName_ = ""; - /** - *
-     * Name of the container where the finding is located.
-     * The top level name is the source file name or table name. Names of some
-     * common storage containers are formatted as follows:
-     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
-     * * Cloud Storage files: `gs://{bucket}/{path}`
-     * * Datastore namespace: {namespace}
-     * Nested names could be absent if the embedded object has no string
-     * identifier (for example, an image contained within a document).
-     * 
- * - * string container_name = 1; - * @return The containerName. - */ - public java.lang.String getContainerName() { - java.lang.Object ref = containerName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - containerName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the container where the finding is located.
-     * The top level name is the source file name or table name. Names of some
-     * common storage containers are formatted as follows:
-     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
-     * * Cloud Storage files: `gs://{bucket}/{path}`
-     * * Datastore namespace: {namespace}
-     * Nested names could be absent if the embedded object has no string
-     * identifier (for example, an image contained within a document).
-     * 
- * - * string container_name = 1; - * @return The bytes for containerName. - */ - public com.google.protobuf.ByteString - getContainerNameBytes() { - java.lang.Object ref = containerName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - containerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the container where the finding is located.
-     * The top level name is the source file name or table name. Names of some
-     * common storage containers are formatted as follows:
-     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
-     * * Cloud Storage files: `gs://{bucket}/{path}`
-     * * Datastore namespace: {namespace}
-     * Nested names could be absent if the embedded object has no string
-     * identifier (for example, an image contained within a document).
-     * 
- * - * string container_name = 1; - * @param value The containerName to set. - * @return This builder for chaining. - */ - public Builder setContainerName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - containerName_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the container where the finding is located.
-     * The top level name is the source file name or table name. Names of some
-     * common storage containers are formatted as follows:
-     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
-     * * Cloud Storage files: `gs://{bucket}/{path}`
-     * * Datastore namespace: {namespace}
-     * Nested names could be absent if the embedded object has no string
-     * identifier (for example, an image contained within a document).
-     * 
- * - * string container_name = 1; - * @return This builder for chaining. - */ - public Builder clearContainerName() { - - containerName_ = getDefaultInstance().getContainerName(); - onChanged(); - return this; - } - /** - *
-     * Name of the container where the finding is located.
-     * The top level name is the source file name or table name. Names of some
-     * common storage containers are formatted as follows:
-     * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
-     * * Cloud Storage files: `gs://{bucket}/{path}`
-     * * Datastore namespace: {namespace}
-     * Nested names could be absent if the embedded object has no string
-     * identifier (for example, an image contained within a document).
-     * 
- * - * string container_name = 1; - * @param value The bytes for containerName to set. - * @return This builder for chaining. - */ - public Builder setContainerNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - containerName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordLocation, com.google.privacy.dlp.v2.RecordLocation.Builder, com.google.privacy.dlp.v2.RecordLocationOrBuilder> recordLocationBuilder_; - /** - *
-     * Location within a row or record of a database table.
-     * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - * @return Whether the recordLocation field is set. - */ - @java.lang.Override - public boolean hasRecordLocation() { - return locationCase_ == 2; - } - /** - *
-     * Location within a row or record of a database table.
-     * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - * @return The recordLocation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordLocation getRecordLocation() { - if (recordLocationBuilder_ == null) { - if (locationCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordLocation) location_; - } - return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); - } else { - if (locationCase_ == 2) { - return recordLocationBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); - } - } - /** - *
-     * Location within a row or record of a database table.
-     * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - */ - public Builder setRecordLocation(com.google.privacy.dlp.v2.RecordLocation value) { - if (recordLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - recordLocationBuilder_.setMessage(value); - } - locationCase_ = 2; - return this; - } - /** - *
-     * Location within a row or record of a database table.
-     * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - */ - public Builder setRecordLocation( - com.google.privacy.dlp.v2.RecordLocation.Builder builderForValue) { - if (recordLocationBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - recordLocationBuilder_.setMessage(builderForValue.build()); - } - locationCase_ = 2; - return this; - } - /** - *
-     * Location within a row or record of a database table.
-     * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - */ - public Builder mergeRecordLocation(com.google.privacy.dlp.v2.RecordLocation value) { - if (recordLocationBuilder_ == null) { - if (locationCase_ == 2 && - location_ != com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance()) { - location_ = com.google.privacy.dlp.v2.RecordLocation.newBuilder((com.google.privacy.dlp.v2.RecordLocation) location_) - .mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - if (locationCase_ == 2) { - recordLocationBuilder_.mergeFrom(value); - } else { - recordLocationBuilder_.setMessage(value); - } - } - locationCase_ = 2; - return this; - } - /** - *
-     * Location within a row or record of a database table.
-     * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - */ - public Builder clearRecordLocation() { - if (recordLocationBuilder_ == null) { - if (locationCase_ == 2) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - } else { - if (locationCase_ == 2) { - locationCase_ = 0; - location_ = null; - } - recordLocationBuilder_.clear(); - } - return this; - } - /** - *
-     * Location within a row or record of a database table.
-     * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - */ - public com.google.privacy.dlp.v2.RecordLocation.Builder getRecordLocationBuilder() { - return getRecordLocationFieldBuilder().getBuilder(); - } - /** - *
-     * Location within a row or record of a database table.
-     * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordLocationOrBuilder getRecordLocationOrBuilder() { - if ((locationCase_ == 2) && (recordLocationBuilder_ != null)) { - return recordLocationBuilder_.getMessageOrBuilder(); - } else { - if (locationCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordLocation) location_; - } - return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); - } - } - /** - *
-     * Location within a row or record of a database table.
-     * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordLocation, com.google.privacy.dlp.v2.RecordLocation.Builder, com.google.privacy.dlp.v2.RecordLocationOrBuilder> - getRecordLocationFieldBuilder() { - if (recordLocationBuilder_ == null) { - if (!(locationCase_ == 2)) { - location_ = com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); - } - recordLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordLocation, com.google.privacy.dlp.v2.RecordLocation.Builder, com.google.privacy.dlp.v2.RecordLocationOrBuilder>( - (com.google.privacy.dlp.v2.RecordLocation) location_, - getParentForChildren(), - isClean()); - location_ = null; - } - locationCase_ = 2; - onChanged();; - return recordLocationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageLocation, com.google.privacy.dlp.v2.ImageLocation.Builder, com.google.privacy.dlp.v2.ImageLocationOrBuilder> imageLocationBuilder_; - /** - *
-     * Location within an image's pixels.
-     * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - * @return Whether the imageLocation field is set. - */ - @java.lang.Override - public boolean hasImageLocation() { - return locationCase_ == 3; - } - /** - *
-     * Location within an image's pixels.
-     * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - * @return The imageLocation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ImageLocation getImageLocation() { - if (imageLocationBuilder_ == null) { - if (locationCase_ == 3) { - return (com.google.privacy.dlp.v2.ImageLocation) location_; - } - return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); - } else { - if (locationCase_ == 3) { - return imageLocationBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); - } - } - /** - *
-     * Location within an image's pixels.
-     * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - */ - public Builder setImageLocation(com.google.privacy.dlp.v2.ImageLocation value) { - if (imageLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - imageLocationBuilder_.setMessage(value); - } - locationCase_ = 3; - return this; - } - /** - *
-     * Location within an image's pixels.
-     * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - */ - public Builder setImageLocation( - com.google.privacy.dlp.v2.ImageLocation.Builder builderForValue) { - if (imageLocationBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - imageLocationBuilder_.setMessage(builderForValue.build()); - } - locationCase_ = 3; - return this; - } - /** - *
-     * Location within an image's pixels.
-     * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - */ - public Builder mergeImageLocation(com.google.privacy.dlp.v2.ImageLocation value) { - if (imageLocationBuilder_ == null) { - if (locationCase_ == 3 && - location_ != com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance()) { - location_ = com.google.privacy.dlp.v2.ImageLocation.newBuilder((com.google.privacy.dlp.v2.ImageLocation) location_) - .mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - if (locationCase_ == 3) { - imageLocationBuilder_.mergeFrom(value); - } else { - imageLocationBuilder_.setMessage(value); - } - } - locationCase_ = 3; - return this; - } - /** - *
-     * Location within an image's pixels.
-     * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - */ - public Builder clearImageLocation() { - if (imageLocationBuilder_ == null) { - if (locationCase_ == 3) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - } else { - if (locationCase_ == 3) { - locationCase_ = 0; - location_ = null; - } - imageLocationBuilder_.clear(); - } - return this; - } - /** - *
-     * Location within an image's pixels.
-     * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - */ - public com.google.privacy.dlp.v2.ImageLocation.Builder getImageLocationBuilder() { - return getImageLocationFieldBuilder().getBuilder(); - } - /** - *
-     * Location within an image's pixels.
-     * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ImageLocationOrBuilder getImageLocationOrBuilder() { - if ((locationCase_ == 3) && (imageLocationBuilder_ != null)) { - return imageLocationBuilder_.getMessageOrBuilder(); - } else { - if (locationCase_ == 3) { - return (com.google.privacy.dlp.v2.ImageLocation) location_; - } - return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); - } - } - /** - *
-     * Location within an image's pixels.
-     * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageLocation, com.google.privacy.dlp.v2.ImageLocation.Builder, com.google.privacy.dlp.v2.ImageLocationOrBuilder> - getImageLocationFieldBuilder() { - if (imageLocationBuilder_ == null) { - if (!(locationCase_ == 3)) { - location_ = com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); - } - imageLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageLocation, com.google.privacy.dlp.v2.ImageLocation.Builder, com.google.privacy.dlp.v2.ImageLocationOrBuilder>( - (com.google.privacy.dlp.v2.ImageLocation) location_, - getParentForChildren(), - isClean()); - location_ = null; - } - locationCase_ = 3; - onChanged();; - return imageLocationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DocumentLocation, com.google.privacy.dlp.v2.DocumentLocation.Builder, com.google.privacy.dlp.v2.DocumentLocationOrBuilder> documentLocationBuilder_; - /** - *
-     * Location data for document files.
-     * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - * @return Whether the documentLocation field is set. - */ - @java.lang.Override - public boolean hasDocumentLocation() { - return locationCase_ == 5; - } - /** - *
-     * Location data for document files.
-     * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - * @return The documentLocation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DocumentLocation getDocumentLocation() { - if (documentLocationBuilder_ == null) { - if (locationCase_ == 5) { - return (com.google.privacy.dlp.v2.DocumentLocation) location_; - } - return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); - } else { - if (locationCase_ == 5) { - return documentLocationBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); - } - } - /** - *
-     * Location data for document files.
-     * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - */ - public Builder setDocumentLocation(com.google.privacy.dlp.v2.DocumentLocation value) { - if (documentLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - documentLocationBuilder_.setMessage(value); - } - locationCase_ = 5; - return this; - } - /** - *
-     * Location data for document files.
-     * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - */ - public Builder setDocumentLocation( - com.google.privacy.dlp.v2.DocumentLocation.Builder builderForValue) { - if (documentLocationBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - documentLocationBuilder_.setMessage(builderForValue.build()); - } - locationCase_ = 5; - return this; - } - /** - *
-     * Location data for document files.
-     * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - */ - public Builder mergeDocumentLocation(com.google.privacy.dlp.v2.DocumentLocation value) { - if (documentLocationBuilder_ == null) { - if (locationCase_ == 5 && - location_ != com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance()) { - location_ = com.google.privacy.dlp.v2.DocumentLocation.newBuilder((com.google.privacy.dlp.v2.DocumentLocation) location_) - .mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - if (locationCase_ == 5) { - documentLocationBuilder_.mergeFrom(value); - } else { - documentLocationBuilder_.setMessage(value); - } - } - locationCase_ = 5; - return this; - } - /** - *
-     * Location data for document files.
-     * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - */ - public Builder clearDocumentLocation() { - if (documentLocationBuilder_ == null) { - if (locationCase_ == 5) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - } else { - if (locationCase_ == 5) { - locationCase_ = 0; - location_ = null; - } - documentLocationBuilder_.clear(); - } - return this; - } - /** - *
-     * Location data for document files.
-     * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - */ - public com.google.privacy.dlp.v2.DocumentLocation.Builder getDocumentLocationBuilder() { - return getDocumentLocationFieldBuilder().getBuilder(); - } - /** - *
-     * Location data for document files.
-     * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DocumentLocationOrBuilder getDocumentLocationOrBuilder() { - if ((locationCase_ == 5) && (documentLocationBuilder_ != null)) { - return documentLocationBuilder_.getMessageOrBuilder(); - } else { - if (locationCase_ == 5) { - return (com.google.privacy.dlp.v2.DocumentLocation) location_; - } - return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); - } - } - /** - *
-     * Location data for document files.
-     * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DocumentLocation, com.google.privacy.dlp.v2.DocumentLocation.Builder, com.google.privacy.dlp.v2.DocumentLocationOrBuilder> - getDocumentLocationFieldBuilder() { - if (documentLocationBuilder_ == null) { - if (!(locationCase_ == 5)) { - location_ = com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); - } - documentLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DocumentLocation, com.google.privacy.dlp.v2.DocumentLocation.Builder, com.google.privacy.dlp.v2.DocumentLocationOrBuilder>( - (com.google.privacy.dlp.v2.DocumentLocation) location_, - getParentForChildren(), - isClean()); - location_ = null; - } - locationCase_ = 5; - onChanged();; - return documentLocationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.MetadataLocation, com.google.privacy.dlp.v2.MetadataLocation.Builder, com.google.privacy.dlp.v2.MetadataLocationOrBuilder> metadataLocationBuilder_; - /** - *
-     * Location within the metadata for inspected content.
-     * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - * @return Whether the metadataLocation field is set. - */ - @java.lang.Override - public boolean hasMetadataLocation() { - return locationCase_ == 8; - } - /** - *
-     * Location within the metadata for inspected content.
-     * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - * @return The metadataLocation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.MetadataLocation getMetadataLocation() { - if (metadataLocationBuilder_ == null) { - if (locationCase_ == 8) { - return (com.google.privacy.dlp.v2.MetadataLocation) location_; - } - return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); - } else { - if (locationCase_ == 8) { - return metadataLocationBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); - } - } - /** - *
-     * Location within the metadata for inspected content.
-     * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - */ - public Builder setMetadataLocation(com.google.privacy.dlp.v2.MetadataLocation value) { - if (metadataLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - metadataLocationBuilder_.setMessage(value); - } - locationCase_ = 8; - return this; - } - /** - *
-     * Location within the metadata for inspected content.
-     * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - */ - public Builder setMetadataLocation( - com.google.privacy.dlp.v2.MetadataLocation.Builder builderForValue) { - if (metadataLocationBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - metadataLocationBuilder_.setMessage(builderForValue.build()); - } - locationCase_ = 8; - return this; - } - /** - *
-     * Location within the metadata for inspected content.
-     * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - */ - public Builder mergeMetadataLocation(com.google.privacy.dlp.v2.MetadataLocation value) { - if (metadataLocationBuilder_ == null) { - if (locationCase_ == 8 && - location_ != com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance()) { - location_ = com.google.privacy.dlp.v2.MetadataLocation.newBuilder((com.google.privacy.dlp.v2.MetadataLocation) location_) - .mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - if (locationCase_ == 8) { - metadataLocationBuilder_.mergeFrom(value); - } else { - metadataLocationBuilder_.setMessage(value); - } - } - locationCase_ = 8; - return this; - } - /** - *
-     * Location within the metadata for inspected content.
-     * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - */ - public Builder clearMetadataLocation() { - if (metadataLocationBuilder_ == null) { - if (locationCase_ == 8) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - } else { - if (locationCase_ == 8) { - locationCase_ = 0; - location_ = null; - } - metadataLocationBuilder_.clear(); - } - return this; - } - /** - *
-     * Location within the metadata for inspected content.
-     * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - */ - public com.google.privacy.dlp.v2.MetadataLocation.Builder getMetadataLocationBuilder() { - return getMetadataLocationFieldBuilder().getBuilder(); - } - /** - *
-     * Location within the metadata for inspected content.
-     * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOrBuilder() { - if ((locationCase_ == 8) && (metadataLocationBuilder_ != null)) { - return metadataLocationBuilder_.getMessageOrBuilder(); - } else { - if (locationCase_ == 8) { - return (com.google.privacy.dlp.v2.MetadataLocation) location_; - } - return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); - } - } - /** - *
-     * Location within the metadata for inspected content.
-     * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.MetadataLocation, com.google.privacy.dlp.v2.MetadataLocation.Builder, com.google.privacy.dlp.v2.MetadataLocationOrBuilder> - getMetadataLocationFieldBuilder() { - if (metadataLocationBuilder_ == null) { - if (!(locationCase_ == 8)) { - location_ = com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); - } - metadataLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.MetadataLocation, com.google.privacy.dlp.v2.MetadataLocation.Builder, com.google.privacy.dlp.v2.MetadataLocationOrBuilder>( - (com.google.privacy.dlp.v2.MetadataLocation) location_, - getParentForChildren(), - isClean()); - location_ = null; - } - locationCase_ = 8; - onChanged();; - return metadataLocationBuilder_; - } - - private com.google.protobuf.Timestamp containerTimestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> containerTimestampBuilder_; - /** - *
-     * Finding container modification timestamp, if applicable. For Cloud Storage,
-     * this field contains the last file modification timestamp. For a BigQuery
-     * table, this field contains the last_modified_time property. For Datastore,
-     * this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - * @return Whether the containerTimestamp field is set. - */ - public boolean hasContainerTimestamp() { - return containerTimestampBuilder_ != null || containerTimestamp_ != null; - } - /** - *
-     * Finding container modification timestamp, if applicable. For Cloud Storage,
-     * this field contains the last file modification timestamp. For a BigQuery
-     * table, this field contains the last_modified_time property. For Datastore,
-     * this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - * @return The containerTimestamp. - */ - public com.google.protobuf.Timestamp getContainerTimestamp() { - if (containerTimestampBuilder_ == null) { - return containerTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; - } else { - return containerTimestampBuilder_.getMessage(); - } - } - /** - *
-     * Finding container modification timestamp, if applicable. For Cloud Storage,
-     * this field contains the last file modification timestamp. For a BigQuery
-     * table, this field contains the last_modified_time property. For Datastore,
-     * this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - */ - public Builder setContainerTimestamp(com.google.protobuf.Timestamp value) { - if (containerTimestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - containerTimestamp_ = value; - onChanged(); - } else { - containerTimestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Finding container modification timestamp, if applicable. For Cloud Storage,
-     * this field contains the last file modification timestamp. For a BigQuery
-     * table, this field contains the last_modified_time property. For Datastore,
-     * this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - */ - public Builder setContainerTimestamp( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (containerTimestampBuilder_ == null) { - containerTimestamp_ = builderForValue.build(); - onChanged(); - } else { - containerTimestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Finding container modification timestamp, if applicable. For Cloud Storage,
-     * this field contains the last file modification timestamp. For a BigQuery
-     * table, this field contains the last_modified_time property. For Datastore,
-     * this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - */ - public Builder mergeContainerTimestamp(com.google.protobuf.Timestamp value) { - if (containerTimestampBuilder_ == null) { - if (containerTimestamp_ != null) { - containerTimestamp_ = - com.google.protobuf.Timestamp.newBuilder(containerTimestamp_).mergeFrom(value).buildPartial(); - } else { - containerTimestamp_ = value; - } - onChanged(); - } else { - containerTimestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Finding container modification timestamp, if applicable. For Cloud Storage,
-     * this field contains the last file modification timestamp. For a BigQuery
-     * table, this field contains the last_modified_time property. For Datastore,
-     * this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - */ - public Builder clearContainerTimestamp() { - if (containerTimestampBuilder_ == null) { - containerTimestamp_ = null; - onChanged(); - } else { - containerTimestamp_ = null; - containerTimestampBuilder_ = null; - } - - return this; - } - /** - *
-     * Finding container modification timestamp, if applicable. For Cloud Storage,
-     * this field contains the last file modification timestamp. For a BigQuery
-     * table, this field contains the last_modified_time property. For Datastore,
-     * this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - */ - public com.google.protobuf.Timestamp.Builder getContainerTimestampBuilder() { - - onChanged(); - return getContainerTimestampFieldBuilder().getBuilder(); - } - /** - *
-     * Finding container modification timestamp, if applicable. For Cloud Storage,
-     * this field contains the last file modification timestamp. For a BigQuery
-     * table, this field contains the last_modified_time property. For Datastore,
-     * this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - */ - public com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder() { - if (containerTimestampBuilder_ != null) { - return containerTimestampBuilder_.getMessageOrBuilder(); - } else { - return containerTimestamp_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : containerTimestamp_; - } - } - /** - *
-     * Finding container modification timestamp, if applicable. For Cloud Storage,
-     * this field contains the last file modification timestamp. For a BigQuery
-     * table, this field contains the last_modified_time property. For Datastore,
-     * this field isn't populated.
-     * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getContainerTimestampFieldBuilder() { - if (containerTimestampBuilder_ == null) { - containerTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getContainerTimestamp(), - getParentForChildren(), - isClean()); - containerTimestamp_ = null; - } - return containerTimestampBuilder_; - } - - private java.lang.Object containerVersion_ = ""; - /** - *
-     * Finding container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string container_version = 7; - * @return The containerVersion. - */ - public java.lang.String getContainerVersion() { - java.lang.Object ref = containerVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - containerVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Finding container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string container_version = 7; - * @return The bytes for containerVersion. - */ - public com.google.protobuf.ByteString - getContainerVersionBytes() { - java.lang.Object ref = containerVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - containerVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Finding container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string container_version = 7; - * @param value The containerVersion to set. - * @return This builder for chaining. - */ - public Builder setContainerVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - containerVersion_ = value; - onChanged(); - return this; - } - /** - *
-     * Finding container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string container_version = 7; - * @return This builder for chaining. - */ - public Builder clearContainerVersion() { - - containerVersion_ = getDefaultInstance().getContainerVersion(); - onChanged(); - return this; - } - /** - *
-     * Finding container version, if available
-     * ("generation" for Cloud Storage).
-     * 
- * - * string container_version = 7; - * @param value The bytes for containerVersion to set. - * @return This builder for chaining. - */ - public Builder setContainerVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - containerVersion_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ContentLocation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ContentLocation) - private static final com.google.privacy.dlp.v2.ContentLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ContentLocation(); - } - - public static com.google.privacy.dlp.v2.ContentLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ContentLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ContentLocation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ContentLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java deleted file mode 100644 index 7516580a2572..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentLocationOrBuilder.java +++ /dev/null @@ -1,211 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ContentLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ContentLocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Name of the container where the finding is located.
-   * The top level name is the source file name or table name. Names of some
-   * common storage containers are formatted as follows:
-   * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
-   * * Cloud Storage files: `gs://{bucket}/{path}`
-   * * Datastore namespace: {namespace}
-   * Nested names could be absent if the embedded object has no string
-   * identifier (for example, an image contained within a document).
-   * 
- * - * string container_name = 1; - * @return The containerName. - */ - java.lang.String getContainerName(); - /** - *
-   * Name of the container where the finding is located.
-   * The top level name is the source file name or table name. Names of some
-   * common storage containers are formatted as follows:
-   * * BigQuery tables:  `{project_id}:{dataset_id}.{table_id}`
-   * * Cloud Storage files: `gs://{bucket}/{path}`
-   * * Datastore namespace: {namespace}
-   * Nested names could be absent if the embedded object has no string
-   * identifier (for example, an image contained within a document).
-   * 
- * - * string container_name = 1; - * @return The bytes for containerName. - */ - com.google.protobuf.ByteString - getContainerNameBytes(); - - /** - *
-   * Location within a row or record of a database table.
-   * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - * @return Whether the recordLocation field is set. - */ - boolean hasRecordLocation(); - /** - *
-   * Location within a row or record of a database table.
-   * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - * @return The recordLocation. - */ - com.google.privacy.dlp.v2.RecordLocation getRecordLocation(); - /** - *
-   * Location within a row or record of a database table.
-   * 
- * - * .google.privacy.dlp.v2.RecordLocation record_location = 2; - */ - com.google.privacy.dlp.v2.RecordLocationOrBuilder getRecordLocationOrBuilder(); - - /** - *
-   * Location within an image's pixels.
-   * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - * @return Whether the imageLocation field is set. - */ - boolean hasImageLocation(); - /** - *
-   * Location within an image's pixels.
-   * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - * @return The imageLocation. - */ - com.google.privacy.dlp.v2.ImageLocation getImageLocation(); - /** - *
-   * Location within an image's pixels.
-   * 
- * - * .google.privacy.dlp.v2.ImageLocation image_location = 3; - */ - com.google.privacy.dlp.v2.ImageLocationOrBuilder getImageLocationOrBuilder(); - - /** - *
-   * Location data for document files.
-   * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - * @return Whether the documentLocation field is set. - */ - boolean hasDocumentLocation(); - /** - *
-   * Location data for document files.
-   * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - * @return The documentLocation. - */ - com.google.privacy.dlp.v2.DocumentLocation getDocumentLocation(); - /** - *
-   * Location data for document files.
-   * 
- * - * .google.privacy.dlp.v2.DocumentLocation document_location = 5; - */ - com.google.privacy.dlp.v2.DocumentLocationOrBuilder getDocumentLocationOrBuilder(); - - /** - *
-   * Location within the metadata for inspected content.
-   * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - * @return Whether the metadataLocation field is set. - */ - boolean hasMetadataLocation(); - /** - *
-   * Location within the metadata for inspected content.
-   * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - * @return The metadataLocation. - */ - com.google.privacy.dlp.v2.MetadataLocation getMetadataLocation(); - /** - *
-   * Location within the metadata for inspected content.
-   * 
- * - * .google.privacy.dlp.v2.MetadataLocation metadata_location = 8; - */ - com.google.privacy.dlp.v2.MetadataLocationOrBuilder getMetadataLocationOrBuilder(); - - /** - *
-   * Finding container modification timestamp, if applicable. For Cloud Storage,
-   * this field contains the last file modification timestamp. For a BigQuery
-   * table, this field contains the last_modified_time property. For Datastore,
-   * this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - * @return Whether the containerTimestamp field is set. - */ - boolean hasContainerTimestamp(); - /** - *
-   * Finding container modification timestamp, if applicable. For Cloud Storage,
-   * this field contains the last file modification timestamp. For a BigQuery
-   * table, this field contains the last_modified_time property. For Datastore,
-   * this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - * @return The containerTimestamp. - */ - com.google.protobuf.Timestamp getContainerTimestamp(); - /** - *
-   * Finding container modification timestamp, if applicable. For Cloud Storage,
-   * this field contains the last file modification timestamp. For a BigQuery
-   * table, this field contains the last_modified_time property. For Datastore,
-   * this field isn't populated.
-   * 
- * - * .google.protobuf.Timestamp container_timestamp = 6; - */ - com.google.protobuf.TimestampOrBuilder getContainerTimestampOrBuilder(); - - /** - *
-   * Finding container version, if available
-   * ("generation" for Cloud Storage).
-   * 
- * - * string container_version = 7; - * @return The containerVersion. - */ - java.lang.String getContainerVersion(); - /** - *
-   * Finding container version, if available
-   * ("generation" for Cloud Storage).
-   * 
- * - * string container_version = 7; - * @return The bytes for containerVersion. - */ - com.google.protobuf.ByteString - getContainerVersionBytes(); - - public com.google.privacy.dlp.v2.ContentLocation.LocationCase getLocationCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java deleted file mode 100644 index c6a8b7f541c5..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentOption.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Deprecated and unused.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.ContentOption} - */ -public enum ContentOption - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Includes entire content of a file or a data stream.
-   * 
- * - * CONTENT_UNSPECIFIED = 0; - */ - CONTENT_UNSPECIFIED(0), - /** - *
-   * Text content within the data, excluding any metadata.
-   * 
- * - * CONTENT_TEXT = 1; - */ - CONTENT_TEXT(1), - /** - *
-   * Images found in the data.
-   * 
- * - * CONTENT_IMAGE = 2; - */ - CONTENT_IMAGE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Includes entire content of a file or a data stream.
-   * 
- * - * CONTENT_UNSPECIFIED = 0; - */ - public static final int CONTENT_UNSPECIFIED_VALUE = 0; - /** - *
-   * Text content within the data, excluding any metadata.
-   * 
- * - * CONTENT_TEXT = 1; - */ - public static final int CONTENT_TEXT_VALUE = 1; - /** - *
-   * Images found in the data.
-   * 
- * - * CONTENT_IMAGE = 2; - */ - public static final int CONTENT_IMAGE_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContentOption valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ContentOption forNumber(int value) { - switch (value) { - case 0: return CONTENT_UNSPECIFIED; - case 1: return CONTENT_TEXT; - case 2: return CONTENT_IMAGE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ContentOption> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ContentOption findValueByNumber(int number) { - return ContentOption.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(5); - } - - private static final ContentOption[] VALUES = values(); - - public static ContentOption valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ContentOption(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.ContentOption) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java deleted file mode 100644 index fcb273fc0265..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequest.java +++ /dev/null @@ -1,1289 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for CreateDeidentifyTemplate.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} - */ -public final class CreateDeidentifyTemplateRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) - CreateDeidentifyTemplateRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateDeidentifyTemplateRequest.newBuilder() to construct. - private CreateDeidentifyTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateDeidentifyTemplateRequest() { - parent_ = ""; - templateId_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateDeidentifyTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateDeidentifyTemplateRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.DeidentifyTemplate.Builder subBuilder = null; - if (deidentifyTemplate_ != null) { - subBuilder = deidentifyTemplate_.toBuilder(); - } - deidentifyTemplate_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deidentifyTemplate_); - deidentifyTemplate_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - templateId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEIDENTIFY_TEMPLATE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.DeidentifyTemplate deidentifyTemplate_; - /** - *
-   * Required. The DeidentifyTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the deidentifyTemplate field is set. - */ - @java.lang.Override - public boolean hasDeidentifyTemplate() { - return deidentifyTemplate_ != null; - } - /** - *
-   * Required. The DeidentifyTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The deidentifyTemplate. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate() { - return deidentifyTemplate_ == null ? com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; - } - /** - *
-   * Required. The DeidentifyTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder() { - return getDeidentifyTemplate(); - } - - public static final int TEMPLATE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object templateId_; - /** - *
-   * The template id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string template_id = 3; - * @return The templateId. - */ - @java.lang.Override - public java.lang.String getTemplateId() { - java.lang.Object ref = templateId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - templateId_ = s; - return s; - } - } - /** - *
-   * The template id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string template_id = 3; - * @return The bytes for templateId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTemplateIdBytes() { - java.lang.Object ref = templateId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - templateId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (deidentifyTemplate_ != null) { - output.writeMessage(2, getDeidentifyTemplate()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, templateId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (deidentifyTemplate_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDeidentifyTemplate()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, templateId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest other = (com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasDeidentifyTemplate() != other.hasDeidentifyTemplate()) return false; - if (hasDeidentifyTemplate()) { - if (!getDeidentifyTemplate() - .equals(other.getDeidentifyTemplate())) return false; - } - if (!getTemplateId() - .equals(other.getTemplateId())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasDeidentifyTemplate()) { - hash = (37 * hash) + DEIDENTIFY_TEMPLATE_FIELD_NUMBER; - hash = (53 * hash) + getDeidentifyTemplate().hashCode(); - } - hash = (37 * hash) + TEMPLATE_ID_FIELD_NUMBER; - hash = (53 * hash) + getTemplateId().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateDeidentifyTemplate.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (deidentifyTemplateBuilder_ == null) { - deidentifyTemplate_ = null; - } else { - deidentifyTemplate_ = null; - deidentifyTemplateBuilder_ = null; - } - templateId_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest build() { - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest buildPartial() { - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest result = new com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(this); - result.parent_ = parent_; - if (deidentifyTemplateBuilder_ == null) { - result.deidentifyTemplate_ = deidentifyTemplate_; - } else { - result.deidentifyTemplate_ = deidentifyTemplateBuilder_.build(); - } - result.templateId_ = templateId_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) { - return mergeFrom((com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest other) { - if (other == com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasDeidentifyTemplate()) { - mergeDeidentifyTemplate(other.getDeidentifyTemplate()); - } - if (!other.getTemplateId().isEmpty()) { - templateId_ = other.templateId_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.DeidentifyTemplate deidentifyTemplate_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> deidentifyTemplateBuilder_; - /** - *
-     * Required. The DeidentifyTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the deidentifyTemplate field is set. - */ - public boolean hasDeidentifyTemplate() { - return deidentifyTemplateBuilder_ != null || deidentifyTemplate_ != null; - } - /** - *
-     * Required. The DeidentifyTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The deidentifyTemplate. - */ - public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate() { - if (deidentifyTemplateBuilder_ == null) { - return deidentifyTemplate_ == null ? com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; - } else { - return deidentifyTemplateBuilder_.getMessage(); - } - } - /** - *
-     * Required. The DeidentifyTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate value) { - if (deidentifyTemplateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deidentifyTemplate_ = value; - onChanged(); - } else { - deidentifyTemplateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The DeidentifyTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setDeidentifyTemplate( - com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { - if (deidentifyTemplateBuilder_ == null) { - deidentifyTemplate_ = builderForValue.build(); - onChanged(); - } else { - deidentifyTemplateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The DeidentifyTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate value) { - if (deidentifyTemplateBuilder_ == null) { - if (deidentifyTemplate_ != null) { - deidentifyTemplate_ = - com.google.privacy.dlp.v2.DeidentifyTemplate.newBuilder(deidentifyTemplate_).mergeFrom(value).buildPartial(); - } else { - deidentifyTemplate_ = value; - } - onChanged(); - } else { - deidentifyTemplateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The DeidentifyTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearDeidentifyTemplate() { - if (deidentifyTemplateBuilder_ == null) { - deidentifyTemplate_ = null; - onChanged(); - } else { - deidentifyTemplate_ = null; - deidentifyTemplateBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The DeidentifyTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder getDeidentifyTemplateBuilder() { - - onChanged(); - return getDeidentifyTemplateFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The DeidentifyTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder() { - if (deidentifyTemplateBuilder_ != null) { - return deidentifyTemplateBuilder_.getMessageOrBuilder(); - } else { - return deidentifyTemplate_ == null ? - com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; - } - } - /** - *
-     * Required. The DeidentifyTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> - getDeidentifyTemplateFieldBuilder() { - if (deidentifyTemplateBuilder_ == null) { - deidentifyTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder>( - getDeidentifyTemplate(), - getParentForChildren(), - isClean()); - deidentifyTemplate_ = null; - } - return deidentifyTemplateBuilder_; - } - - private java.lang.Object templateId_ = ""; - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @return The templateId. - */ - public java.lang.String getTemplateId() { - java.lang.Object ref = templateId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - templateId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @return The bytes for templateId. - */ - public com.google.protobuf.ByteString - getTemplateIdBytes() { - java.lang.Object ref = templateId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - templateId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @param value The templateId to set. - * @return This builder for chaining. - */ - public Builder setTemplateId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - templateId_ = value; - onChanged(); - return this; - } - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @return This builder for chaining. - */ - public Builder clearTemplateId() { - - templateId_ = getDefaultInstance().getTemplateId(); - onChanged(); - return this; - } - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @param value The bytes for templateId to set. - * @return This builder for chaining. - */ - public Builder setTemplateIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - templateId_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) - private static final com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(); - } - - public static com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateDeidentifyTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateDeidentifyTemplateRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java deleted file mode 100644 index 1aa65a923edd..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDeidentifyTemplateRequestOrBuilder.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CreateDeidentifyTemplateRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The DeidentifyTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the deidentifyTemplate field is set. - */ - boolean hasDeidentifyTemplate(); - /** - *
-   * Required. The DeidentifyTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The deidentifyTemplate. - */ - com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate(); - /** - *
-   * Required. The DeidentifyTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder(); - - /** - *
-   * The template id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string template_id = 3; - * @return The templateId. - */ - java.lang.String getTemplateId(); - /** - *
-   * The template id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string template_id = 3; - * @return The bytes for templateId. - */ - com.google.protobuf.ByteString - getTemplateIdBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java deleted file mode 100644 index 4cc05576f3a9..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequest.java +++ /dev/null @@ -1,1636 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for CreateDlpJobRequest. Used to initiate long running
- * jobs such as calculating risk metrics or inspecting Google Cloud
- * Storage.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateDlpJobRequest} - */ -public final class CreateDlpJobRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateDlpJobRequest) - CreateDlpJobRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateDlpJobRequest.newBuilder() to construct. - private CreateDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateDlpJobRequest() { - parent_ = ""; - jobId_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateDlpJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateDlpJobRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.InspectJobConfig.Builder subBuilder = null; - if (jobCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.InspectJobConfig) job_).toBuilder(); - } - job_ = - input.readMessage(com.google.privacy.dlp.v2.InspectJobConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.InspectJobConfig) job_); - job_ = subBuilder.buildPartial(); - } - jobCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder subBuilder = null; - if (jobCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_).toBuilder(); - } - job_ = - input.readMessage(com.google.privacy.dlp.v2.RiskAnalysisJobConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_); - job_ = subBuilder.buildPartial(); - } - jobCase_ = 3; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - jobId_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateDlpJobRequest.class, com.google.privacy.dlp.v2.CreateDlpJobRequest.Builder.class); - } - - private int jobCase_ = 0; - private java.lang.Object job_; - public enum JobCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INSPECT_JOB(2), - RISK_JOB(3), - JOB_NOT_SET(0); - private final int value; - private JobCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static JobCase valueOf(int value) { - return forNumber(value); - } - - public static JobCase forNumber(int value) { - switch (value) { - case 2: return INSPECT_JOB; - case 3: return RISK_JOB; - case 0: return JOB_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public JobCase - getJobCase() { - return JobCase.forNumber( - jobCase_); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSPECT_JOB_FIELD_NUMBER = 2; - /** - *
-   * An inspection job scans a storage repository for InfoTypes.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - * @return Whether the inspectJob field is set. - */ - @java.lang.Override - public boolean hasInspectJob() { - return jobCase_ == 2; - } - /** - *
-   * An inspection job scans a storage repository for InfoTypes.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - * @return The inspectJob. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() { - if (jobCase_ == 2) { - return (com.google.privacy.dlp.v2.InspectJobConfig) job_; - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - /** - *
-   * An inspection job scans a storage repository for InfoTypes.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() { - if (jobCase_ == 2) { - return (com.google.privacy.dlp.v2.InspectJobConfig) job_; - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - - public static final int RISK_JOB_FIELD_NUMBER = 3; - /** - *
-   * A risk analysis job calculates re-identification risk metrics for a
-   * BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - * @return Whether the riskJob field is set. - */ - @java.lang.Override - public boolean hasRiskJob() { - return jobCase_ == 3; - } - /** - *
-   * A risk analysis job calculates re-identification risk metrics for a
-   * BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - * @return The riskJob. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getRiskJob() { - if (jobCase_ == 3) { - return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_; - } - return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); - } - /** - *
-   * A risk analysis job calculates re-identification risk metrics for a
-   * BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getRiskJobOrBuilder() { - if (jobCase_ == 3) { - return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_; - } - return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); - } - - public static final int JOB_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object jobId_; - /** - *
-   * The job id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string job_id = 4; - * @return The jobId. - */ - @java.lang.Override - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } - } - /** - *
-   * The job id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string job_id = 4; - * @return The bytes for jobId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (jobCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.InspectJobConfig) job_); - } - if (jobCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jobId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (jobCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.InspectJobConfig) job_); - } - if (jobCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, jobId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CreateDlpJobRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CreateDlpJobRequest other = (com.google.privacy.dlp.v2.CreateDlpJobRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getJobId() - .equals(other.getJobId())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!getJobCase().equals(other.getJobCase())) return false; - switch (jobCase_) { - case 2: - if (!getInspectJob() - .equals(other.getInspectJob())) return false; - break; - case 3: - if (!getRiskJob() - .equals(other.getRiskJob())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + JOB_ID_FIELD_NUMBER; - hash = (53 * hash) + getJobId().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - switch (jobCase_) { - case 2: - hash = (37 * hash) + INSPECT_JOB_FIELD_NUMBER; - hash = (53 * hash) + getInspectJob().hashCode(); - break; - case 3: - hash = (37 * hash) + RISK_JOB_FIELD_NUMBER; - hash = (53 * hash) + getRiskJob().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CreateDlpJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateDlpJobRequest. Used to initiate long running
-   * jobs such as calculating risk metrics or inspecting Google Cloud
-   * Storage.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateDlpJobRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateDlpJobRequest) - com.google.privacy.dlp.v2.CreateDlpJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateDlpJobRequest.class, com.google.privacy.dlp.v2.CreateDlpJobRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CreateDlpJobRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - jobId_ = ""; - - locationId_ = ""; - - jobCase_ = 0; - job_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateDlpJobRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CreateDlpJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateDlpJobRequest build() { - com.google.privacy.dlp.v2.CreateDlpJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateDlpJobRequest buildPartial() { - com.google.privacy.dlp.v2.CreateDlpJobRequest result = new com.google.privacy.dlp.v2.CreateDlpJobRequest(this); - result.parent_ = parent_; - if (jobCase_ == 2) { - if (inspectJobBuilder_ == null) { - result.job_ = job_; - } else { - result.job_ = inspectJobBuilder_.build(); - } - } - if (jobCase_ == 3) { - if (riskJobBuilder_ == null) { - result.job_ = job_; - } else { - result.job_ = riskJobBuilder_.build(); - } - } - result.jobId_ = jobId_; - result.locationId_ = locationId_; - result.jobCase_ = jobCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CreateDlpJobRequest) { - return mergeFrom((com.google.privacy.dlp.v2.CreateDlpJobRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CreateDlpJobRequest other) { - if (other == com.google.privacy.dlp.v2.CreateDlpJobRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getJobId().isEmpty()) { - jobId_ = other.jobId_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - switch (other.getJobCase()) { - case INSPECT_JOB: { - mergeInspectJob(other.getInspectJob()); - break; - } - case RISK_JOB: { - mergeRiskJob(other.getRiskJob()); - break; - } - case JOB_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CreateDlpJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CreateDlpJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int jobCase_ = 0; - private java.lang.Object job_; - public JobCase - getJobCase() { - return JobCase.forNumber( - jobCase_); - } - - public Builder clearJob() { - jobCase_ = 0; - job_ = null; - onChanged(); - return this; - } - - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> inspectJobBuilder_; - /** - *
-     * An inspection job scans a storage repository for InfoTypes.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - * @return Whether the inspectJob field is set. - */ - @java.lang.Override - public boolean hasInspectJob() { - return jobCase_ == 2; - } - /** - *
-     * An inspection job scans a storage repository for InfoTypes.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - * @return The inspectJob. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() { - if (inspectJobBuilder_ == null) { - if (jobCase_ == 2) { - return (com.google.privacy.dlp.v2.InspectJobConfig) job_; - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } else { - if (jobCase_ == 2) { - return inspectJobBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - } - /** - *
-     * An inspection job scans a storage repository for InfoTypes.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - */ - public Builder setInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) { - if (inspectJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - job_ = value; - onChanged(); - } else { - inspectJobBuilder_.setMessage(value); - } - jobCase_ = 2; - return this; - } - /** - *
-     * An inspection job scans a storage repository for InfoTypes.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - */ - public Builder setInspectJob( - com.google.privacy.dlp.v2.InspectJobConfig.Builder builderForValue) { - if (inspectJobBuilder_ == null) { - job_ = builderForValue.build(); - onChanged(); - } else { - inspectJobBuilder_.setMessage(builderForValue.build()); - } - jobCase_ = 2; - return this; - } - /** - *
-     * An inspection job scans a storage repository for InfoTypes.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - */ - public Builder mergeInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) { - if (inspectJobBuilder_ == null) { - if (jobCase_ == 2 && - job_ != com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance()) { - job_ = com.google.privacy.dlp.v2.InspectJobConfig.newBuilder((com.google.privacy.dlp.v2.InspectJobConfig) job_) - .mergeFrom(value).buildPartial(); - } else { - job_ = value; - } - onChanged(); - } else { - if (jobCase_ == 2) { - inspectJobBuilder_.mergeFrom(value); - } else { - inspectJobBuilder_.setMessage(value); - } - } - jobCase_ = 2; - return this; - } - /** - *
-     * An inspection job scans a storage repository for InfoTypes.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - */ - public Builder clearInspectJob() { - if (inspectJobBuilder_ == null) { - if (jobCase_ == 2) { - jobCase_ = 0; - job_ = null; - onChanged(); - } - } else { - if (jobCase_ == 2) { - jobCase_ = 0; - job_ = null; - } - inspectJobBuilder_.clear(); - } - return this; - } - /** - *
-     * An inspection job scans a storage repository for InfoTypes.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - */ - public com.google.privacy.dlp.v2.InspectJobConfig.Builder getInspectJobBuilder() { - return getInspectJobFieldBuilder().getBuilder(); - } - /** - *
-     * An inspection job scans a storage repository for InfoTypes.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() { - if ((jobCase_ == 2) && (inspectJobBuilder_ != null)) { - return inspectJobBuilder_.getMessageOrBuilder(); - } else { - if (jobCase_ == 2) { - return (com.google.privacy.dlp.v2.InspectJobConfig) job_; - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - } - /** - *
-     * An inspection job scans a storage repository for InfoTypes.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> - getInspectJobFieldBuilder() { - if (inspectJobBuilder_ == null) { - if (!(jobCase_ == 2)) { - job_ = com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - inspectJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder>( - (com.google.privacy.dlp.v2.InspectJobConfig) job_, - getParentForChildren(), - isClean()); - job_ = null; - } - jobCase_ = 2; - onChanged();; - return inspectJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> riskJobBuilder_; - /** - *
-     * A risk analysis job calculates re-identification risk metrics for a
-     * BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - * @return Whether the riskJob field is set. - */ - @java.lang.Override - public boolean hasRiskJob() { - return jobCase_ == 3; - } - /** - *
-     * A risk analysis job calculates re-identification risk metrics for a
-     * BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - * @return The riskJob. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getRiskJob() { - if (riskJobBuilder_ == null) { - if (jobCase_ == 3) { - return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_; - } - return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); - } else { - if (jobCase_ == 3) { - return riskJobBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); - } - } - /** - *
-     * A risk analysis job calculates re-identification risk metrics for a
-     * BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - */ - public Builder setRiskJob(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) { - if (riskJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - job_ = value; - onChanged(); - } else { - riskJobBuilder_.setMessage(value); - } - jobCase_ = 3; - return this; - } - /** - *
-     * A risk analysis job calculates re-identification risk metrics for a
-     * BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - */ - public Builder setRiskJob( - com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder builderForValue) { - if (riskJobBuilder_ == null) { - job_ = builderForValue.build(); - onChanged(); - } else { - riskJobBuilder_.setMessage(builderForValue.build()); - } - jobCase_ = 3; - return this; - } - /** - *
-     * A risk analysis job calculates re-identification risk metrics for a
-     * BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - */ - public Builder mergeRiskJob(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) { - if (riskJobBuilder_ == null) { - if (jobCase_ == 3 && - job_ != com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance()) { - job_ = com.google.privacy.dlp.v2.RiskAnalysisJobConfig.newBuilder((com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_) - .mergeFrom(value).buildPartial(); - } else { - job_ = value; - } - onChanged(); - } else { - if (jobCase_ == 3) { - riskJobBuilder_.mergeFrom(value); - } else { - riskJobBuilder_.setMessage(value); - } - } - jobCase_ = 3; - return this; - } - /** - *
-     * A risk analysis job calculates re-identification risk metrics for a
-     * BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - */ - public Builder clearRiskJob() { - if (riskJobBuilder_ == null) { - if (jobCase_ == 3) { - jobCase_ = 0; - job_ = null; - onChanged(); - } - } else { - if (jobCase_ == 3) { - jobCase_ = 0; - job_ = null; - } - riskJobBuilder_.clear(); - } - return this; - } - /** - *
-     * A risk analysis job calculates re-identification risk metrics for a
-     * BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - */ - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder getRiskJobBuilder() { - return getRiskJobFieldBuilder().getBuilder(); - } - /** - *
-     * A risk analysis job calculates re-identification risk metrics for a
-     * BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getRiskJobOrBuilder() { - if ((jobCase_ == 3) && (riskJobBuilder_ != null)) { - return riskJobBuilder_.getMessageOrBuilder(); - } else { - if (jobCase_ == 3) { - return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_; - } - return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); - } - } - /** - *
-     * A risk analysis job calculates re-identification risk metrics for a
-     * BigQuery table.
-     * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> - getRiskJobFieldBuilder() { - if (riskJobBuilder_ == null) { - if (!(jobCase_ == 3)) { - job_ = com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); - } - riskJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder>( - (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_, - getParentForChildren(), - isClean()); - job_ = null; - } - jobCase_ = 3; - onChanged();; - return riskJobBuilder_; - } - - private java.lang.Object jobId_ = ""; - /** - *
-     * The job id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string job_id = 4; - * @return The jobId. - */ - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The job id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string job_id = 4; - * @return The bytes for jobId. - */ - public com.google.protobuf.ByteString - getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The job id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string job_id = 4; - * @param value The jobId to set. - * @return This builder for chaining. - */ - public Builder setJobId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobId_ = value; - onChanged(); - return this; - } - /** - *
-     * The job id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string job_id = 4; - * @return This builder for chaining. - */ - public Builder clearJobId() { - - jobId_ = getDefaultInstance().getJobId(); - onChanged(); - return this; - } - /** - *
-     * The job id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string job_id = 4; - * @param value The bytes for jobId to set. - * @return This builder for chaining. - */ - public Builder setJobIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobId_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateDlpJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateDlpJobRequest) - private static final com.google.privacy.dlp.v2.CreateDlpJobRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateDlpJobRequest(); - } - - public static com.google.privacy.dlp.v2.CreateDlpJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateDlpJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateDlpJobRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateDlpJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java deleted file mode 100644 index 11637913266b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateDlpJobRequestOrBuilder.java +++ /dev/null @@ -1,156 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CreateDlpJobRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateDlpJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * An inspection job scans a storage repository for InfoTypes.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - * @return Whether the inspectJob field is set. - */ - boolean hasInspectJob(); - /** - *
-   * An inspection job scans a storage repository for InfoTypes.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - * @return The inspectJob. - */ - com.google.privacy.dlp.v2.InspectJobConfig getInspectJob(); - /** - *
-   * An inspection job scans a storage repository for InfoTypes.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 2; - */ - com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder(); - - /** - *
-   * A risk analysis job calculates re-identification risk metrics for a
-   * BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - * @return Whether the riskJob field is set. - */ - boolean hasRiskJob(); - /** - *
-   * A risk analysis job calculates re-identification risk metrics for a
-   * BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - * @return The riskJob. - */ - com.google.privacy.dlp.v2.RiskAnalysisJobConfig getRiskJob(); - /** - *
-   * A risk analysis job calculates re-identification risk metrics for a
-   * BigQuery table.
-   * 
- * - * .google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3; - */ - com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getRiskJobOrBuilder(); - - /** - *
-   * The job id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string job_id = 4; - * @return The jobId. - */ - java.lang.String getJobId(); - /** - *
-   * The job id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string job_id = 4; - * @return The bytes for jobId. - */ - com.google.protobuf.ByteString - getJobIdBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); - - public com.google.privacy.dlp.v2.CreateDlpJobRequest.JobCase getJobCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java deleted file mode 100644 index 42ae2412d437..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequest.java +++ /dev/null @@ -1,1289 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for CreateInspectTemplate.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateInspectTemplateRequest} - */ -public final class CreateInspectTemplateRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateInspectTemplateRequest) - CreateInspectTemplateRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateInspectTemplateRequest.newBuilder() to construct. - private CreateInspectTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateInspectTemplateRequest() { - parent_ = ""; - templateId_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateInspectTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateInspectTemplateRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.InspectTemplate.Builder subBuilder = null; - if (inspectTemplate_ != null) { - subBuilder = inspectTemplate_.toBuilder(); - } - inspectTemplate_ = input.readMessage(com.google.privacy.dlp.v2.InspectTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectTemplate_); - inspectTemplate_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - templateId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateInspectTemplateRequest.class, com.google.privacy.dlp.v2.CreateInspectTemplateRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSPECT_TEMPLATE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.InspectTemplate inspectTemplate_; - /** - *
-   * Required. The InspectTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inspectTemplate field is set. - */ - @java.lang.Override - public boolean hasInspectTemplate() { - return inspectTemplate_ != null; - } - /** - *
-   * Required. The InspectTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inspectTemplate. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate() { - return inspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; - } - /** - *
-   * Required. The InspectTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder() { - return getInspectTemplate(); - } - - public static final int TEMPLATE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object templateId_; - /** - *
-   * The template id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string template_id = 3; - * @return The templateId. - */ - @java.lang.Override - public java.lang.String getTemplateId() { - java.lang.Object ref = templateId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - templateId_ = s; - return s; - } - } - /** - *
-   * The template id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string template_id = 3; - * @return The bytes for templateId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTemplateIdBytes() { - java.lang.Object ref = templateId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - templateId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (inspectTemplate_ != null) { - output.writeMessage(2, getInspectTemplate()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, templateId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (inspectTemplate_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInspectTemplate()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, templateId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CreateInspectTemplateRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CreateInspectTemplateRequest other = (com.google.privacy.dlp.v2.CreateInspectTemplateRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasInspectTemplate() != other.hasInspectTemplate()) return false; - if (hasInspectTemplate()) { - if (!getInspectTemplate() - .equals(other.getInspectTemplate())) return false; - } - if (!getTemplateId() - .equals(other.getTemplateId())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasInspectTemplate()) { - hash = (37 * hash) + INSPECT_TEMPLATE_FIELD_NUMBER; - hash = (53 * hash) + getInspectTemplate().hashCode(); - } - hash = (37 * hash) + TEMPLATE_ID_FIELD_NUMBER; - hash = (53 * hash) + getTemplateId().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CreateInspectTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateInspectTemplate.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateInspectTemplateRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateInspectTemplateRequest) - com.google.privacy.dlp.v2.CreateInspectTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateInspectTemplateRequest.class, com.google.privacy.dlp.v2.CreateInspectTemplateRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CreateInspectTemplateRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (inspectTemplateBuilder_ == null) { - inspectTemplate_ = null; - } else { - inspectTemplate_ = null; - inspectTemplateBuilder_ = null; - } - templateId_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateInspectTemplateRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CreateInspectTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateInspectTemplateRequest build() { - com.google.privacy.dlp.v2.CreateInspectTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateInspectTemplateRequest buildPartial() { - com.google.privacy.dlp.v2.CreateInspectTemplateRequest result = new com.google.privacy.dlp.v2.CreateInspectTemplateRequest(this); - result.parent_ = parent_; - if (inspectTemplateBuilder_ == null) { - result.inspectTemplate_ = inspectTemplate_; - } else { - result.inspectTemplate_ = inspectTemplateBuilder_.build(); - } - result.templateId_ = templateId_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CreateInspectTemplateRequest) { - return mergeFrom((com.google.privacy.dlp.v2.CreateInspectTemplateRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CreateInspectTemplateRequest other) { - if (other == com.google.privacy.dlp.v2.CreateInspectTemplateRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasInspectTemplate()) { - mergeInspectTemplate(other.getInspectTemplate()); - } - if (!other.getTemplateId().isEmpty()) { - templateId_ = other.templateId_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CreateInspectTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CreateInspectTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.InspectTemplate inspectTemplate_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> inspectTemplateBuilder_; - /** - *
-     * Required. The InspectTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inspectTemplate field is set. - */ - public boolean hasInspectTemplate() { - return inspectTemplateBuilder_ != null || inspectTemplate_ != null; - } - /** - *
-     * Required. The InspectTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inspectTemplate. - */ - public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate() { - if (inspectTemplateBuilder_ == null) { - return inspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; - } else { - return inspectTemplateBuilder_.getMessage(); - } - } - /** - *
-     * Required. The InspectTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { - if (inspectTemplateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectTemplate_ = value; - onChanged(); - } else { - inspectTemplateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The InspectTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setInspectTemplate( - com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { - if (inspectTemplateBuilder_ == null) { - inspectTemplate_ = builderForValue.build(); - onChanged(); - } else { - inspectTemplateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The InspectTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { - if (inspectTemplateBuilder_ == null) { - if (inspectTemplate_ != null) { - inspectTemplate_ = - com.google.privacy.dlp.v2.InspectTemplate.newBuilder(inspectTemplate_).mergeFrom(value).buildPartial(); - } else { - inspectTemplate_ = value; - } - onChanged(); - } else { - inspectTemplateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The InspectTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearInspectTemplate() { - if (inspectTemplateBuilder_ == null) { - inspectTemplate_ = null; - onChanged(); - } else { - inspectTemplate_ = null; - inspectTemplateBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The InspectTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.InspectTemplate.Builder getInspectTemplateBuilder() { - - onChanged(); - return getInspectTemplateFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The InspectTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder() { - if (inspectTemplateBuilder_ != null) { - return inspectTemplateBuilder_.getMessageOrBuilder(); - } else { - return inspectTemplate_ == null ? - com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; - } - } - /** - *
-     * Required. The InspectTemplate to create.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> - getInspectTemplateFieldBuilder() { - if (inspectTemplateBuilder_ == null) { - inspectTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder>( - getInspectTemplate(), - getParentForChildren(), - isClean()); - inspectTemplate_ = null; - } - return inspectTemplateBuilder_; - } - - private java.lang.Object templateId_ = ""; - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @return The templateId. - */ - public java.lang.String getTemplateId() { - java.lang.Object ref = templateId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - templateId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @return The bytes for templateId. - */ - public com.google.protobuf.ByteString - getTemplateIdBytes() { - java.lang.Object ref = templateId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - templateId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @param value The templateId to set. - * @return This builder for chaining. - */ - public Builder setTemplateId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - templateId_ = value; - onChanged(); - return this; - } - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @return This builder for chaining. - */ - public Builder clearTemplateId() { - - templateId_ = getDefaultInstance().getTemplateId(); - onChanged(); - return this; - } - /** - *
-     * The template id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string template_id = 3; - * @param value The bytes for templateId to set. - * @return This builder for chaining. - */ - public Builder setTemplateIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - templateId_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateInspectTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateInspectTemplateRequest) - private static final com.google.privacy.dlp.v2.CreateInspectTemplateRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateInspectTemplateRequest(); - } - - public static com.google.privacy.dlp.v2.CreateInspectTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateInspectTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateInspectTemplateRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateInspectTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java deleted file mode 100644 index 22c9b64fbb12..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateInspectTemplateRequestOrBuilder.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CreateInspectTemplateRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateInspectTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The InspectTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the inspectTemplate field is set. - */ - boolean hasInspectTemplate(); - /** - *
-   * Required. The InspectTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The inspectTemplate. - */ - com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate(); - /** - *
-   * Required. The InspectTemplate to create.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder(); - - /** - *
-   * The template id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string template_id = 3; - * @return The templateId. - */ - java.lang.String getTemplateId(); - /** - *
-   * The template id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string template_id = 3; - * @return The bytes for templateId. - */ - com.google.protobuf.ByteString - getTemplateIdBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java deleted file mode 100644 index 100f45d0bb32..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequest.java +++ /dev/null @@ -1,1261 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for CreateJobTrigger.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateJobTriggerRequest} - */ -public final class CreateJobTriggerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateJobTriggerRequest) - CreateJobTriggerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateJobTriggerRequest.newBuilder() to construct. - private CreateJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateJobTriggerRequest() { - parent_ = ""; - triggerId_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateJobTriggerRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateJobTriggerRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.JobTrigger.Builder subBuilder = null; - if (jobTrigger_ != null) { - subBuilder = jobTrigger_.toBuilder(); - } - jobTrigger_ = input.readMessage(com.google.privacy.dlp.v2.JobTrigger.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(jobTrigger_); - jobTrigger_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - triggerId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateJobTriggerRequest.class, com.google.privacy.dlp.v2.CreateJobTriggerRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_TRIGGER_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.JobTrigger jobTrigger_; - /** - *
-   * Required. The JobTrigger to create.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the jobTrigger field is set. - */ - @java.lang.Override - public boolean hasJobTrigger() { - return jobTrigger_ != null; - } - /** - *
-   * Required. The JobTrigger to create.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The jobTrigger. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger getJobTrigger() { - return jobTrigger_ == null ? com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; - } - /** - *
-   * Required. The JobTrigger to create.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder() { - return getJobTrigger(); - } - - public static final int TRIGGER_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object triggerId_; - /** - *
-   * The trigger id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string trigger_id = 3; - * @return The triggerId. - */ - @java.lang.Override - public java.lang.String getTriggerId() { - java.lang.Object ref = triggerId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - triggerId_ = s; - return s; - } - } - /** - *
-   * The trigger id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string trigger_id = 3; - * @return The bytes for triggerId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTriggerIdBytes() { - java.lang.Object ref = triggerId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - triggerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (jobTrigger_ != null) { - output.writeMessage(2, getJobTrigger()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, triggerId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (jobTrigger_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getJobTrigger()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, triggerId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CreateJobTriggerRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CreateJobTriggerRequest other = (com.google.privacy.dlp.v2.CreateJobTriggerRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasJobTrigger() != other.hasJobTrigger()) return false; - if (hasJobTrigger()) { - if (!getJobTrigger() - .equals(other.getJobTrigger())) return false; - } - if (!getTriggerId() - .equals(other.getTriggerId())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasJobTrigger()) { - hash = (37 * hash) + JOB_TRIGGER_FIELD_NUMBER; - hash = (53 * hash) + getJobTrigger().hashCode(); - } - hash = (37 * hash) + TRIGGER_ID_FIELD_NUMBER; - hash = (53 * hash) + getTriggerId().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CreateJobTriggerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateJobTrigger.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateJobTriggerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateJobTriggerRequest) - com.google.privacy.dlp.v2.CreateJobTriggerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateJobTriggerRequest.class, com.google.privacy.dlp.v2.CreateJobTriggerRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CreateJobTriggerRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (jobTriggerBuilder_ == null) { - jobTrigger_ = null; - } else { - jobTrigger_ = null; - jobTriggerBuilder_ = null; - } - triggerId_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateJobTriggerRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CreateJobTriggerRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateJobTriggerRequest build() { - com.google.privacy.dlp.v2.CreateJobTriggerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateJobTriggerRequest buildPartial() { - com.google.privacy.dlp.v2.CreateJobTriggerRequest result = new com.google.privacy.dlp.v2.CreateJobTriggerRequest(this); - result.parent_ = parent_; - if (jobTriggerBuilder_ == null) { - result.jobTrigger_ = jobTrigger_; - } else { - result.jobTrigger_ = jobTriggerBuilder_.build(); - } - result.triggerId_ = triggerId_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CreateJobTriggerRequest) { - return mergeFrom((com.google.privacy.dlp.v2.CreateJobTriggerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CreateJobTriggerRequest other) { - if (other == com.google.privacy.dlp.v2.CreateJobTriggerRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasJobTrigger()) { - mergeJobTrigger(other.getJobTrigger()); - } - if (!other.getTriggerId().isEmpty()) { - triggerId_ = other.triggerId_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CreateJobTriggerRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CreateJobTriggerRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.JobTrigger jobTrigger_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> jobTriggerBuilder_; - /** - *
-     * Required. The JobTrigger to create.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the jobTrigger field is set. - */ - public boolean hasJobTrigger() { - return jobTriggerBuilder_ != null || jobTrigger_ != null; - } - /** - *
-     * Required. The JobTrigger to create.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The jobTrigger. - */ - public com.google.privacy.dlp.v2.JobTrigger getJobTrigger() { - if (jobTriggerBuilder_ == null) { - return jobTrigger_ == null ? com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; - } else { - return jobTriggerBuilder_.getMessage(); - } - } - /** - *
-     * Required. The JobTrigger to create.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setJobTrigger(com.google.privacy.dlp.v2.JobTrigger value) { - if (jobTriggerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobTrigger_ = value; - onChanged(); - } else { - jobTriggerBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The JobTrigger to create.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setJobTrigger( - com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { - if (jobTriggerBuilder_ == null) { - jobTrigger_ = builderForValue.build(); - onChanged(); - } else { - jobTriggerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The JobTrigger to create.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeJobTrigger(com.google.privacy.dlp.v2.JobTrigger value) { - if (jobTriggerBuilder_ == null) { - if (jobTrigger_ != null) { - jobTrigger_ = - com.google.privacy.dlp.v2.JobTrigger.newBuilder(jobTrigger_).mergeFrom(value).buildPartial(); - } else { - jobTrigger_ = value; - } - onChanged(); - } else { - jobTriggerBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The JobTrigger to create.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearJobTrigger() { - if (jobTriggerBuilder_ == null) { - jobTrigger_ = null; - onChanged(); - } else { - jobTrigger_ = null; - jobTriggerBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The JobTrigger to create.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.JobTrigger.Builder getJobTriggerBuilder() { - - onChanged(); - return getJobTriggerFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The JobTrigger to create.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder() { - if (jobTriggerBuilder_ != null) { - return jobTriggerBuilder_.getMessageOrBuilder(); - } else { - return jobTrigger_ == null ? - com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; - } - } - /** - *
-     * Required. The JobTrigger to create.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> - getJobTriggerFieldBuilder() { - if (jobTriggerBuilder_ == null) { - jobTriggerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder>( - getJobTrigger(), - getParentForChildren(), - isClean()); - jobTrigger_ = null; - } - return jobTriggerBuilder_; - } - - private java.lang.Object triggerId_ = ""; - /** - *
-     * The trigger id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string trigger_id = 3; - * @return The triggerId. - */ - public java.lang.String getTriggerId() { - java.lang.Object ref = triggerId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - triggerId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The trigger id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string trigger_id = 3; - * @return The bytes for triggerId. - */ - public com.google.protobuf.ByteString - getTriggerIdBytes() { - java.lang.Object ref = triggerId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - triggerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The trigger id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string trigger_id = 3; - * @param value The triggerId to set. - * @return This builder for chaining. - */ - public Builder setTriggerId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - triggerId_ = value; - onChanged(); - return this; - } - /** - *
-     * The trigger id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string trigger_id = 3; - * @return This builder for chaining. - */ - public Builder clearTriggerId() { - - triggerId_ = getDefaultInstance().getTriggerId(); - onChanged(); - return this; - } - /** - *
-     * The trigger id can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string trigger_id = 3; - * @param value The bytes for triggerId to set. - * @return This builder for chaining. - */ - public Builder setTriggerIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - triggerId_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateJobTriggerRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateJobTriggerRequest) - private static final com.google.privacy.dlp.v2.CreateJobTriggerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateJobTriggerRequest(); - } - - public static com.google.privacy.dlp.v2.CreateJobTriggerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateJobTriggerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateJobTriggerRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateJobTriggerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java deleted file mode 100644 index facd33bed230..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateJobTriggerRequestOrBuilder.java +++ /dev/null @@ -1,124 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CreateJobTriggerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateJobTriggerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The JobTrigger to create.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the jobTrigger field is set. - */ - boolean hasJobTrigger(); - /** - *
-   * Required. The JobTrigger to create.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The jobTrigger. - */ - com.google.privacy.dlp.v2.JobTrigger getJobTrigger(); - /** - *
-   * Required. The JobTrigger to create.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder(); - - /** - *
-   * The trigger id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string trigger_id = 3; - * @return The triggerId. - */ - java.lang.String getTriggerId(); - /** - *
-   * The trigger id can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string trigger_id = 3; - * @return The bytes for triggerId. - */ - com.google.protobuf.ByteString - getTriggerIdBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java deleted file mode 100644 index 81e415e15b18..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequest.java +++ /dev/null @@ -1,1289 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for CreateStoredInfoType.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateStoredInfoTypeRequest} - */ -public final class CreateStoredInfoTypeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) - CreateStoredInfoTypeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateStoredInfoTypeRequest.newBuilder() to construct. - private CreateStoredInfoTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateStoredInfoTypeRequest() { - parent_ = ""; - storedInfoTypeId_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateStoredInfoTypeRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateStoredInfoTypeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - storedInfoTypeId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; - /** - *
-   * Required. Configuration of the storedInfoType to create.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the config field is set. - */ - @java.lang.Override - public boolean hasConfig() { - return config_ != null; - } - /** - *
-   * Required. Configuration of the storedInfoType to create.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The config. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { - return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; - } - /** - *
-   * Required. Configuration of the storedInfoType to create.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - public static final int STORED_INFO_TYPE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object storedInfoTypeId_; - /** - *
-   * The storedInfoType ID can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string stored_info_type_id = 3; - * @return The storedInfoTypeId. - */ - @java.lang.Override - public java.lang.String getStoredInfoTypeId() { - java.lang.Object ref = storedInfoTypeId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - storedInfoTypeId_ = s; - return s; - } - } - /** - *
-   * The storedInfoType ID can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string stored_info_type_id = 3; - * @return The bytes for storedInfoTypeId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStoredInfoTypeIdBytes() { - java.lang.Object ref = storedInfoTypeId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - storedInfoTypeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (config_ != null) { - output.writeMessage(2, getConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storedInfoTypeId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, storedInfoTypeId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storedInfoTypeId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, storedInfoTypeId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest other = (com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasConfig() != other.hasConfig()) return false; - if (hasConfig()) { - if (!getConfig() - .equals(other.getConfig())) return false; - } - if (!getStoredInfoTypeId() - .equals(other.getStoredInfoTypeId())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - hash = (37 * hash) + STORED_INFO_TYPE_ID_FIELD_NUMBER; - hash = (53 * hash) + getStoredInfoTypeId().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for CreateStoredInfoType.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CreateStoredInfoTypeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - storedInfoTypeId_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest build() { - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest buildPartial() { - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest result = new com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(this); - result.parent_ = parent_; - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - result.storedInfoTypeId_ = storedInfoTypeId_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) { - return mergeFrom((com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest other) { - if (other == com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - if (!other.getStoredInfoTypeId().isEmpty()) { - storedInfoTypeId_ = other.storedInfoTypeId_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> configBuilder_; - /** - *
-     * Required. Configuration of the storedInfoType to create.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the config field is set. - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - *
-     * Required. Configuration of the storedInfoType to create.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The config. - */ - public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - *
-     * Required. Configuration of the storedInfoType to create.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Configuration of the storedInfoType to create.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setConfig( - com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Configuration of the storedInfoType to create.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.privacy.dlp.v2.StoredInfoTypeConfig.newBuilder(config_).mergeFrom(value).buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Configuration of the storedInfoType to create.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Configuration of the storedInfoType to create.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Configuration of the storedInfoType to create.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null ? - com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; - } - } - /** - *
-     * Required. Configuration of the storedInfoType to create.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder>( - getConfig(), - getParentForChildren(), - isClean()); - config_ = null; - } - return configBuilder_; - } - - private java.lang.Object storedInfoTypeId_ = ""; - /** - *
-     * The storedInfoType ID can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string stored_info_type_id = 3; - * @return The storedInfoTypeId. - */ - public java.lang.String getStoredInfoTypeId() { - java.lang.Object ref = storedInfoTypeId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - storedInfoTypeId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The storedInfoType ID can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string stored_info_type_id = 3; - * @return The bytes for storedInfoTypeId. - */ - public com.google.protobuf.ByteString - getStoredInfoTypeIdBytes() { - java.lang.Object ref = storedInfoTypeId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - storedInfoTypeId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The storedInfoType ID can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string stored_info_type_id = 3; - * @param value The storedInfoTypeId to set. - * @return This builder for chaining. - */ - public Builder setStoredInfoTypeId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - storedInfoTypeId_ = value; - onChanged(); - return this; - } - /** - *
-     * The storedInfoType ID can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string stored_info_type_id = 3; - * @return This builder for chaining. - */ - public Builder clearStoredInfoTypeId() { - - storedInfoTypeId_ = getDefaultInstance().getStoredInfoTypeId(); - onChanged(); - return this; - } - /** - *
-     * The storedInfoType ID can contain uppercase and lowercase letters,
-     * numbers, and hyphens; that is, it must match the regular
-     * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-     * characters. Can be empty to allow the system to generate one.
-     * 
- * - * string stored_info_type_id = 3; - * @param value The bytes for storedInfoTypeId to set. - * @return This builder for chaining. - */ - public Builder setStoredInfoTypeIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - storedInfoTypeId_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 4; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) - private static final com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(); - } - - public static com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateStoredInfoTypeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateStoredInfoTypeRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java deleted file mode 100644 index 44c40f523f3b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CreateStoredInfoTypeRequestOrBuilder.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CreateStoredInfoTypeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CreateStoredInfoTypeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. Configuration of the storedInfoType to create.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - *
-   * Required. Configuration of the storedInfoType to create.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The config. - */ - com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig(); - /** - *
-   * Required. Configuration of the storedInfoType to create.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder(); - - /** - *
-   * The storedInfoType ID can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string stored_info_type_id = 3; - * @return The storedInfoTypeId. - */ - java.lang.String getStoredInfoTypeId(); - /** - *
-   * The storedInfoType ID can contain uppercase and lowercase letters,
-   * numbers, and hyphens; that is, it must match the regular
-   * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
-   * characters. Can be empty to allow the system to generate one.
-   * 
- * - * string stored_info_type_id = 3; - * @return The bytes for storedInfoTypeId. - */ - com.google.protobuf.ByteString - getStoredInfoTypeIdBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 4; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java deleted file mode 100644 index f4f672f6b49c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfig.java +++ /dev/null @@ -1,1621 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Pseudonymization method that generates deterministic encryption for the given
- * input. Outputs a base64 encoded representation of the encrypted output.
- * Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CryptoDeterministicConfig} - */ -public final class CryptoDeterministicConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CryptoDeterministicConfig) - CryptoDeterministicConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use CryptoDeterministicConfig.newBuilder() to construct. - private CryptoDeterministicConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CryptoDeterministicConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CryptoDeterministicConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CryptoDeterministicConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CryptoKey.Builder subBuilder = null; - if (cryptoKey_ != null) { - subBuilder = cryptoKey_.toBuilder(); - } - cryptoKey_ = input.readMessage(com.google.privacy.dlp.v2.CryptoKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cryptoKey_); - cryptoKey_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (surrogateInfoType_ != null) { - subBuilder = surrogateInfoType_.toBuilder(); - } - surrogateInfoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(surrogateInfoType_); - surrogateInfoType_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (context_ != null) { - subBuilder = context_.toBuilder(); - } - context_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(context_); - context_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CryptoDeterministicConfig.class, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder.class); - } - - public static final int CRYPTO_KEY_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; - /** - *
-   * The key used by the encryption function. For deterministic encryption
-   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-   * use.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return Whether the cryptoKey field is set. - */ - @java.lang.Override - public boolean hasCryptoKey() { - return cryptoKey_ != null; - } - /** - *
-   * The key used by the encryption function. For deterministic encryption
-   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-   * use.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return The cryptoKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { - return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; - } - /** - *
-   * The key used by the encryption function. For deterministic encryption
-   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-   * use.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { - return getCryptoKey(); - } - - public static final int SURROGATE_INFO_TYPE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.InfoType surrogateInfoType_; - /** - *
-   * The custom info type to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom info type followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: {info type name}({surrogate character count}):{surrogate}
-   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom info type 'Surrogate'. This facilitates reversal of the
-   * surrogate when it occurs in free text.
-   * Note: For record transformations where the entire cell in a table is being
-   * transformed, surrogates are not mandatory. Surrogates are used to denote
-   * the location of the token and are necessary for re-identification in free
-   * form text.
-   * In order for inspection to work properly, the name of this info type must
-   * not occur naturally anywhere in your data; otherwise, inspection may either
-   * - reverse a surrogate that does not correspond to an actual identifier
-   * - be unable to parse the surrogate and result in an error
-   * Therefore, choose your custom info type name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE.
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - * @return Whether the surrogateInfoType field is set. - */ - @java.lang.Override - public boolean hasSurrogateInfoType() { - return surrogateInfoType_ != null; - } - /** - *
-   * The custom info type to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom info type followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: {info type name}({surrogate character count}):{surrogate}
-   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom info type 'Surrogate'. This facilitates reversal of the
-   * surrogate when it occurs in free text.
-   * Note: For record transformations where the entire cell in a table is being
-   * transformed, surrogates are not mandatory. Surrogates are used to denote
-   * the location of the token and are necessary for re-identification in free
-   * form text.
-   * In order for inspection to work properly, the name of this info type must
-   * not occur naturally anywhere in your data; otherwise, inspection may either
-   * - reverse a surrogate that does not correspond to an actual identifier
-   * - be unable to parse the surrogate and result in an error
-   * Therefore, choose your custom info type name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE.
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - * @return The surrogateInfoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getSurrogateInfoType() { - return surrogateInfoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; - } - /** - *
-   * The custom info type to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom info type followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: {info type name}({surrogate character count}):{surrogate}
-   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom info type 'Surrogate'. This facilitates reversal of the
-   * surrogate when it occurs in free text.
-   * Note: For record transformations where the entire cell in a table is being
-   * transformed, surrogates are not mandatory. Surrogates are used to denote
-   * the location of the token and are necessary for re-identification in free
-   * form text.
-   * In order for inspection to work properly, the name of this info type must
-   * not occur naturally anywhere in your data; otherwise, inspection may either
-   * - reverse a surrogate that does not correspond to an actual identifier
-   * - be unable to parse the surrogate and result in an error
-   * Therefore, choose your custom info type name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE.
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder() { - return getSurrogateInfoType(); - } - - public static final int CONTEXT_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.FieldId context_; - /** - *
-   * A context may be used for higher security and maintaining
-   * referential integrity such that the same identifier in two different
-   * contexts will be given a distinct surrogate. The context is appended to
-   * plaintext value being encrypted. On decryption the provided context is
-   * validated against the value used during encryption. If a context was
-   * provided during encryption, same context must be provided during decryption
-   * as well.
-   * If the context is not set, plaintext would be used as is for encryption.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 2. the field is not present when transforming a given value,
-   * plaintext would be used as is for encryption.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return Whether the context field is set. - */ - @java.lang.Override - public boolean hasContext() { - return context_ != null; - } - /** - *
-   * A context may be used for higher security and maintaining
-   * referential integrity such that the same identifier in two different
-   * contexts will be given a distinct surrogate. The context is appended to
-   * plaintext value being encrypted. On decryption the provided context is
-   * validated against the value used during encryption. If a context was
-   * provided during encryption, same context must be provided during decryption
-   * as well.
-   * If the context is not set, plaintext would be used as is for encryption.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 2. the field is not present when transforming a given value,
-   * plaintext would be used as is for encryption.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return The context. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getContext() { - return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; - } - /** - *
-   * A context may be used for higher security and maintaining
-   * referential integrity such that the same identifier in two different
-   * contexts will be given a distinct surrogate. The context is appended to
-   * plaintext value being encrypted. On decryption the provided context is
-   * validated against the value used during encryption. If a context was
-   * provided during encryption, same context must be provided during decryption
-   * as well.
-   * If the context is not set, plaintext would be used as is for encryption.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 2. the field is not present when transforming a given value,
-   * plaintext would be used as is for encryption.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { - return getContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (cryptoKey_ != null) { - output.writeMessage(1, getCryptoKey()); - } - if (surrogateInfoType_ != null) { - output.writeMessage(2, getSurrogateInfoType()); - } - if (context_ != null) { - output.writeMessage(3, getContext()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (cryptoKey_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCryptoKey()); - } - if (surrogateInfoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSurrogateInfoType()); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getContext()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CryptoDeterministicConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CryptoDeterministicConfig other = (com.google.privacy.dlp.v2.CryptoDeterministicConfig) obj; - - if (hasCryptoKey() != other.hasCryptoKey()) return false; - if (hasCryptoKey()) { - if (!getCryptoKey() - .equals(other.getCryptoKey())) return false; - } - if (hasSurrogateInfoType() != other.hasSurrogateInfoType()) return false; - if (hasSurrogateInfoType()) { - if (!getSurrogateInfoType() - .equals(other.getSurrogateInfoType())) return false; - } - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext() - .equals(other.getContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCryptoKey()) { - hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; - hash = (53 * hash) + getCryptoKey().hashCode(); - } - if (hasSurrogateInfoType()) { - hash = (37 * hash) + SURROGATE_INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getSurrogateInfoType().hashCode(); - } - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CryptoDeterministicConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Pseudonymization method that generates deterministic encryption for the given
-   * input. Outputs a base64 encoded representation of the encrypted output.
-   * Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CryptoDeterministicConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CryptoDeterministicConfig) - com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CryptoDeterministicConfig.class, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CryptoDeterministicConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (cryptoKeyBuilder_ == null) { - cryptoKey_ = null; - } else { - cryptoKey_ = null; - cryptoKeyBuilder_ = null; - } - if (surrogateInfoTypeBuilder_ == null) { - surrogateInfoType_ = null; - } else { - surrogateInfoType_ = null; - surrogateInfoTypeBuilder_ = null; - } - if (contextBuilder_ == null) { - context_ = null; - } else { - context_ = null; - contextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoDeterministicConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoDeterministicConfig build() { - com.google.privacy.dlp.v2.CryptoDeterministicConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoDeterministicConfig buildPartial() { - com.google.privacy.dlp.v2.CryptoDeterministicConfig result = new com.google.privacy.dlp.v2.CryptoDeterministicConfig(this); - if (cryptoKeyBuilder_ == null) { - result.cryptoKey_ = cryptoKey_; - } else { - result.cryptoKey_ = cryptoKeyBuilder_.build(); - } - if (surrogateInfoTypeBuilder_ == null) { - result.surrogateInfoType_ = surrogateInfoType_; - } else { - result.surrogateInfoType_ = surrogateInfoTypeBuilder_.build(); - } - if (contextBuilder_ == null) { - result.context_ = context_; - } else { - result.context_ = contextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CryptoDeterministicConfig) { - return mergeFrom((com.google.privacy.dlp.v2.CryptoDeterministicConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CryptoDeterministicConfig other) { - if (other == com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance()) return this; - if (other.hasCryptoKey()) { - mergeCryptoKey(other.getCryptoKey()); - } - if (other.hasSurrogateInfoType()) { - mergeSurrogateInfoType(other.getSurrogateInfoType()); - } - if (other.hasContext()) { - mergeContext(other.getContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CryptoDeterministicConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CryptoDeterministicConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> cryptoKeyBuilder_; - /** - *
-     * The key used by the encryption function. For deterministic encryption
-     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-     * use.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return Whether the cryptoKey field is set. - */ - public boolean hasCryptoKey() { - return cryptoKeyBuilder_ != null || cryptoKey_ != null; - } - /** - *
-     * The key used by the encryption function. For deterministic encryption
-     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-     * use.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return The cryptoKey. - */ - public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { - if (cryptoKeyBuilder_ == null) { - return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; - } else { - return cryptoKeyBuilder_.getMessage(); - } - } - /** - *
-     * The key used by the encryption function. For deterministic encryption
-     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-     * use.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public Builder setCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { - if (cryptoKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cryptoKey_ = value; - onChanged(); - } else { - cryptoKeyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The key used by the encryption function. For deterministic encryption
-     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-     * use.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public Builder setCryptoKey( - com.google.privacy.dlp.v2.CryptoKey.Builder builderForValue) { - if (cryptoKeyBuilder_ == null) { - cryptoKey_ = builderForValue.build(); - onChanged(); - } else { - cryptoKeyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The key used by the encryption function. For deterministic encryption
-     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-     * use.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public Builder mergeCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { - if (cryptoKeyBuilder_ == null) { - if (cryptoKey_ != null) { - cryptoKey_ = - com.google.privacy.dlp.v2.CryptoKey.newBuilder(cryptoKey_).mergeFrom(value).buildPartial(); - } else { - cryptoKey_ = value; - } - onChanged(); - } else { - cryptoKeyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The key used by the encryption function. For deterministic encryption
-     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-     * use.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public Builder clearCryptoKey() { - if (cryptoKeyBuilder_ == null) { - cryptoKey_ = null; - onChanged(); - } else { - cryptoKey_ = null; - cryptoKeyBuilder_ = null; - } - - return this; - } - /** - *
-     * The key used by the encryption function. For deterministic encryption
-     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-     * use.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public com.google.privacy.dlp.v2.CryptoKey.Builder getCryptoKeyBuilder() { - - onChanged(); - return getCryptoKeyFieldBuilder().getBuilder(); - } - /** - *
-     * The key used by the encryption function. For deterministic encryption
-     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-     * use.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { - if (cryptoKeyBuilder_ != null) { - return cryptoKeyBuilder_.getMessageOrBuilder(); - } else { - return cryptoKey_ == null ? - com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; - } - } - /** - *
-     * The key used by the encryption function. For deterministic encryption
-     * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-     * use.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> - getCryptoKeyFieldBuilder() { - if (cryptoKeyBuilder_ == null) { - cryptoKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder>( - getCryptoKey(), - getParentForChildren(), - isClean()); - cryptoKey_ = null; - } - return cryptoKeyBuilder_; - } - - private com.google.privacy.dlp.v2.InfoType surrogateInfoType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> surrogateInfoTypeBuilder_; - /** - *
-     * The custom info type to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom info type followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: {info type name}({surrogate character count}):{surrogate}
-     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom info type 'Surrogate'. This facilitates reversal of the
-     * surrogate when it occurs in free text.
-     * Note: For record transformations where the entire cell in a table is being
-     * transformed, surrogates are not mandatory. Surrogates are used to denote
-     * the location of the token and are necessary for re-identification in free
-     * form text.
-     * In order for inspection to work properly, the name of this info type must
-     * not occur naturally anywhere in your data; otherwise, inspection may either
-     * - reverse a surrogate that does not correspond to an actual identifier
-     * - be unable to parse the surrogate and result in an error
-     * Therefore, choose your custom info type name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE.
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - * @return Whether the surrogateInfoType field is set. - */ - public boolean hasSurrogateInfoType() { - return surrogateInfoTypeBuilder_ != null || surrogateInfoType_ != null; - } - /** - *
-     * The custom info type to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom info type followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: {info type name}({surrogate character count}):{surrogate}
-     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom info type 'Surrogate'. This facilitates reversal of the
-     * surrogate when it occurs in free text.
-     * Note: For record transformations where the entire cell in a table is being
-     * transformed, surrogates are not mandatory. Surrogates are used to denote
-     * the location of the token and are necessary for re-identification in free
-     * form text.
-     * In order for inspection to work properly, the name of this info type must
-     * not occur naturally anywhere in your data; otherwise, inspection may either
-     * - reverse a surrogate that does not correspond to an actual identifier
-     * - be unable to parse the surrogate and result in an error
-     * Therefore, choose your custom info type name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE.
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - * @return The surrogateInfoType. - */ - public com.google.privacy.dlp.v2.InfoType getSurrogateInfoType() { - if (surrogateInfoTypeBuilder_ == null) { - return surrogateInfoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; - } else { - return surrogateInfoTypeBuilder_.getMessage(); - } - } - /** - *
-     * The custom info type to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom info type followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: {info type name}({surrogate character count}):{surrogate}
-     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom info type 'Surrogate'. This facilitates reversal of the
-     * surrogate when it occurs in free text.
-     * Note: For record transformations where the entire cell in a table is being
-     * transformed, surrogates are not mandatory. Surrogates are used to denote
-     * the location of the token and are necessary for re-identification in free
-     * form text.
-     * In order for inspection to work properly, the name of this info type must
-     * not occur naturally anywhere in your data; otherwise, inspection may either
-     * - reverse a surrogate that does not correspond to an actual identifier
-     * - be unable to parse the surrogate and result in an error
-     * Therefore, choose your custom info type name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE.
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - */ - public Builder setSurrogateInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (surrogateInfoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - surrogateInfoType_ = value; - onChanged(); - } else { - surrogateInfoTypeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The custom info type to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom info type followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: {info type name}({surrogate character count}):{surrogate}
-     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom info type 'Surrogate'. This facilitates reversal of the
-     * surrogate when it occurs in free text.
-     * Note: For record transformations where the entire cell in a table is being
-     * transformed, surrogates are not mandatory. Surrogates are used to denote
-     * the location of the token and are necessary for re-identification in free
-     * form text.
-     * In order for inspection to work properly, the name of this info type must
-     * not occur naturally anywhere in your data; otherwise, inspection may either
-     * - reverse a surrogate that does not correspond to an actual identifier
-     * - be unable to parse the surrogate and result in an error
-     * Therefore, choose your custom info type name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE.
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - */ - public Builder setSurrogateInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (surrogateInfoTypeBuilder_ == null) { - surrogateInfoType_ = builderForValue.build(); - onChanged(); - } else { - surrogateInfoTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The custom info type to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom info type followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: {info type name}({surrogate character count}):{surrogate}
-     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom info type 'Surrogate'. This facilitates reversal of the
-     * surrogate when it occurs in free text.
-     * Note: For record transformations where the entire cell in a table is being
-     * transformed, surrogates are not mandatory. Surrogates are used to denote
-     * the location of the token and are necessary for re-identification in free
-     * form text.
-     * In order for inspection to work properly, the name of this info type must
-     * not occur naturally anywhere in your data; otherwise, inspection may either
-     * - reverse a surrogate that does not correspond to an actual identifier
-     * - be unable to parse the surrogate and result in an error
-     * Therefore, choose your custom info type name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE.
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - */ - public Builder mergeSurrogateInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (surrogateInfoTypeBuilder_ == null) { - if (surrogateInfoType_ != null) { - surrogateInfoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(surrogateInfoType_).mergeFrom(value).buildPartial(); - } else { - surrogateInfoType_ = value; - } - onChanged(); - } else { - surrogateInfoTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The custom info type to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom info type followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: {info type name}({surrogate character count}):{surrogate}
-     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom info type 'Surrogate'. This facilitates reversal of the
-     * surrogate when it occurs in free text.
-     * Note: For record transformations where the entire cell in a table is being
-     * transformed, surrogates are not mandatory. Surrogates are used to denote
-     * the location of the token and are necessary for re-identification in free
-     * form text.
-     * In order for inspection to work properly, the name of this info type must
-     * not occur naturally anywhere in your data; otherwise, inspection may either
-     * - reverse a surrogate that does not correspond to an actual identifier
-     * - be unable to parse the surrogate and result in an error
-     * Therefore, choose your custom info type name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE.
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - */ - public Builder clearSurrogateInfoType() { - if (surrogateInfoTypeBuilder_ == null) { - surrogateInfoType_ = null; - onChanged(); - } else { - surrogateInfoType_ = null; - surrogateInfoTypeBuilder_ = null; - } - - return this; - } - /** - *
-     * The custom info type to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom info type followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: {info type name}({surrogate character count}):{surrogate}
-     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom info type 'Surrogate'. This facilitates reversal of the
-     * surrogate when it occurs in free text.
-     * Note: For record transformations where the entire cell in a table is being
-     * transformed, surrogates are not mandatory. Surrogates are used to denote
-     * the location of the token and are necessary for re-identification in free
-     * form text.
-     * In order for inspection to work properly, the name of this info type must
-     * not occur naturally anywhere in your data; otherwise, inspection may either
-     * - reverse a surrogate that does not correspond to an actual identifier
-     * - be unable to parse the surrogate and result in an error
-     * Therefore, choose your custom info type name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE.
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getSurrogateInfoTypeBuilder() { - - onChanged(); - return getSurrogateInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-     * The custom info type to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom info type followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: {info type name}({surrogate character count}):{surrogate}
-     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom info type 'Surrogate'. This facilitates reversal of the
-     * surrogate when it occurs in free text.
-     * Note: For record transformations where the entire cell in a table is being
-     * transformed, surrogates are not mandatory. Surrogates are used to denote
-     * the location of the token and are necessary for re-identification in free
-     * form text.
-     * In order for inspection to work properly, the name of this info type must
-     * not occur naturally anywhere in your data; otherwise, inspection may either
-     * - reverse a surrogate that does not correspond to an actual identifier
-     * - be unable to parse the surrogate and result in an error
-     * Therefore, choose your custom info type name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE.
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder() { - if (surrogateInfoTypeBuilder_ != null) { - return surrogateInfoTypeBuilder_.getMessageOrBuilder(); - } else { - return surrogateInfoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; - } - } - /** - *
-     * The custom info type to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom info type followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: {info type name}({surrogate character count}):{surrogate}
-     * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom info type 'Surrogate'. This facilitates reversal of the
-     * surrogate when it occurs in free text.
-     * Note: For record transformations where the entire cell in a table is being
-     * transformed, surrogates are not mandatory. Surrogates are used to denote
-     * the location of the token and are necessary for re-identification in free
-     * form text.
-     * In order for inspection to work properly, the name of this info type must
-     * not occur naturally anywhere in your data; otherwise, inspection may either
-     * - reverse a surrogate that does not correspond to an actual identifier
-     * - be unable to parse the surrogate and result in an error
-     * Therefore, choose your custom info type name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE.
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getSurrogateInfoTypeFieldBuilder() { - if (surrogateInfoTypeBuilder_ == null) { - surrogateInfoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getSurrogateInfoType(), - getParentForChildren(), - isClean()); - surrogateInfoType_ = null; - } - return surrogateInfoTypeBuilder_; - } - - private com.google.privacy.dlp.v2.FieldId context_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> contextBuilder_; - /** - *
-     * A context may be used for higher security and maintaining
-     * referential integrity such that the same identifier in two different
-     * contexts will be given a distinct surrogate. The context is appended to
-     * plaintext value being encrypted. On decryption the provided context is
-     * validated against the value used during encryption. If a context was
-     * provided during encryption, same context must be provided during decryption
-     * as well.
-     * If the context is not set, plaintext would be used as is for encryption.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 2. the field is not present when transforming a given value,
-     * plaintext would be used as is for encryption.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return Whether the context field is set. - */ - public boolean hasContext() { - return contextBuilder_ != null || context_ != null; - } - /** - *
-     * A context may be used for higher security and maintaining
-     * referential integrity such that the same identifier in two different
-     * contexts will be given a distinct surrogate. The context is appended to
-     * plaintext value being encrypted. On decryption the provided context is
-     * validated against the value used during encryption. If a context was
-     * provided during encryption, same context must be provided during decryption
-     * as well.
-     * If the context is not set, plaintext would be used as is for encryption.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 2. the field is not present when transforming a given value,
-     * plaintext would be used as is for encryption.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return The context. - */ - public com.google.privacy.dlp.v2.FieldId getContext() { - if (contextBuilder_ == null) { - return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - *
-     * A context may be used for higher security and maintaining
-     * referential integrity such that the same identifier in two different
-     * contexts will be given a distinct surrogate. The context is appended to
-     * plaintext value being encrypted. On decryption the provided context is
-     * validated against the value used during encryption. If a context was
-     * provided during encryption, same context must be provided during decryption
-     * as well.
-     * If the context is not set, plaintext would be used as is for encryption.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 2. the field is not present when transforming a given value,
-     * plaintext would be used as is for encryption.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public Builder setContext(com.google.privacy.dlp.v2.FieldId value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - contextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A context may be used for higher security and maintaining
-     * referential integrity such that the same identifier in two different
-     * contexts will be given a distinct surrogate. The context is appended to
-     * plaintext value being encrypted. On decryption the provided context is
-     * validated against the value used during encryption. If a context was
-     * provided during encryption, same context must be provided during decryption
-     * as well.
-     * If the context is not set, plaintext would be used as is for encryption.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 2. the field is not present when transforming a given value,
-     * plaintext would be used as is for encryption.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public Builder setContext( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A context may be used for higher security and maintaining
-     * referential integrity such that the same identifier in two different
-     * contexts will be given a distinct surrogate. The context is appended to
-     * plaintext value being encrypted. On decryption the provided context is
-     * validated against the value used during encryption. If a context was
-     * provided during encryption, same context must be provided during decryption
-     * as well.
-     * If the context is not set, plaintext would be used as is for encryption.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 2. the field is not present when transforming a given value,
-     * plaintext would be used as is for encryption.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public Builder mergeContext(com.google.privacy.dlp.v2.FieldId value) { - if (contextBuilder_ == null) { - if (context_ != null) { - context_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(context_).mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - contextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A context may be used for higher security and maintaining
-     * referential integrity such that the same identifier in two different
-     * contexts will be given a distinct surrogate. The context is appended to
-     * plaintext value being encrypted. On decryption the provided context is
-     * validated against the value used during encryption. If a context was
-     * provided during encryption, same context must be provided during decryption
-     * as well.
-     * If the context is not set, plaintext would be used as is for encryption.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 2. the field is not present when transforming a given value,
-     * plaintext would be used as is for encryption.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public Builder clearContext() { - if (contextBuilder_ == null) { - context_ = null; - onChanged(); - } else { - context_ = null; - contextBuilder_ = null; - } - - return this; - } - /** - *
-     * A context may be used for higher security and maintaining
-     * referential integrity such that the same identifier in two different
-     * contexts will be given a distinct surrogate. The context is appended to
-     * plaintext value being encrypted. On decryption the provided context is
-     * validated against the value used during encryption. If a context was
-     * provided during encryption, same context must be provided during decryption
-     * as well.
-     * If the context is not set, plaintext would be used as is for encryption.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 2. the field is not present when transforming a given value,
-     * plaintext would be used as is for encryption.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getContextBuilder() { - - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - *
-     * A context may be used for higher security and maintaining
-     * referential integrity such that the same identifier in two different
-     * contexts will be given a distinct surrogate. The context is appended to
-     * plaintext value being encrypted. On decryption the provided context is
-     * validated against the value used during encryption. If a context was
-     * provided during encryption, same context must be provided during decryption
-     * as well.
-     * If the context is not set, plaintext would be used as is for encryption.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 2. the field is not present when transforming a given value,
-     * plaintext would be used as is for encryption.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; - } - } - /** - *
-     * A context may be used for higher security and maintaining
-     * referential integrity such that the same identifier in two different
-     * contexts will be given a distinct surrogate. The context is appended to
-     * plaintext value being encrypted. On decryption the provided context is
-     * validated against the value used during encryption. If a context was
-     * provided during encryption, same context must be provided during decryption
-     * as well.
-     * If the context is not set, plaintext would be used as is for encryption.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 2. the field is not present when transforming a given value,
-     * plaintext would be used as is for encryption.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CryptoDeterministicConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CryptoDeterministicConfig) - private static final com.google.privacy.dlp.v2.CryptoDeterministicConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CryptoDeterministicConfig(); - } - - public static com.google.privacy.dlp.v2.CryptoDeterministicConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CryptoDeterministicConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CryptoDeterministicConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoDeterministicConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java deleted file mode 100644 index 073fd88c4c63..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoDeterministicConfigOrBuilder.java +++ /dev/null @@ -1,210 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CryptoDeterministicConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CryptoDeterministicConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The key used by the encryption function. For deterministic encryption
-   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-   * use.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return Whether the cryptoKey field is set. - */ - boolean hasCryptoKey(); - /** - *
-   * The key used by the encryption function. For deterministic encryption
-   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-   * use.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return The cryptoKey. - */ - com.google.privacy.dlp.v2.CryptoKey getCryptoKey(); - /** - *
-   * The key used by the encryption function. For deterministic encryption
-   * using AES-SIV, the provided key is internally expanded to 64 bytes prior to
-   * use.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder(); - - /** - *
-   * The custom info type to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom info type followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: {info type name}({surrogate character count}):{surrogate}
-   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom info type 'Surrogate'. This facilitates reversal of the
-   * surrogate when it occurs in free text.
-   * Note: For record transformations where the entire cell in a table is being
-   * transformed, surrogates are not mandatory. Surrogates are used to denote
-   * the location of the token and are necessary for re-identification in free
-   * form text.
-   * In order for inspection to work properly, the name of this info type must
-   * not occur naturally anywhere in your data; otherwise, inspection may either
-   * - reverse a surrogate that does not correspond to an actual identifier
-   * - be unable to parse the surrogate and result in an error
-   * Therefore, choose your custom info type name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE.
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - * @return Whether the surrogateInfoType field is set. - */ - boolean hasSurrogateInfoType(); - /** - *
-   * The custom info type to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom info type followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: {info type name}({surrogate character count}):{surrogate}
-   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom info type 'Surrogate'. This facilitates reversal of the
-   * surrogate when it occurs in free text.
-   * Note: For record transformations where the entire cell in a table is being
-   * transformed, surrogates are not mandatory. Surrogates are used to denote
-   * the location of the token and are necessary for re-identification in free
-   * form text.
-   * In order for inspection to work properly, the name of this info type must
-   * not occur naturally anywhere in your data; otherwise, inspection may either
-   * - reverse a surrogate that does not correspond to an actual identifier
-   * - be unable to parse the surrogate and result in an error
-   * Therefore, choose your custom info type name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE.
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - * @return The surrogateInfoType. - */ - com.google.privacy.dlp.v2.InfoType getSurrogateInfoType(); - /** - *
-   * The custom info type to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom info type followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: {info type name}({surrogate character count}):{surrogate}
-   * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom info type 'Surrogate'. This facilitates reversal of the
-   * surrogate when it occurs in free text.
-   * Note: For record transformations where the entire cell in a table is being
-   * transformed, surrogates are not mandatory. Surrogates are used to denote
-   * the location of the token and are necessary for re-identification in free
-   * form text.
-   * In order for inspection to work properly, the name of this info type must
-   * not occur naturally anywhere in your data; otherwise, inspection may either
-   * - reverse a surrogate that does not correspond to an actual identifier
-   * - be unable to parse the surrogate and result in an error
-   * Therefore, choose your custom info type name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE.
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 2; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder(); - - /** - *
-   * A context may be used for higher security and maintaining
-   * referential integrity such that the same identifier in two different
-   * contexts will be given a distinct surrogate. The context is appended to
-   * plaintext value being encrypted. On decryption the provided context is
-   * validated against the value used during encryption. If a context was
-   * provided during encryption, same context must be provided during decryption
-   * as well.
-   * If the context is not set, plaintext would be used as is for encryption.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 2. the field is not present when transforming a given value,
-   * plaintext would be used as is for encryption.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - *
-   * A context may be used for higher security and maintaining
-   * referential integrity such that the same identifier in two different
-   * contexts will be given a distinct surrogate. The context is appended to
-   * plaintext value being encrypted. On decryption the provided context is
-   * validated against the value used during encryption. If a context was
-   * provided during encryption, same context must be provided during decryption
-   * as well.
-   * If the context is not set, plaintext would be used as is for encryption.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 2. the field is not present when transforming a given value,
-   * plaintext would be used as is for encryption.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return The context. - */ - com.google.privacy.dlp.v2.FieldId getContext(); - /** - *
-   * A context may be used for higher security and maintaining
-   * referential integrity such that the same identifier in two different
-   * contexts will be given a distinct surrogate. The context is appended to
-   * plaintext value being encrypted. On decryption the provided context is
-   * validated against the value used during encryption. If a context was
-   * provided during encryption, same context must be provided during decryption
-   * as well.
-   * If the context is not set, plaintext would be used as is for encryption.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 2. the field is not present when transforming a given value,
-   * plaintext would be used as is for encryption.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfig.java deleted file mode 100644 index cf7526502eb2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfig.java +++ /dev/null @@ -1,677 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Pseudonymization method that generates surrogates via cryptographic hashing.
- * Uses SHA-256.
- * The key size must be either 32 or 64 bytes.
- * Outputs a base64 encoded representation of the hashed output
- * (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=).
- * Currently, only string and integer values can be hashed.
- * See https://cloud.google.com/dlp/docs/pseudonymization to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CryptoHashConfig} - */ -public final class CryptoHashConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CryptoHashConfig) - CryptoHashConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use CryptoHashConfig.newBuilder() to construct. - private CryptoHashConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CryptoHashConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CryptoHashConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CryptoHashConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CryptoKey.Builder subBuilder = null; - if (cryptoKey_ != null) { - subBuilder = cryptoKey_.toBuilder(); - } - cryptoKey_ = input.readMessage(com.google.privacy.dlp.v2.CryptoKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cryptoKey_); - cryptoKey_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CryptoHashConfig.class, com.google.privacy.dlp.v2.CryptoHashConfig.Builder.class); - } - - public static final int CRYPTO_KEY_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; - /** - *
-   * The key used by the hash function.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return Whether the cryptoKey field is set. - */ - @java.lang.Override - public boolean hasCryptoKey() { - return cryptoKey_ != null; - } - /** - *
-   * The key used by the hash function.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return The cryptoKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { - return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; - } - /** - *
-   * The key used by the hash function.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { - return getCryptoKey(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (cryptoKey_ != null) { - output.writeMessage(1, getCryptoKey()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (cryptoKey_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCryptoKey()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CryptoHashConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CryptoHashConfig other = (com.google.privacy.dlp.v2.CryptoHashConfig) obj; - - if (hasCryptoKey() != other.hasCryptoKey()) return false; - if (hasCryptoKey()) { - if (!getCryptoKey() - .equals(other.getCryptoKey())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCryptoKey()) { - hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; - hash = (53 * hash) + getCryptoKey().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoHashConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CryptoHashConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Pseudonymization method that generates surrogates via cryptographic hashing.
-   * Uses SHA-256.
-   * The key size must be either 32 or 64 bytes.
-   * Outputs a base64 encoded representation of the hashed output
-   * (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=).
-   * Currently, only string and integer values can be hashed.
-   * See https://cloud.google.com/dlp/docs/pseudonymization to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CryptoHashConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CryptoHashConfig) - com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CryptoHashConfig.class, com.google.privacy.dlp.v2.CryptoHashConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CryptoHashConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (cryptoKeyBuilder_ == null) { - cryptoKey_ = null; - } else { - cryptoKey_ = null; - cryptoKeyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoHashConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoHashConfig build() { - com.google.privacy.dlp.v2.CryptoHashConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoHashConfig buildPartial() { - com.google.privacy.dlp.v2.CryptoHashConfig result = new com.google.privacy.dlp.v2.CryptoHashConfig(this); - if (cryptoKeyBuilder_ == null) { - result.cryptoKey_ = cryptoKey_; - } else { - result.cryptoKey_ = cryptoKeyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CryptoHashConfig) { - return mergeFrom((com.google.privacy.dlp.v2.CryptoHashConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CryptoHashConfig other) { - if (other == com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance()) return this; - if (other.hasCryptoKey()) { - mergeCryptoKey(other.getCryptoKey()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CryptoHashConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CryptoHashConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> cryptoKeyBuilder_; - /** - *
-     * The key used by the hash function.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return Whether the cryptoKey field is set. - */ - public boolean hasCryptoKey() { - return cryptoKeyBuilder_ != null || cryptoKey_ != null; - } - /** - *
-     * The key used by the hash function.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return The cryptoKey. - */ - public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { - if (cryptoKeyBuilder_ == null) { - return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; - } else { - return cryptoKeyBuilder_.getMessage(); - } - } - /** - *
-     * The key used by the hash function.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public Builder setCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { - if (cryptoKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cryptoKey_ = value; - onChanged(); - } else { - cryptoKeyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The key used by the hash function.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public Builder setCryptoKey( - com.google.privacy.dlp.v2.CryptoKey.Builder builderForValue) { - if (cryptoKeyBuilder_ == null) { - cryptoKey_ = builderForValue.build(); - onChanged(); - } else { - cryptoKeyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The key used by the hash function.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public Builder mergeCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { - if (cryptoKeyBuilder_ == null) { - if (cryptoKey_ != null) { - cryptoKey_ = - com.google.privacy.dlp.v2.CryptoKey.newBuilder(cryptoKey_).mergeFrom(value).buildPartial(); - } else { - cryptoKey_ = value; - } - onChanged(); - } else { - cryptoKeyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The key used by the hash function.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public Builder clearCryptoKey() { - if (cryptoKeyBuilder_ == null) { - cryptoKey_ = null; - onChanged(); - } else { - cryptoKey_ = null; - cryptoKeyBuilder_ = null; - } - - return this; - } - /** - *
-     * The key used by the hash function.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public com.google.privacy.dlp.v2.CryptoKey.Builder getCryptoKeyBuilder() { - - onChanged(); - return getCryptoKeyFieldBuilder().getBuilder(); - } - /** - *
-     * The key used by the hash function.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { - if (cryptoKeyBuilder_ != null) { - return cryptoKeyBuilder_.getMessageOrBuilder(); - } else { - return cryptoKey_ == null ? - com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; - } - } - /** - *
-     * The key used by the hash function.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> - getCryptoKeyFieldBuilder() { - if (cryptoKeyBuilder_ == null) { - cryptoKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder>( - getCryptoKey(), - getParentForChildren(), - isClean()); - cryptoKey_ = null; - } - return cryptoKeyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CryptoHashConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CryptoHashConfig) - private static final com.google.privacy.dlp.v2.CryptoHashConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CryptoHashConfig(); - } - - public static com.google.privacy.dlp.v2.CryptoHashConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CryptoHashConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CryptoHashConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoHashConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfigOrBuilder.java deleted file mode 100644 index 325b7849a6a0..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoHashConfigOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CryptoHashConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CryptoHashConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The key used by the hash function.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return Whether the cryptoKey field is set. - */ - boolean hasCryptoKey(); - /** - *
-   * The key used by the hash function.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - * @return The cryptoKey. - */ - com.google.privacy.dlp.v2.CryptoKey getCryptoKey(); - /** - *
-   * The key used by the hash function.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1; - */ - com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKey.java deleted file mode 100644 index 9e4b088b5b4f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKey.java +++ /dev/null @@ -1,1297 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * This is a data encryption key (DEK) (as opposed to
- * a key encryption key (KEK) stored by Cloud Key Management Service
- * (Cloud KMS).
- * When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate
- * IAM policy on the KEK to ensure an attacker cannot
- * unwrap the DEK.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CryptoKey} - */ -public final class CryptoKey extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CryptoKey) - CryptoKeyOrBuilder { -private static final long serialVersionUID = 0L; - // Use CryptoKey.newBuilder() to construct. - private CryptoKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CryptoKey() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CryptoKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CryptoKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.TransientCryptoKey.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.TransientCryptoKey) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.privacy.dlp.v2.TransientCryptoKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.TransientCryptoKey) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.privacy.dlp.v2.UnwrappedCryptoKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder subBuilder = null; - if (sourceCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.privacy.dlp.v2.KmsWrappedCryptoKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 3; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CryptoKey.class, com.google.privacy.dlp.v2.CryptoKey.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TRANSIENT(1), - UNWRAPPED(2), - KMS_WRAPPED(3), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 1: return TRANSIENT; - case 2: return UNWRAPPED; - case 3: return KMS_WRAPPED; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int TRANSIENT_FIELD_NUMBER = 1; - /** - *
-   * Transient crypto key
-   * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - * @return Whether the transient field is set. - */ - @java.lang.Override - public boolean hasTransient() { - return sourceCase_ == 1; - } - /** - *
-   * Transient crypto key
-   * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - * @return The transient. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransientCryptoKey getTransient() { - if (sourceCase_ == 1) { - return (com.google.privacy.dlp.v2.TransientCryptoKey) source_; - } - return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); - } - /** - *
-   * Transient crypto key
-   * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder getTransientOrBuilder() { - if (sourceCase_ == 1) { - return (com.google.privacy.dlp.v2.TransientCryptoKey) source_; - } - return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); - } - - public static final int UNWRAPPED_FIELD_NUMBER = 2; - /** - *
-   * Unwrapped crypto key
-   * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - * @return Whether the unwrapped field is set. - */ - @java.lang.Override - public boolean hasUnwrapped() { - return sourceCase_ == 2; - } - /** - *
-   * Unwrapped crypto key
-   * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - * @return The unwrapped. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.UnwrappedCryptoKey getUnwrapped() { - if (sourceCase_ == 2) { - return (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_; - } - return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); - } - /** - *
-   * Unwrapped crypto key
-   * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder() { - if (sourceCase_ == 2) { - return (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_; - } - return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); - } - - public static final int KMS_WRAPPED_FIELD_NUMBER = 3; - /** - *
-   * Key wrapped using Cloud KMS
-   * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - * @return Whether the kmsWrapped field is set. - */ - @java.lang.Override - public boolean hasKmsWrapped() { - return sourceCase_ == 3; - } - /** - *
-   * Key wrapped using Cloud KMS
-   * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - * @return The kmsWrapped. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.KmsWrappedCryptoKey getKmsWrapped() { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_; - } - return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); - } - /** - *
-   * Key wrapped using Cloud KMS
-   * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder() { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_; - } - return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sourceCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.TransientCryptoKey) source_); - } - if (sourceCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_); - } - if (sourceCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sourceCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.TransientCryptoKey) source_); - } - if (sourceCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_); - } - if (sourceCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CryptoKey)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CryptoKey other = (com.google.privacy.dlp.v2.CryptoKey) obj; - - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 1: - if (!getTransient() - .equals(other.getTransient())) return false; - break; - case 2: - if (!getUnwrapped() - .equals(other.getUnwrapped())) return false; - break; - case 3: - if (!getKmsWrapped() - .equals(other.getKmsWrapped())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (sourceCase_) { - case 1: - hash = (37 * hash) + TRANSIENT_FIELD_NUMBER; - hash = (53 * hash) + getTransient().hashCode(); - break; - case 2: - hash = (37 * hash) + UNWRAPPED_FIELD_NUMBER; - hash = (53 * hash) + getUnwrapped().hashCode(); - break; - case 3: - hash = (37 * hash) + KMS_WRAPPED_FIELD_NUMBER; - hash = (53 * hash) + getKmsWrapped().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CryptoKey parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoKey parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoKey parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoKey parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoKey parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoKey parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoKey parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CryptoKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * This is a data encryption key (DEK) (as opposed to
-   * a key encryption key (KEK) stored by Cloud Key Management Service
-   * (Cloud KMS).
-   * When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate
-   * IAM policy on the KEK to ensure an attacker cannot
-   * unwrap the DEK.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CryptoKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CryptoKey) - com.google.privacy.dlp.v2.CryptoKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CryptoKey.class, com.google.privacy.dlp.v2.CryptoKey.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CryptoKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoKey_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKey getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKey build() { - com.google.privacy.dlp.v2.CryptoKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKey buildPartial() { - com.google.privacy.dlp.v2.CryptoKey result = new com.google.privacy.dlp.v2.CryptoKey(this); - if (sourceCase_ == 1) { - if (transientBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = transientBuilder_.build(); - } - } - if (sourceCase_ == 2) { - if (unwrappedBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = unwrappedBuilder_.build(); - } - } - if (sourceCase_ == 3) { - if (kmsWrappedBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = kmsWrappedBuilder_.build(); - } - } - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CryptoKey) { - return mergeFrom((com.google.privacy.dlp.v2.CryptoKey)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CryptoKey other) { - if (other == com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance()) return this; - switch (other.getSourceCase()) { - case TRANSIENT: { - mergeTransient(other.getTransient()); - break; - } - case UNWRAPPED: { - mergeUnwrapped(other.getUnwrapped()); - break; - } - case KMS_WRAPPED: { - mergeKmsWrapped(other.getKmsWrapped()); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CryptoKey parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CryptoKey) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransientCryptoKey, com.google.privacy.dlp.v2.TransientCryptoKey.Builder, com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder> transientBuilder_; - /** - *
-     * Transient crypto key
-     * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - * @return Whether the transient field is set. - */ - @java.lang.Override - public boolean hasTransient() { - return sourceCase_ == 1; - } - /** - *
-     * Transient crypto key
-     * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - * @return The transient. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransientCryptoKey getTransient() { - if (transientBuilder_ == null) { - if (sourceCase_ == 1) { - return (com.google.privacy.dlp.v2.TransientCryptoKey) source_; - } - return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); - } else { - if (sourceCase_ == 1) { - return transientBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); - } - } - /** - *
-     * Transient crypto key
-     * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - */ - public Builder setTransient(com.google.privacy.dlp.v2.TransientCryptoKey value) { - if (transientBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - transientBuilder_.setMessage(value); - } - sourceCase_ = 1; - return this; - } - /** - *
-     * Transient crypto key
-     * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - */ - public Builder setTransient( - com.google.privacy.dlp.v2.TransientCryptoKey.Builder builderForValue) { - if (transientBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - transientBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 1; - return this; - } - /** - *
-     * Transient crypto key
-     * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - */ - public Builder mergeTransient(com.google.privacy.dlp.v2.TransientCryptoKey value) { - if (transientBuilder_ == null) { - if (sourceCase_ == 1 && - source_ != com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance()) { - source_ = com.google.privacy.dlp.v2.TransientCryptoKey.newBuilder((com.google.privacy.dlp.v2.TransientCryptoKey) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 1) { - transientBuilder_.mergeFrom(value); - } else { - transientBuilder_.setMessage(value); - } - } - sourceCase_ = 1; - return this; - } - /** - *
-     * Transient crypto key
-     * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - */ - public Builder clearTransient() { - if (transientBuilder_ == null) { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - } - transientBuilder_.clear(); - } - return this; - } - /** - *
-     * Transient crypto key
-     * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - */ - public com.google.privacy.dlp.v2.TransientCryptoKey.Builder getTransientBuilder() { - return getTransientFieldBuilder().getBuilder(); - } - /** - *
-     * Transient crypto key
-     * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder getTransientOrBuilder() { - if ((sourceCase_ == 1) && (transientBuilder_ != null)) { - return transientBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 1) { - return (com.google.privacy.dlp.v2.TransientCryptoKey) source_; - } - return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); - } - } - /** - *
-     * Transient crypto key
-     * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransientCryptoKey, com.google.privacy.dlp.v2.TransientCryptoKey.Builder, com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder> - getTransientFieldBuilder() { - if (transientBuilder_ == null) { - if (!(sourceCase_ == 1)) { - source_ = com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); - } - transientBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransientCryptoKey, com.google.privacy.dlp.v2.TransientCryptoKey.Builder, com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder>( - (com.google.privacy.dlp.v2.TransientCryptoKey) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 1; - onChanged();; - return transientBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.UnwrappedCryptoKey, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder, com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder> unwrappedBuilder_; - /** - *
-     * Unwrapped crypto key
-     * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - * @return Whether the unwrapped field is set. - */ - @java.lang.Override - public boolean hasUnwrapped() { - return sourceCase_ == 2; - } - /** - *
-     * Unwrapped crypto key
-     * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - * @return The unwrapped. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.UnwrappedCryptoKey getUnwrapped() { - if (unwrappedBuilder_ == null) { - if (sourceCase_ == 2) { - return (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_; - } - return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); - } else { - if (sourceCase_ == 2) { - return unwrappedBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); - } - } - /** - *
-     * Unwrapped crypto key
-     * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - */ - public Builder setUnwrapped(com.google.privacy.dlp.v2.UnwrappedCryptoKey value) { - if (unwrappedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - unwrappedBuilder_.setMessage(value); - } - sourceCase_ = 2; - return this; - } - /** - *
-     * Unwrapped crypto key
-     * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - */ - public Builder setUnwrapped( - com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder builderForValue) { - if (unwrappedBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - unwrappedBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 2; - return this; - } - /** - *
-     * Unwrapped crypto key
-     * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - */ - public Builder mergeUnwrapped(com.google.privacy.dlp.v2.UnwrappedCryptoKey value) { - if (unwrappedBuilder_ == null) { - if (sourceCase_ == 2 && - source_ != com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance()) { - source_ = com.google.privacy.dlp.v2.UnwrappedCryptoKey.newBuilder((com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 2) { - unwrappedBuilder_.mergeFrom(value); - } else { - unwrappedBuilder_.setMessage(value); - } - } - sourceCase_ = 2; - return this; - } - /** - *
-     * Unwrapped crypto key
-     * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - */ - public Builder clearUnwrapped() { - if (unwrappedBuilder_ == null) { - if (sourceCase_ == 2) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 2) { - sourceCase_ = 0; - source_ = null; - } - unwrappedBuilder_.clear(); - } - return this; - } - /** - *
-     * Unwrapped crypto key
-     * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - */ - public com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder getUnwrappedBuilder() { - return getUnwrappedFieldBuilder().getBuilder(); - } - /** - *
-     * Unwrapped crypto key
-     * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder() { - if ((sourceCase_ == 2) && (unwrappedBuilder_ != null)) { - return unwrappedBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 2) { - return (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_; - } - return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); - } - } - /** - *
-     * Unwrapped crypto key
-     * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.UnwrappedCryptoKey, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder, com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder> - getUnwrappedFieldBuilder() { - if (unwrappedBuilder_ == null) { - if (!(sourceCase_ == 2)) { - source_ = com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); - } - unwrappedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.UnwrappedCryptoKey, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder, com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder>( - (com.google.privacy.dlp.v2.UnwrappedCryptoKey) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 2; - onChanged();; - return unwrappedBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.KmsWrappedCryptoKey, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder, com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder> kmsWrappedBuilder_; - /** - *
-     * Key wrapped using Cloud KMS
-     * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - * @return Whether the kmsWrapped field is set. - */ - @java.lang.Override - public boolean hasKmsWrapped() { - return sourceCase_ == 3; - } - /** - *
-     * Key wrapped using Cloud KMS
-     * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - * @return The kmsWrapped. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.KmsWrappedCryptoKey getKmsWrapped() { - if (kmsWrappedBuilder_ == null) { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_; - } - return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); - } else { - if (sourceCase_ == 3) { - return kmsWrappedBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); - } - } - /** - *
-     * Key wrapped using Cloud KMS
-     * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - */ - public Builder setKmsWrapped(com.google.privacy.dlp.v2.KmsWrappedCryptoKey value) { - if (kmsWrappedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - kmsWrappedBuilder_.setMessage(value); - } - sourceCase_ = 3; - return this; - } - /** - *
-     * Key wrapped using Cloud KMS
-     * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - */ - public Builder setKmsWrapped( - com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder builderForValue) { - if (kmsWrappedBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - kmsWrappedBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 3; - return this; - } - /** - *
-     * Key wrapped using Cloud KMS
-     * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - */ - public Builder mergeKmsWrapped(com.google.privacy.dlp.v2.KmsWrappedCryptoKey value) { - if (kmsWrappedBuilder_ == null) { - if (sourceCase_ == 3 && - source_ != com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance()) { - source_ = com.google.privacy.dlp.v2.KmsWrappedCryptoKey.newBuilder((com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 3) { - kmsWrappedBuilder_.mergeFrom(value); - } else { - kmsWrappedBuilder_.setMessage(value); - } - } - sourceCase_ = 3; - return this; - } - /** - *
-     * Key wrapped using Cloud KMS
-     * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - */ - public Builder clearKmsWrapped() { - if (kmsWrappedBuilder_ == null) { - if (sourceCase_ == 3) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 3) { - sourceCase_ = 0; - source_ = null; - } - kmsWrappedBuilder_.clear(); - } - return this; - } - /** - *
-     * Key wrapped using Cloud KMS
-     * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - */ - public com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder getKmsWrappedBuilder() { - return getKmsWrappedFieldBuilder().getBuilder(); - } - /** - *
-     * Key wrapped using Cloud KMS
-     * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder() { - if ((sourceCase_ == 3) && (kmsWrappedBuilder_ != null)) { - return kmsWrappedBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_; - } - return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); - } - } - /** - *
-     * Key wrapped using Cloud KMS
-     * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.KmsWrappedCryptoKey, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder, com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder> - getKmsWrappedFieldBuilder() { - if (kmsWrappedBuilder_ == null) { - if (!(sourceCase_ == 3)) { - source_ = com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); - } - kmsWrappedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.KmsWrappedCryptoKey, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder, com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder>( - (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 3; - onChanged();; - return kmsWrappedBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CryptoKey) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CryptoKey) - private static final com.google.privacy.dlp.v2.CryptoKey DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CryptoKey(); - } - - public static com.google.privacy.dlp.v2.CryptoKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CryptoKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CryptoKey(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKeyOrBuilder.java deleted file mode 100644 index 8dbe769f2435..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoKeyOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CryptoKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CryptoKey) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Transient crypto key
-   * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - * @return Whether the transient field is set. - */ - boolean hasTransient(); - /** - *
-   * Transient crypto key
-   * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - * @return The transient. - */ - com.google.privacy.dlp.v2.TransientCryptoKey getTransient(); - /** - *
-   * Transient crypto key
-   * 
- * - * .google.privacy.dlp.v2.TransientCryptoKey transient = 1; - */ - com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder getTransientOrBuilder(); - - /** - *
-   * Unwrapped crypto key
-   * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - * @return Whether the unwrapped field is set. - */ - boolean hasUnwrapped(); - /** - *
-   * Unwrapped crypto key
-   * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - * @return The unwrapped. - */ - com.google.privacy.dlp.v2.UnwrappedCryptoKey getUnwrapped(); - /** - *
-   * Unwrapped crypto key
-   * 
- * - * .google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2; - */ - com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder(); - - /** - *
-   * Key wrapped using Cloud KMS
-   * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - * @return Whether the kmsWrapped field is set. - */ - boolean hasKmsWrapped(); - /** - *
-   * Key wrapped using Cloud KMS
-   * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - * @return The kmsWrapped. - */ - com.google.privacy.dlp.v2.KmsWrappedCryptoKey getKmsWrapped(); - /** - *
-   * Key wrapped using Cloud KMS
-   * 
- * - * .google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3; - */ - com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder(); - - public com.google.privacy.dlp.v2.CryptoKey.SourceCase getSourceCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java deleted file mode 100644 index 9ab2cb66d752..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java +++ /dev/null @@ -1,2400 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Replaces an identifier with a surrogate using Format Preserving Encryption
- * (FPE) with the FFX mode of operation; however when used in the
- * `ReidentifyContent` API method, it serves the opposite function by reversing
- * the surrogate back into the original identifier. The identifier must be
- * encoded as ASCII. For a given crypto key and context, the same identifier
- * will be replaced with the same surrogate. Identifiers must be at least two
- * characters long. In the case that the identifier is the empty string, it will
- * be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn
- * more.
- * Note: We recommend using  CryptoDeterministicConfig for all use cases which
- * do not require preserving the input alphabet space and size, plus warrant
- * referential integrity.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} - */ -public final class CryptoReplaceFfxFpeConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) - CryptoReplaceFfxFpeConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use CryptoReplaceFfxFpeConfig.newBuilder() to construct. - private CryptoReplaceFfxFpeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CryptoReplaceFfxFpeConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CryptoReplaceFfxFpeConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CryptoReplaceFfxFpeConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CryptoKey.Builder subBuilder = null; - if (cryptoKey_ != null) { - subBuilder = cryptoKey_.toBuilder(); - } - cryptoKey_ = input.readMessage(com.google.privacy.dlp.v2.CryptoKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cryptoKey_); - cryptoKey_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (context_ != null) { - subBuilder = context_.toBuilder(); - } - context_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(context_); - context_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - int rawValue = input.readEnum(); - alphabetCase_ = 4; - alphabet_ = rawValue; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - alphabetCase_ = 5; - alphabet_ = s; - break; - } - case 48: { - alphabet_ = input.readInt32(); - alphabetCase_ = 6; - break; - } - case 66: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (surrogateInfoType_ != null) { - subBuilder = surrogateInfoType_.toBuilder(); - } - surrogateInfoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(surrogateInfoType_); - surrogateInfoType_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.class, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder.class); - } - - /** - *
-   * These are commonly used subsets of the alphabet that the FFX mode
-   * natively supports. In the algorithm, the alphabet is selected using
-   * the "radix". Therefore each corresponds to a particular radix.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet} - */ - public enum FfxCommonNativeAlphabet - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; - */ - FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED(0), - /** - *
-     * `[0-9]` (radix of 10)
-     * 
- * - * NUMERIC = 1; - */ - NUMERIC(1), - /** - *
-     * `[0-9A-F]` (radix of 16)
-     * 
- * - * HEXADECIMAL = 2; - */ - HEXADECIMAL(2), - /** - *
-     * `[0-9A-Z]` (radix of 36)
-     * 
- * - * UPPER_CASE_ALPHA_NUMERIC = 3; - */ - UPPER_CASE_ALPHA_NUMERIC(3), - /** - *
-     * `[0-9A-Za-z]` (radix of 62)
-     * 
- * - * ALPHA_NUMERIC = 4; - */ - ALPHA_NUMERIC(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; - */ - public static final int FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED_VALUE = 0; - /** - *
-     * `[0-9]` (radix of 10)
-     * 
- * - * NUMERIC = 1; - */ - public static final int NUMERIC_VALUE = 1; - /** - *
-     * `[0-9A-F]` (radix of 16)
-     * 
- * - * HEXADECIMAL = 2; - */ - public static final int HEXADECIMAL_VALUE = 2; - /** - *
-     * `[0-9A-Z]` (radix of 36)
-     * 
- * - * UPPER_CASE_ALPHA_NUMERIC = 3; - */ - public static final int UPPER_CASE_ALPHA_NUMERIC_VALUE = 3; - /** - *
-     * `[0-9A-Za-z]` (radix of 62)
-     * 
- * - * ALPHA_NUMERIC = 4; - */ - public static final int ALPHA_NUMERIC_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static FfxCommonNativeAlphabet valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static FfxCommonNativeAlphabet forNumber(int value) { - switch (value) { - case 0: return FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED; - case 1: return NUMERIC; - case 2: return HEXADECIMAL; - case 3: return UPPER_CASE_ALPHA_NUMERIC; - case 4: return ALPHA_NUMERIC; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - FfxCommonNativeAlphabet> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public FfxCommonNativeAlphabet findValueByNumber(int number) { - return FfxCommonNativeAlphabet.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final FfxCommonNativeAlphabet[] VALUES = values(); - - public static FfxCommonNativeAlphabet valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private FfxCommonNativeAlphabet(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet) - } - - private int alphabetCase_ = 0; - private java.lang.Object alphabet_; - public enum AlphabetCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - COMMON_ALPHABET(4), - CUSTOM_ALPHABET(5), - RADIX(6), - ALPHABET_NOT_SET(0); - private final int value; - private AlphabetCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AlphabetCase valueOf(int value) { - return forNumber(value); - } - - public static AlphabetCase forNumber(int value) { - switch (value) { - case 4: return COMMON_ALPHABET; - case 5: return CUSTOM_ALPHABET; - case 6: return RADIX; - case 0: return ALPHABET_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public AlphabetCase - getAlphabetCase() { - return AlphabetCase.forNumber( - alphabetCase_); - } - - public static final int CRYPTO_KEY_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; - /** - *
-   * Required. The key used by the encryption algorithm.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the cryptoKey field is set. - */ - @java.lang.Override - public boolean hasCryptoKey() { - return cryptoKey_ != null; - } - /** - *
-   * Required. The key used by the encryption algorithm.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The cryptoKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { - return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; - } - /** - *
-   * Required. The key used by the encryption algorithm.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { - return getCryptoKey(); - } - - public static final int CONTEXT_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.FieldId context_; - /** - *
-   * The 'tweak', a context may be used for higher security since the same
-   * identifier in two different contexts won't be given the same surrogate. If
-   * the context is not set, a default tweak will be used.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 1. the field is not present when transforming a given value,
-   * a default tweak will be used.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * Currently, the referenced field may be of value type integer or string.
-   * The tweak is constructed as a sequence of bytes in big endian byte order
-   * such that:
-   * - a 64 bit integer is encoded followed by a single byte of value 1
-   * - a string is encoded in UTF-8 format followed by a single byte of value 2
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - * @return Whether the context field is set. - */ - @java.lang.Override - public boolean hasContext() { - return context_ != null; - } - /** - *
-   * The 'tweak', a context may be used for higher security since the same
-   * identifier in two different contexts won't be given the same surrogate. If
-   * the context is not set, a default tweak will be used.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 1. the field is not present when transforming a given value,
-   * a default tweak will be used.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * Currently, the referenced field may be of value type integer or string.
-   * The tweak is constructed as a sequence of bytes in big endian byte order
-   * such that:
-   * - a 64 bit integer is encoded followed by a single byte of value 1
-   * - a string is encoded in UTF-8 format followed by a single byte of value 2
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - * @return The context. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getContext() { - return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; - } - /** - *
-   * The 'tweak', a context may be used for higher security since the same
-   * identifier in two different contexts won't be given the same surrogate. If
-   * the context is not set, a default tweak will be used.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 1. the field is not present when transforming a given value,
-   * a default tweak will be used.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * Currently, the referenced field may be of value type integer or string.
-   * The tweak is constructed as a sequence of bytes in big endian byte order
-   * such that:
-   * - a 64 bit integer is encoded followed by a single byte of value 1
-   * - a string is encoded in UTF-8 format followed by a single byte of value 2
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { - return getContext(); - } - - public static final int COMMON_ALPHABET_FIELD_NUMBER = 4; - /** - *
-   * Common alphabets.
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return Whether the commonAlphabet field is set. - */ - public boolean hasCommonAlphabet() { - return alphabetCase_ == 4; - } - /** - *
-   * Common alphabets.
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return The enum numeric value on the wire for commonAlphabet. - */ - public int getCommonAlphabetValue() { - if (alphabetCase_ == 4) { - return (java.lang.Integer) alphabet_; - } - return 0; - } - /** - *
-   * Common alphabets.
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return The commonAlphabet. - */ - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet getCommonAlphabet() { - if (alphabetCase_ == 4) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet result = com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.valueOf( - (java.lang.Integer) alphabet_); - return result == null ? com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED; - } - - public static final int CUSTOM_ALPHABET_FIELD_NUMBER = 5; - /** - *
-   * This is supported by mapping these to the alphanumeric characters
-   * that the FFX mode natively supports. This happens before/after
-   * encryption/decryption.
-   * Each character listed must appear only once.
-   * Number of characters must be in the range [2, 95].
-   * This must be encoded as ASCII.
-   * The order of characters does not matter.
-   * The full list of allowed characters is:
-   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-   * 
- * - * string custom_alphabet = 5; - * @return Whether the customAlphabet field is set. - */ - public boolean hasCustomAlphabet() { - return alphabetCase_ == 5; - } - /** - *
-   * This is supported by mapping these to the alphanumeric characters
-   * that the FFX mode natively supports. This happens before/after
-   * encryption/decryption.
-   * Each character listed must appear only once.
-   * Number of characters must be in the range [2, 95].
-   * This must be encoded as ASCII.
-   * The order of characters does not matter.
-   * The full list of allowed characters is:
-   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-   * 
- * - * string custom_alphabet = 5; - * @return The customAlphabet. - */ - public java.lang.String getCustomAlphabet() { - java.lang.Object ref = ""; - if (alphabetCase_ == 5) { - ref = alphabet_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (alphabetCase_ == 5) { - alphabet_ = s; - } - return s; - } - } - /** - *
-   * This is supported by mapping these to the alphanumeric characters
-   * that the FFX mode natively supports. This happens before/after
-   * encryption/decryption.
-   * Each character listed must appear only once.
-   * Number of characters must be in the range [2, 95].
-   * This must be encoded as ASCII.
-   * The order of characters does not matter.
-   * The full list of allowed characters is:
-   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-   * 
- * - * string custom_alphabet = 5; - * @return The bytes for customAlphabet. - */ - public com.google.protobuf.ByteString - getCustomAlphabetBytes() { - java.lang.Object ref = ""; - if (alphabetCase_ == 5) { - ref = alphabet_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (alphabetCase_ == 5) { - alphabet_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RADIX_FIELD_NUMBER = 6; - /** - *
-   * The native way to select the alphabet. Must be in the range [2, 95].
-   * 
- * - * int32 radix = 6; - * @return Whether the radix field is set. - */ - @java.lang.Override - public boolean hasRadix() { - return alphabetCase_ == 6; - } - /** - *
-   * The native way to select the alphabet. Must be in the range [2, 95].
-   * 
- * - * int32 radix = 6; - * @return The radix. - */ - @java.lang.Override - public int getRadix() { - if (alphabetCase_ == 6) { - return (java.lang.Integer) alphabet_; - } - return 0; - } - - public static final int SURROGATE_INFO_TYPE_FIELD_NUMBER = 8; - private com.google.privacy.dlp.v2.InfoType surrogateInfoType_; - /** - *
-   * The custom infoType to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom infoType followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: info_type_name(surrogate_character_count):surrogate
-   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom infoType
-   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-   * This facilitates reversal of the surrogate when it occurs in free text.
-   * In order for inspection to work properly, the name of this infoType must
-   * not occur naturally anywhere in your data; otherwise, inspection may
-   * find a surrogate that does not correspond to an actual identifier.
-   * Therefore, choose your custom infoType name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - * @return Whether the surrogateInfoType field is set. - */ - @java.lang.Override - public boolean hasSurrogateInfoType() { - return surrogateInfoType_ != null; - } - /** - *
-   * The custom infoType to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom infoType followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: info_type_name(surrogate_character_count):surrogate
-   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom infoType
-   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-   * This facilitates reversal of the surrogate when it occurs in free text.
-   * In order for inspection to work properly, the name of this infoType must
-   * not occur naturally anywhere in your data; otherwise, inspection may
-   * find a surrogate that does not correspond to an actual identifier.
-   * Therefore, choose your custom infoType name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - * @return The surrogateInfoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getSurrogateInfoType() { - return surrogateInfoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; - } - /** - *
-   * The custom infoType to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom infoType followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: info_type_name(surrogate_character_count):surrogate
-   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom infoType
-   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-   * This facilitates reversal of the surrogate when it occurs in free text.
-   * In order for inspection to work properly, the name of this infoType must
-   * not occur naturally anywhere in your data; otherwise, inspection may
-   * find a surrogate that does not correspond to an actual identifier.
-   * Therefore, choose your custom infoType name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder() { - return getSurrogateInfoType(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (cryptoKey_ != null) { - output.writeMessage(1, getCryptoKey()); - } - if (context_ != null) { - output.writeMessage(2, getContext()); - } - if (alphabetCase_ == 4) { - output.writeEnum(4, ((java.lang.Integer) alphabet_)); - } - if (alphabetCase_ == 5) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, alphabet_); - } - if (alphabetCase_ == 6) { - output.writeInt32( - 6, (int)((java.lang.Integer) alphabet_)); - } - if (surrogateInfoType_ != null) { - output.writeMessage(8, getSurrogateInfoType()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (cryptoKey_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCryptoKey()); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getContext()); - } - if (alphabetCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, ((java.lang.Integer) alphabet_)); - } - if (alphabetCase_ == 5) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, alphabet_); - } - if (alphabetCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 6, (int)((java.lang.Integer) alphabet_)); - } - if (surrogateInfoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getSurrogateInfoType()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig other = (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) obj; - - if (hasCryptoKey() != other.hasCryptoKey()) return false; - if (hasCryptoKey()) { - if (!getCryptoKey() - .equals(other.getCryptoKey())) return false; - } - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext() - .equals(other.getContext())) return false; - } - if (hasSurrogateInfoType() != other.hasSurrogateInfoType()) return false; - if (hasSurrogateInfoType()) { - if (!getSurrogateInfoType() - .equals(other.getSurrogateInfoType())) return false; - } - if (!getAlphabetCase().equals(other.getAlphabetCase())) return false; - switch (alphabetCase_) { - case 4: - if (getCommonAlphabetValue() - != other.getCommonAlphabetValue()) return false; - break; - case 5: - if (!getCustomAlphabet() - .equals(other.getCustomAlphabet())) return false; - break; - case 6: - if (getRadix() - != other.getRadix()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCryptoKey()) { - hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; - hash = (53 * hash) + getCryptoKey().hashCode(); - } - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } - if (hasSurrogateInfoType()) { - hash = (37 * hash) + SURROGATE_INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getSurrogateInfoType().hashCode(); - } - switch (alphabetCase_) { - case 4: - hash = (37 * hash) + COMMON_ALPHABET_FIELD_NUMBER; - hash = (53 * hash) + getCommonAlphabetValue(); - break; - case 5: - hash = (37 * hash) + CUSTOM_ALPHABET_FIELD_NUMBER; - hash = (53 * hash) + getCustomAlphabet().hashCode(); - break; - case 6: - hash = (37 * hash) + RADIX_FIELD_NUMBER; - hash = (53 * hash) + getRadix(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Replaces an identifier with a surrogate using Format Preserving Encryption
-   * (FPE) with the FFX mode of operation; however when used in the
-   * `ReidentifyContent` API method, it serves the opposite function by reversing
-   * the surrogate back into the original identifier. The identifier must be
-   * encoded as ASCII. For a given crypto key and context, the same identifier
-   * will be replaced with the same surrogate. Identifiers must be at least two
-   * characters long. In the case that the identifier is the empty string, it will
-   * be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn
-   * more.
-   * Note: We recommend using  CryptoDeterministicConfig for all use cases which
-   * do not require preserving the input alphabet space and size, plus warrant
-   * referential integrity.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.class, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (cryptoKeyBuilder_ == null) { - cryptoKey_ = null; - } else { - cryptoKey_ = null; - cryptoKeyBuilder_ = null; - } - if (contextBuilder_ == null) { - context_ = null; - } else { - context_ = null; - contextBuilder_ = null; - } - if (surrogateInfoTypeBuilder_ == null) { - surrogateInfoType_ = null; - } else { - surrogateInfoType_ = null; - surrogateInfoTypeBuilder_ = null; - } - alphabetCase_ = 0; - alphabet_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig build() { - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig buildPartial() { - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig result = new com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig(this); - if (cryptoKeyBuilder_ == null) { - result.cryptoKey_ = cryptoKey_; - } else { - result.cryptoKey_ = cryptoKeyBuilder_.build(); - } - if (contextBuilder_ == null) { - result.context_ = context_; - } else { - result.context_ = contextBuilder_.build(); - } - if (alphabetCase_ == 4) { - result.alphabet_ = alphabet_; - } - if (alphabetCase_ == 5) { - result.alphabet_ = alphabet_; - } - if (alphabetCase_ == 6) { - result.alphabet_ = alphabet_; - } - if (surrogateInfoTypeBuilder_ == null) { - result.surrogateInfoType_ = surrogateInfoType_; - } else { - result.surrogateInfoType_ = surrogateInfoTypeBuilder_.build(); - } - result.alphabetCase_ = alphabetCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) { - return mergeFrom((com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig other) { - if (other == com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance()) return this; - if (other.hasCryptoKey()) { - mergeCryptoKey(other.getCryptoKey()); - } - if (other.hasContext()) { - mergeContext(other.getContext()); - } - if (other.hasSurrogateInfoType()) { - mergeSurrogateInfoType(other.getSurrogateInfoType()); - } - switch (other.getAlphabetCase()) { - case COMMON_ALPHABET: { - setCommonAlphabetValue(other.getCommonAlphabetValue()); - break; - } - case CUSTOM_ALPHABET: { - alphabetCase_ = 5; - alphabet_ = other.alphabet_; - onChanged(); - break; - } - case RADIX: { - setRadix(other.getRadix()); - break; - } - case ALPHABET_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int alphabetCase_ = 0; - private java.lang.Object alphabet_; - public AlphabetCase - getAlphabetCase() { - return AlphabetCase.forNumber( - alphabetCase_); - } - - public Builder clearAlphabet() { - alphabetCase_ = 0; - alphabet_ = null; - onChanged(); - return this; - } - - - private com.google.privacy.dlp.v2.CryptoKey cryptoKey_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> cryptoKeyBuilder_; - /** - *
-     * Required. The key used by the encryption algorithm.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the cryptoKey field is set. - */ - public boolean hasCryptoKey() { - return cryptoKeyBuilder_ != null || cryptoKey_ != null; - } - /** - *
-     * Required. The key used by the encryption algorithm.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The cryptoKey. - */ - public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { - if (cryptoKeyBuilder_ == null) { - return cryptoKey_ == null ? com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; - } else { - return cryptoKeyBuilder_.getMessage(); - } - } - /** - *
-     * Required. The key used by the encryption algorithm.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { - if (cryptoKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - cryptoKey_ = value; - onChanged(); - } else { - cryptoKeyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The key used by the encryption algorithm.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setCryptoKey( - com.google.privacy.dlp.v2.CryptoKey.Builder builderForValue) { - if (cryptoKeyBuilder_ == null) { - cryptoKey_ = builderForValue.build(); - onChanged(); - } else { - cryptoKeyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The key used by the encryption algorithm.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { - if (cryptoKeyBuilder_ == null) { - if (cryptoKey_ != null) { - cryptoKey_ = - com.google.privacy.dlp.v2.CryptoKey.newBuilder(cryptoKey_).mergeFrom(value).buildPartial(); - } else { - cryptoKey_ = value; - } - onChanged(); - } else { - cryptoKeyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The key used by the encryption algorithm.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearCryptoKey() { - if (cryptoKeyBuilder_ == null) { - cryptoKey_ = null; - onChanged(); - } else { - cryptoKey_ = null; - cryptoKeyBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The key used by the encryption algorithm.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.CryptoKey.Builder getCryptoKeyBuilder() { - - onChanged(); - return getCryptoKeyFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The key used by the encryption algorithm.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { - if (cryptoKeyBuilder_ != null) { - return cryptoKeyBuilder_.getMessageOrBuilder(); - } else { - return cryptoKey_ == null ? - com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance() : cryptoKey_; - } - } - /** - *
-     * Required. The key used by the encryption algorithm.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> - getCryptoKeyFieldBuilder() { - if (cryptoKeyBuilder_ == null) { - cryptoKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder>( - getCryptoKey(), - getParentForChildren(), - isClean()); - cryptoKey_ = null; - } - return cryptoKeyBuilder_; - } - - private com.google.privacy.dlp.v2.FieldId context_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> contextBuilder_; - /** - *
-     * The 'tweak', a context may be used for higher security since the same
-     * identifier in two different contexts won't be given the same surrogate. If
-     * the context is not set, a default tweak will be used.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 1. the field is not present when transforming a given value,
-     * a default tweak will be used.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * Currently, the referenced field may be of value type integer or string.
-     * The tweak is constructed as a sequence of bytes in big endian byte order
-     * such that:
-     * - a 64 bit integer is encoded followed by a single byte of value 1
-     * - a string is encoded in UTF-8 format followed by a single byte of value 2
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - * @return Whether the context field is set. - */ - public boolean hasContext() { - return contextBuilder_ != null || context_ != null; - } - /** - *
-     * The 'tweak', a context may be used for higher security since the same
-     * identifier in two different contexts won't be given the same surrogate. If
-     * the context is not set, a default tweak will be used.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 1. the field is not present when transforming a given value,
-     * a default tweak will be used.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * Currently, the referenced field may be of value type integer or string.
-     * The tweak is constructed as a sequence of bytes in big endian byte order
-     * such that:
-     * - a 64 bit integer is encoded followed by a single byte of value 1
-     * - a string is encoded in UTF-8 format followed by a single byte of value 2
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - * @return The context. - */ - public com.google.privacy.dlp.v2.FieldId getContext() { - if (contextBuilder_ == null) { - return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - *
-     * The 'tweak', a context may be used for higher security since the same
-     * identifier in two different contexts won't be given the same surrogate. If
-     * the context is not set, a default tweak will be used.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 1. the field is not present when transforming a given value,
-     * a default tweak will be used.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * Currently, the referenced field may be of value type integer or string.
-     * The tweak is constructed as a sequence of bytes in big endian byte order
-     * such that:
-     * - a 64 bit integer is encoded followed by a single byte of value 1
-     * - a string is encoded in UTF-8 format followed by a single byte of value 2
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - */ - public Builder setContext(com.google.privacy.dlp.v2.FieldId value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - contextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The 'tweak', a context may be used for higher security since the same
-     * identifier in two different contexts won't be given the same surrogate. If
-     * the context is not set, a default tweak will be used.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 1. the field is not present when transforming a given value,
-     * a default tweak will be used.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * Currently, the referenced field may be of value type integer or string.
-     * The tweak is constructed as a sequence of bytes in big endian byte order
-     * such that:
-     * - a 64 bit integer is encoded followed by a single byte of value 1
-     * - a string is encoded in UTF-8 format followed by a single byte of value 2
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - */ - public Builder setContext( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The 'tweak', a context may be used for higher security since the same
-     * identifier in two different contexts won't be given the same surrogate. If
-     * the context is not set, a default tweak will be used.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 1. the field is not present when transforming a given value,
-     * a default tweak will be used.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * Currently, the referenced field may be of value type integer or string.
-     * The tweak is constructed as a sequence of bytes in big endian byte order
-     * such that:
-     * - a 64 bit integer is encoded followed by a single byte of value 1
-     * - a string is encoded in UTF-8 format followed by a single byte of value 2
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - */ - public Builder mergeContext(com.google.privacy.dlp.v2.FieldId value) { - if (contextBuilder_ == null) { - if (context_ != null) { - context_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(context_).mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - contextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The 'tweak', a context may be used for higher security since the same
-     * identifier in two different contexts won't be given the same surrogate. If
-     * the context is not set, a default tweak will be used.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 1. the field is not present when transforming a given value,
-     * a default tweak will be used.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * Currently, the referenced field may be of value type integer or string.
-     * The tweak is constructed as a sequence of bytes in big endian byte order
-     * such that:
-     * - a 64 bit integer is encoded followed by a single byte of value 1
-     * - a string is encoded in UTF-8 format followed by a single byte of value 2
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - */ - public Builder clearContext() { - if (contextBuilder_ == null) { - context_ = null; - onChanged(); - } else { - context_ = null; - contextBuilder_ = null; - } - - return this; - } - /** - *
-     * The 'tweak', a context may be used for higher security since the same
-     * identifier in two different contexts won't be given the same surrogate. If
-     * the context is not set, a default tweak will be used.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 1. the field is not present when transforming a given value,
-     * a default tweak will be used.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * Currently, the referenced field may be of value type integer or string.
-     * The tweak is constructed as a sequence of bytes in big endian byte order
-     * such that:
-     * - a 64 bit integer is encoded followed by a single byte of value 1
-     * - a string is encoded in UTF-8 format followed by a single byte of value 2
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getContextBuilder() { - - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - *
-     * The 'tweak', a context may be used for higher security since the same
-     * identifier in two different contexts won't be given the same surrogate. If
-     * the context is not set, a default tweak will be used.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 1. the field is not present when transforming a given value,
-     * a default tweak will be used.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * Currently, the referenced field may be of value type integer or string.
-     * The tweak is constructed as a sequence of bytes in big endian byte order
-     * such that:
-     * - a 64 bit integer is encoded followed by a single byte of value 1
-     * - a string is encoded in UTF-8 format followed by a single byte of value 2
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; - } - } - /** - *
-     * The 'tweak', a context may be used for higher security since the same
-     * identifier in two different contexts won't be given the same surrogate. If
-     * the context is not set, a default tweak will be used.
-     * If the context is set but:
-     * 1. there is no record present when transforming a given value or
-     * 1. the field is not present when transforming a given value,
-     * a default tweak will be used.
-     * Note that case (1) is expected when an `InfoTypeTransformation` is
-     * applied to both structured and unstructured `ContentItem`s.
-     * Currently, the referenced field may be of value type integer or string.
-     * The tweak is constructed as a sequence of bytes in big endian byte order
-     * such that:
-     * - a 64 bit integer is encoded followed by a single byte of value 1
-     * - a string is encoded in UTF-8 format followed by a single byte of value 2
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - - /** - *
-     * Common alphabets.
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return Whether the commonAlphabet field is set. - */ - @java.lang.Override - public boolean hasCommonAlphabet() { - return alphabetCase_ == 4; - } - /** - *
-     * Common alphabets.
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return The enum numeric value on the wire for commonAlphabet. - */ - @java.lang.Override - public int getCommonAlphabetValue() { - if (alphabetCase_ == 4) { - return ((java.lang.Integer) alphabet_).intValue(); - } - return 0; - } - /** - *
-     * Common alphabets.
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @param value The enum numeric value on the wire for commonAlphabet to set. - * @return This builder for chaining. - */ - public Builder setCommonAlphabetValue(int value) { - alphabetCase_ = 4; - alphabet_ = value; - onChanged(); - return this; - } - /** - *
-     * Common alphabets.
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return The commonAlphabet. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet getCommonAlphabet() { - if (alphabetCase_ == 4) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet result = com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.valueOf( - (java.lang.Integer) alphabet_); - return result == null ? com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet.FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED; - } - /** - *
-     * Common alphabets.
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @param value The commonAlphabet to set. - * @return This builder for chaining. - */ - public Builder setCommonAlphabet(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet value) { - if (value == null) { - throw new NullPointerException(); - } - alphabetCase_ = 4; - alphabet_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Common alphabets.
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return This builder for chaining. - */ - public Builder clearCommonAlphabet() { - if (alphabetCase_ == 4) { - alphabetCase_ = 0; - alphabet_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * This is supported by mapping these to the alphanumeric characters
-     * that the FFX mode natively supports. This happens before/after
-     * encryption/decryption.
-     * Each character listed must appear only once.
-     * Number of characters must be in the range [2, 95].
-     * This must be encoded as ASCII.
-     * The order of characters does not matter.
-     * The full list of allowed characters is:
-     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-     * 
- * - * string custom_alphabet = 5; - * @return Whether the customAlphabet field is set. - */ - @java.lang.Override - public boolean hasCustomAlphabet() { - return alphabetCase_ == 5; - } - /** - *
-     * This is supported by mapping these to the alphanumeric characters
-     * that the FFX mode natively supports. This happens before/after
-     * encryption/decryption.
-     * Each character listed must appear only once.
-     * Number of characters must be in the range [2, 95].
-     * This must be encoded as ASCII.
-     * The order of characters does not matter.
-     * The full list of allowed characters is:
-     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-     * 
- * - * string custom_alphabet = 5; - * @return The customAlphabet. - */ - @java.lang.Override - public java.lang.String getCustomAlphabet() { - java.lang.Object ref = ""; - if (alphabetCase_ == 5) { - ref = alphabet_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (alphabetCase_ == 5) { - alphabet_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * This is supported by mapping these to the alphanumeric characters
-     * that the FFX mode natively supports. This happens before/after
-     * encryption/decryption.
-     * Each character listed must appear only once.
-     * Number of characters must be in the range [2, 95].
-     * This must be encoded as ASCII.
-     * The order of characters does not matter.
-     * The full list of allowed characters is:
-     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-     * 
- * - * string custom_alphabet = 5; - * @return The bytes for customAlphabet. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCustomAlphabetBytes() { - java.lang.Object ref = ""; - if (alphabetCase_ == 5) { - ref = alphabet_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (alphabetCase_ == 5) { - alphabet_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * This is supported by mapping these to the alphanumeric characters
-     * that the FFX mode natively supports. This happens before/after
-     * encryption/decryption.
-     * Each character listed must appear only once.
-     * Number of characters must be in the range [2, 95].
-     * This must be encoded as ASCII.
-     * The order of characters does not matter.
-     * The full list of allowed characters is:
-     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-     * 
- * - * string custom_alphabet = 5; - * @param value The customAlphabet to set. - * @return This builder for chaining. - */ - public Builder setCustomAlphabet( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - alphabetCase_ = 5; - alphabet_ = value; - onChanged(); - return this; - } - /** - *
-     * This is supported by mapping these to the alphanumeric characters
-     * that the FFX mode natively supports. This happens before/after
-     * encryption/decryption.
-     * Each character listed must appear only once.
-     * Number of characters must be in the range [2, 95].
-     * This must be encoded as ASCII.
-     * The order of characters does not matter.
-     * The full list of allowed characters is:
-     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-     * 
- * - * string custom_alphabet = 5; - * @return This builder for chaining. - */ - public Builder clearCustomAlphabet() { - if (alphabetCase_ == 5) { - alphabetCase_ = 0; - alphabet_ = null; - onChanged(); - } - return this; - } - /** - *
-     * This is supported by mapping these to the alphanumeric characters
-     * that the FFX mode natively supports. This happens before/after
-     * encryption/decryption.
-     * Each character listed must appear only once.
-     * Number of characters must be in the range [2, 95].
-     * This must be encoded as ASCII.
-     * The order of characters does not matter.
-     * The full list of allowed characters is:
-     * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-     * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-     * 
- * - * string custom_alphabet = 5; - * @param value The bytes for customAlphabet to set. - * @return This builder for chaining. - */ - public Builder setCustomAlphabetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - alphabetCase_ = 5; - alphabet_ = value; - onChanged(); - return this; - } - - /** - *
-     * The native way to select the alphabet. Must be in the range [2, 95].
-     * 
- * - * int32 radix = 6; - * @return Whether the radix field is set. - */ - public boolean hasRadix() { - return alphabetCase_ == 6; - } - /** - *
-     * The native way to select the alphabet. Must be in the range [2, 95].
-     * 
- * - * int32 radix = 6; - * @return The radix. - */ - public int getRadix() { - if (alphabetCase_ == 6) { - return (java.lang.Integer) alphabet_; - } - return 0; - } - /** - *
-     * The native way to select the alphabet. Must be in the range [2, 95].
-     * 
- * - * int32 radix = 6; - * @param value The radix to set. - * @return This builder for chaining. - */ - public Builder setRadix(int value) { - alphabetCase_ = 6; - alphabet_ = value; - onChanged(); - return this; - } - /** - *
-     * The native way to select the alphabet. Must be in the range [2, 95].
-     * 
- * - * int32 radix = 6; - * @return This builder for chaining. - */ - public Builder clearRadix() { - if (alphabetCase_ == 6) { - alphabetCase_ = 0; - alphabet_ = null; - onChanged(); - } - return this; - } - - private com.google.privacy.dlp.v2.InfoType surrogateInfoType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> surrogateInfoTypeBuilder_; - /** - *
-     * The custom infoType to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom infoType followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: info_type_name(surrogate_character_count):surrogate
-     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom infoType
-     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-     * This facilitates reversal of the surrogate when it occurs in free text.
-     * In order for inspection to work properly, the name of this infoType must
-     * not occur naturally anywhere in your data; otherwise, inspection may
-     * find a surrogate that does not correspond to an actual identifier.
-     * Therefore, choose your custom infoType name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - * @return Whether the surrogateInfoType field is set. - */ - public boolean hasSurrogateInfoType() { - return surrogateInfoTypeBuilder_ != null || surrogateInfoType_ != null; - } - /** - *
-     * The custom infoType to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom infoType followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: info_type_name(surrogate_character_count):surrogate
-     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom infoType
-     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-     * This facilitates reversal of the surrogate when it occurs in free text.
-     * In order for inspection to work properly, the name of this infoType must
-     * not occur naturally anywhere in your data; otherwise, inspection may
-     * find a surrogate that does not correspond to an actual identifier.
-     * Therefore, choose your custom infoType name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - * @return The surrogateInfoType. - */ - public com.google.privacy.dlp.v2.InfoType getSurrogateInfoType() { - if (surrogateInfoTypeBuilder_ == null) { - return surrogateInfoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; - } else { - return surrogateInfoTypeBuilder_.getMessage(); - } - } - /** - *
-     * The custom infoType to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom infoType followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: info_type_name(surrogate_character_count):surrogate
-     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom infoType
-     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-     * This facilitates reversal of the surrogate when it occurs in free text.
-     * In order for inspection to work properly, the name of this infoType must
-     * not occur naturally anywhere in your data; otherwise, inspection may
-     * find a surrogate that does not correspond to an actual identifier.
-     * Therefore, choose your custom infoType name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - */ - public Builder setSurrogateInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (surrogateInfoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - surrogateInfoType_ = value; - onChanged(); - } else { - surrogateInfoTypeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The custom infoType to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom infoType followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: info_type_name(surrogate_character_count):surrogate
-     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom infoType
-     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-     * This facilitates reversal of the surrogate when it occurs in free text.
-     * In order for inspection to work properly, the name of this infoType must
-     * not occur naturally anywhere in your data; otherwise, inspection may
-     * find a surrogate that does not correspond to an actual identifier.
-     * Therefore, choose your custom infoType name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - */ - public Builder setSurrogateInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (surrogateInfoTypeBuilder_ == null) { - surrogateInfoType_ = builderForValue.build(); - onChanged(); - } else { - surrogateInfoTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The custom infoType to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom infoType followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: info_type_name(surrogate_character_count):surrogate
-     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom infoType
-     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-     * This facilitates reversal of the surrogate when it occurs in free text.
-     * In order for inspection to work properly, the name of this infoType must
-     * not occur naturally anywhere in your data; otherwise, inspection may
-     * find a surrogate that does not correspond to an actual identifier.
-     * Therefore, choose your custom infoType name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - */ - public Builder mergeSurrogateInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (surrogateInfoTypeBuilder_ == null) { - if (surrogateInfoType_ != null) { - surrogateInfoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(surrogateInfoType_).mergeFrom(value).buildPartial(); - } else { - surrogateInfoType_ = value; - } - onChanged(); - } else { - surrogateInfoTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The custom infoType to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom infoType followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: info_type_name(surrogate_character_count):surrogate
-     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom infoType
-     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-     * This facilitates reversal of the surrogate when it occurs in free text.
-     * In order for inspection to work properly, the name of this infoType must
-     * not occur naturally anywhere in your data; otherwise, inspection may
-     * find a surrogate that does not correspond to an actual identifier.
-     * Therefore, choose your custom infoType name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - */ - public Builder clearSurrogateInfoType() { - if (surrogateInfoTypeBuilder_ == null) { - surrogateInfoType_ = null; - onChanged(); - } else { - surrogateInfoType_ = null; - surrogateInfoTypeBuilder_ = null; - } - - return this; - } - /** - *
-     * The custom infoType to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom infoType followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: info_type_name(surrogate_character_count):surrogate
-     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom infoType
-     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-     * This facilitates reversal of the surrogate when it occurs in free text.
-     * In order for inspection to work properly, the name of this infoType must
-     * not occur naturally anywhere in your data; otherwise, inspection may
-     * find a surrogate that does not correspond to an actual identifier.
-     * Therefore, choose your custom infoType name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getSurrogateInfoTypeBuilder() { - - onChanged(); - return getSurrogateInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-     * The custom infoType to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom infoType followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: info_type_name(surrogate_character_count):surrogate
-     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom infoType
-     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-     * This facilitates reversal of the surrogate when it occurs in free text.
-     * In order for inspection to work properly, the name of this infoType must
-     * not occur naturally anywhere in your data; otherwise, inspection may
-     * find a surrogate that does not correspond to an actual identifier.
-     * Therefore, choose your custom infoType name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder() { - if (surrogateInfoTypeBuilder_ != null) { - return surrogateInfoTypeBuilder_.getMessageOrBuilder(); - } else { - return surrogateInfoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : surrogateInfoType_; - } - } - /** - *
-     * The custom infoType to annotate the surrogate with.
-     * This annotation will be applied to the surrogate by prefixing it with
-     * the name of the custom infoType followed by the number of
-     * characters comprising the surrogate. The following scheme defines the
-     * format: info_type_name(surrogate_character_count):surrogate
-     * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-     * the surrogate is 'abc', the full replacement value
-     * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-     * This annotation identifies the surrogate when inspecting content using the
-     * custom infoType
-     * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-     * This facilitates reversal of the surrogate when it occurs in free text.
-     * In order for inspection to work properly, the name of this infoType must
-     * not occur naturally anywhere in your data; otherwise, inspection may
-     * find a surrogate that does not correspond to an actual identifier.
-     * Therefore, choose your custom infoType name carefully after considering
-     * what your data looks like. One way to select a name that has a high chance
-     * of yielding reliable detection is to include one or more unicode characters
-     * that are highly improbable to exist in your data.
-     * For example, assuming your data is entered from a regular ASCII keyboard,
-     * the symbol with the hex code point 29DD might be used like so:
-     * ⧝MY_TOKEN_TYPE
-     * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getSurrogateInfoTypeFieldBuilder() { - if (surrogateInfoTypeBuilder_ == null) { - surrogateInfoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getSurrogateInfoType(), - getParentForChildren(), - isClean()); - surrogateInfoType_ = null; - } - return surrogateInfoTypeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) - private static final com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig(); - } - - public static com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CryptoReplaceFfxFpeConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CryptoReplaceFfxFpeConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java deleted file mode 100644 index 248d1bcbb4c7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfigOrBuilder.java +++ /dev/null @@ -1,297 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface CryptoReplaceFfxFpeConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The key used by the encryption algorithm.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the cryptoKey field is set. - */ - boolean hasCryptoKey(); - /** - *
-   * Required. The key used by the encryption algorithm.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The cryptoKey. - */ - com.google.privacy.dlp.v2.CryptoKey getCryptoKey(); - /** - *
-   * Required. The key used by the encryption algorithm.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder(); - - /** - *
-   * The 'tweak', a context may be used for higher security since the same
-   * identifier in two different contexts won't be given the same surrogate. If
-   * the context is not set, a default tweak will be used.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 1. the field is not present when transforming a given value,
-   * a default tweak will be used.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * Currently, the referenced field may be of value type integer or string.
-   * The tweak is constructed as a sequence of bytes in big endian byte order
-   * such that:
-   * - a 64 bit integer is encoded followed by a single byte of value 1
-   * - a string is encoded in UTF-8 format followed by a single byte of value 2
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - *
-   * The 'tweak', a context may be used for higher security since the same
-   * identifier in two different contexts won't be given the same surrogate. If
-   * the context is not set, a default tweak will be used.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 1. the field is not present when transforming a given value,
-   * a default tweak will be used.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * Currently, the referenced field may be of value type integer or string.
-   * The tweak is constructed as a sequence of bytes in big endian byte order
-   * such that:
-   * - a 64 bit integer is encoded followed by a single byte of value 1
-   * - a string is encoded in UTF-8 format followed by a single byte of value 2
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - * @return The context. - */ - com.google.privacy.dlp.v2.FieldId getContext(); - /** - *
-   * The 'tweak', a context may be used for higher security since the same
-   * identifier in two different contexts won't be given the same surrogate. If
-   * the context is not set, a default tweak will be used.
-   * If the context is set but:
-   * 1. there is no record present when transforming a given value or
-   * 1. the field is not present when transforming a given value,
-   * a default tweak will be used.
-   * Note that case (1) is expected when an `InfoTypeTransformation` is
-   * applied to both structured and unstructured `ContentItem`s.
-   * Currently, the referenced field may be of value type integer or string.
-   * The tweak is constructed as a sequence of bytes in big endian byte order
-   * such that:
-   * - a 64 bit integer is encoded followed by a single byte of value 1
-   * - a string is encoded in UTF-8 format followed by a single byte of value 2
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 2; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder(); - - /** - *
-   * Common alphabets.
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return Whether the commonAlphabet field is set. - */ - boolean hasCommonAlphabet(); - /** - *
-   * Common alphabets.
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return The enum numeric value on the wire for commonAlphabet. - */ - int getCommonAlphabetValue(); - /** - *
-   * Common alphabets.
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet common_alphabet = 4; - * @return The commonAlphabet. - */ - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet getCommonAlphabet(); - - /** - *
-   * This is supported by mapping these to the alphanumeric characters
-   * that the FFX mode natively supports. This happens before/after
-   * encryption/decryption.
-   * Each character listed must appear only once.
-   * Number of characters must be in the range [2, 95].
-   * This must be encoded as ASCII.
-   * The order of characters does not matter.
-   * The full list of allowed characters is:
-   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-   * 
- * - * string custom_alphabet = 5; - * @return Whether the customAlphabet field is set. - */ - boolean hasCustomAlphabet(); - /** - *
-   * This is supported by mapping these to the alphanumeric characters
-   * that the FFX mode natively supports. This happens before/after
-   * encryption/decryption.
-   * Each character listed must appear only once.
-   * Number of characters must be in the range [2, 95].
-   * This must be encoded as ASCII.
-   * The order of characters does not matter.
-   * The full list of allowed characters is:
-   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-   * 
- * - * string custom_alphabet = 5; - * @return The customAlphabet. - */ - java.lang.String getCustomAlphabet(); - /** - *
-   * This is supported by mapping these to the alphanumeric characters
-   * that the FFX mode natively supports. This happens before/after
-   * encryption/decryption.
-   * Each character listed must appear only once.
-   * Number of characters must be in the range [2, 95].
-   * This must be encoded as ASCII.
-   * The order of characters does not matter.
-   * The full list of allowed characters is:
-   * <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-   * ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/</code>
-   * 
- * - * string custom_alphabet = 5; - * @return The bytes for customAlphabet. - */ - com.google.protobuf.ByteString - getCustomAlphabetBytes(); - - /** - *
-   * The native way to select the alphabet. Must be in the range [2, 95].
-   * 
- * - * int32 radix = 6; - * @return Whether the radix field is set. - */ - boolean hasRadix(); - /** - *
-   * The native way to select the alphabet. Must be in the range [2, 95].
-   * 
- * - * int32 radix = 6; - * @return The radix. - */ - int getRadix(); - - /** - *
-   * The custom infoType to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom infoType followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: info_type_name(surrogate_character_count):surrogate
-   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom infoType
-   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-   * This facilitates reversal of the surrogate when it occurs in free text.
-   * In order for inspection to work properly, the name of this infoType must
-   * not occur naturally anywhere in your data; otherwise, inspection may
-   * find a surrogate that does not correspond to an actual identifier.
-   * Therefore, choose your custom infoType name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - * @return Whether the surrogateInfoType field is set. - */ - boolean hasSurrogateInfoType(); - /** - *
-   * The custom infoType to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom infoType followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: info_type_name(surrogate_character_count):surrogate
-   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom infoType
-   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-   * This facilitates reversal of the surrogate when it occurs in free text.
-   * In order for inspection to work properly, the name of this infoType must
-   * not occur naturally anywhere in your data; otherwise, inspection may
-   * find a surrogate that does not correspond to an actual identifier.
-   * Therefore, choose your custom infoType name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - * @return The surrogateInfoType. - */ - com.google.privacy.dlp.v2.InfoType getSurrogateInfoType(); - /** - *
-   * The custom infoType to annotate the surrogate with.
-   * This annotation will be applied to the surrogate by prefixing it with
-   * the name of the custom infoType followed by the number of
-   * characters comprising the surrogate. The following scheme defines the
-   * format: info_type_name(surrogate_character_count):surrogate
-   * For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and
-   * the surrogate is 'abc', the full replacement value
-   * will be: 'MY_TOKEN_INFO_TYPE(3):abc'
-   * This annotation identifies the surrogate when inspecting content using the
-   * custom infoType
-   * [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype).
-   * This facilitates reversal of the surrogate when it occurs in free text.
-   * In order for inspection to work properly, the name of this infoType must
-   * not occur naturally anywhere in your data; otherwise, inspection may
-   * find a surrogate that does not correspond to an actual identifier.
-   * Therefore, choose your custom infoType name carefully after considering
-   * what your data looks like. One way to select a name that has a high chance
-   * of yielding reliable detection is to include one or more unicode characters
-   * that are highly improbable to exist in your data.
-   * For example, assuming your data is entered from a regular ASCII keyboard,
-   * the symbol with the hex code point 29DD might be used like so:
-   * ⧝MY_TOKEN_TYPE
-   * 
- * - * .google.privacy.dlp.v2.InfoType surrogate_info_type = 8; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder(); - - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.AlphabetCase getAlphabetCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java deleted file mode 100644 index 6ab039fca74e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java +++ /dev/null @@ -1,9675 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Custom information type provided by the user. Used to find domain-specific
- * sensitive information configurable to the data in question.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType} - */ -public final class CustomInfoType extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType) - CustomInfoTypeOrBuilder { -private static final long serialVersionUID = 0L; - // Use CustomInfoType.newBuilder() to construct. - private CustomInfoType(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CustomInfoType() { - likelihood_ = 0; - detectionRules_ = java.util.Collections.emptyList(); - exclusionType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CustomInfoType(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CustomInfoType( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (infoType_ != null) { - subBuilder = infoType_.toBuilder(); - } - infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infoType_); - infoType_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder subBuilder = null; - if (typeCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null; - if (typeCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 3; - break; - } - case 34: { - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder subBuilder = null; - if (typeCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 4; - break; - } - case 42: { - com.google.privacy.dlp.v2.StoredType.Builder subBuilder = null; - if (typeCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.StoredType) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.StoredType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.StoredType) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 5; - break; - } - case 48: { - int rawValue = input.readEnum(); - - likelihood_ = rawValue; - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - detectionRules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - detectionRules_.add( - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.parser(), extensionRegistry)); - break; - } - case 64: { - int rawValue = input.readEnum(); - - exclusionType_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - detectionRules_ = java.util.Collections.unmodifiableList(detectionRules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.class, com.google.privacy.dlp.v2.CustomInfoType.Builder.class); - } - - /** - * Protobuf enum {@code google.privacy.dlp.v2.CustomInfoType.ExclusionType} - */ - public enum ExclusionType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * A finding of this custom info type will not be excluded from results.
-     * 
- * - * EXCLUSION_TYPE_UNSPECIFIED = 0; - */ - EXCLUSION_TYPE_UNSPECIFIED(0), - /** - *
-     * A finding of this custom info type will be excluded from final results,
-     * but can still affect rule execution.
-     * 
- * - * EXCLUSION_TYPE_EXCLUDE = 1; - */ - EXCLUSION_TYPE_EXCLUDE(1), - UNRECOGNIZED(-1), - ; - - /** - *
-     * A finding of this custom info type will not be excluded from results.
-     * 
- * - * EXCLUSION_TYPE_UNSPECIFIED = 0; - */ - public static final int EXCLUSION_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * A finding of this custom info type will be excluded from final results,
-     * but can still affect rule execution.
-     * 
- * - * EXCLUSION_TYPE_EXCLUDE = 1; - */ - public static final int EXCLUSION_TYPE_EXCLUDE_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ExclusionType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ExclusionType forNumber(int value) { - switch (value) { - case 0: return EXCLUSION_TYPE_UNSPECIFIED; - case 1: return EXCLUSION_TYPE_EXCLUDE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ExclusionType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ExclusionType findValueByNumber(int number) { - return ExclusionType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.CustomInfoType.getDescriptor().getEnumTypes().get(0); - } - - private static final ExclusionType[] VALUES = values(); - - public static ExclusionType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ExclusionType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.CustomInfoType.ExclusionType) - } - - public interface DictionaryOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Dictionary) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * List of words or phrases to search for.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return Whether the wordList field is set. - */ - boolean hasWordList(); - /** - *
-     * List of words or phrases to search for.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return The wordList. - */ - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList(); - /** - *
-     * List of words or phrases to search for.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder(); - - /** - *
-     * Newline-delimited file of words in Cloud Storage. Only a single file
-     * is accepted.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - * @return Whether the cloudStoragePath field is set. - */ - boolean hasCloudStoragePath(); - /** - *
-     * Newline-delimited file of words in Cloud Storage. Only a single file
-     * is accepted.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - * @return The cloudStoragePath. - */ - com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath(); - /** - *
-     * Newline-delimited file of words in Cloud Storage. Only a single file
-     * is accepted.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - */ - com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder(); - - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.SourceCase getSourceCase(); - } - /** - *
-   * Custom information type based on a dictionary of words or phrases. This can
-   * be used to match sensitive information specific to the data, such as a list
-   * of employee IDs or job titles.
-   * Dictionary words are case-insensitive and all characters other than letters
-   * and digits in the unicode [Basic Multilingual
-   * Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
-   * will be replaced with whitespace when scanning for matches, so the
-   * dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
-   * "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
-   * surrounding any match must be of a different type than the adjacent
-   * characters within the word, so letters must be next to non-letters and
-   * digits next to non-digits. For example, the dictionary word "jen" will
-   * match the first three letters of the text "jen123" but will return no
-   * matches for "jennifer".
-   * Dictionary words containing a large number of characters that are not
-   * letters or digits may result in unexpected findings because such characters
-   * are treated as whitespace. The
-   * [limits](https://cloud.google.com/dlp/limits) page contains details about
-   * the size limits of dictionaries. For dictionaries that do not fit within
-   * these constraints, consider using `LargeCustomDictionaryConfig` in the
-   * `StoredInfoType` API.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary} - */ - public static final class Dictionary extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary) - DictionaryOrBuilder { - private static final long serialVersionUID = 0L; - // Use Dictionary.newBuilder() to construct. - private Dictionary(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Dictionary() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Dictionary(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Dictionary( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 26: { - com.google.privacy.dlp.v2.CloudStoragePath.Builder subBuilder = null; - if (sourceCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.CloudStoragePath) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.privacy.dlp.v2.CloudStoragePath.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CloudStoragePath) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 3; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.class, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder.class); - } - - public interface WordListOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Words or phrases defining the dictionary. The dictionary must contain
-       * at least one phrase and every phrase must contain at least 2 characters
-       * that are letters or digits. [required]
-       * 
- * - * repeated string words = 1; - * @return A list containing the words. - */ - java.util.List - getWordsList(); - /** - *
-       * Words or phrases defining the dictionary. The dictionary must contain
-       * at least one phrase and every phrase must contain at least 2 characters
-       * that are letters or digits. [required]
-       * 
- * - * repeated string words = 1; - * @return The count of words. - */ - int getWordsCount(); - /** - *
-       * Words or phrases defining the dictionary. The dictionary must contain
-       * at least one phrase and every phrase must contain at least 2 characters
-       * that are letters or digits. [required]
-       * 
- * - * repeated string words = 1; - * @param index The index of the element to return. - * @return The words at the given index. - */ - java.lang.String getWords(int index); - /** - *
-       * Words or phrases defining the dictionary. The dictionary must contain
-       * at least one phrase and every phrase must contain at least 2 characters
-       * that are letters or digits. [required]
-       * 
- * - * repeated string words = 1; - * @param index The index of the value to return. - * @return The bytes of the words at the given index. - */ - com.google.protobuf.ByteString - getWordsBytes(int index); - } - /** - *
-     * Message defining a list of words or phrases to search for in the data.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList} - */ - public static final class WordList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) - WordListOrBuilder { - private static final long serialVersionUID = 0L; - // Use WordList.newBuilder() to construct. - private WordList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WordList() { - words_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WordList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private WordList( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - words_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - words_ = words_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.class, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder.class); - } - - public static final int WORDS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList words_; - /** - *
-       * Words or phrases defining the dictionary. The dictionary must contain
-       * at least one phrase and every phrase must contain at least 2 characters
-       * that are letters or digits. [required]
-       * 
- * - * repeated string words = 1; - * @return A list containing the words. - */ - public com.google.protobuf.ProtocolStringList - getWordsList() { - return words_; - } - /** - *
-       * Words or phrases defining the dictionary. The dictionary must contain
-       * at least one phrase and every phrase must contain at least 2 characters
-       * that are letters or digits. [required]
-       * 
- * - * repeated string words = 1; - * @return The count of words. - */ - public int getWordsCount() { - return words_.size(); - } - /** - *
-       * Words or phrases defining the dictionary. The dictionary must contain
-       * at least one phrase and every phrase must contain at least 2 characters
-       * that are letters or digits. [required]
-       * 
- * - * repeated string words = 1; - * @param index The index of the element to return. - * @return The words at the given index. - */ - public java.lang.String getWords(int index) { - return words_.get(index); - } - /** - *
-       * Words or phrases defining the dictionary. The dictionary must contain
-       * at least one phrase and every phrase must contain at least 2 characters
-       * that are letters or digits. [required]
-       * 
- * - * repeated string words = 1; - * @param index The index of the value to return. - * @return The bytes of the words at the given index. - */ - public com.google.protobuf.ByteString - getWordsBytes(int index) { - return words_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < words_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, words_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < words_.size(); i++) { - dataSize += computeStringSizeNoTag(words_.getRaw(i)); - } - size += dataSize; - size += 1 * getWordsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList other = (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) obj; - - if (!getWordsList() - .equals(other.getWordsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getWordsCount() > 0) { - hash = (37 * hash) + WORDS_FIELD_NUMBER; - hash = (53 * hash) + getWordsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * Message defining a list of words or phrases to search for in the data.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.class, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - words_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList build() { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList buildPartial() { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList result = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - words_ = words_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.words_ = words_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) { - return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList other) { - if (other == com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance()) return this; - if (!other.words_.isEmpty()) { - if (words_.isEmpty()) { - words_ = other.words_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWordsIsMutable(); - words_.addAll(other.words_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList words_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - words_ = new com.google.protobuf.LazyStringArrayList(words_); - bitField0_ |= 0x00000001; - } - } - /** - *
-         * Words or phrases defining the dictionary. The dictionary must contain
-         * at least one phrase and every phrase must contain at least 2 characters
-         * that are letters or digits. [required]
-         * 
- * - * repeated string words = 1; - * @return A list containing the words. - */ - public com.google.protobuf.ProtocolStringList - getWordsList() { - return words_.getUnmodifiableView(); - } - /** - *
-         * Words or phrases defining the dictionary. The dictionary must contain
-         * at least one phrase and every phrase must contain at least 2 characters
-         * that are letters or digits. [required]
-         * 
- * - * repeated string words = 1; - * @return The count of words. - */ - public int getWordsCount() { - return words_.size(); - } - /** - *
-         * Words or phrases defining the dictionary. The dictionary must contain
-         * at least one phrase and every phrase must contain at least 2 characters
-         * that are letters or digits. [required]
-         * 
- * - * repeated string words = 1; - * @param index The index of the element to return. - * @return The words at the given index. - */ - public java.lang.String getWords(int index) { - return words_.get(index); - } - /** - *
-         * Words or phrases defining the dictionary. The dictionary must contain
-         * at least one phrase and every phrase must contain at least 2 characters
-         * that are letters or digits. [required]
-         * 
- * - * repeated string words = 1; - * @param index The index of the value to return. - * @return The bytes of the words at the given index. - */ - public com.google.protobuf.ByteString - getWordsBytes(int index) { - return words_.getByteString(index); - } - /** - *
-         * Words or phrases defining the dictionary. The dictionary must contain
-         * at least one phrase and every phrase must contain at least 2 characters
-         * that are letters or digits. [required]
-         * 
- * - * repeated string words = 1; - * @param index The index to set the value at. - * @param value The words to set. - * @return This builder for chaining. - */ - public Builder setWords( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.set(index, value); - onChanged(); - return this; - } - /** - *
-         * Words or phrases defining the dictionary. The dictionary must contain
-         * at least one phrase and every phrase must contain at least 2 characters
-         * that are letters or digits. [required]
-         * 
- * - * repeated string words = 1; - * @param value The words to add. - * @return This builder for chaining. - */ - public Builder addWords( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureWordsIsMutable(); - words_.add(value); - onChanged(); - return this; - } - /** - *
-         * Words or phrases defining the dictionary. The dictionary must contain
-         * at least one phrase and every phrase must contain at least 2 characters
-         * that are letters or digits. [required]
-         * 
- * - * repeated string words = 1; - * @param values The words to add. - * @return This builder for chaining. - */ - public Builder addAllWords( - java.lang.Iterable values) { - ensureWordsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, words_); - onChanged(); - return this; - } - /** - *
-         * Words or phrases defining the dictionary. The dictionary must contain
-         * at least one phrase and every phrase must contain at least 2 characters
-         * that are letters or digits. [required]
-         * 
- * - * repeated string words = 1; - * @return This builder for chaining. - */ - public Builder clearWords() { - words_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-         * Words or phrases defining the dictionary. The dictionary must contain
-         * at least one phrase and every phrase must contain at least 2 characters
-         * that are letters or digits. [required]
-         * 
- * - * repeated string words = 1; - * @param value The bytes of the words to add. - * @return This builder for chaining. - */ - public Builder addWordsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureWordsIsMutable(); - words_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) - private static final com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList(); - } - - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WordList parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WordList(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - WORD_LIST(1), - CLOUD_STORAGE_PATH(3), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 1: return WORD_LIST; - case 3: return CLOUD_STORAGE_PATH; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int WORD_LIST_FIELD_NUMBER = 1; - /** - *
-     * List of words or phrases to search for.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return Whether the wordList field is set. - */ - @java.lang.Override - public boolean hasWordList() { - return sourceCase_ == 1; - } - /** - *
-     * List of words or phrases to search for.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return The wordList. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() { - if (sourceCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - /** - *
-     * List of words or phrases to search for.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder() { - if (sourceCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - - public static final int CLOUD_STORAGE_PATH_FIELD_NUMBER = 3; - /** - *
-     * Newline-delimited file of words in Cloud Storage. Only a single file
-     * is accepted.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - * @return Whether the cloudStoragePath field is set. - */ - @java.lang.Override - public boolean hasCloudStoragePath() { - return sourceCase_ == 3; - } - /** - *
-     * Newline-delimited file of words in Cloud Storage. Only a single file
-     * is accepted.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - * @return The cloudStoragePath. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath() { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.CloudStoragePath) source_; - } - return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); - } - /** - *
-     * Newline-delimited file of words in Cloud Storage. Only a single file
-     * is accepted.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder() { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.CloudStoragePath) source_; - } - return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (sourceCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_); - } - if (sourceCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.CloudStoragePath) source_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sourceCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_); - } - if (sourceCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.CloudStoragePath) source_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CustomInfoType.Dictionary other = (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) obj; - - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 1: - if (!getWordList() - .equals(other.getWordList())) return false; - break; - case 3: - if (!getCloudStoragePath() - .equals(other.getCloudStoragePath())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (sourceCase_) { - case 1: - hash = (37 * hash) + WORD_LIST_FIELD_NUMBER; - hash = (53 * hash) + getWordList().hashCode(); - break; - case 3: - hash = (37 * hash) + CLOUD_STORAGE_PATH_FIELD_NUMBER; - hash = (53 * hash) + getCloudStoragePath().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.Dictionary prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Custom information type based on a dictionary of words or phrases. This can
-     * be used to match sensitive information specific to the data, such as a list
-     * of employee IDs or job titles.
-     * Dictionary words are case-insensitive and all characters other than letters
-     * and digits in the unicode [Basic Multilingual
-     * Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
-     * will be replaced with whitespace when scanning for matches, so the
-     * dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
-     * "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
-     * surrounding any match must be of a different type than the adjacent
-     * characters within the word, so letters must be next to non-letters and
-     * digits next to non-digits. For example, the dictionary word "jen" will
-     * match the first three letters of the text "jen123" but will return no
-     * matches for "jennifer".
-     * Dictionary words containing a large number of characters that are not
-     * letters or digits may result in unexpected findings because such characters
-     * are treated as whitespace. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries. For dictionaries that do not fit within
-     * these constraints, consider using `LargeCustomDictionaryConfig` in the
-     * `StoredInfoType` API.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Dictionary} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Dictionary) - com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.class, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary build() { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary buildPartial() { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary result = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary(this); - if (sourceCase_ == 1) { - if (wordListBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = wordListBuilder_.build(); - } - } - if (sourceCase_ == 3) { - if (cloudStoragePathBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = cloudStoragePathBuilder_.build(); - } - } - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Dictionary) { - return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Dictionary other) { - if (other == com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) return this; - switch (other.getSourceCase()) { - case WORD_LIST: { - mergeWordList(other.getWordList()); - break; - } - case CLOUD_STORAGE_PATH: { - mergeCloudStoragePath(other.getCloudStoragePath()); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder> wordListBuilder_; - /** - *
-       * List of words or phrases to search for.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return Whether the wordList field is set. - */ - @java.lang.Override - public boolean hasWordList() { - return sourceCase_ == 1; - } - /** - *
-       * List of words or phrases to search for.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return The wordList. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() { - if (wordListBuilder_ == null) { - if (sourceCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } else { - if (sourceCase_ == 1) { - return wordListBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - } - /** - *
-       * List of words or phrases to search for.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public Builder setWordList(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) { - if (wordListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - wordListBuilder_.setMessage(value); - } - sourceCase_ = 1; - return this; - } - /** - *
-       * List of words or phrases to search for.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public Builder setWordList( - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder builderForValue) { - if (wordListBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - wordListBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 1; - return this; - } - /** - *
-       * List of words or phrases to search for.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public Builder mergeWordList(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) { - if (wordListBuilder_ == null) { - if (sourceCase_ == 1 && - source_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance()) { - source_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 1) { - wordListBuilder_.mergeFrom(value); - } else { - wordListBuilder_.setMessage(value); - } - } - sourceCase_ = 1; - return this; - } - /** - *
-       * List of words or phrases to search for.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public Builder clearWordList() { - if (wordListBuilder_ == null) { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - } - wordListBuilder_.clear(); - } - return this; - } - /** - *
-       * List of words or phrases to search for.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder getWordListBuilder() { - return getWordListFieldBuilder().getBuilder(); - } - /** - *
-       * List of words or phrases to search for.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder() { - if ((sourceCase_ == 1) && (wordListBuilder_ != null)) { - return wordListBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - } - /** - *
-       * List of words or phrases to search for.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder> - getWordListFieldBuilder() { - if (wordListBuilder_ == null) { - if (!(sourceCase_ == 1)) { - source_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - wordListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 1; - onChanged();; - return wordListBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> cloudStoragePathBuilder_; - /** - *
-       * Newline-delimited file of words in Cloud Storage. Only a single file
-       * is accepted.
-       * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - * @return Whether the cloudStoragePath field is set. - */ - @java.lang.Override - public boolean hasCloudStoragePath() { - return sourceCase_ == 3; - } - /** - *
-       * Newline-delimited file of words in Cloud Storage. Only a single file
-       * is accepted.
-       * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - * @return The cloudStoragePath. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePath getCloudStoragePath() { - if (cloudStoragePathBuilder_ == null) { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.CloudStoragePath) source_; - } - return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); - } else { - if (sourceCase_ == 3) { - return cloudStoragePathBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); - } - } - /** - *
-       * Newline-delimited file of words in Cloud Storage. Only a single file
-       * is accepted.
-       * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - */ - public Builder setCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value) { - if (cloudStoragePathBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - cloudStoragePathBuilder_.setMessage(value); - } - sourceCase_ = 3; - return this; - } - /** - *
-       * Newline-delimited file of words in Cloud Storage. Only a single file
-       * is accepted.
-       * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - */ - public Builder setCloudStoragePath( - com.google.privacy.dlp.v2.CloudStoragePath.Builder builderForValue) { - if (cloudStoragePathBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - cloudStoragePathBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 3; - return this; - } - /** - *
-       * Newline-delimited file of words in Cloud Storage. Only a single file
-       * is accepted.
-       * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - */ - public Builder mergeCloudStoragePath(com.google.privacy.dlp.v2.CloudStoragePath value) { - if (cloudStoragePathBuilder_ == null) { - if (sourceCase_ == 3 && - source_ != com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance()) { - source_ = com.google.privacy.dlp.v2.CloudStoragePath.newBuilder((com.google.privacy.dlp.v2.CloudStoragePath) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 3) { - cloudStoragePathBuilder_.mergeFrom(value); - } else { - cloudStoragePathBuilder_.setMessage(value); - } - } - sourceCase_ = 3; - return this; - } - /** - *
-       * Newline-delimited file of words in Cloud Storage. Only a single file
-       * is accepted.
-       * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - */ - public Builder clearCloudStoragePath() { - if (cloudStoragePathBuilder_ == null) { - if (sourceCase_ == 3) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 3) { - sourceCase_ = 0; - source_ = null; - } - cloudStoragePathBuilder_.clear(); - } - return this; - } - /** - *
-       * Newline-delimited file of words in Cloud Storage. Only a single file
-       * is accepted.
-       * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - */ - public com.google.privacy.dlp.v2.CloudStoragePath.Builder getCloudStoragePathBuilder() { - return getCloudStoragePathFieldBuilder().getBuilder(); - } - /** - *
-       * Newline-delimited file of words in Cloud Storage. Only a single file
-       * is accepted.
-       * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getCloudStoragePathOrBuilder() { - if ((sourceCase_ == 3) && (cloudStoragePathBuilder_ != null)) { - return cloudStoragePathBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.CloudStoragePath) source_; - } - return com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); - } - } - /** - *
-       * Newline-delimited file of words in Cloud Storage. Only a single file
-       * is accepted.
-       * 
- * - * .google.privacy.dlp.v2.CloudStoragePath cloud_storage_path = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> - getCloudStoragePathFieldBuilder() { - if (cloudStoragePathBuilder_ == null) { - if (!(sourceCase_ == 3)) { - source_ = com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance(); - } - cloudStoragePathBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>( - (com.google.privacy.dlp.v2.CloudStoragePath) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 3; - onChanged();; - return cloudStoragePathBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Dictionary) - private static final com.google.privacy.dlp.v2.CustomInfoType.Dictionary DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Dictionary(); - } - - public static com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Dictionary parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Dictionary(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface RegexOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.Regex) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Pattern defining the regular expression. Its syntax
-     * (https://github.com/google/re2/wiki/Syntax) can be found under the
-     * google/re2 repository on GitHub.
-     * 
- * - * string pattern = 1; - * @return The pattern. - */ - java.lang.String getPattern(); - /** - *
-     * Pattern defining the regular expression. Its syntax
-     * (https://github.com/google/re2/wiki/Syntax) can be found under the
-     * google/re2 repository on GitHub.
-     * 
- * - * string pattern = 1; - * @return The bytes for pattern. - */ - com.google.protobuf.ByteString - getPatternBytes(); - - /** - *
-     * The index of the submatch to extract as findings. When not
-     * specified, the entire match is returned. No more than 3 may be included.
-     * 
- * - * repeated int32 group_indexes = 2; - * @return A list containing the groupIndexes. - */ - java.util.List getGroupIndexesList(); - /** - *
-     * The index of the submatch to extract as findings. When not
-     * specified, the entire match is returned. No more than 3 may be included.
-     * 
- * - * repeated int32 group_indexes = 2; - * @return The count of groupIndexes. - */ - int getGroupIndexesCount(); - /** - *
-     * The index of the submatch to extract as findings. When not
-     * specified, the entire match is returned. No more than 3 may be included.
-     * 
- * - * repeated int32 group_indexes = 2; - * @param index The index of the element to return. - * @return The groupIndexes at the given index. - */ - int getGroupIndexes(int index); - } - /** - *
-   * Message defining a custom regular expression.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Regex} - */ - public static final class Regex extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.Regex) - RegexOrBuilder { - private static final long serialVersionUID = 0L; - // Use Regex.newBuilder() to construct. - private Regex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Regex() { - pattern_ = ""; - groupIndexes_ = emptyIntList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Regex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Regex( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - pattern_ = s; - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - groupIndexes_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - groupIndexes_.addInt(input.readInt32()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - groupIndexes_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - groupIndexes_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - groupIndexes_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.Regex.class, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder.class); - } - - public static final int PATTERN_FIELD_NUMBER = 1; - private volatile java.lang.Object pattern_; - /** - *
-     * Pattern defining the regular expression. Its syntax
-     * (https://github.com/google/re2/wiki/Syntax) can be found under the
-     * google/re2 repository on GitHub.
-     * 
- * - * string pattern = 1; - * @return The pattern. - */ - @java.lang.Override - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pattern_ = s; - return s; - } - } - /** - *
-     * Pattern defining the regular expression. Its syntax
-     * (https://github.com/google/re2/wiki/Syntax) can be found under the
-     * google/re2 repository on GitHub.
-     * 
- * - * string pattern = 1; - * @return The bytes for pattern. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GROUP_INDEXES_FIELD_NUMBER = 2; - private com.google.protobuf.Internal.IntList groupIndexes_; - /** - *
-     * The index of the submatch to extract as findings. When not
-     * specified, the entire match is returned. No more than 3 may be included.
-     * 
- * - * repeated int32 group_indexes = 2; - * @return A list containing the groupIndexes. - */ - @java.lang.Override - public java.util.List - getGroupIndexesList() { - return groupIndexes_; - } - /** - *
-     * The index of the submatch to extract as findings. When not
-     * specified, the entire match is returned. No more than 3 may be included.
-     * 
- * - * repeated int32 group_indexes = 2; - * @return The count of groupIndexes. - */ - public int getGroupIndexesCount() { - return groupIndexes_.size(); - } - /** - *
-     * The index of the submatch to extract as findings. When not
-     * specified, the entire match is returned. No more than 3 may be included.
-     * 
- * - * repeated int32 group_indexes = 2; - * @param index The index of the element to return. - * @return The groupIndexes at the given index. - */ - public int getGroupIndexes(int index) { - return groupIndexes_.getInt(index); - } - private int groupIndexesMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pattern_); - } - if (getGroupIndexesList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(groupIndexesMemoizedSerializedSize); - } - for (int i = 0; i < groupIndexes_.size(); i++) { - output.writeInt32NoTag(groupIndexes_.getInt(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pattern_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pattern_); - } - { - int dataSize = 0; - for (int i = 0; i < groupIndexes_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(groupIndexes_.getInt(i)); - } - size += dataSize; - if (!getGroupIndexesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - groupIndexesMemoizedSerializedSize = dataSize; - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.Regex)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CustomInfoType.Regex other = (com.google.privacy.dlp.v2.CustomInfoType.Regex) obj; - - if (!getPattern() - .equals(other.getPattern())) return false; - if (!getGroupIndexesList() - .equals(other.getGroupIndexesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PATTERN_FIELD_NUMBER; - hash = (53 * hash) + getPattern().hashCode(); - if (getGroupIndexesCount() > 0) { - hash = (37 * hash) + GROUP_INDEXES_FIELD_NUMBER; - hash = (53 * hash) + getGroupIndexesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.Regex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.Regex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message defining a custom regular expression.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.Regex} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.Regex) - com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.Regex.class, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - pattern_ = ""; - - groupIndexes_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex build() { - com.google.privacy.dlp.v2.CustomInfoType.Regex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex buildPartial() { - com.google.privacy.dlp.v2.CustomInfoType.Regex result = new com.google.privacy.dlp.v2.CustomInfoType.Regex(this); - int from_bitField0_ = bitField0_; - result.pattern_ = pattern_; - if (((bitField0_ & 0x00000001) != 0)) { - groupIndexes_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.groupIndexes_ = groupIndexes_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.Regex) { - return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.Regex other) { - if (other == com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) return this; - if (!other.getPattern().isEmpty()) { - pattern_ = other.pattern_; - onChanged(); - } - if (!other.groupIndexes_.isEmpty()) { - if (groupIndexes_.isEmpty()) { - groupIndexes_ = other.groupIndexes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureGroupIndexesIsMutable(); - groupIndexes_.addAll(other.groupIndexes_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CustomInfoType.Regex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.Regex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object pattern_ = ""; - /** - *
-       * Pattern defining the regular expression. Its syntax
-       * (https://github.com/google/re2/wiki/Syntax) can be found under the
-       * google/re2 repository on GitHub.
-       * 
- * - * string pattern = 1; - * @return The pattern. - */ - public java.lang.String getPattern() { - java.lang.Object ref = pattern_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pattern_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Pattern defining the regular expression. Its syntax
-       * (https://github.com/google/re2/wiki/Syntax) can be found under the
-       * google/re2 repository on GitHub.
-       * 
- * - * string pattern = 1; - * @return The bytes for pattern. - */ - public com.google.protobuf.ByteString - getPatternBytes() { - java.lang.Object ref = pattern_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Pattern defining the regular expression. Its syntax
-       * (https://github.com/google/re2/wiki/Syntax) can be found under the
-       * google/re2 repository on GitHub.
-       * 
- * - * string pattern = 1; - * @param value The pattern to set. - * @return This builder for chaining. - */ - public Builder setPattern( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pattern_ = value; - onChanged(); - return this; - } - /** - *
-       * Pattern defining the regular expression. Its syntax
-       * (https://github.com/google/re2/wiki/Syntax) can be found under the
-       * google/re2 repository on GitHub.
-       * 
- * - * string pattern = 1; - * @return This builder for chaining. - */ - public Builder clearPattern() { - - pattern_ = getDefaultInstance().getPattern(); - onChanged(); - return this; - } - /** - *
-       * Pattern defining the regular expression. Its syntax
-       * (https://github.com/google/re2/wiki/Syntax) can be found under the
-       * google/re2 repository on GitHub.
-       * 
- * - * string pattern = 1; - * @param value The bytes for pattern to set. - * @return This builder for chaining. - */ - public Builder setPatternBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pattern_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList groupIndexes_ = emptyIntList(); - private void ensureGroupIndexesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - groupIndexes_ = mutableCopy(groupIndexes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * The index of the submatch to extract as findings. When not
-       * specified, the entire match is returned. No more than 3 may be included.
-       * 
- * - * repeated int32 group_indexes = 2; - * @return A list containing the groupIndexes. - */ - public java.util.List - getGroupIndexesList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(groupIndexes_) : groupIndexes_; - } - /** - *
-       * The index of the submatch to extract as findings. When not
-       * specified, the entire match is returned. No more than 3 may be included.
-       * 
- * - * repeated int32 group_indexes = 2; - * @return The count of groupIndexes. - */ - public int getGroupIndexesCount() { - return groupIndexes_.size(); - } - /** - *
-       * The index of the submatch to extract as findings. When not
-       * specified, the entire match is returned. No more than 3 may be included.
-       * 
- * - * repeated int32 group_indexes = 2; - * @param index The index of the element to return. - * @return The groupIndexes at the given index. - */ - public int getGroupIndexes(int index) { - return groupIndexes_.getInt(index); - } - /** - *
-       * The index of the submatch to extract as findings. When not
-       * specified, the entire match is returned. No more than 3 may be included.
-       * 
- * - * repeated int32 group_indexes = 2; - * @param index The index to set the value at. - * @param value The groupIndexes to set. - * @return This builder for chaining. - */ - public Builder setGroupIndexes( - int index, int value) { - ensureGroupIndexesIsMutable(); - groupIndexes_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * The index of the submatch to extract as findings. When not
-       * specified, the entire match is returned. No more than 3 may be included.
-       * 
- * - * repeated int32 group_indexes = 2; - * @param value The groupIndexes to add. - * @return This builder for chaining. - */ - public Builder addGroupIndexes(int value) { - ensureGroupIndexesIsMutable(); - groupIndexes_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * The index of the submatch to extract as findings. When not
-       * specified, the entire match is returned. No more than 3 may be included.
-       * 
- * - * repeated int32 group_indexes = 2; - * @param values The groupIndexes to add. - * @return This builder for chaining. - */ - public Builder addAllGroupIndexes( - java.lang.Iterable values) { - ensureGroupIndexesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, groupIndexes_); - onChanged(); - return this; - } - /** - *
-       * The index of the submatch to extract as findings. When not
-       * specified, the entire match is returned. No more than 3 may be included.
-       * 
- * - * repeated int32 group_indexes = 2; - * @return This builder for chaining. - */ - public Builder clearGroupIndexes() { - groupIndexes_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.Regex) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.Regex) - private static final com.google.privacy.dlp.v2.CustomInfoType.Regex DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.Regex(); - } - - public static com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Regex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Regex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SurrogateTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.SurrogateType) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Message for detecting output from deidentification transformations
-   * such as
-   * [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
-   * These types of transformations are
-   * those that perform pseudonymization, thereby producing a "surrogate" as
-   * output. This should be used in conjunction with a field on the
-   * transformation such as `surrogate_info_type`. This CustomInfoType does
-   * not support the use of `detection_rules`.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.SurrogateType} - */ - public static final class SurrogateType extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.SurrogateType) - SurrogateTypeOrBuilder { - private static final long serialVersionUID = 0L; - // Use SurrogateType.newBuilder() to construct. - private SurrogateType(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SurrogateType() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SurrogateType(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SurrogateType( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.class, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.SurrogateType)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType other = (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message for detecting output from deidentification transformations
-     * such as
-     * [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
-     * These types of transformations are
-     * those that perform pseudonymization, thereby producing a "surrogate" as
-     * output. This should be used in conjunction with a field on the
-     * transformation such as `surrogate_info_type`. This CustomInfoType does
-     * not support the use of `detection_rules`.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.SurrogateType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.SurrogateType) - com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.class, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType build() { - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType buildPartial() { - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType result = new com.google.privacy.dlp.v2.CustomInfoType.SurrogateType(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) { - return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType other) { - if (other == com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.SurrogateType) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.SurrogateType) - private static final com.google.privacy.dlp.v2.CustomInfoType.SurrogateType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.SurrogateType(); - } - - public static com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SurrogateType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SurrogateType(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DetectionRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return Whether the hotwordRule field is set. - */ - boolean hasHotwordRule(); - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return The hotwordRule. - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule(); - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder(); - - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.TypeCase getTypeCase(); - } - /** - *
-   * Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
-   * `CustomInfoType` to alter behavior under certain circumstances, depending
-   * on the specific details of the rule. Not supported for the `surrogate_type`
-   * custom infoType.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule} - */ - public static final class DetectionRule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule) - DetectionRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use DetectionRule.newBuilder() to construct. - private DetectionRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DetectionRule() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DetectionRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DetectionRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder subBuilder = null; - if (typeCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder.class); - } - - public interface ProximityOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Number of characters before the finding to consider. For tabular data,
-       * if you want to modify the likelihood of an entire column of findngs,
-       * set this to 1. For more information, see
-       * [Hotword example: Set the match likelihood of a table column]
-       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-       * 
- * - * int32 window_before = 1; - * @return The windowBefore. - */ - int getWindowBefore(); - - /** - *
-       * Number of characters after the finding to consider.
-       * 
- * - * int32 window_after = 2; - * @return The windowAfter. - */ - int getWindowAfter(); - } - /** - *
-     * Message for specifying a window around a finding to apply a detection
-     * rule.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity} - */ - public static final class Proximity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) - ProximityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Proximity.newBuilder() to construct. - private Proximity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Proximity() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Proximity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Proximity( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - windowBefore_ = input.readInt32(); - break; - } - case 16: { - - windowAfter_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder.class); - } - - public static final int WINDOW_BEFORE_FIELD_NUMBER = 1; - private int windowBefore_; - /** - *
-       * Number of characters before the finding to consider. For tabular data,
-       * if you want to modify the likelihood of an entire column of findngs,
-       * set this to 1. For more information, see
-       * [Hotword example: Set the match likelihood of a table column]
-       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-       * 
- * - * int32 window_before = 1; - * @return The windowBefore. - */ - @java.lang.Override - public int getWindowBefore() { - return windowBefore_; - } - - public static final int WINDOW_AFTER_FIELD_NUMBER = 2; - private int windowAfter_; - /** - *
-       * Number of characters after the finding to consider.
-       * 
- * - * int32 window_after = 2; - * @return The windowAfter. - */ - @java.lang.Override - public int getWindowAfter() { - return windowAfter_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (windowBefore_ != 0) { - output.writeInt32(1, windowBefore_); - } - if (windowAfter_ != 0) { - output.writeInt32(2, windowAfter_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (windowBefore_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, windowBefore_); - } - if (windowAfter_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, windowAfter_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity other = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) obj; - - if (getWindowBefore() - != other.getWindowBefore()) return false; - if (getWindowAfter() - != other.getWindowAfter()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WINDOW_BEFORE_FIELD_NUMBER; - hash = (53 * hash) + getWindowBefore(); - hash = (37 * hash) + WINDOW_AFTER_FIELD_NUMBER; - hash = (53 * hash) + getWindowAfter(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * Message for specifying a window around a finding to apply a detection
-       * rule.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - windowBefore_ = 0; - - windowAfter_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity build() { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity buildPartial() { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity result = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity(this); - result.windowBefore_ = windowBefore_; - result.windowAfter_ = windowAfter_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) { - return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity other) { - if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance()) return this; - if (other.getWindowBefore() != 0) { - setWindowBefore(other.getWindowBefore()); - } - if (other.getWindowAfter() != 0) { - setWindowAfter(other.getWindowAfter()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int windowBefore_ ; - /** - *
-         * Number of characters before the finding to consider. For tabular data,
-         * if you want to modify the likelihood of an entire column of findngs,
-         * set this to 1. For more information, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * int32 window_before = 1; - * @return The windowBefore. - */ - @java.lang.Override - public int getWindowBefore() { - return windowBefore_; - } - /** - *
-         * Number of characters before the finding to consider. For tabular data,
-         * if you want to modify the likelihood of an entire column of findngs,
-         * set this to 1. For more information, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * int32 window_before = 1; - * @param value The windowBefore to set. - * @return This builder for chaining. - */ - public Builder setWindowBefore(int value) { - - windowBefore_ = value; - onChanged(); - return this; - } - /** - *
-         * Number of characters before the finding to consider. For tabular data,
-         * if you want to modify the likelihood of an entire column of findngs,
-         * set this to 1. For more information, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * int32 window_before = 1; - * @return This builder for chaining. - */ - public Builder clearWindowBefore() { - - windowBefore_ = 0; - onChanged(); - return this; - } - - private int windowAfter_ ; - /** - *
-         * Number of characters after the finding to consider.
-         * 
- * - * int32 window_after = 2; - * @return The windowAfter. - */ - @java.lang.Override - public int getWindowAfter() { - return windowAfter_; - } - /** - *
-         * Number of characters after the finding to consider.
-         * 
- * - * int32 window_after = 2; - * @param value The windowAfter to set. - * @return This builder for chaining. - */ - public Builder setWindowAfter(int value) { - - windowAfter_ = value; - onChanged(); - return this; - } - /** - *
-         * Number of characters after the finding to consider.
-         * 
- * - * int32 window_after = 2; - * @return This builder for chaining. - */ - public Builder clearWindowAfter() { - - windowAfter_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) - private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity(); - } - - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proximity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Proximity(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LikelihoodAdjustmentOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Set the likelihood of a finding to a fixed value.
-       * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return Whether the fixedLikelihood field is set. - */ - boolean hasFixedLikelihood(); - /** - *
-       * Set the likelihood of a finding to a fixed value.
-       * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return The enum numeric value on the wire for fixedLikelihood. - */ - int getFixedLikelihoodValue(); - /** - *
-       * Set the likelihood of a finding to a fixed value.
-       * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return The fixedLikelihood. - */ - com.google.privacy.dlp.v2.Likelihood getFixedLikelihood(); - - /** - *
-       * Increase or decrease the likelihood by the specified number of
-       * levels. For example, if a finding would be `POSSIBLE` without the
-       * detection rule and `relative_likelihood` is 1, then it is upgraded to
-       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
-       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
-       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
-       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
-       * a final likelihood of `LIKELY`.
-       * 
- * - * int32 relative_likelihood = 2; - * @return Whether the relativeLikelihood field is set. - */ - boolean hasRelativeLikelihood(); - /** - *
-       * Increase or decrease the likelihood by the specified number of
-       * levels. For example, if a finding would be `POSSIBLE` without the
-       * detection rule and `relative_likelihood` is 1, then it is upgraded to
-       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
-       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
-       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
-       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
-       * a final likelihood of `LIKELY`.
-       * 
- * - * int32 relative_likelihood = 2; - * @return The relativeLikelihood. - */ - int getRelativeLikelihood(); - - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.AdjustmentCase getAdjustmentCase(); - } - /** - *
-     * Message for specifying an adjustment to the likelihood of a finding as
-     * part of a detection rule.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment} - */ - public static final class LikelihoodAdjustment extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) - LikelihoodAdjustmentOrBuilder { - private static final long serialVersionUID = 0L; - // Use LikelihoodAdjustment.newBuilder() to construct. - private LikelihoodAdjustment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LikelihoodAdjustment() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LikelihoodAdjustment(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LikelihoodAdjustment( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - adjustmentCase_ = 1; - adjustment_ = rawValue; - break; - } - case 16: { - adjustment_ = input.readInt32(); - adjustmentCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder.class); - } - - private int adjustmentCase_ = 0; - private java.lang.Object adjustment_; - public enum AdjustmentCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - FIXED_LIKELIHOOD(1), - RELATIVE_LIKELIHOOD(2), - ADJUSTMENT_NOT_SET(0); - private final int value; - private AdjustmentCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AdjustmentCase valueOf(int value) { - return forNumber(value); - } - - public static AdjustmentCase forNumber(int value) { - switch (value) { - case 1: return FIXED_LIKELIHOOD; - case 2: return RELATIVE_LIKELIHOOD; - case 0: return ADJUSTMENT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public AdjustmentCase - getAdjustmentCase() { - return AdjustmentCase.forNumber( - adjustmentCase_); - } - - public static final int FIXED_LIKELIHOOD_FIELD_NUMBER = 1; - /** - *
-       * Set the likelihood of a finding to a fixed value.
-       * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return Whether the fixedLikelihood field is set. - */ - public boolean hasFixedLikelihood() { - return adjustmentCase_ == 1; - } - /** - *
-       * Set the likelihood of a finding to a fixed value.
-       * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return The enum numeric value on the wire for fixedLikelihood. - */ - public int getFixedLikelihoodValue() { - if (adjustmentCase_ == 1) { - return (java.lang.Integer) adjustment_; - } - return 0; - } - /** - *
-       * Set the likelihood of a finding to a fixed value.
-       * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return The fixedLikelihood. - */ - public com.google.privacy.dlp.v2.Likelihood getFixedLikelihood() { - if (adjustmentCase_ == 1) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf( - (java.lang.Integer) adjustment_); - return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED; - } - - public static final int RELATIVE_LIKELIHOOD_FIELD_NUMBER = 2; - /** - *
-       * Increase or decrease the likelihood by the specified number of
-       * levels. For example, if a finding would be `POSSIBLE` without the
-       * detection rule and `relative_likelihood` is 1, then it is upgraded to
-       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
-       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
-       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
-       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
-       * a final likelihood of `LIKELY`.
-       * 
- * - * int32 relative_likelihood = 2; - * @return Whether the relativeLikelihood field is set. - */ - @java.lang.Override - public boolean hasRelativeLikelihood() { - return adjustmentCase_ == 2; - } - /** - *
-       * Increase or decrease the likelihood by the specified number of
-       * levels. For example, if a finding would be `POSSIBLE` without the
-       * detection rule and `relative_likelihood` is 1, then it is upgraded to
-       * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
-       * Likelihood may never drop below `VERY_UNLIKELY` or exceed
-       * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
-       * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
-       * a final likelihood of `LIKELY`.
-       * 
- * - * int32 relative_likelihood = 2; - * @return The relativeLikelihood. - */ - @java.lang.Override - public int getRelativeLikelihood() { - if (adjustmentCase_ == 2) { - return (java.lang.Integer) adjustment_; - } - return 0; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (adjustmentCase_ == 1) { - output.writeEnum(1, ((java.lang.Integer) adjustment_)); - } - if (adjustmentCase_ == 2) { - output.writeInt32( - 2, (int)((java.lang.Integer) adjustment_)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (adjustmentCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, ((java.lang.Integer) adjustment_)); - } - if (adjustmentCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size( - 2, (int)((java.lang.Integer) adjustment_)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment other = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) obj; - - if (!getAdjustmentCase().equals(other.getAdjustmentCase())) return false; - switch (adjustmentCase_) { - case 1: - if (getFixedLikelihoodValue() - != other.getFixedLikelihoodValue()) return false; - break; - case 2: - if (getRelativeLikelihood() - != other.getRelativeLikelihood()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (adjustmentCase_) { - case 1: - hash = (37 * hash) + FIXED_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + getFixedLikelihoodValue(); - break; - case 2: - hash = (37 * hash) + RELATIVE_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + getRelativeLikelihood(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * Message for specifying an adjustment to the likelihood of a finding as
-       * part of a detection rule.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - adjustmentCase_ = 0; - adjustment_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment build() { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment buildPartial() { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment result = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment(this); - if (adjustmentCase_ == 1) { - result.adjustment_ = adjustment_; - } - if (adjustmentCase_ == 2) { - result.adjustment_ = adjustment_; - } - result.adjustmentCase_ = adjustmentCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) { - return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment other) { - if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance()) return this; - switch (other.getAdjustmentCase()) { - case FIXED_LIKELIHOOD: { - setFixedLikelihoodValue(other.getFixedLikelihoodValue()); - break; - } - case RELATIVE_LIKELIHOOD: { - setRelativeLikelihood(other.getRelativeLikelihood()); - break; - } - case ADJUSTMENT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int adjustmentCase_ = 0; - private java.lang.Object adjustment_; - public AdjustmentCase - getAdjustmentCase() { - return AdjustmentCase.forNumber( - adjustmentCase_); - } - - public Builder clearAdjustment() { - adjustmentCase_ = 0; - adjustment_ = null; - onChanged(); - return this; - } - - - /** - *
-         * Set the likelihood of a finding to a fixed value.
-         * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return Whether the fixedLikelihood field is set. - */ - @java.lang.Override - public boolean hasFixedLikelihood() { - return adjustmentCase_ == 1; - } - /** - *
-         * Set the likelihood of a finding to a fixed value.
-         * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return The enum numeric value on the wire for fixedLikelihood. - */ - @java.lang.Override - public int getFixedLikelihoodValue() { - if (adjustmentCase_ == 1) { - return ((java.lang.Integer) adjustment_).intValue(); - } - return 0; - } - /** - *
-         * Set the likelihood of a finding to a fixed value.
-         * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @param value The enum numeric value on the wire for fixedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setFixedLikelihoodValue(int value) { - adjustmentCase_ = 1; - adjustment_ = value; - onChanged(); - return this; - } - /** - *
-         * Set the likelihood of a finding to a fixed value.
-         * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return The fixedLikelihood. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Likelihood getFixedLikelihood() { - if (adjustmentCase_ == 1) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf( - (java.lang.Integer) adjustment_); - return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED; - } - /** - *
-         * Set the likelihood of a finding to a fixed value.
-         * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @param value The fixedLikelihood to set. - * @return This builder for chaining. - */ - public Builder setFixedLikelihood(com.google.privacy.dlp.v2.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - adjustmentCase_ = 1; - adjustment_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-         * Set the likelihood of a finding to a fixed value.
-         * 
- * - * .google.privacy.dlp.v2.Likelihood fixed_likelihood = 1; - * @return This builder for chaining. - */ - public Builder clearFixedLikelihood() { - if (adjustmentCase_ == 1) { - adjustmentCase_ = 0; - adjustment_ = null; - onChanged(); - } - return this; - } - - /** - *
-         * Increase or decrease the likelihood by the specified number of
-         * levels. For example, if a finding would be `POSSIBLE` without the
-         * detection rule and `relative_likelihood` is 1, then it is upgraded to
-         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
-         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
-         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
-         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
-         * a final likelihood of `LIKELY`.
-         * 
- * - * int32 relative_likelihood = 2; - * @return Whether the relativeLikelihood field is set. - */ - public boolean hasRelativeLikelihood() { - return adjustmentCase_ == 2; - } - /** - *
-         * Increase or decrease the likelihood by the specified number of
-         * levels. For example, if a finding would be `POSSIBLE` without the
-         * detection rule and `relative_likelihood` is 1, then it is upgraded to
-         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
-         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
-         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
-         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
-         * a final likelihood of `LIKELY`.
-         * 
- * - * int32 relative_likelihood = 2; - * @return The relativeLikelihood. - */ - public int getRelativeLikelihood() { - if (adjustmentCase_ == 2) { - return (java.lang.Integer) adjustment_; - } - return 0; - } - /** - *
-         * Increase or decrease the likelihood by the specified number of
-         * levels. For example, if a finding would be `POSSIBLE` without the
-         * detection rule and `relative_likelihood` is 1, then it is upgraded to
-         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
-         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
-         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
-         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
-         * a final likelihood of `LIKELY`.
-         * 
- * - * int32 relative_likelihood = 2; - * @param value The relativeLikelihood to set. - * @return This builder for chaining. - */ - public Builder setRelativeLikelihood(int value) { - adjustmentCase_ = 2; - adjustment_ = value; - onChanged(); - return this; - } - /** - *
-         * Increase or decrease the likelihood by the specified number of
-         * levels. For example, if a finding would be `POSSIBLE` without the
-         * detection rule and `relative_likelihood` is 1, then it is upgraded to
-         * `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
-         * Likelihood may never drop below `VERY_UNLIKELY` or exceed
-         * `VERY_LIKELY`, so applying an adjustment of 1 followed by an
-         * adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
-         * a final likelihood of `LIKELY`.
-         * 
- * - * int32 relative_likelihood = 2; - * @return This builder for chaining. - */ - public Builder clearRelativeLikelihood() { - if (adjustmentCase_ == 2) { - adjustmentCase_ = 0; - adjustment_ = null; - onChanged(); - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) - private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment(); - } - - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LikelihoodAdjustment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LikelihoodAdjustment(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HotwordRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Regular expression pattern defining what qualifies as a hotword.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - * @return Whether the hotwordRegex field is set. - */ - boolean hasHotwordRegex(); - /** - *
-       * Regular expression pattern defining what qualifies as a hotword.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - * @return The hotwordRegex. - */ - com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex(); - /** - *
-       * Regular expression pattern defining what qualifies as a hotword.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - */ - com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder(); - - /** - *
-       * Range of characters within which the entire hotword must reside.
-       * The total length of the window cannot exceed 1000 characters.
-       * The finding itself will be included in the window, so that hotwords can
-       * be used to match substrings of the finding itself. Suppose you
-       * want Cloud DLP to promote the likelihood of the phone number
-       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-       * area code of a company's office. In this case, use the hotword regex
-       * "\(xxx\)", where "xxx" is the area code in question.
-       * For tabular data, if you want to modify the likelihood of an entire
-       * column of findngs, see
-       * [Hotword example: Set the match likelihood of a table column]
-       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - * @return Whether the proximity field is set. - */ - boolean hasProximity(); - /** - *
-       * Range of characters within which the entire hotword must reside.
-       * The total length of the window cannot exceed 1000 characters.
-       * The finding itself will be included in the window, so that hotwords can
-       * be used to match substrings of the finding itself. Suppose you
-       * want Cloud DLP to promote the likelihood of the phone number
-       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-       * area code of a company's office. In this case, use the hotword regex
-       * "\(xxx\)", where "xxx" is the area code in question.
-       * For tabular data, if you want to modify the likelihood of an entire
-       * column of findngs, see
-       * [Hotword example: Set the match likelihood of a table column]
-       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - * @return The proximity. - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity(); - /** - *
-       * Range of characters within which the entire hotword must reside.
-       * The total length of the window cannot exceed 1000 characters.
-       * The finding itself will be included in the window, so that hotwords can
-       * be used to match substrings of the finding itself. Suppose you
-       * want Cloud DLP to promote the likelihood of the phone number
-       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-       * area code of a company's office. In this case, use the hotword regex
-       * "\(xxx\)", where "xxx" is the area code in question.
-       * For tabular data, if you want to modify the likelihood of an entire
-       * column of findngs, see
-       * [Hotword example: Set the match likelihood of a table column]
-       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder getProximityOrBuilder(); - - /** - *
-       * Likelihood adjustment to apply to all matching findings.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - * @return Whether the likelihoodAdjustment field is set. - */ - boolean hasLikelihoodAdjustment(); - /** - *
-       * Likelihood adjustment to apply to all matching findings.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - * @return The likelihoodAdjustment. - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getLikelihoodAdjustment(); - /** - *
-       * Likelihood adjustment to apply to all matching findings.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder getLikelihoodAdjustmentOrBuilder(); - } - /** - *
-     * The rule that adjusts the likelihood of findings within a certain
-     * proximity of hotwords.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule} - */ - public static final class HotwordRule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) - HotwordRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use HotwordRule.newBuilder() to construct. - private HotwordRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HotwordRule() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HotwordRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HotwordRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null; - if (hotwordRegex_ != null) { - subBuilder = hotwordRegex_.toBuilder(); - } - hotwordRegex_ = input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hotwordRegex_); - hotwordRegex_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder subBuilder = null; - if (proximity_ != null) { - subBuilder = proximity_.toBuilder(); - } - proximity_ = input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(proximity_); - proximity_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder subBuilder = null; - if (likelihoodAdjustment_ != null) { - subBuilder = likelihoodAdjustment_.toBuilder(); - } - likelihoodAdjustment_ = input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(likelihoodAdjustment_); - likelihoodAdjustment_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder.class); - } - - public static final int HOTWORD_REGEX_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.CustomInfoType.Regex hotwordRegex_; - /** - *
-       * Regular expression pattern defining what qualifies as a hotword.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - * @return Whether the hotwordRegex field is set. - */ - @java.lang.Override - public boolean hasHotwordRegex() { - return hotwordRegex_ != null; - } - /** - *
-       * Regular expression pattern defining what qualifies as a hotword.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - * @return The hotwordRegex. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() { - return hotwordRegex_ == null ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance() : hotwordRegex_; - } - /** - *
-       * Regular expression pattern defining what qualifies as a hotword.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder() { - return getHotwordRegex(); - } - - public static final int PROXIMITY_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity_; - /** - *
-       * Range of characters within which the entire hotword must reside.
-       * The total length of the window cannot exceed 1000 characters.
-       * The finding itself will be included in the window, so that hotwords can
-       * be used to match substrings of the finding itself. Suppose you
-       * want Cloud DLP to promote the likelihood of the phone number
-       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-       * area code of a company's office. In this case, use the hotword regex
-       * "\(xxx\)", where "xxx" is the area code in question.
-       * For tabular data, if you want to modify the likelihood of an entire
-       * column of findngs, see
-       * [Hotword example: Set the match likelihood of a table column]
-       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - * @return Whether the proximity field is set. - */ - @java.lang.Override - public boolean hasProximity() { - return proximity_ != null; - } - /** - *
-       * Range of characters within which the entire hotword must reside.
-       * The total length of the window cannot exceed 1000 characters.
-       * The finding itself will be included in the window, so that hotwords can
-       * be used to match substrings of the finding itself. Suppose you
-       * want Cloud DLP to promote the likelihood of the phone number
-       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-       * area code of a company's office. In this case, use the hotword regex
-       * "\(xxx\)", where "xxx" is the area code in question.
-       * For tabular data, if you want to modify the likelihood of an entire
-       * column of findngs, see
-       * [Hotword example: Set the match likelihood of a table column]
-       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - * @return The proximity. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity() { - return proximity_ == null ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance() : proximity_; - } - /** - *
-       * Range of characters within which the entire hotword must reside.
-       * The total length of the window cannot exceed 1000 characters.
-       * The finding itself will be included in the window, so that hotwords can
-       * be used to match substrings of the finding itself. Suppose you
-       * want Cloud DLP to promote the likelihood of the phone number
-       * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-       * area code of a company's office. In this case, use the hotword regex
-       * "\(xxx\)", where "xxx" is the area code in question.
-       * For tabular data, if you want to modify the likelihood of an entire
-       * column of findngs, see
-       * [Hotword example: Set the match likelihood of a table column]
-       * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder getProximityOrBuilder() { - return getProximity(); - } - - public static final int LIKELIHOOD_ADJUSTMENT_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihoodAdjustment_; - /** - *
-       * Likelihood adjustment to apply to all matching findings.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - * @return Whether the likelihoodAdjustment field is set. - */ - @java.lang.Override - public boolean hasLikelihoodAdjustment() { - return likelihoodAdjustment_ != null; - } - /** - *
-       * Likelihood adjustment to apply to all matching findings.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - * @return The likelihoodAdjustment. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getLikelihoodAdjustment() { - return likelihoodAdjustment_ == null ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance() : likelihoodAdjustment_; - } - /** - *
-       * Likelihood adjustment to apply to all matching findings.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder getLikelihoodAdjustmentOrBuilder() { - return getLikelihoodAdjustment(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (hotwordRegex_ != null) { - output.writeMessage(1, getHotwordRegex()); - } - if (proximity_ != null) { - output.writeMessage(2, getProximity()); - } - if (likelihoodAdjustment_ != null) { - output.writeMessage(3, getLikelihoodAdjustment()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (hotwordRegex_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getHotwordRegex()); - } - if (proximity_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getProximity()); - } - if (likelihoodAdjustment_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getLikelihoodAdjustment()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule other = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) obj; - - if (hasHotwordRegex() != other.hasHotwordRegex()) return false; - if (hasHotwordRegex()) { - if (!getHotwordRegex() - .equals(other.getHotwordRegex())) return false; - } - if (hasProximity() != other.hasProximity()) return false; - if (hasProximity()) { - if (!getProximity() - .equals(other.getProximity())) return false; - } - if (hasLikelihoodAdjustment() != other.hasLikelihoodAdjustment()) return false; - if (hasLikelihoodAdjustment()) { - if (!getLikelihoodAdjustment() - .equals(other.getLikelihoodAdjustment())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHotwordRegex()) { - hash = (37 * hash) + HOTWORD_REGEX_FIELD_NUMBER; - hash = (53 * hash) + getHotwordRegex().hashCode(); - } - if (hasProximity()) { - hash = (37 * hash) + PROXIMITY_FIELD_NUMBER; - hash = (53 * hash) + getProximity().hashCode(); - } - if (hasLikelihoodAdjustment()) { - hash = (37 * hash) + LIKELIHOOD_ADJUSTMENT_FIELD_NUMBER; - hash = (53 * hash) + getLikelihoodAdjustment().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * The rule that adjusts the likelihood of findings within a certain
-       * proximity of hotwords.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (hotwordRegexBuilder_ == null) { - hotwordRegex_ = null; - } else { - hotwordRegex_ = null; - hotwordRegexBuilder_ = null; - } - if (proximityBuilder_ == null) { - proximity_ = null; - } else { - proximity_ = null; - proximityBuilder_ = null; - } - if (likelihoodAdjustmentBuilder_ == null) { - likelihoodAdjustment_ = null; - } else { - likelihoodAdjustment_ = null; - likelihoodAdjustmentBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule build() { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule buildPartial() { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule result = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule(this); - if (hotwordRegexBuilder_ == null) { - result.hotwordRegex_ = hotwordRegex_; - } else { - result.hotwordRegex_ = hotwordRegexBuilder_.build(); - } - if (proximityBuilder_ == null) { - result.proximity_ = proximity_; - } else { - result.proximity_ = proximityBuilder_.build(); - } - if (likelihoodAdjustmentBuilder_ == null) { - result.likelihoodAdjustment_ = likelihoodAdjustment_; - } else { - result.likelihoodAdjustment_ = likelihoodAdjustmentBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) { - return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule other) { - if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance()) return this; - if (other.hasHotwordRegex()) { - mergeHotwordRegex(other.getHotwordRegex()); - } - if (other.hasProximity()) { - mergeProximity(other.getProximity()); - } - if (other.hasLikelihoodAdjustment()) { - mergeLikelihoodAdjustment(other.getLikelihoodAdjustment()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.CustomInfoType.Regex hotwordRegex_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> hotwordRegexBuilder_; - /** - *
-         * Regular expression pattern defining what qualifies as a hotword.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - * @return Whether the hotwordRegex field is set. - */ - public boolean hasHotwordRegex() { - return hotwordRegexBuilder_ != null || hotwordRegex_ != null; - } - /** - *
-         * Regular expression pattern defining what qualifies as a hotword.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - * @return The hotwordRegex. - */ - public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() { - if (hotwordRegexBuilder_ == null) { - return hotwordRegex_ == null ? com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance() : hotwordRegex_; - } else { - return hotwordRegexBuilder_.getMessage(); - } - } - /** - *
-         * Regular expression pattern defining what qualifies as a hotword.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - */ - public Builder setHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { - if (hotwordRegexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hotwordRegex_ = value; - onChanged(); - } else { - hotwordRegexBuilder_.setMessage(value); - } - - return this; - } - /** - *
-         * Regular expression pattern defining what qualifies as a hotword.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - */ - public Builder setHotwordRegex( - com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) { - if (hotwordRegexBuilder_ == null) { - hotwordRegex_ = builderForValue.build(); - onChanged(); - } else { - hotwordRegexBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-         * Regular expression pattern defining what qualifies as a hotword.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - */ - public Builder mergeHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { - if (hotwordRegexBuilder_ == null) { - if (hotwordRegex_ != null) { - hotwordRegex_ = - com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder(hotwordRegex_).mergeFrom(value).buildPartial(); - } else { - hotwordRegex_ = value; - } - onChanged(); - } else { - hotwordRegexBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-         * Regular expression pattern defining what qualifies as a hotword.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - */ - public Builder clearHotwordRegex() { - if (hotwordRegexBuilder_ == null) { - hotwordRegex_ = null; - onChanged(); - } else { - hotwordRegex_ = null; - hotwordRegexBuilder_ = null; - } - - return this; - } - /** - *
-         * Regular expression pattern defining what qualifies as a hotword.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getHotwordRegexBuilder() { - - onChanged(); - return getHotwordRegexFieldBuilder().getBuilder(); - } - /** - *
-         * Regular expression pattern defining what qualifies as a hotword.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - */ - public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOrBuilder() { - if (hotwordRegexBuilder_ != null) { - return hotwordRegexBuilder_.getMessageOrBuilder(); - } else { - return hotwordRegex_ == null ? - com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance() : hotwordRegex_; - } - } - /** - *
-         * Regular expression pattern defining what qualifies as a hotword.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> - getHotwordRegexFieldBuilder() { - if (hotwordRegexBuilder_ == null) { - hotwordRegexBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>( - getHotwordRegex(), - getParentForChildren(), - isClean()); - hotwordRegex_ = null; - } - return hotwordRegexBuilder_; - } - - private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder> proximityBuilder_; - /** - *
-         * Range of characters within which the entire hotword must reside.
-         * The total length of the window cannot exceed 1000 characters.
-         * The finding itself will be included in the window, so that hotwords can
-         * be used to match substrings of the finding itself. Suppose you
-         * want Cloud DLP to promote the likelihood of the phone number
-         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-         * area code of a company's office. In this case, use the hotword regex
-         * "\(xxx\)", where "xxx" is the area code in question.
-         * For tabular data, if you want to modify the likelihood of an entire
-         * column of findngs, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - * @return Whether the proximity field is set. - */ - public boolean hasProximity() { - return proximityBuilder_ != null || proximity_ != null; - } - /** - *
-         * Range of characters within which the entire hotword must reside.
-         * The total length of the window cannot exceed 1000 characters.
-         * The finding itself will be included in the window, so that hotwords can
-         * be used to match substrings of the finding itself. Suppose you
-         * want Cloud DLP to promote the likelihood of the phone number
-         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-         * area code of a company's office. In this case, use the hotword regex
-         * "\(xxx\)", where "xxx" is the area code in question.
-         * For tabular data, if you want to modify the likelihood of an entire
-         * column of findngs, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - * @return The proximity. - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity getProximity() { - if (proximityBuilder_ == null) { - return proximity_ == null ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance() : proximity_; - } else { - return proximityBuilder_.getMessage(); - } - } - /** - *
-         * Range of characters within which the entire hotword must reside.
-         * The total length of the window cannot exceed 1000 characters.
-         * The finding itself will be included in the window, so that hotwords can
-         * be used to match substrings of the finding itself. Suppose you
-         * want Cloud DLP to promote the likelihood of the phone number
-         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-         * area code of a company's office. In this case, use the hotword regex
-         * "\(xxx\)", where "xxx" is the area code in question.
-         * For tabular data, if you want to modify the likelihood of an entire
-         * column of findngs, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - */ - public Builder setProximity(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value) { - if (proximityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - proximity_ = value; - onChanged(); - } else { - proximityBuilder_.setMessage(value); - } - - return this; - } - /** - *
-         * Range of characters within which the entire hotword must reside.
-         * The total length of the window cannot exceed 1000 characters.
-         * The finding itself will be included in the window, so that hotwords can
-         * be used to match substrings of the finding itself. Suppose you
-         * want Cloud DLP to promote the likelihood of the phone number
-         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-         * area code of a company's office. In this case, use the hotword regex
-         * "\(xxx\)", where "xxx" is the area code in question.
-         * For tabular data, if you want to modify the likelihood of an entire
-         * column of findngs, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - */ - public Builder setProximity( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder builderForValue) { - if (proximityBuilder_ == null) { - proximity_ = builderForValue.build(); - onChanged(); - } else { - proximityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-         * Range of characters within which the entire hotword must reside.
-         * The total length of the window cannot exceed 1000 characters.
-         * The finding itself will be included in the window, so that hotwords can
-         * be used to match substrings of the finding itself. Suppose you
-         * want Cloud DLP to promote the likelihood of the phone number
-         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-         * area code of a company's office. In this case, use the hotword regex
-         * "\(xxx\)", where "xxx" is the area code in question.
-         * For tabular data, if you want to modify the likelihood of an entire
-         * column of findngs, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - */ - public Builder mergeProximity(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity value) { - if (proximityBuilder_ == null) { - if (proximity_ != null) { - proximity_ = - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.newBuilder(proximity_).mergeFrom(value).buildPartial(); - } else { - proximity_ = value; - } - onChanged(); - } else { - proximityBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-         * Range of characters within which the entire hotword must reside.
-         * The total length of the window cannot exceed 1000 characters.
-         * The finding itself will be included in the window, so that hotwords can
-         * be used to match substrings of the finding itself. Suppose you
-         * want Cloud DLP to promote the likelihood of the phone number
-         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-         * area code of a company's office. In this case, use the hotword regex
-         * "\(xxx\)", where "xxx" is the area code in question.
-         * For tabular data, if you want to modify the likelihood of an entire
-         * column of findngs, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - */ - public Builder clearProximity() { - if (proximityBuilder_ == null) { - proximity_ = null; - onChanged(); - } else { - proximity_ = null; - proximityBuilder_ = null; - } - - return this; - } - /** - *
-         * Range of characters within which the entire hotword must reside.
-         * The total length of the window cannot exceed 1000 characters.
-         * The finding itself will be included in the window, so that hotwords can
-         * be used to match substrings of the finding itself. Suppose you
-         * want Cloud DLP to promote the likelihood of the phone number
-         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-         * area code of a company's office. In this case, use the hotword regex
-         * "\(xxx\)", where "xxx" is the area code in question.
-         * For tabular data, if you want to modify the likelihood of an entire
-         * column of findngs, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder getProximityBuilder() { - - onChanged(); - return getProximityFieldBuilder().getBuilder(); - } - /** - *
-         * Range of characters within which the entire hotword must reside.
-         * The total length of the window cannot exceed 1000 characters.
-         * The finding itself will be included in the window, so that hotwords can
-         * be used to match substrings of the finding itself. Suppose you
-         * want Cloud DLP to promote the likelihood of the phone number
-         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-         * area code of a company's office. In this case, use the hotword regex
-         * "\(xxx\)", where "xxx" is the area code in question.
-         * For tabular data, if you want to modify the likelihood of an entire
-         * column of findngs, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder getProximityOrBuilder() { - if (proximityBuilder_ != null) { - return proximityBuilder_.getMessageOrBuilder(); - } else { - return proximity_ == null ? - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.getDefaultInstance() : proximity_; - } - } - /** - *
-         * Range of characters within which the entire hotword must reside.
-         * The total length of the window cannot exceed 1000 characters.
-         * The finding itself will be included in the window, so that hotwords can
-         * be used to match substrings of the finding itself. Suppose you
-         * want Cloud DLP to promote the likelihood of the phone number
-         * regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
-         * area code of a company's office. In this case, use the hotword regex
-         * "\(xxx\)", where "xxx" is the area code in question.
-         * For tabular data, if you want to modify the likelihood of an entire
-         * column of findngs, see
-         * [Hotword example: Set the match likelihood of a table column]
-         * (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity proximity = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder> - getProximityFieldBuilder() { - if (proximityBuilder_ == null) { - proximityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.ProximityOrBuilder>( - getProximity(), - getParentForChildren(), - isClean()); - proximity_ = null; - } - return proximityBuilder_; - } - - private com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihoodAdjustment_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder> likelihoodAdjustmentBuilder_; - /** - *
-         * Likelihood adjustment to apply to all matching findings.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - * @return Whether the likelihoodAdjustment field is set. - */ - public boolean hasLikelihoodAdjustment() { - return likelihoodAdjustmentBuilder_ != null || likelihoodAdjustment_ != null; - } - /** - *
-         * Likelihood adjustment to apply to all matching findings.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - * @return The likelihoodAdjustment. - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment getLikelihoodAdjustment() { - if (likelihoodAdjustmentBuilder_ == null) { - return likelihoodAdjustment_ == null ? com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance() : likelihoodAdjustment_; - } else { - return likelihoodAdjustmentBuilder_.getMessage(); - } - } - /** - *
-         * Likelihood adjustment to apply to all matching findings.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - */ - public Builder setLikelihoodAdjustment(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value) { - if (likelihoodAdjustmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - likelihoodAdjustment_ = value; - onChanged(); - } else { - likelihoodAdjustmentBuilder_.setMessage(value); - } - - return this; - } - /** - *
-         * Likelihood adjustment to apply to all matching findings.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - */ - public Builder setLikelihoodAdjustment( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder builderForValue) { - if (likelihoodAdjustmentBuilder_ == null) { - likelihoodAdjustment_ = builderForValue.build(); - onChanged(); - } else { - likelihoodAdjustmentBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-         * Likelihood adjustment to apply to all matching findings.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - */ - public Builder mergeLikelihoodAdjustment(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment value) { - if (likelihoodAdjustmentBuilder_ == null) { - if (likelihoodAdjustment_ != null) { - likelihoodAdjustment_ = - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.newBuilder(likelihoodAdjustment_).mergeFrom(value).buildPartial(); - } else { - likelihoodAdjustment_ = value; - } - onChanged(); - } else { - likelihoodAdjustmentBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-         * Likelihood adjustment to apply to all matching findings.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - */ - public Builder clearLikelihoodAdjustment() { - if (likelihoodAdjustmentBuilder_ == null) { - likelihoodAdjustment_ = null; - onChanged(); - } else { - likelihoodAdjustment_ = null; - likelihoodAdjustmentBuilder_ = null; - } - - return this; - } - /** - *
-         * Likelihood adjustment to apply to all matching findings.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder getLikelihoodAdjustmentBuilder() { - - onChanged(); - return getLikelihoodAdjustmentFieldBuilder().getBuilder(); - } - /** - *
-         * Likelihood adjustment to apply to all matching findings.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder getLikelihoodAdjustmentOrBuilder() { - if (likelihoodAdjustmentBuilder_ != null) { - return likelihoodAdjustmentBuilder_.getMessageOrBuilder(); - } else { - return likelihoodAdjustment_ == null ? - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.getDefaultInstance() : likelihoodAdjustment_; - } - } - /** - *
-         * Likelihood adjustment to apply to all matching findings.
-         * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder> - getLikelihoodAdjustmentFieldBuilder() { - if (likelihoodAdjustmentBuilder_ == null) { - likelihoodAdjustmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustmentOrBuilder>( - getLikelihoodAdjustment(), - getParentForChildren(), - isClean()); - likelihoodAdjustment_ = null; - } - return likelihoodAdjustmentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) - private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule(); - } - - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HotwordRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HotwordRule(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - HOTWORD_RULE(1), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return HOTWORD_RULE; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int HOTWORD_RULE_FIELD_NUMBER = 1; - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return Whether the hotwordRule field is set. - */ - @java.lang.Override - public boolean hasHotwordRule() { - return typeCase_ == 1; - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return The hotwordRule. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule other = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) obj; - - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 1: - if (!getHotwordRule() - .equals(other.getHotwordRule())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (typeCase_) { - case 1: - hash = (37 * hash) + HOTWORD_RULE_FIELD_NUMBER; - hash = (53 * hash) + getHotwordRule().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
-     * `CustomInfoType` to alter behavior under certain circumstances, depending
-     * on the specific details of the rule. Not supported for the `surrogate_type`
-     * custom infoType.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType.DetectionRule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType.DetectionRule) - com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.class, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule build() { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule buildPartial() { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule result = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule(this); - if (typeCase_ == 1) { - if (hotwordRuleBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = hotwordRuleBuilder_.build(); - } - } - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) { - return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule other) { - if (other == com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance()) return this; - switch (other.getTypeCase()) { - case HOTWORD_RULE: { - mergeHotwordRule(other.getHotwordRule()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder> hotwordRuleBuilder_; - /** - *
-       * Hotword-based detection rule.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return Whether the hotwordRule field is set. - */ - @java.lang.Override - public boolean hasHotwordRule() { - return typeCase_ == 1; - } - /** - *
-       * Hotword-based detection rule.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return The hotwordRule. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() { - if (hotwordRuleBuilder_ == null) { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } else { - if (typeCase_ == 1) { - return hotwordRuleBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - } - /** - *
-       * Hotword-based detection rule.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public Builder setHotwordRule(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) { - if (hotwordRuleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - hotwordRuleBuilder_.setMessage(value); - } - typeCase_ = 1; - return this; - } - /** - *
-       * Hotword-based detection rule.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public Builder setHotwordRule( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder builderForValue) { - if (hotwordRuleBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - hotwordRuleBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 1; - return this; - } - /** - *
-       * Hotword-based detection rule.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public Builder mergeHotwordRule(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) { - if (hotwordRuleBuilder_ == null) { - if (typeCase_ == 1 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 1) { - hotwordRuleBuilder_.mergeFrom(value); - } else { - hotwordRuleBuilder_.setMessage(value); - } - } - typeCase_ = 1; - return this; - } - /** - *
-       * Hotword-based detection rule.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public Builder clearHotwordRule() { - if (hotwordRuleBuilder_ == null) { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - } - hotwordRuleBuilder_.clear(); - } - return this; - } - /** - *
-       * Hotword-based detection rule.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder getHotwordRuleBuilder() { - return getHotwordRuleFieldBuilder().getBuilder(); - } - /** - *
-       * Hotword-based detection rule.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder() { - if ((typeCase_ == 1) && (hotwordRuleBuilder_ != null)) { - return hotwordRuleBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - } - /** - *
-       * Hotword-based detection rule.
-       * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder> - getHotwordRuleFieldBuilder() { - if (hotwordRuleBuilder_ == null) { - if (!(typeCase_ == 1)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - hotwordRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 1; - onChanged();; - return hotwordRuleBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType.DetectionRule) - private static final com.google.privacy.dlp.v2.CustomInfoType.DetectionRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType.DetectionRule(); - } - - public static com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DetectionRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DetectionRule(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DICTIONARY(2), - REGEX(3), - SURROGATE_TYPE(4), - STORED_TYPE(5), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 2: return DICTIONARY; - case 3: return REGEX; - case 4: return SURROGATE_TYPE; - case 5: return STORED_TYPE; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int INFO_TYPE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.InfoType infoType_; - /** - *
-   * CustomInfoType can either be a new infoType, or an extension of built-in
-   * infoType, when the name matches one of existing infoTypes and that infoType
-   * is specified in `InspectContent.info_types` field. Specifying the latter
-   * adds findings to the one detected by the system. If built-in info type is
-   * not specified in `InspectContent.info_types` list then the name is treated
-   * as a custom info type.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return infoType_ != null; - } - /** - *
-   * CustomInfoType can either be a new infoType, or an extension of built-in
-   * infoType, when the name matches one of existing infoTypes and that infoType
-   * is specified in `InspectContent.info_types` field. Specifying the latter
-   * adds findings to the one detected by the system. If built-in info type is
-   * not specified in `InspectContent.info_types` list then the name is treated
-   * as a custom info type.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - /** - *
-   * CustomInfoType can either be a new infoType, or an extension of built-in
-   * infoType, when the name matches one of existing infoTypes and that infoType
-   * is specified in `InspectContent.info_types` field. Specifying the latter
-   * adds findings to the one detected by the system. If built-in info type is
-   * not specified in `InspectContent.info_types` list then the name is treated
-   * as a custom info type.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - return getInfoType(); - } - - public static final int LIKELIHOOD_FIELD_NUMBER = 6; - private int likelihood_; - /** - *
-   * Likelihood to return for this CustomInfoType. This base value can be
-   * altered by a detection rule if the finding meets the criteria specified by
-   * the rule. Defaults to `VERY_LIKELY` if not specified.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 6; - * @return The enum numeric value on the wire for likelihood. - */ - @java.lang.Override public int getLikelihoodValue() { - return likelihood_; - } - /** - *
-   * Likelihood to return for this CustomInfoType. This base value can be
-   * altered by a detection rule if the finding meets the criteria specified by
-   * the rule. Defaults to `VERY_LIKELY` if not specified.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 6; - * @return The likelihood. - */ - @java.lang.Override public com.google.privacy.dlp.v2.Likelihood getLikelihood() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_); - return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; - } - - public static final int DICTIONARY_FIELD_NUMBER = 2; - /** - *
-   * A list of phrases to detect as a CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - * @return Whether the dictionary field is set. - */ - @java.lang.Override - public boolean hasDictionary() { - return typeCase_ == 2; - } - /** - *
-   * A list of phrases to detect as a CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - * @return The dictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - /** - *
-   * A list of phrases to detect as a CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - - public static final int REGEX_FIELD_NUMBER = 3; - /** - *
-   * Regular expression based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - * @return Whether the regex field is set. - */ - @java.lang.Override - public boolean hasRegex() { - return typeCase_ == 3; - } - /** - *
-   * Regular expression based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - * @return The regex. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - /** - *
-   * Regular expression based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - - public static final int SURROGATE_TYPE_FIELD_NUMBER = 4; - /** - *
-   * Message for detecting output from deidentification transformations that
-   * support reversing.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - * @return Whether the surrogateType field is set. - */ - @java.lang.Override - public boolean hasSurrogateType() { - return typeCase_ == 4; - } - /** - *
-   * Message for detecting output from deidentification transformations that
-   * support reversing.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - * @return The surrogateType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); - } - /** - *
-   * Message for detecting output from deidentification transformations that
-   * support reversing.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder getSurrogateTypeOrBuilder() { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); - } - - public static final int STORED_TYPE_FIELD_NUMBER = 5; - /** - *
-   * Load an existing `StoredInfoType` resource for use in
-   * `InspectDataSource`. Not currently supported in `InspectContent`.
-   * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - * @return Whether the storedType field is set. - */ - @java.lang.Override - public boolean hasStoredType() { - return typeCase_ == 5; - } - /** - *
-   * Load an existing `StoredInfoType` resource for use in
-   * `InspectDataSource`. Not currently supported in `InspectContent`.
-   * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - * @return The storedType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredType getStoredType() { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.StoredType) type_; - } - return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); - } - /** - *
-   * Load an existing `StoredInfoType` resource for use in
-   * `InspectDataSource`. Not currently supported in `InspectContent`.
-   * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder() { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.StoredType) type_; - } - return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); - } - - public static final int DETECTION_RULES_FIELD_NUMBER = 7; - private java.util.List detectionRules_; - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - @java.lang.Override - public java.util.List getDetectionRulesList() { - return detectionRules_; - } - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - @java.lang.Override - public java.util.List - getDetectionRulesOrBuilderList() { - return detectionRules_; - } - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - @java.lang.Override - public int getDetectionRulesCount() { - return detectionRules_.size(); - } - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index) { - return detectionRules_.get(index); - } - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetectionRulesOrBuilder( - int index) { - return detectionRules_.get(index); - } - - public static final int EXCLUSION_TYPE_FIELD_NUMBER = 8; - private int exclusionType_; - /** - *
-   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
-   * to be returned. It still can be used for rules matching.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; - * @return The enum numeric value on the wire for exclusionType. - */ - @java.lang.Override public int getExclusionTypeValue() { - return exclusionType_; - } - /** - *
-   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
-   * to be returned. It still can be used for rules matching.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; - * @return The exclusionType. - */ - @java.lang.Override public com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.CustomInfoType.ExclusionType result = com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.valueOf(exclusionType_); - return result == null ? com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (infoType_ != null) { - output.writeMessage(1, getInfoType()); - } - if (typeCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); - } - if (typeCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); - } - if (typeCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_); - } - if (typeCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.StoredType) type_); - } - if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { - output.writeEnum(6, likelihood_); - } - for (int i = 0; i < detectionRules_.size(); i++) { - output.writeMessage(7, detectionRules_.get(i)); - } - if (exclusionType_ != com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.EXCLUSION_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(8, exclusionType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (infoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInfoType()); - } - if (typeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); - } - if (typeCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); - } - if (typeCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_); - } - if (typeCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.StoredType) type_); - } - if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, likelihood_); - } - for (int i = 0; i < detectionRules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, detectionRules_.get(i)); - } - if (exclusionType_ != com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.EXCLUSION_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, exclusionType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.CustomInfoType)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.CustomInfoType other = (com.google.privacy.dlp.v2.CustomInfoType) obj; - - if (hasInfoType() != other.hasInfoType()) return false; - if (hasInfoType()) { - if (!getInfoType() - .equals(other.getInfoType())) return false; - } - if (likelihood_ != other.likelihood_) return false; - if (!getDetectionRulesList() - .equals(other.getDetectionRulesList())) return false; - if (exclusionType_ != other.exclusionType_) return false; - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 2: - if (!getDictionary() - .equals(other.getDictionary())) return false; - break; - case 3: - if (!getRegex() - .equals(other.getRegex())) return false; - break; - case 4: - if (!getSurrogateType() - .equals(other.getSurrogateType())) return false; - break; - case 5: - if (!getStoredType() - .equals(other.getStoredType())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInfoType()) { - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - } - hash = (37 * hash) + LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + likelihood_; - if (getDetectionRulesCount() > 0) { - hash = (37 * hash) + DETECTION_RULES_FIELD_NUMBER; - hash = (53 * hash) + getDetectionRulesList().hashCode(); - } - hash = (37 * hash) + EXCLUSION_TYPE_FIELD_NUMBER; - hash = (53 * hash) + exclusionType_; - switch (typeCase_) { - case 2: - hash = (37 * hash) + DICTIONARY_FIELD_NUMBER; - hash = (53 * hash) + getDictionary().hashCode(); - break; - case 3: - hash = (37 * hash) + REGEX_FIELD_NUMBER; - hash = (53 * hash) + getRegex().hashCode(); - break; - case 4: - hash = (37 * hash) + SURROGATE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getSurrogateType().hashCode(); - break; - case 5: - hash = (37 * hash) + STORED_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getStoredType().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.CustomInfoType parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.CustomInfoType prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Custom information type provided by the user. Used to find domain-specific
-   * sensitive information configurable to the data in question.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.CustomInfoType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CustomInfoType) - com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.CustomInfoType.class, com.google.privacy.dlp.v2.CustomInfoType.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.CustomInfoType.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDetectionRulesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypeBuilder_ == null) { - infoType_ = null; - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - likelihood_ = 0; - - if (detectionRulesBuilder_ == null) { - detectionRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - detectionRulesBuilder_.clear(); - } - exclusionType_ = 0; - - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType build() { - com.google.privacy.dlp.v2.CustomInfoType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType buildPartial() { - com.google.privacy.dlp.v2.CustomInfoType result = new com.google.privacy.dlp.v2.CustomInfoType(this); - int from_bitField0_ = bitField0_; - if (infoTypeBuilder_ == null) { - result.infoType_ = infoType_; - } else { - result.infoType_ = infoTypeBuilder_.build(); - } - result.likelihood_ = likelihood_; - if (typeCase_ == 2) { - if (dictionaryBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = dictionaryBuilder_.build(); - } - } - if (typeCase_ == 3) { - if (regexBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = regexBuilder_.build(); - } - } - if (typeCase_ == 4) { - if (surrogateTypeBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = surrogateTypeBuilder_.build(); - } - } - if (typeCase_ == 5) { - if (storedTypeBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = storedTypeBuilder_.build(); - } - } - if (detectionRulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - detectionRules_ = java.util.Collections.unmodifiableList(detectionRules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.detectionRules_ = detectionRules_; - } else { - result.detectionRules_ = detectionRulesBuilder_.build(); - } - result.exclusionType_ = exclusionType_; - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.CustomInfoType) { - return mergeFrom((com.google.privacy.dlp.v2.CustomInfoType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.CustomInfoType other) { - if (other == com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()) return this; - if (other.hasInfoType()) { - mergeInfoType(other.getInfoType()); - } - if (other.likelihood_ != 0) { - setLikelihoodValue(other.getLikelihoodValue()); - } - if (detectionRulesBuilder_ == null) { - if (!other.detectionRules_.isEmpty()) { - if (detectionRules_.isEmpty()) { - detectionRules_ = other.detectionRules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDetectionRulesIsMutable(); - detectionRules_.addAll(other.detectionRules_); - } - onChanged(); - } - } else { - if (!other.detectionRules_.isEmpty()) { - if (detectionRulesBuilder_.isEmpty()) { - detectionRulesBuilder_.dispose(); - detectionRulesBuilder_ = null; - detectionRules_ = other.detectionRules_; - bitField0_ = (bitField0_ & ~0x00000001); - detectionRulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDetectionRulesFieldBuilder() : null; - } else { - detectionRulesBuilder_.addAllMessages(other.detectionRules_); - } - } - } - if (other.exclusionType_ != 0) { - setExclusionTypeValue(other.getExclusionTypeValue()); - } - switch (other.getTypeCase()) { - case DICTIONARY: { - mergeDictionary(other.getDictionary()); - break; - } - case REGEX: { - mergeRegex(other.getRegex()); - break; - } - case SURROGATE_TYPE: { - mergeSurrogateType(other.getSurrogateType()); - break; - } - case STORED_TYPE: { - mergeStoredType(other.getStoredType()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.CustomInfoType parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.CustomInfoType) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.privacy.dlp.v2.InfoType infoType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-     * CustomInfoType can either be a new infoType, or an extension of built-in
-     * infoType, when the name matches one of existing infoTypes and that infoType
-     * is specified in `InspectContent.info_types` field. Specifying the latter
-     * adds findings to the one detected by the system. If built-in info type is
-     * not specified in `InspectContent.info_types` list then the name is treated
-     * as a custom info type.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - public boolean hasInfoType() { - return infoTypeBuilder_ != null || infoType_ != null; - } - /** - *
-     * CustomInfoType can either be a new infoType, or an extension of built-in
-     * infoType, when the name matches one of existing infoTypes and that infoType
-     * is specified in `InspectContent.info_types` field. Specifying the latter
-     * adds findings to the one detected by the system. If built-in info type is
-     * not specified in `InspectContent.info_types` list then the name is treated
-     * as a custom info type.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } else { - return infoTypeBuilder_.getMessage(); - } - } - /** - *
-     * CustomInfoType can either be a new infoType, or an extension of built-in
-     * infoType, when the name matches one of existing infoTypes and that infoType
-     * is specified in `InspectContent.info_types` field. Specifying the latter
-     * adds findings to the one detected by the system. If built-in info type is
-     * not specified in `InspectContent.info_types` list then the name is treated
-     * as a custom info type.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infoType_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * CustomInfoType can either be a new infoType, or an extension of built-in
-     * infoType, when the name matches one of existing infoTypes and that infoType
-     * is specified in `InspectContent.info_types` field. Specifying the latter
-     * adds findings to the one detected by the system. If built-in info type is
-     * not specified in `InspectContent.info_types` list then the name is treated
-     * as a custom info type.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - infoType_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * CustomInfoType can either be a new infoType, or an extension of built-in
-     * infoType, when the name matches one of existing infoTypes and that infoType
-     * is specified in `InspectContent.info_types` field. Specifying the latter
-     * adds findings to the one detected by the system. If built-in info type is
-     * not specified in `InspectContent.info_types` list then the name is treated
-     * as a custom info type.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (infoType_ != null) { - infoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); - } else { - infoType_ = value; - } - onChanged(); - } else { - infoTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * CustomInfoType can either be a new infoType, or an extension of built-in
-     * infoType, when the name matches one of existing infoTypes and that infoType
-     * is specified in `InspectContent.info_types` field. Specifying the latter
-     * adds findings to the one detected by the system. If built-in info type is
-     * not specified in `InspectContent.info_types` list then the name is treated
-     * as a custom info type.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - infoType_ = null; - onChanged(); - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - - return this; - } - /** - *
-     * CustomInfoType can either be a new infoType, or an extension of built-in
-     * infoType, when the name matches one of existing infoTypes and that infoType
-     * is specified in `InspectContent.info_types` field. Specifying the latter
-     * adds findings to the one detected by the system. If built-in info type is
-     * not specified in `InspectContent.info_types` list then the name is treated
-     * as a custom info type.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - - onChanged(); - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-     * CustomInfoType can either be a new infoType, or an extension of built-in
-     * infoType, when the name matches one of existing infoTypes and that infoType
-     * is specified in `InspectContent.info_types` field. Specifying the latter
-     * adds findings to the one detected by the system. If built-in info type is
-     * not specified in `InspectContent.info_types` list then the name is treated
-     * as a custom info type.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (infoTypeBuilder_ != null) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - return infoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - } - /** - *
-     * CustomInfoType can either be a new infoType, or an extension of built-in
-     * infoType, when the name matches one of existing infoTypes and that infoType
-     * is specified in `InspectContent.info_types` field. Specifying the latter
-     * adds findings to the one detected by the system. If built-in info type is
-     * not specified in `InspectContent.info_types` list then the name is treated
-     * as a custom info type.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getInfoType(), - getParentForChildren(), - isClean()); - infoType_ = null; - } - return infoTypeBuilder_; - } - - private int likelihood_ = 0; - /** - *
-     * Likelihood to return for this CustomInfoType. This base value can be
-     * altered by a detection rule if the finding meets the criteria specified by
-     * the rule. Defaults to `VERY_LIKELY` if not specified.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 6; - * @return The enum numeric value on the wire for likelihood. - */ - @java.lang.Override public int getLikelihoodValue() { - return likelihood_; - } - /** - *
-     * Likelihood to return for this CustomInfoType. This base value can be
-     * altered by a detection rule if the finding meets the criteria specified by
-     * the rule. Defaults to `VERY_LIKELY` if not specified.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 6; - * @param value The enum numeric value on the wire for likelihood to set. - * @return This builder for chaining. - */ - public Builder setLikelihoodValue(int value) { - - likelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Likelihood to return for this CustomInfoType. This base value can be
-     * altered by a detection rule if the finding meets the criteria specified by
-     * the rule. Defaults to `VERY_LIKELY` if not specified.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 6; - * @return The likelihood. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Likelihood getLikelihood() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_); - return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Likelihood to return for this CustomInfoType. This base value can be
-     * altered by a detection rule if the finding meets the criteria specified by
-     * the rule. Defaults to `VERY_LIKELY` if not specified.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 6; - * @param value The likelihood to set. - * @return This builder for chaining. - */ - public Builder setLikelihood(com.google.privacy.dlp.v2.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - likelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Likelihood to return for this CustomInfoType. This base value can be
-     * altered by a detection rule if the finding meets the criteria specified by
-     * the rule. Defaults to `VERY_LIKELY` if not specified.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 6; - * @return This builder for chaining. - */ - public Builder clearLikelihood() { - - likelihood_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> dictionaryBuilder_; - /** - *
-     * A list of phrases to detect as a CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - * @return Whether the dictionary field is set. - */ - @java.lang.Override - public boolean hasDictionary() { - return typeCase_ == 2; - } - /** - *
-     * A list of phrases to detect as a CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - * @return The dictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { - if (dictionaryBuilder_ == null) { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } else { - if (typeCase_ == 2) { - return dictionaryBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - } - /** - *
-     * A list of phrases to detect as a CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - */ - public Builder setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { - if (dictionaryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - dictionaryBuilder_.setMessage(value); - } - typeCase_ = 2; - return this; - } - /** - *
-     * A list of phrases to detect as a CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - */ - public Builder setDictionary( - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder builderForValue) { - if (dictionaryBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - dictionaryBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 2; - return this; - } - /** - *
-     * A list of phrases to detect as a CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - */ - public Builder mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { - if (dictionaryBuilder_ == null) { - if (typeCase_ == 2 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 2) { - dictionaryBuilder_.mergeFrom(value); - } else { - dictionaryBuilder_.setMessage(value); - } - } - typeCase_ = 2; - return this; - } - /** - *
-     * A list of phrases to detect as a CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - */ - public Builder clearDictionary() { - if (dictionaryBuilder_ == null) { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - } - dictionaryBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of phrases to detect as a CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder getDictionaryBuilder() { - return getDictionaryFieldBuilder().getBuilder(); - } - /** - *
-     * A list of phrases to detect as a CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { - if ((typeCase_ == 2) && (dictionaryBuilder_ != null)) { - return dictionaryBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - } - /** - *
-     * A list of phrases to detect as a CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> - getDictionaryFieldBuilder() { - if (dictionaryBuilder_ == null) { - if (!(typeCase_ == 2)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - dictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 2; - onChanged();; - return dictionaryBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> regexBuilder_; - /** - *
-     * Regular expression based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - * @return Whether the regex field is set. - */ - @java.lang.Override - public boolean hasRegex() { - return typeCase_ == 3; - } - /** - *
-     * Regular expression based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - * @return The regex. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { - if (regexBuilder_ == null) { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } else { - if (typeCase_ == 3) { - return regexBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - } - /** - *
-     * Regular expression based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - */ - public Builder setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { - if (regexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - regexBuilder_.setMessage(value); - } - typeCase_ = 3; - return this; - } - /** - *
-     * Regular expression based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - */ - public Builder setRegex( - com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) { - if (regexBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - regexBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 3; - return this; - } - /** - *
-     * Regular expression based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - */ - public Builder mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { - if (regexBuilder_ == null) { - if (typeCase_ == 3 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 3) { - regexBuilder_.mergeFrom(value); - } else { - regexBuilder_.setMessage(value); - } - } - typeCase_ = 3; - return this; - } - /** - *
-     * Regular expression based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - */ - public Builder clearRegex() { - if (regexBuilder_ == null) { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - } - regexBuilder_.clear(); - } - return this; - } - /** - *
-     * Regular expression based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getRegexBuilder() { - return getRegexFieldBuilder().getBuilder(); - } - /** - *
-     * Regular expression based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { - if ((typeCase_ == 3) && (regexBuilder_ != null)) { - return regexBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - } - /** - *
-     * Regular expression based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> - getRegexFieldBuilder() { - if (regexBuilder_ == null) { - if (!(typeCase_ == 3)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - regexBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 3; - onChanged();; - return regexBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder, com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder> surrogateTypeBuilder_; - /** - *
-     * Message for detecting output from deidentification transformations that
-     * support reversing.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - * @return Whether the surrogateType field is set. - */ - @java.lang.Override - public boolean hasSurrogateType() { - return typeCase_ == 4; - } - /** - *
-     * Message for detecting output from deidentification transformations that
-     * support reversing.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - * @return The surrogateType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() { - if (surrogateTypeBuilder_ == null) { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); - } else { - if (typeCase_ == 4) { - return surrogateTypeBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); - } - } - /** - *
-     * Message for detecting output from deidentification transformations that
-     * support reversing.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - */ - public Builder setSurrogateType(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value) { - if (surrogateTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - surrogateTypeBuilder_.setMessage(value); - } - typeCase_ = 4; - return this; - } - /** - *
-     * Message for detecting output from deidentification transformations that
-     * support reversing.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - */ - public Builder setSurrogateType( - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder builderForValue) { - if (surrogateTypeBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - surrogateTypeBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 4; - return this; - } - /** - *
-     * Message for detecting output from deidentification transformations that
-     * support reversing.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - */ - public Builder mergeSurrogateType(com.google.privacy.dlp.v2.CustomInfoType.SurrogateType value) { - if (surrogateTypeBuilder_ == null) { - if (typeCase_ == 4 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 4) { - surrogateTypeBuilder_.mergeFrom(value); - } else { - surrogateTypeBuilder_.setMessage(value); - } - } - typeCase_ = 4; - return this; - } - /** - *
-     * Message for detecting output from deidentification transformations that
-     * support reversing.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - */ - public Builder clearSurrogateType() { - if (surrogateTypeBuilder_ == null) { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - } - surrogateTypeBuilder_.clear(); - } - return this; - } - /** - *
-     * Message for detecting output from deidentification transformations that
-     * support reversing.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - */ - public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder getSurrogateTypeBuilder() { - return getSurrogateTypeFieldBuilder().getBuilder(); - } - /** - *
-     * Message for detecting output from deidentification transformations that
-     * support reversing.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder getSurrogateTypeOrBuilder() { - if ((typeCase_ == 4) && (surrogateTypeBuilder_ != null)) { - return surrogateTypeBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); - } - } - /** - *
-     * Message for detecting output from deidentification transformations that
-     * support reversing.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder, com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder> - getSurrogateTypeFieldBuilder() { - if (surrogateTypeBuilder_ == null) { - if (!(typeCase_ == 4)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.getDefaultInstance(); - } - surrogateTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder, com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.SurrogateType) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 4; - onChanged();; - return surrogateTypeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredType, com.google.privacy.dlp.v2.StoredType.Builder, com.google.privacy.dlp.v2.StoredTypeOrBuilder> storedTypeBuilder_; - /** - *
-     * Load an existing `StoredInfoType` resource for use in
-     * `InspectDataSource`. Not currently supported in `InspectContent`.
-     * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - * @return Whether the storedType field is set. - */ - @java.lang.Override - public boolean hasStoredType() { - return typeCase_ == 5; - } - /** - *
-     * Load an existing `StoredInfoType` resource for use in
-     * `InspectDataSource`. Not currently supported in `InspectContent`.
-     * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - * @return The storedType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredType getStoredType() { - if (storedTypeBuilder_ == null) { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.StoredType) type_; - } - return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); - } else { - if (typeCase_ == 5) { - return storedTypeBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); - } - } - /** - *
-     * Load an existing `StoredInfoType` resource for use in
-     * `InspectDataSource`. Not currently supported in `InspectContent`.
-     * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - */ - public Builder setStoredType(com.google.privacy.dlp.v2.StoredType value) { - if (storedTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - storedTypeBuilder_.setMessage(value); - } - typeCase_ = 5; - return this; - } - /** - *
-     * Load an existing `StoredInfoType` resource for use in
-     * `InspectDataSource`. Not currently supported in `InspectContent`.
-     * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - */ - public Builder setStoredType( - com.google.privacy.dlp.v2.StoredType.Builder builderForValue) { - if (storedTypeBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - storedTypeBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 5; - return this; - } - /** - *
-     * Load an existing `StoredInfoType` resource for use in
-     * `InspectDataSource`. Not currently supported in `InspectContent`.
-     * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - */ - public Builder mergeStoredType(com.google.privacy.dlp.v2.StoredType value) { - if (storedTypeBuilder_ == null) { - if (typeCase_ == 5 && - type_ != com.google.privacy.dlp.v2.StoredType.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.StoredType.newBuilder((com.google.privacy.dlp.v2.StoredType) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 5) { - storedTypeBuilder_.mergeFrom(value); - } else { - storedTypeBuilder_.setMessage(value); - } - } - typeCase_ = 5; - return this; - } - /** - *
-     * Load an existing `StoredInfoType` resource for use in
-     * `InspectDataSource`. Not currently supported in `InspectContent`.
-     * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - */ - public Builder clearStoredType() { - if (storedTypeBuilder_ == null) { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - } - storedTypeBuilder_.clear(); - } - return this; - } - /** - *
-     * Load an existing `StoredInfoType` resource for use in
-     * `InspectDataSource`. Not currently supported in `InspectContent`.
-     * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - */ - public com.google.privacy.dlp.v2.StoredType.Builder getStoredTypeBuilder() { - return getStoredTypeFieldBuilder().getBuilder(); - } - /** - *
-     * Load an existing `StoredInfoType` resource for use in
-     * `InspectDataSource`. Not currently supported in `InspectContent`.
-     * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder() { - if ((typeCase_ == 5) && (storedTypeBuilder_ != null)) { - return storedTypeBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.StoredType) type_; - } - return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); - } - } - /** - *
-     * Load an existing `StoredInfoType` resource for use in
-     * `InspectDataSource`. Not currently supported in `InspectContent`.
-     * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredType, com.google.privacy.dlp.v2.StoredType.Builder, com.google.privacy.dlp.v2.StoredTypeOrBuilder> - getStoredTypeFieldBuilder() { - if (storedTypeBuilder_ == null) { - if (!(typeCase_ == 5)) { - type_ = com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); - } - storedTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredType, com.google.privacy.dlp.v2.StoredType.Builder, com.google.privacy.dlp.v2.StoredTypeOrBuilder>( - (com.google.privacy.dlp.v2.StoredType) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 5; - onChanged();; - return storedTypeBuilder_; - } - - private java.util.List detectionRules_ = - java.util.Collections.emptyList(); - private void ensureDetectionRulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - detectionRules_ = new java.util.ArrayList(detectionRules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder> detectionRulesBuilder_; - - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public java.util.List getDetectionRulesList() { - if (detectionRulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(detectionRules_); - } else { - return detectionRulesBuilder_.getMessageList(); - } - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public int getDetectionRulesCount() { - if (detectionRulesBuilder_ == null) { - return detectionRules_.size(); - } else { - return detectionRulesBuilder_.getCount(); - } - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index) { - if (detectionRulesBuilder_ == null) { - return detectionRules_.get(index); - } else { - return detectionRulesBuilder_.getMessage(index); - } - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public Builder setDetectionRules( - int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) { - if (detectionRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectionRulesIsMutable(); - detectionRules_.set(index, value); - onChanged(); - } else { - detectionRulesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public Builder setDetectionRules( - int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) { - if (detectionRulesBuilder_ == null) { - ensureDetectionRulesIsMutable(); - detectionRules_.set(index, builderForValue.build()); - onChanged(); - } else { - detectionRulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public Builder addDetectionRules(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) { - if (detectionRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectionRulesIsMutable(); - detectionRules_.add(value); - onChanged(); - } else { - detectionRulesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public Builder addDetectionRules( - int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule value) { - if (detectionRulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetectionRulesIsMutable(); - detectionRules_.add(index, value); - onChanged(); - } else { - detectionRulesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public Builder addDetectionRules( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) { - if (detectionRulesBuilder_ == null) { - ensureDetectionRulesIsMutable(); - detectionRules_.add(builderForValue.build()); - onChanged(); - } else { - detectionRulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public Builder addDetectionRules( - int index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder builderForValue) { - if (detectionRulesBuilder_ == null) { - ensureDetectionRulesIsMutable(); - detectionRules_.add(index, builderForValue.build()); - onChanged(); - } else { - detectionRulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public Builder addAllDetectionRules( - java.lang.Iterable values) { - if (detectionRulesBuilder_ == null) { - ensureDetectionRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, detectionRules_); - onChanged(); - } else { - detectionRulesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public Builder clearDetectionRules() { - if (detectionRulesBuilder_ == null) { - detectionRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - detectionRulesBuilder_.clear(); - } - return this; - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public Builder removeDetectionRules(int index) { - if (detectionRulesBuilder_ == null) { - ensureDetectionRulesIsMutable(); - detectionRules_.remove(index); - onChanged(); - } else { - detectionRulesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder getDetectionRulesBuilder( - int index) { - return getDetectionRulesFieldBuilder().getBuilder(index); - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetectionRulesOrBuilder( - int index) { - if (detectionRulesBuilder_ == null) { - return detectionRules_.get(index); } else { - return detectionRulesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public java.util.List - getDetectionRulesOrBuilderList() { - if (detectionRulesBuilder_ != null) { - return detectionRulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(detectionRules_); - } - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder addDetectionRulesBuilder() { - return getDetectionRulesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance()); - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder addDetectionRulesBuilder( - int index) { - return getDetectionRulesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.getDefaultInstance()); - } - /** - *
-     * Set of detection rules to apply to all findings of this CustomInfoType.
-     * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` CustomInfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - public java.util.List - getDetectionRulesBuilderList() { - return getDetectionRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder> - getDetectionRulesFieldBuilder() { - if (detectionRulesBuilder_ == null) { - detectionRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder>( - detectionRules_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - detectionRules_ = null; - } - return detectionRulesBuilder_; - } - - private int exclusionType_ = 0; - /** - *
-     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
-     * to be returned. It still can be used for rules matching.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; - * @return The enum numeric value on the wire for exclusionType. - */ - @java.lang.Override public int getExclusionTypeValue() { - return exclusionType_; - } - /** - *
-     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
-     * to be returned. It still can be used for rules matching.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; - * @param value The enum numeric value on the wire for exclusionType to set. - * @return This builder for chaining. - */ - public Builder setExclusionTypeValue(int value) { - - exclusionType_ = value; - onChanged(); - return this; - } - /** - *
-     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
-     * to be returned. It still can be used for rules matching.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; - * @return The exclusionType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.CustomInfoType.ExclusionType result = com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.valueOf(exclusionType_); - return result == null ? com.google.privacy.dlp.v2.CustomInfoType.ExclusionType.UNRECOGNIZED : result; - } - /** - *
-     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
-     * to be returned. It still can be used for rules matching.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; - * @param value The exclusionType to set. - * @return This builder for chaining. - */ - public Builder setExclusionType(com.google.privacy.dlp.v2.CustomInfoType.ExclusionType value) { - if (value == null) { - throw new NullPointerException(); - } - - exclusionType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
-     * to be returned. It still can be used for rules matching.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; - * @return This builder for chaining. - */ - public Builder clearExclusionType() { - - exclusionType_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.CustomInfoType) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CustomInfoType) - private static final com.google.privacy.dlp.v2.CustomInfoType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CustomInfoType(); - } - - public static com.google.privacy.dlp.v2.CustomInfoType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CustomInfoType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CustomInfoType(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java deleted file mode 100644 index f0a7f5de5363..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java +++ /dev/null @@ -1,265 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface CustomInfoTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CustomInfoType) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * CustomInfoType can either be a new infoType, or an extension of built-in
-   * infoType, when the name matches one of existing infoTypes and that infoType
-   * is specified in `InspectContent.info_types` field. Specifying the latter
-   * adds findings to the one detected by the system. If built-in info type is
-   * not specified in `InspectContent.info_types` list then the name is treated
-   * as a custom info type.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-   * CustomInfoType can either be a new infoType, or an extension of built-in
-   * infoType, when the name matches one of existing infoTypes and that infoType
-   * is specified in `InspectContent.info_types` field. Specifying the latter
-   * adds findings to the one detected by the system. If built-in info type is
-   * not specified in `InspectContent.info_types` list then the name is treated
-   * as a custom info type.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-   * CustomInfoType can either be a new infoType, or an extension of built-in
-   * infoType, when the name matches one of existing infoTypes and that infoType
-   * is specified in `InspectContent.info_types` field. Specifying the latter
-   * adds findings to the one detected by the system. If built-in info type is
-   * not specified in `InspectContent.info_types` list then the name is treated
-   * as a custom info type.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-   * Likelihood to return for this CustomInfoType. This base value can be
-   * altered by a detection rule if the finding meets the criteria specified by
-   * the rule. Defaults to `VERY_LIKELY` if not specified.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 6; - * @return The enum numeric value on the wire for likelihood. - */ - int getLikelihoodValue(); - /** - *
-   * Likelihood to return for this CustomInfoType. This base value can be
-   * altered by a detection rule if the finding meets the criteria specified by
-   * the rule. Defaults to `VERY_LIKELY` if not specified.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 6; - * @return The likelihood. - */ - com.google.privacy.dlp.v2.Likelihood getLikelihood(); - - /** - *
-   * A list of phrases to detect as a CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - * @return Whether the dictionary field is set. - */ - boolean hasDictionary(); - /** - *
-   * A list of phrases to detect as a CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - * @return The dictionary. - */ - com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary(); - /** - *
-   * A list of phrases to detect as a CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; - */ - com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder(); - - /** - *
-   * Regular expression based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - * @return Whether the regex field is set. - */ - boolean hasRegex(); - /** - *
-   * Regular expression based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - * @return The regex. - */ - com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex(); - /** - *
-   * Regular expression based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; - */ - com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder(); - - /** - *
-   * Message for detecting output from deidentification transformations that
-   * support reversing.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - * @return Whether the surrogateType field is set. - */ - boolean hasSurrogateType(); - /** - *
-   * Message for detecting output from deidentification transformations that
-   * support reversing.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - * @return The surrogateType. - */ - com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType(); - /** - *
-   * Message for detecting output from deidentification transformations that
-   * support reversing.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; - */ - com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder getSurrogateTypeOrBuilder(); - - /** - *
-   * Load an existing `StoredInfoType` resource for use in
-   * `InspectDataSource`. Not currently supported in `InspectContent`.
-   * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - * @return Whether the storedType field is set. - */ - boolean hasStoredType(); - /** - *
-   * Load an existing `StoredInfoType` resource for use in
-   * `InspectDataSource`. Not currently supported in `InspectContent`.
-   * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - * @return The storedType. - */ - com.google.privacy.dlp.v2.StoredType getStoredType(); - /** - *
-   * Load an existing `StoredInfoType` resource for use in
-   * `InspectDataSource`. Not currently supported in `InspectContent`.
-   * 
- * - * .google.privacy.dlp.v2.StoredType stored_type = 5; - */ - com.google.privacy.dlp.v2.StoredTypeOrBuilder getStoredTypeOrBuilder(); - - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - java.util.List - getDetectionRulesList(); - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index); - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - int getDetectionRulesCount(); - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - java.util.List - getDetectionRulesOrBuilderList(); - /** - *
-   * Set of detection rules to apply to all findings of this CustomInfoType.
-   * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` CustomInfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetectionRulesOrBuilder( - int index); - - /** - *
-   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
-   * to be returned. It still can be used for rules matching.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; - * @return The enum numeric value on the wire for exclusionType. - */ - int getExclusionTypeValue(); - /** - *
-   * If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding
-   * to be returned. It still can be used for rules matching.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.ExclusionType exclusion_type = 8; - * @return The exclusionType. - */ - com.google.privacy.dlp.v2.CustomInfoType.ExclusionType getExclusionType(); - - public com.google.privacy.dlp.v2.CustomInfoType.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileAction.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileAction.java deleted file mode 100644 index 699a1956be81..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileAction.java +++ /dev/null @@ -1,3301 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A task to execute when a data profile has been generated.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction} - */ -public final class DataProfileAction extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileAction) - DataProfileActionOrBuilder { -private static final long serialVersionUID = 0L; - // Use DataProfileAction.newBuilder() to construct. - private DataProfileAction(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DataProfileAction() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DataProfileAction(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataProfileAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.DataProfileAction.Export.Builder subBuilder = null; - if (actionCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.DataProfileAction.Export) action_).toBuilder(); - } - action_ = - input.readMessage(com.google.privacy.dlp.v2.DataProfileAction.Export.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.DataProfileAction.Export) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder subBuilder = null; - if (actionCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_).toBuilder(); - } - action_ = - input.readMessage(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileAction.class, com.google.privacy.dlp.v2.DataProfileAction.Builder.class); - } - - /** - *
-   * Types of event that can trigger an action.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.DataProfileAction.EventType} - */ - public enum EventType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * EVENT_TYPE_UNSPECIFIED = 0; - */ - EVENT_TYPE_UNSPECIFIED(0), - /** - *
-     * New profile (not a re-profile).
-     * 
- * - * NEW_PROFILE = 1; - */ - NEW_PROFILE(1), - /** - *
-     * Changed one of the following profile metrics:
-     * * Table data risk score
-     * * Table sensitivity score
-     * * Table resource visibility
-     * * Table encryption type
-     * * Table predicted infoTypes
-     * * Table other infoTypes
-     * 
- * - * CHANGED_PROFILE = 2; - */ - CHANGED_PROFILE(2), - /** - *
-     * Table data risk score or sensitivity score increased.
-     * 
- * - * SCORE_INCREASED = 3; - */ - SCORE_INCREASED(3), - /** - *
-     * A user (non-internal) error occurred.
-     * 
- * - * ERROR_CHANGED = 4; - */ - ERROR_CHANGED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * EVENT_TYPE_UNSPECIFIED = 0; - */ - public static final int EVENT_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * New profile (not a re-profile).
-     * 
- * - * NEW_PROFILE = 1; - */ - public static final int NEW_PROFILE_VALUE = 1; - /** - *
-     * Changed one of the following profile metrics:
-     * * Table data risk score
-     * * Table sensitivity score
-     * * Table resource visibility
-     * * Table encryption type
-     * * Table predicted infoTypes
-     * * Table other infoTypes
-     * 
- * - * CHANGED_PROFILE = 2; - */ - public static final int CHANGED_PROFILE_VALUE = 2; - /** - *
-     * Table data risk score or sensitivity score increased.
-     * 
- * - * SCORE_INCREASED = 3; - */ - public static final int SCORE_INCREASED_VALUE = 3; - /** - *
-     * A user (non-internal) error occurred.
-     * 
- * - * ERROR_CHANGED = 4; - */ - public static final int ERROR_CHANGED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EventType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static EventType forNumber(int value) { - switch (value) { - case 0: return EVENT_TYPE_UNSPECIFIED; - case 1: return NEW_PROFILE; - case 2: return CHANGED_PROFILE; - case 3: return SCORE_INCREASED; - case 4: return ERROR_CHANGED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - EventType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EventType findValueByNumber(int number) { - return EventType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DataProfileAction.getDescriptor().getEnumTypes().get(0); - } - - private static final EventType[] VALUES = values(); - - public static EventType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private EventType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataProfileAction.EventType) - } - - public interface ExportOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileAction.Export) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Store all table and column profiles in an existing table or a new table
-     * in an existing dataset. Each re-generation will result in a new row in
-     * BigQuery.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - * @return Whether the profileTable field is set. - */ - boolean hasProfileTable(); - /** - *
-     * Store all table and column profiles in an existing table or a new table
-     * in an existing dataset. Each re-generation will result in a new row in
-     * BigQuery.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - * @return The profileTable. - */ - com.google.privacy.dlp.v2.BigQueryTable getProfileTable(); - /** - *
-     * Store all table and column profiles in an existing table or a new table
-     * in an existing dataset. Each re-generation will result in a new row in
-     * BigQuery.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - */ - com.google.privacy.dlp.v2.BigQueryTableOrBuilder getProfileTableOrBuilder(); - } - /** - *
-   * If set, the detailed data profiles will be persisted to the location
-   * of your choice whenever updated.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction.Export} - */ - public static final class Export extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileAction.Export) - ExportOrBuilder { - private static final long serialVersionUID = 0L; - // Use Export.newBuilder() to construct. - private Export(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Export() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Export(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Export( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (profileTable_ != null) { - subBuilder = profileTable_.toBuilder(); - } - profileTable_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(profileTable_); - profileTable_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileAction.Export.class, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder.class); - } - - public static final int PROFILE_TABLE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.BigQueryTable profileTable_; - /** - *
-     * Store all table and column profiles in an existing table or a new table
-     * in an existing dataset. Each re-generation will result in a new row in
-     * BigQuery.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - * @return Whether the profileTable field is set. - */ - @java.lang.Override - public boolean hasProfileTable() { - return profileTable_ != null; - } - /** - *
-     * Store all table and column profiles in an existing table or a new table
-     * in an existing dataset. Each re-generation will result in a new row in
-     * BigQuery.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - * @return The profileTable. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getProfileTable() { - return profileTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : profileTable_; - } - /** - *
-     * Store all table and column profiles in an existing table or a new table
-     * in an existing dataset. Each re-generation will result in a new row in
-     * BigQuery.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getProfileTableOrBuilder() { - return getProfileTable(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (profileTable_ != null) { - output.writeMessage(1, getProfileTable()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (profileTable_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProfileTable()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileAction.Export)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfileAction.Export other = (com.google.privacy.dlp.v2.DataProfileAction.Export) obj; - - if (hasProfileTable() != other.hasProfileTable()) return false; - if (hasProfileTable()) { - if (!getProfileTable() - .equals(other.getProfileTable())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProfileTable()) { - hash = (37 * hash) + PROFILE_TABLE_FIELD_NUMBER; - hash = (53 * hash) + getProfileTable().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileAction.Export parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileAction.Export prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * If set, the detailed data profiles will be persisted to the location
-     * of your choice whenever updated.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction.Export} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileAction.Export) - com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileAction.Export.class, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfileAction.Export.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (profileTableBuilder_ == null) { - profileTable_ = null; - } else { - profileTable_ = null; - profileTableBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.Export getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.Export build() { - com.google.privacy.dlp.v2.DataProfileAction.Export result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.Export buildPartial() { - com.google.privacy.dlp.v2.DataProfileAction.Export result = new com.google.privacy.dlp.v2.DataProfileAction.Export(this); - if (profileTableBuilder_ == null) { - result.profileTable_ = profileTable_; - } else { - result.profileTable_ = profileTableBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfileAction.Export) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfileAction.Export)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileAction.Export other) { - if (other == com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance()) return this; - if (other.hasProfileTable()) { - mergeProfileTable(other.getProfileTable()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfileAction.Export parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfileAction.Export) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.BigQueryTable profileTable_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> profileTableBuilder_; - /** - *
-       * Store all table and column profiles in an existing table or a new table
-       * in an existing dataset. Each re-generation will result in a new row in
-       * BigQuery.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - * @return Whether the profileTable field is set. - */ - public boolean hasProfileTable() { - return profileTableBuilder_ != null || profileTable_ != null; - } - /** - *
-       * Store all table and column profiles in an existing table or a new table
-       * in an existing dataset. Each re-generation will result in a new row in
-       * BigQuery.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - * @return The profileTable. - */ - public com.google.privacy.dlp.v2.BigQueryTable getProfileTable() { - if (profileTableBuilder_ == null) { - return profileTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : profileTable_; - } else { - return profileTableBuilder_.getMessage(); - } - } - /** - *
-       * Store all table and column profiles in an existing table or a new table
-       * in an existing dataset. Each re-generation will result in a new row in
-       * BigQuery.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - */ - public Builder setProfileTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (profileTableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - profileTable_ = value; - onChanged(); - } else { - profileTableBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Store all table and column profiles in an existing table or a new table
-       * in an existing dataset. Each re-generation will result in a new row in
-       * BigQuery.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - */ - public Builder setProfileTable( - com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { - if (profileTableBuilder_ == null) { - profileTable_ = builderForValue.build(); - onChanged(); - } else { - profileTableBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Store all table and column profiles in an existing table or a new table
-       * in an existing dataset. Each re-generation will result in a new row in
-       * BigQuery.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - */ - public Builder mergeProfileTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (profileTableBuilder_ == null) { - if (profileTable_ != null) { - profileTable_ = - com.google.privacy.dlp.v2.BigQueryTable.newBuilder(profileTable_).mergeFrom(value).buildPartial(); - } else { - profileTable_ = value; - } - onChanged(); - } else { - profileTableBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Store all table and column profiles in an existing table or a new table
-       * in an existing dataset. Each re-generation will result in a new row in
-       * BigQuery.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - */ - public Builder clearProfileTable() { - if (profileTableBuilder_ == null) { - profileTable_ = null; - onChanged(); - } else { - profileTable_ = null; - profileTableBuilder_ = null; - } - - return this; - } - /** - *
-       * Store all table and column profiles in an existing table or a new table
-       * in an existing dataset. Each re-generation will result in a new row in
-       * BigQuery.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - */ - public com.google.privacy.dlp.v2.BigQueryTable.Builder getProfileTableBuilder() { - - onChanged(); - return getProfileTableFieldBuilder().getBuilder(); - } - /** - *
-       * Store all table and column profiles in an existing table or a new table
-       * in an existing dataset. Each re-generation will result in a new row in
-       * BigQuery.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - */ - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getProfileTableOrBuilder() { - if (profileTableBuilder_ != null) { - return profileTableBuilder_.getMessageOrBuilder(); - } else { - return profileTable_ == null ? - com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : profileTable_; - } - } - /** - *
-       * Store all table and column profiles in an existing table or a new table
-       * in an existing dataset. Each re-generation will result in a new row in
-       * BigQuery.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable profile_table = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> - getProfileTableFieldBuilder() { - if (profileTableBuilder_ == null) { - profileTableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( - getProfileTable(), - getParentForChildren(), - isClean()); - profileTable_ = null; - } - return profileTableBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileAction.Export) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileAction.Export) - private static final com.google.privacy.dlp.v2.DataProfileAction.Export DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileAction.Export(); - } - - public static com.google.privacy.dlp.v2.DataProfileAction.Export getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Export parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Export(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.Export getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PubSubNotificationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Cloud Pub/Sub topic to send notifications to.
-     * Format is projects/{project}/topics/{topic}.
-     * 
- * - * string topic = 1; - * @return The topic. - */ - java.lang.String getTopic(); - /** - *
-     * Cloud Pub/Sub topic to send notifications to.
-     * Format is projects/{project}/topics/{topic}.
-     * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - com.google.protobuf.ByteString - getTopicBytes(); - - /** - *
-     * The type of event that triggers a Pub/Sub. At most one
-     * `PubSubNotification` per EventType is permitted.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The enum numeric value on the wire for event. - */ - int getEventValue(); - /** - *
-     * The type of event that triggers a Pub/Sub. At most one
-     * `PubSubNotification` per EventType is permitted.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The event. - */ - com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent(); - - /** - *
-     * Conditions (e.g., data risk or sensitivity level) for triggering a
-     * Pub/Sub.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - * @return Whether the pubsubCondition field is set. - */ - boolean hasPubsubCondition(); - /** - *
-     * Conditions (e.g., data risk or sensitivity level) for triggering a
-     * Pub/Sub.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - * @return The pubsubCondition. - */ - com.google.privacy.dlp.v2.DataProfilePubSubCondition getPubsubCondition(); - /** - *
-     * Conditions (e.g., data risk or sensitivity level) for triggering a
-     * Pub/Sub.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - */ - com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder getPubsubConditionOrBuilder(); - - /** - *
-     * How much data to include in the Pub/Sub message. If the user wishes to
-     * limit the size of the message, they can use resource_name and fetch the
-     * profile fields they wish to. Per table profile (not per column).
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; - * @return The enum numeric value on the wire for detailOfMessage. - */ - int getDetailOfMessageValue(); - /** - *
-     * How much data to include in the Pub/Sub message. If the user wishes to
-     * limit the size of the message, they can use resource_name and fetch the
-     * profile fields they wish to. Per table profile (not per column).
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; - * @return The detailOfMessage. - */ - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel getDetailOfMessage(); - } - /** - *
-   * Send a Pub/Sub message into the given Pub/Sub topic to connect other
-   * systems to data profile generation. The message payload data will
-   * be the byte serialization of `DataProfilePubSubMessage`.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction.PubSubNotification} - */ - public static final class PubSubNotification extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) - PubSubNotificationOrBuilder { - private static final long serialVersionUID = 0L; - // Use PubSubNotification.newBuilder() to construct. - private PubSubNotification(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PubSubNotification() { - topic_ = ""; - event_ = 0; - detailOfMessage_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PubSubNotification(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PubSubNotification( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - case 16: { - int rawValue = input.readEnum(); - - event_ = rawValue; - break; - } - case 26: { - com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder subBuilder = null; - if (pubsubCondition_ != null) { - subBuilder = pubsubCondition_.toBuilder(); - } - pubsubCondition_ = input.readMessage(com.google.privacy.dlp.v2.DataProfilePubSubCondition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(pubsubCondition_); - pubsubCondition_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - int rawValue = input.readEnum(); - - detailOfMessage_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.class, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder.class); - } - - /** - *
-     * The levels of detail that can be included in the Pub/Sub message.
-     * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel} - */ - public enum DetailLevel - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unused.
-       * 
- * - * DETAIL_LEVEL_UNSPECIFIED = 0; - */ - DETAIL_LEVEL_UNSPECIFIED(0), - /** - *
-       * The full table data profile.
-       * 
- * - * TABLE_PROFILE = 1; - */ - TABLE_PROFILE(1), - /** - *
-       * The resource name of the table.
-       * 
- * - * RESOURCE_NAME = 2; - */ - RESOURCE_NAME(2), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unused.
-       * 
- * - * DETAIL_LEVEL_UNSPECIFIED = 0; - */ - public static final int DETAIL_LEVEL_UNSPECIFIED_VALUE = 0; - /** - *
-       * The full table data profile.
-       * 
- * - * TABLE_PROFILE = 1; - */ - public static final int TABLE_PROFILE_VALUE = 1; - /** - *
-       * The resource name of the table.
-       * 
- * - * RESOURCE_NAME = 2; - */ - public static final int RESOURCE_NAME_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DetailLevel valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DetailLevel forNumber(int value) { - switch (value) { - case 0: return DETAIL_LEVEL_UNSPECIFIED; - case 1: return TABLE_PROFILE; - case 2: return RESOURCE_NAME; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DetailLevel> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DetailLevel findValueByNumber(int number) { - return DetailLevel.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDescriptor().getEnumTypes().get(0); - } - - private static final DetailLevel[] VALUES = values(); - - public static DetailLevel valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DetailLevel(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel) - } - - public static final int TOPIC_FIELD_NUMBER = 1; - private volatile java.lang.Object topic_; - /** - *
-     * Cloud Pub/Sub topic to send notifications to.
-     * Format is projects/{project}/topics/{topic}.
-     * 
- * - * string topic = 1; - * @return The topic. - */ - @java.lang.Override - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } - } - /** - *
-     * Cloud Pub/Sub topic to send notifications to.
-     * Format is projects/{project}/topics/{topic}.
-     * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EVENT_FIELD_NUMBER = 2; - private int event_; - /** - *
-     * The type of event that triggers a Pub/Sub. At most one
-     * `PubSubNotification` per EventType is permitted.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The enum numeric value on the wire for event. - */ - @java.lang.Override public int getEventValue() { - return event_; - } - /** - *
-     * The type of event that triggers a Pub/Sub. At most one
-     * `PubSubNotification` per EventType is permitted.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The event. - */ - @java.lang.Override public com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfileAction.EventType result = com.google.privacy.dlp.v2.DataProfileAction.EventType.valueOf(event_); - return result == null ? com.google.privacy.dlp.v2.DataProfileAction.EventType.UNRECOGNIZED : result; - } - - public static final int PUBSUB_CONDITION_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.DataProfilePubSubCondition pubsubCondition_; - /** - *
-     * Conditions (e.g., data risk or sensitivity level) for triggering a
-     * Pub/Sub.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - * @return Whether the pubsubCondition field is set. - */ - @java.lang.Override - public boolean hasPubsubCondition() { - return pubsubCondition_ != null; - } - /** - *
-     * Conditions (e.g., data risk or sensitivity level) for triggering a
-     * Pub/Sub.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - * @return The pubsubCondition. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition getPubsubCondition() { - return pubsubCondition_ == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance() : pubsubCondition_; - } - /** - *
-     * Conditions (e.g., data risk or sensitivity level) for triggering a
-     * Pub/Sub.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder getPubsubConditionOrBuilder() { - return getPubsubCondition(); - } - - public static final int DETAIL_OF_MESSAGE_FIELD_NUMBER = 4; - private int detailOfMessage_; - /** - *
-     * How much data to include in the Pub/Sub message. If the user wishes to
-     * limit the size of the message, they can use resource_name and fetch the
-     * profile fields they wish to. Per table profile (not per column).
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; - * @return The enum numeric value on the wire for detailOfMessage. - */ - @java.lang.Override public int getDetailOfMessageValue() { - return detailOfMessage_; - } - /** - *
-     * How much data to include in the Pub/Sub message. If the user wishes to
-     * limit the size of the message, they can use resource_name and fetch the
-     * profile fields they wish to. Per table profile (not per column).
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; - * @return The detailOfMessage. - */ - @java.lang.Override public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel getDetailOfMessage() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel result = com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.valueOf(detailOfMessage_); - return result == null ? com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); - } - if (event_ != com.google.privacy.dlp.v2.DataProfileAction.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, event_); - } - if (pubsubCondition_ != null) { - output.writeMessage(3, getPubsubCondition()); - } - if (detailOfMessage_ != com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.DETAIL_LEVEL_UNSPECIFIED.getNumber()) { - output.writeEnum(4, detailOfMessage_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); - } - if (event_ != com.google.privacy.dlp.v2.DataProfileAction.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, event_); - } - if (pubsubCondition_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getPubsubCondition()); - } - if (detailOfMessage_ != com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.DETAIL_LEVEL_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, detailOfMessage_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification other = (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) obj; - - if (!getTopic() - .equals(other.getTopic())) return false; - if (event_ != other.event_) return false; - if (hasPubsubCondition() != other.hasPubsubCondition()) return false; - if (hasPubsubCondition()) { - if (!getPubsubCondition() - .equals(other.getPubsubCondition())) return false; - } - if (detailOfMessage_ != other.detailOfMessage_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TOPIC_FIELD_NUMBER; - hash = (53 * hash) + getTopic().hashCode(); - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + event_; - if (hasPubsubCondition()) { - hash = (37 * hash) + PUBSUB_CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getPubsubCondition().hashCode(); - } - hash = (37 * hash) + DETAIL_OF_MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + detailOfMessage_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Send a Pub/Sub message into the given Pub/Sub topic to connect other
-     * systems to data profile generation. The message payload data will
-     * be the byte serialization of `DataProfilePubSubMessage`.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction.PubSubNotification} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.class, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - topic_ = ""; - - event_ = 0; - - if (pubsubConditionBuilder_ == null) { - pubsubCondition_ = null; - } else { - pubsubCondition_ = null; - pubsubConditionBuilder_ = null; - } - detailOfMessage_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification build() { - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification buildPartial() { - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification result = new com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification(this); - result.topic_ = topic_; - result.event_ = event_; - if (pubsubConditionBuilder_ == null) { - result.pubsubCondition_ = pubsubCondition_; - } else { - result.pubsubCondition_ = pubsubConditionBuilder_.build(); - } - result.detailOfMessage_ = detailOfMessage_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification other) { - if (other == com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance()) return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - if (other.event_ != 0) { - setEventValue(other.getEventValue()); - } - if (other.hasPubsubCondition()) { - mergePubsubCondition(other.getPubsubCondition()); - } - if (other.detailOfMessage_ != 0) { - setDetailOfMessageValue(other.getDetailOfMessageValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object topic_ = ""; - /** - *
-       * Cloud Pub/Sub topic to send notifications to.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @return The topic. - */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Cloud Pub/Sub topic to send notifications to.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Cloud Pub/Sub topic to send notifications to.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @param value The topic to set. - * @return This builder for chaining. - */ - public Builder setTopic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - *
-       * Cloud Pub/Sub topic to send notifications to.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @return This builder for chaining. - */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - *
-       * Cloud Pub/Sub topic to send notifications to.
-       * Format is projects/{project}/topics/{topic}.
-       * 
- * - * string topic = 1; - * @param value The bytes for topic to set. - * @return This builder for chaining. - */ - public Builder setTopicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); - return this; - } - - private int event_ = 0; - /** - *
-       * The type of event that triggers a Pub/Sub. At most one
-       * `PubSubNotification` per EventType is permitted.
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The enum numeric value on the wire for event. - */ - @java.lang.Override public int getEventValue() { - return event_; - } - /** - *
-       * The type of event that triggers a Pub/Sub. At most one
-       * `PubSubNotification` per EventType is permitted.
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @param value The enum numeric value on the wire for event to set. - * @return This builder for chaining. - */ - public Builder setEventValue(int value) { - - event_ = value; - onChanged(); - return this; - } - /** - *
-       * The type of event that triggers a Pub/Sub. At most one
-       * `PubSubNotification` per EventType is permitted.
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The event. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfileAction.EventType result = com.google.privacy.dlp.v2.DataProfileAction.EventType.valueOf(event_); - return result == null ? com.google.privacy.dlp.v2.DataProfileAction.EventType.UNRECOGNIZED : result; - } - /** - *
-       * The type of event that triggers a Pub/Sub. At most one
-       * `PubSubNotification` per EventType is permitted.
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @param value The event to set. - * @return This builder for chaining. - */ - public Builder setEvent(com.google.privacy.dlp.v2.DataProfileAction.EventType value) { - if (value == null) { - throw new NullPointerException(); - } - - event_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The type of event that triggers a Pub/Sub. At most one
-       * `PubSubNotification` per EventType is permitted.
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return This builder for chaining. - */ - public Builder clearEvent() { - - event_ = 0; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.DataProfilePubSubCondition pubsubCondition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfilePubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder> pubsubConditionBuilder_; - /** - *
-       * Conditions (e.g., data risk or sensitivity level) for triggering a
-       * Pub/Sub.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - * @return Whether the pubsubCondition field is set. - */ - public boolean hasPubsubCondition() { - return pubsubConditionBuilder_ != null || pubsubCondition_ != null; - } - /** - *
-       * Conditions (e.g., data risk or sensitivity level) for triggering a
-       * Pub/Sub.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - * @return The pubsubCondition. - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition getPubsubCondition() { - if (pubsubConditionBuilder_ == null) { - return pubsubCondition_ == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance() : pubsubCondition_; - } else { - return pubsubConditionBuilder_.getMessage(); - } - } - /** - *
-       * Conditions (e.g., data risk or sensitivity level) for triggering a
-       * Pub/Sub.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - */ - public Builder setPubsubCondition(com.google.privacy.dlp.v2.DataProfilePubSubCondition value) { - if (pubsubConditionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pubsubCondition_ = value; - onChanged(); - } else { - pubsubConditionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Conditions (e.g., data risk or sensitivity level) for triggering a
-       * Pub/Sub.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - */ - public Builder setPubsubCondition( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder builderForValue) { - if (pubsubConditionBuilder_ == null) { - pubsubCondition_ = builderForValue.build(); - onChanged(); - } else { - pubsubConditionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Conditions (e.g., data risk or sensitivity level) for triggering a
-       * Pub/Sub.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - */ - public Builder mergePubsubCondition(com.google.privacy.dlp.v2.DataProfilePubSubCondition value) { - if (pubsubConditionBuilder_ == null) { - if (pubsubCondition_ != null) { - pubsubCondition_ = - com.google.privacy.dlp.v2.DataProfilePubSubCondition.newBuilder(pubsubCondition_).mergeFrom(value).buildPartial(); - } else { - pubsubCondition_ = value; - } - onChanged(); - } else { - pubsubConditionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Conditions (e.g., data risk or sensitivity level) for triggering a
-       * Pub/Sub.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - */ - public Builder clearPubsubCondition() { - if (pubsubConditionBuilder_ == null) { - pubsubCondition_ = null; - onChanged(); - } else { - pubsubCondition_ = null; - pubsubConditionBuilder_ = null; - } - - return this; - } - /** - *
-       * Conditions (e.g., data risk or sensitivity level) for triggering a
-       * Pub/Sub.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder getPubsubConditionBuilder() { - - onChanged(); - return getPubsubConditionFieldBuilder().getBuilder(); - } - /** - *
-       * Conditions (e.g., data risk or sensitivity level) for triggering a
-       * Pub/Sub.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - */ - public com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder getPubsubConditionOrBuilder() { - if (pubsubConditionBuilder_ != null) { - return pubsubConditionBuilder_.getMessageOrBuilder(); - } else { - return pubsubCondition_ == null ? - com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance() : pubsubCondition_; - } - } - /** - *
-       * Conditions (e.g., data risk or sensitivity level) for triggering a
-       * Pub/Sub.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition pubsub_condition = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfilePubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder> - getPubsubConditionFieldBuilder() { - if (pubsubConditionBuilder_ == null) { - pubsubConditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfilePubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder>( - getPubsubCondition(), - getParentForChildren(), - isClean()); - pubsubCondition_ = null; - } - return pubsubConditionBuilder_; - } - - private int detailOfMessage_ = 0; - /** - *
-       * How much data to include in the Pub/Sub message. If the user wishes to
-       * limit the size of the message, they can use resource_name and fetch the
-       * profile fields they wish to. Per table profile (not per column).
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; - * @return The enum numeric value on the wire for detailOfMessage. - */ - @java.lang.Override public int getDetailOfMessageValue() { - return detailOfMessage_; - } - /** - *
-       * How much data to include in the Pub/Sub message. If the user wishes to
-       * limit the size of the message, they can use resource_name and fetch the
-       * profile fields they wish to. Per table profile (not per column).
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; - * @param value The enum numeric value on the wire for detailOfMessage to set. - * @return This builder for chaining. - */ - public Builder setDetailOfMessageValue(int value) { - - detailOfMessage_ = value; - onChanged(); - return this; - } - /** - *
-       * How much data to include in the Pub/Sub message. If the user wishes to
-       * limit the size of the message, they can use resource_name and fetch the
-       * profile fields they wish to. Per table profile (not per column).
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; - * @return The detailOfMessage. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel getDetailOfMessage() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel result = com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.valueOf(detailOfMessage_); - return result == null ? com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel.UNRECOGNIZED : result; - } - /** - *
-       * How much data to include in the Pub/Sub message. If the user wishes to
-       * limit the size of the message, they can use resource_name and fetch the
-       * profile fields they wish to. Per table profile (not per column).
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; - * @param value The detailOfMessage to set. - * @return This builder for chaining. - */ - public Builder setDetailOfMessage(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel value) { - if (value == null) { - throw new NullPointerException(); - } - - detailOfMessage_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * How much data to include in the Pub/Sub message. If the user wishes to
-       * limit the size of the message, they can use resource_name and fetch the
-       * profile fields they wish to. Per table profile (not per column).
-       * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel detail_of_message = 4; - * @return This builder for chaining. - */ - public Builder clearDetailOfMessage() { - - detailOfMessage_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileAction.PubSubNotification) - private static final com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification(); - } - - public static com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PubSubNotification parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PubSubNotification(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int actionCase_ = 0; - private java.lang.Object action_; - public enum ActionCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - EXPORT_DATA(1), - PUB_SUB_NOTIFICATION(2), - ACTION_NOT_SET(0); - private final int value; - private ActionCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ActionCase valueOf(int value) { - return forNumber(value); - } - - public static ActionCase forNumber(int value) { - switch (value) { - case 1: return EXPORT_DATA; - case 2: return PUB_SUB_NOTIFICATION; - case 0: return ACTION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ActionCase - getActionCase() { - return ActionCase.forNumber( - actionCase_); - } - - public static final int EXPORT_DATA_FIELD_NUMBER = 1; - /** - *
-   * Export data profiles into a provided location.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - * @return Whether the exportData field is set. - */ - @java.lang.Override - public boolean hasExportData() { - return actionCase_ == 1; - } - /** - *
-   * Export data profiles into a provided location.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - * @return The exportData. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.Export getExportData() { - if (actionCase_ == 1) { - return (com.google.privacy.dlp.v2.DataProfileAction.Export) action_; - } - return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); - } - /** - *
-   * Export data profiles into a provided location.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder getExportDataOrBuilder() { - if (actionCase_ == 1) { - return (com.google.privacy.dlp.v2.DataProfileAction.Export) action_; - } - return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); - } - - public static final int PUB_SUB_NOTIFICATION_FIELD_NUMBER = 2; - /** - *
-   * Publish a message into the Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - * @return Whether the pubSubNotification field is set. - */ - @java.lang.Override - public boolean hasPubSubNotification() { - return actionCase_ == 2; - } - /** - *
-   * Publish a message into the Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - * @return The pubSubNotification. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getPubSubNotification() { - if (actionCase_ == 2) { - return (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_; - } - return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); - } - /** - *
-   * Publish a message into the Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder getPubSubNotificationOrBuilder() { - if (actionCase_ == 2) { - return (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_; - } - return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (actionCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.DataProfileAction.Export) action_); - } - if (actionCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (actionCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.DataProfileAction.Export) action_); - } - if (actionCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileAction)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfileAction other = (com.google.privacy.dlp.v2.DataProfileAction) obj; - - if (!getActionCase().equals(other.getActionCase())) return false; - switch (actionCase_) { - case 1: - if (!getExportData() - .equals(other.getExportData())) return false; - break; - case 2: - if (!getPubSubNotification() - .equals(other.getPubSubNotification())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (actionCase_) { - case 1: - hash = (37 * hash) + EXPORT_DATA_FIELD_NUMBER; - hash = (53 * hash) + getExportData().hashCode(); - break; - case 2: - hash = (37 * hash) + PUB_SUB_NOTIFICATION_FIELD_NUMBER; - hash = (53 * hash) + getPubSubNotification().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileAction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileAction prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A task to execute when a data profile has been generated.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileAction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileAction) - com.google.privacy.dlp.v2.DataProfileActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileAction.class, com.google.privacy.dlp.v2.DataProfileAction.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfileAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - actionCase_ = 0; - action_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfileAction.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction build() { - com.google.privacy.dlp.v2.DataProfileAction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction buildPartial() { - com.google.privacy.dlp.v2.DataProfileAction result = new com.google.privacy.dlp.v2.DataProfileAction(this); - if (actionCase_ == 1) { - if (exportDataBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = exportDataBuilder_.build(); - } - } - if (actionCase_ == 2) { - if (pubSubNotificationBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = pubSubNotificationBuilder_.build(); - } - } - result.actionCase_ = actionCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfileAction) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfileAction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileAction other) { - if (other == com.google.privacy.dlp.v2.DataProfileAction.getDefaultInstance()) return this; - switch (other.getActionCase()) { - case EXPORT_DATA: { - mergeExportData(other.getExportData()); - break; - } - case PUB_SUB_NOTIFICATION: { - mergePubSubNotification(other.getPubSubNotification()); - break; - } - case ACTION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfileAction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfileAction) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int actionCase_ = 0; - private java.lang.Object action_; - public ActionCase - getActionCase() { - return ActionCase.forNumber( - actionCase_); - } - - public Builder clearAction() { - actionCase_ = 0; - action_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileAction.Export, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder, com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder> exportDataBuilder_; - /** - *
-     * Export data profiles into a provided location.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - * @return Whether the exportData field is set. - */ - @java.lang.Override - public boolean hasExportData() { - return actionCase_ == 1; - } - /** - *
-     * Export data profiles into a provided location.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - * @return The exportData. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.Export getExportData() { - if (exportDataBuilder_ == null) { - if (actionCase_ == 1) { - return (com.google.privacy.dlp.v2.DataProfileAction.Export) action_; - } - return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); - } else { - if (actionCase_ == 1) { - return exportDataBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); - } - } - /** - *
-     * Export data profiles into a provided location.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - */ - public Builder setExportData(com.google.privacy.dlp.v2.DataProfileAction.Export value) { - if (exportDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - exportDataBuilder_.setMessage(value); - } - actionCase_ = 1; - return this; - } - /** - *
-     * Export data profiles into a provided location.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - */ - public Builder setExportData( - com.google.privacy.dlp.v2.DataProfileAction.Export.Builder builderForValue) { - if (exportDataBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - exportDataBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 1; - return this; - } - /** - *
-     * Export data profiles into a provided location.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - */ - public Builder mergeExportData(com.google.privacy.dlp.v2.DataProfileAction.Export value) { - if (exportDataBuilder_ == null) { - if (actionCase_ == 1 && - action_ != com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance()) { - action_ = com.google.privacy.dlp.v2.DataProfileAction.Export.newBuilder((com.google.privacy.dlp.v2.DataProfileAction.Export) action_) - .mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 1) { - exportDataBuilder_.mergeFrom(value); - } else { - exportDataBuilder_.setMessage(value); - } - } - actionCase_ = 1; - return this; - } - /** - *
-     * Export data profiles into a provided location.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - */ - public Builder clearExportData() { - if (exportDataBuilder_ == null) { - if (actionCase_ == 1) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 1) { - actionCase_ = 0; - action_ = null; - } - exportDataBuilder_.clear(); - } - return this; - } - /** - *
-     * Export data profiles into a provided location.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - */ - public com.google.privacy.dlp.v2.DataProfileAction.Export.Builder getExportDataBuilder() { - return getExportDataFieldBuilder().getBuilder(); - } - /** - *
-     * Export data profiles into a provided location.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder getExportDataOrBuilder() { - if ((actionCase_ == 1) && (exportDataBuilder_ != null)) { - return exportDataBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 1) { - return (com.google.privacy.dlp.v2.DataProfileAction.Export) action_; - } - return com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); - } - } - /** - *
-     * Export data profiles into a provided location.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileAction.Export, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder, com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder> - getExportDataFieldBuilder() { - if (exportDataBuilder_ == null) { - if (!(actionCase_ == 1)) { - action_ = com.google.privacy.dlp.v2.DataProfileAction.Export.getDefaultInstance(); - } - exportDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileAction.Export, com.google.privacy.dlp.v2.DataProfileAction.Export.Builder, com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder>( - (com.google.privacy.dlp.v2.DataProfileAction.Export) action_, - getParentForChildren(), - isClean()); - action_ = null; - } - actionCase_ = 1; - onChanged();; - return exportDataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder> pubSubNotificationBuilder_; - /** - *
-     * Publish a message into the Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - * @return Whether the pubSubNotification field is set. - */ - @java.lang.Override - public boolean hasPubSubNotification() { - return actionCase_ == 2; - } - /** - *
-     * Publish a message into the Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - * @return The pubSubNotification. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getPubSubNotification() { - if (pubSubNotificationBuilder_ == null) { - if (actionCase_ == 2) { - return (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_; - } - return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); - } else { - if (actionCase_ == 2) { - return pubSubNotificationBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); - } - } - /** - *
-     * Publish a message into the Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - */ - public Builder setPubSubNotification(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification value) { - if (pubSubNotificationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - pubSubNotificationBuilder_.setMessage(value); - } - actionCase_ = 2; - return this; - } - /** - *
-     * Publish a message into the Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - */ - public Builder setPubSubNotification( - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder builderForValue) { - if (pubSubNotificationBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - pubSubNotificationBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 2; - return this; - } - /** - *
-     * Publish a message into the Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - */ - public Builder mergePubSubNotification(com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification value) { - if (pubSubNotificationBuilder_ == null) { - if (actionCase_ == 2 && - action_ != com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance()) { - action_ = com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.newBuilder((com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_) - .mergeFrom(value).buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 2) { - pubSubNotificationBuilder_.mergeFrom(value); - } else { - pubSubNotificationBuilder_.setMessage(value); - } - } - actionCase_ = 2; - return this; - } - /** - *
-     * Publish a message into the Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - */ - public Builder clearPubSubNotification() { - if (pubSubNotificationBuilder_ == null) { - if (actionCase_ == 2) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 2) { - actionCase_ = 0; - action_ = null; - } - pubSubNotificationBuilder_.clear(); - } - return this; - } - /** - *
-     * Publish a message into the Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - */ - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder getPubSubNotificationBuilder() { - return getPubSubNotificationFieldBuilder().getBuilder(); - } - /** - *
-     * Publish a message into the Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder getPubSubNotificationOrBuilder() { - if ((actionCase_ == 2) && (pubSubNotificationBuilder_ != null)) { - return pubSubNotificationBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 2) { - return (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_; - } - return com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); - } - } - /** - *
-     * Publish a message into the Pub/Sub topic.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder> - getPubSubNotificationFieldBuilder() { - if (pubSubNotificationBuilder_ == null) { - if (!(actionCase_ == 2)) { - action_ = com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.getDefaultInstance(); - } - pubSubNotificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.Builder, com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder>( - (com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) action_, - getParentForChildren(), - isClean()); - action_ = null; - } - actionCase_ = 2; - onChanged();; - return pubSubNotificationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileAction) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileAction) - private static final com.google.privacy.dlp.v2.DataProfileAction DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileAction(); - } - - public static com.google.privacy.dlp.v2.DataProfileAction getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataProfileAction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataProfileAction(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileActionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileActionOrBuilder.java deleted file mode 100644 index 8d80aa9e505a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileActionOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DataProfileActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileAction) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Export data profiles into a provided location.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - * @return Whether the exportData field is set. - */ - boolean hasExportData(); - /** - *
-   * Export data profiles into a provided location.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - * @return The exportData. - */ - com.google.privacy.dlp.v2.DataProfileAction.Export getExportData(); - /** - *
-   * Export data profiles into a provided location.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.Export export_data = 1; - */ - com.google.privacy.dlp.v2.DataProfileAction.ExportOrBuilder getExportDataOrBuilder(); - - /** - *
-   * Publish a message into the Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - * @return Whether the pubSubNotification field is set. - */ - boolean hasPubSubNotification(); - /** - *
-   * Publish a message into the Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - * @return The pubSubNotification. - */ - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotification getPubSubNotification(); - /** - *
-   * Publish a message into the Pub/Sub topic.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.PubSubNotification pub_sub_notification = 2; - */ - com.google.privacy.dlp.v2.DataProfileAction.PubSubNotificationOrBuilder getPubSubNotificationOrBuilder(); - - public com.google.privacy.dlp.v2.DataProfileAction.ActionCase getActionCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshot.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshot.java deleted file mode 100644 index c73e3869d34c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshot.java +++ /dev/null @@ -1,913 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Snapshot of the configurations used to generate the profile.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileConfigSnapshot} - */ -public final class DataProfileConfigSnapshot extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileConfigSnapshot) - DataProfileConfigSnapshotOrBuilder { -private static final long serialVersionUID = 0L; - // Use DataProfileConfigSnapshot.newBuilder() to construct. - private DataProfileConfigSnapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DataProfileConfigSnapshot() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DataProfileConfigSnapshot(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataProfileConfigSnapshot( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; - if (inspectConfig_ != null) { - subBuilder = inspectConfig_.toBuilder(); - } - inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectConfig_); - inspectConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.DataProfileJobConfig.Builder subBuilder = null; - if (dataProfileJob_ != null) { - subBuilder = dataProfileJob_.toBuilder(); - } - dataProfileJob_ = input.readMessage(com.google.privacy.dlp.v2.DataProfileJobConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataProfileJob_); - dataProfileJob_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileConfigSnapshot.class, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder.class); - } - - public static final int INSPECT_CONFIG_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - /** - *
-   * A copy of the inspection config used to generate this profile. This
-   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - @java.lang.Override - public boolean hasInspectConfig() { - return inspectConfig_ != null; - } - /** - *
-   * A copy of the inspection config used to generate this profile. This
-   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - /** - *
-   * A copy of the inspection config used to generate this profile. This
-   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - return getInspectConfig(); - } - - public static final int DATA_PROFILE_JOB_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.DataProfileJobConfig dataProfileJob_; - /** - *
-   * A copy of the configuration used to generate this profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - * @return Whether the dataProfileJob field is set. - */ - @java.lang.Override - public boolean hasDataProfileJob() { - return dataProfileJob_ != null; - } - /** - *
-   * A copy of the configuration used to generate this profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - * @return The dataProfileJob. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileJobConfig getDataProfileJob() { - return dataProfileJob_ == null ? com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance() : dataProfileJob_; - } - /** - *
-   * A copy of the configuration used to generate this profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder getDataProfileJobOrBuilder() { - return getDataProfileJob(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (inspectConfig_ != null) { - output.writeMessage(2, getInspectConfig()); - } - if (dataProfileJob_ != null) { - output.writeMessage(3, getDataProfileJob()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inspectConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInspectConfig()); - } - if (dataProfileJob_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getDataProfileJob()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileConfigSnapshot)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfileConfigSnapshot other = (com.google.privacy.dlp.v2.DataProfileConfigSnapshot) obj; - - if (hasInspectConfig() != other.hasInspectConfig()) return false; - if (hasInspectConfig()) { - if (!getInspectConfig() - .equals(other.getInspectConfig())) return false; - } - if (hasDataProfileJob() != other.hasDataProfileJob()) return false; - if (hasDataProfileJob()) { - if (!getDataProfileJob() - .equals(other.getDataProfileJob())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInspectConfig()) { - hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInspectConfig().hashCode(); - } - if (hasDataProfileJob()) { - hash = (37 * hash) + DATA_PROFILE_JOB_FIELD_NUMBER; - hash = (53 * hash) + getDataProfileJob().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileConfigSnapshot prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Snapshot of the configurations used to generate the profile.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileConfigSnapshot} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileConfigSnapshot) - com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileConfigSnapshot.class, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfileConfigSnapshot.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - if (dataProfileJobBuilder_ == null) { - dataProfileJob_ = null; - } else { - dataProfileJob_ = null; - dataProfileJobBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileConfigSnapshot getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileConfigSnapshot build() { - com.google.privacy.dlp.v2.DataProfileConfigSnapshot result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileConfigSnapshot buildPartial() { - com.google.privacy.dlp.v2.DataProfileConfigSnapshot result = new com.google.privacy.dlp.v2.DataProfileConfigSnapshot(this); - if (inspectConfigBuilder_ == null) { - result.inspectConfig_ = inspectConfig_; - } else { - result.inspectConfig_ = inspectConfigBuilder_.build(); - } - if (dataProfileJobBuilder_ == null) { - result.dataProfileJob_ = dataProfileJob_; - } else { - result.dataProfileJob_ = dataProfileJobBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfileConfigSnapshot) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfileConfigSnapshot)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileConfigSnapshot other) { - if (other == com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance()) return this; - if (other.hasInspectConfig()) { - mergeInspectConfig(other.getInspectConfig()); - } - if (other.hasDataProfileJob()) { - mergeDataProfileJob(other.getDataProfileJob()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfileConfigSnapshot parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfileConfigSnapshot) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; - /** - *
-     * A copy of the inspection config used to generate this profile. This
-     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - public boolean hasInspectConfig() { - return inspectConfigBuilder_ != null || inspectConfig_ != null; - } - /** - *
-     * A copy of the inspection config used to generate this profile. This
-     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - if (inspectConfigBuilder_ == null) { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } else { - return inspectConfigBuilder_.getMessage(); - } - } - /** - *
-     * A copy of the inspection config used to generate this profile. This
-     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectConfig_ = value; - onChanged(); - } else { - inspectConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A copy of the inspection config used to generate this profile. This
-     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder setInspectConfig( - com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = builderForValue.build(); - onChanged(); - } else { - inspectConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A copy of the inspection config used to generate this profile. This
-     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (inspectConfig_ != null) { - inspectConfig_ = - com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); - } else { - inspectConfig_ = value; - } - onChanged(); - } else { - inspectConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A copy of the inspection config used to generate this profile. This
-     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder clearInspectConfig() { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - onChanged(); - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * A copy of the inspection config used to generate this profile. This
-     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { - - onChanged(); - return getInspectConfigFieldBuilder().getBuilder(); - } - /** - *
-     * A copy of the inspection config used to generate this profile. This
-     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - if (inspectConfigBuilder_ != null) { - return inspectConfigBuilder_.getMessageOrBuilder(); - } else { - return inspectConfig_ == null ? - com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - } - /** - *
-     * A copy of the inspection config used to generate this profile. This
-     * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> - getInspectConfigFieldBuilder() { - if (inspectConfigBuilder_ == null) { - inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( - getInspectConfig(), - getParentForChildren(), - isClean()); - inspectConfig_ = null; - } - return inspectConfigBuilder_; - } - - private com.google.privacy.dlp.v2.DataProfileJobConfig dataProfileJob_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileJobConfig, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder, com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder> dataProfileJobBuilder_; - /** - *
-     * A copy of the configuration used to generate this profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - * @return Whether the dataProfileJob field is set. - */ - public boolean hasDataProfileJob() { - return dataProfileJobBuilder_ != null || dataProfileJob_ != null; - } - /** - *
-     * A copy of the configuration used to generate this profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - * @return The dataProfileJob. - */ - public com.google.privacy.dlp.v2.DataProfileJobConfig getDataProfileJob() { - if (dataProfileJobBuilder_ == null) { - return dataProfileJob_ == null ? com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance() : dataProfileJob_; - } else { - return dataProfileJobBuilder_.getMessage(); - } - } - /** - *
-     * A copy of the configuration used to generate this profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - */ - public Builder setDataProfileJob(com.google.privacy.dlp.v2.DataProfileJobConfig value) { - if (dataProfileJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataProfileJob_ = value; - onChanged(); - } else { - dataProfileJobBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A copy of the configuration used to generate this profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - */ - public Builder setDataProfileJob( - com.google.privacy.dlp.v2.DataProfileJobConfig.Builder builderForValue) { - if (dataProfileJobBuilder_ == null) { - dataProfileJob_ = builderForValue.build(); - onChanged(); - } else { - dataProfileJobBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A copy of the configuration used to generate this profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - */ - public Builder mergeDataProfileJob(com.google.privacy.dlp.v2.DataProfileJobConfig value) { - if (dataProfileJobBuilder_ == null) { - if (dataProfileJob_ != null) { - dataProfileJob_ = - com.google.privacy.dlp.v2.DataProfileJobConfig.newBuilder(dataProfileJob_).mergeFrom(value).buildPartial(); - } else { - dataProfileJob_ = value; - } - onChanged(); - } else { - dataProfileJobBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A copy of the configuration used to generate this profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - */ - public Builder clearDataProfileJob() { - if (dataProfileJobBuilder_ == null) { - dataProfileJob_ = null; - onChanged(); - } else { - dataProfileJob_ = null; - dataProfileJobBuilder_ = null; - } - - return this; - } - /** - *
-     * A copy of the configuration used to generate this profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - */ - public com.google.privacy.dlp.v2.DataProfileJobConfig.Builder getDataProfileJobBuilder() { - - onChanged(); - return getDataProfileJobFieldBuilder().getBuilder(); - } - /** - *
-     * A copy of the configuration used to generate this profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - */ - public com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder getDataProfileJobOrBuilder() { - if (dataProfileJobBuilder_ != null) { - return dataProfileJobBuilder_.getMessageOrBuilder(); - } else { - return dataProfileJob_ == null ? - com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance() : dataProfileJob_; - } - } - /** - *
-     * A copy of the configuration used to generate this profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileJobConfig, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder, com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder> - getDataProfileJobFieldBuilder() { - if (dataProfileJobBuilder_ == null) { - dataProfileJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileJobConfig, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder, com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder>( - getDataProfileJob(), - getParentForChildren(), - isClean()); - dataProfileJob_ = null; - } - return dataProfileJobBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileConfigSnapshot) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileConfigSnapshot) - private static final com.google.privacy.dlp.v2.DataProfileConfigSnapshot DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileConfigSnapshot(); - } - - public static com.google.privacy.dlp.v2.DataProfileConfigSnapshot getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataProfileConfigSnapshot parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataProfileConfigSnapshot(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileConfigSnapshot getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshotOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshotOrBuilder.java deleted file mode 100644 index 337522af38b6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileConfigSnapshotOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DataProfileConfigSnapshotOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileConfigSnapshot) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A copy of the inspection config used to generate this profile. This
-   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - boolean hasInspectConfig(); - /** - *
-   * A copy of the inspection config used to generate this profile. This
-   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); - /** - *
-   * A copy of the inspection config used to generate this profile. This
-   * is a copy of the inspect_template specified in `DataProfileJobConfig`.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); - - /** - *
-   * A copy of the configuration used to generate this profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - * @return Whether the dataProfileJob field is set. - */ - boolean hasDataProfileJob(); - /** - *
-   * A copy of the configuration used to generate this profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - * @return The dataProfileJob. - */ - com.google.privacy.dlp.v2.DataProfileJobConfig getDataProfileJob(); - /** - *
-   * A copy of the configuration used to generate this profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileJobConfig data_profile_job = 3; - */ - com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder getDataProfileJobOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfig.java deleted file mode 100644 index c3dbffae47e3..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfig.java +++ /dev/null @@ -1,1698 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Configuration for setting up a job to scan resources for profile generation.
- * Only one data profile configuration may exist per organization, folder,
- * or project.
- * The generated data profiles are retained according to the
- * [data retention policy]
- * (https://cloud.google.com/dlp/docs/data-profiles#retention).
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileJobConfig} - */ -public final class DataProfileJobConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileJobConfig) - DataProfileJobConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use DataProfileJobConfig.newBuilder() to construct. - private DataProfileJobConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DataProfileJobConfig() { - projectId_ = ""; - inspectTemplates_ = com.google.protobuf.LazyStringArrayList.EMPTY; - dataProfileActions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DataProfileJobConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataProfileJobConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.DataProfileLocation.Builder subBuilder = null; - if (location_ != null) { - subBuilder = location_.toBuilder(); - } - location_ = input.readMessage(com.google.privacy.dlp.v2.DataProfileLocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(location_); - location_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - dataProfileActions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - dataProfileActions_.add( - input.readMessage(com.google.privacy.dlp.v2.DataProfileAction.parser(), extensionRegistry)); - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - inspectTemplates_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - inspectTemplates_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - dataProfileActions_ = java.util.Collections.unmodifiableList(dataProfileActions_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - inspectTemplates_ = inspectTemplates_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileJobConfig.class, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder.class); - } - - public static final int LOCATION_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.DataProfileLocation location_; - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - * @return Whether the location field is set. - */ - @java.lang.Override - public boolean hasLocation() { - return location_ != null; - } - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - * @return The location. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileLocation getLocation() { - return location_ == null ? com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance() : location_; - } - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileLocationOrBuilder getLocationOrBuilder() { - return getLocation(); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object projectId_; - /** - *
-   * The project that will run the scan. The DLP service
-   * account that exists within this project must have access to all resources
-   * that are profiled, and the Cloud DLP API must be enabled.
-   * 
- * - * string project_id = 5; - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - *
-   * The project that will run the scan. The DLP service
-   * account that exists within this project must have access to all resources
-   * that are profiled, and the Cloud DLP API must be enabled.
-   * 
- * - * string project_id = 5; - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSPECT_TEMPLATES_FIELD_NUMBER = 7; - private com.google.protobuf.LazyStringList inspectTemplates_; - /** - *
-   * Detection logic for profile generation.
-   * Not all template features are used by profiles. FindingLimits,
-   * include_quote and exclude_info_types have no impact on
-   * data profiling.
-   * Multiple templates may be provided if there is data in multiple regions.
-   * At most one template must be specified per-region (including "global").
-   * Each region is scanned using the applicable template. If no region-specific
-   * template is specified, but a "global" template is specified, it will be
-   * copied to that region and used instead. If no global or region-specific
-   * template is provided for a region with data, that region's data will not be
-   * scanned.
-   * For more information, see
-   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-   * 
- * - * repeated string inspect_templates = 7; - * @return A list containing the inspectTemplates. - */ - public com.google.protobuf.ProtocolStringList - getInspectTemplatesList() { - return inspectTemplates_; - } - /** - *
-   * Detection logic for profile generation.
-   * Not all template features are used by profiles. FindingLimits,
-   * include_quote and exclude_info_types have no impact on
-   * data profiling.
-   * Multiple templates may be provided if there is data in multiple regions.
-   * At most one template must be specified per-region (including "global").
-   * Each region is scanned using the applicable template. If no region-specific
-   * template is specified, but a "global" template is specified, it will be
-   * copied to that region and used instead. If no global or region-specific
-   * template is provided for a region with data, that region's data will not be
-   * scanned.
-   * For more information, see
-   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-   * 
- * - * repeated string inspect_templates = 7; - * @return The count of inspectTemplates. - */ - public int getInspectTemplatesCount() { - return inspectTemplates_.size(); - } - /** - *
-   * Detection logic for profile generation.
-   * Not all template features are used by profiles. FindingLimits,
-   * include_quote and exclude_info_types have no impact on
-   * data profiling.
-   * Multiple templates may be provided if there is data in multiple regions.
-   * At most one template must be specified per-region (including "global").
-   * Each region is scanned using the applicable template. If no region-specific
-   * template is specified, but a "global" template is specified, it will be
-   * copied to that region and used instead. If no global or region-specific
-   * template is provided for a region with data, that region's data will not be
-   * scanned.
-   * For more information, see
-   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-   * 
- * - * repeated string inspect_templates = 7; - * @param index The index of the element to return. - * @return The inspectTemplates at the given index. - */ - public java.lang.String getInspectTemplates(int index) { - return inspectTemplates_.get(index); - } - /** - *
-   * Detection logic for profile generation.
-   * Not all template features are used by profiles. FindingLimits,
-   * include_quote and exclude_info_types have no impact on
-   * data profiling.
-   * Multiple templates may be provided if there is data in multiple regions.
-   * At most one template must be specified per-region (including "global").
-   * Each region is scanned using the applicable template. If no region-specific
-   * template is specified, but a "global" template is specified, it will be
-   * copied to that region and used instead. If no global or region-specific
-   * template is provided for a region with data, that region's data will not be
-   * scanned.
-   * For more information, see
-   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-   * 
- * - * repeated string inspect_templates = 7; - * @param index The index of the value to return. - * @return The bytes of the inspectTemplates at the given index. - */ - public com.google.protobuf.ByteString - getInspectTemplatesBytes(int index) { - return inspectTemplates_.getByteString(index); - } - - public static final int DATA_PROFILE_ACTIONS_FIELD_NUMBER = 6; - private java.util.List dataProfileActions_; - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - @java.lang.Override - public java.util.List getDataProfileActionsList() { - return dataProfileActions_; - } - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - @java.lang.Override - public java.util.List - getDataProfileActionsOrBuilderList() { - return dataProfileActions_; - } - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - @java.lang.Override - public int getDataProfileActionsCount() { - return dataProfileActions_.size(); - } - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction getDataProfileActions(int index) { - return dataProfileActions_.get(index); - } - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileActionOrBuilder getDataProfileActionsOrBuilder( - int index) { - return dataProfileActions_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (location_ != null) { - output.writeMessage(1, getLocation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, projectId_); - } - for (int i = 0; i < dataProfileActions_.size(); i++) { - output.writeMessage(6, dataProfileActions_.get(i)); - } - for (int i = 0; i < inspectTemplates_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, inspectTemplates_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (location_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLocation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, projectId_); - } - for (int i = 0; i < dataProfileActions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, dataProfileActions_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < inspectTemplates_.size(); i++) { - dataSize += computeStringSizeNoTag(inspectTemplates_.getRaw(i)); - } - size += dataSize; - size += 1 * getInspectTemplatesList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileJobConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfileJobConfig other = (com.google.privacy.dlp.v2.DataProfileJobConfig) obj; - - if (hasLocation() != other.hasLocation()) return false; - if (hasLocation()) { - if (!getLocation() - .equals(other.getLocation())) return false; - } - if (!getProjectId() - .equals(other.getProjectId())) return false; - if (!getInspectTemplatesList() - .equals(other.getInspectTemplatesList())) return false; - if (!getDataProfileActionsList() - .equals(other.getDataProfileActionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLocation()) { - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - } - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - if (getInspectTemplatesCount() > 0) { - hash = (37 * hash) + INSPECT_TEMPLATES_FIELD_NUMBER; - hash = (53 * hash) + getInspectTemplatesList().hashCode(); - } - if (getDataProfileActionsCount() > 0) { - hash = (37 * hash) + DATA_PROFILE_ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getDataProfileActionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileJobConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileJobConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Configuration for setting up a job to scan resources for profile generation.
-   * Only one data profile configuration may exist per organization, folder,
-   * or project.
-   * The generated data profiles are retained according to the
-   * [data retention policy]
-   * (https://cloud.google.com/dlp/docs/data-profiles#retention).
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileJobConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileJobConfig) - com.google.privacy.dlp.v2.DataProfileJobConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileJobConfig.class, com.google.privacy.dlp.v2.DataProfileJobConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfileJobConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDataProfileActionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (locationBuilder_ == null) { - location_ = null; - } else { - location_ = null; - locationBuilder_ = null; - } - projectId_ = ""; - - inspectTemplates_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (dataProfileActionsBuilder_ == null) { - dataProfileActions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - dataProfileActionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileJobConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileJobConfig build() { - com.google.privacy.dlp.v2.DataProfileJobConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileJobConfig buildPartial() { - com.google.privacy.dlp.v2.DataProfileJobConfig result = new com.google.privacy.dlp.v2.DataProfileJobConfig(this); - int from_bitField0_ = bitField0_; - if (locationBuilder_ == null) { - result.location_ = location_; - } else { - result.location_ = locationBuilder_.build(); - } - result.projectId_ = projectId_; - if (((bitField0_ & 0x00000001) != 0)) { - inspectTemplates_ = inspectTemplates_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.inspectTemplates_ = inspectTemplates_; - if (dataProfileActionsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - dataProfileActions_ = java.util.Collections.unmodifiableList(dataProfileActions_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.dataProfileActions_ = dataProfileActions_; - } else { - result.dataProfileActions_ = dataProfileActionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfileJobConfig) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfileJobConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileJobConfig other) { - if (other == com.google.privacy.dlp.v2.DataProfileJobConfig.getDefaultInstance()) return this; - if (other.hasLocation()) { - mergeLocation(other.getLocation()); - } - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.inspectTemplates_.isEmpty()) { - if (inspectTemplates_.isEmpty()) { - inspectTemplates_ = other.inspectTemplates_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInspectTemplatesIsMutable(); - inspectTemplates_.addAll(other.inspectTemplates_); - } - onChanged(); - } - if (dataProfileActionsBuilder_ == null) { - if (!other.dataProfileActions_.isEmpty()) { - if (dataProfileActions_.isEmpty()) { - dataProfileActions_ = other.dataProfileActions_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDataProfileActionsIsMutable(); - dataProfileActions_.addAll(other.dataProfileActions_); - } - onChanged(); - } - } else { - if (!other.dataProfileActions_.isEmpty()) { - if (dataProfileActionsBuilder_.isEmpty()) { - dataProfileActionsBuilder_.dispose(); - dataProfileActionsBuilder_ = null; - dataProfileActions_ = other.dataProfileActions_; - bitField0_ = (bitField0_ & ~0x00000002); - dataProfileActionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDataProfileActionsFieldBuilder() : null; - } else { - dataProfileActionsBuilder_.addAllMessages(other.dataProfileActions_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfileJobConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfileJobConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.DataProfileLocation location_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileLocation, com.google.privacy.dlp.v2.DataProfileLocation.Builder, com.google.privacy.dlp.v2.DataProfileLocationOrBuilder> locationBuilder_; - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - * @return Whether the location field is set. - */ - public boolean hasLocation() { - return locationBuilder_ != null || location_ != null; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - * @return The location. - */ - public com.google.privacy.dlp.v2.DataProfileLocation getLocation() { - if (locationBuilder_ == null) { - return location_ == null ? com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance() : location_; - } else { - return locationBuilder_.getMessage(); - } - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - */ - public Builder setLocation(com.google.privacy.dlp.v2.DataProfileLocation value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - locationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - */ - public Builder setLocation( - com.google.privacy.dlp.v2.DataProfileLocation.Builder builderForValue) { - if (locationBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - locationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - */ - public Builder mergeLocation(com.google.privacy.dlp.v2.DataProfileLocation value) { - if (locationBuilder_ == null) { - if (location_ != null) { - location_ = - com.google.privacy.dlp.v2.DataProfileLocation.newBuilder(location_).mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - locationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - */ - public Builder clearLocation() { - if (locationBuilder_ == null) { - location_ = null; - onChanged(); - } else { - location_ = null; - locationBuilder_ = null; - } - - return this; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - */ - public com.google.privacy.dlp.v2.DataProfileLocation.Builder getLocationBuilder() { - - onChanged(); - return getLocationFieldBuilder().getBuilder(); - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - */ - public com.google.privacy.dlp.v2.DataProfileLocationOrBuilder getLocationOrBuilder() { - if (locationBuilder_ != null) { - return locationBuilder_.getMessageOrBuilder(); - } else { - return location_ == null ? - com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance() : location_; - } - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileLocation, com.google.privacy.dlp.v2.DataProfileLocation.Builder, com.google.privacy.dlp.v2.DataProfileLocationOrBuilder> - getLocationFieldBuilder() { - if (locationBuilder_ == null) { - locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileLocation, com.google.privacy.dlp.v2.DataProfileLocation.Builder, com.google.privacy.dlp.v2.DataProfileLocationOrBuilder>( - getLocation(), - getParentForChildren(), - isClean()); - location_ = null; - } - return locationBuilder_; - } - - private java.lang.Object projectId_ = ""; - /** - *
-     * The project that will run the scan. The DLP service
-     * account that exists within this project must have access to all resources
-     * that are profiled, and the Cloud DLP API must be enabled.
-     * 
- * - * string project_id = 5; - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The project that will run the scan. The DLP service
-     * account that exists within this project must have access to all resources
-     * that are profiled, and the Cloud DLP API must be enabled.
-     * 
- * - * string project_id = 5; - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The project that will run the scan. The DLP service
-     * account that exists within this project must have access to all resources
-     * that are profiled, and the Cloud DLP API must be enabled.
-     * 
- * - * string project_id = 5; - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - *
-     * The project that will run the scan. The DLP service
-     * account that exists within this project must have access to all resources
-     * that are profiled, and the Cloud DLP API must be enabled.
-     * 
- * - * string project_id = 5; - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - *
-     * The project that will run the scan. The DLP service
-     * account that exists within this project must have access to all resources
-     * that are profiled, and the Cloud DLP API must be enabled.
-     * 
- * - * string project_id = 5; - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList inspectTemplates_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureInspectTemplatesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - inspectTemplates_ = new com.google.protobuf.LazyStringArrayList(inspectTemplates_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Detection logic for profile generation.
-     * Not all template features are used by profiles. FindingLimits,
-     * include_quote and exclude_info_types have no impact on
-     * data profiling.
-     * Multiple templates may be provided if there is data in multiple regions.
-     * At most one template must be specified per-region (including "global").
-     * Each region is scanned using the applicable template. If no region-specific
-     * template is specified, but a "global" template is specified, it will be
-     * copied to that region and used instead. If no global or region-specific
-     * template is provided for a region with data, that region's data will not be
-     * scanned.
-     * For more information, see
-     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-     * 
- * - * repeated string inspect_templates = 7; - * @return A list containing the inspectTemplates. - */ - public com.google.protobuf.ProtocolStringList - getInspectTemplatesList() { - return inspectTemplates_.getUnmodifiableView(); - } - /** - *
-     * Detection logic for profile generation.
-     * Not all template features are used by profiles. FindingLimits,
-     * include_quote and exclude_info_types have no impact on
-     * data profiling.
-     * Multiple templates may be provided if there is data in multiple regions.
-     * At most one template must be specified per-region (including "global").
-     * Each region is scanned using the applicable template. If no region-specific
-     * template is specified, but a "global" template is specified, it will be
-     * copied to that region and used instead. If no global or region-specific
-     * template is provided for a region with data, that region's data will not be
-     * scanned.
-     * For more information, see
-     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-     * 
- * - * repeated string inspect_templates = 7; - * @return The count of inspectTemplates. - */ - public int getInspectTemplatesCount() { - return inspectTemplates_.size(); - } - /** - *
-     * Detection logic for profile generation.
-     * Not all template features are used by profiles. FindingLimits,
-     * include_quote and exclude_info_types have no impact on
-     * data profiling.
-     * Multiple templates may be provided if there is data in multiple regions.
-     * At most one template must be specified per-region (including "global").
-     * Each region is scanned using the applicable template. If no region-specific
-     * template is specified, but a "global" template is specified, it will be
-     * copied to that region and used instead. If no global or region-specific
-     * template is provided for a region with data, that region's data will not be
-     * scanned.
-     * For more information, see
-     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-     * 
- * - * repeated string inspect_templates = 7; - * @param index The index of the element to return. - * @return The inspectTemplates at the given index. - */ - public java.lang.String getInspectTemplates(int index) { - return inspectTemplates_.get(index); - } - /** - *
-     * Detection logic for profile generation.
-     * Not all template features are used by profiles. FindingLimits,
-     * include_quote and exclude_info_types have no impact on
-     * data profiling.
-     * Multiple templates may be provided if there is data in multiple regions.
-     * At most one template must be specified per-region (including "global").
-     * Each region is scanned using the applicable template. If no region-specific
-     * template is specified, but a "global" template is specified, it will be
-     * copied to that region and used instead. If no global or region-specific
-     * template is provided for a region with data, that region's data will not be
-     * scanned.
-     * For more information, see
-     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-     * 
- * - * repeated string inspect_templates = 7; - * @param index The index of the value to return. - * @return The bytes of the inspectTemplates at the given index. - */ - public com.google.protobuf.ByteString - getInspectTemplatesBytes(int index) { - return inspectTemplates_.getByteString(index); - } - /** - *
-     * Detection logic for profile generation.
-     * Not all template features are used by profiles. FindingLimits,
-     * include_quote and exclude_info_types have no impact on
-     * data profiling.
-     * Multiple templates may be provided if there is data in multiple regions.
-     * At most one template must be specified per-region (including "global").
-     * Each region is scanned using the applicable template. If no region-specific
-     * template is specified, but a "global" template is specified, it will be
-     * copied to that region and used instead. If no global or region-specific
-     * template is provided for a region with data, that region's data will not be
-     * scanned.
-     * For more information, see
-     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-     * 
- * - * repeated string inspect_templates = 7; - * @param index The index to set the value at. - * @param value The inspectTemplates to set. - * @return This builder for chaining. - */ - public Builder setInspectTemplates( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInspectTemplatesIsMutable(); - inspectTemplates_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Detection logic for profile generation.
-     * Not all template features are used by profiles. FindingLimits,
-     * include_quote and exclude_info_types have no impact on
-     * data profiling.
-     * Multiple templates may be provided if there is data in multiple regions.
-     * At most one template must be specified per-region (including "global").
-     * Each region is scanned using the applicable template. If no region-specific
-     * template is specified, but a "global" template is specified, it will be
-     * copied to that region and used instead. If no global or region-specific
-     * template is provided for a region with data, that region's data will not be
-     * scanned.
-     * For more information, see
-     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-     * 
- * - * repeated string inspect_templates = 7; - * @param value The inspectTemplates to add. - * @return This builder for chaining. - */ - public Builder addInspectTemplates( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInspectTemplatesIsMutable(); - inspectTemplates_.add(value); - onChanged(); - return this; - } - /** - *
-     * Detection logic for profile generation.
-     * Not all template features are used by profiles. FindingLimits,
-     * include_quote and exclude_info_types have no impact on
-     * data profiling.
-     * Multiple templates may be provided if there is data in multiple regions.
-     * At most one template must be specified per-region (including "global").
-     * Each region is scanned using the applicable template. If no region-specific
-     * template is specified, but a "global" template is specified, it will be
-     * copied to that region and used instead. If no global or region-specific
-     * template is provided for a region with data, that region's data will not be
-     * scanned.
-     * For more information, see
-     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-     * 
- * - * repeated string inspect_templates = 7; - * @param values The inspectTemplates to add. - * @return This builder for chaining. - */ - public Builder addAllInspectTemplates( - java.lang.Iterable values) { - ensureInspectTemplatesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, inspectTemplates_); - onChanged(); - return this; - } - /** - *
-     * Detection logic for profile generation.
-     * Not all template features are used by profiles. FindingLimits,
-     * include_quote and exclude_info_types have no impact on
-     * data profiling.
-     * Multiple templates may be provided if there is data in multiple regions.
-     * At most one template must be specified per-region (including "global").
-     * Each region is scanned using the applicable template. If no region-specific
-     * template is specified, but a "global" template is specified, it will be
-     * copied to that region and used instead. If no global or region-specific
-     * template is provided for a region with data, that region's data will not be
-     * scanned.
-     * For more information, see
-     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-     * 
- * - * repeated string inspect_templates = 7; - * @return This builder for chaining. - */ - public Builder clearInspectTemplates() { - inspectTemplates_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Detection logic for profile generation.
-     * Not all template features are used by profiles. FindingLimits,
-     * include_quote and exclude_info_types have no impact on
-     * data profiling.
-     * Multiple templates may be provided if there is data in multiple regions.
-     * At most one template must be specified per-region (including "global").
-     * Each region is scanned using the applicable template. If no region-specific
-     * template is specified, but a "global" template is specified, it will be
-     * copied to that region and used instead. If no global or region-specific
-     * template is provided for a region with data, that region's data will not be
-     * scanned.
-     * For more information, see
-     * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-     * 
- * - * repeated string inspect_templates = 7; - * @param value The bytes of the inspectTemplates to add. - * @return This builder for chaining. - */ - public Builder addInspectTemplatesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureInspectTemplatesIsMutable(); - inspectTemplates_.add(value); - onChanged(); - return this; - } - - private java.util.List dataProfileActions_ = - java.util.Collections.emptyList(); - private void ensureDataProfileActionsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - dataProfileActions_ = new java.util.ArrayList(dataProfileActions_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileAction, com.google.privacy.dlp.v2.DataProfileAction.Builder, com.google.privacy.dlp.v2.DataProfileActionOrBuilder> dataProfileActionsBuilder_; - - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public java.util.List getDataProfileActionsList() { - if (dataProfileActionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(dataProfileActions_); - } else { - return dataProfileActionsBuilder_.getMessageList(); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public int getDataProfileActionsCount() { - if (dataProfileActionsBuilder_ == null) { - return dataProfileActions_.size(); - } else { - return dataProfileActionsBuilder_.getCount(); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public com.google.privacy.dlp.v2.DataProfileAction getDataProfileActions(int index) { - if (dataProfileActionsBuilder_ == null) { - return dataProfileActions_.get(index); - } else { - return dataProfileActionsBuilder_.getMessage(index); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public Builder setDataProfileActions( - int index, com.google.privacy.dlp.v2.DataProfileAction value) { - if (dataProfileActionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataProfileActionsIsMutable(); - dataProfileActions_.set(index, value); - onChanged(); - } else { - dataProfileActionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public Builder setDataProfileActions( - int index, com.google.privacy.dlp.v2.DataProfileAction.Builder builderForValue) { - if (dataProfileActionsBuilder_ == null) { - ensureDataProfileActionsIsMutable(); - dataProfileActions_.set(index, builderForValue.build()); - onChanged(); - } else { - dataProfileActionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public Builder addDataProfileActions(com.google.privacy.dlp.v2.DataProfileAction value) { - if (dataProfileActionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataProfileActionsIsMutable(); - dataProfileActions_.add(value); - onChanged(); - } else { - dataProfileActionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public Builder addDataProfileActions( - int index, com.google.privacy.dlp.v2.DataProfileAction value) { - if (dataProfileActionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataProfileActionsIsMutable(); - dataProfileActions_.add(index, value); - onChanged(); - } else { - dataProfileActionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public Builder addDataProfileActions( - com.google.privacy.dlp.v2.DataProfileAction.Builder builderForValue) { - if (dataProfileActionsBuilder_ == null) { - ensureDataProfileActionsIsMutable(); - dataProfileActions_.add(builderForValue.build()); - onChanged(); - } else { - dataProfileActionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public Builder addDataProfileActions( - int index, com.google.privacy.dlp.v2.DataProfileAction.Builder builderForValue) { - if (dataProfileActionsBuilder_ == null) { - ensureDataProfileActionsIsMutable(); - dataProfileActions_.add(index, builderForValue.build()); - onChanged(); - } else { - dataProfileActionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public Builder addAllDataProfileActions( - java.lang.Iterable values) { - if (dataProfileActionsBuilder_ == null) { - ensureDataProfileActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, dataProfileActions_); - onChanged(); - } else { - dataProfileActionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public Builder clearDataProfileActions() { - if (dataProfileActionsBuilder_ == null) { - dataProfileActions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - dataProfileActionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public Builder removeDataProfileActions(int index) { - if (dataProfileActionsBuilder_ == null) { - ensureDataProfileActionsIsMutable(); - dataProfileActions_.remove(index); - onChanged(); - } else { - dataProfileActionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public com.google.privacy.dlp.v2.DataProfileAction.Builder getDataProfileActionsBuilder( - int index) { - return getDataProfileActionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public com.google.privacy.dlp.v2.DataProfileActionOrBuilder getDataProfileActionsOrBuilder( - int index) { - if (dataProfileActionsBuilder_ == null) { - return dataProfileActions_.get(index); } else { - return dataProfileActionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public java.util.List - getDataProfileActionsOrBuilderList() { - if (dataProfileActionsBuilder_ != null) { - return dataProfileActionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dataProfileActions_); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public com.google.privacy.dlp.v2.DataProfileAction.Builder addDataProfileActionsBuilder() { - return getDataProfileActionsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.DataProfileAction.getDefaultInstance()); - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public com.google.privacy.dlp.v2.DataProfileAction.Builder addDataProfileActionsBuilder( - int index) { - return getDataProfileActionsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.DataProfileAction.getDefaultInstance()); - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - public java.util.List - getDataProfileActionsBuilderList() { - return getDataProfileActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileAction, com.google.privacy.dlp.v2.DataProfileAction.Builder, com.google.privacy.dlp.v2.DataProfileActionOrBuilder> - getDataProfileActionsFieldBuilder() { - if (dataProfileActionsBuilder_ == null) { - dataProfileActionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileAction, com.google.privacy.dlp.v2.DataProfileAction.Builder, com.google.privacy.dlp.v2.DataProfileActionOrBuilder>( - dataProfileActions_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - dataProfileActions_ = null; - } - return dataProfileActionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileJobConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileJobConfig) - private static final com.google.privacy.dlp.v2.DataProfileJobConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileJobConfig(); - } - - public static com.google.privacy.dlp.v2.DataProfileJobConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataProfileJobConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataProfileJobConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileJobConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfigOrBuilder.java deleted file mode 100644 index 76a7c3377234..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileJobConfigOrBuilder.java +++ /dev/null @@ -1,193 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DataProfileJobConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileJobConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - * @return Whether the location field is set. - */ - boolean hasLocation(); - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - * @return The location. - */ - com.google.privacy.dlp.v2.DataProfileLocation getLocation(); - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileLocation location = 1; - */ - com.google.privacy.dlp.v2.DataProfileLocationOrBuilder getLocationOrBuilder(); - - /** - *
-   * The project that will run the scan. The DLP service
-   * account that exists within this project must have access to all resources
-   * that are profiled, and the Cloud DLP API must be enabled.
-   * 
- * - * string project_id = 5; - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - *
-   * The project that will run the scan. The DLP service
-   * account that exists within this project must have access to all resources
-   * that are profiled, and the Cloud DLP API must be enabled.
-   * 
- * - * string project_id = 5; - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString - getProjectIdBytes(); - - /** - *
-   * Detection logic for profile generation.
-   * Not all template features are used by profiles. FindingLimits,
-   * include_quote and exclude_info_types have no impact on
-   * data profiling.
-   * Multiple templates may be provided if there is data in multiple regions.
-   * At most one template must be specified per-region (including "global").
-   * Each region is scanned using the applicable template. If no region-specific
-   * template is specified, but a "global" template is specified, it will be
-   * copied to that region and used instead. If no global or region-specific
-   * template is provided for a region with data, that region's data will not be
-   * scanned.
-   * For more information, see
-   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-   * 
- * - * repeated string inspect_templates = 7; - * @return A list containing the inspectTemplates. - */ - java.util.List - getInspectTemplatesList(); - /** - *
-   * Detection logic for profile generation.
-   * Not all template features are used by profiles. FindingLimits,
-   * include_quote and exclude_info_types have no impact on
-   * data profiling.
-   * Multiple templates may be provided if there is data in multiple regions.
-   * At most one template must be specified per-region (including "global").
-   * Each region is scanned using the applicable template. If no region-specific
-   * template is specified, but a "global" template is specified, it will be
-   * copied to that region and used instead. If no global or region-specific
-   * template is provided for a region with data, that region's data will not be
-   * scanned.
-   * For more information, see
-   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-   * 
- * - * repeated string inspect_templates = 7; - * @return The count of inspectTemplates. - */ - int getInspectTemplatesCount(); - /** - *
-   * Detection logic for profile generation.
-   * Not all template features are used by profiles. FindingLimits,
-   * include_quote and exclude_info_types have no impact on
-   * data profiling.
-   * Multiple templates may be provided if there is data in multiple regions.
-   * At most one template must be specified per-region (including "global").
-   * Each region is scanned using the applicable template. If no region-specific
-   * template is specified, but a "global" template is specified, it will be
-   * copied to that region and used instead. If no global or region-specific
-   * template is provided for a region with data, that region's data will not be
-   * scanned.
-   * For more information, see
-   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-   * 
- * - * repeated string inspect_templates = 7; - * @param index The index of the element to return. - * @return The inspectTemplates at the given index. - */ - java.lang.String getInspectTemplates(int index); - /** - *
-   * Detection logic for profile generation.
-   * Not all template features are used by profiles. FindingLimits,
-   * include_quote and exclude_info_types have no impact on
-   * data profiling.
-   * Multiple templates may be provided if there is data in multiple regions.
-   * At most one template must be specified per-region (including "global").
-   * Each region is scanned using the applicable template. If no region-specific
-   * template is specified, but a "global" template is specified, it will be
-   * copied to that region and used instead. If no global or region-specific
-   * template is provided for a region with data, that region's data will not be
-   * scanned.
-   * For more information, see
-   * https://cloud.google.com/dlp/docs/data-profiles#data_residency.
-   * 
- * - * repeated string inspect_templates = 7; - * @param index The index of the value to return. - * @return The bytes of the inspectTemplates at the given index. - */ - com.google.protobuf.ByteString - getInspectTemplatesBytes(int index); - - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - java.util.List - getDataProfileActionsList(); - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - com.google.privacy.dlp.v2.DataProfileAction getDataProfileActions(int index); - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - int getDataProfileActionsCount(); - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - java.util.List - getDataProfileActionsOrBuilderList(); - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.DataProfileAction data_profile_actions = 6; - */ - com.google.privacy.dlp.v2.DataProfileActionOrBuilder getDataProfileActionsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocation.java deleted file mode 100644 index c2a8f62f4c82..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocation.java +++ /dev/null @@ -1,734 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The data that will be profiled.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileLocation} - */ -public final class DataProfileLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfileLocation) - DataProfileLocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use DataProfileLocation.newBuilder() to construct. - private DataProfileLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DataProfileLocation() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DataProfileLocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataProfileLocation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - location_ = input.readInt64(); - locationCase_ = 1; - break; - } - case 16: { - location_ = input.readInt64(); - locationCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileLocation.class, com.google.privacy.dlp.v2.DataProfileLocation.Builder.class); - } - - private int locationCase_ = 0; - private java.lang.Object location_; - public enum LocationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ORGANIZATION_ID(1), - FOLDER_ID(2), - LOCATION_NOT_SET(0); - private final int value; - private LocationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LocationCase valueOf(int value) { - return forNumber(value); - } - - public static LocationCase forNumber(int value) { - switch (value) { - case 1: return ORGANIZATION_ID; - case 2: return FOLDER_ID; - case 0: return LOCATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LocationCase - getLocationCase() { - return LocationCase.forNumber( - locationCase_); - } - - public static final int ORGANIZATION_ID_FIELD_NUMBER = 1; - /** - *
-   * The ID of an organization to scan.
-   * 
- * - * int64 organization_id = 1; - * @return Whether the organizationId field is set. - */ - @java.lang.Override - public boolean hasOrganizationId() { - return locationCase_ == 1; - } - /** - *
-   * The ID of an organization to scan.
-   * 
- * - * int64 organization_id = 1; - * @return The organizationId. - */ - @java.lang.Override - public long getOrganizationId() { - if (locationCase_ == 1) { - return (java.lang.Long) location_; - } - return 0L; - } - - public static final int FOLDER_ID_FIELD_NUMBER = 2; - /** - *
-   * The ID of the Folder within an organization to scan.
-   * 
- * - * int64 folder_id = 2; - * @return Whether the folderId field is set. - */ - @java.lang.Override - public boolean hasFolderId() { - return locationCase_ == 2; - } - /** - *
-   * The ID of the Folder within an organization to scan.
-   * 
- * - * int64 folder_id = 2; - * @return The folderId. - */ - @java.lang.Override - public long getFolderId() { - if (locationCase_ == 2) { - return (java.lang.Long) location_; - } - return 0L; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (locationCase_ == 1) { - output.writeInt64( - 1, (long)((java.lang.Long) location_)); - } - if (locationCase_ == 2) { - output.writeInt64( - 2, (long)((java.lang.Long) location_)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (locationCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 1, (long)((java.lang.Long) location_)); - } - if (locationCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 2, (long)((java.lang.Long) location_)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfileLocation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfileLocation other = (com.google.privacy.dlp.v2.DataProfileLocation) obj; - - if (!getLocationCase().equals(other.getLocationCase())) return false; - switch (locationCase_) { - case 1: - if (getOrganizationId() - != other.getOrganizationId()) return false; - break; - case 2: - if (getFolderId() - != other.getFolderId()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (locationCase_) { - case 1: - hash = (37 * hash) + ORGANIZATION_ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getOrganizationId()); - break; - case 2: - hash = (37 * hash) + FOLDER_ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFolderId()); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfileLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfileLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The data that will be profiled.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfileLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfileLocation) - com.google.privacy.dlp.v2.DataProfileLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfileLocation.class, com.google.privacy.dlp.v2.DataProfileLocation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfileLocation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - locationCase_ = 0; - location_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileLocation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileLocation build() { - com.google.privacy.dlp.v2.DataProfileLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileLocation buildPartial() { - com.google.privacy.dlp.v2.DataProfileLocation result = new com.google.privacy.dlp.v2.DataProfileLocation(this); - if (locationCase_ == 1) { - result.location_ = location_; - } - if (locationCase_ == 2) { - result.location_ = location_; - } - result.locationCase_ = locationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfileLocation) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfileLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfileLocation other) { - if (other == com.google.privacy.dlp.v2.DataProfileLocation.getDefaultInstance()) return this; - switch (other.getLocationCase()) { - case ORGANIZATION_ID: { - setOrganizationId(other.getOrganizationId()); - break; - } - case FOLDER_ID: { - setFolderId(other.getFolderId()); - break; - } - case LOCATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfileLocation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfileLocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int locationCase_ = 0; - private java.lang.Object location_; - public LocationCase - getLocationCase() { - return LocationCase.forNumber( - locationCase_); - } - - public Builder clearLocation() { - locationCase_ = 0; - location_ = null; - onChanged(); - return this; - } - - - /** - *
-     * The ID of an organization to scan.
-     * 
- * - * int64 organization_id = 1; - * @return Whether the organizationId field is set. - */ - public boolean hasOrganizationId() { - return locationCase_ == 1; - } - /** - *
-     * The ID of an organization to scan.
-     * 
- * - * int64 organization_id = 1; - * @return The organizationId. - */ - public long getOrganizationId() { - if (locationCase_ == 1) { - return (java.lang.Long) location_; - } - return 0L; - } - /** - *
-     * The ID of an organization to scan.
-     * 
- * - * int64 organization_id = 1; - * @param value The organizationId to set. - * @return This builder for chaining. - */ - public Builder setOrganizationId(long value) { - locationCase_ = 1; - location_ = value; - onChanged(); - return this; - } - /** - *
-     * The ID of an organization to scan.
-     * 
- * - * int64 organization_id = 1; - * @return This builder for chaining. - */ - public Builder clearOrganizationId() { - if (locationCase_ == 1) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * The ID of the Folder within an organization to scan.
-     * 
- * - * int64 folder_id = 2; - * @return Whether the folderId field is set. - */ - public boolean hasFolderId() { - return locationCase_ == 2; - } - /** - *
-     * The ID of the Folder within an organization to scan.
-     * 
- * - * int64 folder_id = 2; - * @return The folderId. - */ - public long getFolderId() { - if (locationCase_ == 2) { - return (java.lang.Long) location_; - } - return 0L; - } - /** - *
-     * The ID of the Folder within an organization to scan.
-     * 
- * - * int64 folder_id = 2; - * @param value The folderId to set. - * @return This builder for chaining. - */ - public Builder setFolderId(long value) { - locationCase_ = 2; - location_ = value; - onChanged(); - return this; - } - /** - *
-     * The ID of the Folder within an organization to scan.
-     * 
- * - * int64 folder_id = 2; - * @return This builder for chaining. - */ - public Builder clearFolderId() { - if (locationCase_ == 2) { - locationCase_ = 0; - location_ = null; - onChanged(); - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfileLocation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfileLocation) - private static final com.google.privacy.dlp.v2.DataProfileLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfileLocation(); - } - - public static com.google.privacy.dlp.v2.DataProfileLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataProfileLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataProfileLocation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocationOrBuilder.java deleted file mode 100644 index e9c5aa7a3e5f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfileLocationOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DataProfileLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfileLocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The ID of an organization to scan.
-   * 
- * - * int64 organization_id = 1; - * @return Whether the organizationId field is set. - */ - boolean hasOrganizationId(); - /** - *
-   * The ID of an organization to scan.
-   * 
- * - * int64 organization_id = 1; - * @return The organizationId. - */ - long getOrganizationId(); - - /** - *
-   * The ID of the Folder within an organization to scan.
-   * 
- * - * int64 folder_id = 2; - * @return Whether the folderId field is set. - */ - boolean hasFolderId(); - /** - *
-   * The ID of the Folder within an organization to scan.
-   * 
- * - * int64 folder_id = 2; - * @return The folderId. - */ - long getFolderId(); - - public com.google.privacy.dlp.v2.DataProfileLocation.LocationCase getLocationCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java deleted file mode 100644 index 0ad14780d773..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubCondition.java +++ /dev/null @@ -1,2906 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A condition for determining whether a Pub/Sub should be triggered.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition} - */ -public final class DataProfilePubSubCondition extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfilePubSubCondition) - DataProfilePubSubConditionOrBuilder { -private static final long serialVersionUID = 0L; - // Use DataProfilePubSubCondition.newBuilder() to construct. - private DataProfilePubSubCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DataProfilePubSubCondition() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DataProfilePubSubCondition(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataProfilePubSubCondition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder subBuilder = null; - if (expressions_ != null) { - subBuilder = expressions_.toBuilder(); - } - expressions_ = input.readMessage(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(expressions_); - expressions_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder.class); - } - - /** - *
-   * Various score levels for resources.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket} - */ - public enum ProfileScoreBucket - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * PROFILE_SCORE_BUCKET_UNSPECIFIED = 0; - */ - PROFILE_SCORE_BUCKET_UNSPECIFIED(0), - /** - *
-     * High risk/sensitivity detected.
-     * 
- * - * HIGH = 1; - */ - HIGH(1), - /** - *
-     * Medium or high risk/sensitivity detected.
-     * 
- * - * MEDIUM_OR_HIGH = 2; - */ - MEDIUM_OR_HIGH(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * PROFILE_SCORE_BUCKET_UNSPECIFIED = 0; - */ - public static final int PROFILE_SCORE_BUCKET_UNSPECIFIED_VALUE = 0; - /** - *
-     * High risk/sensitivity detected.
-     * 
- * - * HIGH = 1; - */ - public static final int HIGH_VALUE = 1; - /** - *
-     * Medium or high risk/sensitivity detected.
-     * 
- * - * MEDIUM_OR_HIGH = 2; - */ - public static final int MEDIUM_OR_HIGH_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ProfileScoreBucket valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ProfileScoreBucket forNumber(int value) { - switch (value) { - case 0: return PROFILE_SCORE_BUCKET_UNSPECIFIED; - case 1: return HIGH; - case 2: return MEDIUM_OR_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ProfileScoreBucket> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ProfileScoreBucket findValueByNumber(int number) { - return ProfileScoreBucket.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDescriptor().getEnumTypes().get(0); - } - - private static final ProfileScoreBucket[] VALUES = values(); - - public static ProfileScoreBucket valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ProfileScoreBucket(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket) - } - - public interface PubSubConditionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The minimum data risk score that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return Whether the minimumRiskScore field is set. - */ - boolean hasMinimumRiskScore(); - /** - *
-     * The minimum data risk score that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return The enum numeric value on the wire for minimumRiskScore. - */ - int getMinimumRiskScoreValue(); - /** - *
-     * The minimum data risk score that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return The minimumRiskScore. - */ - com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumRiskScore(); - - /** - *
-     * The minimum sensitivity level that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return Whether the minimumSensitivityScore field is set. - */ - boolean hasMinimumSensitivityScore(); - /** - *
-     * The minimum sensitivity level that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return The enum numeric value on the wire for minimumSensitivityScore. - */ - int getMinimumSensitivityScoreValue(); - /** - *
-     * The minimum sensitivity level that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return The minimumSensitivityScore. - */ - com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumSensitivityScore(); - - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.ValueCase getValueCase(); - } - /** - *
-   * A condition consisting of a value.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition} - */ - public static final class PubSubCondition extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) - PubSubConditionOrBuilder { - private static final long serialVersionUID = 0L; - // Use PubSubCondition.newBuilder() to construct. - private PubSubCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PubSubCondition() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PubSubCondition(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PubSubCondition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - valueCase_ = 1; - value_ = rawValue; - break; - } - case 16: { - int rawValue = input.readEnum(); - valueCase_ = 2; - value_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder.class); - } - - private int valueCase_ = 0; - private java.lang.Object value_; - public enum ValueCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - MINIMUM_RISK_SCORE(1), - MINIMUM_SENSITIVITY_SCORE(2), - VALUE_NOT_SET(0); - private final int value; - private ValueCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ValueCase valueOf(int value) { - return forNumber(value); - } - - public static ValueCase forNumber(int value) { - switch (value) { - case 1: return MINIMUM_RISK_SCORE; - case 2: return MINIMUM_SENSITIVITY_SCORE; - case 0: return VALUE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ValueCase - getValueCase() { - return ValueCase.forNumber( - valueCase_); - } - - public static final int MINIMUM_RISK_SCORE_FIELD_NUMBER = 1; - /** - *
-     * The minimum data risk score that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return Whether the minimumRiskScore field is set. - */ - public boolean hasMinimumRiskScore() { - return valueCase_ == 1; - } - /** - *
-     * The minimum data risk score that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return The enum numeric value on the wire for minimumRiskScore. - */ - public int getMinimumRiskScoreValue() { - if (valueCase_ == 1) { - return (java.lang.Integer) value_; - } - return 0; - } - /** - *
-     * The minimum data risk score that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return The minimumRiskScore. - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumRiskScore() { - if (valueCase_ == 1) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.valueOf( - (java.lang.Integer) value_); - return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.PROFILE_SCORE_BUCKET_UNSPECIFIED; - } - - public static final int MINIMUM_SENSITIVITY_SCORE_FIELD_NUMBER = 2; - /** - *
-     * The minimum sensitivity level that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return Whether the minimumSensitivityScore field is set. - */ - public boolean hasMinimumSensitivityScore() { - return valueCase_ == 2; - } - /** - *
-     * The minimum sensitivity level that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return The enum numeric value on the wire for minimumSensitivityScore. - */ - public int getMinimumSensitivityScoreValue() { - if (valueCase_ == 2) { - return (java.lang.Integer) value_; - } - return 0; - } - /** - *
-     * The minimum sensitivity level that triggers the condition.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return The minimumSensitivityScore. - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumSensitivityScore() { - if (valueCase_ == 2) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.valueOf( - (java.lang.Integer) value_); - return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.PROFILE_SCORE_BUCKET_UNSPECIFIED; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (valueCase_ == 1) { - output.writeEnum(1, ((java.lang.Integer) value_)); - } - if (valueCase_ == 2) { - output.writeEnum(2, ((java.lang.Integer) value_)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (valueCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, ((java.lang.Integer) value_)); - } - if (valueCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, ((java.lang.Integer) value_)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition other = (com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) obj; - - if (!getValueCase().equals(other.getValueCase())) return false; - switch (valueCase_) { - case 1: - if (getMinimumRiskScoreValue() - != other.getMinimumRiskScoreValue()) return false; - break; - case 2: - if (getMinimumSensitivityScoreValue() - != other.getMinimumSensitivityScoreValue()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (valueCase_) { - case 1: - hash = (37 * hash) + MINIMUM_RISK_SCORE_FIELD_NUMBER; - hash = (53 * hash) + getMinimumRiskScoreValue(); - break; - case 2: - hash = (37 * hash) + MINIMUM_SENSITIVITY_SCORE_FIELD_NUMBER; - hash = (53 * hash) + getMinimumSensitivityScoreValue(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A condition consisting of a value.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - valueCase_ = 0; - value_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition build() { - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition buildPartial() { - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition result = new com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition(this); - if (valueCase_ == 1) { - result.value_ = value_; - } - if (valueCase_ == 2) { - result.value_ = value_; - } - result.valueCase_ = valueCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition other) { - if (other == com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.getDefaultInstance()) return this; - switch (other.getValueCase()) { - case MINIMUM_RISK_SCORE: { - setMinimumRiskScoreValue(other.getMinimumRiskScoreValue()); - break; - } - case MINIMUM_SENSITIVITY_SCORE: { - setMinimumSensitivityScoreValue(other.getMinimumSensitivityScoreValue()); - break; - } - case VALUE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int valueCase_ = 0; - private java.lang.Object value_; - public ValueCase - getValueCase() { - return ValueCase.forNumber( - valueCase_); - } - - public Builder clearValue() { - valueCase_ = 0; - value_ = null; - onChanged(); - return this; - } - - - /** - *
-       * The minimum data risk score that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return Whether the minimumRiskScore field is set. - */ - @java.lang.Override - public boolean hasMinimumRiskScore() { - return valueCase_ == 1; - } - /** - *
-       * The minimum data risk score that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return The enum numeric value on the wire for minimumRiskScore. - */ - @java.lang.Override - public int getMinimumRiskScoreValue() { - if (valueCase_ == 1) { - return ((java.lang.Integer) value_).intValue(); - } - return 0; - } - /** - *
-       * The minimum data risk score that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @param value The enum numeric value on the wire for minimumRiskScore to set. - * @return This builder for chaining. - */ - public Builder setMinimumRiskScoreValue(int value) { - valueCase_ = 1; - value_ = value; - onChanged(); - return this; - } - /** - *
-       * The minimum data risk score that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return The minimumRiskScore. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumRiskScore() { - if (valueCase_ == 1) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.valueOf( - (java.lang.Integer) value_); - return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.PROFILE_SCORE_BUCKET_UNSPECIFIED; - } - /** - *
-       * The minimum data risk score that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @param value The minimumRiskScore to set. - * @return This builder for chaining. - */ - public Builder setMinimumRiskScore(com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 1; - value_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The minimum data risk score that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_risk_score = 1; - * @return This builder for chaining. - */ - public Builder clearMinimumRiskScore() { - if (valueCase_ == 1) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - - /** - *
-       * The minimum sensitivity level that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return Whether the minimumSensitivityScore field is set. - */ - @java.lang.Override - public boolean hasMinimumSensitivityScore() { - return valueCase_ == 2; - } - /** - *
-       * The minimum sensitivity level that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return The enum numeric value on the wire for minimumSensitivityScore. - */ - @java.lang.Override - public int getMinimumSensitivityScoreValue() { - if (valueCase_ == 2) { - return ((java.lang.Integer) value_).intValue(); - } - return 0; - } - /** - *
-       * The minimum sensitivity level that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @param value The enum numeric value on the wire for minimumSensitivityScore to set. - * @return This builder for chaining. - */ - public Builder setMinimumSensitivityScoreValue(int value) { - valueCase_ = 2; - value_ = value; - onChanged(); - return this; - } - /** - *
-       * The minimum sensitivity level that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return The minimumSensitivityScore. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket getMinimumSensitivityScore() { - if (valueCase_ == 2) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.valueOf( - (java.lang.Integer) value_); - return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket.PROFILE_SCORE_BUCKET_UNSPECIFIED; - } - /** - *
-       * The minimum sensitivity level that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @param value The minimumSensitivityScore to set. - * @return This builder for chaining. - */ - public Builder setMinimumSensitivityScore(com.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket value) { - if (value == null) { - throw new NullPointerException(); - } - valueCase_ = 2; - value_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The minimum sensitivity level that triggers the condition.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket minimum_sensitivity_score = 2; - * @return This builder for chaining. - */ - public Builder clearMinimumSensitivityScore() { - if (valueCase_ == 2) { - valueCase_ = 0; - value_ = null; - onChanged(); - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) - private static final com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition(); - } - - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PubSubCondition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PubSubCondition(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PubSubExpressionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The operator to apply to the collection of conditions.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; - * @return The enum numeric value on the wire for logicalOperator. - */ - int getLogicalOperatorValue(); - /** - *
-     * The operator to apply to the collection of conditions.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; - * @return The logicalOperator. - */ - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator getLogicalOperator(); - - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - java.util.List - getConditionsList(); - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getConditions(int index); - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - int getConditionsCount(); - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - java.util.List - getConditionsOrBuilderList(); - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder getConditionsOrBuilder( - int index); - } - /** - *
-   * An expression, consisting of an operator and conditions.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions} - */ - public static final class PubSubExpressions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) - PubSubExpressionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use PubSubExpressions.newBuilder() to construct. - private PubSubExpressions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PubSubExpressions() { - logicalOperator_ = 0; - conditions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PubSubExpressions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PubSubExpressions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - logicalOperator_ = rawValue; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - conditions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - conditions_.add( - input.readMessage(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - conditions_ = java.util.Collections.unmodifiableList(conditions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder.class); - } - - /** - *
-     * Logical operators for conditional checks.
-     * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator} - */ - public enum PubSubLogicalOperator - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unused.
-       * 
- * - * LOGICAL_OPERATOR_UNSPECIFIED = 0; - */ - LOGICAL_OPERATOR_UNSPECIFIED(0), - /** - *
-       * Conditional OR.
-       * 
- * - * OR = 1; - */ - OR(1), - /** - *
-       * Conditional AND.
-       * 
- * - * AND = 2; - */ - AND(2), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unused.
-       * 
- * - * LOGICAL_OPERATOR_UNSPECIFIED = 0; - */ - public static final int LOGICAL_OPERATOR_UNSPECIFIED_VALUE = 0; - /** - *
-       * Conditional OR.
-       * 
- * - * OR = 1; - */ - public static final int OR_VALUE = 1; - /** - *
-       * Conditional AND.
-       * 
- * - * AND = 2; - */ - public static final int AND_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PubSubLogicalOperator valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PubSubLogicalOperator forNumber(int value) { - switch (value) { - case 0: return LOGICAL_OPERATOR_UNSPECIFIED; - case 1: return OR; - case 2: return AND; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PubSubLogicalOperator> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PubSubLogicalOperator findValueByNumber(int number) { - return PubSubLogicalOperator.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDescriptor().getEnumTypes().get(0); - } - - private static final PubSubLogicalOperator[] VALUES = values(); - - public static PubSubLogicalOperator valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PubSubLogicalOperator(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator) - } - - public static final int LOGICAL_OPERATOR_FIELD_NUMBER = 1; - private int logicalOperator_; - /** - *
-     * The operator to apply to the collection of conditions.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; - * @return The enum numeric value on the wire for logicalOperator. - */ - @java.lang.Override public int getLogicalOperatorValue() { - return logicalOperator_; - } - /** - *
-     * The operator to apply to the collection of conditions.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; - * @return The logicalOperator. - */ - @java.lang.Override public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator getLogicalOperator() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.valueOf(logicalOperator_); - return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.UNRECOGNIZED : result; - } - - public static final int CONDITIONS_FIELD_NUMBER = 2; - private java.util.List conditions_; - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - @java.lang.Override - public java.util.List getConditionsList() { - return conditions_; - } - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - @java.lang.Override - public java.util.List - getConditionsOrBuilderList() { - return conditions_; - } - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - @java.lang.Override - public int getConditionsCount() { - return conditions_.size(); - } - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getConditions(int index) { - return conditions_.get(index); - } - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder getConditionsOrBuilder( - int index) { - return conditions_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (logicalOperator_ != com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED.getNumber()) { - output.writeEnum(1, logicalOperator_); - } - for (int i = 0; i < conditions_.size(); i++) { - output.writeMessage(2, conditions_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (logicalOperator_ != com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, logicalOperator_); - } - for (int i = 0; i < conditions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, conditions_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions other = (com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) obj; - - if (logicalOperator_ != other.logicalOperator_) return false; - if (!getConditionsList() - .equals(other.getConditionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOGICAL_OPERATOR_FIELD_NUMBER; - hash = (53 * hash) + logicalOperator_; - if (getConditionsCount() > 0) { - hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; - hash = (53 * hash) + getConditionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * An expression, consisting of an operator and conditions.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getConditionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - logicalOperator_ = 0; - - if (conditionsBuilder_ == null) { - conditions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - conditionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions build() { - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions buildPartial() { - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions result = new com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions(this); - int from_bitField0_ = bitField0_; - result.logicalOperator_ = logicalOperator_; - if (conditionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - conditions_ = java.util.Collections.unmodifiableList(conditions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.conditions_ = conditions_; - } else { - result.conditions_ = conditionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions other) { - if (other == com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance()) return this; - if (other.logicalOperator_ != 0) { - setLogicalOperatorValue(other.getLogicalOperatorValue()); - } - if (conditionsBuilder_ == null) { - if (!other.conditions_.isEmpty()) { - if (conditions_.isEmpty()) { - conditions_ = other.conditions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConditionsIsMutable(); - conditions_.addAll(other.conditions_); - } - onChanged(); - } - } else { - if (!other.conditions_.isEmpty()) { - if (conditionsBuilder_.isEmpty()) { - conditionsBuilder_.dispose(); - conditionsBuilder_ = null; - conditions_ = other.conditions_; - bitField0_ = (bitField0_ & ~0x00000001); - conditionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConditionsFieldBuilder() : null; - } else { - conditionsBuilder_.addAllMessages(other.conditions_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int logicalOperator_ = 0; - /** - *
-       * The operator to apply to the collection of conditions.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; - * @return The enum numeric value on the wire for logicalOperator. - */ - @java.lang.Override public int getLogicalOperatorValue() { - return logicalOperator_; - } - /** - *
-       * The operator to apply to the collection of conditions.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; - * @param value The enum numeric value on the wire for logicalOperator to set. - * @return This builder for chaining. - */ - public Builder setLogicalOperatorValue(int value) { - - logicalOperator_ = value; - onChanged(); - return this; - } - /** - *
-       * The operator to apply to the collection of conditions.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; - * @return The logicalOperator. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator getLogicalOperator() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator result = com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.valueOf(logicalOperator_); - return result == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator.UNRECOGNIZED : result; - } - /** - *
-       * The operator to apply to the collection of conditions.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; - * @param value The logicalOperator to set. - * @return This builder for chaining. - */ - public Builder setLogicalOperator(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator value) { - if (value == null) { - throw new NullPointerException(); - } - - logicalOperator_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The operator to apply to the collection of conditions.
-       * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator logical_operator = 1; - * @return This builder for chaining. - */ - public Builder clearLogicalOperator() { - - logicalOperator_ = 0; - onChanged(); - return this; - } - - private java.util.List conditions_ = - java.util.Collections.emptyList(); - private void ensureConditionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - conditions_ = new java.util.ArrayList(conditions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder> conditionsBuilder_; - - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public java.util.List getConditionsList() { - if (conditionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(conditions_); - } else { - return conditionsBuilder_.getMessageList(); - } - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public int getConditionsCount() { - if (conditionsBuilder_ == null) { - return conditions_.size(); - } else { - return conditionsBuilder_.getCount(); - } - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition getConditions(int index) { - if (conditionsBuilder_ == null) { - return conditions_.get(index); - } else { - return conditionsBuilder_.getMessage(index); - } - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public Builder setConditions( - int index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionsIsMutable(); - conditions_.set(index, value); - onChanged(); - } else { - conditionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public Builder setConditions( - int index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder builderForValue) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.set(index, builderForValue.build()); - onChanged(); - } else { - conditionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public Builder addConditions(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionsIsMutable(); - conditions_.add(value); - onChanged(); - } else { - conditionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public Builder addConditions( - int index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionsIsMutable(); - conditions_.add(index, value); - onChanged(); - } else { - conditionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public Builder addConditions( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder builderForValue) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.add(builderForValue.build()); - onChanged(); - } else { - conditionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public Builder addConditions( - int index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder builderForValue) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.add(index, builderForValue.build()); - onChanged(); - } else { - conditionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public Builder addAllConditions( - java.lang.Iterable values) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, conditions_); - onChanged(); - } else { - conditionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public Builder clearConditions() { - if (conditionsBuilder_ == null) { - conditions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - conditionsBuilder_.clear(); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public Builder removeConditions(int index) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.remove(index); - onChanged(); - } else { - conditionsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder getConditionsBuilder( - int index) { - return getConditionsFieldBuilder().getBuilder(index); - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder getConditionsOrBuilder( - int index) { - if (conditionsBuilder_ == null) { - return conditions_.get(index); } else { - return conditionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public java.util.List - getConditionsOrBuilderList() { - if (conditionsBuilder_ != null) { - return conditionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(conditions_); - } - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder addConditionsBuilder() { - return getConditionsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.getDefaultInstance()); - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder addConditionsBuilder( - int index) { - return getConditionsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.getDefaultInstance()); - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * repeated .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition conditions = 2; - */ - public java.util.List - getConditionsBuilderList() { - return getConditionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder> - getConditionsFieldBuilder() { - if (conditionsBuilder_ == null) { - conditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubConditionOrBuilder>( - conditions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - conditions_ = null; - } - return conditionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) - private static final com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions(); - } - - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PubSubExpressions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PubSubExpressions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int EXPRESSIONS_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions_; - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - * @return Whether the expressions field is set. - */ - @java.lang.Override - public boolean hasExpressions() { - return expressions_ != null; - } - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - * @return The expressions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getExpressions() { - return expressions_ == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance() : expressions_; - } - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder getExpressionsOrBuilder() { - return getExpressions(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (expressions_ != null) { - output.writeMessage(1, getExpressions()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (expressions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getExpressions()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfilePubSubCondition other = (com.google.privacy.dlp.v2.DataProfilePubSubCondition) obj; - - if (hasExpressions() != other.hasExpressions()) return false; - if (hasExpressions()) { - if (!getExpressions() - .equals(other.getExpressions())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasExpressions()) { - hash = (37 * hash) + EXPRESSIONS_FIELD_NUMBER; - hash = (53 * hash) + getExpressions().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfilePubSubCondition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A condition for determining whether a Pub/Sub should be triggered.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubCondition} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfilePubSubCondition) - com.google.privacy.dlp.v2.DataProfilePubSubConditionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.class, com.google.privacy.dlp.v2.DataProfilePubSubCondition.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfilePubSubCondition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (expressionsBuilder_ == null) { - expressions_ = null; - } else { - expressions_ = null; - expressionsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition build() { - com.google.privacy.dlp.v2.DataProfilePubSubCondition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition buildPartial() { - com.google.privacy.dlp.v2.DataProfilePubSubCondition result = new com.google.privacy.dlp.v2.DataProfilePubSubCondition(this); - if (expressionsBuilder_ == null) { - result.expressions_ = expressions_; - } else { - result.expressions_ = expressionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfilePubSubCondition) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfilePubSubCondition)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfilePubSubCondition other) { - if (other == com.google.privacy.dlp.v2.DataProfilePubSubCondition.getDefaultInstance()) return this; - if (other.hasExpressions()) { - mergeExpressions(other.getExpressions()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfilePubSubCondition parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfilePubSubCondition) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder> expressionsBuilder_; - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - * @return Whether the expressions field is set. - */ - public boolean hasExpressions() { - return expressionsBuilder_ != null || expressions_ != null; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - * @return The expressions. - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getExpressions() { - if (expressionsBuilder_ == null) { - return expressions_ == null ? com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance() : expressions_; - } else { - return expressionsBuilder_.getMessage(); - } - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - */ - public Builder setExpressions(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions value) { - if (expressionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - expressions_ = value; - onChanged(); - } else { - expressionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - */ - public Builder setExpressions( - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder builderForValue) { - if (expressionsBuilder_ == null) { - expressions_ = builderForValue.build(); - onChanged(); - } else { - expressionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - */ - public Builder mergeExpressions(com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions value) { - if (expressionsBuilder_ == null) { - if (expressions_ != null) { - expressions_ = - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.newBuilder(expressions_).mergeFrom(value).buildPartial(); - } else { - expressions_ = value; - } - onChanged(); - } else { - expressionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - */ - public Builder clearExpressions() { - if (expressionsBuilder_ == null) { - expressions_ = null; - onChanged(); - } else { - expressions_ = null; - expressionsBuilder_ = null; - } - - return this; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder getExpressionsBuilder() { - - onChanged(); - return getExpressionsFieldBuilder().getBuilder(); - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - */ - public com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder getExpressionsOrBuilder() { - if (expressionsBuilder_ != null) { - return expressionsBuilder_.getMessageOrBuilder(); - } else { - return expressions_ == null ? - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.getDefaultInstance() : expressions_; - } - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder> - getExpressionsFieldBuilder() { - if (expressionsBuilder_ == null) { - expressionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.Builder, com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder>( - getExpressions(), - getParentForChildren(), - isClean()); - expressions_ = null; - } - return expressionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfilePubSubCondition) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfilePubSubCondition) - private static final com.google.privacy.dlp.v2.DataProfilePubSubCondition DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfilePubSubCondition(); - } - - public static com.google.privacy.dlp.v2.DataProfilePubSubCondition getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataProfilePubSubCondition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataProfilePubSubCondition(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubCondition getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubConditionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubConditionOrBuilder.java deleted file mode 100644 index fc6d80a15713..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubConditionOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DataProfilePubSubConditionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfilePubSubCondition) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - * @return Whether the expressions field is set. - */ - boolean hasExpressions(); - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - * @return The expressions. - */ - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions getExpressions(); - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions expressions = 1; - */ - com.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressionsOrBuilder getExpressionsOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java deleted file mode 100644 index 4fc3b7a5253a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessage.java +++ /dev/null @@ -1,817 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Pub/Sub topic message for a DataProfileAction.PubSubNotification event.
- * To receive a message of protocol buffer schema type, convert the message data
- * to an object of this proto class.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubMessage} - */ -public final class DataProfilePubSubMessage extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataProfilePubSubMessage) - DataProfilePubSubMessageOrBuilder { -private static final long serialVersionUID = 0L; - // Use DataProfilePubSubMessage.newBuilder() to construct. - private DataProfilePubSubMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DataProfilePubSubMessage() { - event_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DataProfilePubSubMessage(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataProfilePubSubMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.TableDataProfile.Builder subBuilder = null; - if (profile_ != null) { - subBuilder = profile_.toBuilder(); - } - profile_ = input.readMessage(com.google.privacy.dlp.v2.TableDataProfile.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(profile_); - profile_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - int rawValue = input.readEnum(); - - event_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfilePubSubMessage.class, com.google.privacy.dlp.v2.DataProfilePubSubMessage.Builder.class); - } - - public static final int PROFILE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.TableDataProfile profile_; - /** - *
-   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-   * `full_resource` will be populated.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - * @return Whether the profile field is set. - */ - @java.lang.Override - public boolean hasProfile() { - return profile_ != null; - } - /** - *
-   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-   * `full_resource` will be populated.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - * @return The profile. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableDataProfile getProfile() { - return profile_ == null ? com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance() : profile_; - } - /** - *
-   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-   * `full_resource` will be populated.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableDataProfileOrBuilder getProfileOrBuilder() { - return getProfile(); - } - - public static final int EVENT_FIELD_NUMBER = 2; - private int event_; - /** - *
-   * The event that caused the Pub/Sub message to be sent.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The enum numeric value on the wire for event. - */ - @java.lang.Override public int getEventValue() { - return event_; - } - /** - *
-   * The event that caused the Pub/Sub message to be sent.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The event. - */ - @java.lang.Override public com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfileAction.EventType result = com.google.privacy.dlp.v2.DataProfileAction.EventType.valueOf(event_); - return result == null ? com.google.privacy.dlp.v2.DataProfileAction.EventType.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (profile_ != null) { - output.writeMessage(1, getProfile()); - } - if (event_ != com.google.privacy.dlp.v2.DataProfileAction.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, event_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (profile_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProfile()); - } - if (event_ != com.google.privacy.dlp.v2.DataProfileAction.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, event_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataProfilePubSubMessage)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataProfilePubSubMessage other = (com.google.privacy.dlp.v2.DataProfilePubSubMessage) obj; - - if (hasProfile() != other.hasProfile()) return false; - if (hasProfile()) { - if (!getProfile() - .equals(other.getProfile())) return false; - } - if (event_ != other.event_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProfile()) { - hash = (37 * hash) + PROFILE_FIELD_NUMBER; - hash = (53 * hash) + getProfile().hashCode(); - } - hash = (37 * hash) + EVENT_FIELD_NUMBER; - hash = (53 * hash) + event_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataProfilePubSubMessage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Pub/Sub topic message for a DataProfileAction.PubSubNotification event.
-   * To receive a message of protocol buffer schema type, convert the message data
-   * to an object of this proto class.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataProfilePubSubMessage} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataProfilePubSubMessage) - com.google.privacy.dlp.v2.DataProfilePubSubMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataProfilePubSubMessage.class, com.google.privacy.dlp.v2.DataProfilePubSubMessage.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataProfilePubSubMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (profileBuilder_ == null) { - profile_ = null; - } else { - profile_ = null; - profileBuilder_ = null; - } - event_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubMessage getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataProfilePubSubMessage.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubMessage build() { - com.google.privacy.dlp.v2.DataProfilePubSubMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubMessage buildPartial() { - com.google.privacy.dlp.v2.DataProfilePubSubMessage result = new com.google.privacy.dlp.v2.DataProfilePubSubMessage(this); - if (profileBuilder_ == null) { - result.profile_ = profile_; - } else { - result.profile_ = profileBuilder_.build(); - } - result.event_ = event_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataProfilePubSubMessage) { - return mergeFrom((com.google.privacy.dlp.v2.DataProfilePubSubMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataProfilePubSubMessage other) { - if (other == com.google.privacy.dlp.v2.DataProfilePubSubMessage.getDefaultInstance()) return this; - if (other.hasProfile()) { - mergeProfile(other.getProfile()); - } - if (other.event_ != 0) { - setEventValue(other.getEventValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataProfilePubSubMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataProfilePubSubMessage) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.TableDataProfile profile_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableDataProfile, com.google.privacy.dlp.v2.TableDataProfile.Builder, com.google.privacy.dlp.v2.TableDataProfileOrBuilder> profileBuilder_; - /** - *
-     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-     * `full_resource` will be populated.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - * @return Whether the profile field is set. - */ - public boolean hasProfile() { - return profileBuilder_ != null || profile_ != null; - } - /** - *
-     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-     * `full_resource` will be populated.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - * @return The profile. - */ - public com.google.privacy.dlp.v2.TableDataProfile getProfile() { - if (profileBuilder_ == null) { - return profile_ == null ? com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance() : profile_; - } else { - return profileBuilder_.getMessage(); - } - } - /** - *
-     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-     * `full_resource` will be populated.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - */ - public Builder setProfile(com.google.privacy.dlp.v2.TableDataProfile value) { - if (profileBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - profile_ = value; - onChanged(); - } else { - profileBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-     * `full_resource` will be populated.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - */ - public Builder setProfile( - com.google.privacy.dlp.v2.TableDataProfile.Builder builderForValue) { - if (profileBuilder_ == null) { - profile_ = builderForValue.build(); - onChanged(); - } else { - profileBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-     * `full_resource` will be populated.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - */ - public Builder mergeProfile(com.google.privacy.dlp.v2.TableDataProfile value) { - if (profileBuilder_ == null) { - if (profile_ != null) { - profile_ = - com.google.privacy.dlp.v2.TableDataProfile.newBuilder(profile_).mergeFrom(value).buildPartial(); - } else { - profile_ = value; - } - onChanged(); - } else { - profileBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-     * `full_resource` will be populated.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - */ - public Builder clearProfile() { - if (profileBuilder_ == null) { - profile_ = null; - onChanged(); - } else { - profile_ = null; - profileBuilder_ = null; - } - - return this; - } - /** - *
-     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-     * `full_resource` will be populated.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - */ - public com.google.privacy.dlp.v2.TableDataProfile.Builder getProfileBuilder() { - - onChanged(); - return getProfileFieldBuilder().getBuilder(); - } - /** - *
-     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-     * `full_resource` will be populated.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - */ - public com.google.privacy.dlp.v2.TableDataProfileOrBuilder getProfileOrBuilder() { - if (profileBuilder_ != null) { - return profileBuilder_.getMessageOrBuilder(); - } else { - return profile_ == null ? - com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance() : profile_; - } - } - /** - *
-     * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-     * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-     * `full_resource` will be populated.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableDataProfile, com.google.privacy.dlp.v2.TableDataProfile.Builder, com.google.privacy.dlp.v2.TableDataProfileOrBuilder> - getProfileFieldBuilder() { - if (profileBuilder_ == null) { - profileBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableDataProfile, com.google.privacy.dlp.v2.TableDataProfile.Builder, com.google.privacy.dlp.v2.TableDataProfileOrBuilder>( - getProfile(), - getParentForChildren(), - isClean()); - profile_ = null; - } - return profileBuilder_; - } - - private int event_ = 0; - /** - *
-     * The event that caused the Pub/Sub message to be sent.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The enum numeric value on the wire for event. - */ - @java.lang.Override public int getEventValue() { - return event_; - } - /** - *
-     * The event that caused the Pub/Sub message to be sent.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @param value The enum numeric value on the wire for event to set. - * @return This builder for chaining. - */ - public Builder setEventValue(int value) { - - event_ = value; - onChanged(); - return this; - } - /** - *
-     * The event that caused the Pub/Sub message to be sent.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The event. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataProfileAction.EventType result = com.google.privacy.dlp.v2.DataProfileAction.EventType.valueOf(event_); - return result == null ? com.google.privacy.dlp.v2.DataProfileAction.EventType.UNRECOGNIZED : result; - } - /** - *
-     * The event that caused the Pub/Sub message to be sent.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @param value The event to set. - * @return This builder for chaining. - */ - public Builder setEvent(com.google.privacy.dlp.v2.DataProfileAction.EventType value) { - if (value == null) { - throw new NullPointerException(); - } - - event_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The event that caused the Pub/Sub message to be sent.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return This builder for chaining. - */ - public Builder clearEvent() { - - event_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataProfilePubSubMessage) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataProfilePubSubMessage) - private static final com.google.privacy.dlp.v2.DataProfilePubSubMessage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataProfilePubSubMessage(); - } - - public static com.google.privacy.dlp.v2.DataProfilePubSubMessage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataProfilePubSubMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataProfilePubSubMessage(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfilePubSubMessage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessageOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessageOrBuilder.java deleted file mode 100644 index 4a0867a17c65..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataProfilePubSubMessageOrBuilder.java +++ /dev/null @@ -1,61 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DataProfilePubSubMessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataProfilePubSubMessage) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-   * `full_resource` will be populated.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - * @return Whether the profile field is set. - */ - boolean hasProfile(); - /** - *
-   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-   * `full_resource` will be populated.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - * @return The profile. - */ - com.google.privacy.dlp.v2.TableDataProfile getProfile(); - /** - *
-   * If `DetailLevel` is `TABLE_PROFILE` this will be fully populated.
-   * Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and
-   * `full_resource` will be populated.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile profile = 1; - */ - com.google.privacy.dlp.v2.TableDataProfileOrBuilder getProfileOrBuilder(); - - /** - *
-   * The event that caused the Pub/Sub message to be sent.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The enum numeric value on the wire for event. - */ - int getEventValue(); - /** - *
-   * The event that caused the Pub/Sub message to be sent.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileAction.EventType event = 2; - * @return The event. - */ - com.google.privacy.dlp.v2.DataProfileAction.EventType getEvent(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java deleted file mode 100644 index 774125c27ca5..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevel.java +++ /dev/null @@ -1,729 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Score is a summary of all elements in the data profile.
- * A higher number means more risk.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataRiskLevel} - */ -public final class DataRiskLevel extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DataRiskLevel) - DataRiskLevelOrBuilder { -private static final long serialVersionUID = 0L; - // Use DataRiskLevel.newBuilder() to construct. - private DataRiskLevel(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DataRiskLevel() { - score_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DataRiskLevel(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataRiskLevel( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - score_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataRiskLevel.class, com.google.privacy.dlp.v2.DataRiskLevel.Builder.class); - } - - /** - *
-   * Various score levels for resources.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore} - */ - public enum DataRiskLevelScore - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * RISK_SCORE_UNSPECIFIED = 0; - */ - RISK_SCORE_UNSPECIFIED(0), - /** - *
-     * Low risk - Lower indication of sensitive data that appears to have
-     * additional access restrictions in place or no indication of sensitive
-     * data found.
-     * 
- * - * RISK_LOW = 10; - */ - RISK_LOW(10), - /** - *
-     * Medium risk - Sensitive data may be present but additional access or fine
-     * grain access restrictions appear to be present.  Consider limiting
-     * access even further or transform data to mask.
-     * 
- * - * RISK_MODERATE = 20; - */ - RISK_MODERATE(20), - /** - *
-     * High risk – SPII may be present. Access controls may include public
-     * ACLs. Exfiltration of data may lead to user data loss. Re-identification
-     * of users may be possible. Consider limiting usage and or removing SPII.
-     * 
- * - * RISK_HIGH = 30; - */ - RISK_HIGH(30), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * RISK_SCORE_UNSPECIFIED = 0; - */ - public static final int RISK_SCORE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Low risk - Lower indication of sensitive data that appears to have
-     * additional access restrictions in place or no indication of sensitive
-     * data found.
-     * 
- * - * RISK_LOW = 10; - */ - public static final int RISK_LOW_VALUE = 10; - /** - *
-     * Medium risk - Sensitive data may be present but additional access or fine
-     * grain access restrictions appear to be present.  Consider limiting
-     * access even further or transform data to mask.
-     * 
- * - * RISK_MODERATE = 20; - */ - public static final int RISK_MODERATE_VALUE = 20; - /** - *
-     * High risk – SPII may be present. Access controls may include public
-     * ACLs. Exfiltration of data may lead to user data loss. Re-identification
-     * of users may be possible. Consider limiting usage and or removing SPII.
-     * 
- * - * RISK_HIGH = 30; - */ - public static final int RISK_HIGH_VALUE = 30; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DataRiskLevelScore valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DataRiskLevelScore forNumber(int value) { - switch (value) { - case 0: return RISK_SCORE_UNSPECIFIED; - case 10: return RISK_LOW; - case 20: return RISK_MODERATE; - case 30: return RISK_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DataRiskLevelScore> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DataRiskLevelScore findValueByNumber(int number) { - return DataRiskLevelScore.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DataRiskLevel.getDescriptor().getEnumTypes().get(0); - } - - private static final DataRiskLevelScore[] VALUES = values(); - - public static DataRiskLevelScore valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DataRiskLevelScore(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore) - } - - public static final int SCORE_FIELD_NUMBER = 1; - private int score_; - /** - *
-   * The score applied to the resource.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; - * @return The enum numeric value on the wire for score. - */ - @java.lang.Override public int getScoreValue() { - return score_; - } - /** - *
-   * The score applied to the resource.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; - * @return The score. - */ - @java.lang.Override public com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore getScore() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore result = com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.valueOf(score_); - return result == null ? com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (score_ != com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.RISK_SCORE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (score_ != com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.RISK_SCORE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DataRiskLevel)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DataRiskLevel other = (com.google.privacy.dlp.v2.DataRiskLevel) obj; - - if (score_ != other.score_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + score_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DataRiskLevel parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DataRiskLevel prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Score is a summary of all elements in the data profile.
-   * A higher number means more risk.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DataRiskLevel} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DataRiskLevel) - com.google.privacy.dlp.v2.DataRiskLevelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DataRiskLevel.class, com.google.privacy.dlp.v2.DataRiskLevel.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DataRiskLevel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - score_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataRiskLevel getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataRiskLevel build() { - com.google.privacy.dlp.v2.DataRiskLevel result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataRiskLevel buildPartial() { - com.google.privacy.dlp.v2.DataRiskLevel result = new com.google.privacy.dlp.v2.DataRiskLevel(this); - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DataRiskLevel) { - return mergeFrom((com.google.privacy.dlp.v2.DataRiskLevel)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DataRiskLevel other) { - if (other == com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance()) return this; - if (other.score_ != 0) { - setScoreValue(other.getScoreValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DataRiskLevel parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DataRiskLevel) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int score_ = 0; - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; - * @return The enum numeric value on the wire for score. - */ - @java.lang.Override public int getScoreValue() { - return score_; - } - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; - * @param value The enum numeric value on the wire for score to set. - * @return This builder for chaining. - */ - public Builder setScoreValue(int value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; - * @return The score. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore getScore() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore result = com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.valueOf(score_); - return result == null ? com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore.UNRECOGNIZED : result; - } - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore value) { - if (value == null) { - throw new NullPointerException(); - } - - score_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DataRiskLevel) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DataRiskLevel) - private static final com.google.privacy.dlp.v2.DataRiskLevel DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DataRiskLevel(); - } - - public static com.google.privacy.dlp.v2.DataRiskLevel getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataRiskLevel parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataRiskLevel(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DataRiskLevel getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevelOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevelOrBuilder.java deleted file mode 100644 index 1c8fa5548d8d..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DataRiskLevelOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DataRiskLevelOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DataRiskLevel) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The score applied to the resource.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; - * @return The enum numeric value on the wire for score. - */ - int getScoreValue(); - /** - *
-   * The score applied to the resource.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore score = 1; - * @return The score. - */ - com.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore getScore(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKey.java deleted file mode 100644 index cf4ff5116600..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKey.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Record key for a finding in Cloud Datastore.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DatastoreKey} - */ -public final class DatastoreKey extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DatastoreKey) - DatastoreKeyOrBuilder { -private static final long serialVersionUID = 0L; - // Use DatastoreKey.newBuilder() to construct. - private DatastoreKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DatastoreKey() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DatastoreKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DatastoreKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Key.Builder subBuilder = null; - if (entityKey_ != null) { - subBuilder = entityKey_.toBuilder(); - } - entityKey_ = input.readMessage(com.google.privacy.dlp.v2.Key.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(entityKey_); - entityKey_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DatastoreKey.class, com.google.privacy.dlp.v2.DatastoreKey.Builder.class); - } - - public static final int ENTITY_KEY_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.Key entityKey_; - /** - *
-   * Datastore entity key.
-   * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - * @return Whether the entityKey field is set. - */ - @java.lang.Override - public boolean hasEntityKey() { - return entityKey_ != null; - } - /** - *
-   * Datastore entity key.
-   * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - * @return The entityKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Key getEntityKey() { - return entityKey_ == null ? com.google.privacy.dlp.v2.Key.getDefaultInstance() : entityKey_; - } - /** - *
-   * Datastore entity key.
-   * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.KeyOrBuilder getEntityKeyOrBuilder() { - return getEntityKey(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (entityKey_ != null) { - output.writeMessage(1, getEntityKey()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (entityKey_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getEntityKey()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DatastoreKey)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DatastoreKey other = (com.google.privacy.dlp.v2.DatastoreKey) obj; - - if (hasEntityKey() != other.hasEntityKey()) return false; - if (hasEntityKey()) { - if (!getEntityKey() - .equals(other.getEntityKey())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasEntityKey()) { - hash = (37 * hash) + ENTITY_KEY_FIELD_NUMBER; - hash = (53 * hash) + getEntityKey().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DatastoreKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DatastoreKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Record key for a finding in Cloud Datastore.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DatastoreKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DatastoreKey) - com.google.privacy.dlp.v2.DatastoreKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DatastoreKey.class, com.google.privacy.dlp.v2.DatastoreKey.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DatastoreKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (entityKeyBuilder_ == null) { - entityKey_ = null; - } else { - entityKey_ = null; - entityKeyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreKey getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreKey build() { - com.google.privacy.dlp.v2.DatastoreKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreKey buildPartial() { - com.google.privacy.dlp.v2.DatastoreKey result = new com.google.privacy.dlp.v2.DatastoreKey(this); - if (entityKeyBuilder_ == null) { - result.entityKey_ = entityKey_; - } else { - result.entityKey_ = entityKeyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DatastoreKey) { - return mergeFrom((com.google.privacy.dlp.v2.DatastoreKey)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DatastoreKey other) { - if (other == com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance()) return this; - if (other.hasEntityKey()) { - mergeEntityKey(other.getEntityKey()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DatastoreKey parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DatastoreKey) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.Key entityKey_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Key, com.google.privacy.dlp.v2.Key.Builder, com.google.privacy.dlp.v2.KeyOrBuilder> entityKeyBuilder_; - /** - *
-     * Datastore entity key.
-     * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - * @return Whether the entityKey field is set. - */ - public boolean hasEntityKey() { - return entityKeyBuilder_ != null || entityKey_ != null; - } - /** - *
-     * Datastore entity key.
-     * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - * @return The entityKey. - */ - public com.google.privacy.dlp.v2.Key getEntityKey() { - if (entityKeyBuilder_ == null) { - return entityKey_ == null ? com.google.privacy.dlp.v2.Key.getDefaultInstance() : entityKey_; - } else { - return entityKeyBuilder_.getMessage(); - } - } - /** - *
-     * Datastore entity key.
-     * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - */ - public Builder setEntityKey(com.google.privacy.dlp.v2.Key value) { - if (entityKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - entityKey_ = value; - onChanged(); - } else { - entityKeyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Datastore entity key.
-     * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - */ - public Builder setEntityKey( - com.google.privacy.dlp.v2.Key.Builder builderForValue) { - if (entityKeyBuilder_ == null) { - entityKey_ = builderForValue.build(); - onChanged(); - } else { - entityKeyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Datastore entity key.
-     * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - */ - public Builder mergeEntityKey(com.google.privacy.dlp.v2.Key value) { - if (entityKeyBuilder_ == null) { - if (entityKey_ != null) { - entityKey_ = - com.google.privacy.dlp.v2.Key.newBuilder(entityKey_).mergeFrom(value).buildPartial(); - } else { - entityKey_ = value; - } - onChanged(); - } else { - entityKeyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Datastore entity key.
-     * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - */ - public Builder clearEntityKey() { - if (entityKeyBuilder_ == null) { - entityKey_ = null; - onChanged(); - } else { - entityKey_ = null; - entityKeyBuilder_ = null; - } - - return this; - } - /** - *
-     * Datastore entity key.
-     * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - */ - public com.google.privacy.dlp.v2.Key.Builder getEntityKeyBuilder() { - - onChanged(); - return getEntityKeyFieldBuilder().getBuilder(); - } - /** - *
-     * Datastore entity key.
-     * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - */ - public com.google.privacy.dlp.v2.KeyOrBuilder getEntityKeyOrBuilder() { - if (entityKeyBuilder_ != null) { - return entityKeyBuilder_.getMessageOrBuilder(); - } else { - return entityKey_ == null ? - com.google.privacy.dlp.v2.Key.getDefaultInstance() : entityKey_; - } - } - /** - *
-     * Datastore entity key.
-     * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Key, com.google.privacy.dlp.v2.Key.Builder, com.google.privacy.dlp.v2.KeyOrBuilder> - getEntityKeyFieldBuilder() { - if (entityKeyBuilder_ == null) { - entityKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Key, com.google.privacy.dlp.v2.Key.Builder, com.google.privacy.dlp.v2.KeyOrBuilder>( - getEntityKey(), - getParentForChildren(), - isClean()); - entityKey_ = null; - } - return entityKeyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DatastoreKey) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DatastoreKey) - private static final com.google.privacy.dlp.v2.DatastoreKey DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DatastoreKey(); - } - - public static com.google.privacy.dlp.v2.DatastoreKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DatastoreKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DatastoreKey(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKeyOrBuilder.java deleted file mode 100644 index c7150cbf63ef..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreKeyOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface DatastoreKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DatastoreKey) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Datastore entity key.
-   * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - * @return Whether the entityKey field is set. - */ - boolean hasEntityKey(); - /** - *
-   * Datastore entity key.
-   * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - * @return The entityKey. - */ - com.google.privacy.dlp.v2.Key getEntityKey(); - /** - *
-   * Datastore entity key.
-   * 
- * - * .google.privacy.dlp.v2.Key entity_key = 1; - */ - com.google.privacy.dlp.v2.KeyOrBuilder getEntityKeyOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptions.java deleted file mode 100644 index 4ea4f17bbc99..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptions.java +++ /dev/null @@ -1,913 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Options defining a data set within Google Cloud Datastore.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DatastoreOptions} - */ -public final class DatastoreOptions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DatastoreOptions) - DatastoreOptionsOrBuilder { -private static final long serialVersionUID = 0L; - // Use DatastoreOptions.newBuilder() to construct. - private DatastoreOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DatastoreOptions() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DatastoreOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DatastoreOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.PartitionId.Builder subBuilder = null; - if (partitionId_ != null) { - subBuilder = partitionId_.toBuilder(); - } - partitionId_ = input.readMessage(com.google.privacy.dlp.v2.PartitionId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partitionId_); - partitionId_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.KindExpression.Builder subBuilder = null; - if (kind_ != null) { - subBuilder = kind_.toBuilder(); - } - kind_ = input.readMessage(com.google.privacy.dlp.v2.KindExpression.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kind_); - kind_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DatastoreOptions.class, com.google.privacy.dlp.v2.DatastoreOptions.Builder.class); - } - - public static final int PARTITION_ID_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.PartitionId partitionId_; - /** - *
-   * A partition ID identifies a grouping of entities. The grouping is always
-   * by project and namespace, however the namespace ID may be empty.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return Whether the partitionId field is set. - */ - @java.lang.Override - public boolean hasPartitionId() { - return partitionId_ != null; - } - /** - *
-   * A partition ID identifies a grouping of entities. The grouping is always
-   * by project and namespace, however the namespace ID may be empty.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return The partitionId. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PartitionId getPartitionId() { - return partitionId_ == null ? com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; - } - /** - *
-   * A partition ID identifies a grouping of entities. The grouping is always
-   * by project and namespace, however the namespace ID may be empty.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder() { - return getPartitionId(); - } - - public static final int KIND_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.KindExpression kind_; - /** - *
-   * The kind to process.
-   * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - * @return Whether the kind field is set. - */ - @java.lang.Override - public boolean hasKind() { - return kind_ != null; - } - /** - *
-   * The kind to process.
-   * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - * @return The kind. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.KindExpression getKind() { - return kind_ == null ? com.google.privacy.dlp.v2.KindExpression.getDefaultInstance() : kind_; - } - /** - *
-   * The kind to process.
-   * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.KindExpressionOrBuilder getKindOrBuilder() { - return getKind(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (partitionId_ != null) { - output.writeMessage(1, getPartitionId()); - } - if (kind_ != null) { - output.writeMessage(2, getKind()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (partitionId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getPartitionId()); - } - if (kind_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getKind()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DatastoreOptions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DatastoreOptions other = (com.google.privacy.dlp.v2.DatastoreOptions) obj; - - if (hasPartitionId() != other.hasPartitionId()) return false; - if (hasPartitionId()) { - if (!getPartitionId() - .equals(other.getPartitionId())) return false; - } - if (hasKind() != other.hasKind()) return false; - if (hasKind()) { - if (!getKind() - .equals(other.getKind())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPartitionId()) { - hash = (37 * hash) + PARTITION_ID_FIELD_NUMBER; - hash = (53 * hash) + getPartitionId().hashCode(); - } - if (hasKind()) { - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + getKind().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DatastoreOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DatastoreOptions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Options defining a data set within Google Cloud Datastore.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DatastoreOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DatastoreOptions) - com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DatastoreOptions.class, com.google.privacy.dlp.v2.DatastoreOptions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DatastoreOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (partitionIdBuilder_ == null) { - partitionId_ = null; - } else { - partitionId_ = null; - partitionIdBuilder_ = null; - } - if (kindBuilder_ == null) { - kind_ = null; - } else { - kind_ = null; - kindBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreOptions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreOptions build() { - com.google.privacy.dlp.v2.DatastoreOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreOptions buildPartial() { - com.google.privacy.dlp.v2.DatastoreOptions result = new com.google.privacy.dlp.v2.DatastoreOptions(this); - if (partitionIdBuilder_ == null) { - result.partitionId_ = partitionId_; - } else { - result.partitionId_ = partitionIdBuilder_.build(); - } - if (kindBuilder_ == null) { - result.kind_ = kind_; - } else { - result.kind_ = kindBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DatastoreOptions) { - return mergeFrom((com.google.privacy.dlp.v2.DatastoreOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DatastoreOptions other) { - if (other == com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance()) return this; - if (other.hasPartitionId()) { - mergePartitionId(other.getPartitionId()); - } - if (other.hasKind()) { - mergeKind(other.getKind()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DatastoreOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DatastoreOptions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.PartitionId partitionId_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder> partitionIdBuilder_; - /** - *
-     * A partition ID identifies a grouping of entities. The grouping is always
-     * by project and namespace, however the namespace ID may be empty.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return Whether the partitionId field is set. - */ - public boolean hasPartitionId() { - return partitionIdBuilder_ != null || partitionId_ != null; - } - /** - *
-     * A partition ID identifies a grouping of entities. The grouping is always
-     * by project and namespace, however the namespace ID may be empty.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return The partitionId. - */ - public com.google.privacy.dlp.v2.PartitionId getPartitionId() { - if (partitionIdBuilder_ == null) { - return partitionId_ == null ? com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; - } else { - return partitionIdBuilder_.getMessage(); - } - } - /** - *
-     * A partition ID identifies a grouping of entities. The grouping is always
-     * by project and namespace, however the namespace ID may be empty.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public Builder setPartitionId(com.google.privacy.dlp.v2.PartitionId value) { - if (partitionIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - partitionId_ = value; - onChanged(); - } else { - partitionIdBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A partition ID identifies a grouping of entities. The grouping is always
-     * by project and namespace, however the namespace ID may be empty.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public Builder setPartitionId( - com.google.privacy.dlp.v2.PartitionId.Builder builderForValue) { - if (partitionIdBuilder_ == null) { - partitionId_ = builderForValue.build(); - onChanged(); - } else { - partitionIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A partition ID identifies a grouping of entities. The grouping is always
-     * by project and namespace, however the namespace ID may be empty.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public Builder mergePartitionId(com.google.privacy.dlp.v2.PartitionId value) { - if (partitionIdBuilder_ == null) { - if (partitionId_ != null) { - partitionId_ = - com.google.privacy.dlp.v2.PartitionId.newBuilder(partitionId_).mergeFrom(value).buildPartial(); - } else { - partitionId_ = value; - } - onChanged(); - } else { - partitionIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A partition ID identifies a grouping of entities. The grouping is always
-     * by project and namespace, however the namespace ID may be empty.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public Builder clearPartitionId() { - if (partitionIdBuilder_ == null) { - partitionId_ = null; - onChanged(); - } else { - partitionId_ = null; - partitionIdBuilder_ = null; - } - - return this; - } - /** - *
-     * A partition ID identifies a grouping of entities. The grouping is always
-     * by project and namespace, however the namespace ID may be empty.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public com.google.privacy.dlp.v2.PartitionId.Builder getPartitionIdBuilder() { - - onChanged(); - return getPartitionIdFieldBuilder().getBuilder(); - } - /** - *
-     * A partition ID identifies a grouping of entities. The grouping is always
-     * by project and namespace, however the namespace ID may be empty.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder() { - if (partitionIdBuilder_ != null) { - return partitionIdBuilder_.getMessageOrBuilder(); - } else { - return partitionId_ == null ? - com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; - } - } - /** - *
-     * A partition ID identifies a grouping of entities. The grouping is always
-     * by project and namespace, however the namespace ID may be empty.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder> - getPartitionIdFieldBuilder() { - if (partitionIdBuilder_ == null) { - partitionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder>( - getPartitionId(), - getParentForChildren(), - isClean()); - partitionId_ = null; - } - return partitionIdBuilder_; - } - - private com.google.privacy.dlp.v2.KindExpression kind_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.KindExpression, com.google.privacy.dlp.v2.KindExpression.Builder, com.google.privacy.dlp.v2.KindExpressionOrBuilder> kindBuilder_; - /** - *
-     * The kind to process.
-     * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - * @return Whether the kind field is set. - */ - public boolean hasKind() { - return kindBuilder_ != null || kind_ != null; - } - /** - *
-     * The kind to process.
-     * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - * @return The kind. - */ - public com.google.privacy.dlp.v2.KindExpression getKind() { - if (kindBuilder_ == null) { - return kind_ == null ? com.google.privacy.dlp.v2.KindExpression.getDefaultInstance() : kind_; - } else { - return kindBuilder_.getMessage(); - } - } - /** - *
-     * The kind to process.
-     * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - */ - public Builder setKind(com.google.privacy.dlp.v2.KindExpression value) { - if (kindBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kind_ = value; - onChanged(); - } else { - kindBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The kind to process.
-     * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - */ - public Builder setKind( - com.google.privacy.dlp.v2.KindExpression.Builder builderForValue) { - if (kindBuilder_ == null) { - kind_ = builderForValue.build(); - onChanged(); - } else { - kindBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The kind to process.
-     * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - */ - public Builder mergeKind(com.google.privacy.dlp.v2.KindExpression value) { - if (kindBuilder_ == null) { - if (kind_ != null) { - kind_ = - com.google.privacy.dlp.v2.KindExpression.newBuilder(kind_).mergeFrom(value).buildPartial(); - } else { - kind_ = value; - } - onChanged(); - } else { - kindBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The kind to process.
-     * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - */ - public Builder clearKind() { - if (kindBuilder_ == null) { - kind_ = null; - onChanged(); - } else { - kind_ = null; - kindBuilder_ = null; - } - - return this; - } - /** - *
-     * The kind to process.
-     * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - */ - public com.google.privacy.dlp.v2.KindExpression.Builder getKindBuilder() { - - onChanged(); - return getKindFieldBuilder().getBuilder(); - } - /** - *
-     * The kind to process.
-     * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - */ - public com.google.privacy.dlp.v2.KindExpressionOrBuilder getKindOrBuilder() { - if (kindBuilder_ != null) { - return kindBuilder_.getMessageOrBuilder(); - } else { - return kind_ == null ? - com.google.privacy.dlp.v2.KindExpression.getDefaultInstance() : kind_; - } - } - /** - *
-     * The kind to process.
-     * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.KindExpression, com.google.privacy.dlp.v2.KindExpression.Builder, com.google.privacy.dlp.v2.KindExpressionOrBuilder> - getKindFieldBuilder() { - if (kindBuilder_ == null) { - kindBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.KindExpression, com.google.privacy.dlp.v2.KindExpression.Builder, com.google.privacy.dlp.v2.KindExpressionOrBuilder>( - getKind(), - getParentForChildren(), - isClean()); - kind_ = null; - } - return kindBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DatastoreOptions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DatastoreOptions) - private static final com.google.privacy.dlp.v2.DatastoreOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DatastoreOptions(); - } - - public static com.google.privacy.dlp.v2.DatastoreOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DatastoreOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DatastoreOptions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptionsOrBuilder.java deleted file mode 100644 index 4082178cb95a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DatastoreOptionsOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface DatastoreOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DatastoreOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A partition ID identifies a grouping of entities. The grouping is always
-   * by project and namespace, however the namespace ID may be empty.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return Whether the partitionId field is set. - */ - boolean hasPartitionId(); - /** - *
-   * A partition ID identifies a grouping of entities. The grouping is always
-   * by project and namespace, however the namespace ID may be empty.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return The partitionId. - */ - com.google.privacy.dlp.v2.PartitionId getPartitionId(); - /** - *
-   * A partition ID identifies a grouping of entities. The grouping is always
-   * by project and namespace, however the namespace ID may be empty.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder(); - - /** - *
-   * The kind to process.
-   * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - * @return Whether the kind field is set. - */ - boolean hasKind(); - /** - *
-   * The kind to process.
-   * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - * @return The kind. - */ - com.google.privacy.dlp.v2.KindExpression getKind(); - /** - *
-   * The kind to process.
-   * 
- * - * .google.privacy.dlp.v2.KindExpression kind = 2; - */ - com.google.privacy.dlp.v2.KindExpressionOrBuilder getKindOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java deleted file mode 100644 index a24dce55e8f8..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java +++ /dev/null @@ -1,1221 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Shifts dates by random number of days, with option to be consistent for the
- * same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting
- * to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DateShiftConfig} - */ -public final class DateShiftConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DateShiftConfig) - DateShiftConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use DateShiftConfig.newBuilder() to construct. - private DateShiftConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DateShiftConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DateShiftConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DateShiftConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - upperBoundDays_ = input.readInt32(); - break; - } - case 16: { - - lowerBoundDays_ = input.readInt32(); - break; - } - case 26: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (context_ != null) { - subBuilder = context_.toBuilder(); - } - context_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(context_); - context_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.privacy.dlp.v2.CryptoKey.Builder subBuilder = null; - if (methodCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.CryptoKey) method_).toBuilder(); - } - method_ = - input.readMessage(com.google.privacy.dlp.v2.CryptoKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CryptoKey) method_); - method_ = subBuilder.buildPartial(); - } - methodCase_ = 4; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DateShiftConfig.class, com.google.privacy.dlp.v2.DateShiftConfig.Builder.class); - } - - private int methodCase_ = 0; - private java.lang.Object method_; - public enum MethodCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CRYPTO_KEY(4), - METHOD_NOT_SET(0); - private final int value; - private MethodCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MethodCase valueOf(int value) { - return forNumber(value); - } - - public static MethodCase forNumber(int value) { - switch (value) { - case 4: return CRYPTO_KEY; - case 0: return METHOD_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public MethodCase - getMethodCase() { - return MethodCase.forNumber( - methodCase_); - } - - public static final int UPPER_BOUND_DAYS_FIELD_NUMBER = 1; - private int upperBoundDays_; - /** - *
-   * Required. Range of shift in days. Actual shift will be selected at random within this
-   * range (inclusive ends). Negative means shift to earlier in time. Must not
-   * be more than 365250 days (1000 years) each direction.
-   * For example, 3 means shift date to at most 3 days into the future.
-   * 
- * - * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The upperBoundDays. - */ - @java.lang.Override - public int getUpperBoundDays() { - return upperBoundDays_; - } - - public static final int LOWER_BOUND_DAYS_FIELD_NUMBER = 2; - private int lowerBoundDays_; - /** - *
-   * Required. For example, -5 means shift date to at most 5 days back in the past.
-   * 
- * - * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The lowerBoundDays. - */ - @java.lang.Override - public int getLowerBoundDays() { - return lowerBoundDays_; - } - - public static final int CONTEXT_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.FieldId context_; - /** - *
-   * Points to the field that contains the context, for example, an entity id.
-   * If set, must also set cryptoKey. If set, shift will be consistent for the
-   * given context.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return Whether the context field is set. - */ - @java.lang.Override - public boolean hasContext() { - return context_ != null; - } - /** - *
-   * Points to the field that contains the context, for example, an entity id.
-   * If set, must also set cryptoKey. If set, shift will be consistent for the
-   * given context.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return The context. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getContext() { - return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; - } - /** - *
-   * Points to the field that contains the context, for example, an entity id.
-   * If set, must also set cryptoKey. If set, shift will be consistent for the
-   * given context.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { - return getContext(); - } - - public static final int CRYPTO_KEY_FIELD_NUMBER = 4; - /** - *
-   * Causes the shift to be computed based on this key and the context. This
-   * results in the same shift for the same context and crypto_key. If
-   * set, must also set context. Can only be applied to table items.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - * @return Whether the cryptoKey field is set. - */ - @java.lang.Override - public boolean hasCryptoKey() { - return methodCase_ == 4; - } - /** - *
-   * Causes the shift to be computed based on this key and the context. This
-   * results in the same shift for the same context and crypto_key. If
-   * set, must also set context. Can only be applied to table items.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - * @return The cryptoKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { - if (methodCase_ == 4) { - return (com.google.privacy.dlp.v2.CryptoKey) method_; - } - return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); - } - /** - *
-   * Causes the shift to be computed based on this key and the context. This
-   * results in the same shift for the same context and crypto_key. If
-   * set, must also set context. Can only be applied to table items.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { - if (methodCase_ == 4) { - return (com.google.privacy.dlp.v2.CryptoKey) method_; - } - return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (upperBoundDays_ != 0) { - output.writeInt32(1, upperBoundDays_); - } - if (lowerBoundDays_ != 0) { - output.writeInt32(2, lowerBoundDays_); - } - if (context_ != null) { - output.writeMessage(3, getContext()); - } - if (methodCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.CryptoKey) method_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (upperBoundDays_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, upperBoundDays_); - } - if (lowerBoundDays_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, lowerBoundDays_); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getContext()); - } - if (methodCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.CryptoKey) method_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DateShiftConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DateShiftConfig other = (com.google.privacy.dlp.v2.DateShiftConfig) obj; - - if (getUpperBoundDays() - != other.getUpperBoundDays()) return false; - if (getLowerBoundDays() - != other.getLowerBoundDays()) return false; - if (hasContext() != other.hasContext()) return false; - if (hasContext()) { - if (!getContext() - .equals(other.getContext())) return false; - } - if (!getMethodCase().equals(other.getMethodCase())) return false; - switch (methodCase_) { - case 4: - if (!getCryptoKey() - .equals(other.getCryptoKey())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + UPPER_BOUND_DAYS_FIELD_NUMBER; - hash = (53 * hash) + getUpperBoundDays(); - hash = (37 * hash) + LOWER_BOUND_DAYS_FIELD_NUMBER; - hash = (53 * hash) + getLowerBoundDays(); - if (hasContext()) { - hash = (37 * hash) + CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getContext().hashCode(); - } - switch (methodCase_) { - case 4: - hash = (37 * hash) + CRYPTO_KEY_FIELD_NUMBER; - hash = (53 * hash) + getCryptoKey().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DateShiftConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DateShiftConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Shifts dates by random number of days, with option to be consistent for the
-   * same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting
-   * to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DateShiftConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DateShiftConfig) - com.google.privacy.dlp.v2.DateShiftConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DateShiftConfig.class, com.google.privacy.dlp.v2.DateShiftConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DateShiftConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - upperBoundDays_ = 0; - - lowerBoundDays_ = 0; - - if (contextBuilder_ == null) { - context_ = null; - } else { - context_ = null; - contextBuilder_ = null; - } - methodCase_ = 0; - method_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateShiftConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateShiftConfig build() { - com.google.privacy.dlp.v2.DateShiftConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateShiftConfig buildPartial() { - com.google.privacy.dlp.v2.DateShiftConfig result = new com.google.privacy.dlp.v2.DateShiftConfig(this); - result.upperBoundDays_ = upperBoundDays_; - result.lowerBoundDays_ = lowerBoundDays_; - if (contextBuilder_ == null) { - result.context_ = context_; - } else { - result.context_ = contextBuilder_.build(); - } - if (methodCase_ == 4) { - if (cryptoKeyBuilder_ == null) { - result.method_ = method_; - } else { - result.method_ = cryptoKeyBuilder_.build(); - } - } - result.methodCase_ = methodCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DateShiftConfig) { - return mergeFrom((com.google.privacy.dlp.v2.DateShiftConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DateShiftConfig other) { - if (other == com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance()) return this; - if (other.getUpperBoundDays() != 0) { - setUpperBoundDays(other.getUpperBoundDays()); - } - if (other.getLowerBoundDays() != 0) { - setLowerBoundDays(other.getLowerBoundDays()); - } - if (other.hasContext()) { - mergeContext(other.getContext()); - } - switch (other.getMethodCase()) { - case CRYPTO_KEY: { - mergeCryptoKey(other.getCryptoKey()); - break; - } - case METHOD_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DateShiftConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DateShiftConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int methodCase_ = 0; - private java.lang.Object method_; - public MethodCase - getMethodCase() { - return MethodCase.forNumber( - methodCase_); - } - - public Builder clearMethod() { - methodCase_ = 0; - method_ = null; - onChanged(); - return this; - } - - - private int upperBoundDays_ ; - /** - *
-     * Required. Range of shift in days. Actual shift will be selected at random within this
-     * range (inclusive ends). Negative means shift to earlier in time. Must not
-     * be more than 365250 days (1000 years) each direction.
-     * For example, 3 means shift date to at most 3 days into the future.
-     * 
- * - * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The upperBoundDays. - */ - @java.lang.Override - public int getUpperBoundDays() { - return upperBoundDays_; - } - /** - *
-     * Required. Range of shift in days. Actual shift will be selected at random within this
-     * range (inclusive ends). Negative means shift to earlier in time. Must not
-     * be more than 365250 days (1000 years) each direction.
-     * For example, 3 means shift date to at most 3 days into the future.
-     * 
- * - * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The upperBoundDays to set. - * @return This builder for chaining. - */ - public Builder setUpperBoundDays(int value) { - - upperBoundDays_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Range of shift in days. Actual shift will be selected at random within this
-     * range (inclusive ends). Negative means shift to earlier in time. Must not
-     * be more than 365250 days (1000 years) each direction.
-     * For example, 3 means shift date to at most 3 days into the future.
-     * 
- * - * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearUpperBoundDays() { - - upperBoundDays_ = 0; - onChanged(); - return this; - } - - private int lowerBoundDays_ ; - /** - *
-     * Required. For example, -5 means shift date to at most 5 days back in the past.
-     * 
- * - * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The lowerBoundDays. - */ - @java.lang.Override - public int getLowerBoundDays() { - return lowerBoundDays_; - } - /** - *
-     * Required. For example, -5 means shift date to at most 5 days back in the past.
-     * 
- * - * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The lowerBoundDays to set. - * @return This builder for chaining. - */ - public Builder setLowerBoundDays(int value) { - - lowerBoundDays_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. For example, -5 means shift date to at most 5 days back in the past.
-     * 
- * - * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearLowerBoundDays() { - - lowerBoundDays_ = 0; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.FieldId context_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> contextBuilder_; - /** - *
-     * Points to the field that contains the context, for example, an entity id.
-     * If set, must also set cryptoKey. If set, shift will be consistent for the
-     * given context.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return Whether the context field is set. - */ - public boolean hasContext() { - return contextBuilder_ != null || context_ != null; - } - /** - *
-     * Points to the field that contains the context, for example, an entity id.
-     * If set, must also set cryptoKey. If set, shift will be consistent for the
-     * given context.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return The context. - */ - public com.google.privacy.dlp.v2.FieldId getContext() { - if (contextBuilder_ == null) { - return context_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - *
-     * Points to the field that contains the context, for example, an entity id.
-     * If set, must also set cryptoKey. If set, shift will be consistent for the
-     * given context.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public Builder setContext(com.google.privacy.dlp.v2.FieldId value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - contextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Points to the field that contains the context, for example, an entity id.
-     * If set, must also set cryptoKey. If set, shift will be consistent for the
-     * given context.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public Builder setContext( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Points to the field that contains the context, for example, an entity id.
-     * If set, must also set cryptoKey. If set, shift will be consistent for the
-     * given context.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public Builder mergeContext(com.google.privacy.dlp.v2.FieldId value) { - if (contextBuilder_ == null) { - if (context_ != null) { - context_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(context_).mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - contextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Points to the field that contains the context, for example, an entity id.
-     * If set, must also set cryptoKey. If set, shift will be consistent for the
-     * given context.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public Builder clearContext() { - if (contextBuilder_ == null) { - context_ = null; - onChanged(); - } else { - context_ = null; - contextBuilder_ = null; - } - - return this; - } - /** - *
-     * Points to the field that contains the context, for example, an entity id.
-     * If set, must also set cryptoKey. If set, shift will be consistent for the
-     * given context.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getContextBuilder() { - - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - *
-     * Points to the field that contains the context, for example, an entity id.
-     * If set, must also set cryptoKey. If set, shift will be consistent for the
-     * given context.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : context_; - } - } - /** - *
-     * Points to the field that contains the context, for example, an entity id.
-     * If set, must also set cryptoKey. If set, shift will be consistent for the
-     * given context.
-     * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> cryptoKeyBuilder_; - /** - *
-     * Causes the shift to be computed based on this key and the context. This
-     * results in the same shift for the same context and crypto_key. If
-     * set, must also set context. Can only be applied to table items.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - * @return Whether the cryptoKey field is set. - */ - @java.lang.Override - public boolean hasCryptoKey() { - return methodCase_ == 4; - } - /** - *
-     * Causes the shift to be computed based on this key and the context. This
-     * results in the same shift for the same context and crypto_key. If
-     * set, must also set context. Can only be applied to table items.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - * @return The cryptoKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKey getCryptoKey() { - if (cryptoKeyBuilder_ == null) { - if (methodCase_ == 4) { - return (com.google.privacy.dlp.v2.CryptoKey) method_; - } - return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); - } else { - if (methodCase_ == 4) { - return cryptoKeyBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); - } - } - /** - *
-     * Causes the shift to be computed based on this key and the context. This
-     * results in the same shift for the same context and crypto_key. If
-     * set, must also set context. Can only be applied to table items.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - */ - public Builder setCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { - if (cryptoKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - method_ = value; - onChanged(); - } else { - cryptoKeyBuilder_.setMessage(value); - } - methodCase_ = 4; - return this; - } - /** - *
-     * Causes the shift to be computed based on this key and the context. This
-     * results in the same shift for the same context and crypto_key. If
-     * set, must also set context. Can only be applied to table items.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - */ - public Builder setCryptoKey( - com.google.privacy.dlp.v2.CryptoKey.Builder builderForValue) { - if (cryptoKeyBuilder_ == null) { - method_ = builderForValue.build(); - onChanged(); - } else { - cryptoKeyBuilder_.setMessage(builderForValue.build()); - } - methodCase_ = 4; - return this; - } - /** - *
-     * Causes the shift to be computed based on this key and the context. This
-     * results in the same shift for the same context and crypto_key. If
-     * set, must also set context. Can only be applied to table items.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - */ - public Builder mergeCryptoKey(com.google.privacy.dlp.v2.CryptoKey value) { - if (cryptoKeyBuilder_ == null) { - if (methodCase_ == 4 && - method_ != com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance()) { - method_ = com.google.privacy.dlp.v2.CryptoKey.newBuilder((com.google.privacy.dlp.v2.CryptoKey) method_) - .mergeFrom(value).buildPartial(); - } else { - method_ = value; - } - onChanged(); - } else { - if (methodCase_ == 4) { - cryptoKeyBuilder_.mergeFrom(value); - } else { - cryptoKeyBuilder_.setMessage(value); - } - } - methodCase_ = 4; - return this; - } - /** - *
-     * Causes the shift to be computed based on this key and the context. This
-     * results in the same shift for the same context and crypto_key. If
-     * set, must also set context. Can only be applied to table items.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - */ - public Builder clearCryptoKey() { - if (cryptoKeyBuilder_ == null) { - if (methodCase_ == 4) { - methodCase_ = 0; - method_ = null; - onChanged(); - } - } else { - if (methodCase_ == 4) { - methodCase_ = 0; - method_ = null; - } - cryptoKeyBuilder_.clear(); - } - return this; - } - /** - *
-     * Causes the shift to be computed based on this key and the context. This
-     * results in the same shift for the same context and crypto_key. If
-     * set, must also set context. Can only be applied to table items.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - */ - public com.google.privacy.dlp.v2.CryptoKey.Builder getCryptoKeyBuilder() { - return getCryptoKeyFieldBuilder().getBuilder(); - } - /** - *
-     * Causes the shift to be computed based on this key and the context. This
-     * results in the same shift for the same context and crypto_key. If
-     * set, must also set context. Can only be applied to table items.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder() { - if ((methodCase_ == 4) && (cryptoKeyBuilder_ != null)) { - return cryptoKeyBuilder_.getMessageOrBuilder(); - } else { - if (methodCase_ == 4) { - return (com.google.privacy.dlp.v2.CryptoKey) method_; - } - return com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); - } - } - /** - *
-     * Causes the shift to be computed based on this key and the context. This
-     * results in the same shift for the same context and crypto_key. If
-     * set, must also set context. Can only be applied to table items.
-     * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder> - getCryptoKeyFieldBuilder() { - if (cryptoKeyBuilder_ == null) { - if (!(methodCase_ == 4)) { - method_ = com.google.privacy.dlp.v2.CryptoKey.getDefaultInstance(); - } - cryptoKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoKey, com.google.privacy.dlp.v2.CryptoKey.Builder, com.google.privacy.dlp.v2.CryptoKeyOrBuilder>( - (com.google.privacy.dlp.v2.CryptoKey) method_, - getParentForChildren(), - isClean()); - method_ = null; - } - methodCase_ = 4; - onChanged();; - return cryptoKeyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DateShiftConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DateShiftConfig) - private static final com.google.privacy.dlp.v2.DateShiftConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DateShiftConfig(); - } - - public static com.google.privacy.dlp.v2.DateShiftConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DateShiftConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DateShiftConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateShiftConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java deleted file mode 100644 index e4888a2e3f92..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfigOrBuilder.java +++ /dev/null @@ -1,100 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DateShiftConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DateShiftConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Range of shift in days. Actual shift will be selected at random within this
-   * range (inclusive ends). Negative means shift to earlier in time. Must not
-   * be more than 365250 days (1000 years) each direction.
-   * For example, 3 means shift date to at most 3 days into the future.
-   * 
- * - * int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The upperBoundDays. - */ - int getUpperBoundDays(); - - /** - *
-   * Required. For example, -5 means shift date to at most 5 days back in the past.
-   * 
- * - * int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The lowerBoundDays. - */ - int getLowerBoundDays(); - - /** - *
-   * Points to the field that contains the context, for example, an entity id.
-   * If set, must also set cryptoKey. If set, shift will be consistent for the
-   * given context.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return Whether the context field is set. - */ - boolean hasContext(); - /** - *
-   * Points to the field that contains the context, for example, an entity id.
-   * If set, must also set cryptoKey. If set, shift will be consistent for the
-   * given context.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - * @return The context. - */ - com.google.privacy.dlp.v2.FieldId getContext(); - /** - *
-   * Points to the field that contains the context, for example, an entity id.
-   * If set, must also set cryptoKey. If set, shift will be consistent for the
-   * given context.
-   * 
- * - * .google.privacy.dlp.v2.FieldId context = 3; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder(); - - /** - *
-   * Causes the shift to be computed based on this key and the context. This
-   * results in the same shift for the same context and crypto_key. If
-   * set, must also set context. Can only be applied to table items.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - * @return Whether the cryptoKey field is set. - */ - boolean hasCryptoKey(); - /** - *
-   * Causes the shift to be computed based on this key and the context. This
-   * results in the same shift for the same context and crypto_key. If
-   * set, must also set context. Can only be applied to table items.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - * @return The cryptoKey. - */ - com.google.privacy.dlp.v2.CryptoKey getCryptoKey(); - /** - *
-   * Causes the shift to be computed based on this key and the context. This
-   * results in the same shift for the same context and crypto_key. If
-   * set, must also set context. Can only be applied to table items.
-   * 
- * - * .google.privacy.dlp.v2.CryptoKey crypto_key = 4; - */ - com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder(); - - public com.google.privacy.dlp.v2.DateShiftConfig.MethodCase getMethodCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTime.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTime.java deleted file mode 100644 index 672116d33714..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTime.java +++ /dev/null @@ -1,1798 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Message for a date time object.
- * e.g. 2018-01-01, 5th August.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DateTime} - */ -public final class DateTime extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DateTime) - DateTimeOrBuilder { -private static final long serialVersionUID = 0L; - // Use DateTime.newBuilder() to construct. - private DateTime(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DateTime() { - dayOfWeek_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DateTime(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DateTime( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.Date.Builder subBuilder = null; - if (date_ != null) { - subBuilder = date_.toBuilder(); - } - date_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(date_); - date_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - int rawValue = input.readEnum(); - - dayOfWeek_ = rawValue; - break; - } - case 26: { - com.google.type.TimeOfDay.Builder subBuilder = null; - if (time_ != null) { - subBuilder = time_.toBuilder(); - } - time_ = input.readMessage(com.google.type.TimeOfDay.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(time_); - time_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.privacy.dlp.v2.DateTime.TimeZone.Builder subBuilder = null; - if (timeZone_ != null) { - subBuilder = timeZone_.toBuilder(); - } - timeZone_ = input.readMessage(com.google.privacy.dlp.v2.DateTime.TimeZone.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timeZone_); - timeZone_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DateTime.class, com.google.privacy.dlp.v2.DateTime.Builder.class); - } - - public interface TimeZoneOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DateTime.TimeZone) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Set only if the offset can be determined. Positive for time ahead of UTC.
-     * E.g. For "UTC-9", this value is -540.
-     * 
- * - * int32 offset_minutes = 1; - * @return The offsetMinutes. - */ - int getOffsetMinutes(); - } - /** - *
-   * Time zone of the date time object.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DateTime.TimeZone} - */ - public static final class TimeZone extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DateTime.TimeZone) - TimeZoneOrBuilder { - private static final long serialVersionUID = 0L; - // Use TimeZone.newBuilder() to construct. - private TimeZone(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TimeZone() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TimeZone(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TimeZone( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - offsetMinutes_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DateTime.TimeZone.class, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder.class); - } - - public static final int OFFSET_MINUTES_FIELD_NUMBER = 1; - private int offsetMinutes_; - /** - *
-     * Set only if the offset can be determined. Positive for time ahead of UTC.
-     * E.g. For "UTC-9", this value is -540.
-     * 
- * - * int32 offset_minutes = 1; - * @return The offsetMinutes. - */ - @java.lang.Override - public int getOffsetMinutes() { - return offsetMinutes_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (offsetMinutes_ != 0) { - output.writeInt32(1, offsetMinutes_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (offsetMinutes_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, offsetMinutes_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DateTime.TimeZone)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DateTime.TimeZone other = (com.google.privacy.dlp.v2.DateTime.TimeZone) obj; - - if (getOffsetMinutes() - != other.getOffsetMinutes()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + OFFSET_MINUTES_FIELD_NUMBER; - hash = (53 * hash) + getOffsetMinutes(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DateTime.TimeZone parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DateTime.TimeZone prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Time zone of the date time object.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DateTime.TimeZone} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DateTime.TimeZone) - com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DateTime.TimeZone.class, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DateTime.TimeZone.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - offsetMinutes_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime.TimeZone getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime.TimeZone build() { - com.google.privacy.dlp.v2.DateTime.TimeZone result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime.TimeZone buildPartial() { - com.google.privacy.dlp.v2.DateTime.TimeZone result = new com.google.privacy.dlp.v2.DateTime.TimeZone(this); - result.offsetMinutes_ = offsetMinutes_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DateTime.TimeZone) { - return mergeFrom((com.google.privacy.dlp.v2.DateTime.TimeZone)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DateTime.TimeZone other) { - if (other == com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance()) return this; - if (other.getOffsetMinutes() != 0) { - setOffsetMinutes(other.getOffsetMinutes()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DateTime.TimeZone parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DateTime.TimeZone) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int offsetMinutes_ ; - /** - *
-       * Set only if the offset can be determined. Positive for time ahead of UTC.
-       * E.g. For "UTC-9", this value is -540.
-       * 
- * - * int32 offset_minutes = 1; - * @return The offsetMinutes. - */ - @java.lang.Override - public int getOffsetMinutes() { - return offsetMinutes_; - } - /** - *
-       * Set only if the offset can be determined. Positive for time ahead of UTC.
-       * E.g. For "UTC-9", this value is -540.
-       * 
- * - * int32 offset_minutes = 1; - * @param value The offsetMinutes to set. - * @return This builder for chaining. - */ - public Builder setOffsetMinutes(int value) { - - offsetMinutes_ = value; - onChanged(); - return this; - } - /** - *
-       * Set only if the offset can be determined. Positive for time ahead of UTC.
-       * E.g. For "UTC-9", this value is -540.
-       * 
- * - * int32 offset_minutes = 1; - * @return This builder for chaining. - */ - public Builder clearOffsetMinutes() { - - offsetMinutes_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DateTime.TimeZone) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DateTime.TimeZone) - private static final com.google.privacy.dlp.v2.DateTime.TimeZone DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DateTime.TimeZone(); - } - - public static com.google.privacy.dlp.v2.DateTime.TimeZone getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimeZone parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeZone(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime.TimeZone getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int DATE_FIELD_NUMBER = 1; - private com.google.type.Date date_; - /** - *
-   * One or more of the following must be set.
-   * Must be a valid date or time value.
-   * 
- * - * .google.type.Date date = 1; - * @return Whether the date field is set. - */ - @java.lang.Override - public boolean hasDate() { - return date_ != null; - } - /** - *
-   * One or more of the following must be set.
-   * Must be a valid date or time value.
-   * 
- * - * .google.type.Date date = 1; - * @return The date. - */ - @java.lang.Override - public com.google.type.Date getDate() { - return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; - } - /** - *
-   * One or more of the following must be set.
-   * Must be a valid date or time value.
-   * 
- * - * .google.type.Date date = 1; - */ - @java.lang.Override - public com.google.type.DateOrBuilder getDateOrBuilder() { - return getDate(); - } - - public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; - private int dayOfWeek_; - /** - *
-   * Day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * @return The enum numeric value on the wire for dayOfWeek. - */ - @java.lang.Override public int getDayOfWeekValue() { - return dayOfWeek_; - } - /** - *
-   * Day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * @return The dayOfWeek. - */ - @java.lang.Override public com.google.type.DayOfWeek getDayOfWeek() { - @SuppressWarnings("deprecation") - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf(dayOfWeek_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - - public static final int TIME_FIELD_NUMBER = 3; - private com.google.type.TimeOfDay time_; - /** - *
-   * Time of day
-   * 
- * - * .google.type.TimeOfDay time = 3; - * @return Whether the time field is set. - */ - @java.lang.Override - public boolean hasTime() { - return time_ != null; - } - /** - *
-   * Time of day
-   * 
- * - * .google.type.TimeOfDay time = 3; - * @return The time. - */ - @java.lang.Override - public com.google.type.TimeOfDay getTime() { - return time_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : time_; - } - /** - *
-   * Time of day
-   * 
- * - * .google.type.TimeOfDay time = 3; - */ - @java.lang.Override - public com.google.type.TimeOfDayOrBuilder getTimeOrBuilder() { - return getTime(); - } - - public static final int TIME_ZONE_FIELD_NUMBER = 4; - private com.google.privacy.dlp.v2.DateTime.TimeZone timeZone_; - /** - *
-   * Time zone
-   * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - * @return Whether the timeZone field is set. - */ - @java.lang.Override - public boolean hasTimeZone() { - return timeZone_ != null; - } - /** - *
-   * Time zone
-   * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - * @return The timeZone. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime.TimeZone getTimeZone() { - return timeZone_ == null ? com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance() : timeZone_; - } - /** - *
-   * Time zone
-   * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder getTimeZoneOrBuilder() { - return getTimeZone(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (date_ != null) { - output.writeMessage(1, getDate()); - } - if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { - output.writeEnum(2, dayOfWeek_); - } - if (time_ != null) { - output.writeMessage(3, getTime()); - } - if (timeZone_ != null) { - output.writeMessage(4, getTimeZone()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (date_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDate()); - } - if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, dayOfWeek_); - } - if (time_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTime()); - } - if (timeZone_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getTimeZone()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DateTime)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DateTime other = (com.google.privacy.dlp.v2.DateTime) obj; - - if (hasDate() != other.hasDate()) return false; - if (hasDate()) { - if (!getDate() - .equals(other.getDate())) return false; - } - if (dayOfWeek_ != other.dayOfWeek_) return false; - if (hasTime() != other.hasTime()) return false; - if (hasTime()) { - if (!getTime() - .equals(other.getTime())) return false; - } - if (hasTimeZone() != other.hasTimeZone()) return false; - if (hasTimeZone()) { - if (!getTimeZone() - .equals(other.getTimeZone())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDate()) { - hash = (37 * hash) + DATE_FIELD_NUMBER; - hash = (53 * hash) + getDate().hashCode(); - } - hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; - hash = (53 * hash) + dayOfWeek_; - if (hasTime()) { - hash = (37 * hash) + TIME_FIELD_NUMBER; - hash = (53 * hash) + getTime().hashCode(); - } - if (hasTimeZone()) { - hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; - hash = (53 * hash) + getTimeZone().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DateTime parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DateTime parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DateTime parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DateTime parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DateTime parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DateTime parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DateTime parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DateTime parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DateTime prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Message for a date time object.
-   * e.g. 2018-01-01, 5th August.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DateTime} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DateTime) - com.google.privacy.dlp.v2.DateTimeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DateTime.class, com.google.privacy.dlp.v2.DateTime.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DateTime.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (dateBuilder_ == null) { - date_ = null; - } else { - date_ = null; - dateBuilder_ = null; - } - dayOfWeek_ = 0; - - if (timeBuilder_ == null) { - time_ = null; - } else { - time_ = null; - timeBuilder_ = null; - } - if (timeZoneBuilder_ == null) { - timeZone_ = null; - } else { - timeZone_ = null; - timeZoneBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DateTime_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime build() { - com.google.privacy.dlp.v2.DateTime result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime buildPartial() { - com.google.privacy.dlp.v2.DateTime result = new com.google.privacy.dlp.v2.DateTime(this); - if (dateBuilder_ == null) { - result.date_ = date_; - } else { - result.date_ = dateBuilder_.build(); - } - result.dayOfWeek_ = dayOfWeek_; - if (timeBuilder_ == null) { - result.time_ = time_; - } else { - result.time_ = timeBuilder_.build(); - } - if (timeZoneBuilder_ == null) { - result.timeZone_ = timeZone_; - } else { - result.timeZone_ = timeZoneBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DateTime) { - return mergeFrom((com.google.privacy.dlp.v2.DateTime)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DateTime other) { - if (other == com.google.privacy.dlp.v2.DateTime.getDefaultInstance()) return this; - if (other.hasDate()) { - mergeDate(other.getDate()); - } - if (other.dayOfWeek_ != 0) { - setDayOfWeekValue(other.getDayOfWeekValue()); - } - if (other.hasTime()) { - mergeTime(other.getTime()); - } - if (other.hasTimeZone()) { - mergeTimeZone(other.getTimeZone()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DateTime parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DateTime) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.type.Date date_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> dateBuilder_; - /** - *
-     * One or more of the following must be set.
-     * Must be a valid date or time value.
-     * 
- * - * .google.type.Date date = 1; - * @return Whether the date field is set. - */ - public boolean hasDate() { - return dateBuilder_ != null || date_ != null; - } - /** - *
-     * One or more of the following must be set.
-     * Must be a valid date or time value.
-     * 
- * - * .google.type.Date date = 1; - * @return The date. - */ - public com.google.type.Date getDate() { - if (dateBuilder_ == null) { - return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; - } else { - return dateBuilder_.getMessage(); - } - } - /** - *
-     * One or more of the following must be set.
-     * Must be a valid date or time value.
-     * 
- * - * .google.type.Date date = 1; - */ - public Builder setDate(com.google.type.Date value) { - if (dateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - date_ = value; - onChanged(); - } else { - dateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * One or more of the following must be set.
-     * Must be a valid date or time value.
-     * 
- * - * .google.type.Date date = 1; - */ - public Builder setDate( - com.google.type.Date.Builder builderForValue) { - if (dateBuilder_ == null) { - date_ = builderForValue.build(); - onChanged(); - } else { - dateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * One or more of the following must be set.
-     * Must be a valid date or time value.
-     * 
- * - * .google.type.Date date = 1; - */ - public Builder mergeDate(com.google.type.Date value) { - if (dateBuilder_ == null) { - if (date_ != null) { - date_ = - com.google.type.Date.newBuilder(date_).mergeFrom(value).buildPartial(); - } else { - date_ = value; - } - onChanged(); - } else { - dateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * One or more of the following must be set.
-     * Must be a valid date or time value.
-     * 
- * - * .google.type.Date date = 1; - */ - public Builder clearDate() { - if (dateBuilder_ == null) { - date_ = null; - onChanged(); - } else { - date_ = null; - dateBuilder_ = null; - } - - return this; - } - /** - *
-     * One or more of the following must be set.
-     * Must be a valid date or time value.
-     * 
- * - * .google.type.Date date = 1; - */ - public com.google.type.Date.Builder getDateBuilder() { - - onChanged(); - return getDateFieldBuilder().getBuilder(); - } - /** - *
-     * One or more of the following must be set.
-     * Must be a valid date or time value.
-     * 
- * - * .google.type.Date date = 1; - */ - public com.google.type.DateOrBuilder getDateOrBuilder() { - if (dateBuilder_ != null) { - return dateBuilder_.getMessageOrBuilder(); - } else { - return date_ == null ? - com.google.type.Date.getDefaultInstance() : date_; - } - } - /** - *
-     * One or more of the following must be set.
-     * Must be a valid date or time value.
-     * 
- * - * .google.type.Date date = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - getDateFieldBuilder() { - if (dateBuilder_ == null) { - dateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( - getDate(), - getParentForChildren(), - isClean()); - date_ = null; - } - return dateBuilder_; - } - - private int dayOfWeek_ = 0; - /** - *
-     * Day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * @return The enum numeric value on the wire for dayOfWeek. - */ - @java.lang.Override public int getDayOfWeekValue() { - return dayOfWeek_; - } - /** - *
-     * Day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * @param value The enum numeric value on the wire for dayOfWeek to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeekValue(int value) { - - dayOfWeek_ = value; - onChanged(); - return this; - } - /** - *
-     * Day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * @return The dayOfWeek. - */ - @java.lang.Override - public com.google.type.DayOfWeek getDayOfWeek() { - @SuppressWarnings("deprecation") - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf(dayOfWeek_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - /** - *
-     * Day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * @param value The dayOfWeek to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeek(com.google.type.DayOfWeek value) { - if (value == null) { - throw new NullPointerException(); - } - - dayOfWeek_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * @return This builder for chaining. - */ - public Builder clearDayOfWeek() { - - dayOfWeek_ = 0; - onChanged(); - return this; - } - - private com.google.type.TimeOfDay time_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> timeBuilder_; - /** - *
-     * Time of day
-     * 
- * - * .google.type.TimeOfDay time = 3; - * @return Whether the time field is set. - */ - public boolean hasTime() { - return timeBuilder_ != null || time_ != null; - } - /** - *
-     * Time of day
-     * 
- * - * .google.type.TimeOfDay time = 3; - * @return The time. - */ - public com.google.type.TimeOfDay getTime() { - if (timeBuilder_ == null) { - return time_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : time_; - } else { - return timeBuilder_.getMessage(); - } - } - /** - *
-     * Time of day
-     * 
- * - * .google.type.TimeOfDay time = 3; - */ - public Builder setTime(com.google.type.TimeOfDay value) { - if (timeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - time_ = value; - onChanged(); - } else { - timeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time of day
-     * 
- * - * .google.type.TimeOfDay time = 3; - */ - public Builder setTime( - com.google.type.TimeOfDay.Builder builderForValue) { - if (timeBuilder_ == null) { - time_ = builderForValue.build(); - onChanged(); - } else { - timeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time of day
-     * 
- * - * .google.type.TimeOfDay time = 3; - */ - public Builder mergeTime(com.google.type.TimeOfDay value) { - if (timeBuilder_ == null) { - if (time_ != null) { - time_ = - com.google.type.TimeOfDay.newBuilder(time_).mergeFrom(value).buildPartial(); - } else { - time_ = value; - } - onChanged(); - } else { - timeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time of day
-     * 
- * - * .google.type.TimeOfDay time = 3; - */ - public Builder clearTime() { - if (timeBuilder_ == null) { - time_ = null; - onChanged(); - } else { - time_ = null; - timeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time of day
-     * 
- * - * .google.type.TimeOfDay time = 3; - */ - public com.google.type.TimeOfDay.Builder getTimeBuilder() { - - onChanged(); - return getTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time of day
-     * 
- * - * .google.type.TimeOfDay time = 3; - */ - public com.google.type.TimeOfDayOrBuilder getTimeOrBuilder() { - if (timeBuilder_ != null) { - return timeBuilder_.getMessageOrBuilder(); - } else { - return time_ == null ? - com.google.type.TimeOfDay.getDefaultInstance() : time_; - } - } - /** - *
-     * Time of day
-     * 
- * - * .google.type.TimeOfDay time = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> - getTimeFieldBuilder() { - if (timeBuilder_ == null) { - timeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder>( - getTime(), - getParentForChildren(), - isClean()); - time_ = null; - } - return timeBuilder_; - } - - private com.google.privacy.dlp.v2.DateTime.TimeZone timeZone_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DateTime.TimeZone, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder, com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder> timeZoneBuilder_; - /** - *
-     * Time zone
-     * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - * @return Whether the timeZone field is set. - */ - public boolean hasTimeZone() { - return timeZoneBuilder_ != null || timeZone_ != null; - } - /** - *
-     * Time zone
-     * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - * @return The timeZone. - */ - public com.google.privacy.dlp.v2.DateTime.TimeZone getTimeZone() { - if (timeZoneBuilder_ == null) { - return timeZone_ == null ? com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance() : timeZone_; - } else { - return timeZoneBuilder_.getMessage(); - } - } - /** - *
-     * Time zone
-     * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - */ - public Builder setTimeZone(com.google.privacy.dlp.v2.DateTime.TimeZone value) { - if (timeZoneBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timeZone_ = value; - onChanged(); - } else { - timeZoneBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time zone
-     * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - */ - public Builder setTimeZone( - com.google.privacy.dlp.v2.DateTime.TimeZone.Builder builderForValue) { - if (timeZoneBuilder_ == null) { - timeZone_ = builderForValue.build(); - onChanged(); - } else { - timeZoneBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time zone
-     * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - */ - public Builder mergeTimeZone(com.google.privacy.dlp.v2.DateTime.TimeZone value) { - if (timeZoneBuilder_ == null) { - if (timeZone_ != null) { - timeZone_ = - com.google.privacy.dlp.v2.DateTime.TimeZone.newBuilder(timeZone_).mergeFrom(value).buildPartial(); - } else { - timeZone_ = value; - } - onChanged(); - } else { - timeZoneBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time zone
-     * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - */ - public Builder clearTimeZone() { - if (timeZoneBuilder_ == null) { - timeZone_ = null; - onChanged(); - } else { - timeZone_ = null; - timeZoneBuilder_ = null; - } - - return this; - } - /** - *
-     * Time zone
-     * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - */ - public com.google.privacy.dlp.v2.DateTime.TimeZone.Builder getTimeZoneBuilder() { - - onChanged(); - return getTimeZoneFieldBuilder().getBuilder(); - } - /** - *
-     * Time zone
-     * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - */ - public com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder getTimeZoneOrBuilder() { - if (timeZoneBuilder_ != null) { - return timeZoneBuilder_.getMessageOrBuilder(); - } else { - return timeZone_ == null ? - com.google.privacy.dlp.v2.DateTime.TimeZone.getDefaultInstance() : timeZone_; - } - } - /** - *
-     * Time zone
-     * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DateTime.TimeZone, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder, com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder> - getTimeZoneFieldBuilder() { - if (timeZoneBuilder_ == null) { - timeZoneBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DateTime.TimeZone, com.google.privacy.dlp.v2.DateTime.TimeZone.Builder, com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder>( - getTimeZone(), - getParentForChildren(), - isClean()); - timeZone_ = null; - } - return timeZoneBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DateTime) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DateTime) - private static final com.google.privacy.dlp.v2.DateTime DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DateTime(); - } - - public static com.google.privacy.dlp.v2.DateTime getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DateTime parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DateTime(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTimeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTimeOrBuilder.java deleted file mode 100644 index b13feff22907..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateTimeOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DateTimeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DateTime) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * One or more of the following must be set.
-   * Must be a valid date or time value.
-   * 
- * - * .google.type.Date date = 1; - * @return Whether the date field is set. - */ - boolean hasDate(); - /** - *
-   * One or more of the following must be set.
-   * Must be a valid date or time value.
-   * 
- * - * .google.type.Date date = 1; - * @return The date. - */ - com.google.type.Date getDate(); - /** - *
-   * One or more of the following must be set.
-   * Must be a valid date or time value.
-   * 
- * - * .google.type.Date date = 1; - */ - com.google.type.DateOrBuilder getDateOrBuilder(); - - /** - *
-   * Day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * @return The enum numeric value on the wire for dayOfWeek. - */ - int getDayOfWeekValue(); - /** - *
-   * Day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week = 2; - * @return The dayOfWeek. - */ - com.google.type.DayOfWeek getDayOfWeek(); - - /** - *
-   * Time of day
-   * 
- * - * .google.type.TimeOfDay time = 3; - * @return Whether the time field is set. - */ - boolean hasTime(); - /** - *
-   * Time of day
-   * 
- * - * .google.type.TimeOfDay time = 3; - * @return The time. - */ - com.google.type.TimeOfDay getTime(); - /** - *
-   * Time of day
-   * 
- * - * .google.type.TimeOfDay time = 3; - */ - com.google.type.TimeOfDayOrBuilder getTimeOrBuilder(); - - /** - *
-   * Time zone
-   * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - * @return Whether the timeZone field is set. - */ - boolean hasTimeZone(); - /** - *
-   * Time zone
-   * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - * @return The timeZone. - */ - com.google.privacy.dlp.v2.DateTime.TimeZone getTimeZone(); - /** - *
-   * Time zone
-   * 
- * - * .google.privacy.dlp.v2.DateTime.TimeZone time_zone = 4; - */ - com.google.privacy.dlp.v2.DateTime.TimeZoneOrBuilder getTimeZoneOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java deleted file mode 100644 index 1592a12f2679..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfig.java +++ /dev/null @@ -1,1571 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The configuration that controls how the data will change.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeidentifyConfig} - */ -public final class DeidentifyConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyConfig) - DeidentifyConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeidentifyConfig.newBuilder() to construct. - private DeidentifyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeidentifyConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeidentifyConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeidentifyConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InfoTypeTransformations.Builder subBuilder = null; - if (transformationCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.InfoTypeTransformations.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.RecordTransformations.Builder subBuilder = null; - if (transformationCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.RecordTransformations) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.RecordTransformations.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.RecordTransformations) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.TransformationErrorHandling.Builder subBuilder = null; - if (transformationErrorHandling_ != null) { - subBuilder = transformationErrorHandling_.toBuilder(); - } - transformationErrorHandling_ = input.readMessage(com.google.privacy.dlp.v2.TransformationErrorHandling.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(transformationErrorHandling_); - transformationErrorHandling_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.privacy.dlp.v2.ImageTransformations.Builder subBuilder = null; - if (transformationCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.ImageTransformations) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.ImageTransformations.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ImageTransformations) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 4; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeidentifyConfig.class, com.google.privacy.dlp.v2.DeidentifyConfig.Builder.class); - } - - private int transformationCase_ = 0; - private java.lang.Object transformation_; - public enum TransformationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INFO_TYPE_TRANSFORMATIONS(1), - RECORD_TRANSFORMATIONS(2), - IMAGE_TRANSFORMATIONS(4), - TRANSFORMATION_NOT_SET(0); - private final int value; - private TransformationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TransformationCase valueOf(int value) { - return forNumber(value); - } - - public static TransformationCase forNumber(int value) { - switch (value) { - case 1: return INFO_TYPE_TRANSFORMATIONS; - case 2: return RECORD_TRANSFORMATIONS; - case 4: return IMAGE_TRANSFORMATIONS; - case 0: return TRANSFORMATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TransformationCase - getTransformationCase() { - return TransformationCase.forNumber( - transformationCase_); - } - - public static final int INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER = 1; - /** - *
-   * Treat the dataset as free-form text and apply the same free text
-   * transformation everywhere.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - * @return Whether the infoTypeTransformations field is set. - */ - @java.lang.Override - public boolean hasInfoTypeTransformations() { - return transformationCase_ == 1; - } - /** - *
-   * Treat the dataset as free-form text and apply the same free text
-   * transformation everywhere.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - * @return The infoTypeTransformations. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() { - if (transformationCase_ == 1) { - return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - /** - *
-   * Treat the dataset as free-form text and apply the same free text
-   * transformation everywhere.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder() { - if (transformationCase_ == 1) { - return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - - public static final int RECORD_TRANSFORMATIONS_FIELD_NUMBER = 2; - /** - *
-   * Treat the dataset as structured. Transformations can be applied to
-   * specific locations within structured datasets, such as transforming
-   * a column within a table.
-   * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - * @return Whether the recordTransformations field is set. - */ - @java.lang.Override - public boolean hasRecordTransformations() { - return transformationCase_ == 2; - } - /** - *
-   * Treat the dataset as structured. Transformations can be applied to
-   * specific locations within structured datasets, such as transforming
-   * a column within a table.
-   * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - * @return The recordTransformations. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformations getRecordTransformations() { - if (transformationCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordTransformations) transformation_; - } - return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); - } - /** - *
-   * Treat the dataset as structured. Transformations can be applied to
-   * specific locations within structured datasets, such as transforming
-   * a column within a table.
-   * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformationsOrBuilder getRecordTransformationsOrBuilder() { - if (transformationCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordTransformations) transformation_; - } - return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); - } - - public static final int IMAGE_TRANSFORMATIONS_FIELD_NUMBER = 4; - /** - *
-   * Treat the dataset as an image and redact.
-   * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - * @return Whether the imageTransformations field is set. - */ - @java.lang.Override - public boolean hasImageTransformations() { - return transformationCase_ == 4; - } - /** - *
-   * Treat the dataset as an image and redact.
-   * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - * @return The imageTransformations. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations getImageTransformations() { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; - } - return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); - } - /** - *
-   * Treat the dataset as an image and redact.
-   * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformationsOrBuilder getImageTransformationsOrBuilder() { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; - } - return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); - } - - public static final int TRANSFORMATION_ERROR_HANDLING_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.TransformationErrorHandling transformationErrorHandling_; - /** - *
-   * Mode for handling transformation errors. If left unspecified, the default
-   * mode is `TransformationErrorHandling.ThrowError`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - * @return Whether the transformationErrorHandling field is set. - */ - @java.lang.Override - public boolean hasTransformationErrorHandling() { - return transformationErrorHandling_ != null; - } - /** - *
-   * Mode for handling transformation errors. If left unspecified, the default
-   * mode is `TransformationErrorHandling.ThrowError`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - * @return The transformationErrorHandling. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling getTransformationErrorHandling() { - return transformationErrorHandling_ == null ? com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance() : transformationErrorHandling_; - } - /** - *
-   * Mode for handling transformation errors. If left unspecified, the default
-   * mode is `TransformationErrorHandling.ThrowError`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder getTransformationErrorHandlingOrBuilder() { - return getTransformationErrorHandling(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (transformationCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); - } - if (transformationCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.RecordTransformations) transformation_); - } - if (transformationErrorHandling_ != null) { - output.writeMessage(3, getTransformationErrorHandling()); - } - if (transformationCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.ImageTransformations) transformation_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (transformationCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); - } - if (transformationCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.RecordTransformations) transformation_); - } - if (transformationErrorHandling_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTransformationErrorHandling()); - } - if (transformationCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.ImageTransformations) transformation_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DeidentifyConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DeidentifyConfig other = (com.google.privacy.dlp.v2.DeidentifyConfig) obj; - - if (hasTransformationErrorHandling() != other.hasTransformationErrorHandling()) return false; - if (hasTransformationErrorHandling()) { - if (!getTransformationErrorHandling() - .equals(other.getTransformationErrorHandling())) return false; - } - if (!getTransformationCase().equals(other.getTransformationCase())) return false; - switch (transformationCase_) { - case 1: - if (!getInfoTypeTransformations() - .equals(other.getInfoTypeTransformations())) return false; - break; - case 2: - if (!getRecordTransformations() - .equals(other.getRecordTransformations())) return false; - break; - case 4: - if (!getImageTransformations() - .equals(other.getImageTransformations())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTransformationErrorHandling()) { - hash = (37 * hash) + TRANSFORMATION_ERROR_HANDLING_FIELD_NUMBER; - hash = (53 * hash) + getTransformationErrorHandling().hashCode(); - } - switch (transformationCase_) { - case 1: - hash = (37 * hash) + INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER; - hash = (53 * hash) + getInfoTypeTransformations().hashCode(); - break; - case 2: - hash = (37 * hash) + RECORD_TRANSFORMATIONS_FIELD_NUMBER; - hash = (53 * hash) + getRecordTransformations().hashCode(); - break; - case 4: - hash = (37 * hash) + IMAGE_TRANSFORMATIONS_FIELD_NUMBER; - hash = (53 * hash) + getImageTransformations().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The configuration that controls how the data will change.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeidentifyConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyConfig) - com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeidentifyConfig.class, com.google.privacy.dlp.v2.DeidentifyConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DeidentifyConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (transformationErrorHandlingBuilder_ == null) { - transformationErrorHandling_ = null; - } else { - transformationErrorHandling_ = null; - transformationErrorHandlingBuilder_ = null; - } - transformationCase_ = 0; - transformation_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfig build() { - com.google.privacy.dlp.v2.DeidentifyConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfig buildPartial() { - com.google.privacy.dlp.v2.DeidentifyConfig result = new com.google.privacy.dlp.v2.DeidentifyConfig(this); - if (transformationCase_ == 1) { - if (infoTypeTransformationsBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = infoTypeTransformationsBuilder_.build(); - } - } - if (transformationCase_ == 2) { - if (recordTransformationsBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = recordTransformationsBuilder_.build(); - } - } - if (transformationCase_ == 4) { - if (imageTransformationsBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = imageTransformationsBuilder_.build(); - } - } - if (transformationErrorHandlingBuilder_ == null) { - result.transformationErrorHandling_ = transformationErrorHandling_; - } else { - result.transformationErrorHandling_ = transformationErrorHandlingBuilder_.build(); - } - result.transformationCase_ = transformationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DeidentifyConfig) { - return mergeFrom((com.google.privacy.dlp.v2.DeidentifyConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyConfig other) { - if (other == com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance()) return this; - if (other.hasTransformationErrorHandling()) { - mergeTransformationErrorHandling(other.getTransformationErrorHandling()); - } - switch (other.getTransformationCase()) { - case INFO_TYPE_TRANSFORMATIONS: { - mergeInfoTypeTransformations(other.getInfoTypeTransformations()); - break; - } - case RECORD_TRANSFORMATIONS: { - mergeRecordTransformations(other.getRecordTransformations()); - break; - } - case IMAGE_TRANSFORMATIONS: { - mergeImageTransformations(other.getImageTransformations()); - break; - } - case TRANSFORMATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DeidentifyConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DeidentifyConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int transformationCase_ = 0; - private java.lang.Object transformation_; - public TransformationCase - getTransformationCase() { - return TransformationCase.forNumber( - transformationCase_); - } - - public Builder clearTransformation() { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder> infoTypeTransformationsBuilder_; - /** - *
-     * Treat the dataset as free-form text and apply the same free text
-     * transformation everywhere.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - * @return Whether the infoTypeTransformations field is set. - */ - @java.lang.Override - public boolean hasInfoTypeTransformations() { - return transformationCase_ == 1; - } - /** - *
-     * Treat the dataset as free-form text and apply the same free text
-     * transformation everywhere.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - * @return The infoTypeTransformations. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() { - if (infoTypeTransformationsBuilder_ == null) { - if (transformationCase_ == 1) { - return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } else { - if (transformationCase_ == 1) { - return infoTypeTransformationsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - } - /** - *
-     * Treat the dataset as free-form text and apply the same free text
-     * transformation everywhere.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - */ - public Builder setInfoTypeTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations value) { - if (infoTypeTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - infoTypeTransformationsBuilder_.setMessage(value); - } - transformationCase_ = 1; - return this; - } - /** - *
-     * Treat the dataset as free-form text and apply the same free text
-     * transformation everywhere.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - */ - public Builder setInfoTypeTransformations( - com.google.privacy.dlp.v2.InfoTypeTransformations.Builder builderForValue) { - if (infoTypeTransformationsBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - infoTypeTransformationsBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 1; - return this; - } - /** - *
-     * Treat the dataset as free-form text and apply the same free text
-     * transformation everywhere.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - */ - public Builder mergeInfoTypeTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations value) { - if (infoTypeTransformationsBuilder_ == null) { - if (transformationCase_ == 1 && - transformation_ != com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.InfoTypeTransformations.newBuilder((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 1) { - infoTypeTransformationsBuilder_.mergeFrom(value); - } else { - infoTypeTransformationsBuilder_.setMessage(value); - } - } - transformationCase_ = 1; - return this; - } - /** - *
-     * Treat the dataset as free-form text and apply the same free text
-     * transformation everywhere.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - */ - public Builder clearInfoTypeTransformations() { - if (infoTypeTransformationsBuilder_ == null) { - if (transformationCase_ == 1) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 1) { - transformationCase_ = 0; - transformation_ = null; - } - infoTypeTransformationsBuilder_.clear(); - } - return this; - } - /** - *
-     * Treat the dataset as free-form text and apply the same free text
-     * transformation everywhere.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeTransformations.Builder getInfoTypeTransformationsBuilder() { - return getInfoTypeTransformationsFieldBuilder().getBuilder(); - } - /** - *
-     * Treat the dataset as free-form text and apply the same free text
-     * transformation everywhere.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder() { - if ((transformationCase_ == 1) && (infoTypeTransformationsBuilder_ != null)) { - return infoTypeTransformationsBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 1) { - return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - } - /** - *
-     * Treat the dataset as free-form text and apply the same free text
-     * transformation everywhere.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder> - getInfoTypeTransformationsFieldBuilder() { - if (infoTypeTransformationsBuilder_ == null) { - if (!(transformationCase_ == 1)) { - transformation_ = com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - infoTypeTransformationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder>( - (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 1; - onChanged();; - return infoTypeTransformationsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordTransformations, com.google.privacy.dlp.v2.RecordTransformations.Builder, com.google.privacy.dlp.v2.RecordTransformationsOrBuilder> recordTransformationsBuilder_; - /** - *
-     * Treat the dataset as structured. Transformations can be applied to
-     * specific locations within structured datasets, such as transforming
-     * a column within a table.
-     * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - * @return Whether the recordTransformations field is set. - */ - @java.lang.Override - public boolean hasRecordTransformations() { - return transformationCase_ == 2; - } - /** - *
-     * Treat the dataset as structured. Transformations can be applied to
-     * specific locations within structured datasets, such as transforming
-     * a column within a table.
-     * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - * @return The recordTransformations. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformations getRecordTransformations() { - if (recordTransformationsBuilder_ == null) { - if (transformationCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordTransformations) transformation_; - } - return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); - } else { - if (transformationCase_ == 2) { - return recordTransformationsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); - } - } - /** - *
-     * Treat the dataset as structured. Transformations can be applied to
-     * specific locations within structured datasets, such as transforming
-     * a column within a table.
-     * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - */ - public Builder setRecordTransformations(com.google.privacy.dlp.v2.RecordTransformations value) { - if (recordTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - recordTransformationsBuilder_.setMessage(value); - } - transformationCase_ = 2; - return this; - } - /** - *
-     * Treat the dataset as structured. Transformations can be applied to
-     * specific locations within structured datasets, such as transforming
-     * a column within a table.
-     * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - */ - public Builder setRecordTransformations( - com.google.privacy.dlp.v2.RecordTransformations.Builder builderForValue) { - if (recordTransformationsBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - recordTransformationsBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 2; - return this; - } - /** - *
-     * Treat the dataset as structured. Transformations can be applied to
-     * specific locations within structured datasets, such as transforming
-     * a column within a table.
-     * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - */ - public Builder mergeRecordTransformations(com.google.privacy.dlp.v2.RecordTransformations value) { - if (recordTransformationsBuilder_ == null) { - if (transformationCase_ == 2 && - transformation_ != com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.RecordTransformations.newBuilder((com.google.privacy.dlp.v2.RecordTransformations) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 2) { - recordTransformationsBuilder_.mergeFrom(value); - } else { - recordTransformationsBuilder_.setMessage(value); - } - } - transformationCase_ = 2; - return this; - } - /** - *
-     * Treat the dataset as structured. Transformations can be applied to
-     * specific locations within structured datasets, such as transforming
-     * a column within a table.
-     * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - */ - public Builder clearRecordTransformations() { - if (recordTransformationsBuilder_ == null) { - if (transformationCase_ == 2) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 2) { - transformationCase_ = 0; - transformation_ = null; - } - recordTransformationsBuilder_.clear(); - } - return this; - } - /** - *
-     * Treat the dataset as structured. Transformations can be applied to
-     * specific locations within structured datasets, such as transforming
-     * a column within a table.
-     * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - */ - public com.google.privacy.dlp.v2.RecordTransformations.Builder getRecordTransformationsBuilder() { - return getRecordTransformationsFieldBuilder().getBuilder(); - } - /** - *
-     * Treat the dataset as structured. Transformations can be applied to
-     * specific locations within structured datasets, such as transforming
-     * a column within a table.
-     * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformationsOrBuilder getRecordTransformationsOrBuilder() { - if ((transformationCase_ == 2) && (recordTransformationsBuilder_ != null)) { - return recordTransformationsBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 2) { - return (com.google.privacy.dlp.v2.RecordTransformations) transformation_; - } - return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); - } - } - /** - *
-     * Treat the dataset as structured. Transformations can be applied to
-     * specific locations within structured datasets, such as transforming
-     * a column within a table.
-     * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordTransformations, com.google.privacy.dlp.v2.RecordTransformations.Builder, com.google.privacy.dlp.v2.RecordTransformationsOrBuilder> - getRecordTransformationsFieldBuilder() { - if (recordTransformationsBuilder_ == null) { - if (!(transformationCase_ == 2)) { - transformation_ = com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); - } - recordTransformationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordTransformations, com.google.privacy.dlp.v2.RecordTransformations.Builder, com.google.privacy.dlp.v2.RecordTransformationsOrBuilder>( - (com.google.privacy.dlp.v2.RecordTransformations) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 2; - onChanged();; - return recordTransformationsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations, com.google.privacy.dlp.v2.ImageTransformations.Builder, com.google.privacy.dlp.v2.ImageTransformationsOrBuilder> imageTransformationsBuilder_; - /** - *
-     * Treat the dataset as an image and redact.
-     * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - * @return Whether the imageTransformations field is set. - */ - @java.lang.Override - public boolean hasImageTransformations() { - return transformationCase_ == 4; - } - /** - *
-     * Treat the dataset as an image and redact.
-     * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - * @return The imageTransformations. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformations getImageTransformations() { - if (imageTransformationsBuilder_ == null) { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; - } - return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); - } else { - if (transformationCase_ == 4) { - return imageTransformationsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); - } - } - /** - *
-     * Treat the dataset as an image and redact.
-     * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - */ - public Builder setImageTransformations(com.google.privacy.dlp.v2.ImageTransformations value) { - if (imageTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - imageTransformationsBuilder_.setMessage(value); - } - transformationCase_ = 4; - return this; - } - /** - *
-     * Treat the dataset as an image and redact.
-     * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - */ - public Builder setImageTransformations( - com.google.privacy.dlp.v2.ImageTransformations.Builder builderForValue) { - if (imageTransformationsBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - imageTransformationsBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 4; - return this; - } - /** - *
-     * Treat the dataset as an image and redact.
-     * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - */ - public Builder mergeImageTransformations(com.google.privacy.dlp.v2.ImageTransformations value) { - if (imageTransformationsBuilder_ == null) { - if (transformationCase_ == 4 && - transformation_ != com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.ImageTransformations.newBuilder((com.google.privacy.dlp.v2.ImageTransformations) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 4) { - imageTransformationsBuilder_.mergeFrom(value); - } else { - imageTransformationsBuilder_.setMessage(value); - } - } - transformationCase_ = 4; - return this; - } - /** - *
-     * Treat the dataset as an image and redact.
-     * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - */ - public Builder clearImageTransformations() { - if (imageTransformationsBuilder_ == null) { - if (transformationCase_ == 4) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 4) { - transformationCase_ = 0; - transformation_ = null; - } - imageTransformationsBuilder_.clear(); - } - return this; - } - /** - *
-     * Treat the dataset as an image and redact.
-     * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - */ - public com.google.privacy.dlp.v2.ImageTransformations.Builder getImageTransformationsBuilder() { - return getImageTransformationsFieldBuilder().getBuilder(); - } - /** - *
-     * Treat the dataset as an image and redact.
-     * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ImageTransformationsOrBuilder getImageTransformationsOrBuilder() { - if ((transformationCase_ == 4) && (imageTransformationsBuilder_ != null)) { - return imageTransformationsBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.ImageTransformations) transformation_; - } - return com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); - } - } - /** - *
-     * Treat the dataset as an image and redact.
-     * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations, com.google.privacy.dlp.v2.ImageTransformations.Builder, com.google.privacy.dlp.v2.ImageTransformationsOrBuilder> - getImageTransformationsFieldBuilder() { - if (imageTransformationsBuilder_ == null) { - if (!(transformationCase_ == 4)) { - transformation_ = com.google.privacy.dlp.v2.ImageTransformations.getDefaultInstance(); - } - imageTransformationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ImageTransformations, com.google.privacy.dlp.v2.ImageTransformations.Builder, com.google.privacy.dlp.v2.ImageTransformationsOrBuilder>( - (com.google.privacy.dlp.v2.ImageTransformations) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 4; - onChanged();; - return imageTransformationsBuilder_; - } - - private com.google.privacy.dlp.v2.TransformationErrorHandling transformationErrorHandling_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationErrorHandling, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder, com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder> transformationErrorHandlingBuilder_; - /** - *
-     * Mode for handling transformation errors. If left unspecified, the default
-     * mode is `TransformationErrorHandling.ThrowError`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - * @return Whether the transformationErrorHandling field is set. - */ - public boolean hasTransformationErrorHandling() { - return transformationErrorHandlingBuilder_ != null || transformationErrorHandling_ != null; - } - /** - *
-     * Mode for handling transformation errors. If left unspecified, the default
-     * mode is `TransformationErrorHandling.ThrowError`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - * @return The transformationErrorHandling. - */ - public com.google.privacy.dlp.v2.TransformationErrorHandling getTransformationErrorHandling() { - if (transformationErrorHandlingBuilder_ == null) { - return transformationErrorHandling_ == null ? com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance() : transformationErrorHandling_; - } else { - return transformationErrorHandlingBuilder_.getMessage(); - } - } - /** - *
-     * Mode for handling transformation errors. If left unspecified, the default
-     * mode is `TransformationErrorHandling.ThrowError`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - */ - public Builder setTransformationErrorHandling(com.google.privacy.dlp.v2.TransformationErrorHandling value) { - if (transformationErrorHandlingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformationErrorHandling_ = value; - onChanged(); - } else { - transformationErrorHandlingBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Mode for handling transformation errors. If left unspecified, the default
-     * mode is `TransformationErrorHandling.ThrowError`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - */ - public Builder setTransformationErrorHandling( - com.google.privacy.dlp.v2.TransformationErrorHandling.Builder builderForValue) { - if (transformationErrorHandlingBuilder_ == null) { - transformationErrorHandling_ = builderForValue.build(); - onChanged(); - } else { - transformationErrorHandlingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Mode for handling transformation errors. If left unspecified, the default
-     * mode is `TransformationErrorHandling.ThrowError`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - */ - public Builder mergeTransformationErrorHandling(com.google.privacy.dlp.v2.TransformationErrorHandling value) { - if (transformationErrorHandlingBuilder_ == null) { - if (transformationErrorHandling_ != null) { - transformationErrorHandling_ = - com.google.privacy.dlp.v2.TransformationErrorHandling.newBuilder(transformationErrorHandling_).mergeFrom(value).buildPartial(); - } else { - transformationErrorHandling_ = value; - } - onChanged(); - } else { - transformationErrorHandlingBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Mode for handling transformation errors. If left unspecified, the default
-     * mode is `TransformationErrorHandling.ThrowError`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - */ - public Builder clearTransformationErrorHandling() { - if (transformationErrorHandlingBuilder_ == null) { - transformationErrorHandling_ = null; - onChanged(); - } else { - transformationErrorHandling_ = null; - transformationErrorHandlingBuilder_ = null; - } - - return this; - } - /** - *
-     * Mode for handling transformation errors. If left unspecified, the default
-     * mode is `TransformationErrorHandling.ThrowError`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - */ - public com.google.privacy.dlp.v2.TransformationErrorHandling.Builder getTransformationErrorHandlingBuilder() { - - onChanged(); - return getTransformationErrorHandlingFieldBuilder().getBuilder(); - } - /** - *
-     * Mode for handling transformation errors. If left unspecified, the default
-     * mode is `TransformationErrorHandling.ThrowError`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - */ - public com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder getTransformationErrorHandlingOrBuilder() { - if (transformationErrorHandlingBuilder_ != null) { - return transformationErrorHandlingBuilder_.getMessageOrBuilder(); - } else { - return transformationErrorHandling_ == null ? - com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance() : transformationErrorHandling_; - } - } - /** - *
-     * Mode for handling transformation errors. If left unspecified, the default
-     * mode is `TransformationErrorHandling.ThrowError`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationErrorHandling, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder, com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder> - getTransformationErrorHandlingFieldBuilder() { - if (transformationErrorHandlingBuilder_ == null) { - transformationErrorHandlingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationErrorHandling, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder, com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder>( - getTransformationErrorHandling(), - getParentForChildren(), - isClean()); - transformationErrorHandling_ = null; - } - return transformationErrorHandlingBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeidentifyConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeidentifyConfig) - private static final com.google.privacy.dlp.v2.DeidentifyConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeidentifyConfig(); - } - - public static com.google.privacy.dlp.v2.DeidentifyConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeidentifyConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeidentifyConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java deleted file mode 100644 index fb6b263e9a4e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyConfigOrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DeidentifyConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeidentifyConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Treat the dataset as free-form text and apply the same free text
-   * transformation everywhere.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - * @return Whether the infoTypeTransformations field is set. - */ - boolean hasInfoTypeTransformations(); - /** - *
-   * Treat the dataset as free-form text and apply the same free text
-   * transformation everywhere.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - * @return The infoTypeTransformations. - */ - com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations(); - /** - *
-   * Treat the dataset as free-form text and apply the same free text
-   * transformation everywhere.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 1; - */ - com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder(); - - /** - *
-   * Treat the dataset as structured. Transformations can be applied to
-   * specific locations within structured datasets, such as transforming
-   * a column within a table.
-   * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - * @return Whether the recordTransformations field is set. - */ - boolean hasRecordTransformations(); - /** - *
-   * Treat the dataset as structured. Transformations can be applied to
-   * specific locations within structured datasets, such as transforming
-   * a column within a table.
-   * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - * @return The recordTransformations. - */ - com.google.privacy.dlp.v2.RecordTransformations getRecordTransformations(); - /** - *
-   * Treat the dataset as structured. Transformations can be applied to
-   * specific locations within structured datasets, such as transforming
-   * a column within a table.
-   * 
- * - * .google.privacy.dlp.v2.RecordTransformations record_transformations = 2; - */ - com.google.privacy.dlp.v2.RecordTransformationsOrBuilder getRecordTransformationsOrBuilder(); - - /** - *
-   * Treat the dataset as an image and redact.
-   * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - * @return Whether the imageTransformations field is set. - */ - boolean hasImageTransformations(); - /** - *
-   * Treat the dataset as an image and redact.
-   * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - * @return The imageTransformations. - */ - com.google.privacy.dlp.v2.ImageTransformations getImageTransformations(); - /** - *
-   * Treat the dataset as an image and redact.
-   * 
- * - * .google.privacy.dlp.v2.ImageTransformations image_transformations = 4; - */ - com.google.privacy.dlp.v2.ImageTransformationsOrBuilder getImageTransformationsOrBuilder(); - - /** - *
-   * Mode for handling transformation errors. If left unspecified, the default
-   * mode is `TransformationErrorHandling.ThrowError`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - * @return Whether the transformationErrorHandling field is set. - */ - boolean hasTransformationErrorHandling(); - /** - *
-   * Mode for handling transformation errors. If left unspecified, the default
-   * mode is `TransformationErrorHandling.ThrowError`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - * @return The transformationErrorHandling. - */ - com.google.privacy.dlp.v2.TransformationErrorHandling getTransformationErrorHandling(); - /** - *
-   * Mode for handling transformation errors. If left unspecified, the default
-   * mode is `TransformationErrorHandling.ThrowError`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling transformation_error_handling = 3; - */ - com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder getTransformationErrorHandlingOrBuilder(); - - public com.google.privacy.dlp.v2.DeidentifyConfig.TransformationCase getTransformationCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java deleted file mode 100644 index 6ba689fcf1bd..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequest.java +++ /dev/null @@ -1,1982 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request to de-identify a ContentItem.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentRequest} - */ -public final class DeidentifyContentRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyContentRequest) - DeidentifyContentRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeidentifyContentRequest.newBuilder() to construct. - private DeidentifyContentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeidentifyContentRequest() { - parent_ = ""; - inspectTemplateName_ = ""; - deidentifyTemplateName_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeidentifyContentRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeidentifyContentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.DeidentifyConfig.Builder subBuilder = null; - if (deidentifyConfig_ != null) { - subBuilder = deidentifyConfig_.toBuilder(); - } - deidentifyConfig_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deidentifyConfig_); - deidentifyConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; - if (inspectConfig_ != null) { - subBuilder = inspectConfig_.toBuilder(); - } - inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectConfig_); - inspectConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; - if (item_ != null) { - subBuilder = item_.toBuilder(); - } - item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(item_); - item_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - inspectTemplateName_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - deidentifyTemplateName_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeidentifyContentRequest.class, com.google.privacy.dlp.v2.DeidentifyContentRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEIDENTIFY_CONFIG_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; - /** - *
-   * Configuration for the de-identification of the content item.
-   * Items specified here will override the template referenced by the
-   * deidentify_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - * @return Whether the deidentifyConfig field is set. - */ - @java.lang.Override - public boolean hasDeidentifyConfig() { - return deidentifyConfig_ != null; - } - /** - *
-   * Configuration for the de-identification of the content item.
-   * Items specified here will override the template referenced by the
-   * deidentify_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - * @return The deidentifyConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { - return deidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; - } - /** - *
-   * Configuration for the de-identification of the content item.
-   * Items specified here will override the template referenced by the
-   * deidentify_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { - return getDeidentifyConfig(); - } - - public static final int INSPECT_CONFIG_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - /** - *
-   * Configuration for the inspector.
-   * Items specified here will override the template referenced by the
-   * inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return Whether the inspectConfig field is set. - */ - @java.lang.Override - public boolean hasInspectConfig() { - return inspectConfig_ != null; - } - /** - *
-   * Configuration for the inspector.
-   * Items specified here will override the template referenced by the
-   * inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return The inspectConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - /** - *
-   * Configuration for the inspector.
-   * Items specified here will override the template referenced by the
-   * inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - return getInspectConfig(); - } - - public static final int ITEM_FIELD_NUMBER = 4; - private com.google.privacy.dlp.v2.ContentItem item_; - /** - *
-   * The item to de-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return Whether the item field is set. - */ - @java.lang.Override - public boolean hasItem() { - return item_ != null; - } - /** - *
-   * The item to de-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return The item. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem getItem() { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - /** - *
-   * The item to de-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - return getItem(); - } - - public static final int INSPECT_TEMPLATE_NAME_FIELD_NUMBER = 5; - private volatile java.lang.Object inspectTemplateName_; - /** - *
-   * Template to use. Any configuration directly specified in
-   * inspect_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 5; - * @return The inspectTemplateName. - */ - @java.lang.Override - public java.lang.String getInspectTemplateName() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inspectTemplateName_ = s; - return s; - } - } - /** - *
-   * Template to use. Any configuration directly specified in
-   * inspect_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 5; - * @return The bytes for inspectTemplateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getInspectTemplateNameBytes() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - inspectTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER = 6; - private volatile java.lang.Object deidentifyTemplateName_; - /** - *
-   * Template to use. Any configuration directly specified in
-   * deidentify_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string deidentify_template_name = 6; - * @return The deidentifyTemplateName. - */ - @java.lang.Override - public java.lang.String getDeidentifyTemplateName() { - java.lang.Object ref = deidentifyTemplateName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deidentifyTemplateName_ = s; - return s; - } - } - /** - *
-   * Template to use. Any configuration directly specified in
-   * deidentify_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string deidentify_template_name = 6; - * @return The bytes for deidentifyTemplateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDeidentifyTemplateNameBytes() { - java.lang.Object ref = deidentifyTemplateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deidentifyTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 7; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (deidentifyConfig_ != null) { - output.writeMessage(2, getDeidentifyConfig()); - } - if (inspectConfig_ != null) { - output.writeMessage(3, getInspectConfig()); - } - if (item_ != null) { - output.writeMessage(4, getItem()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, inspectTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deidentifyTemplateName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, deidentifyTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (deidentifyConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDeidentifyConfig()); - } - if (inspectConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getInspectConfig()); - } - if (item_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getItem()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, inspectTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deidentifyTemplateName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, deidentifyTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DeidentifyContentRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DeidentifyContentRequest other = (com.google.privacy.dlp.v2.DeidentifyContentRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasDeidentifyConfig() != other.hasDeidentifyConfig()) return false; - if (hasDeidentifyConfig()) { - if (!getDeidentifyConfig() - .equals(other.getDeidentifyConfig())) return false; - } - if (hasInspectConfig() != other.hasInspectConfig()) return false; - if (hasInspectConfig()) { - if (!getInspectConfig() - .equals(other.getInspectConfig())) return false; - } - if (hasItem() != other.hasItem()) return false; - if (hasItem()) { - if (!getItem() - .equals(other.getItem())) return false; - } - if (!getInspectTemplateName() - .equals(other.getInspectTemplateName())) return false; - if (!getDeidentifyTemplateName() - .equals(other.getDeidentifyTemplateName())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasDeidentifyConfig()) { - hash = (37 * hash) + DEIDENTIFY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDeidentifyConfig().hashCode(); - } - if (hasInspectConfig()) { - hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInspectConfig().hashCode(); - } - if (hasItem()) { - hash = (37 * hash) + ITEM_FIELD_NUMBER; - hash = (53 * hash) + getItem().hashCode(); - } - hash = (37 * hash) + INSPECT_TEMPLATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getInspectTemplateName().hashCode(); - hash = (37 * hash) + DEIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDeidentifyTemplateName().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyContentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyContentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to de-identify a ContentItem.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyContentRequest) - com.google.privacy.dlp.v2.DeidentifyContentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeidentifyContentRequest.class, com.google.privacy.dlp.v2.DeidentifyContentRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DeidentifyContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (deidentifyConfigBuilder_ == null) { - deidentifyConfig_ = null; - } else { - deidentifyConfig_ = null; - deidentifyConfigBuilder_ = null; - } - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - if (itemBuilder_ == null) { - item_ = null; - } else { - item_ = null; - itemBuilder_ = null; - } - inspectTemplateName_ = ""; - - deidentifyTemplateName_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyContentRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DeidentifyContentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyContentRequest build() { - com.google.privacy.dlp.v2.DeidentifyContentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyContentRequest buildPartial() { - com.google.privacy.dlp.v2.DeidentifyContentRequest result = new com.google.privacy.dlp.v2.DeidentifyContentRequest(this); - result.parent_ = parent_; - if (deidentifyConfigBuilder_ == null) { - result.deidentifyConfig_ = deidentifyConfig_; - } else { - result.deidentifyConfig_ = deidentifyConfigBuilder_.build(); - } - if (inspectConfigBuilder_ == null) { - result.inspectConfig_ = inspectConfig_; - } else { - result.inspectConfig_ = inspectConfigBuilder_.build(); - } - if (itemBuilder_ == null) { - result.item_ = item_; - } else { - result.item_ = itemBuilder_.build(); - } - result.inspectTemplateName_ = inspectTemplateName_; - result.deidentifyTemplateName_ = deidentifyTemplateName_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DeidentifyContentRequest) { - return mergeFrom((com.google.privacy.dlp.v2.DeidentifyContentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyContentRequest other) { - if (other == com.google.privacy.dlp.v2.DeidentifyContentRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasDeidentifyConfig()) { - mergeDeidentifyConfig(other.getDeidentifyConfig()); - } - if (other.hasInspectConfig()) { - mergeInspectConfig(other.getInspectConfig()); - } - if (other.hasItem()) { - mergeItem(other.getItem()); - } - if (!other.getInspectTemplateName().isEmpty()) { - inspectTemplateName_ = other.inspectTemplateName_; - onChanged(); - } - if (!other.getDeidentifyTemplateName().isEmpty()) { - deidentifyTemplateName_ = other.deidentifyTemplateName_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DeidentifyContentRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DeidentifyContentRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> deidentifyConfigBuilder_; - /** - *
-     * Configuration for the de-identification of the content item.
-     * Items specified here will override the template referenced by the
-     * deidentify_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - * @return Whether the deidentifyConfig field is set. - */ - public boolean hasDeidentifyConfig() { - return deidentifyConfigBuilder_ != null || deidentifyConfig_ != null; - } - /** - *
-     * Configuration for the de-identification of the content item.
-     * Items specified here will override the template referenced by the
-     * deidentify_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - * @return The deidentifyConfig. - */ - public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { - if (deidentifyConfigBuilder_ == null) { - return deidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; - } else { - return deidentifyConfigBuilder_.getMessage(); - } - } - /** - *
-     * Configuration for the de-identification of the content item.
-     * Items specified here will override the template referenced by the
-     * deidentify_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - */ - public Builder setDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { - if (deidentifyConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deidentifyConfig_ = value; - onChanged(); - } else { - deidentifyConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Configuration for the de-identification of the content item.
-     * Items specified here will override the template referenced by the
-     * deidentify_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - */ - public Builder setDeidentifyConfig( - com.google.privacy.dlp.v2.DeidentifyConfig.Builder builderForValue) { - if (deidentifyConfigBuilder_ == null) { - deidentifyConfig_ = builderForValue.build(); - onChanged(); - } else { - deidentifyConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Configuration for the de-identification of the content item.
-     * Items specified here will override the template referenced by the
-     * deidentify_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - */ - public Builder mergeDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { - if (deidentifyConfigBuilder_ == null) { - if (deidentifyConfig_ != null) { - deidentifyConfig_ = - com.google.privacy.dlp.v2.DeidentifyConfig.newBuilder(deidentifyConfig_).mergeFrom(value).buildPartial(); - } else { - deidentifyConfig_ = value; - } - onChanged(); - } else { - deidentifyConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Configuration for the de-identification of the content item.
-     * Items specified here will override the template referenced by the
-     * deidentify_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - */ - public Builder clearDeidentifyConfig() { - if (deidentifyConfigBuilder_ == null) { - deidentifyConfig_ = null; - onChanged(); - } else { - deidentifyConfig_ = null; - deidentifyConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Configuration for the de-identification of the content item.
-     * Items specified here will override the template referenced by the
-     * deidentify_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - */ - public com.google.privacy.dlp.v2.DeidentifyConfig.Builder getDeidentifyConfigBuilder() { - - onChanged(); - return getDeidentifyConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Configuration for the de-identification of the content item.
-     * Items specified here will override the template referenced by the
-     * deidentify_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - */ - public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { - if (deidentifyConfigBuilder_ != null) { - return deidentifyConfigBuilder_.getMessageOrBuilder(); - } else { - return deidentifyConfig_ == null ? - com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; - } - } - /** - *
-     * Configuration for the de-identification of the content item.
-     * Items specified here will override the template referenced by the
-     * deidentify_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> - getDeidentifyConfigFieldBuilder() { - if (deidentifyConfigBuilder_ == null) { - deidentifyConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>( - getDeidentifyConfig(), - getParentForChildren(), - isClean()); - deidentifyConfig_ = null; - } - return deidentifyConfigBuilder_; - } - - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; - /** - *
-     * Configuration for the inspector.
-     * Items specified here will override the template referenced by the
-     * inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return Whether the inspectConfig field is set. - */ - public boolean hasInspectConfig() { - return inspectConfigBuilder_ != null || inspectConfig_ != null; - } - /** - *
-     * Configuration for the inspector.
-     * Items specified here will override the template referenced by the
-     * inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return The inspectConfig. - */ - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - if (inspectConfigBuilder_ == null) { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } else { - return inspectConfigBuilder_.getMessage(); - } - } - /** - *
-     * Configuration for the inspector.
-     * Items specified here will override the template referenced by the
-     * inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectConfig_ = value; - onChanged(); - } else { - inspectConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * Items specified here will override the template referenced by the
-     * inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public Builder setInspectConfig( - com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = builderForValue.build(); - onChanged(); - } else { - inspectConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * Items specified here will override the template referenced by the
-     * inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (inspectConfig_ != null) { - inspectConfig_ = - com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); - } else { - inspectConfig_ = value; - } - onChanged(); - } else { - inspectConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * Items specified here will override the template referenced by the
-     * inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public Builder clearInspectConfig() { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - onChanged(); - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * Items specified here will override the template referenced by the
-     * inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { - - onChanged(); - return getInspectConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Configuration for the inspector.
-     * Items specified here will override the template referenced by the
-     * inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - if (inspectConfigBuilder_ != null) { - return inspectConfigBuilder_.getMessageOrBuilder(); - } else { - return inspectConfig_ == null ? - com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - } - /** - *
-     * Configuration for the inspector.
-     * Items specified here will override the template referenced by the
-     * inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> - getInspectConfigFieldBuilder() { - if (inspectConfigBuilder_ == null) { - inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( - getInspectConfig(), - getParentForChildren(), - isClean()); - inspectConfig_ = null; - } - return inspectConfigBuilder_; - } - - private com.google.privacy.dlp.v2.ContentItem item_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; - /** - *
-     * The item to de-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return Whether the item field is set. - */ - public boolean hasItem() { - return itemBuilder_ != null || item_ != null; - } - /** - *
-     * The item to de-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return The item. - */ - public com.google.privacy.dlp.v2.ContentItem getItem() { - if (itemBuilder_ == null) { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } else { - return itemBuilder_.getMessage(); - } - } - /** - *
-     * The item to de-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - item_ = value; - onChanged(); - } else { - itemBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The item to de-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public Builder setItem( - com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { - if (itemBuilder_ == null) { - item_ = builderForValue.build(); - onChanged(); - } else { - itemBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The item to de-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (item_ != null) { - item_ = - com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); - } else { - item_ = value; - } - onChanged(); - } else { - itemBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The item to de-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public Builder clearItem() { - if (itemBuilder_ == null) { - item_ = null; - onChanged(); - } else { - item_ = null; - itemBuilder_ = null; - } - - return this; - } - /** - *
-     * The item to de-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { - - onChanged(); - return getItemFieldBuilder().getBuilder(); - } - /** - *
-     * The item to de-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - if (itemBuilder_ != null) { - return itemBuilder_.getMessageOrBuilder(); - } else { - return item_ == null ? - com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - } - /** - *
-     * The item to de-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> - getItemFieldBuilder() { - if (itemBuilder_ == null) { - itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( - getItem(), - getParentForChildren(), - isClean()); - item_ = null; - } - return itemBuilder_; - } - - private java.lang.Object inspectTemplateName_ = ""; - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @return The inspectTemplateName. - */ - public java.lang.String getInspectTemplateName() { - java.lang.Object ref = inspectTemplateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inspectTemplateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @return The bytes for inspectTemplateName. - */ - public com.google.protobuf.ByteString - getInspectTemplateNameBytes() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - inspectTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @param value The inspectTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInspectTemplateName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - inspectTemplateName_ = value; - onChanged(); - return this; - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @return This builder for chaining. - */ - public Builder clearInspectTemplateName() { - - inspectTemplateName_ = getDefaultInstance().getInspectTemplateName(); - onChanged(); - return this; - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @param value The bytes for inspectTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInspectTemplateNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - inspectTemplateName_ = value; - onChanged(); - return this; - } - - private java.lang.Object deidentifyTemplateName_ = ""; - /** - *
-     * Template to use. Any configuration directly specified in
-     * deidentify_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string deidentify_template_name = 6; - * @return The deidentifyTemplateName. - */ - public java.lang.String getDeidentifyTemplateName() { - java.lang.Object ref = deidentifyTemplateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - deidentifyTemplateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * deidentify_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string deidentify_template_name = 6; - * @return The bytes for deidentifyTemplateName. - */ - public com.google.protobuf.ByteString - getDeidentifyTemplateNameBytes() { - java.lang.Object ref = deidentifyTemplateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - deidentifyTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * deidentify_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string deidentify_template_name = 6; - * @param value The deidentifyTemplateName to set. - * @return This builder for chaining. - */ - public Builder setDeidentifyTemplateName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - deidentifyTemplateName_ = value; - onChanged(); - return this; - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * deidentify_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string deidentify_template_name = 6; - * @return This builder for chaining. - */ - public Builder clearDeidentifyTemplateName() { - - deidentifyTemplateName_ = getDefaultInstance().getDeidentifyTemplateName(); - onChanged(); - return this; - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * deidentify_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string deidentify_template_name = 6; - * @param value The bytes for deidentifyTemplateName to set. - * @return This builder for chaining. - */ - public Builder setDeidentifyTemplateNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - deidentifyTemplateName_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeidentifyContentRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeidentifyContentRequest) - private static final com.google.privacy.dlp.v2.DeidentifyContentRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeidentifyContentRequest(); - } - - public static com.google.privacy.dlp.v2.DeidentifyContentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeidentifyContentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeidentifyContentRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyContentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java deleted file mode 100644 index b176154d48f7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentRequestOrBuilder.java +++ /dev/null @@ -1,220 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DeidentifyContentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeidentifyContentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Configuration for the de-identification of the content item.
-   * Items specified here will override the template referenced by the
-   * deidentify_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - * @return Whether the deidentifyConfig field is set. - */ - boolean hasDeidentifyConfig(); - /** - *
-   * Configuration for the de-identification of the content item.
-   * Items specified here will override the template referenced by the
-   * deidentify_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - * @return The deidentifyConfig. - */ - com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig(); - /** - *
-   * Configuration for the de-identification of the content item.
-   * Items specified here will override the template referenced by the
-   * deidentify_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 2; - */ - com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder(); - - /** - *
-   * Configuration for the inspector.
-   * Items specified here will override the template referenced by the
-   * inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return Whether the inspectConfig field is set. - */ - boolean hasInspectConfig(); - /** - *
-   * Configuration for the inspector.
-   * Items specified here will override the template referenced by the
-   * inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return The inspectConfig. - */ - com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); - /** - *
-   * Configuration for the inspector.
-   * Items specified here will override the template referenced by the
-   * inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); - - /** - *
-   * The item to de-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return Whether the item field is set. - */ - boolean hasItem(); - /** - *
-   * The item to de-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return The item. - */ - com.google.privacy.dlp.v2.ContentItem getItem(); - /** - *
-   * The item to de-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); - - /** - *
-   * Template to use. Any configuration directly specified in
-   * inspect_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 5; - * @return The inspectTemplateName. - */ - java.lang.String getInspectTemplateName(); - /** - *
-   * Template to use. Any configuration directly specified in
-   * inspect_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 5; - * @return The bytes for inspectTemplateName. - */ - com.google.protobuf.ByteString - getInspectTemplateNameBytes(); - - /** - *
-   * Template to use. Any configuration directly specified in
-   * deidentify_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string deidentify_template_name = 6; - * @return The deidentifyTemplateName. - */ - java.lang.String getDeidentifyTemplateName(); - /** - *
-   * Template to use. Any configuration directly specified in
-   * deidentify_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string deidentify_template_name = 6; - * @return The bytes for deidentifyTemplateName. - */ - com.google.protobuf.ByteString - getDeidentifyTemplateNameBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponse.java deleted file mode 100644 index b4d2d9186161..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponse.java +++ /dev/null @@ -1,901 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Results of de-identifying a ContentItem.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentResponse} - */ -public final class DeidentifyContentResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyContentResponse) - DeidentifyContentResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeidentifyContentResponse.newBuilder() to construct. - private DeidentifyContentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeidentifyContentResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeidentifyContentResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeidentifyContentResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; - if (item_ != null) { - subBuilder = item_.toBuilder(); - } - item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(item_); - item_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.TransformationOverview.Builder subBuilder = null; - if (overview_ != null) { - subBuilder = overview_.toBuilder(); - } - overview_ = input.readMessage(com.google.privacy.dlp.v2.TransformationOverview.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(overview_); - overview_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeidentifyContentResponse.class, com.google.privacy.dlp.v2.DeidentifyContentResponse.Builder.class); - } - - public static final int ITEM_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.ContentItem item_; - /** - *
-   * The de-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return Whether the item field is set. - */ - @java.lang.Override - public boolean hasItem() { - return item_ != null; - } - /** - *
-   * The de-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return The item. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem getItem() { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - /** - *
-   * The de-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - return getItem(); - } - - public static final int OVERVIEW_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.TransformationOverview overview_; - /** - *
-   * An overview of the changes that were made on the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return Whether the overview field is set. - */ - @java.lang.Override - public boolean hasOverview() { - return overview_ != null; - } - /** - *
-   * An overview of the changes that were made on the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return The overview. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationOverview getOverview() { - return overview_ == null ? com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; - } - /** - *
-   * An overview of the changes that were made on the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder() { - return getOverview(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (item_ != null) { - output.writeMessage(1, getItem()); - } - if (overview_ != null) { - output.writeMessage(2, getOverview()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (item_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getItem()); - } - if (overview_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOverview()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DeidentifyContentResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DeidentifyContentResponse other = (com.google.privacy.dlp.v2.DeidentifyContentResponse) obj; - - if (hasItem() != other.hasItem()) return false; - if (hasItem()) { - if (!getItem() - .equals(other.getItem())) return false; - } - if (hasOverview() != other.hasOverview()) return false; - if (hasOverview()) { - if (!getOverview() - .equals(other.getOverview())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasItem()) { - hash = (37 * hash) + ITEM_FIELD_NUMBER; - hash = (53 * hash) + getItem().hashCode(); - } - if (hasOverview()) { - hash = (37 * hash) + OVERVIEW_FIELD_NUMBER; - hash = (53 * hash) + getOverview().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyContentResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyContentResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Results of de-identifying a ContentItem.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeidentifyContentResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyContentResponse) - com.google.privacy.dlp.v2.DeidentifyContentResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeidentifyContentResponse.class, com.google.privacy.dlp.v2.DeidentifyContentResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DeidentifyContentResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (itemBuilder_ == null) { - item_ = null; - } else { - item_ = null; - itemBuilder_ = null; - } - if (overviewBuilder_ == null) { - overview_ = null; - } else { - overview_ = null; - overviewBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyContentResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DeidentifyContentResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyContentResponse build() { - com.google.privacy.dlp.v2.DeidentifyContentResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyContentResponse buildPartial() { - com.google.privacy.dlp.v2.DeidentifyContentResponse result = new com.google.privacy.dlp.v2.DeidentifyContentResponse(this); - if (itemBuilder_ == null) { - result.item_ = item_; - } else { - result.item_ = itemBuilder_.build(); - } - if (overviewBuilder_ == null) { - result.overview_ = overview_; - } else { - result.overview_ = overviewBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DeidentifyContentResponse) { - return mergeFrom((com.google.privacy.dlp.v2.DeidentifyContentResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyContentResponse other) { - if (other == com.google.privacy.dlp.v2.DeidentifyContentResponse.getDefaultInstance()) return this; - if (other.hasItem()) { - mergeItem(other.getItem()); - } - if (other.hasOverview()) { - mergeOverview(other.getOverview()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DeidentifyContentResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DeidentifyContentResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.ContentItem item_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; - /** - *
-     * The de-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return Whether the item field is set. - */ - public boolean hasItem() { - return itemBuilder_ != null || item_ != null; - } - /** - *
-     * The de-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return The item. - */ - public com.google.privacy.dlp.v2.ContentItem getItem() { - if (itemBuilder_ == null) { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } else { - return itemBuilder_.getMessage(); - } - } - /** - *
-     * The de-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - item_ = value; - onChanged(); - } else { - itemBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The de-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder setItem( - com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { - if (itemBuilder_ == null) { - item_ = builderForValue.build(); - onChanged(); - } else { - itemBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The de-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (item_ != null) { - item_ = - com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); - } else { - item_ = value; - } - onChanged(); - } else { - itemBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The de-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder clearItem() { - if (itemBuilder_ == null) { - item_ = null; - onChanged(); - } else { - item_ = null; - itemBuilder_ = null; - } - - return this; - } - /** - *
-     * The de-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { - - onChanged(); - return getItemFieldBuilder().getBuilder(); - } - /** - *
-     * The de-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - if (itemBuilder_ != null) { - return itemBuilder_.getMessageOrBuilder(); - } else { - return item_ == null ? - com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - } - /** - *
-     * The de-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> - getItemFieldBuilder() { - if (itemBuilder_ == null) { - itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( - getItem(), - getParentForChildren(), - isClean()); - item_ = null; - } - return itemBuilder_; - } - - private com.google.privacy.dlp.v2.TransformationOverview overview_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder> overviewBuilder_; - /** - *
-     * An overview of the changes that were made on the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return Whether the overview field is set. - */ - public boolean hasOverview() { - return overviewBuilder_ != null || overview_ != null; - } - /** - *
-     * An overview of the changes that were made on the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return The overview. - */ - public com.google.privacy.dlp.v2.TransformationOverview getOverview() { - if (overviewBuilder_ == null) { - return overview_ == null ? com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; - } else { - return overviewBuilder_.getMessage(); - } - } - /** - *
-     * An overview of the changes that were made on the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public Builder setOverview(com.google.privacy.dlp.v2.TransformationOverview value) { - if (overviewBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - overview_ = value; - onChanged(); - } else { - overviewBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * An overview of the changes that were made on the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public Builder setOverview( - com.google.privacy.dlp.v2.TransformationOverview.Builder builderForValue) { - if (overviewBuilder_ == null) { - overview_ = builderForValue.build(); - onChanged(); - } else { - overviewBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * An overview of the changes that were made on the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public Builder mergeOverview(com.google.privacy.dlp.v2.TransformationOverview value) { - if (overviewBuilder_ == null) { - if (overview_ != null) { - overview_ = - com.google.privacy.dlp.v2.TransformationOverview.newBuilder(overview_).mergeFrom(value).buildPartial(); - } else { - overview_ = value; - } - onChanged(); - } else { - overviewBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * An overview of the changes that were made on the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public Builder clearOverview() { - if (overviewBuilder_ == null) { - overview_ = null; - onChanged(); - } else { - overview_ = null; - overviewBuilder_ = null; - } - - return this; - } - /** - *
-     * An overview of the changes that were made on the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public com.google.privacy.dlp.v2.TransformationOverview.Builder getOverviewBuilder() { - - onChanged(); - return getOverviewFieldBuilder().getBuilder(); - } - /** - *
-     * An overview of the changes that were made on the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder() { - if (overviewBuilder_ != null) { - return overviewBuilder_.getMessageOrBuilder(); - } else { - return overview_ == null ? - com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; - } - } - /** - *
-     * An overview of the changes that were made on the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder> - getOverviewFieldBuilder() { - if (overviewBuilder_ == null) { - overviewBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder>( - getOverview(), - getParentForChildren(), - isClean()); - overview_ = null; - } - return overviewBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeidentifyContentResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeidentifyContentResponse) - private static final com.google.privacy.dlp.v2.DeidentifyContentResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeidentifyContentResponse(); - } - - public static com.google.privacy.dlp.v2.DeidentifyContentResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeidentifyContentResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeidentifyContentResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyContentResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponseOrBuilder.java deleted file mode 100644 index 7bdf8e1c38d3..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyContentResponseOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DeidentifyContentResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeidentifyContentResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The de-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return Whether the item field is set. - */ - boolean hasItem(); - /** - *
-   * The de-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return The item. - */ - com.google.privacy.dlp.v2.ContentItem getItem(); - /** - *
-   * The de-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); - - /** - *
-   * An overview of the changes that were made on the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return Whether the overview field is set. - */ - boolean hasOverview(); - /** - *
-   * An overview of the changes that were made on the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return The overview. - */ - com.google.privacy.dlp.v2.TransformationOverview getOverview(); - /** - *
-   * An overview of the changes that were made on the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java deleted file mode 100644 index 5ac874fd51e4..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java +++ /dev/null @@ -1,1658 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * DeidentifyTemplates contains instructions on how to de-identify content.
- * See https://cloud.google.com/dlp/docs/concepts-templates to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeidentifyTemplate} - */ -public final class DeidentifyTemplate extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeidentifyTemplate) - DeidentifyTemplateOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeidentifyTemplate.newBuilder() to construct. - private DeidentifyTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeidentifyTemplate() { - name_ = ""; - displayName_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeidentifyTemplate(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeidentifyTemplate( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.privacy.dlp.v2.DeidentifyConfig.Builder subBuilder = null; - if (deidentifyConfig_ != null) { - subBuilder = deidentifyConfig_.toBuilder(); - } - deidentifyConfig_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deidentifyConfig_); - deidentifyConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeidentifyTemplate.class, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Output only. The template name.
-   * The template will have one of the following formats:
-   * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
-   * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Output only. The template name.
-   * The template will have one of the following formats:
-   * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
-   * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * Display name (max 256 chars).
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * Display name (max 256 chars).
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * Short description (max 256 chars).
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Short description (max 256 chars).
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int DEIDENTIFY_CONFIG_FIELD_NUMBER = 6; - private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; - /** - *
-   * The core content of the template.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - * @return Whether the deidentifyConfig field is set. - */ - @java.lang.Override - public boolean hasDeidentifyConfig() { - return deidentifyConfig_ != null; - } - /** - *
-   * The core content of the template.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - * @return The deidentifyConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { - return deidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; - } - /** - *
-   * The core content of the template.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { - return getDeidentifyConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (createTime_ != null) { - output.writeMessage(4, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(5, getUpdateTime()); - } - if (deidentifyConfig_ != null) { - output.writeMessage(6, getDeidentifyConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getUpdateTime()); - } - if (deidentifyConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getDeidentifyConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DeidentifyTemplate)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DeidentifyTemplate other = (com.google.privacy.dlp.v2.DeidentifyTemplate) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (hasDeidentifyConfig() != other.hasDeidentifyConfig()) return false; - if (hasDeidentifyConfig()) { - if (!getDeidentifyConfig() - .equals(other.getDeidentifyConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasDeidentifyConfig()) { - hash = (37 * hash) + DEIDENTIFY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDeidentifyConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeidentifyTemplate parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DeidentifyTemplate prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * DeidentifyTemplates contains instructions on how to de-identify content.
-   * See https://cloud.google.com/dlp/docs/concepts-templates to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeidentifyTemplate} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeidentifyTemplate) - com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeidentifyTemplate.class, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DeidentifyTemplate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - if (deidentifyConfigBuilder_ == null) { - deidentifyConfig_ = null; - } else { - deidentifyConfig_ = null; - deidentifyConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplate getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplate build() { - com.google.privacy.dlp.v2.DeidentifyTemplate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplate buildPartial() { - com.google.privacy.dlp.v2.DeidentifyTemplate result = new com.google.privacy.dlp.v2.DeidentifyTemplate(this); - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - if (deidentifyConfigBuilder_ == null) { - result.deidentifyConfig_ = deidentifyConfig_; - } else { - result.deidentifyConfig_ = deidentifyConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DeidentifyTemplate) { - return mergeFrom((com.google.privacy.dlp.v2.DeidentifyTemplate)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DeidentifyTemplate other) { - if (other == com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasDeidentifyConfig()) { - mergeDeidentifyConfig(other.getDeidentifyConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DeidentifyTemplate parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DeidentifyTemplate) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.privacy.dlp.v2.DeidentifyConfig deidentifyConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> deidentifyConfigBuilder_; - /** - *
-     * The core content of the template.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - * @return Whether the deidentifyConfig field is set. - */ - public boolean hasDeidentifyConfig() { - return deidentifyConfigBuilder_ != null || deidentifyConfig_ != null; - } - /** - *
-     * The core content of the template.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - * @return The deidentifyConfig. - */ - public com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig() { - if (deidentifyConfigBuilder_ == null) { - return deidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; - } else { - return deidentifyConfigBuilder_.getMessage(); - } - } - /** - *
-     * The core content of the template.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - */ - public Builder setDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { - if (deidentifyConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deidentifyConfig_ = value; - onChanged(); - } else { - deidentifyConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The core content of the template.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - */ - public Builder setDeidentifyConfig( - com.google.privacy.dlp.v2.DeidentifyConfig.Builder builderForValue) { - if (deidentifyConfigBuilder_ == null) { - deidentifyConfig_ = builderForValue.build(); - onChanged(); - } else { - deidentifyConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The core content of the template.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - */ - public Builder mergeDeidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { - if (deidentifyConfigBuilder_ == null) { - if (deidentifyConfig_ != null) { - deidentifyConfig_ = - com.google.privacy.dlp.v2.DeidentifyConfig.newBuilder(deidentifyConfig_).mergeFrom(value).buildPartial(); - } else { - deidentifyConfig_ = value; - } - onChanged(); - } else { - deidentifyConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The core content of the template.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - */ - public Builder clearDeidentifyConfig() { - if (deidentifyConfigBuilder_ == null) { - deidentifyConfig_ = null; - onChanged(); - } else { - deidentifyConfig_ = null; - deidentifyConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * The core content of the template.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - */ - public com.google.privacy.dlp.v2.DeidentifyConfig.Builder getDeidentifyConfigBuilder() { - - onChanged(); - return getDeidentifyConfigFieldBuilder().getBuilder(); - } - /** - *
-     * The core content of the template.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - */ - public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder() { - if (deidentifyConfigBuilder_ != null) { - return deidentifyConfigBuilder_.getMessageOrBuilder(); - } else { - return deidentifyConfig_ == null ? - com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : deidentifyConfig_; - } - } - /** - *
-     * The core content of the template.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> - getDeidentifyConfigFieldBuilder() { - if (deidentifyConfigBuilder_ == null) { - deidentifyConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>( - getDeidentifyConfig(), - getParentForChildren(), - isClean()); - deidentifyConfig_ = null; - } - return deidentifyConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeidentifyTemplate) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeidentifyTemplate) - private static final com.google.privacy.dlp.v2.DeidentifyTemplate DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeidentifyTemplate(); - } - - public static com.google.privacy.dlp.v2.DeidentifyTemplate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeidentifyTemplate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeidentifyTemplate(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateName.java deleted file mode 100644 index 2962a16c063c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateName.java +++ /dev/null @@ -1,512 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class DeidentifyTemplateName implements ResourceName { - private static final PathTemplate ORGANIZATION_DEIDENTIFY_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "organizations/{organization}/deidentifyTemplates/{deidentify_template}"); - private static final PathTemplate PROJECT_DEIDENTIFY_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/deidentifyTemplates/{deidentify_template}"); - private static final PathTemplate ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}"); - private static final PathTemplate PROJECT_LOCATION_DEIDENTIFY_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String organization; - private final String deidentifyTemplate; - private final String project; - private final String location; - - @Deprecated - protected DeidentifyTemplateName() { - organization = null; - deidentifyTemplate = null; - project = null; - location = null; - } - - private DeidentifyTemplateName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - deidentifyTemplate = Preconditions.checkNotNull(builder.getDeidentifyTemplate()); - project = null; - location = null; - pathTemplate = ORGANIZATION_DEIDENTIFY_TEMPLATE; - } - - private DeidentifyTemplateName(ProjectDeidentifyTemplateBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - deidentifyTemplate = Preconditions.checkNotNull(builder.getDeidentifyTemplate()); - organization = null; - location = null; - pathTemplate = PROJECT_DEIDENTIFY_TEMPLATE; - } - - private DeidentifyTemplateName(OrganizationLocationDeidentifyTemplateBuilder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - location = Preconditions.checkNotNull(builder.getLocation()); - deidentifyTemplate = Preconditions.checkNotNull(builder.getDeidentifyTemplate()); - project = null; - pathTemplate = ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE; - } - - private DeidentifyTemplateName(ProjectLocationDeidentifyTemplateBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - deidentifyTemplate = Preconditions.checkNotNull(builder.getDeidentifyTemplate()); - organization = null; - pathTemplate = PROJECT_LOCATION_DEIDENTIFY_TEMPLATE; - } - - public String getOrganization() { - return organization; - } - - public String getDeidentifyTemplate() { - return deidentifyTemplate; - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newOrganizationDeidentifyTemplateBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectDeidentifyTemplateBuilder newProjectDeidentifyTemplateBuilder() { - return new ProjectDeidentifyTemplateBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static OrganizationLocationDeidentifyTemplateBuilder - newOrganizationLocationDeidentifyTemplateBuilder() { - return new OrganizationLocationDeidentifyTemplateBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationDeidentifyTemplateBuilder - newProjectLocationDeidentifyTemplateBuilder() { - return new ProjectLocationDeidentifyTemplateBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static DeidentifyTemplateName of(String organization, String deidentifyTemplate) { - return newBuilder() - .setOrganization(organization) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static DeidentifyTemplateName ofOrganizationDeidentifyTemplateName( - String organization, String deidentifyTemplate) { - return newBuilder() - .setOrganization(organization) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static DeidentifyTemplateName ofProjectDeidentifyTemplateName( - String project, String deidentifyTemplate) { - return newProjectDeidentifyTemplateBuilder() - .setProject(project) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static DeidentifyTemplateName ofOrganizationLocationDeidentifyTemplateName( - String organization, String location, String deidentifyTemplate) { - return newOrganizationLocationDeidentifyTemplateBuilder() - .setOrganization(organization) - .setLocation(location) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static DeidentifyTemplateName ofProjectLocationDeidentifyTemplateName( - String project, String location, String deidentifyTemplate) { - return newProjectLocationDeidentifyTemplateBuilder() - .setProject(project) - .setLocation(location) - .setDeidentifyTemplate(deidentifyTemplate) - .build(); - } - - public static String format(String organization, String deidentifyTemplate) { - return newBuilder() - .setOrganization(organization) - .setDeidentifyTemplate(deidentifyTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationDeidentifyTemplateName( - String organization, String deidentifyTemplate) { - return newBuilder() - .setOrganization(organization) - .setDeidentifyTemplate(deidentifyTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectDeidentifyTemplateName( - String project, String deidentifyTemplate) { - return newProjectDeidentifyTemplateBuilder() - .setProject(project) - .setDeidentifyTemplate(deidentifyTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationLocationDeidentifyTemplateName( - String organization, String location, String deidentifyTemplate) { - return newOrganizationLocationDeidentifyTemplateBuilder() - .setOrganization(organization) - .setLocation(location) - .setDeidentifyTemplate(deidentifyTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationDeidentifyTemplateName( - String project, String location, String deidentifyTemplate) { - return newProjectLocationDeidentifyTemplateBuilder() - .setProject(project) - .setLocation(location) - .setDeidentifyTemplate(deidentifyTemplate) - .build() - .toString(); - } - - public static DeidentifyTemplateName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (ORGANIZATION_DEIDENTIFY_TEMPLATE.matches(formattedString)) { - Map matchMap = ORGANIZATION_DEIDENTIFY_TEMPLATE.match(formattedString); - return ofOrganizationDeidentifyTemplateName( - matchMap.get("organization"), matchMap.get("deidentify_template")); - } else if (PROJECT_DEIDENTIFY_TEMPLATE.matches(formattedString)) { - Map matchMap = PROJECT_DEIDENTIFY_TEMPLATE.match(formattedString); - return ofProjectDeidentifyTemplateName( - matchMap.get("project"), matchMap.get("deidentify_template")); - } else if (ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE.matches(formattedString)) { - Map matchMap = - ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE.match(formattedString); - return ofOrganizationLocationDeidentifyTemplateName( - matchMap.get("organization"), - matchMap.get("location"), - matchMap.get("deidentify_template")); - } else if (PROJECT_LOCATION_DEIDENTIFY_TEMPLATE.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_DEIDENTIFY_TEMPLATE.match(formattedString); - return ofProjectLocationDeidentifyTemplateName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("deidentify_template")); - } - throw new ValidationException( - "DeidentifyTemplateName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (DeidentifyTemplateName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION_DEIDENTIFY_TEMPLATE.matches(formattedString) - || PROJECT_DEIDENTIFY_TEMPLATE.matches(formattedString) - || ORGANIZATION_LOCATION_DEIDENTIFY_TEMPLATE.matches(formattedString) - || PROJECT_LOCATION_DEIDENTIFY_TEMPLATE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (organization != null) { - fieldMapBuilder.put("organization", organization); - } - if (deidentifyTemplate != null) { - fieldMapBuilder.put("deidentify_template", deidentifyTemplate); - } - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - DeidentifyTemplateName that = ((DeidentifyTemplateName) o); - return Objects.equals(this.organization, that.organization) - && Objects.equals(this.deidentifyTemplate, that.deidentifyTemplate) - && Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(organization); - h *= 1000003; - h ^= Objects.hashCode(deidentifyTemplate); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for organizations/{organization}/deidentifyTemplates/{deidentify_template}. */ - public static class Builder { - private String organization; - private String deidentifyTemplate; - - protected Builder() {} - - public String getOrganization() { - return organization; - } - - public String getDeidentifyTemplate() { - return deidentifyTemplate; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setDeidentifyTemplate(String deidentifyTemplate) { - this.deidentifyTemplate = deidentifyTemplate; - return this; - } - - private Builder(DeidentifyTemplateName deidentifyTemplateName) { - Preconditions.checkArgument( - Objects.equals(deidentifyTemplateName.pathTemplate, ORGANIZATION_DEIDENTIFY_TEMPLATE), - "toBuilder is only supported when DeidentifyTemplateName has the pattern of organizations/{organization}/deidentifyTemplates/{deidentify_template}"); - this.organization = deidentifyTemplateName.organization; - this.deidentifyTemplate = deidentifyTemplateName.deidentifyTemplate; - } - - public DeidentifyTemplateName build() { - return new DeidentifyTemplateName(this); - } - } - - /** Builder for projects/{project}/deidentifyTemplates/{deidentify_template}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectDeidentifyTemplateBuilder { - private String project; - private String deidentifyTemplate; - - protected ProjectDeidentifyTemplateBuilder() {} - - public String getProject() { - return project; - } - - public String getDeidentifyTemplate() { - return deidentifyTemplate; - } - - public ProjectDeidentifyTemplateBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectDeidentifyTemplateBuilder setDeidentifyTemplate(String deidentifyTemplate) { - this.deidentifyTemplate = deidentifyTemplate; - return this; - } - - public DeidentifyTemplateName build() { - return new DeidentifyTemplateName(this); - } - } - - /** - * Builder for - * organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}. - */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class OrganizationLocationDeidentifyTemplateBuilder { - private String organization; - private String location; - private String deidentifyTemplate; - - protected OrganizationLocationDeidentifyTemplateBuilder() {} - - public String getOrganization() { - return organization; - } - - public String getLocation() { - return location; - } - - public String getDeidentifyTemplate() { - return deidentifyTemplate; - } - - public OrganizationLocationDeidentifyTemplateBuilder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public OrganizationLocationDeidentifyTemplateBuilder setLocation(String location) { - this.location = location; - return this; - } - - public OrganizationLocationDeidentifyTemplateBuilder setDeidentifyTemplate( - String deidentifyTemplate) { - this.deidentifyTemplate = deidentifyTemplate; - return this; - } - - public DeidentifyTemplateName build() { - return new DeidentifyTemplateName(this); - } - } - - /** - * Builder for projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}. - */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationDeidentifyTemplateBuilder { - private String project; - private String location; - private String deidentifyTemplate; - - protected ProjectLocationDeidentifyTemplateBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDeidentifyTemplate() { - return deidentifyTemplate; - } - - public ProjectLocationDeidentifyTemplateBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationDeidentifyTemplateBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationDeidentifyTemplateBuilder setDeidentifyTemplate( - String deidentifyTemplate) { - this.deidentifyTemplate = deidentifyTemplate; - return this; - } - - public DeidentifyTemplateName build() { - return new DeidentifyTemplateName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateOrBuilder.java deleted file mode 100644 index 814d6573128d..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplateOrBuilder.java +++ /dev/null @@ -1,156 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DeidentifyTemplateOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeidentifyTemplate) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The template name.
-   * The template will have one of the following formats:
-   * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
-   * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The template name.
-   * The template will have one of the following formats:
-   * `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR
-   * `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID`
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Display name (max 256 chars).
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * Display name (max 256 chars).
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * Short description (max 256 chars).
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Short description (max 256 chars).
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * The core content of the template.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - * @return Whether the deidentifyConfig field is set. - */ - boolean hasDeidentifyConfig(); - /** - *
-   * The core content of the template.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - * @return The deidentifyConfig. - */ - com.google.privacy.dlp.v2.DeidentifyConfig getDeidentifyConfig(); - /** - *
-   * The core content of the template.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig deidentify_config = 6; - */ - com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getDeidentifyConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java deleted file mode 100644 index c9dc19088569..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for DeleteDeidentifyTemplate.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} - */ -public final class DeleteDeidentifyTemplateRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) - DeleteDeidentifyTemplateRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteDeidentifyTemplateRequest.newBuilder() to construct. - private DeleteDeidentifyTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteDeidentifyTemplateRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteDeidentifyTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteDeidentifyTemplateRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the organization and deidentify template to be deleted,
-   * for example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the organization and deidentify template to be deleted,
-   * for example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest other = (com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteDeidentifyTemplate.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest build() { - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest buildPartial() { - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest result = new com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) { - return mergeFrom((com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest other) { - if (other == com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the organization and deidentify template to be deleted,
-     * for example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the organization and deidentify template to be deleted,
-     * for example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the organization and deidentify template to be deleted,
-     * for example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and deidentify template to be deleted,
-     * for example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and deidentify template to be deleted,
-     * for example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) - private static final com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(); - } - - public static com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteDeidentifyTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteDeidentifyTemplateRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java deleted file mode 100644 index 1b8be445505a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDeidentifyTemplateRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DeleteDeidentifyTemplateRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the organization and deidentify template to be deleted,
-   * for example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the organization and deidentify template to be deleted,
-   * for example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequest.java deleted file mode 100644 index f67d450a44aa..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequest.java +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The request message for deleting a DLP job.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteDlpJobRequest} - */ -public final class DeleteDlpJobRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteDlpJobRequest) - DeleteDlpJobRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteDlpJobRequest.newBuilder() to construct. - private DeleteDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteDlpJobRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteDlpJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteDlpJobRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteDlpJobRequest.class, com.google.privacy.dlp.v2.DeleteDlpJobRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the DlpJob resource to be deleted.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the DlpJob resource to be deleted.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DeleteDlpJobRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DeleteDlpJobRequest other = (com.google.privacy.dlp.v2.DeleteDlpJobRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteDlpJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The request message for deleting a DLP job.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteDlpJobRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteDlpJobRequest) - com.google.privacy.dlp.v2.DeleteDlpJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteDlpJobRequest.class, com.google.privacy.dlp.v2.DeleteDlpJobRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DeleteDlpJobRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteDlpJobRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DeleteDlpJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteDlpJobRequest build() { - com.google.privacy.dlp.v2.DeleteDlpJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteDlpJobRequest buildPartial() { - com.google.privacy.dlp.v2.DeleteDlpJobRequest result = new com.google.privacy.dlp.v2.DeleteDlpJobRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DeleteDlpJobRequest) { - return mergeFrom((com.google.privacy.dlp.v2.DeleteDlpJobRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteDlpJobRequest other) { - if (other == com.google.privacy.dlp.v2.DeleteDlpJobRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DeleteDlpJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DeleteDlpJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the DlpJob resource to be deleted.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the DlpJob resource to be deleted.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the DlpJob resource to be deleted.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the DlpJob resource to be deleted.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the DlpJob resource to be deleted.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteDlpJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteDlpJobRequest) - private static final com.google.privacy.dlp.v2.DeleteDlpJobRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteDlpJobRequest(); - } - - public static com.google.privacy.dlp.v2.DeleteDlpJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteDlpJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteDlpJobRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteDlpJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequestOrBuilder.java deleted file mode 100644 index 655cc3ba8f3f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteDlpJobRequestOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DeleteDlpJobRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteDlpJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the DlpJob resource to be deleted.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the DlpJob resource to be deleted.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java deleted file mode 100644 index e6f1fa32f42c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for DeleteInspectTemplate.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteInspectTemplateRequest} - */ -public final class DeleteInspectTemplateRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteInspectTemplateRequest) - DeleteInspectTemplateRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteInspectTemplateRequest.newBuilder() to construct. - private DeleteInspectTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteInspectTemplateRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteInspectTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteInspectTemplateRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.class, com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the organization and inspectTemplate to be deleted, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the organization and inspectTemplate to be deleted, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DeleteInspectTemplateRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DeleteInspectTemplateRequest other = (com.google.privacy.dlp.v2.DeleteInspectTemplateRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteInspectTemplate.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteInspectTemplateRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteInspectTemplateRequest) - com.google.privacy.dlp.v2.DeleteInspectTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.class, com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteInspectTemplateRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteInspectTemplateRequest build() { - com.google.privacy.dlp.v2.DeleteInspectTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteInspectTemplateRequest buildPartial() { - com.google.privacy.dlp.v2.DeleteInspectTemplateRequest result = new com.google.privacy.dlp.v2.DeleteInspectTemplateRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DeleteInspectTemplateRequest) { - return mergeFrom((com.google.privacy.dlp.v2.DeleteInspectTemplateRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest other) { - if (other == com.google.privacy.dlp.v2.DeleteInspectTemplateRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DeleteInspectTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DeleteInspectTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be deleted, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be deleted, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be deleted, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be deleted, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be deleted, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteInspectTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteInspectTemplateRequest) - private static final com.google.privacy.dlp.v2.DeleteInspectTemplateRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteInspectTemplateRequest(); - } - - public static com.google.privacy.dlp.v2.DeleteInspectTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteInspectTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInspectTemplateRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteInspectTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java deleted file mode 100644 index abe05e45927a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteInspectTemplateRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DeleteInspectTemplateRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteInspectTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the organization and inspectTemplate to be deleted, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the organization and inspectTemplate to be deleted, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequest.java deleted file mode 100644 index a27627d77610..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for DeleteJobTrigger.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteJobTriggerRequest} - */ -public final class DeleteJobTriggerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteJobTriggerRequest) - DeleteJobTriggerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteJobTriggerRequest.newBuilder() to construct. - private DeleteJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteJobTriggerRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteJobTriggerRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteJobTriggerRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteJobTriggerRequest.class, com.google.privacy.dlp.v2.DeleteJobTriggerRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DeleteJobTriggerRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DeleteJobTriggerRequest other = (com.google.privacy.dlp.v2.DeleteJobTriggerRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteJobTriggerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteJobTrigger.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteJobTriggerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteJobTriggerRequest) - com.google.privacy.dlp.v2.DeleteJobTriggerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteJobTriggerRequest.class, com.google.privacy.dlp.v2.DeleteJobTriggerRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DeleteJobTriggerRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteJobTriggerRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DeleteJobTriggerRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteJobTriggerRequest build() { - com.google.privacy.dlp.v2.DeleteJobTriggerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteJobTriggerRequest buildPartial() { - com.google.privacy.dlp.v2.DeleteJobTriggerRequest result = new com.google.privacy.dlp.v2.DeleteJobTriggerRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DeleteJobTriggerRequest) { - return mergeFrom((com.google.privacy.dlp.v2.DeleteJobTriggerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteJobTriggerRequest other) { - if (other == com.google.privacy.dlp.v2.DeleteJobTriggerRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DeleteJobTriggerRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DeleteJobTriggerRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteJobTriggerRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteJobTriggerRequest) - private static final com.google.privacy.dlp.v2.DeleteJobTriggerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteJobTriggerRequest(); - } - - public static com.google.privacy.dlp.v2.DeleteJobTriggerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteJobTriggerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteJobTriggerRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteJobTriggerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequestOrBuilder.java deleted file mode 100644 index 7e1cba4cd1a7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteJobTriggerRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DeleteJobTriggerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteJobTriggerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java deleted file mode 100644 index 1ae63f6fc644..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for DeleteStoredInfoType.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} - */ -public final class DeleteStoredInfoTypeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) - DeleteStoredInfoTypeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteStoredInfoTypeRequest.newBuilder() to construct. - private DeleteStoredInfoTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteStoredInfoTypeRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteStoredInfoTypeRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteStoredInfoTypeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the organization and storedInfoType to be deleted, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the organization and storedInfoType to be deleted, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest other = (com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for DeleteStoredInfoType.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest build() { - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest buildPartial() { - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest result = new com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) { - return mergeFrom((com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest other) { - if (other == com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the organization and storedInfoType to be deleted, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the organization and storedInfoType to be deleted, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the organization and storedInfoType to be deleted, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and storedInfoType to be deleted, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and storedInfoType to be deleted, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) - private static final com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(); - } - - public static com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteStoredInfoTypeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteStoredInfoTypeRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java deleted file mode 100644 index 0eb61dfcec4c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeleteStoredInfoTypeRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DeleteStoredInfoTypeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the organization and storedInfoType to be deleted, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the organization and storedInfoType to be deleted, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpContentName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpContentName.java deleted file mode 100644 index fee890831a50..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpContentName.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class DlpContentName implements ResourceName { - private static final PathTemplate PROJECT = - PathTemplate.createWithoutUrlEncoding("projects/{project}/dlpContent"); - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/dlpContent"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String location; - - @Deprecated - protected DlpContentName() { - project = null; - location = null; - } - - private DlpContentName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = null; - pathTemplate = PROJECT; - } - - private DlpContentName(ProjectLocationBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - pathTemplate = PROJECT_LOCATION; - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationBuilder newProjectLocationBuilder() { - return new ProjectLocationBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static DlpContentName of(String project) { - return newBuilder().setProject(project).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static DlpContentName ofProjectName(String project) { - return newBuilder().setProject(project).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static DlpContentName ofProjectLocationName(String project, String location) { - return newProjectLocationBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project) { - return newBuilder().setProject(project).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectName(String project) { - return newBuilder().setProject(project).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationName(String project, String location) { - return newProjectLocationBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static DlpContentName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT.matches(formattedString)) { - Map matchMap = PROJECT.match(formattedString); - return ofProjectName(matchMap.get("project")); - } else if (PROJECT_LOCATION.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION.match(formattedString); - return ofProjectLocationName(matchMap.get("project"), matchMap.get("location")); - } - throw new ValidationException("DlpContentName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (DlpContentName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT.matches(formattedString) || PROJECT_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - DlpContentName that = ((DlpContentName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/dlpContent. */ - public static class Builder { - private String project; - - protected Builder() {} - - public String getProject() { - return project; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - private Builder(DlpContentName dlpContentName) { - Preconditions.checkArgument( - Objects.equals(dlpContentName.pathTemplate, PROJECT), - "toBuilder is only supported when DlpContentName has the pattern of projects/{project}/dlpContent"); - this.project = dlpContentName.project; - } - - public DlpContentName build() { - return new DlpContentName(this); - } - } - - /** Builder for projects/{project}/locations/{location}/dlpContent. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationBuilder { - private String project; - private String location; - - protected ProjectLocationBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public ProjectLocationBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationBuilder setLocation(String location) { - this.location = location; - return this; - } - - public DlpContentName build() { - return new DlpContentName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java deleted file mode 100644 index 06e845e81b5d..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJob.java +++ /dev/null @@ -1,2983 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Combines all of the information about a DLP job.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DlpJob} - */ -public final class DlpJob extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DlpJob) - DlpJobOrBuilder { -private static final long serialVersionUID = 0L; - // Use DlpJob.newBuilder() to construct. - private DlpJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DlpJob() { - name_ = ""; - type_ = 0; - state_ = 0; - jobTriggerName_ = ""; - errors_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DlpJob(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DlpJob( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 34: { - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder subBuilder = null; - if (detailsCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_).toBuilder(); - } - details_ = - input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 4; - break; - } - case 42: { - com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder subBuilder = null; - if (detailsCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.InspectDataSourceDetails) details_).toBuilder(); - } - details_ = - input.readMessage(com.google.privacy.dlp.v2.InspectDataSourceDetails.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.InspectDataSourceDetails) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 5; - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - - jobTriggerName_ = s; - break; - } - case 90: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errors_.add( - input.readMessage(com.google.privacy.dlp.v2.Error.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errors_ = java.util.Collections.unmodifiableList(errors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DlpJob.class, com.google.privacy.dlp.v2.DlpJob.Builder.class); - } - - /** - *
-   * Possible states of a job. New items may be added.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.DlpJob.JobState} - */ - public enum JobState - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * JOB_STATE_UNSPECIFIED = 0; - */ - JOB_STATE_UNSPECIFIED(0), - /** - *
-     * The job has not yet started.
-     * 
- * - * PENDING = 1; - */ - PENDING(1), - /** - *
-     * The job is currently running. Once a job has finished it will transition
-     * to FAILED or DONE.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - *
-     * The job is no longer running.
-     * 
- * - * DONE = 3; - */ - DONE(3), - /** - *
-     * The job was canceled before it could be completed.
-     * 
- * - * CANCELED = 4; - */ - CANCELED(4), - /** - *
-     * The job had an error and did not complete.
-     * 
- * - * FAILED = 5; - */ - FAILED(5), - /** - *
-     * The job is currently accepting findings via hybridInspect.
-     * A hybrid job in ACTIVE state may continue to have findings added to it
-     * through the calling of hybridInspect. After the job has finished no more
-     * calls to hybridInspect may be made. ACTIVE jobs can transition to DONE.
-     * 
- * - * ACTIVE = 6; - */ - ACTIVE(6), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * JOB_STATE_UNSPECIFIED = 0; - */ - public static final int JOB_STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The job has not yet started.
-     * 
- * - * PENDING = 1; - */ - public static final int PENDING_VALUE = 1; - /** - *
-     * The job is currently running. Once a job has finished it will transition
-     * to FAILED or DONE.
-     * 
- * - * RUNNING = 2; - */ - public static final int RUNNING_VALUE = 2; - /** - *
-     * The job is no longer running.
-     * 
- * - * DONE = 3; - */ - public static final int DONE_VALUE = 3; - /** - *
-     * The job was canceled before it could be completed.
-     * 
- * - * CANCELED = 4; - */ - public static final int CANCELED_VALUE = 4; - /** - *
-     * The job had an error and did not complete.
-     * 
- * - * FAILED = 5; - */ - public static final int FAILED_VALUE = 5; - /** - *
-     * The job is currently accepting findings via hybridInspect.
-     * A hybrid job in ACTIVE state may continue to have findings added to it
-     * through the calling of hybridInspect. After the job has finished no more
-     * calls to hybridInspect may be made. ACTIVE jobs can transition to DONE.
-     * 
- * - * ACTIVE = 6; - */ - public static final int ACTIVE_VALUE = 6; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static JobState valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static JobState forNumber(int value) { - switch (value) { - case 0: return JOB_STATE_UNSPECIFIED; - case 1: return PENDING; - case 2: return RUNNING; - case 3: return DONE; - case 4: return CANCELED; - case 5: return FAILED; - case 6: return ACTIVE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - JobState> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public JobState findValueByNumber(int number) { - return JobState.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpJob.getDescriptor().getEnumTypes().get(0); - } - - private static final JobState[] VALUES = values(); - - public static JobState valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private JobState(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DlpJob.JobState) - } - - private int detailsCase_ = 0; - private java.lang.Object details_; - public enum DetailsCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - RISK_DETAILS(4), - INSPECT_DETAILS(5), - DETAILS_NOT_SET(0); - private final int value; - private DetailsCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DetailsCase valueOf(int value) { - return forNumber(value); - } - - public static DetailsCase forNumber(int value) { - switch (value) { - case 4: return RISK_DETAILS; - case 5: return INSPECT_DETAILS; - case 0: return DETAILS_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DetailsCase - getDetailsCase() { - return DetailsCase.forNumber( - detailsCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The server-assigned name.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The server-assigned name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 2; - private int type_; - /** - *
-   * The type of job.
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 2; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The type of job.
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 2; - * @return The type. - */ - @java.lang.Override public com.google.privacy.dlp.v2.DlpJobType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_; - /** - *
-   * State of a job.
-   * 
- * - * .google.privacy.dlp.v2.DlpJob.JobState state = 3; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * State of a job.
-   * 
- * - * .google.privacy.dlp.v2.DlpJob.JobState state = 3; - * @return The state. - */ - @java.lang.Override public com.google.privacy.dlp.v2.DlpJob.JobState getState() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DlpJob.JobState result = com.google.privacy.dlp.v2.DlpJob.JobState.valueOf(state_); - return result == null ? com.google.privacy.dlp.v2.DlpJob.JobState.UNRECOGNIZED : result; - } - - public static final int RISK_DETAILS_FIELD_NUMBER = 4; - /** - *
-   * Results from analyzing risk of a data source.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - * @return Whether the riskDetails field is set. - */ - @java.lang.Override - public boolean hasRiskDetails() { - return detailsCase_ == 4; - } - /** - *
-   * Results from analyzing risk of a data source.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - * @return The riskDetails. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getRiskDetails() { - if (detailsCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); - } - /** - *
-   * Results from analyzing risk of a data source.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder getRiskDetailsOrBuilder() { - if (detailsCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); - } - - public static final int INSPECT_DETAILS_FIELD_NUMBER = 5; - /** - *
-   * Results from inspecting a data source.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - * @return Whether the inspectDetails field is set. - */ - @java.lang.Override - public boolean hasInspectDetails() { - return detailsCase_ == 5; - } - /** - *
-   * Results from inspecting a data source.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - * @return The inspectDetails. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails getInspectDetails() { - if (detailsCase_ == 5) { - return (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_; - } - return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); - } - /** - *
-   * Results from inspecting a data source.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder getInspectDetailsOrBuilder() { - if (detailsCase_ == 5) { - return (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_; - } - return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Time when the job was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Time when the job was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Time when the job was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int START_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp startTime_; - /** - *
-   * Time when the job started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 7; - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - *
-   * Time when the job started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 7; - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - *
-   * Time when the job started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 7; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * Time when the job finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 8; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * Time when the job finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 8; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * Time when the job finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 8; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int JOB_TRIGGER_NAME_FIELD_NUMBER = 10; - private volatile java.lang.Object jobTriggerName_; - /** - *
-   * If created by a job trigger, the resource name of the trigger that
-   * instantiated the job.
-   * 
- * - * string job_trigger_name = 10; - * @return The jobTriggerName. - */ - @java.lang.Override - public java.lang.String getJobTriggerName() { - java.lang.Object ref = jobTriggerName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobTriggerName_ = s; - return s; - } - } - /** - *
-   * If created by a job trigger, the resource name of the trigger that
-   * instantiated the job.
-   * 
- * - * string job_trigger_name = 10; - * @return The bytes for jobTriggerName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getJobTriggerNameBytes() { - java.lang.Object ref = jobTriggerName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jobTriggerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ERRORS_FIELD_NUMBER = 11; - private java.util.List errors_; - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - @java.lang.Override - public java.util.List getErrorsList() { - return errors_; - } - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - @java.lang.Override - public java.util.List - getErrorsOrBuilderList() { - return errors_; - } - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - @java.lang.Override - public int getErrorsCount() { - return errors_.size(); - } - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Error getErrors(int index) { - return errors_.get(index); - } - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( - int index) { - return errors_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, type_); - } - if (state_ != com.google.privacy.dlp.v2.DlpJob.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (detailsCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_); - } - if (detailsCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_); - } - if (createTime_ != null) { - output.writeMessage(6, getCreateTime()); - } - if (startTime_ != null) { - output.writeMessage(7, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(8, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobTriggerName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, jobTriggerName_); - } - for (int i = 0; i < errors_.size(); i++) { - output.writeMessage(11, errors_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, type_); - } - if (state_ != com.google.privacy.dlp.v2.DlpJob.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, state_); - } - if (detailsCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_); - } - if (detailsCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getCreateTime()); - } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobTriggerName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, jobTriggerName_); - } - for (int i = 0; i < errors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, errors_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DlpJob)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DlpJob other = (com.google.privacy.dlp.v2.DlpJob) obj; - - if (!getName() - .equals(other.getName())) return false; - if (type_ != other.type_) return false; - if (state_ != other.state_) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime() - .equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!getJobTriggerName() - .equals(other.getJobTriggerName())) return false; - if (!getErrorsList() - .equals(other.getErrorsList())) return false; - if (!getDetailsCase().equals(other.getDetailsCase())) return false; - switch (detailsCase_) { - case 4: - if (!getRiskDetails() - .equals(other.getRiskDetails())) return false; - break; - case 5: - if (!getInspectDetails() - .equals(other.getInspectDetails())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + JOB_TRIGGER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getJobTriggerName().hashCode(); - if (getErrorsCount() > 0) { - hash = (37 * hash) + ERRORS_FIELD_NUMBER; - hash = (53 * hash) + getErrorsList().hashCode(); - } - switch (detailsCase_) { - case 4: - hash = (37 * hash) + RISK_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getRiskDetails().hashCode(); - break; - case 5: - hash = (37 * hash) + INSPECT_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getInspectDetails().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DlpJob parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DlpJob parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DlpJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DlpJob parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DlpJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DlpJob parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DlpJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DlpJob parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DlpJob parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DlpJob parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DlpJob parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DlpJob parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DlpJob prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Combines all of the information about a DLP job.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DlpJob} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DlpJob) - com.google.privacy.dlp.v2.DlpJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DlpJob.class, com.google.privacy.dlp.v2.DlpJob.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DlpJob.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getErrorsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - type_ = 0; - - state_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - jobTriggerName_ = ""; - - if (errorsBuilder_ == null) { - errors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - errorsBuilder_.clear(); - } - detailsCase_ = 0; - details_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DlpJob_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJob getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DlpJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJob build() { - com.google.privacy.dlp.v2.DlpJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJob buildPartial() { - com.google.privacy.dlp.v2.DlpJob result = new com.google.privacy.dlp.v2.DlpJob(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.type_ = type_; - result.state_ = state_; - if (detailsCase_ == 4) { - if (riskDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = riskDetailsBuilder_.build(); - } - } - if (detailsCase_ == 5) { - if (inspectDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = inspectDetailsBuilder_.build(); - } - } - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - result.jobTriggerName_ = jobTriggerName_; - if (errorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - errors_ = java.util.Collections.unmodifiableList(errors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.errors_ = errors_; - } else { - result.errors_ = errorsBuilder_.build(); - } - result.detailsCase_ = detailsCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DlpJob) { - return mergeFrom((com.google.privacy.dlp.v2.DlpJob)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DlpJob other) { - if (other == com.google.privacy.dlp.v2.DlpJob.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getJobTriggerName().isEmpty()) { - jobTriggerName_ = other.jobTriggerName_; - onChanged(); - } - if (errorsBuilder_ == null) { - if (!other.errors_.isEmpty()) { - if (errors_.isEmpty()) { - errors_ = other.errors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureErrorsIsMutable(); - errors_.addAll(other.errors_); - } - onChanged(); - } - } else { - if (!other.errors_.isEmpty()) { - if (errorsBuilder_.isEmpty()) { - errorsBuilder_.dispose(); - errorsBuilder_ = null; - errors_ = other.errors_; - bitField0_ = (bitField0_ & ~0x00000001); - errorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getErrorsFieldBuilder() : null; - } else { - errorsBuilder_.addAllMessages(other.errors_); - } - } - } - switch (other.getDetailsCase()) { - case RISK_DETAILS: { - mergeRiskDetails(other.getRiskDetails()); - break; - } - case INSPECT_DETAILS: { - mergeInspectDetails(other.getInspectDetails()); - break; - } - case DETAILS_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DlpJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DlpJob) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int detailsCase_ = 0; - private java.lang.Object details_; - public DetailsCase - getDetailsCase() { - return DetailsCase.forNumber( - detailsCase_); - } - - public Builder clearDetails() { - detailsCase_ = 0; - details_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The server-assigned name.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The server-assigned name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The server-assigned name.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The server-assigned name.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The server-assigned name.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int type_ = 0; - /** - *
-     * The type of job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 2; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The type of job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 2; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 2; - * @return The type. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJobType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; - } - /** - *
-     * The type of job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 2; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.privacy.dlp.v2.DlpJobType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The type of job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 2; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private int state_ = 0; - /** - *
-     * State of a job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJob.JobState state = 3; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * State of a job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJob.JobState state = 3; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * State of a job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJob.JobState state = 3; - * @return The state. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJob.JobState getState() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DlpJob.JobState result = com.google.privacy.dlp.v2.DlpJob.JobState.valueOf(state_); - return result == null ? com.google.privacy.dlp.v2.DlpJob.JobState.UNRECOGNIZED : result; - } - /** - *
-     * State of a job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJob.JobState state = 3; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.privacy.dlp.v2.DlpJob.JobState value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * State of a job.
-     * 
- * - * .google.privacy.dlp.v2.DlpJob.JobState state = 3; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder> riskDetailsBuilder_; - /** - *
-     * Results from analyzing risk of a data source.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - * @return Whether the riskDetails field is set. - */ - @java.lang.Override - public boolean hasRiskDetails() { - return detailsCase_ == 4; - } - /** - *
-     * Results from analyzing risk of a data source.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - * @return The riskDetails. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getRiskDetails() { - if (riskDetailsBuilder_ == null) { - if (detailsCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); - } else { - if (detailsCase_ == 4) { - return riskDetailsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); - } - } - /** - *
-     * Results from analyzing risk of a data source.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - */ - public Builder setRiskDetails(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails value) { - if (riskDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - riskDetailsBuilder_.setMessage(value); - } - detailsCase_ = 4; - return this; - } - /** - *
-     * Results from analyzing risk of a data source.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - */ - public Builder setRiskDetails( - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder builderForValue) { - if (riskDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - riskDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 4; - return this; - } - /** - *
-     * Results from analyzing risk of a data source.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - */ - public Builder mergeRiskDetails(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails value) { - if (riskDetailsBuilder_ == null) { - if (detailsCase_ == 4 && - details_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance()) { - details_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 4) { - riskDetailsBuilder_.mergeFrom(value); - } else { - riskDetailsBuilder_.setMessage(value); - } - } - detailsCase_ = 4; - return this; - } - /** - *
-     * Results from analyzing risk of a data source.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - */ - public Builder clearRiskDetails() { - if (riskDetailsBuilder_ == null) { - if (detailsCase_ == 4) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 4) { - detailsCase_ = 0; - details_ = null; - } - riskDetailsBuilder_.clear(); - } - return this; - } - /** - *
-     * Results from analyzing risk of a data source.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder getRiskDetailsBuilder() { - return getRiskDetailsFieldBuilder().getBuilder(); - } - /** - *
-     * Results from analyzing risk of a data source.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder getRiskDetailsOrBuilder() { - if ((detailsCase_ == 4) && (riskDetailsBuilder_ != null)) { - return riskDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_; - } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); - } - } - /** - *
-     * Results from analyzing risk of a data source.
-     * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder> - getRiskDetailsFieldBuilder() { - if (riskDetailsBuilder_ == null) { - if (!(detailsCase_ == 4)) { - details_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.getDefaultInstance(); - } - riskDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder>( - (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 4; - onChanged();; - return riskDetailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectDataSourceDetails, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder> inspectDetailsBuilder_; - /** - *
-     * Results from inspecting a data source.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - * @return Whether the inspectDetails field is set. - */ - @java.lang.Override - public boolean hasInspectDetails() { - return detailsCase_ == 5; - } - /** - *
-     * Results from inspecting a data source.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - * @return The inspectDetails. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails getInspectDetails() { - if (inspectDetailsBuilder_ == null) { - if (detailsCase_ == 5) { - return (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_; - } - return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); - } else { - if (detailsCase_ == 5) { - return inspectDetailsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); - } - } - /** - *
-     * Results from inspecting a data source.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - */ - public Builder setInspectDetails(com.google.privacy.dlp.v2.InspectDataSourceDetails value) { - if (inspectDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - inspectDetailsBuilder_.setMessage(value); - } - detailsCase_ = 5; - return this; - } - /** - *
-     * Results from inspecting a data source.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - */ - public Builder setInspectDetails( - com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder builderForValue) { - if (inspectDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - inspectDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 5; - return this; - } - /** - *
-     * Results from inspecting a data source.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - */ - public Builder mergeInspectDetails(com.google.privacy.dlp.v2.InspectDataSourceDetails value) { - if (inspectDetailsBuilder_ == null) { - if (detailsCase_ == 5 && - details_ != com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance()) { - details_ = com.google.privacy.dlp.v2.InspectDataSourceDetails.newBuilder((com.google.privacy.dlp.v2.InspectDataSourceDetails) details_) - .mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 5) { - inspectDetailsBuilder_.mergeFrom(value); - } else { - inspectDetailsBuilder_.setMessage(value); - } - } - detailsCase_ = 5; - return this; - } - /** - *
-     * Results from inspecting a data source.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - */ - public Builder clearInspectDetails() { - if (inspectDetailsBuilder_ == null) { - if (detailsCase_ == 5) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 5) { - detailsCase_ = 0; - details_ = null; - } - inspectDetailsBuilder_.clear(); - } - return this; - } - /** - *
-     * Results from inspecting a data source.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - */ - public com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder getInspectDetailsBuilder() { - return getInspectDetailsFieldBuilder().getBuilder(); - } - /** - *
-     * Results from inspecting a data source.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder getInspectDetailsOrBuilder() { - if ((detailsCase_ == 5) && (inspectDetailsBuilder_ != null)) { - return inspectDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 5) { - return (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_; - } - return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); - } - } - /** - *
-     * Results from inspecting a data source.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectDataSourceDetails, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder> - getInspectDetailsFieldBuilder() { - if (inspectDetailsBuilder_ == null) { - if (!(detailsCase_ == 5)) { - details_ = com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); - } - inspectDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectDataSourceDetails, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder>( - (com.google.privacy.dlp.v2.InspectDataSourceDetails) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 5; - onChanged();; - return inspectDetailsBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Time when the job was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Time when the job was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time when the job was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time when the job was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time when the job was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time when the job was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time when the job was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time when the job was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Time when the job was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; - /** - *
-     * Time when the job started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 7; - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - *
-     * Time when the job started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 7; - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time when the job started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 7; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time when the job started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 7; - */ - public Builder setStartTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time when the job started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 7; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time when the job started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 7; - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time when the job started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time when the job started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - *
-     * Time when the job started.
-     * 
- * - * .google.protobuf.Timestamp start_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getStartTime(), - getParentForChildren(), - isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * Time when the job finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 8; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-     * Time when the job finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 8; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time when the job finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 8; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time when the job finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 8; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time when the job finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 8; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time when the job finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 8; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time when the job finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 8; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time when the job finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 8; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * Time when the job finished.
-     * 
- * - * .google.protobuf.Timestamp end_time = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object jobTriggerName_ = ""; - /** - *
-     * If created by a job trigger, the resource name of the trigger that
-     * instantiated the job.
-     * 
- * - * string job_trigger_name = 10; - * @return The jobTriggerName. - */ - public java.lang.String getJobTriggerName() { - java.lang.Object ref = jobTriggerName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobTriggerName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If created by a job trigger, the resource name of the trigger that
-     * instantiated the job.
-     * 
- * - * string job_trigger_name = 10; - * @return The bytes for jobTriggerName. - */ - public com.google.protobuf.ByteString - getJobTriggerNameBytes() { - java.lang.Object ref = jobTriggerName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jobTriggerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If created by a job trigger, the resource name of the trigger that
-     * instantiated the job.
-     * 
- * - * string job_trigger_name = 10; - * @param value The jobTriggerName to set. - * @return This builder for chaining. - */ - public Builder setJobTriggerName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobTriggerName_ = value; - onChanged(); - return this; - } - /** - *
-     * If created by a job trigger, the resource name of the trigger that
-     * instantiated the job.
-     * 
- * - * string job_trigger_name = 10; - * @return This builder for chaining. - */ - public Builder clearJobTriggerName() { - - jobTriggerName_ = getDefaultInstance().getJobTriggerName(); - onChanged(); - return this; - } - /** - *
-     * If created by a job trigger, the resource name of the trigger that
-     * instantiated the job.
-     * 
- * - * string job_trigger_name = 10; - * @param value The bytes for jobTriggerName to set. - * @return This builder for chaining. - */ - public Builder setJobTriggerNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobTriggerName_ = value; - onChanged(); - return this; - } - - private java.util.List errors_ = - java.util.Collections.emptyList(); - private void ensureErrorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - errors_ = new java.util.ArrayList(errors_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> errorsBuilder_; - - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public java.util.List getErrorsList() { - if (errorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(errors_); - } else { - return errorsBuilder_.getMessageList(); - } - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public int getErrorsCount() { - if (errorsBuilder_ == null) { - return errors_.size(); - } else { - return errorsBuilder_.getCount(); - } - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public com.google.privacy.dlp.v2.Error getErrors(int index) { - if (errorsBuilder_ == null) { - return errors_.get(index); - } else { - return errorsBuilder_.getMessage(index); - } - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public Builder setErrors( - int index, com.google.privacy.dlp.v2.Error value) { - if (errorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureErrorsIsMutable(); - errors_.set(index, value); - onChanged(); - } else { - errorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public Builder setErrors( - int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.set(index, builderForValue.build()); - onChanged(); - } else { - errorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public Builder addErrors(com.google.privacy.dlp.v2.Error value) { - if (errorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureErrorsIsMutable(); - errors_.add(value); - onChanged(); - } else { - errorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public Builder addErrors( - int index, com.google.privacy.dlp.v2.Error value) { - if (errorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureErrorsIsMutable(); - errors_.add(index, value); - onChanged(); - } else { - errorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public Builder addErrors( - com.google.privacy.dlp.v2.Error.Builder builderForValue) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.add(builderForValue.build()); - onChanged(); - } else { - errorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public Builder addErrors( - int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.add(index, builderForValue.build()); - onChanged(); - } else { - errorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public Builder addAllErrors( - java.lang.Iterable values) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, errors_); - onChanged(); - } else { - errorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public Builder clearErrors() { - if (errorsBuilder_ == null) { - errors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - errorsBuilder_.clear(); - } - return this; - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public Builder removeErrors(int index) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.remove(index); - onChanged(); - } else { - errorsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public com.google.privacy.dlp.v2.Error.Builder getErrorsBuilder( - int index) { - return getErrorsFieldBuilder().getBuilder(index); - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( - int index) { - if (errorsBuilder_ == null) { - return errors_.get(index); } else { - return errorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public java.util.List - getErrorsOrBuilderList() { - if (errorsBuilder_ != null) { - return errorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(errors_); - } - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder() { - return getErrorsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Error.getDefaultInstance()); - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder( - int index) { - return getErrorsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Error.getDefaultInstance()); - } - /** - *
-     * A stream of errors encountered running the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - public java.util.List - getErrorsBuilderList() { - return getErrorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> - getErrorsFieldBuilder() { - if (errorsBuilder_ == null) { - errorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder>( - errors_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - errors_ = null; - } - return errorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DlpJob) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DlpJob) - private static final com.google.privacy.dlp.v2.DlpJob DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DlpJob(); - } - - public static com.google.privacy.dlp.v2.DlpJob getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DlpJob parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DlpJob(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobName.java deleted file mode 100644 index be179c5f9631..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobName.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class DlpJobName implements ResourceName { - private static final PathTemplate PROJECT_DLP_JOB = - PathTemplate.createWithoutUrlEncoding("projects/{project}/dlpJobs/{dlp_job}"); - private static final PathTemplate PROJECT_LOCATION_DLP_JOB = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/dlpJobs/{dlp_job}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String dlpJob; - private final String location; - - @Deprecated - protected DlpJobName() { - project = null; - dlpJob = null; - location = null; - } - - private DlpJobName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - dlpJob = Preconditions.checkNotNull(builder.getDlpJob()); - location = null; - pathTemplate = PROJECT_DLP_JOB; - } - - private DlpJobName(ProjectLocationDlpJobBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dlpJob = Preconditions.checkNotNull(builder.getDlpJob()); - pathTemplate = PROJECT_LOCATION_DLP_JOB; - } - - public String getProject() { - return project; - } - - public String getDlpJob() { - return dlpJob; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectDlpJobBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationDlpJobBuilder newProjectLocationDlpJobBuilder() { - return new ProjectLocationDlpJobBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static DlpJobName of(String project, String dlpJob) { - return newBuilder().setProject(project).setDlpJob(dlpJob).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static DlpJobName ofProjectDlpJobName(String project, String dlpJob) { - return newBuilder().setProject(project).setDlpJob(dlpJob).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static DlpJobName ofProjectLocationDlpJobName( - String project, String location, String dlpJob) { - return newProjectLocationDlpJobBuilder() - .setProject(project) - .setLocation(location) - .setDlpJob(dlpJob) - .build(); - } - - public static String format(String project, String dlpJob) { - return newBuilder().setProject(project).setDlpJob(dlpJob).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectDlpJobName(String project, String dlpJob) { - return newBuilder().setProject(project).setDlpJob(dlpJob).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationDlpJobName( - String project, String location, String dlpJob) { - return newProjectLocationDlpJobBuilder() - .setProject(project) - .setLocation(location) - .setDlpJob(dlpJob) - .build() - .toString(); - } - - public static DlpJobName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT_DLP_JOB.matches(formattedString)) { - Map matchMap = PROJECT_DLP_JOB.match(formattedString); - return ofProjectDlpJobName(matchMap.get("project"), matchMap.get("dlp_job")); - } else if (PROJECT_LOCATION_DLP_JOB.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_DLP_JOB.match(formattedString); - return ofProjectLocationDlpJobName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("dlp_job")); - } - throw new ValidationException("DlpJobName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (DlpJobName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_DLP_JOB.matches(formattedString) - || PROJECT_LOCATION_DLP_JOB.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (dlpJob != null) { - fieldMapBuilder.put("dlp_job", dlpJob); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - DlpJobName that = ((DlpJobName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.dlpJob, that.dlpJob) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(dlpJob); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/dlpJobs/{dlp_job}. */ - public static class Builder { - private String project; - private String dlpJob; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getDlpJob() { - return dlpJob; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setDlpJob(String dlpJob) { - this.dlpJob = dlpJob; - return this; - } - - private Builder(DlpJobName dlpJobName) { - Preconditions.checkArgument( - Objects.equals(dlpJobName.pathTemplate, PROJECT_DLP_JOB), - "toBuilder is only supported when DlpJobName has the pattern of projects/{project}/dlpJobs/{dlp_job}"); - this.project = dlpJobName.project; - this.dlpJob = dlpJobName.dlpJob; - } - - public DlpJobName build() { - return new DlpJobName(this); - } - } - - /** Builder for projects/{project}/locations/{location}/dlpJobs/{dlp_job}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationDlpJobBuilder { - private String project; - private String location; - private String dlpJob; - - protected ProjectLocationDlpJobBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDlpJob() { - return dlpJob; - } - - public ProjectLocationDlpJobBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationDlpJobBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationDlpJobBuilder setDlpJob(String dlpJob) { - this.dlpJob = dlpJob; - return this; - } - - public DlpJobName build() { - return new DlpJobName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobOrBuilder.java deleted file mode 100644 index 87191b5f0038..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobOrBuilder.java +++ /dev/null @@ -1,270 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DlpJobOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DlpJob) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The server-assigned name.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The server-assigned name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The type of job.
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 2; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The type of job.
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 2; - * @return The type. - */ - com.google.privacy.dlp.v2.DlpJobType getType(); - - /** - *
-   * State of a job.
-   * 
- * - * .google.privacy.dlp.v2.DlpJob.JobState state = 3; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * State of a job.
-   * 
- * - * .google.privacy.dlp.v2.DlpJob.JobState state = 3; - * @return The state. - */ - com.google.privacy.dlp.v2.DlpJob.JobState getState(); - - /** - *
-   * Results from analyzing risk of a data source.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - * @return Whether the riskDetails field is set. - */ - boolean hasRiskDetails(); - /** - *
-   * Results from analyzing risk of a data source.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - * @return The riskDetails. - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails getRiskDetails(); - /** - *
-   * Results from analyzing risk of a data source.
-   * 
- * - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails risk_details = 4; - */ - com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetailsOrBuilder getRiskDetailsOrBuilder(); - - /** - *
-   * Results from inspecting a data source.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - * @return Whether the inspectDetails field is set. - */ - boolean hasInspectDetails(); - /** - *
-   * Results from inspecting a data source.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - * @return The inspectDetails. - */ - com.google.privacy.dlp.v2.InspectDataSourceDetails getInspectDetails(); - /** - *
-   * Results from inspecting a data source.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails inspect_details = 5; - */ - com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder getInspectDetailsOrBuilder(); - - /** - *
-   * Time when the job was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Time when the job was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Time when the job was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Time when the job started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 7; - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - *
-   * Time when the job started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 7; - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - *
-   * Time when the job started.
-   * 
- * - * .google.protobuf.Timestamp start_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - *
-   * Time when the job finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 8; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * Time when the job finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 8; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * Time when the job finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 8; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - *
-   * If created by a job trigger, the resource name of the trigger that
-   * instantiated the job.
-   * 
- * - * string job_trigger_name = 10; - * @return The jobTriggerName. - */ - java.lang.String getJobTriggerName(); - /** - *
-   * If created by a job trigger, the resource name of the trigger that
-   * instantiated the job.
-   * 
- * - * string job_trigger_name = 10; - * @return The bytes for jobTriggerName. - */ - com.google.protobuf.ByteString - getJobTriggerNameBytes(); - - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - java.util.List - getErrorsList(); - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - com.google.privacy.dlp.v2.Error getErrors(int index); - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - int getErrorsCount(); - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - java.util.List - getErrorsOrBuilderList(); - /** - *
-   * A stream of errors encountered running the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 11; - */ - com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( - int index); - - public com.google.privacy.dlp.v2.DlpJob.DetailsCase getDetailsCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java deleted file mode 100644 index 6c012a85217b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpJobType.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * An enum to represent the various types of DLP jobs.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.DlpJobType} - */ -public enum DlpJobType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Defaults to INSPECT_JOB.
-   * 
- * - * DLP_JOB_TYPE_UNSPECIFIED = 0; - */ - DLP_JOB_TYPE_UNSPECIFIED(0), - /** - *
-   * The job inspected Google Cloud for sensitive data.
-   * 
- * - * INSPECT_JOB = 1; - */ - INSPECT_JOB(1), - /** - *
-   * The job executed a Risk Analysis computation.
-   * 
- * - * RISK_ANALYSIS_JOB = 2; - */ - RISK_ANALYSIS_JOB(2), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Defaults to INSPECT_JOB.
-   * 
- * - * DLP_JOB_TYPE_UNSPECIFIED = 0; - */ - public static final int DLP_JOB_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-   * The job inspected Google Cloud for sensitive data.
-   * 
- * - * INSPECT_JOB = 1; - */ - public static final int INSPECT_JOB_VALUE = 1; - /** - *
-   * The job executed a Risk Analysis computation.
-   * 
- * - * RISK_ANALYSIS_JOB = 2; - */ - public static final int RISK_ANALYSIS_JOB_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DlpJobType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static DlpJobType forNumber(int value) { - switch (value) { - case 0: return DLP_JOB_TYPE_UNSPECIFIED; - case 1: return INSPECT_JOB; - case 2: return RISK_ANALYSIS_JOB; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DlpJobType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DlpJobType findValueByNumber(int number) { - return DlpJobType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(8); - } - - private static final DlpJobType[] VALUES = values(); - - public static DlpJobType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DlpJobType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.DlpJobType) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java deleted file mode 100644 index 9b76576e5966..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java +++ /dev/null @@ -1,3641 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public final class DlpProto { - private DlpProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ExclusionRule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectionRule_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectionRule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectionRuleSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ByteContentItem_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ContentItem_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ContentItem_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Table_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Table_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Table_Row_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Table_Row_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Finding_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Finding_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Location_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Location_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ContentLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_MetadataLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StorageMetadataLabel_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DocumentLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RecordLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RecordLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TableLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TableLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Container_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Container_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Range_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Range_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_BoundingBox_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_BoundingBox_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Color_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Color_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RedactImageResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectContentRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectContentResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_OutputStorageConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InfoTypeStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_HybridInspectStatistics_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InfoTypeDescription_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InfoTypeCategory_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_VersionDescription_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_QuasiId_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Value_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DateTime_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DateTime_TimeZone_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RedactConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CryptoKey_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RecordCondition_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RecordCondition_Condition_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Schedule_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Manual_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Manual_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Error_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_JobTrigger_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Action_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Action_SaveFindings_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfileAction_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfileAction_Export_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfileJobConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfileLocation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DlpJob_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StoredInfoType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_HybridContentItem_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_HybridFindingDetails_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataRiskLevel_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TableDataProfile_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_ProfileStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InfoTypeSummary_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\037google/privacy/dlp/v2/dlp.proto\022\025googl" + - "e.privacy.dlp.v2\032\034google/api/annotations" + - ".proto\032\027google/api/client.proto\032\037google/" + - "api/field_behavior.proto\032\031google/api/res" + - "ource.proto\032#google/privacy/dlp/v2/stora" + - "ge.proto\032\036google/protobuf/duration.proto" + - "\032\033google/protobuf/empty.proto\032 google/pr" + - "otobuf/field_mask.proto\032\037google/protobuf" + - "/timestamp.proto\032\027google/rpc/status.prot" + - "o\032\026google/type/date.proto\032\033google/type/d" + - "ayofweek.proto\032\033google/type/timeofday.pr" + - "oto\"G\n\020ExcludeInfoTypes\0223\n\ninfo_types\030\001 " + - "\003(\0132\037.google.privacy.dlp.v2.InfoType\"\240\002\n" + - "\rExclusionRule\022F\n\ndictionary\030\001 \001(\01320.goo" + - "gle.privacy.dlp.v2.CustomInfoType.Dictio" + - "naryH\000\022<\n\005regex\030\002 \001(\0132+.google.privacy.d" + - "lp.v2.CustomInfoType.RegexH\000\022E\n\022exclude_" + - "info_types\030\003 \001(\0132\'.google.privacy.dlp.v2" + - ".ExcludeInfoTypesH\000\022:\n\rmatching_type\030\004 \001" + - "(\0162#.google.privacy.dlp.v2.MatchingTypeB" + - "\006\n\004type\"\261\001\n\016InspectionRule\022W\n\014hotword_ru" + - "le\030\001 \001(\0132?.google.privacy.dlp.v2.CustomI" + - "nfoType.DetectionRule.HotwordRuleH\000\022>\n\016e" + - "xclusion_rule\030\002 \001(\0132$.google.privacy.dlp" + - ".v2.ExclusionRuleH\000B\006\n\004type\"~\n\021Inspectio" + - "nRuleSet\0223\n\ninfo_types\030\001 \003(\0132\037.google.pr" + - "ivacy.dlp.v2.InfoType\0224\n\005rules\030\002 \003(\0132%.g" + - "oogle.privacy.dlp.v2.InspectionRule\"\307\005\n\r" + - "InspectConfig\0223\n\ninfo_types\030\001 \003(\0132\037.goog" + - "le.privacy.dlp.v2.InfoType\0229\n\016min_likeli" + - "hood\030\002 \001(\0162!.google.privacy.dlp.v2.Likel" + - "ihood\022B\n\006limits\030\003 \001(\01322.google.privacy.d" + - "lp.v2.InspectConfig.FindingLimits\022\025\n\rinc" + - "lude_quote\030\004 \001(\010\022\032\n\022exclude_info_types\030\005" + - " \001(\010\022@\n\021custom_info_types\030\006 \003(\0132%.google" + - ".privacy.dlp.v2.CustomInfoType\022=\n\017conten" + - "t_options\030\010 \003(\0162$.google.privacy.dlp.v2." + - "ContentOption\022:\n\010rule_set\030\n \003(\0132(.google" + - ".privacy.dlp.v2.InspectionRuleSet\032\221\002\n\rFi" + - "ndingLimits\022\035\n\025max_findings_per_item\030\001 \001" + - "(\005\022 \n\030max_findings_per_request\030\002 \001(\005\022d\n\032" + - "max_findings_per_info_type\030\003 \003(\0132@.googl" + - "e.privacy.dlp.v2.InspectConfig.FindingLi" + - "mits.InfoTypeLimit\032Y\n\rInfoTypeLimit\0222\n\ti" + - "nfo_type\030\001 \001(\0132\037.google.privacy.dlp.v2.I" + - "nfoType\022\024\n\014max_findings\030\002 \001(\005\"\305\002\n\017ByteCo" + - "ntentItem\022>\n\004type\030\001 \001(\01620.google.privacy" + - ".dlp.v2.ByteContentItem.BytesType\022\014\n\004dat" + - "a\030\002 \001(\014\"\343\001\n\tBytesType\022\032\n\026BYTES_TYPE_UNSP" + - "ECIFIED\020\000\022\t\n\005IMAGE\020\006\022\016\n\nIMAGE_JPEG\020\001\022\r\n\t" + - "IMAGE_BMP\020\002\022\r\n\tIMAGE_PNG\020\003\022\r\n\tIMAGE_SVG\020" + - "\004\022\r\n\tTEXT_UTF8\020\005\022\021\n\rWORD_DOCUMENT\020\007\022\007\n\003P" + - "DF\020\010\022\027\n\023POWERPOINT_DOCUMENT\020\t\022\022\n\016EXCEL_D" + - "OCUMENT\020\n\022\010\n\004AVRO\020\013\022\007\n\003CSV\020\014\022\007\n\003TSV\020\r\"\227\001" + - "\n\013ContentItem\022\017\n\005value\030\003 \001(\tH\000\022-\n\005table\030" + - "\004 \001(\0132\034.google.privacy.dlp.v2.TableH\000\022;\n" + - "\tbyte_item\030\005 \001(\0132&.google.privacy.dlp.v2" + - ".ByteContentItemH\000B\013\n\tdata_item\"\235\001\n\005Tabl" + - "e\022/\n\007headers\030\001 \003(\0132\036.google.privacy.dlp." + - "v2.FieldId\022.\n\004rows\030\002 \003(\0132 .google.privac" + - "y.dlp.v2.Table.Row\0323\n\003Row\022,\n\006values\030\001 \003(" + - "\0132\034.google.privacy.dlp.v2.Value\"]\n\rInspe" + - "ctResult\0220\n\010findings\030\001 \003(\0132\036.google.priv" + - "acy.dlp.v2.Finding\022\032\n\022findings_truncated" + - "\030\002 \001(\010\"\337\005\n\007Finding\022\014\n\004name\030\016 \001(\t\022\r\n\005quot" + - "e\030\001 \001(\t\0222\n\tinfo_type\030\002 \001(\0132\037.google.priv" + - "acy.dlp.v2.InfoType\0225\n\nlikelihood\030\003 \001(\0162" + - "!.google.privacy.dlp.v2.Likelihood\0221\n\010lo" + - "cation\030\004 \001(\0132\037.google.privacy.dlp.v2.Loc" + - "ation\022/\n\013create_time\030\006 \001(\0132\032.google.prot" + - "obuf.Timestamp\0224\n\nquote_info\030\007 \001(\0132 .goo" + - "gle.privacy.dlp.v2.QuoteInfo\0225\n\rresource" + - "_name\030\010 \001(\tB\036\372A\033\n\031dlp.googleapis.com/Dlp" + - "Job\0228\n\014trigger_name\030\t \001(\tB\"\372A\037\n\035dlp.goog" + - "leapis.com/JobTrigger\022:\n\006labels\030\n \003(\0132*." + - "google.privacy.dlp.v2.Finding.LabelsEntr" + - "y\0223\n\017job_create_time\030\013 \001(\0132\032.google.prot" + - "obuf.Timestamp\0220\n\010job_name\030\r \001(\tB\036\372A\033\n\031d" + - "lp.googleapis.com/DlpJob\022\022\n\nfinding_id\030\017" + - " \001(\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + - "e\030\002 \001(\t:\0028\001:[\352AX\n\032dlp.googleapis.com/Fin" + - "ding\022:projects/{project}/locations/{loca" + - "tion}/findings/{finding}\"\353\001\n\010Location\0220\n" + - "\nbyte_range\030\001 \001(\0132\034.google.privacy.dlp.v" + - "2.Range\0225\n\017codepoint_range\030\002 \001(\0132\034.googl" + - "e.privacy.dlp.v2.Range\022A\n\021content_locati" + - "ons\030\007 \003(\0132&.google.privacy.dlp.v2.Conten" + - "tLocation\0223\n\tcontainer\030\010 \001(\0132 .google.pr" + - "ivacy.dlp.v2.Container\"\227\003\n\017ContentLocati" + - "on\022\026\n\016container_name\030\001 \001(\t\022@\n\017record_loc" + - "ation\030\002 \001(\0132%.google.privacy.dlp.v2.Reco" + - "rdLocationH\000\022>\n\016image_location\030\003 \001(\0132$.g" + - "oogle.privacy.dlp.v2.ImageLocationH\000\022D\n\021" + - "document_location\030\005 \001(\0132\'.google.privacy" + - ".dlp.v2.DocumentLocationH\000\022D\n\021metadata_l" + - "ocation\030\010 \001(\0132\'.google.privacy.dlp.v2.Me" + - "tadataLocationH\000\0227\n\023container_timestamp\030" + - "\006 \001(\0132\032.google.protobuf.Timestamp\022\031\n\021con" + - "tainer_version\030\007 \001(\tB\n\n\010location\"\224\001\n\020Met" + - "adataLocation\0221\n\004type\030\001 \001(\0162#.google.pri" + - "vacy.dlp.v2.MetadataType\022D\n\rstorage_labe" + - "l\030\003 \001(\0132+.google.privacy.dlp.v2.StorageM" + - "etadataLabelH\000B\007\n\005label\"#\n\024StorageMetada" + - "taLabel\022\013\n\003key\030\001 \001(\t\"\'\n\020DocumentLocation" + - "\022\023\n\013file_offset\030\001 \001(\003\"\266\001\n\016RecordLocation" + - "\0224\n\nrecord_key\030\001 \001(\0132 .google.privacy.dl" + - "p.v2.RecordKey\0220\n\010field_id\030\002 \001(\0132\036.googl" + - "e.privacy.dlp.v2.FieldId\022<\n\016table_locati" + - "on\030\003 \001(\0132$.google.privacy.dlp.v2.TableLo" + - "cation\"\"\n\rTableLocation\022\021\n\trow_index\030\001 \001" + - "(\003\"\254\001\n\tContainer\022\014\n\004type\030\001 \001(\t\022\022\n\nprojec" + - "t_id\030\002 \001(\t\022\021\n\tfull_path\030\003 \001(\t\022\021\n\troot_pa" + - "th\030\004 \001(\t\022\025\n\rrelative_path\030\005 \001(\t\022/\n\013updat" + - "e_time\030\006 \001(\0132\032.google.protobuf.Timestamp" + - "\022\017\n\007version\030\007 \001(\t\"#\n\005Range\022\r\n\005start\030\001 \001(" + - "\003\022\013\n\003end\030\002 \001(\003\"K\n\rImageLocation\022:\n\016bound" + - "ing_boxes\030\001 \003(\0132\".google.privacy.dlp.v2." + - "BoundingBox\"G\n\013BoundingBox\022\013\n\003top\030\001 \001(\005\022" + - "\014\n\004left\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\022\016\n\006height\030\004" + - " \001(\005\"\374\003\n\022RedactImageRequest\0222\n\006parent\030\001 " + - "\001(\tB\"\372A\037\022\035dlp.googleapis.com/DlpContent\022" + - "\023\n\013location_id\030\010 \001(\t\022<\n\016inspect_config\030\002" + - " \001(\0132$.google.privacy.dlp.v2.InspectConf" + - "ig\022_\n\027image_redaction_configs\030\005 \003(\0132>.go" + - "ogle.privacy.dlp.v2.RedactImageRequest.I" + - "mageRedactionConfig\022\030\n\020include_findings\030" + - "\006 \001(\010\0229\n\tbyte_item\030\007 \001(\0132&.google.privac" + - "y.dlp.v2.ByteContentItem\032\250\001\n\024ImageRedact" + - "ionConfig\0224\n\tinfo_type\030\001 \001(\0132\037.google.pr" + - "ivacy.dlp.v2.InfoTypeH\000\022\031\n\017redact_all_te" + - "xt\030\002 \001(\010H\000\0225\n\017redaction_color\030\003 \001(\0132\034.go" + - "ogle.privacy.dlp.v2.ColorB\010\n\006target\"1\n\005C" + - "olor\022\013\n\003red\030\001 \001(\002\022\r\n\005green\030\002 \001(\002\022\014\n\004blue" + - "\030\003 \001(\002\"\203\001\n\023RedactImageResponse\022\026\n\016redact" + - "ed_image\030\001 \001(\014\022\026\n\016extracted_text\030\002 \001(\t\022<" + - "\n\016inspect_result\030\003 \001(\0132$.google.privacy." + - "dlp.v2.InspectResult\"\330\002\n\030DeidentifyConte" + - "ntRequest\0222\n\006parent\030\001 \001(\tB\"\372A\037\022\035dlp.goog" + - "leapis.com/DlpContent\022B\n\021deidentify_conf" + - "ig\030\002 \001(\0132\'.google.privacy.dlp.v2.Deident" + - "ifyConfig\022<\n\016inspect_config\030\003 \001(\0132$.goog" + - "le.privacy.dlp.v2.InspectConfig\0220\n\004item\030" + - "\004 \001(\0132\".google.privacy.dlp.v2.ContentIte" + - "m\022\035\n\025inspect_template_name\030\005 \001(\t\022 \n\030deid" + - "entify_template_name\030\006 \001(\t\022\023\n\013location_i" + - "d\030\007 \001(\t\"\216\001\n\031DeidentifyContentResponse\0220\n" + - "\004item\030\001 \001(\0132\".google.privacy.dlp.v2.Cont" + - "entItem\022?\n\010overview\030\002 \001(\0132-.google.priva" + - "cy.dlp.v2.TransformationOverview\"\333\002\n\030Rei" + - "dentifyContentRequest\0225\n\006parent\030\001 \001(\tB%\340" + - "A\002\372A\037\022\035dlp.googleapis.com/DlpContent\022B\n\021" + - "reidentify_config\030\002 \001(\0132\'.google.privacy" + - ".dlp.v2.DeidentifyConfig\022<\n\016inspect_conf" + - "ig\030\003 \001(\0132$.google.privacy.dlp.v2.Inspect" + - "Config\0220\n\004item\030\004 \001(\0132\".google.privacy.dl" + - "p.v2.ContentItem\022\035\n\025inspect_template_nam" + - "e\030\005 \001(\t\022 \n\030reidentify_template_name\030\006 \001(" + - "\t\022\023\n\013location_id\030\007 \001(\t\"\216\001\n\031ReidentifyCon" + - "tentResponse\0220\n\004item\030\001 \001(\0132\".google.priv" + - "acy.dlp.v2.ContentItem\022?\n\010overview\030\002 \001(\013" + - "2-.google.privacy.dlp.v2.TransformationO" + - "verview\"\357\001\n\025InspectContentRequest\0222\n\006par" + - "ent\030\001 \001(\tB\"\372A\037\022\035dlp.googleapis.com/DlpCo" + - "ntent\022<\n\016inspect_config\030\002 \001(\0132$.google.p" + - "rivacy.dlp.v2.InspectConfig\0220\n\004item\030\003 \001(" + - "\0132\".google.privacy.dlp.v2.ContentItem\022\035\n" + - "\025inspect_template_name\030\004 \001(\t\022\023\n\013location" + - "_id\030\005 \001(\t\"N\n\026InspectContentResponse\0224\n\006r" + - "esult\030\001 \001(\0132$.google.privacy.dlp.v2.Insp" + - "ectResult\"\267\002\n\023OutputStorageConfig\0225\n\005tab" + - "le\030\001 \001(\0132$.google.privacy.dlp.v2.BigQuer" + - "yTableH\000\022N\n\routput_schema\030\003 \001(\01627.google" + - ".privacy.dlp.v2.OutputStorageConfig.Outp" + - "utSchema\"\220\001\n\014OutputSchema\022\035\n\031OUTPUT_SCHE" + - "MA_UNSPECIFIED\020\000\022\021\n\rBASIC_COLUMNS\020\001\022\017\n\013G" + - "CS_COLUMNS\020\002\022\025\n\021DATASTORE_COLUMNS\020\003\022\025\n\021B" + - "IG_QUERY_COLUMNS\020\004\022\017\n\013ALL_COLUMNS\020\005B\006\n\004t" + - "ype\"R\n\rInfoTypeStats\0222\n\tinfo_type\030\001 \001(\0132" + - "\037.google.privacy.dlp.v2.InfoType\022\r\n\005coun" + - "t\030\002 \001(\003\"\244\004\n\030InspectDataSourceDetails\022[\n\021" + - "requested_options\030\002 \001(\0132@.google.privacy" + - ".dlp.v2.InspectDataSourceDetails.Request" + - "edOptions\022F\n\006result\030\003 \001(\01326.google.priva" + - "cy.dlp.v2.InspectDataSourceDetails.Resul" + - "t\032\232\001\n\020RequestedOptions\022I\n\031snapshot_inspe" + - "ct_template\030\001 \001(\0132&.google.privacy.dlp.v" + - "2.InspectTemplate\022;\n\njob_config\030\003 \001(\0132\'." + - "google.privacy.dlp.v2.InspectJobConfig\032\305" + - "\001\n\006Result\022\027\n\017processed_bytes\030\001 \001(\003\022\035\n\025to" + - "tal_estimated_bytes\030\002 \001(\003\022=\n\017info_type_s" + - "tats\030\003 \003(\0132$.google.privacy.dlp.v2.InfoT" + - "ypeStats\022D\n\014hybrid_stats\030\007 \001(\0132..google." + - "privacy.dlp.v2.HybridInspectStatistics\"`" + - "\n\027HybridInspectStatistics\022\027\n\017processed_c" + - "ount\030\001 \001(\003\022\025\n\raborted_count\030\002 \001(\003\022\025\n\rpen" + - "ding_count\030\003 \001(\003\"\212\002\n\023InfoTypeDescription" + - "\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022@\n\014" + - "supported_by\030\003 \003(\0162*.google.privacy.dlp." + - "v2.InfoTypeSupportedBy\022\023\n\013description\030\004 " + - "\001(\t\022;\n\010versions\030\t \003(\0132).google.privacy.d" + - "lp.v2.VersionDescription\022;\n\ncategories\030\n" + - " \003(\0132\'.google.privacy.dlp.v2.InfoTypeCat" + - "egory\"\330\010\n\020InfoTypeCategory\022U\n\021location_c" + - "ategory\030\001 \001(\01628.google.privacy.dlp.v2.In" + - "foTypeCategory.LocationCategoryH\000\022U\n\021ind" + - "ustry_category\030\002 \001(\01628.google.privacy.dl" + - "p.v2.InfoTypeCategory.IndustryCategoryH\000" + - "\022M\n\rtype_category\030\003 \001(\01624.google.privacy" + - ".dlp.v2.InfoTypeCategory.TypeCategoryH\000\"" + - "\303\004\n\020LocationCategory\022\030\n\024LOCATION_UNSPECI" + - "FIED\020\000\022\n\n\006GLOBAL\020\001\022\r\n\tARGENTINA\020\002\022\r\n\tAUS" + - "TRALIA\020\003\022\013\n\007BELGIUM\020\004\022\n\n\006BRAZIL\020\005\022\n\n\006CAN" + - "ADA\020\006\022\t\n\005CHILE\020\007\022\t\n\005CHINA\020\010\022\014\n\010COLOMBIA\020" + - "\t\022\013\n\007DENMARK\020\n\022\n\n\006FRANCE\020\013\022\013\n\007FINLAND\020\014\022" + - "\013\n\007GERMANY\020\r\022\r\n\tHONG_KONG\020\016\022\t\n\005INDIA\020\017\022\r" + - "\n\tINDONESIA\020\020\022\013\n\007IRELAND\020\021\022\n\n\006ISRAEL\020\022\022\t" + - "\n\005ITALY\020\023\022\t\n\005JAPAN\020\024\022\t\n\005KOREA\020\025\022\n\n\006MEXIC" + - "O\020\026\022\023\n\017THE_NETHERLANDS\020\027\022\n\n\006NORWAY\020\030\022\014\n\010" + - "PARAGUAY\020\031\022\010\n\004PERU\020\032\022\n\n\006POLAND\020\033\022\014\n\010PORT" + - "UGAL\020\034\022\r\n\tSINGAPORE\020\035\022\020\n\014SOUTH_AFRICA\020\036\022" + - "\t\n\005SPAIN\020\037\022\n\n\006SWEDEN\020 \022\n\n\006TAIWAN\020!\022\014\n\010TH" + - "AILAND\020\"\022\n\n\006TURKEY\020#\022\022\n\016UNITED_KINGDOM\020$" + - "\022\021\n\rUNITED_STATES\020%\022\013\n\007URUGUAY\020&\022\r\n\tVENE" + - "ZUELA\020\'\022\014\n\010INTERNAL\020(\"]\n\020IndustryCategor" + - "y\022\030\n\024INDUSTRY_UNSPECIFIED\020\000\022\013\n\007FINANCE\020\001" + - "\022\n\n\006HEALTH\020\002\022\026\n\022TELECOMMUNICATIONS\020\003\"\225\001\n" + - "\014TypeCategory\022\024\n\020TYPE_UNSPECIFIED\020\000\022\007\n\003P" + - "II\020\001\022\010\n\004SPII\020\002\022\017\n\013DEMOGRAPHIC\020\003\022\016\n\nCREDE" + - "NTIAL\020\004\022\021\n\rGOVERNMENT_ID\020\005\022\014\n\010DOCUMENT\020\006" + - "\022\032\n\026CONTEXTUAL_INFORMATION\020\007B\n\n\010category" + - "\":\n\022VersionDescription\022\017\n\007version\030\001 \001(\t\022" + - "\023\n\013description\030\002 \001(\t\"b\n\024ListInfoTypesReq" + - "uest\022\016\n\006parent\030\004 \001(\t\022\025\n\rlanguage_code\030\001 " + - "\001(\t\022\016\n\006filter\030\002 \001(\t\022\023\n\013location_id\030\003 \001(\t" + - "\"W\n\025ListInfoTypesResponse\022>\n\ninfo_types\030" + - "\001 \003(\0132*.google.privacy.dlp.v2.InfoTypeDe" + - "scription\"\301\001\n\025RiskAnalysisJobConfig\022<\n\016p" + - "rivacy_metric\030\001 \001(\0132$.google.privacy.dlp" + - ".v2.PrivacyMetric\022:\n\014source_table\030\002 \001(\0132" + - "$.google.privacy.dlp.v2.BigQueryTable\022.\n" + - "\007actions\030\003 \003(\0132\035.google.privacy.dlp.v2.A" + - "ction\"\274\001\n\007QuasiId\0222\n\005field\030\001 \001(\0132\036.googl" + - "e.privacy.dlp.v2.FieldIdB\003\340A\002\0224\n\tinfo_ty" + - "pe\030\002 \001(\0132\037.google.privacy.dlp.v2.InfoTyp" + - "eH\000\022\024\n\ncustom_tag\030\003 \001(\tH\000\022*\n\010inferred\030\004 " + - "\001(\0132\026.google.protobuf.EmptyH\000B\005\n\003tag\"\276\002\n" + - "\020StatisticalTable\0228\n\005table\030\003 \001(\0132$.googl" + - "e.privacy.dlp.v2.BigQueryTableB\003\340A\002\022T\n\tq" + - "uasi_ids\030\001 \003(\0132<.google.privacy.dlp.v2.S" + - "tatisticalTable.QuasiIdentifierFieldB\003\340A" + - "\002\022?\n\022relative_frequency\030\002 \001(\0132\036.google.p" + - "rivacy.dlp.v2.FieldIdB\003\340A\002\032Y\n\024QuasiIdent" + - "ifierField\022-\n\005field\030\001 \001(\0132\036.google.priva" + - "cy.dlp.v2.FieldId\022\022\n\ncustom_tag\030\002 \001(\t\"\223\017" + - "\n\rPrivacyMetric\022[\n\026numerical_stats_confi" + - "g\030\001 \001(\01329.google.privacy.dlp.v2.PrivacyM" + - "etric.NumericalStatsConfigH\000\022_\n\030categori" + - "cal_stats_config\030\002 \001(\0132;.google.privacy." + - "dlp.v2.PrivacyMetric.CategoricalStatsCon" + - "figH\000\022S\n\022k_anonymity_config\030\003 \001(\01325.goog" + - "le.privacy.dlp.v2.PrivacyMetric.KAnonymi" + - "tyConfigH\000\022S\n\022l_diversity_config\030\004 \001(\01325" + - ".google.privacy.dlp.v2.PrivacyMetric.LDi" + - "versityConfigH\000\022\\\n\027k_map_estimation_conf" + - "ig\030\005 \001(\01329.google.privacy.dlp.v2.Privacy" + - "Metric.KMapEstimationConfigH\000\022n\n delta_p" + - "resence_estimation_config\030\006 \001(\0132B.google" + - ".privacy.dlp.v2.PrivacyMetric.DeltaPrese" + - "nceEstimationConfigH\000\032E\n\024NumericalStatsC" + - "onfig\022-\n\005field\030\001 \001(\0132\036.google.privacy.dl" + - "p.v2.FieldId\032G\n\026CategoricalStatsConfig\022-" + - "\n\005field\030\001 \001(\0132\036.google.privacy.dlp.v2.Fi" + - "eldId\032y\n\020KAnonymityConfig\0221\n\tquasi_ids\030\001" + - " \003(\0132\036.google.privacy.dlp.v2.FieldId\0222\n\t" + - "entity_id\030\002 \001(\0132\037.google.privacy.dlp.v2." + - "EntityId\032\202\001\n\020LDiversityConfig\0221\n\tquasi_i" + - "ds\030\001 \003(\0132\036.google.privacy.dlp.v2.FieldId" + - "\022;\n\023sensitive_attribute\030\002 \001(\0132\036.google.p" + - "rivacy.dlp.v2.FieldId\032\201\006\n\024KMapEstimation" + - "Config\022]\n\tquasi_ids\030\001 \003(\0132E.google.priva" + - "cy.dlp.v2.PrivacyMetric.KMapEstimationCo" + - "nfig.TaggedFieldB\003\340A\002\022\023\n\013region_code\030\002 \001" + - "(\t\022b\n\020auxiliary_tables\030\003 \003(\0132H.google.pr" + - "ivacy.dlp.v2.PrivacyMetric.KMapEstimatio" + - "nConfig.AuxiliaryTable\032\300\001\n\013TaggedField\0222" + - "\n\005field\030\001 \001(\0132\036.google.privacy.dlp.v2.Fi" + - "eldIdB\003\340A\002\0224\n\tinfo_type\030\002 \001(\0132\037.google.p" + - "rivacy.dlp.v2.InfoTypeH\000\022\024\n\ncustom_tag\030\003" + - " \001(\tH\000\022*\n\010inferred\030\004 \001(\0132\026.google.protob" + - "uf.EmptyH\000B\005\n\003tag\032\315\002\n\016AuxiliaryTable\0228\n\005" + - "table\030\003 \001(\0132$.google.privacy.dlp.v2.BigQ" + - "ueryTableB\003\340A\002\022m\n\tquasi_ids\030\001 \003(\0132U.goog" + - "le.privacy.dlp.v2.PrivacyMetric.KMapEsti" + - "mationConfig.AuxiliaryTable.QuasiIdField" + - "B\003\340A\002\022?\n\022relative_frequency\030\002 \001(\0132\036.goog" + - "le.privacy.dlp.v2.FieldIdB\003\340A\002\032Q\n\014QuasiI" + - "dField\022-\n\005field\030\001 \001(\0132\036.google.privacy.d" + - "lp.v2.FieldId\022\022\n\ncustom_tag\030\002 \001(\t\032\257\001\n\035De" + - "ltaPresenceEstimationConfig\0226\n\tquasi_ids" + - "\030\001 \003(\0132\036.google.privacy.dlp.v2.QuasiIdB\003" + - "\340A\002\022\023\n\013region_code\030\002 \001(\t\022A\n\020auxiliary_ta" + - "bles\030\003 \003(\0132\'.google.privacy.dlp.v2.Stati" + - "sticalTableB\006\n\004type\"\301\037\n\034AnalyzeDataSourc" + - "eRiskDetails\022F\n\030requested_privacy_metric" + - "\030\001 \001(\0132$.google.privacy.dlp.v2.PrivacyMe" + - "tric\022D\n\026requested_source_table\030\002 \001(\0132$.g" + - "oogle.privacy.dlp.v2.BigQueryTable\022j\n\026nu" + - "merical_stats_result\030\003 \001(\0132H.google.priv" + - "acy.dlp.v2.AnalyzeDataSourceRiskDetails." + - "NumericalStatsResultH\000\022n\n\030categorical_st" + - "ats_result\030\004 \001(\0132J.google.privacy.dlp.v2" + - ".AnalyzeDataSourceRiskDetails.Categorica" + - "lStatsResultH\000\022b\n\022k_anonymity_result\030\005 \001" + - "(\0132D.google.privacy.dlp.v2.AnalyzeDataSo" + - "urceRiskDetails.KAnonymityResultH\000\022b\n\022l_" + - "diversity_result\030\006 \001(\0132D.google.privacy." + - "dlp.v2.AnalyzeDataSourceRiskDetails.LDiv" + - "ersityResultH\000\022k\n\027k_map_estimation_resul" + - "t\030\007 \001(\0132H.google.privacy.dlp.v2.AnalyzeD" + - "ataSourceRiskDetails.KMapEstimationResul" + - "tH\000\022}\n delta_presence_estimation_result\030" + - "\t \001(\0132Q.google.privacy.dlp.v2.AnalyzeDat" + - "aSourceRiskDetails.DeltaPresenceEstimati" + - "onResultH\000\022k\n\021requested_options\030\n \001(\0132P." + - "google.privacy.dlp.v2.AnalyzeDataSourceR" + - "iskDetails.RequestedRiskAnalysisOptions\032" + - "\257\001\n\024NumericalStatsResult\022/\n\tmin_value\030\001 " + - "\001(\0132\034.google.privacy.dlp.v2.Value\022/\n\tmax" + - "_value\030\002 \001(\0132\034.google.privacy.dlp.v2.Val" + - "ue\0225\n\017quantile_values\030\004 \003(\0132\034.google.pri" + - "vacy.dlp.v2.Value\032\215\003\n\026CategoricalStatsRe" + - "sult\022\225\001\n!value_frequency_histogram_bucke" + - "ts\030\005 \003(\0132j.google.privacy.dlp.v2.Analyze" + - "DataSourceRiskDetails.CategoricalStatsRe" + - "sult.CategoricalStatsHistogramBucket\032\332\001\n" + - "\037CategoricalStatsHistogramBucket\022#\n\033valu" + - "e_frequency_lower_bound\030\001 \001(\003\022#\n\033value_f" + - "requency_upper_bound\030\002 \001(\003\022\023\n\013bucket_siz" + - "e\030\003 \001(\003\022<\n\rbucket_values\030\004 \003(\0132%.google." + - "privacy.dlp.v2.ValueFrequency\022\032\n\022bucket_" + - "value_count\030\005 \001(\003\032\265\004\n\020KAnonymityResult\022\213" + - "\001\n#equivalence_class_histogram_buckets\030\005" + - " \003(\0132^.google.privacy.dlp.v2.AnalyzeData" + - "SourceRiskDetails.KAnonymityResult.KAnon" + - "ymityHistogramBucket\032t\n\032KAnonymityEquiva" + - "lenceClass\0226\n\020quasi_ids_values\030\001 \003(\0132\034.g" + - "oogle.privacy.dlp.v2.Value\022\036\n\026equivalenc" + - "e_class_size\030\002 \001(\003\032\234\002\n\031KAnonymityHistogr" + - "amBucket\022*\n\"equivalence_class_size_lower" + - "_bound\030\001 \001(\003\022*\n\"equivalence_class_size_u" + - "pper_bound\030\002 \001(\003\022\023\n\013bucket_size\030\003 \001(\003\022v\n" + - "\rbucket_values\030\004 \003(\0132_.google.privacy.dl" + - "p.v2.AnalyzeDataSourceRiskDetails.KAnony" + - "mityResult.KAnonymityEquivalenceClass\022\032\n" + - "\022bucket_value_count\030\005 \001(\003\032\260\005\n\020LDiversity" + - "Result\022\223\001\n+sensitive_value_frequency_his" + - "togram_buckets\030\005 \003(\0132^.google.privacy.dl" + - "p.v2.AnalyzeDataSourceRiskDetails.LDiver" + - "sityResult.LDiversityHistogramBucket\032\340\001\n" + - "\032LDiversityEquivalenceClass\0226\n\020quasi_ids" + - "_values\030\001 \003(\0132\034.google.privacy.dlp.v2.Va" + - "lue\022\036\n\026equivalence_class_size\030\002 \001(\003\022%\n\035n" + - "um_distinct_sensitive_values\030\003 \001(\003\022C\n\024to" + - "p_sensitive_values\030\004 \003(\0132%.google.privac" + - "y.dlp.v2.ValueFrequency\032\242\002\n\031LDiversityHi" + - "stogramBucket\022-\n%sensitive_value_frequen" + - "cy_lower_bound\030\001 \001(\003\022-\n%sensitive_value_" + - "frequency_upper_bound\030\002 \001(\003\022\023\n\013bucket_si" + - "ze\030\003 \001(\003\022v\n\rbucket_values\030\004 \003(\0132_.google" + - ".privacy.dlp.v2.AnalyzeDataSourceRiskDet" + - "ails.LDiversityResult.LDiversityEquivale" + - "nceClass\022\032\n\022bucket_value_count\030\005 \001(\003\032\225\004\n" + - "\024KMapEstimationResult\022\212\001\n\032k_map_estimati" + - "on_histogram\030\001 \003(\0132f.google.privacy.dlp." + - "v2.AnalyzeDataSourceRiskDetails.KMapEsti" + - "mationResult.KMapEstimationHistogramBuck" + - "et\032r\n\033KMapEstimationQuasiIdValues\0226\n\020qua" + - "si_ids_values\030\001 \003(\0132\034.google.privacy.dlp" + - ".v2.Value\022\033\n\023estimated_anonymity\030\002 \001(\003\032\373" + - "\001\n\035KMapEstimationHistogramBucket\022\025\n\rmin_" + - "anonymity\030\001 \001(\003\022\025\n\rmax_anonymity\030\002 \001(\003\022\023" + - "\n\013bucket_size\030\005 \001(\003\022{\n\rbucket_values\030\006 \003" + - "(\0132d.google.privacy.dlp.v2.AnalyzeDataSo" + - "urceRiskDetails.KMapEstimationResult.KMa" + - "pEstimationQuasiIdValues\022\032\n\022bucket_value" + - "_count\030\007 \001(\003\032\344\004\n\035DeltaPresenceEstimation" + - "Result\022\245\001\n#delta_presence_estimation_his" + - "togram\030\001 \003(\0132x.google.privacy.dlp.v2.Ana" + - "lyzeDataSourceRiskDetails.DeltaPresenceE" + - "stimationResult.DeltaPresenceEstimationH" + - "istogramBucket\032}\n$DeltaPresenceEstimatio" + - "nQuasiIdValues\0226\n\020quasi_ids_values\030\001 \003(\013" + - "2\034.google.privacy.dlp.v2.Value\022\035\n\025estima" + - "ted_probability\030\002 \001(\001\032\233\002\n&DeltaPresenceE" + - "stimationHistogramBucket\022\027\n\017min_probabil" + - "ity\030\001 \001(\001\022\027\n\017max_probability\030\002 \001(\001\022\023\n\013bu" + - "cket_size\030\005 \001(\003\022\215\001\n\rbucket_values\030\006 \003(\0132" + - "v.google.privacy.dlp.v2.AnalyzeDataSourc" + - "eRiskDetails.DeltaPresenceEstimationResu" + - "lt.DeltaPresenceEstimationQuasiIdValues\022", - "\032\n\022bucket_value_count\030\007 \001(\003\032`\n\034Requested" + - "RiskAnalysisOptions\022@\n\njob_config\030\001 \001(\0132" + - ",.google.privacy.dlp.v2.RiskAnalysisJobC" + - "onfigB\010\n\006result\"L\n\016ValueFrequency\022+\n\005val" + - "ue\030\001 \001(\0132\034.google.privacy.dlp.v2.Value\022\r" + - "\n\005count\030\002 \001(\003\"\263\002\n\005Value\022\027\n\rinteger_value" + - "\030\001 \001(\003H\000\022\025\n\013float_value\030\002 \001(\001H\000\022\026\n\014strin" + - "g_value\030\003 \001(\tH\000\022\027\n\rboolean_value\030\004 \001(\010H\000" + - "\0225\n\017timestamp_value\030\005 \001(\0132\032.google.proto" + - "buf.TimestampH\000\022,\n\ntime_value\030\006 \001(\0132\026.go" + - "ogle.type.TimeOfDayH\000\022\'\n\ndate_value\030\007 \001(" + - "\0132\021.google.type.DateH\000\0223\n\021day_of_week_va" + - "lue\030\010 \001(\0162\026.google.type.DayOfWeekH\000B\006\n\004t" + - "ype\"Q\n\tQuoteInfo\0224\n\tdate_time\030\002 \001(\0132\037.go" + - "ogle.privacy.dlp.v2.DateTimeH\000B\016\n\014parsed" + - "_quote\"\337\001\n\010DateTime\022\037\n\004date\030\001 \001(\0132\021.goog" + - "le.type.Date\022+\n\013day_of_week\030\002 \001(\0162\026.goog" + - "le.type.DayOfWeek\022$\n\004time\030\003 \001(\0132\026.google" + - ".type.TimeOfDay\022;\n\ttime_zone\030\004 \001(\0132(.goo" + - "gle.privacy.dlp.v2.DateTime.TimeZone\032\"\n\010" + - "TimeZone\022\026\n\016offset_minutes\030\001 \001(\005\"\362\002\n\020Dei" + - "dentifyConfig\022S\n\031info_type_transformatio" + - "ns\030\001 \001(\0132..google.privacy.dlp.v2.InfoTyp" + - "eTransformationsH\000\022N\n\026record_transformat" + - "ions\030\002 \001(\0132,.google.privacy.dlp.v2.Recor" + - "dTransformationsH\000\022L\n\025image_transformati" + - "ons\030\004 \001(\0132+.google.privacy.dlp.v2.ImageT" + - "ransformationsH\000\022Y\n\035transformation_error" + - "_handling\030\003 \001(\01322.google.privacy.dlp.v2." + - "TransformationErrorHandlingB\020\n\016transform" + - "ation\"\345\004\n\024ImageTransformations\022S\n\ntransf" + - "orms\030\002 \003(\0132?.google.privacy.dlp.v2.Image" + - "Transformations.ImageTransformation\032\367\003\n\023" + - "ImageTransformation\022p\n\023selected_info_typ" + - "es\030\004 \001(\0132Q.google.privacy.dlp.v2.ImageTr" + - "ansformations.ImageTransformation.Select" + - "edInfoTypesH\000\022f\n\016all_info_types\030\005 \001(\0132L." + - "google.privacy.dlp.v2.ImageTransformatio" + - "ns.ImageTransformation.AllInfoTypesH\000\022[\n" + - "\010all_text\030\006 \001(\0132G.google.privacy.dlp.v2." + - "ImageTransformations.ImageTransformation" + - ".AllTextH\000\0225\n\017redaction_color\030\003 \001(\0132\034.go" + - "ogle.privacy.dlp.v2.Color\032M\n\021SelectedInf" + - "oTypes\0228\n\ninfo_types\030\005 \003(\0132\037.google.priv" + - "acy.dlp.v2.InfoTypeB\003\340A\002\032\016\n\014AllInfoTypes" + - "\032\t\n\007AllTextB\010\n\006target\"\205\002\n\033Transformation" + - "ErrorHandling\022T\n\013throw_error\030\001 \001(\0132=.goo" + - "gle.privacy.dlp.v2.TransformationErrorHa" + - "ndling.ThrowErrorH\000\022d\n\023leave_untransform" + - "ed\030\002 \001(\0132E.google.privacy.dlp.v2.Transfo" + - "rmationErrorHandling.LeaveUntransformedH" + - "\000\032\014\n\nThrowError\032\024\n\022LeaveUntransformedB\006\n" + - "\004mode\"\312\007\n\027PrimitiveTransformation\022C\n\016rep" + - "lace_config\030\001 \001(\0132).google.privacy.dlp.v" + - "2.ReplaceValueConfigH\000\022<\n\rredact_config\030" + - "\002 \001(\0132#.google.privacy.dlp.v2.RedactConf" + - "igH\000\022K\n\025character_mask_config\030\003 \001(\0132*.go" + - "ogle.privacy.dlp.v2.CharacterMaskConfigH" + - "\000\022Y\n\035crypto_replace_ffx_fpe_config\030\004 \001(\013" + - "20.google.privacy.dlp.v2.CryptoReplaceFf" + - "xFpeConfigH\000\022V\n\033fixed_size_bucketing_con" + - "fig\030\005 \001(\0132/.google.privacy.dlp.v2.FixedS" + - "izeBucketingConfigH\000\022B\n\020bucketing_config" + - "\030\006 \001(\0132&.google.privacy.dlp.v2.Bucketing" + - "ConfigH\000\022Y\n\035replace_with_info_type_confi" + - "g\030\007 \001(\01320.google.privacy.dlp.v2.ReplaceW" + - "ithInfoTypeConfigH\000\022A\n\020time_part_config\030" + - "\010 \001(\0132%.google.privacy.dlp.v2.TimePartCo" + - "nfigH\000\022E\n\022crypto_hash_config\030\t \001(\0132\'.goo" + - "gle.privacy.dlp.v2.CryptoHashConfigH\000\022C\n" + - "\021date_shift_config\030\013 \001(\0132&.google.privac" + - "y.dlp.v2.DateShiftConfigH\000\022W\n\033crypto_det" + - "erministic_config\030\014 \001(\01320.google.privacy" + - ".dlp.v2.CryptoDeterministicConfigH\000\022S\n\031r" + - "eplace_dictionary_config\030\r \001(\0132..google." + - "privacy.dlp.v2.ReplaceDictionaryConfigH\000" + - "B\020\n\016transformation\"\334\001\n\016TimePartConfig\022G\n" + - "\017part_to_extract\030\001 \001(\0162..google.privacy." + - "dlp.v2.TimePartConfig.TimePart\"\200\001\n\010TimeP" + - "art\022\031\n\025TIME_PART_UNSPECIFIED\020\000\022\010\n\004YEAR\020\001" + - "\022\t\n\005MONTH\020\002\022\020\n\014DAY_OF_MONTH\020\003\022\017\n\013DAY_OF_" + - "WEEK\020\004\022\020\n\014WEEK_OF_YEAR\020\005\022\017\n\013HOUR_OF_DAY\020" + - "\006\"H\n\020CryptoHashConfig\0224\n\ncrypto_key\030\001 \001(" + - "\0132 .google.privacy.dlp.v2.CryptoKey\"\300\001\n\031" + - "CryptoDeterministicConfig\0224\n\ncrypto_key\030" + - "\001 \001(\0132 .google.privacy.dlp.v2.CryptoKey\022" + - "<\n\023surrogate_info_type\030\002 \001(\0132\037.google.pr" + - "ivacy.dlp.v2.InfoType\022/\n\007context\030\003 \001(\0132\036" + - ".google.privacy.dlp.v2.FieldId\"E\n\022Replac" + - "eValueConfig\022/\n\tnew_value\030\001 \001(\0132\034.google" + - ".privacy.dlp.v2.Value\"q\n\027ReplaceDictiona" + - "ryConfig\022N\n\tword_list\030\001 \001(\01329.google.pri" + - "vacy.dlp.v2.CustomInfoType.Dictionary.Wo" + - "rdListH\000B\006\n\004type\"\033\n\031ReplaceWithInfoTypeC" + - "onfig\"\016\n\014RedactConfig\"\266\002\n\rCharsToIgnore\022" + - "\034\n\022characters_to_skip\030\001 \001(\tH\000\022_\n\033common_" + - "characters_to_ignore\030\002 \001(\01628.google.priv" + - "acy.dlp.v2.CharsToIgnore.CommonCharsToIg" + - "noreH\000\"\227\001\n\023CommonCharsToIgnore\022&\n\"COMMON" + - "_CHARS_TO_IGNORE_UNSPECIFIED\020\000\022\013\n\007NUMERI" + - "C\020\001\022\024\n\020ALPHA_UPPER_CASE\020\002\022\024\n\020ALPHA_LOWER" + - "_CASE\020\003\022\017\n\013PUNCTUATION\020\004\022\016\n\nWHITESPACE\020\005" + - "B\014\n\ncharacters\"\243\001\n\023CharacterMaskConfig\022\031" + - "\n\021masking_character\030\001 \001(\t\022\026\n\016number_to_m" + - "ask\030\002 \001(\005\022\025\n\rreverse_order\030\003 \001(\010\022B\n\024char" + - "acters_to_ignore\030\004 \003(\0132$.google.privacy." + - "dlp.v2.CharsToIgnore\"\244\001\n\030FixedSizeBucket" + - "ingConfig\0226\n\013lower_bound\030\001 \001(\0132\034.google." + - "privacy.dlp.v2.ValueB\003\340A\002\0226\n\013upper_bound" + - "\030\002 \001(\0132\034.google.privacy.dlp.v2.ValueB\003\340A" + - "\002\022\030\n\013bucket_size\030\003 \001(\001B\003\340A\002\"\360\001\n\017Bucketin" + - "gConfig\022>\n\007buckets\030\001 \003(\0132-.google.privac" + - "y.dlp.v2.BucketingConfig.Bucket\032\234\001\n\006Buck" + - "et\022)\n\003min\030\001 \001(\0132\034.google.privacy.dlp.v2." + - "Value\022)\n\003max\030\002 \001(\0132\034.google.privacy.dlp." + - "v2.Value\022<\n\021replacement_value\030\003 \001(\0132\034.go" + - "ogle.privacy.dlp.v2.ValueB\003\340A\002\"\371\003\n\031Crypt" + - "oReplaceFfxFpeConfig\0229\n\ncrypto_key\030\001 \001(\013" + - "2 .google.privacy.dlp.v2.CryptoKeyB\003\340A\002\022" + - "/\n\007context\030\002 \001(\0132\036.google.privacy.dlp.v2" + - ".FieldId\022c\n\017common_alphabet\030\004 \001(\0162H.goog" + - "le.privacy.dlp.v2.CryptoReplaceFfxFpeCon" + - "fig.FfxCommonNativeAlphabetH\000\022\031\n\017custom_" + - "alphabet\030\005 \001(\tH\000\022\017\n\005radix\030\006 \001(\005H\000\022<\n\023sur" + - "rogate_info_type\030\010 \001(\0132\037.google.privacy." + - "dlp.v2.InfoType\"\224\001\n\027FfxCommonNativeAlpha" + - "bet\022*\n&FFX_COMMON_NATIVE_ALPHABET_UNSPEC" + - "IFIED\020\000\022\013\n\007NUMERIC\020\001\022\017\n\013HEXADECIMAL\020\002\022\034\n" + - "\030UPPER_CASE_ALPHA_NUMERIC\020\003\022\021\n\rALPHA_NUM" + - "ERIC\020\004B\n\n\010alphabet\"\330\001\n\tCryptoKey\022>\n\ttran" + - "sient\030\001 \001(\0132).google.privacy.dlp.v2.Tran" + - "sientCryptoKeyH\000\022>\n\tunwrapped\030\002 \001(\0132).go" + - "ogle.privacy.dlp.v2.UnwrappedCryptoKeyH\000" + - "\022A\n\013kms_wrapped\030\003 \001(\0132*.google.privacy.d" + - "lp.v2.KmsWrappedCryptoKeyH\000B\010\n\006source\"\'\n" + - "\022TransientCryptoKey\022\021\n\004name\030\001 \001(\tB\003\340A\002\"&" + - "\n\022UnwrappedCryptoKey\022\020\n\003key\030\001 \001(\014B\003\340A\002\"M" + - "\n\023KmsWrappedCryptoKey\022\030\n\013wrapped_key\030\001 \001" + - "(\014B\003\340A\002\022\034\n\017crypto_key_name\030\002 \001(\tB\003\340A\002\"\302\001" + - "\n\017DateShiftConfig\022\035\n\020upper_bound_days\030\001 " + - "\001(\005B\003\340A\002\022\035\n\020lower_bound_days\030\002 \001(\005B\003\340A\002\022" + - "/\n\007context\030\003 \001(\0132\036.google.privacy.dlp.v2" + - ".FieldId\0226\n\ncrypto_key\030\004 \001(\0132 .google.pr" + - "ivacy.dlp.v2.CryptoKeyH\000B\010\n\006method\"\245\002\n\027I" + - "nfoTypeTransformations\022c\n\017transformation" + - "s\030\001 \003(\0132E.google.privacy.dlp.v2.InfoType" + - "Transformations.InfoTypeTransformationB\003" + - "\340A\002\032\244\001\n\026InfoTypeTransformation\0223\n\ninfo_t" + - "ypes\030\001 \003(\0132\037.google.privacy.dlp.v2.InfoT" + - "ype\022U\n\030primitive_transformation\030\002 \001(\0132.." + - "google.privacy.dlp.v2.PrimitiveTransform" + - "ationB\003\340A\002\"\300\002\n\023FieldTransformation\0223\n\006fi" + - "elds\030\001 \003(\0132\036.google.privacy.dlp.v2.Field" + - "IdB\003\340A\002\0229\n\tcondition\030\003 \001(\0132&.google.priv" + - "acy.dlp.v2.RecordCondition\022R\n\030primitive_" + - "transformation\030\004 \001(\0132..google.privacy.dl" + - "p.v2.PrimitiveTransformationH\000\022S\n\031info_t" + - "ype_transformations\030\005 \001(\0132..google.priva" + - "cy.dlp.v2.InfoTypeTransformationsH\000B\020\n\016t" + - "ransformation\"\251\001\n\025RecordTransformations\022" + - "I\n\025field_transformations\030\001 \003(\0132*.google." + - "privacy.dlp.v2.FieldTransformation\022E\n\023re" + - "cord_suppressions\030\002 \003(\0132(.google.privacy" + - ".dlp.v2.RecordSuppression\"N\n\021RecordSuppr" + - "ession\0229\n\tcondition\030\001 \001(\0132&.google.priva" + - "cy.dlp.v2.RecordCondition\"\334\004\n\017RecordCond" + - "ition\022G\n\013expressions\030\003 \001(\01322.google.priv" + - "acy.dlp.v2.RecordCondition.Expressions\032\256" + - "\001\n\tCondition\0222\n\005field\030\001 \001(\0132\036.google.pri" + - "vacy.dlp.v2.FieldIdB\003\340A\002\022@\n\010operator\030\003 \001" + - "(\0162).google.privacy.dlp.v2.RelationalOpe" + - "ratorB\003\340A\002\022+\n\005value\030\004 \001(\0132\034.google.priva" + - "cy.dlp.v2.Value\032R\n\nConditions\022D\n\nconditi" + - "ons\030\001 \003(\01320.google.privacy.dlp.v2.Record" + - "Condition.Condition\032\372\001\n\013Expressions\022\\\n\020l" + - "ogical_operator\030\001 \001(\0162B.google.privacy.d" + - "lp.v2.RecordCondition.Expressions.Logica" + - "lOperator\022G\n\nconditions\030\003 \001(\01321.google.p" + - "rivacy.dlp.v2.RecordCondition.Conditions" + - "H\000\"<\n\017LogicalOperator\022 \n\034LOGICAL_OPERATO" + - "R_UNSPECIFIED\020\000\022\007\n\003AND\020\001B\006\n\004type\"\203\001\n\026Tra" + - "nsformationOverview\022\031\n\021transformed_bytes" + - "\030\002 \001(\003\022N\n\030transformation_summaries\030\003 \003(\013" + - "2,.google.privacy.dlp.v2.TransformationS" + - "ummary\"\237\005\n\025TransformationSummary\0222\n\tinfo" + - "_type\030\001 \001(\0132\037.google.privacy.dlp.v2.Info" + - "Type\022-\n\005field\030\002 \001(\0132\036.google.privacy.dlp" + - ".v2.FieldId\022F\n\016transformation\030\003 \001(\0132..go" + - "ogle.privacy.dlp.v2.PrimitiveTransformat" + - "ion\022I\n\025field_transformations\030\005 \003(\0132*.goo" + - "gle.privacy.dlp.v2.FieldTransformation\022A" + - "\n\017record_suppress\030\006 \001(\0132(.google.privacy" + - ".dlp.v2.RecordSuppression\022K\n\007results\030\004 \003" + - "(\0132:.google.privacy.dlp.v2.Transformatio" + - "nSummary.SummaryResult\022\031\n\021transformed_by" + - "tes\030\007 \001(\003\032\204\001\n\rSummaryResult\022\r\n\005count\030\001 \001" + - "(\003\022S\n\004code\030\002 \001(\0162E.google.privacy.dlp.v2" + - ".TransformationSummary.TransformationRes" + - "ultCode\022\017\n\007details\030\003 \001(\t\"^\n\030Transformati" + - "onResultCode\022*\n&TRANSFORMATION_RESULT_CO" + - "DE_UNSPECIFIED\020\000\022\013\n\007SUCCESS\020\001\022\t\n\005ERROR\020\002" + - "\"\260\001\n\031TransformationDescription\0227\n\004type\030\001" + - " \001(\0162).google.privacy.dlp.v2.Transformat" + - "ionType\022\023\n\013description\030\002 \001(\t\022\021\n\tconditio" + - "n\030\003 \001(\t\0222\n\tinfo_type\030\004 \001(\0132\037.google.priv" + - "acy.dlp.v2.InfoType\"\306\002\n\025TransformationDe" + - "tails\022\025\n\rresource_name\030\001 \001(\t\022\026\n\016containe" + - "r_name\030\002 \001(\t\022H\n\016transformation\030\003 \003(\01320.g" + - "oogle.privacy.dlp.v2.TransformationDescr" + - "iption\022I\n\016status_details\030\004 \001(\01321.google." + - "privacy.dlp.v2.TransformationResultStatu" + - "s\022\031\n\021transformed_bytes\030\005 \001(\003\022N\n\027transfor" + - "mation_location\030\006 \001(\0132-.google.privacy.d" + - "lp.v2.TransformationLocation\"\331\001\n\026Transfo" + - "rmationLocation\022\024\n\nfinding_id\030\001 \001(\tH\000\022L\n" + - "\025record_transformation\030\002 \001(\0132+.google.pr" + - "ivacy.dlp.v2.RecordTransformationH\000\022J\n\016c" + - "ontainer_type\030\003 \001(\01622.google.privacy.dlp" + - ".v2.TransformationContainerTypeB\017\n\rlocat" + - "ion_type\"\234\001\n\024RecordTransformation\0220\n\010fie" + - "ld_id\030\001 \001(\0132\036.google.privacy.dlp.v2.Fiel" + - "dId\0227\n\023container_timestamp\030\002 \001(\0132\032.googl" + - "e.protobuf.Timestamp\022\031\n\021container_versio" + - "n\030\003 \001(\t\"\224\001\n\032TransformationResultStatus\022Q" + - "\n\022result_status_type\030\001 \001(\01625.google.priv" + - "acy.dlp.v2.TransformationResultStatusTyp" + - "e\022#\n\007details\030\002 \001(\0132\022.google.rpc.Status\"c" + - "\n\"TransformationDetailsStorageConfig\0225\n\005" + - "table\030\001 \001(\0132$.google.privacy.dlp.v2.BigQ" + - "ueryTableH\000B\006\n\004type\"U\n\010Schedule\022?\n\032recur" + - "rence_period_duration\030\001 \001(\0132\031.google.pro" + - "tobuf.DurationH\000B\010\n\006option\"\010\n\006Manual\"\302\004\n" + - "\017InspectTemplate\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014d" + - "isplay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\0224" + - "\n\013create_time\030\004 \001(\0132\032.google.protobuf.Ti" + - "mestampB\003\340A\003\0224\n\013update_time\030\005 \001(\0132\032.goog" + - "le.protobuf.TimestampB\003\340A\003\022<\n\016inspect_co" + - "nfig\030\006 \001(\0132$.google.privacy.dlp.v2.Inspe" + - "ctConfig:\306\002\352A\302\002\n\"dlp.googleapis.com/Insp" + - "ectTemplate\022@organizations/{organization" + - "}/inspectTemplates/{inspect_template}\0226p" + - "rojects/{project}/inspectTemplates/{insp" + - "ect_template}\022Uorganizations/{organizati" + - "on}/locations/{location}/inspectTemplate" + - "s/{inspect_template}\022Kprojects/{project}" + - "/locations/{location}/inspectTemplates/{" + - "inspect_template}\"\346\004\n\022DeidentifyTemplate" + - "\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\024\n\014display_name\030\002 \001(" + - "\t\022\023\n\013description\030\003 \001(\t\0224\n\013create_time\030\004 " + - "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013" + - "update_time\030\005 \001(\0132\032.google.protobuf.Time" + - "stampB\003\340A\003\022B\n\021deidentify_config\030\006 \001(\0132\'." + - "google.privacy.dlp.v2.DeidentifyConfig:\341" + - "\002\352A\335\002\n%dlp.googleapis.com/DeidentifyTemp" + - "late\022Forganizations/{organization}/deide" + - "ntifyTemplates/{deidentify_template}\022\n\013inspect_job\030\004 \001(\0132\'.google.privacy.d" + - "lp.v2.InspectJobConfigH\000\022;\n\010triggers\030\005 \003" + - "(\0132).google.privacy.dlp.v2.JobTrigger.Tr" + - "igger\0221\n\006errors\030\006 \003(\0132\034.google.privacy.d" + - "lp.v2.ErrorB\003\340A\003\0224\n\013create_time\030\007 \001(\0132\032." + - "google.protobuf.TimestampB\003\340A\003\0224\n\013update" + - "_time\030\010 \001(\0132\032.google.protobuf.TimestampB" + - "\003\340A\003\0226\n\rlast_run_time\030\t \001(\0132\032.google.pro" + - "tobuf.TimestampB\003\340A\003\022=\n\006status\030\n \001(\0162(.g" + - "oogle.privacy.dlp.v2.JobTrigger.StatusB\003" + - "\340A\002\032z\n\007Trigger\0223\n\010schedule\030\001 \001(\0132\037.googl" + - "e.privacy.dlp.v2.ScheduleH\000\022/\n\006manual\030\002 " + - "\001(\0132\035.google.privacy.dlp.v2.ManualH\000B\t\n\007" + - "trigger\"H\n\006Status\022\026\n\022STATUS_UNSPECIFIED\020" + - "\000\022\013\n\007HEALTHY\020\001\022\n\n\006PAUSED\020\002\022\r\n\tCANCELLED\020" + - "\003:\224\001\352A\220\001\n\035dlp.googleapis.com/JobTrigger\022" + - ",projects/{project}/jobTriggers/{job_tri" + - "gger}\022Aprojects/{project}/locations/{loc" + - "ation}/jobTriggers/{job_trigger}B\005\n\003job\"" + - "\352\010\n\006Action\022C\n\rsave_findings\030\001 \001(\0132*.goog" + - "le.privacy.dlp.v2.Action.SaveFindingsH\000\022" + - "@\n\007pub_sub\030\002 \001(\0132-.google.privacy.dlp.v2" + - ".Action.PublishToPubSubH\000\022U\n\027publish_sum" + - "mary_to_cscc\030\003 \001(\01322.google.privacy.dlp." + - "v2.Action.PublishSummaryToCsccH\000\022q\n&publ" + - "ish_findings_to_cloud_data_catalog\030\005 \001(\013" + - "2?.google.privacy.dlp.v2.Action.PublishF" + - "indingsToCloudDataCatalogH\000\022>\n\ndeidentif" + - "y\030\007 \001(\0132(.google.privacy.dlp.v2.Action.D" + - "eidentifyH\000\022V\n\027job_notification_emails\030\010" + - " \001(\01323.google.privacy.dlp.v2.Action.JobN" + - "otificationEmailsH\000\022T\n\026publish_to_stackd" + - "river\030\t \001(\01322.google.privacy.dlp.v2.Acti" + - "on.PublishToStackdriverH\000\032Q\n\014SaveFinding" + - "s\022A\n\routput_config\030\001 \001(\0132*.google.privac" + - "y.dlp.v2.OutputStorageConfig\032 \n\017PublishT" + - "oPubSub\022\r\n\005topic\030\001 \001(\t\032\026\n\024PublishSummary" + - "ToCscc\032#\n!PublishFindingsToCloudDataCata" + - "log\032\263\002\n\nDeidentify\022J\n\025transformation_con" + - "fig\030\007 \001(\0132+.google.privacy.dlp.v2.Transf" + - "ormationConfig\022h\n%transformation_details" + - "_storage_config\030\003 \001(\01329.google.privacy.d" + - "lp.v2.TransformationDetailsStorageConfig" + - "\022#\n\024cloud_storage_output\030\t \001(\tB\003\340A\002H\000\022@\n" + - "\027file_types_to_transform\030\010 \003(\0162\037.google." + - "privacy.dlp.v2.FileTypeB\010\n\006output\032\027\n\025Job" + - "NotificationEmails\032\026\n\024PublishToStackdriv" + - "erB\010\n\006action\"z\n\024TransformationConfig\022\033\n\023" + - "deidentify_template\030\001 \001(\t\022&\n\036structured_" + - "deidentify_template\030\002 \001(\t\022\035\n\025image_redac" + - "t_template\030\004 \001(\t\"\313\001\n\034CreateInspectTempla" + - "teRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\022\"dlp.g" + - "oogleapis.com/InspectTemplate\022E\n\020inspect" + - "_template\030\002 \001(\0132&.google.privacy.dlp.v2." + - "InspectTemplateB\003\340A\002\022\023\n\013template_id\030\003 \001(" + - "\t\022\023\n\013location_id\030\004 \001(\t\"\313\001\n\034UpdateInspect" + - "TemplateRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"d" + - "lp.googleapis.com/InspectTemplate\022@\n\020ins" + - "pect_template\030\002 \001(\0132&.google.privacy.dlp" + - ".v2.InspectTemplate\022/\n\013update_mask\030\003 \001(\013" + - "2\032.google.protobuf.FieldMask\"U\n\031GetInspe" + - "ctTemplateRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n" + - "\"dlp.googleapis.com/InspectTemplate\"\247\001\n\033" + - "ListInspectTemplatesRequest\022:\n\006parent\030\001 " + - "\001(\tB*\340A\002\372A$\022\"dlp.googleapis.com/InspectT" + - "emplate\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size" + - "\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013location_id\030" + - "\005 \001(\t\"z\n\034ListInspectTemplatesResponse\022A\n" + - "\021inspect_templates\030\001 \003(\0132&.google.privac" + - "y.dlp.v2.InspectTemplate\022\027\n\017next_page_to" + - "ken\030\002 \001(\t\"X\n\034DeleteInspectTemplateReques" + - "t\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"dlp.googleapis." + - "com/InspectTemplate\"\266\001\n\027CreateJobTrigger" + - "Request\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\022\035dlp.goo" + - "gleapis.com/JobTrigger\022;\n\013job_trigger\030\002 " + - "\001(\0132!.google.privacy.dlp.v2.JobTriggerB\003" + - "\340A\002\022\022\n\ntrigger_id\030\003 \001(\t\022\023\n\013location_id\030\004" + - " \001(\t\"P\n\031ActivateJobTriggerRequest\0223\n\004nam" + - "e\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleapis.com/JobT" + - "rigger\"\267\001\n\027UpdateJobTriggerRequest\0223\n\004na" + - "me\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleapis.com/Job" + - "Trigger\0226\n\013job_trigger\030\002 \001(\0132!.google.pr" + - "ivacy.dlp.v2.JobTrigger\022/\n\013update_mask\030\003" + - " \001(\0132\032.google.protobuf.FieldMask\"K\n\024GetJ" + - "obTriggerRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035" + - "dlp.googleapis.com/JobTrigger\"\366\001\n\023Create" + - "DlpJobRequest\0221\n\006parent\030\001 \001(\tB!\340A\002\372A\033\022\031d" + - "lp.googleapis.com/DlpJob\022>\n\013inspect_job\030" + - "\002 \001(\0132\'.google.privacy.dlp.v2.InspectJob" + - "ConfigH\000\022@\n\010risk_job\030\003 \001(\0132,.google.priv" + - "acy.dlp.v2.RiskAnalysisJobConfigH\000\022\016\n\006jo" + - "b_id\030\004 \001(\t\022\023\n\013location_id\030\005 \001(\tB\005\n\003job\"\336" + - "\001\n\026ListJobTriggersRequest\0225\n\006parent\030\001 \001(" + - "\tB%\340A\002\372A\037\022\035dlp.googleapis.com/JobTrigger" + - "\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022" + - "\020\n\010order_by\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t\022/\n\004typ" + - "e\030\006 \001(\0162!.google.privacy.dlp.v2.DlpJobTy" + - "pe\022\023\n\013location_id\030\007 \001(\t\"k\n\027ListJobTrigge" + - "rsResponse\0227\n\014job_triggers\030\001 \003(\0132!.googl" + - "e.privacy.dlp.v2.JobTrigger\022\027\n\017next_page" + - "_token\030\002 \001(\t\"N\n\027DeleteJobTriggerRequest\022" + - "3\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035dlp.googleapis.co" + - "m/JobTrigger\"\335\001\n\020InspectJobConfig\022<\n\016sto" + - "rage_config\030\001 \001(\0132$.google.privacy.dlp.v" + - "2.StorageConfig\022<\n\016inspect_config\030\002 \001(\0132" + - "$.google.privacy.dlp.v2.InspectConfig\022\035\n" + - "\025inspect_template_name\030\003 \001(\t\022.\n\007actions\030" + - "\004 \003(\0132\035.google.privacy.dlp.v2.Action\"\355\005\n" + - "\021DataProfileAction\022F\n\013export_data\030\001 \001(\0132" + - "/.google.privacy.dlp.v2.DataProfileActio" + - "n.ExportH\000\022[\n\024pub_sub_notification\030\002 \001(\013" + - "2;.google.privacy.dlp.v2.DataProfileActi" + - "on.PubSubNotificationH\000\032E\n\006Export\022;\n\rpro" + - "file_table\030\001 \001(\0132$.google.privacy.dlp.v2" + - ".BigQueryTable\032\352\002\n\022PubSubNotification\022\r\n" + - "\005topic\030\001 \001(\t\022A\n\005event\030\002 \001(\01622.google.pri" + - "vacy.dlp.v2.DataProfileAction.EventType\022" + - "K\n\020pubsub_condition\030\003 \001(\01321.google.priva" + - "cy.dlp.v2.DataProfilePubSubCondition\022b\n\021" + - "detail_of_message\030\004 \001(\0162G.google.privacy" + - ".dlp.v2.DataProfileAction.PubSubNotifica" + - "tion.DetailLevel\"Q\n\013DetailLevel\022\034\n\030DETAI" + - "L_LEVEL_UNSPECIFIED\020\000\022\021\n\rTABLE_PROFILE\020\001" + - "\022\021\n\rRESOURCE_NAME\020\002\"u\n\tEventType\022\032\n\026EVEN" + - "T_TYPE_UNSPECIFIED\020\000\022\017\n\013NEW_PROFILE\020\001\022\023\n" + - "\017CHANGED_PROFILE\020\002\022\023\n\017SCORE_INCREASED\020\003\022" + - "\021\n\rERROR_CHANGED\020\004B\010\n\006action\"\313\001\n\024DataPro" + - "fileJobConfig\022<\n\010location\030\001 \001(\0132*.google" + - ".privacy.dlp.v2.DataProfileLocation\022\022\n\np" + - "roject_id\030\005 \001(\t\022\031\n\021inspect_templates\030\007 \003" + - "(\t\022F\n\024data_profile_actions\030\006 \003(\0132(.googl" + - "e.privacy.dlp.v2.DataProfileAction\"Q\n\023Da" + - "taProfileLocation\022\031\n\017organization_id\030\001 \001" + - "(\003H\000\022\023\n\tfolder_id\030\002 \001(\003H\000B\n\n\010location\"\353\005", - "\n\006DlpJob\022\014\n\004name\030\001 \001(\t\022/\n\004type\030\002 \001(\0162!.g" + - "oogle.privacy.dlp.v2.DlpJobType\0225\n\005state" + - "\030\003 \001(\0162&.google.privacy.dlp.v2.DlpJob.Jo" + - "bState\022K\n\014risk_details\030\004 \001(\01323.google.pr" + - "ivacy.dlp.v2.AnalyzeDataSourceRiskDetail" + - "sH\000\022J\n\017inspect_details\030\005 \001(\0132/.google.pr" + - "ivacy.dlp.v2.InspectDataSourceDetailsH\000\022" + - "/\n\013create_time\030\006 \001(\0132\032.google.protobuf.T" + - "imestamp\022.\n\nstart_time\030\007 \001(\0132\032.google.pr" + - "otobuf.Timestamp\022,\n\010end_time\030\010 \001(\0132\032.goo" + - "gle.protobuf.Timestamp\022\030\n\020job_trigger_na" + - "me\030\n \001(\t\022,\n\006errors\030\013 \003(\0132\034.google.privac" + - "y.dlp.v2.Error\"o\n\010JobState\022\031\n\025JOB_STATE_" + - "UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022" + - "\010\n\004DONE\020\003\022\014\n\010CANCELED\020\004\022\n\n\006FAILED\020\005\022\n\n\006A" + - "CTIVE\020\006:\177\352A|\n\031dlp.googleapis.com/DlpJob\022" + - "$projects/{project}/dlpJobs/{dlp_job}\0229p" + - "rojects/{project}/locations/{location}/d" + - "lpJobs/{dlp_job}B\t\n\007details\"C\n\020GetDlpJob" + - "Request\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.googl" + - "eapis.com/DlpJob\"\326\001\n\022ListDlpJobsRequest\022" + - "1\n\006parent\030\004 \001(\tB!\340A\002\372A\033\022\031dlp.googleapis." + - "com/DlpJob\022\016\n\006filter\030\001 \001(\t\022\021\n\tpage_size\030" + - "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022/\n\004type\030\005 \001(\0162" + - "!.google.privacy.dlp.v2.DlpJobType\022\020\n\010or" + - "der_by\030\006 \001(\t\022\023\n\013location_id\030\007 \001(\t\"[\n\023Lis" + - "tDlpJobsResponse\022+\n\004jobs\030\001 \003(\0132\035.google." + - "privacy.dlp.v2.DlpJob\022\027\n\017next_page_token" + - "\030\002 \001(\t\"F\n\023CancelDlpJobRequest\022/\n\004name\030\001 " + - "\001(\tB!\340A\002\372A\033\n\031dlp.googleapis.com/DlpJob\"F" + - "\n\023FinishDlpJobRequest\022/\n\004name\030\001 \001(\tB!\340A\002" + - "\372A\033\n\031dlp.googleapis.com/DlpJob\"F\n\023Delete" + - "DlpJobRequest\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp" + - ".googleapis.com/DlpJob\"\327\001\n\037CreateDeident" + - "ifyTemplateRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372" + - "A\'\022%dlp.googleapis.com/DeidentifyTemplat" + - "e\022K\n\023deidentify_template\030\002 \001(\0132).google." + - "privacy.dlp.v2.DeidentifyTemplateB\003\340A\002\022\023" + - "\n\013template_id\030\003 \001(\t\022\023\n\013location_id\030\004 \001(\t" + - "\"\327\001\n\037UpdateDeidentifyTemplateRequest\022;\n\004" + - "name\030\001 \001(\tB-\340A\002\372A\'\n%dlp.googleapis.com/D" + - "eidentifyTemplate\022F\n\023deidentify_template" + - "\030\002 \001(\0132).google.privacy.dlp.v2.Deidentif" + - "yTemplate\022/\n\013update_mask\030\003 \001(\0132\032.google." + - "protobuf.FieldMask\"[\n\034GetDeidentifyTempl" + - "ateRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%dlp.go" + - "ogleapis.com/DeidentifyTemplate\"\255\001\n\036List" + - "DeidentifyTemplatesRequest\022=\n\006parent\030\001 \001" + - "(\tB-\340A\002\372A\'\022%dlp.googleapis.com/Deidentif" + - "yTemplate\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_si" + - "ze\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013location_i" + - "d\030\005 \001(\t\"\203\001\n\037ListDeidentifyTemplatesRespo" + - "nse\022G\n\024deidentify_templates\030\001 \003(\0132).goog" + - "le.privacy.dlp.v2.DeidentifyTemplate\022\027\n\017" + - "next_page_token\030\002 \001(\t\"^\n\037DeleteDeidentif" + - "yTemplateRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%" + - "dlp.googleapis.com/DeidentifyTemplate\"\364\001" + - "\n\033LargeCustomDictionaryConfig\022<\n\013output_" + - "path\030\001 \001(\0132\'.google.privacy.dlp.v2.Cloud" + - "StoragePath\022L\n\026cloud_storage_file_set\030\002 " + - "\001(\0132*.google.privacy.dlp.v2.CloudStorage" + - "FileSetH\000\022?\n\017big_query_field\030\003 \001(\0132$.goo" + - "gle.privacy.dlp.v2.BigQueryFieldH\000B\010\n\006so" + - "urce\"8\n\032LargeCustomDictionaryStats\022\032\n\022ap" + - "prox_num_phrases\030\001 \001(\003\"\246\002\n\024StoredInfoTyp" + - "eConfig\022\024\n\014display_name\030\001 \001(\t\022\023\n\013descrip" + - "tion\030\002 \001(\t\022U\n\027large_custom_dictionary\030\003 " + - "\001(\01322.google.privacy.dlp.v2.LargeCustomD" + - "ictionaryConfigH\000\022F\n\ndictionary\030\004 \001(\01320." + - "google.privacy.dlp.v2.CustomInfoType.Dic" + - "tionaryH\000\022<\n\005regex\030\005 \001(\0132+.google.privac" + - "y.dlp.v2.CustomInfoType.RegexH\000B\006\n\004type\"" + - "s\n\023StoredInfoTypeStats\022T\n\027large_custom_d" + - "ictionary\030\001 \001(\01321.google.privacy.dlp.v2." + - "LargeCustomDictionaryStatsH\000B\006\n\004type\"\251\002\n" + - "\025StoredInfoTypeVersion\022;\n\006config\030\001 \001(\0132+" + - ".google.privacy.dlp.v2.StoredInfoTypeCon" + - "fig\022/\n\013create_time\030\002 \001(\0132\032.google.protob" + - "uf.Timestamp\0229\n\005state\030\003 \001(\0162*.google.pri" + - "vacy.dlp.v2.StoredInfoTypeState\022,\n\006error" + - "s\030\004 \003(\0132\034.google.privacy.dlp.v2.Error\0229\n" + - "\005stats\030\005 \001(\0132*.google.privacy.dlp.v2.Sto" + - "redInfoTypeStats\"\361\003\n\016StoredInfoType\022\014\n\004n" + - "ame\030\001 \001(\t\022E\n\017current_version\030\002 \001(\0132,.goo" + - "gle.privacy.dlp.v2.StoredInfoTypeVersion" + - "\022F\n\020pending_versions\030\003 \003(\0132,.google.priv" + - "acy.dlp.v2.StoredInfoTypeVersion:\301\002\352A\275\002\n" + - "!dlp.googleapis.com/StoredInfoType\022?orga" + - "nizations/{organization}/storedInfoTypes" + - "/{stored_info_type}\0225projects/{project}/" + - "storedInfoTypes/{stored_info_type}\022Torga" + - "nizations/{organization}/locations/{loca" + - "tion}/storedInfoTypes/{stored_info_type}" + - "\022Jprojects/{project}/locations/{location" + - "}/storedInfoTypes/{stored_info_type}\"\314\001\n" + - "\033CreateStoredInfoTypeRequest\0229\n\006parent\030\001" + - " \001(\tB)\340A\002\372A#\022!dlp.googleapis.com/StoredI" + - "nfoType\022@\n\006config\030\002 \001(\0132+.google.privacy" + - ".dlp.v2.StoredInfoTypeConfigB\003\340A\002\022\033\n\023sto" + - "red_info_type_id\030\003 \001(\t\022\023\n\013location_id\030\004 " + - "\001(\t\"\304\001\n\033UpdateStoredInfoTypeRequest\0227\n\004n" + - "ame\030\001 \001(\tB)\340A\002\372A#\n!dlp.googleapis.com/St" + - "oredInfoType\022;\n\006config\030\002 \001(\0132+.google.pr" + - "ivacy.dlp.v2.StoredInfoTypeConfig\022/\n\013upd" + - "ate_mask\030\003 \001(\0132\032.google.protobuf.FieldMa" + - "sk\"S\n\030GetStoredInfoTypeRequest\0227\n\004name\030\001" + - " \001(\tB)\340A\002\372A#\n!dlp.googleapis.com/StoredI" + - "nfoType\"\245\001\n\032ListStoredInfoTypesRequest\0229" + - "\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!dlp.googleapis.c" + - "om/StoredInfoType\022\022\n\npage_token\030\002 \001(\t\022\021\n" + - "\tpage_size\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\022\023\n\013lo" + - "cation_id\030\005 \001(\t\"x\n\033ListStoredInfoTypesRe" + - "sponse\022@\n\021stored_info_types\030\001 \003(\0132%.goog" + - "le.privacy.dlp.v2.StoredInfoType\022\027\n\017next" + - "_page_token\030\002 \001(\t\"V\n\033DeleteStoredInfoTyp" + - "eRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!dlp.goog" + - "leapis.com/StoredInfoType\"\224\001\n\036HybridInsp" + - "ectJobTriggerRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372" + - "A\037\n\035dlp.googleapis.com/JobTrigger\022=\n\013hyb" + - "rid_item\030\003 \001(\0132(.google.privacy.dlp.v2.H" + - "ybridContentItem\"\214\001\n\032HybridInspectDlpJob" + - "Request\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031dlp.googl" + - "eapis.com/DlpJob\022=\n\013hybrid_item\030\003 \001(\0132(." + - "google.privacy.dlp.v2.HybridContentItem\"" + - "\213\001\n\021HybridContentItem\0220\n\004item\030\001 \001(\0132\".go" + - "ogle.privacy.dlp.v2.ContentItem\022D\n\017findi" + - "ng_details\030\002 \001(\0132+.google.privacy.dlp.v2" + - ".HybridFindingDetails\"\260\002\n\024HybridFindingD" + - "etails\022;\n\021container_details\030\001 \001(\0132 .goog" + - "le.privacy.dlp.v2.Container\022\023\n\013file_offs" + - "et\030\002 \001(\003\022\022\n\nrow_offset\030\003 \001(\003\022:\n\rtable_op" + - "tions\030\004 \001(\0132#.google.privacy.dlp.v2.Tabl" + - "eOptions\022G\n\006labels\030\005 \003(\01327.google.privac" + - "y.dlp.v2.HybridFindingDetails.LabelsEntr" + - "y\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + - " \001(\t:\0028\001\"\027\n\025HybridInspectResponse\"\271\001\n\rDa" + - "taRiskLevel\022F\n\005score\030\001 \001(\01627.google.priv" + - "acy.dlp.v2.DataRiskLevel.DataRiskLevelSc" + - "ore\"`\n\022DataRiskLevelScore\022\032\n\026RISK_SCORE_" + - "UNSPECIFIED\020\000\022\014\n\010RISK_LOW\020\n\022\021\n\rRISK_MODE" + - "RATE\020\024\022\r\n\tRISK_HIGH\020\036\"\240\001\n\031DataProfileCon" + - "figSnapshot\022<\n\016inspect_config\030\002 \001(\0132$.go" + - "ogle.privacy.dlp.v2.InspectConfig\022E\n\020dat" + - "a_profile_job\030\003 \001(\0132+.google.privacy.dlp" + - ".v2.DataProfileJobConfig\"\232\n\n\020TableDataPr" + - "ofile\022\014\n\004name\030\001 \001(\t\022\034\n\024project_data_prof" + - "ile\030\002 \001(\t\022\032\n\022dataset_project_id\030\030 \001(\t\022\030\n" + - "\020dataset_location\030\035 \001(\t\022\022\n\ndataset_id\030\031 " + - "\001(\t\022\020\n\010table_id\030\032 \001(\t\022\025\n\rfull_resource\030\003" + - " \001(\t\022<\n\016profile_status\030\025 \001(\0132$.google.pr" + - "ivacy.dlp.v2.ProfileStatus\022<\n\005state\030\026 \001(" + - "\0162-.google.privacy.dlp.v2.TableDataProfi" + - "le.State\022B\n\021sensitivity_score\030\005 \001(\0132\'.go" + - "ogle.privacy.dlp.v2.SensitivityScore\022=\n\017" + - "data_risk_level\030\006 \001(\0132$.google.privacy.d" + - "lp.v2.DataRiskLevel\022D\n\024predicted_info_ty" + - "pes\030\033 \003(\0132&.google.privacy.dlp.v2.InfoTy" + - "peSummary\022E\n\020other_info_types\030\034 \003(\0132+.go" + - "ogle.privacy.dlp.v2.OtherInfoTypeSummary" + - "\022I\n\017config_snapshot\030\007 \001(\01320.google.priva" + - "cy.dlp.v2.DataProfileConfigSnapshot\0226\n\022l" + - "ast_modified_time\030\010 \001(\0132\032.google.protobu" + - "f.Timestamp\0223\n\017expiration_time\030\t \001(\0132\032.g" + - "oogle.protobuf.Timestamp\022\034\n\024scanned_colu" + - "mn_count\030\n \001(\003\022\033\n\023failed_column_count\030\013 " + - "\001(\003\022\030\n\020table_size_bytes\030\014 \001(\003\022\021\n\trow_cou" + - "nt\030\r \001(\003\022B\n\021encryption_status\030\016 \001(\0162\'.go" + - "ogle.privacy.dlp.v2.EncryptionStatus\022F\n\023" + - "resource_visibility\030\017 \001(\0162).google.priva" + - "cy.dlp.v2.ResourceVisibility\022:\n\026profile_" + - "last_generated\030\020 \001(\0132\032.google.protobuf.T" + - "imestamp\022T\n\017resource_labels\030\021 \003(\0132;.goog" + - "le.privacy.dlp.v2.TableDataProfile.Resou" + - "rceLabelsEntry\022/\n\013create_time\030\027 \001(\0132\032.go" + - "ogle.protobuf.Timestamp\0325\n\023ResourceLabel" + - "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"5" + - "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNIN" + - "G\020\001\022\010\n\004DONE\020\002\"b\n\rProfileStatus\022\"\n\006status" + - "\030\001 \001(\0132\022.google.rpc.Status\022-\n\ttimestamp\030" + - "\003 \001(\0132\032.google.protobuf.Timestamp\"c\n\017Inf" + - "oTypeSummary\0222\n\tinfo_type\030\001 \001(\0132\037.google" + - ".privacy.dlp.v2.InfoType\022\034\n\024estimated_pr" + - "evalence\030\002 \001(\005\"h\n\024OtherInfoTypeSummary\0222" + - "\n\tinfo_type\030\001 \001(\0132\037.google.privacy.dlp.v" + - "2.InfoType\022\034\n\024estimated_prevalence\030\002 \001(\005" + - "\"\352\005\n\032DataProfilePubSubCondition\022X\n\013expre" + - "ssions\030\001 \001(\0132C.google.privacy.dlp.v2.Dat" + - "aProfilePubSubCondition.PubSubExpression" + - "s\032\351\001\n\017PubSubCondition\022b\n\022minimum_risk_sc" + - "ore\030\001 \001(\0162D.google.privacy.dlp.v2.DataPr" + - "ofilePubSubCondition.ProfileScoreBucketH" + - "\000\022i\n\031minimum_sensitivity_score\030\002 \001(\0162D.g" + - "oogle.privacy.dlp.v2.DataProfilePubSubCo" + - "ndition.ProfileScoreBucketH\000B\007\n\005value\032\253\002" + - "\n\021PubSubExpressions\022s\n\020logical_operator\030" + - "\001 \001(\0162Y.google.privacy.dlp.v2.DataProfil" + - "ePubSubCondition.PubSubExpressions.PubSu" + - "bLogicalOperator\022U\n\nconditions\030\002 \003(\0132A.g" + - "oogle.privacy.dlp.v2.DataProfilePubSubCo" + - "ndition.PubSubCondition\"J\n\025PubSubLogical" + - "Operator\022 \n\034LOGICAL_OPERATOR_UNSPECIFIED" + - "\020\000\022\006\n\002OR\020\001\022\007\n\003AND\020\002\"X\n\022ProfileScoreBucke" + - "t\022$\n PROFILE_SCORE_BUCKET_UNSPECIFIED\020\000\022" + - "\010\n\004HIGH\020\001\022\022\n\016MEDIUM_OR_HIGH\020\002\"\227\001\n\030DataPr" + - "ofilePubSubMessage\0228\n\007profile\030\001 \001(\0132\'.go" + - "ogle.privacy.dlp.v2.TableDataProfile\022A\n\005" + - "event\030\002 \001(\01622.google.privacy.dlp.v2.Data" + - "ProfileAction.EventType*\240\001\n\036Transformati" + - "onResultStatusType\022\032\n\026STATE_TYPE_UNSPECI" + - "FIED\020\000\022\025\n\021INVALID_TRANSFORM\020\001\022\"\n\036BIGQUER" + - "Y_MAX_ROW_SIZE_EXCEEDED\020\002\022\032\n\026METADATA_UN" + - "RETRIEVABLE\020\003\022\013\n\007SUCCESS\020\004*\177\n\033Transforma" + - "tionContainerType\022\037\n\033TRANSFORM_UNKNOWN_C" + - "ONTAINER\020\000\022\022\n\016TRANSFORM_BODY\020\001\022\026\n\022TRANSF" + - "ORM_METADATA\020\002\022\023\n\017TRANSFORM_TABLE\020\003*\340\002\n\022" + - "TransformationType\022#\n\037TRANSFORMATION_TYP" + - "E_UNSPECIFIED\020\000\022\026\n\022RECORD_SUPPRESSION\020\001\022" + - "\021\n\rREPLACE_VALUE\020\002\022\026\n\022REPLACE_DICTIONARY" + - "\020\017\022\n\n\006REDACT\020\003\022\022\n\016CHARACTER_MASK\020\004\022\032\n\026CR" + - "YPTO_REPLACE_FFX_FPE\020\005\022\030\n\024FIXED_SIZE_BUC" + - "KETING\020\006\022\r\n\tBUCKETING\020\007\022\032\n\026REPLACE_WITH_" + - "INFO_TYPE\020\010\022\r\n\tTIME_PART\020\t\022\017\n\013CRYPTO_HAS" + - "H\020\n\022\016\n\nDATE_SHIFT\020\014\022\037\n\033CRYPTO_DETERMINIS" + - "TIC_CONFIG\020\r\022\020\n\014REDACT_IMAGE\020\016*\273\001\n\022Relat" + - "ionalOperator\022#\n\037RELATIONAL_OPERATOR_UNS" + - "PECIFIED\020\000\022\014\n\010EQUAL_TO\020\001\022\020\n\014NOT_EQUAL_TO" + - "\020\002\022\020\n\014GREATER_THAN\020\003\022\r\n\tLESS_THAN\020\004\022\032\n\026G" + - "REATER_THAN_OR_EQUALS\020\005\022\027\n\023LESS_THAN_OR_" + - "EQUALS\020\006\022\n\n\006EXISTS\020\007*\215\001\n\014MatchingType\022\035\n" + - "\031MATCHING_TYPE_UNSPECIFIED\020\000\022\034\n\030MATCHING" + - "_TYPE_FULL_MATCH\020\001\022\037\n\033MATCHING_TYPE_PART" + - "IAL_MATCH\020\002\022\037\n\033MATCHING_TYPE_INVERSE_MAT" + - "CH\020\003*M\n\rContentOption\022\027\n\023CONTENT_UNSPECI" + - "FIED\020\000\022\020\n\014CONTENT_TEXT\020\001\022\021\n\rCONTENT_IMAG" + - "E\020\002*B\n\014MetadataType\022\034\n\030METADATATYPE_UNSP" + - "ECIFIED\020\000\022\024\n\020STORAGE_METADATA\020\002*P\n\023InfoT" + - "ypeSupportedBy\022\031\n\025ENUM_TYPE_UNSPECIFIED\020" + - "\000\022\013\n\007INSPECT\020\001\022\021\n\rRISK_ANALYSIS\020\002*R\n\nDlp" + - "JobType\022\034\n\030DLP_JOB_TYPE_UNSPECIFIED\020\000\022\017\n" + - "\013INSPECT_JOB\020\001\022\025\n\021RISK_ANALYSIS_JOB\020\002*n\n" + - "\023StoredInfoTypeState\022&\n\"STORED_INFO_TYPE" + - "_STATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\t\n\005REA" + - "DY\020\002\022\n\n\006FAILED\020\003\022\013\n\007INVALID\020\004*}\n\022Resourc" + - "eVisibility\022#\n\037RESOURCE_VISIBILITY_UNSPE" + - "CIFIED\020\000\022\036\n\032RESOURCE_VISIBILITY_PUBLIC\020\n" + - "\022\"\n\036RESOURCE_VISIBILITY_RESTRICTED\020\024*u\n\020" + - "EncryptionStatus\022!\n\035ENCRYPTION_STATUS_UN" + - "SPECIFIED\020\000\022\035\n\031ENCRYPTION_GOOGLE_MANAGED" + - "\020\001\022\037\n\033ENCRYPTION_CUSTOMER_MANAGED\020\0022\240L\n\n" + - "DlpService\022\333\001\n\016InspectContent\022,.google.p" + - "rivacy.dlp.v2.InspectContentRequest\032-.go" + - "ogle.privacy.dlp.v2.InspectContentRespon" + - "se\"l\202\323\344\223\002f\"\'/v2/{parent=projects/*}/cont" + - "ent:inspect:\001*Z8\"3/v2/{parent=projects/*" + - "/locations/*}/content:inspect:\001*\022\314\001\n\013Red" + - "actImage\022).google.privacy.dlp.v2.RedactI" + - "mageRequest\032*.google.privacy.dlp.v2.Reda" + - "ctImageResponse\"f\202\323\344\223\002`\"$/v2/{parent=pro" + - "jects/*}/image:redact:\001*Z5\"0/v2/{parent=" + - "projects/*/locations/*}/image:redact:\001*\022" + - "\352\001\n\021DeidentifyContent\022/.google.privacy.d" + - "lp.v2.DeidentifyContentRequest\0320.google." + - "privacy.dlp.v2.DeidentifyContentResponse" + - "\"r\202\323\344\223\002l\"*/v2/{parent=projects/*}/conten" + - "t:deidentify:\001*Z;\"6/v2/{parent=projects/" + - "*/locations/*}/content:deidentify:\001*\022\352\001\n" + - "\021ReidentifyContent\022/.google.privacy.dlp." + - "v2.ReidentifyContentRequest\0320.google.pri" + - "vacy.dlp.v2.ReidentifyContentResponse\"r\202" + - "\323\344\223\002l\"*/v2/{parent=projects/*}/content:r" + - "eidentify:\001*Z;\"6/v2/{parent=projects/*/l" + - "ocations/*}/content:reidentify:\001*\022\260\001\n\rLi" + - "stInfoTypes\022+.google.privacy.dlp.v2.List" + - "InfoTypesRequest\032,.google.privacy.dlp.v2" + - ".ListInfoTypesResponse\"D\202\323\344\223\0025\022\r/v2/info" + - "TypesZ$\022\"/v2/{parent=locations/*}/infoTy" + - "pes\332A\006parent\022\364\002\n\025CreateInspectTemplate\0223" + - ".google.privacy.dlp.v2.CreateInspectTemp" + - "lateRequest\032&.google.privacy.dlp.v2.Insp" + - "ectTemplate\"\375\001\202\323\344\223\002\334\001\"-/v2/{parent=organ" + - "izations/*}/inspectTemplates:\001*Z>\"9/v2/{" + - "parent=organizations/*/locations/*}/insp" + - "ectTemplates:\001*Z-\"(/v2/{parent=projects/" + - "*}/inspectTemplates:\001*Z9\"4/v2/{parent=pr" + - "ojects/*/locations/*}/inspectTemplates:\001" + - "*\332A\027parent,inspect_template\022\376\002\n\025UpdateIn" + - "spectTemplate\0223.google.privacy.dlp.v2.Up" + - "dateInspectTemplateRequest\032&.google.priv" + - "acy.dlp.v2.InspectTemplate\"\207\002\202\323\344\223\002\334\0012-/v" + - "2/{name=organizations/*/inspectTemplates" + - "/*}:\001*Z>29/v2/{name=organizations/*/loca" + - "tions/*/inspectTemplates/*}:\001*Z-2(/v2/{n" + - "ame=projects/*/inspectTemplates/*}:\001*Z92" + - "4/v2/{name=projects/*/locations/*/inspec" + - "tTemplates/*}:\001*\332A!name,inspect_template" + - ",update_mask\022\317\002\n\022GetInspectTemplate\0220.go" + - "ogle.privacy.dlp.v2.GetInspectTemplateRe" + - "quest\032&.google.privacy.dlp.v2.InspectTem" + - "plate\"\336\001\202\323\344\223\002\320\001\022-/v2/{name=organizations" + - "/*/inspectTemplates/*}Z;\0229/v2/{name=orga" + - "nizations/*/locations/*/inspectTemplates" + - "/*}Z*\022(/v2/{name=projects/*/inspectTempl" + - "ates/*}Z6\0224/v2/{name=projects/*/location" + - "s/*/inspectTemplates/*}\332A\004name\022\342\002\n\024ListI" + - "nspectTemplates\0222.google.privacy.dlp.v2." + - "ListInspectTemplatesRequest\0323.google.pri" + - "vacy.dlp.v2.ListInspectTemplatesResponse" + - "\"\340\001\202\323\344\223\002\320\001\022-/v2/{parent=organizations/*}" + - "/inspectTemplatesZ;\0229/v2/{parent=organiz" + - "ations/*/locations/*}/inspectTemplatesZ*" + - "\022(/v2/{parent=projects/*}/inspectTemplat" + - "esZ6\0224/v2/{parent=projects/*/locations/*" + - "}/inspectTemplates\332A\006parent\022\305\002\n\025DeleteIn" + - "spectTemplate\0223.google.privacy.dlp.v2.De" + - "leteInspectTemplateRequest\032\026.google.prot" + - "obuf.Empty\"\336\001\202\323\344\223\002\320\001*-/v2/{name=organiza" + - "tions/*/inspectTemplates/*}Z;*9/v2/{name" + - "=organizations/*/locations/*/inspectTemp" + - "lates/*}Z**(/v2/{name=projects/*/inspect" + - "Templates/*}Z6*4/v2/{name=projects/*/loc" + - "ations/*/inspectTemplates/*}\332A\004name\022\214\003\n\030" + - "CreateDeidentifyTemplate\0226.google.privac" + - "y.dlp.v2.CreateDeidentifyTemplateRequest" + - "\032).google.privacy.dlp.v2.DeidentifyTempl" + - "ate\"\214\002\202\323\344\223\002\350\001\"0/v2/{parent=organizations" + - "/*}/deidentifyTemplates:\001*ZA\"\022\022*\"9/v2/{name" + - "=projects/*/locations/*/dlpJobs/*}:hybri" + - "dInspect:\001*\332A\004name\022\221\001\n\014FinishDlpJob\022*.go" + - "ogle.privacy.dlp.v2.FinishDlpJobRequest\032" + - "\026.google.protobuf.Empty\"=\202\323\344\223\0027\"2/v2/{na" + - "me=projects/*/locations/*/dlpJobs/*}:fin" + - "ish:\001*\032F\312A\022dlp.googleapis.com\322A.https://" + - "www.googleapis.com/auth/cloud-platformB\372" + - "\002\n\031com.google.privacy.dlp.v2B\010DlpProtoP\001" + - "Z8google.golang.org/genproto/googleapis/" + - "privacy/dlp/v2;dlp\252\002\023Google.Cloud.Dlp.V2" + - "\312\002\023Google\\Cloud\\Dlp\\V2\352\002\026Google::Cloud::" + - "Dlp::V2\352Ar\n\035dlp.googleapis.com/DlpConten" + - "t\022\035projects/{project}/dlpContent\0222projec" + - "ts/{project}/locations/{location}/dlpCon" + - "tent\352A\\\n\'dlp.googleapis.com/Organization" + - "Location\0221organizations/{organization}/l" + - "ocations/{location}b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.privacy.dlp.v2.DlpStorage.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - com.google.type.DateProto.getDescriptor(), - com.google.type.DayOfWeekProto.getDescriptor(), - com.google.type.TimeOfDayProto.getDescriptor(), - }); - internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor, - new java.lang.String[] { "InfoTypes", }); - internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_privacy_dlp_v2_ExclusionRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor, - new java.lang.String[] { "Dictionary", "Regex", "ExcludeInfoTypes", "MatchingType", "Type", }); - internal_static_google_privacy_dlp_v2_InspectionRule_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_privacy_dlp_v2_InspectionRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectionRule_descriptor, - new java.lang.String[] { "HotwordRule", "ExclusionRule", "Type", }); - internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_privacy_dlp_v2_InspectionRuleSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor, - new java.lang.String[] { "InfoTypes", "Rules", }); - internal_static_google_privacy_dlp_v2_InspectConfig_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectConfig_descriptor, - new java.lang.String[] { "InfoTypes", "MinLikelihood", "Limits", "IncludeQuote", "ExcludeInfoTypes", "CustomInfoTypes", "ContentOptions", "RuleSet", }); - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor = - internal_static_google_privacy_dlp_v2_InspectConfig_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor, - new java.lang.String[] { "MaxFindingsPerItem", "MaxFindingsPerRequest", "MaxFindingsPerInfoType", }); - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor = - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor, - new java.lang.String[] { "InfoType", "MaxFindings", }); - internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_privacy_dlp_v2_ByteContentItem_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ByteContentItem_descriptor, - new java.lang.String[] { "Type", "Data", }); - internal_static_google_privacy_dlp_v2_ContentItem_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_privacy_dlp_v2_ContentItem_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ContentItem_descriptor, - new java.lang.String[] { "Value", "Table", "ByteItem", "DataItem", }); - internal_static_google_privacy_dlp_v2_Table_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_privacy_dlp_v2_Table_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Table_descriptor, - new java.lang.String[] { "Headers", "Rows", }); - internal_static_google_privacy_dlp_v2_Table_Row_descriptor = - internal_static_google_privacy_dlp_v2_Table_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_Table_Row_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Table_Row_descriptor, - new java.lang.String[] { "Values", }); - internal_static_google_privacy_dlp_v2_InspectResult_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_privacy_dlp_v2_InspectResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectResult_descriptor, - new java.lang.String[] { "Findings", "FindingsTruncated", }); - internal_static_google_privacy_dlp_v2_Finding_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_privacy_dlp_v2_Finding_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Finding_descriptor, - new java.lang.String[] { "Name", "Quote", "InfoType", "Likelihood", "Location", "CreateTime", "QuoteInfo", "ResourceName", "TriggerName", "Labels", "JobCreateTime", "JobName", "FindingId", }); - internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_descriptor = - internal_static_google_privacy_dlp_v2_Finding_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_privacy_dlp_v2_Location_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_privacy_dlp_v2_Location_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Location_descriptor, - new java.lang.String[] { "ByteRange", "CodepointRange", "ContentLocations", "Container", }); - internal_static_google_privacy_dlp_v2_ContentLocation_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_privacy_dlp_v2_ContentLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ContentLocation_descriptor, - new java.lang.String[] { "ContainerName", "RecordLocation", "ImageLocation", "DocumentLocation", "MetadataLocation", "ContainerTimestamp", "ContainerVersion", "Location", }); - internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_privacy_dlp_v2_MetadataLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor, - new java.lang.String[] { "Type", "StorageLabel", "Label", }); - internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_privacy_dlp_v2_StorageMetadataLabel_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor, - new java.lang.String[] { "Key", }); - internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_privacy_dlp_v2_DocumentLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor, - new java.lang.String[] { "FileOffset", }); - internal_static_google_privacy_dlp_v2_RecordLocation_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_privacy_dlp_v2_RecordLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RecordLocation_descriptor, - new java.lang.String[] { "RecordKey", "FieldId", "TableLocation", }); - internal_static_google_privacy_dlp_v2_TableLocation_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_privacy_dlp_v2_TableLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TableLocation_descriptor, - new java.lang.String[] { "RowIndex", }); - internal_static_google_privacy_dlp_v2_Container_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_privacy_dlp_v2_Container_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Container_descriptor, - new java.lang.String[] { "Type", "ProjectId", "FullPath", "RootPath", "RelativePath", "UpdateTime", "Version", }); - internal_static_google_privacy_dlp_v2_Range_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_privacy_dlp_v2_Range_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Range_descriptor, - new java.lang.String[] { "Start", "End", }); - internal_static_google_privacy_dlp_v2_ImageLocation_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ImageLocation_descriptor, - new java.lang.String[] { "BoundingBoxes", }); - internal_static_google_privacy_dlp_v2_BoundingBox_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_privacy_dlp_v2_BoundingBox_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_BoundingBox_descriptor, - new java.lang.String[] { "Top", "Left", "Width", "Height", }); - internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor, - new java.lang.String[] { "Parent", "LocationId", "InspectConfig", "ImageRedactionConfigs", "IncludeFindings", "ByteItem", }); - internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor = - internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor, - new java.lang.String[] { "InfoType", "RedactAllText", "RedactionColor", "Target", }); - internal_static_google_privacy_dlp_v2_Color_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_privacy_dlp_v2_Color_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Color_descriptor, - new java.lang.String[] { "Red", "Green", "Blue", }); - internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_privacy_dlp_v2_RedactImageResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor, - new java.lang.String[] { "RedactedImage", "ExtractedText", "InspectResult", }); - internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor, - new java.lang.String[] { "Parent", "DeidentifyConfig", "InspectConfig", "Item", "InspectTemplateName", "DeidentifyTemplateName", "LocationId", }); - internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DeidentifyContentResponse_descriptor, - new java.lang.String[] { "Item", "Overview", }); - internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor, - new java.lang.String[] { "Parent", "ReidentifyConfig", "InspectConfig", "Item", "InspectTemplateName", "ReidentifyTemplateName", "LocationId", }); - internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor, - new java.lang.String[] { "Item", "Overview", }); - internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_privacy_dlp_v2_InspectContentRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor, - new java.lang.String[] { "Parent", "InspectConfig", "Item", "InspectTemplateName", "LocationId", }); - internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_privacy_dlp_v2_InspectContentResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor, - new java.lang.String[] { "Result", }); - internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_privacy_dlp_v2_OutputStorageConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor, - new java.lang.String[] { "Table", "OutputSchema", "Type", }); - internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_privacy_dlp_v2_InfoTypeStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor, - new java.lang.String[] { "InfoType", "Count", }); - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor, - new java.lang.String[] { "RequestedOptions", "Result", }); - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor = - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor, - new java.lang.String[] { "SnapshotInspectTemplate", "JobConfig", }); - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor = - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor, - new java.lang.String[] { "ProcessedBytes", "TotalEstimatedBytes", "InfoTypeStats", "HybridStats", }); - internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_google_privacy_dlp_v2_HybridInspectStatistics_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor, - new java.lang.String[] { "ProcessedCount", "AbortedCount", "PendingCount", }); - internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_google_privacy_dlp_v2_InfoTypeDescription_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor, - new java.lang.String[] { "Name", "DisplayName", "SupportedBy", "Description", "Versions", "Categories", }); - internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_google_privacy_dlp_v2_InfoTypeCategory_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor, - new java.lang.String[] { "LocationCategory", "IndustryCategory", "TypeCategory", "Category", }); - internal_static_google_privacy_dlp_v2_VersionDescription_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_google_privacy_dlp_v2_VersionDescription_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_VersionDescription_descriptor, - new java.lang.String[] { "Version", "Description", }); - internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor, - new java.lang.String[] { "Parent", "LanguageCode", "Filter", "LocationId", }); - internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor, - new java.lang.String[] { "InfoTypes", }); - internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor = - getDescriptor().getMessageTypes().get(39); - internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor, - new java.lang.String[] { "PrivacyMetric", "SourceTable", "Actions", }); - internal_static_google_privacy_dlp_v2_QuasiId_descriptor = - getDescriptor().getMessageTypes().get(40); - internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_QuasiId_descriptor, - new java.lang.String[] { "Field", "InfoType", "CustomTag", "Inferred", "Tag", }); - internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor = - getDescriptor().getMessageTypes().get(41); - internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor, - new java.lang.String[] { "Table", "QuasiIds", "RelativeFrequency", }); - internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor = - internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor, - new java.lang.String[] { "Field", "CustomTag", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor = - getDescriptor().getMessageTypes().get(42); - internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor, - new java.lang.String[] { "NumericalStatsConfig", "CategoricalStatsConfig", "KAnonymityConfig", "LDiversityConfig", "KMapEstimationConfig", "DeltaPresenceEstimationConfig", "Type", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor = - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor, - new java.lang.String[] { "Field", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor = - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor, - new java.lang.String[] { "Field", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor = - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(2); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor, - new java.lang.String[] { "QuasiIds", "EntityId", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor = - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(3); - internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor, - new java.lang.String[] { "QuasiIds", "SensitiveAttribute", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor = - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(4); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor, - new java.lang.String[] { "QuasiIds", "RegionCode", "AuxiliaryTables", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor = - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor, - new java.lang.String[] { "Field", "InfoType", "CustomTag", "Inferred", "Tag", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor = - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor, - new java.lang.String[] { "Table", "QuasiIds", "RelativeFrequency", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor = - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor, - new java.lang.String[] { "Field", "CustomTag", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor = - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(5); - internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor, - new java.lang.String[] { "QuasiIds", "RegionCode", "AuxiliaryTables", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor = - getDescriptor().getMessageTypes().get(43); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor, - new java.lang.String[] { "RequestedPrivacyMetric", "RequestedSourceTable", "NumericalStatsResult", "CategoricalStatsResult", "KAnonymityResult", "LDiversityResult", "KMapEstimationResult", "DeltaPresenceEstimationResult", "RequestedOptions", "Result", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor, - new java.lang.String[] { "MinValue", "MaxValue", "QuantileValues", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor, - new java.lang.String[] { "ValueFrequencyHistogramBuckets", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_CategoricalStatsResult_CategoricalStatsHistogramBucket_descriptor, - new java.lang.String[] { "ValueFrequencyLowerBound", "ValueFrequencyUpperBound", "BucketSize", "BucketValues", "BucketValueCount", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(2); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor, - new java.lang.String[] { "EquivalenceClassHistogramBuckets", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityEquivalenceClass_descriptor, - new java.lang.String[] { "QuasiIdsValues", "EquivalenceClassSize", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KAnonymityResult_KAnonymityHistogramBucket_descriptor, - new java.lang.String[] { "EquivalenceClassSizeLowerBound", "EquivalenceClassSizeUpperBound", "BucketSize", "BucketValues", "BucketValueCount", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(3); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor, - new java.lang.String[] { "SensitiveValueFrequencyHistogramBuckets", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityEquivalenceClass_descriptor, - new java.lang.String[] { "QuasiIdsValues", "EquivalenceClassSize", "NumDistinctSensitiveValues", "TopSensitiveValues", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_LDiversityResult_LDiversityHistogramBucket_descriptor, - new java.lang.String[] { "SensitiveValueFrequencyLowerBound", "SensitiveValueFrequencyUpperBound", "BucketSize", "BucketValues", "BucketValueCount", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(4); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor, - new java.lang.String[] { "KMapEstimationHistogram", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationQuasiIdValues_descriptor, - new java.lang.String[] { "QuasiIdsValues", "EstimatedAnonymity", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor, - new java.lang.String[] { "MinAnonymity", "MaxAnonymity", "BucketSize", "BucketValues", "BucketValueCount", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(5); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor, - new java.lang.String[] { "DeltaPresenceEstimationHistogram", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor, - new java.lang.String[] { "QuasiIdsValues", "EstimatedProbability", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor, - new java.lang.String[] { "MinProbability", "MaxProbability", "BucketSize", "BucketValues", "BucketValueCount", }); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor = - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(6); - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_RequestedRiskAnalysisOptions_descriptor, - new java.lang.String[] { "JobConfig", }); - internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor = - getDescriptor().getMessageTypes().get(44); - internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor, - new java.lang.String[] { "Value", "Count", }); - internal_static_google_privacy_dlp_v2_Value_descriptor = - getDescriptor().getMessageTypes().get(45); - internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Value_descriptor, - new java.lang.String[] { "IntegerValue", "FloatValue", "StringValue", "BooleanValue", "TimestampValue", "TimeValue", "DateValue", "DayOfWeekValue", "Type", }); - internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor = - getDescriptor().getMessageTypes().get(46); - internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor, - new java.lang.String[] { "DateTime", "ParsedQuote", }); - internal_static_google_privacy_dlp_v2_DateTime_descriptor = - getDescriptor().getMessageTypes().get(47); - internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DateTime_descriptor, - new java.lang.String[] { "Date", "DayOfWeek", "Time", "TimeZone", }); - internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor = - internal_static_google_privacy_dlp_v2_DateTime_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_DateTime_TimeZone_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor, - new java.lang.String[] { "OffsetMinutes", }); - internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor = - getDescriptor().getMessageTypes().get(48); - internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor, - new java.lang.String[] { "InfoTypeTransformations", "RecordTransformations", "ImageTransformations", "TransformationErrorHandling", "Transformation", }); - internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor = - getDescriptor().getMessageTypes().get(49); - internal_static_google_privacy_dlp_v2_ImageTransformations_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor, - new java.lang.String[] { "Transforms", }); - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor = - internal_static_google_privacy_dlp_v2_ImageTransformations_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor, - new java.lang.String[] { "SelectedInfoTypes", "AllInfoTypes", "AllText", "RedactionColor", "Target", }); - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor = - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_SelectedInfoTypes_descriptor, - new java.lang.String[] { "InfoTypes", }); - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor = - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllInfoTypes_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor = - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_descriptor.getNestedTypes().get(2); - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ImageTransformations_ImageTransformation_AllText_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor = - getDescriptor().getMessageTypes().get(50); - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor, - new java.lang.String[] { "ThrowError", "LeaveUntransformed", "Mode", }); - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor = - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor = - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor, - new java.lang.String[] { "ReplaceConfig", "RedactConfig", "CharacterMaskConfig", "CryptoReplaceFfxFpeConfig", "FixedSizeBucketingConfig", "BucketingConfig", "ReplaceWithInfoTypeConfig", "TimePartConfig", "CryptoHashConfig", "DateShiftConfig", "CryptoDeterministicConfig", "ReplaceDictionaryConfig", "Transformation", }); - internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor = - getDescriptor().getMessageTypes().get(52); - internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor, - new java.lang.String[] { "PartToExtract", }); - internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor = - getDescriptor().getMessageTypes().get(53); - internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor, - new java.lang.String[] { "CryptoKey", }); - internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor = - getDescriptor().getMessageTypes().get(54); - internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CryptoDeterministicConfig_descriptor, - new java.lang.String[] { "CryptoKey", "SurrogateInfoType", "Context", }); - internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor = - getDescriptor().getMessageTypes().get(55); - internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor, - new java.lang.String[] { "NewValue", }); - internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor = - getDescriptor().getMessageTypes().get(56); - internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor, - new java.lang.String[] { "WordList", "Type", }); - internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor = - getDescriptor().getMessageTypes().get(57); - internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_RedactConfig_descriptor = - getDescriptor().getMessageTypes().get(58); - internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RedactConfig_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor = - getDescriptor().getMessageTypes().get(59); - internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor, - new java.lang.String[] { "CharactersToSkip", "CommonCharactersToIgnore", "Characters", }); - internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor = - getDescriptor().getMessageTypes().get(60); - internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor, - new java.lang.String[] { "MaskingCharacter", "NumberToMask", "ReverseOrder", "CharactersToIgnore", }); - internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor = - getDescriptor().getMessageTypes().get(61); - internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor, - new java.lang.String[] { "LowerBound", "UpperBound", "BucketSize", }); - internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor = - getDescriptor().getMessageTypes().get(62); - internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor, - new java.lang.String[] { "Buckets", }); - internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor = - internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor, - new java.lang.String[] { "Min", "Max", "ReplacementValue", }); - internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor = - getDescriptor().getMessageTypes().get(63); - internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor, - new java.lang.String[] { "CryptoKey", "Context", "CommonAlphabet", "CustomAlphabet", "Radix", "SurrogateInfoType", "Alphabet", }); - internal_static_google_privacy_dlp_v2_CryptoKey_descriptor = - getDescriptor().getMessageTypes().get(64); - internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CryptoKey_descriptor, - new java.lang.String[] { "Transient", "Unwrapped", "KmsWrapped", "Source", }); - internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor = - getDescriptor().getMessageTypes().get(65); - internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor = - getDescriptor().getMessageTypes().get(66); - internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor, - new java.lang.String[] { "Key", }); - internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor = - getDescriptor().getMessageTypes().get(67); - internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor, - new java.lang.String[] { "WrappedKey", "CryptoKeyName", }); - internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor = - getDescriptor().getMessageTypes().get(68); - internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor, - new java.lang.String[] { "UpperBoundDays", "LowerBoundDays", "Context", "CryptoKey", "Method", }); - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor = - getDescriptor().getMessageTypes().get(69); - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor, - new java.lang.String[] { "Transformations", }); - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor = - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor, - new java.lang.String[] { "InfoTypes", "PrimitiveTransformation", }); - internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor = - getDescriptor().getMessageTypes().get(70); - internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor, - new java.lang.String[] { "Fields", "Condition", "PrimitiveTransformation", "InfoTypeTransformations", "Transformation", }); - internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor = - getDescriptor().getMessageTypes().get(71); - internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor, - new java.lang.String[] { "FieldTransformations", "RecordSuppressions", }); - internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor = - getDescriptor().getMessageTypes().get(72); - internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor, - new java.lang.String[] { "Condition", }); - internal_static_google_privacy_dlp_v2_RecordCondition_descriptor = - getDescriptor().getMessageTypes().get(73); - internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RecordCondition_descriptor, - new java.lang.String[] { "Expressions", }); - internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor = - internal_static_google_privacy_dlp_v2_RecordCondition_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_RecordCondition_Condition_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor, - new java.lang.String[] { "Field", "Operator", "Value", }); - internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor = - internal_static_google_privacy_dlp_v2_RecordCondition_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor, - new java.lang.String[] { "Conditions", }); - internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor = - internal_static_google_privacy_dlp_v2_RecordCondition_descriptor.getNestedTypes().get(2); - internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor, - new java.lang.String[] { "LogicalOperator", "Conditions", "Type", }); - internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor = - getDescriptor().getMessageTypes().get(74); - internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor, - new java.lang.String[] { "TransformedBytes", "TransformationSummaries", }); - internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor = - getDescriptor().getMessageTypes().get(75); - internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor, - new java.lang.String[] { "InfoType", "Field", "Transformation", "FieldTransformations", "RecordSuppress", "Results", "TransformedBytes", }); - internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor = - internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor, - new java.lang.String[] { "Count", "Code", "Details", }); - internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor = - getDescriptor().getMessageTypes().get(76); - internal_static_google_privacy_dlp_v2_TransformationDescription_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationDescription_descriptor, - new java.lang.String[] { "Type", "Description", "Condition", "InfoType", }); - internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor = - getDescriptor().getMessageTypes().get(77); - internal_static_google_privacy_dlp_v2_TransformationDetails_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationDetails_descriptor, - new java.lang.String[] { "ResourceName", "ContainerName", "Transformation", "StatusDetails", "TransformedBytes", "TransformationLocation", }); - internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor = - getDescriptor().getMessageTypes().get(78); - internal_static_google_privacy_dlp_v2_TransformationLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationLocation_descriptor, - new java.lang.String[] { "FindingId", "RecordTransformation", "ContainerType", "LocationType", }); - internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor = - getDescriptor().getMessageTypes().get(79); - internal_static_google_privacy_dlp_v2_RecordTransformation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RecordTransformation_descriptor, - new java.lang.String[] { "FieldId", "ContainerTimestamp", "ContainerVersion", }); - internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor = - getDescriptor().getMessageTypes().get(80); - internal_static_google_privacy_dlp_v2_TransformationResultStatus_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationResultStatus_descriptor, - new java.lang.String[] { "ResultStatusType", "Details", }); - internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor = - getDescriptor().getMessageTypes().get(81); - internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationDetailsStorageConfig_descriptor, - new java.lang.String[] { "Table", "Type", }); - internal_static_google_privacy_dlp_v2_Schedule_descriptor = - getDescriptor().getMessageTypes().get(82); - internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Schedule_descriptor, - new java.lang.String[] { "RecurrencePeriodDuration", "Option", }); - internal_static_google_privacy_dlp_v2_Manual_descriptor = - getDescriptor().getMessageTypes().get(83); - internal_static_google_privacy_dlp_v2_Manual_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Manual_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor = - getDescriptor().getMessageTypes().get(84); - internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor, - new java.lang.String[] { "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", "InspectConfig", }); - internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor = - getDescriptor().getMessageTypes().get(85); - internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor, - new java.lang.String[] { "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", "DeidentifyConfig", }); - internal_static_google_privacy_dlp_v2_Error_descriptor = - getDescriptor().getMessageTypes().get(86); - internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Error_descriptor, - new java.lang.String[] { "Details", "Timestamps", }); - internal_static_google_privacy_dlp_v2_JobTrigger_descriptor = - getDescriptor().getMessageTypes().get(87); - internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_JobTrigger_descriptor, - new java.lang.String[] { "Name", "DisplayName", "Description", "InspectJob", "Triggers", "Errors", "CreateTime", "UpdateTime", "LastRunTime", "Status", "Job", }); - internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor = - internal_static_google_privacy_dlp_v2_JobTrigger_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor, - new java.lang.String[] { "Schedule", "Manual", "Trigger", }); - internal_static_google_privacy_dlp_v2_Action_descriptor = - getDescriptor().getMessageTypes().get(88); - internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Action_descriptor, - new java.lang.String[] { "SaveFindings", "PubSub", "PublishSummaryToCscc", "PublishFindingsToCloudDataCatalog", "Deidentify", "JobNotificationEmails", "PublishToStackdriver", "Action", }); - internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor = - internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_Action_SaveFindings_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Action_SaveFindings_descriptor, - new java.lang.String[] { "OutputConfig", }); - internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor = - internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Action_PublishToPubSub_descriptor, - new java.lang.String[] { "Topic", }); - internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor = - internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(2); - internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor = - internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(3); - internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Action_PublishFindingsToCloudDataCatalog_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor = - internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(4); - internal_static_google_privacy_dlp_v2_Action_Deidentify_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Action_Deidentify_descriptor, - new java.lang.String[] { "TransformationConfig", "TransformationDetailsStorageConfig", "CloudStorageOutput", "FileTypesToTransform", "Output", }); - internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor = - internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(5); - internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Action_JobNotificationEmails_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor = - internal_static_google_privacy_dlp_v2_Action_descriptor.getNestedTypes().get(6); - internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Action_PublishToStackdriver_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor = - getDescriptor().getMessageTypes().get(89); - internal_static_google_privacy_dlp_v2_TransformationConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TransformationConfig_descriptor, - new java.lang.String[] { "DeidentifyTemplate", "StructuredDeidentifyTemplate", "ImageRedactTemplate", }); - internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(90); - internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor, - new java.lang.String[] { "Parent", "InspectTemplate", "TemplateId", "LocationId", }); - internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(91); - internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor, - new java.lang.String[] { "Name", "InspectTemplate", "UpdateMask", }); - internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(92); - internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor = - getDescriptor().getMessageTypes().get(93); - internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor, - new java.lang.String[] { "Parent", "PageToken", "PageSize", "OrderBy", "LocationId", }); - internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor = - getDescriptor().getMessageTypes().get(94); - internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor, - new java.lang.String[] { "InspectTemplates", "NextPageToken", }); - internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(95); - internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(96); - internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor, - new java.lang.String[] { "Parent", "JobTrigger", "TriggerId", "LocationId", }); - internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(97); - internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ActivateJobTriggerRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(98); - internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor, - new java.lang.String[] { "Name", "JobTrigger", "UpdateMask", }); - internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(99); - internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(100); - internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor, - new java.lang.String[] { "Parent", "InspectJob", "RiskJob", "JobId", "LocationId", "Job", }); - internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor = - getDescriptor().getMessageTypes().get(101); - internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor, - new java.lang.String[] { "Parent", "PageToken", "PageSize", "OrderBy", "Filter", "Type", "LocationId", }); - internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor = - getDescriptor().getMessageTypes().get(102); - internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor, - new java.lang.String[] { "JobTriggers", "NextPageToken", }); - internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(103); - internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor = - getDescriptor().getMessageTypes().get(104); - internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor, - new java.lang.String[] { "StorageConfig", "InspectConfig", "InspectTemplateName", "Actions", }); - internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor = - getDescriptor().getMessageTypes().get(105); - internal_static_google_privacy_dlp_v2_DataProfileAction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor, - new java.lang.String[] { "ExportData", "PubSubNotification", "Action", }); - internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor = - internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_DataProfileAction_Export_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfileAction_Export_descriptor, - new java.lang.String[] { "ProfileTable", }); - internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor = - internal_static_google_privacy_dlp_v2_DataProfileAction_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfileAction_PubSubNotification_descriptor, - new java.lang.String[] { "Topic", "Event", "PubsubCondition", "DetailOfMessage", }); - internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor = - getDescriptor().getMessageTypes().get(106); - internal_static_google_privacy_dlp_v2_DataProfileJobConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfileJobConfig_descriptor, - new java.lang.String[] { "Location", "ProjectId", "InspectTemplates", "DataProfileActions", }); - internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor = - getDescriptor().getMessageTypes().get(107); - internal_static_google_privacy_dlp_v2_DataProfileLocation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfileLocation_descriptor, - new java.lang.String[] { "OrganizationId", "FolderId", "Location", }); - internal_static_google_privacy_dlp_v2_DlpJob_descriptor = - getDescriptor().getMessageTypes().get(108); - internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DlpJob_descriptor, - new java.lang.String[] { "Name", "Type", "State", "RiskDetails", "InspectDetails", "CreateTime", "StartTime", "EndTime", "JobTriggerName", "Errors", "Details", }); - internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(109); - internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor = - getDescriptor().getMessageTypes().get(110); - internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor, - new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", "Type", "OrderBy", "LocationId", }); - internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor = - getDescriptor().getMessageTypes().get(111); - internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor, - new java.lang.String[] { "Jobs", "NextPageToken", }); - internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(112); - internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(113); - internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(114); - internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(115); - internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor, - new java.lang.String[] { "Parent", "DeidentifyTemplate", "TemplateId", "LocationId", }); - internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(116); - internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor, - new java.lang.String[] { "Name", "DeidentifyTemplate", "UpdateMask", }); - internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(117); - internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor = - getDescriptor().getMessageTypes().get(118); - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor, - new java.lang.String[] { "Parent", "PageToken", "PageSize", "OrderBy", "LocationId", }); - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor = - getDescriptor().getMessageTypes().get(119); - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor, - new java.lang.String[] { "DeidentifyTemplates", "NextPageToken", }); - internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(120); - internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor = - getDescriptor().getMessageTypes().get(121); - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor, - new java.lang.String[] { "OutputPath", "CloudStorageFileSet", "BigQueryField", "Source", }); - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor = - getDescriptor().getMessageTypes().get(122); - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor, - new java.lang.String[] { "ApproxNumPhrases", }); - internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor = - getDescriptor().getMessageTypes().get(123); - internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor, - new java.lang.String[] { "DisplayName", "Description", "LargeCustomDictionary", "Dictionary", "Regex", "Type", }); - internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor = - getDescriptor().getMessageTypes().get(124); - internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor, - new java.lang.String[] { "LargeCustomDictionary", "Type", }); - internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor = - getDescriptor().getMessageTypes().get(125); - internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor, - new java.lang.String[] { "Config", "CreateTime", "State", "Errors", "Stats", }); - internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor = - getDescriptor().getMessageTypes().get(126); - internal_static_google_privacy_dlp_v2_StoredInfoType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor, - new java.lang.String[] { "Name", "CurrentVersion", "PendingVersions", }); - internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(127); - internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CreateStoredInfoTypeRequest_descriptor, - new java.lang.String[] { "Parent", "Config", "StoredInfoTypeId", "LocationId", }); - internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(128); - internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor, - new java.lang.String[] { "Name", "Config", "UpdateMask", }); - internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(129); - internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor = - getDescriptor().getMessageTypes().get(130); - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor, - new java.lang.String[] { "Parent", "PageToken", "PageSize", "OrderBy", "LocationId", }); - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor = - getDescriptor().getMessageTypes().get(131); - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor, - new java.lang.String[] { "StoredInfoTypes", "NextPageToken", }); - internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(132); - internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DeleteStoredInfoTypeRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(133); - internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor, - new java.lang.String[] { "Name", "HybridItem", }); - internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(134); - internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor, - new java.lang.String[] { "Name", "HybridItem", }); - internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor = - getDescriptor().getMessageTypes().get(135); - internal_static_google_privacy_dlp_v2_HybridContentItem_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor, - new java.lang.String[] { "Item", "FindingDetails", }); - internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor = - getDescriptor().getMessageTypes().get(136); - internal_static_google_privacy_dlp_v2_HybridFindingDetails_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor, - new java.lang.String[] { "ContainerDetails", "FileOffset", "RowOffset", "TableOptions", "Labels", }); - internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_descriptor = - internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor = - getDescriptor().getMessageTypes().get(137); - internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor = - getDescriptor().getMessageTypes().get(138); - internal_static_google_privacy_dlp_v2_DataRiskLevel_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataRiskLevel_descriptor, - new java.lang.String[] { "Score", }); - internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor = - getDescriptor().getMessageTypes().get(139); - internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfileConfigSnapshot_descriptor, - new java.lang.String[] { "InspectConfig", "DataProfileJob", }); - internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor = - getDescriptor().getMessageTypes().get(140); - internal_static_google_privacy_dlp_v2_TableDataProfile_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor, - new java.lang.String[] { "Name", "ProjectDataProfile", "DatasetProjectId", "DatasetLocation", "DatasetId", "TableId", "FullResource", "ProfileStatus", "State", "SensitivityScore", "DataRiskLevel", "PredictedInfoTypes", "OtherInfoTypes", "ConfigSnapshot", "LastModifiedTime", "ExpirationTime", "ScannedColumnCount", "FailedColumnCount", "TableSizeBytes", "RowCount", "EncryptionStatus", "ResourceVisibility", "ProfileLastGenerated", "ResourceLabels", "CreateTime", }); - internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_descriptor = - internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor = - getDescriptor().getMessageTypes().get(141); - internal_static_google_privacy_dlp_v2_ProfileStatus_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor, - new java.lang.String[] { "Status", "Timestamp", }); - internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor = - getDescriptor().getMessageTypes().get(142); - internal_static_google_privacy_dlp_v2_InfoTypeSummary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor, - new java.lang.String[] { "InfoType", "EstimatedPrevalence", }); - internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor = - getDescriptor().getMessageTypes().get(143); - internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor, - new java.lang.String[] { "InfoType", "EstimatedPrevalence", }); - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor = - getDescriptor().getMessageTypes().get(144); - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor, - new java.lang.String[] { "Expressions", }); - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor = - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubCondition_descriptor, - new java.lang.String[] { "MinimumRiskScore", "MinimumSensitivityScore", "Value", }); - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor = - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfilePubSubCondition_PubSubExpressions_descriptor, - new java.lang.String[] { "LogicalOperator", "Conditions", }); - internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor = - getDescriptor().getMessageTypes().get(145); - internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DataProfilePubSubMessage_descriptor, - new java.lang.String[] { "Profile", "Event", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceDefinition); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.privacy.dlp.v2.DlpStorage.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - com.google.type.DateProto.getDescriptor(); - com.google.type.DayOfWeekProto.getDescriptor(); - com.google.type.TimeOfDayProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java deleted file mode 100644 index 618d008b2164..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpStorage.java +++ /dev/null @@ -1,560 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public final class DlpStorage { - private DlpStorage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_InfoType_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_InfoType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StoredType_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StoredType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_FieldId_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_FieldId_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_PartitionId_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_PartitionId_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_KindExpression_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_KindExpression_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DatastoreOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CloudStorageFileSet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_BigQueryOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StorageConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StorageConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_HybridOptions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_BigQueryKey_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_DatastoreKey_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Key_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Key_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_Key_PathElement_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_RecordKey_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_RecordKey_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_BigQueryTable_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_BigQueryField_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_BigQueryField_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_EntityId_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_EntityId_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_privacy_dlp_v2_TableOptions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_privacy_dlp_v2_TableOptions_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n#google/privacy/dlp/v2/storage.proto\022\025g" + - "oogle.privacy.dlp.v2\032\031google/api/resourc" + - "e.proto\032\037google/protobuf/timestamp.proto" + - "\")\n\010InfoType\022\014\n\004name\030\001 \001(\t\022\017\n\007version\030\002 " + - "\001(\t\"\341\001\n\020SensitivityScore\022L\n\005score\030\001 \001(\0162" + - "=.google.privacy.dlp.v2.SensitivityScore" + - ".SensitivityScoreLevel\"\177\n\025SensitivitySco" + - "reLevel\022!\n\035SENSITIVITY_SCORE_UNSPECIFIED" + - "\020\000\022\023\n\017SENSITIVITY_LOW\020\n\022\030\n\024SENSITIVITY_M" + - "ODERATE\020\024\022\024\n\020SENSITIVITY_HIGH\020\036\"K\n\nStore" + - "dType\022\014\n\004name\030\001 \001(\t\022/\n\013create_time\030\002 \001(\013" + - "2\032.google.protobuf.Timestamp\"\310\013\n\016CustomI" + - "nfoType\0222\n\tinfo_type\030\001 \001(\0132\037.google.priv" + - "acy.dlp.v2.InfoType\0225\n\nlikelihood\030\006 \001(\0162" + - "!.google.privacy.dlp.v2.Likelihood\022F\n\ndi" + - "ctionary\030\002 \001(\01320.google.privacy.dlp.v2.C" + - "ustomInfoType.DictionaryH\000\022<\n\005regex\030\003 \001(" + - "\0132+.google.privacy.dlp.v2.CustomInfoType" + - ".RegexH\000\022M\n\016surrogate_type\030\004 \001(\01323.googl" + - "e.privacy.dlp.v2.CustomInfoType.Surrogat" + - "eTypeH\000\0228\n\013stored_type\030\005 \001(\0132!.google.pr" + - "ivacy.dlp.v2.StoredTypeH\000\022L\n\017detection_r" + - "ules\030\007 \003(\01323.google.privacy.dlp.v2.Custo" + - "mInfoType.DetectionRule\022K\n\016exclusion_typ" + - "e\030\010 \001(\01623.google.privacy.dlp.v2.CustomIn" + - "foType.ExclusionType\032\310\001\n\nDictionary\022N\n\tw" + - "ord_list\030\001 \001(\01329.google.privacy.dlp.v2.C" + - "ustomInfoType.Dictionary.WordListH\000\022E\n\022c" + - "loud_storage_path\030\003 \001(\0132\'.google.privacy" + - ".dlp.v2.CloudStoragePathH\000\032\031\n\010WordList\022\r" + - "\n\005words\030\001 \003(\tB\010\n\006source\032/\n\005Regex\022\017\n\007patt" + - "ern\030\001 \001(\t\022\025\n\rgroup_indexes\030\002 \003(\005\032\017\n\rSurr" + - "ogateType\032\276\004\n\rDetectionRule\022W\n\014hotword_r" + - "ule\030\001 \001(\0132?.google.privacy.dlp.v2.Custom" + - "InfoType.DetectionRule.HotwordRuleH\000\0328\n\t" + - "Proximity\022\025\n\rwindow_before\030\001 \001(\005\022\024\n\014wind" + - "ow_after\030\002 \001(\005\032\202\001\n\024LikelihoodAdjustment\022" + - "=\n\020fixed_likelihood\030\001 \001(\0162!.google.priva" + - "cy.dlp.v2.LikelihoodH\000\022\035\n\023relative_likel" + - "ihood\030\002 \001(\005H\000B\014\n\nadjustment\032\214\002\n\013HotwordR" + - "ule\022B\n\rhotword_regex\030\001 \001(\0132+.google.priv" + - "acy.dlp.v2.CustomInfoType.Regex\022P\n\tproxi" + - "mity\030\002 \001(\0132=.google.privacy.dlp.v2.Custo" + - "mInfoType.DetectionRule.Proximity\022g\n\025lik" + - "elihood_adjustment\030\003 \001(\0132H.google.privac" + - "y.dlp.v2.CustomInfoType.DetectionRule.Li" + - "kelihoodAdjustmentB\006\n\004type\"K\n\rExclusionT" + - "ype\022\036\n\032EXCLUSION_TYPE_UNSPECIFIED\020\000\022\032\n\026E" + - "XCLUSION_TYPE_EXCLUDE\020\001B\006\n\004type\"\027\n\007Field" + - "Id\022\014\n\004name\030\001 \001(\t\"7\n\013PartitionId\022\022\n\nproje" + - "ct_id\030\002 \001(\t\022\024\n\014namespace_id\030\004 \001(\t\"\036\n\016Kin" + - "dExpression\022\014\n\004name\030\001 \001(\t\"\201\001\n\020DatastoreO" + - "ptions\0228\n\014partition_id\030\001 \001(\0132\".google.pr" + - "ivacy.dlp.v2.PartitionId\0223\n\004kind\030\002 \001(\0132%" + - ".google.privacy.dlp.v2.KindExpression\"]\n" + - "\030CloudStorageRegexFileSet\022\023\n\013bucket_name" + - "\030\001 \001(\t\022\025\n\rinclude_regex\030\002 \003(\t\022\025\n\rexclude" + - "_regex\030\003 \003(\t\"\354\003\n\023CloudStorageOptions\022D\n\010" + - "file_set\030\001 \001(\01322.google.privacy.dlp.v2.C" + - "loudStorageOptions.FileSet\022\034\n\024bytes_limi" + - "t_per_file\030\004 \001(\003\022$\n\034bytes_limit_per_file" + - "_percent\030\010 \001(\005\0223\n\nfile_types\030\005 \003(\0162\037.goo" + - "gle.privacy.dlp.v2.FileType\022N\n\rsample_me" + - "thod\030\006 \001(\01627.google.privacy.dlp.v2.Cloud" + - "StorageOptions.SampleMethod\022\033\n\023files_lim" + - "it_percent\030\007 \001(\005\032_\n\007FileSet\022\013\n\003url\030\001 \001(\t" + - "\022G\n\016regex_file_set\030\002 \001(\0132/.google.privac" + - "y.dlp.v2.CloudStorageRegexFileSet\"H\n\014Sam" + - "pleMethod\022\035\n\031SAMPLE_METHOD_UNSPECIFIED\020\000" + - "\022\007\n\003TOP\020\001\022\020\n\014RANDOM_START\020\002\"\"\n\023CloudStor" + - "ageFileSet\022\013\n\003url\030\001 \001(\t\" \n\020CloudStorageP" + - "ath\022\014\n\004path\030\001 \001(\t\"\304\003\n\017BigQueryOptions\022=\n" + - "\017table_reference\030\001 \001(\0132$.google.privacy." + - "dlp.v2.BigQueryTable\022:\n\022identifying_fiel" + - "ds\030\002 \003(\0132\036.google.privacy.dlp.v2.FieldId" + - "\022\022\n\nrows_limit\030\003 \001(\003\022\032\n\022rows_limit_perce" + - "nt\030\006 \001(\005\022J\n\rsample_method\030\004 \001(\01623.google" + - ".privacy.dlp.v2.BigQueryOptions.SampleMe" + - "thod\0227\n\017excluded_fields\030\005 \003(\0132\036.google.p" + - "rivacy.dlp.v2.FieldId\0227\n\017included_fields" + - "\030\007 \003(\0132\036.google.privacy.dlp.v2.FieldId\"H" + - "\n\014SampleMethod\022\035\n\031SAMPLE_METHOD_UNSPECIF" + - "IED\020\000\022\007\n\003TOP\020\001\022\020\n\014RANDOM_START\020\002\"\332\004\n\rSto" + - "rageConfig\022D\n\021datastore_options\030\002 \001(\0132\'." + - "google.privacy.dlp.v2.DatastoreOptionsH\000" + - "\022K\n\025cloud_storage_options\030\003 \001(\0132*.google" + - ".privacy.dlp.v2.CloudStorageOptionsH\000\022C\n" + - "\021big_query_options\030\004 \001(\0132&.google.privac" + - "y.dlp.v2.BigQueryOptionsH\000\022>\n\016hybrid_opt" + - "ions\030\t \001(\0132$.google.privacy.dlp.v2.Hybri" + - "dOptionsH\000\022L\n\017timespan_config\030\006 \001(\01323.go" + - "ogle.privacy.dlp.v2.StorageConfig.Timesp" + - "anConfig\032\332\001\n\016TimespanConfig\022.\n\nstart_tim" + - "e\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n\010e" + - "nd_time\030\002 \001(\0132\032.google.protobuf.Timestam" + - "p\0227\n\017timestamp_field\030\003 \001(\0132\036.google.priv" + - "acy.dlp.v2.FieldId\0221\n)enable_auto_popula" + - "tion_of_timespan_config\030\004 \001(\010B\006\n\004type\"\366\001" + - "\n\rHybridOptions\022\023\n\013description\030\001 \001(\t\022#\n\033" + - "required_finding_label_keys\030\002 \003(\t\022@\n\006lab" + - "els\030\003 \003(\01320.google.privacy.dlp.v2.Hybrid" + - "Options.LabelsEntry\022:\n\rtable_options\030\004 \001" + - "(\0132#.google.privacy.dlp.v2.TableOptions\032" + - "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + - "(\t:\0028\001\"`\n\013BigQueryKey\022=\n\017table_reference" + - "\030\001 \001(\0132$.google.privacy.dlp.v2.BigQueryT" + - "able\022\022\n\nrow_number\030\002 \001(\003\">\n\014DatastoreKey" + - "\022.\n\nentity_key\030\001 \001(\0132\032.google.privacy.dl" + - "p.v2.Key\"\273\001\n\003Key\0228\n\014partition_id\030\001 \001(\0132\"" + - ".google.privacy.dlp.v2.PartitionId\0224\n\004pa" + - "th\030\002 \003(\0132&.google.privacy.dlp.v2.Key.Pat" + - "hElement\032D\n\013PathElement\022\014\n\004kind\030\001 \001(\t\022\014\n" + - "\002id\030\002 \001(\003H\000\022\016\n\004name\030\003 \001(\tH\000B\t\n\007id_type\"\241" + - "\001\n\tRecordKey\022<\n\rdatastore_key\030\002 \001(\0132#.go" + - "ogle.privacy.dlp.v2.DatastoreKeyH\000\022;\n\rbi" + - "g_query_key\030\003 \001(\0132\".google.privacy.dlp.v" + - "2.BigQueryKeyH\000\022\021\n\tid_values\030\005 \003(\tB\006\n\004ty" + - "pe\"I\n\rBigQueryTable\022\022\n\nproject_id\030\001 \001(\t\022" + - "\022\n\ndataset_id\030\002 \001(\t\022\020\n\010table_id\030\003 \001(\t\"s\n" + - "\rBigQueryField\0223\n\005table\030\001 \001(\0132$.google.p" + - "rivacy.dlp.v2.BigQueryTable\022-\n\005field\030\002 \001" + - "(\0132\036.google.privacy.dlp.v2.FieldId\"9\n\010En" + - "tityId\022-\n\005field\030\001 \001(\0132\036.google.privacy.d" + - "lp.v2.FieldId\"J\n\014TableOptions\022:\n\022identif" + - "ying_fields\030\001 \003(\0132\036.google.privacy.dlp.v" + - "2.FieldId*t\n\nLikelihood\022\032\n\026LIKELIHOOD_UN" + - "SPECIFIED\020\000\022\021\n\rVERY_UNLIKELY\020\001\022\014\n\010UNLIKE" + - "LY\020\002\022\014\n\010POSSIBLE\020\003\022\n\n\006LIKELY\020\004\022\017\n\013VERY_L" + - "IKELY\020\005*\232\001\n\010FileType\022\031\n\025FILE_TYPE_UNSPEC" + - "IFIED\020\000\022\017\n\013BINARY_FILE\020\001\022\r\n\tTEXT_FILE\020\002\022" + - "\t\n\005IMAGE\020\003\022\010\n\004WORD\020\005\022\007\n\003PDF\020\006\022\010\n\004AVRO\020\007\022" + - "\007\n\003CSV\020\010\022\007\n\003TSV\020\t\022\016\n\nPOWERPOINT\020\013\022\t\n\005EXC" + - "EL\020\014B\250\001\n\031com.google.privacy.dlp.v2B\nDlpS" + - "torageP\001Z8google.golang.org/genproto/goo" + - "gleapis/privacy/dlp/v2;dlp\252\002\023Google.Clou" + - "d.Dlp.V2\312\002\023Google\\Cloud\\Dlp\\V2\352\002\026Google:" + - ":Cloud::Dlp::V2b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_privacy_dlp_v2_InfoType_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_privacy_dlp_v2_InfoType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_InfoType_descriptor, - new java.lang.String[] { "Name", "Version", }); - internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor, - new java.lang.String[] { "Score", }); - internal_static_google_privacy_dlp_v2_StoredType_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_privacy_dlp_v2_StoredType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StoredType_descriptor, - new java.lang.String[] { "Name", "CreateTime", }); - internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_privacy_dlp_v2_CustomInfoType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor, - new java.lang.String[] { "InfoType", "Likelihood", "Dictionary", "Regex", "SurrogateType", "StoredType", "DetectionRules", "ExclusionType", "Type", }); - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor = - internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor, - new java.lang.String[] { "WordList", "CloudStoragePath", "Source", }); - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor = - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CustomInfoType_Dictionary_WordList_descriptor, - new java.lang.String[] { "Words", }); - internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor = - internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CustomInfoType_Regex_descriptor, - new java.lang.String[] { "Pattern", "GroupIndexes", }); - internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor = - internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor.getNestedTypes().get(2); - internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CustomInfoType_SurrogateType_descriptor, - new java.lang.String[] { }); - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor = - internal_static_google_privacy_dlp_v2_CustomInfoType_descriptor.getNestedTypes().get(3); - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor, - new java.lang.String[] { "HotwordRule", "Type", }); - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor = - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_Proximity_descriptor, - new java.lang.String[] { "WindowBefore", "WindowAfter", }); - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor = - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor.getNestedTypes().get(1); - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_LikelihoodAdjustment_descriptor, - new java.lang.String[] { "FixedLikelihood", "RelativeLikelihood", "Adjustment", }); - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor = - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_descriptor.getNestedTypes().get(2); - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CustomInfoType_DetectionRule_HotwordRule_descriptor, - new java.lang.String[] { "HotwordRegex", "Proximity", "LikelihoodAdjustment", }); - internal_static_google_privacy_dlp_v2_FieldId_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_privacy_dlp_v2_FieldId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_FieldId_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_PartitionId_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_privacy_dlp_v2_PartitionId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_PartitionId_descriptor, - new java.lang.String[] { "ProjectId", "NamespaceId", }); - internal_static_google_privacy_dlp_v2_KindExpression_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_privacy_dlp_v2_KindExpression_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_KindExpression_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_privacy_dlp_v2_DatastoreOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DatastoreOptions_descriptor, - new java.lang.String[] { "PartitionId", "Kind", }); - internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CloudStorageRegexFileSet_descriptor, - new java.lang.String[] { "BucketName", "IncludeRegex", "ExcludeRegex", }); - internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_privacy_dlp_v2_CloudStorageOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor, - new java.lang.String[] { "FileSet", "BytesLimitPerFile", "BytesLimitPerFilePercent", "FileTypes", "SampleMethod", "FilesLimitPercent", }); - internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor = - internal_static_google_privacy_dlp_v2_CloudStorageOptions_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CloudStorageOptions_FileSet_descriptor, - new java.lang.String[] { "Url", "RegexFileSet", }); - internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_privacy_dlp_v2_CloudStorageFileSet_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CloudStorageFileSet_descriptor, - new java.lang.String[] { "Url", }); - internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_privacy_dlp_v2_CloudStoragePath_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_CloudStoragePath_descriptor, - new java.lang.String[] { "Path", }); - internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_privacy_dlp_v2_BigQueryOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_BigQueryOptions_descriptor, - new java.lang.String[] { "TableReference", "IdentifyingFields", "RowsLimit", "RowsLimitPercent", "SampleMethod", "ExcludedFields", "IncludedFields", }); - internal_static_google_privacy_dlp_v2_StorageConfig_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_privacy_dlp_v2_StorageConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StorageConfig_descriptor, - new java.lang.String[] { "DatastoreOptions", "CloudStorageOptions", "BigQueryOptions", "HybridOptions", "TimespanConfig", "Type", }); - internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor = - internal_static_google_privacy_dlp_v2_StorageConfig_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor, - new java.lang.String[] { "StartTime", "EndTime", "TimestampField", "EnableAutoPopulationOfTimespanConfig", }); - internal_static_google_privacy_dlp_v2_HybridOptions_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_HybridOptions_descriptor, - new java.lang.String[] { "Description", "RequiredFindingLabelKeys", "Labels", "TableOptions", }); - internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_descriptor = - internal_static_google_privacy_dlp_v2_HybridOptions_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_privacy_dlp_v2_BigQueryKey_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_BigQueryKey_descriptor, - new java.lang.String[] { "TableReference", "RowNumber", }); - internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_privacy_dlp_v2_DatastoreKey_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_DatastoreKey_descriptor, - new java.lang.String[] { "EntityKey", }); - internal_static_google_privacy_dlp_v2_Key_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_privacy_dlp_v2_Key_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Key_descriptor, - new java.lang.String[] { "PartitionId", "Path", }); - internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor = - internal_static_google_privacy_dlp_v2_Key_descriptor.getNestedTypes().get(0); - internal_static_google_privacy_dlp_v2_Key_PathElement_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor, - new java.lang.String[] { "Kind", "Id", "Name", "IdType", }); - internal_static_google_privacy_dlp_v2_RecordKey_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_privacy_dlp_v2_RecordKey_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_RecordKey_descriptor, - new java.lang.String[] { "DatastoreKey", "BigQueryKey", "IdValues", "Type", }); - internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_privacy_dlp_v2_BigQueryTable_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_BigQueryTable_descriptor, - new java.lang.String[] { "ProjectId", "DatasetId", "TableId", }); - internal_static_google_privacy_dlp_v2_BigQueryField_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_privacy_dlp_v2_BigQueryField_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_BigQueryField_descriptor, - new java.lang.String[] { "Table", "Field", }); - internal_static_google_privacy_dlp_v2_EntityId_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_privacy_dlp_v2_EntityId_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_EntityId_descriptor, - new java.lang.String[] { "Field", }); - internal_static_google_privacy_dlp_v2_TableOptions_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_privacy_dlp_v2_TableOptions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_privacy_dlp_v2_TableOptions_descriptor, - new java.lang.String[] { "IdentifyingFields", }); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocation.java deleted file mode 100644 index e1a55799e30f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocation.java +++ /dev/null @@ -1,514 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Location of a finding within a document.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DocumentLocation} - */ -public final class DocumentLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.DocumentLocation) - DocumentLocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use DocumentLocation.newBuilder() to construct. - private DocumentLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DocumentLocation() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DocumentLocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DocumentLocation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - fileOffset_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DocumentLocation.class, com.google.privacy.dlp.v2.DocumentLocation.Builder.class); - } - - public static final int FILE_OFFSET_FIELD_NUMBER = 1; - private long fileOffset_; - /** - *
-   * Offset of the line, from the beginning of the file, where the finding
-   * is located.
-   * 
- * - * int64 file_offset = 1; - * @return The fileOffset. - */ - @java.lang.Override - public long getFileOffset() { - return fileOffset_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (fileOffset_ != 0L) { - output.writeInt64(1, fileOffset_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (fileOffset_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, fileOffset_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.DocumentLocation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.DocumentLocation other = (com.google.privacy.dlp.v2.DocumentLocation) obj; - - if (getFileOffset() - != other.getFileOffset()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FILE_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFileOffset()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.DocumentLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.DocumentLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Location of a finding within a document.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.DocumentLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.DocumentLocation) - com.google.privacy.dlp.v2.DocumentLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.DocumentLocation.class, com.google.privacy.dlp.v2.DocumentLocation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.DocumentLocation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - fileOffset_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_DocumentLocation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DocumentLocation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DocumentLocation build() { - com.google.privacy.dlp.v2.DocumentLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DocumentLocation buildPartial() { - com.google.privacy.dlp.v2.DocumentLocation result = new com.google.privacy.dlp.v2.DocumentLocation(this); - result.fileOffset_ = fileOffset_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.DocumentLocation) { - return mergeFrom((com.google.privacy.dlp.v2.DocumentLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.DocumentLocation other) { - if (other == com.google.privacy.dlp.v2.DocumentLocation.getDefaultInstance()) return this; - if (other.getFileOffset() != 0L) { - setFileOffset(other.getFileOffset()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.DocumentLocation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.DocumentLocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long fileOffset_ ; - /** - *
-     * Offset of the line, from the beginning of the file, where the finding
-     * is located.
-     * 
- * - * int64 file_offset = 1; - * @return The fileOffset. - */ - @java.lang.Override - public long getFileOffset() { - return fileOffset_; - } - /** - *
-     * Offset of the line, from the beginning of the file, where the finding
-     * is located.
-     * 
- * - * int64 file_offset = 1; - * @param value The fileOffset to set. - * @return This builder for chaining. - */ - public Builder setFileOffset(long value) { - - fileOffset_ = value; - onChanged(); - return this; - } - /** - *
-     * Offset of the line, from the beginning of the file, where the finding
-     * is located.
-     * 
- * - * int64 file_offset = 1; - * @return This builder for chaining. - */ - public Builder clearFileOffset() { - - fileOffset_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.DocumentLocation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.DocumentLocation) - private static final com.google.privacy.dlp.v2.DocumentLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.DocumentLocation(); - } - - public static com.google.privacy.dlp.v2.DocumentLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DocumentLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DocumentLocation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.DocumentLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocationOrBuilder.java deleted file mode 100644 index 0d21b29d16db..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DocumentLocationOrBuilder.java +++ /dev/null @@ -1,20 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface DocumentLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.DocumentLocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Offset of the line, from the beginning of the file, where the finding
-   * is located.
-   * 
- * - * int64 file_offset = 1; - * @return The fileOffset. - */ - long getFileOffset(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java deleted file mode 100644 index e7c5f2c00fdf..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EncryptionStatus.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * How a resource is encrypted.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.EncryptionStatus} - */ -public enum EncryptionStatus - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unused.
-   * 
- * - * ENCRYPTION_STATUS_UNSPECIFIED = 0; - */ - ENCRYPTION_STATUS_UNSPECIFIED(0), - /** - *
-   * Google manages server-side encryption keys on your behalf.
-   * 
- * - * ENCRYPTION_GOOGLE_MANAGED = 1; - */ - ENCRYPTION_GOOGLE_MANAGED(1), - /** - *
-   * Customer provides the key.
-   * 
- * - * ENCRYPTION_CUSTOMER_MANAGED = 2; - */ - ENCRYPTION_CUSTOMER_MANAGED(2), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unused.
-   * 
- * - * ENCRYPTION_STATUS_UNSPECIFIED = 0; - */ - public static final int ENCRYPTION_STATUS_UNSPECIFIED_VALUE = 0; - /** - *
-   * Google manages server-side encryption keys on your behalf.
-   * 
- * - * ENCRYPTION_GOOGLE_MANAGED = 1; - */ - public static final int ENCRYPTION_GOOGLE_MANAGED_VALUE = 1; - /** - *
-   * Customer provides the key.
-   * 
- * - * ENCRYPTION_CUSTOMER_MANAGED = 2; - */ - public static final int ENCRYPTION_CUSTOMER_MANAGED_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EncryptionStatus valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static EncryptionStatus forNumber(int value) { - switch (value) { - case 0: return ENCRYPTION_STATUS_UNSPECIFIED; - case 1: return ENCRYPTION_GOOGLE_MANAGED; - case 2: return ENCRYPTION_CUSTOMER_MANAGED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - EncryptionStatus> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EncryptionStatus findValueByNumber(int number) { - return EncryptionStatus.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(11); - } - - private static final EncryptionStatus[] VALUES = values(); - - public static EncryptionStatus valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private EncryptionStatus(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.EncryptionStatus) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityId.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityId.java deleted file mode 100644 index e2533207bbc5..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityId.java +++ /dev/null @@ -1,673 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * An entity in a dataset is a field or set of fields that correspond to a
- * single person. For example, in medical records the `EntityId` might be a
- * patient identifier, or for financial records it might be an account
- * identifier. This message is used when generalizations or analysis must take
- * into account that multiple rows correspond to the same entity.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.EntityId} - */ -public final class EntityId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.EntityId) - EntityIdOrBuilder { -private static final long serialVersionUID = 0L; - // Use EntityId.newBuilder() to construct. - private EntityId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EntityId() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EntityId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EntityId( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.EntityId.class, com.google.privacy.dlp.v2.EntityId.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-   * Composite key indicating which field contains the entity identifier.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-   * Composite key indicating which field contains the entity identifier.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-   * Composite key indicating which field contains the entity identifier.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getField()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.EntityId)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.EntityId other = (com.google.privacy.dlp.v2.EntityId) obj; - - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.EntityId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.EntityId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.EntityId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.EntityId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.EntityId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.EntityId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.EntityId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.EntityId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.EntityId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.EntityId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.EntityId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.EntityId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.EntityId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An entity in a dataset is a field or set of fields that correspond to a
-   * single person. For example, in medical records the `EntityId` might be a
-   * patient identifier, or for financial records it might be an account
-   * identifier. This message is used when generalizations or analysis must take
-   * into account that multiple rows correspond to the same entity.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.EntityId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.EntityId) - com.google.privacy.dlp.v2.EntityIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.EntityId.class, com.google.privacy.dlp.v2.EntityId.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.EntityId.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_EntityId_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.EntityId getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.EntityId.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.EntityId build() { - com.google.privacy.dlp.v2.EntityId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.EntityId buildPartial() { - com.google.privacy.dlp.v2.EntityId result = new com.google.privacy.dlp.v2.EntityId(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.EntityId) { - return mergeFrom((com.google.privacy.dlp.v2.EntityId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.EntityId other) { - if (other == com.google.privacy.dlp.v2.EntityId.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.EntityId parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.EntityId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-     * Composite key indicating which field contains the entity identifier.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-     * Composite key indicating which field contains the entity identifier.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-     * Composite key indicating which field contains the entity identifier.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Composite key indicating which field contains the entity identifier.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Composite key indicating which field contains the entity identifier.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Composite key indicating which field contains the entity identifier.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-     * Composite key indicating which field contains the entity identifier.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-     * Composite key indicating which field contains the entity identifier.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-     * Composite key indicating which field contains the entity identifier.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.EntityId) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.EntityId) - private static final com.google.privacy.dlp.v2.EntityId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.EntityId(); - } - - public static com.google.privacy.dlp.v2.EntityId getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EntityId parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EntityId(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.EntityId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityIdOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityIdOrBuilder.java deleted file mode 100644 index f34df9f9d821..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/EntityIdOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface EntityIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.EntityId) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Composite key indicating which field contains the entity identifier.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-   * Composite key indicating which field contains the entity identifier.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-   * Composite key indicating which field contains the entity identifier.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Error.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Error.java deleted file mode 100644 index 03df97e0df2f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Error.java +++ /dev/null @@ -1,1110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Details information about an error encountered during job execution or
- * the results of an unsuccessful activation of the JobTrigger.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Error} - */ -public final class Error extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Error) - ErrorOrBuilder { -private static final long serialVersionUID = 0L; - // Use Error.newBuilder() to construct. - private Error(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Error() { - timestamps_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Error(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Error( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.rpc.Status.Builder subBuilder = null; - if (details_ != null) { - subBuilder = details_.toBuilder(); - } - details_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(details_); - details_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - timestamps_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - timestamps_.add( - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - timestamps_ = java.util.Collections.unmodifiableList(timestamps_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Error.class, com.google.privacy.dlp.v2.Error.Builder.class); - } - - public static final int DETAILS_FIELD_NUMBER = 1; - private com.google.rpc.Status details_; - /** - *
-   * Detailed error codes and messages.
-   * 
- * - * .google.rpc.Status details = 1; - * @return Whether the details field is set. - */ - @java.lang.Override - public boolean hasDetails() { - return details_ != null; - } - /** - *
-   * Detailed error codes and messages.
-   * 
- * - * .google.rpc.Status details = 1; - * @return The details. - */ - @java.lang.Override - public com.google.rpc.Status getDetails() { - return details_ == null ? com.google.rpc.Status.getDefaultInstance() : details_; - } - /** - *
-   * Detailed error codes and messages.
-   * 
- * - * .google.rpc.Status details = 1; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getDetailsOrBuilder() { - return getDetails(); - } - - public static final int TIMESTAMPS_FIELD_NUMBER = 2; - private java.util.List timestamps_; - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - @java.lang.Override - public java.util.List getTimestampsList() { - return timestamps_; - } - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - @java.lang.Override - public java.util.List - getTimestampsOrBuilderList() { - return timestamps_; - } - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - @java.lang.Override - public int getTimestampsCount() { - return timestamps_.size(); - } - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - @java.lang.Override - public com.google.protobuf.Timestamp getTimestamps(int index) { - return timestamps_.get(index); - } - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getTimestampsOrBuilder( - int index) { - return timestamps_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (details_ != null) { - output.writeMessage(1, getDetails()); - } - for (int i = 0; i < timestamps_.size(); i++) { - output.writeMessage(2, timestamps_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (details_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getDetails()); - } - for (int i = 0; i < timestamps_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, timestamps_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Error)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Error other = (com.google.privacy.dlp.v2.Error) obj; - - if (hasDetails() != other.hasDetails()) return false; - if (hasDetails()) { - if (!getDetails() - .equals(other.getDetails())) return false; - } - if (!getTimestampsList() - .equals(other.getTimestampsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDetails()) { - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); - } - if (getTimestampsCount() > 0) { - hash = (37 * hash) + TIMESTAMPS_FIELD_NUMBER; - hash = (53 * hash) + getTimestampsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Error parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Error parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Error parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Error parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Error parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Error parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Error parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Error parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Error parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Error parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Error parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Error parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Error prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Details information about an error encountered during job execution or
-   * the results of an unsuccessful activation of the JobTrigger.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Error} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Error) - com.google.privacy.dlp.v2.ErrorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Error.class, com.google.privacy.dlp.v2.Error.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Error.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getTimestampsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (detailsBuilder_ == null) { - details_ = null; - } else { - details_ = null; - detailsBuilder_ = null; - } - if (timestampsBuilder_ == null) { - timestamps_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - timestampsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Error_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Error getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Error.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Error build() { - com.google.privacy.dlp.v2.Error result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Error buildPartial() { - com.google.privacy.dlp.v2.Error result = new com.google.privacy.dlp.v2.Error(this); - int from_bitField0_ = bitField0_; - if (detailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = detailsBuilder_.build(); - } - if (timestampsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - timestamps_ = java.util.Collections.unmodifiableList(timestamps_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.timestamps_ = timestamps_; - } else { - result.timestamps_ = timestampsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Error) { - return mergeFrom((com.google.privacy.dlp.v2.Error)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Error other) { - if (other == com.google.privacy.dlp.v2.Error.getDefaultInstance()) return this; - if (other.hasDetails()) { - mergeDetails(other.getDetails()); - } - if (timestampsBuilder_ == null) { - if (!other.timestamps_.isEmpty()) { - if (timestamps_.isEmpty()) { - timestamps_ = other.timestamps_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTimestampsIsMutable(); - timestamps_.addAll(other.timestamps_); - } - onChanged(); - } - } else { - if (!other.timestamps_.isEmpty()) { - if (timestampsBuilder_.isEmpty()) { - timestampsBuilder_.dispose(); - timestampsBuilder_ = null; - timestamps_ = other.timestamps_; - bitField0_ = (bitField0_ & ~0x00000001); - timestampsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTimestampsFieldBuilder() : null; - } else { - timestampsBuilder_.addAllMessages(other.timestamps_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Error parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Error) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.rpc.Status details_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> detailsBuilder_; - /** - *
-     * Detailed error codes and messages.
-     * 
- * - * .google.rpc.Status details = 1; - * @return Whether the details field is set. - */ - public boolean hasDetails() { - return detailsBuilder_ != null || details_ != null; - } - /** - *
-     * Detailed error codes and messages.
-     * 
- * - * .google.rpc.Status details = 1; - * @return The details. - */ - public com.google.rpc.Status getDetails() { - if (detailsBuilder_ == null) { - return details_ == null ? com.google.rpc.Status.getDefaultInstance() : details_; - } else { - return detailsBuilder_.getMessage(); - } - } - /** - *
-     * Detailed error codes and messages.
-     * 
- * - * .google.rpc.Status details = 1; - */ - public Builder setDetails(com.google.rpc.Status value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - detailsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Detailed error codes and messages.
-     * 
- * - * .google.rpc.Status details = 1; - */ - public Builder setDetails( - com.google.rpc.Status.Builder builderForValue) { - if (detailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - detailsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Detailed error codes and messages.
-     * 
- * - * .google.rpc.Status details = 1; - */ - public Builder mergeDetails(com.google.rpc.Status value) { - if (detailsBuilder_ == null) { - if (details_ != null) { - details_ = - com.google.rpc.Status.newBuilder(details_).mergeFrom(value).buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - detailsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Detailed error codes and messages.
-     * 
- * - * .google.rpc.Status details = 1; - */ - public Builder clearDetails() { - if (detailsBuilder_ == null) { - details_ = null; - onChanged(); - } else { - details_ = null; - detailsBuilder_ = null; - } - - return this; - } - /** - *
-     * Detailed error codes and messages.
-     * 
- * - * .google.rpc.Status details = 1; - */ - public com.google.rpc.Status.Builder getDetailsBuilder() { - - onChanged(); - return getDetailsFieldBuilder().getBuilder(); - } - /** - *
-     * Detailed error codes and messages.
-     * 
- * - * .google.rpc.Status details = 1; - */ - public com.google.rpc.StatusOrBuilder getDetailsOrBuilder() { - if (detailsBuilder_ != null) { - return detailsBuilder_.getMessageOrBuilder(); - } else { - return details_ == null ? - com.google.rpc.Status.getDefaultInstance() : details_; - } - } - /** - *
-     * Detailed error codes and messages.
-     * 
- * - * .google.rpc.Status details = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getDetailsFieldBuilder() { - if (detailsBuilder_ == null) { - detailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getDetails(), - getParentForChildren(), - isClean()); - details_ = null; - } - return detailsBuilder_; - } - - private java.util.List timestamps_ = - java.util.Collections.emptyList(); - private void ensureTimestampsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - timestamps_ = new java.util.ArrayList(timestamps_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampsBuilder_; - - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public java.util.List getTimestampsList() { - if (timestampsBuilder_ == null) { - return java.util.Collections.unmodifiableList(timestamps_); - } else { - return timestampsBuilder_.getMessageList(); - } - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public int getTimestampsCount() { - if (timestampsBuilder_ == null) { - return timestamps_.size(); - } else { - return timestampsBuilder_.getCount(); - } - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public com.google.protobuf.Timestamp getTimestamps(int index) { - if (timestampsBuilder_ == null) { - return timestamps_.get(index); - } else { - return timestampsBuilder_.getMessage(index); - } - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public Builder setTimestamps( - int index, com.google.protobuf.Timestamp value) { - if (timestampsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTimestampsIsMutable(); - timestamps_.set(index, value); - onChanged(); - } else { - timestampsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public Builder setTimestamps( - int index, com.google.protobuf.Timestamp.Builder builderForValue) { - if (timestampsBuilder_ == null) { - ensureTimestampsIsMutable(); - timestamps_.set(index, builderForValue.build()); - onChanged(); - } else { - timestampsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public Builder addTimestamps(com.google.protobuf.Timestamp value) { - if (timestampsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTimestampsIsMutable(); - timestamps_.add(value); - onChanged(); - } else { - timestampsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public Builder addTimestamps( - int index, com.google.protobuf.Timestamp value) { - if (timestampsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTimestampsIsMutable(); - timestamps_.add(index, value); - onChanged(); - } else { - timestampsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public Builder addTimestamps( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (timestampsBuilder_ == null) { - ensureTimestampsIsMutable(); - timestamps_.add(builderForValue.build()); - onChanged(); - } else { - timestampsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public Builder addTimestamps( - int index, com.google.protobuf.Timestamp.Builder builderForValue) { - if (timestampsBuilder_ == null) { - ensureTimestampsIsMutable(); - timestamps_.add(index, builderForValue.build()); - onChanged(); - } else { - timestampsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public Builder addAllTimestamps( - java.lang.Iterable values) { - if (timestampsBuilder_ == null) { - ensureTimestampsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, timestamps_); - onChanged(); - } else { - timestampsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public Builder clearTimestamps() { - if (timestampsBuilder_ == null) { - timestamps_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - timestampsBuilder_.clear(); - } - return this; - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public Builder removeTimestamps(int index) { - if (timestampsBuilder_ == null) { - ensureTimestampsIsMutable(); - timestamps_.remove(index); - onChanged(); - } else { - timestampsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public com.google.protobuf.Timestamp.Builder getTimestampsBuilder( - int index) { - return getTimestampsFieldBuilder().getBuilder(index); - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public com.google.protobuf.TimestampOrBuilder getTimestampsOrBuilder( - int index) { - if (timestampsBuilder_ == null) { - return timestamps_.get(index); } else { - return timestampsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public java.util.List - getTimestampsOrBuilderList() { - if (timestampsBuilder_ != null) { - return timestampsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(timestamps_); - } - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public com.google.protobuf.Timestamp.Builder addTimestampsBuilder() { - return getTimestampsFieldBuilder().addBuilder( - com.google.protobuf.Timestamp.getDefaultInstance()); - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public com.google.protobuf.Timestamp.Builder addTimestampsBuilder( - int index) { - return getTimestampsFieldBuilder().addBuilder( - index, com.google.protobuf.Timestamp.getDefaultInstance()); - } - /** - *
-     * The times the error occurred.
-     * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - public java.util.List - getTimestampsBuilderList() { - return getTimestampsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getTimestampsFieldBuilder() { - if (timestampsBuilder_ == null) { - timestampsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - timestamps_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - timestamps_ = null; - } - return timestampsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Error) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Error) - private static final com.google.privacy.dlp.v2.Error DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Error(); - } - - public static com.google.privacy.dlp.v2.Error getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Error parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Error(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Error getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ErrorOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ErrorOrBuilder.java deleted file mode 100644 index e91e9157b497..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ErrorOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ErrorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Error) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Detailed error codes and messages.
-   * 
- * - * .google.rpc.Status details = 1; - * @return Whether the details field is set. - */ - boolean hasDetails(); - /** - *
-   * Detailed error codes and messages.
-   * 
- * - * .google.rpc.Status details = 1; - * @return The details. - */ - com.google.rpc.Status getDetails(); - /** - *
-   * Detailed error codes and messages.
-   * 
- * - * .google.rpc.Status details = 1; - */ - com.google.rpc.StatusOrBuilder getDetailsOrBuilder(); - - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - java.util.List - getTimestampsList(); - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - com.google.protobuf.Timestamp getTimestamps(int index); - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - int getTimestampsCount(); - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - java.util.List - getTimestampsOrBuilderList(); - /** - *
-   * The times the error occurred.
-   * 
- * - * repeated .google.protobuf.Timestamp timestamps = 2; - */ - com.google.protobuf.TimestampOrBuilder getTimestampsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java deleted file mode 100644 index d8a47b8bd5d0..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypes.java +++ /dev/null @@ -1,1033 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * List of excluded infoTypes.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ExcludeInfoTypes} - */ -public final class ExcludeInfoTypes extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ExcludeInfoTypes) - ExcludeInfoTypesOrBuilder { -private static final long serialVersionUID = 0L; - // Use ExcludeInfoTypes.newBuilder() to construct. - private ExcludeInfoTypes(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ExcludeInfoTypes() { - infoTypes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ExcludeInfoTypes(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ExcludeInfoTypes( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - infoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ExcludeInfoTypes.class, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder.class); - } - - public static final int INFO_TYPES_FIELD_NUMBER = 1; - private java.util.List infoTypes_; - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public java.util.List getInfoTypesList() { - return infoTypes_; - } - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public java.util.List - getInfoTypesOrBuilderList() { - return infoTypes_; - } - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public int getInfoTypesCount() { - return infoTypes_.size(); - } - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { - return infoTypes_.get(index); - } - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { - return infoTypes_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < infoTypes_.size(); i++) { - output.writeMessage(1, infoTypes_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < infoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, infoTypes_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ExcludeInfoTypes)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ExcludeInfoTypes other = (com.google.privacy.dlp.v2.ExcludeInfoTypes) obj; - - if (!getInfoTypesList() - .equals(other.getInfoTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getInfoTypesCount() > 0) { - hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getInfoTypesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ExcludeInfoTypes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ExcludeInfoTypes prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * List of excluded infoTypes.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ExcludeInfoTypes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ExcludeInfoTypes) - com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ExcludeInfoTypes.class, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ExcludeInfoTypes.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoTypesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - infoTypesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExcludeInfoTypes_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ExcludeInfoTypes getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ExcludeInfoTypes build() { - com.google.privacy.dlp.v2.ExcludeInfoTypes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ExcludeInfoTypes buildPartial() { - com.google.privacy.dlp.v2.ExcludeInfoTypes result = new com.google.privacy.dlp.v2.ExcludeInfoTypes(this); - int from_bitField0_ = bitField0_; - if (infoTypesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.infoTypes_ = infoTypes_; - } else { - result.infoTypes_ = infoTypesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ExcludeInfoTypes) { - return mergeFrom((com.google.privacy.dlp.v2.ExcludeInfoTypes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ExcludeInfoTypes other) { - if (other == com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance()) return this; - if (infoTypesBuilder_ == null) { - if (!other.infoTypes_.isEmpty()) { - if (infoTypes_.isEmpty()) { - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInfoTypesIsMutable(); - infoTypes_.addAll(other.infoTypes_); - } - onChanged(); - } - } else { - if (!other.infoTypes_.isEmpty()) { - if (infoTypesBuilder_.isEmpty()) { - infoTypesBuilder_.dispose(); - infoTypesBuilder_ = null; - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - infoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInfoTypesFieldBuilder() : null; - } else { - infoTypesBuilder_.addAllMessages(other.infoTypes_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ExcludeInfoTypes parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ExcludeInfoTypes) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List infoTypes_ = - java.util.Collections.emptyList(); - private void ensureInfoTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(infoTypes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; - - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List getInfoTypesList() { - if (infoTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(infoTypes_); - } else { - return infoTypesBuilder_.getMessageList(); - } - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public int getInfoTypesCount() { - if (infoTypesBuilder_ == null) { - return infoTypes_.size(); - } else { - return infoTypesBuilder_.getCount(); - } - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); - } else { - return infoTypesBuilder_.getMessage(index); - } - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.set(index, value); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(index, value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addAllInfoTypes( - java.lang.Iterable values) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, infoTypes_); - onChanged(); - } else { - infoTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder clearInfoTypes() { - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - infoTypesBuilder_.clear(); - } - return this; - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder removeInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.remove(index); - onChanged(); - } else { - infoTypesBuilder_.remove(index); - } - return this; - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().getBuilder(index); - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); } else { - return infoTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List - getInfoTypesOrBuilderList() { - if (infoTypesBuilder_ != null) { - return infoTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(infoTypes_); - } - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { - return getInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); - } - /** - *
-     * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-     * contained within with a finding of an infoType from this list. For
-     * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-     * `exclusion_rule` containing `exclude_info_types.info_types` with
-     * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-     * with EMAIL_ADDRESS finding.
-     * That leads to "555-222-2222@example.org" to generate only a single
-     * finding, namely email address.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List - getInfoTypesBuilderList() { - return getInfoTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypesFieldBuilder() { - if (infoTypesBuilder_ == null) { - infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - infoTypes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - infoTypes_ = null; - } - return infoTypesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ExcludeInfoTypes) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ExcludeInfoTypes) - private static final com.google.privacy.dlp.v2.ExcludeInfoTypes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ExcludeInfoTypes(); - } - - public static com.google.privacy.dlp.v2.ExcludeInfoTypes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExcludeInfoTypes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExcludeInfoTypes(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ExcludeInfoTypes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypesOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypesOrBuilder.java deleted file mode 100644 index 521bd5256281..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExcludeInfoTypesOrBuilder.java +++ /dev/null @@ -1,88 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ExcludeInfoTypesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ExcludeInfoTypes) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - java.util.List - getInfoTypesList(); - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - int getInfoTypesCount(); - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - java.util.List - getInfoTypesOrBuilderList(); - /** - *
-   * InfoType list in ExclusionRule rule drops a finding when it overlaps or
-   * contained within with a finding of an infoType from this list. For
-   * example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and
-   * `exclusion_rule` containing `exclude_info_types.info_types` with
-   * "EMAIL_ADDRESS" the phone number findings are dropped if they overlap
-   * with EMAIL_ADDRESS finding.
-   * That leads to "555-222-2222@example.org" to generate only a single
-   * finding, namely email address.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRule.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRule.java deleted file mode 100644 index f6106c7cbab5..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRule.java +++ /dev/null @@ -1,1413 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The rule that specifies conditions when findings of infoTypes specified in
- * `InspectionRuleSet` are removed from results.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ExclusionRule} - */ -public final class ExclusionRule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ExclusionRule) - ExclusionRuleOrBuilder { -private static final long serialVersionUID = 0L; - // Use ExclusionRule.newBuilder() to construct. - private ExclusionRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ExclusionRule() { - matchingType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ExclusionRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ExclusionRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder subBuilder = null; - if (typeCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null; - if (typeCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder subBuilder = null; - if (typeCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.ExcludeInfoTypes) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.ExcludeInfoTypes.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ExcludeInfoTypes) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 3; - break; - } - case 32: { - int rawValue = input.readEnum(); - - matchingType_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ExclusionRule.class, com.google.privacy.dlp.v2.ExclusionRule.Builder.class); - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DICTIONARY(1), - REGEX(2), - EXCLUDE_INFO_TYPES(3), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return DICTIONARY; - case 2: return REGEX; - case 3: return EXCLUDE_INFO_TYPES; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int DICTIONARY_FIELD_NUMBER = 1; - /** - *
-   * Dictionary which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - * @return Whether the dictionary field is set. - */ - @java.lang.Override - public boolean hasDictionary() { - return typeCase_ == 1; - } - /** - *
-   * Dictionary which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - * @return The dictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - /** - *
-   * Dictionary which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - - public static final int REGEX_FIELD_NUMBER = 2; - /** - *
-   * Regular expression which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - * @return Whether the regex field is set. - */ - @java.lang.Override - public boolean hasRegex() { - return typeCase_ == 2; - } - /** - *
-   * Regular expression which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - * @return The regex. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - /** - *
-   * Regular expression which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - - public static final int EXCLUDE_INFO_TYPES_FIELD_NUMBER = 3; - /** - *
-   * Set of infoTypes for which findings would affect this rule.
-   * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - * @return Whether the excludeInfoTypes field is set. - */ - @java.lang.Override - public boolean hasExcludeInfoTypes() { - return typeCase_ == 3; - } - /** - *
-   * Set of infoTypes for which findings would affect this rule.
-   * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - * @return The excludeInfoTypes. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ExcludeInfoTypes getExcludeInfoTypes() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_; - } - return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); - } - /** - *
-   * Set of infoTypes for which findings would affect this rule.
-   * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder getExcludeInfoTypesOrBuilder() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_; - } - return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); - } - - public static final int MATCHING_TYPE_FIELD_NUMBER = 4; - private int matchingType_; - /** - *
-   * How the rule is applied, see MatchingType documentation for details.
-   * 
- * - * .google.privacy.dlp.v2.MatchingType matching_type = 4; - * @return The enum numeric value on the wire for matchingType. - */ - @java.lang.Override public int getMatchingTypeValue() { - return matchingType_; - } - /** - *
-   * How the rule is applied, see MatchingType documentation for details.
-   * 
- * - * .google.privacy.dlp.v2.MatchingType matching_type = 4; - * @return The matchingType. - */ - @java.lang.Override public com.google.privacy.dlp.v2.MatchingType getMatchingType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.MatchingType result = com.google.privacy.dlp.v2.MatchingType.valueOf(matchingType_); - return result == null ? com.google.privacy.dlp.v2.MatchingType.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); - } - if (typeCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); - } - if (typeCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_); - } - if (matchingType_ != com.google.privacy.dlp.v2.MatchingType.MATCHING_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, matchingType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); - } - if (typeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); - } - if (typeCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_); - } - if (matchingType_ != com.google.privacy.dlp.v2.MatchingType.MATCHING_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, matchingType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ExclusionRule)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ExclusionRule other = (com.google.privacy.dlp.v2.ExclusionRule) obj; - - if (matchingType_ != other.matchingType_) return false; - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 1: - if (!getDictionary() - .equals(other.getDictionary())) return false; - break; - case 2: - if (!getRegex() - .equals(other.getRegex())) return false; - break; - case 3: - if (!getExcludeInfoTypes() - .equals(other.getExcludeInfoTypes())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MATCHING_TYPE_FIELD_NUMBER; - hash = (53 * hash) + matchingType_; - switch (typeCase_) { - case 1: - hash = (37 * hash) + DICTIONARY_FIELD_NUMBER; - hash = (53 * hash) + getDictionary().hashCode(); - break; - case 2: - hash = (37 * hash) + REGEX_FIELD_NUMBER; - hash = (53 * hash) + getRegex().hashCode(); - break; - case 3: - hash = (37 * hash) + EXCLUDE_INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getExcludeInfoTypes().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ExclusionRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ExclusionRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The rule that specifies conditions when findings of infoTypes specified in
-   * `InspectionRuleSet` are removed from results.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ExclusionRule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ExclusionRule) - com.google.privacy.dlp.v2.ExclusionRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ExclusionRule.class, com.google.privacy.dlp.v2.ExclusionRule.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ExclusionRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - matchingType_ = 0; - - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ExclusionRule_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ExclusionRule getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ExclusionRule build() { - com.google.privacy.dlp.v2.ExclusionRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ExclusionRule buildPartial() { - com.google.privacy.dlp.v2.ExclusionRule result = new com.google.privacy.dlp.v2.ExclusionRule(this); - if (typeCase_ == 1) { - if (dictionaryBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = dictionaryBuilder_.build(); - } - } - if (typeCase_ == 2) { - if (regexBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = regexBuilder_.build(); - } - } - if (typeCase_ == 3) { - if (excludeInfoTypesBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = excludeInfoTypesBuilder_.build(); - } - } - result.matchingType_ = matchingType_; - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ExclusionRule) { - return mergeFrom((com.google.privacy.dlp.v2.ExclusionRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ExclusionRule other) { - if (other == com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance()) return this; - if (other.matchingType_ != 0) { - setMatchingTypeValue(other.getMatchingTypeValue()); - } - switch (other.getTypeCase()) { - case DICTIONARY: { - mergeDictionary(other.getDictionary()); - break; - } - case REGEX: { - mergeRegex(other.getRegex()); - break; - } - case EXCLUDE_INFO_TYPES: { - mergeExcludeInfoTypes(other.getExcludeInfoTypes()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ExclusionRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ExclusionRule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> dictionaryBuilder_; - /** - *
-     * Dictionary which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - * @return Whether the dictionary field is set. - */ - @java.lang.Override - public boolean hasDictionary() { - return typeCase_ == 1; - } - /** - *
-     * Dictionary which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - * @return The dictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { - if (dictionaryBuilder_ == null) { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } else { - if (typeCase_ == 1) { - return dictionaryBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - } - /** - *
-     * Dictionary which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - */ - public Builder setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { - if (dictionaryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - dictionaryBuilder_.setMessage(value); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Dictionary which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - */ - public Builder setDictionary( - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder builderForValue) { - if (dictionaryBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - dictionaryBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Dictionary which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - */ - public Builder mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { - if (dictionaryBuilder_ == null) { - if (typeCase_ == 1 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 1) { - dictionaryBuilder_.mergeFrom(value); - } else { - dictionaryBuilder_.setMessage(value); - } - } - typeCase_ = 1; - return this; - } - /** - *
-     * Dictionary which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - */ - public Builder clearDictionary() { - if (dictionaryBuilder_ == null) { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - } - dictionaryBuilder_.clear(); - } - return this; - } - /** - *
-     * Dictionary which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder getDictionaryBuilder() { - return getDictionaryFieldBuilder().getBuilder(); - } - /** - *
-     * Dictionary which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { - if ((typeCase_ == 1) && (dictionaryBuilder_ != null)) { - return dictionaryBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - } - /** - *
-     * Dictionary which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> - getDictionaryFieldBuilder() { - if (dictionaryBuilder_ == null) { - if (!(typeCase_ == 1)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - dictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 1; - onChanged();; - return dictionaryBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> regexBuilder_; - /** - *
-     * Regular expression which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - * @return Whether the regex field is set. - */ - @java.lang.Override - public boolean hasRegex() { - return typeCase_ == 2; - } - /** - *
-     * Regular expression which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - * @return The regex. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { - if (regexBuilder_ == null) { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } else { - if (typeCase_ == 2) { - return regexBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - } - /** - *
-     * Regular expression which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - */ - public Builder setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { - if (regexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - regexBuilder_.setMessage(value); - } - typeCase_ = 2; - return this; - } - /** - *
-     * Regular expression which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - */ - public Builder setRegex( - com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) { - if (regexBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - regexBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 2; - return this; - } - /** - *
-     * Regular expression which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - */ - public Builder mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { - if (regexBuilder_ == null) { - if (typeCase_ == 2 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 2) { - regexBuilder_.mergeFrom(value); - } else { - regexBuilder_.setMessage(value); - } - } - typeCase_ = 2; - return this; - } - /** - *
-     * Regular expression which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - */ - public Builder clearRegex() { - if (regexBuilder_ == null) { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - } - regexBuilder_.clear(); - } - return this; - } - /** - *
-     * Regular expression which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getRegexBuilder() { - return getRegexFieldBuilder().getBuilder(); - } - /** - *
-     * Regular expression which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { - if ((typeCase_ == 2) && (regexBuilder_ != null)) { - return regexBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - } - /** - *
-     * Regular expression which defines the rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> - getRegexFieldBuilder() { - if (regexBuilder_ == null) { - if (!(typeCase_ == 2)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - regexBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 2; - onChanged();; - return regexBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ExcludeInfoTypes, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder, com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder> excludeInfoTypesBuilder_; - /** - *
-     * Set of infoTypes for which findings would affect this rule.
-     * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - * @return Whether the excludeInfoTypes field is set. - */ - @java.lang.Override - public boolean hasExcludeInfoTypes() { - return typeCase_ == 3; - } - /** - *
-     * Set of infoTypes for which findings would affect this rule.
-     * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - * @return The excludeInfoTypes. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ExcludeInfoTypes getExcludeInfoTypes() { - if (excludeInfoTypesBuilder_ == null) { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_; - } - return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); - } else { - if (typeCase_ == 3) { - return excludeInfoTypesBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); - } - } - /** - *
-     * Set of infoTypes for which findings would affect this rule.
-     * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - */ - public Builder setExcludeInfoTypes(com.google.privacy.dlp.v2.ExcludeInfoTypes value) { - if (excludeInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - excludeInfoTypesBuilder_.setMessage(value); - } - typeCase_ = 3; - return this; - } - /** - *
-     * Set of infoTypes for which findings would affect this rule.
-     * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - */ - public Builder setExcludeInfoTypes( - com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder builderForValue) { - if (excludeInfoTypesBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - excludeInfoTypesBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 3; - return this; - } - /** - *
-     * Set of infoTypes for which findings would affect this rule.
-     * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - */ - public Builder mergeExcludeInfoTypes(com.google.privacy.dlp.v2.ExcludeInfoTypes value) { - if (excludeInfoTypesBuilder_ == null) { - if (typeCase_ == 3 && - type_ != com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.ExcludeInfoTypes.newBuilder((com.google.privacy.dlp.v2.ExcludeInfoTypes) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 3) { - excludeInfoTypesBuilder_.mergeFrom(value); - } else { - excludeInfoTypesBuilder_.setMessage(value); - } - } - typeCase_ = 3; - return this; - } - /** - *
-     * Set of infoTypes for which findings would affect this rule.
-     * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - */ - public Builder clearExcludeInfoTypes() { - if (excludeInfoTypesBuilder_ == null) { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - } - excludeInfoTypesBuilder_.clear(); - } - return this; - } - /** - *
-     * Set of infoTypes for which findings would affect this rule.
-     * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - */ - public com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder getExcludeInfoTypesBuilder() { - return getExcludeInfoTypesFieldBuilder().getBuilder(); - } - /** - *
-     * Set of infoTypes for which findings would affect this rule.
-     * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder getExcludeInfoTypesOrBuilder() { - if ((typeCase_ == 3) && (excludeInfoTypesBuilder_ != null)) { - return excludeInfoTypesBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_; - } - return com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); - } - } - /** - *
-     * Set of infoTypes for which findings would affect this rule.
-     * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ExcludeInfoTypes, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder, com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder> - getExcludeInfoTypesFieldBuilder() { - if (excludeInfoTypesBuilder_ == null) { - if (!(typeCase_ == 3)) { - type_ = com.google.privacy.dlp.v2.ExcludeInfoTypes.getDefaultInstance(); - } - excludeInfoTypesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ExcludeInfoTypes, com.google.privacy.dlp.v2.ExcludeInfoTypes.Builder, com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder>( - (com.google.privacy.dlp.v2.ExcludeInfoTypes) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 3; - onChanged();; - return excludeInfoTypesBuilder_; - } - - private int matchingType_ = 0; - /** - *
-     * How the rule is applied, see MatchingType documentation for details.
-     * 
- * - * .google.privacy.dlp.v2.MatchingType matching_type = 4; - * @return The enum numeric value on the wire for matchingType. - */ - @java.lang.Override public int getMatchingTypeValue() { - return matchingType_; - } - /** - *
-     * How the rule is applied, see MatchingType documentation for details.
-     * 
- * - * .google.privacy.dlp.v2.MatchingType matching_type = 4; - * @param value The enum numeric value on the wire for matchingType to set. - * @return This builder for chaining. - */ - public Builder setMatchingTypeValue(int value) { - - matchingType_ = value; - onChanged(); - return this; - } - /** - *
-     * How the rule is applied, see MatchingType documentation for details.
-     * 
- * - * .google.privacy.dlp.v2.MatchingType matching_type = 4; - * @return The matchingType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.MatchingType getMatchingType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.MatchingType result = com.google.privacy.dlp.v2.MatchingType.valueOf(matchingType_); - return result == null ? com.google.privacy.dlp.v2.MatchingType.UNRECOGNIZED : result; - } - /** - *
-     * How the rule is applied, see MatchingType documentation for details.
-     * 
- * - * .google.privacy.dlp.v2.MatchingType matching_type = 4; - * @param value The matchingType to set. - * @return This builder for chaining. - */ - public Builder setMatchingType(com.google.privacy.dlp.v2.MatchingType value) { - if (value == null) { - throw new NullPointerException(); - } - - matchingType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * How the rule is applied, see MatchingType documentation for details.
-     * 
- * - * .google.privacy.dlp.v2.MatchingType matching_type = 4; - * @return This builder for chaining. - */ - public Builder clearMatchingType() { - - matchingType_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ExclusionRule) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ExclusionRule) - private static final com.google.privacy.dlp.v2.ExclusionRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ExclusionRule(); - } - - public static com.google.privacy.dlp.v2.ExclusionRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExclusionRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExclusionRule(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ExclusionRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRuleOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRuleOrBuilder.java deleted file mode 100644 index ae42d8aa75c7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ExclusionRuleOrBuilder.java +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ExclusionRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ExclusionRule) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Dictionary which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - * @return Whether the dictionary field is set. - */ - boolean hasDictionary(); - /** - *
-   * Dictionary which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - * @return The dictionary. - */ - com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary(); - /** - *
-   * Dictionary which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 1; - */ - com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder(); - - /** - *
-   * Regular expression which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - * @return Whether the regex field is set. - */ - boolean hasRegex(); - /** - *
-   * Regular expression which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - * @return The regex. - */ - com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex(); - /** - *
-   * Regular expression which defines the rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 2; - */ - com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder(); - - /** - *
-   * Set of infoTypes for which findings would affect this rule.
-   * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - * @return Whether the excludeInfoTypes field is set. - */ - boolean hasExcludeInfoTypes(); - /** - *
-   * Set of infoTypes for which findings would affect this rule.
-   * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - * @return The excludeInfoTypes. - */ - com.google.privacy.dlp.v2.ExcludeInfoTypes getExcludeInfoTypes(); - /** - *
-   * Set of infoTypes for which findings would affect this rule.
-   * 
- * - * .google.privacy.dlp.v2.ExcludeInfoTypes exclude_info_types = 3; - */ - com.google.privacy.dlp.v2.ExcludeInfoTypesOrBuilder getExcludeInfoTypesOrBuilder(); - - /** - *
-   * How the rule is applied, see MatchingType documentation for details.
-   * 
- * - * .google.privacy.dlp.v2.MatchingType matching_type = 4; - * @return The enum numeric value on the wire for matchingType. - */ - int getMatchingTypeValue(); - /** - *
-   * How the rule is applied, see MatchingType documentation for details.
-   * 
- * - * .google.privacy.dlp.v2.MatchingType matching_type = 4; - * @return The matchingType. - */ - com.google.privacy.dlp.v2.MatchingType getMatchingType(); - - public com.google.privacy.dlp.v2.ExclusionRule.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldId.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldId.java deleted file mode 100644 index cc95f67691ef..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldId.java +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * General identifier of a data field in a storage service.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.FieldId} - */ -public final class FieldId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.FieldId) - FieldIdOrBuilder { -private static final long serialVersionUID = 0L; - // Use FieldId.newBuilder() to construct. - private FieldId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FieldId() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FieldId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FieldId( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.FieldId.class, com.google.privacy.dlp.v2.FieldId.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Name describing the field.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Name describing the field.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.FieldId)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.FieldId other = (com.google.privacy.dlp.v2.FieldId) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.FieldId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FieldId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FieldId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FieldId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FieldId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FieldId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FieldId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.FieldId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * General identifier of a data field in a storage service.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.FieldId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.FieldId) - com.google.privacy.dlp.v2.FieldIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.FieldId.class, com.google.privacy.dlp.v2.FieldId.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.FieldId.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_FieldId_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.FieldId.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId build() { - com.google.privacy.dlp.v2.FieldId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId buildPartial() { - com.google.privacy.dlp.v2.FieldId result = new com.google.privacy.dlp.v2.FieldId(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.FieldId) { - return mergeFrom((com.google.privacy.dlp.v2.FieldId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.FieldId other) { - if (other == com.google.privacy.dlp.v2.FieldId.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.FieldId parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.FieldId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Name describing the field.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name describing the field.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name describing the field.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Name describing the field.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Name describing the field.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.FieldId) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.FieldId) - private static final com.google.privacy.dlp.v2.FieldId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.FieldId(); - } - - public static com.google.privacy.dlp.v2.FieldId getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FieldId parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FieldId(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldIdOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldIdOrBuilder.java deleted file mode 100644 index 336f51109283..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldIdOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface FieldIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.FieldId) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Name describing the field.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Name describing the field.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformation.java deleted file mode 100644 index 5e42d622bc27..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformation.java +++ /dev/null @@ -1,1856 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The transformation to apply to the field.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.FieldTransformation} - */ -public final class FieldTransformation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.FieldTransformation) - FieldTransformationOrBuilder { -private static final long serialVersionUID = 0L; - // Use FieldTransformation.newBuilder() to construct. - private FieldTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FieldTransformation() { - fields_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FieldTransformation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FieldTransformation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); - break; - } - case 26: { - com.google.privacy.dlp.v2.RecordCondition.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = input.readMessage(com.google.privacy.dlp.v2.RecordCondition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.privacy.dlp.v2.PrimitiveTransformation.Builder subBuilder = null; - if (transformationCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.PrimitiveTransformation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 4; - break; - } - case 42: { - com.google.privacy.dlp.v2.InfoTypeTransformations.Builder subBuilder = null; - if (transformationCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.InfoTypeTransformations.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 5; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.FieldTransformation.class, com.google.privacy.dlp.v2.FieldTransformation.Builder.class); - } - - private int transformationCase_ = 0; - private java.lang.Object transformation_; - public enum TransformationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PRIMITIVE_TRANSFORMATION(4), - INFO_TYPE_TRANSFORMATIONS(5), - TRANSFORMATION_NOT_SET(0); - private final int value; - private TransformationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TransformationCase valueOf(int value) { - return forNumber(value); - } - - public static TransformationCase forNumber(int value) { - switch (value) { - case 4: return PRIMITIVE_TRANSFORMATION; - case 5: return INFO_TYPE_TRANSFORMATIONS; - case 0: return TRANSFORMATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TransformationCase - getTransformationCase() { - return TransformationCase.forNumber( - transformationCase_); - } - - public static final int FIELDS_FIELD_NUMBER = 1; - private java.util.List fields_; - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getFieldsList() { - return fields_; - } - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getFieldsOrBuilderList() { - return fields_; - } - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getFieldsCount() { - return fields_.size(); - } - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getFields(int index) { - return fields_.get(index); - } - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldsOrBuilder( - int index) { - return fields_.get(index); - } - - public static final int CONDITION_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.RecordCondition condition_; - /** - *
-   * Only apply the transformation if the condition evaluates to true for the
-   * given `RecordCondition`. The conditions are allowed to reference fields
-   * that are not used in the actual transformation.
-   * Example Use Cases:
-   * - Apply a different bucket transformation to an age column if the zip code
-   * column for the same record is within a specific range.
-   * - Redact a field if the date of birth field is greater than 85.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - * @return Whether the condition field is set. - */ - @java.lang.Override - public boolean hasCondition() { - return condition_ != null; - } - /** - *
-   * Only apply the transformation if the condition evaluates to true for the
-   * given `RecordCondition`. The conditions are allowed to reference fields
-   * that are not used in the actual transformation.
-   * Example Use Cases:
-   * - Apply a different bucket transformation to an age column if the zip code
-   * column for the same record is within a specific range.
-   * - Redact a field if the date of birth field is greater than 85.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - * @return The condition. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition getCondition() { - return condition_ == null ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; - } - /** - *
-   * Only apply the transformation if the condition evaluates to true for the
-   * given `RecordCondition`. The conditions are allowed to reference fields
-   * that are not used in the actual transformation.
-   * Example Use Cases:
-   * - Apply a different bucket transformation to an age column if the zip code
-   * column for the same record is within a specific range.
-   * - Redact a field if the date of birth field is greater than 85.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() { - return getCondition(); - } - - public static final int PRIMITIVE_TRANSFORMATION_FIELD_NUMBER = 4; - /** - *
-   * Apply the transformation to the entire field.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - * @return Whether the primitiveTransformation field is set. - */ - @java.lang.Override - public boolean hasPrimitiveTransformation() { - return transformationCase_ == 4; - } - /** - *
-   * Apply the transformation to the entire field.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - * @return The primitiveTransformation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_; - } - return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); - } - /** - *
-   * Apply the transformation to the entire field.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder() { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_; - } - return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); - } - - public static final int INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER = 5; - /** - *
-   * Treat the contents of the field as free text, and selectively
-   * transform content that matches an `InfoType`.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - * @return Whether the infoTypeTransformations field is set. - */ - @java.lang.Override - public boolean hasInfoTypeTransformations() { - return transformationCase_ == 5; - } - /** - *
-   * Treat the contents of the field as free text, and selectively
-   * transform content that matches an `InfoType`.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - * @return The infoTypeTransformations. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() { - if (transformationCase_ == 5) { - return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - /** - *
-   * Treat the contents of the field as free text, and selectively
-   * transform content that matches an `InfoType`.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder() { - if (transformationCase_ == 5) { - return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < fields_.size(); i++) { - output.writeMessage(1, fields_.get(i)); - } - if (condition_ != null) { - output.writeMessage(3, getCondition()); - } - if (transformationCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_); - } - if (transformationCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < fields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, fields_.get(i)); - } - if (condition_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getCondition()); - } - if (transformationCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_); - } - if (transformationCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.FieldTransformation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.FieldTransformation other = (com.google.privacy.dlp.v2.FieldTransformation) obj; - - if (!getFieldsList() - .equals(other.getFieldsList())) return false; - if (hasCondition() != other.hasCondition()) return false; - if (hasCondition()) { - if (!getCondition() - .equals(other.getCondition())) return false; - } - if (!getTransformationCase().equals(other.getTransformationCase())) return false; - switch (transformationCase_) { - case 4: - if (!getPrimitiveTransformation() - .equals(other.getPrimitiveTransformation())) return false; - break; - case 5: - if (!getInfoTypeTransformations() - .equals(other.getInfoTypeTransformations())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFieldsCount() > 0) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFieldsList().hashCode(); - } - if (hasCondition()) { - hash = (37 * hash) + CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getCondition().hashCode(); - } - switch (transformationCase_) { - case 4: - hash = (37 * hash) + PRIMITIVE_TRANSFORMATION_FIELD_NUMBER; - hash = (53 * hash) + getPrimitiveTransformation().hashCode(); - break; - case 5: - hash = (37 * hash) + INFO_TYPE_TRANSFORMATIONS_FIELD_NUMBER; - hash = (53 * hash) + getInfoTypeTransformations().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FieldTransformation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.FieldTransformation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The transformation to apply to the field.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.FieldTransformation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.FieldTransformation) - com.google.privacy.dlp.v2.FieldTransformationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.FieldTransformation.class, com.google.privacy.dlp.v2.FieldTransformation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.FieldTransformation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFieldsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldsBuilder_.clear(); - } - if (conditionBuilder_ == null) { - condition_ = null; - } else { - condition_ = null; - conditionBuilder_ = null; - } - transformationCase_ = 0; - transformation_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FieldTransformation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FieldTransformation build() { - com.google.privacy.dlp.v2.FieldTransformation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FieldTransformation buildPartial() { - com.google.privacy.dlp.v2.FieldTransformation result = new com.google.privacy.dlp.v2.FieldTransformation(this); - int from_bitField0_ = bitField0_; - if (fieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fields_ = fields_; - } else { - result.fields_ = fieldsBuilder_.build(); - } - if (conditionBuilder_ == null) { - result.condition_ = condition_; - } else { - result.condition_ = conditionBuilder_.build(); - } - if (transformationCase_ == 4) { - if (primitiveTransformationBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = primitiveTransformationBuilder_.build(); - } - } - if (transformationCase_ == 5) { - if (infoTypeTransformationsBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = infoTypeTransformationsBuilder_.build(); - } - } - result.transformationCase_ = transformationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.FieldTransformation) { - return mergeFrom((com.google.privacy.dlp.v2.FieldTransformation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.FieldTransformation other) { - if (other == com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()) return this; - if (fieldsBuilder_ == null) { - if (!other.fields_.isEmpty()) { - if (fields_.isEmpty()) { - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldsIsMutable(); - fields_.addAll(other.fields_); - } - onChanged(); - } - } else { - if (!other.fields_.isEmpty()) { - if (fieldsBuilder_.isEmpty()) { - fieldsBuilder_.dispose(); - fieldsBuilder_ = null; - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFieldsFieldBuilder() : null; - } else { - fieldsBuilder_.addAllMessages(other.fields_); - } - } - } - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - switch (other.getTransformationCase()) { - case PRIMITIVE_TRANSFORMATION: { - mergePrimitiveTransformation(other.getPrimitiveTransformation()); - break; - } - case INFO_TYPE_TRANSFORMATIONS: { - mergeInfoTypeTransformations(other.getInfoTypeTransformations()); - break; - } - case TRANSFORMATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.FieldTransformation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.FieldTransformation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int transformationCase_ = 0; - private java.lang.Object transformation_; - public TransformationCase - getTransformationCase() { - return TransformationCase.forNumber( - transformationCase_); - } - - public Builder clearTransformation() { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.util.List fields_ = - java.util.Collections.emptyList(); - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fields_ = new java.util.ArrayList(fields_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldsBuilder_; - - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getFieldsList() { - if (fieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fields_); - } else { - return fieldsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getFieldsCount() { - if (fieldsBuilder_ == null) { - return fields_.size(); - } else { - return fieldsBuilder_.getCount(); - } - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldId getFields(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.set(index, value); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addFields(com.google.privacy.dlp.v2.FieldId value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(value); - onChanged(); - } else { - fieldsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(index, value); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addFields( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllFields( - java.lang.Iterable values) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fields_); - onChanged(); - } else { - fieldsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearFields() { - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeFields(int index) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.remove(index); - onChanged(); - } else { - fieldsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldsBuilder( - int index) { - return getFieldsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldsOrBuilder( - int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); } else { - return fieldsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getFieldsOrBuilderList() { - if (fieldsBuilder_ != null) { - return fieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fields_); - } - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addFieldsBuilder() { - return getFieldsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addFieldsBuilder( - int index) { - return getFieldsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * Required. Input field(s) to apply the transformation to.
-     * When you have columns that reference their position within a list,
-     * omit the index from the FieldId. FieldId name matching ignores the index.
-     * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getFieldsBuilderList() { - return getFieldsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldsFieldBuilder() { - if (fieldsBuilder_ == null) { - fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - fields_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fields_ = null; - } - return fieldsBuilder_; - } - - private com.google.privacy.dlp.v2.RecordCondition condition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder> conditionBuilder_; - /** - *
-     * Only apply the transformation if the condition evaluates to true for the
-     * given `RecordCondition`. The conditions are allowed to reference fields
-     * that are not used in the actual transformation.
-     * Example Use Cases:
-     * - Apply a different bucket transformation to an age column if the zip code
-     * column for the same record is within a specific range.
-     * - Redact a field if the date of birth field is greater than 85.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - * @return Whether the condition field is set. - */ - public boolean hasCondition() { - return conditionBuilder_ != null || condition_ != null; - } - /** - *
-     * Only apply the transformation if the condition evaluates to true for the
-     * given `RecordCondition`. The conditions are allowed to reference fields
-     * that are not used in the actual transformation.
-     * Example Use Cases:
-     * - Apply a different bucket transformation to an age column if the zip code
-     * column for the same record is within a specific range.
-     * - Redact a field if the date of birth field is greater than 85.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - * @return The condition. - */ - public com.google.privacy.dlp.v2.RecordCondition getCondition() { - if (conditionBuilder_ == null) { - return condition_ == null ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; - } else { - return conditionBuilder_.getMessage(); - } - } - /** - *
-     * Only apply the transformation if the condition evaluates to true for the
-     * given `RecordCondition`. The conditions are allowed to reference fields
-     * that are not used in the actual transformation.
-     * Example Use Cases:
-     * - Apply a different bucket transformation to an age column if the zip code
-     * column for the same record is within a specific range.
-     * - Redact a field if the date of birth field is greater than 85.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - */ - public Builder setCondition(com.google.privacy.dlp.v2.RecordCondition value) { - if (conditionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - condition_ = value; - onChanged(); - } else { - conditionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Only apply the transformation if the condition evaluates to true for the
-     * given `RecordCondition`. The conditions are allowed to reference fields
-     * that are not used in the actual transformation.
-     * Example Use Cases:
-     * - Apply a different bucket transformation to an age column if the zip code
-     * column for the same record is within a specific range.
-     * - Redact a field if the date of birth field is greater than 85.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - */ - public Builder setCondition( - com.google.privacy.dlp.v2.RecordCondition.Builder builderForValue) { - if (conditionBuilder_ == null) { - condition_ = builderForValue.build(); - onChanged(); - } else { - conditionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Only apply the transformation if the condition evaluates to true for the
-     * given `RecordCondition`. The conditions are allowed to reference fields
-     * that are not used in the actual transformation.
-     * Example Use Cases:
-     * - Apply a different bucket transformation to an age column if the zip code
-     * column for the same record is within a specific range.
-     * - Redact a field if the date of birth field is greater than 85.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - */ - public Builder mergeCondition(com.google.privacy.dlp.v2.RecordCondition value) { - if (conditionBuilder_ == null) { - if (condition_ != null) { - condition_ = - com.google.privacy.dlp.v2.RecordCondition.newBuilder(condition_).mergeFrom(value).buildPartial(); - } else { - condition_ = value; - } - onChanged(); - } else { - conditionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Only apply the transformation if the condition evaluates to true for the
-     * given `RecordCondition`. The conditions are allowed to reference fields
-     * that are not used in the actual transformation.
-     * Example Use Cases:
-     * - Apply a different bucket transformation to an age column if the zip code
-     * column for the same record is within a specific range.
-     * - Redact a field if the date of birth field is greater than 85.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - */ - public Builder clearCondition() { - if (conditionBuilder_ == null) { - condition_ = null; - onChanged(); - } else { - condition_ = null; - conditionBuilder_ = null; - } - - return this; - } - /** - *
-     * Only apply the transformation if the condition evaluates to true for the
-     * given `RecordCondition`. The conditions are allowed to reference fields
-     * that are not used in the actual transformation.
-     * Example Use Cases:
-     * - Apply a different bucket transformation to an age column if the zip code
-     * column for the same record is within a specific range.
-     * - Redact a field if the date of birth field is greater than 85.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - */ - public com.google.privacy.dlp.v2.RecordCondition.Builder getConditionBuilder() { - - onChanged(); - return getConditionFieldBuilder().getBuilder(); - } - /** - *
-     * Only apply the transformation if the condition evaluates to true for the
-     * given `RecordCondition`. The conditions are allowed to reference fields
-     * that are not used in the actual transformation.
-     * Example Use Cases:
-     * - Apply a different bucket transformation to an age column if the zip code
-     * column for the same record is within a specific range.
-     * - Redact a field if the date of birth field is greater than 85.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - */ - public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() { - if (conditionBuilder_ != null) { - return conditionBuilder_.getMessageOrBuilder(); - } else { - return condition_ == null ? - com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; - } - } - /** - *
-     * Only apply the transformation if the condition evaluates to true for the
-     * given `RecordCondition`. The conditions are allowed to reference fields
-     * that are not used in the actual transformation.
-     * Example Use Cases:
-     * - Apply a different bucket transformation to an age column if the zip code
-     * column for the same record is within a specific range.
-     * - Redact a field if the date of birth field is greater than 85.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder> - getConditionFieldBuilder() { - if (conditionBuilder_ == null) { - conditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder>( - getCondition(), - getParentForChildren(), - isClean()); - condition_ = null; - } - return conditionBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> primitiveTransformationBuilder_; - /** - *
-     * Apply the transformation to the entire field.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - * @return Whether the primitiveTransformation field is set. - */ - @java.lang.Override - public boolean hasPrimitiveTransformation() { - return transformationCase_ == 4; - } - /** - *
-     * Apply the transformation to the entire field.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - * @return The primitiveTransformation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() { - if (primitiveTransformationBuilder_ == null) { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_; - } - return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); - } else { - if (transformationCase_ == 4) { - return primitiveTransformationBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); - } - } - /** - *
-     * Apply the transformation to the entire field.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - */ - public Builder setPrimitiveTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { - if (primitiveTransformationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - primitiveTransformationBuilder_.setMessage(value); - } - transformationCase_ = 4; - return this; - } - /** - *
-     * Apply the transformation to the entire field.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - */ - public Builder setPrimitiveTransformation( - com.google.privacy.dlp.v2.PrimitiveTransformation.Builder builderForValue) { - if (primitiveTransformationBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - primitiveTransformationBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 4; - return this; - } - /** - *
-     * Apply the transformation to the entire field.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - */ - public Builder mergePrimitiveTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { - if (primitiveTransformationBuilder_ == null) { - if (transformationCase_ == 4 && - transformation_ != com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.PrimitiveTransformation.newBuilder((com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 4) { - primitiveTransformationBuilder_.mergeFrom(value); - } else { - primitiveTransformationBuilder_.setMessage(value); - } - } - transformationCase_ = 4; - return this; - } - /** - *
-     * Apply the transformation to the entire field.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - */ - public Builder clearPrimitiveTransformation() { - if (primitiveTransformationBuilder_ == null) { - if (transformationCase_ == 4) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 4) { - transformationCase_ = 0; - transformation_ = null; - } - primitiveTransformationBuilder_.clear(); - } - return this; - } - /** - *
-     * Apply the transformation to the entire field.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - */ - public com.google.privacy.dlp.v2.PrimitiveTransformation.Builder getPrimitiveTransformationBuilder() { - return getPrimitiveTransformationFieldBuilder().getBuilder(); - } - /** - *
-     * Apply the transformation to the entire field.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder() { - if ((transformationCase_ == 4) && (primitiveTransformationBuilder_ != null)) { - return primitiveTransformationBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_; - } - return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); - } - } - /** - *
-     * Apply the transformation to the entire field.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> - getPrimitiveTransformationFieldBuilder() { - if (primitiveTransformationBuilder_ == null) { - if (!(transformationCase_ == 4)) { - transformation_ = com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); - } - primitiveTransformationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder>( - (com.google.privacy.dlp.v2.PrimitiveTransformation) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 4; - onChanged();; - return primitiveTransformationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder> infoTypeTransformationsBuilder_; - /** - *
-     * Treat the contents of the field as free text, and selectively
-     * transform content that matches an `InfoType`.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - * @return Whether the infoTypeTransformations field is set. - */ - @java.lang.Override - public boolean hasInfoTypeTransformations() { - return transformationCase_ == 5; - } - /** - *
-     * Treat the contents of the field as free text, and selectively
-     * transform content that matches an `InfoType`.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - * @return The infoTypeTransformations. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations() { - if (infoTypeTransformationsBuilder_ == null) { - if (transformationCase_ == 5) { - return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } else { - if (transformationCase_ == 5) { - return infoTypeTransformationsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - } - /** - *
-     * Treat the contents of the field as free text, and selectively
-     * transform content that matches an `InfoType`.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - */ - public Builder setInfoTypeTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations value) { - if (infoTypeTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - infoTypeTransformationsBuilder_.setMessage(value); - } - transformationCase_ = 5; - return this; - } - /** - *
-     * Treat the contents of the field as free text, and selectively
-     * transform content that matches an `InfoType`.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - */ - public Builder setInfoTypeTransformations( - com.google.privacy.dlp.v2.InfoTypeTransformations.Builder builderForValue) { - if (infoTypeTransformationsBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - infoTypeTransformationsBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 5; - return this; - } - /** - *
-     * Treat the contents of the field as free text, and selectively
-     * transform content that matches an `InfoType`.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - */ - public Builder mergeInfoTypeTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations value) { - if (infoTypeTransformationsBuilder_ == null) { - if (transformationCase_ == 5 && - transformation_ != com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.InfoTypeTransformations.newBuilder((com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 5) { - infoTypeTransformationsBuilder_.mergeFrom(value); - } else { - infoTypeTransformationsBuilder_.setMessage(value); - } - } - transformationCase_ = 5; - return this; - } - /** - *
-     * Treat the contents of the field as free text, and selectively
-     * transform content that matches an `InfoType`.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - */ - public Builder clearInfoTypeTransformations() { - if (infoTypeTransformationsBuilder_ == null) { - if (transformationCase_ == 5) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 5) { - transformationCase_ = 0; - transformation_ = null; - } - infoTypeTransformationsBuilder_.clear(); - } - return this; - } - /** - *
-     * Treat the contents of the field as free text, and selectively
-     * transform content that matches an `InfoType`.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - */ - public com.google.privacy.dlp.v2.InfoTypeTransformations.Builder getInfoTypeTransformationsBuilder() { - return getInfoTypeTransformationsFieldBuilder().getBuilder(); - } - /** - *
-     * Treat the contents of the field as free text, and selectively
-     * transform content that matches an `InfoType`.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder() { - if ((transformationCase_ == 5) && (infoTypeTransformationsBuilder_ != null)) { - return infoTypeTransformationsBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 5) { - return (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_; - } - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - } - /** - *
-     * Treat the contents of the field as free text, and selectively
-     * transform content that matches an `InfoType`.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder> - getInfoTypeTransformationsFieldBuilder() { - if (infoTypeTransformationsBuilder_ == null) { - if (!(transformationCase_ == 5)) { - transformation_ = com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - infoTypeTransformationsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeTransformations, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder, com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder>( - (com.google.privacy.dlp.v2.InfoTypeTransformations) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 5; - onChanged();; - return infoTypeTransformationsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.FieldTransformation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.FieldTransformation) - private static final com.google.privacy.dlp.v2.FieldTransformation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.FieldTransformation(); - } - - public static com.google.privacy.dlp.v2.FieldTransformation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FieldTransformation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FieldTransformation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FieldTransformation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformationOrBuilder.java deleted file mode 100644 index 204347a7f553..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FieldTransformationOrBuilder.java +++ /dev/null @@ -1,172 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface FieldTransformationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.FieldTransformation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getFieldsList(); - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.FieldId getFields(int index); - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getFieldsCount(); - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getFieldsOrBuilderList(); - /** - *
-   * Required. Input field(s) to apply the transformation to.
-   * When you have columns that reference their position within a list,
-   * omit the index from the FieldId. FieldId name matching ignores the index.
-   * For example, instead of "contact.nums[0].type", use "contact.nums.type".
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId fields = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldsOrBuilder( - int index); - - /** - *
-   * Only apply the transformation if the condition evaluates to true for the
-   * given `RecordCondition`. The conditions are allowed to reference fields
-   * that are not used in the actual transformation.
-   * Example Use Cases:
-   * - Apply a different bucket transformation to an age column if the zip code
-   * column for the same record is within a specific range.
-   * - Redact a field if the date of birth field is greater than 85.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - * @return Whether the condition field is set. - */ - boolean hasCondition(); - /** - *
-   * Only apply the transformation if the condition evaluates to true for the
-   * given `RecordCondition`. The conditions are allowed to reference fields
-   * that are not used in the actual transformation.
-   * Example Use Cases:
-   * - Apply a different bucket transformation to an age column if the zip code
-   * column for the same record is within a specific range.
-   * - Redact a field if the date of birth field is greater than 85.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - * @return The condition. - */ - com.google.privacy.dlp.v2.RecordCondition getCondition(); - /** - *
-   * Only apply the transformation if the condition evaluates to true for the
-   * given `RecordCondition`. The conditions are allowed to reference fields
-   * that are not used in the actual transformation.
-   * Example Use Cases:
-   * - Apply a different bucket transformation to an age column if the zip code
-   * column for the same record is within a specific range.
-   * - Redact a field if the date of birth field is greater than 85.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 3; - */ - com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder(); - - /** - *
-   * Apply the transformation to the entire field.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - * @return Whether the primitiveTransformation field is set. - */ - boolean hasPrimitiveTransformation(); - /** - *
-   * Apply the transformation to the entire field.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - * @return The primitiveTransformation. - */ - com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation(); - /** - *
-   * Apply the transformation to the entire field.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 4; - */ - com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder(); - - /** - *
-   * Treat the contents of the field as free text, and selectively
-   * transform content that matches an `InfoType`.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - * @return Whether the infoTypeTransformations field is set. - */ - boolean hasInfoTypeTransformations(); - /** - *
-   * Treat the contents of the field as free text, and selectively
-   * transform content that matches an `InfoType`.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - * @return The infoTypeTransformations. - */ - com.google.privacy.dlp.v2.InfoTypeTransformations getInfoTypeTransformations(); - /** - *
-   * Treat the contents of the field as free text, and selectively
-   * transform content that matches an `InfoType`.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeTransformations info_type_transformations = 5; - */ - com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder getInfoTypeTransformationsOrBuilder(); - - public com.google.privacy.dlp.v2.FieldTransformation.TransformationCase getTransformationCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java deleted file mode 100644 index e5b28b2daac4..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FileType.java +++ /dev/null @@ -1,335 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Definitions of file type groups to scan. New types will be added to this
- * list.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.FileType} - */ -public enum FileType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Includes all files.
-   * 
- * - * FILE_TYPE_UNSPECIFIED = 0; - */ - FILE_TYPE_UNSPECIFIED(0), - /** - *
-   * Includes all file extensions not covered by another entry. Binary
-   * scanning attempts to convert the content of the file to utf_8 to scan
-   * the file.
-   * If you wish to avoid this fall back, specify one or more of the other
-   * FileType's in your storage scan.
-   * 
- * - * BINARY_FILE = 1; - */ - BINARY_FILE(1), - /** - *
-   * Included file extensions:
-   *   asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart,
-   *   dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm,
-   *   mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht,
-   *   properties, py, pyw, rb, rbw, rs, rss,  rc, scala, sh, sql, swift, tex,
-   *   shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md,
-   *   txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml.
-   * 
- * - * TEXT_FILE = 2; - */ - TEXT_FILE(2), - /** - *
-   * Included file extensions:
-   *   bmp, gif, jpg, jpeg, jpe, png.
-   * bytes_limit_per_file has no effect on image files.
-   * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
-   * 
- * - * IMAGE = 3; - */ - IMAGE(3), - /** - *
-   * Word files >30 MB will be scanned as binary files.
-   * Included file extensions:
-   *   docx, dotx, docm, dotm
-   * 
- * - * WORD = 5; - */ - WORD(5), - /** - *
-   * PDF files >30 MB will be scanned as binary files.
-   * Included file extensions:
-   *   pdf
-   * 
- * - * PDF = 6; - */ - PDF(6), - /** - *
-   * Included file extensions:
-   *   avro
-   * 
- * - * AVRO = 7; - */ - AVRO(7), - /** - *
-   * Included file extensions:
-   *   csv
-   * 
- * - * CSV = 8; - */ - CSV(8), - /** - *
-   * Included file extensions:
-   *   tsv
-   * 
- * - * TSV = 9; - */ - TSV(9), - /** - *
-   * Powerpoint files >30 MB will be scanned as binary files.
-   * Included file extensions:
-   *   pptx, pptm, potx, potm, pot
-   * 
- * - * POWERPOINT = 11; - */ - POWERPOINT(11), - /** - *
-   * Excel files >30 MB will be scanned as binary files.
-   * Included file extensions:
-   *   xlsx, xlsm, xltx, xltm
-   * 
- * - * EXCEL = 12; - */ - EXCEL(12), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Includes all files.
-   * 
- * - * FILE_TYPE_UNSPECIFIED = 0; - */ - public static final int FILE_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-   * Includes all file extensions not covered by another entry. Binary
-   * scanning attempts to convert the content of the file to utf_8 to scan
-   * the file.
-   * If you wish to avoid this fall back, specify one or more of the other
-   * FileType's in your storage scan.
-   * 
- * - * BINARY_FILE = 1; - */ - public static final int BINARY_FILE_VALUE = 1; - /** - *
-   * Included file extensions:
-   *   asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart,
-   *   dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm,
-   *   mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht,
-   *   properties, py, pyw, rb, rbw, rs, rss,  rc, scala, sh, sql, swift, tex,
-   *   shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md,
-   *   txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml.
-   * 
- * - * TEXT_FILE = 2; - */ - public static final int TEXT_FILE_VALUE = 2; - /** - *
-   * Included file extensions:
-   *   bmp, gif, jpg, jpeg, jpe, png.
-   * bytes_limit_per_file has no effect on image files.
-   * Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
-   * 
- * - * IMAGE = 3; - */ - public static final int IMAGE_VALUE = 3; - /** - *
-   * Word files >30 MB will be scanned as binary files.
-   * Included file extensions:
-   *   docx, dotx, docm, dotm
-   * 
- * - * WORD = 5; - */ - public static final int WORD_VALUE = 5; - /** - *
-   * PDF files >30 MB will be scanned as binary files.
-   * Included file extensions:
-   *   pdf
-   * 
- * - * PDF = 6; - */ - public static final int PDF_VALUE = 6; - /** - *
-   * Included file extensions:
-   *   avro
-   * 
- * - * AVRO = 7; - */ - public static final int AVRO_VALUE = 7; - /** - *
-   * Included file extensions:
-   *   csv
-   * 
- * - * CSV = 8; - */ - public static final int CSV_VALUE = 8; - /** - *
-   * Included file extensions:
-   *   tsv
-   * 
- * - * TSV = 9; - */ - public static final int TSV_VALUE = 9; - /** - *
-   * Powerpoint files >30 MB will be scanned as binary files.
-   * Included file extensions:
-   *   pptx, pptm, potx, potm, pot
-   * 
- * - * POWERPOINT = 11; - */ - public static final int POWERPOINT_VALUE = 11; - /** - *
-   * Excel files >30 MB will be scanned as binary files.
-   * Included file extensions:
-   *   xlsx, xlsm, xltx, xltm
-   * 
- * - * EXCEL = 12; - */ - public static final int EXCEL_VALUE = 12; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static FileType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static FileType forNumber(int value) { - switch (value) { - case 0: return FILE_TYPE_UNSPECIFIED; - case 1: return BINARY_FILE; - case 2: return TEXT_FILE; - case 3: return IMAGE; - case 5: return WORD; - case 6: return PDF; - case 7: return AVRO; - case 8: return CSV; - case 9: return TSV; - case 11: return POWERPOINT; - case 12: return EXCEL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - FileType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public FileType findValueByNumber(int number) { - return FileType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.getDescriptor().getEnumTypes().get(1); - } - - private static final FileType[] VALUES = values(); - - public static FileType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private FileType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.FileType) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java deleted file mode 100644 index 88fa787eeb98..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java +++ /dev/null @@ -1,3228 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Represents a piece of potentially sensitive content.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Finding} - */ -public final class Finding extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Finding) - FindingOrBuilder { -private static final long serialVersionUID = 0L; - // Use Finding.newBuilder() to construct. - private Finding(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Finding() { - name_ = ""; - quote_ = ""; - likelihood_ = 0; - resourceName_ = ""; - triggerName_ = ""; - jobName_ = ""; - findingId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Finding(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Finding( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - quote_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (infoType_ != null) { - subBuilder = infoType_.toBuilder(); - } - infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infoType_); - infoType_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - int rawValue = input.readEnum(); - - likelihood_ = rawValue; - break; - } - case 34: { - com.google.privacy.dlp.v2.Location.Builder subBuilder = null; - if (location_ != null) { - subBuilder = location_.toBuilder(); - } - location_ = input.readMessage(com.google.privacy.dlp.v2.Location.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(location_); - location_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - com.google.privacy.dlp.v2.QuoteInfo.Builder subBuilder = null; - if (quoteInfo_ != null) { - subBuilder = quoteInfo_.toBuilder(); - } - quoteInfo_ = input.readMessage(com.google.privacy.dlp.v2.QuoteInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(quoteInfo_); - quoteInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceName_ = s; - break; - } - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - - triggerName_ = s; - break; - } - case 82: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - case 90: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (jobCreateTime_ != null) { - subBuilder = jobCreateTime_.toBuilder(); - } - jobCreateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(jobCreateTime_); - jobCreateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - java.lang.String s = input.readStringRequireUtf8(); - - jobName_ = s; - break; - } - case 114: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 122: { - java.lang.String s = input.readStringRequireUtf8(); - - findingId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 10: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Finding.class, com.google.privacy.dlp.v2.Finding.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 14; - private volatile java.lang.Object name_; - /** - *
-   * Resource name in format
-   * projects/{project}/locations/{location}/findings/{finding} Populated only
-   * when viewing persisted findings.
-   * 
- * - * string name = 14; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Resource name in format
-   * projects/{project}/locations/{location}/findings/{finding} Populated only
-   * when viewing persisted findings.
-   * 
- * - * string name = 14; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUOTE_FIELD_NUMBER = 1; - private volatile java.lang.Object quote_; - /** - *
-   * The content that was found. Even if the content is not textual, it
-   * may be converted to a textual representation here.
-   * Provided if `include_quote` is true and the finding is
-   * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
-   * in length, the quote may be omitted.
-   * 
- * - * string quote = 1; - * @return The quote. - */ - @java.lang.Override - public java.lang.String getQuote() { - java.lang.Object ref = quote_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - quote_ = s; - return s; - } - } - /** - *
-   * The content that was found. Even if the content is not textual, it
-   * may be converted to a textual representation here.
-   * Provided if `include_quote` is true and the finding is
-   * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
-   * in length, the quote may be omitted.
-   * 
- * - * string quote = 1; - * @return The bytes for quote. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getQuoteBytes() { - java.lang.Object ref = quote_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - quote_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INFO_TYPE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.InfoType infoType_; - /** - *
-   * The type of content that might have been found.
-   * Provided if `excluded_types` is false.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return infoType_ != null; - } - /** - *
-   * The type of content that might have been found.
-   * Provided if `excluded_types` is false.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - /** - *
-   * The type of content that might have been found.
-   * Provided if `excluded_types` is false.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - return getInfoType(); - } - - public static final int LIKELIHOOD_FIELD_NUMBER = 3; - private int likelihood_; - /** - *
-   * Confidence of how likely it is that the `info_type` is correct.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 3; - * @return The enum numeric value on the wire for likelihood. - */ - @java.lang.Override public int getLikelihoodValue() { - return likelihood_; - } - /** - *
-   * Confidence of how likely it is that the `info_type` is correct.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 3; - * @return The likelihood. - */ - @java.lang.Override public com.google.privacy.dlp.v2.Likelihood getLikelihood() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_); - return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; - } - - public static final int LOCATION_FIELD_NUMBER = 4; - private com.google.privacy.dlp.v2.Location location_; - /** - *
-   * Where the content was found.
-   * 
- * - * .google.privacy.dlp.v2.Location location = 4; - * @return Whether the location field is set. - */ - @java.lang.Override - public boolean hasLocation() { - return location_ != null; - } - /** - *
-   * Where the content was found.
-   * 
- * - * .google.privacy.dlp.v2.Location location = 4; - * @return The location. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Location getLocation() { - return location_ == null ? com.google.privacy.dlp.v2.Location.getDefaultInstance() : location_; - } - /** - *
-   * Where the content was found.
-   * 
- * - * .google.privacy.dlp.v2.Location location = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.LocationOrBuilder getLocationOrBuilder() { - return getLocation(); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Timestamp when finding was detected.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Timestamp when finding was detected.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Timestamp when finding was detected.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int QUOTE_INFO_FIELD_NUMBER = 7; - private com.google.privacy.dlp.v2.QuoteInfo quoteInfo_; - /** - *
-   * Contains data parsed from quotes. Only populated if include_quote was set
-   * to true and a supported infoType was requested. Currently supported
-   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-   * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - * @return Whether the quoteInfo field is set. - */ - @java.lang.Override - public boolean hasQuoteInfo() { - return quoteInfo_ != null; - } - /** - *
-   * Contains data parsed from quotes. Only populated if include_quote was set
-   * to true and a supported infoType was requested. Currently supported
-   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-   * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - * @return The quoteInfo. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.QuoteInfo getQuoteInfo() { - return quoteInfo_ == null ? com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance() : quoteInfo_; - } - /** - *
-   * Contains data parsed from quotes. Only populated if include_quote was set
-   * to true and a supported infoType was requested. Currently supported
-   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-   * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.QuoteInfoOrBuilder getQuoteInfoOrBuilder() { - return getQuoteInfo(); - } - - public static final int RESOURCE_NAME_FIELD_NUMBER = 8; - private volatile java.lang.Object resourceName_; - /** - *
-   * The job that stored the finding.
-   * 
- * - * string resource_name = 8 [(.google.api.resource_reference) = { ... } - * @return The resourceName. - */ - @java.lang.Override - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } - } - /** - *
-   * The job that stored the finding.
-   * 
- * - * string resource_name = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for resourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TRIGGER_NAME_FIELD_NUMBER = 9; - private volatile java.lang.Object triggerName_; - /** - *
-   * Job trigger name, if applicable, for this finding.
-   * 
- * - * string trigger_name = 9 [(.google.api.resource_reference) = { ... } - * @return The triggerName. - */ - @java.lang.Override - public java.lang.String getTriggerName() { - java.lang.Object ref = triggerName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - triggerName_ = s; - return s; - } - } - /** - *
-   * Job trigger name, if applicable, for this finding.
-   * 
- * - * string trigger_name = 9 [(.google.api.resource_reference) = { ... } - * @return The bytes for triggerName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTriggerNameBytes() { - java.lang.Object ref = triggerName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - triggerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 10; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * The labels associated with this `Finding`.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 10; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * The labels associated with this `Finding`.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 10; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * The labels associated with this `Finding`.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 10; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * The labels associated with this `Finding`.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 10; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int JOB_CREATE_TIME_FIELD_NUMBER = 11; - private com.google.protobuf.Timestamp jobCreateTime_; - /** - *
-   * Time the job started that produced this finding.
-   * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - * @return Whether the jobCreateTime field is set. - */ - @java.lang.Override - public boolean hasJobCreateTime() { - return jobCreateTime_ != null; - } - /** - *
-   * Time the job started that produced this finding.
-   * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - * @return The jobCreateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getJobCreateTime() { - return jobCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : jobCreateTime_; - } - /** - *
-   * Time the job started that produced this finding.
-   * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getJobCreateTimeOrBuilder() { - return getJobCreateTime(); - } - - public static final int JOB_NAME_FIELD_NUMBER = 13; - private volatile java.lang.Object jobName_; - /** - *
-   * The job that stored the finding.
-   * 
- * - * string job_name = 13 [(.google.api.resource_reference) = { ... } - * @return The jobName. - */ - @java.lang.Override - public java.lang.String getJobName() { - java.lang.Object ref = jobName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobName_ = s; - return s; - } - } - /** - *
-   * The job that stored the finding.
-   * 
- * - * string job_name = 13 [(.google.api.resource_reference) = { ... } - * @return The bytes for jobName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getJobNameBytes() { - java.lang.Object ref = jobName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jobName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FINDING_ID_FIELD_NUMBER = 15; - private volatile java.lang.Object findingId_; - /** - *
-   * The unique finding id.
-   * 
- * - * string finding_id = 15; - * @return The findingId. - */ - @java.lang.Override - public java.lang.String getFindingId() { - java.lang.Object ref = findingId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - findingId_ = s; - return s; - } - } - /** - *
-   * The unique finding id.
-   * 
- * - * string finding_id = 15; - * @return The bytes for findingId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFindingIdBytes() { - java.lang.Object ref = findingId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - findingId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(quote_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, quote_); - } - if (infoType_ != null) { - output.writeMessage(2, getInfoType()); - } - if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { - output.writeEnum(3, likelihood_); - } - if (location_ != null) { - output.writeMessage(4, getLocation()); - } - if (createTime_ != null) { - output.writeMessage(6, getCreateTime()); - } - if (quoteInfo_ != null) { - output.writeMessage(7, getQuoteInfo()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, resourceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, triggerName_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 10); - if (jobCreateTime_ != null) { - output.writeMessage(11, getJobCreateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, jobName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 14, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(findingId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 15, findingId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(quote_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, quote_); - } - if (infoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInfoType()); - } - if (likelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, likelihood_); - } - if (location_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getLocation()); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getCreateTime()); - } - if (quoteInfo_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getQuoteInfo()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, resourceName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(triggerName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, triggerName_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, labels__); - } - if (jobCreateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getJobCreateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, jobName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(findingId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, findingId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Finding)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Finding other = (com.google.privacy.dlp.v2.Finding) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getQuote() - .equals(other.getQuote())) return false; - if (hasInfoType() != other.hasInfoType()) return false; - if (hasInfoType()) { - if (!getInfoType() - .equals(other.getInfoType())) return false; - } - if (likelihood_ != other.likelihood_) return false; - if (hasLocation() != other.hasLocation()) return false; - if (hasLocation()) { - if (!getLocation() - .equals(other.getLocation())) return false; - } - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasQuoteInfo() != other.hasQuoteInfo()) return false; - if (hasQuoteInfo()) { - if (!getQuoteInfo() - .equals(other.getQuoteInfo())) return false; - } - if (!getResourceName() - .equals(other.getResourceName())) return false; - if (!getTriggerName() - .equals(other.getTriggerName())) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (hasJobCreateTime() != other.hasJobCreateTime()) return false; - if (hasJobCreateTime()) { - if (!getJobCreateTime() - .equals(other.getJobCreateTime())) return false; - } - if (!getJobName() - .equals(other.getJobName())) return false; - if (!getFindingId() - .equals(other.getFindingId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + QUOTE_FIELD_NUMBER; - hash = (53 * hash) + getQuote().hashCode(); - if (hasInfoType()) { - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - } - hash = (37 * hash) + LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + likelihood_; - if (hasLocation()) { - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasQuoteInfo()) { - hash = (37 * hash) + QUOTE_INFO_FIELD_NUMBER; - hash = (53 * hash) + getQuoteInfo().hashCode(); - } - hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getResourceName().hashCode(); - hash = (37 * hash) + TRIGGER_NAME_FIELD_NUMBER; - hash = (53 * hash) + getTriggerName().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasJobCreateTime()) { - hash = (37 * hash) + JOB_CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getJobCreateTime().hashCode(); - } - hash = (37 * hash) + JOB_NAME_FIELD_NUMBER; - hash = (53 * hash) + getJobName().hashCode(); - hash = (37 * hash) + FINDING_ID_FIELD_NUMBER; - hash = (53 * hash) + getFindingId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Finding parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Finding parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Finding parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Finding parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Finding parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Finding parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Finding parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Finding parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Finding parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Finding parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Finding parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Finding parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Finding prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents a piece of potentially sensitive content.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Finding} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Finding) - com.google.privacy.dlp.v2.FindingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 10: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 10: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Finding.class, com.google.privacy.dlp.v2.Finding.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Finding.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - quote_ = ""; - - if (infoTypeBuilder_ == null) { - infoType_ = null; - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - likelihood_ = 0; - - if (locationBuilder_ == null) { - location_ = null; - } else { - location_ = null; - locationBuilder_ = null; - } - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (quoteInfoBuilder_ == null) { - quoteInfo_ = null; - } else { - quoteInfo_ = null; - quoteInfoBuilder_ = null; - } - resourceName_ = ""; - - triggerName_ = ""; - - internalGetMutableLabels().clear(); - if (jobCreateTimeBuilder_ == null) { - jobCreateTime_ = null; - } else { - jobCreateTime_ = null; - jobCreateTimeBuilder_ = null; - } - jobName_ = ""; - - findingId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Finding_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Finding getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Finding.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Finding build() { - com.google.privacy.dlp.v2.Finding result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Finding buildPartial() { - com.google.privacy.dlp.v2.Finding result = new com.google.privacy.dlp.v2.Finding(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.quote_ = quote_; - if (infoTypeBuilder_ == null) { - result.infoType_ = infoType_; - } else { - result.infoType_ = infoTypeBuilder_.build(); - } - result.likelihood_ = likelihood_; - if (locationBuilder_ == null) { - result.location_ = location_; - } else { - result.location_ = locationBuilder_.build(); - } - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (quoteInfoBuilder_ == null) { - result.quoteInfo_ = quoteInfo_; - } else { - result.quoteInfo_ = quoteInfoBuilder_.build(); - } - result.resourceName_ = resourceName_; - result.triggerName_ = triggerName_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (jobCreateTimeBuilder_ == null) { - result.jobCreateTime_ = jobCreateTime_; - } else { - result.jobCreateTime_ = jobCreateTimeBuilder_.build(); - } - result.jobName_ = jobName_; - result.findingId_ = findingId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Finding) { - return mergeFrom((com.google.privacy.dlp.v2.Finding)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Finding other) { - if (other == com.google.privacy.dlp.v2.Finding.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getQuote().isEmpty()) { - quote_ = other.quote_; - onChanged(); - } - if (other.hasInfoType()) { - mergeInfoType(other.getInfoType()); - } - if (other.likelihood_ != 0) { - setLikelihoodValue(other.getLikelihoodValue()); - } - if (other.hasLocation()) { - mergeLocation(other.getLocation()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasQuoteInfo()) { - mergeQuoteInfo(other.getQuoteInfo()); - } - if (!other.getResourceName().isEmpty()) { - resourceName_ = other.resourceName_; - onChanged(); - } - if (!other.getTriggerName().isEmpty()) { - triggerName_ = other.triggerName_; - onChanged(); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (other.hasJobCreateTime()) { - mergeJobCreateTime(other.getJobCreateTime()); - } - if (!other.getJobName().isEmpty()) { - jobName_ = other.jobName_; - onChanged(); - } - if (!other.getFindingId().isEmpty()) { - findingId_ = other.findingId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Finding parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Finding) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Resource name in format
-     * projects/{project}/locations/{location}/findings/{finding} Populated only
-     * when viewing persisted findings.
-     * 
- * - * string name = 14; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Resource name in format
-     * projects/{project}/locations/{location}/findings/{finding} Populated only
-     * when viewing persisted findings.
-     * 
- * - * string name = 14; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Resource name in format
-     * projects/{project}/locations/{location}/findings/{finding} Populated only
-     * when viewing persisted findings.
-     * 
- * - * string name = 14; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Resource name in format
-     * projects/{project}/locations/{location}/findings/{finding} Populated only
-     * when viewing persisted findings.
-     * 
- * - * string name = 14; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Resource name in format
-     * projects/{project}/locations/{location}/findings/{finding} Populated only
-     * when viewing persisted findings.
-     * 
- * - * string name = 14; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object quote_ = ""; - /** - *
-     * The content that was found. Even if the content is not textual, it
-     * may be converted to a textual representation here.
-     * Provided if `include_quote` is true and the finding is
-     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
-     * in length, the quote may be omitted.
-     * 
- * - * string quote = 1; - * @return The quote. - */ - public java.lang.String getQuote() { - java.lang.Object ref = quote_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - quote_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The content that was found. Even if the content is not textual, it
-     * may be converted to a textual representation here.
-     * Provided if `include_quote` is true and the finding is
-     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
-     * in length, the quote may be omitted.
-     * 
- * - * string quote = 1; - * @return The bytes for quote. - */ - public com.google.protobuf.ByteString - getQuoteBytes() { - java.lang.Object ref = quote_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - quote_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The content that was found. Even if the content is not textual, it
-     * may be converted to a textual representation here.
-     * Provided if `include_quote` is true and the finding is
-     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
-     * in length, the quote may be omitted.
-     * 
- * - * string quote = 1; - * @param value The quote to set. - * @return This builder for chaining. - */ - public Builder setQuote( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - quote_ = value; - onChanged(); - return this; - } - /** - *
-     * The content that was found. Even if the content is not textual, it
-     * may be converted to a textual representation here.
-     * Provided if `include_quote` is true and the finding is
-     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
-     * in length, the quote may be omitted.
-     * 
- * - * string quote = 1; - * @return This builder for chaining. - */ - public Builder clearQuote() { - - quote_ = getDefaultInstance().getQuote(); - onChanged(); - return this; - } - /** - *
-     * The content that was found. Even if the content is not textual, it
-     * may be converted to a textual representation here.
-     * Provided if `include_quote` is true and the finding is
-     * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
-     * in length, the quote may be omitted.
-     * 
- * - * string quote = 1; - * @param value The bytes for quote to set. - * @return This builder for chaining. - */ - public Builder setQuoteBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - quote_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.InfoType infoType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-     * The type of content that might have been found.
-     * Provided if `excluded_types` is false.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return Whether the infoType field is set. - */ - public boolean hasInfoType() { - return infoTypeBuilder_ != null || infoType_ != null; - } - /** - *
-     * The type of content that might have been found.
-     * Provided if `excluded_types` is false.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return The infoType. - */ - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } else { - return infoTypeBuilder_.getMessage(); - } - } - /** - *
-     * The type of content that might have been found.
-     * Provided if `excluded_types` is false.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infoType_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The type of content that might have been found.
-     * Provided if `excluded_types` is false.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - infoType_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The type of content that might have been found.
-     * Provided if `excluded_types` is false.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (infoType_ != null) { - infoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); - } else { - infoType_ = value; - } - onChanged(); - } else { - infoTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The type of content that might have been found.
-     * Provided if `excluded_types` is false.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - infoType_ = null; - onChanged(); - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - - return this; - } - /** - *
-     * The type of content that might have been found.
-     * Provided if `excluded_types` is false.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - - onChanged(); - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-     * The type of content that might have been found.
-     * Provided if `excluded_types` is false.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (infoTypeBuilder_ != null) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - return infoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - } - /** - *
-     * The type of content that might have been found.
-     * Provided if `excluded_types` is false.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getInfoType(), - getParentForChildren(), - isClean()); - infoType_ = null; - } - return infoTypeBuilder_; - } - - private int likelihood_ = 0; - /** - *
-     * Confidence of how likely it is that the `info_type` is correct.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 3; - * @return The enum numeric value on the wire for likelihood. - */ - @java.lang.Override public int getLikelihoodValue() { - return likelihood_; - } - /** - *
-     * Confidence of how likely it is that the `info_type` is correct.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 3; - * @param value The enum numeric value on the wire for likelihood to set. - * @return This builder for chaining. - */ - public Builder setLikelihoodValue(int value) { - - likelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Confidence of how likely it is that the `info_type` is correct.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 3; - * @return The likelihood. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Likelihood getLikelihood() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(likelihood_); - return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Confidence of how likely it is that the `info_type` is correct.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 3; - * @param value The likelihood to set. - * @return This builder for chaining. - */ - public Builder setLikelihood(com.google.privacy.dlp.v2.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - likelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Confidence of how likely it is that the `info_type` is correct.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 3; - * @return This builder for chaining. - */ - public Builder clearLikelihood() { - - likelihood_ = 0; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.Location location_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Location, com.google.privacy.dlp.v2.Location.Builder, com.google.privacy.dlp.v2.LocationOrBuilder> locationBuilder_; - /** - *
-     * Where the content was found.
-     * 
- * - * .google.privacy.dlp.v2.Location location = 4; - * @return Whether the location field is set. - */ - public boolean hasLocation() { - return locationBuilder_ != null || location_ != null; - } - /** - *
-     * Where the content was found.
-     * 
- * - * .google.privacy.dlp.v2.Location location = 4; - * @return The location. - */ - public com.google.privacy.dlp.v2.Location getLocation() { - if (locationBuilder_ == null) { - return location_ == null ? com.google.privacy.dlp.v2.Location.getDefaultInstance() : location_; - } else { - return locationBuilder_.getMessage(); - } - } - /** - *
-     * Where the content was found.
-     * 
- * - * .google.privacy.dlp.v2.Location location = 4; - */ - public Builder setLocation(com.google.privacy.dlp.v2.Location value) { - if (locationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - onChanged(); - } else { - locationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Where the content was found.
-     * 
- * - * .google.privacy.dlp.v2.Location location = 4; - */ - public Builder setLocation( - com.google.privacy.dlp.v2.Location.Builder builderForValue) { - if (locationBuilder_ == null) { - location_ = builderForValue.build(); - onChanged(); - } else { - locationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Where the content was found.
-     * 
- * - * .google.privacy.dlp.v2.Location location = 4; - */ - public Builder mergeLocation(com.google.privacy.dlp.v2.Location value) { - if (locationBuilder_ == null) { - if (location_ != null) { - location_ = - com.google.privacy.dlp.v2.Location.newBuilder(location_).mergeFrom(value).buildPartial(); - } else { - location_ = value; - } - onChanged(); - } else { - locationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Where the content was found.
-     * 
- * - * .google.privacy.dlp.v2.Location location = 4; - */ - public Builder clearLocation() { - if (locationBuilder_ == null) { - location_ = null; - onChanged(); - } else { - location_ = null; - locationBuilder_ = null; - } - - return this; - } - /** - *
-     * Where the content was found.
-     * 
- * - * .google.privacy.dlp.v2.Location location = 4; - */ - public com.google.privacy.dlp.v2.Location.Builder getLocationBuilder() { - - onChanged(); - return getLocationFieldBuilder().getBuilder(); - } - /** - *
-     * Where the content was found.
-     * 
- * - * .google.privacy.dlp.v2.Location location = 4; - */ - public com.google.privacy.dlp.v2.LocationOrBuilder getLocationOrBuilder() { - if (locationBuilder_ != null) { - return locationBuilder_.getMessageOrBuilder(); - } else { - return location_ == null ? - com.google.privacy.dlp.v2.Location.getDefaultInstance() : location_; - } - } - /** - *
-     * Where the content was found.
-     * 
- * - * .google.privacy.dlp.v2.Location location = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Location, com.google.privacy.dlp.v2.Location.Builder, com.google.privacy.dlp.v2.LocationOrBuilder> - getLocationFieldBuilder() { - if (locationBuilder_ == null) { - locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Location, com.google.privacy.dlp.v2.Location.Builder, com.google.privacy.dlp.v2.LocationOrBuilder>( - getLocation(), - getParentForChildren(), - isClean()); - location_ = null; - } - return locationBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Timestamp when finding was detected.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Timestamp when finding was detected.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Timestamp when finding was detected.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Timestamp when finding was detected.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Timestamp when finding was detected.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Timestamp when finding was detected.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Timestamp when finding was detected.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Timestamp when finding was detected.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Timestamp when finding was detected.
-     * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.privacy.dlp.v2.QuoteInfo quoteInfo_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.QuoteInfo, com.google.privacy.dlp.v2.QuoteInfo.Builder, com.google.privacy.dlp.v2.QuoteInfoOrBuilder> quoteInfoBuilder_; - /** - *
-     * Contains data parsed from quotes. Only populated if include_quote was set
-     * to true and a supported infoType was requested. Currently supported
-     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-     * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - * @return Whether the quoteInfo field is set. - */ - public boolean hasQuoteInfo() { - return quoteInfoBuilder_ != null || quoteInfo_ != null; - } - /** - *
-     * Contains data parsed from quotes. Only populated if include_quote was set
-     * to true and a supported infoType was requested. Currently supported
-     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-     * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - * @return The quoteInfo. - */ - public com.google.privacy.dlp.v2.QuoteInfo getQuoteInfo() { - if (quoteInfoBuilder_ == null) { - return quoteInfo_ == null ? com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance() : quoteInfo_; - } else { - return quoteInfoBuilder_.getMessage(); - } - } - /** - *
-     * Contains data parsed from quotes. Only populated if include_quote was set
-     * to true and a supported infoType was requested. Currently supported
-     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-     * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - */ - public Builder setQuoteInfo(com.google.privacy.dlp.v2.QuoteInfo value) { - if (quoteInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - quoteInfo_ = value; - onChanged(); - } else { - quoteInfoBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Contains data parsed from quotes. Only populated if include_quote was set
-     * to true and a supported infoType was requested. Currently supported
-     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-     * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - */ - public Builder setQuoteInfo( - com.google.privacy.dlp.v2.QuoteInfo.Builder builderForValue) { - if (quoteInfoBuilder_ == null) { - quoteInfo_ = builderForValue.build(); - onChanged(); - } else { - quoteInfoBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Contains data parsed from quotes. Only populated if include_quote was set
-     * to true and a supported infoType was requested. Currently supported
-     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-     * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - */ - public Builder mergeQuoteInfo(com.google.privacy.dlp.v2.QuoteInfo value) { - if (quoteInfoBuilder_ == null) { - if (quoteInfo_ != null) { - quoteInfo_ = - com.google.privacy.dlp.v2.QuoteInfo.newBuilder(quoteInfo_).mergeFrom(value).buildPartial(); - } else { - quoteInfo_ = value; - } - onChanged(); - } else { - quoteInfoBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Contains data parsed from quotes. Only populated if include_quote was set
-     * to true and a supported infoType was requested. Currently supported
-     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-     * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - */ - public Builder clearQuoteInfo() { - if (quoteInfoBuilder_ == null) { - quoteInfo_ = null; - onChanged(); - } else { - quoteInfo_ = null; - quoteInfoBuilder_ = null; - } - - return this; - } - /** - *
-     * Contains data parsed from quotes. Only populated if include_quote was set
-     * to true and a supported infoType was requested. Currently supported
-     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-     * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - */ - public com.google.privacy.dlp.v2.QuoteInfo.Builder getQuoteInfoBuilder() { - - onChanged(); - return getQuoteInfoFieldBuilder().getBuilder(); - } - /** - *
-     * Contains data parsed from quotes. Only populated if include_quote was set
-     * to true and a supported infoType was requested. Currently supported
-     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-     * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - */ - public com.google.privacy.dlp.v2.QuoteInfoOrBuilder getQuoteInfoOrBuilder() { - if (quoteInfoBuilder_ != null) { - return quoteInfoBuilder_.getMessageOrBuilder(); - } else { - return quoteInfo_ == null ? - com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance() : quoteInfo_; - } - } - /** - *
-     * Contains data parsed from quotes. Only populated if include_quote was set
-     * to true and a supported infoType was requested. Currently supported
-     * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-     * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.QuoteInfo, com.google.privacy.dlp.v2.QuoteInfo.Builder, com.google.privacy.dlp.v2.QuoteInfoOrBuilder> - getQuoteInfoFieldBuilder() { - if (quoteInfoBuilder_ == null) { - quoteInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.QuoteInfo, com.google.privacy.dlp.v2.QuoteInfo.Builder, com.google.privacy.dlp.v2.QuoteInfoOrBuilder>( - getQuoteInfo(), - getParentForChildren(), - isClean()); - quoteInfo_ = null; - } - return quoteInfoBuilder_; - } - - private java.lang.Object resourceName_ = ""; - /** - *
-     * The job that stored the finding.
-     * 
- * - * string resource_name = 8 [(.google.api.resource_reference) = { ... } - * @return The resourceName. - */ - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The job that stored the finding.
-     * 
- * - * string resource_name = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for resourceName. - */ - public com.google.protobuf.ByteString - getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The job that stored the finding.
-     * 
- * - * string resource_name = 8 [(.google.api.resource_reference) = { ... } - * @param value The resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceName_ = value; - onChanged(); - return this; - } - /** - *
-     * The job that stored the finding.
-     * 
- * - * string resource_name = 8 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearResourceName() { - - resourceName_ = getDefaultInstance().getResourceName(); - onChanged(); - return this; - } - /** - *
-     * The job that stored the finding.
-     * 
- * - * string resource_name = 8 [(.google.api.resource_reference) = { ... } - * @param value The bytes for resourceName to set. - * @return This builder for chaining. - */ - public Builder setResourceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceName_ = value; - onChanged(); - return this; - } - - private java.lang.Object triggerName_ = ""; - /** - *
-     * Job trigger name, if applicable, for this finding.
-     * 
- * - * string trigger_name = 9 [(.google.api.resource_reference) = { ... } - * @return The triggerName. - */ - public java.lang.String getTriggerName() { - java.lang.Object ref = triggerName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - triggerName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Job trigger name, if applicable, for this finding.
-     * 
- * - * string trigger_name = 9 [(.google.api.resource_reference) = { ... } - * @return The bytes for triggerName. - */ - public com.google.protobuf.ByteString - getTriggerNameBytes() { - java.lang.Object ref = triggerName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - triggerName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Job trigger name, if applicable, for this finding.
-     * 
- * - * string trigger_name = 9 [(.google.api.resource_reference) = { ... } - * @param value The triggerName to set. - * @return This builder for chaining. - */ - public Builder setTriggerName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - triggerName_ = value; - onChanged(); - return this; - } - /** - *
-     * Job trigger name, if applicable, for this finding.
-     * 
- * - * string trigger_name = 9 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearTriggerName() { - - triggerName_ = getDefaultInstance().getTriggerName(); - onChanged(); - return this; - } - /** - *
-     * Job trigger name, if applicable, for this finding.
-     * 
- * - * string trigger_name = 9 [(.google.api.resource_reference) = { ... } - * @param value The bytes for triggerName to set. - * @return This builder for chaining. - */ - public Builder setTriggerNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - triggerName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * The labels associated with this `Finding`.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 10; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * The labels associated with this `Finding`.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 10; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * The labels associated with this `Finding`.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 10; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * The labels associated with this `Finding`.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 10; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * The labels associated with this `Finding`.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 10; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * The labels associated with this `Finding`.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 10; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * The labels associated with this `Finding`.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 10; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.Timestamp jobCreateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> jobCreateTimeBuilder_; - /** - *
-     * Time the job started that produced this finding.
-     * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - * @return Whether the jobCreateTime field is set. - */ - public boolean hasJobCreateTime() { - return jobCreateTimeBuilder_ != null || jobCreateTime_ != null; - } - /** - *
-     * Time the job started that produced this finding.
-     * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - * @return The jobCreateTime. - */ - public com.google.protobuf.Timestamp getJobCreateTime() { - if (jobCreateTimeBuilder_ == null) { - return jobCreateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : jobCreateTime_; - } else { - return jobCreateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time the job started that produced this finding.
-     * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - */ - public Builder setJobCreateTime(com.google.protobuf.Timestamp value) { - if (jobCreateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobCreateTime_ = value; - onChanged(); - } else { - jobCreateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time the job started that produced this finding.
-     * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - */ - public Builder setJobCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (jobCreateTimeBuilder_ == null) { - jobCreateTime_ = builderForValue.build(); - onChanged(); - } else { - jobCreateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time the job started that produced this finding.
-     * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - */ - public Builder mergeJobCreateTime(com.google.protobuf.Timestamp value) { - if (jobCreateTimeBuilder_ == null) { - if (jobCreateTime_ != null) { - jobCreateTime_ = - com.google.protobuf.Timestamp.newBuilder(jobCreateTime_).mergeFrom(value).buildPartial(); - } else { - jobCreateTime_ = value; - } - onChanged(); - } else { - jobCreateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time the job started that produced this finding.
-     * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - */ - public Builder clearJobCreateTime() { - if (jobCreateTimeBuilder_ == null) { - jobCreateTime_ = null; - onChanged(); - } else { - jobCreateTime_ = null; - jobCreateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time the job started that produced this finding.
-     * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - */ - public com.google.protobuf.Timestamp.Builder getJobCreateTimeBuilder() { - - onChanged(); - return getJobCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time the job started that produced this finding.
-     * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - */ - public com.google.protobuf.TimestampOrBuilder getJobCreateTimeOrBuilder() { - if (jobCreateTimeBuilder_ != null) { - return jobCreateTimeBuilder_.getMessageOrBuilder(); - } else { - return jobCreateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : jobCreateTime_; - } - } - /** - *
-     * Time the job started that produced this finding.
-     * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getJobCreateTimeFieldBuilder() { - if (jobCreateTimeBuilder_ == null) { - jobCreateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getJobCreateTime(), - getParentForChildren(), - isClean()); - jobCreateTime_ = null; - } - return jobCreateTimeBuilder_; - } - - private java.lang.Object jobName_ = ""; - /** - *
-     * The job that stored the finding.
-     * 
- * - * string job_name = 13 [(.google.api.resource_reference) = { ... } - * @return The jobName. - */ - public java.lang.String getJobName() { - java.lang.Object ref = jobName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The job that stored the finding.
-     * 
- * - * string job_name = 13 [(.google.api.resource_reference) = { ... } - * @return The bytes for jobName. - */ - public com.google.protobuf.ByteString - getJobNameBytes() { - java.lang.Object ref = jobName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jobName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The job that stored the finding.
-     * 
- * - * string job_name = 13 [(.google.api.resource_reference) = { ... } - * @param value The jobName to set. - * @return This builder for chaining. - */ - public Builder setJobName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobName_ = value; - onChanged(); - return this; - } - /** - *
-     * The job that stored the finding.
-     * 
- * - * string job_name = 13 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearJobName() { - - jobName_ = getDefaultInstance().getJobName(); - onChanged(); - return this; - } - /** - *
-     * The job that stored the finding.
-     * 
- * - * string job_name = 13 [(.google.api.resource_reference) = { ... } - * @param value The bytes for jobName to set. - * @return This builder for chaining. - */ - public Builder setJobNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobName_ = value; - onChanged(); - return this; - } - - private java.lang.Object findingId_ = ""; - /** - *
-     * The unique finding id.
-     * 
- * - * string finding_id = 15; - * @return The findingId. - */ - public java.lang.String getFindingId() { - java.lang.Object ref = findingId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - findingId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The unique finding id.
-     * 
- * - * string finding_id = 15; - * @return The bytes for findingId. - */ - public com.google.protobuf.ByteString - getFindingIdBytes() { - java.lang.Object ref = findingId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - findingId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The unique finding id.
-     * 
- * - * string finding_id = 15; - * @param value The findingId to set. - * @return This builder for chaining. - */ - public Builder setFindingId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - findingId_ = value; - onChanged(); - return this; - } - /** - *
-     * The unique finding id.
-     * 
- * - * string finding_id = 15; - * @return This builder for chaining. - */ - public Builder clearFindingId() { - - findingId_ = getDefaultInstance().getFindingId(); - onChanged(); - return this; - } - /** - *
-     * The unique finding id.
-     * 
- * - * string finding_id = 15; - * @param value The bytes for findingId to set. - * @return This builder for chaining. - */ - public Builder setFindingIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - findingId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Finding) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Finding) - private static final com.google.privacy.dlp.v2.Finding DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Finding(); - } - - public static com.google.privacy.dlp.v2.Finding getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Finding parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Finding(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Finding getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java deleted file mode 100644 index 2785b2604b3c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java +++ /dev/null @@ -1,400 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface FindingOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Finding) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Resource name in format
-   * projects/{project}/locations/{location}/findings/{finding} Populated only
-   * when viewing persisted findings.
-   * 
- * - * string name = 14; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Resource name in format
-   * projects/{project}/locations/{location}/findings/{finding} Populated only
-   * when viewing persisted findings.
-   * 
- * - * string name = 14; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The content that was found. Even if the content is not textual, it
-   * may be converted to a textual representation here.
-   * Provided if `include_quote` is true and the finding is
-   * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
-   * in length, the quote may be omitted.
-   * 
- * - * string quote = 1; - * @return The quote. - */ - java.lang.String getQuote(); - /** - *
-   * The content that was found. Even if the content is not textual, it
-   * may be converted to a textual representation here.
-   * Provided if `include_quote` is true and the finding is
-   * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
-   * in length, the quote may be omitted.
-   * 
- * - * string quote = 1; - * @return The bytes for quote. - */ - com.google.protobuf.ByteString - getQuoteBytes(); - - /** - *
-   * The type of content that might have been found.
-   * Provided if `excluded_types` is false.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-   * The type of content that might have been found.
-   * Provided if `excluded_types` is false.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-   * The type of content that might have been found.
-   * Provided if `excluded_types` is false.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-   * Confidence of how likely it is that the `info_type` is correct.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 3; - * @return The enum numeric value on the wire for likelihood. - */ - int getLikelihoodValue(); - /** - *
-   * Confidence of how likely it is that the `info_type` is correct.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood likelihood = 3; - * @return The likelihood. - */ - com.google.privacy.dlp.v2.Likelihood getLikelihood(); - - /** - *
-   * Where the content was found.
-   * 
- * - * .google.privacy.dlp.v2.Location location = 4; - * @return Whether the location field is set. - */ - boolean hasLocation(); - /** - *
-   * Where the content was found.
-   * 
- * - * .google.privacy.dlp.v2.Location location = 4; - * @return The location. - */ - com.google.privacy.dlp.v2.Location getLocation(); - /** - *
-   * Where the content was found.
-   * 
- * - * .google.privacy.dlp.v2.Location location = 4; - */ - com.google.privacy.dlp.v2.LocationOrBuilder getLocationOrBuilder(); - - /** - *
-   * Timestamp when finding was detected.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Timestamp when finding was detected.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Timestamp when finding was detected.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Contains data parsed from quotes. Only populated if include_quote was set
-   * to true and a supported infoType was requested. Currently supported
-   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-   * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - * @return Whether the quoteInfo field is set. - */ - boolean hasQuoteInfo(); - /** - *
-   * Contains data parsed from quotes. Only populated if include_quote was set
-   * to true and a supported infoType was requested. Currently supported
-   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-   * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - * @return The quoteInfo. - */ - com.google.privacy.dlp.v2.QuoteInfo getQuoteInfo(); - /** - *
-   * Contains data parsed from quotes. Only populated if include_quote was set
-   * to true and a supported infoType was requested. Currently supported
-   * infoTypes: DATE, DATE_OF_BIRTH and TIME.
-   * 
- * - * .google.privacy.dlp.v2.QuoteInfo quote_info = 7; - */ - com.google.privacy.dlp.v2.QuoteInfoOrBuilder getQuoteInfoOrBuilder(); - - /** - *
-   * The job that stored the finding.
-   * 
- * - * string resource_name = 8 [(.google.api.resource_reference) = { ... } - * @return The resourceName. - */ - java.lang.String getResourceName(); - /** - *
-   * The job that stored the finding.
-   * 
- * - * string resource_name = 8 [(.google.api.resource_reference) = { ... } - * @return The bytes for resourceName. - */ - com.google.protobuf.ByteString - getResourceNameBytes(); - - /** - *
-   * Job trigger name, if applicable, for this finding.
-   * 
- * - * string trigger_name = 9 [(.google.api.resource_reference) = { ... } - * @return The triggerName. - */ - java.lang.String getTriggerName(); - /** - *
-   * Job trigger name, if applicable, for this finding.
-   * 
- * - * string trigger_name = 9 [(.google.api.resource_reference) = { ... } - * @return The bytes for triggerName. - */ - com.google.protobuf.ByteString - getTriggerNameBytes(); - - /** - *
-   * The labels associated with this `Finding`.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 10; - */ - int getLabelsCount(); - /** - *
-   * The labels associated with this `Finding`.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 10; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * The labels associated with this `Finding`.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 10; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * The labels associated with this `Finding`.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 10; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * The labels associated with this `Finding`.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 10; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Time the job started that produced this finding.
-   * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - * @return Whether the jobCreateTime field is set. - */ - boolean hasJobCreateTime(); - /** - *
-   * Time the job started that produced this finding.
-   * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - * @return The jobCreateTime. - */ - com.google.protobuf.Timestamp getJobCreateTime(); - /** - *
-   * Time the job started that produced this finding.
-   * 
- * - * .google.protobuf.Timestamp job_create_time = 11; - */ - com.google.protobuf.TimestampOrBuilder getJobCreateTimeOrBuilder(); - - /** - *
-   * The job that stored the finding.
-   * 
- * - * string job_name = 13 [(.google.api.resource_reference) = { ... } - * @return The jobName. - */ - java.lang.String getJobName(); - /** - *
-   * The job that stored the finding.
-   * 
- * - * string job_name = 13 [(.google.api.resource_reference) = { ... } - * @return The bytes for jobName. - */ - com.google.protobuf.ByteString - getJobNameBytes(); - - /** - *
-   * The unique finding id.
-   * 
- * - * string finding_id = 15; - * @return The findingId. - */ - java.lang.String getFindingId(); - /** - *
-   * The unique finding id.
-   * 
- * - * string finding_id = 15; - * @return The bytes for findingId. - */ - com.google.protobuf.ByteString - getFindingIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequest.java deleted file mode 100644 index d788c5fdaf53..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequest.java +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The request message for finishing a DLP hybrid job.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.FinishDlpJobRequest} - */ -public final class FinishDlpJobRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.FinishDlpJobRequest) - FinishDlpJobRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use FinishDlpJobRequest.newBuilder() to construct. - private FinishDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FinishDlpJobRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FinishDlpJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FinishDlpJobRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.FinishDlpJobRequest.class, com.google.privacy.dlp.v2.FinishDlpJobRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the DlpJob resource to be cancelled.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the DlpJob resource to be cancelled.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.FinishDlpJobRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.FinishDlpJobRequest other = (com.google.privacy.dlp.v2.FinishDlpJobRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FinishDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.FinishDlpJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The request message for finishing a DLP hybrid job.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.FinishDlpJobRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.FinishDlpJobRequest) - com.google.privacy.dlp.v2.FinishDlpJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.FinishDlpJobRequest.class, com.google.privacy.dlp.v2.FinishDlpJobRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.FinishDlpJobRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FinishDlpJobRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FinishDlpJobRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.FinishDlpJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FinishDlpJobRequest build() { - com.google.privacy.dlp.v2.FinishDlpJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FinishDlpJobRequest buildPartial() { - com.google.privacy.dlp.v2.FinishDlpJobRequest result = new com.google.privacy.dlp.v2.FinishDlpJobRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.FinishDlpJobRequest) { - return mergeFrom((com.google.privacy.dlp.v2.FinishDlpJobRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.FinishDlpJobRequest other) { - if (other == com.google.privacy.dlp.v2.FinishDlpJobRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.FinishDlpJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.FinishDlpJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the DlpJob resource to be cancelled.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.FinishDlpJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.FinishDlpJobRequest) - private static final com.google.privacy.dlp.v2.FinishDlpJobRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.FinishDlpJobRequest(); - } - - public static com.google.privacy.dlp.v2.FinishDlpJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FinishDlpJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FinishDlpJobRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FinishDlpJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequestOrBuilder.java deleted file mode 100644 index 35fac50bb4f3..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FinishDlpJobRequestOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface FinishDlpJobRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.FinishDlpJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the DlpJob resource to be cancelled.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the DlpJob resource to be cancelled.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java deleted file mode 100644 index 53c5efc19b9b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java +++ /dev/null @@ -1,1065 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Buckets values based on fixed size ranges. The
- * Bucketing transformation can provide all of this functionality,
- * but requires more configuration. This message is provided as a convenience to
- * the user for simple bucketing strategies.
- * The transformed value will be a hyphenated string of
- * {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and upper_bound
- * = 20, all values that are within this bucket will be replaced with "10-20".
- * This can be used on data of type: double, long.
- * If the bound Value type differs from the type of data
- * being transformed, we will first attempt converting the type of the data to
- * be transformed to match the type of the bound before comparing.
- * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.FixedSizeBucketingConfig} - */ -public final class FixedSizeBucketingConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.FixedSizeBucketingConfig) - FixedSizeBucketingConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use FixedSizeBucketingConfig.newBuilder() to construct. - private FixedSizeBucketingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FixedSizeBucketingConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FixedSizeBucketingConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FixedSizeBucketingConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (lowerBound_ != null) { - subBuilder = lowerBound_.toBuilder(); - } - lowerBound_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lowerBound_); - lowerBound_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (upperBound_ != null) { - subBuilder = upperBound_.toBuilder(); - } - upperBound_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(upperBound_); - upperBound_ = subBuilder.buildPartial(); - } - - break; - } - case 25: { - - bucketSize_ = input.readDouble(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.FixedSizeBucketingConfig.class, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder.class); - } - - public static final int LOWER_BOUND_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.Value lowerBound_; - /** - *
-   * Required. Lower bound value of buckets. All values less than `lower_bound` are
-   * grouped together into a single bucket; for example if `lower_bound` = 10,
-   * then all values less than 10 are replaced with the value "-10".
-   * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the lowerBound field is set. - */ - @java.lang.Override - public boolean hasLowerBound() { - return lowerBound_ != null; - } - /** - *
-   * Required. Lower bound value of buckets. All values less than `lower_bound` are
-   * grouped together into a single bucket; for example if `lower_bound` = 10,
-   * then all values less than 10 are replaced with the value "-10".
-   * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The lowerBound. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getLowerBound() { - return lowerBound_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : lowerBound_; - } - /** - *
-   * Required. Lower bound value of buckets. All values less than `lower_bound` are
-   * grouped together into a single bucket; for example if `lower_bound` = 10,
-   * then all values less than 10 are replaced with the value "-10".
-   * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getLowerBoundOrBuilder() { - return getLowerBound(); - } - - public static final int UPPER_BOUND_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.Value upperBound_; - /** - *
-   * Required. Upper bound value of buckets. All values greater than upper_bound are
-   * grouped together into a single bucket; for example if `upper_bound` = 89,
-   * then all values greater than 89 are replaced with the value "89+".
-   * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the upperBound field is set. - */ - @java.lang.Override - public boolean hasUpperBound() { - return upperBound_ != null; - } - /** - *
-   * Required. Upper bound value of buckets. All values greater than upper_bound are
-   * grouped together into a single bucket; for example if `upper_bound` = 89,
-   * then all values greater than 89 are replaced with the value "89+".
-   * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The upperBound. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getUpperBound() { - return upperBound_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : upperBound_; - } - /** - *
-   * Required. Upper bound value of buckets. All values greater than upper_bound are
-   * grouped together into a single bucket; for example if `upper_bound` = 89,
-   * then all values greater than 89 are replaced with the value "89+".
-   * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getUpperBoundOrBuilder() { - return getUpperBound(); - } - - public static final int BUCKET_SIZE_FIELD_NUMBER = 3; - private double bucketSize_; - /** - *
-   * Required. Size of each bucket (except for minimum and maximum buckets). So if
-   * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
-   * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
-   * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
-   * 
- * - * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bucketSize. - */ - @java.lang.Override - public double getBucketSize() { - return bucketSize_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (lowerBound_ != null) { - output.writeMessage(1, getLowerBound()); - } - if (upperBound_ != null) { - output.writeMessage(2, getUpperBound()); - } - if (java.lang.Double.doubleToRawLongBits(bucketSize_) != 0) { - output.writeDouble(3, bucketSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (lowerBound_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getLowerBound()); - } - if (upperBound_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpperBound()); - } - if (java.lang.Double.doubleToRawLongBits(bucketSize_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, bucketSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.FixedSizeBucketingConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.FixedSizeBucketingConfig other = (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) obj; - - if (hasLowerBound() != other.hasLowerBound()) return false; - if (hasLowerBound()) { - if (!getLowerBound() - .equals(other.getLowerBound())) return false; - } - if (hasUpperBound() != other.hasUpperBound()) return false; - if (hasUpperBound()) { - if (!getUpperBound() - .equals(other.getUpperBound())) return false; - } - if (java.lang.Double.doubleToLongBits(getBucketSize()) - != java.lang.Double.doubleToLongBits( - other.getBucketSize())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasLowerBound()) { - hash = (37 * hash) + LOWER_BOUND_FIELD_NUMBER; - hash = (53 * hash) + getLowerBound().hashCode(); - } - if (hasUpperBound()) { - hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER; - hash = (53 * hash) + getUpperBound().hashCode(); - } - hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getBucketSize())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.FixedSizeBucketingConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Buckets values based on fixed size ranges. The
-   * Bucketing transformation can provide all of this functionality,
-   * but requires more configuration. This message is provided as a convenience to
-   * the user for simple bucketing strategies.
-   * The transformed value will be a hyphenated string of
-   * {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and upper_bound
-   * = 20, all values that are within this bucket will be replaced with "10-20".
-   * This can be used on data of type: double, long.
-   * If the bound Value type differs from the type of data
-   * being transformed, we will first attempt converting the type of the data to
-   * be transformed to match the type of the bound before comparing.
-   * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.FixedSizeBucketingConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.FixedSizeBucketingConfig) - com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.FixedSizeBucketingConfig.class, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.FixedSizeBucketingConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (lowerBoundBuilder_ == null) { - lowerBound_ = null; - } else { - lowerBound_ = null; - lowerBoundBuilder_ = null; - } - if (upperBoundBuilder_ == null) { - upperBound_ = null; - } else { - upperBound_ = null; - upperBoundBuilder_ = null; - } - bucketSize_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FixedSizeBucketingConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FixedSizeBucketingConfig build() { - com.google.privacy.dlp.v2.FixedSizeBucketingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FixedSizeBucketingConfig buildPartial() { - com.google.privacy.dlp.v2.FixedSizeBucketingConfig result = new com.google.privacy.dlp.v2.FixedSizeBucketingConfig(this); - if (lowerBoundBuilder_ == null) { - result.lowerBound_ = lowerBound_; - } else { - result.lowerBound_ = lowerBoundBuilder_.build(); - } - if (upperBoundBuilder_ == null) { - result.upperBound_ = upperBound_; - } else { - result.upperBound_ = upperBoundBuilder_.build(); - } - result.bucketSize_ = bucketSize_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.FixedSizeBucketingConfig) { - return mergeFrom((com.google.privacy.dlp.v2.FixedSizeBucketingConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.FixedSizeBucketingConfig other) { - if (other == com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance()) return this; - if (other.hasLowerBound()) { - mergeLowerBound(other.getLowerBound()); - } - if (other.hasUpperBound()) { - mergeUpperBound(other.getUpperBound()); - } - if (other.getBucketSize() != 0D) { - setBucketSize(other.getBucketSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.FixedSizeBucketingConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.Value lowerBound_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> lowerBoundBuilder_; - /** - *
-     * Required. Lower bound value of buckets. All values less than `lower_bound` are
-     * grouped together into a single bucket; for example if `lower_bound` = 10,
-     * then all values less than 10 are replaced with the value "-10".
-     * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the lowerBound field is set. - */ - public boolean hasLowerBound() { - return lowerBoundBuilder_ != null || lowerBound_ != null; - } - /** - *
-     * Required. Lower bound value of buckets. All values less than `lower_bound` are
-     * grouped together into a single bucket; for example if `lower_bound` = 10,
-     * then all values less than 10 are replaced with the value "-10".
-     * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The lowerBound. - */ - public com.google.privacy.dlp.v2.Value getLowerBound() { - if (lowerBoundBuilder_ == null) { - return lowerBound_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : lowerBound_; - } else { - return lowerBoundBuilder_.getMessage(); - } - } - /** - *
-     * Required. Lower bound value of buckets. All values less than `lower_bound` are
-     * grouped together into a single bucket; for example if `lower_bound` = 10,
-     * then all values less than 10 are replaced with the value "-10".
-     * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setLowerBound(com.google.privacy.dlp.v2.Value value) { - if (lowerBoundBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lowerBound_ = value; - onChanged(); - } else { - lowerBoundBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Lower bound value of buckets. All values less than `lower_bound` are
-     * grouped together into a single bucket; for example if `lower_bound` = 10,
-     * then all values less than 10 are replaced with the value "-10".
-     * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setLowerBound( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (lowerBoundBuilder_ == null) { - lowerBound_ = builderForValue.build(); - onChanged(); - } else { - lowerBoundBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Lower bound value of buckets. All values less than `lower_bound` are
-     * grouped together into a single bucket; for example if `lower_bound` = 10,
-     * then all values less than 10 are replaced with the value "-10".
-     * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeLowerBound(com.google.privacy.dlp.v2.Value value) { - if (lowerBoundBuilder_ == null) { - if (lowerBound_ != null) { - lowerBound_ = - com.google.privacy.dlp.v2.Value.newBuilder(lowerBound_).mergeFrom(value).buildPartial(); - } else { - lowerBound_ = value; - } - onChanged(); - } else { - lowerBoundBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Lower bound value of buckets. All values less than `lower_bound` are
-     * grouped together into a single bucket; for example if `lower_bound` = 10,
-     * then all values less than 10 are replaced with the value "-10".
-     * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearLowerBound() { - if (lowerBoundBuilder_ == null) { - lowerBound_ = null; - onChanged(); - } else { - lowerBound_ = null; - lowerBoundBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Lower bound value of buckets. All values less than `lower_bound` are
-     * grouped together into a single bucket; for example if `lower_bound` = 10,
-     * then all values less than 10 are replaced with the value "-10".
-     * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.Value.Builder getLowerBoundBuilder() { - - onChanged(); - return getLowerBoundFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Lower bound value of buckets. All values less than `lower_bound` are
-     * grouped together into a single bucket; for example if `lower_bound` = 10,
-     * then all values less than 10 are replaced with the value "-10".
-     * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getLowerBoundOrBuilder() { - if (lowerBoundBuilder_ != null) { - return lowerBoundBuilder_.getMessageOrBuilder(); - } else { - return lowerBound_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : lowerBound_; - } - } - /** - *
-     * Required. Lower bound value of buckets. All values less than `lower_bound` are
-     * grouped together into a single bucket; for example if `lower_bound` = 10,
-     * then all values less than 10 are replaced with the value "-10".
-     * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getLowerBoundFieldBuilder() { - if (lowerBoundBuilder_ == null) { - lowerBoundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getLowerBound(), - getParentForChildren(), - isClean()); - lowerBound_ = null; - } - return lowerBoundBuilder_; - } - - private com.google.privacy.dlp.v2.Value upperBound_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> upperBoundBuilder_; - /** - *
-     * Required. Upper bound value of buckets. All values greater than upper_bound are
-     * grouped together into a single bucket; for example if `upper_bound` = 89,
-     * then all values greater than 89 are replaced with the value "89+".
-     * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the upperBound field is set. - */ - public boolean hasUpperBound() { - return upperBoundBuilder_ != null || upperBound_ != null; - } - /** - *
-     * Required. Upper bound value of buckets. All values greater than upper_bound are
-     * grouped together into a single bucket; for example if `upper_bound` = 89,
-     * then all values greater than 89 are replaced with the value "89+".
-     * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The upperBound. - */ - public com.google.privacy.dlp.v2.Value getUpperBound() { - if (upperBoundBuilder_ == null) { - return upperBound_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : upperBound_; - } else { - return upperBoundBuilder_.getMessage(); - } - } - /** - *
-     * Required. Upper bound value of buckets. All values greater than upper_bound are
-     * grouped together into a single bucket; for example if `upper_bound` = 89,
-     * then all values greater than 89 are replaced with the value "89+".
-     * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpperBound(com.google.privacy.dlp.v2.Value value) { - if (upperBoundBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - upperBound_ = value; - onChanged(); - } else { - upperBoundBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Upper bound value of buckets. All values greater than upper_bound are
-     * grouped together into a single bucket; for example if `upper_bound` = 89,
-     * then all values greater than 89 are replaced with the value "89+".
-     * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpperBound( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (upperBoundBuilder_ == null) { - upperBound_ = builderForValue.build(); - onChanged(); - } else { - upperBoundBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Upper bound value of buckets. All values greater than upper_bound are
-     * grouped together into a single bucket; for example if `upper_bound` = 89,
-     * then all values greater than 89 are replaced with the value "89+".
-     * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeUpperBound(com.google.privacy.dlp.v2.Value value) { - if (upperBoundBuilder_ == null) { - if (upperBound_ != null) { - upperBound_ = - com.google.privacy.dlp.v2.Value.newBuilder(upperBound_).mergeFrom(value).buildPartial(); - } else { - upperBound_ = value; - } - onChanged(); - } else { - upperBoundBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Upper bound value of buckets. All values greater than upper_bound are
-     * grouped together into a single bucket; for example if `upper_bound` = 89,
-     * then all values greater than 89 are replaced with the value "89+".
-     * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearUpperBound() { - if (upperBoundBuilder_ == null) { - upperBound_ = null; - onChanged(); - } else { - upperBound_ = null; - upperBoundBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Upper bound value of buckets. All values greater than upper_bound are
-     * grouped together into a single bucket; for example if `upper_bound` = 89,
-     * then all values greater than 89 are replaced with the value "89+".
-     * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.Value.Builder getUpperBoundBuilder() { - - onChanged(); - return getUpperBoundFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Upper bound value of buckets. All values greater than upper_bound are
-     * grouped together into a single bucket; for example if `upper_bound` = 89,
-     * then all values greater than 89 are replaced with the value "89+".
-     * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getUpperBoundOrBuilder() { - if (upperBoundBuilder_ != null) { - return upperBoundBuilder_.getMessageOrBuilder(); - } else { - return upperBound_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : upperBound_; - } - } - /** - *
-     * Required. Upper bound value of buckets. All values greater than upper_bound are
-     * grouped together into a single bucket; for example if `upper_bound` = 89,
-     * then all values greater than 89 are replaced with the value "89+".
-     * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getUpperBoundFieldBuilder() { - if (upperBoundBuilder_ == null) { - upperBoundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getUpperBound(), - getParentForChildren(), - isClean()); - upperBound_ = null; - } - return upperBoundBuilder_; - } - - private double bucketSize_ ; - /** - *
-     * Required. Size of each bucket (except for minimum and maximum buckets). So if
-     * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
-     * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
-     * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
-     * 
- * - * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bucketSize. - */ - @java.lang.Override - public double getBucketSize() { - return bucketSize_; - } - /** - *
-     * Required. Size of each bucket (except for minimum and maximum buckets). So if
-     * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
-     * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
-     * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
-     * 
- * - * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bucketSize to set. - * @return This builder for chaining. - */ - public Builder setBucketSize(double value) { - - bucketSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Size of each bucket (except for minimum and maximum buckets). So if
-     * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
-     * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
-     * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
-     * 
- * - * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearBucketSize() { - - bucketSize_ = 0D; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.FixedSizeBucketingConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.FixedSizeBucketingConfig) - private static final com.google.privacy.dlp.v2.FixedSizeBucketingConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.FixedSizeBucketingConfig(); - } - - public static com.google.privacy.dlp.v2.FixedSizeBucketingConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FixedSizeBucketingConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FixedSizeBucketingConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.FixedSizeBucketingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java deleted file mode 100644 index e4046de107fe..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfigOrBuilder.java +++ /dev/null @@ -1,88 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface FixedSizeBucketingConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.FixedSizeBucketingConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Lower bound value of buckets. All values less than `lower_bound` are
-   * grouped together into a single bucket; for example if `lower_bound` = 10,
-   * then all values less than 10 are replaced with the value "-10".
-   * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the lowerBound field is set. - */ - boolean hasLowerBound(); - /** - *
-   * Required. Lower bound value of buckets. All values less than `lower_bound` are
-   * grouped together into a single bucket; for example if `lower_bound` = 10,
-   * then all values less than 10 are replaced with the value "-10".
-   * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The lowerBound. - */ - com.google.privacy.dlp.v2.Value getLowerBound(); - /** - *
-   * Required. Lower bound value of buckets. All values less than `lower_bound` are
-   * grouped together into a single bucket; for example if `lower_bound` = 10,
-   * then all values less than 10 are replaced with the value "-10".
-   * 
- * - * .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getLowerBoundOrBuilder(); - - /** - *
-   * Required. Upper bound value of buckets. All values greater than upper_bound are
-   * grouped together into a single bucket; for example if `upper_bound` = 89,
-   * then all values greater than 89 are replaced with the value "89+".
-   * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the upperBound field is set. - */ - boolean hasUpperBound(); - /** - *
-   * Required. Upper bound value of buckets. All values greater than upper_bound are
-   * grouped together into a single bucket; for example if `upper_bound` = 89,
-   * then all values greater than 89 are replaced with the value "89+".
-   * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The upperBound. - */ - com.google.privacy.dlp.v2.Value getUpperBound(); - /** - *
-   * Required. Upper bound value of buckets. All values greater than upper_bound are
-   * grouped together into a single bucket; for example if `upper_bound` = 89,
-   * then all values greater than 89 are replaced with the value "89+".
-   * 
- * - * .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getUpperBoundOrBuilder(); - - /** - *
-   * Required. Size of each bucket (except for minimum and maximum buckets). So if
-   * `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the
-   * following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60,
-   * 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works.
-   * 
- * - * double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bucketSize. - */ - double getBucketSize(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java deleted file mode 100644 index cddb33335c48..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for GetDeidentifyTemplate.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetDeidentifyTemplateRequest} - */ -public final class GetDeidentifyTemplateRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) - GetDeidentifyTemplateRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetDeidentifyTemplateRequest.newBuilder() to construct. - private GetDeidentifyTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetDeidentifyTemplateRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetDeidentifyTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetDeidentifyTemplateRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the organization and deidentify template to be read, for
-   * example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the organization and deidentify template to be read, for
-   * example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest other = (com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetDeidentifyTemplate.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetDeidentifyTemplateRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest build() { - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest buildPartial() { - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest result = new com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) { - return mergeFrom((com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest other) { - if (other == com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the organization and deidentify template to be read, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the organization and deidentify template to be read, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the organization and deidentify template to be read, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and deidentify template to be read, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and deidentify template to be read, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) - private static final com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(); - } - - public static com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetDeidentifyTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDeidentifyTemplateRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java deleted file mode 100644 index e11b89c3793c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDeidentifyTemplateRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface GetDeidentifyTemplateRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetDeidentifyTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the organization and deidentify template to be read, for
-   * example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the organization and deidentify template to be read, for
-   * example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequest.java deleted file mode 100644 index 66ba9520c0f4..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequest.java +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The request message for [DlpJobs.GetDlpJob][].
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetDlpJobRequest} - */ -public final class GetDlpJobRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetDlpJobRequest) - GetDlpJobRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetDlpJobRequest.newBuilder() to construct. - private GetDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetDlpJobRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetDlpJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetDlpJobRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetDlpJobRequest.class, com.google.privacy.dlp.v2.GetDlpJobRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the DlpJob resource.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the DlpJob resource.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.GetDlpJobRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.GetDlpJobRequest other = (com.google.privacy.dlp.v2.GetDlpJobRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.GetDlpJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The request message for [DlpJobs.GetDlpJob][].
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetDlpJobRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetDlpJobRequest) - com.google.privacy.dlp.v2.GetDlpJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetDlpJobRequest.class, com.google.privacy.dlp.v2.GetDlpJobRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.GetDlpJobRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetDlpJobRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.GetDlpJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetDlpJobRequest build() { - com.google.privacy.dlp.v2.GetDlpJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetDlpJobRequest buildPartial() { - com.google.privacy.dlp.v2.GetDlpJobRequest result = new com.google.privacy.dlp.v2.GetDlpJobRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.GetDlpJobRequest) { - return mergeFrom((com.google.privacy.dlp.v2.GetDlpJobRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.GetDlpJobRequest other) { - if (other == com.google.privacy.dlp.v2.GetDlpJobRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.GetDlpJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.GetDlpJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the DlpJob resource.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the DlpJob resource.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the DlpJob resource.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the DlpJob resource.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the DlpJob resource.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetDlpJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetDlpJobRequest) - private static final com.google.privacy.dlp.v2.GetDlpJobRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetDlpJobRequest(); - } - - public static com.google.privacy.dlp.v2.GetDlpJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetDlpJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDlpJobRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetDlpJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequestOrBuilder.java deleted file mode 100644 index 1f23a52ae740..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetDlpJobRequestOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface GetDlpJobRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetDlpJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the DlpJob resource.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the DlpJob resource.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java deleted file mode 100644 index ea5c839397b7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for GetInspectTemplate.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetInspectTemplateRequest} - */ -public final class GetInspectTemplateRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetInspectTemplateRequest) - GetInspectTemplateRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetInspectTemplateRequest.newBuilder() to construct. - private GetInspectTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetInspectTemplateRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetInspectTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetInspectTemplateRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetInspectTemplateRequest.class, com.google.privacy.dlp.v2.GetInspectTemplateRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the organization and inspectTemplate to be read, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the organization and inspectTemplate to be read, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.GetInspectTemplateRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.GetInspectTemplateRequest other = (com.google.privacy.dlp.v2.GetInspectTemplateRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.GetInspectTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetInspectTemplate.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetInspectTemplateRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetInspectTemplateRequest) - com.google.privacy.dlp.v2.GetInspectTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetInspectTemplateRequest.class, com.google.privacy.dlp.v2.GetInspectTemplateRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.GetInspectTemplateRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetInspectTemplateRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.GetInspectTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetInspectTemplateRequest build() { - com.google.privacy.dlp.v2.GetInspectTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetInspectTemplateRequest buildPartial() { - com.google.privacy.dlp.v2.GetInspectTemplateRequest result = new com.google.privacy.dlp.v2.GetInspectTemplateRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.GetInspectTemplateRequest) { - return mergeFrom((com.google.privacy.dlp.v2.GetInspectTemplateRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.GetInspectTemplateRequest other) { - if (other == com.google.privacy.dlp.v2.GetInspectTemplateRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.GetInspectTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.GetInspectTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be read, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be read, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be read, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be read, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and inspectTemplate to be read, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetInspectTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetInspectTemplateRequest) - private static final com.google.privacy.dlp.v2.GetInspectTemplateRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetInspectTemplateRequest(); - } - - public static com.google.privacy.dlp.v2.GetInspectTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetInspectTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInspectTemplateRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetInspectTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java deleted file mode 100644 index 42f34c29382a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetInspectTemplateRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface GetInspectTemplateRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetInspectTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the organization and inspectTemplate to be read, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the organization and inspectTemplate to be read, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequest.java deleted file mode 100644 index 86cf30205325..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequest.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for GetJobTrigger.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetJobTriggerRequest} - */ -public final class GetJobTriggerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetJobTriggerRequest) - GetJobTriggerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetJobTriggerRequest.newBuilder() to construct. - private GetJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetJobTriggerRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetJobTriggerRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetJobTriggerRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetJobTriggerRequest.class, com.google.privacy.dlp.v2.GetJobTriggerRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.GetJobTriggerRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.GetJobTriggerRequest other = (com.google.privacy.dlp.v2.GetJobTriggerRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.GetJobTriggerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetJobTrigger.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetJobTriggerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetJobTriggerRequest) - com.google.privacy.dlp.v2.GetJobTriggerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetJobTriggerRequest.class, com.google.privacy.dlp.v2.GetJobTriggerRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.GetJobTriggerRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetJobTriggerRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.GetJobTriggerRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetJobTriggerRequest build() { - com.google.privacy.dlp.v2.GetJobTriggerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetJobTriggerRequest buildPartial() { - com.google.privacy.dlp.v2.GetJobTriggerRequest result = new com.google.privacy.dlp.v2.GetJobTriggerRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.GetJobTriggerRequest) { - return mergeFrom((com.google.privacy.dlp.v2.GetJobTriggerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.GetJobTriggerRequest other) { - if (other == com.google.privacy.dlp.v2.GetJobTriggerRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.GetJobTriggerRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.GetJobTriggerRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetJobTriggerRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetJobTriggerRequest) - private static final com.google.privacy.dlp.v2.GetJobTriggerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetJobTriggerRequest(); - } - - public static com.google.privacy.dlp.v2.GetJobTriggerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetJobTriggerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetJobTriggerRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetJobTriggerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequestOrBuilder.java deleted file mode 100644 index c81d0b334e69..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetJobTriggerRequestOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface GetJobTriggerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetJobTriggerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java deleted file mode 100644 index 5390be39bced..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for GetStoredInfoType.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetStoredInfoTypeRequest} - */ -public final class GetStoredInfoTypeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.GetStoredInfoTypeRequest) - GetStoredInfoTypeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetStoredInfoTypeRequest.newBuilder() to construct. - private GetStoredInfoTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetStoredInfoTypeRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetStoredInfoTypeRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetStoredInfoTypeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the organization and storedInfoType to be read, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the organization and storedInfoType to be read, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.GetStoredInfoTypeRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.GetStoredInfoTypeRequest other = (com.google.privacy.dlp.v2.GetStoredInfoTypeRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for GetStoredInfoType.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.GetStoredInfoTypeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.GetStoredInfoTypeRequest) - com.google.privacy.dlp.v2.GetStoredInfoTypeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_GetStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetStoredInfoTypeRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetStoredInfoTypeRequest build() { - com.google.privacy.dlp.v2.GetStoredInfoTypeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetStoredInfoTypeRequest buildPartial() { - com.google.privacy.dlp.v2.GetStoredInfoTypeRequest result = new com.google.privacy.dlp.v2.GetStoredInfoTypeRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.GetStoredInfoTypeRequest) { - return mergeFrom((com.google.privacy.dlp.v2.GetStoredInfoTypeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.GetStoredInfoTypeRequest other) { - if (other == com.google.privacy.dlp.v2.GetStoredInfoTypeRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.GetStoredInfoTypeRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.GetStoredInfoTypeRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the organization and storedInfoType to be read, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the organization and storedInfoType to be read, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the organization and storedInfoType to be read, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and storedInfoType to be read, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the organization and storedInfoType to be read, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.GetStoredInfoTypeRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.GetStoredInfoTypeRequest) - private static final com.google.privacy.dlp.v2.GetStoredInfoTypeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.GetStoredInfoTypeRequest(); - } - - public static com.google.privacy.dlp.v2.GetStoredInfoTypeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetStoredInfoTypeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetStoredInfoTypeRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.GetStoredInfoTypeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java deleted file mode 100644 index 22cd00e8c1af..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/GetStoredInfoTypeRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface GetStoredInfoTypeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.GetStoredInfoTypeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the organization and storedInfoType to be read, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the organization and storedInfoType to be read, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItem.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItem.java deleted file mode 100644 index 6d20e31cd8a6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItem.java +++ /dev/null @@ -1,903 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * An individual hybrid item to inspect. Will be stored temporarily during
- * processing.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridContentItem} - */ -public final class HybridContentItem extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridContentItem) - HybridContentItemOrBuilder { -private static final long serialVersionUID = 0L; - // Use HybridContentItem.newBuilder() to construct. - private HybridContentItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HybridContentItem() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HybridContentItem(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HybridContentItem( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; - if (item_ != null) { - subBuilder = item_.toBuilder(); - } - item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(item_); - item_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.HybridFindingDetails.Builder subBuilder = null; - if (findingDetails_ != null) { - subBuilder = findingDetails_.toBuilder(); - } - findingDetails_ = input.readMessage(com.google.privacy.dlp.v2.HybridFindingDetails.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(findingDetails_); - findingDetails_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridContentItem.class, com.google.privacy.dlp.v2.HybridContentItem.Builder.class); - } - - public static final int ITEM_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.ContentItem item_; - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return Whether the item field is set. - */ - @java.lang.Override - public boolean hasItem() { - return item_ != null; - } - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return The item. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem getItem() { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - return getItem(); - } - - public static final int FINDING_DETAILS_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.HybridFindingDetails findingDetails_; - /** - *
-   * Supplementary information that will be added to each finding.
-   * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - * @return Whether the findingDetails field is set. - */ - @java.lang.Override - public boolean hasFindingDetails() { - return findingDetails_ != null; - } - /** - *
-   * Supplementary information that will be added to each finding.
-   * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - * @return The findingDetails. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridFindingDetails getFindingDetails() { - return findingDetails_ == null ? com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance() : findingDetails_; - } - /** - *
-   * Supplementary information that will be added to each finding.
-   * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder getFindingDetailsOrBuilder() { - return getFindingDetails(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (item_ != null) { - output.writeMessage(1, getItem()); - } - if (findingDetails_ != null) { - output.writeMessage(2, getFindingDetails()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (item_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getItem()); - } - if (findingDetails_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getFindingDetails()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.HybridContentItem)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.HybridContentItem other = (com.google.privacy.dlp.v2.HybridContentItem) obj; - - if (hasItem() != other.hasItem()) return false; - if (hasItem()) { - if (!getItem() - .equals(other.getItem())) return false; - } - if (hasFindingDetails() != other.hasFindingDetails()) return false; - if (hasFindingDetails()) { - if (!getFindingDetails() - .equals(other.getFindingDetails())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasItem()) { - hash = (37 * hash) + ITEM_FIELD_NUMBER; - hash = (53 * hash) + getItem().hashCode(); - } - if (hasFindingDetails()) { - hash = (37 * hash) + FINDING_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getFindingDetails().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridContentItem parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.HybridContentItem prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An individual hybrid item to inspect. Will be stored temporarily during
-   * processing.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridContentItem} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridContentItem) - com.google.privacy.dlp.v2.HybridContentItemOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridContentItem.class, com.google.privacy.dlp.v2.HybridContentItem.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.HybridContentItem.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (itemBuilder_ == null) { - item_ = null; - } else { - item_ = null; - itemBuilder_ = null; - } - if (findingDetailsBuilder_ == null) { - findingDetails_ = null; - } else { - findingDetails_ = null; - findingDetailsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridContentItem_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridContentItem getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridContentItem build() { - com.google.privacy.dlp.v2.HybridContentItem result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridContentItem buildPartial() { - com.google.privacy.dlp.v2.HybridContentItem result = new com.google.privacy.dlp.v2.HybridContentItem(this); - if (itemBuilder_ == null) { - result.item_ = item_; - } else { - result.item_ = itemBuilder_.build(); - } - if (findingDetailsBuilder_ == null) { - result.findingDetails_ = findingDetails_; - } else { - result.findingDetails_ = findingDetailsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.HybridContentItem) { - return mergeFrom((com.google.privacy.dlp.v2.HybridContentItem)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.HybridContentItem other) { - if (other == com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance()) return this; - if (other.hasItem()) { - mergeItem(other.getItem()); - } - if (other.hasFindingDetails()) { - mergeFindingDetails(other.getFindingDetails()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.HybridContentItem parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.HybridContentItem) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.ContentItem item_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return Whether the item field is set. - */ - public boolean hasItem() { - return itemBuilder_ != null || item_ != null; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return The item. - */ - public com.google.privacy.dlp.v2.ContentItem getItem() { - if (itemBuilder_ == null) { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } else { - return itemBuilder_.getMessage(); - } - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - item_ = value; - onChanged(); - } else { - itemBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder setItem( - com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { - if (itemBuilder_ == null) { - item_ = builderForValue.build(); - onChanged(); - } else { - itemBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (item_ != null) { - item_ = - com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); - } else { - item_ = value; - } - onChanged(); - } else { - itemBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder clearItem() { - if (itemBuilder_ == null) { - item_ = null; - onChanged(); - } else { - item_ = null; - itemBuilder_ = null; - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { - - onChanged(); - return getItemFieldBuilder().getBuilder(); - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - if (itemBuilder_ != null) { - return itemBuilder_.getMessageOrBuilder(); - } else { - return item_ == null ? - com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> - getItemFieldBuilder() { - if (itemBuilder_ == null) { - itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( - getItem(), - getParentForChildren(), - isClean()); - item_ = null; - } - return itemBuilder_; - } - - private com.google.privacy.dlp.v2.HybridFindingDetails findingDetails_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridFindingDetails, com.google.privacy.dlp.v2.HybridFindingDetails.Builder, com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder> findingDetailsBuilder_; - /** - *
-     * Supplementary information that will be added to each finding.
-     * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - * @return Whether the findingDetails field is set. - */ - public boolean hasFindingDetails() { - return findingDetailsBuilder_ != null || findingDetails_ != null; - } - /** - *
-     * Supplementary information that will be added to each finding.
-     * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - * @return The findingDetails. - */ - public com.google.privacy.dlp.v2.HybridFindingDetails getFindingDetails() { - if (findingDetailsBuilder_ == null) { - return findingDetails_ == null ? com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance() : findingDetails_; - } else { - return findingDetailsBuilder_.getMessage(); - } - } - /** - *
-     * Supplementary information that will be added to each finding.
-     * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - */ - public Builder setFindingDetails(com.google.privacy.dlp.v2.HybridFindingDetails value) { - if (findingDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - findingDetails_ = value; - onChanged(); - } else { - findingDetailsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Supplementary information that will be added to each finding.
-     * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - */ - public Builder setFindingDetails( - com.google.privacy.dlp.v2.HybridFindingDetails.Builder builderForValue) { - if (findingDetailsBuilder_ == null) { - findingDetails_ = builderForValue.build(); - onChanged(); - } else { - findingDetailsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Supplementary information that will be added to each finding.
-     * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - */ - public Builder mergeFindingDetails(com.google.privacy.dlp.v2.HybridFindingDetails value) { - if (findingDetailsBuilder_ == null) { - if (findingDetails_ != null) { - findingDetails_ = - com.google.privacy.dlp.v2.HybridFindingDetails.newBuilder(findingDetails_).mergeFrom(value).buildPartial(); - } else { - findingDetails_ = value; - } - onChanged(); - } else { - findingDetailsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Supplementary information that will be added to each finding.
-     * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - */ - public Builder clearFindingDetails() { - if (findingDetailsBuilder_ == null) { - findingDetails_ = null; - onChanged(); - } else { - findingDetails_ = null; - findingDetailsBuilder_ = null; - } - - return this; - } - /** - *
-     * Supplementary information that will be added to each finding.
-     * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - */ - public com.google.privacy.dlp.v2.HybridFindingDetails.Builder getFindingDetailsBuilder() { - - onChanged(); - return getFindingDetailsFieldBuilder().getBuilder(); - } - /** - *
-     * Supplementary information that will be added to each finding.
-     * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - */ - public com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder getFindingDetailsOrBuilder() { - if (findingDetailsBuilder_ != null) { - return findingDetailsBuilder_.getMessageOrBuilder(); - } else { - return findingDetails_ == null ? - com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance() : findingDetails_; - } - } - /** - *
-     * Supplementary information that will be added to each finding.
-     * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridFindingDetails, com.google.privacy.dlp.v2.HybridFindingDetails.Builder, com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder> - getFindingDetailsFieldBuilder() { - if (findingDetailsBuilder_ == null) { - findingDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridFindingDetails, com.google.privacy.dlp.v2.HybridFindingDetails.Builder, com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder>( - getFindingDetails(), - getParentForChildren(), - isClean()); - findingDetails_ = null; - } - return findingDetailsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridContentItem) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridContentItem) - private static final com.google.privacy.dlp.v2.HybridContentItem DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridContentItem(); - } - - public static com.google.privacy.dlp.v2.HybridContentItem getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HybridContentItem parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HybridContentItem(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridContentItem getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItemOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItemOrBuilder.java deleted file mode 100644 index d7f55d6afcce..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridContentItemOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface HybridContentItemOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridContentItem) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return Whether the item field is set. - */ - boolean hasItem(); - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return The item. - */ - com.google.privacy.dlp.v2.ContentItem getItem(); - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); - - /** - *
-   * Supplementary information that will be added to each finding.
-   * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - * @return Whether the findingDetails field is set. - */ - boolean hasFindingDetails(); - /** - *
-   * Supplementary information that will be added to each finding.
-   * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - * @return The findingDetails. - */ - com.google.privacy.dlp.v2.HybridFindingDetails getFindingDetails(); - /** - *
-   * Supplementary information that will be added to each finding.
-   * 
- * - * .google.privacy.dlp.v2.HybridFindingDetails finding_details = 2; - */ - com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder getFindingDetailsOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetails.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetails.java deleted file mode 100644 index 9e665c477c15..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetails.java +++ /dev/null @@ -1,1585 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Populate to associate additional data with each finding.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridFindingDetails} - */ -public final class HybridFindingDetails extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridFindingDetails) - HybridFindingDetailsOrBuilder { -private static final long serialVersionUID = 0L; - // Use HybridFindingDetails.newBuilder() to construct. - private HybridFindingDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HybridFindingDetails() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HybridFindingDetails(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HybridFindingDetails( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Container.Builder subBuilder = null; - if (containerDetails_ != null) { - subBuilder = containerDetails_.toBuilder(); - } - containerDetails_ = input.readMessage(com.google.privacy.dlp.v2.Container.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(containerDetails_); - containerDetails_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - fileOffset_ = input.readInt64(); - break; - } - case 24: { - - rowOffset_ = input.readInt64(); - break; - } - case 34: { - com.google.privacy.dlp.v2.TableOptions.Builder subBuilder = null; - if (tableOptions_ != null) { - subBuilder = tableOptions_.toBuilder(); - } - tableOptions_ = input.readMessage(com.google.privacy.dlp.v2.TableOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tableOptions_); - tableOptions_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridFindingDetails.class, com.google.privacy.dlp.v2.HybridFindingDetails.Builder.class); - } - - public static final int CONTAINER_DETAILS_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.Container containerDetails_; - /** - *
-   * Details about the container where the content being inspected is from.
-   * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - * @return Whether the containerDetails field is set. - */ - @java.lang.Override - public boolean hasContainerDetails() { - return containerDetails_ != null; - } - /** - *
-   * Details about the container where the content being inspected is from.
-   * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - * @return The containerDetails. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Container getContainerDetails() { - return containerDetails_ == null ? com.google.privacy.dlp.v2.Container.getDefaultInstance() : containerDetails_; - } - /** - *
-   * Details about the container where the content being inspected is from.
-   * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerDetailsOrBuilder() { - return getContainerDetails(); - } - - public static final int FILE_OFFSET_FIELD_NUMBER = 2; - private long fileOffset_; - /** - *
-   * Offset in bytes of the line, from the beginning of the file, where the
-   * finding  is located. Populate if the item being scanned is only part of a
-   * bigger item, such as a shard of a file and you want to track the absolute
-   * position of the finding.
-   * 
- * - * int64 file_offset = 2; - * @return The fileOffset. - */ - @java.lang.Override - public long getFileOffset() { - return fileOffset_; - } - - public static final int ROW_OFFSET_FIELD_NUMBER = 3; - private long rowOffset_; - /** - *
-   * Offset of the row for tables. Populate if the row(s) being scanned are
-   * part of a bigger dataset and you want to keep track of their absolute
-   * position.
-   * 
- * - * int64 row_offset = 3; - * @return The rowOffset. - */ - @java.lang.Override - public long getRowOffset() { - return rowOffset_; - } - - public static final int TABLE_OPTIONS_FIELD_NUMBER = 4; - private com.google.privacy.dlp.v2.TableOptions tableOptions_; - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys. If not known ahead
-   * of time, can also be set within each inspect hybrid call and the two
-   * will be merged. Note that identifying_fields will only be stored to
-   * BigQuery, and only if the BigQuery action has been included.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return Whether the tableOptions field is set. - */ - @java.lang.Override - public boolean hasTableOptions() { - return tableOptions_ != null; - } - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys. If not known ahead
-   * of time, can also be set within each inspect hybrid call and the two
-   * will be merged. Note that identifying_fields will only be stored to
-   * BigQuery, and only if the BigQuery action has been included.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return The tableOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableOptions getTableOptions() { - return tableOptions_ == null ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; - } - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys. If not known ahead
-   * of time, can also be set within each inspect hybrid call and the two
-   * will be merged. Note that identifying_fields will only be stored to
-   * BigQuery, and only if the BigQuery action has been included.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() { - return getTableOptions(); - } - - public static final int LABELS_FIELD_NUMBER = 5; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels to represent user provided metadata about the data being inspected.
-   * If configured by the job, some key values may be required.
-   * The labels associated with `Finding`'s produced by hybrid
-   * inspection.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 5; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels to represent user provided metadata about the data being inspected.
-   * If configured by the job, some key values may be required.
-   * The labels associated with `Finding`'s produced by hybrid
-   * inspection.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels to represent user provided metadata about the data being inspected.
-   * If configured by the job, some key values may be required.
-   * The labels associated with `Finding`'s produced by hybrid
-   * inspection.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels to represent user provided metadata about the data being inspected.
-   * If configured by the job, some key values may be required.
-   * The labels associated with `Finding`'s produced by hybrid
-   * inspection.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (containerDetails_ != null) { - output.writeMessage(1, getContainerDetails()); - } - if (fileOffset_ != 0L) { - output.writeInt64(2, fileOffset_); - } - if (rowOffset_ != 0L) { - output.writeInt64(3, rowOffset_); - } - if (tableOptions_ != null) { - output.writeMessage(4, getTableOptions()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 5); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (containerDetails_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getContainerDetails()); - } - if (fileOffset_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, fileOffset_); - } - if (rowOffset_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, rowOffset_); - } - if (tableOptions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getTableOptions()); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, labels__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.HybridFindingDetails)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.HybridFindingDetails other = (com.google.privacy.dlp.v2.HybridFindingDetails) obj; - - if (hasContainerDetails() != other.hasContainerDetails()) return false; - if (hasContainerDetails()) { - if (!getContainerDetails() - .equals(other.getContainerDetails())) return false; - } - if (getFileOffset() - != other.getFileOffset()) return false; - if (getRowOffset() - != other.getRowOffset()) return false; - if (hasTableOptions() != other.hasTableOptions()) return false; - if (hasTableOptions()) { - if (!getTableOptions() - .equals(other.getTableOptions())) return false; - } - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasContainerDetails()) { - hash = (37 * hash) + CONTAINER_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getContainerDetails().hashCode(); - } - hash = (37 * hash) + FILE_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFileOffset()); - hash = (37 * hash) + ROW_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getRowOffset()); - if (hasTableOptions()) { - hash = (37 * hash) + TABLE_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getTableOptions().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridFindingDetails parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.HybridFindingDetails prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Populate to associate additional data with each finding.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridFindingDetails} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridFindingDetails) - com.google.privacy.dlp.v2.HybridFindingDetailsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 5: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 5: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridFindingDetails.class, com.google.privacy.dlp.v2.HybridFindingDetails.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.HybridFindingDetails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (containerDetailsBuilder_ == null) { - containerDetails_ = null; - } else { - containerDetails_ = null; - containerDetailsBuilder_ = null; - } - fileOffset_ = 0L; - - rowOffset_ = 0L; - - if (tableOptionsBuilder_ == null) { - tableOptions_ = null; - } else { - tableOptions_ = null; - tableOptionsBuilder_ = null; - } - internalGetMutableLabels().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridFindingDetails_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridFindingDetails getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridFindingDetails build() { - com.google.privacy.dlp.v2.HybridFindingDetails result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridFindingDetails buildPartial() { - com.google.privacy.dlp.v2.HybridFindingDetails result = new com.google.privacy.dlp.v2.HybridFindingDetails(this); - int from_bitField0_ = bitField0_; - if (containerDetailsBuilder_ == null) { - result.containerDetails_ = containerDetails_; - } else { - result.containerDetails_ = containerDetailsBuilder_.build(); - } - result.fileOffset_ = fileOffset_; - result.rowOffset_ = rowOffset_; - if (tableOptionsBuilder_ == null) { - result.tableOptions_ = tableOptions_; - } else { - result.tableOptions_ = tableOptionsBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.HybridFindingDetails) { - return mergeFrom((com.google.privacy.dlp.v2.HybridFindingDetails)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.HybridFindingDetails other) { - if (other == com.google.privacy.dlp.v2.HybridFindingDetails.getDefaultInstance()) return this; - if (other.hasContainerDetails()) { - mergeContainerDetails(other.getContainerDetails()); - } - if (other.getFileOffset() != 0L) { - setFileOffset(other.getFileOffset()); - } - if (other.getRowOffset() != 0L) { - setRowOffset(other.getRowOffset()); - } - if (other.hasTableOptions()) { - mergeTableOptions(other.getTableOptions()); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.HybridFindingDetails parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.HybridFindingDetails) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.Container containerDetails_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder> containerDetailsBuilder_; - /** - *
-     * Details about the container where the content being inspected is from.
-     * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - * @return Whether the containerDetails field is set. - */ - public boolean hasContainerDetails() { - return containerDetailsBuilder_ != null || containerDetails_ != null; - } - /** - *
-     * Details about the container where the content being inspected is from.
-     * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - * @return The containerDetails. - */ - public com.google.privacy.dlp.v2.Container getContainerDetails() { - if (containerDetailsBuilder_ == null) { - return containerDetails_ == null ? com.google.privacy.dlp.v2.Container.getDefaultInstance() : containerDetails_; - } else { - return containerDetailsBuilder_.getMessage(); - } - } - /** - *
-     * Details about the container where the content being inspected is from.
-     * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - */ - public Builder setContainerDetails(com.google.privacy.dlp.v2.Container value) { - if (containerDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - containerDetails_ = value; - onChanged(); - } else { - containerDetailsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Details about the container where the content being inspected is from.
-     * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - */ - public Builder setContainerDetails( - com.google.privacy.dlp.v2.Container.Builder builderForValue) { - if (containerDetailsBuilder_ == null) { - containerDetails_ = builderForValue.build(); - onChanged(); - } else { - containerDetailsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Details about the container where the content being inspected is from.
-     * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - */ - public Builder mergeContainerDetails(com.google.privacy.dlp.v2.Container value) { - if (containerDetailsBuilder_ == null) { - if (containerDetails_ != null) { - containerDetails_ = - com.google.privacy.dlp.v2.Container.newBuilder(containerDetails_).mergeFrom(value).buildPartial(); - } else { - containerDetails_ = value; - } - onChanged(); - } else { - containerDetailsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Details about the container where the content being inspected is from.
-     * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - */ - public Builder clearContainerDetails() { - if (containerDetailsBuilder_ == null) { - containerDetails_ = null; - onChanged(); - } else { - containerDetails_ = null; - containerDetailsBuilder_ = null; - } - - return this; - } - /** - *
-     * Details about the container where the content being inspected is from.
-     * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - */ - public com.google.privacy.dlp.v2.Container.Builder getContainerDetailsBuilder() { - - onChanged(); - return getContainerDetailsFieldBuilder().getBuilder(); - } - /** - *
-     * Details about the container where the content being inspected is from.
-     * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - */ - public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerDetailsOrBuilder() { - if (containerDetailsBuilder_ != null) { - return containerDetailsBuilder_.getMessageOrBuilder(); - } else { - return containerDetails_ == null ? - com.google.privacy.dlp.v2.Container.getDefaultInstance() : containerDetails_; - } - } - /** - *
-     * Details about the container where the content being inspected is from.
-     * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder> - getContainerDetailsFieldBuilder() { - if (containerDetailsBuilder_ == null) { - containerDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder>( - getContainerDetails(), - getParentForChildren(), - isClean()); - containerDetails_ = null; - } - return containerDetailsBuilder_; - } - - private long fileOffset_ ; - /** - *
-     * Offset in bytes of the line, from the beginning of the file, where the
-     * finding  is located. Populate if the item being scanned is only part of a
-     * bigger item, such as a shard of a file and you want to track the absolute
-     * position of the finding.
-     * 
- * - * int64 file_offset = 2; - * @return The fileOffset. - */ - @java.lang.Override - public long getFileOffset() { - return fileOffset_; - } - /** - *
-     * Offset in bytes of the line, from the beginning of the file, where the
-     * finding  is located. Populate if the item being scanned is only part of a
-     * bigger item, such as a shard of a file and you want to track the absolute
-     * position of the finding.
-     * 
- * - * int64 file_offset = 2; - * @param value The fileOffset to set. - * @return This builder for chaining. - */ - public Builder setFileOffset(long value) { - - fileOffset_ = value; - onChanged(); - return this; - } - /** - *
-     * Offset in bytes of the line, from the beginning of the file, where the
-     * finding  is located. Populate if the item being scanned is only part of a
-     * bigger item, such as a shard of a file and you want to track the absolute
-     * position of the finding.
-     * 
- * - * int64 file_offset = 2; - * @return This builder for chaining. - */ - public Builder clearFileOffset() { - - fileOffset_ = 0L; - onChanged(); - return this; - } - - private long rowOffset_ ; - /** - *
-     * Offset of the row for tables. Populate if the row(s) being scanned are
-     * part of a bigger dataset and you want to keep track of their absolute
-     * position.
-     * 
- * - * int64 row_offset = 3; - * @return The rowOffset. - */ - @java.lang.Override - public long getRowOffset() { - return rowOffset_; - } - /** - *
-     * Offset of the row for tables. Populate if the row(s) being scanned are
-     * part of a bigger dataset and you want to keep track of their absolute
-     * position.
-     * 
- * - * int64 row_offset = 3; - * @param value The rowOffset to set. - * @return This builder for chaining. - */ - public Builder setRowOffset(long value) { - - rowOffset_ = value; - onChanged(); - return this; - } - /** - *
-     * Offset of the row for tables. Populate if the row(s) being scanned are
-     * part of a bigger dataset and you want to keep track of their absolute
-     * position.
-     * 
- * - * int64 row_offset = 3; - * @return This builder for chaining. - */ - public Builder clearRowOffset() { - - rowOffset_ = 0L; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.TableOptions tableOptions_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder> tableOptionsBuilder_; - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys. If not known ahead
-     * of time, can also be set within each inspect hybrid call and the two
-     * will be merged. Note that identifying_fields will only be stored to
-     * BigQuery, and only if the BigQuery action has been included.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return Whether the tableOptions field is set. - */ - public boolean hasTableOptions() { - return tableOptionsBuilder_ != null || tableOptions_ != null; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys. If not known ahead
-     * of time, can also be set within each inspect hybrid call and the two
-     * will be merged. Note that identifying_fields will only be stored to
-     * BigQuery, and only if the BigQuery action has been included.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return The tableOptions. - */ - public com.google.privacy.dlp.v2.TableOptions getTableOptions() { - if (tableOptionsBuilder_ == null) { - return tableOptions_ == null ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; - } else { - return tableOptionsBuilder_.getMessage(); - } - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys. If not known ahead
-     * of time, can also be set within each inspect hybrid call and the two
-     * will be merged. Note that identifying_fields will only be stored to
-     * BigQuery, and only if the BigQuery action has been included.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public Builder setTableOptions(com.google.privacy.dlp.v2.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableOptions_ = value; - onChanged(); - } else { - tableOptionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys. If not known ahead
-     * of time, can also be set within each inspect hybrid call and the two
-     * will be merged. Note that identifying_fields will only be stored to
-     * BigQuery, and only if the BigQuery action has been included.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public Builder setTableOptions( - com.google.privacy.dlp.v2.TableOptions.Builder builderForValue) { - if (tableOptionsBuilder_ == null) { - tableOptions_ = builderForValue.build(); - onChanged(); - } else { - tableOptionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys. If not known ahead
-     * of time, can also be set within each inspect hybrid call and the two
-     * will be merged. Note that identifying_fields will only be stored to
-     * BigQuery, and only if the BigQuery action has been included.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public Builder mergeTableOptions(com.google.privacy.dlp.v2.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (tableOptions_ != null) { - tableOptions_ = - com.google.privacy.dlp.v2.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); - } else { - tableOptions_ = value; - } - onChanged(); - } else { - tableOptionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys. If not known ahead
-     * of time, can also be set within each inspect hybrid call and the two
-     * will be merged. Note that identifying_fields will only be stored to
-     * BigQuery, and only if the BigQuery action has been included.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public Builder clearTableOptions() { - if (tableOptionsBuilder_ == null) { - tableOptions_ = null; - onChanged(); - } else { - tableOptions_ = null; - tableOptionsBuilder_ = null; - } - - return this; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys. If not known ahead
-     * of time, can also be set within each inspect hybrid call and the two
-     * will be merged. Note that identifying_fields will only be stored to
-     * BigQuery, and only if the BigQuery action has been included.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public com.google.privacy.dlp.v2.TableOptions.Builder getTableOptionsBuilder() { - - onChanged(); - return getTableOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys. If not known ahead
-     * of time, can also be set within each inspect hybrid call and the two
-     * will be merged. Note that identifying_fields will only be stored to
-     * BigQuery, and only if the BigQuery action has been included.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() { - if (tableOptionsBuilder_ != null) { - return tableOptionsBuilder_.getMessageOrBuilder(); - } else { - return tableOptions_ == null ? - com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; - } - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys. If not known ahead
-     * of time, can also be set within each inspect hybrid call and the two
-     * will be merged. Note that identifying_fields will only be stored to
-     * BigQuery, and only if the BigQuery action has been included.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder> - getTableOptionsFieldBuilder() { - if (tableOptionsBuilder_ == null) { - tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder>( - getTableOptions(), - getParentForChildren(), - isClean()); - tableOptions_ = null; - } - return tableOptionsBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels to represent user provided metadata about the data being inspected.
-     * If configured by the job, some key values may be required.
-     * The labels associated with `Finding`'s produced by hybrid
-     * inspection.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 5; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels to represent user provided metadata about the data being inspected.
-     * If configured by the job, some key values may be required.
-     * The labels associated with `Finding`'s produced by hybrid
-     * inspection.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels to represent user provided metadata about the data being inspected.
-     * If configured by the job, some key values may be required.
-     * The labels associated with `Finding`'s produced by hybrid
-     * inspection.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels to represent user provided metadata about the data being inspected.
-     * If configured by the job, some key values may be required.
-     * The labels associated with `Finding`'s produced by hybrid
-     * inspection.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 5; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels to represent user provided metadata about the data being inspected.
-     * If configured by the job, some key values may be required.
-     * The labels associated with `Finding`'s produced by hybrid
-     * inspection.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 5; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels to represent user provided metadata about the data being inspected.
-     * If configured by the job, some key values may be required.
-     * The labels associated with `Finding`'s produced by hybrid
-     * inspection.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 5; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Labels to represent user provided metadata about the data being inspected.
-     * If configured by the job, some key values may be required.
-     * The labels associated with `Finding`'s produced by hybrid
-     * inspection.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 5; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridFindingDetails) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridFindingDetails) - private static final com.google.privacy.dlp.v2.HybridFindingDetails DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridFindingDetails(); - } - - public static com.google.privacy.dlp.v2.HybridFindingDetails getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HybridFindingDetails parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HybridFindingDetails(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridFindingDetails getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetailsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetailsOrBuilder.java deleted file mode 100644 index 9bd710ab36ec..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridFindingDetailsOrBuilder.java +++ /dev/null @@ -1,211 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface HybridFindingDetailsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridFindingDetails) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Details about the container where the content being inspected is from.
-   * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - * @return Whether the containerDetails field is set. - */ - boolean hasContainerDetails(); - /** - *
-   * Details about the container where the content being inspected is from.
-   * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - * @return The containerDetails. - */ - com.google.privacy.dlp.v2.Container getContainerDetails(); - /** - *
-   * Details about the container where the content being inspected is from.
-   * 
- * - * .google.privacy.dlp.v2.Container container_details = 1; - */ - com.google.privacy.dlp.v2.ContainerOrBuilder getContainerDetailsOrBuilder(); - - /** - *
-   * Offset in bytes of the line, from the beginning of the file, where the
-   * finding  is located. Populate if the item being scanned is only part of a
-   * bigger item, such as a shard of a file and you want to track the absolute
-   * position of the finding.
-   * 
- * - * int64 file_offset = 2; - * @return The fileOffset. - */ - long getFileOffset(); - - /** - *
-   * Offset of the row for tables. Populate if the row(s) being scanned are
-   * part of a bigger dataset and you want to keep track of their absolute
-   * position.
-   * 
- * - * int64 row_offset = 3; - * @return The rowOffset. - */ - long getRowOffset(); - - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys. If not known ahead
-   * of time, can also be set within each inspect hybrid call and the two
-   * will be merged. Note that identifying_fields will only be stored to
-   * BigQuery, and only if the BigQuery action has been included.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return Whether the tableOptions field is set. - */ - boolean hasTableOptions(); - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys. If not known ahead
-   * of time, can also be set within each inspect hybrid call and the two
-   * will be merged. Note that identifying_fields will only be stored to
-   * BigQuery, and only if the BigQuery action has been included.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return The tableOptions. - */ - com.google.privacy.dlp.v2.TableOptions getTableOptions(); - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys. If not known ahead
-   * of time, can also be set within each inspect hybrid call and the two
-   * will be merged. Note that identifying_fields will only be stored to
-   * BigQuery, and only if the BigQuery action has been included.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder(); - - /** - *
-   * Labels to represent user provided metadata about the data being inspected.
-   * If configured by the job, some key values may be required.
-   * The labels associated with `Finding`'s produced by hybrid
-   * inspection.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 5; - */ - int getLabelsCount(); - /** - *
-   * Labels to represent user provided metadata about the data being inspected.
-   * If configured by the job, some key values may be required.
-   * The labels associated with `Finding`'s produced by hybrid
-   * inspection.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 5; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels to represent user provided metadata about the data being inspected.
-   * If configured by the job, some key values may be required.
-   * The labels associated with `Finding`'s produced by hybrid
-   * inspection.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 5; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels to represent user provided metadata about the data being inspected.
-   * If configured by the job, some key values may be required.
-   * The labels associated with `Finding`'s produced by hybrid
-   * inspection.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 5; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels to represent user provided metadata about the data being inspected.
-   * If configured by the job, some key values may be required.
-   * The labels associated with `Finding`'s produced by hybrid
-   * inspection.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 5; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java deleted file mode 100644 index 06c3862f29dc..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequest.java +++ /dev/null @@ -1,838 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request to search for potentially sensitive info in a custom location.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridInspectDlpJobRequest} - */ -public final class HybridInspectDlpJobRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridInspectDlpJobRequest) - HybridInspectDlpJobRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use HybridInspectDlpJobRequest.newBuilder() to construct. - private HybridInspectDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HybridInspectDlpJobRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HybridInspectDlpJobRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HybridInspectDlpJobRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: { - com.google.privacy.dlp.v2.HybridContentItem.Builder subBuilder = null; - if (hybridItem_ != null) { - subBuilder = hybridItem_.toBuilder(); - } - hybridItem_ = input.readMessage(com.google.privacy.dlp.v2.HybridContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hybridItem_); - hybridItem_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.class, com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the job to execute a hybrid inspect on, for example
-   * `projects/dlp-test-project/dlpJob/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the job to execute a hybrid inspect on, for example
-   * `projects/dlp-test-project/dlpJob/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HYBRID_ITEM_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.HybridContentItem hybridItem_; - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return Whether the hybridItem field is set. - */ - @java.lang.Override - public boolean hasHybridItem() { - return hybridItem_ != null; - } - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return The hybridItem. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridContentItem getHybridItem() { - return hybridItem_ == null ? com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; - } - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder() { - return getHybridItem(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (hybridItem_ != null) { - output.writeMessage(3, getHybridItem()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (hybridItem_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getHybridItem()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.HybridInspectDlpJobRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.HybridInspectDlpJobRequest other = (com.google.privacy.dlp.v2.HybridInspectDlpJobRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasHybridItem() != other.hasHybridItem()) return false; - if (hasHybridItem()) { - if (!getHybridItem() - .equals(other.getHybridItem())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasHybridItem()) { - hash = (37 * hash) + HYBRID_ITEM_FIELD_NUMBER; - hash = (53 * hash) + getHybridItem().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to search for potentially sensitive info in a custom location.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridInspectDlpJobRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridInspectDlpJobRequest) - com.google.privacy.dlp.v2.HybridInspectDlpJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.class, com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (hybridItemBuilder_ == null) { - hybridItem_ = null; - } else { - hybridItem_ = null; - hybridItemBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectDlpJobRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectDlpJobRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectDlpJobRequest build() { - com.google.privacy.dlp.v2.HybridInspectDlpJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectDlpJobRequest buildPartial() { - com.google.privacy.dlp.v2.HybridInspectDlpJobRequest result = new com.google.privacy.dlp.v2.HybridInspectDlpJobRequest(this); - result.name_ = name_; - if (hybridItemBuilder_ == null) { - result.hybridItem_ = hybridItem_; - } else { - result.hybridItem_ = hybridItemBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.HybridInspectDlpJobRequest) { - return mergeFrom((com.google.privacy.dlp.v2.HybridInspectDlpJobRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.HybridInspectDlpJobRequest other) { - if (other == com.google.privacy.dlp.v2.HybridInspectDlpJobRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasHybridItem()) { - mergeHybridItem(other.getHybridItem()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.HybridInspectDlpJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.HybridInspectDlpJobRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the job to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/dlpJob/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the job to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/dlpJob/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the job to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/dlpJob/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the job to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/dlpJob/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the job to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/dlpJob/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.HybridContentItem hybridItem_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder> hybridItemBuilder_; - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return Whether the hybridItem field is set. - */ - public boolean hasHybridItem() { - return hybridItemBuilder_ != null || hybridItem_ != null; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return The hybridItem. - */ - public com.google.privacy.dlp.v2.HybridContentItem getHybridItem() { - if (hybridItemBuilder_ == null) { - return hybridItem_ == null ? com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; - } else { - return hybridItemBuilder_.getMessage(); - } - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public Builder setHybridItem(com.google.privacy.dlp.v2.HybridContentItem value) { - if (hybridItemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hybridItem_ = value; - onChanged(); - } else { - hybridItemBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public Builder setHybridItem( - com.google.privacy.dlp.v2.HybridContentItem.Builder builderForValue) { - if (hybridItemBuilder_ == null) { - hybridItem_ = builderForValue.build(); - onChanged(); - } else { - hybridItemBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public Builder mergeHybridItem(com.google.privacy.dlp.v2.HybridContentItem value) { - if (hybridItemBuilder_ == null) { - if (hybridItem_ != null) { - hybridItem_ = - com.google.privacy.dlp.v2.HybridContentItem.newBuilder(hybridItem_).mergeFrom(value).buildPartial(); - } else { - hybridItem_ = value; - } - onChanged(); - } else { - hybridItemBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public Builder clearHybridItem() { - if (hybridItemBuilder_ == null) { - hybridItem_ = null; - onChanged(); - } else { - hybridItem_ = null; - hybridItemBuilder_ = null; - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public com.google.privacy.dlp.v2.HybridContentItem.Builder getHybridItemBuilder() { - - onChanged(); - return getHybridItemFieldBuilder().getBuilder(); - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder() { - if (hybridItemBuilder_ != null) { - return hybridItemBuilder_.getMessageOrBuilder(); - } else { - return hybridItem_ == null ? - com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; - } - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder> - getHybridItemFieldBuilder() { - if (hybridItemBuilder_ == null) { - hybridItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder>( - getHybridItem(), - getParentForChildren(), - isClean()); - hybridItem_ = null; - } - return hybridItemBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridInspectDlpJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridInspectDlpJobRequest) - private static final com.google.privacy.dlp.v2.HybridInspectDlpJobRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridInspectDlpJobRequest(); - } - - public static com.google.privacy.dlp.v2.HybridInspectDlpJobRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HybridInspectDlpJobRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HybridInspectDlpJobRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectDlpJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java deleted file mode 100644 index e22ca794074b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectDlpJobRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface HybridInspectDlpJobRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridInspectDlpJobRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the job to execute a hybrid inspect on, for example
-   * `projects/dlp-test-project/dlpJob/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the job to execute a hybrid inspect on, for example
-   * `projects/dlp-test-project/dlpJob/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return Whether the hybridItem field is set. - */ - boolean hasHybridItem(); - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return The hybridItem. - */ - com.google.privacy.dlp.v2.HybridContentItem getHybridItem(); - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java deleted file mode 100644 index 213baaed24f6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequest.java +++ /dev/null @@ -1,838 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request to search for potentially sensitive info in a custom location.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridInspectJobTriggerRequest} - */ -public final class HybridInspectJobTriggerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) - HybridInspectJobTriggerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use HybridInspectJobTriggerRequest.newBuilder() to construct. - private HybridInspectJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HybridInspectJobTriggerRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HybridInspectJobTriggerRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HybridInspectJobTriggerRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: { - com.google.privacy.dlp.v2.HybridContentItem.Builder subBuilder = null; - if (hybridItem_ != null) { - subBuilder = hybridItem_.toBuilder(); - } - hybridItem_ = input.readMessage(com.google.privacy.dlp.v2.HybridContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hybridItem_); - hybridItem_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.class, com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the trigger to execute a hybrid inspect on, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the trigger to execute a hybrid inspect on, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HYBRID_ITEM_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.HybridContentItem hybridItem_; - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return Whether the hybridItem field is set. - */ - @java.lang.Override - public boolean hasHybridItem() { - return hybridItem_ != null; - } - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return The hybridItem. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridContentItem getHybridItem() { - return hybridItem_ == null ? com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; - } - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder() { - return getHybridItem(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (hybridItem_ != null) { - output.writeMessage(3, getHybridItem()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (hybridItem_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getHybridItem()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest other = (com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasHybridItem() != other.hasHybridItem()) return false; - if (hasHybridItem()) { - if (!getHybridItem() - .equals(other.getHybridItem())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasHybridItem()) { - hash = (37 * hash) + HYBRID_ITEM_FIELD_NUMBER; - hash = (53 * hash) + getHybridItem().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to search for potentially sensitive info in a custom location.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridInspectJobTriggerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.class, com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (hybridItemBuilder_ == null) { - hybridItem_ = null; - } else { - hybridItem_ = null; - hybridItemBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectJobTriggerRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest build() { - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest buildPartial() { - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest result = new com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(this); - result.name_ = name_; - if (hybridItemBuilder_ == null) { - result.hybridItem_ = hybridItem_; - } else { - result.hybridItem_ = hybridItemBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) { - return mergeFrom((com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest other) { - if (other == com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasHybridItem()) { - mergeHybridItem(other.getHybridItem()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the trigger to execute a hybrid inspect on, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.HybridContentItem hybridItem_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder> hybridItemBuilder_; - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return Whether the hybridItem field is set. - */ - public boolean hasHybridItem() { - return hybridItemBuilder_ != null || hybridItem_ != null; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return The hybridItem. - */ - public com.google.privacy.dlp.v2.HybridContentItem getHybridItem() { - if (hybridItemBuilder_ == null) { - return hybridItem_ == null ? com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; - } else { - return hybridItemBuilder_.getMessage(); - } - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public Builder setHybridItem(com.google.privacy.dlp.v2.HybridContentItem value) { - if (hybridItemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hybridItem_ = value; - onChanged(); - } else { - hybridItemBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public Builder setHybridItem( - com.google.privacy.dlp.v2.HybridContentItem.Builder builderForValue) { - if (hybridItemBuilder_ == null) { - hybridItem_ = builderForValue.build(); - onChanged(); - } else { - hybridItemBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public Builder mergeHybridItem(com.google.privacy.dlp.v2.HybridContentItem value) { - if (hybridItemBuilder_ == null) { - if (hybridItem_ != null) { - hybridItem_ = - com.google.privacy.dlp.v2.HybridContentItem.newBuilder(hybridItem_).mergeFrom(value).buildPartial(); - } else { - hybridItem_ = value; - } - onChanged(); - } else { - hybridItemBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public Builder clearHybridItem() { - if (hybridItemBuilder_ == null) { - hybridItem_ = null; - onChanged(); - } else { - hybridItem_ = null; - hybridItemBuilder_ = null; - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public com.google.privacy.dlp.v2.HybridContentItem.Builder getHybridItemBuilder() { - - onChanged(); - return getHybridItemFieldBuilder().getBuilder(); - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - public com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder() { - if (hybridItemBuilder_ != null) { - return hybridItemBuilder_.getMessageOrBuilder(); - } else { - return hybridItem_ == null ? - com.google.privacy.dlp.v2.HybridContentItem.getDefaultInstance() : hybridItem_; - } - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder> - getHybridItemFieldBuilder() { - if (hybridItemBuilder_ == null) { - hybridItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridContentItem, com.google.privacy.dlp.v2.HybridContentItem.Builder, com.google.privacy.dlp.v2.HybridContentItemOrBuilder>( - getHybridItem(), - getParentForChildren(), - isClean()); - hybridItem_ = null; - } - return hybridItemBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) - private static final com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(); - } - - public static com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HybridInspectJobTriggerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HybridInspectJobTriggerRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java deleted file mode 100644 index 819775dc90bc..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectJobTriggerRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface HybridInspectJobTriggerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridInspectJobTriggerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the trigger to execute a hybrid inspect on, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the trigger to execute a hybrid inspect on, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return Whether the hybridItem field is set. - */ - boolean hasHybridItem(); - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - * @return The hybridItem. - */ - com.google.privacy.dlp.v2.HybridContentItem getHybridItem(); - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.HybridContentItem hybrid_item = 3; - */ - com.google.privacy.dlp.v2.HybridContentItemOrBuilder getHybridItemOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponse.java deleted file mode 100644 index 3f470a7b01da..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponse.java +++ /dev/null @@ -1,429 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Quota exceeded errors will be thrown once quota has been met.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridInspectResponse} - */ -public final class HybridInspectResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridInspectResponse) - HybridInspectResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use HybridInspectResponse.newBuilder() to construct. - private HybridInspectResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HybridInspectResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HybridInspectResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HybridInspectResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridInspectResponse.class, com.google.privacy.dlp.v2.HybridInspectResponse.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.HybridInspectResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.HybridInspectResponse other = (com.google.privacy.dlp.v2.HybridInspectResponse) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.HybridInspectResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Quota exceeded errors will be thrown once quota has been met.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridInspectResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridInspectResponse) - com.google.privacy.dlp.v2.HybridInspectResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridInspectResponse.class, com.google.privacy.dlp.v2.HybridInspectResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.HybridInspectResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.HybridInspectResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectResponse build() { - com.google.privacy.dlp.v2.HybridInspectResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectResponse buildPartial() { - com.google.privacy.dlp.v2.HybridInspectResponse result = new com.google.privacy.dlp.v2.HybridInspectResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.HybridInspectResponse) { - return mergeFrom((com.google.privacy.dlp.v2.HybridInspectResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.HybridInspectResponse other) { - if (other == com.google.privacy.dlp.v2.HybridInspectResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.HybridInspectResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.HybridInspectResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridInspectResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridInspectResponse) - private static final com.google.privacy.dlp.v2.HybridInspectResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridInspectResponse(); - } - - public static com.google.privacy.dlp.v2.HybridInspectResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HybridInspectResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HybridInspectResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponseOrBuilder.java deleted file mode 100644 index 11529960a80e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectResponseOrBuilder.java +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface HybridInspectResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridInspectResponse) - com.google.protobuf.MessageOrBuilder { -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java deleted file mode 100644 index 5fa5a6050edc..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatistics.java +++ /dev/null @@ -1,692 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Statistics related to processing hybrid inspect requests.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridInspectStatistics} - */ -public final class HybridInspectStatistics extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridInspectStatistics) - HybridInspectStatisticsOrBuilder { -private static final long serialVersionUID = 0L; - // Use HybridInspectStatistics.newBuilder() to construct. - private HybridInspectStatistics(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HybridInspectStatistics() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HybridInspectStatistics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HybridInspectStatistics( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - processedCount_ = input.readInt64(); - break; - } - case 16: { - - abortedCount_ = input.readInt64(); - break; - } - case 24: { - - pendingCount_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridInspectStatistics.class, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder.class); - } - - public static final int PROCESSED_COUNT_FIELD_NUMBER = 1; - private long processedCount_; - /** - *
-   * The number of hybrid inspection requests processed within this job.
-   * 
- * - * int64 processed_count = 1; - * @return The processedCount. - */ - @java.lang.Override - public long getProcessedCount() { - return processedCount_; - } - - public static final int ABORTED_COUNT_FIELD_NUMBER = 2; - private long abortedCount_; - /** - *
-   * The number of hybrid inspection requests aborted because the job ran
-   * out of quota or was ended before they could be processed.
-   * 
- * - * int64 aborted_count = 2; - * @return The abortedCount. - */ - @java.lang.Override - public long getAbortedCount() { - return abortedCount_; - } - - public static final int PENDING_COUNT_FIELD_NUMBER = 3; - private long pendingCount_; - /** - *
-   * The number of hybrid requests currently being processed. Only populated
-   * when called via method `getDlpJob`.
-   * A burst of traffic may cause hybrid inspect requests to be enqueued.
-   * Processing will take place as quickly as possible, but resource limitations
-   * may impact how long a request is enqueued for.
-   * 
- * - * int64 pending_count = 3; - * @return The pendingCount. - */ - @java.lang.Override - public long getPendingCount() { - return pendingCount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (processedCount_ != 0L) { - output.writeInt64(1, processedCount_); - } - if (abortedCount_ != 0L) { - output.writeInt64(2, abortedCount_); - } - if (pendingCount_ != 0L) { - output.writeInt64(3, pendingCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (processedCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, processedCount_); - } - if (abortedCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, abortedCount_); - } - if (pendingCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, pendingCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.HybridInspectStatistics)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.HybridInspectStatistics other = (com.google.privacy.dlp.v2.HybridInspectStatistics) obj; - - if (getProcessedCount() - != other.getProcessedCount()) return false; - if (getAbortedCount() - != other.getAbortedCount()) return false; - if (getPendingCount() - != other.getPendingCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROCESSED_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getProcessedCount()); - hash = (37 * hash) + ABORTED_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAbortedCount()); - hash = (37 * hash) + PENDING_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getPendingCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridInspectStatistics parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.HybridInspectStatistics prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Statistics related to processing hybrid inspect requests.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridInspectStatistics} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridInspectStatistics) - com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridInspectStatistics.class, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.HybridInspectStatistics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - processedCount_ = 0L; - - abortedCount_ = 0L; - - pendingCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_HybridInspectStatistics_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectStatistics getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectStatistics build() { - com.google.privacy.dlp.v2.HybridInspectStatistics result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectStatistics buildPartial() { - com.google.privacy.dlp.v2.HybridInspectStatistics result = new com.google.privacy.dlp.v2.HybridInspectStatistics(this); - result.processedCount_ = processedCount_; - result.abortedCount_ = abortedCount_; - result.pendingCount_ = pendingCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.HybridInspectStatistics) { - return mergeFrom((com.google.privacy.dlp.v2.HybridInspectStatistics)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.HybridInspectStatistics other) { - if (other == com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance()) return this; - if (other.getProcessedCount() != 0L) { - setProcessedCount(other.getProcessedCount()); - } - if (other.getAbortedCount() != 0L) { - setAbortedCount(other.getAbortedCount()); - } - if (other.getPendingCount() != 0L) { - setPendingCount(other.getPendingCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.HybridInspectStatistics parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.HybridInspectStatistics) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long processedCount_ ; - /** - *
-     * The number of hybrid inspection requests processed within this job.
-     * 
- * - * int64 processed_count = 1; - * @return The processedCount. - */ - @java.lang.Override - public long getProcessedCount() { - return processedCount_; - } - /** - *
-     * The number of hybrid inspection requests processed within this job.
-     * 
- * - * int64 processed_count = 1; - * @param value The processedCount to set. - * @return This builder for chaining. - */ - public Builder setProcessedCount(long value) { - - processedCount_ = value; - onChanged(); - return this; - } - /** - *
-     * The number of hybrid inspection requests processed within this job.
-     * 
- * - * int64 processed_count = 1; - * @return This builder for chaining. - */ - public Builder clearProcessedCount() { - - processedCount_ = 0L; - onChanged(); - return this; - } - - private long abortedCount_ ; - /** - *
-     * The number of hybrid inspection requests aborted because the job ran
-     * out of quota or was ended before they could be processed.
-     * 
- * - * int64 aborted_count = 2; - * @return The abortedCount. - */ - @java.lang.Override - public long getAbortedCount() { - return abortedCount_; - } - /** - *
-     * The number of hybrid inspection requests aborted because the job ran
-     * out of quota or was ended before they could be processed.
-     * 
- * - * int64 aborted_count = 2; - * @param value The abortedCount to set. - * @return This builder for chaining. - */ - public Builder setAbortedCount(long value) { - - abortedCount_ = value; - onChanged(); - return this; - } - /** - *
-     * The number of hybrid inspection requests aborted because the job ran
-     * out of quota or was ended before they could be processed.
-     * 
- * - * int64 aborted_count = 2; - * @return This builder for chaining. - */ - public Builder clearAbortedCount() { - - abortedCount_ = 0L; - onChanged(); - return this; - } - - private long pendingCount_ ; - /** - *
-     * The number of hybrid requests currently being processed. Only populated
-     * when called via method `getDlpJob`.
-     * A burst of traffic may cause hybrid inspect requests to be enqueued.
-     * Processing will take place as quickly as possible, but resource limitations
-     * may impact how long a request is enqueued for.
-     * 
- * - * int64 pending_count = 3; - * @return The pendingCount. - */ - @java.lang.Override - public long getPendingCount() { - return pendingCount_; - } - /** - *
-     * The number of hybrid requests currently being processed. Only populated
-     * when called via method `getDlpJob`.
-     * A burst of traffic may cause hybrid inspect requests to be enqueued.
-     * Processing will take place as quickly as possible, but resource limitations
-     * may impact how long a request is enqueued for.
-     * 
- * - * int64 pending_count = 3; - * @param value The pendingCount to set. - * @return This builder for chaining. - */ - public Builder setPendingCount(long value) { - - pendingCount_ = value; - onChanged(); - return this; - } - /** - *
-     * The number of hybrid requests currently being processed. Only populated
-     * when called via method `getDlpJob`.
-     * A burst of traffic may cause hybrid inspect requests to be enqueued.
-     * Processing will take place as quickly as possible, but resource limitations
-     * may impact how long a request is enqueued for.
-     * 
- * - * int64 pending_count = 3; - * @return This builder for chaining. - */ - public Builder clearPendingCount() { - - pendingCount_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridInspectStatistics) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridInspectStatistics) - private static final com.google.privacy.dlp.v2.HybridInspectStatistics DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridInspectStatistics(); - } - - public static com.google.privacy.dlp.v2.HybridInspectStatistics getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HybridInspectStatistics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HybridInspectStatistics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectStatistics getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatisticsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatisticsOrBuilder.java deleted file mode 100644 index 4057d7d81567..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridInspectStatisticsOrBuilder.java +++ /dev/null @@ -1,44 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface HybridInspectStatisticsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridInspectStatistics) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The number of hybrid inspection requests processed within this job.
-   * 
- * - * int64 processed_count = 1; - * @return The processedCount. - */ - long getProcessedCount(); - - /** - *
-   * The number of hybrid inspection requests aborted because the job ran
-   * out of quota or was ended before they could be processed.
-   * 
- * - * int64 aborted_count = 2; - * @return The abortedCount. - */ - long getAbortedCount(); - - /** - *
-   * The number of hybrid requests currently being processed. Only populated
-   * when called via method `getDlpJob`.
-   * A burst of traffic may cause hybrid inspect requests to be enqueued.
-   * Processing will take place as quickly as possible, but resource limitations
-   * may impact how long a request is enqueued for.
-   * 
- * - * int64 pending_count = 3; - * @return The pendingCount. - */ - long getPendingCount(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptions.java deleted file mode 100644 index b2e4a66d84ed..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptions.java +++ /dev/null @@ -1,1582 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Configuration to control jobs where the content being inspected is outside
- * of Google Cloud Platform.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridOptions} - */ -public final class HybridOptions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.HybridOptions) - HybridOptionsOrBuilder { -private static final long serialVersionUID = 0L; - // Use HybridOptions.newBuilder() to construct. - private HybridOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HybridOptions() { - description_ = ""; - requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HybridOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private HybridOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requiredFindingLabelKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requiredFindingLabelKeys_.add(s); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - case 34: { - com.google.privacy.dlp.v2.TableOptions.Builder subBuilder = null; - if (tableOptions_ != null) { - subBuilder = tableOptions_.toBuilder(); - } - tableOptions_ = input.readMessage(com.google.privacy.dlp.v2.TableOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tableOptions_); - tableOptions_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requiredFindingLabelKeys_ = requiredFindingLabelKeys_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridOptions.class, com.google.privacy.dlp.v2.HybridOptions.Builder.class); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object description_; - /** - *
-   * A short description of where the data is coming from. Will be stored once
-   * in the job. 256 max length.
-   * 
- * - * string description = 1; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * A short description of where the data is coming from. Will be stored once
-   * in the job. 256 max length.
-   * 
- * - * string description = 1; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUIRED_FINDING_LABEL_KEYS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList requiredFindingLabelKeys_; - /** - *
-   * These are labels that each inspection request must include within their
-   * 'finding_labels' map. Request may contain others, but any missing one of
-   * these will be rejected.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * No more than 10 keys can be required.
-   * 
- * - * repeated string required_finding_label_keys = 2; - * @return A list containing the requiredFindingLabelKeys. - */ - public com.google.protobuf.ProtocolStringList - getRequiredFindingLabelKeysList() { - return requiredFindingLabelKeys_; - } - /** - *
-   * These are labels that each inspection request must include within their
-   * 'finding_labels' map. Request may contain others, but any missing one of
-   * these will be rejected.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * No more than 10 keys can be required.
-   * 
- * - * repeated string required_finding_label_keys = 2; - * @return The count of requiredFindingLabelKeys. - */ - public int getRequiredFindingLabelKeysCount() { - return requiredFindingLabelKeys_.size(); - } - /** - *
-   * These are labels that each inspection request must include within their
-   * 'finding_labels' map. Request may contain others, but any missing one of
-   * these will be rejected.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * No more than 10 keys can be required.
-   * 
- * - * repeated string required_finding_label_keys = 2; - * @param index The index of the element to return. - * @return The requiredFindingLabelKeys at the given index. - */ - public java.lang.String getRequiredFindingLabelKeys(int index) { - return requiredFindingLabelKeys_.get(index); - } - /** - *
-   * These are labels that each inspection request must include within their
-   * 'finding_labels' map. Request may contain others, but any missing one of
-   * these will be rejected.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * No more than 10 keys can be required.
-   * 
- * - * repeated string required_finding_label_keys = 2; - * @param index The index of the value to return. - * @return The bytes of the requiredFindingLabelKeys at the given index. - */ - public com.google.protobuf.ByteString - getRequiredFindingLabelKeysBytes(int index) { - return requiredFindingLabelKeys_.getByteString(index); - } - - public static final int LABELS_FIELD_NUMBER = 3; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * To organize findings, these labels will be added to each finding.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 3; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * To organize findings, these labels will be added to each finding.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 3; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * To organize findings, these labels will be added to each finding.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 3; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * To organize findings, these labels will be added to each finding.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 3; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int TABLE_OPTIONS_FIELD_NUMBER = 4; - private com.google.privacy.dlp.v2.TableOptions tableOptions_; - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return Whether the tableOptions field is set. - */ - @java.lang.Override - public boolean hasTableOptions() { - return tableOptions_ != null; - } - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return The tableOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableOptions getTableOptions() { - return tableOptions_ == null ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; - } - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() { - return getTableOptions(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); - } - for (int i = 0; i < requiredFindingLabelKeys_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requiredFindingLabelKeys_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 3); - if (tableOptions_ != null) { - output.writeMessage(4, getTableOptions()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); - } - { - int dataSize = 0; - for (int i = 0; i < requiredFindingLabelKeys_.size(); i++) { - dataSize += computeStringSizeNoTag(requiredFindingLabelKeys_.getRaw(i)); - } - size += dataSize; - size += 1 * getRequiredFindingLabelKeysList().size(); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, labels__); - } - if (tableOptions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getTableOptions()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.HybridOptions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.HybridOptions other = (com.google.privacy.dlp.v2.HybridOptions) obj; - - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getRequiredFindingLabelKeysList() - .equals(other.getRequiredFindingLabelKeysList())) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (hasTableOptions() != other.hasTableOptions()) return false; - if (hasTableOptions()) { - if (!getTableOptions() - .equals(other.getTableOptions())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getRequiredFindingLabelKeysCount() > 0) { - hash = (37 * hash) + REQUIRED_FINDING_LABEL_KEYS_FIELD_NUMBER; - hash = (53 * hash) + getRequiredFindingLabelKeysList().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasTableOptions()) { - hash = (37 * hash) + TABLE_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getTableOptions().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.HybridOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridOptions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridOptions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.HybridOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.HybridOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.HybridOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.HybridOptions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Configuration to control jobs where the content being inspected is outside
-   * of Google Cloud Platform.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.HybridOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.HybridOptions) - com.google.privacy.dlp.v2.HybridOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 3: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.HybridOptions.class, com.google.privacy.dlp.v2.HybridOptions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.HybridOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - description_ = ""; - - requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableLabels().clear(); - if (tableOptionsBuilder_ == null) { - tableOptions_ = null; - } else { - tableOptions_ = null; - tableOptionsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_HybridOptions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridOptions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridOptions build() { - com.google.privacy.dlp.v2.HybridOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridOptions buildPartial() { - com.google.privacy.dlp.v2.HybridOptions result = new com.google.privacy.dlp.v2.HybridOptions(this); - int from_bitField0_ = bitField0_; - result.description_ = description_; - if (((bitField0_ & 0x00000001) != 0)) { - requiredFindingLabelKeys_ = requiredFindingLabelKeys_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requiredFindingLabelKeys_ = requiredFindingLabelKeys_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (tableOptionsBuilder_ == null) { - result.tableOptions_ = tableOptions_; - } else { - result.tableOptions_ = tableOptionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.HybridOptions) { - return mergeFrom((com.google.privacy.dlp.v2.HybridOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.HybridOptions other) { - if (other == com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance()) return this; - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.requiredFindingLabelKeys_.isEmpty()) { - if (requiredFindingLabelKeys_.isEmpty()) { - requiredFindingLabelKeys_ = other.requiredFindingLabelKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequiredFindingLabelKeysIsMutable(); - requiredFindingLabelKeys_.addAll(other.requiredFindingLabelKeys_); - } - onChanged(); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (other.hasTableOptions()) { - mergeTableOptions(other.getTableOptions()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.HybridOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.HybridOptions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object description_ = ""; - /** - *
-     * A short description of where the data is coming from. Will be stored once
-     * in the job. 256 max length.
-     * 
- * - * string description = 1; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A short description of where the data is coming from. Will be stored once
-     * in the job. 256 max length.
-     * 
- * - * string description = 1; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A short description of where the data is coming from. Will be stored once
-     * in the job. 256 max length.
-     * 
- * - * string description = 1; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * A short description of where the data is coming from. Will be stored once
-     * in the job. 256 max length.
-     * 
- * - * string description = 1; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * A short description of where the data is coming from. Will be stored once
-     * in the job. 256 max length.
-     * 
- * - * string description = 1; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRequiredFindingLabelKeysIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requiredFindingLabelKeys_ = new com.google.protobuf.LazyStringArrayList(requiredFindingLabelKeys_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * These are labels that each inspection request must include within their
-     * 'finding_labels' map. Request may contain others, but any missing one of
-     * these will be rejected.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * No more than 10 keys can be required.
-     * 
- * - * repeated string required_finding_label_keys = 2; - * @return A list containing the requiredFindingLabelKeys. - */ - public com.google.protobuf.ProtocolStringList - getRequiredFindingLabelKeysList() { - return requiredFindingLabelKeys_.getUnmodifiableView(); - } - /** - *
-     * These are labels that each inspection request must include within their
-     * 'finding_labels' map. Request may contain others, but any missing one of
-     * these will be rejected.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * No more than 10 keys can be required.
-     * 
- * - * repeated string required_finding_label_keys = 2; - * @return The count of requiredFindingLabelKeys. - */ - public int getRequiredFindingLabelKeysCount() { - return requiredFindingLabelKeys_.size(); - } - /** - *
-     * These are labels that each inspection request must include within their
-     * 'finding_labels' map. Request may contain others, but any missing one of
-     * these will be rejected.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * No more than 10 keys can be required.
-     * 
- * - * repeated string required_finding_label_keys = 2; - * @param index The index of the element to return. - * @return The requiredFindingLabelKeys at the given index. - */ - public java.lang.String getRequiredFindingLabelKeys(int index) { - return requiredFindingLabelKeys_.get(index); - } - /** - *
-     * These are labels that each inspection request must include within their
-     * 'finding_labels' map. Request may contain others, but any missing one of
-     * these will be rejected.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * No more than 10 keys can be required.
-     * 
- * - * repeated string required_finding_label_keys = 2; - * @param index The index of the value to return. - * @return The bytes of the requiredFindingLabelKeys at the given index. - */ - public com.google.protobuf.ByteString - getRequiredFindingLabelKeysBytes(int index) { - return requiredFindingLabelKeys_.getByteString(index); - } - /** - *
-     * These are labels that each inspection request must include within their
-     * 'finding_labels' map. Request may contain others, but any missing one of
-     * these will be rejected.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * No more than 10 keys can be required.
-     * 
- * - * repeated string required_finding_label_keys = 2; - * @param index The index to set the value at. - * @param value The requiredFindingLabelKeys to set. - * @return This builder for chaining. - */ - public Builder setRequiredFindingLabelKeys( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequiredFindingLabelKeysIsMutable(); - requiredFindingLabelKeys_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * These are labels that each inspection request must include within their
-     * 'finding_labels' map. Request may contain others, but any missing one of
-     * these will be rejected.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * No more than 10 keys can be required.
-     * 
- * - * repeated string required_finding_label_keys = 2; - * @param value The requiredFindingLabelKeys to add. - * @return This builder for chaining. - */ - public Builder addRequiredFindingLabelKeys( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequiredFindingLabelKeysIsMutable(); - requiredFindingLabelKeys_.add(value); - onChanged(); - return this; - } - /** - *
-     * These are labels that each inspection request must include within their
-     * 'finding_labels' map. Request may contain others, but any missing one of
-     * these will be rejected.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * No more than 10 keys can be required.
-     * 
- * - * repeated string required_finding_label_keys = 2; - * @param values The requiredFindingLabelKeys to add. - * @return This builder for chaining. - */ - public Builder addAllRequiredFindingLabelKeys( - java.lang.Iterable values) { - ensureRequiredFindingLabelKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requiredFindingLabelKeys_); - onChanged(); - return this; - } - /** - *
-     * These are labels that each inspection request must include within their
-     * 'finding_labels' map. Request may contain others, but any missing one of
-     * these will be rejected.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * No more than 10 keys can be required.
-     * 
- * - * repeated string required_finding_label_keys = 2; - * @return This builder for chaining. - */ - public Builder clearRequiredFindingLabelKeys() { - requiredFindingLabelKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * These are labels that each inspection request must include within their
-     * 'finding_labels' map. Request may contain others, but any missing one of
-     * these will be rejected.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * No more than 10 keys can be required.
-     * 
- * - * repeated string required_finding_label_keys = 2; - * @param value The bytes of the requiredFindingLabelKeys to add. - * @return This builder for chaining. - */ - public Builder addRequiredFindingLabelKeysBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRequiredFindingLabelKeysIsMutable(); - requiredFindingLabelKeys_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * To organize findings, these labels will be added to each finding.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 3; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * To organize findings, these labels will be added to each finding.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 3; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * To organize findings, these labels will be added to each finding.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 3; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * To organize findings, these labels will be added to each finding.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 3; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * To organize findings, these labels will be added to each finding.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 3; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * To organize findings, these labels will be added to each finding.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 3; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * To organize findings, these labels will be added to each finding.
-     * Label keys must be between 1 and 63 characters long and must conform
-     * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-     * Label values must be between 0 and 63 characters long and must conform
-     * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-     * No more than 10 labels can be associated with a given finding.
-     * Examples:
-     * * `"environment" : "production"`
-     * * `"pipeline" : "etl"`
-     * 
- * - * map<string, string> labels = 3; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.privacy.dlp.v2.TableOptions tableOptions_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder> tableOptionsBuilder_; - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return Whether the tableOptions field is set. - */ - public boolean hasTableOptions() { - return tableOptionsBuilder_ != null || tableOptions_ != null; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return The tableOptions. - */ - public com.google.privacy.dlp.v2.TableOptions getTableOptions() { - if (tableOptionsBuilder_ == null) { - return tableOptions_ == null ? com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; - } else { - return tableOptionsBuilder_.getMessage(); - } - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public Builder setTableOptions(com.google.privacy.dlp.v2.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableOptions_ = value; - onChanged(); - } else { - tableOptionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public Builder setTableOptions( - com.google.privacy.dlp.v2.TableOptions.Builder builderForValue) { - if (tableOptionsBuilder_ == null) { - tableOptions_ = builderForValue.build(); - onChanged(); - } else { - tableOptionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public Builder mergeTableOptions(com.google.privacy.dlp.v2.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (tableOptions_ != null) { - tableOptions_ = - com.google.privacy.dlp.v2.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); - } else { - tableOptions_ = value; - } - onChanged(); - } else { - tableOptionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public Builder clearTableOptions() { - if (tableOptionsBuilder_ == null) { - tableOptions_ = null; - onChanged(); - } else { - tableOptions_ = null; - tableOptionsBuilder_ = null; - } - - return this; - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public com.google.privacy.dlp.v2.TableOptions.Builder getTableOptionsBuilder() { - - onChanged(); - return getTableOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - public com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder() { - if (tableOptionsBuilder_ != null) { - return tableOptionsBuilder_.getMessageOrBuilder(); - } else { - return tableOptions_ == null ? - com.google.privacy.dlp.v2.TableOptions.getDefaultInstance() : tableOptions_; - } - } - /** - *
-     * If the container is a table, additional information to make findings
-     * meaningful such as the columns that are primary keys.
-     * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder> - getTableOptionsFieldBuilder() { - if (tableOptionsBuilder_ == null) { - tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableOptions, com.google.privacy.dlp.v2.TableOptions.Builder, com.google.privacy.dlp.v2.TableOptionsOrBuilder>( - getTableOptions(), - getParentForChildren(), - isClean()); - tableOptions_ = null; - } - return tableOptionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.HybridOptions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.HybridOptions) - private static final com.google.privacy.dlp.v2.HybridOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.HybridOptions(); - } - - public static com.google.privacy.dlp.v2.HybridOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HybridOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HybridOptions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.HybridOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptionsOrBuilder.java deleted file mode 100644 index bb6e873057fa..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/HybridOptionsOrBuilder.java +++ /dev/null @@ -1,218 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface HybridOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.HybridOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A short description of where the data is coming from. Will be stored once
-   * in the job. 256 max length.
-   * 
- * - * string description = 1; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * A short description of where the data is coming from. Will be stored once
-   * in the job. 256 max length.
-   * 
- * - * string description = 1; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * These are labels that each inspection request must include within their
-   * 'finding_labels' map. Request may contain others, but any missing one of
-   * these will be rejected.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * No more than 10 keys can be required.
-   * 
- * - * repeated string required_finding_label_keys = 2; - * @return A list containing the requiredFindingLabelKeys. - */ - java.util.List - getRequiredFindingLabelKeysList(); - /** - *
-   * These are labels that each inspection request must include within their
-   * 'finding_labels' map. Request may contain others, but any missing one of
-   * these will be rejected.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * No more than 10 keys can be required.
-   * 
- * - * repeated string required_finding_label_keys = 2; - * @return The count of requiredFindingLabelKeys. - */ - int getRequiredFindingLabelKeysCount(); - /** - *
-   * These are labels that each inspection request must include within their
-   * 'finding_labels' map. Request may contain others, but any missing one of
-   * these will be rejected.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * No more than 10 keys can be required.
-   * 
- * - * repeated string required_finding_label_keys = 2; - * @param index The index of the element to return. - * @return The requiredFindingLabelKeys at the given index. - */ - java.lang.String getRequiredFindingLabelKeys(int index); - /** - *
-   * These are labels that each inspection request must include within their
-   * 'finding_labels' map. Request may contain others, but any missing one of
-   * these will be rejected.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * No more than 10 keys can be required.
-   * 
- * - * repeated string required_finding_label_keys = 2; - * @param index The index of the value to return. - * @return The bytes of the requiredFindingLabelKeys at the given index. - */ - com.google.protobuf.ByteString - getRequiredFindingLabelKeysBytes(int index); - - /** - *
-   * To organize findings, these labels will be added to each finding.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 3; - */ - int getLabelsCount(); - /** - *
-   * To organize findings, these labels will be added to each finding.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 3; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * To organize findings, these labels will be added to each finding.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 3; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * To organize findings, these labels will be added to each finding.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 3; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * To organize findings, these labels will be added to each finding.
-   * Label keys must be between 1 and 63 characters long and must conform
-   * to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.
-   * Label values must be between 0 and 63 characters long and must conform
-   * to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.
-   * No more than 10 labels can be associated with a given finding.
-   * Examples:
-   * * `"environment" : "production"`
-   * * `"pipeline" : "etl"`
-   * 
- * - * map<string, string> labels = 3; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return Whether the tableOptions field is set. - */ - boolean hasTableOptions(); - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - * @return The tableOptions. - */ - com.google.privacy.dlp.v2.TableOptions getTableOptions(); - /** - *
-   * If the container is a table, additional information to make findings
-   * meaningful such as the columns that are primary keys.
-   * 
- * - * .google.privacy.dlp.v2.TableOptions table_options = 4; - */ - com.google.privacy.dlp.v2.TableOptionsOrBuilder getTableOptionsOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocation.java deleted file mode 100644 index 9feba61d1126..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocation.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Location of the finding within an image.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ImageLocation} - */ -public final class ImageLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ImageLocation) - ImageLocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use ImageLocation.newBuilder() to construct. - private ImageLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageLocation() { - boundingBoxes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageLocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageLocation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - boundingBoxes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - boundingBoxes_.add( - input.readMessage(com.google.privacy.dlp.v2.BoundingBox.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - boundingBoxes_ = java.util.Collections.unmodifiableList(boundingBoxes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageLocation.class, com.google.privacy.dlp.v2.ImageLocation.Builder.class); - } - - public static final int BOUNDING_BOXES_FIELD_NUMBER = 1; - private java.util.List boundingBoxes_; - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - @java.lang.Override - public java.util.List getBoundingBoxesList() { - return boundingBoxes_; - } - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - @java.lang.Override - public java.util.List - getBoundingBoxesOrBuilderList() { - return boundingBoxes_; - } - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - @java.lang.Override - public int getBoundingBoxesCount() { - return boundingBoxes_.size(); - } - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BoundingBox getBoundingBoxes(int index) { - return boundingBoxes_.get(index); - } - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BoundingBoxOrBuilder getBoundingBoxesOrBuilder( - int index) { - return boundingBoxes_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < boundingBoxes_.size(); i++) { - output.writeMessage(1, boundingBoxes_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < boundingBoxes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, boundingBoxes_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ImageLocation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ImageLocation other = (com.google.privacy.dlp.v2.ImageLocation) obj; - - if (!getBoundingBoxesList() - .equals(other.getBoundingBoxesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getBoundingBoxesCount() > 0) { - hash = (37 * hash) + BOUNDING_BOXES_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBoxesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ImageLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ImageLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ImageLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ImageLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ImageLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ImageLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ImageLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ImageLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ImageLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ImageLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ImageLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ImageLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ImageLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Location of the finding within an image.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ImageLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ImageLocation) - com.google.privacy.dlp.v2.ImageLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ImageLocation.class, com.google.privacy.dlp.v2.ImageLocation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ImageLocation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBoundingBoxesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (boundingBoxesBuilder_ == null) { - boundingBoxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - boundingBoxesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ImageLocation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ImageLocation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ImageLocation build() { - com.google.privacy.dlp.v2.ImageLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ImageLocation buildPartial() { - com.google.privacy.dlp.v2.ImageLocation result = new com.google.privacy.dlp.v2.ImageLocation(this); - int from_bitField0_ = bitField0_; - if (boundingBoxesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - boundingBoxes_ = java.util.Collections.unmodifiableList(boundingBoxes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.boundingBoxes_ = boundingBoxes_; - } else { - result.boundingBoxes_ = boundingBoxesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ImageLocation) { - return mergeFrom((com.google.privacy.dlp.v2.ImageLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ImageLocation other) { - if (other == com.google.privacy.dlp.v2.ImageLocation.getDefaultInstance()) return this; - if (boundingBoxesBuilder_ == null) { - if (!other.boundingBoxes_.isEmpty()) { - if (boundingBoxes_.isEmpty()) { - boundingBoxes_ = other.boundingBoxes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBoundingBoxesIsMutable(); - boundingBoxes_.addAll(other.boundingBoxes_); - } - onChanged(); - } - } else { - if (!other.boundingBoxes_.isEmpty()) { - if (boundingBoxesBuilder_.isEmpty()) { - boundingBoxesBuilder_.dispose(); - boundingBoxesBuilder_ = null; - boundingBoxes_ = other.boundingBoxes_; - bitField0_ = (bitField0_ & ~0x00000001); - boundingBoxesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBoundingBoxesFieldBuilder() : null; - } else { - boundingBoxesBuilder_.addAllMessages(other.boundingBoxes_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ImageLocation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ImageLocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List boundingBoxes_ = - java.util.Collections.emptyList(); - private void ensureBoundingBoxesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - boundingBoxes_ = new java.util.ArrayList(boundingBoxes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.BoundingBox, com.google.privacy.dlp.v2.BoundingBox.Builder, com.google.privacy.dlp.v2.BoundingBoxOrBuilder> boundingBoxesBuilder_; - - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public java.util.List getBoundingBoxesList() { - if (boundingBoxesBuilder_ == null) { - return java.util.Collections.unmodifiableList(boundingBoxes_); - } else { - return boundingBoxesBuilder_.getMessageList(); - } - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public int getBoundingBoxesCount() { - if (boundingBoxesBuilder_ == null) { - return boundingBoxes_.size(); - } else { - return boundingBoxesBuilder_.getCount(); - } - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public com.google.privacy.dlp.v2.BoundingBox getBoundingBoxes(int index) { - if (boundingBoxesBuilder_ == null) { - return boundingBoxes_.get(index); - } else { - return boundingBoxesBuilder_.getMessage(index); - } - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public Builder setBoundingBoxes( - int index, com.google.privacy.dlp.v2.BoundingBox value) { - if (boundingBoxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingBoxesIsMutable(); - boundingBoxes_.set(index, value); - onChanged(); - } else { - boundingBoxesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public Builder setBoundingBoxes( - int index, com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue) { - if (boundingBoxesBuilder_ == null) { - ensureBoundingBoxesIsMutable(); - boundingBoxes_.set(index, builderForValue.build()); - onChanged(); - } else { - boundingBoxesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public Builder addBoundingBoxes(com.google.privacy.dlp.v2.BoundingBox value) { - if (boundingBoxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingBoxesIsMutable(); - boundingBoxes_.add(value); - onChanged(); - } else { - boundingBoxesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public Builder addBoundingBoxes( - int index, com.google.privacy.dlp.v2.BoundingBox value) { - if (boundingBoxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingBoxesIsMutable(); - boundingBoxes_.add(index, value); - onChanged(); - } else { - boundingBoxesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public Builder addBoundingBoxes( - com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue) { - if (boundingBoxesBuilder_ == null) { - ensureBoundingBoxesIsMutable(); - boundingBoxes_.add(builderForValue.build()); - onChanged(); - } else { - boundingBoxesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public Builder addBoundingBoxes( - int index, com.google.privacy.dlp.v2.BoundingBox.Builder builderForValue) { - if (boundingBoxesBuilder_ == null) { - ensureBoundingBoxesIsMutable(); - boundingBoxes_.add(index, builderForValue.build()); - onChanged(); - } else { - boundingBoxesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public Builder addAllBoundingBoxes( - java.lang.Iterable values) { - if (boundingBoxesBuilder_ == null) { - ensureBoundingBoxesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, boundingBoxes_); - onChanged(); - } else { - boundingBoxesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public Builder clearBoundingBoxes() { - if (boundingBoxesBuilder_ == null) { - boundingBoxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - boundingBoxesBuilder_.clear(); - } - return this; - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public Builder removeBoundingBoxes(int index) { - if (boundingBoxesBuilder_ == null) { - ensureBoundingBoxesIsMutable(); - boundingBoxes_.remove(index); - onChanged(); - } else { - boundingBoxesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public com.google.privacy.dlp.v2.BoundingBox.Builder getBoundingBoxesBuilder( - int index) { - return getBoundingBoxesFieldBuilder().getBuilder(index); - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public com.google.privacy.dlp.v2.BoundingBoxOrBuilder getBoundingBoxesOrBuilder( - int index) { - if (boundingBoxesBuilder_ == null) { - return boundingBoxes_.get(index); } else { - return boundingBoxesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public java.util.List - getBoundingBoxesOrBuilderList() { - if (boundingBoxesBuilder_ != null) { - return boundingBoxesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(boundingBoxes_); - } - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public com.google.privacy.dlp.v2.BoundingBox.Builder addBoundingBoxesBuilder() { - return getBoundingBoxesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance()); - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public com.google.privacy.dlp.v2.BoundingBox.Builder addBoundingBoxesBuilder( - int index) { - return getBoundingBoxesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.BoundingBox.getDefaultInstance()); - } - /** - *
-     * Bounding boxes locating the pixels within the image containing the finding.
-     * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - public java.util.List - getBoundingBoxesBuilderList() { - return getBoundingBoxesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.BoundingBox, com.google.privacy.dlp.v2.BoundingBox.Builder, com.google.privacy.dlp.v2.BoundingBoxOrBuilder> - getBoundingBoxesFieldBuilder() { - if (boundingBoxesBuilder_ == null) { - boundingBoxesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.BoundingBox, com.google.privacy.dlp.v2.BoundingBox.Builder, com.google.privacy.dlp.v2.BoundingBoxOrBuilder>( - boundingBoxes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - boundingBoxes_ = null; - } - return boundingBoxesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ImageLocation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ImageLocation) - private static final com.google.privacy.dlp.v2.ImageLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ImageLocation(); - } - - public static com.google.privacy.dlp.v2.ImageLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageLocation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ImageLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocationOrBuilder.java deleted file mode 100644 index 99ddc7481378..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageLocationOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ImageLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageLocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - java.util.List - getBoundingBoxesList(); - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - com.google.privacy.dlp.v2.BoundingBox getBoundingBoxes(int index); - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - int getBoundingBoxesCount(); - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - java.util.List - getBoundingBoxesOrBuilderList(); - /** - *
-   * Bounding boxes locating the pixels within the image containing the finding.
-   * 
- * - * repeated .google.privacy.dlp.v2.BoundingBox bounding_boxes = 1; - */ - com.google.privacy.dlp.v2.BoundingBoxOrBuilder getBoundingBoxesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java deleted file mode 100644 index c07bc793c8a2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ImageTransformationsOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ImageTransformationsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ImageTransformations) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; - */ - java.util.List - getTransformsList(); - /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; - */ - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformation getTransforms(int index); - /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; - */ - int getTransformsCount(); - /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; - */ - java.util.List - getTransformsOrBuilderList(); - /** - * repeated .google.privacy.dlp.v2.ImageTransformations.ImageTransformation transforms = 2; - */ - com.google.privacy.dlp.v2.ImageTransformations.ImageTransformationOrBuilder getTransformsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java deleted file mode 100644 index 82bf89b65535..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java +++ /dev/null @@ -1,789 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Type of information detected by the API.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoType} - */ -public final class InfoType extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoType) - InfoTypeOrBuilder { -private static final long serialVersionUID = 0L; - // Use InfoType.newBuilder() to construct. - private InfoType(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoType() { - name_ = ""; - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoType(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InfoType( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoType.class, com.google.privacy.dlp.v2.InfoType.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Name of the information type. Either a name of your choosing when
-   * creating a CustomInfoType, or one of the names listed
-   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
-   * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
-   * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Name of the information type. Either a name of your choosing when
-   * creating a CustomInfoType, or one of the names listed
-   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
-   * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
-   * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 2; - private volatile java.lang.Object version_; - /** - *
-   * Optional version name for this InfoType.
-   * 
- * - * string version = 2; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * Optional version name for this InfoType.
-   * 
- * - * string version = 2; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InfoType)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InfoType other = (com.google.privacy.dlp.v2.InfoType) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getVersion() - .equals(other.getVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InfoType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoType parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoType parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoType parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoType parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoType parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoType parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoType parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InfoType prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Type of information detected by the API.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoType) - com.google.privacy.dlp.v2.InfoTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoType.class, com.google.privacy.dlp.v2.InfoType.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InfoType.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - version_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_InfoType_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType build() { - com.google.privacy.dlp.v2.InfoType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType buildPartial() { - com.google.privacy.dlp.v2.InfoType result = new com.google.privacy.dlp.v2.InfoType(this); - result.name_ = name_; - result.version_ = version_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InfoType) { - return mergeFrom((com.google.privacy.dlp.v2.InfoType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InfoType other) { - if (other == com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InfoType parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InfoType) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Name of the information type. Either a name of your choosing when
-     * creating a CustomInfoType, or one of the names listed
-     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
-     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
-     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Name of the information type. Either a name of your choosing when
-     * creating a CustomInfoType, or one of the names listed
-     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
-     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
-     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Name of the information type. Either a name of your choosing when
-     * creating a CustomInfoType, or one of the names listed
-     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
-     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
-     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Name of the information type. Either a name of your choosing when
-     * creating a CustomInfoType, or one of the names listed
-     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
-     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
-     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Name of the information type. Either a name of your choosing when
-     * creating a CustomInfoType, or one of the names listed
-     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
-     * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
-     * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-     * Optional version name for this InfoType.
-     * 
- * - * string version = 2; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional version name for this InfoType.
-     * 
- * - * string version = 2; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional version name for this InfoType.
-     * 
- * - * string version = 2; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional version name for this InfoType.
-     * 
- * - * string version = 2; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - *
-     * Optional version name for this InfoType.
-     * 
- * - * string version = 2; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoType) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoType) - private static final com.google.privacy.dlp.v2.InfoType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoType(); - } - - public static com.google.privacy.dlp.v2.InfoType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InfoType(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategory.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategory.java deleted file mode 100644 index 61c4ee295ebc..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategory.java +++ /dev/null @@ -1,2212 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Classification of infoTypes to organize them according to geographic
- * location, industry, and data type.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeCategory} - */ -public final class InfoTypeCategory extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeCategory) - InfoTypeCategoryOrBuilder { -private static final long serialVersionUID = 0L; - // Use InfoTypeCategory.newBuilder() to construct. - private InfoTypeCategory(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoTypeCategory() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoTypeCategory(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InfoTypeCategory( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - categoryCase_ = 1; - category_ = rawValue; - break; - } - case 16: { - int rawValue = input.readEnum(); - categoryCase_ = 2; - category_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - categoryCase_ = 3; - category_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeCategory.class, com.google.privacy.dlp.v2.InfoTypeCategory.Builder.class); - } - - /** - *
-   * Enum of the current locations.
-   * We might add more locations in the future.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.InfoTypeCategory.LocationCategory} - */ - public enum LocationCategory - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused location
-     * 
- * - * LOCATION_UNSPECIFIED = 0; - */ - LOCATION_UNSPECIFIED(0), - /** - *
-     * The infoType is not issued by or tied to a specific region, but is used
-     * almost everywhere.
-     * 
- * - * GLOBAL = 1; - */ - GLOBAL(1), - /** - *
-     * The infoType is typically used in Argentina.
-     * 
- * - * ARGENTINA = 2; - */ - ARGENTINA(2), - /** - *
-     * The infoType is typically used in Australia.
-     * 
- * - * AUSTRALIA = 3; - */ - AUSTRALIA(3), - /** - *
-     * The infoType is typically used in Belgium.
-     * 
- * - * BELGIUM = 4; - */ - BELGIUM(4), - /** - *
-     * The infoType is typically used in Brazil.
-     * 
- * - * BRAZIL = 5; - */ - BRAZIL(5), - /** - *
-     * The infoType is typically used in Canada.
-     * 
- * - * CANADA = 6; - */ - CANADA(6), - /** - *
-     * The infoType is typically used in Chile.
-     * 
- * - * CHILE = 7; - */ - CHILE(7), - /** - *
-     * The infoType is typically used in China.
-     * 
- * - * CHINA = 8; - */ - CHINA(8), - /** - *
-     * The infoType is typically used in Colombia.
-     * 
- * - * COLOMBIA = 9; - */ - COLOMBIA(9), - /** - *
-     * The infoType is typically used in Denmark.
-     * 
- * - * DENMARK = 10; - */ - DENMARK(10), - /** - *
-     * The infoType is typically used in France.
-     * 
- * - * FRANCE = 11; - */ - FRANCE(11), - /** - *
-     * The infoType is typically used in Finland.
-     * 
- * - * FINLAND = 12; - */ - FINLAND(12), - /** - *
-     * The infoType is typically used in Germany.
-     * 
- * - * GERMANY = 13; - */ - GERMANY(13), - /** - *
-     * The infoType is typically used in Hong Kong.
-     * 
- * - * HONG_KONG = 14; - */ - HONG_KONG(14), - /** - *
-     * The infoType is typically used in India.
-     * 
- * - * INDIA = 15; - */ - INDIA(15), - /** - *
-     * The infoType is typically used in Indonesia.
-     * 
- * - * INDONESIA = 16; - */ - INDONESIA(16), - /** - *
-     * The infoType is typically used in Ireland.
-     * 
- * - * IRELAND = 17; - */ - IRELAND(17), - /** - *
-     * The infoType is typically used in Israel.
-     * 
- * - * ISRAEL = 18; - */ - ISRAEL(18), - /** - *
-     * The infoType is typically used in Italy.
-     * 
- * - * ITALY = 19; - */ - ITALY(19), - /** - *
-     * The infoType is typically used in Japan.
-     * 
- * - * JAPAN = 20; - */ - JAPAN(20), - /** - *
-     * The infoType is typically used in Korea.
-     * 
- * - * KOREA = 21; - */ - KOREA(21), - /** - *
-     * The infoType is typically used in Mexico.
-     * 
- * - * MEXICO = 22; - */ - MEXICO(22), - /** - *
-     * The infoType is typically used in the Netherlands.
-     * 
- * - * THE_NETHERLANDS = 23; - */ - THE_NETHERLANDS(23), - /** - *
-     * The infoType is typically used in Norway.
-     * 
- * - * NORWAY = 24; - */ - NORWAY(24), - /** - *
-     * The infoType is typically used in Paraguay.
-     * 
- * - * PARAGUAY = 25; - */ - PARAGUAY(25), - /** - *
-     * The infoType is typically used in Peru.
-     * 
- * - * PERU = 26; - */ - PERU(26), - /** - *
-     * The infoType is typically used in Poland.
-     * 
- * - * POLAND = 27; - */ - POLAND(27), - /** - *
-     * The infoType is typically used in Portugal.
-     * 
- * - * PORTUGAL = 28; - */ - PORTUGAL(28), - /** - *
-     * The infoType is typically used in Singapore.
-     * 
- * - * SINGAPORE = 29; - */ - SINGAPORE(29), - /** - *
-     * The infoType is typically used in South Africa.
-     * 
- * - * SOUTH_AFRICA = 30; - */ - SOUTH_AFRICA(30), - /** - *
-     * The infoType is typically used in Spain.
-     * 
- * - * SPAIN = 31; - */ - SPAIN(31), - /** - *
-     * The infoType is typically used in Sweden.
-     * 
- * - * SWEDEN = 32; - */ - SWEDEN(32), - /** - *
-     * The infoType is typically used in Taiwan.
-     * 
- * - * TAIWAN = 33; - */ - TAIWAN(33), - /** - *
-     * The infoType is typically used in Thailand.
-     * 
- * - * THAILAND = 34; - */ - THAILAND(34), - /** - *
-     * The infoType is typically used in Turkey.
-     * 
- * - * TURKEY = 35; - */ - TURKEY(35), - /** - *
-     * The infoType is typically used in the United Kingdom.
-     * 
- * - * UNITED_KINGDOM = 36; - */ - UNITED_KINGDOM(36), - /** - *
-     * The infoType is typically used in the United States.
-     * 
- * - * UNITED_STATES = 37; - */ - UNITED_STATES(37), - /** - *
-     * The infoType is typically used in Uruguay.
-     * 
- * - * URUGUAY = 38; - */ - URUGUAY(38), - /** - *
-     * The infoType is typically used in Venezuela.
-     * 
- * - * VENEZUELA = 39; - */ - VENEZUELA(39), - /** - *
-     * The infoType is typically used in Google internally.
-     * 
- * - * INTERNAL = 40; - */ - INTERNAL(40), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused location
-     * 
- * - * LOCATION_UNSPECIFIED = 0; - */ - public static final int LOCATION_UNSPECIFIED_VALUE = 0; - /** - *
-     * The infoType is not issued by or tied to a specific region, but is used
-     * almost everywhere.
-     * 
- * - * GLOBAL = 1; - */ - public static final int GLOBAL_VALUE = 1; - /** - *
-     * The infoType is typically used in Argentina.
-     * 
- * - * ARGENTINA = 2; - */ - public static final int ARGENTINA_VALUE = 2; - /** - *
-     * The infoType is typically used in Australia.
-     * 
- * - * AUSTRALIA = 3; - */ - public static final int AUSTRALIA_VALUE = 3; - /** - *
-     * The infoType is typically used in Belgium.
-     * 
- * - * BELGIUM = 4; - */ - public static final int BELGIUM_VALUE = 4; - /** - *
-     * The infoType is typically used in Brazil.
-     * 
- * - * BRAZIL = 5; - */ - public static final int BRAZIL_VALUE = 5; - /** - *
-     * The infoType is typically used in Canada.
-     * 
- * - * CANADA = 6; - */ - public static final int CANADA_VALUE = 6; - /** - *
-     * The infoType is typically used in Chile.
-     * 
- * - * CHILE = 7; - */ - public static final int CHILE_VALUE = 7; - /** - *
-     * The infoType is typically used in China.
-     * 
- * - * CHINA = 8; - */ - public static final int CHINA_VALUE = 8; - /** - *
-     * The infoType is typically used in Colombia.
-     * 
- * - * COLOMBIA = 9; - */ - public static final int COLOMBIA_VALUE = 9; - /** - *
-     * The infoType is typically used in Denmark.
-     * 
- * - * DENMARK = 10; - */ - public static final int DENMARK_VALUE = 10; - /** - *
-     * The infoType is typically used in France.
-     * 
- * - * FRANCE = 11; - */ - public static final int FRANCE_VALUE = 11; - /** - *
-     * The infoType is typically used in Finland.
-     * 
- * - * FINLAND = 12; - */ - public static final int FINLAND_VALUE = 12; - /** - *
-     * The infoType is typically used in Germany.
-     * 
- * - * GERMANY = 13; - */ - public static final int GERMANY_VALUE = 13; - /** - *
-     * The infoType is typically used in Hong Kong.
-     * 
- * - * HONG_KONG = 14; - */ - public static final int HONG_KONG_VALUE = 14; - /** - *
-     * The infoType is typically used in India.
-     * 
- * - * INDIA = 15; - */ - public static final int INDIA_VALUE = 15; - /** - *
-     * The infoType is typically used in Indonesia.
-     * 
- * - * INDONESIA = 16; - */ - public static final int INDONESIA_VALUE = 16; - /** - *
-     * The infoType is typically used in Ireland.
-     * 
- * - * IRELAND = 17; - */ - public static final int IRELAND_VALUE = 17; - /** - *
-     * The infoType is typically used in Israel.
-     * 
- * - * ISRAEL = 18; - */ - public static final int ISRAEL_VALUE = 18; - /** - *
-     * The infoType is typically used in Italy.
-     * 
- * - * ITALY = 19; - */ - public static final int ITALY_VALUE = 19; - /** - *
-     * The infoType is typically used in Japan.
-     * 
- * - * JAPAN = 20; - */ - public static final int JAPAN_VALUE = 20; - /** - *
-     * The infoType is typically used in Korea.
-     * 
- * - * KOREA = 21; - */ - public static final int KOREA_VALUE = 21; - /** - *
-     * The infoType is typically used in Mexico.
-     * 
- * - * MEXICO = 22; - */ - public static final int MEXICO_VALUE = 22; - /** - *
-     * The infoType is typically used in the Netherlands.
-     * 
- * - * THE_NETHERLANDS = 23; - */ - public static final int THE_NETHERLANDS_VALUE = 23; - /** - *
-     * The infoType is typically used in Norway.
-     * 
- * - * NORWAY = 24; - */ - public static final int NORWAY_VALUE = 24; - /** - *
-     * The infoType is typically used in Paraguay.
-     * 
- * - * PARAGUAY = 25; - */ - public static final int PARAGUAY_VALUE = 25; - /** - *
-     * The infoType is typically used in Peru.
-     * 
- * - * PERU = 26; - */ - public static final int PERU_VALUE = 26; - /** - *
-     * The infoType is typically used in Poland.
-     * 
- * - * POLAND = 27; - */ - public static final int POLAND_VALUE = 27; - /** - *
-     * The infoType is typically used in Portugal.
-     * 
- * - * PORTUGAL = 28; - */ - public static final int PORTUGAL_VALUE = 28; - /** - *
-     * The infoType is typically used in Singapore.
-     * 
- * - * SINGAPORE = 29; - */ - public static final int SINGAPORE_VALUE = 29; - /** - *
-     * The infoType is typically used in South Africa.
-     * 
- * - * SOUTH_AFRICA = 30; - */ - public static final int SOUTH_AFRICA_VALUE = 30; - /** - *
-     * The infoType is typically used in Spain.
-     * 
- * - * SPAIN = 31; - */ - public static final int SPAIN_VALUE = 31; - /** - *
-     * The infoType is typically used in Sweden.
-     * 
- * - * SWEDEN = 32; - */ - public static final int SWEDEN_VALUE = 32; - /** - *
-     * The infoType is typically used in Taiwan.
-     * 
- * - * TAIWAN = 33; - */ - public static final int TAIWAN_VALUE = 33; - /** - *
-     * The infoType is typically used in Thailand.
-     * 
- * - * THAILAND = 34; - */ - public static final int THAILAND_VALUE = 34; - /** - *
-     * The infoType is typically used in Turkey.
-     * 
- * - * TURKEY = 35; - */ - public static final int TURKEY_VALUE = 35; - /** - *
-     * The infoType is typically used in the United Kingdom.
-     * 
- * - * UNITED_KINGDOM = 36; - */ - public static final int UNITED_KINGDOM_VALUE = 36; - /** - *
-     * The infoType is typically used in the United States.
-     * 
- * - * UNITED_STATES = 37; - */ - public static final int UNITED_STATES_VALUE = 37; - /** - *
-     * The infoType is typically used in Uruguay.
-     * 
- * - * URUGUAY = 38; - */ - public static final int URUGUAY_VALUE = 38; - /** - *
-     * The infoType is typically used in Venezuela.
-     * 
- * - * VENEZUELA = 39; - */ - public static final int VENEZUELA_VALUE = 39; - /** - *
-     * The infoType is typically used in Google internally.
-     * 
- * - * INTERNAL = 40; - */ - public static final int INTERNAL_VALUE = 40; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LocationCategory valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static LocationCategory forNumber(int value) { - switch (value) { - case 0: return LOCATION_UNSPECIFIED; - case 1: return GLOBAL; - case 2: return ARGENTINA; - case 3: return AUSTRALIA; - case 4: return BELGIUM; - case 5: return BRAZIL; - case 6: return CANADA; - case 7: return CHILE; - case 8: return CHINA; - case 9: return COLOMBIA; - case 10: return DENMARK; - case 11: return FRANCE; - case 12: return FINLAND; - case 13: return GERMANY; - case 14: return HONG_KONG; - case 15: return INDIA; - case 16: return INDONESIA; - case 17: return IRELAND; - case 18: return ISRAEL; - case 19: return ITALY; - case 20: return JAPAN; - case 21: return KOREA; - case 22: return MEXICO; - case 23: return THE_NETHERLANDS; - case 24: return NORWAY; - case 25: return PARAGUAY; - case 26: return PERU; - case 27: return POLAND; - case 28: return PORTUGAL; - case 29: return SINGAPORE; - case 30: return SOUTH_AFRICA; - case 31: return SPAIN; - case 32: return SWEDEN; - case 33: return TAIWAN; - case 34: return THAILAND; - case 35: return TURKEY; - case 36: return UNITED_KINGDOM; - case 37: return UNITED_STATES; - case 38: return URUGUAY; - case 39: return VENEZUELA; - case 40: return INTERNAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - LocationCategory> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LocationCategory findValueByNumber(int number) { - return LocationCategory.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.InfoTypeCategory.getDescriptor().getEnumTypes().get(0); - } - - private static final LocationCategory[] VALUES = values(); - - public static LocationCategory valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private LocationCategory(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.InfoTypeCategory.LocationCategory) - } - - /** - *
-   * Enum of the current industries in the category.
-   * We might add more industries in the future.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory} - */ - public enum IndustryCategory - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused industry
-     * 
- * - * INDUSTRY_UNSPECIFIED = 0; - */ - INDUSTRY_UNSPECIFIED(0), - /** - *
-     * The infoType is typically used in the finance industry.
-     * 
- * - * FINANCE = 1; - */ - FINANCE(1), - /** - *
-     * The infoType is typically used in the health industry.
-     * 
- * - * HEALTH = 2; - */ - HEALTH(2), - /** - *
-     * The infoType is typically used in the telecommunications industry.
-     * 
- * - * TELECOMMUNICATIONS = 3; - */ - TELECOMMUNICATIONS(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused industry
-     * 
- * - * INDUSTRY_UNSPECIFIED = 0; - */ - public static final int INDUSTRY_UNSPECIFIED_VALUE = 0; - /** - *
-     * The infoType is typically used in the finance industry.
-     * 
- * - * FINANCE = 1; - */ - public static final int FINANCE_VALUE = 1; - /** - *
-     * The infoType is typically used in the health industry.
-     * 
- * - * HEALTH = 2; - */ - public static final int HEALTH_VALUE = 2; - /** - *
-     * The infoType is typically used in the telecommunications industry.
-     * 
- * - * TELECOMMUNICATIONS = 3; - */ - public static final int TELECOMMUNICATIONS_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static IndustryCategory valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static IndustryCategory forNumber(int value) { - switch (value) { - case 0: return INDUSTRY_UNSPECIFIED; - case 1: return FINANCE; - case 2: return HEALTH; - case 3: return TELECOMMUNICATIONS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - IndustryCategory> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public IndustryCategory findValueByNumber(int number) { - return IndustryCategory.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.InfoTypeCategory.getDescriptor().getEnumTypes().get(1); - } - - private static final IndustryCategory[] VALUES = values(); - - public static IndustryCategory valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private IndustryCategory(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory) - } - - /** - *
-   * Enum of the current types in the category.
-   * We might add more types in the future.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.InfoTypeCategory.TypeCategory} - */ - public enum TypeCategory - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused type
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - *
-     * Personally identifiable information, for example, a
-     * name or phone number
-     * 
- * - * PII = 1; - */ - PII(1), - /** - *
-     * Personally identifiable information that is especially sensitive, for
-     * example, a passport number.
-     * 
- * - * SPII = 2; - */ - SPII(2), - /** - *
-     * Attributes that can partially identify someone, especially in
-     * combination with other attributes, like age, height, and gender.
-     * 
- * - * DEMOGRAPHIC = 3; - */ - DEMOGRAPHIC(3), - /** - *
-     * Confidential or secret information, for example, a password.
-     * 
- * - * CREDENTIAL = 4; - */ - CREDENTIAL(4), - /** - *
-     * An identification document issued by a government.
-     * 
- * - * GOVERNMENT_ID = 5; - */ - GOVERNMENT_ID(5), - /** - *
-     * A document, for example, a resume or source code.
-     * 
- * - * DOCUMENT = 6; - */ - DOCUMENT(6), - /** - *
-     * Information that is not sensitive on its own, but provides details about
-     * the circumstances surrounding an entity or an event.
-     * 
- * - * CONTEXTUAL_INFORMATION = 7; - */ - CONTEXTUAL_INFORMATION(7), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused type
-     * 
- * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Personally identifiable information, for example, a
-     * name or phone number
-     * 
- * - * PII = 1; - */ - public static final int PII_VALUE = 1; - /** - *
-     * Personally identifiable information that is especially sensitive, for
-     * example, a passport number.
-     * 
- * - * SPII = 2; - */ - public static final int SPII_VALUE = 2; - /** - *
-     * Attributes that can partially identify someone, especially in
-     * combination with other attributes, like age, height, and gender.
-     * 
- * - * DEMOGRAPHIC = 3; - */ - public static final int DEMOGRAPHIC_VALUE = 3; - /** - *
-     * Confidential or secret information, for example, a password.
-     * 
- * - * CREDENTIAL = 4; - */ - public static final int CREDENTIAL_VALUE = 4; - /** - *
-     * An identification document issued by a government.
-     * 
- * - * GOVERNMENT_ID = 5; - */ - public static final int GOVERNMENT_ID_VALUE = 5; - /** - *
-     * A document, for example, a resume or source code.
-     * 
- * - * DOCUMENT = 6; - */ - public static final int DOCUMENT_VALUE = 6; - /** - *
-     * Information that is not sensitive on its own, but provides details about
-     * the circumstances surrounding an entity or an event.
-     * 
- * - * CONTEXTUAL_INFORMATION = 7; - */ - public static final int CONTEXTUAL_INFORMATION_VALUE = 7; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCategory valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static TypeCategory forNumber(int value) { - switch (value) { - case 0: return TYPE_UNSPECIFIED; - case 1: return PII; - case 2: return SPII; - case 3: return DEMOGRAPHIC; - case 4: return CREDENTIAL; - case 5: return GOVERNMENT_ID; - case 6: return DOCUMENT; - case 7: return CONTEXTUAL_INFORMATION; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - TypeCategory> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TypeCategory findValueByNumber(int number) { - return TypeCategory.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.InfoTypeCategory.getDescriptor().getEnumTypes().get(2); - } - - private static final TypeCategory[] VALUES = values(); - - public static TypeCategory valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private TypeCategory(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.InfoTypeCategory.TypeCategory) - } - - private int categoryCase_ = 0; - private java.lang.Object category_; - public enum CategoryCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LOCATION_CATEGORY(1), - INDUSTRY_CATEGORY(2), - TYPE_CATEGORY(3), - CATEGORY_NOT_SET(0); - private final int value; - private CategoryCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static CategoryCase valueOf(int value) { - return forNumber(value); - } - - public static CategoryCase forNumber(int value) { - switch (value) { - case 1: return LOCATION_CATEGORY; - case 2: return INDUSTRY_CATEGORY; - case 3: return TYPE_CATEGORY; - case 0: return CATEGORY_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public CategoryCase - getCategoryCase() { - return CategoryCase.forNumber( - categoryCase_); - } - - public static final int LOCATION_CATEGORY_FIELD_NUMBER = 1; - /** - *
-   * The region or country that issued the ID or document represented by the
-   * infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return Whether the locationCategory field is set. - */ - public boolean hasLocationCategory() { - return categoryCase_ == 1; - } - /** - *
-   * The region or country that issued the ID or document represented by the
-   * infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return The enum numeric value on the wire for locationCategory. - */ - public int getLocationCategoryValue() { - if (categoryCase_ == 1) { - return (java.lang.Integer) category_; - } - return 0; - } - /** - *
-   * The region or country that issued the ID or document represented by the
-   * infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return The locationCategory. - */ - public com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory getLocationCategory() { - if (categoryCase_ == 1) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.valueOf( - (java.lang.Integer) category_); - return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.LOCATION_UNSPECIFIED; - } - - public static final int INDUSTRY_CATEGORY_FIELD_NUMBER = 2; - /** - *
-   * The group of relevant businesses where this infoType is commonly used
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return Whether the industryCategory field is set. - */ - public boolean hasIndustryCategory() { - return categoryCase_ == 2; - } - /** - *
-   * The group of relevant businesses where this infoType is commonly used
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return The enum numeric value on the wire for industryCategory. - */ - public int getIndustryCategoryValue() { - if (categoryCase_ == 2) { - return (java.lang.Integer) category_; - } - return 0; - } - /** - *
-   * The group of relevant businesses where this infoType is commonly used
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return The industryCategory. - */ - public com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory getIndustryCategory() { - if (categoryCase_ == 2) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.valueOf( - (java.lang.Integer) category_); - return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.INDUSTRY_UNSPECIFIED; - } - - public static final int TYPE_CATEGORY_FIELD_NUMBER = 3; - /** - *
-   * The class of identifiers where this infoType belongs
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return Whether the typeCategory field is set. - */ - public boolean hasTypeCategory() { - return categoryCase_ == 3; - } - /** - *
-   * The class of identifiers where this infoType belongs
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return The enum numeric value on the wire for typeCategory. - */ - public int getTypeCategoryValue() { - if (categoryCase_ == 3) { - return (java.lang.Integer) category_; - } - return 0; - } - /** - *
-   * The class of identifiers where this infoType belongs
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return The typeCategory. - */ - public com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory getTypeCategory() { - if (categoryCase_ == 3) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.valueOf( - (java.lang.Integer) category_); - return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.TYPE_UNSPECIFIED; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (categoryCase_ == 1) { - output.writeEnum(1, ((java.lang.Integer) category_)); - } - if (categoryCase_ == 2) { - output.writeEnum(2, ((java.lang.Integer) category_)); - } - if (categoryCase_ == 3) { - output.writeEnum(3, ((java.lang.Integer) category_)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (categoryCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, ((java.lang.Integer) category_)); - } - if (categoryCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, ((java.lang.Integer) category_)); - } - if (categoryCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, ((java.lang.Integer) category_)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeCategory)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InfoTypeCategory other = (com.google.privacy.dlp.v2.InfoTypeCategory) obj; - - if (!getCategoryCase().equals(other.getCategoryCase())) return false; - switch (categoryCase_) { - case 1: - if (getLocationCategoryValue() - != other.getLocationCategoryValue()) return false; - break; - case 2: - if (getIndustryCategoryValue() - != other.getIndustryCategoryValue()) return false; - break; - case 3: - if (getTypeCategoryValue() - != other.getTypeCategoryValue()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (categoryCase_) { - case 1: - hash = (37 * hash) + LOCATION_CATEGORY_FIELD_NUMBER; - hash = (53 * hash) + getLocationCategoryValue(); - break; - case 2: - hash = (37 * hash) + INDUSTRY_CATEGORY_FIELD_NUMBER; - hash = (53 * hash) + getIndustryCategoryValue(); - break; - case 3: - hash = (37 * hash) + TYPE_CATEGORY_FIELD_NUMBER; - hash = (53 * hash) + getTypeCategoryValue(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeCategory parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeCategory prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Classification of infoTypes to organize them according to geographic
-   * location, industry, and data type.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeCategory} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeCategory) - com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeCategory.class, com.google.privacy.dlp.v2.InfoTypeCategory.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InfoTypeCategory.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - categoryCase_ = 0; - category_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeCategory_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeCategory getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InfoTypeCategory.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeCategory build() { - com.google.privacy.dlp.v2.InfoTypeCategory result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeCategory buildPartial() { - com.google.privacy.dlp.v2.InfoTypeCategory result = new com.google.privacy.dlp.v2.InfoTypeCategory(this); - if (categoryCase_ == 1) { - result.category_ = category_; - } - if (categoryCase_ == 2) { - result.category_ = category_; - } - if (categoryCase_ == 3) { - result.category_ = category_; - } - result.categoryCase_ = categoryCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InfoTypeCategory) { - return mergeFrom((com.google.privacy.dlp.v2.InfoTypeCategory)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeCategory other) { - if (other == com.google.privacy.dlp.v2.InfoTypeCategory.getDefaultInstance()) return this; - switch (other.getCategoryCase()) { - case LOCATION_CATEGORY: { - setLocationCategoryValue(other.getLocationCategoryValue()); - break; - } - case INDUSTRY_CATEGORY: { - setIndustryCategoryValue(other.getIndustryCategoryValue()); - break; - } - case TYPE_CATEGORY: { - setTypeCategoryValue(other.getTypeCategoryValue()); - break; - } - case CATEGORY_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InfoTypeCategory parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InfoTypeCategory) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int categoryCase_ = 0; - private java.lang.Object category_; - public CategoryCase - getCategoryCase() { - return CategoryCase.forNumber( - categoryCase_); - } - - public Builder clearCategory() { - categoryCase_ = 0; - category_ = null; - onChanged(); - return this; - } - - - /** - *
-     * The region or country that issued the ID or document represented by the
-     * infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return Whether the locationCategory field is set. - */ - @java.lang.Override - public boolean hasLocationCategory() { - return categoryCase_ == 1; - } - /** - *
-     * The region or country that issued the ID or document represented by the
-     * infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return The enum numeric value on the wire for locationCategory. - */ - @java.lang.Override - public int getLocationCategoryValue() { - if (categoryCase_ == 1) { - return ((java.lang.Integer) category_).intValue(); - } - return 0; - } - /** - *
-     * The region or country that issued the ID or document represented by the
-     * infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @param value The enum numeric value on the wire for locationCategory to set. - * @return This builder for chaining. - */ - public Builder setLocationCategoryValue(int value) { - categoryCase_ = 1; - category_ = value; - onChanged(); - return this; - } - /** - *
-     * The region or country that issued the ID or document represented by the
-     * infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return The locationCategory. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory getLocationCategory() { - if (categoryCase_ == 1) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.valueOf( - (java.lang.Integer) category_); - return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory.LOCATION_UNSPECIFIED; - } - /** - *
-     * The region or country that issued the ID or document represented by the
-     * infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @param value The locationCategory to set. - * @return This builder for chaining. - */ - public Builder setLocationCategory(com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory value) { - if (value == null) { - throw new NullPointerException(); - } - categoryCase_ = 1; - category_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The region or country that issued the ID or document represented by the
-     * infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return This builder for chaining. - */ - public Builder clearLocationCategory() { - if (categoryCase_ == 1) { - categoryCase_ = 0; - category_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * The group of relevant businesses where this infoType is commonly used
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return Whether the industryCategory field is set. - */ - @java.lang.Override - public boolean hasIndustryCategory() { - return categoryCase_ == 2; - } - /** - *
-     * The group of relevant businesses where this infoType is commonly used
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return The enum numeric value on the wire for industryCategory. - */ - @java.lang.Override - public int getIndustryCategoryValue() { - if (categoryCase_ == 2) { - return ((java.lang.Integer) category_).intValue(); - } - return 0; - } - /** - *
-     * The group of relevant businesses where this infoType is commonly used
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @param value The enum numeric value on the wire for industryCategory to set. - * @return This builder for chaining. - */ - public Builder setIndustryCategoryValue(int value) { - categoryCase_ = 2; - category_ = value; - onChanged(); - return this; - } - /** - *
-     * The group of relevant businesses where this infoType is commonly used
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return The industryCategory. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory getIndustryCategory() { - if (categoryCase_ == 2) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.valueOf( - (java.lang.Integer) category_); - return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory.INDUSTRY_UNSPECIFIED; - } - /** - *
-     * The group of relevant businesses where this infoType is commonly used
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @param value The industryCategory to set. - * @return This builder for chaining. - */ - public Builder setIndustryCategory(com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory value) { - if (value == null) { - throw new NullPointerException(); - } - categoryCase_ = 2; - category_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The group of relevant businesses where this infoType is commonly used
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return This builder for chaining. - */ - public Builder clearIndustryCategory() { - if (categoryCase_ == 2) { - categoryCase_ = 0; - category_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * The class of identifiers where this infoType belongs
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return Whether the typeCategory field is set. - */ - @java.lang.Override - public boolean hasTypeCategory() { - return categoryCase_ == 3; - } - /** - *
-     * The class of identifiers where this infoType belongs
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return The enum numeric value on the wire for typeCategory. - */ - @java.lang.Override - public int getTypeCategoryValue() { - if (categoryCase_ == 3) { - return ((java.lang.Integer) category_).intValue(); - } - return 0; - } - /** - *
-     * The class of identifiers where this infoType belongs
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @param value The enum numeric value on the wire for typeCategory to set. - * @return This builder for chaining. - */ - public Builder setTypeCategoryValue(int value) { - categoryCase_ = 3; - category_ = value; - onChanged(); - return this; - } - /** - *
-     * The class of identifiers where this infoType belongs
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return The typeCategory. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory getTypeCategory() { - if (categoryCase_ == 3) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory result = com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.valueOf( - (java.lang.Integer) category_); - return result == null ? com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.UNRECOGNIZED : result; - } - return com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory.TYPE_UNSPECIFIED; - } - /** - *
-     * The class of identifiers where this infoType belongs
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @param value The typeCategory to set. - * @return This builder for chaining. - */ - public Builder setTypeCategory(com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory value) { - if (value == null) { - throw new NullPointerException(); - } - categoryCase_ = 3; - category_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The class of identifiers where this infoType belongs
-     * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return This builder for chaining. - */ - public Builder clearTypeCategory() { - if (categoryCase_ == 3) { - categoryCase_ = 0; - category_ = null; - onChanged(); - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeCategory) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeCategory) - private static final com.google.privacy.dlp.v2.InfoTypeCategory DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeCategory(); - } - - public static com.google.privacy.dlp.v2.InfoTypeCategory getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoTypeCategory parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InfoTypeCategory(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeCategory getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategoryOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategoryOrBuilder.java deleted file mode 100644 index c96f41bb1f98..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeCategoryOrBuilder.java +++ /dev/null @@ -1,98 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InfoTypeCategoryOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeCategory) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The region or country that issued the ID or document represented by the
-   * infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return Whether the locationCategory field is set. - */ - boolean hasLocationCategory(); - /** - *
-   * The region or country that issued the ID or document represented by the
-   * infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return The enum numeric value on the wire for locationCategory. - */ - int getLocationCategoryValue(); - /** - *
-   * The region or country that issued the ID or document represented by the
-   * infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.LocationCategory location_category = 1; - * @return The locationCategory. - */ - com.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory getLocationCategory(); - - /** - *
-   * The group of relevant businesses where this infoType is commonly used
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return Whether the industryCategory field is set. - */ - boolean hasIndustryCategory(); - /** - *
-   * The group of relevant businesses where this infoType is commonly used
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return The enum numeric value on the wire for industryCategory. - */ - int getIndustryCategoryValue(); - /** - *
-   * The group of relevant businesses where this infoType is commonly used
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory industry_category = 2; - * @return The industryCategory. - */ - com.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory getIndustryCategory(); - - /** - *
-   * The class of identifiers where this infoType belongs
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return Whether the typeCategory field is set. - */ - boolean hasTypeCategory(); - /** - *
-   * The class of identifiers where this infoType belongs
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return The enum numeric value on the wire for typeCategory. - */ - int getTypeCategoryValue(); - /** - *
-   * The class of identifiers where this infoType belongs
-   * 
- * - * .google.privacy.dlp.v2.InfoTypeCategory.TypeCategory type_category = 3; - * @return The typeCategory. - */ - com.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory getTypeCategory(); - - public com.google.privacy.dlp.v2.InfoTypeCategory.CategoryCase getCategoryCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java deleted file mode 100644 index 97e003288691..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescription.java +++ /dev/null @@ -1,2152 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * InfoType description.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeDescription} - */ -public final class InfoTypeDescription extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeDescription) - InfoTypeDescriptionOrBuilder { -private static final long serialVersionUID = 0L; - // Use InfoTypeDescription.newBuilder() to construct. - private InfoTypeDescription(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoTypeDescription() { - name_ = ""; - displayName_ = ""; - supportedBy_ = java.util.Collections.emptyList(); - description_ = ""; - versions_ = java.util.Collections.emptyList(); - categories_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoTypeDescription(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InfoTypeDescription( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - supportedBy_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - supportedBy_.add(rawValue); - break; - } - case 26: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - supportedBy_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - supportedBy_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - versions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - versions_.add( - input.readMessage(com.google.privacy.dlp.v2.VersionDescription.parser(), extensionRegistry)); - break; - } - case 82: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - categories_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - categories_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoTypeCategory.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - supportedBy_ = java.util.Collections.unmodifiableList(supportedBy_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - versions_ = java.util.Collections.unmodifiableList(versions_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - categories_ = java.util.Collections.unmodifiableList(categories_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeDescription.class, com.google.privacy.dlp.v2.InfoTypeDescription.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Internal name of the infoType.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Internal name of the infoType.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * Human readable form of the infoType name.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * Human readable form of the infoType name.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUPPORTED_BY_FIELD_NUMBER = 3; - private java.util.List supportedBy_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.privacy.dlp.v2.InfoTypeSupportedBy> supportedBy_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.privacy.dlp.v2.InfoTypeSupportedBy>() { - public com.google.privacy.dlp.v2.InfoTypeSupportedBy convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.InfoTypeSupportedBy result = com.google.privacy.dlp.v2.InfoTypeSupportedBy.valueOf(from); - return result == null ? com.google.privacy.dlp.v2.InfoTypeSupportedBy.UNRECOGNIZED : result; - } - }; - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return A list containing the supportedBy. - */ - @java.lang.Override - public java.util.List getSupportedByList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.privacy.dlp.v2.InfoTypeSupportedBy>(supportedBy_, supportedBy_converter_); - } - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return The count of supportedBy. - */ - @java.lang.Override - public int getSupportedByCount() { - return supportedBy_.size(); - } - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param index The index of the element to return. - * @return The supportedBy at the given index. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeSupportedBy getSupportedBy(int index) { - return supportedBy_converter_.convert(supportedBy_.get(index)); - } - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return A list containing the enum numeric values on the wire for supportedBy. - */ - @java.lang.Override - public java.util.List - getSupportedByValueList() { - return supportedBy_; - } - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of supportedBy at the given index. - */ - @java.lang.Override - public int getSupportedByValue(int index) { - return supportedBy_.get(index); - } - private int supportedByMemoizedSerializedSize; - - public static final int DESCRIPTION_FIELD_NUMBER = 4; - private volatile java.lang.Object description_; - /** - *
-   * Description of the infotype. Translated when language is provided in the
-   * request.
-   * 
- * - * string description = 4; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Description of the infotype. Translated when language is provided in the
-   * request.
-   * 
- * - * string description = 4; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSIONS_FIELD_NUMBER = 9; - private java.util.List versions_; - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - @java.lang.Override - public java.util.List getVersionsList() { - return versions_; - } - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - @java.lang.Override - public java.util.List - getVersionsOrBuilderList() { - return versions_; - } - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - @java.lang.Override - public int getVersionsCount() { - return versions_.size(); - } - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.VersionDescription getVersions(int index) { - return versions_.get(index); - } - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.VersionDescriptionOrBuilder getVersionsOrBuilder( - int index) { - return versions_.get(index); - } - - public static final int CATEGORIES_FIELD_NUMBER = 10; - private java.util.List categories_; - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - @java.lang.Override - public java.util.List getCategoriesList() { - return categories_; - } - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - @java.lang.Override - public java.util.List - getCategoriesOrBuilderList() { - return categories_; - } - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - @java.lang.Override - public int getCategoriesCount() { - return categories_.size(); - } - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeCategory getCategories(int index) { - return categories_.get(index); - } - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder getCategoriesOrBuilder( - int index) { - return categories_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (getSupportedByList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(supportedByMemoizedSerializedSize); - } - for (int i = 0; i < supportedBy_.size(); i++) { - output.writeEnumNoTag(supportedBy_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); - } - for (int i = 0; i < versions_.size(); i++) { - output.writeMessage(9, versions_.get(i)); - } - for (int i = 0; i < categories_.size(); i++) { - output.writeMessage(10, categories_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - { - int dataSize = 0; - for (int i = 0; i < supportedBy_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(supportedBy_.get(i)); - } - size += dataSize; - if (!getSupportedByList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }supportedByMemoizedSerializedSize = dataSize; - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); - } - for (int i = 0; i < versions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, versions_.get(i)); - } - for (int i = 0; i < categories_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, categories_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeDescription)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InfoTypeDescription other = (com.google.privacy.dlp.v2.InfoTypeDescription) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!supportedBy_.equals(other.supportedBy_)) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getVersionsList() - .equals(other.getVersionsList())) return false; - if (!getCategoriesList() - .equals(other.getCategoriesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (getSupportedByCount() > 0) { - hash = (37 * hash) + SUPPORTED_BY_FIELD_NUMBER; - hash = (53 * hash) + supportedBy_.hashCode(); - } - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getVersionsCount() > 0) { - hash = (37 * hash) + VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getVersionsList().hashCode(); - } - if (getCategoriesCount() > 0) { - hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; - hash = (53 * hash) + getCategoriesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeDescription parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeDescription prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * InfoType description.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeDescription} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeDescription) - com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeDescription.class, com.google.privacy.dlp.v2.InfoTypeDescription.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InfoTypeDescription.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getVersionsFieldBuilder(); - getCategoriesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - supportedBy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - description_ = ""; - - if (versionsBuilder_ == null) { - versions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - versionsBuilder_.clear(); - } - if (categoriesBuilder_ == null) { - categories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - categoriesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeDescription_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeDescription getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InfoTypeDescription.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeDescription build() { - com.google.privacy.dlp.v2.InfoTypeDescription result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeDescription buildPartial() { - com.google.privacy.dlp.v2.InfoTypeDescription result = new com.google.privacy.dlp.v2.InfoTypeDescription(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - if (((bitField0_ & 0x00000001) != 0)) { - supportedBy_ = java.util.Collections.unmodifiableList(supportedBy_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.supportedBy_ = supportedBy_; - result.description_ = description_; - if (versionsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - versions_ = java.util.Collections.unmodifiableList(versions_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.versions_ = versions_; - } else { - result.versions_ = versionsBuilder_.build(); - } - if (categoriesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - categories_ = java.util.Collections.unmodifiableList(categories_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.categories_ = categories_; - } else { - result.categories_ = categoriesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InfoTypeDescription) { - return mergeFrom((com.google.privacy.dlp.v2.InfoTypeDescription)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeDescription other) { - if (other == com.google.privacy.dlp.v2.InfoTypeDescription.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.supportedBy_.isEmpty()) { - if (supportedBy_.isEmpty()) { - supportedBy_ = other.supportedBy_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSupportedByIsMutable(); - supportedBy_.addAll(other.supportedBy_); - } - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (versionsBuilder_ == null) { - if (!other.versions_.isEmpty()) { - if (versions_.isEmpty()) { - versions_ = other.versions_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureVersionsIsMutable(); - versions_.addAll(other.versions_); - } - onChanged(); - } - } else { - if (!other.versions_.isEmpty()) { - if (versionsBuilder_.isEmpty()) { - versionsBuilder_.dispose(); - versionsBuilder_ = null; - versions_ = other.versions_; - bitField0_ = (bitField0_ & ~0x00000002); - versionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVersionsFieldBuilder() : null; - } else { - versionsBuilder_.addAllMessages(other.versions_); - } - } - } - if (categoriesBuilder_ == null) { - if (!other.categories_.isEmpty()) { - if (categories_.isEmpty()) { - categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureCategoriesIsMutable(); - categories_.addAll(other.categories_); - } - onChanged(); - } - } else { - if (!other.categories_.isEmpty()) { - if (categoriesBuilder_.isEmpty()) { - categoriesBuilder_.dispose(); - categoriesBuilder_ = null; - categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000004); - categoriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCategoriesFieldBuilder() : null; - } else { - categoriesBuilder_.addAllMessages(other.categories_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InfoTypeDescription parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InfoTypeDescription) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Internal name of the infoType.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Internal name of the infoType.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Internal name of the infoType.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Internal name of the infoType.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Internal name of the infoType.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * Human readable form of the infoType name.
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Human readable form of the infoType name.
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Human readable form of the infoType name.
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * Human readable form of the infoType name.
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * Human readable form of the infoType name.
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.util.List supportedBy_ = - java.util.Collections.emptyList(); - private void ensureSupportedByIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - supportedBy_ = new java.util.ArrayList(supportedBy_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return A list containing the supportedBy. - */ - public java.util.List getSupportedByList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.privacy.dlp.v2.InfoTypeSupportedBy>(supportedBy_, supportedBy_converter_); - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return The count of supportedBy. - */ - public int getSupportedByCount() { - return supportedBy_.size(); - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param index The index of the element to return. - * @return The supportedBy at the given index. - */ - public com.google.privacy.dlp.v2.InfoTypeSupportedBy getSupportedBy(int index) { - return supportedBy_converter_.convert(supportedBy_.get(index)); - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param index The index to set the value at. - * @param value The supportedBy to set. - * @return This builder for chaining. - */ - public Builder setSupportedBy( - int index, com.google.privacy.dlp.v2.InfoTypeSupportedBy value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedByIsMutable(); - supportedBy_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param value The supportedBy to add. - * @return This builder for chaining. - */ - public Builder addSupportedBy(com.google.privacy.dlp.v2.InfoTypeSupportedBy value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSupportedByIsMutable(); - supportedBy_.add(value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param values The supportedBy to add. - * @return This builder for chaining. - */ - public Builder addAllSupportedBy( - java.lang.Iterable values) { - ensureSupportedByIsMutable(); - for (com.google.privacy.dlp.v2.InfoTypeSupportedBy value : values) { - supportedBy_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return This builder for chaining. - */ - public Builder clearSupportedBy() { - supportedBy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return A list containing the enum numeric values on the wire for supportedBy. - */ - public java.util.List - getSupportedByValueList() { - return java.util.Collections.unmodifiableList(supportedBy_); - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of supportedBy at the given index. - */ - public int getSupportedByValue(int index) { - return supportedBy_.get(index); - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for supportedBy to set. - * @return This builder for chaining. - */ - public Builder setSupportedByValue( - int index, int value) { - ensureSupportedByIsMutable(); - supportedBy_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param value The enum numeric value on the wire for supportedBy to add. - * @return This builder for chaining. - */ - public Builder addSupportedByValue(int value) { - ensureSupportedByIsMutable(); - supportedBy_.add(value); - onChanged(); - return this; - } - /** - *
-     * Which parts of the API supports this InfoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param values The enum numeric values on the wire for supportedBy to add. - * @return This builder for chaining. - */ - public Builder addAllSupportedByValue( - java.lang.Iterable values) { - ensureSupportedByIsMutable(); - for (int value : values) { - supportedBy_.add(value); - } - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Description of the infotype. Translated when language is provided in the
-     * request.
-     * 
- * - * string description = 4; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Description of the infotype. Translated when language is provided in the
-     * request.
-     * 
- * - * string description = 4; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Description of the infotype. Translated when language is provided in the
-     * request.
-     * 
- * - * string description = 4; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Description of the infotype. Translated when language is provided in the
-     * request.
-     * 
- * - * string description = 4; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Description of the infotype. Translated when language is provided in the
-     * request.
-     * 
- * - * string description = 4; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.util.List versions_ = - java.util.Collections.emptyList(); - private void ensureVersionsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - versions_ = new java.util.ArrayList(versions_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.VersionDescription, com.google.privacy.dlp.v2.VersionDescription.Builder, com.google.privacy.dlp.v2.VersionDescriptionOrBuilder> versionsBuilder_; - - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public java.util.List getVersionsList() { - if (versionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(versions_); - } else { - return versionsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public int getVersionsCount() { - if (versionsBuilder_ == null) { - return versions_.size(); - } else { - return versionsBuilder_.getCount(); - } - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public com.google.privacy.dlp.v2.VersionDescription getVersions(int index) { - if (versionsBuilder_ == null) { - return versions_.get(index); - } else { - return versionsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public Builder setVersions( - int index, com.google.privacy.dlp.v2.VersionDescription value) { - if (versionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionsIsMutable(); - versions_.set(index, value); - onChanged(); - } else { - versionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public Builder setVersions( - int index, com.google.privacy.dlp.v2.VersionDescription.Builder builderForValue) { - if (versionsBuilder_ == null) { - ensureVersionsIsMutable(); - versions_.set(index, builderForValue.build()); - onChanged(); - } else { - versionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public Builder addVersions(com.google.privacy.dlp.v2.VersionDescription value) { - if (versionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionsIsMutable(); - versions_.add(value); - onChanged(); - } else { - versionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public Builder addVersions( - int index, com.google.privacy.dlp.v2.VersionDescription value) { - if (versionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionsIsMutable(); - versions_.add(index, value); - onChanged(); - } else { - versionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public Builder addVersions( - com.google.privacy.dlp.v2.VersionDescription.Builder builderForValue) { - if (versionsBuilder_ == null) { - ensureVersionsIsMutable(); - versions_.add(builderForValue.build()); - onChanged(); - } else { - versionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public Builder addVersions( - int index, com.google.privacy.dlp.v2.VersionDescription.Builder builderForValue) { - if (versionsBuilder_ == null) { - ensureVersionsIsMutable(); - versions_.add(index, builderForValue.build()); - onChanged(); - } else { - versionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public Builder addAllVersions( - java.lang.Iterable values) { - if (versionsBuilder_ == null) { - ensureVersionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, versions_); - onChanged(); - } else { - versionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public Builder clearVersions() { - if (versionsBuilder_ == null) { - versions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - versionsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public Builder removeVersions(int index) { - if (versionsBuilder_ == null) { - ensureVersionsIsMutable(); - versions_.remove(index); - onChanged(); - } else { - versionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public com.google.privacy.dlp.v2.VersionDescription.Builder getVersionsBuilder( - int index) { - return getVersionsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public com.google.privacy.dlp.v2.VersionDescriptionOrBuilder getVersionsOrBuilder( - int index) { - if (versionsBuilder_ == null) { - return versions_.get(index); } else { - return versionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public java.util.List - getVersionsOrBuilderList() { - if (versionsBuilder_ != null) { - return versionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(versions_); - } - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public com.google.privacy.dlp.v2.VersionDescription.Builder addVersionsBuilder() { - return getVersionsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.VersionDescription.getDefaultInstance()); - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public com.google.privacy.dlp.v2.VersionDescription.Builder addVersionsBuilder( - int index) { - return getVersionsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.VersionDescription.getDefaultInstance()); - } - /** - *
-     * A list of available versions for the infotype.
-     * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - public java.util.List - getVersionsBuilderList() { - return getVersionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.VersionDescription, com.google.privacy.dlp.v2.VersionDescription.Builder, com.google.privacy.dlp.v2.VersionDescriptionOrBuilder> - getVersionsFieldBuilder() { - if (versionsBuilder_ == null) { - versionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.VersionDescription, com.google.privacy.dlp.v2.VersionDescription.Builder, com.google.privacy.dlp.v2.VersionDescriptionOrBuilder>( - versions_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - versions_ = null; - } - return versionsBuilder_; - } - - private java.util.List categories_ = - java.util.Collections.emptyList(); - private void ensureCategoriesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - categories_ = new java.util.ArrayList(categories_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeCategory, com.google.privacy.dlp.v2.InfoTypeCategory.Builder, com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder> categoriesBuilder_; - - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public java.util.List getCategoriesList() { - if (categoriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(categories_); - } else { - return categoriesBuilder_.getMessageList(); - } - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public int getCategoriesCount() { - if (categoriesBuilder_ == null) { - return categories_.size(); - } else { - return categoriesBuilder_.getCount(); - } - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public com.google.privacy.dlp.v2.InfoTypeCategory getCategories(int index) { - if (categoriesBuilder_ == null) { - return categories_.get(index); - } else { - return categoriesBuilder_.getMessage(index); - } - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public Builder setCategories( - int index, com.google.privacy.dlp.v2.InfoTypeCategory value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.set(index, value); - onChanged(); - } else { - categoriesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public Builder setCategories( - int index, com.google.privacy.dlp.v2.InfoTypeCategory.Builder builderForValue) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.set(index, builderForValue.build()); - onChanged(); - } else { - categoriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public Builder addCategories(com.google.privacy.dlp.v2.InfoTypeCategory value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.add(value); - onChanged(); - } else { - categoriesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public Builder addCategories( - int index, com.google.privacy.dlp.v2.InfoTypeCategory value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesIsMutable(); - categories_.add(index, value); - onChanged(); - } else { - categoriesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public Builder addCategories( - com.google.privacy.dlp.v2.InfoTypeCategory.Builder builderForValue) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.add(builderForValue.build()); - onChanged(); - } else { - categoriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public Builder addCategories( - int index, com.google.privacy.dlp.v2.InfoTypeCategory.Builder builderForValue) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.add(index, builderForValue.build()); - onChanged(); - } else { - categoriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public Builder addAllCategories( - java.lang.Iterable values) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, categories_); - onChanged(); - } else { - categoriesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public Builder clearCategories() { - if (categoriesBuilder_ == null) { - categories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - categoriesBuilder_.clear(); - } - return this; - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public Builder removeCategories(int index) { - if (categoriesBuilder_ == null) { - ensureCategoriesIsMutable(); - categories_.remove(index); - onChanged(); - } else { - categoriesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public com.google.privacy.dlp.v2.InfoTypeCategory.Builder getCategoriesBuilder( - int index) { - return getCategoriesFieldBuilder().getBuilder(index); - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder getCategoriesOrBuilder( - int index) { - if (categoriesBuilder_ == null) { - return categories_.get(index); } else { - return categoriesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public java.util.List - getCategoriesOrBuilderList() { - if (categoriesBuilder_ != null) { - return categoriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(categories_); - } - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public com.google.privacy.dlp.v2.InfoTypeCategory.Builder addCategoriesBuilder() { - return getCategoriesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoTypeCategory.getDefaultInstance()); - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public com.google.privacy.dlp.v2.InfoTypeCategory.Builder addCategoriesBuilder( - int index) { - return getCategoriesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoTypeCategory.getDefaultInstance()); - } - /** - *
-     * The category of the infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - public java.util.List - getCategoriesBuilderList() { - return getCategoriesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeCategory, com.google.privacy.dlp.v2.InfoTypeCategory.Builder, com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder> - getCategoriesFieldBuilder() { - if (categoriesBuilder_ == null) { - categoriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeCategory, com.google.privacy.dlp.v2.InfoTypeCategory.Builder, com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder>( - categories_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - categories_ = null; - } - return categoriesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeDescription) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeDescription) - private static final com.google.privacy.dlp.v2.InfoTypeDescription DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeDescription(); - } - - public static com.google.privacy.dlp.v2.InfoTypeDescription getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoTypeDescription parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InfoTypeDescription(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeDescription getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java deleted file mode 100644 index 4cff91fbbc25..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeDescriptionOrBuilder.java +++ /dev/null @@ -1,208 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InfoTypeDescriptionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeDescription) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Internal name of the infoType.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Internal name of the infoType.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Human readable form of the infoType name.
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * Human readable form of the infoType name.
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return A list containing the supportedBy. - */ - java.util.List getSupportedByList(); - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return The count of supportedBy. - */ - int getSupportedByCount(); - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param index The index of the element to return. - * @return The supportedBy at the given index. - */ - com.google.privacy.dlp.v2.InfoTypeSupportedBy getSupportedBy(int index); - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @return A list containing the enum numeric values on the wire for supportedBy. - */ - java.util.List - getSupportedByValueList(); - /** - *
-   * Which parts of the API supports this InfoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSupportedBy supported_by = 3; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of supportedBy at the given index. - */ - int getSupportedByValue(int index); - - /** - *
-   * Description of the infotype. Translated when language is provided in the
-   * request.
-   * 
- * - * string description = 4; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Description of the infotype. Translated when language is provided in the
-   * request.
-   * 
- * - * string description = 4; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - java.util.List - getVersionsList(); - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - com.google.privacy.dlp.v2.VersionDescription getVersions(int index); - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - int getVersionsCount(); - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - java.util.List - getVersionsOrBuilderList(); - /** - *
-   * A list of available versions for the infotype.
-   * 
- * - * repeated .google.privacy.dlp.v2.VersionDescription versions = 9; - */ - com.google.privacy.dlp.v2.VersionDescriptionOrBuilder getVersionsOrBuilder( - int index); - - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - java.util.List - getCategoriesList(); - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - com.google.privacy.dlp.v2.InfoTypeCategory getCategories(int index); - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - int getCategoriesCount(); - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - java.util.List - getCategoriesOrBuilderList(); - /** - *
-   * The category of the infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeCategory categories = 10; - */ - com.google.privacy.dlp.v2.InfoTypeCategoryOrBuilder getCategoriesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java deleted file mode 100644 index 7786b7ba3207..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface InfoTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoType) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Name of the information type. Either a name of your choosing when
-   * creating a CustomInfoType, or one of the names listed
-   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
-   * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
-   * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Name of the information type. Either a name of your choosing when
-   * creating a CustomInfoType, or one of the names listed
-   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
-   * a built-in type.  When sending Cloud DLP results to Data Catalog, infoType
-   * names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Optional version name for this InfoType.
-   * 
- * - * string version = 2; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * Optional version name for this InfoType.
-   * 
- * - * string version = 2; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStats.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStats.java deleted file mode 100644 index 888d991e20c2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStats.java +++ /dev/null @@ -1,746 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Statistics regarding a specific InfoType.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeStats} - */ -public final class InfoTypeStats extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeStats) - InfoTypeStatsOrBuilder { -private static final long serialVersionUID = 0L; - // Use InfoTypeStats.newBuilder() to construct. - private InfoTypeStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoTypeStats() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoTypeStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InfoTypeStats( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (infoType_ != null) { - subBuilder = infoType_.toBuilder(); - } - infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infoType_); - infoType_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - count_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeStats.class, com.google.privacy.dlp.v2.InfoTypeStats.Builder.class); - } - - public static final int INFO_TYPE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.InfoType infoType_; - /** - *
-   * The type of finding this stat is for.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return infoType_ != null; - } - /** - *
-   * The type of finding this stat is for.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - /** - *
-   * The type of finding this stat is for.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - return getInfoType(); - } - - public static final int COUNT_FIELD_NUMBER = 2; - private long count_; - /** - *
-   * Number of findings for this infoType.
-   * 
- * - * int64 count = 2; - * @return The count. - */ - @java.lang.Override - public long getCount() { - return count_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (infoType_ != null) { - output.writeMessage(1, getInfoType()); - } - if (count_ != 0L) { - output.writeInt64(2, count_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (infoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInfoType()); - } - if (count_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, count_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeStats)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InfoTypeStats other = (com.google.privacy.dlp.v2.InfoTypeStats) obj; - - if (hasInfoType() != other.hasInfoType()) return false; - if (hasInfoType()) { - if (!getInfoType() - .equals(other.getInfoType())) return false; - } - if (getCount() - != other.getCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInfoType()) { - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - } - hash = (37 * hash) + COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Statistics regarding a specific InfoType.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeStats} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeStats) - com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeStats.class, com.google.privacy.dlp.v2.InfoTypeStats.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InfoTypeStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypeBuilder_ == null) { - infoType_ = null; - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - count_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeStats_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeStats getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InfoTypeStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeStats build() { - com.google.privacy.dlp.v2.InfoTypeStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeStats buildPartial() { - com.google.privacy.dlp.v2.InfoTypeStats result = new com.google.privacy.dlp.v2.InfoTypeStats(this); - if (infoTypeBuilder_ == null) { - result.infoType_ = infoType_; - } else { - result.infoType_ = infoTypeBuilder_.build(); - } - result.count_ = count_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InfoTypeStats) { - return mergeFrom((com.google.privacy.dlp.v2.InfoTypeStats)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeStats other) { - if (other == com.google.privacy.dlp.v2.InfoTypeStats.getDefaultInstance()) return this; - if (other.hasInfoType()) { - mergeInfoType(other.getInfoType()); - } - if (other.getCount() != 0L) { - setCount(other.getCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InfoTypeStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InfoTypeStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.InfoType infoType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-     * The type of finding this stat is for.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - public boolean hasInfoType() { - return infoTypeBuilder_ != null || infoType_ != null; - } - /** - *
-     * The type of finding this stat is for.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } else { - return infoTypeBuilder_.getMessage(); - } - } - /** - *
-     * The type of finding this stat is for.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infoType_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The type of finding this stat is for.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - infoType_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The type of finding this stat is for.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (infoType_ != null) { - infoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); - } else { - infoType_ = value; - } - onChanged(); - } else { - infoTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The type of finding this stat is for.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - infoType_ = null; - onChanged(); - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - - return this; - } - /** - *
-     * The type of finding this stat is for.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - - onChanged(); - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-     * The type of finding this stat is for.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (infoTypeBuilder_ != null) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - return infoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - } - /** - *
-     * The type of finding this stat is for.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getInfoType(), - getParentForChildren(), - isClean()); - infoType_ = null; - } - return infoTypeBuilder_; - } - - private long count_ ; - /** - *
-     * Number of findings for this infoType.
-     * 
- * - * int64 count = 2; - * @return The count. - */ - @java.lang.Override - public long getCount() { - return count_; - } - /** - *
-     * Number of findings for this infoType.
-     * 
- * - * int64 count = 2; - * @param value The count to set. - * @return This builder for chaining. - */ - public Builder setCount(long value) { - - count_ = value; - onChanged(); - return this; - } - /** - *
-     * Number of findings for this infoType.
-     * 
- * - * int64 count = 2; - * @return This builder for chaining. - */ - public Builder clearCount() { - - count_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeStats) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeStats) - private static final com.google.privacy.dlp.v2.InfoTypeStats DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeStats(); - } - - public static com.google.privacy.dlp.v2.InfoTypeStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoTypeStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InfoTypeStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStatsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStatsOrBuilder.java deleted file mode 100644 index da42c2c2c08c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeStatsOrBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InfoTypeStatsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeStats) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The type of finding this stat is for.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-   * The type of finding this stat is for.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-   * The type of finding this stat is for.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-   * Number of findings for this infoType.
-   * 
- * - * int64 count = 2; - * @return The count. - */ - long getCount(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java deleted file mode 100644 index e626f5c9921b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummary.java +++ /dev/null @@ -1,749 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The infoType details for this column.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeSummary} - */ -public final class InfoTypeSummary extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeSummary) - InfoTypeSummaryOrBuilder { -private static final long serialVersionUID = 0L; - // Use InfoTypeSummary.newBuilder() to construct. - private InfoTypeSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoTypeSummary() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoTypeSummary(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InfoTypeSummary( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (infoType_ != null) { - subBuilder = infoType_.toBuilder(); - } - infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infoType_); - infoType_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - estimatedPrevalence_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeSummary.class, com.google.privacy.dlp.v2.InfoTypeSummary.Builder.class); - } - - public static final int INFO_TYPE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.InfoType infoType_; - /** - *
-   * The infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return infoType_ != null; - } - /** - *
-   * The infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - /** - *
-   * The infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - return getInfoType(); - } - - public static final int ESTIMATED_PREVALENCE_FIELD_NUMBER = 2; - private int estimatedPrevalence_; - /** - *
-   * Approximate percentage of non-null rows that contained data detected by
-   * this infotype.
-   * 
- * - * int32 estimated_prevalence = 2; - * @return The estimatedPrevalence. - */ - @java.lang.Override - public int getEstimatedPrevalence() { - return estimatedPrevalence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (infoType_ != null) { - output.writeMessage(1, getInfoType()); - } - if (estimatedPrevalence_ != 0) { - output.writeInt32(2, estimatedPrevalence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (infoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInfoType()); - } - if (estimatedPrevalence_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, estimatedPrevalence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeSummary)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InfoTypeSummary other = (com.google.privacy.dlp.v2.InfoTypeSummary) obj; - - if (hasInfoType() != other.hasInfoType()) return false; - if (hasInfoType()) { - if (!getInfoType() - .equals(other.getInfoType())) return false; - } - if (getEstimatedPrevalence() - != other.getEstimatedPrevalence()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInfoType()) { - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - } - hash = (37 * hash) + ESTIMATED_PREVALENCE_FIELD_NUMBER; - hash = (53 * hash) + getEstimatedPrevalence(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeSummary parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeSummary prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The infoType details for this column.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeSummary} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeSummary) - com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeSummary.class, com.google.privacy.dlp.v2.InfoTypeSummary.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InfoTypeSummary.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypeBuilder_ == null) { - infoType_ = null; - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - estimatedPrevalence_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeSummary_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeSummary getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InfoTypeSummary.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeSummary build() { - com.google.privacy.dlp.v2.InfoTypeSummary result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeSummary buildPartial() { - com.google.privacy.dlp.v2.InfoTypeSummary result = new com.google.privacy.dlp.v2.InfoTypeSummary(this); - if (infoTypeBuilder_ == null) { - result.infoType_ = infoType_; - } else { - result.infoType_ = infoTypeBuilder_.build(); - } - result.estimatedPrevalence_ = estimatedPrevalence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InfoTypeSummary) { - return mergeFrom((com.google.privacy.dlp.v2.InfoTypeSummary)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeSummary other) { - if (other == com.google.privacy.dlp.v2.InfoTypeSummary.getDefaultInstance()) return this; - if (other.hasInfoType()) { - mergeInfoType(other.getInfoType()); - } - if (other.getEstimatedPrevalence() != 0) { - setEstimatedPrevalence(other.getEstimatedPrevalence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InfoTypeSummary parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InfoTypeSummary) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.InfoType infoType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-     * The infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - public boolean hasInfoType() { - return infoTypeBuilder_ != null || infoType_ != null; - } - /** - *
-     * The infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } else { - return infoTypeBuilder_.getMessage(); - } - } - /** - *
-     * The infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infoType_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - infoType_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (infoType_ != null) { - infoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); - } else { - infoType_ = value; - } - onChanged(); - } else { - infoTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - infoType_ = null; - onChanged(); - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - - return this; - } - /** - *
-     * The infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - - onChanged(); - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-     * The infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (infoTypeBuilder_ != null) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - return infoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - } - /** - *
-     * The infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getInfoType(), - getParentForChildren(), - isClean()); - infoType_ = null; - } - return infoTypeBuilder_; - } - - private int estimatedPrevalence_ ; - /** - *
-     * Approximate percentage of non-null rows that contained data detected by
-     * this infotype.
-     * 
- * - * int32 estimated_prevalence = 2; - * @return The estimatedPrevalence. - */ - @java.lang.Override - public int getEstimatedPrevalence() { - return estimatedPrevalence_; - } - /** - *
-     * Approximate percentage of non-null rows that contained data detected by
-     * this infotype.
-     * 
- * - * int32 estimated_prevalence = 2; - * @param value The estimatedPrevalence to set. - * @return This builder for chaining. - */ - public Builder setEstimatedPrevalence(int value) { - - estimatedPrevalence_ = value; - onChanged(); - return this; - } - /** - *
-     * Approximate percentage of non-null rows that contained data detected by
-     * this infotype.
-     * 
- * - * int32 estimated_prevalence = 2; - * @return This builder for chaining. - */ - public Builder clearEstimatedPrevalence() { - - estimatedPrevalence_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeSummary) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeSummary) - private static final com.google.privacy.dlp.v2.InfoTypeSummary DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeSummary(); - } - - public static com.google.privacy.dlp.v2.InfoTypeSummary getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoTypeSummary parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InfoTypeSummary(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeSummary getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java deleted file mode 100644 index cd8629d71fbd..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSummaryOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InfoTypeSummaryOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeSummary) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-   * The infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-   * The infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-   * Approximate percentage of non-null rows that contained data detected by
-   * this infotype.
-   * 
- * - * int32 estimated_prevalence = 2; - * @return The estimatedPrevalence. - */ - int getEstimatedPrevalence(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java deleted file mode 100644 index 71eedcbc43cd..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeSupportedBy.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Parts of the APIs which use certain infoTypes.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.InfoTypeSupportedBy} - */ -public enum InfoTypeSupportedBy - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unused.
-   * 
- * - * ENUM_TYPE_UNSPECIFIED = 0; - */ - ENUM_TYPE_UNSPECIFIED(0), - /** - *
-   * Supported by the inspect operations.
-   * 
- * - * INSPECT = 1; - */ - INSPECT(1), - /** - *
-   * Supported by the risk analysis operations.
-   * 
- * - * RISK_ANALYSIS = 2; - */ - RISK_ANALYSIS(2), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unused.
-   * 
- * - * ENUM_TYPE_UNSPECIFIED = 0; - */ - public static final int ENUM_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-   * Supported by the inspect operations.
-   * 
- * - * INSPECT = 1; - */ - public static final int INSPECT_VALUE = 1; - /** - *
-   * Supported by the risk analysis operations.
-   * 
- * - * RISK_ANALYSIS = 2; - */ - public static final int RISK_ANALYSIS_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static InfoTypeSupportedBy valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static InfoTypeSupportedBy forNumber(int value) { - switch (value) { - case 0: return ENUM_TYPE_UNSPECIFIED; - case 1: return INSPECT; - case 2: return RISK_ANALYSIS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - InfoTypeSupportedBy> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public InfoTypeSupportedBy findValueByNumber(int number) { - return InfoTypeSupportedBy.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(7); - } - - private static final InfoTypeSupportedBy[] VALUES = values(); - - public static InfoTypeSupportedBy valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private InfoTypeSupportedBy(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.InfoTypeSupportedBy) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java deleted file mode 100644 index 4b759eb02eb8..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java +++ /dev/null @@ -1,2137 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A type of transformation that will scan unstructured text and
- * apply various `PrimitiveTransformation`s to each finding, where the
- * transformation is applied to only values that were identified as a specific
- * info_type.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeTransformations} - */ -public final class InfoTypeTransformations extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeTransformations) - InfoTypeTransformationsOrBuilder { -private static final long serialVersionUID = 0L; - // Use InfoTypeTransformations.newBuilder() to construct. - private InfoTypeTransformations(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoTypeTransformations() { - transformations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoTypeTransformations(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InfoTypeTransformations( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - transformations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - transformations_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - transformations_ = java.util.Collections.unmodifiableList(transformations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeTransformations.class, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder.class); - } - - public interface InfoTypeTransformationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - java.util.List - getInfoTypesList(); - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - int getInfoTypesCount(); - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - java.util.List - getInfoTypesOrBuilderList(); - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index); - - /** - *
-     * Required. Primitive transformation to apply to the infoType.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the primitiveTransformation field is set. - */ - boolean hasPrimitiveTransformation(); - /** - *
-     * Required. Primitive transformation to apply to the infoType.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The primitiveTransformation. - */ - com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation(); - /** - *
-     * Required. Primitive transformation to apply to the infoType.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder(); - } - /** - *
-   * A transformation to apply to text that is identified as a specific
-   * info_type.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation} - */ - public static final class InfoTypeTransformation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) - InfoTypeTransformationOrBuilder { - private static final long serialVersionUID = 0L; - // Use InfoTypeTransformation.newBuilder() to construct. - private InfoTypeTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoTypeTransformation() { - infoTypes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoTypeTransformation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InfoTypeTransformation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - infoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.privacy.dlp.v2.PrimitiveTransformation.Builder subBuilder = null; - if (primitiveTransformation_ != null) { - subBuilder = primitiveTransformation_.toBuilder(); - } - primitiveTransformation_ = input.readMessage(com.google.privacy.dlp.v2.PrimitiveTransformation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(primitiveTransformation_); - primitiveTransformation_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.class, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder.class); - } - - public static final int INFO_TYPES_FIELD_NUMBER = 1; - private java.util.List infoTypes_; - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public java.util.List getInfoTypesList() { - return infoTypes_; - } - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public java.util.List - getInfoTypesOrBuilderList() { - return infoTypes_; - } - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public int getInfoTypesCount() { - return infoTypes_.size(); - } - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { - return infoTypes_.get(index); - } - /** - *
-     * InfoTypes to apply the transformation to. An empty list will cause
-     * this transformation to apply to all findings that correspond to
-     * infoTypes that were requested in `InspectConfig`.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { - return infoTypes_.get(index); - } - - public static final int PRIMITIVE_TRANSFORMATION_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.PrimitiveTransformation primitiveTransformation_; - /** - *
-     * Required. Primitive transformation to apply to the infoType.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the primitiveTransformation field is set. - */ - @java.lang.Override - public boolean hasPrimitiveTransformation() { - return primitiveTransformation_ != null; - } - /** - *
-     * Required. Primitive transformation to apply to the infoType.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The primitiveTransformation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() { - return primitiveTransformation_ == null ? com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : primitiveTransformation_; - } - /** - *
-     * Required. Primitive transformation to apply to the infoType.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder() { - return getPrimitiveTransformation(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < infoTypes_.size(); i++) { - output.writeMessage(1, infoTypes_.get(i)); - } - if (primitiveTransformation_ != null) { - output.writeMessage(2, getPrimitiveTransformation()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < infoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, infoTypes_.get(i)); - } - if (primitiveTransformation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getPrimitiveTransformation()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation other = (com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) obj; - - if (!getInfoTypesList() - .equals(other.getInfoTypesList())) return false; - if (hasPrimitiveTransformation() != other.hasPrimitiveTransformation()) return false; - if (hasPrimitiveTransformation()) { - if (!getPrimitiveTransformation() - .equals(other.getPrimitiveTransformation())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getInfoTypesCount() > 0) { - hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getInfoTypesList().hashCode(); - } - if (hasPrimitiveTransformation()) { - hash = (37 * hash) + PRIMITIVE_TRANSFORMATION_FIELD_NUMBER; - hash = (53 * hash) + getPrimitiveTransformation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A transformation to apply to text that is identified as a specific
-     * info_type.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.class, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoTypesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - infoTypesBuilder_.clear(); - } - if (primitiveTransformationBuilder_ == null) { - primitiveTransformation_ = null; - } else { - primitiveTransformation_ = null; - primitiveTransformationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation build() { - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation buildPartial() { - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation result = new com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation(this); - int from_bitField0_ = bitField0_; - if (infoTypesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.infoTypes_ = infoTypes_; - } else { - result.infoTypes_ = infoTypesBuilder_.build(); - } - if (primitiveTransformationBuilder_ == null) { - result.primitiveTransformation_ = primitiveTransformation_; - } else { - result.primitiveTransformation_ = primitiveTransformationBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) { - return mergeFrom((com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation other) { - if (other == com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.getDefaultInstance()) return this; - if (infoTypesBuilder_ == null) { - if (!other.infoTypes_.isEmpty()) { - if (infoTypes_.isEmpty()) { - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInfoTypesIsMutable(); - infoTypes_.addAll(other.infoTypes_); - } - onChanged(); - } - } else { - if (!other.infoTypes_.isEmpty()) { - if (infoTypesBuilder_.isEmpty()) { - infoTypesBuilder_.dispose(); - infoTypesBuilder_ = null; - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - infoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInfoTypesFieldBuilder() : null; - } else { - infoTypesBuilder_.addAllMessages(other.infoTypes_); - } - } - } - if (other.hasPrimitiveTransformation()) { - mergePrimitiveTransformation(other.getPrimitiveTransformation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List infoTypes_ = - java.util.Collections.emptyList(); - private void ensureInfoTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(infoTypes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; - - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List getInfoTypesList() { - if (infoTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(infoTypes_); - } else { - return infoTypesBuilder_.getMessageList(); - } - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public int getInfoTypesCount() { - if (infoTypesBuilder_ == null) { - return infoTypes_.size(); - } else { - return infoTypesBuilder_.getCount(); - } - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); - } else { - return infoTypesBuilder_.getMessage(index); - } - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.set(index, value); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(index, value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addAllInfoTypes( - java.lang.Iterable values) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, infoTypes_); - onChanged(); - } else { - infoTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder clearInfoTypes() { - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - infoTypesBuilder_.clear(); - } - return this; - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder removeInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.remove(index); - onChanged(); - } else { - infoTypesBuilder_.remove(index); - } - return this; - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().getBuilder(index); - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); } else { - return infoTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List - getInfoTypesOrBuilderList() { - if (infoTypesBuilder_ != null) { - return infoTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(infoTypes_); - } - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { - return getInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); - } - /** - *
-       * InfoTypes to apply the transformation to. An empty list will cause
-       * this transformation to apply to all findings that correspond to
-       * infoTypes that were requested in `InspectConfig`.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List - getInfoTypesBuilderList() { - return getInfoTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypesFieldBuilder() { - if (infoTypesBuilder_ == null) { - infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - infoTypes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - infoTypes_ = null; - } - return infoTypesBuilder_; - } - - private com.google.privacy.dlp.v2.PrimitiveTransformation primitiveTransformation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> primitiveTransformationBuilder_; - /** - *
-       * Required. Primitive transformation to apply to the infoType.
-       * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the primitiveTransformation field is set. - */ - public boolean hasPrimitiveTransformation() { - return primitiveTransformationBuilder_ != null || primitiveTransformation_ != null; - } - /** - *
-       * Required. Primitive transformation to apply to the infoType.
-       * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The primitiveTransformation. - */ - public com.google.privacy.dlp.v2.PrimitiveTransformation getPrimitiveTransformation() { - if (primitiveTransformationBuilder_ == null) { - return primitiveTransformation_ == null ? com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : primitiveTransformation_; - } else { - return primitiveTransformationBuilder_.getMessage(); - } - } - /** - *
-       * Required. Primitive transformation to apply to the infoType.
-       * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPrimitiveTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { - if (primitiveTransformationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - primitiveTransformation_ = value; - onChanged(); - } else { - primitiveTransformationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Required. Primitive transformation to apply to the infoType.
-       * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setPrimitiveTransformation( - com.google.privacy.dlp.v2.PrimitiveTransformation.Builder builderForValue) { - if (primitiveTransformationBuilder_ == null) { - primitiveTransformation_ = builderForValue.build(); - onChanged(); - } else { - primitiveTransformationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Required. Primitive transformation to apply to the infoType.
-       * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergePrimitiveTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { - if (primitiveTransformationBuilder_ == null) { - if (primitiveTransformation_ != null) { - primitiveTransformation_ = - com.google.privacy.dlp.v2.PrimitiveTransformation.newBuilder(primitiveTransformation_).mergeFrom(value).buildPartial(); - } else { - primitiveTransformation_ = value; - } - onChanged(); - } else { - primitiveTransformationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Required. Primitive transformation to apply to the infoType.
-       * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearPrimitiveTransformation() { - if (primitiveTransformationBuilder_ == null) { - primitiveTransformation_ = null; - onChanged(); - } else { - primitiveTransformation_ = null; - primitiveTransformationBuilder_ = null; - } - - return this; - } - /** - *
-       * Required. Primitive transformation to apply to the infoType.
-       * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrimitiveTransformation.Builder getPrimitiveTransformationBuilder() { - - onChanged(); - return getPrimitiveTransformationFieldBuilder().getBuilder(); - } - /** - *
-       * Required. Primitive transformation to apply to the infoType.
-       * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getPrimitiveTransformationOrBuilder() { - if (primitiveTransformationBuilder_ != null) { - return primitiveTransformationBuilder_.getMessageOrBuilder(); - } else { - return primitiveTransformation_ == null ? - com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : primitiveTransformation_; - } - } - /** - *
-       * Required. Primitive transformation to apply to the infoType.
-       * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation primitive_transformation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> - getPrimitiveTransformationFieldBuilder() { - if (primitiveTransformationBuilder_ == null) { - primitiveTransformationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder>( - getPrimitiveTransformation(), - getParentForChildren(), - isClean()); - primitiveTransformation_ = null; - } - return primitiveTransformationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) - private static final com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation(); - } - - public static com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoTypeTransformation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InfoTypeTransformation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int TRANSFORMATIONS_FIELD_NUMBER = 1; - private java.util.List transformations_; - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getTransformationsList() { - return transformations_; - } - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getTransformationsOrBuilderList() { - return transformations_; - } - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getTransformationsCount() { - return transformations_.size(); - } - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getTransformations(int index) { - return transformations_.get(index); - } - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder getTransformationsOrBuilder( - int index) { - return transformations_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < transformations_.size(); i++) { - output.writeMessage(1, transformations_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < transformations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, transformations_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InfoTypeTransformations)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InfoTypeTransformations other = (com.google.privacy.dlp.v2.InfoTypeTransformations) obj; - - if (!getTransformationsList() - .equals(other.getTransformationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getTransformationsCount() > 0) { - hash = (37 * hash) + TRANSFORMATIONS_FIELD_NUMBER; - hash = (53 * hash) + getTransformationsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InfoTypeTransformations parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InfoTypeTransformations prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A type of transformation that will scan unstructured text and
-   * apply various `PrimitiveTransformation`s to each finding, where the
-   * transformation is applied to only values that were identified as a specific
-   * info_type.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InfoTypeTransformations} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InfoTypeTransformations) - com.google.privacy.dlp.v2.InfoTypeTransformationsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InfoTypeTransformations.class, com.google.privacy.dlp.v2.InfoTypeTransformations.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InfoTypeTransformations.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getTransformationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (transformationsBuilder_ == null) { - transformations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - transformationsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations build() { - com.google.privacy.dlp.v2.InfoTypeTransformations result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations buildPartial() { - com.google.privacy.dlp.v2.InfoTypeTransformations result = new com.google.privacy.dlp.v2.InfoTypeTransformations(this); - int from_bitField0_ = bitField0_; - if (transformationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - transformations_ = java.util.Collections.unmodifiableList(transformations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.transformations_ = transformations_; - } else { - result.transformations_ = transformationsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InfoTypeTransformations) { - return mergeFrom((com.google.privacy.dlp.v2.InfoTypeTransformations)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InfoTypeTransformations other) { - if (other == com.google.privacy.dlp.v2.InfoTypeTransformations.getDefaultInstance()) return this; - if (transformationsBuilder_ == null) { - if (!other.transformations_.isEmpty()) { - if (transformations_.isEmpty()) { - transformations_ = other.transformations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTransformationsIsMutable(); - transformations_.addAll(other.transformations_); - } - onChanged(); - } - } else { - if (!other.transformations_.isEmpty()) { - if (transformationsBuilder_.isEmpty()) { - transformationsBuilder_.dispose(); - transformationsBuilder_ = null; - transformations_ = other.transformations_; - bitField0_ = (bitField0_ & ~0x00000001); - transformationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTransformationsFieldBuilder() : null; - } else { - transformationsBuilder_.addAllMessages(other.transformations_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InfoTypeTransformations parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InfoTypeTransformations) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List transformations_ = - java.util.Collections.emptyList(); - private void ensureTransformationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - transformations_ = new java.util.ArrayList(transformations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder> transformationsBuilder_; - - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getTransformationsList() { - if (transformationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(transformations_); - } else { - return transformationsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getTransformationsCount() { - if (transformationsBuilder_ == null) { - return transformations_.size(); - } else { - return transformationsBuilder_.getCount(); - } - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getTransformations(int index) { - if (transformationsBuilder_ == null) { - return transformations_.get(index); - } else { - return transformationsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setTransformations( - int index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation value) { - if (transformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransformationsIsMutable(); - transformations_.set(index, value); - onChanged(); - } else { - transformationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setTransformations( - int index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder builderForValue) { - if (transformationsBuilder_ == null) { - ensureTransformationsIsMutable(); - transformations_.set(index, builderForValue.build()); - onChanged(); - } else { - transformationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addTransformations(com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation value) { - if (transformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransformationsIsMutable(); - transformations_.add(value); - onChanged(); - } else { - transformationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addTransformations( - int index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation value) { - if (transformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransformationsIsMutable(); - transformations_.add(index, value); - onChanged(); - } else { - transformationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addTransformations( - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder builderForValue) { - if (transformationsBuilder_ == null) { - ensureTransformationsIsMutable(); - transformations_.add(builderForValue.build()); - onChanged(); - } else { - transformationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addTransformations( - int index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder builderForValue) { - if (transformationsBuilder_ == null) { - ensureTransformationsIsMutable(); - transformations_.add(index, builderForValue.build()); - onChanged(); - } else { - transformationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllTransformations( - java.lang.Iterable values) { - if (transformationsBuilder_ == null) { - ensureTransformationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, transformations_); - onChanged(); - } else { - transformationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearTransformations() { - if (transformationsBuilder_ == null) { - transformations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - transformationsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeTransformations(int index) { - if (transformationsBuilder_ == null) { - ensureTransformationsIsMutable(); - transformations_.remove(index); - onChanged(); - } else { - transformationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder getTransformationsBuilder( - int index) { - return getTransformationsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder getTransformationsOrBuilder( - int index) { - if (transformationsBuilder_ == null) { - return transformations_.get(index); } else { - return transformationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getTransformationsOrBuilderList() { - if (transformationsBuilder_ != null) { - return transformationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(transformations_); - } - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder addTransformationsBuilder() { - return getTransformationsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.getDefaultInstance()); - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder addTransformationsBuilder( - int index) { - return getTransformationsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.getDefaultInstance()); - } - /** - *
-     * Required. Transformation for each infoType. Cannot specify more than one
-     * for a given infoType.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getTransformationsBuilderList() { - return getTransformationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder> - getTransformationsFieldBuilder() { - if (transformationsBuilder_ == null) { - transformationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.Builder, com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder>( - transformations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - transformations_ = null; - } - return transformationsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InfoTypeTransformations) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InfoTypeTransformations) - private static final com.google.privacy.dlp.v2.InfoTypeTransformations DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InfoTypeTransformations(); - } - - public static com.google.privacy.dlp.v2.InfoTypeTransformations getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoTypeTransformations parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InfoTypeTransformations(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeTransformations getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformationsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformationsOrBuilder.java deleted file mode 100644 index fc82b6b8882c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformationsOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InfoTypeTransformationsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InfoTypeTransformations) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getTransformationsList(); - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation getTransformations(int index); - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getTransformationsCount(); - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getTransformationsOrBuilderList(); - /** - *
-   * Required. Transformation for each infoType. Cannot specify more than one
-   * for a given infoType.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation transformations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformationOrBuilder getTransformationsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java deleted file mode 100644 index 3896eabfb809..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java +++ /dev/null @@ -1,4924 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Configuration description of the scanning process.
- * When used with redactContent only info_types and min_likelihood are currently
- * used.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectConfig} - */ -public final class InspectConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectConfig) - InspectConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use InspectConfig.newBuilder() to construct. - private InspectConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InspectConfig() { - infoTypes_ = java.util.Collections.emptyList(); - minLikelihood_ = 0; - customInfoTypes_ = java.util.Collections.emptyList(); - contentOptions_ = java.util.Collections.emptyList(); - ruleSet_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InspectConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InspectConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - infoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); - break; - } - case 16: { - int rawValue = input.readEnum(); - - minLikelihood_ = rawValue; - break; - } - case 26: { - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder subBuilder = null; - if (limits_ != null) { - subBuilder = limits_.toBuilder(); - } - limits_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(limits_); - limits_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - - includeQuote_ = input.readBool(); - break; - } - case 40: { - - excludeInfoTypes_ = input.readBool(); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - customInfoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - customInfoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.parser(), extensionRegistry)); - break; - } - case 64: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - contentOptions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - contentOptions_.add(rawValue); - break; - } - case 66: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - contentOptions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - contentOptions_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 82: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - ruleSet_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - ruleSet_.add( - input.readMessage(com.google.privacy.dlp.v2.InspectionRuleSet.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - customInfoTypes_ = java.util.Collections.unmodifiableList(customInfoTypes_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - contentOptions_ = java.util.Collections.unmodifiableList(contentOptions_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - ruleSet_ = java.util.Collections.unmodifiableList(ruleSet_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectConfig.class, com.google.privacy.dlp.v2.InspectConfig.Builder.class); - } - - public interface FindingLimitsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectConfig.FindingLimits) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Max number of findings that will be returned for each item scanned.
-     * When set within `InspectJobConfig`,
-     * the maximum returned is 2000 regardless if this is set higher.
-     * When set within `InspectContentRequest`, this field is ignored.
-     * 
- * - * int32 max_findings_per_item = 1; - * @return The maxFindingsPerItem. - */ - int getMaxFindingsPerItem(); - - /** - *
-     * Max number of findings that will be returned per request/job.
-     * When set within `InspectContentRequest`, the maximum returned is 2000
-     * regardless if this is set higher.
-     * 
- * - * int32 max_findings_per_request = 2; - * @return The maxFindingsPerRequest. - */ - int getMaxFindingsPerRequest(); - - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - java.util.List - getMaxFindingsPerInfoTypeList(); - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType(int index); - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - int getMaxFindingsPerInfoTypeCount(); - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - java.util.List - getMaxFindingsPerInfoTypeOrBuilderList(); - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder getMaxFindingsPerInfoTypeOrBuilder( - int index); - } - /** - *
-   * Configuration to control the number of findings returned for inspection.
-   * This is not used for de-identification or data profiling.
-   * When redacting sensitive data from images, finding limits don't apply. They
-   * can cause unexpected or inconsistent results, where only some data is
-   * redacted. Don't include finding limits in
-   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-   * requests. Otherwise, Cloud DLP returns an error.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits} - */ - public static final class FindingLimits extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits) - FindingLimitsOrBuilder { - private static final long serialVersionUID = 0L; - // Use FindingLimits.newBuilder() to construct. - private FindingLimits(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FindingLimits() { - maxFindingsPerInfoType_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FindingLimits(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FindingLimits( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - maxFindingsPerItem_ = input.readInt32(); - break; - } - case 16: { - - maxFindingsPerRequest_ = input.readInt32(); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - maxFindingsPerInfoType_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - maxFindingsPerInfoType_.add( - input.readMessage(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - maxFindingsPerInfoType_ = java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.class, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder.class); - } - - public interface InfoTypeLimitOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Type of information the findings limit applies to. Only one limit per
-       * info_type should be provided. If InfoTypeLimit does not have an
-       * info_type, the DLP API applies the limit against all info_types that
-       * are found but not specified in another InfoTypeLimit.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-       * Type of information the findings limit applies to. Only one limit per
-       * info_type should be provided. If InfoTypeLimit does not have an
-       * info_type, the DLP API applies the limit against all info_types that
-       * are found but not specified in another InfoTypeLimit.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-       * Type of information the findings limit applies to. Only one limit per
-       * info_type should be provided. If InfoTypeLimit does not have an
-       * info_type, the DLP API applies the limit against all info_types that
-       * are found but not specified in another InfoTypeLimit.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-       * Max findings limit for the given infoType.
-       * 
- * - * int32 max_findings = 2; - * @return The maxFindings. - */ - int getMaxFindings(); - } - /** - *
-     * Max findings configuration per infoType, per content item or long
-     * running DlpJob.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} - */ - public static final class InfoTypeLimit extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) - InfoTypeLimitOrBuilder { - private static final long serialVersionUID = 0L; - // Use InfoTypeLimit.newBuilder() to construct. - private InfoTypeLimit(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InfoTypeLimit() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InfoTypeLimit(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InfoTypeLimit( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (infoType_ != null) { - subBuilder = infoType_.toBuilder(); - } - infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infoType_); - infoType_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - maxFindings_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.class, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder.class); - } - - public static final int INFO_TYPE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.InfoType infoType_; - /** - *
-       * Type of information the findings limit applies to. Only one limit per
-       * info_type should be provided. If InfoTypeLimit does not have an
-       * info_type, the DLP API applies the limit against all info_types that
-       * are found but not specified in another InfoTypeLimit.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return infoType_ != null; - } - /** - *
-       * Type of information the findings limit applies to. Only one limit per
-       * info_type should be provided. If InfoTypeLimit does not have an
-       * info_type, the DLP API applies the limit against all info_types that
-       * are found but not specified in another InfoTypeLimit.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - /** - *
-       * Type of information the findings limit applies to. Only one limit per
-       * info_type should be provided. If InfoTypeLimit does not have an
-       * info_type, the DLP API applies the limit against all info_types that
-       * are found but not specified in another InfoTypeLimit.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - return getInfoType(); - } - - public static final int MAX_FINDINGS_FIELD_NUMBER = 2; - private int maxFindings_; - /** - *
-       * Max findings limit for the given infoType.
-       * 
- * - * int32 max_findings = 2; - * @return The maxFindings. - */ - @java.lang.Override - public int getMaxFindings() { - return maxFindings_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (infoType_ != null) { - output.writeMessage(1, getInfoType()); - } - if (maxFindings_ != 0) { - output.writeInt32(2, maxFindings_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (infoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInfoType()); - } - if (maxFindings_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, maxFindings_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit other = (com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) obj; - - if (hasInfoType() != other.hasInfoType()) return false; - if (hasInfoType()) { - if (!getInfoType() - .equals(other.getInfoType())) return false; - } - if (getMaxFindings() - != other.getMaxFindings()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInfoType()) { - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - } - hash = (37 * hash) + MAX_FINDINGS_FIELD_NUMBER; - hash = (53 * hash) + getMaxFindings(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * Max findings configuration per infoType, per content item or long
-       * running DlpJob.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.class, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypeBuilder_ == null) { - infoType_ = null; - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - maxFindings_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_InfoTypeLimit_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit build() { - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit buildPartial() { - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit result = new com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit(this); - if (infoTypeBuilder_ == null) { - result.infoType_ = infoType_; - } else { - result.infoType_ = infoTypeBuilder_.build(); - } - result.maxFindings_ = maxFindings_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) { - return mergeFrom((com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit other) { - if (other == com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.getDefaultInstance()) return this; - if (other.hasInfoType()) { - mergeInfoType(other.getInfoType()); - } - if (other.getMaxFindings() != 0) { - setMaxFindings(other.getMaxFindings()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.InfoType infoType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-         * Type of information the findings limit applies to. Only one limit per
-         * info_type should be provided. If InfoTypeLimit does not have an
-         * info_type, the DLP API applies the limit against all info_types that
-         * are found but not specified in another InfoTypeLimit.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - public boolean hasInfoType() { - return infoTypeBuilder_ != null || infoType_ != null; - } - /** - *
-         * Type of information the findings limit applies to. Only one limit per
-         * info_type should be provided. If InfoTypeLimit does not have an
-         * info_type, the DLP API applies the limit against all info_types that
-         * are found but not specified in another InfoTypeLimit.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } else { - return infoTypeBuilder_.getMessage(); - } - } - /** - *
-         * Type of information the findings limit applies to. Only one limit per
-         * info_type should be provided. If InfoTypeLimit does not have an
-         * info_type, the DLP API applies the limit against all info_types that
-         * are found but not specified in another InfoTypeLimit.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infoType_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-         * Type of information the findings limit applies to. Only one limit per
-         * info_type should be provided. If InfoTypeLimit does not have an
-         * info_type, the DLP API applies the limit against all info_types that
-         * are found but not specified in another InfoTypeLimit.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - infoType_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-         * Type of information the findings limit applies to. Only one limit per
-         * info_type should be provided. If InfoTypeLimit does not have an
-         * info_type, the DLP API applies the limit against all info_types that
-         * are found but not specified in another InfoTypeLimit.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (infoType_ != null) { - infoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); - } else { - infoType_ = value; - } - onChanged(); - } else { - infoTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-         * Type of information the findings limit applies to. Only one limit per
-         * info_type should be provided. If InfoTypeLimit does not have an
-         * info_type, the DLP API applies the limit against all info_types that
-         * are found but not specified in another InfoTypeLimit.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - infoType_ = null; - onChanged(); - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - - return this; - } - /** - *
-         * Type of information the findings limit applies to. Only one limit per
-         * info_type should be provided. If InfoTypeLimit does not have an
-         * info_type, the DLP API applies the limit against all info_types that
-         * are found but not specified in another InfoTypeLimit.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - - onChanged(); - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-         * Type of information the findings limit applies to. Only one limit per
-         * info_type should be provided. If InfoTypeLimit does not have an
-         * info_type, the DLP API applies the limit against all info_types that
-         * are found but not specified in another InfoTypeLimit.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (infoTypeBuilder_ != null) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - return infoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - } - /** - *
-         * Type of information the findings limit applies to. Only one limit per
-         * info_type should be provided. If InfoTypeLimit does not have an
-         * info_type, the DLP API applies the limit against all info_types that
-         * are found but not specified in another InfoTypeLimit.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getInfoType(), - getParentForChildren(), - isClean()); - infoType_ = null; - } - return infoTypeBuilder_; - } - - private int maxFindings_ ; - /** - *
-         * Max findings limit for the given infoType.
-         * 
- * - * int32 max_findings = 2; - * @return The maxFindings. - */ - @java.lang.Override - public int getMaxFindings() { - return maxFindings_; - } - /** - *
-         * Max findings limit for the given infoType.
-         * 
- * - * int32 max_findings = 2; - * @param value The maxFindings to set. - * @return This builder for chaining. - */ - public Builder setMaxFindings(int value) { - - maxFindings_ = value; - onChanged(); - return this; - } - /** - *
-         * Max findings limit for the given infoType.
-         * 
- * - * int32 max_findings = 2; - * @return This builder for chaining. - */ - public Builder clearMaxFindings() { - - maxFindings_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) - private static final com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit(); - } - - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InfoTypeLimit parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InfoTypeLimit(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int MAX_FINDINGS_PER_ITEM_FIELD_NUMBER = 1; - private int maxFindingsPerItem_; - /** - *
-     * Max number of findings that will be returned for each item scanned.
-     * When set within `InspectJobConfig`,
-     * the maximum returned is 2000 regardless if this is set higher.
-     * When set within `InspectContentRequest`, this field is ignored.
-     * 
- * - * int32 max_findings_per_item = 1; - * @return The maxFindingsPerItem. - */ - @java.lang.Override - public int getMaxFindingsPerItem() { - return maxFindingsPerItem_; - } - - public static final int MAX_FINDINGS_PER_REQUEST_FIELD_NUMBER = 2; - private int maxFindingsPerRequest_; - /** - *
-     * Max number of findings that will be returned per request/job.
-     * When set within `InspectContentRequest`, the maximum returned is 2000
-     * regardless if this is set higher.
-     * 
- * - * int32 max_findings_per_request = 2; - * @return The maxFindingsPerRequest. - */ - @java.lang.Override - public int getMaxFindingsPerRequest() { - return maxFindingsPerRequest_; - } - - public static final int MAX_FINDINGS_PER_INFO_TYPE_FIELD_NUMBER = 3; - private java.util.List maxFindingsPerInfoType_; - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - @java.lang.Override - public java.util.List getMaxFindingsPerInfoTypeList() { - return maxFindingsPerInfoType_; - } - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - @java.lang.Override - public java.util.List - getMaxFindingsPerInfoTypeOrBuilderList() { - return maxFindingsPerInfoType_; - } - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - @java.lang.Override - public int getMaxFindingsPerInfoTypeCount() { - return maxFindingsPerInfoType_.size(); - } - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType(int index) { - return maxFindingsPerInfoType_.get(index); - } - /** - *
-     * Configuration of findings limit given for specified infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder getMaxFindingsPerInfoTypeOrBuilder( - int index) { - return maxFindingsPerInfoType_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (maxFindingsPerItem_ != 0) { - output.writeInt32(1, maxFindingsPerItem_); - } - if (maxFindingsPerRequest_ != 0) { - output.writeInt32(2, maxFindingsPerRequest_); - } - for (int i = 0; i < maxFindingsPerInfoType_.size(); i++) { - output.writeMessage(3, maxFindingsPerInfoType_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (maxFindingsPerItem_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, maxFindingsPerItem_); - } - if (maxFindingsPerRequest_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, maxFindingsPerRequest_); - } - for (int i = 0; i < maxFindingsPerInfoType_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, maxFindingsPerInfoType_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectConfig.FindingLimits other = (com.google.privacy.dlp.v2.InspectConfig.FindingLimits) obj; - - if (getMaxFindingsPerItem() - != other.getMaxFindingsPerItem()) return false; - if (getMaxFindingsPerRequest() - != other.getMaxFindingsPerRequest()) return false; - if (!getMaxFindingsPerInfoTypeList() - .equals(other.getMaxFindingsPerInfoTypeList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MAX_FINDINGS_PER_ITEM_FIELD_NUMBER; - hash = (53 * hash) + getMaxFindingsPerItem(); - hash = (37 * hash) + MAX_FINDINGS_PER_REQUEST_FIELD_NUMBER; - hash = (53 * hash) + getMaxFindingsPerRequest(); - if (getMaxFindingsPerInfoTypeCount() > 0) { - hash = (37 * hash) + MAX_FINDINGS_PER_INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMaxFindingsPerInfoTypeList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectConfig.FindingLimits prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Configuration to control the number of findings returned for inspection.
-     * This is not used for de-identification or data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectConfig.FindingLimits} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectConfig.FindingLimits) - com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.class, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectConfig.FindingLimits.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMaxFindingsPerInfoTypeFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - maxFindingsPerItem_ = 0; - - maxFindingsPerRequest_ = 0; - - if (maxFindingsPerInfoTypeBuilder_ == null) { - maxFindingsPerInfoType_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - maxFindingsPerInfoTypeBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_FindingLimits_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits build() { - com.google.privacy.dlp.v2.InspectConfig.FindingLimits result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits buildPartial() { - com.google.privacy.dlp.v2.InspectConfig.FindingLimits result = new com.google.privacy.dlp.v2.InspectConfig.FindingLimits(this); - int from_bitField0_ = bitField0_; - result.maxFindingsPerItem_ = maxFindingsPerItem_; - result.maxFindingsPerRequest_ = maxFindingsPerRequest_; - if (maxFindingsPerInfoTypeBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - maxFindingsPerInfoType_ = java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.maxFindingsPerInfoType_ = maxFindingsPerInfoType_; - } else { - result.maxFindingsPerInfoType_ = maxFindingsPerInfoTypeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectConfig.FindingLimits) { - return mergeFrom((com.google.privacy.dlp.v2.InspectConfig.FindingLimits)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectConfig.FindingLimits other) { - if (other == com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance()) return this; - if (other.getMaxFindingsPerItem() != 0) { - setMaxFindingsPerItem(other.getMaxFindingsPerItem()); - } - if (other.getMaxFindingsPerRequest() != 0) { - setMaxFindingsPerRequest(other.getMaxFindingsPerRequest()); - } - if (maxFindingsPerInfoTypeBuilder_ == null) { - if (!other.maxFindingsPerInfoType_.isEmpty()) { - if (maxFindingsPerInfoType_.isEmpty()) { - maxFindingsPerInfoType_ = other.maxFindingsPerInfoType_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMaxFindingsPerInfoTypeIsMutable(); - maxFindingsPerInfoType_.addAll(other.maxFindingsPerInfoType_); - } - onChanged(); - } - } else { - if (!other.maxFindingsPerInfoType_.isEmpty()) { - if (maxFindingsPerInfoTypeBuilder_.isEmpty()) { - maxFindingsPerInfoTypeBuilder_.dispose(); - maxFindingsPerInfoTypeBuilder_ = null; - maxFindingsPerInfoType_ = other.maxFindingsPerInfoType_; - bitField0_ = (bitField0_ & ~0x00000001); - maxFindingsPerInfoTypeBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMaxFindingsPerInfoTypeFieldBuilder() : null; - } else { - maxFindingsPerInfoTypeBuilder_.addAllMessages(other.maxFindingsPerInfoType_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectConfig.FindingLimits parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectConfig.FindingLimits) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int maxFindingsPerItem_ ; - /** - *
-       * Max number of findings that will be returned for each item scanned.
-       * When set within `InspectJobConfig`,
-       * the maximum returned is 2000 regardless if this is set higher.
-       * When set within `InspectContentRequest`, this field is ignored.
-       * 
- * - * int32 max_findings_per_item = 1; - * @return The maxFindingsPerItem. - */ - @java.lang.Override - public int getMaxFindingsPerItem() { - return maxFindingsPerItem_; - } - /** - *
-       * Max number of findings that will be returned for each item scanned.
-       * When set within `InspectJobConfig`,
-       * the maximum returned is 2000 regardless if this is set higher.
-       * When set within `InspectContentRequest`, this field is ignored.
-       * 
- * - * int32 max_findings_per_item = 1; - * @param value The maxFindingsPerItem to set. - * @return This builder for chaining. - */ - public Builder setMaxFindingsPerItem(int value) { - - maxFindingsPerItem_ = value; - onChanged(); - return this; - } - /** - *
-       * Max number of findings that will be returned for each item scanned.
-       * When set within `InspectJobConfig`,
-       * the maximum returned is 2000 regardless if this is set higher.
-       * When set within `InspectContentRequest`, this field is ignored.
-       * 
- * - * int32 max_findings_per_item = 1; - * @return This builder for chaining. - */ - public Builder clearMaxFindingsPerItem() { - - maxFindingsPerItem_ = 0; - onChanged(); - return this; - } - - private int maxFindingsPerRequest_ ; - /** - *
-       * Max number of findings that will be returned per request/job.
-       * When set within `InspectContentRequest`, the maximum returned is 2000
-       * regardless if this is set higher.
-       * 
- * - * int32 max_findings_per_request = 2; - * @return The maxFindingsPerRequest. - */ - @java.lang.Override - public int getMaxFindingsPerRequest() { - return maxFindingsPerRequest_; - } - /** - *
-       * Max number of findings that will be returned per request/job.
-       * When set within `InspectContentRequest`, the maximum returned is 2000
-       * regardless if this is set higher.
-       * 
- * - * int32 max_findings_per_request = 2; - * @param value The maxFindingsPerRequest to set. - * @return This builder for chaining. - */ - public Builder setMaxFindingsPerRequest(int value) { - - maxFindingsPerRequest_ = value; - onChanged(); - return this; - } - /** - *
-       * Max number of findings that will be returned per request/job.
-       * When set within `InspectContentRequest`, the maximum returned is 2000
-       * regardless if this is set higher.
-       * 
- * - * int32 max_findings_per_request = 2; - * @return This builder for chaining. - */ - public Builder clearMaxFindingsPerRequest() { - - maxFindingsPerRequest_ = 0; - onChanged(); - return this; - } - - private java.util.List maxFindingsPerInfoType_ = - java.util.Collections.emptyList(); - private void ensureMaxFindingsPerInfoTypeIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - maxFindingsPerInfoType_ = new java.util.ArrayList(maxFindingsPerInfoType_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder> maxFindingsPerInfoTypeBuilder_; - - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public java.util.List getMaxFindingsPerInfoTypeList() { - if (maxFindingsPerInfoTypeBuilder_ == null) { - return java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); - } else { - return maxFindingsPerInfoTypeBuilder_.getMessageList(); - } - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public int getMaxFindingsPerInfoTypeCount() { - if (maxFindingsPerInfoTypeBuilder_ == null) { - return maxFindingsPerInfoType_.size(); - } else { - return maxFindingsPerInfoTypeBuilder_.getCount(); - } - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit getMaxFindingsPerInfoType(int index) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - return maxFindingsPerInfoType_.get(index); - } else { - return maxFindingsPerInfoTypeBuilder_.getMessage(index); - } - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public Builder setMaxFindingsPerInfoType( - int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaxFindingsPerInfoTypeIsMutable(); - maxFindingsPerInfoType_.set(index, value); - onChanged(); - } else { - maxFindingsPerInfoTypeBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public Builder setMaxFindingsPerInfoType( - int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder builderForValue) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - ensureMaxFindingsPerInfoTypeIsMutable(); - maxFindingsPerInfoType_.set(index, builderForValue.build()); - onChanged(); - } else { - maxFindingsPerInfoTypeBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public Builder addMaxFindingsPerInfoType(com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaxFindingsPerInfoTypeIsMutable(); - maxFindingsPerInfoType_.add(value); - onChanged(); - } else { - maxFindingsPerInfoTypeBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public Builder addMaxFindingsPerInfoType( - int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit value) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMaxFindingsPerInfoTypeIsMutable(); - maxFindingsPerInfoType_.add(index, value); - onChanged(); - } else { - maxFindingsPerInfoTypeBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public Builder addMaxFindingsPerInfoType( - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder builderForValue) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - ensureMaxFindingsPerInfoTypeIsMutable(); - maxFindingsPerInfoType_.add(builderForValue.build()); - onChanged(); - } else { - maxFindingsPerInfoTypeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public Builder addMaxFindingsPerInfoType( - int index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder builderForValue) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - ensureMaxFindingsPerInfoTypeIsMutable(); - maxFindingsPerInfoType_.add(index, builderForValue.build()); - onChanged(); - } else { - maxFindingsPerInfoTypeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public Builder addAllMaxFindingsPerInfoType( - java.lang.Iterable values) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - ensureMaxFindingsPerInfoTypeIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, maxFindingsPerInfoType_); - onChanged(); - } else { - maxFindingsPerInfoTypeBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public Builder clearMaxFindingsPerInfoType() { - if (maxFindingsPerInfoTypeBuilder_ == null) { - maxFindingsPerInfoType_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - maxFindingsPerInfoTypeBuilder_.clear(); - } - return this; - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public Builder removeMaxFindingsPerInfoType(int index) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - ensureMaxFindingsPerInfoTypeIsMutable(); - maxFindingsPerInfoType_.remove(index); - onChanged(); - } else { - maxFindingsPerInfoTypeBuilder_.remove(index); - } - return this; - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder getMaxFindingsPerInfoTypeBuilder( - int index) { - return getMaxFindingsPerInfoTypeFieldBuilder().getBuilder(index); - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder getMaxFindingsPerInfoTypeOrBuilder( - int index) { - if (maxFindingsPerInfoTypeBuilder_ == null) { - return maxFindingsPerInfoType_.get(index); } else { - return maxFindingsPerInfoTypeBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public java.util.List - getMaxFindingsPerInfoTypeOrBuilderList() { - if (maxFindingsPerInfoTypeBuilder_ != null) { - return maxFindingsPerInfoTypeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(maxFindingsPerInfoType_); - } - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder addMaxFindingsPerInfoTypeBuilder() { - return getMaxFindingsPerInfoTypeFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.getDefaultInstance()); - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder addMaxFindingsPerInfoTypeBuilder( - int index) { - return getMaxFindingsPerInfoTypeFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.getDefaultInstance()); - } - /** - *
-       * Configuration of findings limit given for specified infoTypes.
-       * 
- * - * repeated .google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit max_findings_per_info_type = 3; - */ - public java.util.List - getMaxFindingsPerInfoTypeBuilderList() { - return getMaxFindingsPerInfoTypeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder> - getMaxFindingsPerInfoTypeFieldBuilder() { - if (maxFindingsPerInfoTypeBuilder_ == null) { - maxFindingsPerInfoTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimitOrBuilder>( - maxFindingsPerInfoType_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - maxFindingsPerInfoType_ = null; - } - return maxFindingsPerInfoTypeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectConfig.FindingLimits) - private static final com.google.privacy.dlp.v2.InspectConfig.FindingLimits DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectConfig.FindingLimits(); - } - - public static com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FindingLimits parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FindingLimits(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int INFO_TYPES_FIELD_NUMBER = 1; - private java.util.List infoTypes_; - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public java.util.List getInfoTypesList() { - return infoTypes_; - } - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public java.util.List - getInfoTypesOrBuilderList() { - return infoTypes_; - } - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public int getInfoTypesCount() { - return infoTypes_.size(); - } - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { - return infoTypes_.get(index); - } - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { - return infoTypes_.get(index); - } - - public static final int MIN_LIKELIHOOD_FIELD_NUMBER = 2; - private int minLikelihood_; - /** - *
-   * Only returns findings equal or above this threshold. The default is
-   * POSSIBLE.
-   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; - * @return The enum numeric value on the wire for minLikelihood. - */ - @java.lang.Override public int getMinLikelihoodValue() { - return minLikelihood_; - } - /** - *
-   * Only returns findings equal or above this threshold. The default is
-   * POSSIBLE.
-   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; - * @return The minLikelihood. - */ - @java.lang.Override public com.google.privacy.dlp.v2.Likelihood getMinLikelihood() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(minLikelihood_); - return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; - } - - public static final int LIMITS_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.InspectConfig.FindingLimits limits_; - /** - *
-   * Configuration to control the number of findings returned.
-   * This is not used for data profiling.
-   * When redacting sensitive data from images, finding limits don't apply. They
-   * can cause unexpected or inconsistent results, where only some data is
-   * redacted. Don't include finding limits in
-   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-   * requests. Otherwise, Cloud DLP returns an error.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - * @return Whether the limits field is set. - */ - @java.lang.Override - public boolean hasLimits() { - return limits_ != null; - } - /** - *
-   * Configuration to control the number of findings returned.
-   * This is not used for data profiling.
-   * When redacting sensitive data from images, finding limits don't apply. They
-   * can cause unexpected or inconsistent results, where only some data is
-   * redacted. Don't include finding limits in
-   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-   * requests. Otherwise, Cloud DLP returns an error.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - * @return The limits. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits() { - return limits_ == null ? com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() : limits_; - } - /** - *
-   * Configuration to control the number of findings returned.
-   * This is not used for data profiling.
-   * When redacting sensitive data from images, finding limits don't apply. They
-   * can cause unexpected or inconsistent results, where only some data is
-   * redacted. Don't include finding limits in
-   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-   * requests. Otherwise, Cloud DLP returns an error.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder getLimitsOrBuilder() { - return getLimits(); - } - - public static final int INCLUDE_QUOTE_FIELD_NUMBER = 4; - private boolean includeQuote_; - /** - *
-   * When true, a contextual quote from the data that triggered a finding is
-   * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
-   * This is not used for data profiling.
-   * 
- * - * bool include_quote = 4; - * @return The includeQuote. - */ - @java.lang.Override - public boolean getIncludeQuote() { - return includeQuote_; - } - - public static final int EXCLUDE_INFO_TYPES_FIELD_NUMBER = 5; - private boolean excludeInfoTypes_; - /** - *
-   * When true, excludes type information of the findings.
-   * This is not used for data profiling.
-   * 
- * - * bool exclude_info_types = 5; - * @return The excludeInfoTypes. - */ - @java.lang.Override - public boolean getExcludeInfoTypes() { - return excludeInfoTypes_; - } - - public static final int CUSTOM_INFO_TYPES_FIELD_NUMBER = 6; - private java.util.List customInfoTypes_; - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - @java.lang.Override - public java.util.List getCustomInfoTypesList() { - return customInfoTypes_; - } - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - @java.lang.Override - public java.util.List - getCustomInfoTypesOrBuilderList() { - return customInfoTypes_; - } - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - @java.lang.Override - public int getCustomInfoTypesCount() { - return customInfoTypes_.size(); - } - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index) { - return customInfoTypes_.get(index); - } - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBuilder( - int index) { - return customInfoTypes_.get(index); - } - - public static final int CONTENT_OPTIONS_FIELD_NUMBER = 8; - private java.util.List contentOptions_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.privacy.dlp.v2.ContentOption> contentOptions_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.privacy.dlp.v2.ContentOption>() { - public com.google.privacy.dlp.v2.ContentOption convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.ContentOption result = com.google.privacy.dlp.v2.ContentOption.valueOf(from); - return result == null ? com.google.privacy.dlp.v2.ContentOption.UNRECOGNIZED : result; - } - }; - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return A list containing the contentOptions. - */ - @java.lang.Override - public java.util.List getContentOptionsList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.privacy.dlp.v2.ContentOption>(contentOptions_, contentOptions_converter_); - } - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return The count of contentOptions. - */ - @java.lang.Override - public int getContentOptionsCount() { - return contentOptions_.size(); - } - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param index The index of the element to return. - * @return The contentOptions at the given index. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentOption getContentOptions(int index) { - return contentOptions_converter_.convert(contentOptions_.get(index)); - } - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return A list containing the enum numeric values on the wire for contentOptions. - */ - @java.lang.Override - public java.util.List - getContentOptionsValueList() { - return contentOptions_; - } - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of contentOptions at the given index. - */ - @java.lang.Override - public int getContentOptionsValue(int index) { - return contentOptions_.get(index); - } - private int contentOptionsMemoizedSerializedSize; - - public static final int RULE_SET_FIELD_NUMBER = 10; - private java.util.List ruleSet_; - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - @java.lang.Override - public java.util.List getRuleSetList() { - return ruleSet_; - } - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - @java.lang.Override - public java.util.List - getRuleSetOrBuilderList() { - return ruleSet_; - } - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - @java.lang.Override - public int getRuleSetCount() { - return ruleSet_.size(); - } - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRuleSet getRuleSet(int index) { - return ruleSet_.get(index); - } - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder getRuleSetOrBuilder( - int index) { - return ruleSet_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - for (int i = 0; i < infoTypes_.size(); i++) { - output.writeMessage(1, infoTypes_.get(i)); - } - if (minLikelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { - output.writeEnum(2, minLikelihood_); - } - if (limits_ != null) { - output.writeMessage(3, getLimits()); - } - if (includeQuote_ != false) { - output.writeBool(4, includeQuote_); - } - if (excludeInfoTypes_ != false) { - output.writeBool(5, excludeInfoTypes_); - } - for (int i = 0; i < customInfoTypes_.size(); i++) { - output.writeMessage(6, customInfoTypes_.get(i)); - } - if (getContentOptionsList().size() > 0) { - output.writeUInt32NoTag(66); - output.writeUInt32NoTag(contentOptionsMemoizedSerializedSize); - } - for (int i = 0; i < contentOptions_.size(); i++) { - output.writeEnumNoTag(contentOptions_.get(i)); - } - for (int i = 0; i < ruleSet_.size(); i++) { - output.writeMessage(10, ruleSet_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < infoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, infoTypes_.get(i)); - } - if (minLikelihood_ != com.google.privacy.dlp.v2.Likelihood.LIKELIHOOD_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, minLikelihood_); - } - if (limits_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getLimits()); - } - if (includeQuote_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeQuote_); - } - if (excludeInfoTypes_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, excludeInfoTypes_); - } - for (int i = 0; i < customInfoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, customInfoTypes_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < contentOptions_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(contentOptions_.get(i)); - } - size += dataSize; - if (!getContentOptionsList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }contentOptionsMemoizedSerializedSize = dataSize; - } - for (int i = 0; i < ruleSet_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, ruleSet_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectConfig other = (com.google.privacy.dlp.v2.InspectConfig) obj; - - if (!getInfoTypesList() - .equals(other.getInfoTypesList())) return false; - if (minLikelihood_ != other.minLikelihood_) return false; - if (hasLimits() != other.hasLimits()) return false; - if (hasLimits()) { - if (!getLimits() - .equals(other.getLimits())) return false; - } - if (getIncludeQuote() - != other.getIncludeQuote()) return false; - if (getExcludeInfoTypes() - != other.getExcludeInfoTypes()) return false; - if (!getCustomInfoTypesList() - .equals(other.getCustomInfoTypesList())) return false; - if (!contentOptions_.equals(other.contentOptions_)) return false; - if (!getRuleSetList() - .equals(other.getRuleSetList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getInfoTypesCount() > 0) { - hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getInfoTypesList().hashCode(); - } - hash = (37 * hash) + MIN_LIKELIHOOD_FIELD_NUMBER; - hash = (53 * hash) + minLikelihood_; - if (hasLimits()) { - hash = (37 * hash) + LIMITS_FIELD_NUMBER; - hash = (53 * hash) + getLimits().hashCode(); - } - hash = (37 * hash) + INCLUDE_QUOTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeQuote()); - hash = (37 * hash) + EXCLUDE_INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getExcludeInfoTypes()); - if (getCustomInfoTypesCount() > 0) { - hash = (37 * hash) + CUSTOM_INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getCustomInfoTypesList().hashCode(); - } - if (getContentOptionsCount() > 0) { - hash = (37 * hash) + CONTENT_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + contentOptions_.hashCode(); - } - if (getRuleSetCount() > 0) { - hash = (37 * hash) + RULE_SET_FIELD_NUMBER; - hash = (53 * hash) + getRuleSetList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Configuration description of the scanning process.
-   * When used with redactContent only info_types and min_likelihood are currently
-   * used.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectConfig) - com.google.privacy.dlp.v2.InspectConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectConfig.class, com.google.privacy.dlp.v2.InspectConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoTypesFieldBuilder(); - getCustomInfoTypesFieldBuilder(); - getRuleSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - infoTypesBuilder_.clear(); - } - minLikelihood_ = 0; - - if (limitsBuilder_ == null) { - limits_ = null; - } else { - limits_ = null; - limitsBuilder_ = null; - } - includeQuote_ = false; - - excludeInfoTypes_ = false; - - if (customInfoTypesBuilder_ == null) { - customInfoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - customInfoTypesBuilder_.clear(); - } - contentOptions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - if (ruleSetBuilder_ == null) { - ruleSet_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ruleSetBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig build() { - com.google.privacy.dlp.v2.InspectConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig buildPartial() { - com.google.privacy.dlp.v2.InspectConfig result = new com.google.privacy.dlp.v2.InspectConfig(this); - int from_bitField0_ = bitField0_; - if (infoTypesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.infoTypes_ = infoTypes_; - } else { - result.infoTypes_ = infoTypesBuilder_.build(); - } - result.minLikelihood_ = minLikelihood_; - if (limitsBuilder_ == null) { - result.limits_ = limits_; - } else { - result.limits_ = limitsBuilder_.build(); - } - result.includeQuote_ = includeQuote_; - result.excludeInfoTypes_ = excludeInfoTypes_; - if (customInfoTypesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - customInfoTypes_ = java.util.Collections.unmodifiableList(customInfoTypes_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.customInfoTypes_ = customInfoTypes_; - } else { - result.customInfoTypes_ = customInfoTypesBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - contentOptions_ = java.util.Collections.unmodifiableList(contentOptions_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.contentOptions_ = contentOptions_; - if (ruleSetBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - ruleSet_ = java.util.Collections.unmodifiableList(ruleSet_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.ruleSet_ = ruleSet_; - } else { - result.ruleSet_ = ruleSetBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectConfig) { - return mergeFrom((com.google.privacy.dlp.v2.InspectConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectConfig other) { - if (other == com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance()) return this; - if (infoTypesBuilder_ == null) { - if (!other.infoTypes_.isEmpty()) { - if (infoTypes_.isEmpty()) { - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInfoTypesIsMutable(); - infoTypes_.addAll(other.infoTypes_); - } - onChanged(); - } - } else { - if (!other.infoTypes_.isEmpty()) { - if (infoTypesBuilder_.isEmpty()) { - infoTypesBuilder_.dispose(); - infoTypesBuilder_ = null; - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - infoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInfoTypesFieldBuilder() : null; - } else { - infoTypesBuilder_.addAllMessages(other.infoTypes_); - } - } - } - if (other.minLikelihood_ != 0) { - setMinLikelihoodValue(other.getMinLikelihoodValue()); - } - if (other.hasLimits()) { - mergeLimits(other.getLimits()); - } - if (other.getIncludeQuote() != false) { - setIncludeQuote(other.getIncludeQuote()); - } - if (other.getExcludeInfoTypes() != false) { - setExcludeInfoTypes(other.getExcludeInfoTypes()); - } - if (customInfoTypesBuilder_ == null) { - if (!other.customInfoTypes_.isEmpty()) { - if (customInfoTypes_.isEmpty()) { - customInfoTypes_ = other.customInfoTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureCustomInfoTypesIsMutable(); - customInfoTypes_.addAll(other.customInfoTypes_); - } - onChanged(); - } - } else { - if (!other.customInfoTypes_.isEmpty()) { - if (customInfoTypesBuilder_.isEmpty()) { - customInfoTypesBuilder_.dispose(); - customInfoTypesBuilder_ = null; - customInfoTypes_ = other.customInfoTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - customInfoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCustomInfoTypesFieldBuilder() : null; - } else { - customInfoTypesBuilder_.addAllMessages(other.customInfoTypes_); - } - } - } - if (!other.contentOptions_.isEmpty()) { - if (contentOptions_.isEmpty()) { - contentOptions_ = other.contentOptions_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureContentOptionsIsMutable(); - contentOptions_.addAll(other.contentOptions_); - } - onChanged(); - } - if (ruleSetBuilder_ == null) { - if (!other.ruleSet_.isEmpty()) { - if (ruleSet_.isEmpty()) { - ruleSet_ = other.ruleSet_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureRuleSetIsMutable(); - ruleSet_.addAll(other.ruleSet_); - } - onChanged(); - } - } else { - if (!other.ruleSet_.isEmpty()) { - if (ruleSetBuilder_.isEmpty()) { - ruleSetBuilder_.dispose(); - ruleSetBuilder_ = null; - ruleSet_ = other.ruleSet_; - bitField0_ = (bitField0_ & ~0x00000008); - ruleSetBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRuleSetFieldBuilder() : null; - } else { - ruleSetBuilder_.addAllMessages(other.ruleSet_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List infoTypes_ = - java.util.Collections.emptyList(); - private void ensureInfoTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(infoTypes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; - - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List getInfoTypesList() { - if (infoTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(infoTypes_); - } else { - return infoTypesBuilder_.getMessageList(); - } - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public int getInfoTypesCount() { - if (infoTypesBuilder_ == null) { - return infoTypes_.size(); - } else { - return infoTypesBuilder_.getCount(); - } - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); - } else { - return infoTypesBuilder_.getMessage(index); - } - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.set(index, value); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(index, value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addAllInfoTypes( - java.lang.Iterable values) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, infoTypes_); - onChanged(); - } else { - infoTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder clearInfoTypes() { - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - infoTypesBuilder_.clear(); - } - return this; - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder removeInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.remove(index); - onChanged(); - } else { - infoTypesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().getBuilder(index); - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); } else { - return infoTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List - getInfoTypesOrBuilderList() { - if (infoTypesBuilder_ != null) { - return infoTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(infoTypes_); - } - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { - return getInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); - } - /** - *
-     * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or listed at
-     * https://cloud.google.com/dlp/docs/infotypes-reference.
-     * When no InfoTypes or CustomInfoTypes are specified in a request, the
-     * system may automatically choose what detectors to run. By default this may
-     * be all types, but may change over time as detectors are updated.
-     * If you need precise control and predictability as to what detectors are
-     * run you should specify specific InfoTypes listed in the reference,
-     * otherwise a default list will be used, which may change over time.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List - getInfoTypesBuilderList() { - return getInfoTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypesFieldBuilder() { - if (infoTypesBuilder_ == null) { - infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - infoTypes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - infoTypes_ = null; - } - return infoTypesBuilder_; - } - - private int minLikelihood_ = 0; - /** - *
-     * Only returns findings equal or above this threshold. The default is
-     * POSSIBLE.
-     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; - * @return The enum numeric value on the wire for minLikelihood. - */ - @java.lang.Override public int getMinLikelihoodValue() { - return minLikelihood_; - } - /** - *
-     * Only returns findings equal or above this threshold. The default is
-     * POSSIBLE.
-     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; - * @param value The enum numeric value on the wire for minLikelihood to set. - * @return This builder for chaining. - */ - public Builder setMinLikelihoodValue(int value) { - - minLikelihood_ = value; - onChanged(); - return this; - } - /** - *
-     * Only returns findings equal or above this threshold. The default is
-     * POSSIBLE.
-     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; - * @return The minLikelihood. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Likelihood getMinLikelihood() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.Likelihood result = com.google.privacy.dlp.v2.Likelihood.valueOf(minLikelihood_); - return result == null ? com.google.privacy.dlp.v2.Likelihood.UNRECOGNIZED : result; - } - /** - *
-     * Only returns findings equal or above this threshold. The default is
-     * POSSIBLE.
-     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; - * @param value The minLikelihood to set. - * @return This builder for chaining. - */ - public Builder setMinLikelihood(com.google.privacy.dlp.v2.Likelihood value) { - if (value == null) { - throw new NullPointerException(); - } - - minLikelihood_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Only returns findings equal or above this threshold. The default is
-     * POSSIBLE.
-     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
-     * 
- * - * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; - * @return This builder for chaining. - */ - public Builder clearMinLikelihood() { - - minLikelihood_ = 0; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.InspectConfig.FindingLimits limits_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig.FindingLimits, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder> limitsBuilder_; - /** - *
-     * Configuration to control the number of findings returned.
-     * This is not used for data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - * @return Whether the limits field is set. - */ - public boolean hasLimits() { - return limitsBuilder_ != null || limits_ != null; - } - /** - *
-     * Configuration to control the number of findings returned.
-     * This is not used for data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - * @return The limits. - */ - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits() { - if (limitsBuilder_ == null) { - return limits_ == null ? com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() : limits_; - } else { - return limitsBuilder_.getMessage(); - } - } - /** - *
-     * Configuration to control the number of findings returned.
-     * This is not used for data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - */ - public Builder setLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits value) { - if (limitsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - limits_ = value; - onChanged(); - } else { - limitsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Configuration to control the number of findings returned.
-     * This is not used for data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - */ - public Builder setLimits( - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder builderForValue) { - if (limitsBuilder_ == null) { - limits_ = builderForValue.build(); - onChanged(); - } else { - limitsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Configuration to control the number of findings returned.
-     * This is not used for data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - */ - public Builder mergeLimits(com.google.privacy.dlp.v2.InspectConfig.FindingLimits value) { - if (limitsBuilder_ == null) { - if (limits_ != null) { - limits_ = - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.newBuilder(limits_).mergeFrom(value).buildPartial(); - } else { - limits_ = value; - } - onChanged(); - } else { - limitsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Configuration to control the number of findings returned.
-     * This is not used for data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - */ - public Builder clearLimits() { - if (limitsBuilder_ == null) { - limits_ = null; - onChanged(); - } else { - limits_ = null; - limitsBuilder_ = null; - } - - return this; - } - /** - *
-     * Configuration to control the number of findings returned.
-     * This is not used for data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - */ - public com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder getLimitsBuilder() { - - onChanged(); - return getLimitsFieldBuilder().getBuilder(); - } - /** - *
-     * Configuration to control the number of findings returned.
-     * This is not used for data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - */ - public com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder getLimitsOrBuilder() { - if (limitsBuilder_ != null) { - return limitsBuilder_.getMessageOrBuilder(); - } else { - return limits_ == null ? - com.google.privacy.dlp.v2.InspectConfig.FindingLimits.getDefaultInstance() : limits_; - } - } - /** - *
-     * Configuration to control the number of findings returned.
-     * This is not used for data profiling.
-     * When redacting sensitive data from images, finding limits don't apply. They
-     * can cause unexpected or inconsistent results, where only some data is
-     * redacted. Don't include finding limits in
-     * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-     * requests. Otherwise, Cloud DLP returns an error.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig.FindingLimits, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder> - getLimitsFieldBuilder() { - if (limitsBuilder_ == null) { - limitsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig.FindingLimits, com.google.privacy.dlp.v2.InspectConfig.FindingLimits.Builder, com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder>( - getLimits(), - getParentForChildren(), - isClean()); - limits_ = null; - } - return limitsBuilder_; - } - - private boolean includeQuote_ ; - /** - *
-     * When true, a contextual quote from the data that triggered a finding is
-     * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
-     * This is not used for data profiling.
-     * 
- * - * bool include_quote = 4; - * @return The includeQuote. - */ - @java.lang.Override - public boolean getIncludeQuote() { - return includeQuote_; - } - /** - *
-     * When true, a contextual quote from the data that triggered a finding is
-     * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
-     * This is not used for data profiling.
-     * 
- * - * bool include_quote = 4; - * @param value The includeQuote to set. - * @return This builder for chaining. - */ - public Builder setIncludeQuote(boolean value) { - - includeQuote_ = value; - onChanged(); - return this; - } - /** - *
-     * When true, a contextual quote from the data that triggered a finding is
-     * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
-     * This is not used for data profiling.
-     * 
- * - * bool include_quote = 4; - * @return This builder for chaining. - */ - public Builder clearIncludeQuote() { - - includeQuote_ = false; - onChanged(); - return this; - } - - private boolean excludeInfoTypes_ ; - /** - *
-     * When true, excludes type information of the findings.
-     * This is not used for data profiling.
-     * 
- * - * bool exclude_info_types = 5; - * @return The excludeInfoTypes. - */ - @java.lang.Override - public boolean getExcludeInfoTypes() { - return excludeInfoTypes_; - } - /** - *
-     * When true, excludes type information of the findings.
-     * This is not used for data profiling.
-     * 
- * - * bool exclude_info_types = 5; - * @param value The excludeInfoTypes to set. - * @return This builder for chaining. - */ - public Builder setExcludeInfoTypes(boolean value) { - - excludeInfoTypes_ = value; - onChanged(); - return this; - } - /** - *
-     * When true, excludes type information of the findings.
-     * This is not used for data profiling.
-     * 
- * - * bool exclude_info_types = 5; - * @return This builder for chaining. - */ - public Builder clearExcludeInfoTypes() { - - excludeInfoTypes_ = false; - onChanged(); - return this; - } - - private java.util.List customInfoTypes_ = - java.util.Collections.emptyList(); - private void ensureCustomInfoTypesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - customInfoTypes_ = new java.util.ArrayList(customInfoTypes_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType, com.google.privacy.dlp.v2.CustomInfoType.Builder, com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder> customInfoTypesBuilder_; - - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public java.util.List getCustomInfoTypesList() { - if (customInfoTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(customInfoTypes_); - } else { - return customInfoTypesBuilder_.getMessageList(); - } - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public int getCustomInfoTypesCount() { - if (customInfoTypesBuilder_ == null) { - return customInfoTypes_.size(); - } else { - return customInfoTypesBuilder_.getCount(); - } - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index) { - if (customInfoTypesBuilder_ == null) { - return customInfoTypes_.get(index); - } else { - return customInfoTypesBuilder_.getMessage(index); - } - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public Builder setCustomInfoTypes( - int index, com.google.privacy.dlp.v2.CustomInfoType value) { - if (customInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCustomInfoTypesIsMutable(); - customInfoTypes_.set(index, value); - onChanged(); - } else { - customInfoTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public Builder setCustomInfoTypes( - int index, com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue) { - if (customInfoTypesBuilder_ == null) { - ensureCustomInfoTypesIsMutable(); - customInfoTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - customInfoTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public Builder addCustomInfoTypes(com.google.privacy.dlp.v2.CustomInfoType value) { - if (customInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCustomInfoTypesIsMutable(); - customInfoTypes_.add(value); - onChanged(); - } else { - customInfoTypesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public Builder addCustomInfoTypes( - int index, com.google.privacy.dlp.v2.CustomInfoType value) { - if (customInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCustomInfoTypesIsMutable(); - customInfoTypes_.add(index, value); - onChanged(); - } else { - customInfoTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public Builder addCustomInfoTypes( - com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue) { - if (customInfoTypesBuilder_ == null) { - ensureCustomInfoTypesIsMutable(); - customInfoTypes_.add(builderForValue.build()); - onChanged(); - } else { - customInfoTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public Builder addCustomInfoTypes( - int index, com.google.privacy.dlp.v2.CustomInfoType.Builder builderForValue) { - if (customInfoTypesBuilder_ == null) { - ensureCustomInfoTypesIsMutable(); - customInfoTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - customInfoTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public Builder addAllCustomInfoTypes( - java.lang.Iterable values) { - if (customInfoTypesBuilder_ == null) { - ensureCustomInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, customInfoTypes_); - onChanged(); - } else { - customInfoTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public Builder clearCustomInfoTypes() { - if (customInfoTypesBuilder_ == null) { - customInfoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - customInfoTypesBuilder_.clear(); - } - return this; - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public Builder removeCustomInfoTypes(int index) { - if (customInfoTypesBuilder_ == null) { - ensureCustomInfoTypesIsMutable(); - customInfoTypes_.remove(index); - onChanged(); - } else { - customInfoTypesBuilder_.remove(index); - } - return this; - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Builder getCustomInfoTypesBuilder( - int index) { - return getCustomInfoTypesFieldBuilder().getBuilder(index); - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBuilder( - int index) { - if (customInfoTypesBuilder_ == null) { - return customInfoTypes_.get(index); } else { - return customInfoTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public java.util.List - getCustomInfoTypesOrBuilderList() { - if (customInfoTypesBuilder_ != null) { - return customInfoTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(customInfoTypes_); - } - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Builder addCustomInfoTypesBuilder() { - return getCustomInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()); - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Builder addCustomInfoTypesBuilder( - int index) { - return getCustomInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.CustomInfoType.getDefaultInstance()); - } - /** - *
-     * CustomInfoTypes provided by the user. See
-     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-     * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - public java.util.List - getCustomInfoTypesBuilderList() { - return getCustomInfoTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType, com.google.privacy.dlp.v2.CustomInfoType.Builder, com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder> - getCustomInfoTypesFieldBuilder() { - if (customInfoTypesBuilder_ == null) { - customInfoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType, com.google.privacy.dlp.v2.CustomInfoType.Builder, com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder>( - customInfoTypes_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - customInfoTypes_ = null; - } - return customInfoTypesBuilder_; - } - - private java.util.List contentOptions_ = - java.util.Collections.emptyList(); - private void ensureContentOptionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - contentOptions_ = new java.util.ArrayList(contentOptions_); - bitField0_ |= 0x00000004; - } - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return A list containing the contentOptions. - */ - public java.util.List getContentOptionsList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.privacy.dlp.v2.ContentOption>(contentOptions_, contentOptions_converter_); - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return The count of contentOptions. - */ - public int getContentOptionsCount() { - return contentOptions_.size(); - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param index The index of the element to return. - * @return The contentOptions at the given index. - */ - public com.google.privacy.dlp.v2.ContentOption getContentOptions(int index) { - return contentOptions_converter_.convert(contentOptions_.get(index)); - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param index The index to set the value at. - * @param value The contentOptions to set. - * @return This builder for chaining. - */ - public Builder setContentOptions( - int index, com.google.privacy.dlp.v2.ContentOption value) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentOptionsIsMutable(); - contentOptions_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param value The contentOptions to add. - * @return This builder for chaining. - */ - public Builder addContentOptions(com.google.privacy.dlp.v2.ContentOption value) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentOptionsIsMutable(); - contentOptions_.add(value.getNumber()); - onChanged(); - return this; - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param values The contentOptions to add. - * @return This builder for chaining. - */ - public Builder addAllContentOptions( - java.lang.Iterable values) { - ensureContentOptionsIsMutable(); - for (com.google.privacy.dlp.v2.ContentOption value : values) { - contentOptions_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return This builder for chaining. - */ - public Builder clearContentOptions() { - contentOptions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return A list containing the enum numeric values on the wire for contentOptions. - */ - public java.util.List - getContentOptionsValueList() { - return java.util.Collections.unmodifiableList(contentOptions_); - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of contentOptions at the given index. - */ - public int getContentOptionsValue(int index) { - return contentOptions_.get(index); - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for contentOptions to set. - * @return This builder for chaining. - */ - public Builder setContentOptionsValue( - int index, int value) { - ensureContentOptionsIsMutable(); - contentOptions_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param value The enum numeric value on the wire for contentOptions to add. - * @return This builder for chaining. - */ - public Builder addContentOptionsValue(int value) { - ensureContentOptionsIsMutable(); - contentOptions_.add(value); - onChanged(); - return this; - } - /** - *
-     * Deprecated and unused.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param values The enum numeric values on the wire for contentOptions to add. - * @return This builder for chaining. - */ - public Builder addAllContentOptionsValue( - java.lang.Iterable values) { - ensureContentOptionsIsMutable(); - for (int value : values) { - contentOptions_.add(value); - } - onChanged(); - return this; - } - - private java.util.List ruleSet_ = - java.util.Collections.emptyList(); - private void ensureRuleSetIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - ruleSet_ = new java.util.ArrayList(ruleSet_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectionRuleSet, com.google.privacy.dlp.v2.InspectionRuleSet.Builder, com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder> ruleSetBuilder_; - - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public java.util.List getRuleSetList() { - if (ruleSetBuilder_ == null) { - return java.util.Collections.unmodifiableList(ruleSet_); - } else { - return ruleSetBuilder_.getMessageList(); - } - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public int getRuleSetCount() { - if (ruleSetBuilder_ == null) { - return ruleSet_.size(); - } else { - return ruleSetBuilder_.getCount(); - } - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public com.google.privacy.dlp.v2.InspectionRuleSet getRuleSet(int index) { - if (ruleSetBuilder_ == null) { - return ruleSet_.get(index); - } else { - return ruleSetBuilder_.getMessage(index); - } - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public Builder setRuleSet( - int index, com.google.privacy.dlp.v2.InspectionRuleSet value) { - if (ruleSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRuleSetIsMutable(); - ruleSet_.set(index, value); - onChanged(); - } else { - ruleSetBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public Builder setRuleSet( - int index, com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue) { - if (ruleSetBuilder_ == null) { - ensureRuleSetIsMutable(); - ruleSet_.set(index, builderForValue.build()); - onChanged(); - } else { - ruleSetBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public Builder addRuleSet(com.google.privacy.dlp.v2.InspectionRuleSet value) { - if (ruleSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRuleSetIsMutable(); - ruleSet_.add(value); - onChanged(); - } else { - ruleSetBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public Builder addRuleSet( - int index, com.google.privacy.dlp.v2.InspectionRuleSet value) { - if (ruleSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRuleSetIsMutable(); - ruleSet_.add(index, value); - onChanged(); - } else { - ruleSetBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public Builder addRuleSet( - com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue) { - if (ruleSetBuilder_ == null) { - ensureRuleSetIsMutable(); - ruleSet_.add(builderForValue.build()); - onChanged(); - } else { - ruleSetBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public Builder addRuleSet( - int index, com.google.privacy.dlp.v2.InspectionRuleSet.Builder builderForValue) { - if (ruleSetBuilder_ == null) { - ensureRuleSetIsMutable(); - ruleSet_.add(index, builderForValue.build()); - onChanged(); - } else { - ruleSetBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public Builder addAllRuleSet( - java.lang.Iterable values) { - if (ruleSetBuilder_ == null) { - ensureRuleSetIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ruleSet_); - onChanged(); - } else { - ruleSetBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public Builder clearRuleSet() { - if (ruleSetBuilder_ == null) { - ruleSet_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - ruleSetBuilder_.clear(); - } - return this; - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public Builder removeRuleSet(int index) { - if (ruleSetBuilder_ == null) { - ensureRuleSetIsMutable(); - ruleSet_.remove(index); - onChanged(); - } else { - ruleSetBuilder_.remove(index); - } - return this; - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public com.google.privacy.dlp.v2.InspectionRuleSet.Builder getRuleSetBuilder( - int index) { - return getRuleSetFieldBuilder().getBuilder(index); - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder getRuleSetOrBuilder( - int index) { - if (ruleSetBuilder_ == null) { - return ruleSet_.get(index); } else { - return ruleSetBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public java.util.List - getRuleSetOrBuilderList() { - if (ruleSetBuilder_ != null) { - return ruleSetBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(ruleSet_); - } - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public com.google.privacy.dlp.v2.InspectionRuleSet.Builder addRuleSetBuilder() { - return getRuleSetFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance()); - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public com.google.privacy.dlp.v2.InspectionRuleSet.Builder addRuleSetBuilder( - int index) { - return getRuleSetFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance()); - } - /** - *
-     * Set of rules to apply to the findings for this InspectConfig.
-     * Exclusion rules, contained in the set are executed in the end, other
-     * rules are executed in the order they are specified for each info type.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - public java.util.List - getRuleSetBuilderList() { - return getRuleSetFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectionRuleSet, com.google.privacy.dlp.v2.InspectionRuleSet.Builder, com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder> - getRuleSetFieldBuilder() { - if (ruleSetBuilder_ == null) { - ruleSetBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectionRuleSet, com.google.privacy.dlp.v2.InspectionRuleSet.Builder, com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder>( - ruleSet_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - ruleSet_ = null; - } - return ruleSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectConfig) - private static final com.google.privacy.dlp.v2.InspectConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectConfig(); - } - - public static com.google.privacy.dlp.v2.InspectConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InspectConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InspectConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java deleted file mode 100644 index 13f7f9cd2282..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java +++ /dev/null @@ -1,336 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InspectConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - java.util.List - getInfoTypesList(); - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - int getInfoTypesCount(); - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - java.util.List - getInfoTypesOrBuilderList(); - /** - *
-   * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or listed at
-   * https://cloud.google.com/dlp/docs/infotypes-reference.
-   * When no InfoTypes or CustomInfoTypes are specified in a request, the
-   * system may automatically choose what detectors to run. By default this may
-   * be all types, but may change over time as detectors are updated.
-   * If you need precise control and predictability as to what detectors are
-   * run you should specify specific InfoTypes listed in the reference,
-   * otherwise a default list will be used, which may change over time.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index); - - /** - *
-   * Only returns findings equal or above this threshold. The default is
-   * POSSIBLE.
-   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; - * @return The enum numeric value on the wire for minLikelihood. - */ - int getMinLikelihoodValue(); - /** - *
-   * Only returns findings equal or above this threshold. The default is
-   * POSSIBLE.
-   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
-   * 
- * - * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; - * @return The minLikelihood. - */ - com.google.privacy.dlp.v2.Likelihood getMinLikelihood(); - - /** - *
-   * Configuration to control the number of findings returned.
-   * This is not used for data profiling.
-   * When redacting sensitive data from images, finding limits don't apply. They
-   * can cause unexpected or inconsistent results, where only some data is
-   * redacted. Don't include finding limits in
-   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-   * requests. Otherwise, Cloud DLP returns an error.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - * @return Whether the limits field is set. - */ - boolean hasLimits(); - /** - *
-   * Configuration to control the number of findings returned.
-   * This is not used for data profiling.
-   * When redacting sensitive data from images, finding limits don't apply. They
-   * can cause unexpected or inconsistent results, where only some data is
-   * redacted. Don't include finding limits in
-   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-   * requests. Otherwise, Cloud DLP returns an error.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - * @return The limits. - */ - com.google.privacy.dlp.v2.InspectConfig.FindingLimits getLimits(); - /** - *
-   * Configuration to control the number of findings returned.
-   * This is not used for data profiling.
-   * When redacting sensitive data from images, finding limits don't apply. They
-   * can cause unexpected or inconsistent results, where only some data is
-   * redacted. Don't include finding limits in
-   * [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage]
-   * requests. Otherwise, Cloud DLP returns an error.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig.FindingLimits limits = 3; - */ - com.google.privacy.dlp.v2.InspectConfig.FindingLimitsOrBuilder getLimitsOrBuilder(); - - /** - *
-   * When true, a contextual quote from the data that triggered a finding is
-   * included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
-   * This is not used for data profiling.
-   * 
- * - * bool include_quote = 4; - * @return The includeQuote. - */ - boolean getIncludeQuote(); - - /** - *
-   * When true, excludes type information of the findings.
-   * This is not used for data profiling.
-   * 
- * - * bool exclude_info_types = 5; - * @return The excludeInfoTypes. - */ - boolean getExcludeInfoTypes(); - - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - java.util.List - getCustomInfoTypesList(); - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index); - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - int getCustomInfoTypesCount(); - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - java.util.List - getCustomInfoTypesOrBuilderList(); - /** - *
-   * CustomInfoTypes provided by the user. See
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
-   * 
- * - * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; - */ - com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBuilder( - int index); - - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return A list containing the contentOptions. - */ - java.util.List getContentOptionsList(); - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return The count of contentOptions. - */ - int getContentOptionsCount(); - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param index The index of the element to return. - * @return The contentOptions at the given index. - */ - com.google.privacy.dlp.v2.ContentOption getContentOptions(int index); - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @return A list containing the enum numeric values on the wire for contentOptions. - */ - java.util.List - getContentOptionsValueList(); - /** - *
-   * Deprecated and unused.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentOption content_options = 8; - * @param index The index of the value to return. - * @return The enum numeric value on the wire of contentOptions at the given index. - */ - int getContentOptionsValue(int index); - - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - java.util.List - getRuleSetList(); - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - com.google.privacy.dlp.v2.InspectionRuleSet getRuleSet(int index); - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - int getRuleSetCount(); - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - java.util.List - getRuleSetOrBuilderList(); - /** - *
-   * Set of rules to apply to the findings for this InspectConfig.
-   * Exclusion rules, contained in the set are executed in the end, other
-   * rules are executed in the order they are specified for each info type.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRuleSet rule_set = 10; - */ - com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder getRuleSetOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java deleted file mode 100644 index 5f376ac94e34..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequest.java +++ /dev/null @@ -1,1516 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request to search for potentially sensitive info in a ContentItem.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectContentRequest} - */ -public final class InspectContentRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectContentRequest) - InspectContentRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use InspectContentRequest.newBuilder() to construct. - private InspectContentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InspectContentRequest() { - parent_ = ""; - inspectTemplateName_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InspectContentRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InspectContentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; - if (inspectConfig_ != null) { - subBuilder = inspectConfig_.toBuilder(); - } - inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectConfig_); - inspectConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; - if (item_ != null) { - subBuilder = item_.toBuilder(); - } - item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(item_); - item_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - inspectTemplateName_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectContentRequest.class, com.google.privacy.dlp.v2.InspectContentRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSPECT_CONFIG_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - /** - *
-   * Configuration for the inspector. What specified here will override
-   * the template referenced by the inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - @java.lang.Override - public boolean hasInspectConfig() { - return inspectConfig_ != null; - } - /** - *
-   * Configuration for the inspector. What specified here will override
-   * the template referenced by the inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - /** - *
-   * Configuration for the inspector. What specified here will override
-   * the template referenced by the inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - return getInspectConfig(); - } - - public static final int ITEM_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.ContentItem item_; - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - * @return Whether the item field is set. - */ - @java.lang.Override - public boolean hasItem() { - return item_ != null; - } - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - * @return The item. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem getItem() { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - return getItem(); - } - - public static final int INSPECT_TEMPLATE_NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object inspectTemplateName_; - /** - *
-   * Template to use. Any configuration directly specified in
-   * inspect_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 4; - * @return The inspectTemplateName. - */ - @java.lang.Override - public java.lang.String getInspectTemplateName() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inspectTemplateName_ = s; - return s; - } - } - /** - *
-   * Template to use. Any configuration directly specified in
-   * inspect_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 4; - * @return The bytes for inspectTemplateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getInspectTemplateNameBytes() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - inspectTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (inspectConfig_ != null) { - output.writeMessage(2, getInspectConfig()); - } - if (item_ != null) { - output.writeMessage(3, getItem()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, inspectTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (inspectConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInspectConfig()); - } - if (item_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getItem()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, inspectTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectContentRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectContentRequest other = (com.google.privacy.dlp.v2.InspectContentRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasInspectConfig() != other.hasInspectConfig()) return false; - if (hasInspectConfig()) { - if (!getInspectConfig() - .equals(other.getInspectConfig())) return false; - } - if (hasItem() != other.hasItem()) return false; - if (hasItem()) { - if (!getItem() - .equals(other.getItem())) return false; - } - if (!getInspectTemplateName() - .equals(other.getInspectTemplateName())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasInspectConfig()) { - hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInspectConfig().hashCode(); - } - if (hasItem()) { - hash = (37 * hash) + ITEM_FIELD_NUMBER; - hash = (53 * hash) + getItem().hashCode(); - } - hash = (37 * hash) + INSPECT_TEMPLATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getInspectTemplateName().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectContentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectContentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to search for potentially sensitive info in a ContentItem.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectContentRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectContentRequest) - com.google.privacy.dlp.v2.InspectContentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectContentRequest.class, com.google.privacy.dlp.v2.InspectContentRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - if (itemBuilder_ == null) { - item_ = null; - } else { - item_ = null; - itemBuilder_ = null; - } - inspectTemplateName_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectContentRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectContentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectContentRequest build() { - com.google.privacy.dlp.v2.InspectContentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectContentRequest buildPartial() { - com.google.privacy.dlp.v2.InspectContentRequest result = new com.google.privacy.dlp.v2.InspectContentRequest(this); - result.parent_ = parent_; - if (inspectConfigBuilder_ == null) { - result.inspectConfig_ = inspectConfig_; - } else { - result.inspectConfig_ = inspectConfigBuilder_.build(); - } - if (itemBuilder_ == null) { - result.item_ = item_; - } else { - result.item_ = itemBuilder_.build(); - } - result.inspectTemplateName_ = inspectTemplateName_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectContentRequest) { - return mergeFrom((com.google.privacy.dlp.v2.InspectContentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectContentRequest other) { - if (other == com.google.privacy.dlp.v2.InspectContentRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasInspectConfig()) { - mergeInspectConfig(other.getInspectConfig()); - } - if (other.hasItem()) { - mergeItem(other.getItem()); - } - if (!other.getInspectTemplateName().isEmpty()) { - inspectTemplateName_ = other.inspectTemplateName_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectContentRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectContentRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; - /** - *
-     * Configuration for the inspector. What specified here will override
-     * the template referenced by the inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - public boolean hasInspectConfig() { - return inspectConfigBuilder_ != null || inspectConfig_ != null; - } - /** - *
-     * Configuration for the inspector. What specified here will override
-     * the template referenced by the inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - if (inspectConfigBuilder_ == null) { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } else { - return inspectConfigBuilder_.getMessage(); - } - } - /** - *
-     * Configuration for the inspector. What specified here will override
-     * the template referenced by the inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectConfig_ = value; - onChanged(); - } else { - inspectConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Configuration for the inspector. What specified here will override
-     * the template referenced by the inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder setInspectConfig( - com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = builderForValue.build(); - onChanged(); - } else { - inspectConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Configuration for the inspector. What specified here will override
-     * the template referenced by the inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (inspectConfig_ != null) { - inspectConfig_ = - com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); - } else { - inspectConfig_ = value; - } - onChanged(); - } else { - inspectConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Configuration for the inspector. What specified here will override
-     * the template referenced by the inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder clearInspectConfig() { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - onChanged(); - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Configuration for the inspector. What specified here will override
-     * the template referenced by the inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { - - onChanged(); - return getInspectConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Configuration for the inspector. What specified here will override
-     * the template referenced by the inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - if (inspectConfigBuilder_ != null) { - return inspectConfigBuilder_.getMessageOrBuilder(); - } else { - return inspectConfig_ == null ? - com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - } - /** - *
-     * Configuration for the inspector. What specified here will override
-     * the template referenced by the inspect_template_name argument.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> - getInspectConfigFieldBuilder() { - if (inspectConfigBuilder_ == null) { - inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( - getInspectConfig(), - getParentForChildren(), - isClean()); - inspectConfig_ = null; - } - return inspectConfigBuilder_; - } - - private com.google.privacy.dlp.v2.ContentItem item_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - * @return Whether the item field is set. - */ - public boolean hasItem() { - return itemBuilder_ != null || item_ != null; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - * @return The item. - */ - public com.google.privacy.dlp.v2.ContentItem getItem() { - if (itemBuilder_ == null) { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } else { - return itemBuilder_.getMessage(); - } - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - */ - public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - item_ = value; - onChanged(); - } else { - itemBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - */ - public Builder setItem( - com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { - if (itemBuilder_ == null) { - item_ = builderForValue.build(); - onChanged(); - } else { - itemBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - */ - public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (item_ != null) { - item_ = - com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); - } else { - item_ = value; - } - onChanged(); - } else { - itemBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - */ - public Builder clearItem() { - if (itemBuilder_ == null) { - item_ = null; - onChanged(); - } else { - item_ = null; - itemBuilder_ = null; - } - - return this; - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - */ - public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { - - onChanged(); - return getItemFieldBuilder().getBuilder(); - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - */ - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - if (itemBuilder_ != null) { - return itemBuilder_.getMessageOrBuilder(); - } else { - return item_ == null ? - com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - } - /** - *
-     * The item to inspect.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> - getItemFieldBuilder() { - if (itemBuilder_ == null) { - itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( - getItem(), - getParentForChildren(), - isClean()); - item_ = null; - } - return itemBuilder_; - } - - private java.lang.Object inspectTemplateName_ = ""; - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 4; - * @return The inspectTemplateName. - */ - public java.lang.String getInspectTemplateName() { - java.lang.Object ref = inspectTemplateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inspectTemplateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 4; - * @return The bytes for inspectTemplateName. - */ - public com.google.protobuf.ByteString - getInspectTemplateNameBytes() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - inspectTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 4; - * @param value The inspectTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInspectTemplateName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - inspectTemplateName_ = value; - onChanged(); - return this; - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 4; - * @return This builder for chaining. - */ - public Builder clearInspectTemplateName() { - - inspectTemplateName_ = getDefaultInstance().getInspectTemplateName(); - onChanged(); - return this; - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * inspect_config will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 4; - * @param value The bytes for inspectTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInspectTemplateNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - inspectTemplateName_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectContentRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectContentRequest) - private static final com.google.privacy.dlp.v2.InspectContentRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectContentRequest(); - } - - public static com.google.privacy.dlp.v2.InspectContentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InspectContentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InspectContentRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectContentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java deleted file mode 100644 index d2079954a98f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentRequestOrBuilder.java +++ /dev/null @@ -1,156 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InspectContentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectContentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Configuration for the inspector. What specified here will override
-   * the template referenced by the inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - boolean hasInspectConfig(); - /** - *
-   * Configuration for the inspector. What specified here will override
-   * the template referenced by the inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); - /** - *
-   * Configuration for the inspector. What specified here will override
-   * the template referenced by the inspect_template_name argument.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); - - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - * @return Whether the item field is set. - */ - boolean hasItem(); - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - * @return The item. - */ - com.google.privacy.dlp.v2.ContentItem getItem(); - /** - *
-   * The item to inspect.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 3; - */ - com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); - - /** - *
-   * Template to use. Any configuration directly specified in
-   * inspect_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 4; - * @return The inspectTemplateName. - */ - java.lang.String getInspectTemplateName(); - /** - *
-   * Template to use. Any configuration directly specified in
-   * inspect_config will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 4; - * @return The bytes for inspectTemplateName. - */ - com.google.protobuf.ByteString - getInspectTemplateNameBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponse.java deleted file mode 100644 index 5e4eb7d861be..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponse.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Results of inspecting an item.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectContentResponse} - */ -public final class InspectContentResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectContentResponse) - InspectContentResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use InspectContentResponse.newBuilder() to construct. - private InspectContentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InspectContentResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InspectContentResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InspectContentResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InspectResult.Builder subBuilder = null; - if (result_ != null) { - subBuilder = result_.toBuilder(); - } - result_ = input.readMessage(com.google.privacy.dlp.v2.InspectResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(result_); - result_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectContentResponse.class, com.google.privacy.dlp.v2.InspectContentResponse.Builder.class); - } - - public static final int RESULT_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.InspectResult result_; - /** - *
-   * The findings.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - * @return Whether the result field is set. - */ - @java.lang.Override - public boolean hasResult() { - return result_ != null; - } - /** - *
-   * The findings.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - * @return The result. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectResult getResult() { - return result_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : result_; - } - /** - *
-   * The findings.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectResultOrBuilder getResultOrBuilder() { - return getResult(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (result_ != null) { - output.writeMessage(1, getResult()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (result_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getResult()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectContentResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectContentResponse other = (com.google.privacy.dlp.v2.InspectContentResponse) obj; - - if (hasResult() != other.hasResult()) return false; - if (hasResult()) { - if (!getResult() - .equals(other.getResult())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasResult()) { - hash = (37 * hash) + RESULT_FIELD_NUMBER; - hash = (53 * hash) + getResult().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectContentResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectContentResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Results of inspecting an item.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectContentResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectContentResponse) - com.google.privacy.dlp.v2.InspectContentResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectContentResponse.class, com.google.privacy.dlp.v2.InspectContentResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectContentResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (resultBuilder_ == null) { - result_ = null; - } else { - result_ = null; - resultBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectContentResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectContentResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectContentResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectContentResponse build() { - com.google.privacy.dlp.v2.InspectContentResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectContentResponse buildPartial() { - com.google.privacy.dlp.v2.InspectContentResponse result = new com.google.privacy.dlp.v2.InspectContentResponse(this); - if (resultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = resultBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectContentResponse) { - return mergeFrom((com.google.privacy.dlp.v2.InspectContentResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectContentResponse other) { - if (other == com.google.privacy.dlp.v2.InspectContentResponse.getDefaultInstance()) return this; - if (other.hasResult()) { - mergeResult(other.getResult()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectContentResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectContentResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.InspectResult result_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> resultBuilder_; - /** - *
-     * The findings.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - * @return Whether the result field is set. - */ - public boolean hasResult() { - return resultBuilder_ != null || result_ != null; - } - /** - *
-     * The findings.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - * @return The result. - */ - public com.google.privacy.dlp.v2.InspectResult getResult() { - if (resultBuilder_ == null) { - return result_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : result_; - } else { - return resultBuilder_.getMessage(); - } - } - /** - *
-     * The findings.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - */ - public Builder setResult(com.google.privacy.dlp.v2.InspectResult value) { - if (resultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - resultBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The findings.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - */ - public Builder setResult( - com.google.privacy.dlp.v2.InspectResult.Builder builderForValue) { - if (resultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - resultBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The findings.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - */ - public Builder mergeResult(com.google.privacy.dlp.v2.InspectResult value) { - if (resultBuilder_ == null) { - if (result_ != null) { - result_ = - com.google.privacy.dlp.v2.InspectResult.newBuilder(result_).mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - resultBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The findings.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - */ - public Builder clearResult() { - if (resultBuilder_ == null) { - result_ = null; - onChanged(); - } else { - result_ = null; - resultBuilder_ = null; - } - - return this; - } - /** - *
-     * The findings.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - */ - public com.google.privacy.dlp.v2.InspectResult.Builder getResultBuilder() { - - onChanged(); - return getResultFieldBuilder().getBuilder(); - } - /** - *
-     * The findings.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - */ - public com.google.privacy.dlp.v2.InspectResultOrBuilder getResultOrBuilder() { - if (resultBuilder_ != null) { - return resultBuilder_.getMessageOrBuilder(); - } else { - return result_ == null ? - com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : result_; - } - } - /** - *
-     * The findings.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> - getResultFieldBuilder() { - if (resultBuilder_ == null) { - resultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder>( - getResult(), - getParentForChildren(), - isClean()); - result_ = null; - } - return resultBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectContentResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectContentResponse) - private static final com.google.privacy.dlp.v2.InspectContentResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectContentResponse(); - } - - public static com.google.privacy.dlp.v2.InspectContentResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InspectContentResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InspectContentResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectContentResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponseOrBuilder.java deleted file mode 100644 index 2595a8c8cc0e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectContentResponseOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InspectContentResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectContentResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The findings.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - * @return Whether the result field is set. - */ - boolean hasResult(); - /** - *
-   * The findings.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - * @return The result. - */ - com.google.privacy.dlp.v2.InspectResult getResult(); - /** - *
-   * The findings.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult result = 1; - */ - com.google.privacy.dlp.v2.InspectResultOrBuilder getResultOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetails.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetails.java deleted file mode 100644 index 63d91f13ff81..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetails.java +++ /dev/null @@ -1,3258 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The results of an inspect DataSource job.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails} - */ -public final class InspectDataSourceDetails extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectDataSourceDetails) - InspectDataSourceDetailsOrBuilder { -private static final long serialVersionUID = 0L; - // Use InspectDataSourceDetails.newBuilder() to construct. - private InspectDataSourceDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InspectDataSourceDetails() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InspectDataSourceDetails(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InspectDataSourceDetails( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder subBuilder = null; - if (requestedOptions_ != null) { - subBuilder = requestedOptions_.toBuilder(); - } - requestedOptions_ = input.readMessage(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestedOptions_); - requestedOptions_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder subBuilder = null; - if (result_ != null) { - subBuilder = result_.toBuilder(); - } - result_ = input.readMessage(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(result_); - result_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectDataSourceDetails.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder.class); - } - - public interface RequestedOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * If run with an InspectTemplate, a snapshot of its state at the time of
-     * this run.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - * @return Whether the snapshotInspectTemplate field is set. - */ - boolean hasSnapshotInspectTemplate(); - /** - *
-     * If run with an InspectTemplate, a snapshot of its state at the time of
-     * this run.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - * @return The snapshotInspectTemplate. - */ - com.google.privacy.dlp.v2.InspectTemplate getSnapshotInspectTemplate(); - /** - *
-     * If run with an InspectTemplate, a snapshot of its state at the time of
-     * this run.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - */ - com.google.privacy.dlp.v2.InspectTemplateOrBuilder getSnapshotInspectTemplateOrBuilder(); - - /** - *
-     * Inspect config.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - * @return Whether the jobConfig field is set. - */ - boolean hasJobConfig(); - /** - *
-     * Inspect config.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - * @return The jobConfig. - */ - com.google.privacy.dlp.v2.InspectJobConfig getJobConfig(); - /** - *
-     * Inspect config.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - */ - com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getJobConfigOrBuilder(); - } - /** - *
-   * Snapshot of the inspection configuration.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions} - */ - public static final class RequestedOptions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) - RequestedOptionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use RequestedOptions.newBuilder() to construct. - private RequestedOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RequestedOptions() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RequestedOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RequestedOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InspectTemplate.Builder subBuilder = null; - if (snapshotInspectTemplate_ != null) { - subBuilder = snapshotInspectTemplate_.toBuilder(); - } - snapshotInspectTemplate_ = input.readMessage(com.google.privacy.dlp.v2.InspectTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(snapshotInspectTemplate_); - snapshotInspectTemplate_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.InspectJobConfig.Builder subBuilder = null; - if (jobConfig_ != null) { - subBuilder = jobConfig_.toBuilder(); - } - jobConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectJobConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(jobConfig_); - jobConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder.class); - } - - public static final int SNAPSHOT_INSPECT_TEMPLATE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.InspectTemplate snapshotInspectTemplate_; - /** - *
-     * If run with an InspectTemplate, a snapshot of its state at the time of
-     * this run.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - * @return Whether the snapshotInspectTemplate field is set. - */ - @java.lang.Override - public boolean hasSnapshotInspectTemplate() { - return snapshotInspectTemplate_ != null; - } - /** - *
-     * If run with an InspectTemplate, a snapshot of its state at the time of
-     * this run.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - * @return The snapshotInspectTemplate. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplate getSnapshotInspectTemplate() { - return snapshotInspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : snapshotInspectTemplate_; - } - /** - *
-     * If run with an InspectTemplate, a snapshot of its state at the time of
-     * this run.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getSnapshotInspectTemplateOrBuilder() { - return getSnapshotInspectTemplate(); - } - - public static final int JOB_CONFIG_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.InspectJobConfig jobConfig_; - /** - *
-     * Inspect config.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - * @return Whether the jobConfig field is set. - */ - @java.lang.Override - public boolean hasJobConfig() { - return jobConfig_ != null; - } - /** - *
-     * Inspect config.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - * @return The jobConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfig getJobConfig() { - return jobConfig_ == null ? com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance() : jobConfig_; - } - /** - *
-     * Inspect config.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getJobConfigOrBuilder() { - return getJobConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (snapshotInspectTemplate_ != null) { - output.writeMessage(1, getSnapshotInspectTemplate()); - } - if (jobConfig_ != null) { - output.writeMessage(3, getJobConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (snapshotInspectTemplate_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSnapshotInspectTemplate()); - } - if (jobConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getJobConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions other = (com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) obj; - - if (hasSnapshotInspectTemplate() != other.hasSnapshotInspectTemplate()) return false; - if (hasSnapshotInspectTemplate()) { - if (!getSnapshotInspectTemplate() - .equals(other.getSnapshotInspectTemplate())) return false; - } - if (hasJobConfig() != other.hasJobConfig()) return false; - if (hasJobConfig()) { - if (!getJobConfig() - .equals(other.getJobConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSnapshotInspectTemplate()) { - hash = (37 * hash) + SNAPSHOT_INSPECT_TEMPLATE_FIELD_NUMBER; - hash = (53 * hash) + getSnapshotInspectTemplate().hashCode(); - } - if (hasJobConfig()) { - hash = (37 * hash) + JOB_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getJobConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Snapshot of the inspection configuration.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (snapshotInspectTemplateBuilder_ == null) { - snapshotInspectTemplate_ = null; - } else { - snapshotInspectTemplate_ = null; - snapshotInspectTemplateBuilder_ = null; - } - if (jobConfigBuilder_ == null) { - jobConfig_ = null; - } else { - jobConfig_ = null; - jobConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_RequestedOptions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions build() { - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions buildPartial() { - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions result = new com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions(this); - if (snapshotInspectTemplateBuilder_ == null) { - result.snapshotInspectTemplate_ = snapshotInspectTemplate_; - } else { - result.snapshotInspectTemplate_ = snapshotInspectTemplateBuilder_.build(); - } - if (jobConfigBuilder_ == null) { - result.jobConfig_ = jobConfig_; - } else { - result.jobConfig_ = jobConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) { - return mergeFrom((com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions other) { - if (other == com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance()) return this; - if (other.hasSnapshotInspectTemplate()) { - mergeSnapshotInspectTemplate(other.getSnapshotInspectTemplate()); - } - if (other.hasJobConfig()) { - mergeJobConfig(other.getJobConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.InspectTemplate snapshotInspectTemplate_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> snapshotInspectTemplateBuilder_; - /** - *
-       * If run with an InspectTemplate, a snapshot of its state at the time of
-       * this run.
-       * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - * @return Whether the snapshotInspectTemplate field is set. - */ - public boolean hasSnapshotInspectTemplate() { - return snapshotInspectTemplateBuilder_ != null || snapshotInspectTemplate_ != null; - } - /** - *
-       * If run with an InspectTemplate, a snapshot of its state at the time of
-       * this run.
-       * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - * @return The snapshotInspectTemplate. - */ - public com.google.privacy.dlp.v2.InspectTemplate getSnapshotInspectTemplate() { - if (snapshotInspectTemplateBuilder_ == null) { - return snapshotInspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : snapshotInspectTemplate_; - } else { - return snapshotInspectTemplateBuilder_.getMessage(); - } - } - /** - *
-       * If run with an InspectTemplate, a snapshot of its state at the time of
-       * this run.
-       * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - */ - public Builder setSnapshotInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { - if (snapshotInspectTemplateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - snapshotInspectTemplate_ = value; - onChanged(); - } else { - snapshotInspectTemplateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * If run with an InspectTemplate, a snapshot of its state at the time of
-       * this run.
-       * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - */ - public Builder setSnapshotInspectTemplate( - com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { - if (snapshotInspectTemplateBuilder_ == null) { - snapshotInspectTemplate_ = builderForValue.build(); - onChanged(); - } else { - snapshotInspectTemplateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * If run with an InspectTemplate, a snapshot of its state at the time of
-       * this run.
-       * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - */ - public Builder mergeSnapshotInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { - if (snapshotInspectTemplateBuilder_ == null) { - if (snapshotInspectTemplate_ != null) { - snapshotInspectTemplate_ = - com.google.privacy.dlp.v2.InspectTemplate.newBuilder(snapshotInspectTemplate_).mergeFrom(value).buildPartial(); - } else { - snapshotInspectTemplate_ = value; - } - onChanged(); - } else { - snapshotInspectTemplateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * If run with an InspectTemplate, a snapshot of its state at the time of
-       * this run.
-       * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - */ - public Builder clearSnapshotInspectTemplate() { - if (snapshotInspectTemplateBuilder_ == null) { - snapshotInspectTemplate_ = null; - onChanged(); - } else { - snapshotInspectTemplate_ = null; - snapshotInspectTemplateBuilder_ = null; - } - - return this; - } - /** - *
-       * If run with an InspectTemplate, a snapshot of its state at the time of
-       * this run.
-       * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - */ - public com.google.privacy.dlp.v2.InspectTemplate.Builder getSnapshotInspectTemplateBuilder() { - - onChanged(); - return getSnapshotInspectTemplateFieldBuilder().getBuilder(); - } - /** - *
-       * If run with an InspectTemplate, a snapshot of its state at the time of
-       * this run.
-       * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - */ - public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getSnapshotInspectTemplateOrBuilder() { - if (snapshotInspectTemplateBuilder_ != null) { - return snapshotInspectTemplateBuilder_.getMessageOrBuilder(); - } else { - return snapshotInspectTemplate_ == null ? - com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : snapshotInspectTemplate_; - } - } - /** - *
-       * If run with an InspectTemplate, a snapshot of its state at the time of
-       * this run.
-       * 
- * - * .google.privacy.dlp.v2.InspectTemplate snapshot_inspect_template = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> - getSnapshotInspectTemplateFieldBuilder() { - if (snapshotInspectTemplateBuilder_ == null) { - snapshotInspectTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder>( - getSnapshotInspectTemplate(), - getParentForChildren(), - isClean()); - snapshotInspectTemplate_ = null; - } - return snapshotInspectTemplateBuilder_; - } - - private com.google.privacy.dlp.v2.InspectJobConfig jobConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> jobConfigBuilder_; - /** - *
-       * Inspect config.
-       * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - * @return Whether the jobConfig field is set. - */ - public boolean hasJobConfig() { - return jobConfigBuilder_ != null || jobConfig_ != null; - } - /** - *
-       * Inspect config.
-       * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - * @return The jobConfig. - */ - public com.google.privacy.dlp.v2.InspectJobConfig getJobConfig() { - if (jobConfigBuilder_ == null) { - return jobConfig_ == null ? com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance() : jobConfig_; - } else { - return jobConfigBuilder_.getMessage(); - } - } - /** - *
-       * Inspect config.
-       * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - */ - public Builder setJobConfig(com.google.privacy.dlp.v2.InspectJobConfig value) { - if (jobConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobConfig_ = value; - onChanged(); - } else { - jobConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Inspect config.
-       * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - */ - public Builder setJobConfig( - com.google.privacy.dlp.v2.InspectJobConfig.Builder builderForValue) { - if (jobConfigBuilder_ == null) { - jobConfig_ = builderForValue.build(); - onChanged(); - } else { - jobConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Inspect config.
-       * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - */ - public Builder mergeJobConfig(com.google.privacy.dlp.v2.InspectJobConfig value) { - if (jobConfigBuilder_ == null) { - if (jobConfig_ != null) { - jobConfig_ = - com.google.privacy.dlp.v2.InspectJobConfig.newBuilder(jobConfig_).mergeFrom(value).buildPartial(); - } else { - jobConfig_ = value; - } - onChanged(); - } else { - jobConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Inspect config.
-       * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - */ - public Builder clearJobConfig() { - if (jobConfigBuilder_ == null) { - jobConfig_ = null; - onChanged(); - } else { - jobConfig_ = null; - jobConfigBuilder_ = null; - } - - return this; - } - /** - *
-       * Inspect config.
-       * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - */ - public com.google.privacy.dlp.v2.InspectJobConfig.Builder getJobConfigBuilder() { - - onChanged(); - return getJobConfigFieldBuilder().getBuilder(); - } - /** - *
-       * Inspect config.
-       * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - */ - public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getJobConfigOrBuilder() { - if (jobConfigBuilder_ != null) { - return jobConfigBuilder_.getMessageOrBuilder(); - } else { - return jobConfig_ == null ? - com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance() : jobConfig_; - } - } - /** - *
-       * Inspect config.
-       * 
- * - * .google.privacy.dlp.v2.InspectJobConfig job_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> - getJobConfigFieldBuilder() { - if (jobConfigBuilder_ == null) { - jobConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder>( - getJobConfig(), - getParentForChildren(), - isClean()); - jobConfig_ = null; - } - return jobConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) - private static final com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions(); - } - - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RequestedOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RequestedOptions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectDataSourceDetails.Result) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Total size in bytes that were processed.
-     * 
- * - * int64 processed_bytes = 1; - * @return The processedBytes. - */ - long getProcessedBytes(); - - /** - *
-     * Estimate of the number of bytes to process.
-     * 
- * - * int64 total_estimated_bytes = 2; - * @return The totalEstimatedBytes. - */ - long getTotalEstimatedBytes(); - - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - java.util.List - getInfoTypeStatsList(); - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - com.google.privacy.dlp.v2.InfoTypeStats getInfoTypeStats(int index); - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - int getInfoTypeStatsCount(); - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - java.util.List - getInfoTypeStatsOrBuilderList(); - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder getInfoTypeStatsOrBuilder( - int index); - - /** - *
-     * Statistics related to the processing of hybrid inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - * @return Whether the hybridStats field is set. - */ - boolean hasHybridStats(); - /** - *
-     * Statistics related to the processing of hybrid inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - * @return The hybridStats. - */ - com.google.privacy.dlp.v2.HybridInspectStatistics getHybridStats(); - /** - *
-     * Statistics related to the processing of hybrid inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - */ - com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder getHybridStatsOrBuilder(); - } - /** - *
-   * All result fields mentioned below are updated while the job is processing.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails.Result} - */ - public static final class Result extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectDataSourceDetails.Result) - ResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use Result.newBuilder() to construct. - private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Result() { - infoTypeStats_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Result(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Result( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - processedBytes_ = input.readInt64(); - break; - } - case 16: { - - totalEstimatedBytes_ = input.readInt64(); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypeStats_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - infoTypeStats_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoTypeStats.parser(), extensionRegistry)); - break; - } - case 58: { - com.google.privacy.dlp.v2.HybridInspectStatistics.Builder subBuilder = null; - if (hybridStats_ != null) { - subBuilder = hybridStats_.toBuilder(); - } - hybridStats_ = input.readMessage(com.google.privacy.dlp.v2.HybridInspectStatistics.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hybridStats_); - hybridStats_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypeStats_ = java.util.Collections.unmodifiableList(infoTypeStats_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder.class); - } - - public static final int PROCESSED_BYTES_FIELD_NUMBER = 1; - private long processedBytes_; - /** - *
-     * Total size in bytes that were processed.
-     * 
- * - * int64 processed_bytes = 1; - * @return The processedBytes. - */ - @java.lang.Override - public long getProcessedBytes() { - return processedBytes_; - } - - public static final int TOTAL_ESTIMATED_BYTES_FIELD_NUMBER = 2; - private long totalEstimatedBytes_; - /** - *
-     * Estimate of the number of bytes to process.
-     * 
- * - * int64 total_estimated_bytes = 2; - * @return The totalEstimatedBytes. - */ - @java.lang.Override - public long getTotalEstimatedBytes() { - return totalEstimatedBytes_; - } - - public static final int INFO_TYPE_STATS_FIELD_NUMBER = 3; - private java.util.List infoTypeStats_; - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - @java.lang.Override - public java.util.List getInfoTypeStatsList() { - return infoTypeStats_; - } - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - @java.lang.Override - public java.util.List - getInfoTypeStatsOrBuilderList() { - return infoTypeStats_; - } - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - @java.lang.Override - public int getInfoTypeStatsCount() { - return infoTypeStats_.size(); - } - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeStats getInfoTypeStats(int index) { - return infoTypeStats_.get(index); - } - /** - *
-     * Statistics of how many instances of each info type were found during
-     * inspect job.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder getInfoTypeStatsOrBuilder( - int index) { - return infoTypeStats_.get(index); - } - - public static final int HYBRID_STATS_FIELD_NUMBER = 7; - private com.google.privacy.dlp.v2.HybridInspectStatistics hybridStats_; - /** - *
-     * Statistics related to the processing of hybrid inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - * @return Whether the hybridStats field is set. - */ - @java.lang.Override - public boolean hasHybridStats() { - return hybridStats_ != null; - } - /** - *
-     * Statistics related to the processing of hybrid inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - * @return The hybridStats. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectStatistics getHybridStats() { - return hybridStats_ == null ? com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance() : hybridStats_; - } - /** - *
-     * Statistics related to the processing of hybrid inspect.
-     * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder getHybridStatsOrBuilder() { - return getHybridStats(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (processedBytes_ != 0L) { - output.writeInt64(1, processedBytes_); - } - if (totalEstimatedBytes_ != 0L) { - output.writeInt64(2, totalEstimatedBytes_); - } - for (int i = 0; i < infoTypeStats_.size(); i++) { - output.writeMessage(3, infoTypeStats_.get(i)); - } - if (hybridStats_ != null) { - output.writeMessage(7, getHybridStats()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (processedBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, processedBytes_); - } - if (totalEstimatedBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, totalEstimatedBytes_); - } - for (int i = 0; i < infoTypeStats_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, infoTypeStats_.get(i)); - } - if (hybridStats_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getHybridStats()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails.Result)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result other = (com.google.privacy.dlp.v2.InspectDataSourceDetails.Result) obj; - - if (getProcessedBytes() - != other.getProcessedBytes()) return false; - if (getTotalEstimatedBytes() - != other.getTotalEstimatedBytes()) return false; - if (!getInfoTypeStatsList() - .equals(other.getInfoTypeStatsList())) return false; - if (hasHybridStats() != other.hasHybridStats()) return false; - if (hasHybridStats()) { - if (!getHybridStats() - .equals(other.getHybridStats())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROCESSED_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getProcessedBytes()); - hash = (37 * hash) + TOTAL_ESTIMATED_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTotalEstimatedBytes()); - if (getInfoTypeStatsCount() > 0) { - hash = (37 * hash) + INFO_TYPE_STATS_FIELD_NUMBER; - hash = (53 * hash) + getInfoTypeStatsList().hashCode(); - } - if (hasHybridStats()) { - hash = (37 * hash) + HYBRID_STATS_FIELD_NUMBER; - hash = (53 * hash) + getHybridStats().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * All result fields mentioned below are updated while the job is processing.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails.Result} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectDataSourceDetails.Result) - com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoTypeStatsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - processedBytes_ = 0L; - - totalEstimatedBytes_ = 0L; - - if (infoTypeStatsBuilder_ == null) { - infoTypeStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - infoTypeStatsBuilder_.clear(); - } - if (hybridStatsBuilder_ == null) { - hybridStats_ = null; - } else { - hybridStats_ = null; - hybridStatsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_Result_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result build() { - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result buildPartial() { - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result result = new com.google.privacy.dlp.v2.InspectDataSourceDetails.Result(this); - int from_bitField0_ = bitField0_; - result.processedBytes_ = processedBytes_; - result.totalEstimatedBytes_ = totalEstimatedBytes_; - if (infoTypeStatsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - infoTypeStats_ = java.util.Collections.unmodifiableList(infoTypeStats_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.infoTypeStats_ = infoTypeStats_; - } else { - result.infoTypeStats_ = infoTypeStatsBuilder_.build(); - } - if (hybridStatsBuilder_ == null) { - result.hybridStats_ = hybridStats_; - } else { - result.hybridStats_ = hybridStatsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails.Result) { - return mergeFrom((com.google.privacy.dlp.v2.InspectDataSourceDetails.Result)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result other) { - if (other == com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance()) return this; - if (other.getProcessedBytes() != 0L) { - setProcessedBytes(other.getProcessedBytes()); - } - if (other.getTotalEstimatedBytes() != 0L) { - setTotalEstimatedBytes(other.getTotalEstimatedBytes()); - } - if (infoTypeStatsBuilder_ == null) { - if (!other.infoTypeStats_.isEmpty()) { - if (infoTypeStats_.isEmpty()) { - infoTypeStats_ = other.infoTypeStats_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInfoTypeStatsIsMutable(); - infoTypeStats_.addAll(other.infoTypeStats_); - } - onChanged(); - } - } else { - if (!other.infoTypeStats_.isEmpty()) { - if (infoTypeStatsBuilder_.isEmpty()) { - infoTypeStatsBuilder_.dispose(); - infoTypeStatsBuilder_ = null; - infoTypeStats_ = other.infoTypeStats_; - bitField0_ = (bitField0_ & ~0x00000001); - infoTypeStatsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInfoTypeStatsFieldBuilder() : null; - } else { - infoTypeStatsBuilder_.addAllMessages(other.infoTypeStats_); - } - } - } - if (other.hasHybridStats()) { - mergeHybridStats(other.getHybridStats()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectDataSourceDetails.Result) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long processedBytes_ ; - /** - *
-       * Total size in bytes that were processed.
-       * 
- * - * int64 processed_bytes = 1; - * @return The processedBytes. - */ - @java.lang.Override - public long getProcessedBytes() { - return processedBytes_; - } - /** - *
-       * Total size in bytes that were processed.
-       * 
- * - * int64 processed_bytes = 1; - * @param value The processedBytes to set. - * @return This builder for chaining. - */ - public Builder setProcessedBytes(long value) { - - processedBytes_ = value; - onChanged(); - return this; - } - /** - *
-       * Total size in bytes that were processed.
-       * 
- * - * int64 processed_bytes = 1; - * @return This builder for chaining. - */ - public Builder clearProcessedBytes() { - - processedBytes_ = 0L; - onChanged(); - return this; - } - - private long totalEstimatedBytes_ ; - /** - *
-       * Estimate of the number of bytes to process.
-       * 
- * - * int64 total_estimated_bytes = 2; - * @return The totalEstimatedBytes. - */ - @java.lang.Override - public long getTotalEstimatedBytes() { - return totalEstimatedBytes_; - } - /** - *
-       * Estimate of the number of bytes to process.
-       * 
- * - * int64 total_estimated_bytes = 2; - * @param value The totalEstimatedBytes to set. - * @return This builder for chaining. - */ - public Builder setTotalEstimatedBytes(long value) { - - totalEstimatedBytes_ = value; - onChanged(); - return this; - } - /** - *
-       * Estimate of the number of bytes to process.
-       * 
- * - * int64 total_estimated_bytes = 2; - * @return This builder for chaining. - */ - public Builder clearTotalEstimatedBytes() { - - totalEstimatedBytes_ = 0L; - onChanged(); - return this; - } - - private java.util.List infoTypeStats_ = - java.util.Collections.emptyList(); - private void ensureInfoTypeStatsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - infoTypeStats_ = new java.util.ArrayList(infoTypeStats_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeStats, com.google.privacy.dlp.v2.InfoTypeStats.Builder, com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder> infoTypeStatsBuilder_; - - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public java.util.List getInfoTypeStatsList() { - if (infoTypeStatsBuilder_ == null) { - return java.util.Collections.unmodifiableList(infoTypeStats_); - } else { - return infoTypeStatsBuilder_.getMessageList(); - } - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public int getInfoTypeStatsCount() { - if (infoTypeStatsBuilder_ == null) { - return infoTypeStats_.size(); - } else { - return infoTypeStatsBuilder_.getCount(); - } - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public com.google.privacy.dlp.v2.InfoTypeStats getInfoTypeStats(int index) { - if (infoTypeStatsBuilder_ == null) { - return infoTypeStats_.get(index); - } else { - return infoTypeStatsBuilder_.getMessage(index); - } - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public Builder setInfoTypeStats( - int index, com.google.privacy.dlp.v2.InfoTypeStats value) { - if (infoTypeStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypeStatsIsMutable(); - infoTypeStats_.set(index, value); - onChanged(); - } else { - infoTypeStatsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public Builder setInfoTypeStats( - int index, com.google.privacy.dlp.v2.InfoTypeStats.Builder builderForValue) { - if (infoTypeStatsBuilder_ == null) { - ensureInfoTypeStatsIsMutable(); - infoTypeStats_.set(index, builderForValue.build()); - onChanged(); - } else { - infoTypeStatsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public Builder addInfoTypeStats(com.google.privacy.dlp.v2.InfoTypeStats value) { - if (infoTypeStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypeStatsIsMutable(); - infoTypeStats_.add(value); - onChanged(); - } else { - infoTypeStatsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public Builder addInfoTypeStats( - int index, com.google.privacy.dlp.v2.InfoTypeStats value) { - if (infoTypeStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypeStatsIsMutable(); - infoTypeStats_.add(index, value); - onChanged(); - } else { - infoTypeStatsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public Builder addInfoTypeStats( - com.google.privacy.dlp.v2.InfoTypeStats.Builder builderForValue) { - if (infoTypeStatsBuilder_ == null) { - ensureInfoTypeStatsIsMutable(); - infoTypeStats_.add(builderForValue.build()); - onChanged(); - } else { - infoTypeStatsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public Builder addInfoTypeStats( - int index, com.google.privacy.dlp.v2.InfoTypeStats.Builder builderForValue) { - if (infoTypeStatsBuilder_ == null) { - ensureInfoTypeStatsIsMutable(); - infoTypeStats_.add(index, builderForValue.build()); - onChanged(); - } else { - infoTypeStatsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public Builder addAllInfoTypeStats( - java.lang.Iterable values) { - if (infoTypeStatsBuilder_ == null) { - ensureInfoTypeStatsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, infoTypeStats_); - onChanged(); - } else { - infoTypeStatsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public Builder clearInfoTypeStats() { - if (infoTypeStatsBuilder_ == null) { - infoTypeStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - infoTypeStatsBuilder_.clear(); - } - return this; - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public Builder removeInfoTypeStats(int index) { - if (infoTypeStatsBuilder_ == null) { - ensureInfoTypeStatsIsMutable(); - infoTypeStats_.remove(index); - onChanged(); - } else { - infoTypeStatsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public com.google.privacy.dlp.v2.InfoTypeStats.Builder getInfoTypeStatsBuilder( - int index) { - return getInfoTypeStatsFieldBuilder().getBuilder(index); - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder getInfoTypeStatsOrBuilder( - int index) { - if (infoTypeStatsBuilder_ == null) { - return infoTypeStats_.get(index); } else { - return infoTypeStatsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public java.util.List - getInfoTypeStatsOrBuilderList() { - if (infoTypeStatsBuilder_ != null) { - return infoTypeStatsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(infoTypeStats_); - } - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public com.google.privacy.dlp.v2.InfoTypeStats.Builder addInfoTypeStatsBuilder() { - return getInfoTypeStatsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoTypeStats.getDefaultInstance()); - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public com.google.privacy.dlp.v2.InfoTypeStats.Builder addInfoTypeStatsBuilder( - int index) { - return getInfoTypeStatsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoTypeStats.getDefaultInstance()); - } - /** - *
-       * Statistics of how many instances of each info type were found during
-       * inspect job.
-       * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeStats info_type_stats = 3; - */ - public java.util.List - getInfoTypeStatsBuilderList() { - return getInfoTypeStatsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeStats, com.google.privacy.dlp.v2.InfoTypeStats.Builder, com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder> - getInfoTypeStatsFieldBuilder() { - if (infoTypeStatsBuilder_ == null) { - infoTypeStatsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeStats, com.google.privacy.dlp.v2.InfoTypeStats.Builder, com.google.privacy.dlp.v2.InfoTypeStatsOrBuilder>( - infoTypeStats_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - infoTypeStats_ = null; - } - return infoTypeStatsBuilder_; - } - - private com.google.privacy.dlp.v2.HybridInspectStatistics hybridStats_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridInspectStatistics, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder, com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder> hybridStatsBuilder_; - /** - *
-       * Statistics related to the processing of hybrid inspect.
-       * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - * @return Whether the hybridStats field is set. - */ - public boolean hasHybridStats() { - return hybridStatsBuilder_ != null || hybridStats_ != null; - } - /** - *
-       * Statistics related to the processing of hybrid inspect.
-       * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - * @return The hybridStats. - */ - public com.google.privacy.dlp.v2.HybridInspectStatistics getHybridStats() { - if (hybridStatsBuilder_ == null) { - return hybridStats_ == null ? com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance() : hybridStats_; - } else { - return hybridStatsBuilder_.getMessage(); - } - } - /** - *
-       * Statistics related to the processing of hybrid inspect.
-       * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - */ - public Builder setHybridStats(com.google.privacy.dlp.v2.HybridInspectStatistics value) { - if (hybridStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hybridStats_ = value; - onChanged(); - } else { - hybridStatsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Statistics related to the processing of hybrid inspect.
-       * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - */ - public Builder setHybridStats( - com.google.privacy.dlp.v2.HybridInspectStatistics.Builder builderForValue) { - if (hybridStatsBuilder_ == null) { - hybridStats_ = builderForValue.build(); - onChanged(); - } else { - hybridStatsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Statistics related to the processing of hybrid inspect.
-       * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - */ - public Builder mergeHybridStats(com.google.privacy.dlp.v2.HybridInspectStatistics value) { - if (hybridStatsBuilder_ == null) { - if (hybridStats_ != null) { - hybridStats_ = - com.google.privacy.dlp.v2.HybridInspectStatistics.newBuilder(hybridStats_).mergeFrom(value).buildPartial(); - } else { - hybridStats_ = value; - } - onChanged(); - } else { - hybridStatsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Statistics related to the processing of hybrid inspect.
-       * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - */ - public Builder clearHybridStats() { - if (hybridStatsBuilder_ == null) { - hybridStats_ = null; - onChanged(); - } else { - hybridStats_ = null; - hybridStatsBuilder_ = null; - } - - return this; - } - /** - *
-       * Statistics related to the processing of hybrid inspect.
-       * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - */ - public com.google.privacy.dlp.v2.HybridInspectStatistics.Builder getHybridStatsBuilder() { - - onChanged(); - return getHybridStatsFieldBuilder().getBuilder(); - } - /** - *
-       * Statistics related to the processing of hybrid inspect.
-       * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - */ - public com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder getHybridStatsOrBuilder() { - if (hybridStatsBuilder_ != null) { - return hybridStatsBuilder_.getMessageOrBuilder(); - } else { - return hybridStats_ == null ? - com.google.privacy.dlp.v2.HybridInspectStatistics.getDefaultInstance() : hybridStats_; - } - } - /** - *
-       * Statistics related to the processing of hybrid inspect.
-       * 
- * - * .google.privacy.dlp.v2.HybridInspectStatistics hybrid_stats = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridInspectStatistics, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder, com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder> - getHybridStatsFieldBuilder() { - if (hybridStatsBuilder_ == null) { - hybridStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridInspectStatistics, com.google.privacy.dlp.v2.HybridInspectStatistics.Builder, com.google.privacy.dlp.v2.HybridInspectStatisticsOrBuilder>( - getHybridStats(), - getParentForChildren(), - isClean()); - hybridStats_ = null; - } - return hybridStatsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectDataSourceDetails.Result) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectDataSourceDetails.Result) - private static final com.google.privacy.dlp.v2.InspectDataSourceDetails.Result DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectDataSourceDetails.Result(); - } - - public static com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Result parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Result(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int REQUESTED_OPTIONS_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requestedOptions_; - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - * @return Whether the requestedOptions field is set. - */ - @java.lang.Override - public boolean hasRequestedOptions() { - return requestedOptions_ != null; - } - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - * @return The requestedOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getRequestedOptions() { - return requestedOptions_ == null ? com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance() : requestedOptions_; - } - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder getRequestedOptionsOrBuilder() { - return getRequestedOptions(); - } - - public static final int RESULT_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.InspectDataSourceDetails.Result result_; - /** - *
-   * A summary of the outcome of this inspection job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - * @return Whether the result field is set. - */ - @java.lang.Override - public boolean hasResult() { - return result_ != null; - } - /** - *
-   * A summary of the outcome of this inspection job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - * @return The result. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getResult() { - return result_ == null ? com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance() : result_; - } - /** - *
-   * A summary of the outcome of this inspection job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder getResultOrBuilder() { - return getResult(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (requestedOptions_ != null) { - output.writeMessage(2, getRequestedOptions()); - } - if (result_ != null) { - output.writeMessage(3, getResult()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (requestedOptions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRequestedOptions()); - } - if (result_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getResult()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectDataSourceDetails other = (com.google.privacy.dlp.v2.InspectDataSourceDetails) obj; - - if (hasRequestedOptions() != other.hasRequestedOptions()) return false; - if (hasRequestedOptions()) { - if (!getRequestedOptions() - .equals(other.getRequestedOptions())) return false; - } - if (hasResult() != other.hasResult()) return false; - if (hasResult()) { - if (!getResult() - .equals(other.getResult())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasRequestedOptions()) { - hash = (37 * hash) + REQUESTED_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getRequestedOptions().hashCode(); - } - if (hasResult()) { - hash = (37 * hash) + RESULT_FIELD_NUMBER; - hash = (53 * hash) + getResult().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectDataSourceDetails parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectDataSourceDetails prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The results of an inspect DataSource job.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectDataSourceDetails} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectDataSourceDetails) - com.google.privacy.dlp.v2.InspectDataSourceDetailsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectDataSourceDetails.class, com.google.privacy.dlp.v2.InspectDataSourceDetails.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectDataSourceDetails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (requestedOptionsBuilder_ == null) { - requestedOptions_ = null; - } else { - requestedOptions_ = null; - requestedOptionsBuilder_ = null; - } - if (resultBuilder_ == null) { - result_ = null; - } else { - result_ = null; - resultBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectDataSourceDetails_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails build() { - com.google.privacy.dlp.v2.InspectDataSourceDetails result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails buildPartial() { - com.google.privacy.dlp.v2.InspectDataSourceDetails result = new com.google.privacy.dlp.v2.InspectDataSourceDetails(this); - if (requestedOptionsBuilder_ == null) { - result.requestedOptions_ = requestedOptions_; - } else { - result.requestedOptions_ = requestedOptionsBuilder_.build(); - } - if (resultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = resultBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectDataSourceDetails) { - return mergeFrom((com.google.privacy.dlp.v2.InspectDataSourceDetails)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectDataSourceDetails other) { - if (other == com.google.privacy.dlp.v2.InspectDataSourceDetails.getDefaultInstance()) return this; - if (other.hasRequestedOptions()) { - mergeRequestedOptions(other.getRequestedOptions()); - } - if (other.hasResult()) { - mergeResult(other.getResult()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectDataSourceDetails parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectDataSourceDetails) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requestedOptions_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder> requestedOptionsBuilder_; - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - * @return Whether the requestedOptions field is set. - */ - public boolean hasRequestedOptions() { - return requestedOptionsBuilder_ != null || requestedOptions_ != null; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - * @return The requestedOptions. - */ - public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getRequestedOptions() { - if (requestedOptionsBuilder_ == null) { - return requestedOptions_ == null ? com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance() : requestedOptions_; - } else { - return requestedOptionsBuilder_.getMessage(); - } - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - */ - public Builder setRequestedOptions(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions value) { - if (requestedOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - requestedOptions_ = value; - onChanged(); - } else { - requestedOptionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - */ - public Builder setRequestedOptions( - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder builderForValue) { - if (requestedOptionsBuilder_ == null) { - requestedOptions_ = builderForValue.build(); - onChanged(); - } else { - requestedOptionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - */ - public Builder mergeRequestedOptions(com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions value) { - if (requestedOptionsBuilder_ == null) { - if (requestedOptions_ != null) { - requestedOptions_ = - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.newBuilder(requestedOptions_).mergeFrom(value).buildPartial(); - } else { - requestedOptions_ = value; - } - onChanged(); - } else { - requestedOptionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - */ - public Builder clearRequestedOptions() { - if (requestedOptionsBuilder_ == null) { - requestedOptions_ = null; - onChanged(); - } else { - requestedOptions_ = null; - requestedOptionsBuilder_ = null; - } - - return this; - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - */ - public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder getRequestedOptionsBuilder() { - - onChanged(); - return getRequestedOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - */ - public com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder getRequestedOptionsOrBuilder() { - if (requestedOptionsBuilder_ != null) { - return requestedOptionsBuilder_.getMessageOrBuilder(); - } else { - return requestedOptions_ == null ? - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.getDefaultInstance() : requestedOptions_; - } - } - /** - *
-     * The configuration used for this job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder> - getRequestedOptionsFieldBuilder() { - if (requestedOptionsBuilder_ == null) { - requestedOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder>( - getRequestedOptions(), - getParentForChildren(), - isClean()); - requestedOptions_ = null; - } - return requestedOptionsBuilder_; - } - - private com.google.privacy.dlp.v2.InspectDataSourceDetails.Result result_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder> resultBuilder_; - /** - *
-     * A summary of the outcome of this inspection job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - * @return Whether the result field is set. - */ - public boolean hasResult() { - return resultBuilder_ != null || result_ != null; - } - /** - *
-     * A summary of the outcome of this inspection job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - * @return The result. - */ - public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getResult() { - if (resultBuilder_ == null) { - return result_ == null ? com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance() : result_; - } else { - return resultBuilder_.getMessage(); - } - } - /** - *
-     * A summary of the outcome of this inspection job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - */ - public Builder setResult(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result value) { - if (resultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - resultBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A summary of the outcome of this inspection job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - */ - public Builder setResult( - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder builderForValue) { - if (resultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - resultBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A summary of the outcome of this inspection job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - */ - public Builder mergeResult(com.google.privacy.dlp.v2.InspectDataSourceDetails.Result value) { - if (resultBuilder_ == null) { - if (result_ != null) { - result_ = - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.newBuilder(result_).mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - resultBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A summary of the outcome of this inspection job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - */ - public Builder clearResult() { - if (resultBuilder_ == null) { - result_ = null; - onChanged(); - } else { - result_ = null; - resultBuilder_ = null; - } - - return this; - } - /** - *
-     * A summary of the outcome of this inspection job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - */ - public com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder getResultBuilder() { - - onChanged(); - return getResultFieldBuilder().getBuilder(); - } - /** - *
-     * A summary of the outcome of this inspection job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - */ - public com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder getResultOrBuilder() { - if (resultBuilder_ != null) { - return resultBuilder_.getMessageOrBuilder(); - } else { - return result_ == null ? - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.getDefaultInstance() : result_; - } - } - /** - *
-     * A summary of the outcome of this inspection job.
-     * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder> - getResultFieldBuilder() { - if (resultBuilder_ == null) { - resultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result, com.google.privacy.dlp.v2.InspectDataSourceDetails.Result.Builder, com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder>( - getResult(), - getParentForChildren(), - isClean()); - result_ = null; - } - return resultBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectDataSourceDetails) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectDataSourceDetails) - private static final com.google.privacy.dlp.v2.InspectDataSourceDetails DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectDataSourceDetails(); - } - - public static com.google.privacy.dlp.v2.InspectDataSourceDetails getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InspectDataSourceDetails parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InspectDataSourceDetails(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectDataSourceDetails getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetailsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetailsOrBuilder.java deleted file mode 100644 index ace7119dab8a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectDataSourceDetailsOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InspectDataSourceDetailsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectDataSourceDetails) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - * @return Whether the requestedOptions field is set. - */ - boolean hasRequestedOptions(); - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - * @return The requestedOptions. - */ - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions getRequestedOptions(); - /** - *
-   * The configuration used for this job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions requested_options = 2; - */ - com.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptionsOrBuilder getRequestedOptionsOrBuilder(); - - /** - *
-   * A summary of the outcome of this inspection job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - * @return Whether the result field is set. - */ - boolean hasResult(); - /** - *
-   * A summary of the outcome of this inspection job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - * @return The result. - */ - com.google.privacy.dlp.v2.InspectDataSourceDetails.Result getResult(); - /** - *
-   * A summary of the outcome of this inspection job.
-   * 
- * - * .google.privacy.dlp.v2.InspectDataSourceDetails.Result result = 3; - */ - com.google.privacy.dlp.v2.InspectDataSourceDetails.ResultOrBuilder getResultOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfig.java deleted file mode 100644 index c20c208072ad..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfig.java +++ /dev/null @@ -1,1524 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Controls what and how to inspect for findings.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectJobConfig} - */ -public final class InspectJobConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectJobConfig) - InspectJobConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use InspectJobConfig.newBuilder() to construct. - private InspectJobConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InspectJobConfig() { - inspectTemplateName_ = ""; - actions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InspectJobConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InspectJobConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.StorageConfig.Builder subBuilder = null; - if (storageConfig_ != null) { - subBuilder = storageConfig_.toBuilder(); - } - storageConfig_ = input.readMessage(com.google.privacy.dlp.v2.StorageConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(storageConfig_); - storageConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; - if (inspectConfig_ != null) { - subBuilder = inspectConfig_.toBuilder(); - } - inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectConfig_); - inspectConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - inspectTemplateName_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - actions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - actions_.add( - input.readMessage(com.google.privacy.dlp.v2.Action.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectJobConfig.class, com.google.privacy.dlp.v2.InspectJobConfig.Builder.class); - } - - public static final int STORAGE_CONFIG_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.StorageConfig storageConfig_; - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - * @return Whether the storageConfig field is set. - */ - @java.lang.Override - public boolean hasStorageConfig() { - return storageConfig_ != null; - } - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - * @return The storageConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig getStorageConfig() { - return storageConfig_ == null ? com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance() : storageConfig_; - } - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfigOrBuilder getStorageConfigOrBuilder() { - return getStorageConfig(); - } - - public static final int INSPECT_CONFIG_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - /** - *
-   * How and what to scan for.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - @java.lang.Override - public boolean hasInspectConfig() { - return inspectConfig_ != null; - } - /** - *
-   * How and what to scan for.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - /** - *
-   * How and what to scan for.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - return getInspectConfig(); - } - - public static final int INSPECT_TEMPLATE_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object inspectTemplateName_; - /** - *
-   * If provided, will be used as the default for all values in InspectConfig.
-   * `inspect_config` will be merged into the values persisted as part of the
-   * template.
-   * 
- * - * string inspect_template_name = 3; - * @return The inspectTemplateName. - */ - @java.lang.Override - public java.lang.String getInspectTemplateName() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inspectTemplateName_ = s; - return s; - } - } - /** - *
-   * If provided, will be used as the default for all values in InspectConfig.
-   * `inspect_config` will be merged into the values persisted as part of the
-   * template.
-   * 
- * - * string inspect_template_name = 3; - * @return The bytes for inspectTemplateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getInspectTemplateNameBytes() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - inspectTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTIONS_FIELD_NUMBER = 4; - private java.util.List actions_; - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; - } - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); - } - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action getActions(int index) { - return actions_.get(index); - } - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (storageConfig_ != null) { - output.writeMessage(1, getStorageConfig()); - } - if (inspectConfig_ != null) { - output.writeMessage(2, getInspectConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, inspectTemplateName_); - } - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(4, actions_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (storageConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getStorageConfig()); - } - if (inspectConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInspectConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, inspectTemplateName_); - } - for (int i = 0; i < actions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, actions_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectJobConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectJobConfig other = (com.google.privacy.dlp.v2.InspectJobConfig) obj; - - if (hasStorageConfig() != other.hasStorageConfig()) return false; - if (hasStorageConfig()) { - if (!getStorageConfig() - .equals(other.getStorageConfig())) return false; - } - if (hasInspectConfig() != other.hasInspectConfig()) return false; - if (hasInspectConfig()) { - if (!getInspectConfig() - .equals(other.getInspectConfig())) return false; - } - if (!getInspectTemplateName() - .equals(other.getInspectTemplateName())) return false; - if (!getActionsList() - .equals(other.getActionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStorageConfig()) { - hash = (37 * hash) + STORAGE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getStorageConfig().hashCode(); - } - if (hasInspectConfig()) { - hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInspectConfig().hashCode(); - } - hash = (37 * hash) + INSPECT_TEMPLATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getInspectTemplateName().hashCode(); - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectJobConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectJobConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Controls what and how to inspect for findings.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectJobConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectJobConfig) - com.google.privacy.dlp.v2.InspectJobConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectJobConfig.class, com.google.privacy.dlp.v2.InspectJobConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectJobConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getActionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (storageConfigBuilder_ == null) { - storageConfig_ = null; - } else { - storageConfig_ = null; - storageConfigBuilder_ = null; - } - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - inspectTemplateName_ = ""; - - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - actionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfig build() { - com.google.privacy.dlp.v2.InspectJobConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfig buildPartial() { - com.google.privacy.dlp.v2.InspectJobConfig result = new com.google.privacy.dlp.v2.InspectJobConfig(this); - int from_bitField0_ = bitField0_; - if (storageConfigBuilder_ == null) { - result.storageConfig_ = storageConfig_; - } else { - result.storageConfig_ = storageConfigBuilder_.build(); - } - if (inspectConfigBuilder_ == null) { - result.inspectConfig_ = inspectConfig_; - } else { - result.inspectConfig_ = inspectConfigBuilder_.build(); - } - result.inspectTemplateName_ = inspectTemplateName_; - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectJobConfig) { - return mergeFrom((com.google.privacy.dlp.v2.InspectJobConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectJobConfig other) { - if (other == com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance()) return this; - if (other.hasStorageConfig()) { - mergeStorageConfig(other.getStorageConfig()); - } - if (other.hasInspectConfig()) { - mergeInspectConfig(other.getInspectConfig()); - } - if (!other.getInspectTemplateName().isEmpty()) { - inspectTemplateName_ = other.inspectTemplateName_; - onChanged(); - } - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); - } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000001); - actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionsFieldBuilder() : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectJobConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectJobConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.StorageConfig storageConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StorageConfig, com.google.privacy.dlp.v2.StorageConfig.Builder, com.google.privacy.dlp.v2.StorageConfigOrBuilder> storageConfigBuilder_; - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - * @return Whether the storageConfig field is set. - */ - public boolean hasStorageConfig() { - return storageConfigBuilder_ != null || storageConfig_ != null; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - * @return The storageConfig. - */ - public com.google.privacy.dlp.v2.StorageConfig getStorageConfig() { - if (storageConfigBuilder_ == null) { - return storageConfig_ == null ? com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance() : storageConfig_; - } else { - return storageConfigBuilder_.getMessage(); - } - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - */ - public Builder setStorageConfig(com.google.privacy.dlp.v2.StorageConfig value) { - if (storageConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - storageConfig_ = value; - onChanged(); - } else { - storageConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - */ - public Builder setStorageConfig( - com.google.privacy.dlp.v2.StorageConfig.Builder builderForValue) { - if (storageConfigBuilder_ == null) { - storageConfig_ = builderForValue.build(); - onChanged(); - } else { - storageConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - */ - public Builder mergeStorageConfig(com.google.privacy.dlp.v2.StorageConfig value) { - if (storageConfigBuilder_ == null) { - if (storageConfig_ != null) { - storageConfig_ = - com.google.privacy.dlp.v2.StorageConfig.newBuilder(storageConfig_).mergeFrom(value).buildPartial(); - } else { - storageConfig_ = value; - } - onChanged(); - } else { - storageConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - */ - public Builder clearStorageConfig() { - if (storageConfigBuilder_ == null) { - storageConfig_ = null; - onChanged(); - } else { - storageConfig_ = null; - storageConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - */ - public com.google.privacy.dlp.v2.StorageConfig.Builder getStorageConfigBuilder() { - - onChanged(); - return getStorageConfigFieldBuilder().getBuilder(); - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - */ - public com.google.privacy.dlp.v2.StorageConfigOrBuilder getStorageConfigOrBuilder() { - if (storageConfigBuilder_ != null) { - return storageConfigBuilder_.getMessageOrBuilder(); - } else { - return storageConfig_ == null ? - com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance() : storageConfig_; - } - } - /** - *
-     * The data to scan.
-     * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StorageConfig, com.google.privacy.dlp.v2.StorageConfig.Builder, com.google.privacy.dlp.v2.StorageConfigOrBuilder> - getStorageConfigFieldBuilder() { - if (storageConfigBuilder_ == null) { - storageConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StorageConfig, com.google.privacy.dlp.v2.StorageConfig.Builder, com.google.privacy.dlp.v2.StorageConfigOrBuilder>( - getStorageConfig(), - getParentForChildren(), - isClean()); - storageConfig_ = null; - } - return storageConfigBuilder_; - } - - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; - /** - *
-     * How and what to scan for.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - public boolean hasInspectConfig() { - return inspectConfigBuilder_ != null || inspectConfig_ != null; - } - /** - *
-     * How and what to scan for.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - if (inspectConfigBuilder_ == null) { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } else { - return inspectConfigBuilder_.getMessage(); - } - } - /** - *
-     * How and what to scan for.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectConfig_ = value; - onChanged(); - } else { - inspectConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * How and what to scan for.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder setInspectConfig( - com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = builderForValue.build(); - onChanged(); - } else { - inspectConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * How and what to scan for.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (inspectConfig_ != null) { - inspectConfig_ = - com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); - } else { - inspectConfig_ = value; - } - onChanged(); - } else { - inspectConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * How and what to scan for.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder clearInspectConfig() { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - onChanged(); - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * How and what to scan for.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { - - onChanged(); - return getInspectConfigFieldBuilder().getBuilder(); - } - /** - *
-     * How and what to scan for.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - if (inspectConfigBuilder_ != null) { - return inspectConfigBuilder_.getMessageOrBuilder(); - } else { - return inspectConfig_ == null ? - com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - } - /** - *
-     * How and what to scan for.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> - getInspectConfigFieldBuilder() { - if (inspectConfigBuilder_ == null) { - inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( - getInspectConfig(), - getParentForChildren(), - isClean()); - inspectConfig_ = null; - } - return inspectConfigBuilder_; - } - - private java.lang.Object inspectTemplateName_ = ""; - /** - *
-     * If provided, will be used as the default for all values in InspectConfig.
-     * `inspect_config` will be merged into the values persisted as part of the
-     * template.
-     * 
- * - * string inspect_template_name = 3; - * @return The inspectTemplateName. - */ - public java.lang.String getInspectTemplateName() { - java.lang.Object ref = inspectTemplateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inspectTemplateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If provided, will be used as the default for all values in InspectConfig.
-     * `inspect_config` will be merged into the values persisted as part of the
-     * template.
-     * 
- * - * string inspect_template_name = 3; - * @return The bytes for inspectTemplateName. - */ - public com.google.protobuf.ByteString - getInspectTemplateNameBytes() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - inspectTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If provided, will be used as the default for all values in InspectConfig.
-     * `inspect_config` will be merged into the values persisted as part of the
-     * template.
-     * 
- * - * string inspect_template_name = 3; - * @param value The inspectTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInspectTemplateName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - inspectTemplateName_ = value; - onChanged(); - return this; - } - /** - *
-     * If provided, will be used as the default for all values in InspectConfig.
-     * `inspect_config` will be merged into the values persisted as part of the
-     * template.
-     * 
- * - * string inspect_template_name = 3; - * @return This builder for chaining. - */ - public Builder clearInspectTemplateName() { - - inspectTemplateName_ = getDefaultInstance().getInspectTemplateName(); - onChanged(); - return this; - } - /** - *
-     * If provided, will be used as the default for all values in InspectConfig.
-     * `inspect_config` will be merged into the values persisted as part of the
-     * template.
-     * 
- * - * string inspect_template_name = 3; - * @param value The bytes for inspectTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInspectTemplateNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - inspectTemplateName_ = value; - onChanged(); - return this; - } - - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder> actionsBuilder_; - - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public com.google.privacy.dlp.v2.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public Builder setActions( - int index, com.google.privacy.dlp.v2.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public Builder setActions( - int index, com.google.privacy.dlp.v2.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public Builder addActions(com.google.privacy.dlp.v2.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public Builder addActions( - int index, com.google.privacy.dlp.v2.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public Builder addActions( - com.google.privacy.dlp.v2.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public Builder addActions( - int index, com.google.privacy.dlp.v2.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public Builder addAllActions( - java.lang.Iterable values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - actionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public com.google.privacy.dlp.v2.Action.Builder getActionsBuilder( - int index) { - return getActionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( - int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public java.util.List - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public com.google.privacy.dlp.v2.Action.Builder addActionsBuilder() { - return getActionsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Action.getDefaultInstance()); - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public com.google.privacy.dlp.v2.Action.Builder addActionsBuilder( - int index) { - return getActionsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Action.getDefaultInstance()); - } - /** - *
-     * Actions to execute at the completion of the job.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - public java.util.List - getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder> - getActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder>( - actions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - actions_ = null; - } - return actionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectJobConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectJobConfig) - private static final com.google.privacy.dlp.v2.InspectJobConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectJobConfig(); - } - - public static com.google.privacy.dlp.v2.InspectJobConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InspectJobConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InspectJobConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfigOrBuilder.java deleted file mode 100644 index 00a4054b9f06..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectJobConfigOrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InspectJobConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectJobConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - * @return Whether the storageConfig field is set. - */ - boolean hasStorageConfig(); - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - * @return The storageConfig. - */ - com.google.privacy.dlp.v2.StorageConfig getStorageConfig(); - /** - *
-   * The data to scan.
-   * 
- * - * .google.privacy.dlp.v2.StorageConfig storage_config = 1; - */ - com.google.privacy.dlp.v2.StorageConfigOrBuilder getStorageConfigOrBuilder(); - - /** - *
-   * How and what to scan for.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - boolean hasInspectConfig(); - /** - *
-   * How and what to scan for.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); - /** - *
-   * How and what to scan for.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); - - /** - *
-   * If provided, will be used as the default for all values in InspectConfig.
-   * `inspect_config` will be merged into the values persisted as part of the
-   * template.
-   * 
- * - * string inspect_template_name = 3; - * @return The inspectTemplateName. - */ - java.lang.String getInspectTemplateName(); - /** - *
-   * If provided, will be used as the default for all values in InspectConfig.
-   * `inspect_config` will be merged into the values persisted as part of the
-   * template.
-   * 
- * - * string inspect_template_name = 3; - * @return The bytes for inspectTemplateName. - */ - com.google.protobuf.ByteString - getInspectTemplateNameBytes(); - - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - java.util.List - getActionsList(); - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - com.google.privacy.dlp.v2.Action getActions(int index); - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - int getActionsCount(); - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - java.util.List - getActionsOrBuilderList(); - /** - *
-   * Actions to execute at the completion of the job.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 4; - */ - com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResult.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResult.java deleted file mode 100644 index 14f25ff55ea5..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResult.java +++ /dev/null @@ -1,973 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * All the findings for a single scanned item.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectResult} - */ -public final class InspectResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectResult) - InspectResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use InspectResult.newBuilder() to construct. - private InspectResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InspectResult() { - findings_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InspectResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InspectResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - findings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - findings_.add( - input.readMessage(com.google.privacy.dlp.v2.Finding.parser(), extensionRegistry)); - break; - } - case 16: { - - findingsTruncated_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - findings_ = java.util.Collections.unmodifiableList(findings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectResult.class, com.google.privacy.dlp.v2.InspectResult.Builder.class); - } - - public static final int FINDINGS_FIELD_NUMBER = 1; - private java.util.List findings_; - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - @java.lang.Override - public java.util.List getFindingsList() { - return findings_; - } - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - @java.lang.Override - public java.util.List - getFindingsOrBuilderList() { - return findings_; - } - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - @java.lang.Override - public int getFindingsCount() { - return findings_.size(); - } - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Finding getFindings(int index) { - return findings_.get(index); - } - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FindingOrBuilder getFindingsOrBuilder( - int index) { - return findings_.get(index); - } - - public static final int FINDINGS_TRUNCATED_FIELD_NUMBER = 2; - private boolean findingsTruncated_; - /** - *
-   * If true, then this item might have more findings than were returned,
-   * and the findings returned are an arbitrary subset of all findings.
-   * The findings list might be truncated because the input items were too
-   * large, or because the server reached the maximum amount of resources
-   * allowed for a single API call. For best results, divide the input into
-   * smaller batches.
-   * 
- * - * bool findings_truncated = 2; - * @return The findingsTruncated. - */ - @java.lang.Override - public boolean getFindingsTruncated() { - return findingsTruncated_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < findings_.size(); i++) { - output.writeMessage(1, findings_.get(i)); - } - if (findingsTruncated_ != false) { - output.writeBool(2, findingsTruncated_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < findings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, findings_.get(i)); - } - if (findingsTruncated_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, findingsTruncated_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectResult)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectResult other = (com.google.privacy.dlp.v2.InspectResult) obj; - - if (!getFindingsList() - .equals(other.getFindingsList())) return false; - if (getFindingsTruncated() - != other.getFindingsTruncated()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFindingsCount() > 0) { - hash = (37 * hash) + FINDINGS_FIELD_NUMBER; - hash = (53 * hash) + getFindingsList().hashCode(); - } - hash = (37 * hash) + FINDINGS_TRUNCATED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFindingsTruncated()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * All the findings for a single scanned item.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectResult) - com.google.privacy.dlp.v2.InspectResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectResult.class, com.google.privacy.dlp.v2.InspectResult.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFindingsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (findingsBuilder_ == null) { - findings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - findingsBuilder_.clear(); - } - findingsTruncated_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectResult_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectResult getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectResult build() { - com.google.privacy.dlp.v2.InspectResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectResult buildPartial() { - com.google.privacy.dlp.v2.InspectResult result = new com.google.privacy.dlp.v2.InspectResult(this); - int from_bitField0_ = bitField0_; - if (findingsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - findings_ = java.util.Collections.unmodifiableList(findings_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.findings_ = findings_; - } else { - result.findings_ = findingsBuilder_.build(); - } - result.findingsTruncated_ = findingsTruncated_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectResult) { - return mergeFrom((com.google.privacy.dlp.v2.InspectResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectResult other) { - if (other == com.google.privacy.dlp.v2.InspectResult.getDefaultInstance()) return this; - if (findingsBuilder_ == null) { - if (!other.findings_.isEmpty()) { - if (findings_.isEmpty()) { - findings_ = other.findings_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFindingsIsMutable(); - findings_.addAll(other.findings_); - } - onChanged(); - } - } else { - if (!other.findings_.isEmpty()) { - if (findingsBuilder_.isEmpty()) { - findingsBuilder_.dispose(); - findingsBuilder_ = null; - findings_ = other.findings_; - bitField0_ = (bitField0_ & ~0x00000001); - findingsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFindingsFieldBuilder() : null; - } else { - findingsBuilder_.addAllMessages(other.findings_); - } - } - } - if (other.getFindingsTruncated() != false) { - setFindingsTruncated(other.getFindingsTruncated()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List findings_ = - java.util.Collections.emptyList(); - private void ensureFindingsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - findings_ = new java.util.ArrayList(findings_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Finding, com.google.privacy.dlp.v2.Finding.Builder, com.google.privacy.dlp.v2.FindingOrBuilder> findingsBuilder_; - - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public java.util.List getFindingsList() { - if (findingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(findings_); - } else { - return findingsBuilder_.getMessageList(); - } - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public int getFindingsCount() { - if (findingsBuilder_ == null) { - return findings_.size(); - } else { - return findingsBuilder_.getCount(); - } - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public com.google.privacy.dlp.v2.Finding getFindings(int index) { - if (findingsBuilder_ == null) { - return findings_.get(index); - } else { - return findingsBuilder_.getMessage(index); - } - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public Builder setFindings( - int index, com.google.privacy.dlp.v2.Finding value) { - if (findingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFindingsIsMutable(); - findings_.set(index, value); - onChanged(); - } else { - findingsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public Builder setFindings( - int index, com.google.privacy.dlp.v2.Finding.Builder builderForValue) { - if (findingsBuilder_ == null) { - ensureFindingsIsMutable(); - findings_.set(index, builderForValue.build()); - onChanged(); - } else { - findingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public Builder addFindings(com.google.privacy.dlp.v2.Finding value) { - if (findingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFindingsIsMutable(); - findings_.add(value); - onChanged(); - } else { - findingsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public Builder addFindings( - int index, com.google.privacy.dlp.v2.Finding value) { - if (findingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFindingsIsMutable(); - findings_.add(index, value); - onChanged(); - } else { - findingsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public Builder addFindings( - com.google.privacy.dlp.v2.Finding.Builder builderForValue) { - if (findingsBuilder_ == null) { - ensureFindingsIsMutable(); - findings_.add(builderForValue.build()); - onChanged(); - } else { - findingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public Builder addFindings( - int index, com.google.privacy.dlp.v2.Finding.Builder builderForValue) { - if (findingsBuilder_ == null) { - ensureFindingsIsMutable(); - findings_.add(index, builderForValue.build()); - onChanged(); - } else { - findingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public Builder addAllFindings( - java.lang.Iterable values) { - if (findingsBuilder_ == null) { - ensureFindingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, findings_); - onChanged(); - } else { - findingsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public Builder clearFindings() { - if (findingsBuilder_ == null) { - findings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - findingsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public Builder removeFindings(int index) { - if (findingsBuilder_ == null) { - ensureFindingsIsMutable(); - findings_.remove(index); - onChanged(); - } else { - findingsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public com.google.privacy.dlp.v2.Finding.Builder getFindingsBuilder( - int index) { - return getFindingsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public com.google.privacy.dlp.v2.FindingOrBuilder getFindingsOrBuilder( - int index) { - if (findingsBuilder_ == null) { - return findings_.get(index); } else { - return findingsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public java.util.List - getFindingsOrBuilderList() { - if (findingsBuilder_ != null) { - return findingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(findings_); - } - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public com.google.privacy.dlp.v2.Finding.Builder addFindingsBuilder() { - return getFindingsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Finding.getDefaultInstance()); - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public com.google.privacy.dlp.v2.Finding.Builder addFindingsBuilder( - int index) { - return getFindingsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Finding.getDefaultInstance()); - } - /** - *
-     * List of findings for an item.
-     * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - public java.util.List - getFindingsBuilderList() { - return getFindingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Finding, com.google.privacy.dlp.v2.Finding.Builder, com.google.privacy.dlp.v2.FindingOrBuilder> - getFindingsFieldBuilder() { - if (findingsBuilder_ == null) { - findingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Finding, com.google.privacy.dlp.v2.Finding.Builder, com.google.privacy.dlp.v2.FindingOrBuilder>( - findings_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - findings_ = null; - } - return findingsBuilder_; - } - - private boolean findingsTruncated_ ; - /** - *
-     * If true, then this item might have more findings than were returned,
-     * and the findings returned are an arbitrary subset of all findings.
-     * The findings list might be truncated because the input items were too
-     * large, or because the server reached the maximum amount of resources
-     * allowed for a single API call. For best results, divide the input into
-     * smaller batches.
-     * 
- * - * bool findings_truncated = 2; - * @return The findingsTruncated. - */ - @java.lang.Override - public boolean getFindingsTruncated() { - return findingsTruncated_; - } - /** - *
-     * If true, then this item might have more findings than were returned,
-     * and the findings returned are an arbitrary subset of all findings.
-     * The findings list might be truncated because the input items were too
-     * large, or because the server reached the maximum amount of resources
-     * allowed for a single API call. For best results, divide the input into
-     * smaller batches.
-     * 
- * - * bool findings_truncated = 2; - * @param value The findingsTruncated to set. - * @return This builder for chaining. - */ - public Builder setFindingsTruncated(boolean value) { - - findingsTruncated_ = value; - onChanged(); - return this; - } - /** - *
-     * If true, then this item might have more findings than were returned,
-     * and the findings returned are an arbitrary subset of all findings.
-     * The findings list might be truncated because the input items were too
-     * large, or because the server reached the maximum amount of resources
-     * allowed for a single API call. For best results, divide the input into
-     * smaller batches.
-     * 
- * - * bool findings_truncated = 2; - * @return This builder for chaining. - */ - public Builder clearFindingsTruncated() { - - findingsTruncated_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectResult) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectResult) - private static final com.google.privacy.dlp.v2.InspectResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectResult(); - } - - public static com.google.privacy.dlp.v2.InspectResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InspectResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InspectResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResultOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResultOrBuilder.java deleted file mode 100644 index 0bd251f5406f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectResultOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InspectResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - java.util.List - getFindingsList(); - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - com.google.privacy.dlp.v2.Finding getFindings(int index); - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - int getFindingsCount(); - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - java.util.List - getFindingsOrBuilderList(); - /** - *
-   * List of findings for an item.
-   * 
- * - * repeated .google.privacy.dlp.v2.Finding findings = 1; - */ - com.google.privacy.dlp.v2.FindingOrBuilder getFindingsOrBuilder( - int index); - - /** - *
-   * If true, then this item might have more findings than were returned,
-   * and the findings returned are an arbitrary subset of all findings.
-   * The findings list might be truncated because the input items were too
-   * large, or because the server reached the maximum amount of resources
-   * allowed for a single API call. For best results, divide the input into
-   * smaller batches.
-   * 
- * - * bool findings_truncated = 2; - * @return The findingsTruncated. - */ - boolean getFindingsTruncated(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java deleted file mode 100644 index d4d910419fca..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java +++ /dev/null @@ -1,1662 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The inspectTemplate contains a configuration (set of types of sensitive data
- * to be detected) to be used anywhere you otherwise would normally specify
- * InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
- * to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectTemplate} - */ -public final class InspectTemplate extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectTemplate) - InspectTemplateOrBuilder { -private static final long serialVersionUID = 0L; - // Use InspectTemplate.newBuilder() to construct. - private InspectTemplate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InspectTemplate() { - name_ = ""; - displayName_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InspectTemplate(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InspectTemplate( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; - if (inspectConfig_ != null) { - subBuilder = inspectConfig_.toBuilder(); - } - inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectConfig_); - inspectConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectTemplate.class, com.google.privacy.dlp.v2.InspectTemplate.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Output only. The template name.
-   * The template will have one of the following formats:
-   * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
-   * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Output only. The template name.
-   * The template will have one of the following formats:
-   * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
-   * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * Display name (max 256 chars).
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * Display name (max 256 chars).
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * Short description (max 256 chars).
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Short description (max 256 chars).
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int INSPECT_CONFIG_FIELD_NUMBER = 6; - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - /** - *
-   * The core content of the template. Configuration of the scanning process.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - * @return Whether the inspectConfig field is set. - */ - @java.lang.Override - public boolean hasInspectConfig() { - return inspectConfig_ != null; - } - /** - *
-   * The core content of the template. Configuration of the scanning process.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - * @return The inspectConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - /** - *
-   * The core content of the template. Configuration of the scanning process.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - return getInspectConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (createTime_ != null) { - output.writeMessage(4, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(5, getUpdateTime()); - } - if (inspectConfig_ != null) { - output.writeMessage(6, getInspectConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getUpdateTime()); - } - if (inspectConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getInspectConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectTemplate)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectTemplate other = (com.google.privacy.dlp.v2.InspectTemplate) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (hasInspectConfig() != other.hasInspectConfig()) return false; - if (hasInspectConfig()) { - if (!getInspectConfig() - .equals(other.getInspectConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasInspectConfig()) { - hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInspectConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectTemplate parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectTemplate prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The inspectTemplate contains a configuration (set of types of sensitive data
-   * to be detected) to be used anywhere you otherwise would normally specify
-   * InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
-   * to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectTemplate} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectTemplate) - com.google.privacy.dlp.v2.InspectTemplateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectTemplate.class, com.google.privacy.dlp.v2.InspectTemplate.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectTemplate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplate getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplate build() { - com.google.privacy.dlp.v2.InspectTemplate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplate buildPartial() { - com.google.privacy.dlp.v2.InspectTemplate result = new com.google.privacy.dlp.v2.InspectTemplate(this); - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - if (inspectConfigBuilder_ == null) { - result.inspectConfig_ = inspectConfig_; - } else { - result.inspectConfig_ = inspectConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectTemplate) { - return mergeFrom((com.google.privacy.dlp.v2.InspectTemplate)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectTemplate other) { - if (other == com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasInspectConfig()) { - mergeInspectConfig(other.getInspectConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectTemplate parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectTemplate) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Output only. The template name.
-     * The template will have one of the following formats:
-     * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
-     * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * Display name (max 256 chars).
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Short description (max 256 chars).
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The creation timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * Output only. The last update timestamp of an inspectTemplate.
-     * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; - /** - *
-     * The core content of the template. Configuration of the scanning process.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - * @return Whether the inspectConfig field is set. - */ - public boolean hasInspectConfig() { - return inspectConfigBuilder_ != null || inspectConfig_ != null; - } - /** - *
-     * The core content of the template. Configuration of the scanning process.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - * @return The inspectConfig. - */ - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - if (inspectConfigBuilder_ == null) { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } else { - return inspectConfigBuilder_.getMessage(); - } - } - /** - *
-     * The core content of the template. Configuration of the scanning process.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - */ - public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectConfig_ = value; - onChanged(); - } else { - inspectConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The core content of the template. Configuration of the scanning process.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - */ - public Builder setInspectConfig( - com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = builderForValue.build(); - onChanged(); - } else { - inspectConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The core content of the template. Configuration of the scanning process.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - */ - public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (inspectConfig_ != null) { - inspectConfig_ = - com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); - } else { - inspectConfig_ = value; - } - onChanged(); - } else { - inspectConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The core content of the template. Configuration of the scanning process.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - */ - public Builder clearInspectConfig() { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - onChanged(); - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * The core content of the template. Configuration of the scanning process.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - */ - public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { - - onChanged(); - return getInspectConfigFieldBuilder().getBuilder(); - } - /** - *
-     * The core content of the template. Configuration of the scanning process.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - */ - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - if (inspectConfigBuilder_ != null) { - return inspectConfigBuilder_.getMessageOrBuilder(); - } else { - return inspectConfig_ == null ? - com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - } - /** - *
-     * The core content of the template. Configuration of the scanning process.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> - getInspectConfigFieldBuilder() { - if (inspectConfigBuilder_ == null) { - inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( - getInspectConfig(), - getParentForChildren(), - isClean()); - inspectConfig_ = null; - } - return inspectConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectTemplate) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectTemplate) - private static final com.google.privacy.dlp.v2.InspectTemplate DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectTemplate(); - } - - public static com.google.privacy.dlp.v2.InspectTemplate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InspectTemplate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InspectTemplate(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateName.java deleted file mode 100644 index 0a062e2b0992..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateName.java +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class InspectTemplateName implements ResourceName { - private static final PathTemplate ORGANIZATION_INSPECT_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "organizations/{organization}/inspectTemplates/{inspect_template}"); - private static final PathTemplate PROJECT_INSPECT_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/inspectTemplates/{inspect_template}"); - private static final PathTemplate ORGANIZATION_LOCATION_INSPECT_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}"); - private static final PathTemplate PROJECT_LOCATION_INSPECT_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String organization; - private final String inspectTemplate; - private final String project; - private final String location; - - @Deprecated - protected InspectTemplateName() { - organization = null; - inspectTemplate = null; - project = null; - location = null; - } - - private InspectTemplateName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - inspectTemplate = Preconditions.checkNotNull(builder.getInspectTemplate()); - project = null; - location = null; - pathTemplate = ORGANIZATION_INSPECT_TEMPLATE; - } - - private InspectTemplateName(ProjectInspectTemplateBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - inspectTemplate = Preconditions.checkNotNull(builder.getInspectTemplate()); - organization = null; - location = null; - pathTemplate = PROJECT_INSPECT_TEMPLATE; - } - - private InspectTemplateName(OrganizationLocationInspectTemplateBuilder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - location = Preconditions.checkNotNull(builder.getLocation()); - inspectTemplate = Preconditions.checkNotNull(builder.getInspectTemplate()); - project = null; - pathTemplate = ORGANIZATION_LOCATION_INSPECT_TEMPLATE; - } - - private InspectTemplateName(ProjectLocationInspectTemplateBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - inspectTemplate = Preconditions.checkNotNull(builder.getInspectTemplate()); - organization = null; - pathTemplate = PROJECT_LOCATION_INSPECT_TEMPLATE; - } - - public String getOrganization() { - return organization; - } - - public String getInspectTemplate() { - return inspectTemplate; - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newOrganizationInspectTemplateBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectInspectTemplateBuilder newProjectInspectTemplateBuilder() { - return new ProjectInspectTemplateBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static OrganizationLocationInspectTemplateBuilder - newOrganizationLocationInspectTemplateBuilder() { - return new OrganizationLocationInspectTemplateBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationInspectTemplateBuilder newProjectLocationInspectTemplateBuilder() { - return new ProjectLocationInspectTemplateBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static InspectTemplateName of(String organization, String inspectTemplate) { - return newBuilder().setOrganization(organization).setInspectTemplate(inspectTemplate).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static InspectTemplateName ofOrganizationInspectTemplateName( - String organization, String inspectTemplate) { - return newBuilder().setOrganization(organization).setInspectTemplate(inspectTemplate).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static InspectTemplateName ofProjectInspectTemplateName( - String project, String inspectTemplate) { - return newProjectInspectTemplateBuilder() - .setProject(project) - .setInspectTemplate(inspectTemplate) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static InspectTemplateName ofOrganizationLocationInspectTemplateName( - String organization, String location, String inspectTemplate) { - return newOrganizationLocationInspectTemplateBuilder() - .setOrganization(organization) - .setLocation(location) - .setInspectTemplate(inspectTemplate) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static InspectTemplateName ofProjectLocationInspectTemplateName( - String project, String location, String inspectTemplate) { - return newProjectLocationInspectTemplateBuilder() - .setProject(project) - .setLocation(location) - .setInspectTemplate(inspectTemplate) - .build(); - } - - public static String format(String organization, String inspectTemplate) { - return newBuilder() - .setOrganization(organization) - .setInspectTemplate(inspectTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationInspectTemplateName( - String organization, String inspectTemplate) { - return newBuilder() - .setOrganization(organization) - .setInspectTemplate(inspectTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectInspectTemplateName(String project, String inspectTemplate) { - return newProjectInspectTemplateBuilder() - .setProject(project) - .setInspectTemplate(inspectTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationLocationInspectTemplateName( - String organization, String location, String inspectTemplate) { - return newOrganizationLocationInspectTemplateBuilder() - .setOrganization(organization) - .setLocation(location) - .setInspectTemplate(inspectTemplate) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationInspectTemplateName( - String project, String location, String inspectTemplate) { - return newProjectLocationInspectTemplateBuilder() - .setProject(project) - .setLocation(location) - .setInspectTemplate(inspectTemplate) - .build() - .toString(); - } - - public static InspectTemplateName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (ORGANIZATION_INSPECT_TEMPLATE.matches(formattedString)) { - Map matchMap = ORGANIZATION_INSPECT_TEMPLATE.match(formattedString); - return ofOrganizationInspectTemplateName( - matchMap.get("organization"), matchMap.get("inspect_template")); - } else if (PROJECT_INSPECT_TEMPLATE.matches(formattedString)) { - Map matchMap = PROJECT_INSPECT_TEMPLATE.match(formattedString); - return ofProjectInspectTemplateName( - matchMap.get("project"), matchMap.get("inspect_template")); - } else if (ORGANIZATION_LOCATION_INSPECT_TEMPLATE.matches(formattedString)) { - Map matchMap = ORGANIZATION_LOCATION_INSPECT_TEMPLATE.match(formattedString); - return ofOrganizationLocationInspectTemplateName( - matchMap.get("organization"), matchMap.get("location"), matchMap.get("inspect_template")); - } else if (PROJECT_LOCATION_INSPECT_TEMPLATE.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_INSPECT_TEMPLATE.match(formattedString); - return ofProjectLocationInspectTemplateName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("inspect_template")); - } - throw new ValidationException("InspectTemplateName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (InspectTemplateName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION_INSPECT_TEMPLATE.matches(formattedString) - || PROJECT_INSPECT_TEMPLATE.matches(formattedString) - || ORGANIZATION_LOCATION_INSPECT_TEMPLATE.matches(formattedString) - || PROJECT_LOCATION_INSPECT_TEMPLATE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (organization != null) { - fieldMapBuilder.put("organization", organization); - } - if (inspectTemplate != null) { - fieldMapBuilder.put("inspect_template", inspectTemplate); - } - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - InspectTemplateName that = ((InspectTemplateName) o); - return Objects.equals(this.organization, that.organization) - && Objects.equals(this.inspectTemplate, that.inspectTemplate) - && Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(organization); - h *= 1000003; - h ^= Objects.hashCode(inspectTemplate); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for organizations/{organization}/inspectTemplates/{inspect_template}. */ - public static class Builder { - private String organization; - private String inspectTemplate; - - protected Builder() {} - - public String getOrganization() { - return organization; - } - - public String getInspectTemplate() { - return inspectTemplate; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setInspectTemplate(String inspectTemplate) { - this.inspectTemplate = inspectTemplate; - return this; - } - - private Builder(InspectTemplateName inspectTemplateName) { - Preconditions.checkArgument( - Objects.equals(inspectTemplateName.pathTemplate, ORGANIZATION_INSPECT_TEMPLATE), - "toBuilder is only supported when InspectTemplateName has the pattern of organizations/{organization}/inspectTemplates/{inspect_template}"); - this.organization = inspectTemplateName.organization; - this.inspectTemplate = inspectTemplateName.inspectTemplate; - } - - public InspectTemplateName build() { - return new InspectTemplateName(this); - } - } - - /** Builder for projects/{project}/inspectTemplates/{inspect_template}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectInspectTemplateBuilder { - private String project; - private String inspectTemplate; - - protected ProjectInspectTemplateBuilder() {} - - public String getProject() { - return project; - } - - public String getInspectTemplate() { - return inspectTemplate; - } - - public ProjectInspectTemplateBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectInspectTemplateBuilder setInspectTemplate(String inspectTemplate) { - this.inspectTemplate = inspectTemplate; - return this; - } - - public InspectTemplateName build() { - return new InspectTemplateName(this); - } - } - - /** - * Builder for - * organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}. - */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class OrganizationLocationInspectTemplateBuilder { - private String organization; - private String location; - private String inspectTemplate; - - protected OrganizationLocationInspectTemplateBuilder() {} - - public String getOrganization() { - return organization; - } - - public String getLocation() { - return location; - } - - public String getInspectTemplate() { - return inspectTemplate; - } - - public OrganizationLocationInspectTemplateBuilder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public OrganizationLocationInspectTemplateBuilder setLocation(String location) { - this.location = location; - return this; - } - - public OrganizationLocationInspectTemplateBuilder setInspectTemplate(String inspectTemplate) { - this.inspectTemplate = inspectTemplate; - return this; - } - - public InspectTemplateName build() { - return new InspectTemplateName(this); - } - } - - /** Builder for projects/{project}/locations/{location}/inspectTemplates/{inspect_template}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationInspectTemplateBuilder { - private String project; - private String location; - private String inspectTemplate; - - protected ProjectLocationInspectTemplateBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getInspectTemplate() { - return inspectTemplate; - } - - public ProjectLocationInspectTemplateBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationInspectTemplateBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationInspectTemplateBuilder setInspectTemplate(String inspectTemplate) { - this.inspectTemplate = inspectTemplate; - return this; - } - - public InspectTemplateName build() { - return new InspectTemplateName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateOrBuilder.java deleted file mode 100644 index ad84e9e88f97..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplateOrBuilder.java +++ /dev/null @@ -1,156 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InspectTemplateOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectTemplate) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The template name.
-   * The template will have one of the following formats:
-   * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
-   * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Output only. The template name.
-   * The template will have one of the following formats:
-   * `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
-   * `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`;
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Display name (max 256 chars).
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * Display name (max 256 chars).
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * Short description (max 256 chars).
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Short description (max 256 chars).
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The creation timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. The last update timestamp of an inspectTemplate.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * The core content of the template. Configuration of the scanning process.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - * @return Whether the inspectConfig field is set. - */ - boolean hasInspectConfig(); - /** - *
-   * The core content of the template. Configuration of the scanning process.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - * @return The inspectConfig. - */ - com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); - /** - *
-   * The core content of the template. Configuration of the scanning process.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 6; - */ - com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRule.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRule.java deleted file mode 100644 index add9b787c09a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRule.java +++ /dev/null @@ -1,1026 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A single inspection rule to be applied to infoTypes, specified in
- * `InspectionRuleSet`.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectionRule} - */ -public final class InspectionRule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectionRule) - InspectionRuleOrBuilder { -private static final long serialVersionUID = 0L; - // Use InspectionRule.newBuilder() to construct. - private InspectionRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InspectionRule() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InspectionRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InspectionRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder subBuilder = null; - if (typeCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.ExclusionRule.Builder subBuilder = null; - if (typeCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.ExclusionRule) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.ExclusionRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ExclusionRule) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectionRule.class, com.google.privacy.dlp.v2.InspectionRule.Builder.class); - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - HOTWORD_RULE(1), - EXCLUSION_RULE(2), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return HOTWORD_RULE; - case 2: return EXCLUSION_RULE; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int HOTWORD_RULE_FIELD_NUMBER = 1; - /** - *
-   * Hotword-based detection rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return Whether the hotwordRule field is set. - */ - @java.lang.Override - public boolean hasHotwordRule() { - return typeCase_ == 1; - } - /** - *
-   * Hotword-based detection rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return The hotwordRule. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - /** - *
-   * Hotword-based detection rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - - public static final int EXCLUSION_RULE_FIELD_NUMBER = 2; - /** - *
-   * Exclusion rule.
-   * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - * @return Whether the exclusionRule field is set. - */ - @java.lang.Override - public boolean hasExclusionRule() { - return typeCase_ == 2; - } - /** - *
-   * Exclusion rule.
-   * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - * @return The exclusionRule. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ExclusionRule getExclusionRule() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.ExclusionRule) type_; - } - return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); - } - /** - *
-   * Exclusion rule.
-   * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ExclusionRuleOrBuilder getExclusionRuleOrBuilder() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.ExclusionRule) type_; - } - return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); - } - if (typeCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.ExclusionRule) type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_); - } - if (typeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.ExclusionRule) type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectionRule)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectionRule other = (com.google.privacy.dlp.v2.InspectionRule) obj; - - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 1: - if (!getHotwordRule() - .equals(other.getHotwordRule())) return false; - break; - case 2: - if (!getExclusionRule() - .equals(other.getExclusionRule())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (typeCase_) { - case 1: - hash = (37 * hash) + HOTWORD_RULE_FIELD_NUMBER; - hash = (53 * hash) + getHotwordRule().hashCode(); - break; - case 2: - hash = (37 * hash) + EXCLUSION_RULE_FIELD_NUMBER; - hash = (53 * hash) + getExclusionRule().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectionRule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectionRule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectionRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectionRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectionRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectionRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectionRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectionRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A single inspection rule to be applied to infoTypes, specified in
-   * `InspectionRuleSet`.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectionRule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectionRule) - com.google.privacy.dlp.v2.InspectionRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectionRule.class, com.google.privacy.dlp.v2.InspectionRule.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectionRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRule_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRule getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectionRule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRule build() { - com.google.privacy.dlp.v2.InspectionRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRule buildPartial() { - com.google.privacy.dlp.v2.InspectionRule result = new com.google.privacy.dlp.v2.InspectionRule(this); - if (typeCase_ == 1) { - if (hotwordRuleBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = hotwordRuleBuilder_.build(); - } - } - if (typeCase_ == 2) { - if (exclusionRuleBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = exclusionRuleBuilder_.build(); - } - } - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectionRule) { - return mergeFrom((com.google.privacy.dlp.v2.InspectionRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectionRule other) { - if (other == com.google.privacy.dlp.v2.InspectionRule.getDefaultInstance()) return this; - switch (other.getTypeCase()) { - case HOTWORD_RULE: { - mergeHotwordRule(other.getHotwordRule()); - break; - } - case EXCLUSION_RULE: { - mergeExclusionRule(other.getExclusionRule()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectionRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectionRule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder> hotwordRuleBuilder_; - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return Whether the hotwordRule field is set. - */ - @java.lang.Override - public boolean hasHotwordRule() { - return typeCase_ == 1; - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return The hotwordRule. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule() { - if (hotwordRuleBuilder_ == null) { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } else { - if (typeCase_ == 1) { - return hotwordRuleBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public Builder setHotwordRule(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) { - if (hotwordRuleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - hotwordRuleBuilder_.setMessage(value); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public Builder setHotwordRule( - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder builderForValue) { - if (hotwordRuleBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - hotwordRuleBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public Builder mergeHotwordRule(com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule value) { - if (hotwordRuleBuilder_ == null) { - if (typeCase_ == 1 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 1) { - hotwordRuleBuilder_.mergeFrom(value); - } else { - hotwordRuleBuilder_.setMessage(value); - } - } - typeCase_ = 1; - return this; - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public Builder clearHotwordRule() { - if (hotwordRuleBuilder_ == null) { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - } - hotwordRuleBuilder_.clear(); - } - return this; - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder getHotwordRuleBuilder() { - return getHotwordRuleFieldBuilder().getBuilder(); - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder() { - if ((typeCase_ == 1) && (hotwordRuleBuilder_ != null)) { - return hotwordRuleBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - } - /** - *
-     * Hotword-based detection rule.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder> - getHotwordRuleFieldBuilder() { - if (hotwordRuleBuilder_ == null) { - if (!(typeCase_ == 1)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.getDefaultInstance(); - } - hotwordRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.Builder, com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 1; - onChanged();; - return hotwordRuleBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ExclusionRule, com.google.privacy.dlp.v2.ExclusionRule.Builder, com.google.privacy.dlp.v2.ExclusionRuleOrBuilder> exclusionRuleBuilder_; - /** - *
-     * Exclusion rule.
-     * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - * @return Whether the exclusionRule field is set. - */ - @java.lang.Override - public boolean hasExclusionRule() { - return typeCase_ == 2; - } - /** - *
-     * Exclusion rule.
-     * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - * @return The exclusionRule. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ExclusionRule getExclusionRule() { - if (exclusionRuleBuilder_ == null) { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.ExclusionRule) type_; - } - return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); - } else { - if (typeCase_ == 2) { - return exclusionRuleBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); - } - } - /** - *
-     * Exclusion rule.
-     * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - */ - public Builder setExclusionRule(com.google.privacy.dlp.v2.ExclusionRule value) { - if (exclusionRuleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - exclusionRuleBuilder_.setMessage(value); - } - typeCase_ = 2; - return this; - } - /** - *
-     * Exclusion rule.
-     * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - */ - public Builder setExclusionRule( - com.google.privacy.dlp.v2.ExclusionRule.Builder builderForValue) { - if (exclusionRuleBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - exclusionRuleBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 2; - return this; - } - /** - *
-     * Exclusion rule.
-     * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - */ - public Builder mergeExclusionRule(com.google.privacy.dlp.v2.ExclusionRule value) { - if (exclusionRuleBuilder_ == null) { - if (typeCase_ == 2 && - type_ != com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.ExclusionRule.newBuilder((com.google.privacy.dlp.v2.ExclusionRule) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 2) { - exclusionRuleBuilder_.mergeFrom(value); - } else { - exclusionRuleBuilder_.setMessage(value); - } - } - typeCase_ = 2; - return this; - } - /** - *
-     * Exclusion rule.
-     * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - */ - public Builder clearExclusionRule() { - if (exclusionRuleBuilder_ == null) { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - } - exclusionRuleBuilder_.clear(); - } - return this; - } - /** - *
-     * Exclusion rule.
-     * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - */ - public com.google.privacy.dlp.v2.ExclusionRule.Builder getExclusionRuleBuilder() { - return getExclusionRuleFieldBuilder().getBuilder(); - } - /** - *
-     * Exclusion rule.
-     * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ExclusionRuleOrBuilder getExclusionRuleOrBuilder() { - if ((typeCase_ == 2) && (exclusionRuleBuilder_ != null)) { - return exclusionRuleBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.ExclusionRule) type_; - } - return com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); - } - } - /** - *
-     * Exclusion rule.
-     * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ExclusionRule, com.google.privacy.dlp.v2.ExclusionRule.Builder, com.google.privacy.dlp.v2.ExclusionRuleOrBuilder> - getExclusionRuleFieldBuilder() { - if (exclusionRuleBuilder_ == null) { - if (!(typeCase_ == 2)) { - type_ = com.google.privacy.dlp.v2.ExclusionRule.getDefaultInstance(); - } - exclusionRuleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ExclusionRule, com.google.privacy.dlp.v2.ExclusionRule.Builder, com.google.privacy.dlp.v2.ExclusionRuleOrBuilder>( - (com.google.privacy.dlp.v2.ExclusionRule) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 2; - onChanged();; - return exclusionRuleBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectionRule) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectionRule) - private static final com.google.privacy.dlp.v2.InspectionRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectionRule(); - } - - public static com.google.privacy.dlp.v2.InspectionRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InspectionRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InspectionRule(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleOrBuilder.java deleted file mode 100644 index ff09d8f399f1..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InspectionRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectionRule) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Hotword-based detection rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return Whether the hotwordRule field is set. - */ - boolean hasHotwordRule(); - /** - *
-   * Hotword-based detection rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - * @return The hotwordRule. - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule getHotwordRule(); - /** - *
-   * Hotword-based detection rule.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - */ - com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRuleOrBuilder getHotwordRuleOrBuilder(); - - /** - *
-   * Exclusion rule.
-   * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - * @return Whether the exclusionRule field is set. - */ - boolean hasExclusionRule(); - /** - *
-   * Exclusion rule.
-   * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - * @return The exclusionRule. - */ - com.google.privacy.dlp.v2.ExclusionRule getExclusionRule(); - /** - *
-   * Exclusion rule.
-   * 
- * - * .google.privacy.dlp.v2.ExclusionRule exclusion_rule = 2; - */ - com.google.privacy.dlp.v2.ExclusionRuleOrBuilder getExclusionRuleOrBuilder(); - - public com.google.privacy.dlp.v2.InspectionRule.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSet.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSet.java deleted file mode 100644 index 950f00c600e6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSet.java +++ /dev/null @@ -1,1314 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Rule set for modifying a set of infoTypes to alter behavior under certain
- * circumstances, depending on the specific details of the rules within the set.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectionRuleSet} - */ -public final class InspectionRuleSet extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.InspectionRuleSet) - InspectionRuleSetOrBuilder { -private static final long serialVersionUID = 0L; - // Use InspectionRuleSet.newBuilder() to construct. - private InspectionRuleSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private InspectionRuleSet() { - infoTypes_ = java.util.Collections.emptyList(); - rules_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new InspectionRuleSet(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private InspectionRuleSet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - infoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - rules_.add( - input.readMessage(com.google.privacy.dlp.v2.InspectionRule.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectionRuleSet.class, com.google.privacy.dlp.v2.InspectionRuleSet.Builder.class); - } - - public static final int INFO_TYPES_FIELD_NUMBER = 1; - private java.util.List infoTypes_; - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public java.util.List getInfoTypesList() { - return infoTypes_; - } - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public java.util.List - getInfoTypesOrBuilderList() { - return infoTypes_; - } - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public int getInfoTypesCount() { - return infoTypes_.size(); - } - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { - return infoTypes_.get(index); - } - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { - return infoTypes_.get(index); - } - - public static final int RULES_FIELD_NUMBER = 2; - private java.util.List rules_; - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - @java.lang.Override - public java.util.List getRulesList() { - return rules_; - } - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - @java.lang.Override - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - @java.lang.Override - public int getRulesCount() { - return rules_.size(); - } - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRule getRules(int index) { - return rules_.get(index); - } - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRuleOrBuilder getRulesOrBuilder( - int index) { - return rules_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < infoTypes_.size(); i++) { - output.writeMessage(1, infoTypes_.get(i)); - } - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(2, rules_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < infoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, infoTypes_.get(i)); - } - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rules_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.InspectionRuleSet)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.InspectionRuleSet other = (com.google.privacy.dlp.v2.InspectionRuleSet) obj; - - if (!getInfoTypesList() - .equals(other.getInfoTypesList())) return false; - if (!getRulesList() - .equals(other.getRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getInfoTypesCount() > 0) { - hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getInfoTypesList().hashCode(); - } - if (getRulesCount() > 0) { - hash = (37 * hash) + RULES_FIELD_NUMBER; - hash = (53 * hash) + getRulesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.InspectionRuleSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.InspectionRuleSet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Rule set for modifying a set of infoTypes to alter behavior under certain
-   * circumstances, depending on the specific details of the rules within the set.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.InspectionRuleSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.InspectionRuleSet) - com.google.privacy.dlp.v2.InspectionRuleSetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.InspectionRuleSet.class, com.google.privacy.dlp.v2.InspectionRuleSet.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.InspectionRuleSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoTypesFieldBuilder(); - getRulesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - infoTypesBuilder_.clear(); - } - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - rulesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_InspectionRuleSet_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRuleSet getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRuleSet build() { - com.google.privacy.dlp.v2.InspectionRuleSet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRuleSet buildPartial() { - com.google.privacy.dlp.v2.InspectionRuleSet result = new com.google.privacy.dlp.v2.InspectionRuleSet(this); - int from_bitField0_ = bitField0_; - if (infoTypesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.infoTypes_ = infoTypes_; - } else { - result.infoTypes_ = infoTypesBuilder_.build(); - } - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.InspectionRuleSet) { - return mergeFrom((com.google.privacy.dlp.v2.InspectionRuleSet)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.InspectionRuleSet other) { - if (other == com.google.privacy.dlp.v2.InspectionRuleSet.getDefaultInstance()) return this; - if (infoTypesBuilder_ == null) { - if (!other.infoTypes_.isEmpty()) { - if (infoTypes_.isEmpty()) { - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInfoTypesIsMutable(); - infoTypes_.addAll(other.infoTypes_); - } - onChanged(); - } - } else { - if (!other.infoTypes_.isEmpty()) { - if (infoTypesBuilder_.isEmpty()) { - infoTypesBuilder_.dispose(); - infoTypesBuilder_ = null; - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - infoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInfoTypesFieldBuilder() : null; - } else { - infoTypesBuilder_.addAllMessages(other.infoTypes_); - } - } - } - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000002); - rulesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRulesFieldBuilder() : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.InspectionRuleSet parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.InspectionRuleSet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List infoTypes_ = - java.util.Collections.emptyList(); - private void ensureInfoTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(infoTypes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypesBuilder_; - - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List getInfoTypesList() { - if (infoTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(infoTypes_); - } else { - return infoTypesBuilder_.getMessageList(); - } - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public int getInfoTypesCount() { - if (infoTypesBuilder_ == null) { - return infoTypes_.size(); - } else { - return infoTypesBuilder_.getCount(); - } - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); - } else { - return infoTypesBuilder_.getMessage(index); - } - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.set(index, value); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(index, value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder addAllInfoTypes( - java.lang.Iterable values) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, infoTypes_); - onChanged(); - } else { - infoTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder clearInfoTypes() { - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - infoTypesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public Builder removeInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.remove(index); - onChanged(); - } else { - infoTypesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); } else { - return infoTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List - getInfoTypesOrBuilderList() { - if (infoTypesBuilder_ != null) { - return infoTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(infoTypes_); - } - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { - return getInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoType.getDefaultInstance()); - } - /** - *
-     * List of infoTypes this rule set is applied to.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - public java.util.List - getInfoTypesBuilderList() { - return getInfoTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypesFieldBuilder() { - if (infoTypesBuilder_ == null) { - infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - infoTypes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - infoTypes_ = null; - } - return infoTypesBuilder_; - } - - private java.util.List rules_ = - java.util.Collections.emptyList(); - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectionRule, com.google.privacy.dlp.v2.InspectionRule.Builder, com.google.privacy.dlp.v2.InspectionRuleOrBuilder> rulesBuilder_; - - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public com.google.privacy.dlp.v2.InspectionRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public Builder setRules( - int index, com.google.privacy.dlp.v2.InspectionRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public Builder setRules( - int index, com.google.privacy.dlp.v2.InspectionRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public Builder addRules(com.google.privacy.dlp.v2.InspectionRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public Builder addRules( - int index, com.google.privacy.dlp.v2.InspectionRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public Builder addRules( - com.google.privacy.dlp.v2.InspectionRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public Builder addRules( - int index, com.google.privacy.dlp.v2.InspectionRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public Builder addAllRules( - java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public com.google.privacy.dlp.v2.InspectionRule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public com.google.privacy.dlp.v2.InspectionRuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public com.google.privacy.dlp.v2.InspectionRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InspectionRule.getDefaultInstance()); - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public com.google.privacy.dlp.v2.InspectionRule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InspectionRule.getDefaultInstance()); - } - /** - *
-     * Set of rules to be applied to infoTypes. The rules are applied in order.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectionRule, com.google.privacy.dlp.v2.InspectionRule.Builder, com.google.privacy.dlp.v2.InspectionRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectionRule, com.google.privacy.dlp.v2.InspectionRule.Builder, com.google.privacy.dlp.v2.InspectionRuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - rules_ = null; - } - return rulesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.InspectionRuleSet) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.InspectionRuleSet) - private static final com.google.privacy.dlp.v2.InspectionRuleSet DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.InspectionRuleSet(); - } - - public static com.google.privacy.dlp.v2.InspectionRuleSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InspectionRuleSet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InspectionRuleSet(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.InspectionRuleSet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSetOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSetOrBuilder.java deleted file mode 100644 index 2584c2b9b23c..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectionRuleSetOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface InspectionRuleSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.InspectionRuleSet) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - java.util.List - getInfoTypesList(); - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - int getInfoTypesCount(); - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - java.util.List - getInfoTypesOrBuilderList(); - /** - *
-   * List of infoTypes this rule set is applied to.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoType info_types = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( - int index); - - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - java.util.List - getRulesList(); - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - com.google.privacy.dlp.v2.InspectionRule getRules(int index); - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - int getRulesCount(); - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - java.util.List - getRulesOrBuilderList(); - /** - *
-   * Set of rules to be applied to infoTypes. The rules are applied in order.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectionRule rules = 2; - */ - com.google.privacy.dlp.v2.InspectionRuleOrBuilder getRulesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java deleted file mode 100644 index 5f84912e4816..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java +++ /dev/null @@ -1,4349 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Contains a configuration to make dlp api calls on a repeating basis.
- * See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.JobTrigger} - */ -public final class JobTrigger extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.JobTrigger) - JobTriggerOrBuilder { -private static final long serialVersionUID = 0L; - // Use JobTrigger.newBuilder() to construct. - private JobTrigger(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private JobTrigger() { - name_ = ""; - displayName_ = ""; - description_ = ""; - triggers_ = java.util.Collections.emptyList(); - errors_ = java.util.Collections.emptyList(); - status_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new JobTrigger(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private JobTrigger( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: { - com.google.privacy.dlp.v2.InspectJobConfig.Builder subBuilder = null; - if (jobCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.InspectJobConfig) job_).toBuilder(); - } - job_ = - input.readMessage(com.google.privacy.dlp.v2.InspectJobConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.InspectJobConfig) job_); - job_ = subBuilder.buildPartial(); - } - jobCase_ = 4; - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - triggers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - triggers_.add( - input.readMessage(com.google.privacy.dlp.v2.JobTrigger.Trigger.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - errors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - errors_.add( - input.readMessage(com.google.privacy.dlp.v2.Error.parser(), extensionRegistry)); - break; - } - case 58: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastRunTime_ != null) { - subBuilder = lastRunTime_.toBuilder(); - } - lastRunTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastRunTime_); - lastRunTime_ = subBuilder.buildPartial(); - } - - break; - } - case 80: { - int rawValue = input.readEnum(); - - status_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - triggers_ = java.util.Collections.unmodifiableList(triggers_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - errors_ = java.util.Collections.unmodifiableList(errors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.JobTrigger.class, com.google.privacy.dlp.v2.JobTrigger.Builder.class); - } - - /** - *
-   * Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs
-   * will be created with this configuration. The service may automatically
-   * pause triggers experiencing frequent errors. To restart a job, set the
-   * status to HEALTHY after correcting user errors.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.JobTrigger.Status} - */ - public enum Status - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * STATUS_UNSPECIFIED = 0; - */ - STATUS_UNSPECIFIED(0), - /** - *
-     * Trigger is healthy.
-     * 
- * - * HEALTHY = 1; - */ - HEALTHY(1), - /** - *
-     * Trigger is temporarily paused.
-     * 
- * - * PAUSED = 2; - */ - PAUSED(2), - /** - *
-     * Trigger is cancelled and can not be resumed.
-     * 
- * - * CANCELLED = 3; - */ - CANCELLED(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * STATUS_UNSPECIFIED = 0; - */ - public static final int STATUS_UNSPECIFIED_VALUE = 0; - /** - *
-     * Trigger is healthy.
-     * 
- * - * HEALTHY = 1; - */ - public static final int HEALTHY_VALUE = 1; - /** - *
-     * Trigger is temporarily paused.
-     * 
- * - * PAUSED = 2; - */ - public static final int PAUSED_VALUE = 2; - /** - *
-     * Trigger is cancelled and can not be resumed.
-     * 
- * - * CANCELLED = 3; - */ - public static final int CANCELLED_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Status valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Status forNumber(int value) { - switch (value) { - case 0: return STATUS_UNSPECIFIED; - case 1: return HEALTHY; - case 2: return PAUSED; - case 3: return CANCELLED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Status> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Status findValueByNumber(int number) { - return Status.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.JobTrigger.getDescriptor().getEnumTypes().get(0); - } - - private static final Status[] VALUES = values(); - - public static Status valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Status(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.JobTrigger.Status) - } - - public interface TriggerOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.JobTrigger.Trigger) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Create a job on a repeating basis based on the elapse of time.
-     * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - * @return Whether the schedule field is set. - */ - boolean hasSchedule(); - /** - *
-     * Create a job on a repeating basis based on the elapse of time.
-     * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - * @return The schedule. - */ - com.google.privacy.dlp.v2.Schedule getSchedule(); - /** - *
-     * Create a job on a repeating basis based on the elapse of time.
-     * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - */ - com.google.privacy.dlp.v2.ScheduleOrBuilder getScheduleOrBuilder(); - - /** - *
-     * For use with hybrid jobs. Jobs must be manually created and finished.
-     * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - * @return Whether the manual field is set. - */ - boolean hasManual(); - /** - *
-     * For use with hybrid jobs. Jobs must be manually created and finished.
-     * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - * @return The manual. - */ - com.google.privacy.dlp.v2.Manual getManual(); - /** - *
-     * For use with hybrid jobs. Jobs must be manually created and finished.
-     * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - */ - com.google.privacy.dlp.v2.ManualOrBuilder getManualOrBuilder(); - - public com.google.privacy.dlp.v2.JobTrigger.Trigger.TriggerCase getTriggerCase(); - } - /** - *
-   * What event needs to occur for a new job to be started.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.JobTrigger.Trigger} - */ - public static final class Trigger extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.JobTrigger.Trigger) - TriggerOrBuilder { - private static final long serialVersionUID = 0L; - // Use Trigger.newBuilder() to construct. - private Trigger(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Trigger() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Trigger(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Trigger( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Schedule.Builder subBuilder = null; - if (triggerCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.Schedule) trigger_).toBuilder(); - } - trigger_ = - input.readMessage(com.google.privacy.dlp.v2.Schedule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Schedule) trigger_); - trigger_ = subBuilder.buildPartial(); - } - triggerCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.Manual.Builder subBuilder = null; - if (triggerCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.Manual) trigger_).toBuilder(); - } - trigger_ = - input.readMessage(com.google.privacy.dlp.v2.Manual.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.Manual) trigger_); - trigger_ = subBuilder.buildPartial(); - } - triggerCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.JobTrigger.Trigger.class, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder.class); - } - - private int triggerCase_ = 0; - private java.lang.Object trigger_; - public enum TriggerCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SCHEDULE(1), - MANUAL(2), - TRIGGER_NOT_SET(0); - private final int value; - private TriggerCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TriggerCase valueOf(int value) { - return forNumber(value); - } - - public static TriggerCase forNumber(int value) { - switch (value) { - case 1: return SCHEDULE; - case 2: return MANUAL; - case 0: return TRIGGER_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TriggerCase - getTriggerCase() { - return TriggerCase.forNumber( - triggerCase_); - } - - public static final int SCHEDULE_FIELD_NUMBER = 1; - /** - *
-     * Create a job on a repeating basis based on the elapse of time.
-     * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - * @return Whether the schedule field is set. - */ - @java.lang.Override - public boolean hasSchedule() { - return triggerCase_ == 1; - } - /** - *
-     * Create a job on a repeating basis based on the elapse of time.
-     * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - * @return The schedule. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Schedule getSchedule() { - if (triggerCase_ == 1) { - return (com.google.privacy.dlp.v2.Schedule) trigger_; - } - return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); - } - /** - *
-     * Create a job on a repeating basis based on the elapse of time.
-     * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ScheduleOrBuilder getScheduleOrBuilder() { - if (triggerCase_ == 1) { - return (com.google.privacy.dlp.v2.Schedule) trigger_; - } - return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); - } - - public static final int MANUAL_FIELD_NUMBER = 2; - /** - *
-     * For use with hybrid jobs. Jobs must be manually created and finished.
-     * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - * @return Whether the manual field is set. - */ - @java.lang.Override - public boolean hasManual() { - return triggerCase_ == 2; - } - /** - *
-     * For use with hybrid jobs. Jobs must be manually created and finished.
-     * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - * @return The manual. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Manual getManual() { - if (triggerCase_ == 2) { - return (com.google.privacy.dlp.v2.Manual) trigger_; - } - return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); - } - /** - *
-     * For use with hybrid jobs. Jobs must be manually created and finished.
-     * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ManualOrBuilder getManualOrBuilder() { - if (triggerCase_ == 2) { - return (com.google.privacy.dlp.v2.Manual) trigger_; - } - return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (triggerCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.Schedule) trigger_); - } - if (triggerCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.Manual) trigger_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (triggerCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.Schedule) trigger_); - } - if (triggerCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.Manual) trigger_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.JobTrigger.Trigger)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.JobTrigger.Trigger other = (com.google.privacy.dlp.v2.JobTrigger.Trigger) obj; - - if (!getTriggerCase().equals(other.getTriggerCase())) return false; - switch (triggerCase_) { - case 1: - if (!getSchedule() - .equals(other.getSchedule())) return false; - break; - case 2: - if (!getManual() - .equals(other.getManual())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (triggerCase_) { - case 1: - hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; - hash = (53 * hash) + getSchedule().hashCode(); - break; - case 2: - hash = (37 * hash) + MANUAL_FIELD_NUMBER; - hash = (53 * hash) + getManual().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.JobTrigger.Trigger parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.JobTrigger.Trigger prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * What event needs to occur for a new job to be started.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.JobTrigger.Trigger} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.JobTrigger.Trigger) - com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.JobTrigger.Trigger.class, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.JobTrigger.Trigger.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - triggerCase_ = 0; - trigger_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger.Trigger getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.JobTrigger.Trigger.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger.Trigger build() { - com.google.privacy.dlp.v2.JobTrigger.Trigger result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger.Trigger buildPartial() { - com.google.privacy.dlp.v2.JobTrigger.Trigger result = new com.google.privacy.dlp.v2.JobTrigger.Trigger(this); - if (triggerCase_ == 1) { - if (scheduleBuilder_ == null) { - result.trigger_ = trigger_; - } else { - result.trigger_ = scheduleBuilder_.build(); - } - } - if (triggerCase_ == 2) { - if (manualBuilder_ == null) { - result.trigger_ = trigger_; - } else { - result.trigger_ = manualBuilder_.build(); - } - } - result.triggerCase_ = triggerCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.JobTrigger.Trigger) { - return mergeFrom((com.google.privacy.dlp.v2.JobTrigger.Trigger)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.JobTrigger.Trigger other) { - if (other == com.google.privacy.dlp.v2.JobTrigger.Trigger.getDefaultInstance()) return this; - switch (other.getTriggerCase()) { - case SCHEDULE: { - mergeSchedule(other.getSchedule()); - break; - } - case MANUAL: { - mergeManual(other.getManual()); - break; - } - case TRIGGER_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.JobTrigger.Trigger parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.JobTrigger.Trigger) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int triggerCase_ = 0; - private java.lang.Object trigger_; - public TriggerCase - getTriggerCase() { - return TriggerCase.forNumber( - triggerCase_); - } - - public Builder clearTrigger() { - triggerCase_ = 0; - trigger_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Schedule, com.google.privacy.dlp.v2.Schedule.Builder, com.google.privacy.dlp.v2.ScheduleOrBuilder> scheduleBuilder_; - /** - *
-       * Create a job on a repeating basis based on the elapse of time.
-       * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - * @return Whether the schedule field is set. - */ - @java.lang.Override - public boolean hasSchedule() { - return triggerCase_ == 1; - } - /** - *
-       * Create a job on a repeating basis based on the elapse of time.
-       * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - * @return The schedule. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Schedule getSchedule() { - if (scheduleBuilder_ == null) { - if (triggerCase_ == 1) { - return (com.google.privacy.dlp.v2.Schedule) trigger_; - } - return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); - } else { - if (triggerCase_ == 1) { - return scheduleBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); - } - } - /** - *
-       * Create a job on a repeating basis based on the elapse of time.
-       * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - */ - public Builder setSchedule(com.google.privacy.dlp.v2.Schedule value) { - if (scheduleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - trigger_ = value; - onChanged(); - } else { - scheduleBuilder_.setMessage(value); - } - triggerCase_ = 1; - return this; - } - /** - *
-       * Create a job on a repeating basis based on the elapse of time.
-       * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - */ - public Builder setSchedule( - com.google.privacy.dlp.v2.Schedule.Builder builderForValue) { - if (scheduleBuilder_ == null) { - trigger_ = builderForValue.build(); - onChanged(); - } else { - scheduleBuilder_.setMessage(builderForValue.build()); - } - triggerCase_ = 1; - return this; - } - /** - *
-       * Create a job on a repeating basis based on the elapse of time.
-       * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - */ - public Builder mergeSchedule(com.google.privacy.dlp.v2.Schedule value) { - if (scheduleBuilder_ == null) { - if (triggerCase_ == 1 && - trigger_ != com.google.privacy.dlp.v2.Schedule.getDefaultInstance()) { - trigger_ = com.google.privacy.dlp.v2.Schedule.newBuilder((com.google.privacy.dlp.v2.Schedule) trigger_) - .mergeFrom(value).buildPartial(); - } else { - trigger_ = value; - } - onChanged(); - } else { - if (triggerCase_ == 1) { - scheduleBuilder_.mergeFrom(value); - } else { - scheduleBuilder_.setMessage(value); - } - } - triggerCase_ = 1; - return this; - } - /** - *
-       * Create a job on a repeating basis based on the elapse of time.
-       * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - */ - public Builder clearSchedule() { - if (scheduleBuilder_ == null) { - if (triggerCase_ == 1) { - triggerCase_ = 0; - trigger_ = null; - onChanged(); - } - } else { - if (triggerCase_ == 1) { - triggerCase_ = 0; - trigger_ = null; - } - scheduleBuilder_.clear(); - } - return this; - } - /** - *
-       * Create a job on a repeating basis based on the elapse of time.
-       * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - */ - public com.google.privacy.dlp.v2.Schedule.Builder getScheduleBuilder() { - return getScheduleFieldBuilder().getBuilder(); - } - /** - *
-       * Create a job on a repeating basis based on the elapse of time.
-       * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ScheduleOrBuilder getScheduleOrBuilder() { - if ((triggerCase_ == 1) && (scheduleBuilder_ != null)) { - return scheduleBuilder_.getMessageOrBuilder(); - } else { - if (triggerCase_ == 1) { - return (com.google.privacy.dlp.v2.Schedule) trigger_; - } - return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); - } - } - /** - *
-       * Create a job on a repeating basis based on the elapse of time.
-       * 
- * - * .google.privacy.dlp.v2.Schedule schedule = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Schedule, com.google.privacy.dlp.v2.Schedule.Builder, com.google.privacy.dlp.v2.ScheduleOrBuilder> - getScheduleFieldBuilder() { - if (scheduleBuilder_ == null) { - if (!(triggerCase_ == 1)) { - trigger_ = com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); - } - scheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Schedule, com.google.privacy.dlp.v2.Schedule.Builder, com.google.privacy.dlp.v2.ScheduleOrBuilder>( - (com.google.privacy.dlp.v2.Schedule) trigger_, - getParentForChildren(), - isClean()); - trigger_ = null; - } - triggerCase_ = 1; - onChanged();; - return scheduleBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Manual, com.google.privacy.dlp.v2.Manual.Builder, com.google.privacy.dlp.v2.ManualOrBuilder> manualBuilder_; - /** - *
-       * For use with hybrid jobs. Jobs must be manually created and finished.
-       * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - * @return Whether the manual field is set. - */ - @java.lang.Override - public boolean hasManual() { - return triggerCase_ == 2; - } - /** - *
-       * For use with hybrid jobs. Jobs must be manually created and finished.
-       * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - * @return The manual. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Manual getManual() { - if (manualBuilder_ == null) { - if (triggerCase_ == 2) { - return (com.google.privacy.dlp.v2.Manual) trigger_; - } - return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); - } else { - if (triggerCase_ == 2) { - return manualBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); - } - } - /** - *
-       * For use with hybrid jobs. Jobs must be manually created and finished.
-       * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - */ - public Builder setManual(com.google.privacy.dlp.v2.Manual value) { - if (manualBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - trigger_ = value; - onChanged(); - } else { - manualBuilder_.setMessage(value); - } - triggerCase_ = 2; - return this; - } - /** - *
-       * For use with hybrid jobs. Jobs must be manually created and finished.
-       * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - */ - public Builder setManual( - com.google.privacy.dlp.v2.Manual.Builder builderForValue) { - if (manualBuilder_ == null) { - trigger_ = builderForValue.build(); - onChanged(); - } else { - manualBuilder_.setMessage(builderForValue.build()); - } - triggerCase_ = 2; - return this; - } - /** - *
-       * For use with hybrid jobs. Jobs must be manually created and finished.
-       * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - */ - public Builder mergeManual(com.google.privacy.dlp.v2.Manual value) { - if (manualBuilder_ == null) { - if (triggerCase_ == 2 && - trigger_ != com.google.privacy.dlp.v2.Manual.getDefaultInstance()) { - trigger_ = com.google.privacy.dlp.v2.Manual.newBuilder((com.google.privacy.dlp.v2.Manual) trigger_) - .mergeFrom(value).buildPartial(); - } else { - trigger_ = value; - } - onChanged(); - } else { - if (triggerCase_ == 2) { - manualBuilder_.mergeFrom(value); - } else { - manualBuilder_.setMessage(value); - } - } - triggerCase_ = 2; - return this; - } - /** - *
-       * For use with hybrid jobs. Jobs must be manually created and finished.
-       * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - */ - public Builder clearManual() { - if (manualBuilder_ == null) { - if (triggerCase_ == 2) { - triggerCase_ = 0; - trigger_ = null; - onChanged(); - } - } else { - if (triggerCase_ == 2) { - triggerCase_ = 0; - trigger_ = null; - } - manualBuilder_.clear(); - } - return this; - } - /** - *
-       * For use with hybrid jobs. Jobs must be manually created and finished.
-       * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - */ - public com.google.privacy.dlp.v2.Manual.Builder getManualBuilder() { - return getManualFieldBuilder().getBuilder(); - } - /** - *
-       * For use with hybrid jobs. Jobs must be manually created and finished.
-       * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ManualOrBuilder getManualOrBuilder() { - if ((triggerCase_ == 2) && (manualBuilder_ != null)) { - return manualBuilder_.getMessageOrBuilder(); - } else { - if (triggerCase_ == 2) { - return (com.google.privacy.dlp.v2.Manual) trigger_; - } - return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); - } - } - /** - *
-       * For use with hybrid jobs. Jobs must be manually created and finished.
-       * 
- * - * .google.privacy.dlp.v2.Manual manual = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Manual, com.google.privacy.dlp.v2.Manual.Builder, com.google.privacy.dlp.v2.ManualOrBuilder> - getManualFieldBuilder() { - if (manualBuilder_ == null) { - if (!(triggerCase_ == 2)) { - trigger_ = com.google.privacy.dlp.v2.Manual.getDefaultInstance(); - } - manualBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Manual, com.google.privacy.dlp.v2.Manual.Builder, com.google.privacy.dlp.v2.ManualOrBuilder>( - (com.google.privacy.dlp.v2.Manual) trigger_, - getParentForChildren(), - isClean()); - trigger_ = null; - } - triggerCase_ = 2; - onChanged();; - return manualBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.JobTrigger.Trigger) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.JobTrigger.Trigger) - private static final com.google.privacy.dlp.v2.JobTrigger.Trigger DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.JobTrigger.Trigger(); - } - - public static com.google.privacy.dlp.v2.JobTrigger.Trigger getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Trigger parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Trigger(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger.Trigger getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int jobCase_ = 0; - private java.lang.Object job_; - public enum JobCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INSPECT_JOB(4), - JOB_NOT_SET(0); - private final int value; - private JobCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static JobCase valueOf(int value) { - return forNumber(value); - } - - public static JobCase forNumber(int value) { - switch (value) { - case 4: return INSPECT_JOB; - case 0: return JOB_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public JobCase - getJobCase() { - return JobCase.forNumber( - jobCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Unique resource name for the triggeredJob, assigned by the service when the
-   * triggeredJob is created, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Unique resource name for the triggeredJob, assigned by the service when the
-   * triggeredJob is created, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - *
-   * Display name (max 100 chars)
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * Display name (max 100 chars)
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - *
-   * User provided description (max 256 chars)
-   * 
- * - * string description = 3; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * User provided description (max 256 chars)
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSPECT_JOB_FIELD_NUMBER = 4; - /** - *
-   * For inspect jobs, a snapshot of the configuration.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - * @return Whether the inspectJob field is set. - */ - @java.lang.Override - public boolean hasInspectJob() { - return jobCase_ == 4; - } - /** - *
-   * For inspect jobs, a snapshot of the configuration.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - * @return The inspectJob. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() { - if (jobCase_ == 4) { - return (com.google.privacy.dlp.v2.InspectJobConfig) job_; - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - /** - *
-   * For inspect jobs, a snapshot of the configuration.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() { - if (jobCase_ == 4) { - return (com.google.privacy.dlp.v2.InspectJobConfig) job_; - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - - public static final int TRIGGERS_FIELD_NUMBER = 5; - private java.util.List triggers_; - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - @java.lang.Override - public java.util.List getTriggersList() { - return triggers_; - } - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - @java.lang.Override - public java.util.List - getTriggersOrBuilderList() { - return triggers_; - } - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - @java.lang.Override - public int getTriggersCount() { - return triggers_.size(); - } - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger.Trigger getTriggers(int index) { - return triggers_.get(index); - } - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder getTriggersOrBuilder( - int index) { - return triggers_.get(index); - } - - public static final int ERRORS_FIELD_NUMBER = 6; - private java.util.List errors_; - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public java.util.List getErrorsList() { - return errors_; - } - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public java.util.List - getErrorsOrBuilderList() { - return errors_; - } - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public int getErrorsCount() { - return errors_.size(); - } - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Error getErrors(int index) { - return errors_.get(index); - } - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( - int index) { - return errors_.get(index); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The creation timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The creation timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The creation timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * Output only. The last update timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * Output only. The last update timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * Output only. The last update timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int LAST_RUN_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp lastRunTime_; - /** - *
-   * Output only. The timestamp of the last time this trigger executed.
-   * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the lastRunTime field is set. - */ - @java.lang.Override - public boolean hasLastRunTime() { - return lastRunTime_ != null; - } - /** - *
-   * Output only. The timestamp of the last time this trigger executed.
-   * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The lastRunTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastRunTime() { - return lastRunTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastRunTime_; - } - /** - *
-   * Output only. The timestamp of the last time this trigger executed.
-   * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastRunTimeOrBuilder() { - return getLastRunTime(); - } - - public static final int STATUS_FIELD_NUMBER = 10; - private int status_; - /** - *
-   * Required. A status for this trigger.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return The enum numeric value on the wire for status. - */ - @java.lang.Override public int getStatusValue() { - return status_; - } - /** - *
-   * Required. A status for this trigger.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return The status. - */ - @java.lang.Override public com.google.privacy.dlp.v2.JobTrigger.Status getStatus() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.JobTrigger.Status result = com.google.privacy.dlp.v2.JobTrigger.Status.valueOf(status_); - return result == null ? com.google.privacy.dlp.v2.JobTrigger.Status.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (jobCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.InspectJobConfig) job_); - } - for (int i = 0; i < triggers_.size(); i++) { - output.writeMessage(5, triggers_.get(i)); - } - for (int i = 0; i < errors_.size(); i++) { - output.writeMessage(6, errors_.get(i)); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(8, getUpdateTime()); - } - if (lastRunTime_ != null) { - output.writeMessage(9, getLastRunTime()); - } - if (status_ != com.google.privacy.dlp.v2.JobTrigger.Status.STATUS_UNSPECIFIED.getNumber()) { - output.writeEnum(10, status_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (jobCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.InspectJobConfig) job_); - } - for (int i = 0; i < triggers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, triggers_.get(i)); - } - for (int i = 0; i < errors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, errors_.get(i)); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getUpdateTime()); - } - if (lastRunTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getLastRunTime()); - } - if (status_ != com.google.privacy.dlp.v2.JobTrigger.Status.STATUS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(10, status_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.JobTrigger)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.JobTrigger other = (com.google.privacy.dlp.v2.JobTrigger) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getTriggersList() - .equals(other.getTriggersList())) return false; - if (!getErrorsList() - .equals(other.getErrorsList())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (hasLastRunTime() != other.hasLastRunTime()) return false; - if (hasLastRunTime()) { - if (!getLastRunTime() - .equals(other.getLastRunTime())) return false; - } - if (status_ != other.status_) return false; - if (!getJobCase().equals(other.getJobCase())) return false; - switch (jobCase_) { - case 4: - if (!getInspectJob() - .equals(other.getInspectJob())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getTriggersCount() > 0) { - hash = (37 * hash) + TRIGGERS_FIELD_NUMBER; - hash = (53 * hash) + getTriggersList().hashCode(); - } - if (getErrorsCount() > 0) { - hash = (37 * hash) + ERRORS_FIELD_NUMBER; - hash = (53 * hash) + getErrorsList().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasLastRunTime()) { - hash = (37 * hash) + LAST_RUN_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastRunTime().hashCode(); - } - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + status_; - switch (jobCase_) { - case 4: - hash = (37 * hash) + INSPECT_JOB_FIELD_NUMBER; - hash = (53 * hash) + getInspectJob().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.JobTrigger parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.JobTrigger parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.JobTrigger parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.JobTrigger parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.JobTrigger parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.JobTrigger parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.JobTrigger parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.JobTrigger parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.JobTrigger prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Contains a configuration to make dlp api calls on a repeating basis.
-   * See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.JobTrigger} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.JobTrigger) - com.google.privacy.dlp.v2.JobTriggerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.JobTrigger.class, com.google.privacy.dlp.v2.JobTrigger.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.JobTrigger.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getTriggersFieldBuilder(); - getErrorsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - if (triggersBuilder_ == null) { - triggers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - triggersBuilder_.clear(); - } - if (errorsBuilder_ == null) { - errors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - errorsBuilder_.clear(); - } - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - if (lastRunTimeBuilder_ == null) { - lastRunTime_ = null; - } else { - lastRunTime_ = null; - lastRunTimeBuilder_ = null; - } - status_ = 0; - - jobCase_ = 0; - job_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_JobTrigger_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger build() { - com.google.privacy.dlp.v2.JobTrigger result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger buildPartial() { - com.google.privacy.dlp.v2.JobTrigger result = new com.google.privacy.dlp.v2.JobTrigger(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - if (jobCase_ == 4) { - if (inspectJobBuilder_ == null) { - result.job_ = job_; - } else { - result.job_ = inspectJobBuilder_.build(); - } - } - if (triggersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - triggers_ = java.util.Collections.unmodifiableList(triggers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.triggers_ = triggers_; - } else { - result.triggers_ = triggersBuilder_.build(); - } - if (errorsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - errors_ = java.util.Collections.unmodifiableList(errors_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.errors_ = errors_; - } else { - result.errors_ = errorsBuilder_.build(); - } - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - if (lastRunTimeBuilder_ == null) { - result.lastRunTime_ = lastRunTime_; - } else { - result.lastRunTime_ = lastRunTimeBuilder_.build(); - } - result.status_ = status_; - result.jobCase_ = jobCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.JobTrigger) { - return mergeFrom((com.google.privacy.dlp.v2.JobTrigger)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.JobTrigger other) { - if (other == com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (triggersBuilder_ == null) { - if (!other.triggers_.isEmpty()) { - if (triggers_.isEmpty()) { - triggers_ = other.triggers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTriggersIsMutable(); - triggers_.addAll(other.triggers_); - } - onChanged(); - } - } else { - if (!other.triggers_.isEmpty()) { - if (triggersBuilder_.isEmpty()) { - triggersBuilder_.dispose(); - triggersBuilder_ = null; - triggers_ = other.triggers_; - bitField0_ = (bitField0_ & ~0x00000001); - triggersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTriggersFieldBuilder() : null; - } else { - triggersBuilder_.addAllMessages(other.triggers_); - } - } - } - if (errorsBuilder_ == null) { - if (!other.errors_.isEmpty()) { - if (errors_.isEmpty()) { - errors_ = other.errors_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureErrorsIsMutable(); - errors_.addAll(other.errors_); - } - onChanged(); - } - } else { - if (!other.errors_.isEmpty()) { - if (errorsBuilder_.isEmpty()) { - errorsBuilder_.dispose(); - errorsBuilder_ = null; - errors_ = other.errors_; - bitField0_ = (bitField0_ & ~0x00000002); - errorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getErrorsFieldBuilder() : null; - } else { - errorsBuilder_.addAllMessages(other.errors_); - } - } - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasLastRunTime()) { - mergeLastRunTime(other.getLastRunTime()); - } - if (other.status_ != 0) { - setStatusValue(other.getStatusValue()); - } - switch (other.getJobCase()) { - case INSPECT_JOB: { - mergeInspectJob(other.getInspectJob()); - break; - } - case JOB_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.JobTrigger parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.JobTrigger) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int jobCase_ = 0; - private java.lang.Object job_; - public JobCase - getJobCase() { - return JobCase.forNumber( - jobCase_); - } - - public Builder clearJob() { - jobCase_ = 0; - job_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Unique resource name for the triggeredJob, assigned by the service when the
-     * triggeredJob is created, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Unique resource name for the triggeredJob, assigned by the service when the
-     * triggeredJob is created, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Unique resource name for the triggeredJob, assigned by the service when the
-     * triggeredJob is created, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Unique resource name for the triggeredJob, assigned by the service when the
-     * triggeredJob is created, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Unique resource name for the triggeredJob, assigned by the service when the
-     * triggeredJob is created, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * Display name (max 100 chars)
-     * 
- * - * string display_name = 2; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Display name (max 100 chars)
-     * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Display name (max 100 chars)
-     * 
- * - * string display_name = 2; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * Display name (max 100 chars)
-     * 
- * - * string display_name = 2; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * Display name (max 100 chars)
-     * 
- * - * string display_name = 2; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * User provided description (max 256 chars)
-     * 
- * - * string description = 3; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * User provided description (max 256 chars)
-     * 
- * - * string description = 3; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * User provided description (max 256 chars)
-     * 
- * - * string description = 3; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * User provided description (max 256 chars)
-     * 
- * - * string description = 3; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * User provided description (max 256 chars)
-     * 
- * - * string description = 3; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> inspectJobBuilder_; - /** - *
-     * For inspect jobs, a snapshot of the configuration.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - * @return Whether the inspectJob field is set. - */ - @java.lang.Override - public boolean hasInspectJob() { - return jobCase_ == 4; - } - /** - *
-     * For inspect jobs, a snapshot of the configuration.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - * @return The inspectJob. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() { - if (inspectJobBuilder_ == null) { - if (jobCase_ == 4) { - return (com.google.privacy.dlp.v2.InspectJobConfig) job_; - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } else { - if (jobCase_ == 4) { - return inspectJobBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - } - /** - *
-     * For inspect jobs, a snapshot of the configuration.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - */ - public Builder setInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) { - if (inspectJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - job_ = value; - onChanged(); - } else { - inspectJobBuilder_.setMessage(value); - } - jobCase_ = 4; - return this; - } - /** - *
-     * For inspect jobs, a snapshot of the configuration.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - */ - public Builder setInspectJob( - com.google.privacy.dlp.v2.InspectJobConfig.Builder builderForValue) { - if (inspectJobBuilder_ == null) { - job_ = builderForValue.build(); - onChanged(); - } else { - inspectJobBuilder_.setMessage(builderForValue.build()); - } - jobCase_ = 4; - return this; - } - /** - *
-     * For inspect jobs, a snapshot of the configuration.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - */ - public Builder mergeInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) { - if (inspectJobBuilder_ == null) { - if (jobCase_ == 4 && - job_ != com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance()) { - job_ = com.google.privacy.dlp.v2.InspectJobConfig.newBuilder((com.google.privacy.dlp.v2.InspectJobConfig) job_) - .mergeFrom(value).buildPartial(); - } else { - job_ = value; - } - onChanged(); - } else { - if (jobCase_ == 4) { - inspectJobBuilder_.mergeFrom(value); - } else { - inspectJobBuilder_.setMessage(value); - } - } - jobCase_ = 4; - return this; - } - /** - *
-     * For inspect jobs, a snapshot of the configuration.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - */ - public Builder clearInspectJob() { - if (inspectJobBuilder_ == null) { - if (jobCase_ == 4) { - jobCase_ = 0; - job_ = null; - onChanged(); - } - } else { - if (jobCase_ == 4) { - jobCase_ = 0; - job_ = null; - } - inspectJobBuilder_.clear(); - } - return this; - } - /** - *
-     * For inspect jobs, a snapshot of the configuration.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - */ - public com.google.privacy.dlp.v2.InspectJobConfig.Builder getInspectJobBuilder() { - return getInspectJobFieldBuilder().getBuilder(); - } - /** - *
-     * For inspect jobs, a snapshot of the configuration.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() { - if ((jobCase_ == 4) && (inspectJobBuilder_ != null)) { - return inspectJobBuilder_.getMessageOrBuilder(); - } else { - if (jobCase_ == 4) { - return (com.google.privacy.dlp.v2.InspectJobConfig) job_; - } - return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - } - /** - *
-     * For inspect jobs, a snapshot of the configuration.
-     * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> - getInspectJobFieldBuilder() { - if (inspectJobBuilder_ == null) { - if (!(jobCase_ == 4)) { - job_ = com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance(); - } - inspectJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder>( - (com.google.privacy.dlp.v2.InspectJobConfig) job_, - getParentForChildren(), - isClean()); - job_ = null; - } - jobCase_ = 4; - onChanged();; - return inspectJobBuilder_; - } - - private java.util.List triggers_ = - java.util.Collections.emptyList(); - private void ensureTriggersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - triggers_ = new java.util.ArrayList(triggers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger.Trigger, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder, com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder> triggersBuilder_; - - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public java.util.List getTriggersList() { - if (triggersBuilder_ == null) { - return java.util.Collections.unmodifiableList(triggers_); - } else { - return triggersBuilder_.getMessageList(); - } - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public int getTriggersCount() { - if (triggersBuilder_ == null) { - return triggers_.size(); - } else { - return triggersBuilder_.getCount(); - } - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public com.google.privacy.dlp.v2.JobTrigger.Trigger getTriggers(int index) { - if (triggersBuilder_ == null) { - return triggers_.get(index); - } else { - return triggersBuilder_.getMessage(index); - } - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public Builder setTriggers( - int index, com.google.privacy.dlp.v2.JobTrigger.Trigger value) { - if (triggersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTriggersIsMutable(); - triggers_.set(index, value); - onChanged(); - } else { - triggersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public Builder setTriggers( - int index, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder builderForValue) { - if (triggersBuilder_ == null) { - ensureTriggersIsMutable(); - triggers_.set(index, builderForValue.build()); - onChanged(); - } else { - triggersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public Builder addTriggers(com.google.privacy.dlp.v2.JobTrigger.Trigger value) { - if (triggersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTriggersIsMutable(); - triggers_.add(value); - onChanged(); - } else { - triggersBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public Builder addTriggers( - int index, com.google.privacy.dlp.v2.JobTrigger.Trigger value) { - if (triggersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTriggersIsMutable(); - triggers_.add(index, value); - onChanged(); - } else { - triggersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public Builder addTriggers( - com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder builderForValue) { - if (triggersBuilder_ == null) { - ensureTriggersIsMutable(); - triggers_.add(builderForValue.build()); - onChanged(); - } else { - triggersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public Builder addTriggers( - int index, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder builderForValue) { - if (triggersBuilder_ == null) { - ensureTriggersIsMutable(); - triggers_.add(index, builderForValue.build()); - onChanged(); - } else { - triggersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public Builder addAllTriggers( - java.lang.Iterable values) { - if (triggersBuilder_ == null) { - ensureTriggersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, triggers_); - onChanged(); - } else { - triggersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public Builder clearTriggers() { - if (triggersBuilder_ == null) { - triggers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - triggersBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public Builder removeTriggers(int index) { - if (triggersBuilder_ == null) { - ensureTriggersIsMutable(); - triggers_.remove(index); - onChanged(); - } else { - triggersBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder getTriggersBuilder( - int index) { - return getTriggersFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder getTriggersOrBuilder( - int index) { - if (triggersBuilder_ == null) { - return triggers_.get(index); } else { - return triggersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public java.util.List - getTriggersOrBuilderList() { - if (triggersBuilder_ != null) { - return triggersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(triggers_); - } - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder addTriggersBuilder() { - return getTriggersFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.JobTrigger.Trigger.getDefaultInstance()); - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder addTriggersBuilder( - int index) { - return getTriggersFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.JobTrigger.Trigger.getDefaultInstance()); - } - /** - *
-     * A list of triggers which will be OR'ed together. Only one in the list
-     * needs to trigger for a job to be started. The list may contain only
-     * a single Schedule trigger and must have at least one object.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - public java.util.List - getTriggersBuilderList() { - return getTriggersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger.Trigger, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder, com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder> - getTriggersFieldBuilder() { - if (triggersBuilder_ == null) { - triggersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger.Trigger, com.google.privacy.dlp.v2.JobTrigger.Trigger.Builder, com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder>( - triggers_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - triggers_ = null; - } - return triggersBuilder_; - } - - private java.util.List errors_ = - java.util.Collections.emptyList(); - private void ensureErrorsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - errors_ = new java.util.ArrayList(errors_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> errorsBuilder_; - - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public java.util.List getErrorsList() { - if (errorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(errors_); - } else { - return errorsBuilder_.getMessageList(); - } - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public int getErrorsCount() { - if (errorsBuilder_ == null) { - return errors_.size(); - } else { - return errorsBuilder_.getCount(); - } - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.privacy.dlp.v2.Error getErrors(int index) { - if (errorsBuilder_ == null) { - return errors_.get(index); - } else { - return errorsBuilder_.getMessage(index); - } - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setErrors( - int index, com.google.privacy.dlp.v2.Error value) { - if (errorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureErrorsIsMutable(); - errors_.set(index, value); - onChanged(); - } else { - errorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setErrors( - int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.set(index, builderForValue.build()); - onChanged(); - } else { - errorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder addErrors(com.google.privacy.dlp.v2.Error value) { - if (errorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureErrorsIsMutable(); - errors_.add(value); - onChanged(); - } else { - errorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder addErrors( - int index, com.google.privacy.dlp.v2.Error value) { - if (errorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureErrorsIsMutable(); - errors_.add(index, value); - onChanged(); - } else { - errorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder addErrors( - com.google.privacy.dlp.v2.Error.Builder builderForValue) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.add(builderForValue.build()); - onChanged(); - } else { - errorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder addErrors( - int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.add(index, builderForValue.build()); - onChanged(); - } else { - errorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder addAllErrors( - java.lang.Iterable values) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, errors_); - onChanged(); - } else { - errorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearErrors() { - if (errorsBuilder_ == null) { - errors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - errorsBuilder_.clear(); - } - return this; - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder removeErrors(int index) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.remove(index); - onChanged(); - } else { - errorsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.privacy.dlp.v2.Error.Builder getErrorsBuilder( - int index) { - return getErrorsFieldBuilder().getBuilder(index); - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( - int index) { - if (errorsBuilder_ == null) { - return errors_.get(index); } else { - return errorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public java.util.List - getErrorsOrBuilderList() { - if (errorsBuilder_ != null) { - return errorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(errors_); - } - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder() { - return getErrorsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Error.getDefaultInstance()); - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder( - int index) { - return getErrorsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Error.getDefaultInstance()); - } - /** - *
-     * Output only. A stream of errors encountered when the trigger was activated. Repeated
-     * errors may result in the JobTrigger automatically being paused.
-     * Will return the last 100 errors. Whenever the JobTrigger is modified
-     * this list will be cleared.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public java.util.List - getErrorsBuilderList() { - return getErrorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> - getErrorsFieldBuilder() { - if (errorsBuilder_ == null) { - errorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder>( - errors_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - errors_ = null; - } - return errorsBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The creation timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The creation timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The creation timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The creation timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The creation timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The creation timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * Output only. The last update timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * Output only. The last update timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The last update timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The last update timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The last update timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * Output only. The last update timestamp of a triggeredJob.
-     * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private com.google.protobuf.Timestamp lastRunTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastRunTimeBuilder_; - /** - *
-     * Output only. The timestamp of the last time this trigger executed.
-     * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the lastRunTime field is set. - */ - public boolean hasLastRunTime() { - return lastRunTimeBuilder_ != null || lastRunTime_ != null; - } - /** - *
-     * Output only. The timestamp of the last time this trigger executed.
-     * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The lastRunTime. - */ - public com.google.protobuf.Timestamp getLastRunTime() { - if (lastRunTimeBuilder_ == null) { - return lastRunTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastRunTime_; - } else { - return lastRunTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The timestamp of the last time this trigger executed.
-     * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setLastRunTime(com.google.protobuf.Timestamp value) { - if (lastRunTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastRunTime_ = value; - onChanged(); - } else { - lastRunTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The timestamp of the last time this trigger executed.
-     * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setLastRunTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastRunTimeBuilder_ == null) { - lastRunTime_ = builderForValue.build(); - onChanged(); - } else { - lastRunTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The timestamp of the last time this trigger executed.
-     * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeLastRunTime(com.google.protobuf.Timestamp value) { - if (lastRunTimeBuilder_ == null) { - if (lastRunTime_ != null) { - lastRunTime_ = - com.google.protobuf.Timestamp.newBuilder(lastRunTime_).mergeFrom(value).buildPartial(); - } else { - lastRunTime_ = value; - } - onChanged(); - } else { - lastRunTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The timestamp of the last time this trigger executed.
-     * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearLastRunTime() { - if (lastRunTimeBuilder_ == null) { - lastRunTime_ = null; - onChanged(); - } else { - lastRunTime_ = null; - lastRunTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The timestamp of the last time this trigger executed.
-     * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getLastRunTimeBuilder() { - - onChanged(); - return getLastRunTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The timestamp of the last time this trigger executed.
-     * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getLastRunTimeOrBuilder() { - if (lastRunTimeBuilder_ != null) { - return lastRunTimeBuilder_.getMessageOrBuilder(); - } else { - return lastRunTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : lastRunTime_; - } - } - /** - *
-     * Output only. The timestamp of the last time this trigger executed.
-     * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getLastRunTimeFieldBuilder() { - if (lastRunTimeBuilder_ == null) { - lastRunTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getLastRunTime(), - getParentForChildren(), - isClean()); - lastRunTime_ = null; - } - return lastRunTimeBuilder_; - } - - private int status_ = 0; - /** - *
-     * Required. A status for this trigger.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return The enum numeric value on the wire for status. - */ - @java.lang.Override public int getStatusValue() { - return status_; - } - /** - *
-     * Required. A status for this trigger.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param value The enum numeric value on the wire for status to set. - * @return This builder for chaining. - */ - public Builder setStatusValue(int value) { - - status_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. A status for this trigger.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return The status. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger.Status getStatus() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.JobTrigger.Status result = com.google.privacy.dlp.v2.JobTrigger.Status.valueOf(status_); - return result == null ? com.google.privacy.dlp.v2.JobTrigger.Status.UNRECOGNIZED : result; - } - /** - *
-     * Required. A status for this trigger.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param value The status to set. - * @return This builder for chaining. - */ - public Builder setStatus(com.google.privacy.dlp.v2.JobTrigger.Status value) { - if (value == null) { - throw new NullPointerException(); - } - - status_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Required. A status for this trigger.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearStatus() { - - status_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.JobTrigger) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.JobTrigger) - private static final com.google.privacy.dlp.v2.JobTrigger DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.JobTrigger(); - } - - public static com.google.privacy.dlp.v2.JobTrigger getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public JobTrigger parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JobTrigger(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerName.java deleted file mode 100644 index b523f65a8272..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerName.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class JobTriggerName implements ResourceName { - private static final PathTemplate PROJECT_JOB_TRIGGER = - PathTemplate.createWithoutUrlEncoding("projects/{project}/jobTriggers/{job_trigger}"); - private static final PathTemplate PROJECT_LOCATION_JOB_TRIGGER = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/jobTriggers/{job_trigger}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String jobTrigger; - private final String location; - - @Deprecated - protected JobTriggerName() { - project = null; - jobTrigger = null; - location = null; - } - - private JobTriggerName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - jobTrigger = Preconditions.checkNotNull(builder.getJobTrigger()); - location = null; - pathTemplate = PROJECT_JOB_TRIGGER; - } - - private JobTriggerName(ProjectLocationJobTriggerBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - jobTrigger = Preconditions.checkNotNull(builder.getJobTrigger()); - pathTemplate = PROJECT_LOCATION_JOB_TRIGGER; - } - - public String getProject() { - return project; - } - - public String getJobTrigger() { - return jobTrigger; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectJobTriggerBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationJobTriggerBuilder newProjectLocationJobTriggerBuilder() { - return new ProjectLocationJobTriggerBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static JobTriggerName of(String project, String jobTrigger) { - return newBuilder().setProject(project).setJobTrigger(jobTrigger).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static JobTriggerName ofProjectJobTriggerName(String project, String jobTrigger) { - return newBuilder().setProject(project).setJobTrigger(jobTrigger).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static JobTriggerName ofProjectLocationJobTriggerName( - String project, String location, String jobTrigger) { - return newProjectLocationJobTriggerBuilder() - .setProject(project) - .setLocation(location) - .setJobTrigger(jobTrigger) - .build(); - } - - public static String format(String project, String jobTrigger) { - return newBuilder().setProject(project).setJobTrigger(jobTrigger).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectJobTriggerName(String project, String jobTrigger) { - return newBuilder().setProject(project).setJobTrigger(jobTrigger).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationJobTriggerName( - String project, String location, String jobTrigger) { - return newProjectLocationJobTriggerBuilder() - .setProject(project) - .setLocation(location) - .setJobTrigger(jobTrigger) - .build() - .toString(); - } - - public static JobTriggerName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT_JOB_TRIGGER.matches(formattedString)) { - Map matchMap = PROJECT_JOB_TRIGGER.match(formattedString); - return ofProjectJobTriggerName(matchMap.get("project"), matchMap.get("job_trigger")); - } else if (PROJECT_LOCATION_JOB_TRIGGER.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_JOB_TRIGGER.match(formattedString); - return ofProjectLocationJobTriggerName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("job_trigger")); - } - throw new ValidationException("JobTriggerName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (JobTriggerName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_JOB_TRIGGER.matches(formattedString) - || PROJECT_LOCATION_JOB_TRIGGER.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (jobTrigger != null) { - fieldMapBuilder.put("job_trigger", jobTrigger); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - JobTriggerName that = ((JobTriggerName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.jobTrigger, that.jobTrigger) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(jobTrigger); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/jobTriggers/{job_trigger}. */ - public static class Builder { - private String project; - private String jobTrigger; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getJobTrigger() { - return jobTrigger; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setJobTrigger(String jobTrigger) { - this.jobTrigger = jobTrigger; - return this; - } - - private Builder(JobTriggerName jobTriggerName) { - Preconditions.checkArgument( - Objects.equals(jobTriggerName.pathTemplate, PROJECT_JOB_TRIGGER), - "toBuilder is only supported when JobTriggerName has the pattern of projects/{project}/jobTriggers/{job_trigger}"); - this.project = jobTriggerName.project; - this.jobTrigger = jobTriggerName.jobTrigger; - } - - public JobTriggerName build() { - return new JobTriggerName(this); - } - } - - /** Builder for projects/{project}/locations/{location}/jobTriggers/{job_trigger}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationJobTriggerBuilder { - private String project; - private String location; - private String jobTrigger; - - protected ProjectLocationJobTriggerBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getJobTrigger() { - return jobTrigger; - } - - public ProjectLocationJobTriggerBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationJobTriggerBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationJobTriggerBuilder setJobTrigger(String jobTrigger) { - this.jobTrigger = jobTrigger; - return this; - } - - public JobTriggerName build() { - return new JobTriggerName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerOrBuilder.java deleted file mode 100644 index 399e0b464629..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTriggerOrBuilder.java +++ /dev/null @@ -1,315 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface JobTriggerOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.JobTrigger) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Unique resource name for the triggeredJob, assigned by the service when the
-   * triggeredJob is created, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Unique resource name for the triggeredJob, assigned by the service when the
-   * triggeredJob is created, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Display name (max 100 chars)
-   * 
- * - * string display_name = 2; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * Display name (max 100 chars)
-   * 
- * - * string display_name = 2; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * User provided description (max 256 chars)
-   * 
- * - * string description = 3; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * User provided description (max 256 chars)
-   * 
- * - * string description = 3; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * For inspect jobs, a snapshot of the configuration.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - * @return Whether the inspectJob field is set. - */ - boolean hasInspectJob(); - /** - *
-   * For inspect jobs, a snapshot of the configuration.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - * @return The inspectJob. - */ - com.google.privacy.dlp.v2.InspectJobConfig getInspectJob(); - /** - *
-   * For inspect jobs, a snapshot of the configuration.
-   * 
- * - * .google.privacy.dlp.v2.InspectJobConfig inspect_job = 4; - */ - com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder(); - - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - java.util.List - getTriggersList(); - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - com.google.privacy.dlp.v2.JobTrigger.Trigger getTriggers(int index); - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - int getTriggersCount(); - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - java.util.List - getTriggersOrBuilderList(); - /** - *
-   * A list of triggers which will be OR'ed together. Only one in the list
-   * needs to trigger for a job to be started. The list may contain only
-   * a single Schedule trigger and must have at least one object.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger.Trigger triggers = 5; - */ - com.google.privacy.dlp.v2.JobTrigger.TriggerOrBuilder getTriggersOrBuilder( - int index); - - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - java.util.List - getErrorsList(); - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.privacy.dlp.v2.Error getErrors(int index); - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - int getErrorsCount(); - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - java.util.List - getErrorsOrBuilderList(); - /** - *
-   * Output only. A stream of errors encountered when the trigger was activated. Repeated
-   * errors may result in the JobTrigger automatically being paused.
-   * Will return the last 100 errors. Whenever the JobTrigger is modified
-   * this list will be cleared.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( - int index); - - /** - *
-   * Output only. The creation timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The creation timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The creation timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The last update timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * Output only. The last update timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * Output only. The last update timestamp of a triggeredJob.
-   * 
- * - * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * Output only. The timestamp of the last time this trigger executed.
-   * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the lastRunTime field is set. - */ - boolean hasLastRunTime(); - /** - *
-   * Output only. The timestamp of the last time this trigger executed.
-   * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The lastRunTime. - */ - com.google.protobuf.Timestamp getLastRunTime(); - /** - *
-   * Output only. The timestamp of the last time this trigger executed.
-   * 
- * - * .google.protobuf.Timestamp last_run_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getLastRunTimeOrBuilder(); - - /** - *
-   * Required. A status for this trigger.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return The enum numeric value on the wire for status. - */ - int getStatusValue(); - /** - *
-   * Required. A status for this trigger.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger.Status status = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return The status. - */ - com.google.privacy.dlp.v2.JobTrigger.Status getStatus(); - - public com.google.privacy.dlp.v2.JobTrigger.JobCase getJobCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Key.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Key.java deleted file mode 100644 index 4772756c2247..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Key.java +++ /dev/null @@ -1,2449 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A unique identifier for a Datastore entity.
- * If a key's partition ID or any of its path kinds or names are
- * reserved/read-only, the key is reserved/read-only.
- * A reserved/read-only key is forbidden in certain documented contexts.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Key} - */ -public final class Key extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Key) - KeyOrBuilder { -private static final long serialVersionUID = 0L; - // Use Key.newBuilder() to construct. - private Key(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Key() { - path_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Key(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Key( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.PartitionId.Builder subBuilder = null; - if (partitionId_ != null) { - subBuilder = partitionId_.toBuilder(); - } - partitionId_ = input.readMessage(com.google.privacy.dlp.v2.PartitionId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partitionId_); - partitionId_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - path_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - path_.add( - input.readMessage(com.google.privacy.dlp.v2.Key.PathElement.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - path_ = java.util.Collections.unmodifiableList(path_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Key.class, com.google.privacy.dlp.v2.Key.Builder.class); - } - - public interface PathElementOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Key.PathElement) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The kind of the entity.
-     * A kind matching regex `__.*__` is reserved/read-only.
-     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string kind = 1; - * @return The kind. - */ - java.lang.String getKind(); - /** - *
-     * The kind of the entity.
-     * A kind matching regex `__.*__` is reserved/read-only.
-     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string kind = 1; - * @return The bytes for kind. - */ - com.google.protobuf.ByteString - getKindBytes(); - - /** - *
-     * The auto-allocated ID of the entity.
-     * Never equal to zero. Values less than zero are discouraged and may not
-     * be supported in the future.
-     * 
- * - * int64 id = 2; - * @return Whether the id field is set. - */ - boolean hasId(); - /** - *
-     * The auto-allocated ID of the entity.
-     * Never equal to zero. Values less than zero are discouraged and may not
-     * be supported in the future.
-     * 
- * - * int64 id = 2; - * @return The id. - */ - long getId(); - - /** - *
-     * The name of the entity.
-     * A name matching regex `__.*__` is reserved/read-only.
-     * A name must not be more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string name = 3; - * @return Whether the name field is set. - */ - boolean hasName(); - /** - *
-     * The name of the entity.
-     * A name matching regex `__.*__` is reserved/read-only.
-     * A name must not be more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string name = 3; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * The name of the entity.
-     * A name matching regex `__.*__` is reserved/read-only.
-     * A name must not be more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - public com.google.privacy.dlp.v2.Key.PathElement.IdTypeCase getIdTypeCase(); - } - /** - *
-   * A (kind, ID/name) pair used to construct a key path.
-   * If either name or ID is set, the element is complete.
-   * If neither is set, the element is incomplete.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Key.PathElement} - */ - public static final class PathElement extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Key.PathElement) - PathElementOrBuilder { - private static final long serialVersionUID = 0L; - // Use PathElement.newBuilder() to construct. - private PathElement(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PathElement() { - kind_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PathElement(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PathElement( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - kind_ = s; - break; - } - case 16: { - idType_ = input.readInt64(); - idTypeCase_ = 2; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - idTypeCase_ = 3; - idType_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Key.PathElement.class, com.google.privacy.dlp.v2.Key.PathElement.Builder.class); - } - - private int idTypeCase_ = 0; - private java.lang.Object idType_; - public enum IdTypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ID(2), - NAME(3), - IDTYPE_NOT_SET(0); - private final int value; - private IdTypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static IdTypeCase valueOf(int value) { - return forNumber(value); - } - - public static IdTypeCase forNumber(int value) { - switch (value) { - case 2: return ID; - case 3: return NAME; - case 0: return IDTYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public IdTypeCase - getIdTypeCase() { - return IdTypeCase.forNumber( - idTypeCase_); - } - - public static final int KIND_FIELD_NUMBER = 1; - private volatile java.lang.Object kind_; - /** - *
-     * The kind of the entity.
-     * A kind matching regex `__.*__` is reserved/read-only.
-     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string kind = 1; - * @return The kind. - */ - @java.lang.Override - public java.lang.String getKind() { - java.lang.Object ref = kind_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kind_ = s; - return s; - } - } - /** - *
-     * The kind of the entity.
-     * A kind matching regex `__.*__` is reserved/read-only.
-     * A kind must not contain more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string kind = 1; - * @return The bytes for kind. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKindBytes() { - java.lang.Object ref = kind_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kind_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ID_FIELD_NUMBER = 2; - /** - *
-     * The auto-allocated ID of the entity.
-     * Never equal to zero. Values less than zero are discouraged and may not
-     * be supported in the future.
-     * 
- * - * int64 id = 2; - * @return Whether the id field is set. - */ - @java.lang.Override - public boolean hasId() { - return idTypeCase_ == 2; - } - /** - *
-     * The auto-allocated ID of the entity.
-     * Never equal to zero. Values less than zero are discouraged and may not
-     * be supported in the future.
-     * 
- * - * int64 id = 2; - * @return The id. - */ - @java.lang.Override - public long getId() { - if (idTypeCase_ == 2) { - return (java.lang.Long) idType_; - } - return 0L; - } - - public static final int NAME_FIELD_NUMBER = 3; - /** - *
-     * The name of the entity.
-     * A name matching regex `__.*__` is reserved/read-only.
-     * A name must not be more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string name = 3; - * @return Whether the name field is set. - */ - public boolean hasName() { - return idTypeCase_ == 3; - } - /** - *
-     * The name of the entity.
-     * A name matching regex `__.*__` is reserved/read-only.
-     * A name must not be more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string name = 3; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = ""; - if (idTypeCase_ == 3) { - ref = idType_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (idTypeCase_ == 3) { - idType_ = s; - } - return s; - } - } - /** - *
-     * The name of the entity.
-     * A name matching regex `__.*__` is reserved/read-only.
-     * A name must not be more than 1500 bytes when UTF-8 encoded.
-     * Cannot be `""`.
-     * 
- * - * string name = 3; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = ""; - if (idTypeCase_ == 3) { - ref = idType_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (idTypeCase_ == 3) { - idType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_); - } - if (idTypeCase_ == 2) { - output.writeInt64( - 2, (long)((java.lang.Long) idType_)); - } - if (idTypeCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, idType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kind_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_); - } - if (idTypeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 2, (long)((java.lang.Long) idType_)); - } - if (idTypeCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, idType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Key.PathElement)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Key.PathElement other = (com.google.privacy.dlp.v2.Key.PathElement) obj; - - if (!getKind() - .equals(other.getKind())) return false; - if (!getIdTypeCase().equals(other.getIdTypeCase())) return false; - switch (idTypeCase_) { - case 2: - if (getId() - != other.getId()) return false; - break; - case 3: - if (!getName() - .equals(other.getName())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KIND_FIELD_NUMBER; - hash = (53 * hash) + getKind().hashCode(); - switch (idTypeCase_) { - case 2: - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getId()); - break; - case 3: - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Key.PathElement parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Key.PathElement prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A (kind, ID/name) pair used to construct a key path.
-     * If either name or ID is set, the element is complete.
-     * If neither is set, the element is incomplete.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Key.PathElement} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Key.PathElement) - com.google.privacy.dlp.v2.Key.PathElementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Key.PathElement.class, com.google.privacy.dlp.v2.Key.PathElement.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Key.PathElement.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - kind_ = ""; - - idTypeCase_ = 0; - idType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_PathElement_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Key.PathElement getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Key.PathElement.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Key.PathElement build() { - com.google.privacy.dlp.v2.Key.PathElement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Key.PathElement buildPartial() { - com.google.privacy.dlp.v2.Key.PathElement result = new com.google.privacy.dlp.v2.Key.PathElement(this); - result.kind_ = kind_; - if (idTypeCase_ == 2) { - result.idType_ = idType_; - } - if (idTypeCase_ == 3) { - result.idType_ = idType_; - } - result.idTypeCase_ = idTypeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Key.PathElement) { - return mergeFrom((com.google.privacy.dlp.v2.Key.PathElement)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Key.PathElement other) { - if (other == com.google.privacy.dlp.v2.Key.PathElement.getDefaultInstance()) return this; - if (!other.getKind().isEmpty()) { - kind_ = other.kind_; - onChanged(); - } - switch (other.getIdTypeCase()) { - case ID: { - setId(other.getId()); - break; - } - case NAME: { - idTypeCase_ = 3; - idType_ = other.idType_; - onChanged(); - break; - } - case IDTYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Key.PathElement parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Key.PathElement) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int idTypeCase_ = 0; - private java.lang.Object idType_; - public IdTypeCase - getIdTypeCase() { - return IdTypeCase.forNumber( - idTypeCase_); - } - - public Builder clearIdType() { - idTypeCase_ = 0; - idType_ = null; - onChanged(); - return this; - } - - - private java.lang.Object kind_ = ""; - /** - *
-       * The kind of the entity.
-       * A kind matching regex `__.*__` is reserved/read-only.
-       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string kind = 1; - * @return The kind. - */ - public java.lang.String getKind() { - java.lang.Object ref = kind_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kind_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The kind of the entity.
-       * A kind matching regex `__.*__` is reserved/read-only.
-       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string kind = 1; - * @return The bytes for kind. - */ - public com.google.protobuf.ByteString - getKindBytes() { - java.lang.Object ref = kind_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kind_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The kind of the entity.
-       * A kind matching regex `__.*__` is reserved/read-only.
-       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string kind = 1; - * @param value The kind to set. - * @return This builder for chaining. - */ - public Builder setKind( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kind_ = value; - onChanged(); - return this; - } - /** - *
-       * The kind of the entity.
-       * A kind matching regex `__.*__` is reserved/read-only.
-       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string kind = 1; - * @return This builder for chaining. - */ - public Builder clearKind() { - - kind_ = getDefaultInstance().getKind(); - onChanged(); - return this; - } - /** - *
-       * The kind of the entity.
-       * A kind matching regex `__.*__` is reserved/read-only.
-       * A kind must not contain more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string kind = 1; - * @param value The bytes for kind to set. - * @return This builder for chaining. - */ - public Builder setKindBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kind_ = value; - onChanged(); - return this; - } - - /** - *
-       * The auto-allocated ID of the entity.
-       * Never equal to zero. Values less than zero are discouraged and may not
-       * be supported in the future.
-       * 
- * - * int64 id = 2; - * @return Whether the id field is set. - */ - public boolean hasId() { - return idTypeCase_ == 2; - } - /** - *
-       * The auto-allocated ID of the entity.
-       * Never equal to zero. Values less than zero are discouraged and may not
-       * be supported in the future.
-       * 
- * - * int64 id = 2; - * @return The id. - */ - public long getId() { - if (idTypeCase_ == 2) { - return (java.lang.Long) idType_; - } - return 0L; - } - /** - *
-       * The auto-allocated ID of the entity.
-       * Never equal to zero. Values less than zero are discouraged and may not
-       * be supported in the future.
-       * 
- * - * int64 id = 2; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(long value) { - idTypeCase_ = 2; - idType_ = value; - onChanged(); - return this; - } - /** - *
-       * The auto-allocated ID of the entity.
-       * Never equal to zero. Values less than zero are discouraged and may not
-       * be supported in the future.
-       * 
- * - * int64 id = 2; - * @return This builder for chaining. - */ - public Builder clearId() { - if (idTypeCase_ == 2) { - idTypeCase_ = 0; - idType_ = null; - onChanged(); - } - return this; - } - - /** - *
-       * The name of the entity.
-       * A name matching regex `__.*__` is reserved/read-only.
-       * A name must not be more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string name = 3; - * @return Whether the name field is set. - */ - @java.lang.Override - public boolean hasName() { - return idTypeCase_ == 3; - } - /** - *
-       * The name of the entity.
-       * A name matching regex `__.*__` is reserved/read-only.
-       * A name must not be more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string name = 3; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = ""; - if (idTypeCase_ == 3) { - ref = idType_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (idTypeCase_ == 3) { - idType_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the entity.
-       * A name matching regex `__.*__` is reserved/read-only.
-       * A name must not be more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string name = 3; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = ""; - if (idTypeCase_ == 3) { - ref = idType_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (idTypeCase_ == 3) { - idType_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the entity.
-       * A name matching regex `__.*__` is reserved/read-only.
-       * A name must not be more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string name = 3; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - idTypeCase_ = 3; - idType_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the entity.
-       * A name matching regex `__.*__` is reserved/read-only.
-       * A name must not be more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string name = 3; - * @return This builder for chaining. - */ - public Builder clearName() { - if (idTypeCase_ == 3) { - idTypeCase_ = 0; - idType_ = null; - onChanged(); - } - return this; - } - /** - *
-       * The name of the entity.
-       * A name matching regex `__.*__` is reserved/read-only.
-       * A name must not be more than 1500 bytes when UTF-8 encoded.
-       * Cannot be `""`.
-       * 
- * - * string name = 3; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - idTypeCase_ = 3; - idType_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Key.PathElement) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Key.PathElement) - private static final com.google.privacy.dlp.v2.Key.PathElement DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Key.PathElement(); - } - - public static com.google.privacy.dlp.v2.Key.PathElement getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PathElement parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PathElement(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Key.PathElement getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PARTITION_ID_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.PartitionId partitionId_; - /** - *
-   * Entities are partitioned into subsets, currently identified by a project
-   * ID and namespace ID.
-   * Queries are scoped to a single partition.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return Whether the partitionId field is set. - */ - @java.lang.Override - public boolean hasPartitionId() { - return partitionId_ != null; - } - /** - *
-   * Entities are partitioned into subsets, currently identified by a project
-   * ID and namespace ID.
-   * Queries are scoped to a single partition.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return The partitionId. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PartitionId getPartitionId() { - return partitionId_ == null ? com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; - } - /** - *
-   * Entities are partitioned into subsets, currently identified by a project
-   * ID and namespace ID.
-   * Queries are scoped to a single partition.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder() { - return getPartitionId(); - } - - public static final int PATH_FIELD_NUMBER = 2; - private java.util.List path_; - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - @java.lang.Override - public java.util.List getPathList() { - return path_; - } - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - @java.lang.Override - public java.util.List - getPathOrBuilderList() { - return path_; - } - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - @java.lang.Override - public int getPathCount() { - return path_.size(); - } - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Key.PathElement getPath(int index) { - return path_.get(index); - } - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Key.PathElementOrBuilder getPathOrBuilder( - int index) { - return path_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (partitionId_ != null) { - output.writeMessage(1, getPartitionId()); - } - for (int i = 0; i < path_.size(); i++) { - output.writeMessage(2, path_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (partitionId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getPartitionId()); - } - for (int i = 0; i < path_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, path_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Key)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Key other = (com.google.privacy.dlp.v2.Key) obj; - - if (hasPartitionId() != other.hasPartitionId()) return false; - if (hasPartitionId()) { - if (!getPartitionId() - .equals(other.getPartitionId())) return false; - } - if (!getPathList() - .equals(other.getPathList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPartitionId()) { - hash = (37 * hash) + PARTITION_ID_FIELD_NUMBER; - hash = (53 * hash) + getPartitionId().hashCode(); - } - if (getPathCount() > 0) { - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPathList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Key parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Key parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Key parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Key parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Key parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Key parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Key parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Key parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Key prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A unique identifier for a Datastore entity.
-   * If a key's partition ID or any of its path kinds or names are
-   * reserved/read-only, the key is reserved/read-only.
-   * A reserved/read-only key is forbidden in certain documented contexts.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Key} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Key) - com.google.privacy.dlp.v2.KeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Key.class, com.google.privacy.dlp.v2.Key.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Key.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPathFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (partitionIdBuilder_ == null) { - partitionId_ = null; - } else { - partitionId_ = null; - partitionIdBuilder_ = null; - } - if (pathBuilder_ == null) { - path_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - pathBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_Key_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Key getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Key.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Key build() { - com.google.privacy.dlp.v2.Key result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Key buildPartial() { - com.google.privacy.dlp.v2.Key result = new com.google.privacy.dlp.v2.Key(this); - int from_bitField0_ = bitField0_; - if (partitionIdBuilder_ == null) { - result.partitionId_ = partitionId_; - } else { - result.partitionId_ = partitionIdBuilder_.build(); - } - if (pathBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - path_ = java.util.Collections.unmodifiableList(path_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.path_ = path_; - } else { - result.path_ = pathBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Key) { - return mergeFrom((com.google.privacy.dlp.v2.Key)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Key other) { - if (other == com.google.privacy.dlp.v2.Key.getDefaultInstance()) return this; - if (other.hasPartitionId()) { - mergePartitionId(other.getPartitionId()); - } - if (pathBuilder_ == null) { - if (!other.path_.isEmpty()) { - if (path_.isEmpty()) { - path_ = other.path_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePathIsMutable(); - path_.addAll(other.path_); - } - onChanged(); - } - } else { - if (!other.path_.isEmpty()) { - if (pathBuilder_.isEmpty()) { - pathBuilder_.dispose(); - pathBuilder_ = null; - path_ = other.path_; - bitField0_ = (bitField0_ & ~0x00000001); - pathBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPathFieldBuilder() : null; - } else { - pathBuilder_.addAllMessages(other.path_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Key parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Key) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.PartitionId partitionId_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder> partitionIdBuilder_; - /** - *
-     * Entities are partitioned into subsets, currently identified by a project
-     * ID and namespace ID.
-     * Queries are scoped to a single partition.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return Whether the partitionId field is set. - */ - public boolean hasPartitionId() { - return partitionIdBuilder_ != null || partitionId_ != null; - } - /** - *
-     * Entities are partitioned into subsets, currently identified by a project
-     * ID and namespace ID.
-     * Queries are scoped to a single partition.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return The partitionId. - */ - public com.google.privacy.dlp.v2.PartitionId getPartitionId() { - if (partitionIdBuilder_ == null) { - return partitionId_ == null ? com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; - } else { - return partitionIdBuilder_.getMessage(); - } - } - /** - *
-     * Entities are partitioned into subsets, currently identified by a project
-     * ID and namespace ID.
-     * Queries are scoped to a single partition.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public Builder setPartitionId(com.google.privacy.dlp.v2.PartitionId value) { - if (partitionIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - partitionId_ = value; - onChanged(); - } else { - partitionIdBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Entities are partitioned into subsets, currently identified by a project
-     * ID and namespace ID.
-     * Queries are scoped to a single partition.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public Builder setPartitionId( - com.google.privacy.dlp.v2.PartitionId.Builder builderForValue) { - if (partitionIdBuilder_ == null) { - partitionId_ = builderForValue.build(); - onChanged(); - } else { - partitionIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Entities are partitioned into subsets, currently identified by a project
-     * ID and namespace ID.
-     * Queries are scoped to a single partition.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public Builder mergePartitionId(com.google.privacy.dlp.v2.PartitionId value) { - if (partitionIdBuilder_ == null) { - if (partitionId_ != null) { - partitionId_ = - com.google.privacy.dlp.v2.PartitionId.newBuilder(partitionId_).mergeFrom(value).buildPartial(); - } else { - partitionId_ = value; - } - onChanged(); - } else { - partitionIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Entities are partitioned into subsets, currently identified by a project
-     * ID and namespace ID.
-     * Queries are scoped to a single partition.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public Builder clearPartitionId() { - if (partitionIdBuilder_ == null) { - partitionId_ = null; - onChanged(); - } else { - partitionId_ = null; - partitionIdBuilder_ = null; - } - - return this; - } - /** - *
-     * Entities are partitioned into subsets, currently identified by a project
-     * ID and namespace ID.
-     * Queries are scoped to a single partition.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public com.google.privacy.dlp.v2.PartitionId.Builder getPartitionIdBuilder() { - - onChanged(); - return getPartitionIdFieldBuilder().getBuilder(); - } - /** - *
-     * Entities are partitioned into subsets, currently identified by a project
-     * ID and namespace ID.
-     * Queries are scoped to a single partition.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - public com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder() { - if (partitionIdBuilder_ != null) { - return partitionIdBuilder_.getMessageOrBuilder(); - } else { - return partitionId_ == null ? - com.google.privacy.dlp.v2.PartitionId.getDefaultInstance() : partitionId_; - } - } - /** - *
-     * Entities are partitioned into subsets, currently identified by a project
-     * ID and namespace ID.
-     * Queries are scoped to a single partition.
-     * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder> - getPartitionIdFieldBuilder() { - if (partitionIdBuilder_ == null) { - partitionIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PartitionId, com.google.privacy.dlp.v2.PartitionId.Builder, com.google.privacy.dlp.v2.PartitionIdOrBuilder>( - getPartitionId(), - getParentForChildren(), - isClean()); - partitionId_ = null; - } - return partitionIdBuilder_; - } - - private java.util.List path_ = - java.util.Collections.emptyList(); - private void ensurePathIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - path_ = new java.util.ArrayList(path_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Key.PathElement, com.google.privacy.dlp.v2.Key.PathElement.Builder, com.google.privacy.dlp.v2.Key.PathElementOrBuilder> pathBuilder_; - - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public java.util.List getPathList() { - if (pathBuilder_ == null) { - return java.util.Collections.unmodifiableList(path_); - } else { - return pathBuilder_.getMessageList(); - } - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public int getPathCount() { - if (pathBuilder_ == null) { - return path_.size(); - } else { - return pathBuilder_.getCount(); - } - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public com.google.privacy.dlp.v2.Key.PathElement getPath(int index) { - if (pathBuilder_ == null) { - return path_.get(index); - } else { - return pathBuilder_.getMessage(index); - } - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public Builder setPath( - int index, com.google.privacy.dlp.v2.Key.PathElement value) { - if (pathBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathIsMutable(); - path_.set(index, value); - onChanged(); - } else { - pathBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public Builder setPath( - int index, com.google.privacy.dlp.v2.Key.PathElement.Builder builderForValue) { - if (pathBuilder_ == null) { - ensurePathIsMutable(); - path_.set(index, builderForValue.build()); - onChanged(); - } else { - pathBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public Builder addPath(com.google.privacy.dlp.v2.Key.PathElement value) { - if (pathBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathIsMutable(); - path_.add(value); - onChanged(); - } else { - pathBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public Builder addPath( - int index, com.google.privacy.dlp.v2.Key.PathElement value) { - if (pathBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathIsMutable(); - path_.add(index, value); - onChanged(); - } else { - pathBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public Builder addPath( - com.google.privacy.dlp.v2.Key.PathElement.Builder builderForValue) { - if (pathBuilder_ == null) { - ensurePathIsMutable(); - path_.add(builderForValue.build()); - onChanged(); - } else { - pathBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public Builder addPath( - int index, com.google.privacy.dlp.v2.Key.PathElement.Builder builderForValue) { - if (pathBuilder_ == null) { - ensurePathIsMutable(); - path_.add(index, builderForValue.build()); - onChanged(); - } else { - pathBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public Builder addAllPath( - java.lang.Iterable values) { - if (pathBuilder_ == null) { - ensurePathIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, path_); - onChanged(); - } else { - pathBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public Builder clearPath() { - if (pathBuilder_ == null) { - path_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - pathBuilder_.clear(); - } - return this; - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public Builder removePath(int index) { - if (pathBuilder_ == null) { - ensurePathIsMutable(); - path_.remove(index); - onChanged(); - } else { - pathBuilder_.remove(index); - } - return this; - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public com.google.privacy.dlp.v2.Key.PathElement.Builder getPathBuilder( - int index) { - return getPathFieldBuilder().getBuilder(index); - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public com.google.privacy.dlp.v2.Key.PathElementOrBuilder getPathOrBuilder( - int index) { - if (pathBuilder_ == null) { - return path_.get(index); } else { - return pathBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public java.util.List - getPathOrBuilderList() { - if (pathBuilder_ != null) { - return pathBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(path_); - } - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public com.google.privacy.dlp.v2.Key.PathElement.Builder addPathBuilder() { - return getPathFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Key.PathElement.getDefaultInstance()); - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public com.google.privacy.dlp.v2.Key.PathElement.Builder addPathBuilder( - int index) { - return getPathFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Key.PathElement.getDefaultInstance()); - } - /** - *
-     * The entity path.
-     * An entity path consists of one or more elements composed of a kind and a
-     * string or numerical identifier, which identify entities. The first
-     * element identifies a _root entity_, the second element identifies
-     * a _child_ of the root entity, the third element identifies a child of the
-     * second entity, and so forth. The entities identified by all prefixes of
-     * the path are called the element's _ancestors_.
-     * A path can never be empty, and a path can have at most 100 elements.
-     * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - public java.util.List - getPathBuilderList() { - return getPathFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Key.PathElement, com.google.privacy.dlp.v2.Key.PathElement.Builder, com.google.privacy.dlp.v2.Key.PathElementOrBuilder> - getPathFieldBuilder() { - if (pathBuilder_ == null) { - pathBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Key.PathElement, com.google.privacy.dlp.v2.Key.PathElement.Builder, com.google.privacy.dlp.v2.Key.PathElementOrBuilder>( - path_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - path_ = null; - } - return pathBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Key) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Key) - private static final com.google.privacy.dlp.v2.Key DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Key(); - } - - public static com.google.privacy.dlp.v2.Key getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Key parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Key(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Key getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KeyOrBuilder.java deleted file mode 100644 index 0a62e436a145..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KeyOrBuilder.java +++ /dev/null @@ -1,121 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface KeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Key) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Entities are partitioned into subsets, currently identified by a project
-   * ID and namespace ID.
-   * Queries are scoped to a single partition.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return Whether the partitionId field is set. - */ - boolean hasPartitionId(); - /** - *
-   * Entities are partitioned into subsets, currently identified by a project
-   * ID and namespace ID.
-   * Queries are scoped to a single partition.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - * @return The partitionId. - */ - com.google.privacy.dlp.v2.PartitionId getPartitionId(); - /** - *
-   * Entities are partitioned into subsets, currently identified by a project
-   * ID and namespace ID.
-   * Queries are scoped to a single partition.
-   * 
- * - * .google.privacy.dlp.v2.PartitionId partition_id = 1; - */ - com.google.privacy.dlp.v2.PartitionIdOrBuilder getPartitionIdOrBuilder(); - - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - java.util.List - getPathList(); - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - com.google.privacy.dlp.v2.Key.PathElement getPath(int index); - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - int getPathCount(); - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - java.util.List - getPathOrBuilderList(); - /** - *
-   * The entity path.
-   * An entity path consists of one or more elements composed of a kind and a
-   * string or numerical identifier, which identify entities. The first
-   * element identifies a _root entity_, the second element identifies
-   * a _child_ of the root entity, the third element identifies a child of the
-   * second entity, and so forth. The entities identified by all prefixes of
-   * the path are called the element's _ancestors_.
-   * A path can never be empty, and a path can have at most 100 elements.
-   * 
- * - * repeated .google.privacy.dlp.v2.Key.PathElement path = 2; - */ - com.google.privacy.dlp.v2.Key.PathElementOrBuilder getPathOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpression.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpression.java deleted file mode 100644 index 67f3b4c7dfcd..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpression.java +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A representation of a Datastore kind.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.KindExpression} - */ -public final class KindExpression extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.KindExpression) - KindExpressionOrBuilder { -private static final long serialVersionUID = 0L; - // Use KindExpression.newBuilder() to construct. - private KindExpression(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KindExpression() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KindExpression(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KindExpression( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.KindExpression.class, com.google.privacy.dlp.v2.KindExpression.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The name of the kind.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the kind.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.KindExpression)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.KindExpression other = (com.google.privacy.dlp.v2.KindExpression) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.KindExpression parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.KindExpression parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KindExpression parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.KindExpression parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KindExpression parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.KindExpression parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KindExpression parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.KindExpression parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KindExpression parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.KindExpression parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KindExpression parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.KindExpression parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.KindExpression prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A representation of a Datastore kind.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.KindExpression} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.KindExpression) - com.google.privacy.dlp.v2.KindExpressionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.KindExpression.class, com.google.privacy.dlp.v2.KindExpression.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.KindExpression.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_KindExpression_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.KindExpression getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.KindExpression.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.KindExpression build() { - com.google.privacy.dlp.v2.KindExpression result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.KindExpression buildPartial() { - com.google.privacy.dlp.v2.KindExpression result = new com.google.privacy.dlp.v2.KindExpression(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.KindExpression) { - return mergeFrom((com.google.privacy.dlp.v2.KindExpression)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.KindExpression other) { - if (other == com.google.privacy.dlp.v2.KindExpression.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.KindExpression parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.KindExpression) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the kind.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the kind.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the kind.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The name of the kind.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The name of the kind.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.KindExpression) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.KindExpression) - private static final com.google.privacy.dlp.v2.KindExpression DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.KindExpression(); - } - - public static com.google.privacy.dlp.v2.KindExpression getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KindExpression parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KindExpression(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.KindExpression getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpressionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpressionOrBuilder.java deleted file mode 100644 index 42c93757b450..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KindExpressionOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface KindExpressionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.KindExpression) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the kind.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the kind.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKey.java deleted file mode 100644 index 691e82edcaca..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKey.java +++ /dev/null @@ -1,695 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Include to use an existing data crypto key wrapped by KMS.
- * The wrapped key must be a 128-, 192-, or 256-bit key.
- * Authorization requires the following IAM permissions when sending a request
- * to perform a crypto transformation using a KMS-wrapped crypto key:
- * dlp.kms.encrypt
- * For more information, see [Creating a wrapped key]
- * (https://cloud.google.com/dlp/docs/create-wrapped-key).
- * Note: When you use Cloud KMS for cryptographic operations,
- * [charges apply](https://cloud.google.com/kms/pricing).
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.KmsWrappedCryptoKey} - */ -public final class KmsWrappedCryptoKey extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.KmsWrappedCryptoKey) - KmsWrappedCryptoKeyOrBuilder { -private static final long serialVersionUID = 0L; - // Use KmsWrappedCryptoKey.newBuilder() to construct. - private KmsWrappedCryptoKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KmsWrappedCryptoKey() { - wrappedKey_ = com.google.protobuf.ByteString.EMPTY; - cryptoKeyName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KmsWrappedCryptoKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KmsWrappedCryptoKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - - wrappedKey_ = input.readBytes(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - cryptoKeyName_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.KmsWrappedCryptoKey.class, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder.class); - } - - public static final int WRAPPED_KEY_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString wrappedKey_; - /** - *
-   * Required. The wrapped data crypto key.
-   * 
- * - * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The wrappedKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getWrappedKey() { - return wrappedKey_; - } - - public static final int CRYPTO_KEY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object cryptoKeyName_; - /** - *
-   * Required. The resource name of the KMS CryptoKey to use for unwrapping.
-   * 
- * - * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The cryptoKeyName. - */ - @java.lang.Override - public java.lang.String getCryptoKeyName() { - java.lang.Object ref = cryptoKeyName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cryptoKeyName_ = s; - return s; - } - } - /** - *
-   * Required. The resource name of the KMS CryptoKey to use for unwrapping.
-   * 
- * - * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cryptoKeyName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCryptoKeyNameBytes() { - java.lang.Object ref = cryptoKeyName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cryptoKeyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!wrappedKey_.isEmpty()) { - output.writeBytes(1, wrappedKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cryptoKeyName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cryptoKeyName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!wrappedKey_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, wrappedKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cryptoKeyName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cryptoKeyName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.KmsWrappedCryptoKey)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.KmsWrappedCryptoKey other = (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) obj; - - if (!getWrappedKey() - .equals(other.getWrappedKey())) return false; - if (!getCryptoKeyName() - .equals(other.getCryptoKeyName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WRAPPED_KEY_FIELD_NUMBER; - hash = (53 * hash) + getWrappedKey().hashCode(); - hash = (37 * hash) + CRYPTO_KEY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getCryptoKeyName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.KmsWrappedCryptoKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Include to use an existing data crypto key wrapped by KMS.
-   * The wrapped key must be a 128-, 192-, or 256-bit key.
-   * Authorization requires the following IAM permissions when sending a request
-   * to perform a crypto transformation using a KMS-wrapped crypto key:
-   * dlp.kms.encrypt
-   * For more information, see [Creating a wrapped key]
-   * (https://cloud.google.com/dlp/docs/create-wrapped-key).
-   * Note: When you use Cloud KMS for cryptographic operations,
-   * [charges apply](https://cloud.google.com/kms/pricing).
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.KmsWrappedCryptoKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.KmsWrappedCryptoKey) - com.google.privacy.dlp.v2.KmsWrappedCryptoKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.KmsWrappedCryptoKey.class, com.google.privacy.dlp.v2.KmsWrappedCryptoKey.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.KmsWrappedCryptoKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - wrappedKey_ = com.google.protobuf.ByteString.EMPTY; - - cryptoKeyName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.KmsWrappedCryptoKey getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.KmsWrappedCryptoKey build() { - com.google.privacy.dlp.v2.KmsWrappedCryptoKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.KmsWrappedCryptoKey buildPartial() { - com.google.privacy.dlp.v2.KmsWrappedCryptoKey result = new com.google.privacy.dlp.v2.KmsWrappedCryptoKey(this); - result.wrappedKey_ = wrappedKey_; - result.cryptoKeyName_ = cryptoKeyName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.KmsWrappedCryptoKey) { - return mergeFrom((com.google.privacy.dlp.v2.KmsWrappedCryptoKey)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.KmsWrappedCryptoKey other) { - if (other == com.google.privacy.dlp.v2.KmsWrappedCryptoKey.getDefaultInstance()) return this; - if (other.getWrappedKey() != com.google.protobuf.ByteString.EMPTY) { - setWrappedKey(other.getWrappedKey()); - } - if (!other.getCryptoKeyName().isEmpty()) { - cryptoKeyName_ = other.cryptoKeyName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.KmsWrappedCryptoKey parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.KmsWrappedCryptoKey) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString wrappedKey_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Required. The wrapped data crypto key.
-     * 
- * - * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The wrappedKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getWrappedKey() { - return wrappedKey_; - } - /** - *
-     * Required. The wrapped data crypto key.
-     * 
- * - * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The wrappedKey to set. - * @return This builder for chaining. - */ - public Builder setWrappedKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - wrappedKey_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The wrapped data crypto key.
-     * 
- * - * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearWrappedKey() { - - wrappedKey_ = getDefaultInstance().getWrappedKey(); - onChanged(); - return this; - } - - private java.lang.Object cryptoKeyName_ = ""; - /** - *
-     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
-     * 
- * - * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The cryptoKeyName. - */ - public java.lang.String getCryptoKeyName() { - java.lang.Object ref = cryptoKeyName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cryptoKeyName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
-     * 
- * - * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cryptoKeyName. - */ - public com.google.protobuf.ByteString - getCryptoKeyNameBytes() { - java.lang.Object ref = cryptoKeyName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cryptoKeyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
-     * 
- * - * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The cryptoKeyName to set. - * @return This builder for chaining. - */ - public Builder setCryptoKeyName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - cryptoKeyName_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
-     * 
- * - * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearCryptoKeyName() { - - cryptoKeyName_ = getDefaultInstance().getCryptoKeyName(); - onChanged(); - return this; - } - /** - *
-     * Required. The resource name of the KMS CryptoKey to use for unwrapping.
-     * 
- * - * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for cryptoKeyName to set. - * @return This builder for chaining. - */ - public Builder setCryptoKeyNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - cryptoKeyName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.KmsWrappedCryptoKey) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.KmsWrappedCryptoKey) - private static final com.google.privacy.dlp.v2.KmsWrappedCryptoKey DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.KmsWrappedCryptoKey(); - } - - public static com.google.privacy.dlp.v2.KmsWrappedCryptoKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KmsWrappedCryptoKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KmsWrappedCryptoKey(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.KmsWrappedCryptoKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKeyOrBuilder.java deleted file mode 100644 index 3c37dfb4247b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/KmsWrappedCryptoKeyOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface KmsWrappedCryptoKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.KmsWrappedCryptoKey) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The wrapped data crypto key.
-   * 
- * - * bytes wrapped_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The wrappedKey. - */ - com.google.protobuf.ByteString getWrappedKey(); - - /** - *
-   * Required. The resource name of the KMS CryptoKey to use for unwrapping.
-   * 
- * - * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The cryptoKeyName. - */ - java.lang.String getCryptoKeyName(); - /** - *
-   * Required. The resource name of the KMS CryptoKey to use for unwrapping.
-   * 
- * - * string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for cryptoKeyName. - */ - com.google.protobuf.ByteString - getCryptoKeyNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java deleted file mode 100644 index b0a4fe4c3e4f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfig.java +++ /dev/null @@ -1,1306 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Configuration for a custom dictionary created from a data source of any size
- * up to the maximum size defined in the
- * [limits](https://cloud.google.com/dlp/limits) page. The artifacts of
- * dictionary creation are stored in the specified Cloud Storage
- * location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries
- * that satisfy the size requirements.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryConfig} - */ -public final class LargeCustomDictionaryConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.LargeCustomDictionaryConfig) - LargeCustomDictionaryConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use LargeCustomDictionaryConfig.newBuilder() to construct. - private LargeCustomDictionaryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LargeCustomDictionaryConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LargeCustomDictionaryConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LargeCustomDictionaryConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CloudStoragePath.Builder subBuilder = null; - if (outputPath_ != null) { - subBuilder = outputPath_.toBuilder(); - } - outputPath_ = input.readMessage(com.google.privacy.dlp.v2.CloudStoragePath.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputPath_); - outputPath_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.CloudStorageFileSet.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.CloudStorageFileSet) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.privacy.dlp.v2.CloudStorageFileSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CloudStorageFileSet) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.BigQueryField.Builder subBuilder = null; - if (sourceCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.BigQueryField) source_).toBuilder(); - } - source_ = - input.readMessage(com.google.privacy.dlp.v2.BigQueryField.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryField) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 3; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.class, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - public enum SourceCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CLOUD_STORAGE_FILE_SET(2), - BIG_QUERY_FIELD(3), - SOURCE_NOT_SET(0); - private final int value; - private SourceCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 2: return CLOUD_STORAGE_FILE_SET; - case 3: return BIG_QUERY_FIELD; - case 0: return SOURCE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public static final int OUTPUT_PATH_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.CloudStoragePath outputPath_; - /** - *
-   * Location to store dictionary artifacts in Cloud Storage. These files
-   * will only be accessible by project owners and the DLP API. If any of these
-   * artifacts are modified, the dictionary is considered invalid and can no
-   * longer be used.
-   * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - * @return Whether the outputPath field is set. - */ - @java.lang.Override - public boolean hasOutputPath() { - return outputPath_ != null; - } - /** - *
-   * Location to store dictionary artifacts in Cloud Storage. These files
-   * will only be accessible by project owners and the DLP API. If any of these
-   * artifacts are modified, the dictionary is considered invalid and can no
-   * longer be used.
-   * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - * @return The outputPath. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePath getOutputPath() { - return outputPath_ == null ? com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() : outputPath_; - } - /** - *
-   * Location to store dictionary artifacts in Cloud Storage. These files
-   * will only be accessible by project owners and the DLP API. If any of these
-   * artifacts are modified, the dictionary is considered invalid and can no
-   * longer be used.
-   * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getOutputPathOrBuilder() { - return getOutputPath(); - } - - public static final int CLOUD_STORAGE_FILE_SET_FIELD_NUMBER = 2; - /** - *
-   * Set of files containing newline-delimited lists of dictionary phrases.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - * @return Whether the cloudStorageFileSet field is set. - */ - @java.lang.Override - public boolean hasCloudStorageFileSet() { - return sourceCase_ == 2; - } - /** - *
-   * Set of files containing newline-delimited lists of dictionary phrases.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - * @return The cloudStorageFileSet. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageFileSet getCloudStorageFileSet() { - if (sourceCase_ == 2) { - return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; - } - return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); - } - /** - *
-   * Set of files containing newline-delimited lists of dictionary phrases.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder getCloudStorageFileSetOrBuilder() { - if (sourceCase_ == 2) { - return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; - } - return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); - } - - public static final int BIG_QUERY_FIELD_FIELD_NUMBER = 3; - /** - *
-   * Field in a BigQuery table where each cell represents a dictionary phrase.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - * @return Whether the bigQueryField field is set. - */ - @java.lang.Override - public boolean hasBigQueryField() { - return sourceCase_ == 3; - } - /** - *
-   * Field in a BigQuery table where each cell represents a dictionary phrase.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - * @return The bigQueryField. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryField getBigQueryField() { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.BigQueryField) source_; - } - return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); - } - /** - *
-   * Field in a BigQuery table where each cell represents a dictionary phrase.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryFieldOrBuilder getBigQueryFieldOrBuilder() { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.BigQueryField) source_; - } - return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (outputPath_ != null) { - output.writeMessage(1, getOutputPath()); - } - if (sourceCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.CloudStorageFileSet) source_); - } - if (sourceCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.BigQueryField) source_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outputPath_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getOutputPath()); - } - if (sourceCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.CloudStorageFileSet) source_); - } - if (sourceCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.BigQueryField) source_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig other = (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) obj; - - if (hasOutputPath() != other.hasOutputPath()) return false; - if (hasOutputPath()) { - if (!getOutputPath() - .equals(other.getOutputPath())) return false; - } - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 2: - if (!getCloudStorageFileSet() - .equals(other.getCloudStorageFileSet())) return false; - break; - case 3: - if (!getBigQueryField() - .equals(other.getBigQueryField())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasOutputPath()) { - hash = (37 * hash) + OUTPUT_PATH_FIELD_NUMBER; - hash = (53 * hash) + getOutputPath().hashCode(); - } - switch (sourceCase_) { - case 2: - hash = (37 * hash) + CLOUD_STORAGE_FILE_SET_FIELD_NUMBER; - hash = (53 * hash) + getCloudStorageFileSet().hashCode(); - break; - case 3: - hash = (37 * hash) + BIG_QUERY_FIELD_FIELD_NUMBER; - hash = (53 * hash) + getBigQueryField().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Configuration for a custom dictionary created from a data source of any size
-   * up to the maximum size defined in the
-   * [limits](https://cloud.google.com/dlp/limits) page. The artifacts of
-   * dictionary creation are stored in the specified Cloud Storage
-   * location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries
-   * that satisfy the size requirements.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.LargeCustomDictionaryConfig) - com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.class, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (outputPathBuilder_ == null) { - outputPath_ = null; - } else { - outputPath_ = null; - outputPathBuilder_ = null; - } - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig build() { - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig buildPartial() { - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig result = new com.google.privacy.dlp.v2.LargeCustomDictionaryConfig(this); - if (outputPathBuilder_ == null) { - result.outputPath_ = outputPath_; - } else { - result.outputPath_ = outputPathBuilder_.build(); - } - if (sourceCase_ == 2) { - if (cloudStorageFileSetBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = cloudStorageFileSetBuilder_.build(); - } - } - if (sourceCase_ == 3) { - if (bigQueryFieldBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = bigQueryFieldBuilder_.build(); - } - } - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) { - return mergeFrom((com.google.privacy.dlp.v2.LargeCustomDictionaryConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig other) { - if (other == com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance()) return this; - if (other.hasOutputPath()) { - mergeOutputPath(other.getOutputPath()); - } - switch (other.getSourceCase()) { - case CLOUD_STORAGE_FILE_SET: { - mergeCloudStorageFileSet(other.getCloudStorageFileSet()); - break; - } - case BIG_QUERY_FIELD: { - mergeBigQueryField(other.getBigQueryField()); - break; - } - case SOURCE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int sourceCase_ = 0; - private java.lang.Object source_; - public SourceCase - getSourceCase() { - return SourceCase.forNumber( - sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - - private com.google.privacy.dlp.v2.CloudStoragePath outputPath_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> outputPathBuilder_; - /** - *
-     * Location to store dictionary artifacts in Cloud Storage. These files
-     * will only be accessible by project owners and the DLP API. If any of these
-     * artifacts are modified, the dictionary is considered invalid and can no
-     * longer be used.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - * @return Whether the outputPath field is set. - */ - public boolean hasOutputPath() { - return outputPathBuilder_ != null || outputPath_ != null; - } - /** - *
-     * Location to store dictionary artifacts in Cloud Storage. These files
-     * will only be accessible by project owners and the DLP API. If any of these
-     * artifacts are modified, the dictionary is considered invalid and can no
-     * longer be used.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - * @return The outputPath. - */ - public com.google.privacy.dlp.v2.CloudStoragePath getOutputPath() { - if (outputPathBuilder_ == null) { - return outputPath_ == null ? com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() : outputPath_; - } else { - return outputPathBuilder_.getMessage(); - } - } - /** - *
-     * Location to store dictionary artifacts in Cloud Storage. These files
-     * will only be accessible by project owners and the DLP API. If any of these
-     * artifacts are modified, the dictionary is considered invalid and can no
-     * longer be used.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - */ - public Builder setOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value) { - if (outputPathBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputPath_ = value; - onChanged(); - } else { - outputPathBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Location to store dictionary artifacts in Cloud Storage. These files
-     * will only be accessible by project owners and the DLP API. If any of these
-     * artifacts are modified, the dictionary is considered invalid and can no
-     * longer be used.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - */ - public Builder setOutputPath( - com.google.privacy.dlp.v2.CloudStoragePath.Builder builderForValue) { - if (outputPathBuilder_ == null) { - outputPath_ = builderForValue.build(); - onChanged(); - } else { - outputPathBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Location to store dictionary artifacts in Cloud Storage. These files
-     * will only be accessible by project owners and the DLP API. If any of these
-     * artifacts are modified, the dictionary is considered invalid and can no
-     * longer be used.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - */ - public Builder mergeOutputPath(com.google.privacy.dlp.v2.CloudStoragePath value) { - if (outputPathBuilder_ == null) { - if (outputPath_ != null) { - outputPath_ = - com.google.privacy.dlp.v2.CloudStoragePath.newBuilder(outputPath_).mergeFrom(value).buildPartial(); - } else { - outputPath_ = value; - } - onChanged(); - } else { - outputPathBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Location to store dictionary artifacts in Cloud Storage. These files
-     * will only be accessible by project owners and the DLP API. If any of these
-     * artifacts are modified, the dictionary is considered invalid and can no
-     * longer be used.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - */ - public Builder clearOutputPath() { - if (outputPathBuilder_ == null) { - outputPath_ = null; - onChanged(); - } else { - outputPath_ = null; - outputPathBuilder_ = null; - } - - return this; - } - /** - *
-     * Location to store dictionary artifacts in Cloud Storage. These files
-     * will only be accessible by project owners and the DLP API. If any of these
-     * artifacts are modified, the dictionary is considered invalid and can no
-     * longer be used.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - */ - public com.google.privacy.dlp.v2.CloudStoragePath.Builder getOutputPathBuilder() { - - onChanged(); - return getOutputPathFieldBuilder().getBuilder(); - } - /** - *
-     * Location to store dictionary artifacts in Cloud Storage. These files
-     * will only be accessible by project owners and the DLP API. If any of these
-     * artifacts are modified, the dictionary is considered invalid and can no
-     * longer be used.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - */ - public com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getOutputPathOrBuilder() { - if (outputPathBuilder_ != null) { - return outputPathBuilder_.getMessageOrBuilder(); - } else { - return outputPath_ == null ? - com.google.privacy.dlp.v2.CloudStoragePath.getDefaultInstance() : outputPath_; - } - } - /** - *
-     * Location to store dictionary artifacts in Cloud Storage. These files
-     * will only be accessible by project owners and the DLP API. If any of these
-     * artifacts are modified, the dictionary is considered invalid and can no
-     * longer be used.
-     * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder> - getOutputPathFieldBuilder() { - if (outputPathBuilder_ == null) { - outputPathBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStoragePath, com.google.privacy.dlp.v2.CloudStoragePath.Builder, com.google.privacy.dlp.v2.CloudStoragePathOrBuilder>( - getOutputPath(), - getParentForChildren(), - isClean()); - outputPath_ = null; - } - return outputPathBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageFileSet, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder> cloudStorageFileSetBuilder_; - /** - *
-     * Set of files containing newline-delimited lists of dictionary phrases.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - * @return Whether the cloudStorageFileSet field is set. - */ - @java.lang.Override - public boolean hasCloudStorageFileSet() { - return sourceCase_ == 2; - } - /** - *
-     * Set of files containing newline-delimited lists of dictionary phrases.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - * @return The cloudStorageFileSet. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageFileSet getCloudStorageFileSet() { - if (cloudStorageFileSetBuilder_ == null) { - if (sourceCase_ == 2) { - return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; - } - return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); - } else { - if (sourceCase_ == 2) { - return cloudStorageFileSetBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); - } - } - /** - *
-     * Set of files containing newline-delimited lists of dictionary phrases.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - */ - public Builder setCloudStorageFileSet(com.google.privacy.dlp.v2.CloudStorageFileSet value) { - if (cloudStorageFileSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - cloudStorageFileSetBuilder_.setMessage(value); - } - sourceCase_ = 2; - return this; - } - /** - *
-     * Set of files containing newline-delimited lists of dictionary phrases.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - */ - public Builder setCloudStorageFileSet( - com.google.privacy.dlp.v2.CloudStorageFileSet.Builder builderForValue) { - if (cloudStorageFileSetBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - cloudStorageFileSetBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 2; - return this; - } - /** - *
-     * Set of files containing newline-delimited lists of dictionary phrases.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - */ - public Builder mergeCloudStorageFileSet(com.google.privacy.dlp.v2.CloudStorageFileSet value) { - if (cloudStorageFileSetBuilder_ == null) { - if (sourceCase_ == 2 && - source_ != com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance()) { - source_ = com.google.privacy.dlp.v2.CloudStorageFileSet.newBuilder((com.google.privacy.dlp.v2.CloudStorageFileSet) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 2) { - cloudStorageFileSetBuilder_.mergeFrom(value); - } else { - cloudStorageFileSetBuilder_.setMessage(value); - } - } - sourceCase_ = 2; - return this; - } - /** - *
-     * Set of files containing newline-delimited lists of dictionary phrases.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - */ - public Builder clearCloudStorageFileSet() { - if (cloudStorageFileSetBuilder_ == null) { - if (sourceCase_ == 2) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 2) { - sourceCase_ = 0; - source_ = null; - } - cloudStorageFileSetBuilder_.clear(); - } - return this; - } - /** - *
-     * Set of files containing newline-delimited lists of dictionary phrases.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - */ - public com.google.privacy.dlp.v2.CloudStorageFileSet.Builder getCloudStorageFileSetBuilder() { - return getCloudStorageFileSetFieldBuilder().getBuilder(); - } - /** - *
-     * Set of files containing newline-delimited lists of dictionary phrases.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder getCloudStorageFileSetOrBuilder() { - if ((sourceCase_ == 2) && (cloudStorageFileSetBuilder_ != null)) { - return cloudStorageFileSetBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 2) { - return (com.google.privacy.dlp.v2.CloudStorageFileSet) source_; - } - return com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); - } - } - /** - *
-     * Set of files containing newline-delimited lists of dictionary phrases.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageFileSet, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder> - getCloudStorageFileSetFieldBuilder() { - if (cloudStorageFileSetBuilder_ == null) { - if (!(sourceCase_ == 2)) { - source_ = com.google.privacy.dlp.v2.CloudStorageFileSet.getDefaultInstance(); - } - cloudStorageFileSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageFileSet, com.google.privacy.dlp.v2.CloudStorageFileSet.Builder, com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder>( - (com.google.privacy.dlp.v2.CloudStorageFileSet) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 2; - onChanged();; - return cloudStorageFileSetBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryField, com.google.privacy.dlp.v2.BigQueryField.Builder, com.google.privacy.dlp.v2.BigQueryFieldOrBuilder> bigQueryFieldBuilder_; - /** - *
-     * Field in a BigQuery table where each cell represents a dictionary phrase.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - * @return Whether the bigQueryField field is set. - */ - @java.lang.Override - public boolean hasBigQueryField() { - return sourceCase_ == 3; - } - /** - *
-     * Field in a BigQuery table where each cell represents a dictionary phrase.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - * @return The bigQueryField. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryField getBigQueryField() { - if (bigQueryFieldBuilder_ == null) { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.BigQueryField) source_; - } - return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); - } else { - if (sourceCase_ == 3) { - return bigQueryFieldBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); - } - } - /** - *
-     * Field in a BigQuery table where each cell represents a dictionary phrase.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - */ - public Builder setBigQueryField(com.google.privacy.dlp.v2.BigQueryField value) { - if (bigQueryFieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - bigQueryFieldBuilder_.setMessage(value); - } - sourceCase_ = 3; - return this; - } - /** - *
-     * Field in a BigQuery table where each cell represents a dictionary phrase.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - */ - public Builder setBigQueryField( - com.google.privacy.dlp.v2.BigQueryField.Builder builderForValue) { - if (bigQueryFieldBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - bigQueryFieldBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 3; - return this; - } - /** - *
-     * Field in a BigQuery table where each cell represents a dictionary phrase.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - */ - public Builder mergeBigQueryField(com.google.privacy.dlp.v2.BigQueryField value) { - if (bigQueryFieldBuilder_ == null) { - if (sourceCase_ == 3 && - source_ != com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance()) { - source_ = com.google.privacy.dlp.v2.BigQueryField.newBuilder((com.google.privacy.dlp.v2.BigQueryField) source_) - .mergeFrom(value).buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 3) { - bigQueryFieldBuilder_.mergeFrom(value); - } else { - bigQueryFieldBuilder_.setMessage(value); - } - } - sourceCase_ = 3; - return this; - } - /** - *
-     * Field in a BigQuery table where each cell represents a dictionary phrase.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - */ - public Builder clearBigQueryField() { - if (bigQueryFieldBuilder_ == null) { - if (sourceCase_ == 3) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 3) { - sourceCase_ = 0; - source_ = null; - } - bigQueryFieldBuilder_.clear(); - } - return this; - } - /** - *
-     * Field in a BigQuery table where each cell represents a dictionary phrase.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - */ - public com.google.privacy.dlp.v2.BigQueryField.Builder getBigQueryFieldBuilder() { - return getBigQueryFieldFieldBuilder().getBuilder(); - } - /** - *
-     * Field in a BigQuery table where each cell represents a dictionary phrase.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryFieldOrBuilder getBigQueryFieldOrBuilder() { - if ((sourceCase_ == 3) && (bigQueryFieldBuilder_ != null)) { - return bigQueryFieldBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 3) { - return (com.google.privacy.dlp.v2.BigQueryField) source_; - } - return com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); - } - } - /** - *
-     * Field in a BigQuery table where each cell represents a dictionary phrase.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryField, com.google.privacy.dlp.v2.BigQueryField.Builder, com.google.privacy.dlp.v2.BigQueryFieldOrBuilder> - getBigQueryFieldFieldBuilder() { - if (bigQueryFieldBuilder_ == null) { - if (!(sourceCase_ == 3)) { - source_ = com.google.privacy.dlp.v2.BigQueryField.getDefaultInstance(); - } - bigQueryFieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryField, com.google.privacy.dlp.v2.BigQueryField.Builder, com.google.privacy.dlp.v2.BigQueryFieldOrBuilder>( - (com.google.privacy.dlp.v2.BigQueryField) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 3; - onChanged();; - return bigQueryFieldBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.LargeCustomDictionaryConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.LargeCustomDictionaryConfig) - private static final com.google.privacy.dlp.v2.LargeCustomDictionaryConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.LargeCustomDictionaryConfig(); - } - - public static com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LargeCustomDictionaryConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LargeCustomDictionaryConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java deleted file mode 100644 index 3a7a606fb585..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryConfigOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface LargeCustomDictionaryConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.LargeCustomDictionaryConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Location to store dictionary artifacts in Cloud Storage. These files
-   * will only be accessible by project owners and the DLP API. If any of these
-   * artifacts are modified, the dictionary is considered invalid and can no
-   * longer be used.
-   * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - * @return Whether the outputPath field is set. - */ - boolean hasOutputPath(); - /** - *
-   * Location to store dictionary artifacts in Cloud Storage. These files
-   * will only be accessible by project owners and the DLP API. If any of these
-   * artifacts are modified, the dictionary is considered invalid and can no
-   * longer be used.
-   * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - * @return The outputPath. - */ - com.google.privacy.dlp.v2.CloudStoragePath getOutputPath(); - /** - *
-   * Location to store dictionary artifacts in Cloud Storage. These files
-   * will only be accessible by project owners and the DLP API. If any of these
-   * artifacts are modified, the dictionary is considered invalid and can no
-   * longer be used.
-   * 
- * - * .google.privacy.dlp.v2.CloudStoragePath output_path = 1; - */ - com.google.privacy.dlp.v2.CloudStoragePathOrBuilder getOutputPathOrBuilder(); - - /** - *
-   * Set of files containing newline-delimited lists of dictionary phrases.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - * @return Whether the cloudStorageFileSet field is set. - */ - boolean hasCloudStorageFileSet(); - /** - *
-   * Set of files containing newline-delimited lists of dictionary phrases.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - * @return The cloudStorageFileSet. - */ - com.google.privacy.dlp.v2.CloudStorageFileSet getCloudStorageFileSet(); - /** - *
-   * Set of files containing newline-delimited lists of dictionary phrases.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageFileSet cloud_storage_file_set = 2; - */ - com.google.privacy.dlp.v2.CloudStorageFileSetOrBuilder getCloudStorageFileSetOrBuilder(); - - /** - *
-   * Field in a BigQuery table where each cell represents a dictionary phrase.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - * @return Whether the bigQueryField field is set. - */ - boolean hasBigQueryField(); - /** - *
-   * Field in a BigQuery table where each cell represents a dictionary phrase.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - * @return The bigQueryField. - */ - com.google.privacy.dlp.v2.BigQueryField getBigQueryField(); - /** - *
-   * Field in a BigQuery table where each cell represents a dictionary phrase.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryField big_query_field = 3; - */ - com.google.privacy.dlp.v2.BigQueryFieldOrBuilder getBigQueryFieldOrBuilder(); - - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.SourceCase getSourceCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStats.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStats.java deleted file mode 100644 index 78632a2cb6b6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStats.java +++ /dev/null @@ -1,510 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Summary statistics of a custom dictionary.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryStats} - */ -public final class LargeCustomDictionaryStats extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.LargeCustomDictionaryStats) - LargeCustomDictionaryStatsOrBuilder { -private static final long serialVersionUID = 0L; - // Use LargeCustomDictionaryStats.newBuilder() to construct. - private LargeCustomDictionaryStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LargeCustomDictionaryStats() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LargeCustomDictionaryStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LargeCustomDictionaryStats( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - approxNumPhrases_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.LargeCustomDictionaryStats.class, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder.class); - } - - public static final int APPROX_NUM_PHRASES_FIELD_NUMBER = 1; - private long approxNumPhrases_; - /** - *
-   * Approximate number of distinct phrases in the dictionary.
-   * 
- * - * int64 approx_num_phrases = 1; - * @return The approxNumPhrases. - */ - @java.lang.Override - public long getApproxNumPhrases() { - return approxNumPhrases_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (approxNumPhrases_ != 0L) { - output.writeInt64(1, approxNumPhrases_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (approxNumPhrases_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, approxNumPhrases_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryStats)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.LargeCustomDictionaryStats other = (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) obj; - - if (getApproxNumPhrases() - != other.getApproxNumPhrases()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + APPROX_NUM_PHRASES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getApproxNumPhrases()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.LargeCustomDictionaryStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Summary statistics of a custom dictionary.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.LargeCustomDictionaryStats} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.LargeCustomDictionaryStats) - com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.LargeCustomDictionaryStats.class, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.LargeCustomDictionaryStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - approxNumPhrases_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_LargeCustomDictionaryStats_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryStats getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryStats build() { - com.google.privacy.dlp.v2.LargeCustomDictionaryStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryStats buildPartial() { - com.google.privacy.dlp.v2.LargeCustomDictionaryStats result = new com.google.privacy.dlp.v2.LargeCustomDictionaryStats(this); - result.approxNumPhrases_ = approxNumPhrases_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.LargeCustomDictionaryStats) { - return mergeFrom((com.google.privacy.dlp.v2.LargeCustomDictionaryStats)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.LargeCustomDictionaryStats other) { - if (other == com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance()) return this; - if (other.getApproxNumPhrases() != 0L) { - setApproxNumPhrases(other.getApproxNumPhrases()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.LargeCustomDictionaryStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long approxNumPhrases_ ; - /** - *
-     * Approximate number of distinct phrases in the dictionary.
-     * 
- * - * int64 approx_num_phrases = 1; - * @return The approxNumPhrases. - */ - @java.lang.Override - public long getApproxNumPhrases() { - return approxNumPhrases_; - } - /** - *
-     * Approximate number of distinct phrases in the dictionary.
-     * 
- * - * int64 approx_num_phrases = 1; - * @param value The approxNumPhrases to set. - * @return This builder for chaining. - */ - public Builder setApproxNumPhrases(long value) { - - approxNumPhrases_ = value; - onChanged(); - return this; - } - /** - *
-     * Approximate number of distinct phrases in the dictionary.
-     * 
- * - * int64 approx_num_phrases = 1; - * @return This builder for chaining. - */ - public Builder clearApproxNumPhrases() { - - approxNumPhrases_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.LargeCustomDictionaryStats) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.LargeCustomDictionaryStats) - private static final com.google.privacy.dlp.v2.LargeCustomDictionaryStats DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.LargeCustomDictionaryStats(); - } - - public static com.google.privacy.dlp.v2.LargeCustomDictionaryStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LargeCustomDictionaryStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LargeCustomDictionaryStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStatsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStatsOrBuilder.java deleted file mode 100644 index d61c9bc31dd4..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LargeCustomDictionaryStatsOrBuilder.java +++ /dev/null @@ -1,19 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface LargeCustomDictionaryStatsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.LargeCustomDictionaryStats) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Approximate number of distinct phrases in the dictionary.
-   * 
- * - * int64 approx_num_phrases = 1; - * @return The approxNumPhrases. - */ - long getApproxNumPhrases(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java deleted file mode 100644 index 61805ff768ec..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java +++ /dev/null @@ -1,186 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Categorization of results based on how likely they are to represent a match,
- * based on the number of elements they contain which imply a match.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.Likelihood} - */ -public enum Likelihood - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Default value; same as POSSIBLE.
-   * 
- * - * LIKELIHOOD_UNSPECIFIED = 0; - */ - LIKELIHOOD_UNSPECIFIED(0), - /** - *
-   * Few matching elements.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - VERY_UNLIKELY(1), - /** - * UNLIKELY = 2; - */ - UNLIKELY(2), - /** - *
-   * Some matching elements.
-   * 
- * - * POSSIBLE = 3; - */ - POSSIBLE(3), - /** - * LIKELY = 4; - */ - LIKELY(4), - /** - *
-   * Many matching elements.
-   * 
- * - * VERY_LIKELY = 5; - */ - VERY_LIKELY(5), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Default value; same as POSSIBLE.
-   * 
- * - * LIKELIHOOD_UNSPECIFIED = 0; - */ - public static final int LIKELIHOOD_UNSPECIFIED_VALUE = 0; - /** - *
-   * Few matching elements.
-   * 
- * - * VERY_UNLIKELY = 1; - */ - public static final int VERY_UNLIKELY_VALUE = 1; - /** - * UNLIKELY = 2; - */ - public static final int UNLIKELY_VALUE = 2; - /** - *
-   * Some matching elements.
-   * 
- * - * POSSIBLE = 3; - */ - public static final int POSSIBLE_VALUE = 3; - /** - * LIKELY = 4; - */ - public static final int LIKELY_VALUE = 4; - /** - *
-   * Many matching elements.
-   * 
- * - * VERY_LIKELY = 5; - */ - public static final int VERY_LIKELY_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static Likelihood valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Likelihood forNumber(int value) { - switch (value) { - case 0: return LIKELIHOOD_UNSPECIFIED; - case 1: return VERY_UNLIKELY; - case 2: return UNLIKELY; - case 3: return POSSIBLE; - case 4: return LIKELY; - case 5: return VERY_LIKELY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Likelihood> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Likelihood findValueByNumber(int number) { - return Likelihood.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.getDescriptor().getEnumTypes().get(0); - } - - private static final Likelihood[] VALUES = values(); - - public static Likelihood valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private Likelihood(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.Likelihood) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java deleted file mode 100644 index 08a8f5fd8998..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequest.java +++ /dev/null @@ -1,1352 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for ListDeidentifyTemplates.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} - */ -public final class ListDeidentifyTemplatesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) - ListDeidentifyTemplatesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListDeidentifyTemplatesRequest.newBuilder() to construct. - private ListDeidentifyTemplatesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListDeidentifyTemplatesRequest() { - parent_ = ""; - pageToken_ = ""; - orderBy_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListDeidentifyTemplatesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListDeidentifyTemplatesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 24: { - - pageSize_ = input.readInt32(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.class, com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object pageToken_; - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListDeidentifyTemplates`.
-   * 
- * - * string page_token = 2; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListDeidentifyTemplates`.
-   * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_; - /** - *
-   * Size of the page, can be limited by the server. If zero server returns
-   * a page of max size 100.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int ORDER_BY_FIELD_NUMBER = 4; - private volatile java.lang.Object orderBy_; - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the template was created.
-   * - `update_time`: corresponds to the time the template was last updated.
-   * - `name`: corresponds to the template's name.
-   * - `display_name`: corresponds to the template's display name.
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the template was created.
-   * - `update_time`: corresponds to the time the template was last updated.
-   * - `name`: corresponds to the template's name.
-   * - `display_name`: corresponds to the template's display name.
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest other = (com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListDeidentifyTemplates.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.class, com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageToken_ = ""; - - pageSize_ = 0; - - orderBy_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest build() { - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest buildPartial() { - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest result = new com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(this); - result.parent_ = parent_; - result.pageToken_ = pageToken_; - result.pageSize_ = pageSize_; - result.orderBy_ = orderBy_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) { - return mergeFrom((com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest other) { - if (other == com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListDeidentifyTemplates`.
-     * 
- * - * string page_token = 2; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListDeidentifyTemplates`.
-     * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListDeidentifyTemplates`.
-     * 
- * - * string page_token = 2; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListDeidentifyTemplates`.
-     * 
- * - * string page_token = 2; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListDeidentifyTemplates`.
-     * 
- * - * string page_token = 2; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Size of the page, can be limited by the server. If zero server returns
-     * a page of max size 100.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Size of the page, can be limited by the server. If zero server returns
-     * a page of max size 100.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Size of the page, can be limited by the server. If zero server returns
-     * a page of max size 100.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) - private static final com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(); - } - - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDeidentifyTemplatesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDeidentifyTemplatesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java deleted file mode 100644 index 90eccd270045..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesRequestOrBuilder.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListDeidentifyTemplatesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListDeidentifyTemplates`.
-   * 
- * - * string page_token = 2; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListDeidentifyTemplates`.
-   * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Size of the page, can be limited by the server. If zero server returns
-   * a page of max size 100.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the template was created.
-   * - `update_time`: corresponds to the time the template was last updated.
-   * - `name`: corresponds to the template's name.
-   * - `display_name`: corresponds to the template's display name.
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the template was created.
-   * - `update_time`: corresponds to the time the template was last updated.
-   * - `name`: corresponds to the template's name.
-   * - `display_name`: corresponds to the template's display name.
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponse.java deleted file mode 100644 index 196f26c1aa9d..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponse.java +++ /dev/null @@ -1,1068 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Response message for ListDeidentifyTemplates.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} - */ -public final class ListDeidentifyTemplatesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) - ListDeidentifyTemplatesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListDeidentifyTemplatesResponse.newBuilder() to construct. - private ListDeidentifyTemplatesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListDeidentifyTemplatesResponse() { - deidentifyTemplates_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListDeidentifyTemplatesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListDeidentifyTemplatesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deidentifyTemplates_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deidentifyTemplates_.add( - input.readMessage(com.google.privacy.dlp.v2.DeidentifyTemplate.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deidentifyTemplates_ = java.util.Collections.unmodifiableList(deidentifyTemplates_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.class, com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.Builder.class); - } - - public static final int DEIDENTIFY_TEMPLATES_FIELD_NUMBER = 1; - private java.util.List deidentifyTemplates_; - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - @java.lang.Override - public java.util.List getDeidentifyTemplatesList() { - return deidentifyTemplates_; - } - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - @java.lang.Override - public java.util.List - getDeidentifyTemplatesOrBuilderList() { - return deidentifyTemplates_; - } - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - @java.lang.Override - public int getDeidentifyTemplatesCount() { - return deidentifyTemplates_.size(); - } - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplates(int index) { - return deidentifyTemplates_.get(index); - } - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplatesOrBuilder( - int index) { - return deidentifyTemplates_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListDeidentifyTemplates request.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListDeidentifyTemplates request.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < deidentifyTemplates_.size(); i++) { - output.writeMessage(1, deidentifyTemplates_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < deidentifyTemplates_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, deidentifyTemplates_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse other = (com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) obj; - - if (!getDeidentifyTemplatesList() - .equals(other.getDeidentifyTemplatesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDeidentifyTemplatesCount() > 0) { - hash = (37 * hash) + DEIDENTIFY_TEMPLATES_FIELD_NUMBER; - hash = (53 * hash) + getDeidentifyTemplatesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListDeidentifyTemplates.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) - com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.class, com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDeidentifyTemplatesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (deidentifyTemplatesBuilder_ == null) { - deidentifyTemplates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - deidentifyTemplatesBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse build() { - com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse buildPartial() { - com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse result = new com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse(this); - int from_bitField0_ = bitField0_; - if (deidentifyTemplatesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - deidentifyTemplates_ = java.util.Collections.unmodifiableList(deidentifyTemplates_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.deidentifyTemplates_ = deidentifyTemplates_; - } else { - result.deidentifyTemplates_ = deidentifyTemplatesBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) { - return mergeFrom((com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse other) { - if (other == com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.getDefaultInstance()) return this; - if (deidentifyTemplatesBuilder_ == null) { - if (!other.deidentifyTemplates_.isEmpty()) { - if (deidentifyTemplates_.isEmpty()) { - deidentifyTemplates_ = other.deidentifyTemplates_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDeidentifyTemplatesIsMutable(); - deidentifyTemplates_.addAll(other.deidentifyTemplates_); - } - onChanged(); - } - } else { - if (!other.deidentifyTemplates_.isEmpty()) { - if (deidentifyTemplatesBuilder_.isEmpty()) { - deidentifyTemplatesBuilder_.dispose(); - deidentifyTemplatesBuilder_ = null; - deidentifyTemplates_ = other.deidentifyTemplates_; - bitField0_ = (bitField0_ & ~0x00000001); - deidentifyTemplatesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getDeidentifyTemplatesFieldBuilder() : null; - } else { - deidentifyTemplatesBuilder_.addAllMessages(other.deidentifyTemplates_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List deidentifyTemplates_ = - java.util.Collections.emptyList(); - private void ensureDeidentifyTemplatesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - deidentifyTemplates_ = new java.util.ArrayList(deidentifyTemplates_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> deidentifyTemplatesBuilder_; - - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public java.util.List getDeidentifyTemplatesList() { - if (deidentifyTemplatesBuilder_ == null) { - return java.util.Collections.unmodifiableList(deidentifyTemplates_); - } else { - return deidentifyTemplatesBuilder_.getMessageList(); - } - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public int getDeidentifyTemplatesCount() { - if (deidentifyTemplatesBuilder_ == null) { - return deidentifyTemplates_.size(); - } else { - return deidentifyTemplatesBuilder_.getCount(); - } - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplates(int index) { - if (deidentifyTemplatesBuilder_ == null) { - return deidentifyTemplates_.get(index); - } else { - return deidentifyTemplatesBuilder_.getMessage(index); - } - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public Builder setDeidentifyTemplates( - int index, com.google.privacy.dlp.v2.DeidentifyTemplate value) { - if (deidentifyTemplatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeidentifyTemplatesIsMutable(); - deidentifyTemplates_.set(index, value); - onChanged(); - } else { - deidentifyTemplatesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public Builder setDeidentifyTemplates( - int index, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { - if (deidentifyTemplatesBuilder_ == null) { - ensureDeidentifyTemplatesIsMutable(); - deidentifyTemplates_.set(index, builderForValue.build()); - onChanged(); - } else { - deidentifyTemplatesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public Builder addDeidentifyTemplates(com.google.privacy.dlp.v2.DeidentifyTemplate value) { - if (deidentifyTemplatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeidentifyTemplatesIsMutable(); - deidentifyTemplates_.add(value); - onChanged(); - } else { - deidentifyTemplatesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public Builder addDeidentifyTemplates( - int index, com.google.privacy.dlp.v2.DeidentifyTemplate value) { - if (deidentifyTemplatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDeidentifyTemplatesIsMutable(); - deidentifyTemplates_.add(index, value); - onChanged(); - } else { - deidentifyTemplatesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public Builder addDeidentifyTemplates( - com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { - if (deidentifyTemplatesBuilder_ == null) { - ensureDeidentifyTemplatesIsMutable(); - deidentifyTemplates_.add(builderForValue.build()); - onChanged(); - } else { - deidentifyTemplatesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public Builder addDeidentifyTemplates( - int index, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { - if (deidentifyTemplatesBuilder_ == null) { - ensureDeidentifyTemplatesIsMutable(); - deidentifyTemplates_.add(index, builderForValue.build()); - onChanged(); - } else { - deidentifyTemplatesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public Builder addAllDeidentifyTemplates( - java.lang.Iterable values) { - if (deidentifyTemplatesBuilder_ == null) { - ensureDeidentifyTemplatesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, deidentifyTemplates_); - onChanged(); - } else { - deidentifyTemplatesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public Builder clearDeidentifyTemplates() { - if (deidentifyTemplatesBuilder_ == null) { - deidentifyTemplates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - deidentifyTemplatesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public Builder removeDeidentifyTemplates(int index) { - if (deidentifyTemplatesBuilder_ == null) { - ensureDeidentifyTemplatesIsMutable(); - deidentifyTemplates_.remove(index); - onChanged(); - } else { - deidentifyTemplatesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder getDeidentifyTemplatesBuilder( - int index) { - return getDeidentifyTemplatesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplatesOrBuilder( - int index) { - if (deidentifyTemplatesBuilder_ == null) { - return deidentifyTemplates_.get(index); } else { - return deidentifyTemplatesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public java.util.List - getDeidentifyTemplatesOrBuilderList() { - if (deidentifyTemplatesBuilder_ != null) { - return deidentifyTemplatesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(deidentifyTemplates_); - } - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder addDeidentifyTemplatesBuilder() { - return getDeidentifyTemplatesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance()); - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder addDeidentifyTemplatesBuilder( - int index) { - return getDeidentifyTemplatesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance()); - } - /** - *
-     * List of deidentify templates, up to page_size in
-     * ListDeidentifyTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - public java.util.List - getDeidentifyTemplatesBuilderList() { - return getDeidentifyTemplatesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> - getDeidentifyTemplatesFieldBuilder() { - if (deidentifyTemplatesBuilder_ == null) { - deidentifyTemplatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder>( - deidentifyTemplates_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - deidentifyTemplates_ = null; - } - return deidentifyTemplatesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListDeidentifyTemplates request.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListDeidentifyTemplates request.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListDeidentifyTemplates request.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListDeidentifyTemplates request.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListDeidentifyTemplates request.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) - private static final com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse(); - } - - public static com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDeidentifyTemplatesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDeidentifyTemplatesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponseOrBuilder.java deleted file mode 100644 index 3c5eaeb8cf4b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDeidentifyTemplatesResponseOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListDeidentifyTemplatesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - java.util.List - getDeidentifyTemplatesList(); - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplates(int index); - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - int getDeidentifyTemplatesCount(); - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - java.util.List - getDeidentifyTemplatesOrBuilderList(); - /** - *
-   * List of deidentify templates, up to page_size in
-   * ListDeidentifyTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.DeidentifyTemplate deidentify_templates = 1; - */ - com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplatesOrBuilder( - int index); - - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListDeidentifyTemplates request.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListDeidentifyTemplates request.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java deleted file mode 100644 index 0ecbdd17eb46..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequest.java +++ /dev/null @@ -1,1757 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The request message for listing DLP jobs.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListDlpJobsRequest} - */ -public final class ListDlpJobsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListDlpJobsRequest) - ListDlpJobsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListDlpJobsRequest.newBuilder() to construct. - private ListDlpJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListDlpJobsRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - type_ = 0; - orderBy_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListDlpJobsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListDlpJobsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 40: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListDlpJobsRequest.class, com.google.privacy.dlp.v2.ListDlpJobsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 4; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 1; - private volatile java.lang.Object filter_; - /** - *
-   * Allows filtering.
-   * Supported syntax:
-   * * Filter expressions are made up of one or more restrictions.
-   * * Restrictions can be combined by `AND` or `OR` logical operators. A
-   * sequence of restrictions implicitly uses `AND`.
-   * * A restriction has the form of `{field} {operator} {value}`.
-   * * Supported fields/values for inspect jobs:
-   *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
-   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-   *     - `trigger_name` - The name of the trigger that created the job.
-   *     - 'end_time` - Corresponds to the time the job finished.
-   *     - 'start_time` - Corresponds to the time the job finished.
-   * * Supported fields for risk analysis jobs:
-   *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
-   *     - 'end_time` - Corresponds to the time the job finished.
-   *     - 'start_time` - Corresponds to the time the job finished.
-   * * The operator must be `=` or `!=`.
-   * Examples:
-   * * inspected_storage = cloud_storage AND state = done
-   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-   * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
-   * * end_time > \"2017-12-12T00:00:00+00:00\"
-   * The length of this field should be no more than 500 characters.
-   * 
- * - * string filter = 1; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * Allows filtering.
-   * Supported syntax:
-   * * Filter expressions are made up of one or more restrictions.
-   * * Restrictions can be combined by `AND` or `OR` logical operators. A
-   * sequence of restrictions implicitly uses `AND`.
-   * * A restriction has the form of `{field} {operator} {value}`.
-   * * Supported fields/values for inspect jobs:
-   *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
-   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-   *     - `trigger_name` - The name of the trigger that created the job.
-   *     - 'end_time` - Corresponds to the time the job finished.
-   *     - 'start_time` - Corresponds to the time the job finished.
-   * * Supported fields for risk analysis jobs:
-   *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
-   *     - 'end_time` - Corresponds to the time the job finished.
-   *     - 'start_time` - Corresponds to the time the job finished.
-   * * The operator must be `=` or `!=`.
-   * Examples:
-   * * inspected_storage = cloud_storage AND state = done
-   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-   * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
-   * * end_time > \"2017-12-12T00:00:00+00:00\"
-   * The length of this field should be no more than 500 characters.
-   * 
- * - * string filter = 1; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * The standard list page size.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * The standard list page token.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The standard list page token.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 5; - private int type_; - /** - *
-   * The type of job. Defaults to `DlpJobType.INSPECT`
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 5; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The type of job. Defaults to `DlpJobType.INSPECT`
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 5; - * @return The type. - */ - @java.lang.Override public com.google.privacy.dlp.v2.DlpJobType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; - } - - public static final int ORDER_BY_FIELD_NUMBER = 6; - private volatile java.lang.Object orderBy_; - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc, end_time asc, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the job was created.
-   * - `end_time`: corresponds to the time the job ended.
-   * - `name`: corresponds to the job's name.
-   * - `state`: corresponds to `state`
-   * 
- * - * string order_by = 6; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc, end_time asc, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the job was created.
-   * - `end_time`: corresponds to the time the job ended.
-   * - `name`: corresponds to the job's name.
-   * - `state`: corresponds to `state`
-   * 
- * - * string order_by = 6; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 7; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); - } - if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); - } - if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListDlpJobsRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListDlpJobsRequest other = (com.google.privacy.dlp.v2.ListDlpJobsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (type_ != other.type_) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDlpJobsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListDlpJobsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The request message for listing DLP jobs.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListDlpJobsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListDlpJobsRequest) - com.google.privacy.dlp.v2.ListDlpJobsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListDlpJobsRequest.class, com.google.privacy.dlp.v2.ListDlpJobsRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListDlpJobsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - filter_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - type_ = 0; - - orderBy_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDlpJobsRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListDlpJobsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDlpJobsRequest build() { - com.google.privacy.dlp.v2.ListDlpJobsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDlpJobsRequest buildPartial() { - com.google.privacy.dlp.v2.ListDlpJobsRequest result = new com.google.privacy.dlp.v2.ListDlpJobsRequest(this); - result.parent_ = parent_; - result.filter_ = filter_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.type_ = type_; - result.orderBy_ = orderBy_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListDlpJobsRequest) { - return mergeFrom((com.google.privacy.dlp.v2.ListDlpJobsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListDlpJobsRequest other) { - if (other == com.google.privacy.dlp.v2.ListDlpJobsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListDlpJobsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListDlpJobsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect jobs:
-     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - `trigger_name` - The name of the trigger that created the job.
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * Supported fields for risk analysis jobs:
-     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * The operator must be `=` or `!=`.
-     * Examples:
-     * * inspected_storage = cloud_storage AND state = done
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
-     * * end_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 1; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect jobs:
-     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - `trigger_name` - The name of the trigger that created the job.
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * Supported fields for risk analysis jobs:
-     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * The operator must be `=` or `!=`.
-     * Examples:
-     * * inspected_storage = cloud_storage AND state = done
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
-     * * end_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 1; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect jobs:
-     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - `trigger_name` - The name of the trigger that created the job.
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * Supported fields for risk analysis jobs:
-     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * The operator must be `=` or `!=`.
-     * Examples:
-     * * inspected_storage = cloud_storage AND state = done
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
-     * * end_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 1; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect jobs:
-     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - `trigger_name` - The name of the trigger that created the job.
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * Supported fields for risk analysis jobs:
-     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * The operator must be `=` or `!=`.
-     * Examples:
-     * * inspected_storage = cloud_storage AND state = done
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
-     * * end_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 1; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect jobs:
-     *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - `trigger_name` - The name of the trigger that created the job.
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * Supported fields for risk analysis jobs:
-     *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
-     *     - 'end_time` - Corresponds to the time the job finished.
-     *     - 'start_time` - Corresponds to the time the job finished.
-     * * The operator must be `=` or `!=`.
-     * Examples:
-     * * inspected_storage = cloud_storage AND state = done
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
-     * * end_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 1; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The standard list page size.
-     * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The standard list page size.
-     * 
- * - * int32 page_size = 2; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The standard list page size.
-     * 
- * - * int32 page_size = 2; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The standard list page token.
-     * 
- * - * string page_token = 3; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The standard list page token.
-     * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The standard list page token.
-     * 
- * - * string page_token = 3; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The standard list page token.
-     * 
- * - * string page_token = 3; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The standard list page token.
-     * 
- * - * string page_token = 3; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int type_ = 0; - /** - *
-     * The type of job. Defaults to `DlpJobType.INSPECT`
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 5; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The type of job. Defaults to `DlpJobType.INSPECT`
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 5; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of job. Defaults to `DlpJobType.INSPECT`
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 5; - * @return The type. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJobType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; - } - /** - *
-     * The type of job. Defaults to `DlpJobType.INSPECT`
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 5; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.privacy.dlp.v2.DlpJobType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The type of job. Defaults to `DlpJobType.INSPECT`
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 5; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, end_time asc, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the job was created.
-     * - `end_time`: corresponds to the time the job ended.
-     * - `name`: corresponds to the job's name.
-     * - `state`: corresponds to `state`
-     * 
- * - * string order_by = 6; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, end_time asc, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the job was created.
-     * - `end_time`: corresponds to the time the job ended.
-     * - `name`: corresponds to the job's name.
-     * - `state`: corresponds to `state`
-     * 
- * - * string order_by = 6; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, end_time asc, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the job was created.
-     * - `end_time`: corresponds to the time the job ended.
-     * - `name`: corresponds to the job's name.
-     * - `state`: corresponds to `state`
-     * 
- * - * string order_by = 6; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, end_time asc, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the job was created.
-     * - `end_time`: corresponds to the time the job ended.
-     * - `name`: corresponds to the job's name.
-     * - `state`: corresponds to `state`
-     * 
- * - * string order_by = 6; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, end_time asc, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the job was created.
-     * - `end_time`: corresponds to the time the job ended.
-     * - `name`: corresponds to the job's name.
-     * - `state`: corresponds to `state`
-     * 
- * - * string order_by = 6; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListDlpJobsRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListDlpJobsRequest) - private static final com.google.privacy.dlp.v2.ListDlpJobsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListDlpJobsRequest(); - } - - public static com.google.privacy.dlp.v2.ListDlpJobsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDlpJobsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDlpJobsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDlpJobsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java deleted file mode 100644 index 186ddb37d0a7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsRequestOrBuilder.java +++ /dev/null @@ -1,222 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListDlpJobsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListDlpJobsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Allows filtering.
-   * Supported syntax:
-   * * Filter expressions are made up of one or more restrictions.
-   * * Restrictions can be combined by `AND` or `OR` logical operators. A
-   * sequence of restrictions implicitly uses `AND`.
-   * * A restriction has the form of `{field} {operator} {value}`.
-   * * Supported fields/values for inspect jobs:
-   *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
-   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-   *     - `trigger_name` - The name of the trigger that created the job.
-   *     - 'end_time` - Corresponds to the time the job finished.
-   *     - 'start_time` - Corresponds to the time the job finished.
-   * * Supported fields for risk analysis jobs:
-   *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
-   *     - 'end_time` - Corresponds to the time the job finished.
-   *     - 'start_time` - Corresponds to the time the job finished.
-   * * The operator must be `=` or `!=`.
-   * Examples:
-   * * inspected_storage = cloud_storage AND state = done
-   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-   * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
-   * * end_time > \"2017-12-12T00:00:00+00:00\"
-   * The length of this field should be no more than 500 characters.
-   * 
- * - * string filter = 1; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * Allows filtering.
-   * Supported syntax:
-   * * Filter expressions are made up of one or more restrictions.
-   * * Restrictions can be combined by `AND` or `OR` logical operators. A
-   * sequence of restrictions implicitly uses `AND`.
-   * * A restriction has the form of `{field} {operator} {value}`.
-   * * Supported fields/values for inspect jobs:
-   *     - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
-   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-   *     - `trigger_name` - The name of the trigger that created the job.
-   *     - 'end_time` - Corresponds to the time the job finished.
-   *     - 'start_time` - Corresponds to the time the job finished.
-   * * Supported fields for risk analysis jobs:
-   *     - `state` - RUNNING|CANCELED|FINISHED|FAILED
-   *     - 'end_time` - Corresponds to the time the job finished.
-   *     - 'start_time` - Corresponds to the time the job finished.
-   * * The operator must be `=` or `!=`.
-   * Examples:
-   * * inspected_storage = cloud_storage AND state = done
-   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-   * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
-   * * end_time > \"2017-12-12T00:00:00+00:00\"
-   * The length of this field should be no more than 500 characters.
-   * 
- * - * string filter = 1; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * The standard list page size.
-   * 
- * - * int32 page_size = 2; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The standard list page token.
-   * 
- * - * string page_token = 3; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The standard list page token.
-   * 
- * - * string page_token = 3; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * The type of job. Defaults to `DlpJobType.INSPECT`
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 5; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The type of job. Defaults to `DlpJobType.INSPECT`
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 5; - * @return The type. - */ - com.google.privacy.dlp.v2.DlpJobType getType(); - - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc, end_time asc, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the job was created.
-   * - `end_time`: corresponds to the time the job ended.
-   * - `name`: corresponds to the job's name.
-   * - `state`: corresponds to `state`
-   * 
- * - * string order_by = 6; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc, end_time asc, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the job was created.
-   * - `end_time`: corresponds to the time the job ended.
-   * - `name`: corresponds to the job's name.
-   * - `state`: corresponds to `state`
-   * 
- * - * string order_by = 6; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponse.java deleted file mode 100644 index 170516607b1a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponse.java +++ /dev/null @@ -1,1038 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The response message for listing DLP jobs.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListDlpJobsResponse} - */ -public final class ListDlpJobsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListDlpJobsResponse) - ListDlpJobsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListDlpJobsResponse.newBuilder() to construct. - private ListDlpJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListDlpJobsResponse() { - jobs_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListDlpJobsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListDlpJobsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - jobs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - jobs_.add( - input.readMessage(com.google.privacy.dlp.v2.DlpJob.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - jobs_ = java.util.Collections.unmodifiableList(jobs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListDlpJobsResponse.class, com.google.privacy.dlp.v2.ListDlpJobsResponse.Builder.class); - } - - public static final int JOBS_FIELD_NUMBER = 1; - private java.util.List jobs_; - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - @java.lang.Override - public java.util.List getJobsList() { - return jobs_; - } - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - @java.lang.Override - public java.util.List - getJobsOrBuilderList() { - return jobs_; - } - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - @java.lang.Override - public int getJobsCount() { - return jobs_.size(); - } - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJob getJobs(int index) { - return jobs_.get(index); - } - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJobOrBuilder getJobsOrBuilder( - int index) { - return jobs_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * The standard List next-page token.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * The standard List next-page token.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < jobs_.size(); i++) { - output.writeMessage(1, jobs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < jobs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, jobs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListDlpJobsResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListDlpJobsResponse other = (com.google.privacy.dlp.v2.ListDlpJobsResponse) obj; - - if (!getJobsList() - .equals(other.getJobsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getJobsCount() > 0) { - hash = (37 * hash) + JOBS_FIELD_NUMBER; - hash = (53 * hash) + getJobsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListDlpJobsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListDlpJobsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The response message for listing DLP jobs.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListDlpJobsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListDlpJobsResponse) - com.google.privacy.dlp.v2.ListDlpJobsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListDlpJobsResponse.class, com.google.privacy.dlp.v2.ListDlpJobsResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListDlpJobsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getJobsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (jobsBuilder_ == null) { - jobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - jobsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDlpJobsResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListDlpJobsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDlpJobsResponse build() { - com.google.privacy.dlp.v2.ListDlpJobsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDlpJobsResponse buildPartial() { - com.google.privacy.dlp.v2.ListDlpJobsResponse result = new com.google.privacy.dlp.v2.ListDlpJobsResponse(this); - int from_bitField0_ = bitField0_; - if (jobsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - jobs_ = java.util.Collections.unmodifiableList(jobs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.jobs_ = jobs_; - } else { - result.jobs_ = jobsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListDlpJobsResponse) { - return mergeFrom((com.google.privacy.dlp.v2.ListDlpJobsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListDlpJobsResponse other) { - if (other == com.google.privacy.dlp.v2.ListDlpJobsResponse.getDefaultInstance()) return this; - if (jobsBuilder_ == null) { - if (!other.jobs_.isEmpty()) { - if (jobs_.isEmpty()) { - jobs_ = other.jobs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureJobsIsMutable(); - jobs_.addAll(other.jobs_); - } - onChanged(); - } - } else { - if (!other.jobs_.isEmpty()) { - if (jobsBuilder_.isEmpty()) { - jobsBuilder_.dispose(); - jobsBuilder_ = null; - jobs_ = other.jobs_; - bitField0_ = (bitField0_ & ~0x00000001); - jobsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getJobsFieldBuilder() : null; - } else { - jobsBuilder_.addAllMessages(other.jobs_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListDlpJobsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListDlpJobsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List jobs_ = - java.util.Collections.emptyList(); - private void ensureJobsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - jobs_ = new java.util.ArrayList(jobs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DlpJob, com.google.privacy.dlp.v2.DlpJob.Builder, com.google.privacy.dlp.v2.DlpJobOrBuilder> jobsBuilder_; - - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public java.util.List getJobsList() { - if (jobsBuilder_ == null) { - return java.util.Collections.unmodifiableList(jobs_); - } else { - return jobsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public int getJobsCount() { - if (jobsBuilder_ == null) { - return jobs_.size(); - } else { - return jobsBuilder_.getCount(); - } - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public com.google.privacy.dlp.v2.DlpJob getJobs(int index) { - if (jobsBuilder_ == null) { - return jobs_.get(index); - } else { - return jobsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public Builder setJobs( - int index, com.google.privacy.dlp.v2.DlpJob value) { - if (jobsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobsIsMutable(); - jobs_.set(index, value); - onChanged(); - } else { - jobsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public Builder setJobs( - int index, com.google.privacy.dlp.v2.DlpJob.Builder builderForValue) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.set(index, builderForValue.build()); - onChanged(); - } else { - jobsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public Builder addJobs(com.google.privacy.dlp.v2.DlpJob value) { - if (jobsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobsIsMutable(); - jobs_.add(value); - onChanged(); - } else { - jobsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public Builder addJobs( - int index, com.google.privacy.dlp.v2.DlpJob value) { - if (jobsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobsIsMutable(); - jobs_.add(index, value); - onChanged(); - } else { - jobsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public Builder addJobs( - com.google.privacy.dlp.v2.DlpJob.Builder builderForValue) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.add(builderForValue.build()); - onChanged(); - } else { - jobsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public Builder addJobs( - int index, com.google.privacy.dlp.v2.DlpJob.Builder builderForValue) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.add(index, builderForValue.build()); - onChanged(); - } else { - jobsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public Builder addAllJobs( - java.lang.Iterable values) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, jobs_); - onChanged(); - } else { - jobsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public Builder clearJobs() { - if (jobsBuilder_ == null) { - jobs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - jobsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public Builder removeJobs(int index) { - if (jobsBuilder_ == null) { - ensureJobsIsMutable(); - jobs_.remove(index); - onChanged(); - } else { - jobsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public com.google.privacy.dlp.v2.DlpJob.Builder getJobsBuilder( - int index) { - return getJobsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public com.google.privacy.dlp.v2.DlpJobOrBuilder getJobsOrBuilder( - int index) { - if (jobsBuilder_ == null) { - return jobs_.get(index); } else { - return jobsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public java.util.List - getJobsOrBuilderList() { - if (jobsBuilder_ != null) { - return jobsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(jobs_); - } - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public com.google.privacy.dlp.v2.DlpJob.Builder addJobsBuilder() { - return getJobsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.DlpJob.getDefaultInstance()); - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public com.google.privacy.dlp.v2.DlpJob.Builder addJobsBuilder( - int index) { - return getJobsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.DlpJob.getDefaultInstance()); - } - /** - *
-     * A list of DlpJobs that matches the specified filter in the request.
-     * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - public java.util.List - getJobsBuilderList() { - return getJobsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DlpJob, com.google.privacy.dlp.v2.DlpJob.Builder, com.google.privacy.dlp.v2.DlpJobOrBuilder> - getJobsFieldBuilder() { - if (jobsBuilder_ == null) { - jobsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.DlpJob, com.google.privacy.dlp.v2.DlpJob.Builder, com.google.privacy.dlp.v2.DlpJobOrBuilder>( - jobs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - jobs_ = null; - } - return jobsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * The standard List next-page token.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The standard List next-page token.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The standard List next-page token.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The standard List next-page token.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * The standard List next-page token.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListDlpJobsResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListDlpJobsResponse) - private static final com.google.privacy.dlp.v2.ListDlpJobsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListDlpJobsResponse(); - } - - public static com.google.privacy.dlp.v2.ListDlpJobsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDlpJobsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDlpJobsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListDlpJobsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponseOrBuilder.java deleted file mode 100644 index 6f4aa8cd6db2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListDlpJobsResponseOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListDlpJobsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListDlpJobsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - java.util.List - getJobsList(); - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - com.google.privacy.dlp.v2.DlpJob getJobs(int index); - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - int getJobsCount(); - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - java.util.List - getJobsOrBuilderList(); - /** - *
-   * A list of DlpJobs that matches the specified filter in the request.
-   * 
- * - * repeated .google.privacy.dlp.v2.DlpJob jobs = 1; - */ - com.google.privacy.dlp.v2.DlpJobOrBuilder getJobsOrBuilder( - int index); - - /** - *
-   * The standard List next-page token.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * The standard List next-page token.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java deleted file mode 100644 index 07eb287c26f0..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequest.java +++ /dev/null @@ -1,1128 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request for the list of infoTypes.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListInfoTypesRequest} - */ -public final class ListInfoTypesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListInfoTypesRequest) - ListInfoTypesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListInfoTypesRequest.newBuilder() to construct. - private ListInfoTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListInfoTypesRequest() { - parent_ = ""; - languageCode_ = ""; - filter_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListInfoTypesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListInfoTypesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListInfoTypesRequest.class, com.google.privacy.dlp.v2.ListInfoTypesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 4; - private volatile java.lang.Object parent_; - /** - *
-   * The parent resource name.
-   * The format of this value is as follows:
-   *     locations/<var>LOCATION_ID</var>
-   * 
- * - * string parent = 4; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The parent resource name.
-   * The format of this value is as follows:
-   *     locations/<var>LOCATION_ID</var>
-   * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 1; - private volatile java.lang.Object languageCode_; - /** - *
-   * BCP-47 language code for localized infoType friendly
-   * names. If omitted, or if localized strings are not available,
-   * en-US strings will be returned.
-   * 
- * - * string language_code = 1; - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } - } - /** - *
-   * BCP-47 language code for localized infoType friendly
-   * names. If omitted, or if localized strings are not available,
-   * en-US strings will be returned.
-   * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - private volatile java.lang.Object filter_; - /** - *
-   * filter to only return infoTypes supported by certain parts of the
-   * API. Defaults to supported_by=INSPECT.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * filter to only return infoTypes supported by certain parts of the
-   * API. Defaults to supported_by=INSPECT.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 3; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 3; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, locationId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parent_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, locationId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListInfoTypesRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListInfoTypesRequest other = (com.google.privacy.dlp.v2.ListInfoTypesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getLanguageCode() - .equals(other.getLanguageCode())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInfoTypesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListInfoTypesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request for the list of infoTypes.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListInfoTypesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListInfoTypesRequest) - com.google.privacy.dlp.v2.ListInfoTypesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListInfoTypesRequest.class, com.google.privacy.dlp.v2.ListInfoTypesRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListInfoTypesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - languageCode_ = ""; - - filter_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInfoTypesRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListInfoTypesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInfoTypesRequest build() { - com.google.privacy.dlp.v2.ListInfoTypesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInfoTypesRequest buildPartial() { - com.google.privacy.dlp.v2.ListInfoTypesRequest result = new com.google.privacy.dlp.v2.ListInfoTypesRequest(this); - result.parent_ = parent_; - result.languageCode_ = languageCode_; - result.filter_ = filter_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListInfoTypesRequest) { - return mergeFrom((com.google.privacy.dlp.v2.ListInfoTypesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListInfoTypesRequest other) { - if (other == com.google.privacy.dlp.v2.ListInfoTypesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListInfoTypesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListInfoTypesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * The parent resource name.
-     * The format of this value is as follows:
-     *     locations/<var>LOCATION_ID</var>
-     * 
- * - * string parent = 4; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The parent resource name.
-     * The format of this value is as follows:
-     *     locations/<var>LOCATION_ID</var>
-     * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The parent resource name.
-     * The format of this value is as follows:
-     *     locations/<var>LOCATION_ID</var>
-     * 
- * - * string parent = 4; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * The parent resource name.
-     * The format of this value is as follows:
-     *     locations/<var>LOCATION_ID</var>
-     * 
- * - * string parent = 4; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * The parent resource name.
-     * The format of this value is as follows:
-     *     locations/<var>LOCATION_ID</var>
-     * 
- * - * string parent = 4; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object languageCode_ = ""; - /** - *
-     * BCP-47 language code for localized infoType friendly
-     * names. If omitted, or if localized strings are not available,
-     * en-US strings will be returned.
-     * 
- * - * string language_code = 1; - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * BCP-47 language code for localized infoType friendly
-     * names. If omitted, or if localized strings are not available,
-     * en-US strings will be returned.
-     * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString - getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * BCP-47 language code for localized infoType friendly
-     * names. If omitted, or if localized strings are not available,
-     * en-US strings will be returned.
-     * 
- * - * string language_code = 1; - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - languageCode_ = value; - onChanged(); - return this; - } - /** - *
-     * BCP-47 language code for localized infoType friendly
-     * names. If omitted, or if localized strings are not available,
-     * en-US strings will be returned.
-     * 
- * - * string language_code = 1; - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - - languageCode_ = getDefaultInstance().getLanguageCode(); - onChanged(); - return this; - } - /** - *
-     * BCP-47 language code for localized infoType friendly
-     * names. If omitted, or if localized strings are not available,
-     * en-US strings will be returned.
-     * 
- * - * string language_code = 1; - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - languageCode_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * filter to only return infoTypes supported by certain parts of the
-     * API. Defaults to supported_by=INSPECT.
-     * 
- * - * string filter = 2; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * filter to only return infoTypes supported by certain parts of the
-     * API. Defaults to supported_by=INSPECT.
-     * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * filter to only return infoTypes supported by certain parts of the
-     * API. Defaults to supported_by=INSPECT.
-     * 
- * - * string filter = 2; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * filter to only return infoTypes supported by certain parts of the
-     * API. Defaults to supported_by=INSPECT.
-     * 
- * - * string filter = 2; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * filter to only return infoTypes supported by certain parts of the
-     * API. Defaults to supported_by=INSPECT.
-     * 
- * - * string filter = 2; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 3; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 3; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 3; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 3; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 3; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListInfoTypesRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListInfoTypesRequest) - private static final com.google.privacy.dlp.v2.ListInfoTypesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListInfoTypesRequest(); - } - - public static com.google.privacy.dlp.v2.ListInfoTypesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListInfoTypesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInfoTypesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInfoTypesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java deleted file mode 100644 index b070e59020d1..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesRequestOrBuilder.java +++ /dev/null @@ -1,99 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListInfoTypesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListInfoTypesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The parent resource name.
-   * The format of this value is as follows:
-   *     locations/<var>LOCATION_ID</var>
-   * 
- * - * string parent = 4; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The parent resource name.
-   * The format of this value is as follows:
-   *     locations/<var>LOCATION_ID</var>
-   * 
- * - * string parent = 4; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * BCP-47 language code for localized infoType friendly
-   * names. If omitted, or if localized strings are not available,
-   * en-US strings will be returned.
-   * 
- * - * string language_code = 1; - * @return The languageCode. - */ - java.lang.String getLanguageCode(); - /** - *
-   * BCP-47 language code for localized infoType friendly
-   * names. If omitted, or if localized strings are not available,
-   * en-US strings will be returned.
-   * 
- * - * string language_code = 1; - * @return The bytes for languageCode. - */ - com.google.protobuf.ByteString - getLanguageCodeBytes(); - - /** - *
-   * filter to only return infoTypes supported by certain parts of the
-   * API. Defaults to supported_by=INSPECT.
-   * 
- * - * string filter = 2; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * filter to only return infoTypes supported by certain parts of the
-   * API. Defaults to supported_by=INSPECT.
-   * 
- * - * string filter = 2; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 3; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 3; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponse.java deleted file mode 100644 index 5bcc92b0a8a9..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponse.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Response to the ListInfoTypes request.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListInfoTypesResponse} - */ -public final class ListInfoTypesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListInfoTypesResponse) - ListInfoTypesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListInfoTypesResponse.newBuilder() to construct. - private ListInfoTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListInfoTypesResponse() { - infoTypes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListInfoTypesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListInfoTypesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - infoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoTypeDescription.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListInfoTypesResponse.class, com.google.privacy.dlp.v2.ListInfoTypesResponse.Builder.class); - } - - public static final int INFO_TYPES_FIELD_NUMBER = 1; - private java.util.List infoTypes_; - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - @java.lang.Override - public java.util.List getInfoTypesList() { - return infoTypes_; - } - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - @java.lang.Override - public java.util.List - getInfoTypesOrBuilderList() { - return infoTypes_; - } - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - @java.lang.Override - public int getInfoTypesCount() { - return infoTypes_.size(); - } - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeDescription getInfoTypes(int index) { - return infoTypes_.get(index); - } - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder getInfoTypesOrBuilder( - int index) { - return infoTypes_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < infoTypes_.size(); i++) { - output.writeMessage(1, infoTypes_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < infoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, infoTypes_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListInfoTypesResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListInfoTypesResponse other = (com.google.privacy.dlp.v2.ListInfoTypesResponse) obj; - - if (!getInfoTypesList() - .equals(other.getInfoTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getInfoTypesCount() > 0) { - hash = (37 * hash) + INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getInfoTypesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInfoTypesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListInfoTypesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response to the ListInfoTypes request.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListInfoTypesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListInfoTypesResponse) - com.google.privacy.dlp.v2.ListInfoTypesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListInfoTypesResponse.class, com.google.privacy.dlp.v2.ListInfoTypesResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListInfoTypesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInfoTypesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - infoTypesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInfoTypesResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInfoTypesResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListInfoTypesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInfoTypesResponse build() { - com.google.privacy.dlp.v2.ListInfoTypesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInfoTypesResponse buildPartial() { - com.google.privacy.dlp.v2.ListInfoTypesResponse result = new com.google.privacy.dlp.v2.ListInfoTypesResponse(this); - int from_bitField0_ = bitField0_; - if (infoTypesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = java.util.Collections.unmodifiableList(infoTypes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.infoTypes_ = infoTypes_; - } else { - result.infoTypes_ = infoTypesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListInfoTypesResponse) { - return mergeFrom((com.google.privacy.dlp.v2.ListInfoTypesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListInfoTypesResponse other) { - if (other == com.google.privacy.dlp.v2.ListInfoTypesResponse.getDefaultInstance()) return this; - if (infoTypesBuilder_ == null) { - if (!other.infoTypes_.isEmpty()) { - if (infoTypes_.isEmpty()) { - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInfoTypesIsMutable(); - infoTypes_.addAll(other.infoTypes_); - } - onChanged(); - } - } else { - if (!other.infoTypes_.isEmpty()) { - if (infoTypesBuilder_.isEmpty()) { - infoTypesBuilder_.dispose(); - infoTypesBuilder_ = null; - infoTypes_ = other.infoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - infoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInfoTypesFieldBuilder() : null; - } else { - infoTypesBuilder_.addAllMessages(other.infoTypes_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListInfoTypesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListInfoTypesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List infoTypes_ = - java.util.Collections.emptyList(); - private void ensureInfoTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - infoTypes_ = new java.util.ArrayList(infoTypes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeDescription, com.google.privacy.dlp.v2.InfoTypeDescription.Builder, com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder> infoTypesBuilder_; - - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public java.util.List getInfoTypesList() { - if (infoTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(infoTypes_); - } else { - return infoTypesBuilder_.getMessageList(); - } - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public int getInfoTypesCount() { - if (infoTypesBuilder_ == null) { - return infoTypes_.size(); - } else { - return infoTypesBuilder_.getCount(); - } - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeDescription getInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); - } else { - return infoTypesBuilder_.getMessage(index); - } - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoTypeDescription value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.set(index, value); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public Builder setInfoTypes( - int index, com.google.privacy.dlp.v2.InfoTypeDescription.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoTypeDescription value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoTypeDescription value) { - if (infoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInfoTypesIsMutable(); - infoTypes_.add(index, value); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public Builder addInfoTypes( - com.google.privacy.dlp.v2.InfoTypeDescription.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public Builder addInfoTypes( - int index, com.google.privacy.dlp.v2.InfoTypeDescription.Builder builderForValue) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - infoTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public Builder addAllInfoTypes( - java.lang.Iterable values) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, infoTypes_); - onChanged(); - } else { - infoTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public Builder clearInfoTypes() { - if (infoTypesBuilder_ == null) { - infoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - infoTypesBuilder_.clear(); - } - return this; - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public Builder removeInfoTypes(int index) { - if (infoTypesBuilder_ == null) { - ensureInfoTypesIsMutable(); - infoTypes_.remove(index); - onChanged(); - } else { - infoTypesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeDescription.Builder getInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().getBuilder(index); - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder getInfoTypesOrBuilder( - int index) { - if (infoTypesBuilder_ == null) { - return infoTypes_.get(index); } else { - return infoTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public java.util.List - getInfoTypesOrBuilderList() { - if (infoTypesBuilder_ != null) { - return infoTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(infoTypes_); - } - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeDescription.Builder addInfoTypesBuilder() { - return getInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoTypeDescription.getDefaultInstance()); - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeDescription.Builder addInfoTypesBuilder( - int index) { - return getInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoTypeDescription.getDefaultInstance()); - } - /** - *
-     * Set of sensitive infoTypes.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - public java.util.List - getInfoTypesBuilderList() { - return getInfoTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeDescription, com.google.privacy.dlp.v2.InfoTypeDescription.Builder, com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder> - getInfoTypesFieldBuilder() { - if (infoTypesBuilder_ == null) { - infoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeDescription, com.google.privacy.dlp.v2.InfoTypeDescription.Builder, com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder>( - infoTypes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - infoTypes_ = null; - } - return infoTypesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListInfoTypesResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListInfoTypesResponse) - private static final com.google.privacy.dlp.v2.ListInfoTypesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListInfoTypesResponse(); - } - - public static com.google.privacy.dlp.v2.ListInfoTypesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListInfoTypesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInfoTypesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInfoTypesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponseOrBuilder.java deleted file mode 100644 index c3217bec954a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInfoTypesResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListInfoTypesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListInfoTypesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - java.util.List - getInfoTypesList(); - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - com.google.privacy.dlp.v2.InfoTypeDescription getInfoTypes(int index); - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - int getInfoTypesCount(); - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - java.util.List - getInfoTypesOrBuilderList(); - /** - *
-   * Set of sensitive infoTypes.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeDescription info_types = 1; - */ - com.google.privacy.dlp.v2.InfoTypeDescriptionOrBuilder getInfoTypesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java deleted file mode 100644 index 121bf522ef24..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequest.java +++ /dev/null @@ -1,1352 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for ListInspectTemplates.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListInspectTemplatesRequest} - */ -public final class ListInspectTemplatesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListInspectTemplatesRequest) - ListInspectTemplatesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListInspectTemplatesRequest.newBuilder() to construct. - private ListInspectTemplatesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListInspectTemplatesRequest() { - parent_ = ""; - pageToken_ = ""; - orderBy_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListInspectTemplatesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListInspectTemplatesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 24: { - - pageSize_ = input.readInt32(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListInspectTemplatesRequest.class, com.google.privacy.dlp.v2.ListInspectTemplatesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object pageToken_; - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListInspectTemplates`.
-   * 
- * - * string page_token = 2; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListInspectTemplates`.
-   * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_; - /** - *
-   * Size of the page, can be limited by the server. If zero server returns
-   * a page of max size 100.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int ORDER_BY_FIELD_NUMBER = 4; - private volatile java.lang.Object orderBy_; - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the template was created.
-   * - `update_time`: corresponds to the time the template was last updated.
-   * - `name`: corresponds to the template's name.
-   * - `display_name`: corresponds to the template's display name.
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the template was created.
-   * - `update_time`: corresponds to the time the template was last updated.
-   * - `name`: corresponds to the template's name.
-   * - `display_name`: corresponds to the template's display name.
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListInspectTemplatesRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListInspectTemplatesRequest other = (com.google.privacy.dlp.v2.ListInspectTemplatesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListInspectTemplatesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListInspectTemplates.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListInspectTemplatesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListInspectTemplatesRequest) - com.google.privacy.dlp.v2.ListInspectTemplatesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListInspectTemplatesRequest.class, com.google.privacy.dlp.v2.ListInspectTemplatesRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListInspectTemplatesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageToken_ = ""; - - pageSize_ = 0; - - orderBy_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInspectTemplatesRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListInspectTemplatesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInspectTemplatesRequest build() { - com.google.privacy.dlp.v2.ListInspectTemplatesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInspectTemplatesRequest buildPartial() { - com.google.privacy.dlp.v2.ListInspectTemplatesRequest result = new com.google.privacy.dlp.v2.ListInspectTemplatesRequest(this); - result.parent_ = parent_; - result.pageToken_ = pageToken_; - result.pageSize_ = pageSize_; - result.orderBy_ = orderBy_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListInspectTemplatesRequest) { - return mergeFrom((com.google.privacy.dlp.v2.ListInspectTemplatesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListInspectTemplatesRequest other) { - if (other == com.google.privacy.dlp.v2.ListInspectTemplatesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListInspectTemplatesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListInspectTemplatesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * + Organizations scope, location specified:<br/>
-     *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Organizations scope, no location specified (defaults to global):<br/>
-     *   `organizations/`<var>ORG_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListInspectTemplates`.
-     * 
- * - * string page_token = 2; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListInspectTemplates`.
-     * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListInspectTemplates`.
-     * 
- * - * string page_token = 2; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListInspectTemplates`.
-     * 
- * - * string page_token = 2; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListInspectTemplates`.
-     * 
- * - * string page_token = 2; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Size of the page, can be limited by the server. If zero server returns
-     * a page of max size 100.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Size of the page, can be limited by the server. If zero server returns
-     * a page of max size 100.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Size of the page, can be limited by the server. If zero server returns
-     * a page of max size 100.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the template was created.
-     * - `update_time`: corresponds to the time the template was last updated.
-     * - `name`: corresponds to the template's name.
-     * - `display_name`: corresponds to the template's display name.
-     * 
- * - * string order_by = 4; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListInspectTemplatesRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListInspectTemplatesRequest) - private static final com.google.privacy.dlp.v2.ListInspectTemplatesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListInspectTemplatesRequest(); - } - - public static com.google.privacy.dlp.v2.ListInspectTemplatesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListInspectTemplatesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInspectTemplatesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInspectTemplatesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java deleted file mode 100644 index b7710cc685c2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesRequestOrBuilder.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListInspectTemplatesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListInspectTemplatesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * + Organizations scope, location specified:<br/>
-   *   `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Organizations scope, no location specified (defaults to global):<br/>
-   *   `organizations/`<var>ORG_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListInspectTemplates`.
-   * 
- * - * string page_token = 2; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListInspectTemplates`.
-   * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Size of the page, can be limited by the server. If zero server returns
-   * a page of max size 100.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the template was created.
-   * - `update_time`: corresponds to the time the template was last updated.
-   * - `name`: corresponds to the template's name.
-   * - `display_name`: corresponds to the template's display name.
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the template was created.
-   * - `update_time`: corresponds to the time the template was last updated.
-   * - `name`: corresponds to the template's name.
-   * - `display_name`: corresponds to the template's display name.
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponse.java deleted file mode 100644 index 28bccc1260ab..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Response message for ListInspectTemplates.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListInspectTemplatesResponse} - */ -public final class ListInspectTemplatesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListInspectTemplatesResponse) - ListInspectTemplatesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListInspectTemplatesResponse.newBuilder() to construct. - private ListInspectTemplatesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListInspectTemplatesResponse() { - inspectTemplates_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListInspectTemplatesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListInspectTemplatesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - inspectTemplates_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - inspectTemplates_.add( - input.readMessage(com.google.privacy.dlp.v2.InspectTemplate.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - inspectTemplates_ = java.util.Collections.unmodifiableList(inspectTemplates_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListInspectTemplatesResponse.class, com.google.privacy.dlp.v2.ListInspectTemplatesResponse.Builder.class); - } - - public static final int INSPECT_TEMPLATES_FIELD_NUMBER = 1; - private java.util.List inspectTemplates_; - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - @java.lang.Override - public java.util.List getInspectTemplatesList() { - return inspectTemplates_; - } - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - @java.lang.Override - public java.util.List - getInspectTemplatesOrBuilderList() { - return inspectTemplates_; - } - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - @java.lang.Override - public int getInspectTemplatesCount() { - return inspectTemplates_.size(); - } - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplates(int index) { - return inspectTemplates_.get(index); - } - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplatesOrBuilder( - int index) { - return inspectTemplates_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListInspectTemplates request.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListInspectTemplates request.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < inspectTemplates_.size(); i++) { - output.writeMessage(1, inspectTemplates_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < inspectTemplates_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, inspectTemplates_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListInspectTemplatesResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListInspectTemplatesResponse other = (com.google.privacy.dlp.v2.ListInspectTemplatesResponse) obj; - - if (!getInspectTemplatesList() - .equals(other.getInspectTemplatesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getInspectTemplatesCount() > 0) { - hash = (37 * hash) + INSPECT_TEMPLATES_FIELD_NUMBER; - hash = (53 * hash) + getInspectTemplatesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListInspectTemplatesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListInspectTemplates.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListInspectTemplatesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListInspectTemplatesResponse) - com.google.privacy.dlp.v2.ListInspectTemplatesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListInspectTemplatesResponse.class, com.google.privacy.dlp.v2.ListInspectTemplatesResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListInspectTemplatesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getInspectTemplatesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (inspectTemplatesBuilder_ == null) { - inspectTemplates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - inspectTemplatesBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInspectTemplatesResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListInspectTemplatesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInspectTemplatesResponse build() { - com.google.privacy.dlp.v2.ListInspectTemplatesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInspectTemplatesResponse buildPartial() { - com.google.privacy.dlp.v2.ListInspectTemplatesResponse result = new com.google.privacy.dlp.v2.ListInspectTemplatesResponse(this); - int from_bitField0_ = bitField0_; - if (inspectTemplatesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - inspectTemplates_ = java.util.Collections.unmodifiableList(inspectTemplates_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.inspectTemplates_ = inspectTemplates_; - } else { - result.inspectTemplates_ = inspectTemplatesBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListInspectTemplatesResponse) { - return mergeFrom((com.google.privacy.dlp.v2.ListInspectTemplatesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListInspectTemplatesResponse other) { - if (other == com.google.privacy.dlp.v2.ListInspectTemplatesResponse.getDefaultInstance()) return this; - if (inspectTemplatesBuilder_ == null) { - if (!other.inspectTemplates_.isEmpty()) { - if (inspectTemplates_.isEmpty()) { - inspectTemplates_ = other.inspectTemplates_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInspectTemplatesIsMutable(); - inspectTemplates_.addAll(other.inspectTemplates_); - } - onChanged(); - } - } else { - if (!other.inspectTemplates_.isEmpty()) { - if (inspectTemplatesBuilder_.isEmpty()) { - inspectTemplatesBuilder_.dispose(); - inspectTemplatesBuilder_ = null; - inspectTemplates_ = other.inspectTemplates_; - bitField0_ = (bitField0_ & ~0x00000001); - inspectTemplatesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInspectTemplatesFieldBuilder() : null; - } else { - inspectTemplatesBuilder_.addAllMessages(other.inspectTemplates_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListInspectTemplatesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListInspectTemplatesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List inspectTemplates_ = - java.util.Collections.emptyList(); - private void ensureInspectTemplatesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - inspectTemplates_ = new java.util.ArrayList(inspectTemplates_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> inspectTemplatesBuilder_; - - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public java.util.List getInspectTemplatesList() { - if (inspectTemplatesBuilder_ == null) { - return java.util.Collections.unmodifiableList(inspectTemplates_); - } else { - return inspectTemplatesBuilder_.getMessageList(); - } - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public int getInspectTemplatesCount() { - if (inspectTemplatesBuilder_ == null) { - return inspectTemplates_.size(); - } else { - return inspectTemplatesBuilder_.getCount(); - } - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplates(int index) { - if (inspectTemplatesBuilder_ == null) { - return inspectTemplates_.get(index); - } else { - return inspectTemplatesBuilder_.getMessage(index); - } - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public Builder setInspectTemplates( - int index, com.google.privacy.dlp.v2.InspectTemplate value) { - if (inspectTemplatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInspectTemplatesIsMutable(); - inspectTemplates_.set(index, value); - onChanged(); - } else { - inspectTemplatesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public Builder setInspectTemplates( - int index, com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { - if (inspectTemplatesBuilder_ == null) { - ensureInspectTemplatesIsMutable(); - inspectTemplates_.set(index, builderForValue.build()); - onChanged(); - } else { - inspectTemplatesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public Builder addInspectTemplates(com.google.privacy.dlp.v2.InspectTemplate value) { - if (inspectTemplatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInspectTemplatesIsMutable(); - inspectTemplates_.add(value); - onChanged(); - } else { - inspectTemplatesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public Builder addInspectTemplates( - int index, com.google.privacy.dlp.v2.InspectTemplate value) { - if (inspectTemplatesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInspectTemplatesIsMutable(); - inspectTemplates_.add(index, value); - onChanged(); - } else { - inspectTemplatesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public Builder addInspectTemplates( - com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { - if (inspectTemplatesBuilder_ == null) { - ensureInspectTemplatesIsMutable(); - inspectTemplates_.add(builderForValue.build()); - onChanged(); - } else { - inspectTemplatesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public Builder addInspectTemplates( - int index, com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { - if (inspectTemplatesBuilder_ == null) { - ensureInspectTemplatesIsMutable(); - inspectTemplates_.add(index, builderForValue.build()); - onChanged(); - } else { - inspectTemplatesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public Builder addAllInspectTemplates( - java.lang.Iterable values) { - if (inspectTemplatesBuilder_ == null) { - ensureInspectTemplatesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, inspectTemplates_); - onChanged(); - } else { - inspectTemplatesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public Builder clearInspectTemplates() { - if (inspectTemplatesBuilder_ == null) { - inspectTemplates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - inspectTemplatesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public Builder removeInspectTemplates(int index) { - if (inspectTemplatesBuilder_ == null) { - ensureInspectTemplatesIsMutable(); - inspectTemplates_.remove(index); - onChanged(); - } else { - inspectTemplatesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public com.google.privacy.dlp.v2.InspectTemplate.Builder getInspectTemplatesBuilder( - int index) { - return getInspectTemplatesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplatesOrBuilder( - int index) { - if (inspectTemplatesBuilder_ == null) { - return inspectTemplates_.get(index); } else { - return inspectTemplatesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public java.util.List - getInspectTemplatesOrBuilderList() { - if (inspectTemplatesBuilder_ != null) { - return inspectTemplatesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(inspectTemplates_); - } - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public com.google.privacy.dlp.v2.InspectTemplate.Builder addInspectTemplatesBuilder() { - return getInspectTemplatesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance()); - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public com.google.privacy.dlp.v2.InspectTemplate.Builder addInspectTemplatesBuilder( - int index) { - return getInspectTemplatesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance()); - } - /** - *
-     * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - public java.util.List - getInspectTemplatesBuilderList() { - return getInspectTemplatesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> - getInspectTemplatesFieldBuilder() { - if (inspectTemplatesBuilder_ == null) { - inspectTemplatesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder>( - inspectTemplates_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - inspectTemplates_ = null; - } - return inspectTemplatesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListInspectTemplates request.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListInspectTemplates request.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListInspectTemplates request.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListInspectTemplates request.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListInspectTemplates request.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListInspectTemplatesResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListInspectTemplatesResponse) - private static final com.google.privacy.dlp.v2.ListInspectTemplatesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListInspectTemplatesResponse(); - } - - public static com.google.privacy.dlp.v2.ListInspectTemplatesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListInspectTemplatesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInspectTemplatesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListInspectTemplatesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponseOrBuilder.java deleted file mode 100644 index b659793b05ba..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListInspectTemplatesResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListInspectTemplatesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListInspectTemplatesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - java.util.List - getInspectTemplatesList(); - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - com.google.privacy.dlp.v2.InspectTemplate getInspectTemplates(int index); - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - int getInspectTemplatesCount(); - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - java.util.List - getInspectTemplatesOrBuilderList(); - /** - *
-   * List of inspectTemplates, up to page_size in ListInspectTemplatesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.InspectTemplate inspect_templates = 1; - */ - com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplatesOrBuilder( - int index); - - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListInspectTemplates request.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListInspectTemplates request.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java deleted file mode 100644 index 7498690bdd38..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java +++ /dev/null @@ -1,1757 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for ListJobTriggers.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListJobTriggersRequest} - */ -public final class ListJobTriggersRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListJobTriggersRequest) - ListJobTriggersRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListJobTriggersRequest.newBuilder() to construct. - private ListJobTriggersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListJobTriggersRequest() { - parent_ = ""; - pageToken_ = ""; - orderBy_ = ""; - filter_ = ""; - type_ = 0; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListJobTriggersRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListJobTriggersRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 24: { - - pageSize_ = input.readInt32(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 48: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListJobTriggersRequest.class, com.google.privacy.dlp.v2.ListJobTriggersRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object pageToken_; - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to ListJobTriggers. `order_by` field must not
-   * change for subsequent calls.
-   * 
- * - * string page_token = 2; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to ListJobTriggers. `order_by` field must not
-   * change for subsequent calls.
-   * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_; - /** - *
-   * Size of the page, can be limited by a server.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int ORDER_BY_FIELD_NUMBER = 4; - private volatile java.lang.Object orderBy_; - /** - *
-   * Comma separated list of triggeredJob fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the JobTrigger was created.
-   * - `update_time`: corresponds to the time the JobTrigger was last updated.
-   * - `last_run_time`: corresponds to the last time the JobTrigger ran.
-   * - `name`: corresponds to the JobTrigger's name.
-   * - `display_name`: corresponds to the JobTrigger's display name.
-   * - `status`: corresponds to JobTrigger's status.
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Comma separated list of triggeredJob fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the JobTrigger was created.
-   * - `update_time`: corresponds to the time the JobTrigger was last updated.
-   * - `last_run_time`: corresponds to the last time the JobTrigger ran.
-   * - `name`: corresponds to the JobTrigger's name.
-   * - `display_name`: corresponds to the JobTrigger's display name.
-   * - `status`: corresponds to JobTrigger's status.
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 5; - private volatile java.lang.Object filter_; - /** - *
-   * Allows filtering.
-   * Supported syntax:
-   * * Filter expressions are made up of one or more restrictions.
-   * * Restrictions can be combined by `AND` or `OR` logical operators. A
-   * sequence of restrictions implicitly uses `AND`.
-   * * A restriction has the form of `{field} {operator} {value}`.
-   * * Supported fields/values for inspect triggers:
-   *     - `status` - HEALTHY|PAUSED|CANCELLED
-   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-   *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
-   *     quotation marks. Nanoseconds are ignored.
-   *     - 'error_count' - Number of errors that have occurred while running.
-   * * The operator must be `=` or `!=` for status and inspected_storage.
-   * Examples:
-   * * inspected_storage = cloud_storage AND status = HEALTHY
-   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-   * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
-   * * last_run_time > \"2017-12-12T00:00:00+00:00\"
-   * The length of this field should be no more than 500 characters.
-   * 
- * - * string filter = 5; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * Allows filtering.
-   * Supported syntax:
-   * * Filter expressions are made up of one or more restrictions.
-   * * Restrictions can be combined by `AND` or `OR` logical operators. A
-   * sequence of restrictions implicitly uses `AND`.
-   * * A restriction has the form of `{field} {operator} {value}`.
-   * * Supported fields/values for inspect triggers:
-   *     - `status` - HEALTHY|PAUSED|CANCELLED
-   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-   *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
-   *     quotation marks. Nanoseconds are ignored.
-   *     - 'error_count' - Number of errors that have occurred while running.
-   * * The operator must be `=` or `!=` for status and inspected_storage.
-   * Examples:
-   * * inspected_storage = cloud_storage AND status = HEALTHY
-   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-   * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
-   * * last_run_time > \"2017-12-12T00:00:00+00:00\"
-   * The length of this field should be no more than 500 characters.
-   * 
- * - * string filter = 5; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 6; - private int type_; - /** - *
-   * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 6; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 6; - * @return The type. - */ - @java.lang.Override public com.google.privacy.dlp.v2.DlpJobType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; - } - - public static final int LOCATION_ID_FIELD_NUMBER = 7; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); - } - if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(6, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); - } - if (type_ != com.google.privacy.dlp.v2.DlpJobType.DLP_JOB_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(6, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListJobTriggersRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListJobTriggersRequest other = (com.google.privacy.dlp.v2.ListJobTriggersRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (type_ != other.type_) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListJobTriggersRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListJobTriggersRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListJobTriggers.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListJobTriggersRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListJobTriggersRequest) - com.google.privacy.dlp.v2.ListJobTriggersRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListJobTriggersRequest.class, com.google.privacy.dlp.v2.ListJobTriggersRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListJobTriggersRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageToken_ = ""; - - pageSize_ = 0; - - orderBy_ = ""; - - filter_ = ""; - - type_ = 0; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListJobTriggersRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListJobTriggersRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListJobTriggersRequest build() { - com.google.privacy.dlp.v2.ListJobTriggersRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListJobTriggersRequest buildPartial() { - com.google.privacy.dlp.v2.ListJobTriggersRequest result = new com.google.privacy.dlp.v2.ListJobTriggersRequest(this); - result.parent_ = parent_; - result.pageToken_ = pageToken_; - result.pageSize_ = pageSize_; - result.orderBy_ = orderBy_; - result.filter_ = filter_; - result.type_ = type_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListJobTriggersRequest) { - return mergeFrom((com.google.privacy.dlp.v2.ListJobTriggersRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListJobTriggersRequest other) { - if (other == com.google.privacy.dlp.v2.ListJobTriggersRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListJobTriggersRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListJobTriggersRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` field must not
-     * change for subsequent calls.
-     * 
- * - * string page_token = 2; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` field must not
-     * change for subsequent calls.
-     * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` field must not
-     * change for subsequent calls.
-     * 
- * - * string page_token = 2; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` field must not
-     * change for subsequent calls.
-     * 
- * - * string page_token = 2; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` field must not
-     * change for subsequent calls.
-     * 
- * - * string page_token = 2; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Size of the page, can be limited by a server.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Size of the page, can be limited by a server.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Size of the page, can be limited by a server.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Comma separated list of triggeredJob fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the JobTrigger was created.
-     * - `update_time`: corresponds to the time the JobTrigger was last updated.
-     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
-     * - `name`: corresponds to the JobTrigger's name.
-     * - `display_name`: corresponds to the JobTrigger's display name.
-     * - `status`: corresponds to JobTrigger's status.
-     * 
- * - * string order_by = 4; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Comma separated list of triggeredJob fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the JobTrigger was created.
-     * - `update_time`: corresponds to the time the JobTrigger was last updated.
-     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
-     * - `name`: corresponds to the JobTrigger's name.
-     * - `display_name`: corresponds to the JobTrigger's display name.
-     * - `status`: corresponds to JobTrigger's status.
-     * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Comma separated list of triggeredJob fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the JobTrigger was created.
-     * - `update_time`: corresponds to the time the JobTrigger was last updated.
-     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
-     * - `name`: corresponds to the JobTrigger's name.
-     * - `display_name`: corresponds to the JobTrigger's display name.
-     * - `status`: corresponds to JobTrigger's status.
-     * 
- * - * string order_by = 4; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Comma separated list of triggeredJob fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the JobTrigger was created.
-     * - `update_time`: corresponds to the time the JobTrigger was last updated.
-     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
-     * - `name`: corresponds to the JobTrigger's name.
-     * - `display_name`: corresponds to the JobTrigger's display name.
-     * - `status`: corresponds to JobTrigger's status.
-     * 
- * - * string order_by = 4; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Comma separated list of triggeredJob fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc,update_time, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the JobTrigger was created.
-     * - `update_time`: corresponds to the time the JobTrigger was last updated.
-     * - `last_run_time`: corresponds to the last time the JobTrigger ran.
-     * - `name`: corresponds to the JobTrigger's name.
-     * - `display_name`: corresponds to the JobTrigger's display name.
-     * - `status`: corresponds to JobTrigger's status.
-     * 
- * - * string order_by = 4; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect triggers:
-     *     - `status` - HEALTHY|PAUSED|CANCELLED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
-     *     quotation marks. Nanoseconds are ignored.
-     *     - 'error_count' - Number of errors that have occurred while running.
-     * * The operator must be `=` or `!=` for status and inspected_storage.
-     * Examples:
-     * * inspected_storage = cloud_storage AND status = HEALTHY
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
-     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 5; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect triggers:
-     *     - `status` - HEALTHY|PAUSED|CANCELLED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
-     *     quotation marks. Nanoseconds are ignored.
-     *     - 'error_count' - Number of errors that have occurred while running.
-     * * The operator must be `=` or `!=` for status and inspected_storage.
-     * Examples:
-     * * inspected_storage = cloud_storage AND status = HEALTHY
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
-     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 5; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect triggers:
-     *     - `status` - HEALTHY|PAUSED|CANCELLED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
-     *     quotation marks. Nanoseconds are ignored.
-     *     - 'error_count' - Number of errors that have occurred while running.
-     * * The operator must be `=` or `!=` for status and inspected_storage.
-     * Examples:
-     * * inspected_storage = cloud_storage AND status = HEALTHY
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
-     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 5; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect triggers:
-     *     - `status` - HEALTHY|PAUSED|CANCELLED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
-     *     quotation marks. Nanoseconds are ignored.
-     *     - 'error_count' - Number of errors that have occurred while running.
-     * * The operator must be `=` or `!=` for status and inspected_storage.
-     * Examples:
-     * * inspected_storage = cloud_storage AND status = HEALTHY
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
-     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 5; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * Allows filtering.
-     * Supported syntax:
-     * * Filter expressions are made up of one or more restrictions.
-     * * Restrictions can be combined by `AND` or `OR` logical operators. A
-     * sequence of restrictions implicitly uses `AND`.
-     * * A restriction has the form of `{field} {operator} {value}`.
-     * * Supported fields/values for inspect triggers:
-     *     - `status` - HEALTHY|PAUSED|CANCELLED
-     *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-     *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
-     *     quotation marks. Nanoseconds are ignored.
-     *     - 'error_count' - Number of errors that have occurred while running.
-     * * The operator must be `=` or `!=` for status and inspected_storage.
-     * Examples:
-     * * inspected_storage = cloud_storage AND status = HEALTHY
-     * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-     * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
-     * * last_run_time > \"2017-12-12T00:00:00+00:00\"
-     * The length of this field should be no more than 500 characters.
-     * 
- * - * string filter = 5; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private int type_ = 0; - /** - *
-     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 6; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 6; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 6; - * @return The type. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DlpJobType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.DlpJobType result = com.google.privacy.dlp.v2.DlpJobType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.DlpJobType.UNRECOGNIZED : result; - } - /** - *
-     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 6; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.privacy.dlp.v2.DlpJobType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
-     * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 6; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListJobTriggersRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListJobTriggersRequest) - private static final com.google.privacy.dlp.v2.ListJobTriggersRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListJobTriggersRequest(); - } - - public static com.google.privacy.dlp.v2.ListJobTriggersRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListJobTriggersRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListJobTriggersRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListJobTriggersRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java deleted file mode 100644 index e0bdcb976097..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java +++ /dev/null @@ -1,222 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListJobTriggersRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListJobTriggersRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to ListJobTriggers. `order_by` field must not
-   * change for subsequent calls.
-   * 
- * - * string page_token = 2; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to ListJobTriggers. `order_by` field must not
-   * change for subsequent calls.
-   * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Size of the page, can be limited by a server.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Comma separated list of triggeredJob fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the JobTrigger was created.
-   * - `update_time`: corresponds to the time the JobTrigger was last updated.
-   * - `last_run_time`: corresponds to the last time the JobTrigger ran.
-   * - `name`: corresponds to the JobTrigger's name.
-   * - `display_name`: corresponds to the JobTrigger's display name.
-   * - `status`: corresponds to JobTrigger's status.
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Comma separated list of triggeredJob fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc,update_time, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the JobTrigger was created.
-   * - `update_time`: corresponds to the time the JobTrigger was last updated.
-   * - `last_run_time`: corresponds to the last time the JobTrigger ran.
-   * - `name`: corresponds to the JobTrigger's name.
-   * - `display_name`: corresponds to the JobTrigger's display name.
-   * - `status`: corresponds to JobTrigger's status.
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * Allows filtering.
-   * Supported syntax:
-   * * Filter expressions are made up of one or more restrictions.
-   * * Restrictions can be combined by `AND` or `OR` logical operators. A
-   * sequence of restrictions implicitly uses `AND`.
-   * * A restriction has the form of `{field} {operator} {value}`.
-   * * Supported fields/values for inspect triggers:
-   *     - `status` - HEALTHY|PAUSED|CANCELLED
-   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-   *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
-   *     quotation marks. Nanoseconds are ignored.
-   *     - 'error_count' - Number of errors that have occurred while running.
-   * * The operator must be `=` or `!=` for status and inspected_storage.
-   * Examples:
-   * * inspected_storage = cloud_storage AND status = HEALTHY
-   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-   * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
-   * * last_run_time > \"2017-12-12T00:00:00+00:00\"
-   * The length of this field should be no more than 500 characters.
-   * 
- * - * string filter = 5; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * Allows filtering.
-   * Supported syntax:
-   * * Filter expressions are made up of one or more restrictions.
-   * * Restrictions can be combined by `AND` or `OR` logical operators. A
-   * sequence of restrictions implicitly uses `AND`.
-   * * A restriction has the form of `{field} {operator} {value}`.
-   * * Supported fields/values for inspect triggers:
-   *     - `status` - HEALTHY|PAUSED|CANCELLED
-   *     - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
-   *     - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
-   *     quotation marks. Nanoseconds are ignored.
-   *     - 'error_count' - Number of errors that have occurred while running.
-   * * The operator must be `=` or `!=` for status and inspected_storage.
-   * Examples:
-   * * inspected_storage = cloud_storage AND status = HEALTHY
-   * * inspected_storage = cloud_storage OR inspected_storage = bigquery
-   * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
-   * * last_run_time > \"2017-12-12T00:00:00+00:00\"
-   * The length of this field should be no more than 500 characters.
-   * 
- * - * string filter = 5; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 6; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
-   * 
- * - * .google.privacy.dlp.v2.DlpJobType type = 6; - * @return The type. - */ - com.google.privacy.dlp.v2.DlpJobType getType(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponse.java deleted file mode 100644 index 84ef275a81ed..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Response message for ListJobTriggers.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListJobTriggersResponse} - */ -public final class ListJobTriggersResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListJobTriggersResponse) - ListJobTriggersResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListJobTriggersResponse.newBuilder() to construct. - private ListJobTriggersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListJobTriggersResponse() { - jobTriggers_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListJobTriggersResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListJobTriggersResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - jobTriggers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - jobTriggers_.add( - input.readMessage(com.google.privacy.dlp.v2.JobTrigger.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - jobTriggers_ = java.util.Collections.unmodifiableList(jobTriggers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListJobTriggersResponse.class, com.google.privacy.dlp.v2.ListJobTriggersResponse.Builder.class); - } - - public static final int JOB_TRIGGERS_FIELD_NUMBER = 1; - private java.util.List jobTriggers_; - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - @java.lang.Override - public java.util.List getJobTriggersList() { - return jobTriggers_; - } - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - @java.lang.Override - public java.util.List - getJobTriggersOrBuilderList() { - return jobTriggers_; - } - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - @java.lang.Override - public int getJobTriggersCount() { - return jobTriggers_.size(); - } - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger getJobTriggers(int index) { - return jobTriggers_.get(index); - } - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggersOrBuilder( - int index) { - return jobTriggers_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListJobTriggers request.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListJobTriggers request.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < jobTriggers_.size(); i++) { - output.writeMessage(1, jobTriggers_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < jobTriggers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, jobTriggers_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListJobTriggersResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListJobTriggersResponse other = (com.google.privacy.dlp.v2.ListJobTriggersResponse) obj; - - if (!getJobTriggersList() - .equals(other.getJobTriggersList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getJobTriggersCount() > 0) { - hash = (37 * hash) + JOB_TRIGGERS_FIELD_NUMBER; - hash = (53 * hash) + getJobTriggersList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListJobTriggersResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListJobTriggersResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListJobTriggers.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListJobTriggersResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListJobTriggersResponse) - com.google.privacy.dlp.v2.ListJobTriggersResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListJobTriggersResponse.class, com.google.privacy.dlp.v2.ListJobTriggersResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListJobTriggersResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getJobTriggersFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (jobTriggersBuilder_ == null) { - jobTriggers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - jobTriggersBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListJobTriggersResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListJobTriggersResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListJobTriggersResponse build() { - com.google.privacy.dlp.v2.ListJobTriggersResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListJobTriggersResponse buildPartial() { - com.google.privacy.dlp.v2.ListJobTriggersResponse result = new com.google.privacy.dlp.v2.ListJobTriggersResponse(this); - int from_bitField0_ = bitField0_; - if (jobTriggersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - jobTriggers_ = java.util.Collections.unmodifiableList(jobTriggers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.jobTriggers_ = jobTriggers_; - } else { - result.jobTriggers_ = jobTriggersBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListJobTriggersResponse) { - return mergeFrom((com.google.privacy.dlp.v2.ListJobTriggersResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListJobTriggersResponse other) { - if (other == com.google.privacy.dlp.v2.ListJobTriggersResponse.getDefaultInstance()) return this; - if (jobTriggersBuilder_ == null) { - if (!other.jobTriggers_.isEmpty()) { - if (jobTriggers_.isEmpty()) { - jobTriggers_ = other.jobTriggers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureJobTriggersIsMutable(); - jobTriggers_.addAll(other.jobTriggers_); - } - onChanged(); - } - } else { - if (!other.jobTriggers_.isEmpty()) { - if (jobTriggersBuilder_.isEmpty()) { - jobTriggersBuilder_.dispose(); - jobTriggersBuilder_ = null; - jobTriggers_ = other.jobTriggers_; - bitField0_ = (bitField0_ & ~0x00000001); - jobTriggersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getJobTriggersFieldBuilder() : null; - } else { - jobTriggersBuilder_.addAllMessages(other.jobTriggers_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListJobTriggersResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListJobTriggersResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List jobTriggers_ = - java.util.Collections.emptyList(); - private void ensureJobTriggersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - jobTriggers_ = new java.util.ArrayList(jobTriggers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> jobTriggersBuilder_; - - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public java.util.List getJobTriggersList() { - if (jobTriggersBuilder_ == null) { - return java.util.Collections.unmodifiableList(jobTriggers_); - } else { - return jobTriggersBuilder_.getMessageList(); - } - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public int getJobTriggersCount() { - if (jobTriggersBuilder_ == null) { - return jobTriggers_.size(); - } else { - return jobTriggersBuilder_.getCount(); - } - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public com.google.privacy.dlp.v2.JobTrigger getJobTriggers(int index) { - if (jobTriggersBuilder_ == null) { - return jobTriggers_.get(index); - } else { - return jobTriggersBuilder_.getMessage(index); - } - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public Builder setJobTriggers( - int index, com.google.privacy.dlp.v2.JobTrigger value) { - if (jobTriggersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobTriggersIsMutable(); - jobTriggers_.set(index, value); - onChanged(); - } else { - jobTriggersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public Builder setJobTriggers( - int index, com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { - if (jobTriggersBuilder_ == null) { - ensureJobTriggersIsMutable(); - jobTriggers_.set(index, builderForValue.build()); - onChanged(); - } else { - jobTriggersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public Builder addJobTriggers(com.google.privacy.dlp.v2.JobTrigger value) { - if (jobTriggersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobTriggersIsMutable(); - jobTriggers_.add(value); - onChanged(); - } else { - jobTriggersBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public Builder addJobTriggers( - int index, com.google.privacy.dlp.v2.JobTrigger value) { - if (jobTriggersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureJobTriggersIsMutable(); - jobTriggers_.add(index, value); - onChanged(); - } else { - jobTriggersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public Builder addJobTriggers( - com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { - if (jobTriggersBuilder_ == null) { - ensureJobTriggersIsMutable(); - jobTriggers_.add(builderForValue.build()); - onChanged(); - } else { - jobTriggersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public Builder addJobTriggers( - int index, com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { - if (jobTriggersBuilder_ == null) { - ensureJobTriggersIsMutable(); - jobTriggers_.add(index, builderForValue.build()); - onChanged(); - } else { - jobTriggersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public Builder addAllJobTriggers( - java.lang.Iterable values) { - if (jobTriggersBuilder_ == null) { - ensureJobTriggersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, jobTriggers_); - onChanged(); - } else { - jobTriggersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public Builder clearJobTriggers() { - if (jobTriggersBuilder_ == null) { - jobTriggers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - jobTriggersBuilder_.clear(); - } - return this; - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public Builder removeJobTriggers(int index) { - if (jobTriggersBuilder_ == null) { - ensureJobTriggersIsMutable(); - jobTriggers_.remove(index); - onChanged(); - } else { - jobTriggersBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public com.google.privacy.dlp.v2.JobTrigger.Builder getJobTriggersBuilder( - int index) { - return getJobTriggersFieldBuilder().getBuilder(index); - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggersOrBuilder( - int index) { - if (jobTriggersBuilder_ == null) { - return jobTriggers_.get(index); } else { - return jobTriggersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public java.util.List - getJobTriggersOrBuilderList() { - if (jobTriggersBuilder_ != null) { - return jobTriggersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(jobTriggers_); - } - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public com.google.privacy.dlp.v2.JobTrigger.Builder addJobTriggersBuilder() { - return getJobTriggersFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance()); - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public com.google.privacy.dlp.v2.JobTrigger.Builder addJobTriggersBuilder( - int index) { - return getJobTriggersFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance()); - } - /** - *
-     * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - public java.util.List - getJobTriggersBuilderList() { - return getJobTriggersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> - getJobTriggersFieldBuilder() { - if (jobTriggersBuilder_ == null) { - jobTriggersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder>( - jobTriggers_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - jobTriggers_ = null; - } - return jobTriggersBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListJobTriggers request.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListJobTriggers request.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListJobTriggers request.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListJobTriggers request.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListJobTriggers request.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListJobTriggersResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListJobTriggersResponse) - private static final com.google.privacy.dlp.v2.ListJobTriggersResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListJobTriggersResponse(); - } - - public static com.google.privacy.dlp.v2.ListJobTriggersResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListJobTriggersResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListJobTriggersResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListJobTriggersResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponseOrBuilder.java deleted file mode 100644 index 622afb7a6288..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListJobTriggersResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListJobTriggersResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - java.util.List - getJobTriggersList(); - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - com.google.privacy.dlp.v2.JobTrigger getJobTriggers(int index); - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - int getJobTriggersCount(); - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - java.util.List - getJobTriggersOrBuilderList(); - /** - *
-   * List of triggeredJobs, up to page_size in ListJobTriggersRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.JobTrigger job_triggers = 1; - */ - com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggersOrBuilder( - int index); - - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListJobTriggers request.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListJobTriggers request.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java deleted file mode 100644 index 62521e1affae..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequest.java +++ /dev/null @@ -1,1331 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for ListStoredInfoTypes.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListStoredInfoTypesRequest} - */ -public final class ListStoredInfoTypesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListStoredInfoTypesRequest) - ListStoredInfoTypesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListStoredInfoTypesRequest.newBuilder() to construct. - private ListStoredInfoTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListStoredInfoTypesRequest() { - parent_ = ""; - pageToken_ = ""; - orderBy_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListStoredInfoTypesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListStoredInfoTypesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 24: { - - pageSize_ = input.readInt32(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.class, com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object pageToken_; - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListStoredInfoTypes`.
-   * 
- * - * string page_token = 2; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListStoredInfoTypes`.
-   * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_; - /** - *
-   * Size of the page, can be limited by the server. If zero server returns
-   * a page of max size 100.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int ORDER_BY_FIELD_NUMBER = 4; - private volatile java.lang.Object orderBy_; - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc, display_name, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the most recent version of the
-   * resource was created.
-   * - `state`: corresponds to the state of the resource.
-   * - `name`: corresponds to resource name.
-   * - `display_name`: corresponds to info type's display name.
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc, display_name, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the most recent version of the
-   * resource was created.
-   * - `state`: corresponds to the state of the resource.
-   * - `name`: corresponds to resource name.
-   * - `display_name`: corresponds to info type's display name.
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 5; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, orderBy_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListStoredInfoTypesRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListStoredInfoTypesRequest other = (com.google.privacy.dlp.v2.ListStoredInfoTypesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for ListStoredInfoTypes.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListStoredInfoTypesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListStoredInfoTypesRequest) - com.google.privacy.dlp.v2.ListStoredInfoTypesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.class, com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageToken_ = ""; - - pageSize_ = 0; - - orderBy_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListStoredInfoTypesRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListStoredInfoTypesRequest build() { - com.google.privacy.dlp.v2.ListStoredInfoTypesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListStoredInfoTypesRequest buildPartial() { - com.google.privacy.dlp.v2.ListStoredInfoTypesRequest result = new com.google.privacy.dlp.v2.ListStoredInfoTypesRequest(this); - result.parent_ = parent_; - result.pageToken_ = pageToken_; - result.pageSize_ = pageSize_; - result.orderBy_ = orderBy_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListStoredInfoTypesRequest) { - return mergeFrom((com.google.privacy.dlp.v2.ListStoredInfoTypesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListStoredInfoTypesRequest other) { - if (other == com.google.privacy.dlp.v2.ListStoredInfoTypesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListStoredInfoTypesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListStoredInfoTypesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on the scope of the request
-     * (project or organization) and whether you have [specified a processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListStoredInfoTypes`.
-     * 
- * - * string page_token = 2; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListStoredInfoTypes`.
-     * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListStoredInfoTypes`.
-     * 
- * - * string page_token = 2; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListStoredInfoTypes`.
-     * 
- * - * string page_token = 2; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Page token to continue retrieval. Comes from previous call
-     * to `ListStoredInfoTypes`.
-     * 
- * - * string page_token = 2; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Size of the page, can be limited by the server. If zero server returns
-     * a page of max size 100.
-     * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Size of the page, can be limited by the server. If zero server returns
-     * a page of max size 100.
-     * 
- * - * int32 page_size = 3; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Size of the page, can be limited by the server. If zero server returns
-     * a page of max size 100.
-     * 
- * - * int32 page_size = 3; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, display_name, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the most recent version of the
-     * resource was created.
-     * - `state`: corresponds to the state of the resource.
-     * - `name`: corresponds to resource name.
-     * - `display_name`: corresponds to info type's display name.
-     * 
- * - * string order_by = 4; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, display_name, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the most recent version of the
-     * resource was created.
-     * - `state`: corresponds to the state of the resource.
-     * - `name`: corresponds to resource name.
-     * - `display_name`: corresponds to info type's display name.
-     * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, display_name, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the most recent version of the
-     * resource was created.
-     * - `state`: corresponds to the state of the resource.
-     * - `name`: corresponds to resource name.
-     * - `display_name`: corresponds to info type's display name.
-     * 
- * - * string order_by = 4; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, display_name, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the most recent version of the
-     * resource was created.
-     * - `state`: corresponds to the state of the resource.
-     * - `name`: corresponds to resource name.
-     * - `display_name`: corresponds to info type's display name.
-     * 
- * - * string order_by = 4; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Comma separated list of fields to order by,
-     * followed by `asc` or `desc` postfix. This list is case-insensitive,
-     * default sorting order is ascending, redundant space characters are
-     * insignificant.
-     * Example: `name asc, display_name, create_time desc`
-     * Supported fields are:
-     * - `create_time`: corresponds to the time the most recent version of the
-     * resource was created.
-     * - `state`: corresponds to the state of the resource.
-     * - `name`: corresponds to resource name.
-     * - `display_name`: corresponds to info type's display name.
-     * 
- * - * string order_by = 4; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 5; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListStoredInfoTypesRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListStoredInfoTypesRequest) - private static final com.google.privacy.dlp.v2.ListStoredInfoTypesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListStoredInfoTypesRequest(); - } - - public static com.google.privacy.dlp.v2.ListStoredInfoTypesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListStoredInfoTypesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListStoredInfoTypesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListStoredInfoTypesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java deleted file mode 100644 index ea88064455b1..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesRequestOrBuilder.java +++ /dev/null @@ -1,144 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListStoredInfoTypesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListStoredInfoTypesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on the scope of the request
-   * (project or organization) and whether you have [specified a processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListStoredInfoTypes`.
-   * 
- * - * string page_token = 2; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Page token to continue retrieval. Comes from previous call
-   * to `ListStoredInfoTypes`.
-   * 
- * - * string page_token = 2; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Size of the page, can be limited by the server. If zero server returns
-   * a page of max size 100.
-   * 
- * - * int32 page_size = 3; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc, display_name, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the most recent version of the
-   * resource was created.
-   * - `state`: corresponds to the state of the resource.
-   * - `name`: corresponds to resource name.
-   * - `display_name`: corresponds to info type's display name.
-   * 
- * - * string order_by = 4; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Comma separated list of fields to order by,
-   * followed by `asc` or `desc` postfix. This list is case-insensitive,
-   * default sorting order is ascending, redundant space characters are
-   * insignificant.
-   * Example: `name asc, display_name, create_time desc`
-   * Supported fields are:
-   * - `create_time`: corresponds to the time the most recent version of the
-   * resource was created.
-   * - `state`: corresponds to the state of the resource.
-   * - `name`: corresponds to resource name.
-   * - `display_name`: corresponds to info type's display name.
-   * 
- * - * string order_by = 4; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 5; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponse.java deleted file mode 100644 index 3bf268a1279a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Response message for ListStoredInfoTypes.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListStoredInfoTypesResponse} - */ -public final class ListStoredInfoTypesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ListStoredInfoTypesResponse) - ListStoredInfoTypesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListStoredInfoTypesResponse.newBuilder() to construct. - private ListStoredInfoTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListStoredInfoTypesResponse() { - storedInfoTypes_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListStoredInfoTypesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListStoredInfoTypesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - storedInfoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - storedInfoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.StoredInfoType.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - storedInfoTypes_ = java.util.Collections.unmodifiableList(storedInfoTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.class, com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.Builder.class); - } - - public static final int STORED_INFO_TYPES_FIELD_NUMBER = 1; - private java.util.List storedInfoTypes_; - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - @java.lang.Override - public java.util.List getStoredInfoTypesList() { - return storedInfoTypes_; - } - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - @java.lang.Override - public java.util.List - getStoredInfoTypesOrBuilderList() { - return storedInfoTypes_; - } - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - @java.lang.Override - public int getStoredInfoTypesCount() { - return storedInfoTypes_.size(); - } - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoType getStoredInfoTypes(int index) { - return storedInfoTypes_.get(index); - } - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder getStoredInfoTypesOrBuilder( - int index) { - return storedInfoTypes_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListStoredInfoTypes request.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListStoredInfoTypes request.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < storedInfoTypes_.size(); i++) { - output.writeMessage(1, storedInfoTypes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < storedInfoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, storedInfoTypes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ListStoredInfoTypesResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ListStoredInfoTypesResponse other = (com.google.privacy.dlp.v2.ListStoredInfoTypesResponse) obj; - - if (!getStoredInfoTypesList() - .equals(other.getStoredInfoTypesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getStoredInfoTypesCount() > 0) { - hash = (37 * hash) + STORED_INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getStoredInfoTypesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ListStoredInfoTypesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response message for ListStoredInfoTypes.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ListStoredInfoTypesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ListStoredInfoTypesResponse) - com.google.privacy.dlp.v2.ListStoredInfoTypesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.class, com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getStoredInfoTypesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (storedInfoTypesBuilder_ == null) { - storedInfoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - storedInfoTypesBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ListStoredInfoTypesResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse build() { - com.google.privacy.dlp.v2.ListStoredInfoTypesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse buildPartial() { - com.google.privacy.dlp.v2.ListStoredInfoTypesResponse result = new com.google.privacy.dlp.v2.ListStoredInfoTypesResponse(this); - int from_bitField0_ = bitField0_; - if (storedInfoTypesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - storedInfoTypes_ = java.util.Collections.unmodifiableList(storedInfoTypes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.storedInfoTypes_ = storedInfoTypes_; - } else { - result.storedInfoTypes_ = storedInfoTypesBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ListStoredInfoTypesResponse) { - return mergeFrom((com.google.privacy.dlp.v2.ListStoredInfoTypesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ListStoredInfoTypesResponse other) { - if (other == com.google.privacy.dlp.v2.ListStoredInfoTypesResponse.getDefaultInstance()) return this; - if (storedInfoTypesBuilder_ == null) { - if (!other.storedInfoTypes_.isEmpty()) { - if (storedInfoTypes_.isEmpty()) { - storedInfoTypes_ = other.storedInfoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureStoredInfoTypesIsMutable(); - storedInfoTypes_.addAll(other.storedInfoTypes_); - } - onChanged(); - } - } else { - if (!other.storedInfoTypes_.isEmpty()) { - if (storedInfoTypesBuilder_.isEmpty()) { - storedInfoTypesBuilder_.dispose(); - storedInfoTypesBuilder_ = null; - storedInfoTypes_ = other.storedInfoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - storedInfoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getStoredInfoTypesFieldBuilder() : null; - } else { - storedInfoTypesBuilder_.addAllMessages(other.storedInfoTypes_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ListStoredInfoTypesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ListStoredInfoTypesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List storedInfoTypes_ = - java.util.Collections.emptyList(); - private void ensureStoredInfoTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - storedInfoTypes_ = new java.util.ArrayList(storedInfoTypes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoType, com.google.privacy.dlp.v2.StoredInfoType.Builder, com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder> storedInfoTypesBuilder_; - - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public java.util.List getStoredInfoTypesList() { - if (storedInfoTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(storedInfoTypes_); - } else { - return storedInfoTypesBuilder_.getMessageList(); - } - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public int getStoredInfoTypesCount() { - if (storedInfoTypesBuilder_ == null) { - return storedInfoTypes_.size(); - } else { - return storedInfoTypesBuilder_.getCount(); - } - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public com.google.privacy.dlp.v2.StoredInfoType getStoredInfoTypes(int index) { - if (storedInfoTypesBuilder_ == null) { - return storedInfoTypes_.get(index); - } else { - return storedInfoTypesBuilder_.getMessage(index); - } - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public Builder setStoredInfoTypes( - int index, com.google.privacy.dlp.v2.StoredInfoType value) { - if (storedInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStoredInfoTypesIsMutable(); - storedInfoTypes_.set(index, value); - onChanged(); - } else { - storedInfoTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public Builder setStoredInfoTypes( - int index, com.google.privacy.dlp.v2.StoredInfoType.Builder builderForValue) { - if (storedInfoTypesBuilder_ == null) { - ensureStoredInfoTypesIsMutable(); - storedInfoTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - storedInfoTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public Builder addStoredInfoTypes(com.google.privacy.dlp.v2.StoredInfoType value) { - if (storedInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStoredInfoTypesIsMutable(); - storedInfoTypes_.add(value); - onChanged(); - } else { - storedInfoTypesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public Builder addStoredInfoTypes( - int index, com.google.privacy.dlp.v2.StoredInfoType value) { - if (storedInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStoredInfoTypesIsMutable(); - storedInfoTypes_.add(index, value); - onChanged(); - } else { - storedInfoTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public Builder addStoredInfoTypes( - com.google.privacy.dlp.v2.StoredInfoType.Builder builderForValue) { - if (storedInfoTypesBuilder_ == null) { - ensureStoredInfoTypesIsMutable(); - storedInfoTypes_.add(builderForValue.build()); - onChanged(); - } else { - storedInfoTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public Builder addStoredInfoTypes( - int index, com.google.privacy.dlp.v2.StoredInfoType.Builder builderForValue) { - if (storedInfoTypesBuilder_ == null) { - ensureStoredInfoTypesIsMutable(); - storedInfoTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - storedInfoTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public Builder addAllStoredInfoTypes( - java.lang.Iterable values) { - if (storedInfoTypesBuilder_ == null) { - ensureStoredInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, storedInfoTypes_); - onChanged(); - } else { - storedInfoTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public Builder clearStoredInfoTypes() { - if (storedInfoTypesBuilder_ == null) { - storedInfoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - storedInfoTypesBuilder_.clear(); - } - return this; - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public Builder removeStoredInfoTypes(int index) { - if (storedInfoTypesBuilder_ == null) { - ensureStoredInfoTypesIsMutable(); - storedInfoTypes_.remove(index); - onChanged(); - } else { - storedInfoTypesBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public com.google.privacy.dlp.v2.StoredInfoType.Builder getStoredInfoTypesBuilder( - int index) { - return getStoredInfoTypesFieldBuilder().getBuilder(index); - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder getStoredInfoTypesOrBuilder( - int index) { - if (storedInfoTypesBuilder_ == null) { - return storedInfoTypes_.get(index); } else { - return storedInfoTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public java.util.List - getStoredInfoTypesOrBuilderList() { - if (storedInfoTypesBuilder_ != null) { - return storedInfoTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(storedInfoTypes_); - } - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public com.google.privacy.dlp.v2.StoredInfoType.Builder addStoredInfoTypesBuilder() { - return getStoredInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance()); - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public com.google.privacy.dlp.v2.StoredInfoType.Builder addStoredInfoTypesBuilder( - int index) { - return getStoredInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance()); - } - /** - *
-     * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - public java.util.List - getStoredInfoTypesBuilderList() { - return getStoredInfoTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoType, com.google.privacy.dlp.v2.StoredInfoType.Builder, com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder> - getStoredInfoTypesFieldBuilder() { - if (storedInfoTypesBuilder_ == null) { - storedInfoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoType, com.google.privacy.dlp.v2.StoredInfoType.Builder, com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder>( - storedInfoTypes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - storedInfoTypes_ = null; - } - return storedInfoTypesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListStoredInfoTypes request.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListStoredInfoTypes request.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListStoredInfoTypes request.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListStoredInfoTypes request.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * If the next page is available then the next page token to be used
-     * in following ListStoredInfoTypes request.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ListStoredInfoTypesResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ListStoredInfoTypesResponse) - private static final com.google.privacy.dlp.v2.ListStoredInfoTypesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ListStoredInfoTypesResponse(); - } - - public static com.google.privacy.dlp.v2.ListStoredInfoTypesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListStoredInfoTypesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListStoredInfoTypesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ListStoredInfoTypesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponseOrBuilder.java deleted file mode 100644 index 89c319c9f9da..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListStoredInfoTypesResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ListStoredInfoTypesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ListStoredInfoTypesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - java.util.List - getStoredInfoTypesList(); - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - com.google.privacy.dlp.v2.StoredInfoType getStoredInfoTypes(int index); - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - int getStoredInfoTypesCount(); - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - java.util.List - getStoredInfoTypesOrBuilderList(); - /** - *
-   * List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoType stored_info_types = 1; - */ - com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder getStoredInfoTypesOrBuilder( - int index); - - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListStoredInfoTypes request.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * If the next page is available then the next page token to be used
-   * in following ListStoredInfoTypes request.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Location.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Location.java deleted file mode 100644 index 7cdf077baf5d..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Location.java +++ /dev/null @@ -1,1675 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Specifies the location of the finding.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Location} - */ -public final class Location extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Location) - LocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use Location.newBuilder() to construct. - private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Location() { - contentLocations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Location(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Location( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Range.Builder subBuilder = null; - if (byteRange_ != null) { - subBuilder = byteRange_.toBuilder(); - } - byteRange_ = input.readMessage(com.google.privacy.dlp.v2.Range.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(byteRange_); - byteRange_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.Range.Builder subBuilder = null; - if (codepointRange_ != null) { - subBuilder = codepointRange_.toBuilder(); - } - codepointRange_ = input.readMessage(com.google.privacy.dlp.v2.Range.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(codepointRange_); - codepointRange_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - contentLocations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - contentLocations_.add( - input.readMessage(com.google.privacy.dlp.v2.ContentLocation.parser(), extensionRegistry)); - break; - } - case 66: { - com.google.privacy.dlp.v2.Container.Builder subBuilder = null; - if (container_ != null) { - subBuilder = container_.toBuilder(); - } - container_ = input.readMessage(com.google.privacy.dlp.v2.Container.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(container_); - container_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - contentLocations_ = java.util.Collections.unmodifiableList(contentLocations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Location.class, com.google.privacy.dlp.v2.Location.Builder.class); - } - - public static final int BYTE_RANGE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.Range byteRange_; - /** - *
-   * Zero-based byte offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Note that when the content is not textual, this references
-   * the UTF-8 encoded textual representation of the content.
-   * Omitted if content is an image.
-   * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - * @return Whether the byteRange field is set. - */ - @java.lang.Override - public boolean hasByteRange() { - return byteRange_ != null; - } - /** - *
-   * Zero-based byte offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Note that when the content is not textual, this references
-   * the UTF-8 encoded textual representation of the content.
-   * Omitted if content is an image.
-   * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - * @return The byteRange. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Range getByteRange() { - return byteRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : byteRange_; - } - /** - *
-   * Zero-based byte offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Note that when the content is not textual, this references
-   * the UTF-8 encoded textual representation of the content.
-   * Omitted if content is an image.
-   * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RangeOrBuilder getByteRangeOrBuilder() { - return getByteRange(); - } - - public static final int CODEPOINT_RANGE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.Range codepointRange_; - /** - *
-   * Unicode character offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Provided when the content is text.
-   * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - * @return Whether the codepointRange field is set. - */ - @java.lang.Override - public boolean hasCodepointRange() { - return codepointRange_ != null; - } - /** - *
-   * Unicode character offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Provided when the content is text.
-   * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - * @return The codepointRange. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Range getCodepointRange() { - return codepointRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : codepointRange_; - } - /** - *
-   * Unicode character offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Provided when the content is text.
-   * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RangeOrBuilder getCodepointRangeOrBuilder() { - return getCodepointRange(); - } - - public static final int CONTENT_LOCATIONS_FIELD_NUMBER = 7; - private java.util.List contentLocations_; - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - @java.lang.Override - public java.util.List getContentLocationsList() { - return contentLocations_; - } - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - @java.lang.Override - public java.util.List - getContentLocationsOrBuilderList() { - return contentLocations_; - } - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - @java.lang.Override - public int getContentLocationsCount() { - return contentLocations_.size(); - } - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentLocation getContentLocations(int index) { - return contentLocations_.get(index); - } - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentLocationOrBuilder getContentLocationsOrBuilder( - int index) { - return contentLocations_.get(index); - } - - public static final int CONTAINER_FIELD_NUMBER = 8; - private com.google.privacy.dlp.v2.Container container_; - /** - *
-   * Information about the container where this finding occurred, if available.
-   * 
- * - * .google.privacy.dlp.v2.Container container = 8; - * @return Whether the container field is set. - */ - @java.lang.Override - public boolean hasContainer() { - return container_ != null; - } - /** - *
-   * Information about the container where this finding occurred, if available.
-   * 
- * - * .google.privacy.dlp.v2.Container container = 8; - * @return The container. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Container getContainer() { - return container_ == null ? com.google.privacy.dlp.v2.Container.getDefaultInstance() : container_; - } - /** - *
-   * Information about the container where this finding occurred, if available.
-   * 
- * - * .google.privacy.dlp.v2.Container container = 8; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerOrBuilder() { - return getContainer(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (byteRange_ != null) { - output.writeMessage(1, getByteRange()); - } - if (codepointRange_ != null) { - output.writeMessage(2, getCodepointRange()); - } - for (int i = 0; i < contentLocations_.size(); i++) { - output.writeMessage(7, contentLocations_.get(i)); - } - if (container_ != null) { - output.writeMessage(8, getContainer()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (byteRange_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getByteRange()); - } - if (codepointRange_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getCodepointRange()); - } - for (int i = 0; i < contentLocations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, contentLocations_.get(i)); - } - if (container_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getContainer()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Location)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Location other = (com.google.privacy.dlp.v2.Location) obj; - - if (hasByteRange() != other.hasByteRange()) return false; - if (hasByteRange()) { - if (!getByteRange() - .equals(other.getByteRange())) return false; - } - if (hasCodepointRange() != other.hasCodepointRange()) return false; - if (hasCodepointRange()) { - if (!getCodepointRange() - .equals(other.getCodepointRange())) return false; - } - if (!getContentLocationsList() - .equals(other.getContentLocationsList())) return false; - if (hasContainer() != other.hasContainer()) return false; - if (hasContainer()) { - if (!getContainer() - .equals(other.getContainer())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasByteRange()) { - hash = (37 * hash) + BYTE_RANGE_FIELD_NUMBER; - hash = (53 * hash) + getByteRange().hashCode(); - } - if (hasCodepointRange()) { - hash = (37 * hash) + CODEPOINT_RANGE_FIELD_NUMBER; - hash = (53 * hash) + getCodepointRange().hashCode(); - } - if (getContentLocationsCount() > 0) { - hash = (37 * hash) + CONTENT_LOCATIONS_FIELD_NUMBER; - hash = (53 * hash) + getContentLocationsList().hashCode(); - } - if (hasContainer()) { - hash = (37 * hash) + CONTAINER_FIELD_NUMBER; - hash = (53 * hash) + getContainer().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Location parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Location parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Location parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Location parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Location parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Location parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Location parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Location parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Location parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Location parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Location parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Location parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Location prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Specifies the location of the finding.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Location} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Location) - com.google.privacy.dlp.v2.LocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Location.class, com.google.privacy.dlp.v2.Location.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Location.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getContentLocationsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (byteRangeBuilder_ == null) { - byteRange_ = null; - } else { - byteRange_ = null; - byteRangeBuilder_ = null; - } - if (codepointRangeBuilder_ == null) { - codepointRange_ = null; - } else { - codepointRange_ = null; - codepointRangeBuilder_ = null; - } - if (contentLocationsBuilder_ == null) { - contentLocations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - contentLocationsBuilder_.clear(); - } - if (containerBuilder_ == null) { - container_ = null; - } else { - container_ = null; - containerBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Location_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Location getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Location.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Location build() { - com.google.privacy.dlp.v2.Location result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Location buildPartial() { - com.google.privacy.dlp.v2.Location result = new com.google.privacy.dlp.v2.Location(this); - int from_bitField0_ = bitField0_; - if (byteRangeBuilder_ == null) { - result.byteRange_ = byteRange_; - } else { - result.byteRange_ = byteRangeBuilder_.build(); - } - if (codepointRangeBuilder_ == null) { - result.codepointRange_ = codepointRange_; - } else { - result.codepointRange_ = codepointRangeBuilder_.build(); - } - if (contentLocationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - contentLocations_ = java.util.Collections.unmodifiableList(contentLocations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.contentLocations_ = contentLocations_; - } else { - result.contentLocations_ = contentLocationsBuilder_.build(); - } - if (containerBuilder_ == null) { - result.container_ = container_; - } else { - result.container_ = containerBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Location) { - return mergeFrom((com.google.privacy.dlp.v2.Location)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Location other) { - if (other == com.google.privacy.dlp.v2.Location.getDefaultInstance()) return this; - if (other.hasByteRange()) { - mergeByteRange(other.getByteRange()); - } - if (other.hasCodepointRange()) { - mergeCodepointRange(other.getCodepointRange()); - } - if (contentLocationsBuilder_ == null) { - if (!other.contentLocations_.isEmpty()) { - if (contentLocations_.isEmpty()) { - contentLocations_ = other.contentLocations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureContentLocationsIsMutable(); - contentLocations_.addAll(other.contentLocations_); - } - onChanged(); - } - } else { - if (!other.contentLocations_.isEmpty()) { - if (contentLocationsBuilder_.isEmpty()) { - contentLocationsBuilder_.dispose(); - contentLocationsBuilder_ = null; - contentLocations_ = other.contentLocations_; - bitField0_ = (bitField0_ & ~0x00000001); - contentLocationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getContentLocationsFieldBuilder() : null; - } else { - contentLocationsBuilder_.addAllMessages(other.contentLocations_); - } - } - } - if (other.hasContainer()) { - mergeContainer(other.getContainer()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Location parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Location) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.Range byteRange_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder> byteRangeBuilder_; - /** - *
-     * Zero-based byte offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Note that when the content is not textual, this references
-     * the UTF-8 encoded textual representation of the content.
-     * Omitted if content is an image.
-     * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - * @return Whether the byteRange field is set. - */ - public boolean hasByteRange() { - return byteRangeBuilder_ != null || byteRange_ != null; - } - /** - *
-     * Zero-based byte offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Note that when the content is not textual, this references
-     * the UTF-8 encoded textual representation of the content.
-     * Omitted if content is an image.
-     * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - * @return The byteRange. - */ - public com.google.privacy.dlp.v2.Range getByteRange() { - if (byteRangeBuilder_ == null) { - return byteRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : byteRange_; - } else { - return byteRangeBuilder_.getMessage(); - } - } - /** - *
-     * Zero-based byte offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Note that when the content is not textual, this references
-     * the UTF-8 encoded textual representation of the content.
-     * Omitted if content is an image.
-     * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - */ - public Builder setByteRange(com.google.privacy.dlp.v2.Range value) { - if (byteRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - byteRange_ = value; - onChanged(); - } else { - byteRangeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Zero-based byte offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Note that when the content is not textual, this references
-     * the UTF-8 encoded textual representation of the content.
-     * Omitted if content is an image.
-     * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - */ - public Builder setByteRange( - com.google.privacy.dlp.v2.Range.Builder builderForValue) { - if (byteRangeBuilder_ == null) { - byteRange_ = builderForValue.build(); - onChanged(); - } else { - byteRangeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Zero-based byte offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Note that when the content is not textual, this references
-     * the UTF-8 encoded textual representation of the content.
-     * Omitted if content is an image.
-     * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - */ - public Builder mergeByteRange(com.google.privacy.dlp.v2.Range value) { - if (byteRangeBuilder_ == null) { - if (byteRange_ != null) { - byteRange_ = - com.google.privacy.dlp.v2.Range.newBuilder(byteRange_).mergeFrom(value).buildPartial(); - } else { - byteRange_ = value; - } - onChanged(); - } else { - byteRangeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Zero-based byte offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Note that when the content is not textual, this references
-     * the UTF-8 encoded textual representation of the content.
-     * Omitted if content is an image.
-     * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - */ - public Builder clearByteRange() { - if (byteRangeBuilder_ == null) { - byteRange_ = null; - onChanged(); - } else { - byteRange_ = null; - byteRangeBuilder_ = null; - } - - return this; - } - /** - *
-     * Zero-based byte offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Note that when the content is not textual, this references
-     * the UTF-8 encoded textual representation of the content.
-     * Omitted if content is an image.
-     * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - */ - public com.google.privacy.dlp.v2.Range.Builder getByteRangeBuilder() { - - onChanged(); - return getByteRangeFieldBuilder().getBuilder(); - } - /** - *
-     * Zero-based byte offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Note that when the content is not textual, this references
-     * the UTF-8 encoded textual representation of the content.
-     * Omitted if content is an image.
-     * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - */ - public com.google.privacy.dlp.v2.RangeOrBuilder getByteRangeOrBuilder() { - if (byteRangeBuilder_ != null) { - return byteRangeBuilder_.getMessageOrBuilder(); - } else { - return byteRange_ == null ? - com.google.privacy.dlp.v2.Range.getDefaultInstance() : byteRange_; - } - } - /** - *
-     * Zero-based byte offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Note that when the content is not textual, this references
-     * the UTF-8 encoded textual representation of the content.
-     * Omitted if content is an image.
-     * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder> - getByteRangeFieldBuilder() { - if (byteRangeBuilder_ == null) { - byteRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder>( - getByteRange(), - getParentForChildren(), - isClean()); - byteRange_ = null; - } - return byteRangeBuilder_; - } - - private com.google.privacy.dlp.v2.Range codepointRange_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder> codepointRangeBuilder_; - /** - *
-     * Unicode character offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Provided when the content is text.
-     * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - * @return Whether the codepointRange field is set. - */ - public boolean hasCodepointRange() { - return codepointRangeBuilder_ != null || codepointRange_ != null; - } - /** - *
-     * Unicode character offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Provided when the content is text.
-     * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - * @return The codepointRange. - */ - public com.google.privacy.dlp.v2.Range getCodepointRange() { - if (codepointRangeBuilder_ == null) { - return codepointRange_ == null ? com.google.privacy.dlp.v2.Range.getDefaultInstance() : codepointRange_; - } else { - return codepointRangeBuilder_.getMessage(); - } - } - /** - *
-     * Unicode character offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Provided when the content is text.
-     * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - */ - public Builder setCodepointRange(com.google.privacy.dlp.v2.Range value) { - if (codepointRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - codepointRange_ = value; - onChanged(); - } else { - codepointRangeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Unicode character offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Provided when the content is text.
-     * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - */ - public Builder setCodepointRange( - com.google.privacy.dlp.v2.Range.Builder builderForValue) { - if (codepointRangeBuilder_ == null) { - codepointRange_ = builderForValue.build(); - onChanged(); - } else { - codepointRangeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Unicode character offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Provided when the content is text.
-     * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - */ - public Builder mergeCodepointRange(com.google.privacy.dlp.v2.Range value) { - if (codepointRangeBuilder_ == null) { - if (codepointRange_ != null) { - codepointRange_ = - com.google.privacy.dlp.v2.Range.newBuilder(codepointRange_).mergeFrom(value).buildPartial(); - } else { - codepointRange_ = value; - } - onChanged(); - } else { - codepointRangeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Unicode character offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Provided when the content is text.
-     * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - */ - public Builder clearCodepointRange() { - if (codepointRangeBuilder_ == null) { - codepointRange_ = null; - onChanged(); - } else { - codepointRange_ = null; - codepointRangeBuilder_ = null; - } - - return this; - } - /** - *
-     * Unicode character offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Provided when the content is text.
-     * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - */ - public com.google.privacy.dlp.v2.Range.Builder getCodepointRangeBuilder() { - - onChanged(); - return getCodepointRangeFieldBuilder().getBuilder(); - } - /** - *
-     * Unicode character offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Provided when the content is text.
-     * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - */ - public com.google.privacy.dlp.v2.RangeOrBuilder getCodepointRangeOrBuilder() { - if (codepointRangeBuilder_ != null) { - return codepointRangeBuilder_.getMessageOrBuilder(); - } else { - return codepointRange_ == null ? - com.google.privacy.dlp.v2.Range.getDefaultInstance() : codepointRange_; - } - } - /** - *
-     * Unicode character offsets delimiting the finding.
-     * These are relative to the finding's containing element.
-     * Provided when the content is text.
-     * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder> - getCodepointRangeFieldBuilder() { - if (codepointRangeBuilder_ == null) { - codepointRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Range, com.google.privacy.dlp.v2.Range.Builder, com.google.privacy.dlp.v2.RangeOrBuilder>( - getCodepointRange(), - getParentForChildren(), - isClean()); - codepointRange_ = null; - } - return codepointRangeBuilder_; - } - - private java.util.List contentLocations_ = - java.util.Collections.emptyList(); - private void ensureContentLocationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - contentLocations_ = new java.util.ArrayList(contentLocations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ContentLocation, com.google.privacy.dlp.v2.ContentLocation.Builder, com.google.privacy.dlp.v2.ContentLocationOrBuilder> contentLocationsBuilder_; - - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public java.util.List getContentLocationsList() { - if (contentLocationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(contentLocations_); - } else { - return contentLocationsBuilder_.getMessageList(); - } - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public int getContentLocationsCount() { - if (contentLocationsBuilder_ == null) { - return contentLocations_.size(); - } else { - return contentLocationsBuilder_.getCount(); - } - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public com.google.privacy.dlp.v2.ContentLocation getContentLocations(int index) { - if (contentLocationsBuilder_ == null) { - return contentLocations_.get(index); - } else { - return contentLocationsBuilder_.getMessage(index); - } - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public Builder setContentLocations( - int index, com.google.privacy.dlp.v2.ContentLocation value) { - if (contentLocationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentLocationsIsMutable(); - contentLocations_.set(index, value); - onChanged(); - } else { - contentLocationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public Builder setContentLocations( - int index, com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue) { - if (contentLocationsBuilder_ == null) { - ensureContentLocationsIsMutable(); - contentLocations_.set(index, builderForValue.build()); - onChanged(); - } else { - contentLocationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public Builder addContentLocations(com.google.privacy.dlp.v2.ContentLocation value) { - if (contentLocationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentLocationsIsMutable(); - contentLocations_.add(value); - onChanged(); - } else { - contentLocationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public Builder addContentLocations( - int index, com.google.privacy.dlp.v2.ContentLocation value) { - if (contentLocationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureContentLocationsIsMutable(); - contentLocations_.add(index, value); - onChanged(); - } else { - contentLocationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public Builder addContentLocations( - com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue) { - if (contentLocationsBuilder_ == null) { - ensureContentLocationsIsMutable(); - contentLocations_.add(builderForValue.build()); - onChanged(); - } else { - contentLocationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public Builder addContentLocations( - int index, com.google.privacy.dlp.v2.ContentLocation.Builder builderForValue) { - if (contentLocationsBuilder_ == null) { - ensureContentLocationsIsMutable(); - contentLocations_.add(index, builderForValue.build()); - onChanged(); - } else { - contentLocationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public Builder addAllContentLocations( - java.lang.Iterable values) { - if (contentLocationsBuilder_ == null) { - ensureContentLocationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, contentLocations_); - onChanged(); - } else { - contentLocationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public Builder clearContentLocations() { - if (contentLocationsBuilder_ == null) { - contentLocations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - contentLocationsBuilder_.clear(); - } - return this; - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public Builder removeContentLocations(int index) { - if (contentLocationsBuilder_ == null) { - ensureContentLocationsIsMutable(); - contentLocations_.remove(index); - onChanged(); - } else { - contentLocationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public com.google.privacy.dlp.v2.ContentLocation.Builder getContentLocationsBuilder( - int index) { - return getContentLocationsFieldBuilder().getBuilder(index); - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public com.google.privacy.dlp.v2.ContentLocationOrBuilder getContentLocationsOrBuilder( - int index) { - if (contentLocationsBuilder_ == null) { - return contentLocations_.get(index); } else { - return contentLocationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public java.util.List - getContentLocationsOrBuilderList() { - if (contentLocationsBuilder_ != null) { - return contentLocationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(contentLocations_); - } - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public com.google.privacy.dlp.v2.ContentLocation.Builder addContentLocationsBuilder() { - return getContentLocationsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance()); - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public com.google.privacy.dlp.v2.ContentLocation.Builder addContentLocationsBuilder( - int index) { - return getContentLocationsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.ContentLocation.getDefaultInstance()); - } - /** - *
-     * List of nested objects pointing to the precise location of the finding
-     * within the file or record.
-     * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - public java.util.List - getContentLocationsBuilderList() { - return getContentLocationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ContentLocation, com.google.privacy.dlp.v2.ContentLocation.Builder, com.google.privacy.dlp.v2.ContentLocationOrBuilder> - getContentLocationsFieldBuilder() { - if (contentLocationsBuilder_ == null) { - contentLocationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.ContentLocation, com.google.privacy.dlp.v2.ContentLocation.Builder, com.google.privacy.dlp.v2.ContentLocationOrBuilder>( - contentLocations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - contentLocations_ = null; - } - return contentLocationsBuilder_; - } - - private com.google.privacy.dlp.v2.Container container_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder> containerBuilder_; - /** - *
-     * Information about the container where this finding occurred, if available.
-     * 
- * - * .google.privacy.dlp.v2.Container container = 8; - * @return Whether the container field is set. - */ - public boolean hasContainer() { - return containerBuilder_ != null || container_ != null; - } - /** - *
-     * Information about the container where this finding occurred, if available.
-     * 
- * - * .google.privacy.dlp.v2.Container container = 8; - * @return The container. - */ - public com.google.privacy.dlp.v2.Container getContainer() { - if (containerBuilder_ == null) { - return container_ == null ? com.google.privacy.dlp.v2.Container.getDefaultInstance() : container_; - } else { - return containerBuilder_.getMessage(); - } - } - /** - *
-     * Information about the container where this finding occurred, if available.
-     * 
- * - * .google.privacy.dlp.v2.Container container = 8; - */ - public Builder setContainer(com.google.privacy.dlp.v2.Container value) { - if (containerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - container_ = value; - onChanged(); - } else { - containerBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Information about the container where this finding occurred, if available.
-     * 
- * - * .google.privacy.dlp.v2.Container container = 8; - */ - public Builder setContainer( - com.google.privacy.dlp.v2.Container.Builder builderForValue) { - if (containerBuilder_ == null) { - container_ = builderForValue.build(); - onChanged(); - } else { - containerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Information about the container where this finding occurred, if available.
-     * 
- * - * .google.privacy.dlp.v2.Container container = 8; - */ - public Builder mergeContainer(com.google.privacy.dlp.v2.Container value) { - if (containerBuilder_ == null) { - if (container_ != null) { - container_ = - com.google.privacy.dlp.v2.Container.newBuilder(container_).mergeFrom(value).buildPartial(); - } else { - container_ = value; - } - onChanged(); - } else { - containerBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Information about the container where this finding occurred, if available.
-     * 
- * - * .google.privacy.dlp.v2.Container container = 8; - */ - public Builder clearContainer() { - if (containerBuilder_ == null) { - container_ = null; - onChanged(); - } else { - container_ = null; - containerBuilder_ = null; - } - - return this; - } - /** - *
-     * Information about the container where this finding occurred, if available.
-     * 
- * - * .google.privacy.dlp.v2.Container container = 8; - */ - public com.google.privacy.dlp.v2.Container.Builder getContainerBuilder() { - - onChanged(); - return getContainerFieldBuilder().getBuilder(); - } - /** - *
-     * Information about the container where this finding occurred, if available.
-     * 
- * - * .google.privacy.dlp.v2.Container container = 8; - */ - public com.google.privacy.dlp.v2.ContainerOrBuilder getContainerOrBuilder() { - if (containerBuilder_ != null) { - return containerBuilder_.getMessageOrBuilder(); - } else { - return container_ == null ? - com.google.privacy.dlp.v2.Container.getDefaultInstance() : container_; - } - } - /** - *
-     * Information about the container where this finding occurred, if available.
-     * 
- * - * .google.privacy.dlp.v2.Container container = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder> - getContainerFieldBuilder() { - if (containerBuilder_ == null) { - containerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Container, com.google.privacy.dlp.v2.Container.Builder, com.google.privacy.dlp.v2.ContainerOrBuilder>( - getContainer(), - getParentForChildren(), - isClean()); - container_ = null; - } - return containerBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Location) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Location) - private static final com.google.privacy.dlp.v2.Location DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Location(); - } - - public static com.google.privacy.dlp.v2.Location getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Location parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Location(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Location getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationName.java deleted file mode 100644 index 8ca10856543b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationOrBuilder.java deleted file mode 100644 index baba0c5b8335..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/LocationOrBuilder.java +++ /dev/null @@ -1,157 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface LocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Location) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Zero-based byte offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Note that when the content is not textual, this references
-   * the UTF-8 encoded textual representation of the content.
-   * Omitted if content is an image.
-   * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - * @return Whether the byteRange field is set. - */ - boolean hasByteRange(); - /** - *
-   * Zero-based byte offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Note that when the content is not textual, this references
-   * the UTF-8 encoded textual representation of the content.
-   * Omitted if content is an image.
-   * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - * @return The byteRange. - */ - com.google.privacy.dlp.v2.Range getByteRange(); - /** - *
-   * Zero-based byte offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Note that when the content is not textual, this references
-   * the UTF-8 encoded textual representation of the content.
-   * Omitted if content is an image.
-   * 
- * - * .google.privacy.dlp.v2.Range byte_range = 1; - */ - com.google.privacy.dlp.v2.RangeOrBuilder getByteRangeOrBuilder(); - - /** - *
-   * Unicode character offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Provided when the content is text.
-   * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - * @return Whether the codepointRange field is set. - */ - boolean hasCodepointRange(); - /** - *
-   * Unicode character offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Provided when the content is text.
-   * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - * @return The codepointRange. - */ - com.google.privacy.dlp.v2.Range getCodepointRange(); - /** - *
-   * Unicode character offsets delimiting the finding.
-   * These are relative to the finding's containing element.
-   * Provided when the content is text.
-   * 
- * - * .google.privacy.dlp.v2.Range codepoint_range = 2; - */ - com.google.privacy.dlp.v2.RangeOrBuilder getCodepointRangeOrBuilder(); - - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - java.util.List - getContentLocationsList(); - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - com.google.privacy.dlp.v2.ContentLocation getContentLocations(int index); - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - int getContentLocationsCount(); - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - java.util.List - getContentLocationsOrBuilderList(); - /** - *
-   * List of nested objects pointing to the precise location of the finding
-   * within the file or record.
-   * 
- * - * repeated .google.privacy.dlp.v2.ContentLocation content_locations = 7; - */ - com.google.privacy.dlp.v2.ContentLocationOrBuilder getContentLocationsOrBuilder( - int index); - - /** - *
-   * Information about the container where this finding occurred, if available.
-   * 
- * - * .google.privacy.dlp.v2.Container container = 8; - * @return Whether the container field is set. - */ - boolean hasContainer(); - /** - *
-   * Information about the container where this finding occurred, if available.
-   * 
- * - * .google.privacy.dlp.v2.Container container = 8; - * @return The container. - */ - com.google.privacy.dlp.v2.Container getContainer(); - /** - *
-   * Information about the container where this finding occurred, if available.
-   * 
- * - * .google.privacy.dlp.v2.Container container = 8; - */ - com.google.privacy.dlp.v2.ContainerOrBuilder getContainerOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Manual.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Manual.java deleted file mode 100644 index 77fc3ae0e0d7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Manual.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Job trigger option for hybrid jobs. Jobs must be manually created
- * and finished.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Manual} - */ -public final class Manual extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Manual) - ManualOrBuilder { -private static final long serialVersionUID = 0L; - // Use Manual.newBuilder() to construct. - private Manual(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Manual() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Manual(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Manual( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Manual.class, com.google.privacy.dlp.v2.Manual.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Manual)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Manual other = (com.google.privacy.dlp.v2.Manual) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Manual parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Manual parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Manual parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Manual parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Manual parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Manual parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Manual parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Manual parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Manual parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Manual parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Manual parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Manual parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Manual prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Job trigger option for hybrid jobs. Jobs must be manually created
-   * and finished.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Manual} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Manual) - com.google.privacy.dlp.v2.ManualOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Manual.class, com.google.privacy.dlp.v2.Manual.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Manual.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Manual_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Manual getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Manual.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Manual build() { - com.google.privacy.dlp.v2.Manual result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Manual buildPartial() { - com.google.privacy.dlp.v2.Manual result = new com.google.privacy.dlp.v2.Manual(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Manual) { - return mergeFrom((com.google.privacy.dlp.v2.Manual)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Manual other) { - if (other == com.google.privacy.dlp.v2.Manual.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Manual parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Manual) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Manual) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Manual) - private static final com.google.privacy.dlp.v2.Manual DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Manual(); - } - - public static com.google.privacy.dlp.v2.Manual getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Manual parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Manual(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Manual getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ManualOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ManualOrBuilder.java deleted file mode 100644 index 0e9dda656b0a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ManualOrBuilder.java +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ManualOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Manual) - com.google.protobuf.MessageOrBuilder { -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java deleted file mode 100644 index 599c6b892e85..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MatchingType.java +++ /dev/null @@ -1,187 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Type of the match which can be applied to different ways of matching, like
- * Dictionary, regular expression and intersecting with findings of another
- * info type.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.MatchingType} - */ -public enum MatchingType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Invalid.
-   * 
- * - * MATCHING_TYPE_UNSPECIFIED = 0; - */ - MATCHING_TYPE_UNSPECIFIED(0), - /** - *
-   * Full match.
-   * - Dictionary: join of Dictionary results matched complete finding quote
-   * - Regex: all regex matches fill a finding quote start to end
-   * - Exclude info type: completely inside affecting info types findings
-   * 
- * - * MATCHING_TYPE_FULL_MATCH = 1; - */ - MATCHING_TYPE_FULL_MATCH(1), - /** - *
-   * Partial match.
-   * - Dictionary: at least one of the tokens in the finding matches
-   * - Regex: substring of the finding matches
-   * - Exclude info type: intersects with affecting info types findings
-   * 
- * - * MATCHING_TYPE_PARTIAL_MATCH = 2; - */ - MATCHING_TYPE_PARTIAL_MATCH(2), - /** - *
-   * Inverse match.
-   * - Dictionary: no tokens in the finding match the dictionary
-   * - Regex: finding doesn't match the regex
-   * - Exclude info type: no intersection with affecting info types findings
-   * 
- * - * MATCHING_TYPE_INVERSE_MATCH = 3; - */ - MATCHING_TYPE_INVERSE_MATCH(3), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Invalid.
-   * 
- * - * MATCHING_TYPE_UNSPECIFIED = 0; - */ - public static final int MATCHING_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-   * Full match.
-   * - Dictionary: join of Dictionary results matched complete finding quote
-   * - Regex: all regex matches fill a finding quote start to end
-   * - Exclude info type: completely inside affecting info types findings
-   * 
- * - * MATCHING_TYPE_FULL_MATCH = 1; - */ - public static final int MATCHING_TYPE_FULL_MATCH_VALUE = 1; - /** - *
-   * Partial match.
-   * - Dictionary: at least one of the tokens in the finding matches
-   * - Regex: substring of the finding matches
-   * - Exclude info type: intersects with affecting info types findings
-   * 
- * - * MATCHING_TYPE_PARTIAL_MATCH = 2; - */ - public static final int MATCHING_TYPE_PARTIAL_MATCH_VALUE = 2; - /** - *
-   * Inverse match.
-   * - Dictionary: no tokens in the finding match the dictionary
-   * - Regex: finding doesn't match the regex
-   * - Exclude info type: no intersection with affecting info types findings
-   * 
- * - * MATCHING_TYPE_INVERSE_MATCH = 3; - */ - public static final int MATCHING_TYPE_INVERSE_MATCH_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MatchingType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MatchingType forNumber(int value) { - switch (value) { - case 0: return MATCHING_TYPE_UNSPECIFIED; - case 1: return MATCHING_TYPE_FULL_MATCH; - case 2: return MATCHING_TYPE_PARTIAL_MATCH; - case 3: return MATCHING_TYPE_INVERSE_MATCH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - MatchingType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MatchingType findValueByNumber(int number) { - return MatchingType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(4); - } - - private static final MatchingType[] VALUES = values(); - - public static MatchingType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MatchingType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.MatchingType) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocation.java deleted file mode 100644 index 0058f6c76bc1..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocation.java +++ /dev/null @@ -1,885 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Metadata Location
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.MetadataLocation} - */ -public final class MetadataLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.MetadataLocation) - MetadataLocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use MetadataLocation.newBuilder() to construct. - private MetadataLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MetadataLocation() { - type_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MetadataLocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MetadataLocation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 26: { - com.google.privacy.dlp.v2.StorageMetadataLabel.Builder subBuilder = null; - if (labelCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.StorageMetadataLabel) label_).toBuilder(); - } - label_ = - input.readMessage(com.google.privacy.dlp.v2.StorageMetadataLabel.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.StorageMetadataLabel) label_); - label_ = subBuilder.buildPartial(); - } - labelCase_ = 3; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.MetadataLocation.class, com.google.privacy.dlp.v2.MetadataLocation.Builder.class); - } - - private int labelCase_ = 0; - private java.lang.Object label_; - public enum LabelCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - STORAGE_LABEL(3), - LABEL_NOT_SET(0); - private final int value; - private LabelCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LabelCase valueOf(int value) { - return forNumber(value); - } - - public static LabelCase forNumber(int value) { - switch (value) { - case 3: return STORAGE_LABEL; - case 0: return LABEL_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public LabelCase - getLabelCase() { - return LabelCase.forNumber( - labelCase_); - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-   * Type of metadata containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.MetadataType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-   * Type of metadata containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.MetadataType type = 1; - * @return The type. - */ - @java.lang.Override public com.google.privacy.dlp.v2.MetadataType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.MetadataType result = com.google.privacy.dlp.v2.MetadataType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.MetadataType.UNRECOGNIZED : result; - } - - public static final int STORAGE_LABEL_FIELD_NUMBER = 3; - /** - *
-   * Storage metadata.
-   * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - * @return Whether the storageLabel field is set. - */ - @java.lang.Override - public boolean hasStorageLabel() { - return labelCase_ == 3; - } - /** - *
-   * Storage metadata.
-   * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - * @return The storageLabel. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StorageMetadataLabel getStorageLabel() { - if (labelCase_ == 3) { - return (com.google.privacy.dlp.v2.StorageMetadataLabel) label_; - } - return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); - } - /** - *
-   * Storage metadata.
-   * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder getStorageLabelOrBuilder() { - if (labelCase_ == 3) { - return (com.google.privacy.dlp.v2.StorageMetadataLabel) label_; - } - return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != com.google.privacy.dlp.v2.MetadataType.METADATATYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, type_); - } - if (labelCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.StorageMetadataLabel) label_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != com.google.privacy.dlp.v2.MetadataType.METADATATYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (labelCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.StorageMetadataLabel) label_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.MetadataLocation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.MetadataLocation other = (com.google.privacy.dlp.v2.MetadataLocation) obj; - - if (type_ != other.type_) return false; - if (!getLabelCase().equals(other.getLabelCase())) return false; - switch (labelCase_) { - case 3: - if (!getStorageLabel() - .equals(other.getStorageLabel())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - switch (labelCase_) { - case 3: - hash = (37 * hash) + STORAGE_LABEL_FIELD_NUMBER; - hash = (53 * hash) + getStorageLabel().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.MetadataLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.MetadataLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Metadata Location
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.MetadataLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.MetadataLocation) - com.google.privacy.dlp.v2.MetadataLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.MetadataLocation.class, com.google.privacy.dlp.v2.MetadataLocation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.MetadataLocation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - labelCase_ = 0; - label_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_MetadataLocation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.MetadataLocation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.MetadataLocation build() { - com.google.privacy.dlp.v2.MetadataLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.MetadataLocation buildPartial() { - com.google.privacy.dlp.v2.MetadataLocation result = new com.google.privacy.dlp.v2.MetadataLocation(this); - result.type_ = type_; - if (labelCase_ == 3) { - if (storageLabelBuilder_ == null) { - result.label_ = label_; - } else { - result.label_ = storageLabelBuilder_.build(); - } - } - result.labelCase_ = labelCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.MetadataLocation) { - return mergeFrom((com.google.privacy.dlp.v2.MetadataLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.MetadataLocation other) { - if (other == com.google.privacy.dlp.v2.MetadataLocation.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - switch (other.getLabelCase()) { - case STORAGE_LABEL: { - mergeStorageLabel(other.getStorageLabel()); - break; - } - case LABEL_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.MetadataLocation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.MetadataLocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int labelCase_ = 0; - private java.lang.Object label_; - public LabelCase - getLabelCase() { - return LabelCase.forNumber( - labelCase_); - } - - public Builder clearLabel() { - labelCase_ = 0; - label_ = null; - onChanged(); - return this; - } - - - private int type_ = 0; - /** - *
-     * Type of metadata containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.MetadataType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * Type of metadata containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.MetadataType type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * Type of metadata containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.MetadataType type = 1; - * @return The type. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.MetadataType getType() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.MetadataType result = com.google.privacy.dlp.v2.MetadataType.valueOf(type_); - return result == null ? com.google.privacy.dlp.v2.MetadataType.UNRECOGNIZED : result; - } - /** - *
-     * Type of metadata containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.MetadataType type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(com.google.privacy.dlp.v2.MetadataType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Type of metadata containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.MetadataType type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StorageMetadataLabel, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder, com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder> storageLabelBuilder_; - /** - *
-     * Storage metadata.
-     * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - * @return Whether the storageLabel field is set. - */ - @java.lang.Override - public boolean hasStorageLabel() { - return labelCase_ == 3; - } - /** - *
-     * Storage metadata.
-     * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - * @return The storageLabel. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StorageMetadataLabel getStorageLabel() { - if (storageLabelBuilder_ == null) { - if (labelCase_ == 3) { - return (com.google.privacy.dlp.v2.StorageMetadataLabel) label_; - } - return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); - } else { - if (labelCase_ == 3) { - return storageLabelBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); - } - } - /** - *
-     * Storage metadata.
-     * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - */ - public Builder setStorageLabel(com.google.privacy.dlp.v2.StorageMetadataLabel value) { - if (storageLabelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - label_ = value; - onChanged(); - } else { - storageLabelBuilder_.setMessage(value); - } - labelCase_ = 3; - return this; - } - /** - *
-     * Storage metadata.
-     * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - */ - public Builder setStorageLabel( - com.google.privacy.dlp.v2.StorageMetadataLabel.Builder builderForValue) { - if (storageLabelBuilder_ == null) { - label_ = builderForValue.build(); - onChanged(); - } else { - storageLabelBuilder_.setMessage(builderForValue.build()); - } - labelCase_ = 3; - return this; - } - /** - *
-     * Storage metadata.
-     * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - */ - public Builder mergeStorageLabel(com.google.privacy.dlp.v2.StorageMetadataLabel value) { - if (storageLabelBuilder_ == null) { - if (labelCase_ == 3 && - label_ != com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance()) { - label_ = com.google.privacy.dlp.v2.StorageMetadataLabel.newBuilder((com.google.privacy.dlp.v2.StorageMetadataLabel) label_) - .mergeFrom(value).buildPartial(); - } else { - label_ = value; - } - onChanged(); - } else { - if (labelCase_ == 3) { - storageLabelBuilder_.mergeFrom(value); - } else { - storageLabelBuilder_.setMessage(value); - } - } - labelCase_ = 3; - return this; - } - /** - *
-     * Storage metadata.
-     * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - */ - public Builder clearStorageLabel() { - if (storageLabelBuilder_ == null) { - if (labelCase_ == 3) { - labelCase_ = 0; - label_ = null; - onChanged(); - } - } else { - if (labelCase_ == 3) { - labelCase_ = 0; - label_ = null; - } - storageLabelBuilder_.clear(); - } - return this; - } - /** - *
-     * Storage metadata.
-     * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - */ - public com.google.privacy.dlp.v2.StorageMetadataLabel.Builder getStorageLabelBuilder() { - return getStorageLabelFieldBuilder().getBuilder(); - } - /** - *
-     * Storage metadata.
-     * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder getStorageLabelOrBuilder() { - if ((labelCase_ == 3) && (storageLabelBuilder_ != null)) { - return storageLabelBuilder_.getMessageOrBuilder(); - } else { - if (labelCase_ == 3) { - return (com.google.privacy.dlp.v2.StorageMetadataLabel) label_; - } - return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); - } - } - /** - *
-     * Storage metadata.
-     * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StorageMetadataLabel, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder, com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder> - getStorageLabelFieldBuilder() { - if (storageLabelBuilder_ == null) { - if (!(labelCase_ == 3)) { - label_ = com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); - } - storageLabelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StorageMetadataLabel, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder, com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder>( - (com.google.privacy.dlp.v2.StorageMetadataLabel) label_, - getParentForChildren(), - isClean()); - label_ = null; - } - labelCase_ = 3; - onChanged();; - return storageLabelBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.MetadataLocation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.MetadataLocation) - private static final com.google.privacy.dlp.v2.MetadataLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.MetadataLocation(); - } - - public static com.google.privacy.dlp.v2.MetadataLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MetadataLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MetadataLocation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.MetadataLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocationOrBuilder.java deleted file mode 100644 index 19acf67d1cc2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataLocationOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface MetadataLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.MetadataLocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Type of metadata containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.MetadataType type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-   * Type of metadata containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.MetadataType type = 1; - * @return The type. - */ - com.google.privacy.dlp.v2.MetadataType getType(); - - /** - *
-   * Storage metadata.
-   * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - * @return Whether the storageLabel field is set. - */ - boolean hasStorageLabel(); - /** - *
-   * Storage metadata.
-   * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - * @return The storageLabel. - */ - com.google.privacy.dlp.v2.StorageMetadataLabel getStorageLabel(); - /** - *
-   * Storage metadata.
-   * 
- * - * .google.privacy.dlp.v2.StorageMetadataLabel storage_label = 3; - */ - com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder getStorageLabelOrBuilder(); - - public com.google.privacy.dlp.v2.MetadataLocation.LabelCase getLabelCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java deleted file mode 100644 index e9065a0e78c7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/MetadataType.java +++ /dev/null @@ -1,133 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Type of metadata containing the finding.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.MetadataType} - */ -public enum MetadataType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unused
-   * 
- * - * METADATATYPE_UNSPECIFIED = 0; - */ - METADATATYPE_UNSPECIFIED(0), - /** - *
-   * General file metadata provided by Cloud Storage.
-   * 
- * - * STORAGE_METADATA = 2; - */ - STORAGE_METADATA(2), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unused
-   * 
- * - * METADATATYPE_UNSPECIFIED = 0; - */ - public static final int METADATATYPE_UNSPECIFIED_VALUE = 0; - /** - *
-   * General file metadata provided by Cloud Storage.
-   * 
- * - * STORAGE_METADATA = 2; - */ - public static final int STORAGE_METADATA_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MetadataType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static MetadataType forNumber(int value) { - switch (value) { - case 0: return METADATATYPE_UNSPECIFIED; - case 2: return STORAGE_METADATA; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - MetadataType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MetadataType findValueByNumber(int number) { - return MetadataType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(6); - } - - private static final MetadataType[] VALUES = values(); - - public static MetadataType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MetadataType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.MetadataType) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationLocationName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationLocationName.java deleted file mode 100644 index b69e6d4d41bf..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationLocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class OrganizationLocationName implements ResourceName { - private static final PathTemplate ORGANIZATION_LOCATION = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String organization; - private final String location; - - @Deprecated - protected OrganizationLocationName() { - organization = null; - location = null; - } - - private OrganizationLocationName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getOrganization() { - return organization; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static OrganizationLocationName of(String organization, String location) { - return newBuilder().setOrganization(organization).setLocation(location).build(); - } - - public static String format(String organization, String location) { - return newBuilder().setOrganization(organization).setLocation(location).build().toString(); - } - - public static OrganizationLocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - ORGANIZATION_LOCATION.validatedMatch( - formattedString, "OrganizationLocationName.parse: formattedString not in valid format"); - return of(matchMap.get("organization"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (OrganizationLocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (organization != null) { - fieldMapBuilder.put("organization", organization); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return ORGANIZATION_LOCATION.instantiate("organization", organization, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - OrganizationLocationName that = ((OrganizationLocationName) o); - return Objects.equals(this.organization, that.organization) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(organization); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for organizations/{organization}/locations/{location}. */ - public static class Builder { - private String organization; - private String location; - - protected Builder() {} - - public String getOrganization() { - return organization; - } - - public String getLocation() { - return location; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(OrganizationLocationName organizationLocationName) { - this.organization = organizationLocationName.organization; - this.location = organizationLocationName.location; - } - - public OrganizationLocationName build() { - return new OrganizationLocationName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationName.java deleted file mode 100644 index 493c147980d2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OrganizationName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class OrganizationName implements ResourceName { - private static final PathTemplate ORGANIZATION = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}"); - private volatile Map fieldValuesMap; - private final String organization; - - @Deprecated - protected OrganizationName() { - organization = null; - } - - private OrganizationName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - } - - public String getOrganization() { - return organization; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static OrganizationName of(String organization) { - return newBuilder().setOrganization(organization).build(); - } - - public static String format(String organization) { - return newBuilder().setOrganization(organization).build().toString(); - } - - public static OrganizationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - ORGANIZATION.validatedMatch( - formattedString, "OrganizationName.parse: formattedString not in valid format"); - return of(matchMap.get("organization")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (OrganizationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (organization != null) { - fieldMapBuilder.put("organization", organization); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return ORGANIZATION.instantiate("organization", organization); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - OrganizationName that = ((OrganizationName) o); - return Objects.equals(this.organization, that.organization); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(organization); - return h; - } - - /** Builder for organizations/{organization}. */ - public static class Builder { - private String organization; - - protected Builder() {} - - public String getOrganization() { - return organization; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - private Builder(OrganizationName organizationName) { - this.organization = organizationName.organization; - } - - public OrganizationName build() { - return new OrganizationName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java deleted file mode 100644 index 89636aaa4cbc..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummary.java +++ /dev/null @@ -1,749 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Infotype details for other infoTypes found within a column.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.OtherInfoTypeSummary} - */ -public final class OtherInfoTypeSummary extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.OtherInfoTypeSummary) - OtherInfoTypeSummaryOrBuilder { -private static final long serialVersionUID = 0L; - // Use OtherInfoTypeSummary.newBuilder() to construct. - private OtherInfoTypeSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OtherInfoTypeSummary() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OtherInfoTypeSummary(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OtherInfoTypeSummary( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (infoType_ != null) { - subBuilder = infoType_.toBuilder(); - } - infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infoType_); - infoType_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - estimatedPrevalence_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.OtherInfoTypeSummary.class, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder.class); - } - - public static final int INFO_TYPE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.InfoType infoType_; - /** - *
-   * The other infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return infoType_ != null; - } - /** - *
-   * The other infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - /** - *
-   * The other infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - return getInfoType(); - } - - public static final int ESTIMATED_PREVALENCE_FIELD_NUMBER = 2; - private int estimatedPrevalence_; - /** - *
-   * Approximate percentage of non-null rows that contained data detected by
-   * this infotype.
-   * 
- * - * int32 estimated_prevalence = 2; - * @return The estimatedPrevalence. - */ - @java.lang.Override - public int getEstimatedPrevalence() { - return estimatedPrevalence_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (infoType_ != null) { - output.writeMessage(1, getInfoType()); - } - if (estimatedPrevalence_ != 0) { - output.writeInt32(2, estimatedPrevalence_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (infoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInfoType()); - } - if (estimatedPrevalence_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, estimatedPrevalence_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.OtherInfoTypeSummary)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.OtherInfoTypeSummary other = (com.google.privacy.dlp.v2.OtherInfoTypeSummary) obj; - - if (hasInfoType() != other.hasInfoType()) return false; - if (hasInfoType()) { - if (!getInfoType() - .equals(other.getInfoType())) return false; - } - if (getEstimatedPrevalence() - != other.getEstimatedPrevalence()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInfoType()) { - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - } - hash = (37 * hash) + ESTIMATED_PREVALENCE_FIELD_NUMBER; - hash = (53 * hash) + getEstimatedPrevalence(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.OtherInfoTypeSummary prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Infotype details for other infoTypes found within a column.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.OtherInfoTypeSummary} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.OtherInfoTypeSummary) - com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.OtherInfoTypeSummary.class, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.OtherInfoTypeSummary.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypeBuilder_ == null) { - infoType_ = null; - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - estimatedPrevalence_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OtherInfoTypeSummary_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.OtherInfoTypeSummary getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.OtherInfoTypeSummary.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.OtherInfoTypeSummary build() { - com.google.privacy.dlp.v2.OtherInfoTypeSummary result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.OtherInfoTypeSummary buildPartial() { - com.google.privacy.dlp.v2.OtherInfoTypeSummary result = new com.google.privacy.dlp.v2.OtherInfoTypeSummary(this); - if (infoTypeBuilder_ == null) { - result.infoType_ = infoType_; - } else { - result.infoType_ = infoTypeBuilder_.build(); - } - result.estimatedPrevalence_ = estimatedPrevalence_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.OtherInfoTypeSummary) { - return mergeFrom((com.google.privacy.dlp.v2.OtherInfoTypeSummary)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.OtherInfoTypeSummary other) { - if (other == com.google.privacy.dlp.v2.OtherInfoTypeSummary.getDefaultInstance()) return this; - if (other.hasInfoType()) { - mergeInfoType(other.getInfoType()); - } - if (other.getEstimatedPrevalence() != 0) { - setEstimatedPrevalence(other.getEstimatedPrevalence()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.OtherInfoTypeSummary parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.OtherInfoTypeSummary) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.InfoType infoType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-     * The other infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - public boolean hasInfoType() { - return infoTypeBuilder_ != null || infoType_ != null; - } - /** - *
-     * The other infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } else { - return infoTypeBuilder_.getMessage(); - } - } - /** - *
-     * The other infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infoType_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The other infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - infoType_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The other infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (infoType_ != null) { - infoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); - } else { - infoType_ = value; - } - onChanged(); - } else { - infoTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The other infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - infoType_ = null; - onChanged(); - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - - return this; - } - /** - *
-     * The other infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - - onChanged(); - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-     * The other infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (infoTypeBuilder_ != null) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - return infoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - } - /** - *
-     * The other infoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getInfoType(), - getParentForChildren(), - isClean()); - infoType_ = null; - } - return infoTypeBuilder_; - } - - private int estimatedPrevalence_ ; - /** - *
-     * Approximate percentage of non-null rows that contained data detected by
-     * this infotype.
-     * 
- * - * int32 estimated_prevalence = 2; - * @return The estimatedPrevalence. - */ - @java.lang.Override - public int getEstimatedPrevalence() { - return estimatedPrevalence_; - } - /** - *
-     * Approximate percentage of non-null rows that contained data detected by
-     * this infotype.
-     * 
- * - * int32 estimated_prevalence = 2; - * @param value The estimatedPrevalence to set. - * @return This builder for chaining. - */ - public Builder setEstimatedPrevalence(int value) { - - estimatedPrevalence_ = value; - onChanged(); - return this; - } - /** - *
-     * Approximate percentage of non-null rows that contained data detected by
-     * this infotype.
-     * 
- * - * int32 estimated_prevalence = 2; - * @return This builder for chaining. - */ - public Builder clearEstimatedPrevalence() { - - estimatedPrevalence_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.OtherInfoTypeSummary) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.OtherInfoTypeSummary) - private static final com.google.privacy.dlp.v2.OtherInfoTypeSummary DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.OtherInfoTypeSummary(); - } - - public static com.google.privacy.dlp.v2.OtherInfoTypeSummary getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OtherInfoTypeSummary parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OtherInfoTypeSummary(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.OtherInfoTypeSummary getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java deleted file mode 100644 index 471c73ef5596..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OtherInfoTypeSummaryOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface OtherInfoTypeSummaryOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.OtherInfoTypeSummary) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The other infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-   * The other infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-   * The other infoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-   * Approximate percentage of non-null rows that contained data detected by
-   * this infotype.
-   * 
- * - * int32 estimated_prevalence = 2; - * @return The estimatedPrevalence. - */ - int getEstimatedPrevalence(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java deleted file mode 100644 index bd8ca8731340..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java +++ /dev/null @@ -1,1272 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Cloud repository for storing output.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.OutputStorageConfig} - */ -public final class OutputStorageConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.OutputStorageConfig) - OutputStorageConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputStorageConfig.newBuilder() to construct. - private OutputStorageConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputStorageConfig() { - outputSchema_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputStorageConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputStorageConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (typeCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.BigQueryTable) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryTable) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 1; - break; - } - case 24: { - int rawValue = input.readEnum(); - - outputSchema_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.OutputStorageConfig.class, com.google.privacy.dlp.v2.OutputStorageConfig.Builder.class); - } - - /** - *
-   * Predefined schemas for storing findings.
-   * Only for use with external storage.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.OutputStorageConfig.OutputSchema} - */ - public enum OutputSchema - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * OUTPUT_SCHEMA_UNSPECIFIED = 0; - */ - OUTPUT_SCHEMA_UNSPECIFIED(0), - /** - *
-     * Basic schema including only `info_type`, `quote`, `certainty`, and
-     * `timestamp`.
-     * 
- * - * BASIC_COLUMNS = 1; - */ - BASIC_COLUMNS(1), - /** - *
-     * Schema tailored to findings from scanning Cloud Storage.
-     * 
- * - * GCS_COLUMNS = 2; - */ - GCS_COLUMNS(2), - /** - *
-     * Schema tailored to findings from scanning Google Datastore.
-     * 
- * - * DATASTORE_COLUMNS = 3; - */ - DATASTORE_COLUMNS(3), - /** - *
-     * Schema tailored to findings from scanning Google BigQuery.
-     * 
- * - * BIG_QUERY_COLUMNS = 4; - */ - BIG_QUERY_COLUMNS(4), - /** - *
-     * Schema containing all columns.
-     * 
- * - * ALL_COLUMNS = 5; - */ - ALL_COLUMNS(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * OUTPUT_SCHEMA_UNSPECIFIED = 0; - */ - public static final int OUTPUT_SCHEMA_UNSPECIFIED_VALUE = 0; - /** - *
-     * Basic schema including only `info_type`, `quote`, `certainty`, and
-     * `timestamp`.
-     * 
- * - * BASIC_COLUMNS = 1; - */ - public static final int BASIC_COLUMNS_VALUE = 1; - /** - *
-     * Schema tailored to findings from scanning Cloud Storage.
-     * 
- * - * GCS_COLUMNS = 2; - */ - public static final int GCS_COLUMNS_VALUE = 2; - /** - *
-     * Schema tailored to findings from scanning Google Datastore.
-     * 
- * - * DATASTORE_COLUMNS = 3; - */ - public static final int DATASTORE_COLUMNS_VALUE = 3; - /** - *
-     * Schema tailored to findings from scanning Google BigQuery.
-     * 
- * - * BIG_QUERY_COLUMNS = 4; - */ - public static final int BIG_QUERY_COLUMNS_VALUE = 4; - /** - *
-     * Schema containing all columns.
-     * 
- * - * ALL_COLUMNS = 5; - */ - public static final int ALL_COLUMNS_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OutputSchema valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static OutputSchema forNumber(int value) { - switch (value) { - case 0: return OUTPUT_SCHEMA_UNSPECIFIED; - case 1: return BASIC_COLUMNS; - case 2: return GCS_COLUMNS; - case 3: return DATASTORE_COLUMNS; - case 4: return BIG_QUERY_COLUMNS; - case 5: return ALL_COLUMNS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - OutputSchema> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public OutputSchema findValueByNumber(int number) { - return OutputSchema.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.OutputStorageConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final OutputSchema[] VALUES = values(); - - public static OutputSchema valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private OutputSchema(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.OutputStorageConfig.OutputSchema) - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TABLE(1), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return TABLE; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int TABLE_FIELD_NUMBER = 1; - /** - *
-   * Store findings in an existing table or a new table in an existing
-   * dataset. If table_id is not set a new one will be generated
-   * for you with the following format:
-   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-   * for generating the date details.
-   * For Inspect, each column in an existing output table must have the same
-   * name, type, and mode of a field in the `Finding` object.
-   * For Risk, an existing output table should be the output of a previous
-   * Risk analysis job run on the same source table, with the same privacy
-   * metric and quasi-identifiers. Risk jobs that analyze the same table but
-   * compute a different privacy metric, or use different sets of
-   * quasi-identifiers, cannot store their results in the same table.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return Whether the table field is set. - */ - @java.lang.Override - public boolean hasTable() { - return typeCase_ == 1; - } - /** - *
-   * Store findings in an existing table or a new table in an existing
-   * dataset. If table_id is not set a new one will be generated
-   * for you with the following format:
-   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-   * for generating the date details.
-   * For Inspect, each column in an existing output table must have the same
-   * name, type, and mode of a field in the `Finding` object.
-   * For Risk, an existing output table should be the output of a previous
-   * Risk analysis job run on the same source table, with the same privacy
-   * metric and quasi-identifiers. Risk jobs that analyze the same table but
-   * compute a different privacy metric, or use different sets of
-   * quasi-identifiers, cannot store their results in the same table.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return The table. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getTable() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.BigQueryTable) type_; - } - return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); - } - /** - *
-   * Store findings in an existing table or a new table in an existing
-   * dataset. If table_id is not set a new one will be generated
-   * for you with the following format:
-   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-   * for generating the date details.
-   * For Inspect, each column in an existing output table must have the same
-   * name, type, and mode of a field in the `Finding` object.
-   * For Risk, an existing output table should be the output of a previous
-   * Risk analysis job run on the same source table, with the same privacy
-   * metric and quasi-identifiers. Risk jobs that analyze the same table but
-   * compute a different privacy metric, or use different sets of
-   * quasi-identifiers, cannot store their results in the same table.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.BigQueryTable) type_; - } - return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); - } - - public static final int OUTPUT_SCHEMA_FIELD_NUMBER = 3; - private int outputSchema_; - /** - *
-   * Schema used for writing the findings for Inspect jobs. This field is only
-   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
-   * from the `Finding` object. If appending to an existing table, any columns
-   * from the predefined schema that are missing will be added. No columns in
-   * the existing table will be deleted.
-   * If unspecified, then all available columns will be used for a new table or
-   * an (existing) table with no schema, and no changes will be made to an
-   * existing table that has a schema.
-   * Only for use with external storage.
-   * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; - * @return The enum numeric value on the wire for outputSchema. - */ - @java.lang.Override public int getOutputSchemaValue() { - return outputSchema_; - } - /** - *
-   * Schema used for writing the findings for Inspect jobs. This field is only
-   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
-   * from the `Finding` object. If appending to an existing table, any columns
-   * from the predefined schema that are missing will be added. No columns in
-   * the existing table will be deleted.
-   * If unspecified, then all available columns will be used for a new table or
-   * an (existing) table with no schema, and no changes will be made to an
-   * existing table that has a schema.
-   * Only for use with external storage.
-   * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; - * @return The outputSchema. - */ - @java.lang.Override public com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema getOutputSchema() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema result = com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.valueOf(outputSchema_); - return result == null ? com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.BigQueryTable) type_); - } - if (outputSchema_ != com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.OUTPUT_SCHEMA_UNSPECIFIED.getNumber()) { - output.writeEnum(3, outputSchema_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.BigQueryTable) type_); - } - if (outputSchema_ != com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.OUTPUT_SCHEMA_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, outputSchema_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.OutputStorageConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.OutputStorageConfig other = (com.google.privacy.dlp.v2.OutputStorageConfig) obj; - - if (outputSchema_ != other.outputSchema_) return false; - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 1: - if (!getTable() - .equals(other.getTable())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + OUTPUT_SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + outputSchema_; - switch (typeCase_) { - case 1: - hash = (37 * hash) + TABLE_FIELD_NUMBER; - hash = (53 * hash) + getTable().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.OutputStorageConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.OutputStorageConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Cloud repository for storing output.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.OutputStorageConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.OutputStorageConfig) - com.google.privacy.dlp.v2.OutputStorageConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.OutputStorageConfig.class, com.google.privacy.dlp.v2.OutputStorageConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.OutputStorageConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - outputSchema_ = 0; - - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_OutputStorageConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.OutputStorageConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.OutputStorageConfig build() { - com.google.privacy.dlp.v2.OutputStorageConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.OutputStorageConfig buildPartial() { - com.google.privacy.dlp.v2.OutputStorageConfig result = new com.google.privacy.dlp.v2.OutputStorageConfig(this); - if (typeCase_ == 1) { - if (tableBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = tableBuilder_.build(); - } - } - result.outputSchema_ = outputSchema_; - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.OutputStorageConfig) { - return mergeFrom((com.google.privacy.dlp.v2.OutputStorageConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.OutputStorageConfig other) { - if (other == com.google.privacy.dlp.v2.OutputStorageConfig.getDefaultInstance()) return this; - if (other.outputSchema_ != 0) { - setOutputSchemaValue(other.getOutputSchemaValue()); - } - switch (other.getTypeCase()) { - case TABLE: { - mergeTable(other.getTable()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.OutputStorageConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.OutputStorageConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; - /** - *
-     * Store findings in an existing table or a new table in an existing
-     * dataset. If table_id is not set a new one will be generated
-     * for you with the following format:
-     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-     * for generating the date details.
-     * For Inspect, each column in an existing output table must have the same
-     * name, type, and mode of a field in the `Finding` object.
-     * For Risk, an existing output table should be the output of a previous
-     * Risk analysis job run on the same source table, with the same privacy
-     * metric and quasi-identifiers. Risk jobs that analyze the same table but
-     * compute a different privacy metric, or use different sets of
-     * quasi-identifiers, cannot store their results in the same table.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return Whether the table field is set. - */ - @java.lang.Override - public boolean hasTable() { - return typeCase_ == 1; - } - /** - *
-     * Store findings in an existing table or a new table in an existing
-     * dataset. If table_id is not set a new one will be generated
-     * for you with the following format:
-     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-     * for generating the date details.
-     * For Inspect, each column in an existing output table must have the same
-     * name, type, and mode of a field in the `Finding` object.
-     * For Risk, an existing output table should be the output of a previous
-     * Risk analysis job run on the same source table, with the same privacy
-     * metric and quasi-identifiers. Risk jobs that analyze the same table but
-     * compute a different privacy metric, or use different sets of
-     * quasi-identifiers, cannot store their results in the same table.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return The table. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getTable() { - if (tableBuilder_ == null) { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.BigQueryTable) type_; - } - return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); - } else { - if (typeCase_ == 1) { - return tableBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); - } - } - /** - *
-     * Store findings in an existing table or a new table in an existing
-     * dataset. If table_id is not set a new one will be generated
-     * for you with the following format:
-     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-     * for generating the date details.
-     * For Inspect, each column in an existing output table must have the same
-     * name, type, and mode of a field in the `Finding` object.
-     * For Risk, an existing output table should be the output of a previous
-     * Risk analysis job run on the same source table, with the same privacy
-     * metric and quasi-identifiers. Risk jobs that analyze the same table but
-     * compute a different privacy metric, or use different sets of
-     * quasi-identifiers, cannot store their results in the same table.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - tableBuilder_.setMessage(value); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Store findings in an existing table or a new table in an existing
-     * dataset. If table_id is not set a new one will be generated
-     * for you with the following format:
-     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-     * for generating the date details.
-     * For Inspect, each column in an existing output table must have the same
-     * name, type, and mode of a field in the `Finding` object.
-     * For Risk, an existing output table should be the output of a previous
-     * Risk analysis job run on the same source table, with the same privacy
-     * metric and quasi-identifiers. Risk jobs that analyze the same table but
-     * compute a different privacy metric, or use different sets of
-     * quasi-identifiers, cannot store their results in the same table.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public Builder setTable( - com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { - if (tableBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - tableBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Store findings in an existing table or a new table in an existing
-     * dataset. If table_id is not set a new one will be generated
-     * for you with the following format:
-     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-     * for generating the date details.
-     * For Inspect, each column in an existing output table must have the same
-     * name, type, and mode of a field in the `Finding` object.
-     * For Risk, an existing output table should be the output of a previous
-     * Risk analysis job run on the same source table, with the same privacy
-     * metric and quasi-identifiers. Risk jobs that analyze the same table but
-     * compute a different privacy metric, or use different sets of
-     * quasi-identifiers, cannot store their results in the same table.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableBuilder_ == null) { - if (typeCase_ == 1 && - type_ != com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.BigQueryTable.newBuilder((com.google.privacy.dlp.v2.BigQueryTable) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 1) { - tableBuilder_.mergeFrom(value); - } else { - tableBuilder_.setMessage(value); - } - } - typeCase_ = 1; - return this; - } - /** - *
-     * Store findings in an existing table or a new table in an existing
-     * dataset. If table_id is not set a new one will be generated
-     * for you with the following format:
-     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-     * for generating the date details.
-     * For Inspect, each column in an existing output table must have the same
-     * name, type, and mode of a field in the `Finding` object.
-     * For Risk, an existing output table should be the output of a previous
-     * Risk analysis job run on the same source table, with the same privacy
-     * metric and quasi-identifiers. Risk jobs that analyze the same table but
-     * compute a different privacy metric, or use different sets of
-     * quasi-identifiers, cannot store their results in the same table.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public Builder clearTable() { - if (tableBuilder_ == null) { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - } - tableBuilder_.clear(); - } - return this; - } - /** - *
-     * Store findings in an existing table or a new table in an existing
-     * dataset. If table_id is not set a new one will be generated
-     * for you with the following format:
-     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-     * for generating the date details.
-     * For Inspect, each column in an existing output table must have the same
-     * name, type, and mode of a field in the `Finding` object.
-     * For Risk, an existing output table should be the output of a previous
-     * Risk analysis job run on the same source table, with the same privacy
-     * metric and quasi-identifiers. Risk jobs that analyze the same table but
-     * compute a different privacy metric, or use different sets of
-     * quasi-identifiers, cannot store their results in the same table.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { - return getTableFieldBuilder().getBuilder(); - } - /** - *
-     * Store findings in an existing table or a new table in an existing
-     * dataset. If table_id is not set a new one will be generated
-     * for you with the following format:
-     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-     * for generating the date details.
-     * For Inspect, each column in an existing output table must have the same
-     * name, type, and mode of a field in the `Finding` object.
-     * For Risk, an existing output table should be the output of a previous
-     * Risk analysis job run on the same source table, with the same privacy
-     * metric and quasi-identifiers. Risk jobs that analyze the same table but
-     * compute a different privacy metric, or use different sets of
-     * quasi-identifiers, cannot store their results in the same table.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { - if ((typeCase_ == 1) && (tableBuilder_ != null)) { - return tableBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.BigQueryTable) type_; - } - return com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); - } - } - /** - *
-     * Store findings in an existing table or a new table in an existing
-     * dataset. If table_id is not set a new one will be generated
-     * for you with the following format:
-     * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-     * for generating the date details.
-     * For Inspect, each column in an existing output table must have the same
-     * name, type, and mode of a field in the `Finding` object.
-     * For Risk, an existing output table should be the output of a previous
-     * Risk analysis job run on the same source table, with the same privacy
-     * metric and quasi-identifiers. Risk jobs that analyze the same table but
-     * compute a different privacy metric, or use different sets of
-     * quasi-identifiers, cannot store their results in the same table.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> - getTableFieldBuilder() { - if (tableBuilder_ == null) { - if (!(typeCase_ == 1)) { - type_ = com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance(); - } - tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( - (com.google.privacy.dlp.v2.BigQueryTable) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 1; - onChanged();; - return tableBuilder_; - } - - private int outputSchema_ = 0; - /** - *
-     * Schema used for writing the findings for Inspect jobs. This field is only
-     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
-     * from the `Finding` object. If appending to an existing table, any columns
-     * from the predefined schema that are missing will be added. No columns in
-     * the existing table will be deleted.
-     * If unspecified, then all available columns will be used for a new table or
-     * an (existing) table with no schema, and no changes will be made to an
-     * existing table that has a schema.
-     * Only for use with external storage.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; - * @return The enum numeric value on the wire for outputSchema. - */ - @java.lang.Override public int getOutputSchemaValue() { - return outputSchema_; - } - /** - *
-     * Schema used for writing the findings for Inspect jobs. This field is only
-     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
-     * from the `Finding` object. If appending to an existing table, any columns
-     * from the predefined schema that are missing will be added. No columns in
-     * the existing table will be deleted.
-     * If unspecified, then all available columns will be used for a new table or
-     * an (existing) table with no schema, and no changes will be made to an
-     * existing table that has a schema.
-     * Only for use with external storage.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; - * @param value The enum numeric value on the wire for outputSchema to set. - * @return This builder for chaining. - */ - public Builder setOutputSchemaValue(int value) { - - outputSchema_ = value; - onChanged(); - return this; - } - /** - *
-     * Schema used for writing the findings for Inspect jobs. This field is only
-     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
-     * from the `Finding` object. If appending to an existing table, any columns
-     * from the predefined schema that are missing will be added. No columns in
-     * the existing table will be deleted.
-     * If unspecified, then all available columns will be used for a new table or
-     * an (existing) table with no schema, and no changes will be made to an
-     * existing table that has a schema.
-     * Only for use with external storage.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; - * @return The outputSchema. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema getOutputSchema() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema result = com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.valueOf(outputSchema_); - return result == null ? com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema.UNRECOGNIZED : result; - } - /** - *
-     * Schema used for writing the findings for Inspect jobs. This field is only
-     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
-     * from the `Finding` object. If appending to an existing table, any columns
-     * from the predefined schema that are missing will be added. No columns in
-     * the existing table will be deleted.
-     * If unspecified, then all available columns will be used for a new table or
-     * an (existing) table with no schema, and no changes will be made to an
-     * existing table that has a schema.
-     * Only for use with external storage.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; - * @param value The outputSchema to set. - * @return This builder for chaining. - */ - public Builder setOutputSchema(com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema value) { - if (value == null) { - throw new NullPointerException(); - } - - outputSchema_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Schema used for writing the findings for Inspect jobs. This field is only
-     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
-     * from the `Finding` object. If appending to an existing table, any columns
-     * from the predefined schema that are missing will be added. No columns in
-     * the existing table will be deleted.
-     * If unspecified, then all available columns will be used for a new table or
-     * an (existing) table with no schema, and no changes will be made to an
-     * existing table that has a schema.
-     * Only for use with external storage.
-     * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; - * @return This builder for chaining. - */ - public Builder clearOutputSchema() { - - outputSchema_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.OutputStorageConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.OutputStorageConfig) - private static final com.google.privacy.dlp.v2.OutputStorageConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.OutputStorageConfig(); - } - - public static com.google.privacy.dlp.v2.OutputStorageConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputStorageConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputStorageConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.OutputStorageConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java deleted file mode 100644 index 1c192782abd9..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java +++ /dev/null @@ -1,106 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface OutputStorageConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.OutputStorageConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Store findings in an existing table or a new table in an existing
-   * dataset. If table_id is not set a new one will be generated
-   * for you with the following format:
-   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-   * for generating the date details.
-   * For Inspect, each column in an existing output table must have the same
-   * name, type, and mode of a field in the `Finding` object.
-   * For Risk, an existing output table should be the output of a previous
-   * Risk analysis job run on the same source table, with the same privacy
-   * metric and quasi-identifiers. Risk jobs that analyze the same table but
-   * compute a different privacy metric, or use different sets of
-   * quasi-identifiers, cannot store their results in the same table.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return Whether the table field is set. - */ - boolean hasTable(); - /** - *
-   * Store findings in an existing table or a new table in an existing
-   * dataset. If table_id is not set a new one will be generated
-   * for you with the following format:
-   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-   * for generating the date details.
-   * For Inspect, each column in an existing output table must have the same
-   * name, type, and mode of a field in the `Finding` object.
-   * For Risk, an existing output table should be the output of a previous
-   * Risk analysis job run on the same source table, with the same privacy
-   * metric and quasi-identifiers. Risk jobs that analyze the same table but
-   * compute a different privacy metric, or use different sets of
-   * quasi-identifiers, cannot store their results in the same table.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - * @return The table. - */ - com.google.privacy.dlp.v2.BigQueryTable getTable(); - /** - *
-   * Store findings in an existing table or a new table in an existing
-   * dataset. If table_id is not set a new one will be generated
-   * for you with the following format:
-   * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used
-   * for generating the date details.
-   * For Inspect, each column in an existing output table must have the same
-   * name, type, and mode of a field in the `Finding` object.
-   * For Risk, an existing output table should be the output of a previous
-   * Risk analysis job run on the same source table, with the same privacy
-   * metric and quasi-identifiers. Risk jobs that analyze the same table but
-   * compute a different privacy metric, or use different sets of
-   * quasi-identifiers, cannot store their results in the same table.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 1; - */ - com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); - - /** - *
-   * Schema used for writing the findings for Inspect jobs. This field is only
-   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
-   * from the `Finding` object. If appending to an existing table, any columns
-   * from the predefined schema that are missing will be added. No columns in
-   * the existing table will be deleted.
-   * If unspecified, then all available columns will be used for a new table or
-   * an (existing) table with no schema, and no changes will be made to an
-   * existing table that has a schema.
-   * Only for use with external storage.
-   * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; - * @return The enum numeric value on the wire for outputSchema. - */ - int getOutputSchemaValue(); - /** - *
-   * Schema used for writing the findings for Inspect jobs. This field is only
-   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
-   * from the `Finding` object. If appending to an existing table, any columns
-   * from the predefined schema that are missing will be added. No columns in
-   * the existing table will be deleted.
-   * If unspecified, then all available columns will be used for a new table or
-   * an (existing) table with no schema, and no changes will be made to an
-   * existing table that has a schema.
-   * Only for use with external storage.
-   * 
- * - * .google.privacy.dlp.v2.OutputStorageConfig.OutputSchema output_schema = 3; - * @return The outputSchema. - */ - com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema getOutputSchema(); - - public com.google.privacy.dlp.v2.OutputStorageConfig.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionId.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionId.java deleted file mode 100644 index a71296aa8f16..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionId.java +++ /dev/null @@ -1,769 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Datastore partition ID.
- * A partition ID identifies a grouping of entities. The grouping is always
- * by project and namespace, however the namespace ID may be empty.
- * A partition ID contains several dimensions:
- * project ID and namespace ID.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PartitionId} - */ -public final class PartitionId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PartitionId) - PartitionIdOrBuilder { -private static final long serialVersionUID = 0L; - // Use PartitionId.newBuilder() to construct. - private PartitionId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PartitionId() { - projectId_ = ""; - namespaceId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PartitionId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PartitionId( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - namespaceId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PartitionId.class, com.google.privacy.dlp.v2.PartitionId.Builder.class); - } - - public static final int PROJECT_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object projectId_; - /** - *
-   * The ID of the project to which the entities belong.
-   * 
- * - * string project_id = 2; - * @return The projectId. - */ - @java.lang.Override - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } - } - /** - *
-   * The ID of the project to which the entities belong.
-   * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAMESPACE_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object namespaceId_; - /** - *
-   * If not empty, the ID of the namespace to which the entities belong.
-   * 
- * - * string namespace_id = 4; - * @return The namespaceId. - */ - @java.lang.Override - public java.lang.String getNamespaceId() { - java.lang.Object ref = namespaceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - namespaceId_ = s; - return s; - } - } - /** - *
-   * If not empty, the ID of the namespace to which the entities belong.
-   * 
- * - * string namespace_id = 4; - * @return The bytes for namespaceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNamespaceIdBytes() { - java.lang.Object ref = namespaceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - namespaceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, namespaceId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespaceId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, namespaceId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PartitionId)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PartitionId other = (com.google.privacy.dlp.v2.PartitionId) obj; - - if (!getProjectId() - .equals(other.getProjectId())) return false; - if (!getNamespaceId() - .equals(other.getNamespaceId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getProjectId().hashCode(); - hash = (37 * hash) + NAMESPACE_ID_FIELD_NUMBER; - hash = (53 * hash) + getNamespaceId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PartitionId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PartitionId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PartitionId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PartitionId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PartitionId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PartitionId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PartitionId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PartitionId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PartitionId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PartitionId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PartitionId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PartitionId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PartitionId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Datastore partition ID.
-   * A partition ID identifies a grouping of entities. The grouping is always
-   * by project and namespace, however the namespace ID may be empty.
-   * A partition ID contains several dimensions:
-   * project ID and namespace ID.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PartitionId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PartitionId) - com.google.privacy.dlp.v2.PartitionIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PartitionId.class, com.google.privacy.dlp.v2.PartitionId.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PartitionId.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - projectId_ = ""; - - namespaceId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_PartitionId_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PartitionId getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PartitionId.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PartitionId build() { - com.google.privacy.dlp.v2.PartitionId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PartitionId buildPartial() { - com.google.privacy.dlp.v2.PartitionId result = new com.google.privacy.dlp.v2.PartitionId(this); - result.projectId_ = projectId_; - result.namespaceId_ = namespaceId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PartitionId) { - return mergeFrom((com.google.privacy.dlp.v2.PartitionId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PartitionId other) { - if (other == com.google.privacy.dlp.v2.PartitionId.getDefaultInstance()) return this; - if (!other.getProjectId().isEmpty()) { - projectId_ = other.projectId_; - onChanged(); - } - if (!other.getNamespaceId().isEmpty()) { - namespaceId_ = other.namespaceId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PartitionId parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PartitionId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object projectId_ = ""; - /** - *
-     * The ID of the project to which the entities belong.
-     * 
- * - * string project_id = 2; - * @return The projectId. - */ - public java.lang.String getProjectId() { - java.lang.Object ref = projectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The ID of the project to which the entities belong.
-     * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - public com.google.protobuf.ByteString - getProjectIdBytes() { - java.lang.Object ref = projectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The ID of the project to which the entities belong.
-     * 
- * - * string project_id = 2; - * @param value The projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectId_ = value; - onChanged(); - return this; - } - /** - *
-     * The ID of the project to which the entities belong.
-     * 
- * - * string project_id = 2; - * @return This builder for chaining. - */ - public Builder clearProjectId() { - - projectId_ = getDefaultInstance().getProjectId(); - onChanged(); - return this; - } - /** - *
-     * The ID of the project to which the entities belong.
-     * 
- * - * string project_id = 2; - * @param value The bytes for projectId to set. - * @return This builder for chaining. - */ - public Builder setProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object namespaceId_ = ""; - /** - *
-     * If not empty, the ID of the namespace to which the entities belong.
-     * 
- * - * string namespace_id = 4; - * @return The namespaceId. - */ - public java.lang.String getNamespaceId() { - java.lang.Object ref = namespaceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - namespaceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If not empty, the ID of the namespace to which the entities belong.
-     * 
- * - * string namespace_id = 4; - * @return The bytes for namespaceId. - */ - public com.google.protobuf.ByteString - getNamespaceIdBytes() { - java.lang.Object ref = namespaceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - namespaceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If not empty, the ID of the namespace to which the entities belong.
-     * 
- * - * string namespace_id = 4; - * @param value The namespaceId to set. - * @return This builder for chaining. - */ - public Builder setNamespaceId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - namespaceId_ = value; - onChanged(); - return this; - } - /** - *
-     * If not empty, the ID of the namespace to which the entities belong.
-     * 
- * - * string namespace_id = 4; - * @return This builder for chaining. - */ - public Builder clearNamespaceId() { - - namespaceId_ = getDefaultInstance().getNamespaceId(); - onChanged(); - return this; - } - /** - *
-     * If not empty, the ID of the namespace to which the entities belong.
-     * 
- * - * string namespace_id = 4; - * @param value The bytes for namespaceId to set. - * @return This builder for chaining. - */ - public Builder setNamespaceIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - namespaceId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PartitionId) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PartitionId) - private static final com.google.privacy.dlp.v2.PartitionId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PartitionId(); - } - - public static com.google.privacy.dlp.v2.PartitionId getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PartitionId parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PartitionId(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PartitionId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionIdOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionIdOrBuilder.java deleted file mode 100644 index f386a5d70556..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PartitionIdOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface PartitionIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PartitionId) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The ID of the project to which the entities belong.
-   * 
- * - * string project_id = 2; - * @return The projectId. - */ - java.lang.String getProjectId(); - /** - *
-   * The ID of the project to which the entities belong.
-   * 
- * - * string project_id = 2; - * @return The bytes for projectId. - */ - com.google.protobuf.ByteString - getProjectIdBytes(); - - /** - *
-   * If not empty, the ID of the namespace to which the entities belong.
-   * 
- * - * string namespace_id = 4; - * @return The namespaceId. - */ - java.lang.String getNamespaceId(); - /** - *
-   * If not empty, the ID of the namespace to which the entities belong.
-   * 
- * - * string namespace_id = 4; - * @return The bytes for namespaceId. - */ - com.google.protobuf.ByteString - getNamespaceIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformation.java deleted file mode 100644 index 64e35f5fb6e8..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformation.java +++ /dev/null @@ -1,3654 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A rule for transforming a value.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrimitiveTransformation} - */ -public final class PrimitiveTransformation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrimitiveTransformation) - PrimitiveTransformationOrBuilder { -private static final long serialVersionUID = 0L; - // Use PrimitiveTransformation.newBuilder() to construct. - private PrimitiveTransformation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PrimitiveTransformation() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PrimitiveTransformation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PrimitiveTransformation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.ReplaceValueConfig.Builder subBuilder = null; - if (transformationCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.ReplaceValueConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.RedactConfig.Builder subBuilder = null; - if (transformationCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.RedactConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.RedactConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.RedactConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.CharacterMaskConfig.Builder subBuilder = null; - if (transformationCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.CharacterMaskConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 3; - break; - } - case 34: { - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder subBuilder = null; - if (transformationCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 4; - break; - } - case 42: { - com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder subBuilder = null; - if (transformationCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.FixedSizeBucketingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 5; - break; - } - case 50: { - com.google.privacy.dlp.v2.BucketingConfig.Builder subBuilder = null; - if (transformationCase_ == 6) { - subBuilder = ((com.google.privacy.dlp.v2.BucketingConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.BucketingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.BucketingConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 6; - break; - } - case 58: { - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder subBuilder = null; - if (transformationCase_ == 7) { - subBuilder = ((com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 7; - break; - } - case 66: { - com.google.privacy.dlp.v2.TimePartConfig.Builder subBuilder = null; - if (transformationCase_ == 8) { - subBuilder = ((com.google.privacy.dlp.v2.TimePartConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.TimePartConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.TimePartConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 8; - break; - } - case 74: { - com.google.privacy.dlp.v2.CryptoHashConfig.Builder subBuilder = null; - if (transformationCase_ == 9) { - subBuilder = ((com.google.privacy.dlp.v2.CryptoHashConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.CryptoHashConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CryptoHashConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 9; - break; - } - case 90: { - com.google.privacy.dlp.v2.DateShiftConfig.Builder subBuilder = null; - if (transformationCase_ == 11) { - subBuilder = ((com.google.privacy.dlp.v2.DateShiftConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.DateShiftConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.DateShiftConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 11; - break; - } - case 98: { - com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder subBuilder = null; - if (transformationCase_ == 12) { - subBuilder = ((com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.CryptoDeterministicConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 12; - break; - } - case 106: { - com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder subBuilder = null; - if (transformationCase_ == 13) { - subBuilder = ((com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_).toBuilder(); - } - transformation_ = - input.readMessage(com.google.privacy.dlp.v2.ReplaceDictionaryConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_); - transformation_ = subBuilder.buildPartial(); - } - transformationCase_ = 13; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrimitiveTransformation.class, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder.class); - } - - private int transformationCase_ = 0; - private java.lang.Object transformation_; - public enum TransformationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - REPLACE_CONFIG(1), - REDACT_CONFIG(2), - CHARACTER_MASK_CONFIG(3), - CRYPTO_REPLACE_FFX_FPE_CONFIG(4), - FIXED_SIZE_BUCKETING_CONFIG(5), - BUCKETING_CONFIG(6), - REPLACE_WITH_INFO_TYPE_CONFIG(7), - TIME_PART_CONFIG(8), - CRYPTO_HASH_CONFIG(9), - DATE_SHIFT_CONFIG(11), - CRYPTO_DETERMINISTIC_CONFIG(12), - REPLACE_DICTIONARY_CONFIG(13), - TRANSFORMATION_NOT_SET(0); - private final int value; - private TransformationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TransformationCase valueOf(int value) { - return forNumber(value); - } - - public static TransformationCase forNumber(int value) { - switch (value) { - case 1: return REPLACE_CONFIG; - case 2: return REDACT_CONFIG; - case 3: return CHARACTER_MASK_CONFIG; - case 4: return CRYPTO_REPLACE_FFX_FPE_CONFIG; - case 5: return FIXED_SIZE_BUCKETING_CONFIG; - case 6: return BUCKETING_CONFIG; - case 7: return REPLACE_WITH_INFO_TYPE_CONFIG; - case 8: return TIME_PART_CONFIG; - case 9: return CRYPTO_HASH_CONFIG; - case 11: return DATE_SHIFT_CONFIG; - case 12: return CRYPTO_DETERMINISTIC_CONFIG; - case 13: return REPLACE_DICTIONARY_CONFIG; - case 0: return TRANSFORMATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TransformationCase - getTransformationCase() { - return TransformationCase.forNumber( - transformationCase_); - } - - public static final int REPLACE_CONFIG_FIELD_NUMBER = 1; - /** - *
-   * Replace with a specified value.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - * @return Whether the replaceConfig field is set. - */ - @java.lang.Override - public boolean hasReplaceConfig() { - return transformationCase_ == 1; - } - /** - *
-   * Replace with a specified value.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - * @return The replaceConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceValueConfig getReplaceConfig() { - if (transformationCase_ == 1) { - return (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); - } - /** - *
-   * Replace with a specified value.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder getReplaceConfigOrBuilder() { - if (transformationCase_ == 1) { - return (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); - } - - public static final int REDACT_CONFIG_FIELD_NUMBER = 2; - /** - *
-   * Redact
-   * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - * @return Whether the redactConfig field is set. - */ - @java.lang.Override - public boolean hasRedactConfig() { - return transformationCase_ == 2; - } - /** - *
-   * Redact
-   * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - * @return The redactConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RedactConfig getRedactConfig() { - if (transformationCase_ == 2) { - return (com.google.privacy.dlp.v2.RedactConfig) transformation_; - } - return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); - } - /** - *
-   * Redact
-   * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RedactConfigOrBuilder getRedactConfigOrBuilder() { - if (transformationCase_ == 2) { - return (com.google.privacy.dlp.v2.RedactConfig) transformation_; - } - return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); - } - - public static final int CHARACTER_MASK_CONFIG_FIELD_NUMBER = 3; - /** - *
-   * Mask
-   * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - * @return Whether the characterMaskConfig field is set. - */ - @java.lang.Override - public boolean hasCharacterMaskConfig() { - return transformationCase_ == 3; - } - /** - *
-   * Mask
-   * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - * @return The characterMaskConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CharacterMaskConfig getCharacterMaskConfig() { - if (transformationCase_ == 3) { - return (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_; - } - return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); - } - /** - *
-   * Mask
-   * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder getCharacterMaskConfigOrBuilder() { - if (transformationCase_ == 3) { - return (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_; - } - return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); - } - - public static final int CRYPTO_REPLACE_FFX_FPE_CONFIG_FIELD_NUMBER = 4; - /** - *
-   * Ffx-Fpe
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - * @return Whether the cryptoReplaceFfxFpeConfig field is set. - */ - @java.lang.Override - public boolean hasCryptoReplaceFfxFpeConfig() { - return transformationCase_ == 4; - } - /** - *
-   * Ffx-Fpe
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - * @return The cryptoReplaceFfxFpeConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getCryptoReplaceFfxFpeConfig() { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); - } - /** - *
-   * Ffx-Fpe
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder getCryptoReplaceFfxFpeConfigOrBuilder() { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); - } - - public static final int FIXED_SIZE_BUCKETING_CONFIG_FIELD_NUMBER = 5; - /** - *
-   * Fixed size bucketing
-   * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - * @return Whether the fixedSizeBucketingConfig field is set. - */ - @java.lang.Override - public boolean hasFixedSizeBucketingConfig() { - return transformationCase_ == 5; - } - /** - *
-   * Fixed size bucketing
-   * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - * @return The fixedSizeBucketingConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FixedSizeBucketingConfig getFixedSizeBucketingConfig() { - if (transformationCase_ == 5) { - return (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_; - } - return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); - } - /** - *
-   * Fixed size bucketing
-   * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder getFixedSizeBucketingConfigOrBuilder() { - if (transformationCase_ == 5) { - return (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_; - } - return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); - } - - public static final int BUCKETING_CONFIG_FIELD_NUMBER = 6; - /** - *
-   * Bucketing
-   * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - * @return Whether the bucketingConfig field is set. - */ - @java.lang.Override - public boolean hasBucketingConfig() { - return transformationCase_ == 6; - } - /** - *
-   * Bucketing
-   * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - * @return The bucketingConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig getBucketingConfig() { - if (transformationCase_ == 6) { - return (com.google.privacy.dlp.v2.BucketingConfig) transformation_; - } - return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); - } - /** - *
-   * Bucketing
-   * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfigOrBuilder getBucketingConfigOrBuilder() { - if (transformationCase_ == 6) { - return (com.google.privacy.dlp.v2.BucketingConfig) transformation_; - } - return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); - } - - public static final int REPLACE_WITH_INFO_TYPE_CONFIG_FIELD_NUMBER = 7; - /** - *
-   * Replace with infotype
-   * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - * @return Whether the replaceWithInfoTypeConfig field is set. - */ - @java.lang.Override - public boolean hasReplaceWithInfoTypeConfig() { - return transformationCase_ == 7; - } - /** - *
-   * Replace with infotype
-   * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - * @return The replaceWithInfoTypeConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getReplaceWithInfoTypeConfig() { - if (transformationCase_ == 7) { - return (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); - } - /** - *
-   * Replace with infotype
-   * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder getReplaceWithInfoTypeConfigOrBuilder() { - if (transformationCase_ == 7) { - return (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); - } - - public static final int TIME_PART_CONFIG_FIELD_NUMBER = 8; - /** - *
-   * Time extraction
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - * @return Whether the timePartConfig field is set. - */ - @java.lang.Override - public boolean hasTimePartConfig() { - return transformationCase_ == 8; - } - /** - *
-   * Time extraction
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - * @return The timePartConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TimePartConfig getTimePartConfig() { - if (transformationCase_ == 8) { - return (com.google.privacy.dlp.v2.TimePartConfig) transformation_; - } - return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); - } - /** - *
-   * Time extraction
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TimePartConfigOrBuilder getTimePartConfigOrBuilder() { - if (transformationCase_ == 8) { - return (com.google.privacy.dlp.v2.TimePartConfig) transformation_; - } - return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); - } - - public static final int CRYPTO_HASH_CONFIG_FIELD_NUMBER = 9; - /** - *
-   * Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - * @return Whether the cryptoHashConfig field is set. - */ - @java.lang.Override - public boolean hasCryptoHashConfig() { - return transformationCase_ == 9; - } - /** - *
-   * Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - * @return The cryptoHashConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoHashConfig getCryptoHashConfig() { - if (transformationCase_ == 9) { - return (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); - } - /** - *
-   * Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder getCryptoHashConfigOrBuilder() { - if (transformationCase_ == 9) { - return (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); - } - - public static final int DATE_SHIFT_CONFIG_FIELD_NUMBER = 11; - /** - *
-   * Date Shift
-   * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - * @return Whether the dateShiftConfig field is set. - */ - @java.lang.Override - public boolean hasDateShiftConfig() { - return transformationCase_ == 11; - } - /** - *
-   * Date Shift
-   * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - * @return The dateShiftConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateShiftConfig getDateShiftConfig() { - if (transformationCase_ == 11) { - return (com.google.privacy.dlp.v2.DateShiftConfig) transformation_; - } - return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); - } - /** - *
-   * Date Shift
-   * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateShiftConfigOrBuilder getDateShiftConfigOrBuilder() { - if (transformationCase_ == 11) { - return (com.google.privacy.dlp.v2.DateShiftConfig) transformation_; - } - return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); - } - - public static final int CRYPTO_DETERMINISTIC_CONFIG_FIELD_NUMBER = 12; - /** - *
-   * Deterministic Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - * @return Whether the cryptoDeterministicConfig field is set. - */ - @java.lang.Override - public boolean hasCryptoDeterministicConfig() { - return transformationCase_ == 12; - } - /** - *
-   * Deterministic Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - * @return The cryptoDeterministicConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoDeterministicConfig getCryptoDeterministicConfig() { - if (transformationCase_ == 12) { - return (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); - } - /** - *
-   * Deterministic Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder getCryptoDeterministicConfigOrBuilder() { - if (transformationCase_ == 12) { - return (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); - } - - public static final int REPLACE_DICTIONARY_CONFIG_FIELD_NUMBER = 13; - /** - *
-   * Replace with a value randomly drawn (with replacement) from a dictionary.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - * @return Whether the replaceDictionaryConfig field is set. - */ - @java.lang.Override - public boolean hasReplaceDictionaryConfig() { - return transformationCase_ == 13; - } - /** - *
-   * Replace with a value randomly drawn (with replacement) from a dictionary.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - * @return The replaceDictionaryConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceDictionaryConfig getReplaceDictionaryConfig() { - if (transformationCase_ == 13) { - return (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); - } - /** - *
-   * Replace with a value randomly drawn (with replacement) from a dictionary.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder getReplaceDictionaryConfigOrBuilder() { - if (transformationCase_ == 13) { - return (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (transformationCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_); - } - if (transformationCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.RedactConfig) transformation_); - } - if (transformationCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_); - } - if (transformationCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_); - } - if (transformationCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_); - } - if (transformationCase_ == 6) { - output.writeMessage(6, (com.google.privacy.dlp.v2.BucketingConfig) transformation_); - } - if (transformationCase_ == 7) { - output.writeMessage(7, (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_); - } - if (transformationCase_ == 8) { - output.writeMessage(8, (com.google.privacy.dlp.v2.TimePartConfig) transformation_); - } - if (transformationCase_ == 9) { - output.writeMessage(9, (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_); - } - if (transformationCase_ == 11) { - output.writeMessage(11, (com.google.privacy.dlp.v2.DateShiftConfig) transformation_); - } - if (transformationCase_ == 12) { - output.writeMessage(12, (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_); - } - if (transformationCase_ == 13) { - output.writeMessage(13, (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (transformationCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_); - } - if (transformationCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.RedactConfig) transformation_); - } - if (transformationCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_); - } - if (transformationCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_); - } - if (transformationCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_); - } - if (transformationCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (com.google.privacy.dlp.v2.BucketingConfig) transformation_); - } - if (transformationCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_); - } - if (transformationCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (com.google.privacy.dlp.v2.TimePartConfig) transformation_); - } - if (transformationCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_); - } - if (transformationCase_ == 11) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, (com.google.privacy.dlp.v2.DateShiftConfig) transformation_); - } - if (transformationCase_ == 12) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_); - } - if (transformationCase_ == 13) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrimitiveTransformation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrimitiveTransformation other = (com.google.privacy.dlp.v2.PrimitiveTransformation) obj; - - if (!getTransformationCase().equals(other.getTransformationCase())) return false; - switch (transformationCase_) { - case 1: - if (!getReplaceConfig() - .equals(other.getReplaceConfig())) return false; - break; - case 2: - if (!getRedactConfig() - .equals(other.getRedactConfig())) return false; - break; - case 3: - if (!getCharacterMaskConfig() - .equals(other.getCharacterMaskConfig())) return false; - break; - case 4: - if (!getCryptoReplaceFfxFpeConfig() - .equals(other.getCryptoReplaceFfxFpeConfig())) return false; - break; - case 5: - if (!getFixedSizeBucketingConfig() - .equals(other.getFixedSizeBucketingConfig())) return false; - break; - case 6: - if (!getBucketingConfig() - .equals(other.getBucketingConfig())) return false; - break; - case 7: - if (!getReplaceWithInfoTypeConfig() - .equals(other.getReplaceWithInfoTypeConfig())) return false; - break; - case 8: - if (!getTimePartConfig() - .equals(other.getTimePartConfig())) return false; - break; - case 9: - if (!getCryptoHashConfig() - .equals(other.getCryptoHashConfig())) return false; - break; - case 11: - if (!getDateShiftConfig() - .equals(other.getDateShiftConfig())) return false; - break; - case 12: - if (!getCryptoDeterministicConfig() - .equals(other.getCryptoDeterministicConfig())) return false; - break; - case 13: - if (!getReplaceDictionaryConfig() - .equals(other.getReplaceDictionaryConfig())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (transformationCase_) { - case 1: - hash = (37 * hash) + REPLACE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getReplaceConfig().hashCode(); - break; - case 2: - hash = (37 * hash) + REDACT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getRedactConfig().hashCode(); - break; - case 3: - hash = (37 * hash) + CHARACTER_MASK_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getCharacterMaskConfig().hashCode(); - break; - case 4: - hash = (37 * hash) + CRYPTO_REPLACE_FFX_FPE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getCryptoReplaceFfxFpeConfig().hashCode(); - break; - case 5: - hash = (37 * hash) + FIXED_SIZE_BUCKETING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getFixedSizeBucketingConfig().hashCode(); - break; - case 6: - hash = (37 * hash) + BUCKETING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getBucketingConfig().hashCode(); - break; - case 7: - hash = (37 * hash) + REPLACE_WITH_INFO_TYPE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getReplaceWithInfoTypeConfig().hashCode(); - break; - case 8: - hash = (37 * hash) + TIME_PART_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getTimePartConfig().hashCode(); - break; - case 9: - hash = (37 * hash) + CRYPTO_HASH_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getCryptoHashConfig().hashCode(); - break; - case 11: - hash = (37 * hash) + DATE_SHIFT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDateShiftConfig().hashCode(); - break; - case 12: - hash = (37 * hash) + CRYPTO_DETERMINISTIC_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getCryptoDeterministicConfig().hashCode(); - break; - case 13: - hash = (37 * hash) + REPLACE_DICTIONARY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getReplaceDictionaryConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrimitiveTransformation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrimitiveTransformation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A rule for transforming a value.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrimitiveTransformation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrimitiveTransformation) - com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrimitiveTransformation.class, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrimitiveTransformation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - transformationCase_ = 0; - transformation_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformation build() { - com.google.privacy.dlp.v2.PrimitiveTransformation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformation buildPartial() { - com.google.privacy.dlp.v2.PrimitiveTransformation result = new com.google.privacy.dlp.v2.PrimitiveTransformation(this); - if (transformationCase_ == 1) { - if (replaceConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = replaceConfigBuilder_.build(); - } - } - if (transformationCase_ == 2) { - if (redactConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = redactConfigBuilder_.build(); - } - } - if (transformationCase_ == 3) { - if (characterMaskConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = characterMaskConfigBuilder_.build(); - } - } - if (transformationCase_ == 4) { - if (cryptoReplaceFfxFpeConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = cryptoReplaceFfxFpeConfigBuilder_.build(); - } - } - if (transformationCase_ == 5) { - if (fixedSizeBucketingConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = fixedSizeBucketingConfigBuilder_.build(); - } - } - if (transformationCase_ == 6) { - if (bucketingConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = bucketingConfigBuilder_.build(); - } - } - if (transformationCase_ == 7) { - if (replaceWithInfoTypeConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = replaceWithInfoTypeConfigBuilder_.build(); - } - } - if (transformationCase_ == 8) { - if (timePartConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = timePartConfigBuilder_.build(); - } - } - if (transformationCase_ == 9) { - if (cryptoHashConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = cryptoHashConfigBuilder_.build(); - } - } - if (transformationCase_ == 11) { - if (dateShiftConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = dateShiftConfigBuilder_.build(); - } - } - if (transformationCase_ == 12) { - if (cryptoDeterministicConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = cryptoDeterministicConfigBuilder_.build(); - } - } - if (transformationCase_ == 13) { - if (replaceDictionaryConfigBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = replaceDictionaryConfigBuilder_.build(); - } - } - result.transformationCase_ = transformationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrimitiveTransformation) { - return mergeFrom((com.google.privacy.dlp.v2.PrimitiveTransformation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrimitiveTransformation other) { - if (other == com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance()) return this; - switch (other.getTransformationCase()) { - case REPLACE_CONFIG: { - mergeReplaceConfig(other.getReplaceConfig()); - break; - } - case REDACT_CONFIG: { - mergeRedactConfig(other.getRedactConfig()); - break; - } - case CHARACTER_MASK_CONFIG: { - mergeCharacterMaskConfig(other.getCharacterMaskConfig()); - break; - } - case CRYPTO_REPLACE_FFX_FPE_CONFIG: { - mergeCryptoReplaceFfxFpeConfig(other.getCryptoReplaceFfxFpeConfig()); - break; - } - case FIXED_SIZE_BUCKETING_CONFIG: { - mergeFixedSizeBucketingConfig(other.getFixedSizeBucketingConfig()); - break; - } - case BUCKETING_CONFIG: { - mergeBucketingConfig(other.getBucketingConfig()); - break; - } - case REPLACE_WITH_INFO_TYPE_CONFIG: { - mergeReplaceWithInfoTypeConfig(other.getReplaceWithInfoTypeConfig()); - break; - } - case TIME_PART_CONFIG: { - mergeTimePartConfig(other.getTimePartConfig()); - break; - } - case CRYPTO_HASH_CONFIG: { - mergeCryptoHashConfig(other.getCryptoHashConfig()); - break; - } - case DATE_SHIFT_CONFIG: { - mergeDateShiftConfig(other.getDateShiftConfig()); - break; - } - case CRYPTO_DETERMINISTIC_CONFIG: { - mergeCryptoDeterministicConfig(other.getCryptoDeterministicConfig()); - break; - } - case REPLACE_DICTIONARY_CONFIG: { - mergeReplaceDictionaryConfig(other.getReplaceDictionaryConfig()); - break; - } - case TRANSFORMATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrimitiveTransformation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrimitiveTransformation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int transformationCase_ = 0; - private java.lang.Object transformation_; - public TransformationCase - getTransformationCase() { - return TransformationCase.forNumber( - transformationCase_); - } - - public Builder clearTransformation() { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ReplaceValueConfig, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder, com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder> replaceConfigBuilder_; - /** - *
-     * Replace with a specified value.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - * @return Whether the replaceConfig field is set. - */ - @java.lang.Override - public boolean hasReplaceConfig() { - return transformationCase_ == 1; - } - /** - *
-     * Replace with a specified value.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - * @return The replaceConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceValueConfig getReplaceConfig() { - if (replaceConfigBuilder_ == null) { - if (transformationCase_ == 1) { - return (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 1) { - return replaceConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); - } - } - /** - *
-     * Replace with a specified value.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - */ - public Builder setReplaceConfig(com.google.privacy.dlp.v2.ReplaceValueConfig value) { - if (replaceConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - replaceConfigBuilder_.setMessage(value); - } - transformationCase_ = 1; - return this; - } - /** - *
-     * Replace with a specified value.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - */ - public Builder setReplaceConfig( - com.google.privacy.dlp.v2.ReplaceValueConfig.Builder builderForValue) { - if (replaceConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - replaceConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 1; - return this; - } - /** - *
-     * Replace with a specified value.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - */ - public Builder mergeReplaceConfig(com.google.privacy.dlp.v2.ReplaceValueConfig value) { - if (replaceConfigBuilder_ == null) { - if (transformationCase_ == 1 && - transformation_ != com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.ReplaceValueConfig.newBuilder((com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 1) { - replaceConfigBuilder_.mergeFrom(value); - } else { - replaceConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 1; - return this; - } - /** - *
-     * Replace with a specified value.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - */ - public Builder clearReplaceConfig() { - if (replaceConfigBuilder_ == null) { - if (transformationCase_ == 1) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 1) { - transformationCase_ = 0; - transformation_ = null; - } - replaceConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Replace with a specified value.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - */ - public com.google.privacy.dlp.v2.ReplaceValueConfig.Builder getReplaceConfigBuilder() { - return getReplaceConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Replace with a specified value.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder getReplaceConfigOrBuilder() { - if ((transformationCase_ == 1) && (replaceConfigBuilder_ != null)) { - return replaceConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 1) { - return (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); - } - } - /** - *
-     * Replace with a specified value.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ReplaceValueConfig, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder, com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder> - getReplaceConfigFieldBuilder() { - if (replaceConfigBuilder_ == null) { - if (!(transformationCase_ == 1)) { - transformation_ = com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); - } - replaceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ReplaceValueConfig, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder, com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder>( - (com.google.privacy.dlp.v2.ReplaceValueConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 1; - onChanged();; - return replaceConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RedactConfig, com.google.privacy.dlp.v2.RedactConfig.Builder, com.google.privacy.dlp.v2.RedactConfigOrBuilder> redactConfigBuilder_; - /** - *
-     * Redact
-     * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - * @return Whether the redactConfig field is set. - */ - @java.lang.Override - public boolean hasRedactConfig() { - return transformationCase_ == 2; - } - /** - *
-     * Redact
-     * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - * @return The redactConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RedactConfig getRedactConfig() { - if (redactConfigBuilder_ == null) { - if (transformationCase_ == 2) { - return (com.google.privacy.dlp.v2.RedactConfig) transformation_; - } - return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 2) { - return redactConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); - } - } - /** - *
-     * Redact
-     * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - */ - public Builder setRedactConfig(com.google.privacy.dlp.v2.RedactConfig value) { - if (redactConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - redactConfigBuilder_.setMessage(value); - } - transformationCase_ = 2; - return this; - } - /** - *
-     * Redact
-     * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - */ - public Builder setRedactConfig( - com.google.privacy.dlp.v2.RedactConfig.Builder builderForValue) { - if (redactConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - redactConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 2; - return this; - } - /** - *
-     * Redact
-     * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - */ - public Builder mergeRedactConfig(com.google.privacy.dlp.v2.RedactConfig value) { - if (redactConfigBuilder_ == null) { - if (transformationCase_ == 2 && - transformation_ != com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.RedactConfig.newBuilder((com.google.privacy.dlp.v2.RedactConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 2) { - redactConfigBuilder_.mergeFrom(value); - } else { - redactConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 2; - return this; - } - /** - *
-     * Redact
-     * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - */ - public Builder clearRedactConfig() { - if (redactConfigBuilder_ == null) { - if (transformationCase_ == 2) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 2) { - transformationCase_ = 0; - transformation_ = null; - } - redactConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Redact
-     * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - */ - public com.google.privacy.dlp.v2.RedactConfig.Builder getRedactConfigBuilder() { - return getRedactConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Redact
-     * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RedactConfigOrBuilder getRedactConfigOrBuilder() { - if ((transformationCase_ == 2) && (redactConfigBuilder_ != null)) { - return redactConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 2) { - return (com.google.privacy.dlp.v2.RedactConfig) transformation_; - } - return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); - } - } - /** - *
-     * Redact
-     * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RedactConfig, com.google.privacy.dlp.v2.RedactConfig.Builder, com.google.privacy.dlp.v2.RedactConfigOrBuilder> - getRedactConfigFieldBuilder() { - if (redactConfigBuilder_ == null) { - if (!(transformationCase_ == 2)) { - transformation_ = com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); - } - redactConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RedactConfig, com.google.privacy.dlp.v2.RedactConfig.Builder, com.google.privacy.dlp.v2.RedactConfigOrBuilder>( - (com.google.privacy.dlp.v2.RedactConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 2; - onChanged();; - return redactConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CharacterMaskConfig, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder, com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder> characterMaskConfigBuilder_; - /** - *
-     * Mask
-     * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - * @return Whether the characterMaskConfig field is set. - */ - @java.lang.Override - public boolean hasCharacterMaskConfig() { - return transformationCase_ == 3; - } - /** - *
-     * Mask
-     * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - * @return The characterMaskConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CharacterMaskConfig getCharacterMaskConfig() { - if (characterMaskConfigBuilder_ == null) { - if (transformationCase_ == 3) { - return (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_; - } - return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 3) { - return characterMaskConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); - } - } - /** - *
-     * Mask
-     * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - */ - public Builder setCharacterMaskConfig(com.google.privacy.dlp.v2.CharacterMaskConfig value) { - if (characterMaskConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - characterMaskConfigBuilder_.setMessage(value); - } - transformationCase_ = 3; - return this; - } - /** - *
-     * Mask
-     * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - */ - public Builder setCharacterMaskConfig( - com.google.privacy.dlp.v2.CharacterMaskConfig.Builder builderForValue) { - if (characterMaskConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - characterMaskConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 3; - return this; - } - /** - *
-     * Mask
-     * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - */ - public Builder mergeCharacterMaskConfig(com.google.privacy.dlp.v2.CharacterMaskConfig value) { - if (characterMaskConfigBuilder_ == null) { - if (transformationCase_ == 3 && - transformation_ != com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.CharacterMaskConfig.newBuilder((com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 3) { - characterMaskConfigBuilder_.mergeFrom(value); - } else { - characterMaskConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 3; - return this; - } - /** - *
-     * Mask
-     * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - */ - public Builder clearCharacterMaskConfig() { - if (characterMaskConfigBuilder_ == null) { - if (transformationCase_ == 3) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 3) { - transformationCase_ = 0; - transformation_ = null; - } - characterMaskConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Mask
-     * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - */ - public com.google.privacy.dlp.v2.CharacterMaskConfig.Builder getCharacterMaskConfigBuilder() { - return getCharacterMaskConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Mask
-     * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder getCharacterMaskConfigOrBuilder() { - if ((transformationCase_ == 3) && (characterMaskConfigBuilder_ != null)) { - return characterMaskConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 3) { - return (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_; - } - return com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); - } - } - /** - *
-     * Mask
-     * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CharacterMaskConfig, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder, com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder> - getCharacterMaskConfigFieldBuilder() { - if (characterMaskConfigBuilder_ == null) { - if (!(transformationCase_ == 3)) { - transformation_ = com.google.privacy.dlp.v2.CharacterMaskConfig.getDefaultInstance(); - } - characterMaskConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CharacterMaskConfig, com.google.privacy.dlp.v2.CharacterMaskConfig.Builder, com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder>( - (com.google.privacy.dlp.v2.CharacterMaskConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 3; - onChanged();; - return characterMaskConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder> cryptoReplaceFfxFpeConfigBuilder_; - /** - *
-     * Ffx-Fpe
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - * @return Whether the cryptoReplaceFfxFpeConfig field is set. - */ - @java.lang.Override - public boolean hasCryptoReplaceFfxFpeConfig() { - return transformationCase_ == 4; - } - /** - *
-     * Ffx-Fpe
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - * @return The cryptoReplaceFfxFpeConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getCryptoReplaceFfxFpeConfig() { - if (cryptoReplaceFfxFpeConfigBuilder_ == null) { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 4) { - return cryptoReplaceFfxFpeConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); - } - } - /** - *
-     * Ffx-Fpe
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - */ - public Builder setCryptoReplaceFfxFpeConfig(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig value) { - if (cryptoReplaceFfxFpeConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - cryptoReplaceFfxFpeConfigBuilder_.setMessage(value); - } - transformationCase_ = 4; - return this; - } - /** - *
-     * Ffx-Fpe
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - */ - public Builder setCryptoReplaceFfxFpeConfig( - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder builderForValue) { - if (cryptoReplaceFfxFpeConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - cryptoReplaceFfxFpeConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 4; - return this; - } - /** - *
-     * Ffx-Fpe
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - */ - public Builder mergeCryptoReplaceFfxFpeConfig(com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig value) { - if (cryptoReplaceFfxFpeConfigBuilder_ == null) { - if (transformationCase_ == 4 && - transformation_ != com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.newBuilder((com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 4) { - cryptoReplaceFfxFpeConfigBuilder_.mergeFrom(value); - } else { - cryptoReplaceFfxFpeConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 4; - return this; - } - /** - *
-     * Ffx-Fpe
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - */ - public Builder clearCryptoReplaceFfxFpeConfig() { - if (cryptoReplaceFfxFpeConfigBuilder_ == null) { - if (transformationCase_ == 4) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 4) { - transformationCase_ = 0; - transformation_ = null; - } - cryptoReplaceFfxFpeConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Ffx-Fpe
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - */ - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder getCryptoReplaceFfxFpeConfigBuilder() { - return getCryptoReplaceFfxFpeConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Ffx-Fpe
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder getCryptoReplaceFfxFpeConfigOrBuilder() { - if ((transformationCase_ == 4) && (cryptoReplaceFfxFpeConfigBuilder_ != null)) { - return cryptoReplaceFfxFpeConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 4) { - return (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); - } - } - /** - *
-     * Ffx-Fpe
-     * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder> - getCryptoReplaceFfxFpeConfigFieldBuilder() { - if (cryptoReplaceFfxFpeConfigBuilder_ == null) { - if (!(transformationCase_ == 4)) { - transformation_ = com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.getDefaultInstance(); - } - cryptoReplaceFfxFpeConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.Builder, com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder>( - (com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 4; - onChanged();; - return cryptoReplaceFfxFpeConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FixedSizeBucketingConfig, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder, com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder> fixedSizeBucketingConfigBuilder_; - /** - *
-     * Fixed size bucketing
-     * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - * @return Whether the fixedSizeBucketingConfig field is set. - */ - @java.lang.Override - public boolean hasFixedSizeBucketingConfig() { - return transformationCase_ == 5; - } - /** - *
-     * Fixed size bucketing
-     * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - * @return The fixedSizeBucketingConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FixedSizeBucketingConfig getFixedSizeBucketingConfig() { - if (fixedSizeBucketingConfigBuilder_ == null) { - if (transformationCase_ == 5) { - return (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_; - } - return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 5) { - return fixedSizeBucketingConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); - } - } - /** - *
-     * Fixed size bucketing
-     * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - */ - public Builder setFixedSizeBucketingConfig(com.google.privacy.dlp.v2.FixedSizeBucketingConfig value) { - if (fixedSizeBucketingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - fixedSizeBucketingConfigBuilder_.setMessage(value); - } - transformationCase_ = 5; - return this; - } - /** - *
-     * Fixed size bucketing
-     * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - */ - public Builder setFixedSizeBucketingConfig( - com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder builderForValue) { - if (fixedSizeBucketingConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - fixedSizeBucketingConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 5; - return this; - } - /** - *
-     * Fixed size bucketing
-     * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - */ - public Builder mergeFixedSizeBucketingConfig(com.google.privacy.dlp.v2.FixedSizeBucketingConfig value) { - if (fixedSizeBucketingConfigBuilder_ == null) { - if (transformationCase_ == 5 && - transformation_ != com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.FixedSizeBucketingConfig.newBuilder((com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 5) { - fixedSizeBucketingConfigBuilder_.mergeFrom(value); - } else { - fixedSizeBucketingConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 5; - return this; - } - /** - *
-     * Fixed size bucketing
-     * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - */ - public Builder clearFixedSizeBucketingConfig() { - if (fixedSizeBucketingConfigBuilder_ == null) { - if (transformationCase_ == 5) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 5) { - transformationCase_ = 0; - transformation_ = null; - } - fixedSizeBucketingConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Fixed size bucketing
-     * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - */ - public com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder getFixedSizeBucketingConfigBuilder() { - return getFixedSizeBucketingConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Fixed size bucketing
-     * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder getFixedSizeBucketingConfigOrBuilder() { - if ((transformationCase_ == 5) && (fixedSizeBucketingConfigBuilder_ != null)) { - return fixedSizeBucketingConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 5) { - return (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_; - } - return com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); - } - } - /** - *
-     * Fixed size bucketing
-     * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FixedSizeBucketingConfig, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder, com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder> - getFixedSizeBucketingConfigFieldBuilder() { - if (fixedSizeBucketingConfigBuilder_ == null) { - if (!(transformationCase_ == 5)) { - transformation_ = com.google.privacy.dlp.v2.FixedSizeBucketingConfig.getDefaultInstance(); - } - fixedSizeBucketingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FixedSizeBucketingConfig, com.google.privacy.dlp.v2.FixedSizeBucketingConfig.Builder, com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder>( - (com.google.privacy.dlp.v2.FixedSizeBucketingConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 5; - onChanged();; - return fixedSizeBucketingConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BucketingConfig, com.google.privacy.dlp.v2.BucketingConfig.Builder, com.google.privacy.dlp.v2.BucketingConfigOrBuilder> bucketingConfigBuilder_; - /** - *
-     * Bucketing
-     * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - * @return Whether the bucketingConfig field is set. - */ - @java.lang.Override - public boolean hasBucketingConfig() { - return transformationCase_ == 6; - } - /** - *
-     * Bucketing
-     * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - * @return The bucketingConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfig getBucketingConfig() { - if (bucketingConfigBuilder_ == null) { - if (transformationCase_ == 6) { - return (com.google.privacy.dlp.v2.BucketingConfig) transformation_; - } - return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 6) { - return bucketingConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); - } - } - /** - *
-     * Bucketing
-     * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - */ - public Builder setBucketingConfig(com.google.privacy.dlp.v2.BucketingConfig value) { - if (bucketingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - bucketingConfigBuilder_.setMessage(value); - } - transformationCase_ = 6; - return this; - } - /** - *
-     * Bucketing
-     * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - */ - public Builder setBucketingConfig( - com.google.privacy.dlp.v2.BucketingConfig.Builder builderForValue) { - if (bucketingConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - bucketingConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 6; - return this; - } - /** - *
-     * Bucketing
-     * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - */ - public Builder mergeBucketingConfig(com.google.privacy.dlp.v2.BucketingConfig value) { - if (bucketingConfigBuilder_ == null) { - if (transformationCase_ == 6 && - transformation_ != com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.BucketingConfig.newBuilder((com.google.privacy.dlp.v2.BucketingConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 6) { - bucketingConfigBuilder_.mergeFrom(value); - } else { - bucketingConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 6; - return this; - } - /** - *
-     * Bucketing
-     * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - */ - public Builder clearBucketingConfig() { - if (bucketingConfigBuilder_ == null) { - if (transformationCase_ == 6) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 6) { - transformationCase_ = 0; - transformation_ = null; - } - bucketingConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Bucketing
-     * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - */ - public com.google.privacy.dlp.v2.BucketingConfig.Builder getBucketingConfigBuilder() { - return getBucketingConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Bucketing
-     * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BucketingConfigOrBuilder getBucketingConfigOrBuilder() { - if ((transformationCase_ == 6) && (bucketingConfigBuilder_ != null)) { - return bucketingConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 6) { - return (com.google.privacy.dlp.v2.BucketingConfig) transformation_; - } - return com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); - } - } - /** - *
-     * Bucketing
-     * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BucketingConfig, com.google.privacy.dlp.v2.BucketingConfig.Builder, com.google.privacy.dlp.v2.BucketingConfigOrBuilder> - getBucketingConfigFieldBuilder() { - if (bucketingConfigBuilder_ == null) { - if (!(transformationCase_ == 6)) { - transformation_ = com.google.privacy.dlp.v2.BucketingConfig.getDefaultInstance(); - } - bucketingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BucketingConfig, com.google.privacy.dlp.v2.BucketingConfig.Builder, com.google.privacy.dlp.v2.BucketingConfigOrBuilder>( - (com.google.privacy.dlp.v2.BucketingConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 6; - onChanged();; - return bucketingConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder> replaceWithInfoTypeConfigBuilder_; - /** - *
-     * Replace with infotype
-     * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - * @return Whether the replaceWithInfoTypeConfig field is set. - */ - @java.lang.Override - public boolean hasReplaceWithInfoTypeConfig() { - return transformationCase_ == 7; - } - /** - *
-     * Replace with infotype
-     * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - * @return The replaceWithInfoTypeConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getReplaceWithInfoTypeConfig() { - if (replaceWithInfoTypeConfigBuilder_ == null) { - if (transformationCase_ == 7) { - return (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 7) { - return replaceWithInfoTypeConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); - } - } - /** - *
-     * Replace with infotype
-     * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - */ - public Builder setReplaceWithInfoTypeConfig(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig value) { - if (replaceWithInfoTypeConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - replaceWithInfoTypeConfigBuilder_.setMessage(value); - } - transformationCase_ = 7; - return this; - } - /** - *
-     * Replace with infotype
-     * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - */ - public Builder setReplaceWithInfoTypeConfig( - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder builderForValue) { - if (replaceWithInfoTypeConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - replaceWithInfoTypeConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 7; - return this; - } - /** - *
-     * Replace with infotype
-     * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - */ - public Builder mergeReplaceWithInfoTypeConfig(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig value) { - if (replaceWithInfoTypeConfigBuilder_ == null) { - if (transformationCase_ == 7 && - transformation_ != com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.newBuilder((com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 7) { - replaceWithInfoTypeConfigBuilder_.mergeFrom(value); - } else { - replaceWithInfoTypeConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 7; - return this; - } - /** - *
-     * Replace with infotype
-     * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - */ - public Builder clearReplaceWithInfoTypeConfig() { - if (replaceWithInfoTypeConfigBuilder_ == null) { - if (transformationCase_ == 7) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 7) { - transformationCase_ = 0; - transformation_ = null; - } - replaceWithInfoTypeConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Replace with infotype
-     * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - */ - public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder getReplaceWithInfoTypeConfigBuilder() { - return getReplaceWithInfoTypeConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Replace with infotype
-     * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder getReplaceWithInfoTypeConfigOrBuilder() { - if ((transformationCase_ == 7) && (replaceWithInfoTypeConfigBuilder_ != null)) { - return replaceWithInfoTypeConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 7) { - return (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); - } - } - /** - *
-     * Replace with infotype
-     * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder> - getReplaceWithInfoTypeConfigFieldBuilder() { - if (replaceWithInfoTypeConfigBuilder_ == null) { - if (!(transformationCase_ == 7)) { - transformation_ = com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); - } - replaceWithInfoTypeConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder>( - (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 7; - onChanged();; - return replaceWithInfoTypeConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TimePartConfig, com.google.privacy.dlp.v2.TimePartConfig.Builder, com.google.privacy.dlp.v2.TimePartConfigOrBuilder> timePartConfigBuilder_; - /** - *
-     * Time extraction
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - * @return Whether the timePartConfig field is set. - */ - @java.lang.Override - public boolean hasTimePartConfig() { - return transformationCase_ == 8; - } - /** - *
-     * Time extraction
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - * @return The timePartConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TimePartConfig getTimePartConfig() { - if (timePartConfigBuilder_ == null) { - if (transformationCase_ == 8) { - return (com.google.privacy.dlp.v2.TimePartConfig) transformation_; - } - return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 8) { - return timePartConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); - } - } - /** - *
-     * Time extraction
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - */ - public Builder setTimePartConfig(com.google.privacy.dlp.v2.TimePartConfig value) { - if (timePartConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - timePartConfigBuilder_.setMessage(value); - } - transformationCase_ = 8; - return this; - } - /** - *
-     * Time extraction
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - */ - public Builder setTimePartConfig( - com.google.privacy.dlp.v2.TimePartConfig.Builder builderForValue) { - if (timePartConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - timePartConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 8; - return this; - } - /** - *
-     * Time extraction
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - */ - public Builder mergeTimePartConfig(com.google.privacy.dlp.v2.TimePartConfig value) { - if (timePartConfigBuilder_ == null) { - if (transformationCase_ == 8 && - transformation_ != com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.TimePartConfig.newBuilder((com.google.privacy.dlp.v2.TimePartConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 8) { - timePartConfigBuilder_.mergeFrom(value); - } else { - timePartConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 8; - return this; - } - /** - *
-     * Time extraction
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - */ - public Builder clearTimePartConfig() { - if (timePartConfigBuilder_ == null) { - if (transformationCase_ == 8) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 8) { - transformationCase_ = 0; - transformation_ = null; - } - timePartConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Time extraction
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - */ - public com.google.privacy.dlp.v2.TimePartConfig.Builder getTimePartConfigBuilder() { - return getTimePartConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Time extraction
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TimePartConfigOrBuilder getTimePartConfigOrBuilder() { - if ((transformationCase_ == 8) && (timePartConfigBuilder_ != null)) { - return timePartConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 8) { - return (com.google.privacy.dlp.v2.TimePartConfig) transformation_; - } - return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); - } - } - /** - *
-     * Time extraction
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TimePartConfig, com.google.privacy.dlp.v2.TimePartConfig.Builder, com.google.privacy.dlp.v2.TimePartConfigOrBuilder> - getTimePartConfigFieldBuilder() { - if (timePartConfigBuilder_ == null) { - if (!(transformationCase_ == 8)) { - transformation_ = com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); - } - timePartConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TimePartConfig, com.google.privacy.dlp.v2.TimePartConfig.Builder, com.google.privacy.dlp.v2.TimePartConfigOrBuilder>( - (com.google.privacy.dlp.v2.TimePartConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 8; - onChanged();; - return timePartConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoHashConfig, com.google.privacy.dlp.v2.CryptoHashConfig.Builder, com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder> cryptoHashConfigBuilder_; - /** - *
-     * Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - * @return Whether the cryptoHashConfig field is set. - */ - @java.lang.Override - public boolean hasCryptoHashConfig() { - return transformationCase_ == 9; - } - /** - *
-     * Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - * @return The cryptoHashConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoHashConfig getCryptoHashConfig() { - if (cryptoHashConfigBuilder_ == null) { - if (transformationCase_ == 9) { - return (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 9) { - return cryptoHashConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); - } - } - /** - *
-     * Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - */ - public Builder setCryptoHashConfig(com.google.privacy.dlp.v2.CryptoHashConfig value) { - if (cryptoHashConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - cryptoHashConfigBuilder_.setMessage(value); - } - transformationCase_ = 9; - return this; - } - /** - *
-     * Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - */ - public Builder setCryptoHashConfig( - com.google.privacy.dlp.v2.CryptoHashConfig.Builder builderForValue) { - if (cryptoHashConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - cryptoHashConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 9; - return this; - } - /** - *
-     * Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - */ - public Builder mergeCryptoHashConfig(com.google.privacy.dlp.v2.CryptoHashConfig value) { - if (cryptoHashConfigBuilder_ == null) { - if (transformationCase_ == 9 && - transformation_ != com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.CryptoHashConfig.newBuilder((com.google.privacy.dlp.v2.CryptoHashConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 9) { - cryptoHashConfigBuilder_.mergeFrom(value); - } else { - cryptoHashConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 9; - return this; - } - /** - *
-     * Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - */ - public Builder clearCryptoHashConfig() { - if (cryptoHashConfigBuilder_ == null) { - if (transformationCase_ == 9) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 9) { - transformationCase_ = 0; - transformation_ = null; - } - cryptoHashConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - */ - public com.google.privacy.dlp.v2.CryptoHashConfig.Builder getCryptoHashConfigBuilder() { - return getCryptoHashConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder getCryptoHashConfigOrBuilder() { - if ((transformationCase_ == 9) && (cryptoHashConfigBuilder_ != null)) { - return cryptoHashConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 9) { - return (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); - } - } - /** - *
-     * Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoHashConfig, com.google.privacy.dlp.v2.CryptoHashConfig.Builder, com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder> - getCryptoHashConfigFieldBuilder() { - if (cryptoHashConfigBuilder_ == null) { - if (!(transformationCase_ == 9)) { - transformation_ = com.google.privacy.dlp.v2.CryptoHashConfig.getDefaultInstance(); - } - cryptoHashConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoHashConfig, com.google.privacy.dlp.v2.CryptoHashConfig.Builder, com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder>( - (com.google.privacy.dlp.v2.CryptoHashConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 9; - onChanged();; - return cryptoHashConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DateShiftConfig, com.google.privacy.dlp.v2.DateShiftConfig.Builder, com.google.privacy.dlp.v2.DateShiftConfigOrBuilder> dateShiftConfigBuilder_; - /** - *
-     * Date Shift
-     * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - * @return Whether the dateShiftConfig field is set. - */ - @java.lang.Override - public boolean hasDateShiftConfig() { - return transformationCase_ == 11; - } - /** - *
-     * Date Shift
-     * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - * @return The dateShiftConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateShiftConfig getDateShiftConfig() { - if (dateShiftConfigBuilder_ == null) { - if (transformationCase_ == 11) { - return (com.google.privacy.dlp.v2.DateShiftConfig) transformation_; - } - return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 11) { - return dateShiftConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); - } - } - /** - *
-     * Date Shift
-     * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - */ - public Builder setDateShiftConfig(com.google.privacy.dlp.v2.DateShiftConfig value) { - if (dateShiftConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - dateShiftConfigBuilder_.setMessage(value); - } - transformationCase_ = 11; - return this; - } - /** - *
-     * Date Shift
-     * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - */ - public Builder setDateShiftConfig( - com.google.privacy.dlp.v2.DateShiftConfig.Builder builderForValue) { - if (dateShiftConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - dateShiftConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 11; - return this; - } - /** - *
-     * Date Shift
-     * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - */ - public Builder mergeDateShiftConfig(com.google.privacy.dlp.v2.DateShiftConfig value) { - if (dateShiftConfigBuilder_ == null) { - if (transformationCase_ == 11 && - transformation_ != com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.DateShiftConfig.newBuilder((com.google.privacy.dlp.v2.DateShiftConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 11) { - dateShiftConfigBuilder_.mergeFrom(value); - } else { - dateShiftConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 11; - return this; - } - /** - *
-     * Date Shift
-     * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - */ - public Builder clearDateShiftConfig() { - if (dateShiftConfigBuilder_ == null) { - if (transformationCase_ == 11) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 11) { - transformationCase_ = 0; - transformation_ = null; - } - dateShiftConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Date Shift
-     * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - */ - public com.google.privacy.dlp.v2.DateShiftConfig.Builder getDateShiftConfigBuilder() { - return getDateShiftConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Date Shift
-     * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateShiftConfigOrBuilder getDateShiftConfigOrBuilder() { - if ((transformationCase_ == 11) && (dateShiftConfigBuilder_ != null)) { - return dateShiftConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 11) { - return (com.google.privacy.dlp.v2.DateShiftConfig) transformation_; - } - return com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); - } - } - /** - *
-     * Date Shift
-     * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DateShiftConfig, com.google.privacy.dlp.v2.DateShiftConfig.Builder, com.google.privacy.dlp.v2.DateShiftConfigOrBuilder> - getDateShiftConfigFieldBuilder() { - if (dateShiftConfigBuilder_ == null) { - if (!(transformationCase_ == 11)) { - transformation_ = com.google.privacy.dlp.v2.DateShiftConfig.getDefaultInstance(); - } - dateShiftConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DateShiftConfig, com.google.privacy.dlp.v2.DateShiftConfig.Builder, com.google.privacy.dlp.v2.DateShiftConfigOrBuilder>( - (com.google.privacy.dlp.v2.DateShiftConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 11; - onChanged();; - return dateShiftConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoDeterministicConfig, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder, com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder> cryptoDeterministicConfigBuilder_; - /** - *
-     * Deterministic Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - * @return Whether the cryptoDeterministicConfig field is set. - */ - @java.lang.Override - public boolean hasCryptoDeterministicConfig() { - return transformationCase_ == 12; - } - /** - *
-     * Deterministic Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - * @return The cryptoDeterministicConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoDeterministicConfig getCryptoDeterministicConfig() { - if (cryptoDeterministicConfigBuilder_ == null) { - if (transformationCase_ == 12) { - return (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 12) { - return cryptoDeterministicConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); - } - } - /** - *
-     * Deterministic Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - */ - public Builder setCryptoDeterministicConfig(com.google.privacy.dlp.v2.CryptoDeterministicConfig value) { - if (cryptoDeterministicConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - cryptoDeterministicConfigBuilder_.setMessage(value); - } - transformationCase_ = 12; - return this; - } - /** - *
-     * Deterministic Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - */ - public Builder setCryptoDeterministicConfig( - com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder builderForValue) { - if (cryptoDeterministicConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - cryptoDeterministicConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 12; - return this; - } - /** - *
-     * Deterministic Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - */ - public Builder mergeCryptoDeterministicConfig(com.google.privacy.dlp.v2.CryptoDeterministicConfig value) { - if (cryptoDeterministicConfigBuilder_ == null) { - if (transformationCase_ == 12 && - transformation_ != com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.CryptoDeterministicConfig.newBuilder((com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 12) { - cryptoDeterministicConfigBuilder_.mergeFrom(value); - } else { - cryptoDeterministicConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 12; - return this; - } - /** - *
-     * Deterministic Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - */ - public Builder clearCryptoDeterministicConfig() { - if (cryptoDeterministicConfigBuilder_ == null) { - if (transformationCase_ == 12) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 12) { - transformationCase_ = 0; - transformation_ = null; - } - cryptoDeterministicConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Deterministic Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - */ - public com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder getCryptoDeterministicConfigBuilder() { - return getCryptoDeterministicConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Deterministic Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder getCryptoDeterministicConfigOrBuilder() { - if ((transformationCase_ == 12) && (cryptoDeterministicConfigBuilder_ != null)) { - return cryptoDeterministicConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 12) { - return (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_; - } - return com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); - } - } - /** - *
-     * Deterministic Crypto
-     * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoDeterministicConfig, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder, com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder> - getCryptoDeterministicConfigFieldBuilder() { - if (cryptoDeterministicConfigBuilder_ == null) { - if (!(transformationCase_ == 12)) { - transformation_ = com.google.privacy.dlp.v2.CryptoDeterministicConfig.getDefaultInstance(); - } - cryptoDeterministicConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CryptoDeterministicConfig, com.google.privacy.dlp.v2.CryptoDeterministicConfig.Builder, com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder>( - (com.google.privacy.dlp.v2.CryptoDeterministicConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 12; - onChanged();; - return cryptoDeterministicConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ReplaceDictionaryConfig, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder, com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder> replaceDictionaryConfigBuilder_; - /** - *
-     * Replace with a value randomly drawn (with replacement) from a dictionary.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - * @return Whether the replaceDictionaryConfig field is set. - */ - @java.lang.Override - public boolean hasReplaceDictionaryConfig() { - return transformationCase_ == 13; - } - /** - *
-     * Replace with a value randomly drawn (with replacement) from a dictionary.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - * @return The replaceDictionaryConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceDictionaryConfig getReplaceDictionaryConfig() { - if (replaceDictionaryConfigBuilder_ == null) { - if (transformationCase_ == 13) { - return (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); - } else { - if (transformationCase_ == 13) { - return replaceDictionaryConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); - } - } - /** - *
-     * Replace with a value randomly drawn (with replacement) from a dictionary.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - */ - public Builder setReplaceDictionaryConfig(com.google.privacy.dlp.v2.ReplaceDictionaryConfig value) { - if (replaceDictionaryConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - replaceDictionaryConfigBuilder_.setMessage(value); - } - transformationCase_ = 13; - return this; - } - /** - *
-     * Replace with a value randomly drawn (with replacement) from a dictionary.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - */ - public Builder setReplaceDictionaryConfig( - com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder builderForValue) { - if (replaceDictionaryConfigBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - replaceDictionaryConfigBuilder_.setMessage(builderForValue.build()); - } - transformationCase_ = 13; - return this; - } - /** - *
-     * Replace with a value randomly drawn (with replacement) from a dictionary.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - */ - public Builder mergeReplaceDictionaryConfig(com.google.privacy.dlp.v2.ReplaceDictionaryConfig value) { - if (replaceDictionaryConfigBuilder_ == null) { - if (transformationCase_ == 13 && - transformation_ != com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance()) { - transformation_ = com.google.privacy.dlp.v2.ReplaceDictionaryConfig.newBuilder((com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_) - .mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - if (transformationCase_ == 13) { - replaceDictionaryConfigBuilder_.mergeFrom(value); - } else { - replaceDictionaryConfigBuilder_.setMessage(value); - } - } - transformationCase_ = 13; - return this; - } - /** - *
-     * Replace with a value randomly drawn (with replacement) from a dictionary.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - */ - public Builder clearReplaceDictionaryConfig() { - if (replaceDictionaryConfigBuilder_ == null) { - if (transformationCase_ == 13) { - transformationCase_ = 0; - transformation_ = null; - onChanged(); - } - } else { - if (transformationCase_ == 13) { - transformationCase_ = 0; - transformation_ = null; - } - replaceDictionaryConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Replace with a value randomly drawn (with replacement) from a dictionary.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - */ - public com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder getReplaceDictionaryConfigBuilder() { - return getReplaceDictionaryConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Replace with a value randomly drawn (with replacement) from a dictionary.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder getReplaceDictionaryConfigOrBuilder() { - if ((transformationCase_ == 13) && (replaceDictionaryConfigBuilder_ != null)) { - return replaceDictionaryConfigBuilder_.getMessageOrBuilder(); - } else { - if (transformationCase_ == 13) { - return (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_; - } - return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); - } - } - /** - *
-     * Replace with a value randomly drawn (with replacement) from a dictionary.
-     * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ReplaceDictionaryConfig, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder, com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder> - getReplaceDictionaryConfigFieldBuilder() { - if (replaceDictionaryConfigBuilder_ == null) { - if (!(transformationCase_ == 13)) { - transformation_ = com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); - } - replaceDictionaryConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ReplaceDictionaryConfig, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder, com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder>( - (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) transformation_, - getParentForChildren(), - isClean()); - transformation_ = null; - } - transformationCase_ = 13; - onChanged();; - return replaceDictionaryConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrimitiveTransformation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrimitiveTransformation) - private static final com.google.privacy.dlp.v2.PrimitiveTransformation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrimitiveTransformation(); - } - - public static com.google.privacy.dlp.v2.PrimitiveTransformation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PrimitiveTransformation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PrimitiveTransformation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformationOrBuilder.java deleted file mode 100644 index b025e51642ec..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrimitiveTransformationOrBuilder.java +++ /dev/null @@ -1,335 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface PrimitiveTransformationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrimitiveTransformation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Replace with a specified value.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - * @return Whether the replaceConfig field is set. - */ - boolean hasReplaceConfig(); - /** - *
-   * Replace with a specified value.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - * @return The replaceConfig. - */ - com.google.privacy.dlp.v2.ReplaceValueConfig getReplaceConfig(); - /** - *
-   * Replace with a specified value.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceValueConfig replace_config = 1; - */ - com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder getReplaceConfigOrBuilder(); - - /** - *
-   * Redact
-   * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - * @return Whether the redactConfig field is set. - */ - boolean hasRedactConfig(); - /** - *
-   * Redact
-   * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - * @return The redactConfig. - */ - com.google.privacy.dlp.v2.RedactConfig getRedactConfig(); - /** - *
-   * Redact
-   * 
- * - * .google.privacy.dlp.v2.RedactConfig redact_config = 2; - */ - com.google.privacy.dlp.v2.RedactConfigOrBuilder getRedactConfigOrBuilder(); - - /** - *
-   * Mask
-   * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - * @return Whether the characterMaskConfig field is set. - */ - boolean hasCharacterMaskConfig(); - /** - *
-   * Mask
-   * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - * @return The characterMaskConfig. - */ - com.google.privacy.dlp.v2.CharacterMaskConfig getCharacterMaskConfig(); - /** - *
-   * Mask
-   * 
- * - * .google.privacy.dlp.v2.CharacterMaskConfig character_mask_config = 3; - */ - com.google.privacy.dlp.v2.CharacterMaskConfigOrBuilder getCharacterMaskConfigOrBuilder(); - - /** - *
-   * Ffx-Fpe
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - * @return Whether the cryptoReplaceFfxFpeConfig field is set. - */ - boolean hasCryptoReplaceFfxFpeConfig(); - /** - *
-   * Ffx-Fpe
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - * @return The cryptoReplaceFfxFpeConfig. - */ - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig getCryptoReplaceFfxFpeConfig(); - /** - *
-   * Ffx-Fpe
-   * 
- * - * .google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - */ - com.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfigOrBuilder getCryptoReplaceFfxFpeConfigOrBuilder(); - - /** - *
-   * Fixed size bucketing
-   * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - * @return Whether the fixedSizeBucketingConfig field is set. - */ - boolean hasFixedSizeBucketingConfig(); - /** - *
-   * Fixed size bucketing
-   * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - * @return The fixedSizeBucketingConfig. - */ - com.google.privacy.dlp.v2.FixedSizeBucketingConfig getFixedSizeBucketingConfig(); - /** - *
-   * Fixed size bucketing
-   * 
- * - * .google.privacy.dlp.v2.FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - */ - com.google.privacy.dlp.v2.FixedSizeBucketingConfigOrBuilder getFixedSizeBucketingConfigOrBuilder(); - - /** - *
-   * Bucketing
-   * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - * @return Whether the bucketingConfig field is set. - */ - boolean hasBucketingConfig(); - /** - *
-   * Bucketing
-   * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - * @return The bucketingConfig. - */ - com.google.privacy.dlp.v2.BucketingConfig getBucketingConfig(); - /** - *
-   * Bucketing
-   * 
- * - * .google.privacy.dlp.v2.BucketingConfig bucketing_config = 6; - */ - com.google.privacy.dlp.v2.BucketingConfigOrBuilder getBucketingConfigOrBuilder(); - - /** - *
-   * Replace with infotype
-   * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - * @return Whether the replaceWithInfoTypeConfig field is set. - */ - boolean hasReplaceWithInfoTypeConfig(); - /** - *
-   * Replace with infotype
-   * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - * @return The replaceWithInfoTypeConfig. - */ - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getReplaceWithInfoTypeConfig(); - /** - *
-   * Replace with infotype
-   * 
- * - * .google.privacy.dlp.v2.ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - */ - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder getReplaceWithInfoTypeConfigOrBuilder(); - - /** - *
-   * Time extraction
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - * @return Whether the timePartConfig field is set. - */ - boolean hasTimePartConfig(); - /** - *
-   * Time extraction
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - * @return The timePartConfig. - */ - com.google.privacy.dlp.v2.TimePartConfig getTimePartConfig(); - /** - *
-   * Time extraction
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig time_part_config = 8; - */ - com.google.privacy.dlp.v2.TimePartConfigOrBuilder getTimePartConfigOrBuilder(); - - /** - *
-   * Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - * @return Whether the cryptoHashConfig field is set. - */ - boolean hasCryptoHashConfig(); - /** - *
-   * Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - * @return The cryptoHashConfig. - */ - com.google.privacy.dlp.v2.CryptoHashConfig getCryptoHashConfig(); - /** - *
-   * Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoHashConfig crypto_hash_config = 9; - */ - com.google.privacy.dlp.v2.CryptoHashConfigOrBuilder getCryptoHashConfigOrBuilder(); - - /** - *
-   * Date Shift
-   * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - * @return Whether the dateShiftConfig field is set. - */ - boolean hasDateShiftConfig(); - /** - *
-   * Date Shift
-   * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - * @return The dateShiftConfig. - */ - com.google.privacy.dlp.v2.DateShiftConfig getDateShiftConfig(); - /** - *
-   * Date Shift
-   * 
- * - * .google.privacy.dlp.v2.DateShiftConfig date_shift_config = 11; - */ - com.google.privacy.dlp.v2.DateShiftConfigOrBuilder getDateShiftConfigOrBuilder(); - - /** - *
-   * Deterministic Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - * @return Whether the cryptoDeterministicConfig field is set. - */ - boolean hasCryptoDeterministicConfig(); - /** - *
-   * Deterministic Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - * @return The cryptoDeterministicConfig. - */ - com.google.privacy.dlp.v2.CryptoDeterministicConfig getCryptoDeterministicConfig(); - /** - *
-   * Deterministic Crypto
-   * 
- * - * .google.privacy.dlp.v2.CryptoDeterministicConfig crypto_deterministic_config = 12; - */ - com.google.privacy.dlp.v2.CryptoDeterministicConfigOrBuilder getCryptoDeterministicConfigOrBuilder(); - - /** - *
-   * Replace with a value randomly drawn (with replacement) from a dictionary.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - * @return Whether the replaceDictionaryConfig field is set. - */ - boolean hasReplaceDictionaryConfig(); - /** - *
-   * Replace with a value randomly drawn (with replacement) from a dictionary.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - * @return The replaceDictionaryConfig. - */ - com.google.privacy.dlp.v2.ReplaceDictionaryConfig getReplaceDictionaryConfig(); - /** - *
-   * Replace with a value randomly drawn (with replacement) from a dictionary.
-   * 
- * - * .google.privacy.dlp.v2.ReplaceDictionaryConfig replace_dictionary_config = 13; - */ - com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder getReplaceDictionaryConfigOrBuilder(); - - public com.google.privacy.dlp.v2.PrimitiveTransformation.TransformationCase getTransformationCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java deleted file mode 100644 index e5c533b28c24..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java +++ /dev/null @@ -1,13589 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Privacy metric to compute for reidentification risk analysis.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric} - */ -public final class PrivacyMetric extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric) - PrivacyMetricOrBuilder { -private static final long serialVersionUID = 0L; - // Use PrivacyMetric.newBuilder() to construct. - private PrivacyMetric(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PrivacyMetric() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PrivacyMetric(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PrivacyMetric( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder subBuilder = null; - if (typeCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder subBuilder = null; - if (typeCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder subBuilder = null; - if (typeCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 3; - break; - } - case 34: { - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder subBuilder = null; - if (typeCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 4; - break; - } - case 42: { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder subBuilder = null; - if (typeCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 5; - break; - } - case 50: { - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder subBuilder = null; - if (typeCase_ == 6) { - subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 6; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.class, com.google.privacy.dlp.v2.PrivacyMetric.Builder.class); - } - - public interface NumericalStatsConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Field to compute numerical stats on. Supported types are
-     * integer, float, date, datetime, timestamp, time.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-     * Field to compute numerical stats on. Supported types are
-     * integer, float, date, datetime, timestamp, time.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-     * Field to compute numerical stats on. Supported types are
-     * integer, float, date, datetime, timestamp, time.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); - } - /** - *
-   * Compute numerical stats over an individual column, including
-   * min, max, and quantiles.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig} - */ - public static final class NumericalStatsConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) - NumericalStatsConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use NumericalStatsConfig.newBuilder() to construct. - private NumericalStatsConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private NumericalStatsConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new NumericalStatsConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NumericalStatsConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-     * Field to compute numerical stats on. Supported types are
-     * integer, float, date, datetime, timestamp, time.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-     * Field to compute numerical stats on. Supported types are
-     * integer, float, date, datetime, timestamp, time.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-     * Field to compute numerical stats on. Supported types are
-     * integer, float, date, datetime, timestamp, time.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getField()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) obj; - - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Compute numerical stats over an individual column, including
-     * min, max, and quantiles.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig build() { - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-       * Field to compute numerical stats on. Supported types are
-       * integer, float, date, datetime, timestamp, time.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-       * Field to compute numerical stats on. Supported types are
-       * integer, float, date, datetime, timestamp, time.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-       * Field to compute numerical stats on. Supported types are
-       * integer, float, date, datetime, timestamp, time.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Field to compute numerical stats on. Supported types are
-       * integer, float, date, datetime, timestamp, time.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Field to compute numerical stats on. Supported types are
-       * integer, float, date, datetime, timestamp, time.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Field to compute numerical stats on. Supported types are
-       * integer, float, date, datetime, timestamp, time.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-       * Field to compute numerical stats on. Supported types are
-       * integer, float, date, datetime, timestamp, time.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-       * Field to compute numerical stats on. Supported types are
-       * integer, float, date, datetime, timestamp, time.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-       * Field to compute numerical stats on. Supported types are
-       * integer, float, date, datetime, timestamp, time.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) - private static final com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NumericalStatsConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NumericalStatsConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface CategoricalStatsConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Field to compute categorical stats on. All column types are
-     * supported except for arrays and structs. However, it may be more
-     * informative to use NumericalStats when the field type is supported,
-     * depending on the data.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-     * Field to compute categorical stats on. All column types are
-     * supported except for arrays and structs. However, it may be more
-     * informative to use NumericalStats when the field type is supported,
-     * depending on the data.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-     * Field to compute categorical stats on. All column types are
-     * supported except for arrays and structs. However, it may be more
-     * informative to use NumericalStats when the field type is supported,
-     * depending on the data.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); - } - /** - *
-   * Compute numerical stats over an individual column, including
-   * number of distinct values and value count distribution.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig} - */ - public static final class CategoricalStatsConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) - CategoricalStatsConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use CategoricalStatsConfig.newBuilder() to construct. - private CategoricalStatsConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CategoricalStatsConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CategoricalStatsConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CategoricalStatsConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-     * Field to compute categorical stats on. All column types are
-     * supported except for arrays and structs. However, it may be more
-     * informative to use NumericalStats when the field type is supported,
-     * depending on the data.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-     * Field to compute categorical stats on. All column types are
-     * supported except for arrays and structs. However, it may be more
-     * informative to use NumericalStats when the field type is supported,
-     * depending on the data.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-     * Field to compute categorical stats on. All column types are
-     * supported except for arrays and structs. However, it may be more
-     * informative to use NumericalStats when the field type is supported,
-     * depending on the data.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getField()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) obj; - - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Compute numerical stats over an individual column, including
-     * number of distinct values and value count distribution.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_CategoricalStatsConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig build() { - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-       * Field to compute categorical stats on. All column types are
-       * supported except for arrays and structs. However, it may be more
-       * informative to use NumericalStats when the field type is supported,
-       * depending on the data.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-       * Field to compute categorical stats on. All column types are
-       * supported except for arrays and structs. However, it may be more
-       * informative to use NumericalStats when the field type is supported,
-       * depending on the data.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-       * Field to compute categorical stats on. All column types are
-       * supported except for arrays and structs. However, it may be more
-       * informative to use NumericalStats when the field type is supported,
-       * depending on the data.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Field to compute categorical stats on. All column types are
-       * supported except for arrays and structs. However, it may be more
-       * informative to use NumericalStats when the field type is supported,
-       * depending on the data.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Field to compute categorical stats on. All column types are
-       * supported except for arrays and structs. However, it may be more
-       * informative to use NumericalStats when the field type is supported,
-       * depending on the data.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Field to compute categorical stats on. All column types are
-       * supported except for arrays and structs. However, it may be more
-       * informative to use NumericalStats when the field type is supported,
-       * depending on the data.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-       * Field to compute categorical stats on. All column types are
-       * supported except for arrays and structs. However, it may be more
-       * informative to use NumericalStats when the field type is supported,
-       * depending on the data.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-       * Field to compute categorical stats on. All column types are
-       * supported except for arrays and structs. However, it may be more
-       * informative to use NumericalStats when the field type is supported,
-       * depending on the data.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-       * Field to compute categorical stats on. All column types are
-       * supported except for arrays and structs. However, it may be more
-       * informative to use NumericalStats when the field type is supported,
-       * depending on the data.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) - private static final com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CategoricalStatsConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CategoricalStatsConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface KAnonymityConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - java.util.List - getQuasiIdsList(); - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - com.google.privacy.dlp.v2.FieldId getQuasiIds(int index); - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - int getQuasiIdsCount(); - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - java.util.List - getQuasiIdsOrBuilderList(); - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( - int index); - - /** - *
-     * Message indicating that multiple rows might be associated to a
-     * single individual. If the same entity_id is associated to multiple
-     * quasi-identifier tuples over distinct rows, we consider the entire
-     * collection of tuples as the composite quasi-identifier. This collection
-     * is a multiset: the order in which the different tuples appear in the
-     * dataset is ignored, but their frequency is taken into account.
-     * Important note: a maximum of 1000 rows can be associated to a single
-     * entity ID. If more rows are associated with the same entity ID, some
-     * might be ignored.
-     * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - * @return Whether the entityId field is set. - */ - boolean hasEntityId(); - /** - *
-     * Message indicating that multiple rows might be associated to a
-     * single individual. If the same entity_id is associated to multiple
-     * quasi-identifier tuples over distinct rows, we consider the entire
-     * collection of tuples as the composite quasi-identifier. This collection
-     * is a multiset: the order in which the different tuples appear in the
-     * dataset is ignored, but their frequency is taken into account.
-     * Important note: a maximum of 1000 rows can be associated to a single
-     * entity ID. If more rows are associated with the same entity ID, some
-     * might be ignored.
-     * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - * @return The entityId. - */ - com.google.privacy.dlp.v2.EntityId getEntityId(); - /** - *
-     * Message indicating that multiple rows might be associated to a
-     * single individual. If the same entity_id is associated to multiple
-     * quasi-identifier tuples over distinct rows, we consider the entire
-     * collection of tuples as the composite quasi-identifier. This collection
-     * is a multiset: the order in which the different tuples appear in the
-     * dataset is ignored, but their frequency is taken into account.
-     * Important note: a maximum of 1000 rows can be associated to a single
-     * entity ID. If more rows are associated with the same entity ID, some
-     * might be ignored.
-     * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - */ - com.google.privacy.dlp.v2.EntityIdOrBuilder getEntityIdOrBuilder(); - } - /** - *
-   * k-anonymity metric, used for analysis of reidentification risk.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig} - */ - public static final class KAnonymityConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) - KAnonymityConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use KAnonymityConfig.newBuilder() to construct. - private KAnonymityConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KAnonymityConfig() { - quasiIds_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KAnonymityConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KAnonymityConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIds_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.privacy.dlp.v2.EntityId.Builder subBuilder = null; - if (entityId_ != null) { - subBuilder = entityId_.toBuilder(); - } - entityId_ = input.readMessage(com.google.privacy.dlp.v2.EntityId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(entityId_); - entityId_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder.class); - } - - public static final int QUASI_IDS_FIELD_NUMBER = 1; - private java.util.List quasiIds_; - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public java.util.List getQuasiIdsList() { - return quasiIds_; - } - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public java.util.List - getQuasiIdsOrBuilderList() { - return quasiIds_; - } - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public int getQuasiIdsCount() { - return quasiIds_.size(); - } - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getQuasiIds(int index) { - return quasiIds_.get(index); - } - /** - *
-     * Set of fields to compute k-anonymity over. When multiple fields are
-     * specified, they are considered a single composite key. Structs and
-     * repeated data types are not supported; however, nested fields are
-     * supported so long as they are not structs themselves or nested within
-     * a repeated field.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( - int index) { - return quasiIds_.get(index); - } - - public static final int ENTITY_ID_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.EntityId entityId_; - /** - *
-     * Message indicating that multiple rows might be associated to a
-     * single individual. If the same entity_id is associated to multiple
-     * quasi-identifier tuples over distinct rows, we consider the entire
-     * collection of tuples as the composite quasi-identifier. This collection
-     * is a multiset: the order in which the different tuples appear in the
-     * dataset is ignored, but their frequency is taken into account.
-     * Important note: a maximum of 1000 rows can be associated to a single
-     * entity ID. If more rows are associated with the same entity ID, some
-     * might be ignored.
-     * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - * @return Whether the entityId field is set. - */ - @java.lang.Override - public boolean hasEntityId() { - return entityId_ != null; - } - /** - *
-     * Message indicating that multiple rows might be associated to a
-     * single individual. If the same entity_id is associated to multiple
-     * quasi-identifier tuples over distinct rows, we consider the entire
-     * collection of tuples as the composite quasi-identifier. This collection
-     * is a multiset: the order in which the different tuples appear in the
-     * dataset is ignored, but their frequency is taken into account.
-     * Important note: a maximum of 1000 rows can be associated to a single
-     * entity ID. If more rows are associated with the same entity ID, some
-     * might be ignored.
-     * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - * @return The entityId. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.EntityId getEntityId() { - return entityId_ == null ? com.google.privacy.dlp.v2.EntityId.getDefaultInstance() : entityId_; - } - /** - *
-     * Message indicating that multiple rows might be associated to a
-     * single individual. If the same entity_id is associated to multiple
-     * quasi-identifier tuples over distinct rows, we consider the entire
-     * collection of tuples as the composite quasi-identifier. This collection
-     * is a multiset: the order in which the different tuples appear in the
-     * dataset is ignored, but their frequency is taken into account.
-     * Important note: a maximum of 1000 rows can be associated to a single
-     * entity ID. If more rows are associated with the same entity ID, some
-     * might be ignored.
-     * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.EntityIdOrBuilder getEntityIdOrBuilder() { - return getEntityId(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIds_.size(); i++) { - output.writeMessage(1, quasiIds_.get(i)); - } - if (entityId_ != null) { - output.writeMessage(2, getEntityId()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIds_.get(i)); - } - if (entityId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getEntityId()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) obj; - - if (!getQuasiIdsList() - .equals(other.getQuasiIdsList())) return false; - if (hasEntityId() != other.hasEntityId()) return false; - if (hasEntityId()) { - if (!getEntityId() - .equals(other.getEntityId())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getQuasiIdsCount() > 0) { - hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsList().hashCode(); - } - if (hasEntityId()) { - hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; - hash = (53 * hash) + getEntityId().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * k-anonymity metric, used for analysis of reidentification risk.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsBuilder_.clear(); - } - if (entityIdBuilder_ == null) { - entityId_ = null; - } else { - entityId_ = null; - entityIdBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KAnonymityConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig build() { - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig(this); - int from_bitField0_ = bitField0_; - if (quasiIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIds_ = quasiIds_; - } else { - result.quasiIds_ = quasiIdsBuilder_.build(); - } - if (entityIdBuilder_ == null) { - result.entityId_ = entityId_; - } else { - result.entityId_ = entityIdBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance()) return this; - if (quasiIdsBuilder_ == null) { - if (!other.quasiIds_.isEmpty()) { - if (quasiIds_.isEmpty()) { - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsIsMutable(); - quasiIds_.addAll(other.quasiIds_); - } - onChanged(); - } - } else { - if (!other.quasiIds_.isEmpty()) { - if (quasiIdsBuilder_.isEmpty()) { - quasiIdsBuilder_.dispose(); - quasiIdsBuilder_ = null; - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsFieldBuilder() : null; - } else { - quasiIdsBuilder_.addAllMessages(other.quasiIds_); - } - } - } - if (other.hasEntityId()) { - mergeEntityId(other.getEntityId()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List quasiIds_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(quasiIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> quasiIdsBuilder_; - - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public java.util.List getQuasiIdsList() { - if (quasiIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIds_); - } else { - return quasiIdsBuilder_.getMessageList(); - } - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public int getQuasiIdsCount() { - if (quasiIdsBuilder_ == null) { - return quasiIds_.size(); - } else { - return quasiIdsBuilder_.getCount(); - } - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldId getQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); - } else { - return quasiIdsBuilder_.getMessage(index); - } - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, value); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addQuasiIds(com.google.privacy.dlp.v2.FieldId value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addQuasiIds( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addAllQuasiIds( - java.lang.Iterable values) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIds_); - onChanged(); - } else { - quasiIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder clearQuasiIds() { - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsBuilder_.clear(); - } - return this; - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder removeQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.remove(index); - onChanged(); - } else { - quasiIdsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().getBuilder(index); - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( - int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); } else { - return quasiIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public java.util.List - getQuasiIdsOrBuilderList() { - if (quasiIdsBuilder_ != null) { - return quasiIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIds_); - } - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addQuasiIdsBuilder() { - return getQuasiIdsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-       * Set of fields to compute k-anonymity over. When multiple fields are
-       * specified, they are considered a single composite key. Structs and
-       * repeated data types are not supported; however, nested fields are
-       * supported so long as they are not structs themselves or nested within
-       * a repeated field.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public java.util.List - getQuasiIdsBuilderList() { - return getQuasiIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getQuasiIdsFieldBuilder() { - if (quasiIdsBuilder_ == null) { - quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - quasiIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIds_ = null; - } - return quasiIdsBuilder_; - } - - private com.google.privacy.dlp.v2.EntityId entityId_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.EntityId, com.google.privacy.dlp.v2.EntityId.Builder, com.google.privacy.dlp.v2.EntityIdOrBuilder> entityIdBuilder_; - /** - *
-       * Message indicating that multiple rows might be associated to a
-       * single individual. If the same entity_id is associated to multiple
-       * quasi-identifier tuples over distinct rows, we consider the entire
-       * collection of tuples as the composite quasi-identifier. This collection
-       * is a multiset: the order in which the different tuples appear in the
-       * dataset is ignored, but their frequency is taken into account.
-       * Important note: a maximum of 1000 rows can be associated to a single
-       * entity ID. If more rows are associated with the same entity ID, some
-       * might be ignored.
-       * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - * @return Whether the entityId field is set. - */ - public boolean hasEntityId() { - return entityIdBuilder_ != null || entityId_ != null; - } - /** - *
-       * Message indicating that multiple rows might be associated to a
-       * single individual. If the same entity_id is associated to multiple
-       * quasi-identifier tuples over distinct rows, we consider the entire
-       * collection of tuples as the composite quasi-identifier. This collection
-       * is a multiset: the order in which the different tuples appear in the
-       * dataset is ignored, but their frequency is taken into account.
-       * Important note: a maximum of 1000 rows can be associated to a single
-       * entity ID. If more rows are associated with the same entity ID, some
-       * might be ignored.
-       * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - * @return The entityId. - */ - public com.google.privacy.dlp.v2.EntityId getEntityId() { - if (entityIdBuilder_ == null) { - return entityId_ == null ? com.google.privacy.dlp.v2.EntityId.getDefaultInstance() : entityId_; - } else { - return entityIdBuilder_.getMessage(); - } - } - /** - *
-       * Message indicating that multiple rows might be associated to a
-       * single individual. If the same entity_id is associated to multiple
-       * quasi-identifier tuples over distinct rows, we consider the entire
-       * collection of tuples as the composite quasi-identifier. This collection
-       * is a multiset: the order in which the different tuples appear in the
-       * dataset is ignored, but their frequency is taken into account.
-       * Important note: a maximum of 1000 rows can be associated to a single
-       * entity ID. If more rows are associated with the same entity ID, some
-       * might be ignored.
-       * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - */ - public Builder setEntityId(com.google.privacy.dlp.v2.EntityId value) { - if (entityIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - entityId_ = value; - onChanged(); - } else { - entityIdBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Message indicating that multiple rows might be associated to a
-       * single individual. If the same entity_id is associated to multiple
-       * quasi-identifier tuples over distinct rows, we consider the entire
-       * collection of tuples as the composite quasi-identifier. This collection
-       * is a multiset: the order in which the different tuples appear in the
-       * dataset is ignored, but their frequency is taken into account.
-       * Important note: a maximum of 1000 rows can be associated to a single
-       * entity ID. If more rows are associated with the same entity ID, some
-       * might be ignored.
-       * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - */ - public Builder setEntityId( - com.google.privacy.dlp.v2.EntityId.Builder builderForValue) { - if (entityIdBuilder_ == null) { - entityId_ = builderForValue.build(); - onChanged(); - } else { - entityIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Message indicating that multiple rows might be associated to a
-       * single individual. If the same entity_id is associated to multiple
-       * quasi-identifier tuples over distinct rows, we consider the entire
-       * collection of tuples as the composite quasi-identifier. This collection
-       * is a multiset: the order in which the different tuples appear in the
-       * dataset is ignored, but their frequency is taken into account.
-       * Important note: a maximum of 1000 rows can be associated to a single
-       * entity ID. If more rows are associated with the same entity ID, some
-       * might be ignored.
-       * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - */ - public Builder mergeEntityId(com.google.privacy.dlp.v2.EntityId value) { - if (entityIdBuilder_ == null) { - if (entityId_ != null) { - entityId_ = - com.google.privacy.dlp.v2.EntityId.newBuilder(entityId_).mergeFrom(value).buildPartial(); - } else { - entityId_ = value; - } - onChanged(); - } else { - entityIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Message indicating that multiple rows might be associated to a
-       * single individual. If the same entity_id is associated to multiple
-       * quasi-identifier tuples over distinct rows, we consider the entire
-       * collection of tuples as the composite quasi-identifier. This collection
-       * is a multiset: the order in which the different tuples appear in the
-       * dataset is ignored, but their frequency is taken into account.
-       * Important note: a maximum of 1000 rows can be associated to a single
-       * entity ID. If more rows are associated with the same entity ID, some
-       * might be ignored.
-       * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - */ - public Builder clearEntityId() { - if (entityIdBuilder_ == null) { - entityId_ = null; - onChanged(); - } else { - entityId_ = null; - entityIdBuilder_ = null; - } - - return this; - } - /** - *
-       * Message indicating that multiple rows might be associated to a
-       * single individual. If the same entity_id is associated to multiple
-       * quasi-identifier tuples over distinct rows, we consider the entire
-       * collection of tuples as the composite quasi-identifier. This collection
-       * is a multiset: the order in which the different tuples appear in the
-       * dataset is ignored, but their frequency is taken into account.
-       * Important note: a maximum of 1000 rows can be associated to a single
-       * entity ID. If more rows are associated with the same entity ID, some
-       * might be ignored.
-       * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - */ - public com.google.privacy.dlp.v2.EntityId.Builder getEntityIdBuilder() { - - onChanged(); - return getEntityIdFieldBuilder().getBuilder(); - } - /** - *
-       * Message indicating that multiple rows might be associated to a
-       * single individual. If the same entity_id is associated to multiple
-       * quasi-identifier tuples over distinct rows, we consider the entire
-       * collection of tuples as the composite quasi-identifier. This collection
-       * is a multiset: the order in which the different tuples appear in the
-       * dataset is ignored, but their frequency is taken into account.
-       * Important note: a maximum of 1000 rows can be associated to a single
-       * entity ID. If more rows are associated with the same entity ID, some
-       * might be ignored.
-       * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - */ - public com.google.privacy.dlp.v2.EntityIdOrBuilder getEntityIdOrBuilder() { - if (entityIdBuilder_ != null) { - return entityIdBuilder_.getMessageOrBuilder(); - } else { - return entityId_ == null ? - com.google.privacy.dlp.v2.EntityId.getDefaultInstance() : entityId_; - } - } - /** - *
-       * Message indicating that multiple rows might be associated to a
-       * single individual. If the same entity_id is associated to multiple
-       * quasi-identifier tuples over distinct rows, we consider the entire
-       * collection of tuples as the composite quasi-identifier. This collection
-       * is a multiset: the order in which the different tuples appear in the
-       * dataset is ignored, but their frequency is taken into account.
-       * Important note: a maximum of 1000 rows can be associated to a single
-       * entity ID. If more rows are associated with the same entity ID, some
-       * might be ignored.
-       * 
- * - * .google.privacy.dlp.v2.EntityId entity_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.EntityId, com.google.privacy.dlp.v2.EntityId.Builder, com.google.privacy.dlp.v2.EntityIdOrBuilder> - getEntityIdFieldBuilder() { - if (entityIdBuilder_ == null) { - entityIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.EntityId, com.google.privacy.dlp.v2.EntityId.Builder, com.google.privacy.dlp.v2.EntityIdOrBuilder>( - getEntityId(), - getParentForChildren(), - isClean()); - entityId_ = null; - } - return entityIdBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) - private static final com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KAnonymityConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KAnonymityConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LDiversityConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - java.util.List - getQuasiIdsList(); - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - com.google.privacy.dlp.v2.FieldId getQuasiIds(int index); - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - int getQuasiIdsCount(); - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - java.util.List - getQuasiIdsOrBuilderList(); - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( - int index); - - /** - *
-     * Sensitive field for computing the l-value.
-     * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - * @return Whether the sensitiveAttribute field is set. - */ - boolean hasSensitiveAttribute(); - /** - *
-     * Sensitive field for computing the l-value.
-     * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - * @return The sensitiveAttribute. - */ - com.google.privacy.dlp.v2.FieldId getSensitiveAttribute(); - /** - *
-     * Sensitive field for computing the l-value.
-     * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getSensitiveAttributeOrBuilder(); - } - /** - *
-   * l-diversity metric, used for analysis of reidentification risk.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig} - */ - public static final class LDiversityConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) - LDiversityConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use LDiversityConfig.newBuilder() to construct. - private LDiversityConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LDiversityConfig() { - quasiIds_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LDiversityConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LDiversityConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIds_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (sensitiveAttribute_ != null) { - subBuilder = sensitiveAttribute_.toBuilder(); - } - sensitiveAttribute_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sensitiveAttribute_); - sensitiveAttribute_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder.class); - } - - public static final int QUASI_IDS_FIELD_NUMBER = 1; - private java.util.List quasiIds_; - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public java.util.List getQuasiIdsList() { - return quasiIds_; - } - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public java.util.List - getQuasiIdsOrBuilderList() { - return quasiIds_; - } - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public int getQuasiIdsCount() { - return quasiIds_.size(); - } - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getQuasiIds(int index) { - return quasiIds_.get(index); - } - /** - *
-     * Set of quasi-identifiers indicating how equivalence classes are
-     * defined for the l-diversity computation. When multiple fields are
-     * specified, they are considered a single composite key.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( - int index) { - return quasiIds_.get(index); - } - - public static final int SENSITIVE_ATTRIBUTE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.FieldId sensitiveAttribute_; - /** - *
-     * Sensitive field for computing the l-value.
-     * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - * @return Whether the sensitiveAttribute field is set. - */ - @java.lang.Override - public boolean hasSensitiveAttribute() { - return sensitiveAttribute_ != null; - } - /** - *
-     * Sensitive field for computing the l-value.
-     * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - * @return The sensitiveAttribute. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getSensitiveAttribute() { - return sensitiveAttribute_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : sensitiveAttribute_; - } - /** - *
-     * Sensitive field for computing the l-value.
-     * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getSensitiveAttributeOrBuilder() { - return getSensitiveAttribute(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIds_.size(); i++) { - output.writeMessage(1, quasiIds_.get(i)); - } - if (sensitiveAttribute_ != null) { - output.writeMessage(2, getSensitiveAttribute()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIds_.get(i)); - } - if (sensitiveAttribute_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSensitiveAttribute()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) obj; - - if (!getQuasiIdsList() - .equals(other.getQuasiIdsList())) return false; - if (hasSensitiveAttribute() != other.hasSensitiveAttribute()) return false; - if (hasSensitiveAttribute()) { - if (!getSensitiveAttribute() - .equals(other.getSensitiveAttribute())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getQuasiIdsCount() > 0) { - hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsList().hashCode(); - } - if (hasSensitiveAttribute()) { - hash = (37 * hash) + SENSITIVE_ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getSensitiveAttribute().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * l-diversity metric, used for analysis of reidentification risk.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsBuilder_.clear(); - } - if (sensitiveAttributeBuilder_ == null) { - sensitiveAttribute_ = null; - } else { - sensitiveAttribute_ = null; - sensitiveAttributeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_LDiversityConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig build() { - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig(this); - int from_bitField0_ = bitField0_; - if (quasiIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIds_ = quasiIds_; - } else { - result.quasiIds_ = quasiIdsBuilder_.build(); - } - if (sensitiveAttributeBuilder_ == null) { - result.sensitiveAttribute_ = sensitiveAttribute_; - } else { - result.sensitiveAttribute_ = sensitiveAttributeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance()) return this; - if (quasiIdsBuilder_ == null) { - if (!other.quasiIds_.isEmpty()) { - if (quasiIds_.isEmpty()) { - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsIsMutable(); - quasiIds_.addAll(other.quasiIds_); - } - onChanged(); - } - } else { - if (!other.quasiIds_.isEmpty()) { - if (quasiIdsBuilder_.isEmpty()) { - quasiIdsBuilder_.dispose(); - quasiIdsBuilder_ = null; - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsFieldBuilder() : null; - } else { - quasiIdsBuilder_.addAllMessages(other.quasiIds_); - } - } - } - if (other.hasSensitiveAttribute()) { - mergeSensitiveAttribute(other.getSensitiveAttribute()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List quasiIds_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(quasiIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> quasiIdsBuilder_; - - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public java.util.List getQuasiIdsList() { - if (quasiIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIds_); - } else { - return quasiIdsBuilder_.getMessageList(); - } - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public int getQuasiIdsCount() { - if (quasiIdsBuilder_ == null) { - return quasiIds_.size(); - } else { - return quasiIdsBuilder_.getCount(); - } - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldId getQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); - } else { - return quasiIdsBuilder_.getMessage(index); - } - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, value); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addQuasiIds(com.google.privacy.dlp.v2.FieldId value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addQuasiIds( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder addAllQuasiIds( - java.lang.Iterable values) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIds_); - onChanged(); - } else { - quasiIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder clearQuasiIds() { - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsBuilder_.clear(); - } - return this; - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public Builder removeQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.remove(index); - onChanged(); - } else { - quasiIdsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().getBuilder(index); - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getQuasiIdsOrBuilder( - int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); } else { - return quasiIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public java.util.List - getQuasiIdsOrBuilderList() { - if (quasiIdsBuilder_ != null) { - return quasiIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIds_); - } - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addQuasiIdsBuilder() { - return getQuasiIdsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-       * Set of quasi-identifiers indicating how equivalence classes are
-       * defined for the l-diversity computation. When multiple fields are
-       * specified, they are considered a single composite key.
-       * 
- * - * repeated .google.privacy.dlp.v2.FieldId quasi_ids = 1; - */ - public java.util.List - getQuasiIdsBuilderList() { - return getQuasiIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getQuasiIdsFieldBuilder() { - if (quasiIdsBuilder_ == null) { - quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - quasiIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIds_ = null; - } - return quasiIdsBuilder_; - } - - private com.google.privacy.dlp.v2.FieldId sensitiveAttribute_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> sensitiveAttributeBuilder_; - /** - *
-       * Sensitive field for computing the l-value.
-       * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - * @return Whether the sensitiveAttribute field is set. - */ - public boolean hasSensitiveAttribute() { - return sensitiveAttributeBuilder_ != null || sensitiveAttribute_ != null; - } - /** - *
-       * Sensitive field for computing the l-value.
-       * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - * @return The sensitiveAttribute. - */ - public com.google.privacy.dlp.v2.FieldId getSensitiveAttribute() { - if (sensitiveAttributeBuilder_ == null) { - return sensitiveAttribute_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : sensitiveAttribute_; - } else { - return sensitiveAttributeBuilder_.getMessage(); - } - } - /** - *
-       * Sensitive field for computing the l-value.
-       * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - */ - public Builder setSensitiveAttribute(com.google.privacy.dlp.v2.FieldId value) { - if (sensitiveAttributeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sensitiveAttribute_ = value; - onChanged(); - } else { - sensitiveAttributeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Sensitive field for computing the l-value.
-       * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - */ - public Builder setSensitiveAttribute( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (sensitiveAttributeBuilder_ == null) { - sensitiveAttribute_ = builderForValue.build(); - onChanged(); - } else { - sensitiveAttributeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Sensitive field for computing the l-value.
-       * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - */ - public Builder mergeSensitiveAttribute(com.google.privacy.dlp.v2.FieldId value) { - if (sensitiveAttributeBuilder_ == null) { - if (sensitiveAttribute_ != null) { - sensitiveAttribute_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(sensitiveAttribute_).mergeFrom(value).buildPartial(); - } else { - sensitiveAttribute_ = value; - } - onChanged(); - } else { - sensitiveAttributeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Sensitive field for computing the l-value.
-       * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - */ - public Builder clearSensitiveAttribute() { - if (sensitiveAttributeBuilder_ == null) { - sensitiveAttribute_ = null; - onChanged(); - } else { - sensitiveAttribute_ = null; - sensitiveAttributeBuilder_ = null; - } - - return this; - } - /** - *
-       * Sensitive field for computing the l-value.
-       * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getSensitiveAttributeBuilder() { - - onChanged(); - return getSensitiveAttributeFieldBuilder().getBuilder(); - } - /** - *
-       * Sensitive field for computing the l-value.
-       * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getSensitiveAttributeOrBuilder() { - if (sensitiveAttributeBuilder_ != null) { - return sensitiveAttributeBuilder_.getMessageOrBuilder(); - } else { - return sensitiveAttribute_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : sensitiveAttribute_; - } - } - /** - *
-       * Sensitive field for computing the l-value.
-       * 
- * - * .google.privacy.dlp.v2.FieldId sensitive_attribute = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getSensitiveAttributeFieldBuilder() { - if (sensitiveAttributeBuilder_ == null) { - sensitiveAttributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getSensitiveAttribute(), - getParentForChildren(), - isClean()); - sensitiveAttribute_ = null; - } - return sensitiveAttributeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) - private static final com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LDiversityConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LDiversityConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface KMapEstimationConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getQuasiIdsList(); - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getQuasiIds(int index); - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getQuasiIdsCount(); - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getQuasiIdsOrBuilderList(); - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder getQuasiIdsOrBuilder( - int index); - - /** - *
-     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-     * Set if no column is tagged with a region-specific InfoType (like
-     * US_ZIP_5) or a region code.
-     * 
- * - * string region_code = 2; - * @return The regionCode. - */ - java.lang.String getRegionCode(); - /** - *
-     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-     * Set if no column is tagged with a region-specific InfoType (like
-     * US_ZIP_5) or a region code.
-     * 
- * - * string region_code = 2; - * @return The bytes for regionCode. - */ - com.google.protobuf.ByteString - getRegionCodeBytes(); - - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - java.util.List - getAuxiliaryTablesList(); - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getAuxiliaryTables(int index); - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - int getAuxiliaryTablesCount(); - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - java.util.List - getAuxiliaryTablesOrBuilderList(); - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder getAuxiliaryTablesOrBuilder( - int index); - } - /** - *
-   * Reidentifiability metric. This corresponds to a risk model similar to what
-   * is called "journalist risk" in the literature, except the attack dataset is
-   * statistically modeled instead of being perfectly known. This can be done
-   * using publicly available data (like the US Census), or using a custom
-   * statistical model (indicated as one or several BigQuery tables), or by
-   * extrapolating from the distribution of values in the input dataset.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig} - */ - public static final class KMapEstimationConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) - KMapEstimationConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use KMapEstimationConfig.newBuilder() to construct. - private KMapEstimationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private KMapEstimationConfig() { - quasiIds_ = java.util.Collections.emptyList(); - regionCode_ = ""; - auxiliaryTables_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new KMapEstimationConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private KMapEstimationConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIds_.add( - input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - regionCode_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - auxiliaryTables_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - auxiliaryTables_.add( - input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder.class); - } - - public interface TaggedFieldOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Required. Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-       * Required. Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-       * Required. Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); - - /** - *
-       * A column can be tagged with a InfoType to use the relevant public
-       * dataset as a statistical model of population, if available. We
-       * currently support US ZIP codes, region codes, ages and genders.
-       * To programmatically obtain the list of supported InfoTypes, use
-       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-       * A column can be tagged with a InfoType to use the relevant public
-       * dataset as a statistical model of population, if available. We
-       * currently support US ZIP codes, region codes, ages and genders.
-       * To programmatically obtain the list of supported InfoTypes, use
-       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-       * A column can be tagged with a InfoType to use the relevant public
-       * dataset as a statistical model of population, if available. We
-       * currently support US ZIP codes, region codes, ages and genders.
-       * To programmatically obtain the list of supported InfoTypes, use
-       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 3; - * @return Whether the customTag field is set. - */ - boolean hasCustomTag(); - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 3; - * @return The customTag. - */ - java.lang.String getCustomTag(); - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 3; - * @return The bytes for customTag. - */ - com.google.protobuf.ByteString - getCustomTagBytes(); - - /** - *
-       * If no semantic tag is indicated, we infer the statistical model from
-       * the distribution of values in the input data
-       * 
- * - * .google.protobuf.Empty inferred = 4; - * @return Whether the inferred field is set. - */ - boolean hasInferred(); - /** - *
-       * If no semantic tag is indicated, we infer the statistical model from
-       * the distribution of values in the input data
-       * 
- * - * .google.protobuf.Empty inferred = 4; - * @return The inferred. - */ - com.google.protobuf.Empty getInferred(); - /** - *
-       * If no semantic tag is indicated, we infer the statistical model from
-       * the distribution of values in the input data
-       * 
- * - * .google.protobuf.Empty inferred = 4; - */ - com.google.protobuf.EmptyOrBuilder getInferredOrBuilder(); - - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.TagCase getTagCase(); - } - /** - *
-     * A column with a semantic tag attached.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField} - */ - public static final class TaggedField extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) - TaggedFieldOrBuilder { - private static final long serialVersionUID = 0L; - // Use TaggedField.newBuilder() to construct. - private TaggedField(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TaggedField() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TaggedField(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TaggedField( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (tagCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.InfoType) tag_).toBuilder(); - } - tag_ = - input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoType) tag_); - tag_ = subBuilder.buildPartial(); - } - tagCase_ = 2; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - tagCase_ = 3; - tag_ = s; - break; - } - case 34: { - com.google.protobuf.Empty.Builder subBuilder = null; - if (tagCase_ == 4) { - subBuilder = ((com.google.protobuf.Empty) tag_).toBuilder(); - } - tag_ = - input.readMessage(com.google.protobuf.Empty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Empty) tag_); - tag_ = subBuilder.buildPartial(); - } - tagCase_ = 4; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder.class); - } - - private int tagCase_ = 0; - private java.lang.Object tag_; - public enum TagCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INFO_TYPE(2), - CUSTOM_TAG(3), - INFERRED(4), - TAG_NOT_SET(0); - private final int value; - private TagCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TagCase valueOf(int value) { - return forNumber(value); - } - - public static TagCase forNumber(int value) { - switch (value) { - case 2: return INFO_TYPE; - case 3: return CUSTOM_TAG; - case 4: return INFERRED; - case 0: return TAG_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TagCase - getTagCase() { - return TagCase.forNumber( - tagCase_); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-       * Required. Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-       * Required. Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-       * Required. Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - public static final int INFO_TYPE_FIELD_NUMBER = 2; - /** - *
-       * A column can be tagged with a InfoType to use the relevant public
-       * dataset as a statistical model of population, if available. We
-       * currently support US ZIP codes, region codes, ages and genders.
-       * To programmatically obtain the list of supported InfoTypes, use
-       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return tagCase_ == 2; - } - /** - *
-       * A column can be tagged with a InfoType to use the relevant public
-       * dataset as a statistical model of population, if available. We
-       * currently support US ZIP codes, region codes, ages and genders.
-       * To programmatically obtain the list of supported InfoTypes, use
-       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (tagCase_ == 2) { - return (com.google.privacy.dlp.v2.InfoType) tag_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - /** - *
-       * A column can be tagged with a InfoType to use the relevant public
-       * dataset as a statistical model of population, if available. We
-       * currently support US ZIP codes, region codes, ages and genders.
-       * To programmatically obtain the list of supported InfoTypes, use
-       * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (tagCase_ == 2) { - return (com.google.privacy.dlp.v2.InfoType) tag_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - - public static final int CUSTOM_TAG_FIELD_NUMBER = 3; - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 3; - * @return Whether the customTag field is set. - */ - public boolean hasCustomTag() { - return tagCase_ == 3; - } - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 3; - * @return The customTag. - */ - public java.lang.String getCustomTag() { - java.lang.Object ref = ""; - if (tagCase_ == 3) { - ref = tag_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (tagCase_ == 3) { - tag_ = s; - } - return s; - } - } - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 3; - * @return The bytes for customTag. - */ - public com.google.protobuf.ByteString - getCustomTagBytes() { - java.lang.Object ref = ""; - if (tagCase_ == 3) { - ref = tag_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (tagCase_ == 3) { - tag_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INFERRED_FIELD_NUMBER = 4; - /** - *
-       * If no semantic tag is indicated, we infer the statistical model from
-       * the distribution of values in the input data
-       * 
- * - * .google.protobuf.Empty inferred = 4; - * @return Whether the inferred field is set. - */ - @java.lang.Override - public boolean hasInferred() { - return tagCase_ == 4; - } - /** - *
-       * If no semantic tag is indicated, we infer the statistical model from
-       * the distribution of values in the input data
-       * 
- * - * .google.protobuf.Empty inferred = 4; - * @return The inferred. - */ - @java.lang.Override - public com.google.protobuf.Empty getInferred() { - if (tagCase_ == 4) { - return (com.google.protobuf.Empty) tag_; - } - return com.google.protobuf.Empty.getDefaultInstance(); - } - /** - *
-       * If no semantic tag is indicated, we infer the statistical model from
-       * the distribution of values in the input data
-       * 
- * - * .google.protobuf.Empty inferred = 4; - */ - @java.lang.Override - public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { - if (tagCase_ == 4) { - return (com.google.protobuf.Empty) tag_; - } - return com.google.protobuf.Empty.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - if (tagCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.InfoType) tag_); - } - if (tagCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tag_); - } - if (tagCase_ == 4) { - output.writeMessage(4, (com.google.protobuf.Empty) tag_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getField()); - } - if (tagCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.InfoType) tag_); - } - if (tagCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tag_); - } - if (tagCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.protobuf.Empty) tag_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField other = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) obj; - - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (!getTagCase().equals(other.getTagCase())) return false; - switch (tagCase_) { - case 2: - if (!getInfoType() - .equals(other.getInfoType())) return false; - break; - case 3: - if (!getCustomTag() - .equals(other.getCustomTag())) return false; - break; - case 4: - if (!getInferred() - .equals(other.getInferred())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - switch (tagCase_) { - case 2: - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - break; - case 3: - hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; - hash = (53 * hash) + getCustomTag().hashCode(); - break; - case 4: - hash = (37 * hash) + INFERRED_FIELD_NUMBER; - hash = (53 * hash) + getInferred().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * A column with a semantic tag attached.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - tagCase_ = 0; - tag_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_TaggedField_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField build() { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField result = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - if (tagCase_ == 2) { - if (infoTypeBuilder_ == null) { - result.tag_ = tag_; - } else { - result.tag_ = infoTypeBuilder_.build(); - } - } - if (tagCase_ == 3) { - result.tag_ = tag_; - } - if (tagCase_ == 4) { - if (inferredBuilder_ == null) { - result.tag_ = tag_; - } else { - result.tag_ = inferredBuilder_.build(); - } - } - result.tagCase_ = tagCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - switch (other.getTagCase()) { - case INFO_TYPE: { - mergeInfoType(other.getInfoType()); - break; - } - case CUSTOM_TAG: { - tagCase_ = 3; - tag_ = other.tag_; - onChanged(); - break; - } - case INFERRED: { - mergeInferred(other.getInferred()); - break; - } - case TAG_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int tagCase_ = 0; - private java.lang.Object tag_; - public TagCase - getTagCase() { - return TagCase.forNumber( - tagCase_); - } - - public Builder clearTag() { - tagCase_ = 0; - tag_ = null; - onChanged(); - return this; - } - - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-         * Required. Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-         * Required. Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-         * Required. Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-         * Required. Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-         * Required. Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-         * Required. Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-         * Required. Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-         * Required. Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-         * Required. Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-         * A column can be tagged with a InfoType to use the relevant public
-         * dataset as a statistical model of population, if available. We
-         * currently support US ZIP codes, region codes, ages and genders.
-         * To programmatically obtain the list of supported InfoTypes, use
-         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return tagCase_ == 2; - } - /** - *
-         * A column can be tagged with a InfoType to use the relevant public
-         * dataset as a statistical model of population, if available. We
-         * currently support US ZIP codes, region codes, ages and genders.
-         * To programmatically obtain the list of supported InfoTypes, use
-         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - if (tagCase_ == 2) { - return (com.google.privacy.dlp.v2.InfoType) tag_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } else { - if (tagCase_ == 2) { - return infoTypeBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - } - /** - *
-         * A column can be tagged with a InfoType to use the relevant public
-         * dataset as a statistical model of population, if available. We
-         * currently support US ZIP codes, region codes, ages and genders.
-         * To programmatically obtain the list of supported InfoTypes, use
-         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tag_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - tagCase_ = 2; - return this; - } - /** - *
-         * A column can be tagged with a InfoType to use the relevant public
-         * dataset as a statistical model of population, if available. We
-         * currently support US ZIP codes, region codes, ages and genders.
-         * To programmatically obtain the list of supported InfoTypes, use
-         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - tag_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - tagCase_ = 2; - return this; - } - /** - *
-         * A column can be tagged with a InfoType to use the relevant public
-         * dataset as a statistical model of population, if available. We
-         * currently support US ZIP codes, region codes, ages and genders.
-         * To programmatically obtain the list of supported InfoTypes, use
-         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (tagCase_ == 2 && - tag_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) { - tag_ = com.google.privacy.dlp.v2.InfoType.newBuilder((com.google.privacy.dlp.v2.InfoType) tag_) - .mergeFrom(value).buildPartial(); - } else { - tag_ = value; - } - onChanged(); - } else { - if (tagCase_ == 2) { - infoTypeBuilder_.mergeFrom(value); - } else { - infoTypeBuilder_.setMessage(value); - } - } - tagCase_ = 2; - return this; - } - /** - *
-         * A column can be tagged with a InfoType to use the relevant public
-         * dataset as a statistical model of population, if available. We
-         * currently support US ZIP codes, region codes, ages and genders.
-         * To programmatically obtain the list of supported InfoTypes, use
-         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - if (tagCase_ == 2) { - tagCase_ = 0; - tag_ = null; - onChanged(); - } - } else { - if (tagCase_ == 2) { - tagCase_ = 0; - tag_ = null; - } - infoTypeBuilder_.clear(); - } - return this; - } - /** - *
-         * A column can be tagged with a InfoType to use the relevant public
-         * dataset as a statistical model of population, if available. We
-         * currently support US ZIP codes, region codes, ages and genders.
-         * To programmatically obtain the list of supported InfoTypes, use
-         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-         * A column can be tagged with a InfoType to use the relevant public
-         * dataset as a statistical model of population, if available. We
-         * currently support US ZIP codes, region codes, ages and genders.
-         * To programmatically obtain the list of supported InfoTypes, use
-         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if ((tagCase_ == 2) && (infoTypeBuilder_ != null)) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - if (tagCase_ == 2) { - return (com.google.privacy.dlp.v2.InfoType) tag_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - } - /** - *
-         * A column can be tagged with a InfoType to use the relevant public
-         * dataset as a statistical model of population, if available. We
-         * currently support US ZIP codes, region codes, ages and genders.
-         * To programmatically obtain the list of supported InfoTypes, use
-         * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-         * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - if (!(tagCase_ == 2)) { - tag_ = com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - (com.google.privacy.dlp.v2.InfoType) tag_, - getParentForChildren(), - isClean()); - tag_ = null; - } - tagCase_ = 2; - onChanged();; - return infoTypeBuilder_; - } - - /** - *
-         * A column can be tagged with a custom tag. In this case, the user must
-         * indicate an auxiliary table that contains statistical information on
-         * the possible values of this column (below).
-         * 
- * - * string custom_tag = 3; - * @return Whether the customTag field is set. - */ - @java.lang.Override - public boolean hasCustomTag() { - return tagCase_ == 3; - } - /** - *
-         * A column can be tagged with a custom tag. In this case, the user must
-         * indicate an auxiliary table that contains statistical information on
-         * the possible values of this column (below).
-         * 
- * - * string custom_tag = 3; - * @return The customTag. - */ - @java.lang.Override - public java.lang.String getCustomTag() { - java.lang.Object ref = ""; - if (tagCase_ == 3) { - ref = tag_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (tagCase_ == 3) { - tag_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-         * A column can be tagged with a custom tag. In this case, the user must
-         * indicate an auxiliary table that contains statistical information on
-         * the possible values of this column (below).
-         * 
- * - * string custom_tag = 3; - * @return The bytes for customTag. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCustomTagBytes() { - java.lang.Object ref = ""; - if (tagCase_ == 3) { - ref = tag_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (tagCase_ == 3) { - tag_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-         * A column can be tagged with a custom tag. In this case, the user must
-         * indicate an auxiliary table that contains statistical information on
-         * the possible values of this column (below).
-         * 
- * - * string custom_tag = 3; - * @param value The customTag to set. - * @return This builder for chaining. - */ - public Builder setCustomTag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - tagCase_ = 3; - tag_ = value; - onChanged(); - return this; - } - /** - *
-         * A column can be tagged with a custom tag. In this case, the user must
-         * indicate an auxiliary table that contains statistical information on
-         * the possible values of this column (below).
-         * 
- * - * string custom_tag = 3; - * @return This builder for chaining. - */ - public Builder clearCustomTag() { - if (tagCase_ == 3) { - tagCase_ = 0; - tag_ = null; - onChanged(); - } - return this; - } - /** - *
-         * A column can be tagged with a custom tag. In this case, the user must
-         * indicate an auxiliary table that contains statistical information on
-         * the possible values of this column (below).
-         * 
- * - * string custom_tag = 3; - * @param value The bytes for customTag to set. - * @return This builder for chaining. - */ - public Builder setCustomTagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - tagCase_ = 3; - tag_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> inferredBuilder_; - /** - *
-         * If no semantic tag is indicated, we infer the statistical model from
-         * the distribution of values in the input data
-         * 
- * - * .google.protobuf.Empty inferred = 4; - * @return Whether the inferred field is set. - */ - @java.lang.Override - public boolean hasInferred() { - return tagCase_ == 4; - } - /** - *
-         * If no semantic tag is indicated, we infer the statistical model from
-         * the distribution of values in the input data
-         * 
- * - * .google.protobuf.Empty inferred = 4; - * @return The inferred. - */ - @java.lang.Override - public com.google.protobuf.Empty getInferred() { - if (inferredBuilder_ == null) { - if (tagCase_ == 4) { - return (com.google.protobuf.Empty) tag_; - } - return com.google.protobuf.Empty.getDefaultInstance(); - } else { - if (tagCase_ == 4) { - return inferredBuilder_.getMessage(); - } - return com.google.protobuf.Empty.getDefaultInstance(); - } - } - /** - *
-         * If no semantic tag is indicated, we infer the statistical model from
-         * the distribution of values in the input data
-         * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public Builder setInferred(com.google.protobuf.Empty value) { - if (inferredBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tag_ = value; - onChanged(); - } else { - inferredBuilder_.setMessage(value); - } - tagCase_ = 4; - return this; - } - /** - *
-         * If no semantic tag is indicated, we infer the statistical model from
-         * the distribution of values in the input data
-         * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public Builder setInferred( - com.google.protobuf.Empty.Builder builderForValue) { - if (inferredBuilder_ == null) { - tag_ = builderForValue.build(); - onChanged(); - } else { - inferredBuilder_.setMessage(builderForValue.build()); - } - tagCase_ = 4; - return this; - } - /** - *
-         * If no semantic tag is indicated, we infer the statistical model from
-         * the distribution of values in the input data
-         * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public Builder mergeInferred(com.google.protobuf.Empty value) { - if (inferredBuilder_ == null) { - if (tagCase_ == 4 && - tag_ != com.google.protobuf.Empty.getDefaultInstance()) { - tag_ = com.google.protobuf.Empty.newBuilder((com.google.protobuf.Empty) tag_) - .mergeFrom(value).buildPartial(); - } else { - tag_ = value; - } - onChanged(); - } else { - if (tagCase_ == 4) { - inferredBuilder_.mergeFrom(value); - } else { - inferredBuilder_.setMessage(value); - } - } - tagCase_ = 4; - return this; - } - /** - *
-         * If no semantic tag is indicated, we infer the statistical model from
-         * the distribution of values in the input data
-         * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public Builder clearInferred() { - if (inferredBuilder_ == null) { - if (tagCase_ == 4) { - tagCase_ = 0; - tag_ = null; - onChanged(); - } - } else { - if (tagCase_ == 4) { - tagCase_ = 0; - tag_ = null; - } - inferredBuilder_.clear(); - } - return this; - } - /** - *
-         * If no semantic tag is indicated, we infer the statistical model from
-         * the distribution of values in the input data
-         * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public com.google.protobuf.Empty.Builder getInferredBuilder() { - return getInferredFieldBuilder().getBuilder(); - } - /** - *
-         * If no semantic tag is indicated, we infer the statistical model from
-         * the distribution of values in the input data
-         * 
- * - * .google.protobuf.Empty inferred = 4; - */ - @java.lang.Override - public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { - if ((tagCase_ == 4) && (inferredBuilder_ != null)) { - return inferredBuilder_.getMessageOrBuilder(); - } else { - if (tagCase_ == 4) { - return (com.google.protobuf.Empty) tag_; - } - return com.google.protobuf.Empty.getDefaultInstance(); - } - } - /** - *
-         * If no semantic tag is indicated, we infer the statistical model from
-         * the distribution of values in the input data
-         * 
- * - * .google.protobuf.Empty inferred = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> - getInferredFieldBuilder() { - if (inferredBuilder_ == null) { - if (!(tagCase_ == 4)) { - tag_ = com.google.protobuf.Empty.getDefaultInstance(); - } - inferredBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder>( - (com.google.protobuf.Empty) tag_, - getParentForChildren(), - isClean()); - tag_ = null; - } - tagCase_ = 4; - onChanged();; - return inferredBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) - private static final com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TaggedField parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TaggedField(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AuxiliaryTableOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * Required. Auxiliary table location.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the table field is set. - */ - boolean hasTable(); - /** - *
-       * Required. Auxiliary table location.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - com.google.privacy.dlp.v2.BigQueryTable getTable(); - /** - *
-       * Required. Auxiliary table location.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); - - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getQuasiIdsList(); - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getQuasiIds(int index); - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getQuasiIdsCount(); - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getQuasiIdsOrBuilderList(); - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder getQuasiIdsOrBuilder( - int index); - - /** - *
-       * Required. The relative frequency column must contain a floating-point number
-       * between 0 and 1 (inclusive). Null values are assumed to be zero.
-       * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the relativeFrequency field is set. - */ - boolean hasRelativeFrequency(); - /** - *
-       * Required. The relative frequency column must contain a floating-point number
-       * between 0 and 1 (inclusive). Null values are assumed to be zero.
-       * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The relativeFrequency. - */ - com.google.privacy.dlp.v2.FieldId getRelativeFrequency(); - /** - *
-       * Required. The relative frequency column must contain a floating-point number
-       * between 0 and 1 (inclusive). Null values are assumed to be zero.
-       * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder(); - } - /** - *
-     * An auxiliary table contains statistical information on the relative
-     * frequency of different quasi-identifiers values. It has one or several
-     * quasi-identifiers columns, and one column that indicates the relative
-     * frequency of each quasi-identifier tuple.
-     * If a tuple is present in the data but not in the auxiliary table, the
-     * corresponding relative frequency is assumed to be zero (and thus, the
-     * tuple is highly reidentifiable).
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable} - */ - public static final class AuxiliaryTable extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) - AuxiliaryTableOrBuilder { - private static final long serialVersionUID = 0L; - // Use AuxiliaryTable.newBuilder() to construct. - private AuxiliaryTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AuxiliaryTable() { - quasiIds_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AuxiliaryTable(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AuxiliaryTable( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIds_.add( - input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (relativeFrequency_ != null) { - subBuilder = relativeFrequency_.toBuilder(); - } - relativeFrequency_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relativeFrequency_); - relativeFrequency_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (table_ != null) { - subBuilder = table_.toBuilder(); - } - table_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(table_); - table_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder.class); - } - - public interface QuasiIdFieldOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) - com.google.protobuf.MessageOrBuilder { - - /** - *
-         * Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-         * Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-         * Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); - - /** - *
-         * A auxiliary field.
-         * 
- * - * string custom_tag = 2; - * @return The customTag. - */ - java.lang.String getCustomTag(); - /** - *
-         * A auxiliary field.
-         * 
- * - * string custom_tag = 2; - * @return The bytes for customTag. - */ - com.google.protobuf.ByteString - getCustomTagBytes(); - } - /** - *
-       * A quasi-identifier column has a custom_tag, used to know which column
-       * in the data corresponds to which column in the statistical model.
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField} - */ - public static final class QuasiIdField extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) - QuasiIdFieldOrBuilder { - private static final long serialVersionUID = 0L; - // Use QuasiIdField.newBuilder() to construct. - private QuasiIdField(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private QuasiIdField() { - customTag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QuasiIdField(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private QuasiIdField( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - customTag_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-         * Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-         * Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-         * Identifies the column.
-         * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - public static final int CUSTOM_TAG_FIELD_NUMBER = 2; - private volatile java.lang.Object customTag_; - /** - *
-         * A auxiliary field.
-         * 
- * - * string custom_tag = 2; - * @return The customTag. - */ - @java.lang.Override - public java.lang.String getCustomTag() { - java.lang.Object ref = customTag_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - customTag_ = s; - return s; - } - } - /** - *
-         * A auxiliary field.
-         * 
- * - * string custom_tag = 2; - * @return The bytes for customTag. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCustomTagBytes() { - java.lang.Object ref = customTag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - customTag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customTag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customTag_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getField()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customTag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customTag_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField other = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) obj; - - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (!getCustomTag() - .equals(other.getCustomTag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; - hash = (53 * hash) + getCustomTag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-         * A quasi-identifier column has a custom_tag, used to know which column
-         * in the data corresponds to which column in the statistical model.
-         * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - customTag_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField build() { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField result = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - result.customTag_ = customTag_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - if (!other.getCustomTag().isEmpty()) { - customTag_ = other.customTag_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-           * Identifies the column.
-           * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-           * Identifies the column.
-           * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-           * Identifies the column.
-           * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-           * Identifies the column.
-           * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-           * Identifies the column.
-           * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-           * Identifies the column.
-           * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-           * Identifies the column.
-           * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-           * Identifies the column.
-           * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-           * Identifies the column.
-           * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - - private java.lang.Object customTag_ = ""; - /** - *
-           * A auxiliary field.
-           * 
- * - * string custom_tag = 2; - * @return The customTag. - */ - public java.lang.String getCustomTag() { - java.lang.Object ref = customTag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - customTag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-           * A auxiliary field.
-           * 
- * - * string custom_tag = 2; - * @return The bytes for customTag. - */ - public com.google.protobuf.ByteString - getCustomTagBytes() { - java.lang.Object ref = customTag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - customTag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-           * A auxiliary field.
-           * 
- * - * string custom_tag = 2; - * @param value The customTag to set. - * @return This builder for chaining. - */ - public Builder setCustomTag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - customTag_ = value; - onChanged(); - return this; - } - /** - *
-           * A auxiliary field.
-           * 
- * - * string custom_tag = 2; - * @return This builder for chaining. - */ - public Builder clearCustomTag() { - - customTag_ = getDefaultInstance().getCustomTag(); - onChanged(); - return this; - } - /** - *
-           * A auxiliary field.
-           * 
- * - * string custom_tag = 2; - * @param value The bytes for customTag to set. - * @return This builder for chaining. - */ - public Builder setCustomTagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - customTag_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) - private static final com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QuasiIdField parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QuasiIdField(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int TABLE_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.BigQueryTable table_; - /** - *
-       * Required. Auxiliary table location.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the table field is set. - */ - @java.lang.Override - public boolean hasTable() { - return table_ != null; - } - /** - *
-       * Required. Auxiliary table location.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getTable() { - return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; - } - /** - *
-       * Required. Auxiliary table location.
-       * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { - return getTable(); - } - - public static final int QUASI_IDS_FIELD_NUMBER = 1; - private java.util.List quasiIds_; - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getQuasiIdsList() { - return quasiIds_; - } - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getQuasiIdsOrBuilderList() { - return quasiIds_; - } - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getQuasiIdsCount() { - return quasiIds_.size(); - } - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getQuasiIds(int index) { - return quasiIds_.get(index); - } - /** - *
-       * Required. Quasi-identifier columns.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder getQuasiIdsOrBuilder( - int index) { - return quasiIds_.get(index); - } - - public static final int RELATIVE_FREQUENCY_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.FieldId relativeFrequency_; - /** - *
-       * Required. The relative frequency column must contain a floating-point number
-       * between 0 and 1 (inclusive). Null values are assumed to be zero.
-       * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the relativeFrequency field is set. - */ - @java.lang.Override - public boolean hasRelativeFrequency() { - return relativeFrequency_ != null; - } - /** - *
-       * Required. The relative frequency column must contain a floating-point number
-       * between 0 and 1 (inclusive). Null values are assumed to be zero.
-       * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The relativeFrequency. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { - return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; - } - /** - *
-       * Required. The relative frequency column must contain a floating-point number
-       * between 0 and 1 (inclusive). Null values are assumed to be zero.
-       * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { - return getRelativeFrequency(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIds_.size(); i++) { - output.writeMessage(1, quasiIds_.get(i)); - } - if (relativeFrequency_ != null) { - output.writeMessage(2, getRelativeFrequency()); - } - if (table_ != null) { - output.writeMessage(3, getTable()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIds_.get(i)); - } - if (relativeFrequency_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRelativeFrequency()); - } - if (table_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTable()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable other = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) obj; - - if (hasTable() != other.hasTable()) return false; - if (hasTable()) { - if (!getTable() - .equals(other.getTable())) return false; - } - if (!getQuasiIdsList() - .equals(other.getQuasiIdsList())) return false; - if (hasRelativeFrequency() != other.hasRelativeFrequency()) return false; - if (hasRelativeFrequency()) { - if (!getRelativeFrequency() - .equals(other.getRelativeFrequency())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTable()) { - hash = (37 * hash) + TABLE_FIELD_NUMBER; - hash = (53 * hash) + getTable().hashCode(); - } - if (getQuasiIdsCount() > 0) { - hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsList().hashCode(); - } - if (hasRelativeFrequency()) { - hash = (37 * hash) + RELATIVE_FREQUENCY_FIELD_NUMBER; - hash = (53 * hash) + getRelativeFrequency().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * An auxiliary table contains statistical information on the relative
-       * frequency of different quasi-identifiers values. It has one or several
-       * quasi-identifiers columns, and one column that indicates the relative
-       * frequency of each quasi-identifier tuple.
-       * If a tuple is present in the data but not in the auxiliary table, the
-       * corresponding relative frequency is assumed to be zero (and thus, the
-       * tuple is highly reidentifiable).
-       * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (tableBuilder_ == null) { - table_ = null; - } else { - table_ = null; - tableBuilder_ = null; - } - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsBuilder_.clear(); - } - if (relativeFrequencyBuilder_ == null) { - relativeFrequency_ = null; - } else { - relativeFrequency_ = null; - relativeFrequencyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable build() { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable result = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable(this); - int from_bitField0_ = bitField0_; - if (tableBuilder_ == null) { - result.table_ = table_; - } else { - result.table_ = tableBuilder_.build(); - } - if (quasiIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIds_ = quasiIds_; - } else { - result.quasiIds_ = quasiIdsBuilder_.build(); - } - if (relativeFrequencyBuilder_ == null) { - result.relativeFrequency_ = relativeFrequency_; - } else { - result.relativeFrequency_ = relativeFrequencyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.getDefaultInstance()) return this; - if (other.hasTable()) { - mergeTable(other.getTable()); - } - if (quasiIdsBuilder_ == null) { - if (!other.quasiIds_.isEmpty()) { - if (quasiIds_.isEmpty()) { - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsIsMutable(); - quasiIds_.addAll(other.quasiIds_); - } - onChanged(); - } - } else { - if (!other.quasiIds_.isEmpty()) { - if (quasiIdsBuilder_.isEmpty()) { - quasiIdsBuilder_.dispose(); - quasiIdsBuilder_ = null; - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsFieldBuilder() : null; - } else { - quasiIdsBuilder_.addAllMessages(other.quasiIds_); - } - } - } - if (other.hasRelativeFrequency()) { - mergeRelativeFrequency(other.getRelativeFrequency()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.BigQueryTable table_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; - /** - *
-         * Required. Auxiliary table location.
-         * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the table field is set. - */ - public boolean hasTable() { - return tableBuilder_ != null || table_ != null; - } - /** - *
-         * Required. Auxiliary table location.
-         * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - public com.google.privacy.dlp.v2.BigQueryTable getTable() { - if (tableBuilder_ == null) { - return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; - } else { - return tableBuilder_.getMessage(); - } - } - /** - *
-         * Required. Auxiliary table location.
-         * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - table_ = value; - onChanged(); - } else { - tableBuilder_.setMessage(value); - } - - return this; - } - /** - *
-         * Required. Auxiliary table location.
-         * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setTable( - com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { - if (tableBuilder_ == null) { - table_ = builderForValue.build(); - onChanged(); - } else { - tableBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-         * Required. Auxiliary table location.
-         * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableBuilder_ == null) { - if (table_ != null) { - table_ = - com.google.privacy.dlp.v2.BigQueryTable.newBuilder(table_).mergeFrom(value).buildPartial(); - } else { - table_ = value; - } - onChanged(); - } else { - tableBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-         * Required. Auxiliary table location.
-         * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearTable() { - if (tableBuilder_ == null) { - table_ = null; - onChanged(); - } else { - table_ = null; - tableBuilder_ = null; - } - - return this; - } - /** - *
-         * Required. Auxiliary table location.
-         * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { - - onChanged(); - return getTableFieldBuilder().getBuilder(); - } - /** - *
-         * Required. Auxiliary table location.
-         * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { - if (tableBuilder_ != null) { - return tableBuilder_.getMessageOrBuilder(); - } else { - return table_ == null ? - com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; - } - } - /** - *
-         * Required. Auxiliary table location.
-         * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> - getTableFieldBuilder() { - if (tableBuilder_ == null) { - tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( - getTable(), - getParentForChildren(), - isClean()); - table_ = null; - } - return tableBuilder_; - } - - private java.util.List quasiIds_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(quasiIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder> quasiIdsBuilder_; - - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getQuasiIdsList() { - if (quasiIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIds_); - } else { - return quasiIdsBuilder_.getMessageList(); - } - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getQuasiIdsCount() { - if (quasiIdsBuilder_ == null) { - return quasiIds_.size(); - } else { - return quasiIdsBuilder_.getCount(); - } - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField getQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); - } else { - return quasiIdsBuilder_.getMessage(index); - } - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, value); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(value); - } - return this; - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllQuasiIds( - java.lang.Iterable values) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIds_); - onChanged(); - } else { - quasiIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearQuasiIds() { - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsBuilder_.clear(); - } - return this; - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.remove(index); - onChanged(); - } else { - quasiIdsBuilder_.remove(index); - } - return this; - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder getQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().getBuilder(index); - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder getQuasiIdsOrBuilder( - int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); } else { - return quasiIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getQuasiIdsOrBuilderList() { - if (quasiIdsBuilder_ != null) { - return quasiIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIds_); - } - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder addQuasiIdsBuilder() { - return getQuasiIdsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.getDefaultInstance()); - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder addQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.getDefaultInstance()); - } - /** - *
-         * Required. Quasi-identifier columns.
-         * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getQuasiIdsBuilderList() { - return getQuasiIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder> - getQuasiIdsFieldBuilder() { - if (quasiIdsBuilder_ == null) { - quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdFieldOrBuilder>( - quasiIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIds_ = null; - } - return quasiIdsBuilder_; - } - - private com.google.privacy.dlp.v2.FieldId relativeFrequency_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> relativeFrequencyBuilder_; - /** - *
-         * Required. The relative frequency column must contain a floating-point number
-         * between 0 and 1 (inclusive). Null values are assumed to be zero.
-         * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the relativeFrequency field is set. - */ - public boolean hasRelativeFrequency() { - return relativeFrequencyBuilder_ != null || relativeFrequency_ != null; - } - /** - *
-         * Required. The relative frequency column must contain a floating-point number
-         * between 0 and 1 (inclusive). Null values are assumed to be zero.
-         * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The relativeFrequency. - */ - public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { - if (relativeFrequencyBuilder_ == null) { - return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; - } else { - return relativeFrequencyBuilder_.getMessage(); - } - } - /** - *
-         * Required. The relative frequency column must contain a floating-point number
-         * between 0 and 1 (inclusive). Null values are assumed to be zero.
-         * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { - if (relativeFrequencyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - relativeFrequency_ = value; - onChanged(); - } else { - relativeFrequencyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-         * Required. The relative frequency column must contain a floating-point number
-         * between 0 and 1 (inclusive). Null values are assumed to be zero.
-         * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRelativeFrequency( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (relativeFrequencyBuilder_ == null) { - relativeFrequency_ = builderForValue.build(); - onChanged(); - } else { - relativeFrequencyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-         * Required. The relative frequency column must contain a floating-point number
-         * between 0 and 1 (inclusive). Null values are assumed to be zero.
-         * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { - if (relativeFrequencyBuilder_ == null) { - if (relativeFrequency_ != null) { - relativeFrequency_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(relativeFrequency_).mergeFrom(value).buildPartial(); - } else { - relativeFrequency_ = value; - } - onChanged(); - } else { - relativeFrequencyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-         * Required. The relative frequency column must contain a floating-point number
-         * between 0 and 1 (inclusive). Null values are assumed to be zero.
-         * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRelativeFrequency() { - if (relativeFrequencyBuilder_ == null) { - relativeFrequency_ = null; - onChanged(); - } else { - relativeFrequency_ = null; - relativeFrequencyBuilder_ = null; - } - - return this; - } - /** - *
-         * Required. The relative frequency column must contain a floating-point number
-         * between 0 and 1 (inclusive). Null values are assumed to be zero.
-         * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getRelativeFrequencyBuilder() { - - onChanged(); - return getRelativeFrequencyFieldBuilder().getBuilder(); - } - /** - *
-         * Required. The relative frequency column must contain a floating-point number
-         * between 0 and 1 (inclusive). Null values are assumed to be zero.
-         * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { - if (relativeFrequencyBuilder_ != null) { - return relativeFrequencyBuilder_.getMessageOrBuilder(); - } else { - return relativeFrequency_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; - } - } - /** - *
-         * Required. The relative frequency column must contain a floating-point number
-         * between 0 and 1 (inclusive). Null values are assumed to be zero.
-         * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getRelativeFrequencyFieldBuilder() { - if (relativeFrequencyBuilder_ == null) { - relativeFrequencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getRelativeFrequency(), - getParentForChildren(), - isClean()); - relativeFrequency_ = null; - } - return relativeFrequencyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) - private static final com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AuxiliaryTable parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AuxiliaryTable(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int QUASI_IDS_FIELD_NUMBER = 1; - private java.util.List quasiIds_; - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getQuasiIdsList() { - return quasiIds_; - } - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getQuasiIdsOrBuilderList() { - return quasiIds_; - } - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getQuasiIdsCount() { - return quasiIds_.size(); - } - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getQuasiIds(int index) { - return quasiIds_.get(index); - } - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two columns can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder getQuasiIdsOrBuilder( - int index) { - return quasiIds_.get(index); - } - - public static final int REGION_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object regionCode_; - /** - *
-     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-     * Set if no column is tagged with a region-specific InfoType (like
-     * US_ZIP_5) or a region code.
-     * 
- * - * string region_code = 2; - * @return The regionCode. - */ - @java.lang.Override - public java.lang.String getRegionCode() { - java.lang.Object ref = regionCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - regionCode_ = s; - return s; - } - } - /** - *
-     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-     * Set if no column is tagged with a region-specific InfoType (like
-     * US_ZIP_5) or a region code.
-     * 
- * - * string region_code = 2; - * @return The bytes for regionCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRegionCodeBytes() { - java.lang.Object ref = regionCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - regionCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AUXILIARY_TABLES_FIELD_NUMBER = 3; - private java.util.List auxiliaryTables_; - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - @java.lang.Override - public java.util.List getAuxiliaryTablesList() { - return auxiliaryTables_; - } - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - @java.lang.Override - public java.util.List - getAuxiliaryTablesOrBuilderList() { - return auxiliaryTables_; - } - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - @java.lang.Override - public int getAuxiliaryTablesCount() { - return auxiliaryTables_.size(); - } - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getAuxiliaryTables(int index) { - return auxiliaryTables_.get(index); - } - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers column must appear in exactly one column
-     * of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder getAuxiliaryTablesOrBuilder( - int index) { - return auxiliaryTables_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIds_.size(); i++) { - output.writeMessage(1, quasiIds_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regionCode_); - } - for (int i = 0; i < auxiliaryTables_.size(); i++) { - output.writeMessage(3, auxiliaryTables_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIds_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, regionCode_); - } - for (int i = 0; i < auxiliaryTables_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, auxiliaryTables_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) obj; - - if (!getQuasiIdsList() - .equals(other.getQuasiIdsList())) return false; - if (!getRegionCode() - .equals(other.getRegionCode())) return false; - if (!getAuxiliaryTablesList() - .equals(other.getAuxiliaryTablesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getQuasiIdsCount() > 0) { - hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsList().hashCode(); - } - hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; - hash = (53 * hash) + getRegionCode().hashCode(); - if (getAuxiliaryTablesCount() > 0) { - hash = (37 * hash) + AUXILIARY_TABLES_FIELD_NUMBER; - hash = (53 * hash) + getAuxiliaryTablesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Reidentifiability metric. This corresponds to a risk model similar to what
-     * is called "journalist risk" in the literature, except the attack dataset is
-     * statistically modeled instead of being perfectly known. This can be done
-     * using publicly available data (like the US Census), or using a custom
-     * statistical model (indicated as one or several BigQuery tables), or by
-     * extrapolating from the distribution of values in the input dataset.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsFieldBuilder(); - getAuxiliaryTablesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsBuilder_.clear(); - } - regionCode_ = ""; - - if (auxiliaryTablesBuilder_ == null) { - auxiliaryTables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - auxiliaryTablesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig build() { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig(this); - int from_bitField0_ = bitField0_; - if (quasiIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIds_ = quasiIds_; - } else { - result.quasiIds_ = quasiIdsBuilder_.build(); - } - result.regionCode_ = regionCode_; - if (auxiliaryTablesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.auxiliaryTables_ = auxiliaryTables_; - } else { - result.auxiliaryTables_ = auxiliaryTablesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance()) return this; - if (quasiIdsBuilder_ == null) { - if (!other.quasiIds_.isEmpty()) { - if (quasiIds_.isEmpty()) { - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsIsMutable(); - quasiIds_.addAll(other.quasiIds_); - } - onChanged(); - } - } else { - if (!other.quasiIds_.isEmpty()) { - if (quasiIdsBuilder_.isEmpty()) { - quasiIdsBuilder_.dispose(); - quasiIdsBuilder_ = null; - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsFieldBuilder() : null; - } else { - quasiIdsBuilder_.addAllMessages(other.quasiIds_); - } - } - } - if (!other.getRegionCode().isEmpty()) { - regionCode_ = other.regionCode_; - onChanged(); - } - if (auxiliaryTablesBuilder_ == null) { - if (!other.auxiliaryTables_.isEmpty()) { - if (auxiliaryTables_.isEmpty()) { - auxiliaryTables_ = other.auxiliaryTables_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.addAll(other.auxiliaryTables_); - } - onChanged(); - } - } else { - if (!other.auxiliaryTables_.isEmpty()) { - if (auxiliaryTablesBuilder_.isEmpty()) { - auxiliaryTablesBuilder_.dispose(); - auxiliaryTablesBuilder_ = null; - auxiliaryTables_ = other.auxiliaryTables_; - bitField0_ = (bitField0_ & ~0x00000002); - auxiliaryTablesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAuxiliaryTablesFieldBuilder() : null; - } else { - auxiliaryTablesBuilder_.addAllMessages(other.auxiliaryTables_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List quasiIds_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(quasiIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder> quasiIdsBuilder_; - - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getQuasiIdsList() { - if (quasiIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIds_); - } else { - return quasiIdsBuilder_.getMessageList(); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getQuasiIdsCount() { - if (quasiIdsBuilder_ == null) { - return quasiIds_.size(); - } else { - return quasiIdsBuilder_.getCount(); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField getQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); - } else { - return quasiIdsBuilder_.getMessage(index); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, value); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllQuasiIds( - java.lang.Iterable values) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIds_); - onChanged(); - } else { - quasiIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearQuasiIds() { - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsBuilder_.clear(); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.remove(index); - onChanged(); - } else { - quasiIdsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder getQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().getBuilder(index); - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder getQuasiIdsOrBuilder( - int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); } else { - return quasiIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getQuasiIdsOrBuilderList() { - if (quasiIdsBuilder_ != null) { - return quasiIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIds_); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder addQuasiIdsBuilder() { - return getQuasiIdsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.getDefaultInstance()); - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder addQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.getDefaultInstance()); - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two columns can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getQuasiIdsBuilderList() { - return getQuasiIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder> - getQuasiIdsFieldBuilder() { - if (quasiIdsBuilder_ == null) { - quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedFieldOrBuilder>( - quasiIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIds_ = null; - } - return quasiIdsBuilder_; - } - - private java.lang.Object regionCode_ = ""; - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @return The regionCode. - */ - public java.lang.String getRegionCode() { - java.lang.Object ref = regionCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - regionCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @return The bytes for regionCode. - */ - public com.google.protobuf.ByteString - getRegionCodeBytes() { - java.lang.Object ref = regionCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - regionCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @param value The regionCode to set. - * @return This builder for chaining. - */ - public Builder setRegionCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - regionCode_ = value; - onChanged(); - return this; - } - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @return This builder for chaining. - */ - public Builder clearRegionCode() { - - regionCode_ = getDefaultInstance().getRegionCode(); - onChanged(); - return this; - } - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @param value The bytes for regionCode to set. - * @return This builder for chaining. - */ - public Builder setRegionCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - regionCode_ = value; - onChanged(); - return this; - } - - private java.util.List auxiliaryTables_ = - java.util.Collections.emptyList(); - private void ensureAuxiliaryTablesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - auxiliaryTables_ = new java.util.ArrayList(auxiliaryTables_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder> auxiliaryTablesBuilder_; - - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public java.util.List getAuxiliaryTablesList() { - if (auxiliaryTablesBuilder_ == null) { - return java.util.Collections.unmodifiableList(auxiliaryTables_); - } else { - return auxiliaryTablesBuilder_.getMessageList(); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public int getAuxiliaryTablesCount() { - if (auxiliaryTablesBuilder_ == null) { - return auxiliaryTables_.size(); - } else { - return auxiliaryTablesBuilder_.getCount(); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable getAuxiliaryTables(int index) { - if (auxiliaryTablesBuilder_ == null) { - return auxiliaryTables_.get(index); - } else { - return auxiliaryTablesBuilder_.getMessage(index); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public Builder setAuxiliaryTables( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable value) { - if (auxiliaryTablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.set(index, value); - onChanged(); - } else { - auxiliaryTablesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public Builder setAuxiliaryTables( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder builderForValue) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.set(index, builderForValue.build()); - onChanged(); - } else { - auxiliaryTablesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public Builder addAuxiliaryTables(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable value) { - if (auxiliaryTablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.add(value); - onChanged(); - } else { - auxiliaryTablesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public Builder addAuxiliaryTables( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable value) { - if (auxiliaryTablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.add(index, value); - onChanged(); - } else { - auxiliaryTablesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public Builder addAuxiliaryTables( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder builderForValue) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.add(builderForValue.build()); - onChanged(); - } else { - auxiliaryTablesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public Builder addAuxiliaryTables( - int index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder builderForValue) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.add(index, builderForValue.build()); - onChanged(); - } else { - auxiliaryTablesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public Builder addAllAuxiliaryTables( - java.lang.Iterable values) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, auxiliaryTables_); - onChanged(); - } else { - auxiliaryTablesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public Builder clearAuxiliaryTables() { - if (auxiliaryTablesBuilder_ == null) { - auxiliaryTables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - auxiliaryTablesBuilder_.clear(); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public Builder removeAuxiliaryTables(int index) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.remove(index); - onChanged(); - } else { - auxiliaryTablesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder getAuxiliaryTablesBuilder( - int index) { - return getAuxiliaryTablesFieldBuilder().getBuilder(index); - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder getAuxiliaryTablesOrBuilder( - int index) { - if (auxiliaryTablesBuilder_ == null) { - return auxiliaryTables_.get(index); } else { - return auxiliaryTablesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public java.util.List - getAuxiliaryTablesOrBuilderList() { - if (auxiliaryTablesBuilder_ != null) { - return auxiliaryTablesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(auxiliaryTables_); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder addAuxiliaryTablesBuilder() { - return getAuxiliaryTablesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.getDefaultInstance()); - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder addAuxiliaryTablesBuilder( - int index) { - return getAuxiliaryTablesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.getDefaultInstance()); - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers column must appear in exactly one column
-       * of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable auxiliary_tables = 3; - */ - public java.util.List - getAuxiliaryTablesBuilderList() { - return getAuxiliaryTablesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder> - getAuxiliaryTablesFieldBuilder() { - if (auxiliaryTablesBuilder_ == null) { - auxiliaryTablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTableOrBuilder>( - auxiliaryTables_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - auxiliaryTables_ = null; - } - return auxiliaryTablesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) - private static final com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KMapEstimationConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new KMapEstimationConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DeltaPresenceEstimationConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getQuasiIdsList(); - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.QuasiId getQuasiIds(int index); - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getQuasiIdsCount(); - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getQuasiIdsOrBuilderList(); - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.QuasiIdOrBuilder getQuasiIdsOrBuilder( - int index); - - /** - *
-     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-     * Set if no column is tagged with a region-specific InfoType (like
-     * US_ZIP_5) or a region code.
-     * 
- * - * string region_code = 2; - * @return The regionCode. - */ - java.lang.String getRegionCode(); - /** - *
-     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-     * Set if no column is tagged with a region-specific InfoType (like
-     * US_ZIP_5) or a region code.
-     * 
- * - * string region_code = 2; - * @return The bytes for regionCode. - */ - com.google.protobuf.ByteString - getRegionCodeBytes(); - - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - java.util.List - getAuxiliaryTablesList(); - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - com.google.privacy.dlp.v2.StatisticalTable getAuxiliaryTables(int index); - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - int getAuxiliaryTablesCount(); - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - java.util.List - getAuxiliaryTablesOrBuilderList(); - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - com.google.privacy.dlp.v2.StatisticalTableOrBuilder getAuxiliaryTablesOrBuilder( - int index); - } - /** - *
-   * δ-presence metric, used to estimate how likely it is for an attacker to
-   * figure out that one given individual appears in a de-identified dataset.
-   * Similarly to the k-map metric, we cannot compute δ-presence exactly without
-   * knowing the attack dataset, so we use a statistical model instead.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} - */ - public static final class DeltaPresenceEstimationConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) - DeltaPresenceEstimationConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeltaPresenceEstimationConfig.newBuilder() to construct. - private DeltaPresenceEstimationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeltaPresenceEstimationConfig() { - quasiIds_ = java.util.Collections.emptyList(); - regionCode_ = ""; - auxiliaryTables_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeltaPresenceEstimationConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeltaPresenceEstimationConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIds_.add( - input.readMessage(com.google.privacy.dlp.v2.QuasiId.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - regionCode_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - auxiliaryTables_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - auxiliaryTables_.add( - input.readMessage(com.google.privacy.dlp.v2.StatisticalTable.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder.class); - } - - public static final int QUASI_IDS_FIELD_NUMBER = 1; - private java.util.List quasiIds_; - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getQuasiIdsList() { - return quasiIds_; - } - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getQuasiIdsOrBuilderList() { - return quasiIds_; - } - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getQuasiIdsCount() { - return quasiIds_.size(); - } - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.QuasiId getQuasiIds(int index) { - return quasiIds_.get(index); - } - /** - *
-     * Required. Fields considered to be quasi-identifiers. No two fields can have the
-     * same tag.
-     * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.QuasiIdOrBuilder getQuasiIdsOrBuilder( - int index) { - return quasiIds_.get(index); - } - - public static final int REGION_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object regionCode_; - /** - *
-     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-     * Set if no column is tagged with a region-specific InfoType (like
-     * US_ZIP_5) or a region code.
-     * 
- * - * string region_code = 2; - * @return The regionCode. - */ - @java.lang.Override - public java.lang.String getRegionCode() { - java.lang.Object ref = regionCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - regionCode_ = s; - return s; - } - } - /** - *
-     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-     * Set if no column is tagged with a region-specific InfoType (like
-     * US_ZIP_5) or a region code.
-     * 
- * - * string region_code = 2; - * @return The bytes for regionCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRegionCodeBytes() { - java.lang.Object ref = regionCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - regionCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AUXILIARY_TABLES_FIELD_NUMBER = 3; - private java.util.List auxiliaryTables_; - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - @java.lang.Override - public java.util.List getAuxiliaryTablesList() { - return auxiliaryTables_; - } - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - @java.lang.Override - public java.util.List - getAuxiliaryTablesOrBuilderList() { - return auxiliaryTables_; - } - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - @java.lang.Override - public int getAuxiliaryTablesCount() { - return auxiliaryTables_.size(); - } - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable getAuxiliaryTables(int index) { - return auxiliaryTables_.get(index); - } - /** - *
-     * Several auxiliary tables can be used in the analysis. Each custom_tag
-     * used to tag a quasi-identifiers field must appear in exactly one
-     * field of one auxiliary table.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTableOrBuilder getAuxiliaryTablesOrBuilder( - int index) { - return auxiliaryTables_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIds_.size(); i++) { - output.writeMessage(1, quasiIds_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regionCode_); - } - for (int i = 0; i < auxiliaryTables_.size(); i++) { - output.writeMessage(3, auxiliaryTables_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIds_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, regionCode_); - } - for (int i = 0; i < auxiliaryTables_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, auxiliaryTables_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) obj; - - if (!getQuasiIdsList() - .equals(other.getQuasiIdsList())) return false; - if (!getRegionCode() - .equals(other.getRegionCode())) return false; - if (!getAuxiliaryTablesList() - .equals(other.getAuxiliaryTablesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getQuasiIdsCount() > 0) { - hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsList().hashCode(); - } - hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; - hash = (53 * hash) + getRegionCode().hashCode(); - if (getAuxiliaryTablesCount() > 0) { - hash = (37 * hash) + AUXILIARY_TABLES_FIELD_NUMBER; - hash = (53 * hash) + getAuxiliaryTablesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * δ-presence metric, used to estimate how likely it is for an attacker to
-     * figure out that one given individual appears in a de-identified dataset.
-     * Similarly to the k-map metric, we cannot compute δ-presence exactly without
-     * knowing the attack dataset, so we use a statistical model instead.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsFieldBuilder(); - getAuxiliaryTablesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsBuilder_.clear(); - } - regionCode_ = ""; - - if (auxiliaryTablesBuilder_ == null) { - auxiliaryTables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - auxiliaryTablesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig build() { - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig(this); - int from_bitField0_ = bitField0_; - if (quasiIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIds_ = quasiIds_; - } else { - result.quasiIds_ = quasiIdsBuilder_.build(); - } - result.regionCode_ = regionCode_; - if (auxiliaryTablesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.auxiliaryTables_ = auxiliaryTables_; - } else { - result.auxiliaryTables_ = auxiliaryTablesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance()) return this; - if (quasiIdsBuilder_ == null) { - if (!other.quasiIds_.isEmpty()) { - if (quasiIds_.isEmpty()) { - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsIsMutable(); - quasiIds_.addAll(other.quasiIds_); - } - onChanged(); - } - } else { - if (!other.quasiIds_.isEmpty()) { - if (quasiIdsBuilder_.isEmpty()) { - quasiIdsBuilder_.dispose(); - quasiIdsBuilder_ = null; - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsFieldBuilder() : null; - } else { - quasiIdsBuilder_.addAllMessages(other.quasiIds_); - } - } - } - if (!other.getRegionCode().isEmpty()) { - regionCode_ = other.regionCode_; - onChanged(); - } - if (auxiliaryTablesBuilder_ == null) { - if (!other.auxiliaryTables_.isEmpty()) { - if (auxiliaryTables_.isEmpty()) { - auxiliaryTables_ = other.auxiliaryTables_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.addAll(other.auxiliaryTables_); - } - onChanged(); - } - } else { - if (!other.auxiliaryTables_.isEmpty()) { - if (auxiliaryTablesBuilder_.isEmpty()) { - auxiliaryTablesBuilder_.dispose(); - auxiliaryTablesBuilder_ = null; - auxiliaryTables_ = other.auxiliaryTables_; - bitField0_ = (bitField0_ & ~0x00000002); - auxiliaryTablesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAuxiliaryTablesFieldBuilder() : null; - } else { - auxiliaryTablesBuilder_.addAllMessages(other.auxiliaryTables_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List quasiIds_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(quasiIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.QuasiId, com.google.privacy.dlp.v2.QuasiId.Builder, com.google.privacy.dlp.v2.QuasiIdOrBuilder> quasiIdsBuilder_; - - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getQuasiIdsList() { - if (quasiIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIds_); - } else { - return quasiIdsBuilder_.getMessageList(); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getQuasiIdsCount() { - if (quasiIdsBuilder_ == null) { - return quasiIds_.size(); - } else { - return quasiIdsBuilder_.getCount(); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.QuasiId getQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); - } else { - return quasiIdsBuilder_.getMessage(index); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.QuasiId value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, value); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.QuasiId.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds(com.google.privacy.dlp.v2.QuasiId value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.QuasiId value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - com.google.privacy.dlp.v2.QuasiId.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.QuasiId.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllQuasiIds( - java.lang.Iterable values) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIds_); - onChanged(); - } else { - quasiIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearQuasiIds() { - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsBuilder_.clear(); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.remove(index); - onChanged(); - } else { - quasiIdsBuilder_.remove(index); - } - return this; - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.QuasiId.Builder getQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().getBuilder(index); - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.QuasiIdOrBuilder getQuasiIdsOrBuilder( - int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); } else { - return quasiIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getQuasiIdsOrBuilderList() { - if (quasiIdsBuilder_ != null) { - return quasiIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIds_); - } - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.QuasiId.Builder addQuasiIdsBuilder() { - return getQuasiIdsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.QuasiId.getDefaultInstance()); - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.QuasiId.Builder addQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.QuasiId.getDefaultInstance()); - } - /** - *
-       * Required. Fields considered to be quasi-identifiers. No two fields can have the
-       * same tag.
-       * 
- * - * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getQuasiIdsBuilderList() { - return getQuasiIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.QuasiId, com.google.privacy.dlp.v2.QuasiId.Builder, com.google.privacy.dlp.v2.QuasiIdOrBuilder> - getQuasiIdsFieldBuilder() { - if (quasiIdsBuilder_ == null) { - quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.QuasiId, com.google.privacy.dlp.v2.QuasiId.Builder, com.google.privacy.dlp.v2.QuasiIdOrBuilder>( - quasiIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIds_ = null; - } - return quasiIdsBuilder_; - } - - private java.lang.Object regionCode_ = ""; - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @return The regionCode. - */ - public java.lang.String getRegionCode() { - java.lang.Object ref = regionCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - regionCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @return The bytes for regionCode. - */ - public com.google.protobuf.ByteString - getRegionCodeBytes() { - java.lang.Object ref = regionCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - regionCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @param value The regionCode to set. - * @return This builder for chaining. - */ - public Builder setRegionCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - regionCode_ = value; - onChanged(); - return this; - } - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @return This builder for chaining. - */ - public Builder clearRegionCode() { - - regionCode_ = getDefaultInstance().getRegionCode(); - onChanged(); - return this; - } - /** - *
-       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
-       * Set if no column is tagged with a region-specific InfoType (like
-       * US_ZIP_5) or a region code.
-       * 
- * - * string region_code = 2; - * @param value The bytes for regionCode to set. - * @return This builder for chaining. - */ - public Builder setRegionCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - regionCode_ = value; - onChanged(); - return this; - } - - private java.util.List auxiliaryTables_ = - java.util.Collections.emptyList(); - private void ensureAuxiliaryTablesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - auxiliaryTables_ = new java.util.ArrayList(auxiliaryTables_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StatisticalTable, com.google.privacy.dlp.v2.StatisticalTable.Builder, com.google.privacy.dlp.v2.StatisticalTableOrBuilder> auxiliaryTablesBuilder_; - - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public java.util.List getAuxiliaryTablesList() { - if (auxiliaryTablesBuilder_ == null) { - return java.util.Collections.unmodifiableList(auxiliaryTables_); - } else { - return auxiliaryTablesBuilder_.getMessageList(); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public int getAuxiliaryTablesCount() { - if (auxiliaryTablesBuilder_ == null) { - return auxiliaryTables_.size(); - } else { - return auxiliaryTablesBuilder_.getCount(); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.StatisticalTable getAuxiliaryTables(int index) { - if (auxiliaryTablesBuilder_ == null) { - return auxiliaryTables_.get(index); - } else { - return auxiliaryTablesBuilder_.getMessage(index); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public Builder setAuxiliaryTables( - int index, com.google.privacy.dlp.v2.StatisticalTable value) { - if (auxiliaryTablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.set(index, value); - onChanged(); - } else { - auxiliaryTablesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public Builder setAuxiliaryTables( - int index, com.google.privacy.dlp.v2.StatisticalTable.Builder builderForValue) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.set(index, builderForValue.build()); - onChanged(); - } else { - auxiliaryTablesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public Builder addAuxiliaryTables(com.google.privacy.dlp.v2.StatisticalTable value) { - if (auxiliaryTablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.add(value); - onChanged(); - } else { - auxiliaryTablesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public Builder addAuxiliaryTables( - int index, com.google.privacy.dlp.v2.StatisticalTable value) { - if (auxiliaryTablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.add(index, value); - onChanged(); - } else { - auxiliaryTablesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public Builder addAuxiliaryTables( - com.google.privacy.dlp.v2.StatisticalTable.Builder builderForValue) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.add(builderForValue.build()); - onChanged(); - } else { - auxiliaryTablesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public Builder addAuxiliaryTables( - int index, com.google.privacy.dlp.v2.StatisticalTable.Builder builderForValue) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.add(index, builderForValue.build()); - onChanged(); - } else { - auxiliaryTablesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public Builder addAllAuxiliaryTables( - java.lang.Iterable values) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, auxiliaryTables_); - onChanged(); - } else { - auxiliaryTablesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public Builder clearAuxiliaryTables() { - if (auxiliaryTablesBuilder_ == null) { - auxiliaryTables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - auxiliaryTablesBuilder_.clear(); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public Builder removeAuxiliaryTables(int index) { - if (auxiliaryTablesBuilder_ == null) { - ensureAuxiliaryTablesIsMutable(); - auxiliaryTables_.remove(index); - onChanged(); - } else { - auxiliaryTablesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.StatisticalTable.Builder getAuxiliaryTablesBuilder( - int index) { - return getAuxiliaryTablesFieldBuilder().getBuilder(index); - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.StatisticalTableOrBuilder getAuxiliaryTablesOrBuilder( - int index) { - if (auxiliaryTablesBuilder_ == null) { - return auxiliaryTables_.get(index); } else { - return auxiliaryTablesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public java.util.List - getAuxiliaryTablesOrBuilderList() { - if (auxiliaryTablesBuilder_ != null) { - return auxiliaryTablesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(auxiliaryTables_); - } - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.StatisticalTable.Builder addAuxiliaryTablesBuilder() { - return getAuxiliaryTablesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance()); - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public com.google.privacy.dlp.v2.StatisticalTable.Builder addAuxiliaryTablesBuilder( - int index) { - return getAuxiliaryTablesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance()); - } - /** - *
-       * Several auxiliary tables can be used in the analysis. Each custom_tag
-       * used to tag a quasi-identifiers field must appear in exactly one
-       * field of one auxiliary table.
-       * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; - */ - public java.util.List - getAuxiliaryTablesBuilderList() { - return getAuxiliaryTablesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StatisticalTable, com.google.privacy.dlp.v2.StatisticalTable.Builder, com.google.privacy.dlp.v2.StatisticalTableOrBuilder> - getAuxiliaryTablesFieldBuilder() { - if (auxiliaryTablesBuilder_ == null) { - auxiliaryTablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StatisticalTable, com.google.privacy.dlp.v2.StatisticalTable.Builder, com.google.privacy.dlp.v2.StatisticalTableOrBuilder>( - auxiliaryTables_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - auxiliaryTables_ = null; - } - return auxiliaryTablesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) - private static final com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeltaPresenceEstimationConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeltaPresenceEstimationConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - NUMERICAL_STATS_CONFIG(1), - CATEGORICAL_STATS_CONFIG(2), - K_ANONYMITY_CONFIG(3), - L_DIVERSITY_CONFIG(4), - K_MAP_ESTIMATION_CONFIG(5), - DELTA_PRESENCE_ESTIMATION_CONFIG(6), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return NUMERICAL_STATS_CONFIG; - case 2: return CATEGORICAL_STATS_CONFIG; - case 3: return K_ANONYMITY_CONFIG; - case 4: return L_DIVERSITY_CONFIG; - case 5: return K_MAP_ESTIMATION_CONFIG; - case 6: return DELTA_PRESENCE_ESTIMATION_CONFIG; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int NUMERICAL_STATS_CONFIG_FIELD_NUMBER = 1; - /** - *
-   * Numerical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - * @return Whether the numericalStatsConfig field is set. - */ - @java.lang.Override - public boolean hasNumericalStatsConfig() { - return typeCase_ == 1; - } - /** - *
-   * Numerical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - * @return The numericalStatsConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getNumericalStatsConfig() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); - } - /** - *
-   * Numerical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder getNumericalStatsConfigOrBuilder() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); - } - - public static final int CATEGORICAL_STATS_CONFIG_FIELD_NUMBER = 2; - /** - *
-   * Categorical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - * @return Whether the categoricalStatsConfig field is set. - */ - @java.lang.Override - public boolean hasCategoricalStatsConfig() { - return typeCase_ == 2; - } - /** - *
-   * Categorical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - * @return The categoricalStatsConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getCategoricalStatsConfig() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); - } - /** - *
-   * Categorical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder getCategoricalStatsConfigOrBuilder() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); - } - - public static final int K_ANONYMITY_CONFIG_FIELD_NUMBER = 3; - /** - *
-   * K-anonymity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - * @return Whether the kAnonymityConfig field is set. - */ - @java.lang.Override - public boolean hasKAnonymityConfig() { - return typeCase_ == 3; - } - /** - *
-   * K-anonymity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - * @return The kAnonymityConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getKAnonymityConfig() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); - } - /** - *
-   * K-anonymity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder getKAnonymityConfigOrBuilder() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); - } - - public static final int L_DIVERSITY_CONFIG_FIELD_NUMBER = 4; - /** - *
-   * l-diversity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - * @return Whether the lDiversityConfig field is set. - */ - @java.lang.Override - public boolean hasLDiversityConfig() { - return typeCase_ == 4; - } - /** - *
-   * l-diversity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - * @return The lDiversityConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getLDiversityConfig() { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); - } - /** - *
-   * l-diversity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder getLDiversityConfigOrBuilder() { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); - } - - public static final int K_MAP_ESTIMATION_CONFIG_FIELD_NUMBER = 5; - /** - *
-   * k-map
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - * @return Whether the kMapEstimationConfig field is set. - */ - @java.lang.Override - public boolean hasKMapEstimationConfig() { - return typeCase_ == 5; - } - /** - *
-   * k-map
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - * @return The kMapEstimationConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getKMapEstimationConfig() { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); - } - /** - *
-   * k-map
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder getKMapEstimationConfigOrBuilder() { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); - } - - public static final int DELTA_PRESENCE_ESTIMATION_CONFIG_FIELD_NUMBER = 6; - /** - *
-   * delta-presence
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - * @return Whether the deltaPresenceEstimationConfig field is set. - */ - @java.lang.Override - public boolean hasDeltaPresenceEstimationConfig() { - return typeCase_ == 6; - } - /** - *
-   * delta-presence
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - * @return The deltaPresenceEstimationConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDeltaPresenceEstimationConfig() { - if (typeCase_ == 6) { - return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); - } - /** - *
-   * delta-presence
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder getDeltaPresenceEstimationConfigOrBuilder() { - if (typeCase_ == 6) { - return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_); - } - if (typeCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_); - } - if (typeCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_); - } - if (typeCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_); - } - if (typeCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_); - } - if (typeCase_ == 6) { - output.writeMessage(6, (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_); - } - if (typeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_); - } - if (typeCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_); - } - if (typeCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_); - } - if (typeCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_); - } - if (typeCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.PrivacyMetric)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.PrivacyMetric other = (com.google.privacy.dlp.v2.PrivacyMetric) obj; - - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 1: - if (!getNumericalStatsConfig() - .equals(other.getNumericalStatsConfig())) return false; - break; - case 2: - if (!getCategoricalStatsConfig() - .equals(other.getCategoricalStatsConfig())) return false; - break; - case 3: - if (!getKAnonymityConfig() - .equals(other.getKAnonymityConfig())) return false; - break; - case 4: - if (!getLDiversityConfig() - .equals(other.getLDiversityConfig())) return false; - break; - case 5: - if (!getKMapEstimationConfig() - .equals(other.getKMapEstimationConfig())) return false; - break; - case 6: - if (!getDeltaPresenceEstimationConfig() - .equals(other.getDeltaPresenceEstimationConfig())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (typeCase_) { - case 1: - hash = (37 * hash) + NUMERICAL_STATS_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNumericalStatsConfig().hashCode(); - break; - case 2: - hash = (37 * hash) + CATEGORICAL_STATS_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getCategoricalStatsConfig().hashCode(); - break; - case 3: - hash = (37 * hash) + K_ANONYMITY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getKAnonymityConfig().hashCode(); - break; - case 4: - hash = (37 * hash) + L_DIVERSITY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLDiversityConfig().hashCode(); - break; - case 5: - hash = (37 * hash) + K_MAP_ESTIMATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getKMapEstimationConfig().hashCode(); - break; - case 6: - hash = (37 * hash) + DELTA_PRESENCE_ESTIMATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDeltaPresenceEstimationConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.PrivacyMetric parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Privacy metric to compute for reidentification risk analysis.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric) - com.google.privacy.dlp.v2.PrivacyMetricOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.PrivacyMetric.class, com.google.privacy.dlp.v2.PrivacyMetric.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.PrivacyMetric.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric build() { - com.google.privacy.dlp.v2.PrivacyMetric result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric buildPartial() { - com.google.privacy.dlp.v2.PrivacyMetric result = new com.google.privacy.dlp.v2.PrivacyMetric(this); - if (typeCase_ == 1) { - if (numericalStatsConfigBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = numericalStatsConfigBuilder_.build(); - } - } - if (typeCase_ == 2) { - if (categoricalStatsConfigBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = categoricalStatsConfigBuilder_.build(); - } - } - if (typeCase_ == 3) { - if (kAnonymityConfigBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = kAnonymityConfigBuilder_.build(); - } - } - if (typeCase_ == 4) { - if (lDiversityConfigBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = lDiversityConfigBuilder_.build(); - } - } - if (typeCase_ == 5) { - if (kMapEstimationConfigBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = kMapEstimationConfigBuilder_.build(); - } - } - if (typeCase_ == 6) { - if (deltaPresenceEstimationConfigBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = deltaPresenceEstimationConfigBuilder_.build(); - } - } - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric) { - return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric other) { - if (other == com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance()) return this; - switch (other.getTypeCase()) { - case NUMERICAL_STATS_CONFIG: { - mergeNumericalStatsConfig(other.getNumericalStatsConfig()); - break; - } - case CATEGORICAL_STATS_CONFIG: { - mergeCategoricalStatsConfig(other.getCategoricalStatsConfig()); - break; - } - case K_ANONYMITY_CONFIG: { - mergeKAnonymityConfig(other.getKAnonymityConfig()); - break; - } - case L_DIVERSITY_CONFIG: { - mergeLDiversityConfig(other.getLDiversityConfig()); - break; - } - case K_MAP_ESTIMATION_CONFIG: { - mergeKMapEstimationConfig(other.getKMapEstimationConfig()); - break; - } - case DELTA_PRESENCE_ESTIMATION_CONFIG: { - mergeDeltaPresenceEstimationConfig(other.getDeltaPresenceEstimationConfig()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.PrivacyMetric parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder> numericalStatsConfigBuilder_; - /** - *
-     * Numerical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - * @return Whether the numericalStatsConfig field is set. - */ - @java.lang.Override - public boolean hasNumericalStatsConfig() { - return typeCase_ == 1; - } - /** - *
-     * Numerical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - * @return The numericalStatsConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getNumericalStatsConfig() { - if (numericalStatsConfigBuilder_ == null) { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); - } else { - if (typeCase_ == 1) { - return numericalStatsConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); - } - } - /** - *
-     * Numerical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - public Builder setNumericalStatsConfig(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig value) { - if (numericalStatsConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - numericalStatsConfigBuilder_.setMessage(value); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Numerical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - public Builder setNumericalStatsConfig( - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder builderForValue) { - if (numericalStatsConfigBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - numericalStatsConfigBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 1; - return this; - } - /** - *
-     * Numerical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - public Builder mergeNumericalStatsConfig(com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig value) { - if (numericalStatsConfigBuilder_ == null) { - if (typeCase_ == 1 && - type_ != com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 1) { - numericalStatsConfigBuilder_.mergeFrom(value); - } else { - numericalStatsConfigBuilder_.setMessage(value); - } - } - typeCase_ = 1; - return this; - } - /** - *
-     * Numerical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - public Builder clearNumericalStatsConfig() { - if (numericalStatsConfigBuilder_ == null) { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - } - numericalStatsConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Numerical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder getNumericalStatsConfigBuilder() { - return getNumericalStatsConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Numerical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder getNumericalStatsConfigOrBuilder() { - if ((typeCase_ == 1) && (numericalStatsConfigBuilder_ != null)) { - return numericalStatsConfigBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); - } - } - /** - *
-     * Numerical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder> - getNumericalStatsConfigFieldBuilder() { - if (numericalStatsConfigBuilder_ == null) { - if (!(typeCase_ == 1)) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); - } - numericalStatsConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder>( - (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 1; - onChanged();; - return numericalStatsConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder> categoricalStatsConfigBuilder_; - /** - *
-     * Categorical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - * @return Whether the categoricalStatsConfig field is set. - */ - @java.lang.Override - public boolean hasCategoricalStatsConfig() { - return typeCase_ == 2; - } - /** - *
-     * Categorical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - * @return The categoricalStatsConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getCategoricalStatsConfig() { - if (categoricalStatsConfigBuilder_ == null) { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); - } else { - if (typeCase_ == 2) { - return categoricalStatsConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); - } - } - /** - *
-     * Categorical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - public Builder setCategoricalStatsConfig(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig value) { - if (categoricalStatsConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - categoricalStatsConfigBuilder_.setMessage(value); - } - typeCase_ = 2; - return this; - } - /** - *
-     * Categorical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - public Builder setCategoricalStatsConfig( - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder builderForValue) { - if (categoricalStatsConfigBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - categoricalStatsConfigBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 2; - return this; - } - /** - *
-     * Categorical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - public Builder mergeCategoricalStatsConfig(com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig value) { - if (categoricalStatsConfigBuilder_ == null) { - if (typeCase_ == 2 && - type_ != com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 2) { - categoricalStatsConfigBuilder_.mergeFrom(value); - } else { - categoricalStatsConfigBuilder_.setMessage(value); - } - } - typeCase_ = 2; - return this; - } - /** - *
-     * Categorical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - public Builder clearCategoricalStatsConfig() { - if (categoricalStatsConfigBuilder_ == null) { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - } - categoricalStatsConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Categorical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder getCategoricalStatsConfigBuilder() { - return getCategoricalStatsConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Categorical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder getCategoricalStatsConfigOrBuilder() { - if ((typeCase_ == 2) && (categoricalStatsConfigBuilder_ != null)) { - return categoricalStatsConfigBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); - } - } - /** - *
-     * Categorical stats
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder> - getCategoricalStatsConfigFieldBuilder() { - if (categoricalStatsConfigBuilder_ == null) { - if (!(typeCase_ == 2)) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); - } - categoricalStatsConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder>( - (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 2; - onChanged();; - return categoricalStatsConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder> kAnonymityConfigBuilder_; - /** - *
-     * K-anonymity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - * @return Whether the kAnonymityConfig field is set. - */ - @java.lang.Override - public boolean hasKAnonymityConfig() { - return typeCase_ == 3; - } - /** - *
-     * K-anonymity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - * @return The kAnonymityConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getKAnonymityConfig() { - if (kAnonymityConfigBuilder_ == null) { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); - } else { - if (typeCase_ == 3) { - return kAnonymityConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); - } - } - /** - *
-     * K-anonymity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - public Builder setKAnonymityConfig(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig value) { - if (kAnonymityConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - kAnonymityConfigBuilder_.setMessage(value); - } - typeCase_ = 3; - return this; - } - /** - *
-     * K-anonymity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - public Builder setKAnonymityConfig( - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder builderForValue) { - if (kAnonymityConfigBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - kAnonymityConfigBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 3; - return this; - } - /** - *
-     * K-anonymity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - public Builder mergeKAnonymityConfig(com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig value) { - if (kAnonymityConfigBuilder_ == null) { - if (typeCase_ == 3 && - type_ != com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 3) { - kAnonymityConfigBuilder_.mergeFrom(value); - } else { - kAnonymityConfigBuilder_.setMessage(value); - } - } - typeCase_ = 3; - return this; - } - /** - *
-     * K-anonymity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - public Builder clearKAnonymityConfig() { - if (kAnonymityConfigBuilder_ == null) { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - } - kAnonymityConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * K-anonymity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder getKAnonymityConfigBuilder() { - return getKAnonymityConfigFieldBuilder().getBuilder(); - } - /** - *
-     * K-anonymity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder getKAnonymityConfigOrBuilder() { - if ((typeCase_ == 3) && (kAnonymityConfigBuilder_ != null)) { - return kAnonymityConfigBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); - } - } - /** - *
-     * K-anonymity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder> - getKAnonymityConfigFieldBuilder() { - if (kAnonymityConfigBuilder_ == null) { - if (!(typeCase_ == 3)) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); - } - kAnonymityConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder>( - (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 3; - onChanged();; - return kAnonymityConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder> lDiversityConfigBuilder_; - /** - *
-     * l-diversity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - * @return Whether the lDiversityConfig field is set. - */ - @java.lang.Override - public boolean hasLDiversityConfig() { - return typeCase_ == 4; - } - /** - *
-     * l-diversity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - * @return The lDiversityConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getLDiversityConfig() { - if (lDiversityConfigBuilder_ == null) { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); - } else { - if (typeCase_ == 4) { - return lDiversityConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); - } - } - /** - *
-     * l-diversity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - */ - public Builder setLDiversityConfig(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig value) { - if (lDiversityConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - lDiversityConfigBuilder_.setMessage(value); - } - typeCase_ = 4; - return this; - } - /** - *
-     * l-diversity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - */ - public Builder setLDiversityConfig( - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder builderForValue) { - if (lDiversityConfigBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - lDiversityConfigBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 4; - return this; - } - /** - *
-     * l-diversity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - */ - public Builder mergeLDiversityConfig(com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig value) { - if (lDiversityConfigBuilder_ == null) { - if (typeCase_ == 4 && - type_ != com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 4) { - lDiversityConfigBuilder_.mergeFrom(value); - } else { - lDiversityConfigBuilder_.setMessage(value); - } - } - typeCase_ = 4; - return this; - } - /** - *
-     * l-diversity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - */ - public Builder clearLDiversityConfig() { - if (lDiversityConfigBuilder_ == null) { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - } - lDiversityConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * l-diversity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder getLDiversityConfigBuilder() { - return getLDiversityConfigFieldBuilder().getBuilder(); - } - /** - *
-     * l-diversity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder getLDiversityConfigOrBuilder() { - if ((typeCase_ == 4) && (lDiversityConfigBuilder_ != null)) { - return lDiversityConfigBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); - } - } - /** - *
-     * l-diversity
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder> - getLDiversityConfigFieldBuilder() { - if (lDiversityConfigBuilder_ == null) { - if (!(typeCase_ == 4)) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.getDefaultInstance(); - } - lDiversityConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder>( - (com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 4; - onChanged();; - return lDiversityConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder> kMapEstimationConfigBuilder_; - /** - *
-     * k-map
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - * @return Whether the kMapEstimationConfig field is set. - */ - @java.lang.Override - public boolean hasKMapEstimationConfig() { - return typeCase_ == 5; - } - /** - *
-     * k-map
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - * @return The kMapEstimationConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getKMapEstimationConfig() { - if (kMapEstimationConfigBuilder_ == null) { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); - } else { - if (typeCase_ == 5) { - return kMapEstimationConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); - } - } - /** - *
-     * k-map
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - */ - public Builder setKMapEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig value) { - if (kMapEstimationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - kMapEstimationConfigBuilder_.setMessage(value); - } - typeCase_ = 5; - return this; - } - /** - *
-     * k-map
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - */ - public Builder setKMapEstimationConfig( - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder builderForValue) { - if (kMapEstimationConfigBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - kMapEstimationConfigBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 5; - return this; - } - /** - *
-     * k-map
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - */ - public Builder mergeKMapEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig value) { - if (kMapEstimationConfigBuilder_ == null) { - if (typeCase_ == 5 && - type_ != com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 5) { - kMapEstimationConfigBuilder_.mergeFrom(value); - } else { - kMapEstimationConfigBuilder_.setMessage(value); - } - } - typeCase_ = 5; - return this; - } - /** - *
-     * k-map
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - */ - public Builder clearKMapEstimationConfig() { - if (kMapEstimationConfigBuilder_ == null) { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - } - kMapEstimationConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * k-map
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder getKMapEstimationConfigBuilder() { - return getKMapEstimationConfigFieldBuilder().getBuilder(); - } - /** - *
-     * k-map
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder getKMapEstimationConfigOrBuilder() { - if ((typeCase_ == 5) && (kMapEstimationConfigBuilder_ != null)) { - return kMapEstimationConfigBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); - } - } - /** - *
-     * k-map
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder> - getKMapEstimationConfigFieldBuilder() { - if (kMapEstimationConfigBuilder_ == null) { - if (!(typeCase_ == 5)) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); - } - kMapEstimationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder>( - (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 5; - onChanged();; - return kMapEstimationConfigBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder> deltaPresenceEstimationConfigBuilder_; - /** - *
-     * delta-presence
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - * @return Whether the deltaPresenceEstimationConfig field is set. - */ - @java.lang.Override - public boolean hasDeltaPresenceEstimationConfig() { - return typeCase_ == 6; - } - /** - *
-     * delta-presence
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - * @return The deltaPresenceEstimationConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDeltaPresenceEstimationConfig() { - if (deltaPresenceEstimationConfigBuilder_ == null) { - if (typeCase_ == 6) { - return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); - } else { - if (typeCase_ == 6) { - return deltaPresenceEstimationConfigBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); - } - } - /** - *
-     * delta-presence
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - */ - public Builder setDeltaPresenceEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig value) { - if (deltaPresenceEstimationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - deltaPresenceEstimationConfigBuilder_.setMessage(value); - } - typeCase_ = 6; - return this; - } - /** - *
-     * delta-presence
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - */ - public Builder setDeltaPresenceEstimationConfig( - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder builderForValue) { - if (deltaPresenceEstimationConfigBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - deltaPresenceEstimationConfigBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 6; - return this; - } - /** - *
-     * delta-presence
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - */ - public Builder mergeDeltaPresenceEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig value) { - if (deltaPresenceEstimationConfigBuilder_ == null) { - if (typeCase_ == 6 && - type_ != com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 6) { - deltaPresenceEstimationConfigBuilder_.mergeFrom(value); - } else { - deltaPresenceEstimationConfigBuilder_.setMessage(value); - } - } - typeCase_ = 6; - return this; - } - /** - *
-     * delta-presence
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - */ - public Builder clearDeltaPresenceEstimationConfig() { - if (deltaPresenceEstimationConfigBuilder_ == null) { - if (typeCase_ == 6) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 6) { - typeCase_ = 0; - type_ = null; - } - deltaPresenceEstimationConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * delta-presence
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder getDeltaPresenceEstimationConfigBuilder() { - return getDeltaPresenceEstimationConfigFieldBuilder().getBuilder(); - } - /** - *
-     * delta-presence
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder getDeltaPresenceEstimationConfigOrBuilder() { - if ((typeCase_ == 6) && (deltaPresenceEstimationConfigBuilder_ != null)) { - return deltaPresenceEstimationConfigBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 6) { - return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); - } - } - /** - *
-     * delta-presence
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder> - getDeltaPresenceEstimationConfigFieldBuilder() { - if (deltaPresenceEstimationConfigBuilder_ == null) { - if (!(typeCase_ == 6)) { - type_ = com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); - } - deltaPresenceEstimationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder>( - (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 6; - onChanged();; - return deltaPresenceEstimationConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric) - private static final com.google.privacy.dlp.v2.PrivacyMetric DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric(); - } - - public static com.google.privacy.dlp.v2.PrivacyMetric getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PrivacyMetric parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PrivacyMetric(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java deleted file mode 100644 index c04cb76f16b2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java +++ /dev/null @@ -1,173 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface PrivacyMetricOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Numerical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - * @return Whether the numericalStatsConfig field is set. - */ - boolean hasNumericalStatsConfig(); - /** - *
-   * Numerical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - * @return The numericalStatsConfig. - */ - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getNumericalStatsConfig(); - /** - *
-   * Numerical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder getNumericalStatsConfigOrBuilder(); - - /** - *
-   * Categorical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - * @return Whether the categoricalStatsConfig field is set. - */ - boolean hasCategoricalStatsConfig(); - /** - *
-   * Categorical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - * @return The categoricalStatsConfig. - */ - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getCategoricalStatsConfig(); - /** - *
-   * Categorical stats
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder getCategoricalStatsConfigOrBuilder(); - - /** - *
-   * K-anonymity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - * @return Whether the kAnonymityConfig field is set. - */ - boolean hasKAnonymityConfig(); - /** - *
-   * K-anonymity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - * @return The kAnonymityConfig. - */ - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getKAnonymityConfig(); - /** - *
-   * K-anonymity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder getKAnonymityConfigOrBuilder(); - - /** - *
-   * l-diversity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - * @return Whether the lDiversityConfig field is set. - */ - boolean hasLDiversityConfig(); - /** - *
-   * l-diversity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - * @return The lDiversityConfig. - */ - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig getLDiversityConfig(); - /** - *
-   * l-diversity
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; - */ - com.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfigOrBuilder getLDiversityConfigOrBuilder(); - - /** - *
-   * k-map
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - * @return Whether the kMapEstimationConfig field is set. - */ - boolean hasKMapEstimationConfig(); - /** - *
-   * k-map
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - * @return The kMapEstimationConfig. - */ - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getKMapEstimationConfig(); - /** - *
-   * k-map
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig k_map_estimation_config = 5; - */ - com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder getKMapEstimationConfigOrBuilder(); - - /** - *
-   * delta-presence
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - * @return Whether the deltaPresenceEstimationConfig field is set. - */ - boolean hasDeltaPresenceEstimationConfig(); - /** - *
-   * delta-presence
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - * @return The deltaPresenceEstimationConfig. - */ - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDeltaPresenceEstimationConfig(); - /** - *
-   * delta-presence
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - */ - com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder getDeltaPresenceEstimationConfigOrBuilder(); - - public com.google.privacy.dlp.v2.PrivacyMetric.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatus.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatus.java deleted file mode 100644 index 5bac3337de68..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatus.java +++ /dev/null @@ -1,893 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - * Protobuf type {@code google.privacy.dlp.v2.ProfileStatus} - */ -public final class ProfileStatus extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ProfileStatus) - ProfileStatusOrBuilder { -private static final long serialVersionUID = 0L; - // Use ProfileStatus.newBuilder() to construct. - private ProfileStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProfileStatus() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProfileStatus(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProfileStatus( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.rpc.Status.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); - } - timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ProfileStatus.class, com.google.privacy.dlp.v2.ProfileStatus.Builder.class); - } - - public static final int STATUS_FIELD_NUMBER = 1; - private com.google.rpc.Status status_; - /** - *
-   * Profiling status code and optional message
-   * 
- * - * .google.rpc.Status status = 1; - * @return Whether the status field is set. - */ - @java.lang.Override - public boolean hasStatus() { - return status_ != null; - } - /** - *
-   * Profiling status code and optional message
-   * 
- * - * .google.rpc.Status status = 1; - * @return The status. - */ - @java.lang.Override - public com.google.rpc.Status getStatus() { - return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; - } - /** - *
-   * Profiling status code and optional message
-   * 
- * - * .google.rpc.Status status = 1; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { - return getStatus(); - } - - public static final int TIMESTAMP_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp timestamp_; - /** - *
-   * Time when the profile generation status was updated
-   * 
- * - * .google.protobuf.Timestamp timestamp = 3; - * @return Whether the timestamp field is set. - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - *
-   * Time when the profile generation status was updated
-   * 
- * - * .google.protobuf.Timestamp timestamp = 3; - * @return The timestamp. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getTimestamp() { - return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; - } - /** - *
-   * Time when the profile generation status was updated
-   * 
- * - * .google.protobuf.Timestamp timestamp = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (status_ != null) { - output.writeMessage(1, getStatus()); - } - if (timestamp_ != null) { - output.writeMessage(3, getTimestamp()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (status_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getStatus()); - } - if (timestamp_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTimestamp()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ProfileStatus)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ProfileStatus other = (com.google.privacy.dlp.v2.ProfileStatus) obj; - - if (hasStatus() != other.hasStatus()) return false; - if (hasStatus()) { - if (!getStatus() - .equals(other.getStatus())) return false; - } - if (hasTimestamp() != other.hasTimestamp()) return false; - if (hasTimestamp()) { - if (!getTimestamp() - .equals(other.getTimestamp())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStatus()) { - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus().hashCode(); - } - if (hasTimestamp()) { - hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; - hash = (53 * hash) + getTimestamp().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ProfileStatus parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ProfileStatus prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code google.privacy.dlp.v2.ProfileStatus} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ProfileStatus) - com.google.privacy.dlp.v2.ProfileStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ProfileStatus.class, com.google.privacy.dlp.v2.ProfileStatus.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ProfileStatus.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (statusBuilder_ == null) { - status_ = null; - } else { - status_ = null; - statusBuilder_ = null; - } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ProfileStatus_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ProfileStatus getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ProfileStatus build() { - com.google.privacy.dlp.v2.ProfileStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ProfileStatus buildPartial() { - com.google.privacy.dlp.v2.ProfileStatus result = new com.google.privacy.dlp.v2.ProfileStatus(this); - if (statusBuilder_ == null) { - result.status_ = status_; - } else { - result.status_ = statusBuilder_.build(); - } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.timestamp_ = timestampBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ProfileStatus) { - return mergeFrom((com.google.privacy.dlp.v2.ProfileStatus)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ProfileStatus other) { - if (other == com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance()) return this; - if (other.hasStatus()) { - mergeStatus(other.getStatus()); - } - if (other.hasTimestamp()) { - mergeTimestamp(other.getTimestamp()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ProfileStatus parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ProfileStatus) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.rpc.Status status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> statusBuilder_; - /** - *
-     * Profiling status code and optional message
-     * 
- * - * .google.rpc.Status status = 1; - * @return Whether the status field is set. - */ - public boolean hasStatus() { - return statusBuilder_ != null || status_ != null; - } - /** - *
-     * Profiling status code and optional message
-     * 
- * - * .google.rpc.Status status = 1; - * @return The status. - */ - public com.google.rpc.Status getStatus() { - if (statusBuilder_ == null) { - return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - *
-     * Profiling status code and optional message
-     * 
- * - * .google.rpc.Status status = 1; - */ - public Builder setStatus(com.google.rpc.Status value) { - if (statusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - status_ = value; - onChanged(); - } else { - statusBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Profiling status code and optional message
-     * 
- * - * .google.rpc.Status status = 1; - */ - public Builder setStatus( - com.google.rpc.Status.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); - onChanged(); - } else { - statusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Profiling status code and optional message
-     * 
- * - * .google.rpc.Status status = 1; - */ - public Builder mergeStatus(com.google.rpc.Status value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); - } else { - status_ = value; - } - onChanged(); - } else { - statusBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Profiling status code and optional message
-     * 
- * - * .google.rpc.Status status = 1; - */ - public Builder clearStatus() { - if (statusBuilder_ == null) { - status_ = null; - onChanged(); - } else { - status_ = null; - statusBuilder_ = null; - } - - return this; - } - /** - *
-     * Profiling status code and optional message
-     * 
- * - * .google.rpc.Status status = 1; - */ - public com.google.rpc.Status.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - *
-     * Profiling status code and optional message
-     * 
- * - * .google.rpc.Status status = 1; - */ - public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null ? - com.google.rpc.Status.getDefaultInstance() : status_; - } - } - /** - *
-     * Profiling status code and optional message
-     * 
- * - * .google.rpc.Status status = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - getStatus(), - getParentForChildren(), - isClean()); - status_ = null; - } - return statusBuilder_; - } - - private com.google.protobuf.Timestamp timestamp_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_; - /** - *
-     * Time when the profile generation status was updated
-     * 
- * - * .google.protobuf.Timestamp timestamp = 3; - * @return Whether the timestamp field is set. - */ - public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; - } - /** - *
-     * Time when the profile generation status was updated
-     * 
- * - * .google.protobuf.Timestamp timestamp = 3; - * @return The timestamp. - */ - public com.google.protobuf.Timestamp getTimestamp() { - if (timestampBuilder_ == null) { - return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; - } else { - return timestampBuilder_.getMessage(); - } - } - /** - *
-     * Time when the profile generation status was updated
-     * 
- * - * .google.protobuf.Timestamp timestamp = 3; - */ - public Builder setTimestamp(com.google.protobuf.Timestamp value) { - if (timestampBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestamp_ = value; - onChanged(); - } else { - timestampBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time when the profile generation status was updated
-     * 
- * - * .google.protobuf.Timestamp timestamp = 3; - */ - public Builder setTimestamp( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (timestampBuilder_ == null) { - timestamp_ = builderForValue.build(); - onChanged(); - } else { - timestampBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time when the profile generation status was updated
-     * 
- * - * .google.protobuf.Timestamp timestamp = 3; - */ - public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { - if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = - com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - onChanged(); - } else { - timestampBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time when the profile generation status was updated
-     * 
- * - * .google.protobuf.Timestamp timestamp = 3; - */ - public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; - timestampBuilder_ = null; - } - - return this; - } - /** - *
-     * Time when the profile generation status was updated
-     * 
- * - * .google.protobuf.Timestamp timestamp = 3; - */ - public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { - - onChanged(); - return getTimestampFieldBuilder().getBuilder(); - } - /** - *
-     * Time when the profile generation status was updated
-     * 
- * - * .google.protobuf.Timestamp timestamp = 3; - */ - public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { - if (timestampBuilder_ != null) { - return timestampBuilder_.getMessageOrBuilder(); - } else { - return timestamp_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; - } - } - /** - *
-     * Time when the profile generation status was updated
-     * 
- * - * .google.protobuf.Timestamp timestamp = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getTimestampFieldBuilder() { - if (timestampBuilder_ == null) { - timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getTimestamp(), - getParentForChildren(), - isClean()); - timestamp_ = null; - } - return timestampBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ProfileStatus) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ProfileStatus) - private static final com.google.privacy.dlp.v2.ProfileStatus DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ProfileStatus(); - } - - public static com.google.privacy.dlp.v2.ProfileStatus getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ProfileStatus parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ProfileStatus(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ProfileStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatusOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatusOrBuilder.java deleted file mode 100644 index f2752c9f48d7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProfileStatusOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ProfileStatusOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ProfileStatus) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Profiling status code and optional message
-   * 
- * - * .google.rpc.Status status = 1; - * @return Whether the status field is set. - */ - boolean hasStatus(); - /** - *
-   * Profiling status code and optional message
-   * 
- * - * .google.rpc.Status status = 1; - * @return The status. - */ - com.google.rpc.Status getStatus(); - /** - *
-   * Profiling status code and optional message
-   * 
- * - * .google.rpc.Status status = 1; - */ - com.google.rpc.StatusOrBuilder getStatusOrBuilder(); - - /** - *
-   * Time when the profile generation status was updated
-   * 
- * - * .google.protobuf.Timestamp timestamp = 3; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - *
-   * Time when the profile generation status was updated
-   * 
- * - * .google.protobuf.Timestamp timestamp = 3; - * @return The timestamp. - */ - com.google.protobuf.Timestamp getTimestamp(); - /** - *
-   * Time when the profile generation status was updated
-   * 
- * - * .google.protobuf.Timestamp timestamp = 3; - */ - com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectName.java deleted file mode 100644 index 7f3c373f382b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ProjectName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProjectName implements ResourceName { - private static final PathTemplate PROJECT = - PathTemplate.createWithoutUrlEncoding("projects/{project}"); - private volatile Map fieldValuesMap; - private final String project; - - @Deprecated - protected ProjectName() { - project = null; - } - - private ProjectName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - } - - public String getProject() { - return project; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProjectName of(String project) { - return newBuilder().setProject(project).build(); - } - - public static String format(String project) { - return newBuilder().setProject(project).build().toString(); - } - - public static ProjectName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT.validatedMatch( - formattedString, "ProjectName.parse: formattedString not in valid format"); - return of(matchMap.get("project")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProjectName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT.instantiate("project", project); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProjectName that = ((ProjectName) o); - return Objects.equals(this.project, that.project); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - return h; - } - - /** Builder for projects/{project}. */ - public static class Builder { - private String project; - - protected Builder() {} - - public String getProject() { - return project; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - private Builder(ProjectName projectName) { - this.project = projectName.project; - } - - public ProjectName build() { - return new ProjectName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java deleted file mode 100644 index 07dea059bf4a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java +++ /dev/null @@ -1,1554 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A column with a semantic tag attached.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.QuasiId} - */ -public final class QuasiId extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.QuasiId) - QuasiIdOrBuilder { -private static final long serialVersionUID = 0L; - // Use QuasiId.newBuilder() to construct. - private QuasiId(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private QuasiId() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QuasiId(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private QuasiId( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (tagCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.InfoType) tag_).toBuilder(); - } - tag_ = - input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoType) tag_); - tag_ = subBuilder.buildPartial(); - } - tagCase_ = 2; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - tagCase_ = 3; - tag_ = s; - break; - } - case 34: { - com.google.protobuf.Empty.Builder subBuilder = null; - if (tagCase_ == 4) { - subBuilder = ((com.google.protobuf.Empty) tag_).toBuilder(); - } - tag_ = - input.readMessage(com.google.protobuf.Empty.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Empty) tag_); - tag_ = subBuilder.buildPartial(); - } - tagCase_ = 4; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.QuasiId.class, com.google.privacy.dlp.v2.QuasiId.Builder.class); - } - - private int tagCase_ = 0; - private java.lang.Object tag_; - public enum TagCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INFO_TYPE(2), - CUSTOM_TAG(3), - INFERRED(4), - TAG_NOT_SET(0); - private final int value; - private TagCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TagCase valueOf(int value) { - return forNumber(value); - } - - public static TagCase forNumber(int value) { - switch (value) { - case 2: return INFO_TYPE; - case 3: return CUSTOM_TAG; - case 4: return INFERRED; - case 0: return TAG_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TagCase - getTagCase() { - return TagCase.forNumber( - tagCase_); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-   * Required. Identifies the column.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-   * Required. Identifies the column.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-   * Required. Identifies the column.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - public static final int INFO_TYPE_FIELD_NUMBER = 2; - /** - *
-   * A column can be tagged with a InfoType to use the relevant public
-   * dataset as a statistical model of population, if available. We
-   * currently support US ZIP codes, region codes, ages and genders.
-   * To programmatically obtain the list of supported InfoTypes, use
-   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return tagCase_ == 2; - } - /** - *
-   * A column can be tagged with a InfoType to use the relevant public
-   * dataset as a statistical model of population, if available. We
-   * currently support US ZIP codes, region codes, ages and genders.
-   * To programmatically obtain the list of supported InfoTypes, use
-   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (tagCase_ == 2) { - return (com.google.privacy.dlp.v2.InfoType) tag_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - /** - *
-   * A column can be tagged with a InfoType to use the relevant public
-   * dataset as a statistical model of population, if available. We
-   * currently support US ZIP codes, region codes, ages and genders.
-   * To programmatically obtain the list of supported InfoTypes, use
-   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (tagCase_ == 2) { - return (com.google.privacy.dlp.v2.InfoType) tag_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - - public static final int CUSTOM_TAG_FIELD_NUMBER = 3; - /** - *
-   * A column can be tagged with a custom tag. In this case, the user must
-   * indicate an auxiliary table that contains statistical information on
-   * the possible values of this column (below).
-   * 
- * - * string custom_tag = 3; - * @return Whether the customTag field is set. - */ - public boolean hasCustomTag() { - return tagCase_ == 3; - } - /** - *
-   * A column can be tagged with a custom tag. In this case, the user must
-   * indicate an auxiliary table that contains statistical information on
-   * the possible values of this column (below).
-   * 
- * - * string custom_tag = 3; - * @return The customTag. - */ - public java.lang.String getCustomTag() { - java.lang.Object ref = ""; - if (tagCase_ == 3) { - ref = tag_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (tagCase_ == 3) { - tag_ = s; - } - return s; - } - } - /** - *
-   * A column can be tagged with a custom tag. In this case, the user must
-   * indicate an auxiliary table that contains statistical information on
-   * the possible values of this column (below).
-   * 
- * - * string custom_tag = 3; - * @return The bytes for customTag. - */ - public com.google.protobuf.ByteString - getCustomTagBytes() { - java.lang.Object ref = ""; - if (tagCase_ == 3) { - ref = tag_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (tagCase_ == 3) { - tag_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INFERRED_FIELD_NUMBER = 4; - /** - *
-   * If no semantic tag is indicated, we infer the statistical model from
-   * the distribution of values in the input data
-   * 
- * - * .google.protobuf.Empty inferred = 4; - * @return Whether the inferred field is set. - */ - @java.lang.Override - public boolean hasInferred() { - return tagCase_ == 4; - } - /** - *
-   * If no semantic tag is indicated, we infer the statistical model from
-   * the distribution of values in the input data
-   * 
- * - * .google.protobuf.Empty inferred = 4; - * @return The inferred. - */ - @java.lang.Override - public com.google.protobuf.Empty getInferred() { - if (tagCase_ == 4) { - return (com.google.protobuf.Empty) tag_; - } - return com.google.protobuf.Empty.getDefaultInstance(); - } - /** - *
-   * If no semantic tag is indicated, we infer the statistical model from
-   * the distribution of values in the input data
-   * 
- * - * .google.protobuf.Empty inferred = 4; - */ - @java.lang.Override - public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { - if (tagCase_ == 4) { - return (com.google.protobuf.Empty) tag_; - } - return com.google.protobuf.Empty.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - if (tagCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.InfoType) tag_); - } - if (tagCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tag_); - } - if (tagCase_ == 4) { - output.writeMessage(4, (com.google.protobuf.Empty) tag_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getField()); - } - if (tagCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.InfoType) tag_); - } - if (tagCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tag_); - } - if (tagCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.protobuf.Empty) tag_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.QuasiId)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.QuasiId other = (com.google.privacy.dlp.v2.QuasiId) obj; - - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (!getTagCase().equals(other.getTagCase())) return false; - switch (tagCase_) { - case 2: - if (!getInfoType() - .equals(other.getInfoType())) return false; - break; - case 3: - if (!getCustomTag() - .equals(other.getCustomTag())) return false; - break; - case 4: - if (!getInferred() - .equals(other.getInferred())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - switch (tagCase_) { - case 2: - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - break; - case 3: - hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; - hash = (53 * hash) + getCustomTag().hashCode(); - break; - case 4: - hash = (37 * hash) + INFERRED_FIELD_NUMBER; - hash = (53 * hash) + getInferred().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.QuasiId parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.QuasiId parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuasiId parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.QuasiId parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuasiId parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.QuasiId parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuasiId parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.QuasiId parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuasiId parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.QuasiId parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuasiId parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.QuasiId parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.QuasiId prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A column with a semantic tag attached.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.QuasiId} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.QuasiId) - com.google.privacy.dlp.v2.QuasiIdOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.QuasiId.class, com.google.privacy.dlp.v2.QuasiId.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.QuasiId.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - tagCase_ = 0; - tag_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.QuasiId getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.QuasiId.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.QuasiId build() { - com.google.privacy.dlp.v2.QuasiId result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.QuasiId buildPartial() { - com.google.privacy.dlp.v2.QuasiId result = new com.google.privacy.dlp.v2.QuasiId(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - if (tagCase_ == 2) { - if (infoTypeBuilder_ == null) { - result.tag_ = tag_; - } else { - result.tag_ = infoTypeBuilder_.build(); - } - } - if (tagCase_ == 3) { - result.tag_ = tag_; - } - if (tagCase_ == 4) { - if (inferredBuilder_ == null) { - result.tag_ = tag_; - } else { - result.tag_ = inferredBuilder_.build(); - } - } - result.tagCase_ = tagCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.QuasiId) { - return mergeFrom((com.google.privacy.dlp.v2.QuasiId)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.QuasiId other) { - if (other == com.google.privacy.dlp.v2.QuasiId.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - switch (other.getTagCase()) { - case INFO_TYPE: { - mergeInfoType(other.getInfoType()); - break; - } - case CUSTOM_TAG: { - tagCase_ = 3; - tag_ = other.tag_; - onChanged(); - break; - } - case INFERRED: { - mergeInferred(other.getInferred()); - break; - } - case TAG_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.QuasiId parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.QuasiId) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int tagCase_ = 0; - private java.lang.Object tag_; - public TagCase - getTagCase() { - return TagCase.forNumber( - tagCase_); - } - - public Builder clearTag() { - tagCase_ = 0; - tag_ = null; - onChanged(); - return this; - } - - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-     * Required. Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-     * Required. Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-     * Required. Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-     * Required. Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-     * A column can be tagged with a InfoType to use the relevant public
-     * dataset as a statistical model of population, if available. We
-     * currently support US ZIP codes, region codes, ages and genders.
-     * To programmatically obtain the list of supported InfoTypes, use
-     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return tagCase_ == 2; - } - /** - *
-     * A column can be tagged with a InfoType to use the relevant public
-     * dataset as a statistical model of population, if available. We
-     * currently support US ZIP codes, region codes, ages and genders.
-     * To programmatically obtain the list of supported InfoTypes, use
-     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - if (tagCase_ == 2) { - return (com.google.privacy.dlp.v2.InfoType) tag_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } else { - if (tagCase_ == 2) { - return infoTypeBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - } - /** - *
-     * A column can be tagged with a InfoType to use the relevant public
-     * dataset as a statistical model of population, if available. We
-     * currently support US ZIP codes, region codes, ages and genders.
-     * To programmatically obtain the list of supported InfoTypes, use
-     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tag_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - tagCase_ = 2; - return this; - } - /** - *
-     * A column can be tagged with a InfoType to use the relevant public
-     * dataset as a statistical model of population, if available. We
-     * currently support US ZIP codes, region codes, ages and genders.
-     * To programmatically obtain the list of supported InfoTypes, use
-     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - tag_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - tagCase_ = 2; - return this; - } - /** - *
-     * A column can be tagged with a InfoType to use the relevant public
-     * dataset as a statistical model of population, if available. We
-     * currently support US ZIP codes, region codes, ages and genders.
-     * To programmatically obtain the list of supported InfoTypes, use
-     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (tagCase_ == 2 && - tag_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) { - tag_ = com.google.privacy.dlp.v2.InfoType.newBuilder((com.google.privacy.dlp.v2.InfoType) tag_) - .mergeFrom(value).buildPartial(); - } else { - tag_ = value; - } - onChanged(); - } else { - if (tagCase_ == 2) { - infoTypeBuilder_.mergeFrom(value); - } else { - infoTypeBuilder_.setMessage(value); - } - } - tagCase_ = 2; - return this; - } - /** - *
-     * A column can be tagged with a InfoType to use the relevant public
-     * dataset as a statistical model of population, if available. We
-     * currently support US ZIP codes, region codes, ages and genders.
-     * To programmatically obtain the list of supported InfoTypes, use
-     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - if (tagCase_ == 2) { - tagCase_ = 0; - tag_ = null; - onChanged(); - } - } else { - if (tagCase_ == 2) { - tagCase_ = 0; - tag_ = null; - } - infoTypeBuilder_.clear(); - } - return this; - } - /** - *
-     * A column can be tagged with a InfoType to use the relevant public
-     * dataset as a statistical model of population, if available. We
-     * currently support US ZIP codes, region codes, ages and genders.
-     * To programmatically obtain the list of supported InfoTypes, use
-     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-     * A column can be tagged with a InfoType to use the relevant public
-     * dataset as a statistical model of population, if available. We
-     * currently support US ZIP codes, region codes, ages and genders.
-     * To programmatically obtain the list of supported InfoTypes, use
-     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if ((tagCase_ == 2) && (infoTypeBuilder_ != null)) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - if (tagCase_ == 2) { - return (com.google.privacy.dlp.v2.InfoType) tag_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - } - /** - *
-     * A column can be tagged with a InfoType to use the relevant public
-     * dataset as a statistical model of population, if available. We
-     * currently support US ZIP codes, region codes, ages and genders.
-     * To programmatically obtain the list of supported InfoTypes, use
-     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - if (!(tagCase_ == 2)) { - tag_ = com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - (com.google.privacy.dlp.v2.InfoType) tag_, - getParentForChildren(), - isClean()); - tag_ = null; - } - tagCase_ = 2; - onChanged();; - return infoTypeBuilder_; - } - - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 3; - * @return Whether the customTag field is set. - */ - @java.lang.Override - public boolean hasCustomTag() { - return tagCase_ == 3; - } - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 3; - * @return The customTag. - */ - @java.lang.Override - public java.lang.String getCustomTag() { - java.lang.Object ref = ""; - if (tagCase_ == 3) { - ref = tag_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (tagCase_ == 3) { - tag_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 3; - * @return The bytes for customTag. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCustomTagBytes() { - java.lang.Object ref = ""; - if (tagCase_ == 3) { - ref = tag_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (tagCase_ == 3) { - tag_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 3; - * @param value The customTag to set. - * @return This builder for chaining. - */ - public Builder setCustomTag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - tagCase_ = 3; - tag_ = value; - onChanged(); - return this; - } - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 3; - * @return This builder for chaining. - */ - public Builder clearCustomTag() { - if (tagCase_ == 3) { - tagCase_ = 0; - tag_ = null; - onChanged(); - } - return this; - } - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 3; - * @param value The bytes for customTag to set. - * @return This builder for chaining. - */ - public Builder setCustomTagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - tagCase_ = 3; - tag_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> inferredBuilder_; - /** - *
-     * If no semantic tag is indicated, we infer the statistical model from
-     * the distribution of values in the input data
-     * 
- * - * .google.protobuf.Empty inferred = 4; - * @return Whether the inferred field is set. - */ - @java.lang.Override - public boolean hasInferred() { - return tagCase_ == 4; - } - /** - *
-     * If no semantic tag is indicated, we infer the statistical model from
-     * the distribution of values in the input data
-     * 
- * - * .google.protobuf.Empty inferred = 4; - * @return The inferred. - */ - @java.lang.Override - public com.google.protobuf.Empty getInferred() { - if (inferredBuilder_ == null) { - if (tagCase_ == 4) { - return (com.google.protobuf.Empty) tag_; - } - return com.google.protobuf.Empty.getDefaultInstance(); - } else { - if (tagCase_ == 4) { - return inferredBuilder_.getMessage(); - } - return com.google.protobuf.Empty.getDefaultInstance(); - } - } - /** - *
-     * If no semantic tag is indicated, we infer the statistical model from
-     * the distribution of values in the input data
-     * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public Builder setInferred(com.google.protobuf.Empty value) { - if (inferredBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tag_ = value; - onChanged(); - } else { - inferredBuilder_.setMessage(value); - } - tagCase_ = 4; - return this; - } - /** - *
-     * If no semantic tag is indicated, we infer the statistical model from
-     * the distribution of values in the input data
-     * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public Builder setInferred( - com.google.protobuf.Empty.Builder builderForValue) { - if (inferredBuilder_ == null) { - tag_ = builderForValue.build(); - onChanged(); - } else { - inferredBuilder_.setMessage(builderForValue.build()); - } - tagCase_ = 4; - return this; - } - /** - *
-     * If no semantic tag is indicated, we infer the statistical model from
-     * the distribution of values in the input data
-     * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public Builder mergeInferred(com.google.protobuf.Empty value) { - if (inferredBuilder_ == null) { - if (tagCase_ == 4 && - tag_ != com.google.protobuf.Empty.getDefaultInstance()) { - tag_ = com.google.protobuf.Empty.newBuilder((com.google.protobuf.Empty) tag_) - .mergeFrom(value).buildPartial(); - } else { - tag_ = value; - } - onChanged(); - } else { - if (tagCase_ == 4) { - inferredBuilder_.mergeFrom(value); - } else { - inferredBuilder_.setMessage(value); - } - } - tagCase_ = 4; - return this; - } - /** - *
-     * If no semantic tag is indicated, we infer the statistical model from
-     * the distribution of values in the input data
-     * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public Builder clearInferred() { - if (inferredBuilder_ == null) { - if (tagCase_ == 4) { - tagCase_ = 0; - tag_ = null; - onChanged(); - } - } else { - if (tagCase_ == 4) { - tagCase_ = 0; - tag_ = null; - } - inferredBuilder_.clear(); - } - return this; - } - /** - *
-     * If no semantic tag is indicated, we infer the statistical model from
-     * the distribution of values in the input data
-     * 
- * - * .google.protobuf.Empty inferred = 4; - */ - public com.google.protobuf.Empty.Builder getInferredBuilder() { - return getInferredFieldBuilder().getBuilder(); - } - /** - *
-     * If no semantic tag is indicated, we infer the statistical model from
-     * the distribution of values in the input data
-     * 
- * - * .google.protobuf.Empty inferred = 4; - */ - @java.lang.Override - public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { - if ((tagCase_ == 4) && (inferredBuilder_ != null)) { - return inferredBuilder_.getMessageOrBuilder(); - } else { - if (tagCase_ == 4) { - return (com.google.protobuf.Empty) tag_; - } - return com.google.protobuf.Empty.getDefaultInstance(); - } - } - /** - *
-     * If no semantic tag is indicated, we infer the statistical model from
-     * the distribution of values in the input data
-     * 
- * - * .google.protobuf.Empty inferred = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> - getInferredFieldBuilder() { - if (inferredBuilder_ == null) { - if (!(tagCase_ == 4)) { - tag_ = com.google.protobuf.Empty.getDefaultInstance(); - } - inferredBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder>( - (com.google.protobuf.Empty) tag_, - getParentForChildren(), - isClean()); - tag_ = null; - } - tagCase_ = 4; - onChanged();; - return inferredBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.QuasiId) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.QuasiId) - private static final com.google.privacy.dlp.v2.QuasiId DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.QuasiId(); - } - - public static com.google.privacy.dlp.v2.QuasiId getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QuasiId parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QuasiId(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.QuasiId getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java deleted file mode 100644 index 93fb5b0c4a7b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java +++ /dev/null @@ -1,142 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface QuasiIdOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.QuasiId) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Identifies the column.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-   * Required. Identifies the column.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-   * Required. Identifies the column.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); - - /** - *
-   * A column can be tagged with a InfoType to use the relevant public
-   * dataset as a statistical model of population, if available. We
-   * currently support US ZIP codes, region codes, ages and genders.
-   * To programmatically obtain the list of supported InfoTypes, use
-   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-   * A column can be tagged with a InfoType to use the relevant public
-   * dataset as a statistical model of population, if available. We
-   * currently support US ZIP codes, region codes, ages and genders.
-   * To programmatically obtain the list of supported InfoTypes, use
-   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-   * A column can be tagged with a InfoType to use the relevant public
-   * dataset as a statistical model of population, if available. We
-   * currently support US ZIP codes, region codes, ages and genders.
-   * To programmatically obtain the list of supported InfoTypes, use
-   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 2; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-   * A column can be tagged with a custom tag. In this case, the user must
-   * indicate an auxiliary table that contains statistical information on
-   * the possible values of this column (below).
-   * 
- * - * string custom_tag = 3; - * @return Whether the customTag field is set. - */ - boolean hasCustomTag(); - /** - *
-   * A column can be tagged with a custom tag. In this case, the user must
-   * indicate an auxiliary table that contains statistical information on
-   * the possible values of this column (below).
-   * 
- * - * string custom_tag = 3; - * @return The customTag. - */ - java.lang.String getCustomTag(); - /** - *
-   * A column can be tagged with a custom tag. In this case, the user must
-   * indicate an auxiliary table that contains statistical information on
-   * the possible values of this column (below).
-   * 
- * - * string custom_tag = 3; - * @return The bytes for customTag. - */ - com.google.protobuf.ByteString - getCustomTagBytes(); - - /** - *
-   * If no semantic tag is indicated, we infer the statistical model from
-   * the distribution of values in the input data
-   * 
- * - * .google.protobuf.Empty inferred = 4; - * @return Whether the inferred field is set. - */ - boolean hasInferred(); - /** - *
-   * If no semantic tag is indicated, we infer the statistical model from
-   * the distribution of values in the input data
-   * 
- * - * .google.protobuf.Empty inferred = 4; - * @return The inferred. - */ - com.google.protobuf.Empty getInferred(); - /** - *
-   * If no semantic tag is indicated, we infer the statistical model from
-   * the distribution of values in the input data
-   * 
- * - * .google.protobuf.Empty inferred = 4; - */ - com.google.protobuf.EmptyOrBuilder getInferredOrBuilder(); - - public com.google.privacy.dlp.v2.QuasiId.TagCase getTagCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfo.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfo.java deleted file mode 100644 index 0eb3ee796617..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfo.java +++ /dev/null @@ -1,761 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Message for infoType-dependent details parsed from quote.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.QuoteInfo} - */ -public final class QuoteInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.QuoteInfo) - QuoteInfoOrBuilder { -private static final long serialVersionUID = 0L; - // Use QuoteInfo.newBuilder() to construct. - private QuoteInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private QuoteInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QuoteInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private QuoteInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - com.google.privacy.dlp.v2.DateTime.Builder subBuilder = null; - if (parsedQuoteCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.DateTime) parsedQuote_).toBuilder(); - } - parsedQuote_ = - input.readMessage(com.google.privacy.dlp.v2.DateTime.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.DateTime) parsedQuote_); - parsedQuote_ = subBuilder.buildPartial(); - } - parsedQuoteCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.QuoteInfo.class, com.google.privacy.dlp.v2.QuoteInfo.Builder.class); - } - - private int parsedQuoteCase_ = 0; - private java.lang.Object parsedQuote_; - public enum ParsedQuoteCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DATE_TIME(2), - PARSEDQUOTE_NOT_SET(0); - private final int value; - private ParsedQuoteCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ParsedQuoteCase valueOf(int value) { - return forNumber(value); - } - - public static ParsedQuoteCase forNumber(int value) { - switch (value) { - case 2: return DATE_TIME; - case 0: return PARSEDQUOTE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ParsedQuoteCase - getParsedQuoteCase() { - return ParsedQuoteCase.forNumber( - parsedQuoteCase_); - } - - public static final int DATE_TIME_FIELD_NUMBER = 2; - /** - *
-   * The date time indicated by the quote.
-   * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - * @return Whether the dateTime field is set. - */ - @java.lang.Override - public boolean hasDateTime() { - return parsedQuoteCase_ == 2; - } - /** - *
-   * The date time indicated by the quote.
-   * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - * @return The dateTime. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime getDateTime() { - if (parsedQuoteCase_ == 2) { - return (com.google.privacy.dlp.v2.DateTime) parsedQuote_; - } - return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); - } - /** - *
-   * The date time indicated by the quote.
-   * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateTimeOrBuilder getDateTimeOrBuilder() { - if (parsedQuoteCase_ == 2) { - return (com.google.privacy.dlp.v2.DateTime) parsedQuote_; - } - return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (parsedQuoteCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.DateTime) parsedQuote_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (parsedQuoteCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.DateTime) parsedQuote_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.QuoteInfo)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.QuoteInfo other = (com.google.privacy.dlp.v2.QuoteInfo) obj; - - if (!getParsedQuoteCase().equals(other.getParsedQuoteCase())) return false; - switch (parsedQuoteCase_) { - case 2: - if (!getDateTime() - .equals(other.getDateTime())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (parsedQuoteCase_) { - case 2: - hash = (37 * hash) + DATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getDateTime().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.QuoteInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.QuoteInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Message for infoType-dependent details parsed from quote.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.QuoteInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.QuoteInfo) - com.google.privacy.dlp.v2.QuoteInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.QuoteInfo.class, com.google.privacy.dlp.v2.QuoteInfo.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.QuoteInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parsedQuoteCase_ = 0; - parsedQuote_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.QuoteInfo getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.QuoteInfo build() { - com.google.privacy.dlp.v2.QuoteInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.QuoteInfo buildPartial() { - com.google.privacy.dlp.v2.QuoteInfo result = new com.google.privacy.dlp.v2.QuoteInfo(this); - if (parsedQuoteCase_ == 2) { - if (dateTimeBuilder_ == null) { - result.parsedQuote_ = parsedQuote_; - } else { - result.parsedQuote_ = dateTimeBuilder_.build(); - } - } - result.parsedQuoteCase_ = parsedQuoteCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.QuoteInfo) { - return mergeFrom((com.google.privacy.dlp.v2.QuoteInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.QuoteInfo other) { - if (other == com.google.privacy.dlp.v2.QuoteInfo.getDefaultInstance()) return this; - switch (other.getParsedQuoteCase()) { - case DATE_TIME: { - mergeDateTime(other.getDateTime()); - break; - } - case PARSEDQUOTE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.QuoteInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.QuoteInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int parsedQuoteCase_ = 0; - private java.lang.Object parsedQuote_; - public ParsedQuoteCase - getParsedQuoteCase() { - return ParsedQuoteCase.forNumber( - parsedQuoteCase_); - } - - public Builder clearParsedQuote() { - parsedQuoteCase_ = 0; - parsedQuote_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DateTime, com.google.privacy.dlp.v2.DateTime.Builder, com.google.privacy.dlp.v2.DateTimeOrBuilder> dateTimeBuilder_; - /** - *
-     * The date time indicated by the quote.
-     * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - * @return Whether the dateTime field is set. - */ - @java.lang.Override - public boolean hasDateTime() { - return parsedQuoteCase_ == 2; - } - /** - *
-     * The date time indicated by the quote.
-     * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - * @return The dateTime. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateTime getDateTime() { - if (dateTimeBuilder_ == null) { - if (parsedQuoteCase_ == 2) { - return (com.google.privacy.dlp.v2.DateTime) parsedQuote_; - } - return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); - } else { - if (parsedQuoteCase_ == 2) { - return dateTimeBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); - } - } - /** - *
-     * The date time indicated by the quote.
-     * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - */ - public Builder setDateTime(com.google.privacy.dlp.v2.DateTime value) { - if (dateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - parsedQuote_ = value; - onChanged(); - } else { - dateTimeBuilder_.setMessage(value); - } - parsedQuoteCase_ = 2; - return this; - } - /** - *
-     * The date time indicated by the quote.
-     * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - */ - public Builder setDateTime( - com.google.privacy.dlp.v2.DateTime.Builder builderForValue) { - if (dateTimeBuilder_ == null) { - parsedQuote_ = builderForValue.build(); - onChanged(); - } else { - dateTimeBuilder_.setMessage(builderForValue.build()); - } - parsedQuoteCase_ = 2; - return this; - } - /** - *
-     * The date time indicated by the quote.
-     * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - */ - public Builder mergeDateTime(com.google.privacy.dlp.v2.DateTime value) { - if (dateTimeBuilder_ == null) { - if (parsedQuoteCase_ == 2 && - parsedQuote_ != com.google.privacy.dlp.v2.DateTime.getDefaultInstance()) { - parsedQuote_ = com.google.privacy.dlp.v2.DateTime.newBuilder((com.google.privacy.dlp.v2.DateTime) parsedQuote_) - .mergeFrom(value).buildPartial(); - } else { - parsedQuote_ = value; - } - onChanged(); - } else { - if (parsedQuoteCase_ == 2) { - dateTimeBuilder_.mergeFrom(value); - } else { - dateTimeBuilder_.setMessage(value); - } - } - parsedQuoteCase_ = 2; - return this; - } - /** - *
-     * The date time indicated by the quote.
-     * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - */ - public Builder clearDateTime() { - if (dateTimeBuilder_ == null) { - if (parsedQuoteCase_ == 2) { - parsedQuoteCase_ = 0; - parsedQuote_ = null; - onChanged(); - } - } else { - if (parsedQuoteCase_ == 2) { - parsedQuoteCase_ = 0; - parsedQuote_ = null; - } - dateTimeBuilder_.clear(); - } - return this; - } - /** - *
-     * The date time indicated by the quote.
-     * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - */ - public com.google.privacy.dlp.v2.DateTime.Builder getDateTimeBuilder() { - return getDateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The date time indicated by the quote.
-     * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DateTimeOrBuilder getDateTimeOrBuilder() { - if ((parsedQuoteCase_ == 2) && (dateTimeBuilder_ != null)) { - return dateTimeBuilder_.getMessageOrBuilder(); - } else { - if (parsedQuoteCase_ == 2) { - return (com.google.privacy.dlp.v2.DateTime) parsedQuote_; - } - return com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); - } - } - /** - *
-     * The date time indicated by the quote.
-     * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DateTime, com.google.privacy.dlp.v2.DateTime.Builder, com.google.privacy.dlp.v2.DateTimeOrBuilder> - getDateTimeFieldBuilder() { - if (dateTimeBuilder_ == null) { - if (!(parsedQuoteCase_ == 2)) { - parsedQuote_ = com.google.privacy.dlp.v2.DateTime.getDefaultInstance(); - } - dateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DateTime, com.google.privacy.dlp.v2.DateTime.Builder, com.google.privacy.dlp.v2.DateTimeOrBuilder>( - (com.google.privacy.dlp.v2.DateTime) parsedQuote_, - getParentForChildren(), - isClean()); - parsedQuote_ = null; - } - parsedQuoteCase_ = 2; - onChanged();; - return dateTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.QuoteInfo) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.QuoteInfo) - private static final com.google.privacy.dlp.v2.QuoteInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.QuoteInfo(); - } - - public static com.google.privacy.dlp.v2.QuoteInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QuoteInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QuoteInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.QuoteInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfoOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfoOrBuilder.java deleted file mode 100644 index 021beda9bc69..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuoteInfoOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface QuoteInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.QuoteInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The date time indicated by the quote.
-   * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - * @return Whether the dateTime field is set. - */ - boolean hasDateTime(); - /** - *
-   * The date time indicated by the quote.
-   * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - * @return The dateTime. - */ - com.google.privacy.dlp.v2.DateTime getDateTime(); - /** - *
-   * The date time indicated by the quote.
-   * 
- * - * .google.privacy.dlp.v2.DateTime date_time = 2; - */ - com.google.privacy.dlp.v2.DateTimeOrBuilder getDateTimeOrBuilder(); - - public com.google.privacy.dlp.v2.QuoteInfo.ParsedQuoteCase getParsedQuoteCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Range.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Range.java deleted file mode 100644 index b0c41c38e511..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Range.java +++ /dev/null @@ -1,591 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Generic half-open interval [start, end)
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Range} - */ -public final class Range extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Range) - RangeOrBuilder { -private static final long serialVersionUID = 0L; - // Use Range.newBuilder() to construct. - private Range(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Range() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Range(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Range( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - start_ = input.readInt64(); - break; - } - case 16: { - - end_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Range.class, com.google.privacy.dlp.v2.Range.Builder.class); - } - - public static final int START_FIELD_NUMBER = 1; - private long start_; - /** - *
-   * Index of the first character of the range (inclusive).
-   * 
- * - * int64 start = 1; - * @return The start. - */ - @java.lang.Override - public long getStart() { - return start_; - } - - public static final int END_FIELD_NUMBER = 2; - private long end_; - /** - *
-   * Index of the last character of the range (exclusive).
-   * 
- * - * int64 end = 2; - * @return The end. - */ - @java.lang.Override - public long getEnd() { - return end_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (start_ != 0L) { - output.writeInt64(1, start_); - } - if (end_ != 0L) { - output.writeInt64(2, end_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (start_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, start_); - } - if (end_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, end_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Range)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Range other = (com.google.privacy.dlp.v2.Range) obj; - - if (getStart() - != other.getStart()) return false; - if (getEnd() - != other.getEnd()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + START_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getStart()); - hash = (37 * hash) + END_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getEnd()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Range parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Range parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Range parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Range parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Range parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Range parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Range parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Range parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Range parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Range parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Range parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Range parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Range prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Generic half-open interval [start, end)
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Range} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Range) - com.google.privacy.dlp.v2.RangeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Range.class, com.google.privacy.dlp.v2.Range.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Range.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - start_ = 0L; - - end_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Range_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Range getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Range.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Range build() { - com.google.privacy.dlp.v2.Range result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Range buildPartial() { - com.google.privacy.dlp.v2.Range result = new com.google.privacy.dlp.v2.Range(this); - result.start_ = start_; - result.end_ = end_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Range) { - return mergeFrom((com.google.privacy.dlp.v2.Range)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Range other) { - if (other == com.google.privacy.dlp.v2.Range.getDefaultInstance()) return this; - if (other.getStart() != 0L) { - setStart(other.getStart()); - } - if (other.getEnd() != 0L) { - setEnd(other.getEnd()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Range parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Range) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long start_ ; - /** - *
-     * Index of the first character of the range (inclusive).
-     * 
- * - * int64 start = 1; - * @return The start. - */ - @java.lang.Override - public long getStart() { - return start_; - } - /** - *
-     * Index of the first character of the range (inclusive).
-     * 
- * - * int64 start = 1; - * @param value The start to set. - * @return This builder for chaining. - */ - public Builder setStart(long value) { - - start_ = value; - onChanged(); - return this; - } - /** - *
-     * Index of the first character of the range (inclusive).
-     * 
- * - * int64 start = 1; - * @return This builder for chaining. - */ - public Builder clearStart() { - - start_ = 0L; - onChanged(); - return this; - } - - private long end_ ; - /** - *
-     * Index of the last character of the range (exclusive).
-     * 
- * - * int64 end = 2; - * @return The end. - */ - @java.lang.Override - public long getEnd() { - return end_; - } - /** - *
-     * Index of the last character of the range (exclusive).
-     * 
- * - * int64 end = 2; - * @param value The end to set. - * @return This builder for chaining. - */ - public Builder setEnd(long value) { - - end_ = value; - onChanged(); - return this; - } - /** - *
-     * Index of the last character of the range (exclusive).
-     * 
- * - * int64 end = 2; - * @return This builder for chaining. - */ - public Builder clearEnd() { - - end_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Range) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Range) - private static final com.google.privacy.dlp.v2.Range DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Range(); - } - - public static com.google.privacy.dlp.v2.Range getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Range parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Range(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Range getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RangeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RangeOrBuilder.java deleted file mode 100644 index c52c250e92d8..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RangeOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface RangeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Range) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Index of the first character of the range (inclusive).
-   * 
- * - * int64 start = 1; - * @return The start. - */ - long getStart(); - - /** - *
-   * Index of the last character of the range (exclusive).
-   * 
- * - * int64 end = 2; - * @return The end. - */ - long getEnd(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java deleted file mode 100644 index 23a067cfd063..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordCondition.java +++ /dev/null @@ -1,3780 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A condition for determining whether a transformation should be applied to
- * a field.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordCondition} - */ -public final class RecordCondition extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordCondition) - RecordConditionOrBuilder { -private static final long serialVersionUID = 0L; - // Use RecordCondition.newBuilder() to construct. - private RecordCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RecordCondition() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RecordCondition(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RecordCondition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 26: { - com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder subBuilder = null; - if (expressions_ != null) { - subBuilder = expressions_.toBuilder(); - } - expressions_ = input.readMessage(com.google.privacy.dlp.v2.RecordCondition.Expressions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(expressions_); - expressions_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordCondition.class, com.google.privacy.dlp.v2.RecordCondition.Builder.class); - } - - public interface ConditionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordCondition.Condition) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. Field within the record this condition is evaluated against.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-     * Required. Field within the record this condition is evaluated against.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-     * Required. Field within the record this condition is evaluated against.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); - - /** - *
-     * Required. Operator used to compare the field or infoType to the value.
-     * 
- * - * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The enum numeric value on the wire for operator. - */ - int getOperatorValue(); - /** - *
-     * Required. Operator used to compare the field or infoType to the value.
-     * 
- * - * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The operator. - */ - com.google.privacy.dlp.v2.RelationalOperator getOperator(); - - /** - *
-     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-     * 
- * - * .google.privacy.dlp.v2.Value value = 4; - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - *
-     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-     * 
- * - * .google.privacy.dlp.v2.Value value = 4; - * @return The value. - */ - com.google.privacy.dlp.v2.Value getValue(); - /** - *
-     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-     * 
- * - * .google.privacy.dlp.v2.Value value = 4; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder(); - } - /** - *
-   * The field type of `value` and `field` do not need to match to be
-   * considered equal, but not all comparisons are possible.
-   * EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types,
-   * but all other comparisons are invalid with incompatible types.
-   * A `value` of type:
-   * - `string` can be compared against all other types
-   * - `boolean` can only be compared against other booleans
-   * - `integer` can be compared against doubles or a string if the string value
-   * can be parsed as an integer.
-   * - `double` can be compared against integers or a string if the string can
-   * be parsed as a double.
-   * - `Timestamp` can be compared against strings in RFC 3339 date string
-   * format.
-   * - `TimeOfDay` can be compared against timestamps and strings in the format
-   * of 'HH:mm:ss'.
-   * If we fail to compare do to type mismatch, a warning will be given and
-   * the condition will evaluate to false.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Condition} - */ - public static final class Condition extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordCondition.Condition) - ConditionOrBuilder { - private static final long serialVersionUID = 0L; - // Use Condition.newBuilder() to construct. - private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Condition() { - operator_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Condition(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Condition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - int rawValue = input.readEnum(); - - operator_ = rawValue; - break; - } - case 34: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (value_ != null) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordCondition.Condition.class, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-     * Required. Field within the record this condition is evaluated against.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-     * Required. Field within the record this condition is evaluated against.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-     * Required. Field within the record this condition is evaluated against.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - public static final int OPERATOR_FIELD_NUMBER = 3; - private int operator_; - /** - *
-     * Required. Operator used to compare the field or infoType to the value.
-     * 
- * - * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The enum numeric value on the wire for operator. - */ - @java.lang.Override public int getOperatorValue() { - return operator_; - } - /** - *
-     * Required. Operator used to compare the field or infoType to the value.
-     * 
- * - * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The operator. - */ - @java.lang.Override public com.google.privacy.dlp.v2.RelationalOperator getOperator() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.RelationalOperator result = com.google.privacy.dlp.v2.RelationalOperator.valueOf(operator_); - return result == null ? com.google.privacy.dlp.v2.RelationalOperator.UNRECOGNIZED : result; - } - - public static final int VALUE_FIELD_NUMBER = 4; - private com.google.privacy.dlp.v2.Value value_; - /** - *
-     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-     * 
- * - * .google.privacy.dlp.v2.Value value = 4; - * @return Whether the value field is set. - */ - @java.lang.Override - public boolean hasValue() { - return value_ != null; - } - /** - *
-     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-     * 
- * - * .google.privacy.dlp.v2.Value value = 4; - * @return The value. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getValue() { - return value_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; - } - /** - *
-     * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-     * 
- * - * .google.privacy.dlp.v2.Value value = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder() { - return getValue(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - if (operator_ != com.google.privacy.dlp.v2.RelationalOperator.RELATIONAL_OPERATOR_UNSPECIFIED.getNumber()) { - output.writeEnum(3, operator_); - } - if (value_ != null) { - output.writeMessage(4, getValue()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getField()); - } - if (operator_ != com.google.privacy.dlp.v2.RelationalOperator.RELATIONAL_OPERATOR_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, operator_); - } - if (value_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getValue()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RecordCondition.Condition)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RecordCondition.Condition other = (com.google.privacy.dlp.v2.RecordCondition.Condition) obj; - - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (operator_ != other.operator_) return false; - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue() - .equals(other.getValue())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - hash = (37 * hash) + OPERATOR_FIELD_NUMBER; - hash = (53 * hash) + operator_; - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition.Condition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RecordCondition.Condition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The field type of `value` and `field` do not need to match to be
-     * considered equal, but not all comparisons are possible.
-     * EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types,
-     * but all other comparisons are invalid with incompatible types.
-     * A `value` of type:
-     * - `string` can be compared against all other types
-     * - `boolean` can only be compared against other booleans
-     * - `integer` can be compared against doubles or a string if the string value
-     * can be parsed as an integer.
-     * - `double` can be compared against integers or a string if the string can
-     * be parsed as a double.
-     * - `Timestamp` can be compared against strings in RFC 3339 date string
-     * format.
-     * - `TimeOfDay` can be compared against timestamps and strings in the format
-     * of 'HH:mm:ss'.
-     * If we fail to compare do to type mismatch, a warning will be given and
-     * the condition will evaluate to false.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Condition} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordCondition.Condition) - com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordCondition.Condition.class, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RecordCondition.Condition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - operator_ = 0; - - if (valueBuilder_ == null) { - value_ = null; - } else { - value_ = null; - valueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Condition_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Condition getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RecordCondition.Condition.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Condition build() { - com.google.privacy.dlp.v2.RecordCondition.Condition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Condition buildPartial() { - com.google.privacy.dlp.v2.RecordCondition.Condition result = new com.google.privacy.dlp.v2.RecordCondition.Condition(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - result.operator_ = operator_; - if (valueBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = valueBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RecordCondition.Condition) { - return mergeFrom((com.google.privacy.dlp.v2.RecordCondition.Condition)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RecordCondition.Condition other) { - if (other == com.google.privacy.dlp.v2.RecordCondition.Condition.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - if (other.operator_ != 0) { - setOperatorValue(other.getOperatorValue()); - } - if (other.hasValue()) { - mergeValue(other.getValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RecordCondition.Condition parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RecordCondition.Condition) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-       * Required. Field within the record this condition is evaluated against.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-       * Required. Field within the record this condition is evaluated against.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-       * Required. Field within the record this condition is evaluated against.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Required. Field within the record this condition is evaluated against.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Required. Field within the record this condition is evaluated against.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Required. Field within the record this condition is evaluated against.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-       * Required. Field within the record this condition is evaluated against.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-       * Required. Field within the record this condition is evaluated against.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-       * Required. Field within the record this condition is evaluated against.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - - private int operator_ = 0; - /** - *
-       * Required. Operator used to compare the field or infoType to the value.
-       * 
- * - * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The enum numeric value on the wire for operator. - */ - @java.lang.Override public int getOperatorValue() { - return operator_; - } - /** - *
-       * Required. Operator used to compare the field or infoType to the value.
-       * 
- * - * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The enum numeric value on the wire for operator to set. - * @return This builder for chaining. - */ - public Builder setOperatorValue(int value) { - - operator_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. Operator used to compare the field or infoType to the value.
-       * 
- * - * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The operator. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RelationalOperator getOperator() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.RelationalOperator result = com.google.privacy.dlp.v2.RelationalOperator.valueOf(operator_); - return result == null ? com.google.privacy.dlp.v2.RelationalOperator.UNRECOGNIZED : result; - } - /** - *
-       * Required. Operator used to compare the field or infoType to the value.
-       * 
- * - * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The operator to set. - * @return This builder for chaining. - */ - public Builder setOperator(com.google.privacy.dlp.v2.RelationalOperator value) { - if (value == null) { - throw new NullPointerException(); - } - - operator_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Required. Operator used to compare the field or infoType to the value.
-       * 
- * - * .google.privacy.dlp.v2.RelationalOperator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearOperator() { - - operator_ = 0; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> valueBuilder_; - /** - *
-       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-       * 
- * - * .google.privacy.dlp.v2.Value value = 4; - * @return Whether the value field is set. - */ - public boolean hasValue() { - return valueBuilder_ != null || value_ != null; - } - /** - *
-       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-       * 
- * - * .google.privacy.dlp.v2.Value value = 4; - * @return The value. - */ - public com.google.privacy.dlp.v2.Value getValue() { - if (valueBuilder_ == null) { - return value_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; - } else { - return valueBuilder_.getMessage(); - } - } - /** - *
-       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-       * 
- * - * .google.privacy.dlp.v2.Value value = 4; - */ - public Builder setValue(com.google.privacy.dlp.v2.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - onChanged(); - } else { - valueBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-       * 
- * - * .google.privacy.dlp.v2.Value value = 4; - */ - public Builder setValue( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-       * 
- * - * .google.privacy.dlp.v2.Value value = 4; - */ - public Builder mergeValue(com.google.privacy.dlp.v2.Value value) { - if (valueBuilder_ == null) { - if (value_ != null) { - value_ = - com.google.privacy.dlp.v2.Value.newBuilder(value_).mergeFrom(value).buildPartial(); - } else { - value_ = value; - } - onChanged(); - } else { - valueBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-       * 
- * - * .google.privacy.dlp.v2.Value value = 4; - */ - public Builder clearValue() { - if (valueBuilder_ == null) { - value_ = null; - onChanged(); - } else { - value_ = null; - valueBuilder_ = null; - } - - return this; - } - /** - *
-       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-       * 
- * - * .google.privacy.dlp.v2.Value value = 4; - */ - public com.google.privacy.dlp.v2.Value.Builder getValueBuilder() { - - onChanged(); - return getValueFieldBuilder().getBuilder(); - } - /** - *
-       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-       * 
- * - * .google.privacy.dlp.v2.Value value = 4; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; - } - } - /** - *
-       * Value to compare against. [Mandatory, except for `EXISTS` tests.]
-       * 
- * - * .google.privacy.dlp.v2.Value value = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getValue(), - getParentForChildren(), - isClean()); - value_ = null; - } - return valueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordCondition.Condition) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordCondition.Condition) - private static final com.google.privacy.dlp.v2.RecordCondition.Condition DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordCondition.Condition(); - } - - public static com.google.privacy.dlp.v2.RecordCondition.Condition getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Condition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Condition(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Condition getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ConditionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordCondition.Conditions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - java.util.List - getConditionsList(); - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - com.google.privacy.dlp.v2.RecordCondition.Condition getConditions(int index); - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - int getConditionsCount(); - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - java.util.List - getConditionsOrBuilderList(); - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder getConditionsOrBuilder( - int index); - } - /** - *
-   * A collection of conditions.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Conditions} - */ - public static final class Conditions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordCondition.Conditions) - ConditionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use Conditions.newBuilder() to construct. - private Conditions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Conditions() { - conditions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Conditions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Conditions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - conditions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - conditions_.add( - input.readMessage(com.google.privacy.dlp.v2.RecordCondition.Condition.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - conditions_ = java.util.Collections.unmodifiableList(conditions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordCondition.Conditions.class, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder.class); - } - - public static final int CONDITIONS_FIELD_NUMBER = 1; - private java.util.List conditions_; - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - @java.lang.Override - public java.util.List getConditionsList() { - return conditions_; - } - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - @java.lang.Override - public java.util.List - getConditionsOrBuilderList() { - return conditions_; - } - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - @java.lang.Override - public int getConditionsCount() { - return conditions_.size(); - } - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Condition getConditions(int index) { - return conditions_.get(index); - } - /** - *
-     * A collection of conditions.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder getConditionsOrBuilder( - int index) { - return conditions_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < conditions_.size(); i++) { - output.writeMessage(1, conditions_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < conditions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, conditions_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RecordCondition.Conditions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RecordCondition.Conditions other = (com.google.privacy.dlp.v2.RecordCondition.Conditions) obj; - - if (!getConditionsList() - .equals(other.getConditionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getConditionsCount() > 0) { - hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; - hash = (53 * hash) + getConditionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition.Conditions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RecordCondition.Conditions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A collection of conditions.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Conditions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordCondition.Conditions) - com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordCondition.Conditions.class, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RecordCondition.Conditions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getConditionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (conditionsBuilder_ == null) { - conditions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - conditionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Conditions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Conditions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Conditions build() { - com.google.privacy.dlp.v2.RecordCondition.Conditions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Conditions buildPartial() { - com.google.privacy.dlp.v2.RecordCondition.Conditions result = new com.google.privacy.dlp.v2.RecordCondition.Conditions(this); - int from_bitField0_ = bitField0_; - if (conditionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - conditions_ = java.util.Collections.unmodifiableList(conditions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.conditions_ = conditions_; - } else { - result.conditions_ = conditionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RecordCondition.Conditions) { - return mergeFrom((com.google.privacy.dlp.v2.RecordCondition.Conditions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RecordCondition.Conditions other) { - if (other == com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance()) return this; - if (conditionsBuilder_ == null) { - if (!other.conditions_.isEmpty()) { - if (conditions_.isEmpty()) { - conditions_ = other.conditions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConditionsIsMutable(); - conditions_.addAll(other.conditions_); - } - onChanged(); - } - } else { - if (!other.conditions_.isEmpty()) { - if (conditionsBuilder_.isEmpty()) { - conditionsBuilder_.dispose(); - conditionsBuilder_ = null; - conditions_ = other.conditions_; - bitField0_ = (bitField0_ & ~0x00000001); - conditionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConditionsFieldBuilder() : null; - } else { - conditionsBuilder_.addAllMessages(other.conditions_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RecordCondition.Conditions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RecordCondition.Conditions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List conditions_ = - java.util.Collections.emptyList(); - private void ensureConditionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - conditions_ = new java.util.ArrayList(conditions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition.Condition, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder> conditionsBuilder_; - - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public java.util.List getConditionsList() { - if (conditionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(conditions_); - } else { - return conditionsBuilder_.getMessageList(); - } - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public int getConditionsCount() { - if (conditionsBuilder_ == null) { - return conditions_.size(); - } else { - return conditionsBuilder_.getCount(); - } - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public com.google.privacy.dlp.v2.RecordCondition.Condition getConditions(int index) { - if (conditionsBuilder_ == null) { - return conditions_.get(index); - } else { - return conditionsBuilder_.getMessage(index); - } - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public Builder setConditions( - int index, com.google.privacy.dlp.v2.RecordCondition.Condition value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionsIsMutable(); - conditions_.set(index, value); - onChanged(); - } else { - conditionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public Builder setConditions( - int index, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder builderForValue) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.set(index, builderForValue.build()); - onChanged(); - } else { - conditionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public Builder addConditions(com.google.privacy.dlp.v2.RecordCondition.Condition value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionsIsMutable(); - conditions_.add(value); - onChanged(); - } else { - conditionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public Builder addConditions( - int index, com.google.privacy.dlp.v2.RecordCondition.Condition value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionsIsMutable(); - conditions_.add(index, value); - onChanged(); - } else { - conditionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public Builder addConditions( - com.google.privacy.dlp.v2.RecordCondition.Condition.Builder builderForValue) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.add(builderForValue.build()); - onChanged(); - } else { - conditionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public Builder addConditions( - int index, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder builderForValue) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.add(index, builderForValue.build()); - onChanged(); - } else { - conditionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public Builder addAllConditions( - java.lang.Iterable values) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, conditions_); - onChanged(); - } else { - conditionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public Builder clearConditions() { - if (conditionsBuilder_ == null) { - conditions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - conditionsBuilder_.clear(); - } - return this; - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public Builder removeConditions(int index) { - if (conditionsBuilder_ == null) { - ensureConditionsIsMutable(); - conditions_.remove(index); - onChanged(); - } else { - conditionsBuilder_.remove(index); - } - return this; - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public com.google.privacy.dlp.v2.RecordCondition.Condition.Builder getConditionsBuilder( - int index) { - return getConditionsFieldBuilder().getBuilder(index); - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder getConditionsOrBuilder( - int index) { - if (conditionsBuilder_ == null) { - return conditions_.get(index); } else { - return conditionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public java.util.List - getConditionsOrBuilderList() { - if (conditionsBuilder_ != null) { - return conditionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(conditions_); - } - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public com.google.privacy.dlp.v2.RecordCondition.Condition.Builder addConditionsBuilder() { - return getConditionsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.RecordCondition.Condition.getDefaultInstance()); - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public com.google.privacy.dlp.v2.RecordCondition.Condition.Builder addConditionsBuilder( - int index) { - return getConditionsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.RecordCondition.Condition.getDefaultInstance()); - } - /** - *
-       * A collection of conditions.
-       * 
- * - * repeated .google.privacy.dlp.v2.RecordCondition.Condition conditions = 1; - */ - public java.util.List - getConditionsBuilderList() { - return getConditionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition.Condition, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder> - getConditionsFieldBuilder() { - if (conditionsBuilder_ == null) { - conditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition.Condition, com.google.privacy.dlp.v2.RecordCondition.Condition.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionOrBuilder>( - conditions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - conditions_ = null; - } - return conditionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordCondition.Conditions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordCondition.Conditions) - private static final com.google.privacy.dlp.v2.RecordCondition.Conditions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordCondition.Conditions(); - } - - public static com.google.privacy.dlp.v2.RecordCondition.Conditions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Conditions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Conditions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Conditions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ExpressionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordCondition.Expressions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The operator to apply to the result of conditions. Default and currently
-     * only supported value is `AND`.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @return The enum numeric value on the wire for logicalOperator. - */ - int getLogicalOperatorValue(); - /** - *
-     * The operator to apply to the result of conditions. Default and currently
-     * only supported value is `AND`.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @return The logicalOperator. - */ - com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator getLogicalOperator(); - - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - * @return Whether the conditions field is set. - */ - boolean hasConditions(); - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - * @return The conditions. - */ - com.google.privacy.dlp.v2.RecordCondition.Conditions getConditions(); - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - */ - com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder getConditionsOrBuilder(); - - public com.google.privacy.dlp.v2.RecordCondition.Expressions.TypeCase getTypeCase(); - } - /** - *
-   * An expression, consisting of an operator and conditions.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Expressions} - */ - public static final class Expressions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordCondition.Expressions) - ExpressionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use Expressions.newBuilder() to construct. - private Expressions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Expressions() { - logicalOperator_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Expressions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Expressions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - logicalOperator_ = rawValue; - break; - } - case 26: { - com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder subBuilder = null; - if (typeCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.RecordCondition.Conditions) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.RecordCondition.Conditions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.RecordCondition.Conditions) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 3; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordCondition.Expressions.class, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder.class); - } - - /** - *
-     * Logical operators for conditional checks.
-     * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator} - */ - public enum LogicalOperator - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unused
-       * 
- * - * LOGICAL_OPERATOR_UNSPECIFIED = 0; - */ - LOGICAL_OPERATOR_UNSPECIFIED(0), - /** - *
-       * Conditional AND
-       * 
- * - * AND = 1; - */ - AND(1), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unused
-       * 
- * - * LOGICAL_OPERATOR_UNSPECIFIED = 0; - */ - public static final int LOGICAL_OPERATOR_UNSPECIFIED_VALUE = 0; - /** - *
-       * Conditional AND
-       * 
- * - * AND = 1; - */ - public static final int AND_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static LogicalOperator valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static LogicalOperator forNumber(int value) { - switch (value) { - case 0: return LOGICAL_OPERATOR_UNSPECIFIED; - case 1: return AND; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - LogicalOperator> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public LogicalOperator findValueByNumber(int number) { - return LogicalOperator.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.RecordCondition.Expressions.getDescriptor().getEnumTypes().get(0); - } - - private static final LogicalOperator[] VALUES = values(); - - public static LogicalOperator valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private LogicalOperator(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator) - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CONDITIONS(3), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 3: return CONDITIONS; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int LOGICAL_OPERATOR_FIELD_NUMBER = 1; - private int logicalOperator_; - /** - *
-     * The operator to apply to the result of conditions. Default and currently
-     * only supported value is `AND`.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @return The enum numeric value on the wire for logicalOperator. - */ - @java.lang.Override public int getLogicalOperatorValue() { - return logicalOperator_; - } - /** - *
-     * The operator to apply to the result of conditions. Default and currently
-     * only supported value is `AND`.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @return The logicalOperator. - */ - @java.lang.Override public com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator getLogicalOperator() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator result = com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.valueOf(logicalOperator_); - return result == null ? com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.UNRECOGNIZED : result; - } - - public static final int CONDITIONS_FIELD_NUMBER = 3; - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - * @return Whether the conditions field is set. - */ - @java.lang.Override - public boolean hasConditions() { - return typeCase_ == 3; - } - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - * @return The conditions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Conditions getConditions() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_; - } - return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); - } - /** - *
-     * Conditions to apply to the expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder getConditionsOrBuilder() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_; - } - return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (logicalOperator_ != com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED.getNumber()) { - output.writeEnum(1, logicalOperator_); - } - if (typeCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (logicalOperator_ != com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.LOGICAL_OPERATOR_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, logicalOperator_); - } - if (typeCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RecordCondition.Expressions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RecordCondition.Expressions other = (com.google.privacy.dlp.v2.RecordCondition.Expressions) obj; - - if (logicalOperator_ != other.logicalOperator_) return false; - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 3: - if (!getConditions() - .equals(other.getConditions())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOGICAL_OPERATOR_FIELD_NUMBER; - hash = (53 * hash) + logicalOperator_; - switch (typeCase_) { - case 3: - hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; - hash = (53 * hash) + getConditions().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition.Expressions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RecordCondition.Expressions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * An expression, consisting of an operator and conditions.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordCondition.Expressions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordCondition.Expressions) - com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordCondition.Expressions.class, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RecordCondition.Expressions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - logicalOperator_ = 0; - - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Expressions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Expressions build() { - com.google.privacy.dlp.v2.RecordCondition.Expressions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Expressions buildPartial() { - com.google.privacy.dlp.v2.RecordCondition.Expressions result = new com.google.privacy.dlp.v2.RecordCondition.Expressions(this); - result.logicalOperator_ = logicalOperator_; - if (typeCase_ == 3) { - if (conditionsBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = conditionsBuilder_.build(); - } - } - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RecordCondition.Expressions) { - return mergeFrom((com.google.privacy.dlp.v2.RecordCondition.Expressions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RecordCondition.Expressions other) { - if (other == com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance()) return this; - if (other.logicalOperator_ != 0) { - setLogicalOperatorValue(other.getLogicalOperatorValue()); - } - switch (other.getTypeCase()) { - case CONDITIONS: { - mergeConditions(other.getConditions()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RecordCondition.Expressions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RecordCondition.Expressions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private int logicalOperator_ = 0; - /** - *
-       * The operator to apply to the result of conditions. Default and currently
-       * only supported value is `AND`.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @return The enum numeric value on the wire for logicalOperator. - */ - @java.lang.Override public int getLogicalOperatorValue() { - return logicalOperator_; - } - /** - *
-       * The operator to apply to the result of conditions. Default and currently
-       * only supported value is `AND`.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @param value The enum numeric value on the wire for logicalOperator to set. - * @return This builder for chaining. - */ - public Builder setLogicalOperatorValue(int value) { - - logicalOperator_ = value; - onChanged(); - return this; - } - /** - *
-       * The operator to apply to the result of conditions. Default and currently
-       * only supported value is `AND`.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @return The logicalOperator. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator getLogicalOperator() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator result = com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.valueOf(logicalOperator_); - return result == null ? com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator.UNRECOGNIZED : result; - } - /** - *
-       * The operator to apply to the result of conditions. Default and currently
-       * only supported value is `AND`.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @param value The logicalOperator to set. - * @return This builder for chaining. - */ - public Builder setLogicalOperator(com.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator value) { - if (value == null) { - throw new NullPointerException(); - } - - logicalOperator_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The operator to apply to the result of conditions. Default and currently
-       * only supported value is `AND`.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator logical_operator = 1; - * @return This builder for chaining. - */ - public Builder clearLogicalOperator() { - - logicalOperator_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition.Conditions, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder> conditionsBuilder_; - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - * @return Whether the conditions field is set. - */ - @java.lang.Override - public boolean hasConditions() { - return typeCase_ == 3; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - * @return The conditions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Conditions getConditions() { - if (conditionsBuilder_ == null) { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_; - } - return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); - } else { - if (typeCase_ == 3) { - return conditionsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); - } - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - */ - public Builder setConditions(com.google.privacy.dlp.v2.RecordCondition.Conditions value) { - if (conditionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - conditionsBuilder_.setMessage(value); - } - typeCase_ = 3; - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - */ - public Builder setConditions( - com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder builderForValue) { - if (conditionsBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - conditionsBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 3; - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - */ - public Builder mergeConditions(com.google.privacy.dlp.v2.RecordCondition.Conditions value) { - if (conditionsBuilder_ == null) { - if (typeCase_ == 3 && - type_ != com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.RecordCondition.Conditions.newBuilder((com.google.privacy.dlp.v2.RecordCondition.Conditions) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 3) { - conditionsBuilder_.mergeFrom(value); - } else { - conditionsBuilder_.setMessage(value); - } - } - typeCase_ = 3; - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - */ - public Builder clearConditions() { - if (conditionsBuilder_ == null) { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - } - conditionsBuilder_.clear(); - } - return this; - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - */ - public com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder getConditionsBuilder() { - return getConditionsFieldBuilder().getBuilder(); - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder getConditionsOrBuilder() { - if ((typeCase_ == 3) && (conditionsBuilder_ != null)) { - return conditionsBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_; - } - return com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); - } - } - /** - *
-       * Conditions to apply to the expression.
-       * 
- * - * .google.privacy.dlp.v2.RecordCondition.Conditions conditions = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition.Conditions, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder> - getConditionsFieldBuilder() { - if (conditionsBuilder_ == null) { - if (!(typeCase_ == 3)) { - type_ = com.google.privacy.dlp.v2.RecordCondition.Conditions.getDefaultInstance(); - } - conditionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition.Conditions, com.google.privacy.dlp.v2.RecordCondition.Conditions.Builder, com.google.privacy.dlp.v2.RecordCondition.ConditionsOrBuilder>( - (com.google.privacy.dlp.v2.RecordCondition.Conditions) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 3; - onChanged();; - return conditionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordCondition.Expressions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordCondition.Expressions) - private static final com.google.privacy.dlp.v2.RecordCondition.Expressions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordCondition.Expressions(); - } - - public static com.google.privacy.dlp.v2.RecordCondition.Expressions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Expressions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Expressions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Expressions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int EXPRESSIONS_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.RecordCondition.Expressions expressions_; - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - * @return Whether the expressions field is set. - */ - @java.lang.Override - public boolean hasExpressions() { - return expressions_ != null; - } - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - * @return The expressions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.Expressions getExpressions() { - return expressions_ == null ? com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance() : expressions_; - } - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder getExpressionsOrBuilder() { - return getExpressions(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (expressions_ != null) { - output.writeMessage(3, getExpressions()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (expressions_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getExpressions()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RecordCondition)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RecordCondition other = (com.google.privacy.dlp.v2.RecordCondition) obj; - - if (hasExpressions() != other.hasExpressions()) return false; - if (hasExpressions()) { - if (!getExpressions() - .equals(other.getExpressions())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasExpressions()) { - hash = (37 * hash) + EXPRESSIONS_FIELD_NUMBER; - hash = (53 * hash) + getExpressions().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RecordCondition parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordCondition parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordCondition parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordCondition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RecordCondition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A condition for determining whether a transformation should be applied to
-   * a field.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordCondition} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordCondition) - com.google.privacy.dlp.v2.RecordConditionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordCondition.class, com.google.privacy.dlp.v2.RecordCondition.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RecordCondition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (expressionsBuilder_ == null) { - expressions_ = null; - } else { - expressions_ = null; - expressionsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordCondition_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition build() { - com.google.privacy.dlp.v2.RecordCondition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition buildPartial() { - com.google.privacy.dlp.v2.RecordCondition result = new com.google.privacy.dlp.v2.RecordCondition(this); - if (expressionsBuilder_ == null) { - result.expressions_ = expressions_; - } else { - result.expressions_ = expressionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RecordCondition) { - return mergeFrom((com.google.privacy.dlp.v2.RecordCondition)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RecordCondition other) { - if (other == com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance()) return this; - if (other.hasExpressions()) { - mergeExpressions(other.getExpressions()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RecordCondition parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RecordCondition) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.RecordCondition.Expressions expressions_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition.Expressions, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder, com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder> expressionsBuilder_; - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - * @return Whether the expressions field is set. - */ - public boolean hasExpressions() { - return expressionsBuilder_ != null || expressions_ != null; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - * @return The expressions. - */ - public com.google.privacy.dlp.v2.RecordCondition.Expressions getExpressions() { - if (expressionsBuilder_ == null) { - return expressions_ == null ? com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance() : expressions_; - } else { - return expressionsBuilder_.getMessage(); - } - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - */ - public Builder setExpressions(com.google.privacy.dlp.v2.RecordCondition.Expressions value) { - if (expressionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - expressions_ = value; - onChanged(); - } else { - expressionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - */ - public Builder setExpressions( - com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder builderForValue) { - if (expressionsBuilder_ == null) { - expressions_ = builderForValue.build(); - onChanged(); - } else { - expressionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - */ - public Builder mergeExpressions(com.google.privacy.dlp.v2.RecordCondition.Expressions value) { - if (expressionsBuilder_ == null) { - if (expressions_ != null) { - expressions_ = - com.google.privacy.dlp.v2.RecordCondition.Expressions.newBuilder(expressions_).mergeFrom(value).buildPartial(); - } else { - expressions_ = value; - } - onChanged(); - } else { - expressionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - */ - public Builder clearExpressions() { - if (expressionsBuilder_ == null) { - expressions_ = null; - onChanged(); - } else { - expressions_ = null; - expressionsBuilder_ = null; - } - - return this; - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - */ - public com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder getExpressionsBuilder() { - - onChanged(); - return getExpressionsFieldBuilder().getBuilder(); - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - */ - public com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder getExpressionsOrBuilder() { - if (expressionsBuilder_ != null) { - return expressionsBuilder_.getMessageOrBuilder(); - } else { - return expressions_ == null ? - com.google.privacy.dlp.v2.RecordCondition.Expressions.getDefaultInstance() : expressions_; - } - } - /** - *
-     * An expression.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition.Expressions, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder, com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder> - getExpressionsFieldBuilder() { - if (expressionsBuilder_ == null) { - expressionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition.Expressions, com.google.privacy.dlp.v2.RecordCondition.Expressions.Builder, com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder>( - getExpressions(), - getParentForChildren(), - isClean()); - expressions_ = null; - } - return expressionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordCondition) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordCondition) - private static final com.google.privacy.dlp.v2.RecordCondition DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordCondition(); - } - - public static com.google.privacy.dlp.v2.RecordCondition getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RecordCondition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RecordCondition(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordConditionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordConditionOrBuilder.java deleted file mode 100644 index 8a5ae866dfc9..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordConditionOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface RecordConditionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordCondition) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - * @return Whether the expressions field is set. - */ - boolean hasExpressions(); - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - * @return The expressions. - */ - com.google.privacy.dlp.v2.RecordCondition.Expressions getExpressions(); - /** - *
-   * An expression.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition.Expressions expressions = 3; - */ - com.google.privacy.dlp.v2.RecordCondition.ExpressionsOrBuilder getExpressionsOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKey.java deleted file mode 100644 index c91d477b4326..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKey.java +++ /dev/null @@ -1,1188 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Message for a unique key indicating a record that contains a finding.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordKey} - */ -public final class RecordKey extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordKey) - RecordKeyOrBuilder { -private static final long serialVersionUID = 0L; - // Use RecordKey.newBuilder() to construct. - private RecordKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RecordKey() { - idValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RecordKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RecordKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - com.google.privacy.dlp.v2.DatastoreKey.Builder subBuilder = null; - if (typeCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.DatastoreKey) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.DatastoreKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.DatastoreKey) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.BigQueryKey.Builder subBuilder = null; - if (typeCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.BigQueryKey) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.BigQueryKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryKey) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 3; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - idValues_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - idValues_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - idValues_ = idValues_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordKey.class, com.google.privacy.dlp.v2.RecordKey.Builder.class); - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DATASTORE_KEY(2), - BIG_QUERY_KEY(3), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 2: return DATASTORE_KEY; - case 3: return BIG_QUERY_KEY; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int DATASTORE_KEY_FIELD_NUMBER = 2; - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - * @return Whether the datastoreKey field is set. - */ - @java.lang.Override - public boolean hasDatastoreKey() { - return typeCase_ == 2; - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - * @return The datastoreKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreKey getDatastoreKey() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.DatastoreKey) type_; - } - return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreKeyOrBuilder getDatastoreKeyOrBuilder() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.DatastoreKey) type_; - } - return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); - } - - public static final int BIG_QUERY_KEY_FIELD_NUMBER = 3; - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - * @return Whether the bigQueryKey field is set. - */ - @java.lang.Override - public boolean hasBigQueryKey() { - return typeCase_ == 3; - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - * @return The bigQueryKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryKey getBigQueryKey() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.BigQueryKey) type_; - } - return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryKeyOrBuilder getBigQueryKeyOrBuilder() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.BigQueryKey) type_; - } - return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); - } - - public static final int ID_VALUES_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList idValues_; - /** - *
-   * Values of identifying columns in the given row. Order of values matches
-   * the order of `identifying_fields` specified in the scanning request.
-   * 
- * - * repeated string id_values = 5; - * @return A list containing the idValues. - */ - public com.google.protobuf.ProtocolStringList - getIdValuesList() { - return idValues_; - } - /** - *
-   * Values of identifying columns in the given row. Order of values matches
-   * the order of `identifying_fields` specified in the scanning request.
-   * 
- * - * repeated string id_values = 5; - * @return The count of idValues. - */ - public int getIdValuesCount() { - return idValues_.size(); - } - /** - *
-   * Values of identifying columns in the given row. Order of values matches
-   * the order of `identifying_fields` specified in the scanning request.
-   * 
- * - * repeated string id_values = 5; - * @param index The index of the element to return. - * @return The idValues at the given index. - */ - public java.lang.String getIdValues(int index) { - return idValues_.get(index); - } - /** - *
-   * Values of identifying columns in the given row. Order of values matches
-   * the order of `identifying_fields` specified in the scanning request.
-   * 
- * - * repeated string id_values = 5; - * @param index The index of the value to return. - * @return The bytes of the idValues at the given index. - */ - public com.google.protobuf.ByteString - getIdValuesBytes(int index) { - return idValues_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.DatastoreKey) type_); - } - if (typeCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.BigQueryKey) type_); - } - for (int i = 0; i < idValues_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, idValues_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.DatastoreKey) type_); - } - if (typeCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.BigQueryKey) type_); - } - { - int dataSize = 0; - for (int i = 0; i < idValues_.size(); i++) { - dataSize += computeStringSizeNoTag(idValues_.getRaw(i)); - } - size += dataSize; - size += 1 * getIdValuesList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RecordKey)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RecordKey other = (com.google.privacy.dlp.v2.RecordKey) obj; - - if (!getIdValuesList() - .equals(other.getIdValuesList())) return false; - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 2: - if (!getDatastoreKey() - .equals(other.getDatastoreKey())) return false; - break; - case 3: - if (!getBigQueryKey() - .equals(other.getBigQueryKey())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getIdValuesCount() > 0) { - hash = (37 * hash) + ID_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getIdValuesList().hashCode(); - } - switch (typeCase_) { - case 2: - hash = (37 * hash) + DATASTORE_KEY_FIELD_NUMBER; - hash = (53 * hash) + getDatastoreKey().hashCode(); - break; - case 3: - hash = (37 * hash) + BIG_QUERY_KEY_FIELD_NUMBER; - hash = (53 * hash) + getBigQueryKey().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RecordKey parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordKey parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordKey parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordKey parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordKey parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordKey parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordKey parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RecordKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Message for a unique key indicating a record that contains a finding.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordKey) - com.google.privacy.dlp.v2.RecordKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordKey.class, com.google.privacy.dlp.v2.RecordKey.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RecordKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - idValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_RecordKey_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordKey getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RecordKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordKey build() { - com.google.privacy.dlp.v2.RecordKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordKey buildPartial() { - com.google.privacy.dlp.v2.RecordKey result = new com.google.privacy.dlp.v2.RecordKey(this); - int from_bitField0_ = bitField0_; - if (typeCase_ == 2) { - if (datastoreKeyBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = datastoreKeyBuilder_.build(); - } - } - if (typeCase_ == 3) { - if (bigQueryKeyBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = bigQueryKeyBuilder_.build(); - } - } - if (((bitField0_ & 0x00000001) != 0)) { - idValues_ = idValues_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.idValues_ = idValues_; - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RecordKey) { - return mergeFrom((com.google.privacy.dlp.v2.RecordKey)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RecordKey other) { - if (other == com.google.privacy.dlp.v2.RecordKey.getDefaultInstance()) return this; - if (!other.idValues_.isEmpty()) { - if (idValues_.isEmpty()) { - idValues_ = other.idValues_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIdValuesIsMutable(); - idValues_.addAll(other.idValues_); - } - onChanged(); - } - switch (other.getTypeCase()) { - case DATASTORE_KEY: { - mergeDatastoreKey(other.getDatastoreKey()); - break; - } - case BIG_QUERY_KEY: { - mergeBigQueryKey(other.getBigQueryKey()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RecordKey parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RecordKey) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DatastoreKey, com.google.privacy.dlp.v2.DatastoreKey.Builder, com.google.privacy.dlp.v2.DatastoreKeyOrBuilder> datastoreKeyBuilder_; - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - * @return Whether the datastoreKey field is set. - */ - @java.lang.Override - public boolean hasDatastoreKey() { - return typeCase_ == 2; - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - * @return The datastoreKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreKey getDatastoreKey() { - if (datastoreKeyBuilder_ == null) { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.DatastoreKey) type_; - } - return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); - } else { - if (typeCase_ == 2) { - return datastoreKeyBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); - } - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - */ - public Builder setDatastoreKey(com.google.privacy.dlp.v2.DatastoreKey value) { - if (datastoreKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - datastoreKeyBuilder_.setMessage(value); - } - typeCase_ = 2; - return this; - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - */ - public Builder setDatastoreKey( - com.google.privacy.dlp.v2.DatastoreKey.Builder builderForValue) { - if (datastoreKeyBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - datastoreKeyBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 2; - return this; - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - */ - public Builder mergeDatastoreKey(com.google.privacy.dlp.v2.DatastoreKey value) { - if (datastoreKeyBuilder_ == null) { - if (typeCase_ == 2 && - type_ != com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.DatastoreKey.newBuilder((com.google.privacy.dlp.v2.DatastoreKey) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 2) { - datastoreKeyBuilder_.mergeFrom(value); - } else { - datastoreKeyBuilder_.setMessage(value); - } - } - typeCase_ = 2; - return this; - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - */ - public Builder clearDatastoreKey() { - if (datastoreKeyBuilder_ == null) { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - } - datastoreKeyBuilder_.clear(); - } - return this; - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - */ - public com.google.privacy.dlp.v2.DatastoreKey.Builder getDatastoreKeyBuilder() { - return getDatastoreKeyFieldBuilder().getBuilder(); - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreKeyOrBuilder getDatastoreKeyOrBuilder() { - if ((typeCase_ == 2) && (datastoreKeyBuilder_ != null)) { - return datastoreKeyBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.DatastoreKey) type_; - } - return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); - } - } - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DatastoreKey, com.google.privacy.dlp.v2.DatastoreKey.Builder, com.google.privacy.dlp.v2.DatastoreKeyOrBuilder> - getDatastoreKeyFieldBuilder() { - if (datastoreKeyBuilder_ == null) { - if (!(typeCase_ == 2)) { - type_ = com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); - } - datastoreKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DatastoreKey, com.google.privacy.dlp.v2.DatastoreKey.Builder, com.google.privacy.dlp.v2.DatastoreKeyOrBuilder>( - (com.google.privacy.dlp.v2.DatastoreKey) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 2; - onChanged();; - return datastoreKeyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryKey, com.google.privacy.dlp.v2.BigQueryKey.Builder, com.google.privacy.dlp.v2.BigQueryKeyOrBuilder> bigQueryKeyBuilder_; - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - * @return Whether the bigQueryKey field is set. - */ - @java.lang.Override - public boolean hasBigQueryKey() { - return typeCase_ == 3; - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - * @return The bigQueryKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryKey getBigQueryKey() { - if (bigQueryKeyBuilder_ == null) { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.BigQueryKey) type_; - } - return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); - } else { - if (typeCase_ == 3) { - return bigQueryKeyBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); - } - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - */ - public Builder setBigQueryKey(com.google.privacy.dlp.v2.BigQueryKey value) { - if (bigQueryKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - bigQueryKeyBuilder_.setMessage(value); - } - typeCase_ = 3; - return this; - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - */ - public Builder setBigQueryKey( - com.google.privacy.dlp.v2.BigQueryKey.Builder builderForValue) { - if (bigQueryKeyBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - bigQueryKeyBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 3; - return this; - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - */ - public Builder mergeBigQueryKey(com.google.privacy.dlp.v2.BigQueryKey value) { - if (bigQueryKeyBuilder_ == null) { - if (typeCase_ == 3 && - type_ != com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.BigQueryKey.newBuilder((com.google.privacy.dlp.v2.BigQueryKey) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 3) { - bigQueryKeyBuilder_.mergeFrom(value); - } else { - bigQueryKeyBuilder_.setMessage(value); - } - } - typeCase_ = 3; - return this; - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - */ - public Builder clearBigQueryKey() { - if (bigQueryKeyBuilder_ == null) { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - } - bigQueryKeyBuilder_.clear(); - } - return this; - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - */ - public com.google.privacy.dlp.v2.BigQueryKey.Builder getBigQueryKeyBuilder() { - return getBigQueryKeyFieldBuilder().getBuilder(); - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryKeyOrBuilder getBigQueryKeyOrBuilder() { - if ((typeCase_ == 3) && (bigQueryKeyBuilder_ != null)) { - return bigQueryKeyBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.BigQueryKey) type_; - } - return com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); - } - } - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryKey, com.google.privacy.dlp.v2.BigQueryKey.Builder, com.google.privacy.dlp.v2.BigQueryKeyOrBuilder> - getBigQueryKeyFieldBuilder() { - if (bigQueryKeyBuilder_ == null) { - if (!(typeCase_ == 3)) { - type_ = com.google.privacy.dlp.v2.BigQueryKey.getDefaultInstance(); - } - bigQueryKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryKey, com.google.privacy.dlp.v2.BigQueryKey.Builder, com.google.privacy.dlp.v2.BigQueryKeyOrBuilder>( - (com.google.privacy.dlp.v2.BigQueryKey) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 3; - onChanged();; - return bigQueryKeyBuilder_; - } - - private com.google.protobuf.LazyStringList idValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureIdValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - idValues_ = new com.google.protobuf.LazyStringArrayList(idValues_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Values of identifying columns in the given row. Order of values matches
-     * the order of `identifying_fields` specified in the scanning request.
-     * 
- * - * repeated string id_values = 5; - * @return A list containing the idValues. - */ - public com.google.protobuf.ProtocolStringList - getIdValuesList() { - return idValues_.getUnmodifiableView(); - } - /** - *
-     * Values of identifying columns in the given row. Order of values matches
-     * the order of `identifying_fields` specified in the scanning request.
-     * 
- * - * repeated string id_values = 5; - * @return The count of idValues. - */ - public int getIdValuesCount() { - return idValues_.size(); - } - /** - *
-     * Values of identifying columns in the given row. Order of values matches
-     * the order of `identifying_fields` specified in the scanning request.
-     * 
- * - * repeated string id_values = 5; - * @param index The index of the element to return. - * @return The idValues at the given index. - */ - public java.lang.String getIdValues(int index) { - return idValues_.get(index); - } - /** - *
-     * Values of identifying columns in the given row. Order of values matches
-     * the order of `identifying_fields` specified in the scanning request.
-     * 
- * - * repeated string id_values = 5; - * @param index The index of the value to return. - * @return The bytes of the idValues at the given index. - */ - public com.google.protobuf.ByteString - getIdValuesBytes(int index) { - return idValues_.getByteString(index); - } - /** - *
-     * Values of identifying columns in the given row. Order of values matches
-     * the order of `identifying_fields` specified in the scanning request.
-     * 
- * - * repeated string id_values = 5; - * @param index The index to set the value at. - * @param value The idValues to set. - * @return This builder for chaining. - */ - public Builder setIdValues( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdValuesIsMutable(); - idValues_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Values of identifying columns in the given row. Order of values matches
-     * the order of `identifying_fields` specified in the scanning request.
-     * 
- * - * repeated string id_values = 5; - * @param value The idValues to add. - * @return This builder for chaining. - */ - public Builder addIdValues( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdValuesIsMutable(); - idValues_.add(value); - onChanged(); - return this; - } - /** - *
-     * Values of identifying columns in the given row. Order of values matches
-     * the order of `identifying_fields` specified in the scanning request.
-     * 
- * - * repeated string id_values = 5; - * @param values The idValues to add. - * @return This builder for chaining. - */ - public Builder addAllIdValues( - java.lang.Iterable values) { - ensureIdValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, idValues_); - onChanged(); - return this; - } - /** - *
-     * Values of identifying columns in the given row. Order of values matches
-     * the order of `identifying_fields` specified in the scanning request.
-     * 
- * - * repeated string id_values = 5; - * @return This builder for chaining. - */ - public Builder clearIdValues() { - idValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Values of identifying columns in the given row. Order of values matches
-     * the order of `identifying_fields` specified in the scanning request.
-     * 
- * - * repeated string id_values = 5; - * @param value The bytes of the idValues to add. - * @return This builder for chaining. - */ - public Builder addIdValuesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureIdValuesIsMutable(); - idValues_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordKey) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordKey) - private static final com.google.privacy.dlp.v2.RecordKey DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordKey(); - } - - public static com.google.privacy.dlp.v2.RecordKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RecordKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RecordKey(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKeyOrBuilder.java deleted file mode 100644 index 04fa1b159097..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordKeyOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface RecordKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordKey) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - * @return Whether the datastoreKey field is set. - */ - boolean hasDatastoreKey(); - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - * @return The datastoreKey. - */ - com.google.privacy.dlp.v2.DatastoreKey getDatastoreKey(); - /** - * .google.privacy.dlp.v2.DatastoreKey datastore_key = 2; - */ - com.google.privacy.dlp.v2.DatastoreKeyOrBuilder getDatastoreKeyOrBuilder(); - - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - * @return Whether the bigQueryKey field is set. - */ - boolean hasBigQueryKey(); - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - * @return The bigQueryKey. - */ - com.google.privacy.dlp.v2.BigQueryKey getBigQueryKey(); - /** - * .google.privacy.dlp.v2.BigQueryKey big_query_key = 3; - */ - com.google.privacy.dlp.v2.BigQueryKeyOrBuilder getBigQueryKeyOrBuilder(); - - /** - *
-   * Values of identifying columns in the given row. Order of values matches
-   * the order of `identifying_fields` specified in the scanning request.
-   * 
- * - * repeated string id_values = 5; - * @return A list containing the idValues. - */ - java.util.List - getIdValuesList(); - /** - *
-   * Values of identifying columns in the given row. Order of values matches
-   * the order of `identifying_fields` specified in the scanning request.
-   * 
- * - * repeated string id_values = 5; - * @return The count of idValues. - */ - int getIdValuesCount(); - /** - *
-   * Values of identifying columns in the given row. Order of values matches
-   * the order of `identifying_fields` specified in the scanning request.
-   * 
- * - * repeated string id_values = 5; - * @param index The index of the element to return. - * @return The idValues at the given index. - */ - java.lang.String getIdValues(int index); - /** - *
-   * Values of identifying columns in the given row. Order of values matches
-   * the order of `identifying_fields` specified in the scanning request.
-   * 
- * - * repeated string id_values = 5; - * @param index The index of the value to return. - * @return The bytes of the idValues at the given index. - */ - com.google.protobuf.ByteString - getIdValuesBytes(int index); - - public com.google.privacy.dlp.v2.RecordKey.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocation.java deleted file mode 100644 index b6f7d8007915..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocation.java +++ /dev/null @@ -1,1137 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Location of a finding within a row or record.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordLocation} - */ -public final class RecordLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordLocation) - RecordLocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use RecordLocation.newBuilder() to construct. - private RecordLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RecordLocation() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RecordLocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RecordLocation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.RecordKey.Builder subBuilder = null; - if (recordKey_ != null) { - subBuilder = recordKey_.toBuilder(); - } - recordKey_ = input.readMessage(com.google.privacy.dlp.v2.RecordKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(recordKey_); - recordKey_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (fieldId_ != null) { - subBuilder = fieldId_.toBuilder(); - } - fieldId_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fieldId_); - fieldId_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.TableLocation.Builder subBuilder = null; - if (tableLocation_ != null) { - subBuilder = tableLocation_.toBuilder(); - } - tableLocation_ = input.readMessage(com.google.privacy.dlp.v2.TableLocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tableLocation_); - tableLocation_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordLocation.class, com.google.privacy.dlp.v2.RecordLocation.Builder.class); - } - - public static final int RECORD_KEY_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.RecordKey recordKey_; - /** - *
-   * Key of the finding.
-   * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - * @return Whether the recordKey field is set. - */ - @java.lang.Override - public boolean hasRecordKey() { - return recordKey_ != null; - } - /** - *
-   * Key of the finding.
-   * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - * @return The recordKey. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordKey getRecordKey() { - return recordKey_ == null ? com.google.privacy.dlp.v2.RecordKey.getDefaultInstance() : recordKey_; - } - /** - *
-   * Key of the finding.
-   * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordKeyOrBuilder getRecordKeyOrBuilder() { - return getRecordKey(); - } - - public static final int FIELD_ID_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.FieldId fieldId_; - /** - *
-   * Field id of the field containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - * @return Whether the fieldId field is set. - */ - @java.lang.Override - public boolean hasFieldId() { - return fieldId_ != null; - } - /** - *
-   * Field id of the field containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - * @return The fieldId. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getFieldId() { - return fieldId_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; - } - /** - *
-   * Field id of the field containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { - return getFieldId(); - } - - public static final int TABLE_LOCATION_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.TableLocation tableLocation_; - /** - *
-   * Location within a `ContentItem.Table`.
-   * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - * @return Whether the tableLocation field is set. - */ - @java.lang.Override - public boolean hasTableLocation() { - return tableLocation_ != null; - } - /** - *
-   * Location within a `ContentItem.Table`.
-   * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - * @return The tableLocation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableLocation getTableLocation() { - return tableLocation_ == null ? com.google.privacy.dlp.v2.TableLocation.getDefaultInstance() : tableLocation_; - } - /** - *
-   * Location within a `ContentItem.Table`.
-   * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableLocationOrBuilder getTableLocationOrBuilder() { - return getTableLocation(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (recordKey_ != null) { - output.writeMessage(1, getRecordKey()); - } - if (fieldId_ != null) { - output.writeMessage(2, getFieldId()); - } - if (tableLocation_ != null) { - output.writeMessage(3, getTableLocation()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (recordKey_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getRecordKey()); - } - if (fieldId_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getFieldId()); - } - if (tableLocation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTableLocation()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RecordLocation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RecordLocation other = (com.google.privacy.dlp.v2.RecordLocation) obj; - - if (hasRecordKey() != other.hasRecordKey()) return false; - if (hasRecordKey()) { - if (!getRecordKey() - .equals(other.getRecordKey())) return false; - } - if (hasFieldId() != other.hasFieldId()) return false; - if (hasFieldId()) { - if (!getFieldId() - .equals(other.getFieldId())) return false; - } - if (hasTableLocation() != other.hasTableLocation()) return false; - if (hasTableLocation()) { - if (!getTableLocation() - .equals(other.getTableLocation())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasRecordKey()) { - hash = (37 * hash) + RECORD_KEY_FIELD_NUMBER; - hash = (53 * hash) + getRecordKey().hashCode(); - } - if (hasFieldId()) { - hash = (37 * hash) + FIELD_ID_FIELD_NUMBER; - hash = (53 * hash) + getFieldId().hashCode(); - } - if (hasTableLocation()) { - hash = (37 * hash) + TABLE_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getTableLocation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RecordLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RecordLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Location of a finding within a row or record.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordLocation) - com.google.privacy.dlp.v2.RecordLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordLocation.class, com.google.privacy.dlp.v2.RecordLocation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RecordLocation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (recordKeyBuilder_ == null) { - recordKey_ = null; - } else { - recordKey_ = null; - recordKeyBuilder_ = null; - } - if (fieldIdBuilder_ == null) { - fieldId_ = null; - } else { - fieldId_ = null; - fieldIdBuilder_ = null; - } - if (tableLocationBuilder_ == null) { - tableLocation_ = null; - } else { - tableLocation_ = null; - tableLocationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordLocation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordLocation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordLocation build() { - com.google.privacy.dlp.v2.RecordLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordLocation buildPartial() { - com.google.privacy.dlp.v2.RecordLocation result = new com.google.privacy.dlp.v2.RecordLocation(this); - if (recordKeyBuilder_ == null) { - result.recordKey_ = recordKey_; - } else { - result.recordKey_ = recordKeyBuilder_.build(); - } - if (fieldIdBuilder_ == null) { - result.fieldId_ = fieldId_; - } else { - result.fieldId_ = fieldIdBuilder_.build(); - } - if (tableLocationBuilder_ == null) { - result.tableLocation_ = tableLocation_; - } else { - result.tableLocation_ = tableLocationBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RecordLocation) { - return mergeFrom((com.google.privacy.dlp.v2.RecordLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RecordLocation other) { - if (other == com.google.privacy.dlp.v2.RecordLocation.getDefaultInstance()) return this; - if (other.hasRecordKey()) { - mergeRecordKey(other.getRecordKey()); - } - if (other.hasFieldId()) { - mergeFieldId(other.getFieldId()); - } - if (other.hasTableLocation()) { - mergeTableLocation(other.getTableLocation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RecordLocation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RecordLocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.RecordKey recordKey_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordKey, com.google.privacy.dlp.v2.RecordKey.Builder, com.google.privacy.dlp.v2.RecordKeyOrBuilder> recordKeyBuilder_; - /** - *
-     * Key of the finding.
-     * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - * @return Whether the recordKey field is set. - */ - public boolean hasRecordKey() { - return recordKeyBuilder_ != null || recordKey_ != null; - } - /** - *
-     * Key of the finding.
-     * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - * @return The recordKey. - */ - public com.google.privacy.dlp.v2.RecordKey getRecordKey() { - if (recordKeyBuilder_ == null) { - return recordKey_ == null ? com.google.privacy.dlp.v2.RecordKey.getDefaultInstance() : recordKey_; - } else { - return recordKeyBuilder_.getMessage(); - } - } - /** - *
-     * Key of the finding.
-     * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - */ - public Builder setRecordKey(com.google.privacy.dlp.v2.RecordKey value) { - if (recordKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - recordKey_ = value; - onChanged(); - } else { - recordKeyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Key of the finding.
-     * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - */ - public Builder setRecordKey( - com.google.privacy.dlp.v2.RecordKey.Builder builderForValue) { - if (recordKeyBuilder_ == null) { - recordKey_ = builderForValue.build(); - onChanged(); - } else { - recordKeyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Key of the finding.
-     * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - */ - public Builder mergeRecordKey(com.google.privacy.dlp.v2.RecordKey value) { - if (recordKeyBuilder_ == null) { - if (recordKey_ != null) { - recordKey_ = - com.google.privacy.dlp.v2.RecordKey.newBuilder(recordKey_).mergeFrom(value).buildPartial(); - } else { - recordKey_ = value; - } - onChanged(); - } else { - recordKeyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Key of the finding.
-     * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - */ - public Builder clearRecordKey() { - if (recordKeyBuilder_ == null) { - recordKey_ = null; - onChanged(); - } else { - recordKey_ = null; - recordKeyBuilder_ = null; - } - - return this; - } - /** - *
-     * Key of the finding.
-     * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - */ - public com.google.privacy.dlp.v2.RecordKey.Builder getRecordKeyBuilder() { - - onChanged(); - return getRecordKeyFieldBuilder().getBuilder(); - } - /** - *
-     * Key of the finding.
-     * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - */ - public com.google.privacy.dlp.v2.RecordKeyOrBuilder getRecordKeyOrBuilder() { - if (recordKeyBuilder_ != null) { - return recordKeyBuilder_.getMessageOrBuilder(); - } else { - return recordKey_ == null ? - com.google.privacy.dlp.v2.RecordKey.getDefaultInstance() : recordKey_; - } - } - /** - *
-     * Key of the finding.
-     * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordKey, com.google.privacy.dlp.v2.RecordKey.Builder, com.google.privacy.dlp.v2.RecordKeyOrBuilder> - getRecordKeyFieldBuilder() { - if (recordKeyBuilder_ == null) { - recordKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordKey, com.google.privacy.dlp.v2.RecordKey.Builder, com.google.privacy.dlp.v2.RecordKeyOrBuilder>( - getRecordKey(), - getParentForChildren(), - isClean()); - recordKey_ = null; - } - return recordKeyBuilder_; - } - - private com.google.privacy.dlp.v2.FieldId fieldId_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldIdBuilder_; - /** - *
-     * Field id of the field containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - * @return Whether the fieldId field is set. - */ - public boolean hasFieldId() { - return fieldIdBuilder_ != null || fieldId_ != null; - } - /** - *
-     * Field id of the field containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - * @return The fieldId. - */ - public com.google.privacy.dlp.v2.FieldId getFieldId() { - if (fieldIdBuilder_ == null) { - return fieldId_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; - } else { - return fieldIdBuilder_.getMessage(); - } - } - /** - *
-     * Field id of the field containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - */ - public Builder setFieldId(com.google.privacy.dlp.v2.FieldId value) { - if (fieldIdBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldId_ = value; - onChanged(); - } else { - fieldIdBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Field id of the field containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - */ - public Builder setFieldId( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldIdBuilder_ == null) { - fieldId_ = builderForValue.build(); - onChanged(); - } else { - fieldIdBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Field id of the field containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - */ - public Builder mergeFieldId(com.google.privacy.dlp.v2.FieldId value) { - if (fieldIdBuilder_ == null) { - if (fieldId_ != null) { - fieldId_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(fieldId_).mergeFrom(value).buildPartial(); - } else { - fieldId_ = value; - } - onChanged(); - } else { - fieldIdBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Field id of the field containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - */ - public Builder clearFieldId() { - if (fieldIdBuilder_ == null) { - fieldId_ = null; - onChanged(); - } else { - fieldId_ = null; - fieldIdBuilder_ = null; - } - - return this; - } - /** - *
-     * Field id of the field containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldIdBuilder() { - - onChanged(); - return getFieldIdFieldBuilder().getBuilder(); - } - /** - *
-     * Field id of the field containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder() { - if (fieldIdBuilder_ != null) { - return fieldIdBuilder_.getMessageOrBuilder(); - } else { - return fieldId_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : fieldId_; - } - } - /** - *
-     * Field id of the field containing the finding.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldIdFieldBuilder() { - if (fieldIdBuilder_ == null) { - fieldIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getFieldId(), - getParentForChildren(), - isClean()); - fieldId_ = null; - } - return fieldIdBuilder_; - } - - private com.google.privacy.dlp.v2.TableLocation tableLocation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableLocation, com.google.privacy.dlp.v2.TableLocation.Builder, com.google.privacy.dlp.v2.TableLocationOrBuilder> tableLocationBuilder_; - /** - *
-     * Location within a `ContentItem.Table`.
-     * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - * @return Whether the tableLocation field is set. - */ - public boolean hasTableLocation() { - return tableLocationBuilder_ != null || tableLocation_ != null; - } - /** - *
-     * Location within a `ContentItem.Table`.
-     * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - * @return The tableLocation. - */ - public com.google.privacy.dlp.v2.TableLocation getTableLocation() { - if (tableLocationBuilder_ == null) { - return tableLocation_ == null ? com.google.privacy.dlp.v2.TableLocation.getDefaultInstance() : tableLocation_; - } else { - return tableLocationBuilder_.getMessage(); - } - } - /** - *
-     * Location within a `ContentItem.Table`.
-     * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - */ - public Builder setTableLocation(com.google.privacy.dlp.v2.TableLocation value) { - if (tableLocationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableLocation_ = value; - onChanged(); - } else { - tableLocationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Location within a `ContentItem.Table`.
-     * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - */ - public Builder setTableLocation( - com.google.privacy.dlp.v2.TableLocation.Builder builderForValue) { - if (tableLocationBuilder_ == null) { - tableLocation_ = builderForValue.build(); - onChanged(); - } else { - tableLocationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Location within a `ContentItem.Table`.
-     * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - */ - public Builder mergeTableLocation(com.google.privacy.dlp.v2.TableLocation value) { - if (tableLocationBuilder_ == null) { - if (tableLocation_ != null) { - tableLocation_ = - com.google.privacy.dlp.v2.TableLocation.newBuilder(tableLocation_).mergeFrom(value).buildPartial(); - } else { - tableLocation_ = value; - } - onChanged(); - } else { - tableLocationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Location within a `ContentItem.Table`.
-     * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - */ - public Builder clearTableLocation() { - if (tableLocationBuilder_ == null) { - tableLocation_ = null; - onChanged(); - } else { - tableLocation_ = null; - tableLocationBuilder_ = null; - } - - return this; - } - /** - *
-     * Location within a `ContentItem.Table`.
-     * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - */ - public com.google.privacy.dlp.v2.TableLocation.Builder getTableLocationBuilder() { - - onChanged(); - return getTableLocationFieldBuilder().getBuilder(); - } - /** - *
-     * Location within a `ContentItem.Table`.
-     * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - */ - public com.google.privacy.dlp.v2.TableLocationOrBuilder getTableLocationOrBuilder() { - if (tableLocationBuilder_ != null) { - return tableLocationBuilder_.getMessageOrBuilder(); - } else { - return tableLocation_ == null ? - com.google.privacy.dlp.v2.TableLocation.getDefaultInstance() : tableLocation_; - } - } - /** - *
-     * Location within a `ContentItem.Table`.
-     * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableLocation, com.google.privacy.dlp.v2.TableLocation.Builder, com.google.privacy.dlp.v2.TableLocationOrBuilder> - getTableLocationFieldBuilder() { - if (tableLocationBuilder_ == null) { - tableLocationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TableLocation, com.google.privacy.dlp.v2.TableLocation.Builder, com.google.privacy.dlp.v2.TableLocationOrBuilder>( - getTableLocation(), - getParentForChildren(), - isClean()); - tableLocation_ = null; - } - return tableLocationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordLocation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordLocation) - private static final com.google.privacy.dlp.v2.RecordLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordLocation(); - } - - public static com.google.privacy.dlp.v2.RecordLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RecordLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RecordLocation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocationOrBuilder.java deleted file mode 100644 index 1c1cbc5bb9d5..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordLocationOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface RecordLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordLocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Key of the finding.
-   * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - * @return Whether the recordKey field is set. - */ - boolean hasRecordKey(); - /** - *
-   * Key of the finding.
-   * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - * @return The recordKey. - */ - com.google.privacy.dlp.v2.RecordKey getRecordKey(); - /** - *
-   * Key of the finding.
-   * 
- * - * .google.privacy.dlp.v2.RecordKey record_key = 1; - */ - com.google.privacy.dlp.v2.RecordKeyOrBuilder getRecordKeyOrBuilder(); - - /** - *
-   * Field id of the field containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - * @return Whether the fieldId field is set. - */ - boolean hasFieldId(); - /** - *
-   * Field id of the field containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - * @return The fieldId. - */ - com.google.privacy.dlp.v2.FieldId getFieldId(); - /** - *
-   * Field id of the field containing the finding.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field_id = 2; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldIdOrBuilder(); - - /** - *
-   * Location within a `ContentItem.Table`.
-   * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - * @return Whether the tableLocation field is set. - */ - boolean hasTableLocation(); - /** - *
-   * Location within a `ContentItem.Table`.
-   * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - * @return The tableLocation. - */ - com.google.privacy.dlp.v2.TableLocation getTableLocation(); - /** - *
-   * Location within a `ContentItem.Table`.
-   * 
- * - * .google.privacy.dlp.v2.TableLocation table_location = 3; - */ - com.google.privacy.dlp.v2.TableLocationOrBuilder getTableLocationOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppression.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppression.java deleted file mode 100644 index 11b598ec35a6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppression.java +++ /dev/null @@ -1,679 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Configuration to suppress records whose suppression conditions evaluate to
- * true.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordSuppression} - */ -public final class RecordSuppression extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordSuppression) - RecordSuppressionOrBuilder { -private static final long serialVersionUID = 0L; - // Use RecordSuppression.newBuilder() to construct. - private RecordSuppression(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RecordSuppression() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RecordSuppression(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RecordSuppression( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.RecordCondition.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = input.readMessage(com.google.privacy.dlp.v2.RecordCondition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordSuppression.class, com.google.privacy.dlp.v2.RecordSuppression.Builder.class); - } - - public static final int CONDITION_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.RecordCondition condition_; - /** - *
-   * A condition that when it evaluates to true will result in the record being
-   * evaluated to be suppressed from the transformed content.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - * @return Whether the condition field is set. - */ - @java.lang.Override - public boolean hasCondition() { - return condition_ != null; - } - /** - *
-   * A condition that when it evaluates to true will result in the record being
-   * evaluated to be suppressed from the transformed content.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - * @return The condition. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordCondition getCondition() { - return condition_ == null ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; - } - /** - *
-   * A condition that when it evaluates to true will result in the record being
-   * evaluated to be suppressed from the transformed content.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() { - return getCondition(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (condition_ != null) { - output.writeMessage(1, getCondition()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (condition_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCondition()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RecordSuppression)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RecordSuppression other = (com.google.privacy.dlp.v2.RecordSuppression) obj; - - if (hasCondition() != other.hasCondition()) return false; - if (hasCondition()) { - if (!getCondition() - .equals(other.getCondition())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCondition()) { - hash = (37 * hash) + CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getCondition().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordSuppression parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RecordSuppression prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Configuration to suppress records whose suppression conditions evaluate to
-   * true.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordSuppression} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordSuppression) - com.google.privacy.dlp.v2.RecordSuppressionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordSuppression.class, com.google.privacy.dlp.v2.RecordSuppression.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RecordSuppression.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (conditionBuilder_ == null) { - condition_ = null; - } else { - condition_ = null; - conditionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordSuppression getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordSuppression build() { - com.google.privacy.dlp.v2.RecordSuppression result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordSuppression buildPartial() { - com.google.privacy.dlp.v2.RecordSuppression result = new com.google.privacy.dlp.v2.RecordSuppression(this); - if (conditionBuilder_ == null) { - result.condition_ = condition_; - } else { - result.condition_ = conditionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RecordSuppression) { - return mergeFrom((com.google.privacy.dlp.v2.RecordSuppression)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RecordSuppression other) { - if (other == com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance()) return this; - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RecordSuppression parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RecordSuppression) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.RecordCondition condition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder> conditionBuilder_; - /** - *
-     * A condition that when it evaluates to true will result in the record being
-     * evaluated to be suppressed from the transformed content.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - * @return Whether the condition field is set. - */ - public boolean hasCondition() { - return conditionBuilder_ != null || condition_ != null; - } - /** - *
-     * A condition that when it evaluates to true will result in the record being
-     * evaluated to be suppressed from the transformed content.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - * @return The condition. - */ - public com.google.privacy.dlp.v2.RecordCondition getCondition() { - if (conditionBuilder_ == null) { - return condition_ == null ? com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; - } else { - return conditionBuilder_.getMessage(); - } - } - /** - *
-     * A condition that when it evaluates to true will result in the record being
-     * evaluated to be suppressed from the transformed content.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - */ - public Builder setCondition(com.google.privacy.dlp.v2.RecordCondition value) { - if (conditionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - condition_ = value; - onChanged(); - } else { - conditionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A condition that when it evaluates to true will result in the record being
-     * evaluated to be suppressed from the transformed content.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - */ - public Builder setCondition( - com.google.privacy.dlp.v2.RecordCondition.Builder builderForValue) { - if (conditionBuilder_ == null) { - condition_ = builderForValue.build(); - onChanged(); - } else { - conditionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A condition that when it evaluates to true will result in the record being
-     * evaluated to be suppressed from the transformed content.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - */ - public Builder mergeCondition(com.google.privacy.dlp.v2.RecordCondition value) { - if (conditionBuilder_ == null) { - if (condition_ != null) { - condition_ = - com.google.privacy.dlp.v2.RecordCondition.newBuilder(condition_).mergeFrom(value).buildPartial(); - } else { - condition_ = value; - } - onChanged(); - } else { - conditionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A condition that when it evaluates to true will result in the record being
-     * evaluated to be suppressed from the transformed content.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - */ - public Builder clearCondition() { - if (conditionBuilder_ == null) { - condition_ = null; - onChanged(); - } else { - condition_ = null; - conditionBuilder_ = null; - } - - return this; - } - /** - *
-     * A condition that when it evaluates to true will result in the record being
-     * evaluated to be suppressed from the transformed content.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - */ - public com.google.privacy.dlp.v2.RecordCondition.Builder getConditionBuilder() { - - onChanged(); - return getConditionFieldBuilder().getBuilder(); - } - /** - *
-     * A condition that when it evaluates to true will result in the record being
-     * evaluated to be suppressed from the transformed content.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - */ - public com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder() { - if (conditionBuilder_ != null) { - return conditionBuilder_.getMessageOrBuilder(); - } else { - return condition_ == null ? - com.google.privacy.dlp.v2.RecordCondition.getDefaultInstance() : condition_; - } - } - /** - *
-     * A condition that when it evaluates to true will result in the record being
-     * evaluated to be suppressed from the transformed content.
-     * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder> - getConditionFieldBuilder() { - if (conditionBuilder_ == null) { - conditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordCondition, com.google.privacy.dlp.v2.RecordCondition.Builder, com.google.privacy.dlp.v2.RecordConditionOrBuilder>( - getCondition(), - getParentForChildren(), - isClean()); - condition_ = null; - } - return conditionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordSuppression) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordSuppression) - private static final com.google.privacy.dlp.v2.RecordSuppression DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordSuppression(); - } - - public static com.google.privacy.dlp.v2.RecordSuppression getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RecordSuppression parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RecordSuppression(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordSuppression getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppressionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppressionOrBuilder.java deleted file mode 100644 index 70c511b76c5a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordSuppressionOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface RecordSuppressionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordSuppression) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A condition that when it evaluates to true will result in the record being
-   * evaluated to be suppressed from the transformed content.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - * @return Whether the condition field is set. - */ - boolean hasCondition(); - /** - *
-   * A condition that when it evaluates to true will result in the record being
-   * evaluated to be suppressed from the transformed content.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - * @return The condition. - */ - com.google.privacy.dlp.v2.RecordCondition getCondition(); - /** - *
-   * A condition that when it evaluates to true will result in the record being
-   * evaluated to be suppressed from the transformed content.
-   * 
- * - * .google.privacy.dlp.v2.RecordCondition condition = 1; - */ - com.google.privacy.dlp.v2.RecordConditionOrBuilder getConditionOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformations.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformations.java deleted file mode 100644 index 593d41c452c7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformations.java +++ /dev/null @@ -1,1337 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A type of transformation that is applied over structured data such as a
- * table.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordTransformations} - */ -public final class RecordTransformations extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RecordTransformations) - RecordTransformationsOrBuilder { -private static final long serialVersionUID = 0L; - // Use RecordTransformations.newBuilder() to construct. - private RecordTransformations(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RecordTransformations() { - fieldTransformations_ = java.util.Collections.emptyList(); - recordSuppressions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RecordTransformations(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RecordTransformations( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fieldTransformations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fieldTransformations_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldTransformation.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - recordSuppressions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - recordSuppressions_.add( - input.readMessage(com.google.privacy.dlp.v2.RecordSuppression.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fieldTransformations_ = java.util.Collections.unmodifiableList(fieldTransformations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - recordSuppressions_ = java.util.Collections.unmodifiableList(recordSuppressions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordTransformations.class, com.google.privacy.dlp.v2.RecordTransformations.Builder.class); - } - - public static final int FIELD_TRANSFORMATIONS_FIELD_NUMBER = 1; - private java.util.List fieldTransformations_; - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - @java.lang.Override - public java.util.List getFieldTransformationsList() { - return fieldTransformations_; - } - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - @java.lang.Override - public java.util.List - getFieldTransformationsOrBuilderList() { - return fieldTransformations_; - } - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - @java.lang.Override - public int getFieldTransformationsCount() { - return fieldTransformations_.size(); - } - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index) { - return fieldTransformations_.get(index); - } - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( - int index) { - return fieldTransformations_.get(index); - } - - public static final int RECORD_SUPPRESSIONS_FIELD_NUMBER = 2; - private java.util.List recordSuppressions_; - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - @java.lang.Override - public java.util.List getRecordSuppressionsList() { - return recordSuppressions_; - } - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - @java.lang.Override - public java.util.List - getRecordSuppressionsOrBuilderList() { - return recordSuppressions_; - } - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - @java.lang.Override - public int getRecordSuppressionsCount() { - return recordSuppressions_.size(); - } - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordSuppression getRecordSuppressions(int index) { - return recordSuppressions_.get(index); - } - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressionsOrBuilder( - int index) { - return recordSuppressions_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < fieldTransformations_.size(); i++) { - output.writeMessage(1, fieldTransformations_.get(i)); - } - for (int i = 0; i < recordSuppressions_.size(); i++) { - output.writeMessage(2, recordSuppressions_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < fieldTransformations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, fieldTransformations_.get(i)); - } - for (int i = 0; i < recordSuppressions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, recordSuppressions_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RecordTransformations)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RecordTransformations other = (com.google.privacy.dlp.v2.RecordTransformations) obj; - - if (!getFieldTransformationsList() - .equals(other.getFieldTransformationsList())) return false; - if (!getRecordSuppressionsList() - .equals(other.getRecordSuppressionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFieldTransformationsCount() > 0) { - hash = (37 * hash) + FIELD_TRANSFORMATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFieldTransformationsList().hashCode(); - } - if (getRecordSuppressionsCount() > 0) { - hash = (37 * hash) + RECORD_SUPPRESSIONS_FIELD_NUMBER; - hash = (53 * hash) + getRecordSuppressionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RecordTransformations parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RecordTransformations prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A type of transformation that is applied over structured data such as a
-   * table.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RecordTransformations} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RecordTransformations) - com.google.privacy.dlp.v2.RecordTransformationsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RecordTransformations.class, com.google.privacy.dlp.v2.RecordTransformations.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RecordTransformations.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFieldTransformationsFieldBuilder(); - getRecordSuppressionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldTransformationsBuilder_ == null) { - fieldTransformations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldTransformationsBuilder_.clear(); - } - if (recordSuppressionsBuilder_ == null) { - recordSuppressions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - recordSuppressionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformations getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformations build() { - com.google.privacy.dlp.v2.RecordTransformations result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformations buildPartial() { - com.google.privacy.dlp.v2.RecordTransformations result = new com.google.privacy.dlp.v2.RecordTransformations(this); - int from_bitField0_ = bitField0_; - if (fieldTransformationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fieldTransformations_ = java.util.Collections.unmodifiableList(fieldTransformations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fieldTransformations_ = fieldTransformations_; - } else { - result.fieldTransformations_ = fieldTransformationsBuilder_.build(); - } - if (recordSuppressionsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - recordSuppressions_ = java.util.Collections.unmodifiableList(recordSuppressions_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.recordSuppressions_ = recordSuppressions_; - } else { - result.recordSuppressions_ = recordSuppressionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RecordTransformations) { - return mergeFrom((com.google.privacy.dlp.v2.RecordTransformations)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RecordTransformations other) { - if (other == com.google.privacy.dlp.v2.RecordTransformations.getDefaultInstance()) return this; - if (fieldTransformationsBuilder_ == null) { - if (!other.fieldTransformations_.isEmpty()) { - if (fieldTransformations_.isEmpty()) { - fieldTransformations_ = other.fieldTransformations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.addAll(other.fieldTransformations_); - } - onChanged(); - } - } else { - if (!other.fieldTransformations_.isEmpty()) { - if (fieldTransformationsBuilder_.isEmpty()) { - fieldTransformationsBuilder_.dispose(); - fieldTransformationsBuilder_ = null; - fieldTransformations_ = other.fieldTransformations_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldTransformationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFieldTransformationsFieldBuilder() : null; - } else { - fieldTransformationsBuilder_.addAllMessages(other.fieldTransformations_); - } - } - } - if (recordSuppressionsBuilder_ == null) { - if (!other.recordSuppressions_.isEmpty()) { - if (recordSuppressions_.isEmpty()) { - recordSuppressions_ = other.recordSuppressions_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRecordSuppressionsIsMutable(); - recordSuppressions_.addAll(other.recordSuppressions_); - } - onChanged(); - } - } else { - if (!other.recordSuppressions_.isEmpty()) { - if (recordSuppressionsBuilder_.isEmpty()) { - recordSuppressionsBuilder_.dispose(); - recordSuppressionsBuilder_ = null; - recordSuppressions_ = other.recordSuppressions_; - bitField0_ = (bitField0_ & ~0x00000002); - recordSuppressionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRecordSuppressionsFieldBuilder() : null; - } else { - recordSuppressionsBuilder_.addAllMessages(other.recordSuppressions_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RecordTransformations parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RecordTransformations) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List fieldTransformations_ = - java.util.Collections.emptyList(); - private void ensureFieldTransformationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fieldTransformations_ = new java.util.ArrayList(fieldTransformations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder> fieldTransformationsBuilder_; - - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public java.util.List getFieldTransformationsList() { - if (fieldTransformationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fieldTransformations_); - } else { - return fieldTransformationsBuilder_.getMessageList(); - } - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public int getFieldTransformationsCount() { - if (fieldTransformationsBuilder_ == null) { - return fieldTransformations_.size(); - } else { - return fieldTransformationsBuilder_.getCount(); - } - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index) { - if (fieldTransformationsBuilder_ == null) { - return fieldTransformations_.get(index); - } else { - return fieldTransformationsBuilder_.getMessage(index); - } - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public Builder setFieldTransformations( - int index, com.google.privacy.dlp.v2.FieldTransformation value) { - if (fieldTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldTransformationsIsMutable(); - fieldTransformations_.set(index, value); - onChanged(); - } else { - fieldTransformationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public Builder setFieldTransformations( - int index, com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldTransformationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public Builder addFieldTransformations(com.google.privacy.dlp.v2.FieldTransformation value) { - if (fieldTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldTransformationsIsMutable(); - fieldTransformations_.add(value); - onChanged(); - } else { - fieldTransformationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public Builder addFieldTransformations( - int index, com.google.privacy.dlp.v2.FieldTransformation value) { - if (fieldTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldTransformationsIsMutable(); - fieldTransformations_.add(index, value); - onChanged(); - } else { - fieldTransformationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public Builder addFieldTransformations( - com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.add(builderForValue.build()); - onChanged(); - } else { - fieldTransformationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public Builder addFieldTransformations( - int index, com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldTransformationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public Builder addAllFieldTransformations( - java.lang.Iterable values) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fieldTransformations_); - onChanged(); - } else { - fieldTransformationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public Builder clearFieldTransformations() { - if (fieldTransformationsBuilder_ == null) { - fieldTransformations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldTransformationsBuilder_.clear(); - } - return this; - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public Builder removeFieldTransformations(int index) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.remove(index); - onChanged(); - } else { - fieldTransformationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public com.google.privacy.dlp.v2.FieldTransformation.Builder getFieldTransformationsBuilder( - int index) { - return getFieldTransformationsFieldBuilder().getBuilder(index); - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( - int index) { - if (fieldTransformationsBuilder_ == null) { - return fieldTransformations_.get(index); } else { - return fieldTransformationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public java.util.List - getFieldTransformationsOrBuilderList() { - if (fieldTransformationsBuilder_ != null) { - return fieldTransformationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fieldTransformations_); - } - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public com.google.privacy.dlp.v2.FieldTransformation.Builder addFieldTransformationsBuilder() { - return getFieldTransformationsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()); - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public com.google.privacy.dlp.v2.FieldTransformation.Builder addFieldTransformationsBuilder( - int index) { - return getFieldTransformationsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()); - } - /** - *
-     * Transform the record by applying various field transformations.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - public java.util.List - getFieldTransformationsBuilderList() { - return getFieldTransformationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder> - getFieldTransformationsFieldBuilder() { - if (fieldTransformationsBuilder_ == null) { - fieldTransformationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder>( - fieldTransformations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fieldTransformations_ = null; - } - return fieldTransformationsBuilder_; - } - - private java.util.List recordSuppressions_ = - java.util.Collections.emptyList(); - private void ensureRecordSuppressionsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - recordSuppressions_ = new java.util.ArrayList(recordSuppressions_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder> recordSuppressionsBuilder_; - - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public java.util.List getRecordSuppressionsList() { - if (recordSuppressionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(recordSuppressions_); - } else { - return recordSuppressionsBuilder_.getMessageList(); - } - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public int getRecordSuppressionsCount() { - if (recordSuppressionsBuilder_ == null) { - return recordSuppressions_.size(); - } else { - return recordSuppressionsBuilder_.getCount(); - } - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public com.google.privacy.dlp.v2.RecordSuppression getRecordSuppressions(int index) { - if (recordSuppressionsBuilder_ == null) { - return recordSuppressions_.get(index); - } else { - return recordSuppressionsBuilder_.getMessage(index); - } - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public Builder setRecordSuppressions( - int index, com.google.privacy.dlp.v2.RecordSuppression value) { - if (recordSuppressionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordSuppressionsIsMutable(); - recordSuppressions_.set(index, value); - onChanged(); - } else { - recordSuppressionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public Builder setRecordSuppressions( - int index, com.google.privacy.dlp.v2.RecordSuppression.Builder builderForValue) { - if (recordSuppressionsBuilder_ == null) { - ensureRecordSuppressionsIsMutable(); - recordSuppressions_.set(index, builderForValue.build()); - onChanged(); - } else { - recordSuppressionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public Builder addRecordSuppressions(com.google.privacy.dlp.v2.RecordSuppression value) { - if (recordSuppressionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordSuppressionsIsMutable(); - recordSuppressions_.add(value); - onChanged(); - } else { - recordSuppressionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public Builder addRecordSuppressions( - int index, com.google.privacy.dlp.v2.RecordSuppression value) { - if (recordSuppressionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordSuppressionsIsMutable(); - recordSuppressions_.add(index, value); - onChanged(); - } else { - recordSuppressionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public Builder addRecordSuppressions( - com.google.privacy.dlp.v2.RecordSuppression.Builder builderForValue) { - if (recordSuppressionsBuilder_ == null) { - ensureRecordSuppressionsIsMutable(); - recordSuppressions_.add(builderForValue.build()); - onChanged(); - } else { - recordSuppressionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public Builder addRecordSuppressions( - int index, com.google.privacy.dlp.v2.RecordSuppression.Builder builderForValue) { - if (recordSuppressionsBuilder_ == null) { - ensureRecordSuppressionsIsMutable(); - recordSuppressions_.add(index, builderForValue.build()); - onChanged(); - } else { - recordSuppressionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public Builder addAllRecordSuppressions( - java.lang.Iterable values) { - if (recordSuppressionsBuilder_ == null) { - ensureRecordSuppressionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, recordSuppressions_); - onChanged(); - } else { - recordSuppressionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public Builder clearRecordSuppressions() { - if (recordSuppressionsBuilder_ == null) { - recordSuppressions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - recordSuppressionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public Builder removeRecordSuppressions(int index) { - if (recordSuppressionsBuilder_ == null) { - ensureRecordSuppressionsIsMutable(); - recordSuppressions_.remove(index); - onChanged(); - } else { - recordSuppressionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public com.google.privacy.dlp.v2.RecordSuppression.Builder getRecordSuppressionsBuilder( - int index) { - return getRecordSuppressionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressionsOrBuilder( - int index) { - if (recordSuppressionsBuilder_ == null) { - return recordSuppressions_.get(index); } else { - return recordSuppressionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public java.util.List - getRecordSuppressionsOrBuilderList() { - if (recordSuppressionsBuilder_ != null) { - return recordSuppressionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(recordSuppressions_); - } - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public com.google.privacy.dlp.v2.RecordSuppression.Builder addRecordSuppressionsBuilder() { - return getRecordSuppressionsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance()); - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public com.google.privacy.dlp.v2.RecordSuppression.Builder addRecordSuppressionsBuilder( - int index) { - return getRecordSuppressionsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance()); - } - /** - *
-     * Configuration defining which records get suppressed entirely. Records that
-     * match any suppression rule are omitted from the output.
-     * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - public java.util.List - getRecordSuppressionsBuilderList() { - return getRecordSuppressionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder> - getRecordSuppressionsFieldBuilder() { - if (recordSuppressionsBuilder_ == null) { - recordSuppressionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder>( - recordSuppressions_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - recordSuppressions_ = null; - } - return recordSuppressionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RecordTransformations) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RecordTransformations) - private static final com.google.privacy.dlp.v2.RecordTransformations DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RecordTransformations(); - } - - public static com.google.privacy.dlp.v2.RecordTransformations getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RecordTransformations parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RecordTransformations(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RecordTransformations getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationsOrBuilder.java deleted file mode 100644 index a6934a379fce..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RecordTransformationsOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface RecordTransformationsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RecordTransformations) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - java.util.List - getFieldTransformationsList(); - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index); - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - int getFieldTransformationsCount(); - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - java.util.List - getFieldTransformationsOrBuilderList(); - /** - *
-   * Transform the record by applying various field transformations.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 1; - */ - com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( - int index); - - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - java.util.List - getRecordSuppressionsList(); - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - com.google.privacy.dlp.v2.RecordSuppression getRecordSuppressions(int index); - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - int getRecordSuppressionsCount(); - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - java.util.List - getRecordSuppressionsOrBuilderList(); - /** - *
-   * Configuration defining which records get suppressed entirely. Records that
-   * match any suppression rule are omitted from the output.
-   * 
- * - * repeated .google.privacy.dlp.v2.RecordSuppression record_suppressions = 2; - */ - com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressionsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfig.java deleted file mode 100644 index 69e2e888f511..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfig.java +++ /dev/null @@ -1,433 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Redact a given value. For example, if used with an `InfoTypeTransformation`
- * transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the
- * output would be 'My phone number is '.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RedactConfig} - */ -public final class RedactConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactConfig) - RedactConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use RedactConfig.newBuilder() to construct. - private RedactConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RedactConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RedactConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RedactConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RedactConfig.class, com.google.privacy.dlp.v2.RedactConfig.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RedactConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RedactConfig other = (com.google.privacy.dlp.v2.RedactConfig) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RedactConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RedactConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Redact a given value. For example, if used with an `InfoTypeTransformation`
-   * transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the
-   * output would be 'My phone number is '.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RedactConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactConfig) - com.google.privacy.dlp.v2.RedactConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RedactConfig.class, com.google.privacy.dlp.v2.RedactConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RedactConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactConfig build() { - com.google.privacy.dlp.v2.RedactConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactConfig buildPartial() { - com.google.privacy.dlp.v2.RedactConfig result = new com.google.privacy.dlp.v2.RedactConfig(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RedactConfig) { - return mergeFrom((com.google.privacy.dlp.v2.RedactConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RedactConfig other) { - if (other == com.google.privacy.dlp.v2.RedactConfig.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RedactConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RedactConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactConfig) - private static final com.google.privacy.dlp.v2.RedactConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactConfig(); - } - - public static com.google.privacy.dlp.v2.RedactConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RedactConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RedactConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfigOrBuilder.java deleted file mode 100644 index 5bbd13c06ac8..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactConfigOrBuilder.java +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface RedactConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactConfig) - com.google.protobuf.MessageOrBuilder { -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java deleted file mode 100644 index 54c3f7a559d9..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java +++ /dev/null @@ -1,3097 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request to search for potentially sensitive info in an image and redact it
- * by covering it with a colored rectangle.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest} - */ -public final class RedactImageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageRequest) - RedactImageRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use RedactImageRequest.newBuilder() to construct. - private RedactImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RedactImageRequest() { - parent_ = ""; - locationId_ = ""; - imageRedactionConfigs_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RedactImageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RedactImageRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; - if (inspectConfig_ != null) { - subBuilder = inspectConfig_.toBuilder(); - } - inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectConfig_); - inspectConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - imageRedactionConfigs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - imageRedactionConfigs_.add( - input.readMessage(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.parser(), extensionRegistry)); - break; - } - case 48: { - - includeFindings_ = input.readBool(); - break; - } - case 58: { - com.google.privacy.dlp.v2.ByteContentItem.Builder subBuilder = null; - if (byteItem_ != null) { - subBuilder = byteItem_.toBuilder(); - } - byteItem_ = input.readMessage(com.google.privacy.dlp.v2.ByteContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(byteItem_); - byteItem_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - imageRedactionConfigs_ = java.util.Collections.unmodifiableList(imageRedactionConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RedactImageRequest.class, com.google.privacy.dlp.v2.RedactImageRequest.Builder.class); - } - - public interface ImageRedactionConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Only one per info_type should be provided per request. If not
-     * specified, and redact_all_text is false, the DLP API will redact all
-     * text that it matches against all info_types that are found, but not
-     * specified in another ImageRedactionConfig.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-     * Only one per info_type should be provided per request. If not
-     * specified, and redact_all_text is false, the DLP API will redact all
-     * text that it matches against all info_types that are found, but not
-     * specified in another ImageRedactionConfig.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-     * Only one per info_type should be provided per request. If not
-     * specified, and redact_all_text is false, the DLP API will redact all
-     * text that it matches against all info_types that are found, but not
-     * specified in another ImageRedactionConfig.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-     * If true, all text found in the image, regardless whether it matches an
-     * info_type, is redacted. Only one should be provided.
-     * 
- * - * bool redact_all_text = 2; - * @return Whether the redactAllText field is set. - */ - boolean hasRedactAllText(); - /** - *
-     * If true, all text found in the image, regardless whether it matches an
-     * info_type, is redacted. Only one should be provided.
-     * 
- * - * bool redact_all_text = 2; - * @return The redactAllText. - */ - boolean getRedactAllText(); - - /** - *
-     * The color to use when redacting content from an image. If not specified,
-     * the default is black.
-     * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - * @return Whether the redactionColor field is set. - */ - boolean hasRedactionColor(); - /** - *
-     * The color to use when redacting content from an image. If not specified,
-     * the default is black.
-     * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - * @return The redactionColor. - */ - com.google.privacy.dlp.v2.Color getRedactionColor(); - /** - *
-     * The color to use when redacting content from an image. If not specified,
-     * the default is black.
-     * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - */ - com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder(); - - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.TargetCase getTargetCase(); - } - /** - *
-   * Configuration for determining how redaction of images should occur.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig} - */ - public static final class ImageRedactionConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) - ImageRedactionConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageRedactionConfig.newBuilder() to construct. - private ImageRedactionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ImageRedactionConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ImageRedactionConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ImageRedactionConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (targetCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.InfoType) target_).toBuilder(); - } - target_ = - input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoType) target_); - target_ = subBuilder.buildPartial(); - } - targetCase_ = 1; - break; - } - case 16: { - target_ = input.readBool(); - targetCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.Color.Builder subBuilder = null; - if (redactionColor_ != null) { - subBuilder = redactionColor_.toBuilder(); - } - redactionColor_ = input.readMessage(com.google.privacy.dlp.v2.Color.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(redactionColor_); - redactionColor_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.class, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder.class); - } - - private int targetCase_ = 0; - private java.lang.Object target_; - public enum TargetCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INFO_TYPE(1), - REDACT_ALL_TEXT(2), - TARGET_NOT_SET(0); - private final int value; - private TargetCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TargetCase valueOf(int value) { - return forNumber(value); - } - - public static TargetCase forNumber(int value) { - switch (value) { - case 1: return INFO_TYPE; - case 2: return REDACT_ALL_TEXT; - case 0: return TARGET_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TargetCase - getTargetCase() { - return TargetCase.forNumber( - targetCase_); - } - - public static final int INFO_TYPE_FIELD_NUMBER = 1; - /** - *
-     * Only one per info_type should be provided per request. If not
-     * specified, and redact_all_text is false, the DLP API will redact all
-     * text that it matches against all info_types that are found, but not
-     * specified in another ImageRedactionConfig.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return targetCase_ == 1; - } - /** - *
-     * Only one per info_type should be provided per request. If not
-     * specified, and redact_all_text is false, the DLP API will redact all
-     * text that it matches against all info_types that are found, but not
-     * specified in another ImageRedactionConfig.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (targetCase_ == 1) { - return (com.google.privacy.dlp.v2.InfoType) target_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - /** - *
-     * Only one per info_type should be provided per request. If not
-     * specified, and redact_all_text is false, the DLP API will redact all
-     * text that it matches against all info_types that are found, but not
-     * specified in another ImageRedactionConfig.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (targetCase_ == 1) { - return (com.google.privacy.dlp.v2.InfoType) target_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - - public static final int REDACT_ALL_TEXT_FIELD_NUMBER = 2; - /** - *
-     * If true, all text found in the image, regardless whether it matches an
-     * info_type, is redacted. Only one should be provided.
-     * 
- * - * bool redact_all_text = 2; - * @return Whether the redactAllText field is set. - */ - @java.lang.Override - public boolean hasRedactAllText() { - return targetCase_ == 2; - } - /** - *
-     * If true, all text found in the image, regardless whether it matches an
-     * info_type, is redacted. Only one should be provided.
-     * 
- * - * bool redact_all_text = 2; - * @return The redactAllText. - */ - @java.lang.Override - public boolean getRedactAllText() { - if (targetCase_ == 2) { - return (java.lang.Boolean) target_; - } - return false; - } - - public static final int REDACTION_COLOR_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.Color redactionColor_; - /** - *
-     * The color to use when redacting content from an image. If not specified,
-     * the default is black.
-     * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - * @return Whether the redactionColor field is set. - */ - @java.lang.Override - public boolean hasRedactionColor() { - return redactionColor_ != null; - } - /** - *
-     * The color to use when redacting content from an image. If not specified,
-     * the default is black.
-     * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - * @return The redactionColor. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Color getRedactionColor() { - return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; - } - /** - *
-     * The color to use when redacting content from an image. If not specified,
-     * the default is black.
-     * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() { - return getRedactionColor(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (targetCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.InfoType) target_); - } - if (targetCase_ == 2) { - output.writeBool( - 2, (boolean)((java.lang.Boolean) target_)); - } - if (redactionColor_ != null) { - output.writeMessage(3, getRedactionColor()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (targetCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.InfoType) target_); - } - if (targetCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 2, (boolean)((java.lang.Boolean) target_)); - } - if (redactionColor_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getRedactionColor()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig other = (com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) obj; - - if (hasRedactionColor() != other.hasRedactionColor()) return false; - if (hasRedactionColor()) { - if (!getRedactionColor() - .equals(other.getRedactionColor())) return false; - } - if (!getTargetCase().equals(other.getTargetCase())) return false; - switch (targetCase_) { - case 1: - if (!getInfoType() - .equals(other.getInfoType())) return false; - break; - case 2: - if (getRedactAllText() - != other.getRedactAllText()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasRedactionColor()) { - hash = (37 * hash) + REDACTION_COLOR_FIELD_NUMBER; - hash = (53 * hash) + getRedactionColor().hashCode(); - } - switch (targetCase_) { - case 1: - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - break; - case 2: - hash = (37 * hash) + REDACT_ALL_TEXT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getRedactAllText()); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Configuration for determining how redaction of images should occur.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.class, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (redactionColorBuilder_ == null) { - redactionColor_ = null; - } else { - redactionColor_ = null; - redactionColorBuilder_ = null; - } - targetCase_ = 0; - target_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig build() { - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig buildPartial() { - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig result = new com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig(this); - if (targetCase_ == 1) { - if (infoTypeBuilder_ == null) { - result.target_ = target_; - } else { - result.target_ = infoTypeBuilder_.build(); - } - } - if (targetCase_ == 2) { - result.target_ = target_; - } - if (redactionColorBuilder_ == null) { - result.redactionColor_ = redactionColor_; - } else { - result.redactionColor_ = redactionColorBuilder_.build(); - } - result.targetCase_ = targetCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) { - return mergeFrom((com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig other) { - if (other == com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance()) return this; - if (other.hasRedactionColor()) { - mergeRedactionColor(other.getRedactionColor()); - } - switch (other.getTargetCase()) { - case INFO_TYPE: { - mergeInfoType(other.getInfoType()); - break; - } - case REDACT_ALL_TEXT: { - setRedactAllText(other.getRedactAllText()); - break; - } - case TARGET_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int targetCase_ = 0; - private java.lang.Object target_; - public TargetCase - getTargetCase() { - return TargetCase.forNumber( - targetCase_); - } - - public Builder clearTarget() { - targetCase_ = 0; - target_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-       * Only one per info_type should be provided per request. If not
-       * specified, and redact_all_text is false, the DLP API will redact all
-       * text that it matches against all info_types that are found, but not
-       * specified in another ImageRedactionConfig.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return targetCase_ == 1; - } - /** - *
-       * Only one per info_type should be provided per request. If not
-       * specified, and redact_all_text is false, the DLP API will redact all
-       * text that it matches against all info_types that are found, but not
-       * specified in another ImageRedactionConfig.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - if (targetCase_ == 1) { - return (com.google.privacy.dlp.v2.InfoType) target_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } else { - if (targetCase_ == 1) { - return infoTypeBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - } - /** - *
-       * Only one per info_type should be provided per request. If not
-       * specified, and redact_all_text is false, the DLP API will redact all
-       * text that it matches against all info_types that are found, but not
-       * specified in another ImageRedactionConfig.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - target_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - targetCase_ = 1; - return this; - } - /** - *
-       * Only one per info_type should be provided per request. If not
-       * specified, and redact_all_text is false, the DLP API will redact all
-       * text that it matches against all info_types that are found, but not
-       * specified in another ImageRedactionConfig.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - target_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - targetCase_ = 1; - return this; - } - /** - *
-       * Only one per info_type should be provided per request. If not
-       * specified, and redact_all_text is false, the DLP API will redact all
-       * text that it matches against all info_types that are found, but not
-       * specified in another ImageRedactionConfig.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (targetCase_ == 1 && - target_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) { - target_ = com.google.privacy.dlp.v2.InfoType.newBuilder((com.google.privacy.dlp.v2.InfoType) target_) - .mergeFrom(value).buildPartial(); - } else { - target_ = value; - } - onChanged(); - } else { - if (targetCase_ == 1) { - infoTypeBuilder_.mergeFrom(value); - } else { - infoTypeBuilder_.setMessage(value); - } - } - targetCase_ = 1; - return this; - } - /** - *
-       * Only one per info_type should be provided per request. If not
-       * specified, and redact_all_text is false, the DLP API will redact all
-       * text that it matches against all info_types that are found, but not
-       * specified in another ImageRedactionConfig.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - if (targetCase_ == 1) { - targetCase_ = 0; - target_ = null; - onChanged(); - } - } else { - if (targetCase_ == 1) { - targetCase_ = 0; - target_ = null; - } - infoTypeBuilder_.clear(); - } - return this; - } - /** - *
-       * Only one per info_type should be provided per request. If not
-       * specified, and redact_all_text is false, the DLP API will redact all
-       * text that it matches against all info_types that are found, but not
-       * specified in another ImageRedactionConfig.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-       * Only one per info_type should be provided per request. If not
-       * specified, and redact_all_text is false, the DLP API will redact all
-       * text that it matches against all info_types that are found, but not
-       * specified in another ImageRedactionConfig.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if ((targetCase_ == 1) && (infoTypeBuilder_ != null)) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - if (targetCase_ == 1) { - return (com.google.privacy.dlp.v2.InfoType) target_; - } - return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - } - /** - *
-       * Only one per info_type should be provided per request. If not
-       * specified, and redact_all_text is false, the DLP API will redact all
-       * text that it matches against all info_types that are found, but not
-       * specified in another ImageRedactionConfig.
-       * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - if (!(targetCase_ == 1)) { - target_ = com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); - } - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - (com.google.privacy.dlp.v2.InfoType) target_, - getParentForChildren(), - isClean()); - target_ = null; - } - targetCase_ = 1; - onChanged();; - return infoTypeBuilder_; - } - - /** - *
-       * If true, all text found in the image, regardless whether it matches an
-       * info_type, is redacted. Only one should be provided.
-       * 
- * - * bool redact_all_text = 2; - * @return Whether the redactAllText field is set. - */ - public boolean hasRedactAllText() { - return targetCase_ == 2; - } - /** - *
-       * If true, all text found in the image, regardless whether it matches an
-       * info_type, is redacted. Only one should be provided.
-       * 
- * - * bool redact_all_text = 2; - * @return The redactAllText. - */ - public boolean getRedactAllText() { - if (targetCase_ == 2) { - return (java.lang.Boolean) target_; - } - return false; - } - /** - *
-       * If true, all text found in the image, regardless whether it matches an
-       * info_type, is redacted. Only one should be provided.
-       * 
- * - * bool redact_all_text = 2; - * @param value The redactAllText to set. - * @return This builder for chaining. - */ - public Builder setRedactAllText(boolean value) { - targetCase_ = 2; - target_ = value; - onChanged(); - return this; - } - /** - *
-       * If true, all text found in the image, regardless whether it matches an
-       * info_type, is redacted. Only one should be provided.
-       * 
- * - * bool redact_all_text = 2; - * @return This builder for chaining. - */ - public Builder clearRedactAllText() { - if (targetCase_ == 2) { - targetCase_ = 0; - target_ = null; - onChanged(); - } - return this; - } - - private com.google.privacy.dlp.v2.Color redactionColor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> redactionColorBuilder_; - /** - *
-       * The color to use when redacting content from an image. If not specified,
-       * the default is black.
-       * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - * @return Whether the redactionColor field is set. - */ - public boolean hasRedactionColor() { - return redactionColorBuilder_ != null || redactionColor_ != null; - } - /** - *
-       * The color to use when redacting content from an image. If not specified,
-       * the default is black.
-       * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - * @return The redactionColor. - */ - public com.google.privacy.dlp.v2.Color getRedactionColor() { - if (redactionColorBuilder_ == null) { - return redactionColor_ == null ? com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; - } else { - return redactionColorBuilder_.getMessage(); - } - } - /** - *
-       * The color to use when redacting content from an image. If not specified,
-       * the default is black.
-       * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - */ - public Builder setRedactionColor(com.google.privacy.dlp.v2.Color value) { - if (redactionColorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - redactionColor_ = value; - onChanged(); - } else { - redactionColorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The color to use when redacting content from an image. If not specified,
-       * the default is black.
-       * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - */ - public Builder setRedactionColor( - com.google.privacy.dlp.v2.Color.Builder builderForValue) { - if (redactionColorBuilder_ == null) { - redactionColor_ = builderForValue.build(); - onChanged(); - } else { - redactionColorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The color to use when redacting content from an image. If not specified,
-       * the default is black.
-       * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - */ - public Builder mergeRedactionColor(com.google.privacy.dlp.v2.Color value) { - if (redactionColorBuilder_ == null) { - if (redactionColor_ != null) { - redactionColor_ = - com.google.privacy.dlp.v2.Color.newBuilder(redactionColor_).mergeFrom(value).buildPartial(); - } else { - redactionColor_ = value; - } - onChanged(); - } else { - redactionColorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The color to use when redacting content from an image. If not specified,
-       * the default is black.
-       * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - */ - public Builder clearRedactionColor() { - if (redactionColorBuilder_ == null) { - redactionColor_ = null; - onChanged(); - } else { - redactionColor_ = null; - redactionColorBuilder_ = null; - } - - return this; - } - /** - *
-       * The color to use when redacting content from an image. If not specified,
-       * the default is black.
-       * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - */ - public com.google.privacy.dlp.v2.Color.Builder getRedactionColorBuilder() { - - onChanged(); - return getRedactionColorFieldBuilder().getBuilder(); - } - /** - *
-       * The color to use when redacting content from an image. If not specified,
-       * the default is black.
-       * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - */ - public com.google.privacy.dlp.v2.ColorOrBuilder getRedactionColorOrBuilder() { - if (redactionColorBuilder_ != null) { - return redactionColorBuilder_.getMessageOrBuilder(); - } else { - return redactionColor_ == null ? - com.google.privacy.dlp.v2.Color.getDefaultInstance() : redactionColor_; - } - } - /** - *
-       * The color to use when redacting content from an image. If not specified,
-       * the default is black.
-       * 
- * - * .google.privacy.dlp.v2.Color redaction_color = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder> - getRedactionColorFieldBuilder() { - if (redactionColorBuilder_ == null) { - redactionColorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Color, com.google.privacy.dlp.v2.Color.Builder, com.google.privacy.dlp.v2.ColorOrBuilder>( - getRedactionColor(), - getParentForChildren(), - isClean()); - redactionColor_ = null; - } - return redactionColorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) - private static final com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig(); - } - - public static com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageRedactionConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageRedactionConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 8; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 8; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 8; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSPECT_CONFIG_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - @java.lang.Override - public boolean hasInspectConfig() { - return inspectConfig_ != null; - } - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - return getInspectConfig(); - } - - public static final int IMAGE_REDACTION_CONFIGS_FIELD_NUMBER = 5; - private java.util.List imageRedactionConfigs_; - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - @java.lang.Override - public java.util.List getImageRedactionConfigsList() { - return imageRedactionConfigs_; - } - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - @java.lang.Override - public java.util.List - getImageRedactionConfigsOrBuilderList() { - return imageRedactionConfigs_; - } - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - @java.lang.Override - public int getImageRedactionConfigsCount() { - return imageRedactionConfigs_.size(); - } - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getImageRedactionConfigs(int index) { - return imageRedactionConfigs_.get(index); - } - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder getImageRedactionConfigsOrBuilder( - int index) { - return imageRedactionConfigs_.get(index); - } - - public static final int INCLUDE_FINDINGS_FIELD_NUMBER = 6; - private boolean includeFindings_; - /** - *
-   * Whether the response should include findings along with the redacted
-   * image.
-   * 
- * - * bool include_findings = 6; - * @return The includeFindings. - */ - @java.lang.Override - public boolean getIncludeFindings() { - return includeFindings_; - } - - public static final int BYTE_ITEM_FIELD_NUMBER = 7; - private com.google.privacy.dlp.v2.ByteContentItem byteItem_; - /** - *
-   * The content must be PNG, JPEG, SVG or BMP.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - * @return Whether the byteItem field is set. - */ - @java.lang.Override - public boolean hasByteItem() { - return byteItem_ != null; - } - /** - *
-   * The content must be PNG, JPEG, SVG or BMP.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - * @return The byteItem. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItem getByteItem() { - return byteItem_ == null ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance() : byteItem_; - } - /** - *
-   * The content must be PNG, JPEG, SVG or BMP.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() { - return getByteItem(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (inspectConfig_ != null) { - output.writeMessage(2, getInspectConfig()); - } - for (int i = 0; i < imageRedactionConfigs_.size(); i++) { - output.writeMessage(5, imageRedactionConfigs_.get(i)); - } - if (includeFindings_ != false) { - output.writeBool(6, includeFindings_); - } - if (byteItem_ != null) { - output.writeMessage(7, getByteItem()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (inspectConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInspectConfig()); - } - for (int i = 0; i < imageRedactionConfigs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, imageRedactionConfigs_.get(i)); - } - if (includeFindings_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, includeFindings_); - } - if (byteItem_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getByteItem()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RedactImageRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RedactImageRequest other = (com.google.privacy.dlp.v2.RedactImageRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (hasInspectConfig() != other.hasInspectConfig()) return false; - if (hasInspectConfig()) { - if (!getInspectConfig() - .equals(other.getInspectConfig())) return false; - } - if (!getImageRedactionConfigsList() - .equals(other.getImageRedactionConfigsList())) return false; - if (getIncludeFindings() - != other.getIncludeFindings()) return false; - if (hasByteItem() != other.hasByteItem()) return false; - if (hasByteItem()) { - if (!getByteItem() - .equals(other.getByteItem())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - if (hasInspectConfig()) { - hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInspectConfig().hashCode(); - } - if (getImageRedactionConfigsCount() > 0) { - hash = (37 * hash) + IMAGE_REDACTION_CONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getImageRedactionConfigsList().hashCode(); - } - hash = (37 * hash) + INCLUDE_FINDINGS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIncludeFindings()); - if (hasByteItem()) { - hash = (37 * hash) + BYTE_ITEM_FIELD_NUMBER; - hash = (53 * hash) + getByteItem().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactImageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RedactImageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to search for potentially sensitive info in an image and redact it
-   * by covering it with a colored rectangle.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageRequest) - com.google.privacy.dlp.v2.RedactImageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RedactImageRequest.class, com.google.privacy.dlp.v2.RedactImageRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RedactImageRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getImageRedactionConfigsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - locationId_ = ""; - - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - if (imageRedactionConfigsBuilder_ == null) { - imageRedactionConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - imageRedactionConfigsBuilder_.clear(); - } - includeFindings_ = false; - - if (byteItemBuilder_ == null) { - byteItem_ = null; - } else { - byteItem_ = null; - byteItemBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest build() { - com.google.privacy.dlp.v2.RedactImageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest buildPartial() { - com.google.privacy.dlp.v2.RedactImageRequest result = new com.google.privacy.dlp.v2.RedactImageRequest(this); - int from_bitField0_ = bitField0_; - result.parent_ = parent_; - result.locationId_ = locationId_; - if (inspectConfigBuilder_ == null) { - result.inspectConfig_ = inspectConfig_; - } else { - result.inspectConfig_ = inspectConfigBuilder_.build(); - } - if (imageRedactionConfigsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - imageRedactionConfigs_ = java.util.Collections.unmodifiableList(imageRedactionConfigs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.imageRedactionConfigs_ = imageRedactionConfigs_; - } else { - result.imageRedactionConfigs_ = imageRedactionConfigsBuilder_.build(); - } - result.includeFindings_ = includeFindings_; - if (byteItemBuilder_ == null) { - result.byteItem_ = byteItem_; - } else { - result.byteItem_ = byteItemBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RedactImageRequest) { - return mergeFrom((com.google.privacy.dlp.v2.RedactImageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageRequest other) { - if (other == com.google.privacy.dlp.v2.RedactImageRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - if (other.hasInspectConfig()) { - mergeInspectConfig(other.getInspectConfig()); - } - if (imageRedactionConfigsBuilder_ == null) { - if (!other.imageRedactionConfigs_.isEmpty()) { - if (imageRedactionConfigs_.isEmpty()) { - imageRedactionConfigs_ = other.imageRedactionConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureImageRedactionConfigsIsMutable(); - imageRedactionConfigs_.addAll(other.imageRedactionConfigs_); - } - onChanged(); - } - } else { - if (!other.imageRedactionConfigs_.isEmpty()) { - if (imageRedactionConfigsBuilder_.isEmpty()) { - imageRedactionConfigsBuilder_.dispose(); - imageRedactionConfigsBuilder_ = null; - imageRedactionConfigs_ = other.imageRedactionConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - imageRedactionConfigsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getImageRedactionConfigsFieldBuilder() : null; - } else { - imageRedactionConfigsBuilder_.addAllMessages(other.imageRedactionConfigs_); - } - } - } - if (other.getIncludeFindings() != false) { - setIncludeFindings(other.getIncludeFindings()); - } - if (other.hasByteItem()) { - mergeByteItem(other.getByteItem()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RedactImageRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RedactImageRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 8; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 8; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 8; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 8; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 8; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - public boolean hasInspectConfig() { - return inspectConfigBuilder_ != null || inspectConfig_ != null; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - if (inspectConfigBuilder_ == null) { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } else { - return inspectConfigBuilder_.getMessage(); - } - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectConfig_ = value; - onChanged(); - } else { - inspectConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder setInspectConfig( - com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = builderForValue.build(); - onChanged(); - } else { - inspectConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (inspectConfig_ != null) { - inspectConfig_ = - com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); - } else { - inspectConfig_ = value; - } - onChanged(); - } else { - inspectConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public Builder clearInspectConfig() { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - onChanged(); - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { - - onChanged(); - return getInspectConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - if (inspectConfigBuilder_ != null) { - return inspectConfigBuilder_.getMessageOrBuilder(); - } else { - return inspectConfig_ == null ? - com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> - getInspectConfigFieldBuilder() { - if (inspectConfigBuilder_ == null) { - inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( - getInspectConfig(), - getParentForChildren(), - isClean()); - inspectConfig_ = null; - } - return inspectConfigBuilder_; - } - - private java.util.List imageRedactionConfigs_ = - java.util.Collections.emptyList(); - private void ensureImageRedactionConfigsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - imageRedactionConfigs_ = new java.util.ArrayList(imageRedactionConfigs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder> imageRedactionConfigsBuilder_; - - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public java.util.List getImageRedactionConfigsList() { - if (imageRedactionConfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(imageRedactionConfigs_); - } else { - return imageRedactionConfigsBuilder_.getMessageList(); - } - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public int getImageRedactionConfigsCount() { - if (imageRedactionConfigsBuilder_ == null) { - return imageRedactionConfigs_.size(); - } else { - return imageRedactionConfigsBuilder_.getCount(); - } - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getImageRedactionConfigs(int index) { - if (imageRedactionConfigsBuilder_ == null) { - return imageRedactionConfigs_.get(index); - } else { - return imageRedactionConfigsBuilder_.getMessage(index); - } - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public Builder setImageRedactionConfigs( - int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) { - if (imageRedactionConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureImageRedactionConfigsIsMutable(); - imageRedactionConfigs_.set(index, value); - onChanged(); - } else { - imageRedactionConfigsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public Builder setImageRedactionConfigs( - int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) { - if (imageRedactionConfigsBuilder_ == null) { - ensureImageRedactionConfigsIsMutable(); - imageRedactionConfigs_.set(index, builderForValue.build()); - onChanged(); - } else { - imageRedactionConfigsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public Builder addImageRedactionConfigs(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) { - if (imageRedactionConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureImageRedactionConfigsIsMutable(); - imageRedactionConfigs_.add(value); - onChanged(); - } else { - imageRedactionConfigsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public Builder addImageRedactionConfigs( - int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig value) { - if (imageRedactionConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureImageRedactionConfigsIsMutable(); - imageRedactionConfigs_.add(index, value); - onChanged(); - } else { - imageRedactionConfigsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public Builder addImageRedactionConfigs( - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) { - if (imageRedactionConfigsBuilder_ == null) { - ensureImageRedactionConfigsIsMutable(); - imageRedactionConfigs_.add(builderForValue.build()); - onChanged(); - } else { - imageRedactionConfigsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public Builder addImageRedactionConfigs( - int index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder builderForValue) { - if (imageRedactionConfigsBuilder_ == null) { - ensureImageRedactionConfigsIsMutable(); - imageRedactionConfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - imageRedactionConfigsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public Builder addAllImageRedactionConfigs( - java.lang.Iterable values) { - if (imageRedactionConfigsBuilder_ == null) { - ensureImageRedactionConfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, imageRedactionConfigs_); - onChanged(); - } else { - imageRedactionConfigsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public Builder clearImageRedactionConfigs() { - if (imageRedactionConfigsBuilder_ == null) { - imageRedactionConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - imageRedactionConfigsBuilder_.clear(); - } - return this; - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public Builder removeImageRedactionConfigs(int index) { - if (imageRedactionConfigsBuilder_ == null) { - ensureImageRedactionConfigsIsMutable(); - imageRedactionConfigs_.remove(index); - onChanged(); - } else { - imageRedactionConfigsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder getImageRedactionConfigsBuilder( - int index) { - return getImageRedactionConfigsFieldBuilder().getBuilder(index); - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder getImageRedactionConfigsOrBuilder( - int index) { - if (imageRedactionConfigsBuilder_ == null) { - return imageRedactionConfigs_.get(index); } else { - return imageRedactionConfigsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public java.util.List - getImageRedactionConfigsOrBuilderList() { - if (imageRedactionConfigsBuilder_ != null) { - return imageRedactionConfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(imageRedactionConfigs_); - } - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder addImageRedactionConfigsBuilder() { - return getImageRedactionConfigsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance()); - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder addImageRedactionConfigsBuilder( - int index) { - return getImageRedactionConfigsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.getDefaultInstance()); - } - /** - *
-     * The configuration for specifying what content to redact from images.
-     * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - public java.util.List - getImageRedactionConfigsBuilderList() { - return getImageRedactionConfigsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder> - getImageRedactionConfigsFieldBuilder() { - if (imageRedactionConfigsBuilder_ == null) { - imageRedactionConfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder, com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder>( - imageRedactionConfigs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - imageRedactionConfigs_ = null; - } - return imageRedactionConfigsBuilder_; - } - - private boolean includeFindings_ ; - /** - *
-     * Whether the response should include findings along with the redacted
-     * image.
-     * 
- * - * bool include_findings = 6; - * @return The includeFindings. - */ - @java.lang.Override - public boolean getIncludeFindings() { - return includeFindings_; - } - /** - *
-     * Whether the response should include findings along with the redacted
-     * image.
-     * 
- * - * bool include_findings = 6; - * @param value The includeFindings to set. - * @return This builder for chaining. - */ - public Builder setIncludeFindings(boolean value) { - - includeFindings_ = value; - onChanged(); - return this; - } - /** - *
-     * Whether the response should include findings along with the redacted
-     * image.
-     * 
- * - * bool include_findings = 6; - * @return This builder for chaining. - */ - public Builder clearIncludeFindings() { - - includeFindings_ = false; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.ByteContentItem byteItem_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> byteItemBuilder_; - /** - *
-     * The content must be PNG, JPEG, SVG or BMP.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - * @return Whether the byteItem field is set. - */ - public boolean hasByteItem() { - return byteItemBuilder_ != null || byteItem_ != null; - } - /** - *
-     * The content must be PNG, JPEG, SVG or BMP.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - * @return The byteItem. - */ - public com.google.privacy.dlp.v2.ByteContentItem getByteItem() { - if (byteItemBuilder_ == null) { - return byteItem_ == null ? com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance() : byteItem_; - } else { - return byteItemBuilder_.getMessage(); - } - } - /** - *
-     * The content must be PNG, JPEG, SVG or BMP.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - */ - public Builder setByteItem(com.google.privacy.dlp.v2.ByteContentItem value) { - if (byteItemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - byteItem_ = value; - onChanged(); - } else { - byteItemBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The content must be PNG, JPEG, SVG or BMP.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - */ - public Builder setByteItem( - com.google.privacy.dlp.v2.ByteContentItem.Builder builderForValue) { - if (byteItemBuilder_ == null) { - byteItem_ = builderForValue.build(); - onChanged(); - } else { - byteItemBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The content must be PNG, JPEG, SVG or BMP.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - */ - public Builder mergeByteItem(com.google.privacy.dlp.v2.ByteContentItem value) { - if (byteItemBuilder_ == null) { - if (byteItem_ != null) { - byteItem_ = - com.google.privacy.dlp.v2.ByteContentItem.newBuilder(byteItem_).mergeFrom(value).buildPartial(); - } else { - byteItem_ = value; - } - onChanged(); - } else { - byteItemBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The content must be PNG, JPEG, SVG or BMP.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - */ - public Builder clearByteItem() { - if (byteItemBuilder_ == null) { - byteItem_ = null; - onChanged(); - } else { - byteItem_ = null; - byteItemBuilder_ = null; - } - - return this; - } - /** - *
-     * The content must be PNG, JPEG, SVG or BMP.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - */ - public com.google.privacy.dlp.v2.ByteContentItem.Builder getByteItemBuilder() { - - onChanged(); - return getByteItemFieldBuilder().getBuilder(); - } - /** - *
-     * The content must be PNG, JPEG, SVG or BMP.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - */ - public com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder() { - if (byteItemBuilder_ != null) { - return byteItemBuilder_.getMessageOrBuilder(); - } else { - return byteItem_ == null ? - com.google.privacy.dlp.v2.ByteContentItem.getDefaultInstance() : byteItem_; - } - } - /** - *
-     * The content must be PNG, JPEG, SVG or BMP.
-     * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> - getByteItemFieldBuilder() { - if (byteItemBuilder_ == null) { - byteItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder>( - getByteItem(), - getParentForChildren(), - isClean()); - byteItem_ = null; - } - return byteItemBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactImageRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactImageRequest) - private static final com.google.privacy.dlp.v2.RedactImageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactImageRequest(); - } - - public static com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RedactImageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RedactImageRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java deleted file mode 100644 index 72859285dc20..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java +++ /dev/null @@ -1,180 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface RedactImageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactImageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 8; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 8; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); - - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return Whether the inspectConfig field is set. - */ - boolean hasInspectConfig(); - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - * @return The inspectConfig. - */ - com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 2; - */ - com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); - - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - java.util.List - getImageRedactionConfigsList(); - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig getImageRedactionConfigs(int index); - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - int getImageRedactionConfigsCount(); - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - java.util.List - getImageRedactionConfigsOrBuilderList(); - /** - *
-   * The configuration for specifying what content to redact from images.
-   * 
- * - * repeated .google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig image_redaction_configs = 5; - */ - com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder getImageRedactionConfigsOrBuilder( - int index); - - /** - *
-   * Whether the response should include findings along with the redacted
-   * image.
-   * 
- * - * bool include_findings = 6; - * @return The includeFindings. - */ - boolean getIncludeFindings(); - - /** - *
-   * The content must be PNG, JPEG, SVG or BMP.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - * @return Whether the byteItem field is set. - */ - boolean hasByteItem(); - /** - *
-   * The content must be PNG, JPEG, SVG or BMP.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - * @return The byteItem. - */ - com.google.privacy.dlp.v2.ByteContentItem getByteItem(); - /** - *
-   * The content must be PNG, JPEG, SVG or BMP.
-   * 
- * - * .google.privacy.dlp.v2.ByteContentItem byte_item = 7; - */ - com.google.privacy.dlp.v2.ByteContentItemOrBuilder getByteItemOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java deleted file mode 100644 index 6652f23cbff9..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java +++ /dev/null @@ -1,929 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Results of redacting an image.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RedactImageResponse} - */ -public final class RedactImageResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RedactImageResponse) - RedactImageResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use RedactImageResponse.newBuilder() to construct. - private RedactImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RedactImageResponse() { - redactedImage_ = com.google.protobuf.ByteString.EMPTY; - extractedText_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RedactImageResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RedactImageResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - - redactedImage_ = input.readBytes(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - extractedText_ = s; - break; - } - case 26: { - com.google.privacy.dlp.v2.InspectResult.Builder subBuilder = null; - if (inspectResult_ != null) { - subBuilder = inspectResult_.toBuilder(); - } - inspectResult_ = input.readMessage(com.google.privacy.dlp.v2.InspectResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectResult_); - inspectResult_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RedactImageResponse.class, com.google.privacy.dlp.v2.RedactImageResponse.Builder.class); - } - - public static final int REDACTED_IMAGE_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString redactedImage_; - /** - *
-   * The redacted image. The type will be the same as the original image.
-   * 
- * - * bytes redacted_image = 1; - * @return The redactedImage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRedactedImage() { - return redactedImage_; - } - - public static final int EXTRACTED_TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object extractedText_; - /** - *
-   * If an image was being inspected and the InspectConfig's include_quote was
-   * set to true, then this field will include all text, if any, that was found
-   * in the image.
-   * 
- * - * string extracted_text = 2; - * @return The extractedText. - */ - @java.lang.Override - public java.lang.String getExtractedText() { - java.lang.Object ref = extractedText_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extractedText_ = s; - return s; - } - } - /** - *
-   * If an image was being inspected and the InspectConfig's include_quote was
-   * set to true, then this field will include all text, if any, that was found
-   * in the image.
-   * 
- * - * string extracted_text = 2; - * @return The bytes for extractedText. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExtractedTextBytes() { - java.lang.Object ref = extractedText_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - extractedText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSPECT_RESULT_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.InspectResult inspectResult_; - /** - *
-   * The findings. Populated when include_findings in the request is true.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - * @return Whether the inspectResult field is set. - */ - @java.lang.Override - public boolean hasInspectResult() { - return inspectResult_ != null; - } - /** - *
-   * The findings. Populated when include_findings in the request is true.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - * @return The inspectResult. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectResult getInspectResult() { - return inspectResult_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : inspectResult_; - } - /** - *
-   * The findings. Populated when include_findings in the request is true.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectResultOrBuilder getInspectResultOrBuilder() { - return getInspectResult(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!redactedImage_.isEmpty()) { - output.writeBytes(1, redactedImage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extractedText_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, extractedText_); - } - if (inspectResult_ != null) { - output.writeMessage(3, getInspectResult()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!redactedImage_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, redactedImage_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(extractedText_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, extractedText_); - } - if (inspectResult_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getInspectResult()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RedactImageResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RedactImageResponse other = (com.google.privacy.dlp.v2.RedactImageResponse) obj; - - if (!getRedactedImage() - .equals(other.getRedactedImage())) return false; - if (!getExtractedText() - .equals(other.getExtractedText())) return false; - if (hasInspectResult() != other.hasInspectResult()) return false; - if (hasInspectResult()) { - if (!getInspectResult() - .equals(other.getInspectResult())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + REDACTED_IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getRedactedImage().hashCode(); - hash = (37 * hash) + EXTRACTED_TEXT_FIELD_NUMBER; - hash = (53 * hash) + getExtractedText().hashCode(); - if (hasInspectResult()) { - hash = (37 * hash) + INSPECT_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getInspectResult().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RedactImageResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RedactImageResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Results of redacting an image.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RedactImageResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RedactImageResponse) - com.google.privacy.dlp.v2.RedactImageResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RedactImageResponse.class, com.google.privacy.dlp.v2.RedactImageResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RedactImageResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - redactedImage_ = com.google.protobuf.ByteString.EMPTY; - - extractedText_ = ""; - - if (inspectResultBuilder_ == null) { - inspectResult_ = null; - } else { - inspectResult_ = null; - inspectResultBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RedactImageResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageResponse build() { - com.google.privacy.dlp.v2.RedactImageResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageResponse buildPartial() { - com.google.privacy.dlp.v2.RedactImageResponse result = new com.google.privacy.dlp.v2.RedactImageResponse(this); - result.redactedImage_ = redactedImage_; - result.extractedText_ = extractedText_; - if (inspectResultBuilder_ == null) { - result.inspectResult_ = inspectResult_; - } else { - result.inspectResult_ = inspectResultBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RedactImageResponse) { - return mergeFrom((com.google.privacy.dlp.v2.RedactImageResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageResponse other) { - if (other == com.google.privacy.dlp.v2.RedactImageResponse.getDefaultInstance()) return this; - if (other.getRedactedImage() != com.google.protobuf.ByteString.EMPTY) { - setRedactedImage(other.getRedactedImage()); - } - if (!other.getExtractedText().isEmpty()) { - extractedText_ = other.extractedText_; - onChanged(); - } - if (other.hasInspectResult()) { - mergeInspectResult(other.getInspectResult()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RedactImageResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RedactImageResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString redactedImage_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * The redacted image. The type will be the same as the original image.
-     * 
- * - * bytes redacted_image = 1; - * @return The redactedImage. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRedactedImage() { - return redactedImage_; - } - /** - *
-     * The redacted image. The type will be the same as the original image.
-     * 
- * - * bytes redacted_image = 1; - * @param value The redactedImage to set. - * @return This builder for chaining. - */ - public Builder setRedactedImage(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - redactedImage_ = value; - onChanged(); - return this; - } - /** - *
-     * The redacted image. The type will be the same as the original image.
-     * 
- * - * bytes redacted_image = 1; - * @return This builder for chaining. - */ - public Builder clearRedactedImage() { - - redactedImage_ = getDefaultInstance().getRedactedImage(); - onChanged(); - return this; - } - - private java.lang.Object extractedText_ = ""; - /** - *
-     * If an image was being inspected and the InspectConfig's include_quote was
-     * set to true, then this field will include all text, if any, that was found
-     * in the image.
-     * 
- * - * string extracted_text = 2; - * @return The extractedText. - */ - public java.lang.String getExtractedText() { - java.lang.Object ref = extractedText_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - extractedText_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If an image was being inspected and the InspectConfig's include_quote was
-     * set to true, then this field will include all text, if any, that was found
-     * in the image.
-     * 
- * - * string extracted_text = 2; - * @return The bytes for extractedText. - */ - public com.google.protobuf.ByteString - getExtractedTextBytes() { - java.lang.Object ref = extractedText_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - extractedText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If an image was being inspected and the InspectConfig's include_quote was
-     * set to true, then this field will include all text, if any, that was found
-     * in the image.
-     * 
- * - * string extracted_text = 2; - * @param value The extractedText to set. - * @return This builder for chaining. - */ - public Builder setExtractedText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - extractedText_ = value; - onChanged(); - return this; - } - /** - *
-     * If an image was being inspected and the InspectConfig's include_quote was
-     * set to true, then this field will include all text, if any, that was found
-     * in the image.
-     * 
- * - * string extracted_text = 2; - * @return This builder for chaining. - */ - public Builder clearExtractedText() { - - extractedText_ = getDefaultInstance().getExtractedText(); - onChanged(); - return this; - } - /** - *
-     * If an image was being inspected and the InspectConfig's include_quote was
-     * set to true, then this field will include all text, if any, that was found
-     * in the image.
-     * 
- * - * string extracted_text = 2; - * @param value The bytes for extractedText to set. - * @return This builder for chaining. - */ - public Builder setExtractedTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - extractedText_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.InspectResult inspectResult_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> inspectResultBuilder_; - /** - *
-     * The findings. Populated when include_findings in the request is true.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - * @return Whether the inspectResult field is set. - */ - public boolean hasInspectResult() { - return inspectResultBuilder_ != null || inspectResult_ != null; - } - /** - *
-     * The findings. Populated when include_findings in the request is true.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - * @return The inspectResult. - */ - public com.google.privacy.dlp.v2.InspectResult getInspectResult() { - if (inspectResultBuilder_ == null) { - return inspectResult_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : inspectResult_; - } else { - return inspectResultBuilder_.getMessage(); - } - } - /** - *
-     * The findings. Populated when include_findings in the request is true.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - */ - public Builder setInspectResult(com.google.privacy.dlp.v2.InspectResult value) { - if (inspectResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectResult_ = value; - onChanged(); - } else { - inspectResultBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The findings. Populated when include_findings in the request is true.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - */ - public Builder setInspectResult( - com.google.privacy.dlp.v2.InspectResult.Builder builderForValue) { - if (inspectResultBuilder_ == null) { - inspectResult_ = builderForValue.build(); - onChanged(); - } else { - inspectResultBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The findings. Populated when include_findings in the request is true.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - */ - public Builder mergeInspectResult(com.google.privacy.dlp.v2.InspectResult value) { - if (inspectResultBuilder_ == null) { - if (inspectResult_ != null) { - inspectResult_ = - com.google.privacy.dlp.v2.InspectResult.newBuilder(inspectResult_).mergeFrom(value).buildPartial(); - } else { - inspectResult_ = value; - } - onChanged(); - } else { - inspectResultBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The findings. Populated when include_findings in the request is true.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - */ - public Builder clearInspectResult() { - if (inspectResultBuilder_ == null) { - inspectResult_ = null; - onChanged(); - } else { - inspectResult_ = null; - inspectResultBuilder_ = null; - } - - return this; - } - /** - *
-     * The findings. Populated when include_findings in the request is true.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - */ - public com.google.privacy.dlp.v2.InspectResult.Builder getInspectResultBuilder() { - - onChanged(); - return getInspectResultFieldBuilder().getBuilder(); - } - /** - *
-     * The findings. Populated when include_findings in the request is true.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - */ - public com.google.privacy.dlp.v2.InspectResultOrBuilder getInspectResultOrBuilder() { - if (inspectResultBuilder_ != null) { - return inspectResultBuilder_.getMessageOrBuilder(); - } else { - return inspectResult_ == null ? - com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : inspectResult_; - } - } - /** - *
-     * The findings. Populated when include_findings in the request is true.
-     * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> - getInspectResultFieldBuilder() { - if (inspectResultBuilder_ == null) { - inspectResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder>( - getInspectResult(), - getParentForChildren(), - isClean()); - inspectResult_ = null; - } - return inspectResultBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RedactImageResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RedactImageResponse) - private static final com.google.privacy.dlp.v2.RedactImageResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RedactImageResponse(); - } - - public static com.google.privacy.dlp.v2.RedactImageResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RedactImageResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RedactImageResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RedactImageResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java deleted file mode 100644 index daf06874d12b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface RedactImageResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RedactImageResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The redacted image. The type will be the same as the original image.
-   * 
- * - * bytes redacted_image = 1; - * @return The redactedImage. - */ - com.google.protobuf.ByteString getRedactedImage(); - - /** - *
-   * If an image was being inspected and the InspectConfig's include_quote was
-   * set to true, then this field will include all text, if any, that was found
-   * in the image.
-   * 
- * - * string extracted_text = 2; - * @return The extractedText. - */ - java.lang.String getExtractedText(); - /** - *
-   * If an image was being inspected and the InspectConfig's include_quote was
-   * set to true, then this field will include all text, if any, that was found
-   * in the image.
-   * 
- * - * string extracted_text = 2; - * @return The bytes for extractedText. - */ - com.google.protobuf.ByteString - getExtractedTextBytes(); - - /** - *
-   * The findings. Populated when include_findings in the request is true.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - * @return Whether the inspectResult field is set. - */ - boolean hasInspectResult(); - /** - *
-   * The findings. Populated when include_findings in the request is true.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - * @return The inspectResult. - */ - com.google.privacy.dlp.v2.InspectResult getInspectResult(); - /** - *
-   * The findings. Populated when include_findings in the request is true.
-   * 
- * - * .google.privacy.dlp.v2.InspectResult inspect_result = 3; - */ - com.google.privacy.dlp.v2.InspectResultOrBuilder getInspectResultOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java deleted file mode 100644 index f7dbf9743769..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequest.java +++ /dev/null @@ -1,2044 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request to re-identify an item.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentRequest} - */ -public final class ReidentifyContentRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReidentifyContentRequest) - ReidentifyContentRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ReidentifyContentRequest.newBuilder() to construct. - private ReidentifyContentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ReidentifyContentRequest() { - parent_ = ""; - inspectTemplateName_ = ""; - reidentifyTemplateName_ = ""; - locationId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ReidentifyContentRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReidentifyContentRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.DeidentifyConfig.Builder subBuilder = null; - if (reidentifyConfig_ != null) { - subBuilder = reidentifyConfig_.toBuilder(); - } - reidentifyConfig_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reidentifyConfig_); - reidentifyConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.InspectConfig.Builder subBuilder = null; - if (inspectConfig_ != null) { - subBuilder = inspectConfig_.toBuilder(); - } - inspectConfig_ = input.readMessage(com.google.privacy.dlp.v2.InspectConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectConfig_); - inspectConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; - if (item_ != null) { - subBuilder = item_.toBuilder(); - } - item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(item_); - item_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - inspectTemplateName_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - reidentifyTemplateName_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - locationId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReidentifyContentRequest.class, com.google.privacy.dlp.v2.ReidentifyContentRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REIDENTIFY_CONFIG_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.DeidentifyConfig reidentifyConfig_; - /** - *
-   * Configuration for the re-identification of the content item.
-   * This field shares the same proto message type that is used for
-   * de-identification, however its usage here is for the reversal of the
-   * previous de-identification. Re-identification is performed by examining
-   * the transformations used to de-identify the items and executing the
-   * reverse. This requires that only reversible transformations
-   * be provided here. The reversible transformations are:
-   *  - `CryptoDeterministicConfig`
-   *  - `CryptoReplaceFfxFpeConfig`
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - * @return Whether the reidentifyConfig field is set. - */ - @java.lang.Override - public boolean hasReidentifyConfig() { - return reidentifyConfig_ != null; - } - /** - *
-   * Configuration for the re-identification of the content item.
-   * This field shares the same proto message type that is used for
-   * de-identification, however its usage here is for the reversal of the
-   * previous de-identification. Re-identification is performed by examining
-   * the transformations used to de-identify the items and executing the
-   * reverse. This requires that only reversible transformations
-   * be provided here. The reversible transformations are:
-   *  - `CryptoDeterministicConfig`
-   *  - `CryptoReplaceFfxFpeConfig`
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - * @return The reidentifyConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfig getReidentifyConfig() { - return reidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : reidentifyConfig_; - } - /** - *
-   * Configuration for the re-identification of the content item.
-   * This field shares the same proto message type that is used for
-   * de-identification, however its usage here is for the reversal of the
-   * previous de-identification. Re-identification is performed by examining
-   * the transformations used to de-identify the items and executing the
-   * reverse. This requires that only reversible transformations
-   * be provided here. The reversible transformations are:
-   *  - `CryptoDeterministicConfig`
-   *  - `CryptoReplaceFfxFpeConfig`
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getReidentifyConfigOrBuilder() { - return getReidentifyConfig(); - } - - public static final int INSPECT_CONFIG_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return Whether the inspectConfig field is set. - */ - @java.lang.Override - public boolean hasInspectConfig() { - return inspectConfig_ != null; - } - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return The inspectConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - return getInspectConfig(); - } - - public static final int ITEM_FIELD_NUMBER = 4; - private com.google.privacy.dlp.v2.ContentItem item_; - /** - *
-   * The item to re-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return Whether the item field is set. - */ - @java.lang.Override - public boolean hasItem() { - return item_ != null; - } - /** - *
-   * The item to re-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return The item. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem getItem() { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - /** - *
-   * The item to re-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - return getItem(); - } - - public static final int INSPECT_TEMPLATE_NAME_FIELD_NUMBER = 5; - private volatile java.lang.Object inspectTemplateName_; - /** - *
-   * Template to use. Any configuration directly specified in
-   * `inspect_config` will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 5; - * @return The inspectTemplateName. - */ - @java.lang.Override - public java.lang.String getInspectTemplateName() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inspectTemplateName_ = s; - return s; - } - } - /** - *
-   * Template to use. Any configuration directly specified in
-   * `inspect_config` will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 5; - * @return The bytes for inspectTemplateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getInspectTemplateNameBytes() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - inspectTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER = 6; - private volatile java.lang.Object reidentifyTemplateName_; - /** - *
-   * Template to use. References an instance of `DeidentifyTemplate`.
-   * Any configuration directly specified in `reidentify_config` or
-   * `inspect_config` will override those set in the template. The
-   * `DeidentifyTemplate` used must include only reversible transformations.
-   * Singular fields that are set in this request will replace their
-   * corresponding fields in the template. Repeated fields are appended.
-   * Singular sub-messages and groups are recursively merged.
-   * 
- * - * string reidentify_template_name = 6; - * @return The reidentifyTemplateName. - */ - @java.lang.Override - public java.lang.String getReidentifyTemplateName() { - java.lang.Object ref = reidentifyTemplateName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reidentifyTemplateName_ = s; - return s; - } - } - /** - *
-   * Template to use. References an instance of `DeidentifyTemplate`.
-   * Any configuration directly specified in `reidentify_config` or
-   * `inspect_config` will override those set in the template. The
-   * `DeidentifyTemplate` used must include only reversible transformations.
-   * Singular fields that are set in this request will replace their
-   * corresponding fields in the template. Repeated fields are appended.
-   * Singular sub-messages and groups are recursively merged.
-   * 
- * - * string reidentify_template_name = 6; - * @return The bytes for reidentifyTemplateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReidentifyTemplateNameBytes() { - java.lang.Object ref = reidentifyTemplateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reidentifyTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_ID_FIELD_NUMBER = 7; - private volatile java.lang.Object locationId_; - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The locationId. - */ - @java.lang.Override - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } - } - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (reidentifyConfig_ != null) { - output.writeMessage(2, getReidentifyConfig()); - } - if (inspectConfig_ != null) { - output.writeMessage(3, getInspectConfig()); - } - if (item_ != null) { - output.writeMessage(4, getItem()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, inspectTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reidentifyTemplateName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, reidentifyTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, locationId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (reidentifyConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReidentifyConfig()); - } - if (inspectConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getInspectConfig()); - } - if (item_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getItem()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inspectTemplateName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, inspectTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reidentifyTemplateName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, reidentifyTemplateName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, locationId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ReidentifyContentRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ReidentifyContentRequest other = (com.google.privacy.dlp.v2.ReidentifyContentRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasReidentifyConfig() != other.hasReidentifyConfig()) return false; - if (hasReidentifyConfig()) { - if (!getReidentifyConfig() - .equals(other.getReidentifyConfig())) return false; - } - if (hasInspectConfig() != other.hasInspectConfig()) return false; - if (hasInspectConfig()) { - if (!getInspectConfig() - .equals(other.getInspectConfig())) return false; - } - if (hasItem() != other.hasItem()) return false; - if (hasItem()) { - if (!getItem() - .equals(other.getItem())) return false; - } - if (!getInspectTemplateName() - .equals(other.getInspectTemplateName())) return false; - if (!getReidentifyTemplateName() - .equals(other.getReidentifyTemplateName())) return false; - if (!getLocationId() - .equals(other.getLocationId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasReidentifyConfig()) { - hash = (37 * hash) + REIDENTIFY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getReidentifyConfig().hashCode(); - } - if (hasInspectConfig()) { - hash = (37 * hash) + INSPECT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInspectConfig().hashCode(); - } - if (hasItem()) { - hash = (37 * hash) + ITEM_FIELD_NUMBER; - hash = (53 * hash) + getItem().hashCode(); - } - hash = (37 * hash) + INSPECT_TEMPLATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getInspectTemplateName().hashCode(); - hash = (37 * hash) + REIDENTIFY_TEMPLATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getReidentifyTemplateName().hashCode(); - hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; - hash = (53 * hash) + getLocationId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReidentifyContentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ReidentifyContentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to re-identify an item.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReidentifyContentRequest) - com.google.privacy.dlp.v2.ReidentifyContentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReidentifyContentRequest.class, com.google.privacy.dlp.v2.ReidentifyContentRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ReidentifyContentRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (reidentifyConfigBuilder_ == null) { - reidentifyConfig_ = null; - } else { - reidentifyConfig_ = null; - reidentifyConfigBuilder_ = null; - } - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - if (itemBuilder_ == null) { - item_ = null; - } else { - item_ = null; - itemBuilder_ = null; - } - inspectTemplateName_ = ""; - - reidentifyTemplateName_ = ""; - - locationId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReidentifyContentRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ReidentifyContentRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReidentifyContentRequest build() { - com.google.privacy.dlp.v2.ReidentifyContentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReidentifyContentRequest buildPartial() { - com.google.privacy.dlp.v2.ReidentifyContentRequest result = new com.google.privacy.dlp.v2.ReidentifyContentRequest(this); - result.parent_ = parent_; - if (reidentifyConfigBuilder_ == null) { - result.reidentifyConfig_ = reidentifyConfig_; - } else { - result.reidentifyConfig_ = reidentifyConfigBuilder_.build(); - } - if (inspectConfigBuilder_ == null) { - result.inspectConfig_ = inspectConfig_; - } else { - result.inspectConfig_ = inspectConfigBuilder_.build(); - } - if (itemBuilder_ == null) { - result.item_ = item_; - } else { - result.item_ = itemBuilder_.build(); - } - result.inspectTemplateName_ = inspectTemplateName_; - result.reidentifyTemplateName_ = reidentifyTemplateName_; - result.locationId_ = locationId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ReidentifyContentRequest) { - return mergeFrom((com.google.privacy.dlp.v2.ReidentifyContentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ReidentifyContentRequest other) { - if (other == com.google.privacy.dlp.v2.ReidentifyContentRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasReidentifyConfig()) { - mergeReidentifyConfig(other.getReidentifyConfig()); - } - if (other.hasInspectConfig()) { - mergeInspectConfig(other.getInspectConfig()); - } - if (other.hasItem()) { - mergeItem(other.getItem()); - } - if (!other.getInspectTemplateName().isEmpty()) { - inspectTemplateName_ = other.inspectTemplateName_; - onChanged(); - } - if (!other.getReidentifyTemplateName().isEmpty()) { - reidentifyTemplateName_ = other.reidentifyTemplateName_; - onChanged(); - } - if (!other.getLocationId().isEmpty()) { - locationId_ = other.locationId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ReidentifyContentRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ReidentifyContentRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Parent resource name.
-     * The format of this value varies depending on whether you have [specified a
-     * processing
-     * location](https://cloud.google.com/dlp/docs/specifying-location):
-     * + Projects scope, location specified:<br/>
-     *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-     * + Projects scope, no location specified (defaults to global):<br/>
-     *   `projects/`<var>PROJECT_ID</var>
-     * The following example `parent` string specifies a parent project with the
-     * identifier `example-project`, and specifies the `europe-west3` location
-     * for processing data:
-     *     parent=projects/example-project/locations/europe-west3
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.DeidentifyConfig reidentifyConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> reidentifyConfigBuilder_; - /** - *
-     * Configuration for the re-identification of the content item.
-     * This field shares the same proto message type that is used for
-     * de-identification, however its usage here is for the reversal of the
-     * previous de-identification. Re-identification is performed by examining
-     * the transformations used to de-identify the items and executing the
-     * reverse. This requires that only reversible transformations
-     * be provided here. The reversible transformations are:
-     *  - `CryptoDeterministicConfig`
-     *  - `CryptoReplaceFfxFpeConfig`
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - * @return Whether the reidentifyConfig field is set. - */ - public boolean hasReidentifyConfig() { - return reidentifyConfigBuilder_ != null || reidentifyConfig_ != null; - } - /** - *
-     * Configuration for the re-identification of the content item.
-     * This field shares the same proto message type that is used for
-     * de-identification, however its usage here is for the reversal of the
-     * previous de-identification. Re-identification is performed by examining
-     * the transformations used to de-identify the items and executing the
-     * reverse. This requires that only reversible transformations
-     * be provided here. The reversible transformations are:
-     *  - `CryptoDeterministicConfig`
-     *  - `CryptoReplaceFfxFpeConfig`
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - * @return The reidentifyConfig. - */ - public com.google.privacy.dlp.v2.DeidentifyConfig getReidentifyConfig() { - if (reidentifyConfigBuilder_ == null) { - return reidentifyConfig_ == null ? com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : reidentifyConfig_; - } else { - return reidentifyConfigBuilder_.getMessage(); - } - } - /** - *
-     * Configuration for the re-identification of the content item.
-     * This field shares the same proto message type that is used for
-     * de-identification, however its usage here is for the reversal of the
-     * previous de-identification. Re-identification is performed by examining
-     * the transformations used to de-identify the items and executing the
-     * reverse. This requires that only reversible transformations
-     * be provided here. The reversible transformations are:
-     *  - `CryptoDeterministicConfig`
-     *  - `CryptoReplaceFfxFpeConfig`
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - */ - public Builder setReidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { - if (reidentifyConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reidentifyConfig_ = value; - onChanged(); - } else { - reidentifyConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Configuration for the re-identification of the content item.
-     * This field shares the same proto message type that is used for
-     * de-identification, however its usage here is for the reversal of the
-     * previous de-identification. Re-identification is performed by examining
-     * the transformations used to de-identify the items and executing the
-     * reverse. This requires that only reversible transformations
-     * be provided here. The reversible transformations are:
-     *  - `CryptoDeterministicConfig`
-     *  - `CryptoReplaceFfxFpeConfig`
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - */ - public Builder setReidentifyConfig( - com.google.privacy.dlp.v2.DeidentifyConfig.Builder builderForValue) { - if (reidentifyConfigBuilder_ == null) { - reidentifyConfig_ = builderForValue.build(); - onChanged(); - } else { - reidentifyConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Configuration for the re-identification of the content item.
-     * This field shares the same proto message type that is used for
-     * de-identification, however its usage here is for the reversal of the
-     * previous de-identification. Re-identification is performed by examining
-     * the transformations used to de-identify the items and executing the
-     * reverse. This requires that only reversible transformations
-     * be provided here. The reversible transformations are:
-     *  - `CryptoDeterministicConfig`
-     *  - `CryptoReplaceFfxFpeConfig`
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - */ - public Builder mergeReidentifyConfig(com.google.privacy.dlp.v2.DeidentifyConfig value) { - if (reidentifyConfigBuilder_ == null) { - if (reidentifyConfig_ != null) { - reidentifyConfig_ = - com.google.privacy.dlp.v2.DeidentifyConfig.newBuilder(reidentifyConfig_).mergeFrom(value).buildPartial(); - } else { - reidentifyConfig_ = value; - } - onChanged(); - } else { - reidentifyConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Configuration for the re-identification of the content item.
-     * This field shares the same proto message type that is used for
-     * de-identification, however its usage here is for the reversal of the
-     * previous de-identification. Re-identification is performed by examining
-     * the transformations used to de-identify the items and executing the
-     * reverse. This requires that only reversible transformations
-     * be provided here. The reversible transformations are:
-     *  - `CryptoDeterministicConfig`
-     *  - `CryptoReplaceFfxFpeConfig`
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - */ - public Builder clearReidentifyConfig() { - if (reidentifyConfigBuilder_ == null) { - reidentifyConfig_ = null; - onChanged(); - } else { - reidentifyConfig_ = null; - reidentifyConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Configuration for the re-identification of the content item.
-     * This field shares the same proto message type that is used for
-     * de-identification, however its usage here is for the reversal of the
-     * previous de-identification. Re-identification is performed by examining
-     * the transformations used to de-identify the items and executing the
-     * reverse. This requires that only reversible transformations
-     * be provided here. The reversible transformations are:
-     *  - `CryptoDeterministicConfig`
-     *  - `CryptoReplaceFfxFpeConfig`
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - */ - public com.google.privacy.dlp.v2.DeidentifyConfig.Builder getReidentifyConfigBuilder() { - - onChanged(); - return getReidentifyConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Configuration for the re-identification of the content item.
-     * This field shares the same proto message type that is used for
-     * de-identification, however its usage here is for the reversal of the
-     * previous de-identification. Re-identification is performed by examining
-     * the transformations used to de-identify the items and executing the
-     * reverse. This requires that only reversible transformations
-     * be provided here. The reversible transformations are:
-     *  - `CryptoDeterministicConfig`
-     *  - `CryptoReplaceFfxFpeConfig`
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - */ - public com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getReidentifyConfigOrBuilder() { - if (reidentifyConfigBuilder_ != null) { - return reidentifyConfigBuilder_.getMessageOrBuilder(); - } else { - return reidentifyConfig_ == null ? - com.google.privacy.dlp.v2.DeidentifyConfig.getDefaultInstance() : reidentifyConfig_; - } - } - /** - *
-     * Configuration for the re-identification of the content item.
-     * This field shares the same proto message type that is used for
-     * de-identification, however its usage here is for the reversal of the
-     * previous de-identification. Re-identification is performed by examining
-     * the transformations used to de-identify the items and executing the
-     * reverse. This requires that only reversible transformations
-     * be provided here. The reversible transformations are:
-     *  - `CryptoDeterministicConfig`
-     *  - `CryptoReplaceFfxFpeConfig`
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder> - getReidentifyConfigFieldBuilder() { - if (reidentifyConfigBuilder_ == null) { - reidentifyConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyConfig, com.google.privacy.dlp.v2.DeidentifyConfig.Builder, com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder>( - getReidentifyConfig(), - getParentForChildren(), - isClean()); - reidentifyConfig_ = null; - } - return reidentifyConfigBuilder_; - } - - private com.google.privacy.dlp.v2.InspectConfig inspectConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> inspectConfigBuilder_; - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return Whether the inspectConfig field is set. - */ - public boolean hasInspectConfig() { - return inspectConfigBuilder_ != null || inspectConfig_ != null; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return The inspectConfig. - */ - public com.google.privacy.dlp.v2.InspectConfig getInspectConfig() { - if (inspectConfigBuilder_ == null) { - return inspectConfig_ == null ? com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } else { - return inspectConfigBuilder_.getMessage(); - } - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public Builder setInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectConfig_ = value; - onChanged(); - } else { - inspectConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public Builder setInspectConfig( - com.google.privacy.dlp.v2.InspectConfig.Builder builderForValue) { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = builderForValue.build(); - onChanged(); - } else { - inspectConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public Builder mergeInspectConfig(com.google.privacy.dlp.v2.InspectConfig value) { - if (inspectConfigBuilder_ == null) { - if (inspectConfig_ != null) { - inspectConfig_ = - com.google.privacy.dlp.v2.InspectConfig.newBuilder(inspectConfig_).mergeFrom(value).buildPartial(); - } else { - inspectConfig_ = value; - } - onChanged(); - } else { - inspectConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public Builder clearInspectConfig() { - if (inspectConfigBuilder_ == null) { - inspectConfig_ = null; - onChanged(); - } else { - inspectConfig_ = null; - inspectConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public com.google.privacy.dlp.v2.InspectConfig.Builder getInspectConfigBuilder() { - - onChanged(); - return getInspectConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - public com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder() { - if (inspectConfigBuilder_ != null) { - return inspectConfigBuilder_.getMessageOrBuilder(); - } else { - return inspectConfig_ == null ? - com.google.privacy.dlp.v2.InspectConfig.getDefaultInstance() : inspectConfig_; - } - } - /** - *
-     * Configuration for the inspector.
-     * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder> - getInspectConfigFieldBuilder() { - if (inspectConfigBuilder_ == null) { - inspectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectConfig, com.google.privacy.dlp.v2.InspectConfig.Builder, com.google.privacy.dlp.v2.InspectConfigOrBuilder>( - getInspectConfig(), - getParentForChildren(), - isClean()); - inspectConfig_ = null; - } - return inspectConfigBuilder_; - } - - private com.google.privacy.dlp.v2.ContentItem item_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; - /** - *
-     * The item to re-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return Whether the item field is set. - */ - public boolean hasItem() { - return itemBuilder_ != null || item_ != null; - } - /** - *
-     * The item to re-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return The item. - */ - public com.google.privacy.dlp.v2.ContentItem getItem() { - if (itemBuilder_ == null) { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } else { - return itemBuilder_.getMessage(); - } - } - /** - *
-     * The item to re-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - item_ = value; - onChanged(); - } else { - itemBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The item to re-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public Builder setItem( - com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { - if (itemBuilder_ == null) { - item_ = builderForValue.build(); - onChanged(); - } else { - itemBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The item to re-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (item_ != null) { - item_ = - com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); - } else { - item_ = value; - } - onChanged(); - } else { - itemBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The item to re-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public Builder clearItem() { - if (itemBuilder_ == null) { - item_ = null; - onChanged(); - } else { - item_ = null; - itemBuilder_ = null; - } - - return this; - } - /** - *
-     * The item to re-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { - - onChanged(); - return getItemFieldBuilder().getBuilder(); - } - /** - *
-     * The item to re-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - if (itemBuilder_ != null) { - return itemBuilder_.getMessageOrBuilder(); - } else { - return item_ == null ? - com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - } - /** - *
-     * The item to re-identify. Will be treated as text.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> - getItemFieldBuilder() { - if (itemBuilder_ == null) { - itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( - getItem(), - getParentForChildren(), - isClean()); - item_ = null; - } - return itemBuilder_; - } - - private java.lang.Object inspectTemplateName_ = ""; - /** - *
-     * Template to use. Any configuration directly specified in
-     * `inspect_config` will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @return The inspectTemplateName. - */ - public java.lang.String getInspectTemplateName() { - java.lang.Object ref = inspectTemplateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - inspectTemplateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * `inspect_config` will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @return The bytes for inspectTemplateName. - */ - public com.google.protobuf.ByteString - getInspectTemplateNameBytes() { - java.lang.Object ref = inspectTemplateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - inspectTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * `inspect_config` will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @param value The inspectTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInspectTemplateName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - inspectTemplateName_ = value; - onChanged(); - return this; - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * `inspect_config` will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @return This builder for chaining. - */ - public Builder clearInspectTemplateName() { - - inspectTemplateName_ = getDefaultInstance().getInspectTemplateName(); - onChanged(); - return this; - } - /** - *
-     * Template to use. Any configuration directly specified in
-     * `inspect_config` will override those set in the template. Singular fields
-     * that are set in this request will replace their corresponding fields in the
-     * template. Repeated fields are appended. Singular sub-messages and groups
-     * are recursively merged.
-     * 
- * - * string inspect_template_name = 5; - * @param value The bytes for inspectTemplateName to set. - * @return This builder for chaining. - */ - public Builder setInspectTemplateNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - inspectTemplateName_ = value; - onChanged(); - return this; - } - - private java.lang.Object reidentifyTemplateName_ = ""; - /** - *
-     * Template to use. References an instance of `DeidentifyTemplate`.
-     * Any configuration directly specified in `reidentify_config` or
-     * `inspect_config` will override those set in the template. The
-     * `DeidentifyTemplate` used must include only reversible transformations.
-     * Singular fields that are set in this request will replace their
-     * corresponding fields in the template. Repeated fields are appended.
-     * Singular sub-messages and groups are recursively merged.
-     * 
- * - * string reidentify_template_name = 6; - * @return The reidentifyTemplateName. - */ - public java.lang.String getReidentifyTemplateName() { - java.lang.Object ref = reidentifyTemplateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reidentifyTemplateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Template to use. References an instance of `DeidentifyTemplate`.
-     * Any configuration directly specified in `reidentify_config` or
-     * `inspect_config` will override those set in the template. The
-     * `DeidentifyTemplate` used must include only reversible transformations.
-     * Singular fields that are set in this request will replace their
-     * corresponding fields in the template. Repeated fields are appended.
-     * Singular sub-messages and groups are recursively merged.
-     * 
- * - * string reidentify_template_name = 6; - * @return The bytes for reidentifyTemplateName. - */ - public com.google.protobuf.ByteString - getReidentifyTemplateNameBytes() { - java.lang.Object ref = reidentifyTemplateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reidentifyTemplateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Template to use. References an instance of `DeidentifyTemplate`.
-     * Any configuration directly specified in `reidentify_config` or
-     * `inspect_config` will override those set in the template. The
-     * `DeidentifyTemplate` used must include only reversible transformations.
-     * Singular fields that are set in this request will replace their
-     * corresponding fields in the template. Repeated fields are appended.
-     * Singular sub-messages and groups are recursively merged.
-     * 
- * - * string reidentify_template_name = 6; - * @param value The reidentifyTemplateName to set. - * @return This builder for chaining. - */ - public Builder setReidentifyTemplateName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - reidentifyTemplateName_ = value; - onChanged(); - return this; - } - /** - *
-     * Template to use. References an instance of `DeidentifyTemplate`.
-     * Any configuration directly specified in `reidentify_config` or
-     * `inspect_config` will override those set in the template. The
-     * `DeidentifyTemplate` used must include only reversible transformations.
-     * Singular fields that are set in this request will replace their
-     * corresponding fields in the template. Repeated fields are appended.
-     * Singular sub-messages and groups are recursively merged.
-     * 
- * - * string reidentify_template_name = 6; - * @return This builder for chaining. - */ - public Builder clearReidentifyTemplateName() { - - reidentifyTemplateName_ = getDefaultInstance().getReidentifyTemplateName(); - onChanged(); - return this; - } - /** - *
-     * Template to use. References an instance of `DeidentifyTemplate`.
-     * Any configuration directly specified in `reidentify_config` or
-     * `inspect_config` will override those set in the template. The
-     * `DeidentifyTemplate` used must include only reversible transformations.
-     * Singular fields that are set in this request will replace their
-     * corresponding fields in the template. Repeated fields are appended.
-     * Singular sub-messages and groups are recursively merged.
-     * 
- * - * string reidentify_template_name = 6; - * @param value The bytes for reidentifyTemplateName to set. - * @return This builder for chaining. - */ - public Builder setReidentifyTemplateNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - reidentifyTemplateName_ = value; - onChanged(); - return this; - } - - private java.lang.Object locationId_ = ""; - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return The locationId. - */ - public java.lang.String getLocationId() { - java.lang.Object ref = locationId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - locationId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - public com.google.protobuf.ByteString - getLocationIdBytes() { - java.lang.Object ref = locationId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - locationId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @param value The locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - locationId_ = value; - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @return This builder for chaining. - */ - public Builder clearLocationId() { - - locationId_ = getDefaultInstance().getLocationId(); - onChanged(); - return this; - } - /** - *
-     * Deprecated. This field has no effect.
-     * 
- * - * string location_id = 7; - * @param value The bytes for locationId to set. - * @return This builder for chaining. - */ - public Builder setLocationIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - locationId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReidentifyContentRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReidentifyContentRequest) - private static final com.google.privacy.dlp.v2.ReidentifyContentRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReidentifyContentRequest(); - } - - public static com.google.privacy.dlp.v2.ReidentifyContentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReidentifyContentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReidentifyContentRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReidentifyContentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java deleted file mode 100644 index 49de25cb72d3..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentRequestOrBuilder.java +++ /dev/null @@ -1,236 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ReidentifyContentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReidentifyContentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Parent resource name.
-   * The format of this value varies depending on whether you have [specified a
-   * processing
-   * location](https://cloud.google.com/dlp/docs/specifying-location):
-   * + Projects scope, location specified:<br/>
-   *   `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
-   * + Projects scope, no location specified (defaults to global):<br/>
-   *   `projects/`<var>PROJECT_ID</var>
-   * The following example `parent` string specifies a parent project with the
-   * identifier `example-project`, and specifies the `europe-west3` location
-   * for processing data:
-   *     parent=projects/example-project/locations/europe-west3
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Configuration for the re-identification of the content item.
-   * This field shares the same proto message type that is used for
-   * de-identification, however its usage here is for the reversal of the
-   * previous de-identification. Re-identification is performed by examining
-   * the transformations used to de-identify the items and executing the
-   * reverse. This requires that only reversible transformations
-   * be provided here. The reversible transformations are:
-   *  - `CryptoDeterministicConfig`
-   *  - `CryptoReplaceFfxFpeConfig`
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - * @return Whether the reidentifyConfig field is set. - */ - boolean hasReidentifyConfig(); - /** - *
-   * Configuration for the re-identification of the content item.
-   * This field shares the same proto message type that is used for
-   * de-identification, however its usage here is for the reversal of the
-   * previous de-identification. Re-identification is performed by examining
-   * the transformations used to de-identify the items and executing the
-   * reverse. This requires that only reversible transformations
-   * be provided here. The reversible transformations are:
-   *  - `CryptoDeterministicConfig`
-   *  - `CryptoReplaceFfxFpeConfig`
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - * @return The reidentifyConfig. - */ - com.google.privacy.dlp.v2.DeidentifyConfig getReidentifyConfig(); - /** - *
-   * Configuration for the re-identification of the content item.
-   * This field shares the same proto message type that is used for
-   * de-identification, however its usage here is for the reversal of the
-   * previous de-identification. Re-identification is performed by examining
-   * the transformations used to de-identify the items and executing the
-   * reverse. This requires that only reversible transformations
-   * be provided here. The reversible transformations are:
-   *  - `CryptoDeterministicConfig`
-   *  - `CryptoReplaceFfxFpeConfig`
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyConfig reidentify_config = 2; - */ - com.google.privacy.dlp.v2.DeidentifyConfigOrBuilder getReidentifyConfigOrBuilder(); - - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return Whether the inspectConfig field is set. - */ - boolean hasInspectConfig(); - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - * @return The inspectConfig. - */ - com.google.privacy.dlp.v2.InspectConfig getInspectConfig(); - /** - *
-   * Configuration for the inspector.
-   * 
- * - * .google.privacy.dlp.v2.InspectConfig inspect_config = 3; - */ - com.google.privacy.dlp.v2.InspectConfigOrBuilder getInspectConfigOrBuilder(); - - /** - *
-   * The item to re-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return Whether the item field is set. - */ - boolean hasItem(); - /** - *
-   * The item to re-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - * @return The item. - */ - com.google.privacy.dlp.v2.ContentItem getItem(); - /** - *
-   * The item to re-identify. Will be treated as text.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 4; - */ - com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); - - /** - *
-   * Template to use. Any configuration directly specified in
-   * `inspect_config` will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 5; - * @return The inspectTemplateName. - */ - java.lang.String getInspectTemplateName(); - /** - *
-   * Template to use. Any configuration directly specified in
-   * `inspect_config` will override those set in the template. Singular fields
-   * that are set in this request will replace their corresponding fields in the
-   * template. Repeated fields are appended. Singular sub-messages and groups
-   * are recursively merged.
-   * 
- * - * string inspect_template_name = 5; - * @return The bytes for inspectTemplateName. - */ - com.google.protobuf.ByteString - getInspectTemplateNameBytes(); - - /** - *
-   * Template to use. References an instance of `DeidentifyTemplate`.
-   * Any configuration directly specified in `reidentify_config` or
-   * `inspect_config` will override those set in the template. The
-   * `DeidentifyTemplate` used must include only reversible transformations.
-   * Singular fields that are set in this request will replace their
-   * corresponding fields in the template. Repeated fields are appended.
-   * Singular sub-messages and groups are recursively merged.
-   * 
- * - * string reidentify_template_name = 6; - * @return The reidentifyTemplateName. - */ - java.lang.String getReidentifyTemplateName(); - /** - *
-   * Template to use. References an instance of `DeidentifyTemplate`.
-   * Any configuration directly specified in `reidentify_config` or
-   * `inspect_config` will override those set in the template. The
-   * `DeidentifyTemplate` used must include only reversible transformations.
-   * Singular fields that are set in this request will replace their
-   * corresponding fields in the template. Repeated fields are appended.
-   * Singular sub-messages and groups are recursively merged.
-   * 
- * - * string reidentify_template_name = 6; - * @return The bytes for reidentifyTemplateName. - */ - com.google.protobuf.ByteString - getReidentifyTemplateNameBytes(); - - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The locationId. - */ - java.lang.String getLocationId(); - /** - *
-   * Deprecated. This field has no effect.
-   * 
- * - * string location_id = 7; - * @return The bytes for locationId. - */ - com.google.protobuf.ByteString - getLocationIdBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java deleted file mode 100644 index 5da38a8ae729..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponse.java +++ /dev/null @@ -1,901 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Results of re-identifying an item.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentResponse} - */ -public final class ReidentifyContentResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReidentifyContentResponse) - ReidentifyContentResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ReidentifyContentResponse.newBuilder() to construct. - private ReidentifyContentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ReidentifyContentResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ReidentifyContentResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReidentifyContentResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.ContentItem.Builder subBuilder = null; - if (item_ != null) { - subBuilder = item_.toBuilder(); - } - item_ = input.readMessage(com.google.privacy.dlp.v2.ContentItem.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(item_); - item_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.TransformationOverview.Builder subBuilder = null; - if (overview_ != null) { - subBuilder = overview_.toBuilder(); - } - overview_ = input.readMessage(com.google.privacy.dlp.v2.TransformationOverview.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(overview_); - overview_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReidentifyContentResponse.class, com.google.privacy.dlp.v2.ReidentifyContentResponse.Builder.class); - } - - public static final int ITEM_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.ContentItem item_; - /** - *
-   * The re-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return Whether the item field is set. - */ - @java.lang.Override - public boolean hasItem() { - return item_ != null; - } - /** - *
-   * The re-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return The item. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItem getItem() { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - /** - *
-   * The re-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - return getItem(); - } - - public static final int OVERVIEW_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.TransformationOverview overview_; - /** - *
-   * An overview of the changes that were made to the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return Whether the overview field is set. - */ - @java.lang.Override - public boolean hasOverview() { - return overview_ != null; - } - /** - *
-   * An overview of the changes that were made to the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return The overview. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationOverview getOverview() { - return overview_ == null ? com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; - } - /** - *
-   * An overview of the changes that were made to the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder() { - return getOverview(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (item_ != null) { - output.writeMessage(1, getItem()); - } - if (overview_ != null) { - output.writeMessage(2, getOverview()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (item_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getItem()); - } - if (overview_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOverview()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ReidentifyContentResponse)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ReidentifyContentResponse other = (com.google.privacy.dlp.v2.ReidentifyContentResponse) obj; - - if (hasItem() != other.hasItem()) return false; - if (hasItem()) { - if (!getItem() - .equals(other.getItem())) return false; - } - if (hasOverview() != other.hasOverview()) return false; - if (hasOverview()) { - if (!getOverview() - .equals(other.getOverview())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasItem()) { - hash = (37 * hash) + ITEM_FIELD_NUMBER; - hash = (53 * hash) + getItem().hashCode(); - } - if (hasOverview()) { - hash = (37 * hash) + OVERVIEW_FIELD_NUMBER; - hash = (53 * hash) + getOverview().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReidentifyContentResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ReidentifyContentResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Results of re-identifying an item.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReidentifyContentResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReidentifyContentResponse) - com.google.privacy.dlp.v2.ReidentifyContentResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReidentifyContentResponse.class, com.google.privacy.dlp.v2.ReidentifyContentResponse.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ReidentifyContentResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (itemBuilder_ == null) { - item_ = null; - } else { - item_ = null; - itemBuilder_ = null; - } - if (overviewBuilder_ == null) { - overview_ = null; - } else { - overview_ = null; - overviewBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReidentifyContentResponse_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReidentifyContentResponse getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ReidentifyContentResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReidentifyContentResponse build() { - com.google.privacy.dlp.v2.ReidentifyContentResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReidentifyContentResponse buildPartial() { - com.google.privacy.dlp.v2.ReidentifyContentResponse result = new com.google.privacy.dlp.v2.ReidentifyContentResponse(this); - if (itemBuilder_ == null) { - result.item_ = item_; - } else { - result.item_ = itemBuilder_.build(); - } - if (overviewBuilder_ == null) { - result.overview_ = overview_; - } else { - result.overview_ = overviewBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ReidentifyContentResponse) { - return mergeFrom((com.google.privacy.dlp.v2.ReidentifyContentResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ReidentifyContentResponse other) { - if (other == com.google.privacy.dlp.v2.ReidentifyContentResponse.getDefaultInstance()) return this; - if (other.hasItem()) { - mergeItem(other.getItem()); - } - if (other.hasOverview()) { - mergeOverview(other.getOverview()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ReidentifyContentResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ReidentifyContentResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.ContentItem item_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> itemBuilder_; - /** - *
-     * The re-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return Whether the item field is set. - */ - public boolean hasItem() { - return itemBuilder_ != null || item_ != null; - } - /** - *
-     * The re-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return The item. - */ - public com.google.privacy.dlp.v2.ContentItem getItem() { - if (itemBuilder_ == null) { - return item_ == null ? com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } else { - return itemBuilder_.getMessage(); - } - } - /** - *
-     * The re-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder setItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - item_ = value; - onChanged(); - } else { - itemBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The re-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder setItem( - com.google.privacy.dlp.v2.ContentItem.Builder builderForValue) { - if (itemBuilder_ == null) { - item_ = builderForValue.build(); - onChanged(); - } else { - itemBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The re-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder mergeItem(com.google.privacy.dlp.v2.ContentItem value) { - if (itemBuilder_ == null) { - if (item_ != null) { - item_ = - com.google.privacy.dlp.v2.ContentItem.newBuilder(item_).mergeFrom(value).buildPartial(); - } else { - item_ = value; - } - onChanged(); - } else { - itemBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The re-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public Builder clearItem() { - if (itemBuilder_ == null) { - item_ = null; - onChanged(); - } else { - item_ = null; - itemBuilder_ = null; - } - - return this; - } - /** - *
-     * The re-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public com.google.privacy.dlp.v2.ContentItem.Builder getItemBuilder() { - - onChanged(); - return getItemFieldBuilder().getBuilder(); - } - /** - *
-     * The re-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - public com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder() { - if (itemBuilder_ != null) { - return itemBuilder_.getMessageOrBuilder(); - } else { - return item_ == null ? - com.google.privacy.dlp.v2.ContentItem.getDefaultInstance() : item_; - } - } - /** - *
-     * The re-identified item.
-     * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder> - getItemFieldBuilder() { - if (itemBuilder_ == null) { - itemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ContentItem, com.google.privacy.dlp.v2.ContentItem.Builder, com.google.privacy.dlp.v2.ContentItemOrBuilder>( - getItem(), - getParentForChildren(), - isClean()); - item_ = null; - } - return itemBuilder_; - } - - private com.google.privacy.dlp.v2.TransformationOverview overview_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder> overviewBuilder_; - /** - *
-     * An overview of the changes that were made to the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return Whether the overview field is set. - */ - public boolean hasOverview() { - return overviewBuilder_ != null || overview_ != null; - } - /** - *
-     * An overview of the changes that were made to the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return The overview. - */ - public com.google.privacy.dlp.v2.TransformationOverview getOverview() { - if (overviewBuilder_ == null) { - return overview_ == null ? com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; - } else { - return overviewBuilder_.getMessage(); - } - } - /** - *
-     * An overview of the changes that were made to the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public Builder setOverview(com.google.privacy.dlp.v2.TransformationOverview value) { - if (overviewBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - overview_ = value; - onChanged(); - } else { - overviewBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * An overview of the changes that were made to the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public Builder setOverview( - com.google.privacy.dlp.v2.TransformationOverview.Builder builderForValue) { - if (overviewBuilder_ == null) { - overview_ = builderForValue.build(); - onChanged(); - } else { - overviewBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * An overview of the changes that were made to the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public Builder mergeOverview(com.google.privacy.dlp.v2.TransformationOverview value) { - if (overviewBuilder_ == null) { - if (overview_ != null) { - overview_ = - com.google.privacy.dlp.v2.TransformationOverview.newBuilder(overview_).mergeFrom(value).buildPartial(); - } else { - overview_ = value; - } - onChanged(); - } else { - overviewBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * An overview of the changes that were made to the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public Builder clearOverview() { - if (overviewBuilder_ == null) { - overview_ = null; - onChanged(); - } else { - overview_ = null; - overviewBuilder_ = null; - } - - return this; - } - /** - *
-     * An overview of the changes that were made to the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public com.google.privacy.dlp.v2.TransformationOverview.Builder getOverviewBuilder() { - - onChanged(); - return getOverviewFieldBuilder().getBuilder(); - } - /** - *
-     * An overview of the changes that were made to the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - public com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder() { - if (overviewBuilder_ != null) { - return overviewBuilder_.getMessageOrBuilder(); - } else { - return overview_ == null ? - com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance() : overview_; - } - } - /** - *
-     * An overview of the changes that were made to the `item`.
-     * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder> - getOverviewFieldBuilder() { - if (overviewBuilder_ == null) { - overviewBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationOverview, com.google.privacy.dlp.v2.TransformationOverview.Builder, com.google.privacy.dlp.v2.TransformationOverviewOrBuilder>( - getOverview(), - getParentForChildren(), - isClean()); - overview_ = null; - } - return overviewBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReidentifyContentResponse) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReidentifyContentResponse) - private static final com.google.privacy.dlp.v2.ReidentifyContentResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReidentifyContentResponse(); - } - - public static com.google.privacy.dlp.v2.ReidentifyContentResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReidentifyContentResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReidentifyContentResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReidentifyContentResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponseOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponseOrBuilder.java deleted file mode 100644 index a805fd991754..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReidentifyContentResponseOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ReidentifyContentResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReidentifyContentResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The re-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return Whether the item field is set. - */ - boolean hasItem(); - /** - *
-   * The re-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - * @return The item. - */ - com.google.privacy.dlp.v2.ContentItem getItem(); - /** - *
-   * The re-identified item.
-   * 
- * - * .google.privacy.dlp.v2.ContentItem item = 1; - */ - com.google.privacy.dlp.v2.ContentItemOrBuilder getItemOrBuilder(); - - /** - *
-   * An overview of the changes that were made to the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return Whether the overview field is set. - */ - boolean hasOverview(); - /** - *
-   * An overview of the changes that were made to the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - * @return The overview. - */ - com.google.privacy.dlp.v2.TransformationOverview getOverview(); - /** - *
-   * An overview of the changes that were made to the `item`.
-   * 
- * - * .google.privacy.dlp.v2.TransformationOverview overview = 2; - */ - com.google.privacy.dlp.v2.TransformationOverviewOrBuilder getOverviewOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java deleted file mode 100644 index 31c4332e55fd..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RelationalOperator.java +++ /dev/null @@ -1,235 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Operators available for comparing the value of fields.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.RelationalOperator} - */ -public enum RelationalOperator - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unused
-   * 
- * - * RELATIONAL_OPERATOR_UNSPECIFIED = 0; - */ - RELATIONAL_OPERATOR_UNSPECIFIED(0), - /** - *
-   * Equal. Attempts to match even with incompatible types.
-   * 
- * - * EQUAL_TO = 1; - */ - EQUAL_TO(1), - /** - *
-   * Not equal to. Attempts to match even with incompatible types.
-   * 
- * - * NOT_EQUAL_TO = 2; - */ - NOT_EQUAL_TO(2), - /** - *
-   * Greater than.
-   * 
- * - * GREATER_THAN = 3; - */ - GREATER_THAN(3), - /** - *
-   * Less than.
-   * 
- * - * LESS_THAN = 4; - */ - LESS_THAN(4), - /** - *
-   * Greater than or equals.
-   * 
- * - * GREATER_THAN_OR_EQUALS = 5; - */ - GREATER_THAN_OR_EQUALS(5), - /** - *
-   * Less than or equals.
-   * 
- * - * LESS_THAN_OR_EQUALS = 6; - */ - LESS_THAN_OR_EQUALS(6), - /** - *
-   * Exists
-   * 
- * - * EXISTS = 7; - */ - EXISTS(7), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unused
-   * 
- * - * RELATIONAL_OPERATOR_UNSPECIFIED = 0; - */ - public static final int RELATIONAL_OPERATOR_UNSPECIFIED_VALUE = 0; - /** - *
-   * Equal. Attempts to match even with incompatible types.
-   * 
- * - * EQUAL_TO = 1; - */ - public static final int EQUAL_TO_VALUE = 1; - /** - *
-   * Not equal to. Attempts to match even with incompatible types.
-   * 
- * - * NOT_EQUAL_TO = 2; - */ - public static final int NOT_EQUAL_TO_VALUE = 2; - /** - *
-   * Greater than.
-   * 
- * - * GREATER_THAN = 3; - */ - public static final int GREATER_THAN_VALUE = 3; - /** - *
-   * Less than.
-   * 
- * - * LESS_THAN = 4; - */ - public static final int LESS_THAN_VALUE = 4; - /** - *
-   * Greater than or equals.
-   * 
- * - * GREATER_THAN_OR_EQUALS = 5; - */ - public static final int GREATER_THAN_OR_EQUALS_VALUE = 5; - /** - *
-   * Less than or equals.
-   * 
- * - * LESS_THAN_OR_EQUALS = 6; - */ - public static final int LESS_THAN_OR_EQUALS_VALUE = 6; - /** - *
-   * Exists
-   * 
- * - * EXISTS = 7; - */ - public static final int EXISTS_VALUE = 7; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static RelationalOperator valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static RelationalOperator forNumber(int value) { - switch (value) { - case 0: return RELATIONAL_OPERATOR_UNSPECIFIED; - case 1: return EQUAL_TO; - case 2: return NOT_EQUAL_TO; - case 3: return GREATER_THAN; - case 4: return LESS_THAN; - case 5: return GREATER_THAN_OR_EQUALS; - case 6: return LESS_THAN_OR_EQUALS; - case 7: return EXISTS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - RelationalOperator> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RelationalOperator findValueByNumber(int number) { - return RelationalOperator.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(3); - } - - private static final RelationalOperator[] VALUES = values(); - - public static RelationalOperator valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private RelationalOperator(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.RelationalOperator) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfig.java deleted file mode 100644 index f98afeb62d0d..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfig.java +++ /dev/null @@ -1,785 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Replace each input value with a value randomly selected from the dictionary.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReplaceDictionaryConfig} - */ -public final class ReplaceDictionaryConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReplaceDictionaryConfig) - ReplaceDictionaryConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use ReplaceDictionaryConfig.newBuilder() to construct. - private ReplaceDictionaryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ReplaceDictionaryConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ReplaceDictionaryConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReplaceDictionaryConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder subBuilder = null; - if (typeCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReplaceDictionaryConfig.class, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder.class); - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - WORD_LIST(1), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return WORD_LIST; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int WORD_LIST_FIELD_NUMBER = 1; - /** - *
-   * A list of words to select from for random replacement. The
-   * [limits](https://cloud.google.com/dlp/limits) page contains details about
-   * the size limits of dictionaries.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return Whether the wordList field is set. - */ - @java.lang.Override - public boolean hasWordList() { - return typeCase_ == 1; - } - /** - *
-   * A list of words to select from for random replacement. The
-   * [limits](https://cloud.google.com/dlp/limits) page contains details about
-   * the size limits of dictionaries.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return The wordList. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - /** - *
-   * A list of words to select from for random replacement. The
-   * [limits](https://cloud.google.com/dlp/limits) page contains details about
-   * the size limits of dictionaries.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ReplaceDictionaryConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ReplaceDictionaryConfig other = (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) obj; - - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 1: - if (!getWordList() - .equals(other.getWordList())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (typeCase_) { - case 1: - hash = (37 * hash) + WORD_LIST_FIELD_NUMBER; - hash = (53 * hash) + getWordList().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ReplaceDictionaryConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Replace each input value with a value randomly selected from the dictionary.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReplaceDictionaryConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReplaceDictionaryConfig) - com.google.privacy.dlp.v2.ReplaceDictionaryConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReplaceDictionaryConfig.class, com.google.privacy.dlp.v2.ReplaceDictionaryConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ReplaceDictionaryConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceDictionaryConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceDictionaryConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceDictionaryConfig build() { - com.google.privacy.dlp.v2.ReplaceDictionaryConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceDictionaryConfig buildPartial() { - com.google.privacy.dlp.v2.ReplaceDictionaryConfig result = new com.google.privacy.dlp.v2.ReplaceDictionaryConfig(this); - if (typeCase_ == 1) { - if (wordListBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = wordListBuilder_.build(); - } - } - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ReplaceDictionaryConfig) { - return mergeFrom((com.google.privacy.dlp.v2.ReplaceDictionaryConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ReplaceDictionaryConfig other) { - if (other == com.google.privacy.dlp.v2.ReplaceDictionaryConfig.getDefaultInstance()) return this; - switch (other.getTypeCase()) { - case WORD_LIST: { - mergeWordList(other.getWordList()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ReplaceDictionaryConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ReplaceDictionaryConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder> wordListBuilder_; - /** - *
-     * A list of words to select from for random replacement. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return Whether the wordList field is set. - */ - @java.lang.Override - public boolean hasWordList() { - return typeCase_ == 1; - } - /** - *
-     * A list of words to select from for random replacement. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return The wordList. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList() { - if (wordListBuilder_ == null) { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } else { - if (typeCase_ == 1) { - return wordListBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - } - /** - *
-     * A list of words to select from for random replacement. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public Builder setWordList(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) { - if (wordListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - wordListBuilder_.setMessage(value); - } - typeCase_ = 1; - return this; - } - /** - *
-     * A list of words to select from for random replacement. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public Builder setWordList( - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder builderForValue) { - if (wordListBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - wordListBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 1; - return this; - } - /** - *
-     * A list of words to select from for random replacement. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public Builder mergeWordList(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList value) { - if (wordListBuilder_ == null) { - if (typeCase_ == 1 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 1) { - wordListBuilder_.mergeFrom(value); - } else { - wordListBuilder_.setMessage(value); - } - } - typeCase_ = 1; - return this; - } - /** - *
-     * A list of words to select from for random replacement. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public Builder clearWordList() { - if (wordListBuilder_ == null) { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - } - wordListBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of words to select from for random replacement. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder getWordListBuilder() { - return getWordListFieldBuilder().getBuilder(); - } - /** - *
-     * A list of words to select from for random replacement. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder() { - if ((typeCase_ == 1) && (wordListBuilder_ != null)) { - return wordListBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - } - /** - *
-     * A list of words to select from for random replacement. The
-     * [limits](https://cloud.google.com/dlp/limits) page contains details about
-     * the size limits of dictionaries.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder> - getWordListFieldBuilder() { - if (wordListBuilder_ == null) { - if (!(typeCase_ == 1)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.getDefaultInstance(); - } - wordListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.Builder, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 1; - onChanged();; - return wordListBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReplaceDictionaryConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReplaceDictionaryConfig) - private static final com.google.privacy.dlp.v2.ReplaceDictionaryConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReplaceDictionaryConfig(); - } - - public static com.google.privacy.dlp.v2.ReplaceDictionaryConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReplaceDictionaryConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplaceDictionaryConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceDictionaryConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfigOrBuilder.java deleted file mode 100644 index d4ce18a55313..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceDictionaryConfigOrBuilder.java +++ /dev/null @@ -1,44 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ReplaceDictionaryConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReplaceDictionaryConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of words to select from for random replacement. The
-   * [limits](https://cloud.google.com/dlp/limits) page contains details about
-   * the size limits of dictionaries.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return Whether the wordList field is set. - */ - boolean hasWordList(); - /** - *
-   * A list of words to select from for random replacement. The
-   * [limits](https://cloud.google.com/dlp/limits) page contains details about
-   * the size limits of dictionaries.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - * @return The wordList. - */ - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList getWordList(); - /** - *
-   * A list of words to select from for random replacement. The
-   * [limits](https://cloud.google.com/dlp/limits) page contains details about
-   * the size limits of dictionaries.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList word_list = 1; - */ - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordListOrBuilder getWordListOrBuilder(); - - public com.google.privacy.dlp.v2.ReplaceDictionaryConfig.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfig.java deleted file mode 100644 index 452727c9d0f2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfig.java +++ /dev/null @@ -1,665 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Replace each input value with a given `Value`.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReplaceValueConfig} - */ -public final class ReplaceValueConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReplaceValueConfig) - ReplaceValueConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use ReplaceValueConfig.newBuilder() to construct. - private ReplaceValueConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ReplaceValueConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ReplaceValueConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReplaceValueConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (newValue_ != null) { - subBuilder = newValue_.toBuilder(); - } - newValue_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(newValue_); - newValue_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReplaceValueConfig.class, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder.class); - } - - public static final int NEW_VALUE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.Value newValue_; - /** - *
-   * Value to replace it with.
-   * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - * @return Whether the newValue field is set. - */ - @java.lang.Override - public boolean hasNewValue() { - return newValue_ != null; - } - /** - *
-   * Value to replace it with.
-   * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - * @return The newValue. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getNewValue() { - return newValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : newValue_; - } - /** - *
-   * Value to replace it with.
-   * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getNewValueOrBuilder() { - return getNewValue(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (newValue_ != null) { - output.writeMessage(1, getNewValue()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (newValue_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getNewValue()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ReplaceValueConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ReplaceValueConfig other = (com.google.privacy.dlp.v2.ReplaceValueConfig) obj; - - if (hasNewValue() != other.hasNewValue()) return false; - if (hasNewValue()) { - if (!getNewValue() - .equals(other.getNewValue())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasNewValue()) { - hash = (37 * hash) + NEW_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getNewValue().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReplaceValueConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ReplaceValueConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Replace each input value with a given `Value`.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReplaceValueConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReplaceValueConfig) - com.google.privacy.dlp.v2.ReplaceValueConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReplaceValueConfig.class, com.google.privacy.dlp.v2.ReplaceValueConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ReplaceValueConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (newValueBuilder_ == null) { - newValue_ = null; - } else { - newValue_ = null; - newValueBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceValueConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceValueConfig build() { - com.google.privacy.dlp.v2.ReplaceValueConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceValueConfig buildPartial() { - com.google.privacy.dlp.v2.ReplaceValueConfig result = new com.google.privacy.dlp.v2.ReplaceValueConfig(this); - if (newValueBuilder_ == null) { - result.newValue_ = newValue_; - } else { - result.newValue_ = newValueBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ReplaceValueConfig) { - return mergeFrom((com.google.privacy.dlp.v2.ReplaceValueConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ReplaceValueConfig other) { - if (other == com.google.privacy.dlp.v2.ReplaceValueConfig.getDefaultInstance()) return this; - if (other.hasNewValue()) { - mergeNewValue(other.getNewValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ReplaceValueConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ReplaceValueConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.Value newValue_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> newValueBuilder_; - /** - *
-     * Value to replace it with.
-     * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - * @return Whether the newValue field is set. - */ - public boolean hasNewValue() { - return newValueBuilder_ != null || newValue_ != null; - } - /** - *
-     * Value to replace it with.
-     * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - * @return The newValue. - */ - public com.google.privacy.dlp.v2.Value getNewValue() { - if (newValueBuilder_ == null) { - return newValue_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : newValue_; - } else { - return newValueBuilder_.getMessage(); - } - } - /** - *
-     * Value to replace it with.
-     * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - */ - public Builder setNewValue(com.google.privacy.dlp.v2.Value value) { - if (newValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - newValue_ = value; - onChanged(); - } else { - newValueBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Value to replace it with.
-     * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - */ - public Builder setNewValue( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (newValueBuilder_ == null) { - newValue_ = builderForValue.build(); - onChanged(); - } else { - newValueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Value to replace it with.
-     * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - */ - public Builder mergeNewValue(com.google.privacy.dlp.v2.Value value) { - if (newValueBuilder_ == null) { - if (newValue_ != null) { - newValue_ = - com.google.privacy.dlp.v2.Value.newBuilder(newValue_).mergeFrom(value).buildPartial(); - } else { - newValue_ = value; - } - onChanged(); - } else { - newValueBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Value to replace it with.
-     * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - */ - public Builder clearNewValue() { - if (newValueBuilder_ == null) { - newValue_ = null; - onChanged(); - } else { - newValue_ = null; - newValueBuilder_ = null; - } - - return this; - } - /** - *
-     * Value to replace it with.
-     * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder getNewValueBuilder() { - - onChanged(); - return getNewValueFieldBuilder().getBuilder(); - } - /** - *
-     * Value to replace it with.
-     * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getNewValueOrBuilder() { - if (newValueBuilder_ != null) { - return newValueBuilder_.getMessageOrBuilder(); - } else { - return newValue_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : newValue_; - } - } - /** - *
-     * Value to replace it with.
-     * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getNewValueFieldBuilder() { - if (newValueBuilder_ == null) { - newValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getNewValue(), - getParentForChildren(), - isClean()); - newValue_ = null; - } - return newValueBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReplaceValueConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReplaceValueConfig) - private static final com.google.privacy.dlp.v2.ReplaceValueConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReplaceValueConfig(); - } - - public static com.google.privacy.dlp.v2.ReplaceValueConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReplaceValueConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplaceValueConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceValueConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfigOrBuilder.java deleted file mode 100644 index 61fbf07fc518..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceValueConfigOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ReplaceValueConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReplaceValueConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Value to replace it with.
-   * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - * @return Whether the newValue field is set. - */ - boolean hasNewValue(); - /** - *
-   * Value to replace it with.
-   * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - * @return The newValue. - */ - com.google.privacy.dlp.v2.Value getNewValue(); - /** - *
-   * Value to replace it with.
-   * 
- * - * .google.privacy.dlp.v2.Value new_value = 1; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getNewValueOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfig.java deleted file mode 100644 index 49d41adcc78e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfig.java +++ /dev/null @@ -1,429 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Replace each matching finding with the name of the info_type.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReplaceWithInfoTypeConfig} - */ -public final class ReplaceWithInfoTypeConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) - ReplaceWithInfoTypeConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use ReplaceWithInfoTypeConfig.newBuilder() to construct. - private ReplaceWithInfoTypeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ReplaceWithInfoTypeConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ReplaceWithInfoTypeConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReplaceWithInfoTypeConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.class, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig other = (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Replace each matching finding with the name of the info_type.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ReplaceWithInfoTypeConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.class, com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig build() { - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig buildPartial() { - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig result = new com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) { - return mergeFrom((com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig other) { - if (other == com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) - private static final com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig(); - } - - public static com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReplaceWithInfoTypeConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplaceWithInfoTypeConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfigOrBuilder.java deleted file mode 100644 index 8f9400b276d6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ReplaceWithInfoTypeConfigOrBuilder.java +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ReplaceWithInfoTypeConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) - com.google.protobuf.MessageOrBuilder { -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java deleted file mode 100644 index f0ba9260b426..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ResourceVisibility.java +++ /dev/null @@ -1,151 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * How broadly a resource has been shared. New items may be added over time.
- * A higher number means more restricted.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.ResourceVisibility} - */ -public enum ResourceVisibility - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unused.
-   * 
- * - * RESOURCE_VISIBILITY_UNSPECIFIED = 0; - */ - RESOURCE_VISIBILITY_UNSPECIFIED(0), - /** - *
-   * Visible to any user.
-   * 
- * - * RESOURCE_VISIBILITY_PUBLIC = 10; - */ - RESOURCE_VISIBILITY_PUBLIC(10), - /** - *
-   * Visible only to specific users.
-   * 
- * - * RESOURCE_VISIBILITY_RESTRICTED = 20; - */ - RESOURCE_VISIBILITY_RESTRICTED(20), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unused.
-   * 
- * - * RESOURCE_VISIBILITY_UNSPECIFIED = 0; - */ - public static final int RESOURCE_VISIBILITY_UNSPECIFIED_VALUE = 0; - /** - *
-   * Visible to any user.
-   * 
- * - * RESOURCE_VISIBILITY_PUBLIC = 10; - */ - public static final int RESOURCE_VISIBILITY_PUBLIC_VALUE = 10; - /** - *
-   * Visible only to specific users.
-   * 
- * - * RESOURCE_VISIBILITY_RESTRICTED = 20; - */ - public static final int RESOURCE_VISIBILITY_RESTRICTED_VALUE = 20; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ResourceVisibility valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ResourceVisibility forNumber(int value) { - switch (value) { - case 0: return RESOURCE_VISIBILITY_UNSPECIFIED; - case 10: return RESOURCE_VISIBILITY_PUBLIC; - case 20: return RESOURCE_VISIBILITY_RESTRICTED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ResourceVisibility> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ResourceVisibility findValueByNumber(int number) { - return ResourceVisibility.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(10); - } - - private static final ResourceVisibility[] VALUES = values(); - - public static ResourceVisibility valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ResourceVisibility(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.ResourceVisibility) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java deleted file mode 100644 index a512fc3e744f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java +++ /dev/null @@ -1,1369 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Configuration for a risk analysis job. See
- * https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RiskAnalysisJobConfig} - */ -public final class RiskAnalysisJobConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.RiskAnalysisJobConfig) - RiskAnalysisJobConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use RiskAnalysisJobConfig.newBuilder() to construct. - private RiskAnalysisJobConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RiskAnalysisJobConfig() { - actions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RiskAnalysisJobConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RiskAnalysisJobConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.PrivacyMetric.Builder subBuilder = null; - if (privacyMetric_ != null) { - subBuilder = privacyMetric_.toBuilder(); - } - privacyMetric_ = input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(privacyMetric_); - privacyMetric_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (sourceTable_ != null) { - subBuilder = sourceTable_.toBuilder(); - } - sourceTable_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceTable_); - sourceTable_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - actions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - actions_.add( - input.readMessage(com.google.privacy.dlp.v2.Action.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RiskAnalysisJobConfig.class, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder.class); - } - - public static final int PRIVACY_METRIC_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.PrivacyMetric privacyMetric_; - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - * @return Whether the privacyMetric field is set. - */ - @java.lang.Override - public boolean hasPrivacyMetric() { - return privacyMetric_ != null; - } - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - * @return The privacyMetric. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetric getPrivacyMetric() { - return privacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : privacyMetric_; - } - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getPrivacyMetricOrBuilder() { - return getPrivacyMetric(); - } - - public static final int SOURCE_TABLE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.BigQueryTable sourceTable_; - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - * @return Whether the sourceTable field is set. - */ - @java.lang.Override - public boolean hasSourceTable() { - return sourceTable_ != null; - } - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - * @return The sourceTable. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getSourceTable() { - return sourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : sourceTable_; - } - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getSourceTableOrBuilder() { - return getSourceTable(); - } - - public static final int ACTIONS_FIELD_NUMBER = 3; - private java.util.List actions_; - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; - } - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); - } - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Action getActions(int index) { - return actions_.get(index); - } - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (privacyMetric_ != null) { - output.writeMessage(1, getPrivacyMetric()); - } - if (sourceTable_ != null) { - output.writeMessage(2, getSourceTable()); - } - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(3, actions_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (privacyMetric_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getPrivacyMetric()); - } - if (sourceTable_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSourceTable()); - } - for (int i = 0; i < actions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, actions_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.RiskAnalysisJobConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.RiskAnalysisJobConfig other = (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) obj; - - if (hasPrivacyMetric() != other.hasPrivacyMetric()) return false; - if (hasPrivacyMetric()) { - if (!getPrivacyMetric() - .equals(other.getPrivacyMetric())) return false; - } - if (hasSourceTable() != other.hasSourceTable()) return false; - if (hasSourceTable()) { - if (!getSourceTable() - .equals(other.getSourceTable())) return false; - } - if (!getActionsList() - .equals(other.getActionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPrivacyMetric()) { - hash = (37 * hash) + PRIVACY_METRIC_FIELD_NUMBER; - hash = (53 * hash) + getPrivacyMetric().hashCode(); - } - if (hasSourceTable()) { - hash = (37 * hash) + SOURCE_TABLE_FIELD_NUMBER; - hash = (53 * hash) + getSourceTable().hashCode(); - } - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.RiskAnalysisJobConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Configuration for a risk analysis job. See
-   * https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.RiskAnalysisJobConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.RiskAnalysisJobConfig) - com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.RiskAnalysisJobConfig.class, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.RiskAnalysisJobConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getActionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (privacyMetricBuilder_ == null) { - privacyMetric_ = null; - } else { - privacyMetric_ = null; - privacyMetricBuilder_ = null; - } - if (sourceTableBuilder_ == null) { - sourceTable_ = null; - } else { - sourceTable_ = null; - sourceTableBuilder_ = null; - } - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - actionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig build() { - com.google.privacy.dlp.v2.RiskAnalysisJobConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig buildPartial() { - com.google.privacy.dlp.v2.RiskAnalysisJobConfig result = new com.google.privacy.dlp.v2.RiskAnalysisJobConfig(this); - int from_bitField0_ = bitField0_; - if (privacyMetricBuilder_ == null) { - result.privacyMetric_ = privacyMetric_; - } else { - result.privacyMetric_ = privacyMetricBuilder_.build(); - } - if (sourceTableBuilder_ == null) { - result.sourceTable_ = sourceTable_; - } else { - result.sourceTable_ = sourceTableBuilder_.build(); - } - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.RiskAnalysisJobConfig) { - return mergeFrom((com.google.privacy.dlp.v2.RiskAnalysisJobConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.RiskAnalysisJobConfig other) { - if (other == com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance()) return this; - if (other.hasPrivacyMetric()) { - mergePrivacyMetric(other.getPrivacyMetric()); - } - if (other.hasSourceTable()) { - mergeSourceTable(other.getSourceTable()); - } - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); - } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000001); - actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionsFieldBuilder() : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.RiskAnalysisJobConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.PrivacyMetric privacyMetric_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder> privacyMetricBuilder_; - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - * @return Whether the privacyMetric field is set. - */ - public boolean hasPrivacyMetric() { - return privacyMetricBuilder_ != null || privacyMetric_ != null; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - * @return The privacyMetric. - */ - public com.google.privacy.dlp.v2.PrivacyMetric getPrivacyMetric() { - if (privacyMetricBuilder_ == null) { - return privacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : privacyMetric_; - } else { - return privacyMetricBuilder_.getMessage(); - } - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - */ - public Builder setPrivacyMetric(com.google.privacy.dlp.v2.PrivacyMetric value) { - if (privacyMetricBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - privacyMetric_ = value; - onChanged(); - } else { - privacyMetricBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - */ - public Builder setPrivacyMetric( - com.google.privacy.dlp.v2.PrivacyMetric.Builder builderForValue) { - if (privacyMetricBuilder_ == null) { - privacyMetric_ = builderForValue.build(); - onChanged(); - } else { - privacyMetricBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - */ - public Builder mergePrivacyMetric(com.google.privacy.dlp.v2.PrivacyMetric value) { - if (privacyMetricBuilder_ == null) { - if (privacyMetric_ != null) { - privacyMetric_ = - com.google.privacy.dlp.v2.PrivacyMetric.newBuilder(privacyMetric_).mergeFrom(value).buildPartial(); - } else { - privacyMetric_ = value; - } - onChanged(); - } else { - privacyMetricBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - */ - public Builder clearPrivacyMetric() { - if (privacyMetricBuilder_ == null) { - privacyMetric_ = null; - onChanged(); - } else { - privacyMetric_ = null; - privacyMetricBuilder_ = null; - } - - return this; - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.Builder getPrivacyMetricBuilder() { - - onChanged(); - return getPrivacyMetricFieldBuilder().getBuilder(); - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - */ - public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getPrivacyMetricOrBuilder() { - if (privacyMetricBuilder_ != null) { - return privacyMetricBuilder_.getMessageOrBuilder(); - } else { - return privacyMetric_ == null ? - com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : privacyMetric_; - } - } - /** - *
-     * Privacy metric to compute.
-     * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder> - getPrivacyMetricFieldBuilder() { - if (privacyMetricBuilder_ == null) { - privacyMetricBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrivacyMetric, com.google.privacy.dlp.v2.PrivacyMetric.Builder, com.google.privacy.dlp.v2.PrivacyMetricOrBuilder>( - getPrivacyMetric(), - getParentForChildren(), - isClean()); - privacyMetric_ = null; - } - return privacyMetricBuilder_; - } - - private com.google.privacy.dlp.v2.BigQueryTable sourceTable_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> sourceTableBuilder_; - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - * @return Whether the sourceTable field is set. - */ - public boolean hasSourceTable() { - return sourceTableBuilder_ != null || sourceTable_ != null; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - * @return The sourceTable. - */ - public com.google.privacy.dlp.v2.BigQueryTable getSourceTable() { - if (sourceTableBuilder_ == null) { - return sourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : sourceTable_; - } else { - return sourceTableBuilder_.getMessage(); - } - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - */ - public Builder setSourceTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (sourceTableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sourceTable_ = value; - onChanged(); - } else { - sourceTableBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - */ - public Builder setSourceTable( - com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { - if (sourceTableBuilder_ == null) { - sourceTable_ = builderForValue.build(); - onChanged(); - } else { - sourceTableBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - */ - public Builder mergeSourceTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (sourceTableBuilder_ == null) { - if (sourceTable_ != null) { - sourceTable_ = - com.google.privacy.dlp.v2.BigQueryTable.newBuilder(sourceTable_).mergeFrom(value).buildPartial(); - } else { - sourceTable_ = value; - } - onChanged(); - } else { - sourceTableBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - */ - public Builder clearSourceTable() { - if (sourceTableBuilder_ == null) { - sourceTable_ = null; - onChanged(); - } else { - sourceTable_ = null; - sourceTableBuilder_ = null; - } - - return this; - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - */ - public com.google.privacy.dlp.v2.BigQueryTable.Builder getSourceTableBuilder() { - - onChanged(); - return getSourceTableFieldBuilder().getBuilder(); - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - */ - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getSourceTableOrBuilder() { - if (sourceTableBuilder_ != null) { - return sourceTableBuilder_.getMessageOrBuilder(); - } else { - return sourceTable_ == null ? - com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : sourceTable_; - } - } - /** - *
-     * Input dataset to compute metrics over.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> - getSourceTableFieldBuilder() { - if (sourceTableBuilder_ == null) { - sourceTableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( - getSourceTable(), - getParentForChildren(), - isClean()); - sourceTable_ = null; - } - return sourceTableBuilder_; - } - - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder> actionsBuilder_; - - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public com.google.privacy.dlp.v2.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public Builder setActions( - int index, com.google.privacy.dlp.v2.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public Builder setActions( - int index, com.google.privacy.dlp.v2.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public Builder addActions(com.google.privacy.dlp.v2.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public Builder addActions( - int index, com.google.privacy.dlp.v2.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public Builder addActions( - com.google.privacy.dlp.v2.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public Builder addActions( - int index, com.google.privacy.dlp.v2.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public Builder addAllActions( - java.lang.Iterable values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - actionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public com.google.privacy.dlp.v2.Action.Builder getActionsBuilder( - int index) { - return getActionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( - int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public java.util.List - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public com.google.privacy.dlp.v2.Action.Builder addActionsBuilder() { - return getActionsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Action.getDefaultInstance()); - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public com.google.privacy.dlp.v2.Action.Builder addActionsBuilder( - int index) { - return getActionsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Action.getDefaultInstance()); - } - /** - *
-     * Actions to execute at the completion of the job. Are executed in the order
-     * provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - public java.util.List - getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder> - getActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Action, com.google.privacy.dlp.v2.Action.Builder, com.google.privacy.dlp.v2.ActionOrBuilder>( - actions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - actions_ = null; - } - return actionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.RiskAnalysisJobConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.RiskAnalysisJobConfig) - private static final com.google.privacy.dlp.v2.RiskAnalysisJobConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.RiskAnalysisJobConfig(); - } - - public static com.google.privacy.dlp.v2.RiskAnalysisJobConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RiskAnalysisJobConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RiskAnalysisJobConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfigOrBuilder.java deleted file mode 100644 index c3f296ca1358..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfigOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface RiskAnalysisJobConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.RiskAnalysisJobConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - * @return Whether the privacyMetric field is set. - */ - boolean hasPrivacyMetric(); - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - * @return The privacyMetric. - */ - com.google.privacy.dlp.v2.PrivacyMetric getPrivacyMetric(); - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric privacy_metric = 1; - */ - com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getPrivacyMetricOrBuilder(); - - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - * @return Whether the sourceTable field is set. - */ - boolean hasSourceTable(); - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - * @return The sourceTable. - */ - com.google.privacy.dlp.v2.BigQueryTable getSourceTable(); - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable source_table = 2; - */ - com.google.privacy.dlp.v2.BigQueryTableOrBuilder getSourceTableOrBuilder(); - - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - java.util.List - getActionsList(); - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - com.google.privacy.dlp.v2.Action getActions(int index); - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - int getActionsCount(); - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - java.util.List - getActionsOrBuilderList(); - /** - *
-   * Actions to execute at the completion of the job. Are executed in the order
-   * provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.Action actions = 3; - */ - com.google.privacy.dlp.v2.ActionOrBuilder getActionsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java deleted file mode 100644 index 6e693ddb6dfb..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java +++ /dev/null @@ -1,821 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Schedule for inspect job triggers.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Schedule} - */ -public final class Schedule extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Schedule) - ScheduleOrBuilder { -private static final long serialVersionUID = 0L; - // Use Schedule.newBuilder() to construct. - private Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Schedule() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Schedule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Schedule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Duration.Builder subBuilder = null; - if (optionCase_ == 1) { - subBuilder = ((com.google.protobuf.Duration) option_).toBuilder(); - } - option_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Duration) option_); - option_ = subBuilder.buildPartial(); - } - optionCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Schedule.class, com.google.privacy.dlp.v2.Schedule.Builder.class); - } - - private int optionCase_ = 0; - private java.lang.Object option_; - public enum OptionCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - RECURRENCE_PERIOD_DURATION(1), - OPTION_NOT_SET(0); - private final int value; - private OptionCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OptionCase valueOf(int value) { - return forNumber(value); - } - - public static OptionCase forNumber(int value) { - switch (value) { - case 1: return RECURRENCE_PERIOD_DURATION; - case 0: return OPTION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OptionCase - getOptionCase() { - return OptionCase.forNumber( - optionCase_); - } - - public static final int RECURRENCE_PERIOD_DURATION_FIELD_NUMBER = 1; - /** - *
-   * With this option a job is started on a regular periodic basis. For
-   * example: every day (86400 seconds).
-   * A scheduled start time will be skipped if the previous
-   * execution has not ended when its scheduled time occurs.
-   * This value must be set to a time duration greater than or equal
-   * to 1 day and can be no longer than 60 days.
-   * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - * @return Whether the recurrencePeriodDuration field is set. - */ - @java.lang.Override - public boolean hasRecurrencePeriodDuration() { - return optionCase_ == 1; - } - /** - *
-   * With this option a job is started on a regular periodic basis. For
-   * example: every day (86400 seconds).
-   * A scheduled start time will be skipped if the previous
-   * execution has not ended when its scheduled time occurs.
-   * This value must be set to a time duration greater than or equal
-   * to 1 day and can be no longer than 60 days.
-   * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - * @return The recurrencePeriodDuration. - */ - @java.lang.Override - public com.google.protobuf.Duration getRecurrencePeriodDuration() { - if (optionCase_ == 1) { - return (com.google.protobuf.Duration) option_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - /** - *
-   * With this option a job is started on a regular periodic basis. For
-   * example: every day (86400 seconds).
-   * A scheduled start time will be skipped if the previous
-   * execution has not ended when its scheduled time occurs.
-   * This value must be set to a time duration greater than or equal
-   * to 1 day and can be no longer than 60 days.
-   * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getRecurrencePeriodDurationOrBuilder() { - if (optionCase_ == 1) { - return (com.google.protobuf.Duration) option_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (optionCase_ == 1) { - output.writeMessage(1, (com.google.protobuf.Duration) option_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (optionCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.protobuf.Duration) option_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Schedule)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Schedule other = (com.google.privacy.dlp.v2.Schedule) obj; - - if (!getOptionCase().equals(other.getOptionCase())) return false; - switch (optionCase_) { - case 1: - if (!getRecurrencePeriodDuration() - .equals(other.getRecurrencePeriodDuration())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (optionCase_) { - case 1: - hash = (37 * hash) + RECURRENCE_PERIOD_DURATION_FIELD_NUMBER; - hash = (53 * hash) + getRecurrencePeriodDuration().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Schedule parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Schedule parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Schedule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Schedule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Schedule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Schedule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Schedule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Schedule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Schedule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Schedule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Schedule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Schedule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Schedule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Schedule for inspect job triggers.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Schedule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Schedule) - com.google.privacy.dlp.v2.ScheduleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Schedule.class, com.google.privacy.dlp.v2.Schedule.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Schedule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - optionCase_ = 0; - option_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Schedule_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Schedule getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Schedule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Schedule build() { - com.google.privacy.dlp.v2.Schedule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Schedule buildPartial() { - com.google.privacy.dlp.v2.Schedule result = new com.google.privacy.dlp.v2.Schedule(this); - if (optionCase_ == 1) { - if (recurrencePeriodDurationBuilder_ == null) { - result.option_ = option_; - } else { - result.option_ = recurrencePeriodDurationBuilder_.build(); - } - } - result.optionCase_ = optionCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Schedule) { - return mergeFrom((com.google.privacy.dlp.v2.Schedule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Schedule other) { - if (other == com.google.privacy.dlp.v2.Schedule.getDefaultInstance()) return this; - switch (other.getOptionCase()) { - case RECURRENCE_PERIOD_DURATION: { - mergeRecurrencePeriodDuration(other.getRecurrencePeriodDuration()); - break; - } - case OPTION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Schedule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Schedule) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int optionCase_ = 0; - private java.lang.Object option_; - public OptionCase - getOptionCase() { - return OptionCase.forNumber( - optionCase_); - } - - public Builder clearOption() { - optionCase_ = 0; - option_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> recurrencePeriodDurationBuilder_; - /** - *
-     * With this option a job is started on a regular periodic basis. For
-     * example: every day (86400 seconds).
-     * A scheduled start time will be skipped if the previous
-     * execution has not ended when its scheduled time occurs.
-     * This value must be set to a time duration greater than or equal
-     * to 1 day and can be no longer than 60 days.
-     * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - * @return Whether the recurrencePeriodDuration field is set. - */ - @java.lang.Override - public boolean hasRecurrencePeriodDuration() { - return optionCase_ == 1; - } - /** - *
-     * With this option a job is started on a regular periodic basis. For
-     * example: every day (86400 seconds).
-     * A scheduled start time will be skipped if the previous
-     * execution has not ended when its scheduled time occurs.
-     * This value must be set to a time duration greater than or equal
-     * to 1 day and can be no longer than 60 days.
-     * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - * @return The recurrencePeriodDuration. - */ - @java.lang.Override - public com.google.protobuf.Duration getRecurrencePeriodDuration() { - if (recurrencePeriodDurationBuilder_ == null) { - if (optionCase_ == 1) { - return (com.google.protobuf.Duration) option_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } else { - if (optionCase_ == 1) { - return recurrencePeriodDurationBuilder_.getMessage(); - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * With this option a job is started on a regular periodic basis. For
-     * example: every day (86400 seconds).
-     * A scheduled start time will be skipped if the previous
-     * execution has not ended when its scheduled time occurs.
-     * This value must be set to a time duration greater than or equal
-     * to 1 day and can be no longer than 60 days.
-     * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - */ - public Builder setRecurrencePeriodDuration(com.google.protobuf.Duration value) { - if (recurrencePeriodDurationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - option_ = value; - onChanged(); - } else { - recurrencePeriodDurationBuilder_.setMessage(value); - } - optionCase_ = 1; - return this; - } - /** - *
-     * With this option a job is started on a regular periodic basis. For
-     * example: every day (86400 seconds).
-     * A scheduled start time will be skipped if the previous
-     * execution has not ended when its scheduled time occurs.
-     * This value must be set to a time duration greater than or equal
-     * to 1 day and can be no longer than 60 days.
-     * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - */ - public Builder setRecurrencePeriodDuration( - com.google.protobuf.Duration.Builder builderForValue) { - if (recurrencePeriodDurationBuilder_ == null) { - option_ = builderForValue.build(); - onChanged(); - } else { - recurrencePeriodDurationBuilder_.setMessage(builderForValue.build()); - } - optionCase_ = 1; - return this; - } - /** - *
-     * With this option a job is started on a regular periodic basis. For
-     * example: every day (86400 seconds).
-     * A scheduled start time will be skipped if the previous
-     * execution has not ended when its scheduled time occurs.
-     * This value must be set to a time duration greater than or equal
-     * to 1 day and can be no longer than 60 days.
-     * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - */ - public Builder mergeRecurrencePeriodDuration(com.google.protobuf.Duration value) { - if (recurrencePeriodDurationBuilder_ == null) { - if (optionCase_ == 1 && - option_ != com.google.protobuf.Duration.getDefaultInstance()) { - option_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) option_) - .mergeFrom(value).buildPartial(); - } else { - option_ = value; - } - onChanged(); - } else { - if (optionCase_ == 1) { - recurrencePeriodDurationBuilder_.mergeFrom(value); - } else { - recurrencePeriodDurationBuilder_.setMessage(value); - } - } - optionCase_ = 1; - return this; - } - /** - *
-     * With this option a job is started on a regular periodic basis. For
-     * example: every day (86400 seconds).
-     * A scheduled start time will be skipped if the previous
-     * execution has not ended when its scheduled time occurs.
-     * This value must be set to a time duration greater than or equal
-     * to 1 day and can be no longer than 60 days.
-     * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - */ - public Builder clearRecurrencePeriodDuration() { - if (recurrencePeriodDurationBuilder_ == null) { - if (optionCase_ == 1) { - optionCase_ = 0; - option_ = null; - onChanged(); - } - } else { - if (optionCase_ == 1) { - optionCase_ = 0; - option_ = null; - } - recurrencePeriodDurationBuilder_.clear(); - } - return this; - } - /** - *
-     * With this option a job is started on a regular periodic basis. For
-     * example: every day (86400 seconds).
-     * A scheduled start time will be skipped if the previous
-     * execution has not ended when its scheduled time occurs.
-     * This value must be set to a time duration greater than or equal
-     * to 1 day and can be no longer than 60 days.
-     * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - */ - public com.google.protobuf.Duration.Builder getRecurrencePeriodDurationBuilder() { - return getRecurrencePeriodDurationFieldBuilder().getBuilder(); - } - /** - *
-     * With this option a job is started on a regular periodic basis. For
-     * example: every day (86400 seconds).
-     * A scheduled start time will be skipped if the previous
-     * execution has not ended when its scheduled time occurs.
-     * This value must be set to a time duration greater than or equal
-     * to 1 day and can be no longer than 60 days.
-     * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getRecurrencePeriodDurationOrBuilder() { - if ((optionCase_ == 1) && (recurrencePeriodDurationBuilder_ != null)) { - return recurrencePeriodDurationBuilder_.getMessageOrBuilder(); - } else { - if (optionCase_ == 1) { - return (com.google.protobuf.Duration) option_; - } - return com.google.protobuf.Duration.getDefaultInstance(); - } - } - /** - *
-     * With this option a job is started on a regular periodic basis. For
-     * example: every day (86400 seconds).
-     * A scheduled start time will be skipped if the previous
-     * execution has not ended when its scheduled time occurs.
-     * This value must be set to a time duration greater than or equal
-     * to 1 day and can be no longer than 60 days.
-     * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getRecurrencePeriodDurationFieldBuilder() { - if (recurrencePeriodDurationBuilder_ == null) { - if (!(optionCase_ == 1)) { - option_ = com.google.protobuf.Duration.getDefaultInstance(); - } - recurrencePeriodDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - (com.google.protobuf.Duration) option_, - getParentForChildren(), - isClean()); - option_ = null; - } - optionCase_ = 1; - onChanged();; - return recurrencePeriodDurationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Schedule) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Schedule) - private static final com.google.privacy.dlp.v2.Schedule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Schedule(); - } - - public static com.google.privacy.dlp.v2.Schedule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Schedule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Schedule(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Schedule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java deleted file mode 100644 index e86a68c3c9f8..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ScheduleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Schedule) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * With this option a job is started on a regular periodic basis. For
-   * example: every day (86400 seconds).
-   * A scheduled start time will be skipped if the previous
-   * execution has not ended when its scheduled time occurs.
-   * This value must be set to a time duration greater than or equal
-   * to 1 day and can be no longer than 60 days.
-   * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - * @return Whether the recurrencePeriodDuration field is set. - */ - boolean hasRecurrencePeriodDuration(); - /** - *
-   * With this option a job is started on a regular periodic basis. For
-   * example: every day (86400 seconds).
-   * A scheduled start time will be skipped if the previous
-   * execution has not ended when its scheduled time occurs.
-   * This value must be set to a time duration greater than or equal
-   * to 1 day and can be no longer than 60 days.
-   * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - * @return The recurrencePeriodDuration. - */ - com.google.protobuf.Duration getRecurrencePeriodDuration(); - /** - *
-   * With this option a job is started on a regular periodic basis. For
-   * example: every day (86400 seconds).
-   * A scheduled start time will be skipped if the previous
-   * execution has not ended when its scheduled time occurs.
-   * This value must be set to a time duration greater than or equal
-   * to 1 day and can be no longer than 60 days.
-   * 
- * - * .google.protobuf.Duration recurrence_period_duration = 1; - */ - com.google.protobuf.DurationOrBuilder getRecurrencePeriodDurationOrBuilder(); - - public com.google.privacy.dlp.v2.Schedule.OptionCase getOptionCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java deleted file mode 100644 index 9c8a683fea84..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScore.java +++ /dev/null @@ -1,725 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Score is a summary of all elements in the data profile.
- * A higher number means more sensitive.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.SensitivityScore} - */ -public final class SensitivityScore extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.SensitivityScore) - SensitivityScoreOrBuilder { -private static final long serialVersionUID = 0L; - // Use SensitivityScore.newBuilder() to construct. - private SensitivityScore(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SensitivityScore() { - score_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SensitivityScore(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SensitivityScore( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - score_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.SensitivityScore.class, com.google.privacy.dlp.v2.SensitivityScore.Builder.class); - } - - /** - *
-   * Various score levels for resources.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel} - */ - public enum SensitivityScoreLevel - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * SENSITIVITY_SCORE_UNSPECIFIED = 0; - */ - SENSITIVITY_SCORE_UNSPECIFIED(0), - /** - *
-     * No sensitive information detected. Limited access.
-     * 
- * - * SENSITIVITY_LOW = 10; - */ - SENSITIVITY_LOW(10), - /** - *
-     * Medium risk - PII, potentially sensitive data, or fields with free-text
-     * data that are at higher risk of having intermittent sensitive data.
-     * Consider limiting access.
-     * 
- * - * SENSITIVITY_MODERATE = 20; - */ - SENSITIVITY_MODERATE(20), - /** - *
-     * High risk – SPII may be present. Exfiltration of data may lead to user
-     * data loss. Re-identification of users may be possible. Consider limiting
-     * usage and or removing SPII.
-     * 
- * - * SENSITIVITY_HIGH = 30; - */ - SENSITIVITY_HIGH(30), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * SENSITIVITY_SCORE_UNSPECIFIED = 0; - */ - public static final int SENSITIVITY_SCORE_UNSPECIFIED_VALUE = 0; - /** - *
-     * No sensitive information detected. Limited access.
-     * 
- * - * SENSITIVITY_LOW = 10; - */ - public static final int SENSITIVITY_LOW_VALUE = 10; - /** - *
-     * Medium risk - PII, potentially sensitive data, or fields with free-text
-     * data that are at higher risk of having intermittent sensitive data.
-     * Consider limiting access.
-     * 
- * - * SENSITIVITY_MODERATE = 20; - */ - public static final int SENSITIVITY_MODERATE_VALUE = 20; - /** - *
-     * High risk – SPII may be present. Exfiltration of data may lead to user
-     * data loss. Re-identification of users may be possible. Consider limiting
-     * usage and or removing SPII.
-     * 
- * - * SENSITIVITY_HIGH = 30; - */ - public static final int SENSITIVITY_HIGH_VALUE = 30; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SensitivityScoreLevel valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static SensitivityScoreLevel forNumber(int value) { - switch (value) { - case 0: return SENSITIVITY_SCORE_UNSPECIFIED; - case 10: return SENSITIVITY_LOW; - case 20: return SENSITIVITY_MODERATE; - case 30: return SENSITIVITY_HIGH; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SensitivityScoreLevel> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public SensitivityScoreLevel findValueByNumber(int number) { - return SensitivityScoreLevel.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.SensitivityScore.getDescriptor().getEnumTypes().get(0); - } - - private static final SensitivityScoreLevel[] VALUES = values(); - - public static SensitivityScoreLevel valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private SensitivityScoreLevel(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel) - } - - public static final int SCORE_FIELD_NUMBER = 1; - private int score_; - /** - *
-   * The score applied to the resource.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; - * @return The enum numeric value on the wire for score. - */ - @java.lang.Override public int getScoreValue() { - return score_; - } - /** - *
-   * The score applied to the resource.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; - * @return The score. - */ - @java.lang.Override public com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel getScore() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel result = com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.valueOf(score_); - return result == null ? com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (score_ != com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.SENSITIVITY_SCORE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (score_ != com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.SENSITIVITY_SCORE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.SensitivityScore)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.SensitivityScore other = (com.google.privacy.dlp.v2.SensitivityScore) obj; - - if (score_ != other.score_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + score_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.SensitivityScore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.SensitivityScore prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Score is a summary of all elements in the data profile.
-   * A higher number means more sensitive.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.SensitivityScore} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.SensitivityScore) - com.google.privacy.dlp.v2.SensitivityScoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.SensitivityScore.class, com.google.privacy.dlp.v2.SensitivityScore.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.SensitivityScore.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - score_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_SensitivityScore_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.SensitivityScore getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.SensitivityScore build() { - com.google.privacy.dlp.v2.SensitivityScore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.SensitivityScore buildPartial() { - com.google.privacy.dlp.v2.SensitivityScore result = new com.google.privacy.dlp.v2.SensitivityScore(this); - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.SensitivityScore) { - return mergeFrom((com.google.privacy.dlp.v2.SensitivityScore)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.SensitivityScore other) { - if (other == com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance()) return this; - if (other.score_ != 0) { - setScoreValue(other.getScoreValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.SensitivityScore parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.SensitivityScore) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int score_ = 0; - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; - * @return The enum numeric value on the wire for score. - */ - @java.lang.Override public int getScoreValue() { - return score_; - } - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; - * @param value The enum numeric value on the wire for score to set. - * @return This builder for chaining. - */ - public Builder setScoreValue(int value) { - - score_ = value; - onChanged(); - return this; - } - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; - * @return The score. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel getScore() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel result = com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.valueOf(score_); - return result == null ? com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel.UNRECOGNIZED : result; - } - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel value) { - if (value == null) { - throw new NullPointerException(); - } - - score_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The score applied to the resource.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.SensitivityScore) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.SensitivityScore) - private static final com.google.privacy.dlp.v2.SensitivityScore DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.SensitivityScore(); - } - - public static com.google.privacy.dlp.v2.SensitivityScore getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SensitivityScore parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SensitivityScore(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.SensitivityScore getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java deleted file mode 100644 index 858ce025380e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/SensitivityScoreOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface SensitivityScoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.SensitivityScore) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The score applied to the resource.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; - * @return The enum numeric value on the wire for score. - */ - int getScoreValue(); - /** - *
-   * The score applied to the resource.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel score = 1; - * @return The score. - */ - com.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel getScore(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java deleted file mode 100644 index 25d0a1f9891b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java +++ /dev/null @@ -1,2265 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * An auxiliary table containing statistical information on the relative
- * frequency of different quasi-identifiers values. It has one or several
- * quasi-identifiers columns, and one column that indicates the relative
- * frequency of each quasi-identifier tuple.
- * If a tuple is present in the data but not in the auxiliary table, the
- * corresponding relative frequency is assumed to be zero (and thus, the
- * tuple is highly reidentifiable).
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable} - */ -public final class StatisticalTable extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StatisticalTable) - StatisticalTableOrBuilder { -private static final long serialVersionUID = 0L; - // Use StatisticalTable.newBuilder() to construct. - private StatisticalTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StatisticalTable() { - quasiIds_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StatisticalTable(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StatisticalTable( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - quasiIds_.add( - input.readMessage(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (relativeFrequency_ != null) { - subBuilder = relativeFrequency_.toBuilder(); - } - relativeFrequency_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relativeFrequency_); - relativeFrequency_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; - if (table_ != null) { - subBuilder = table_.toBuilder(); - } - table_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(table_); - table_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StatisticalTable.class, com.google.privacy.dlp.v2.StatisticalTable.Builder.class); - } - - public interface QuasiIdentifierFieldOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-     * Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-     * Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); - - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 2; - * @return The customTag. - */ - java.lang.String getCustomTag(); - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 2; - * @return The bytes for customTag. - */ - com.google.protobuf.ByteString - getCustomTagBytes(); - } - /** - *
-   * A quasi-identifier column has a custom_tag, used to know which column
-   * in the data corresponds to which column in the statistical model.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} - */ - public static final class QuasiIdentifierField extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) - QuasiIdentifierFieldOrBuilder { - private static final long serialVersionUID = 0L; - // Use QuasiIdentifierField.newBuilder() to construct. - private QuasiIdentifierField(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private QuasiIdentifierField() { - customTag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QuasiIdentifierField(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private QuasiIdentifierField( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - customTag_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.class, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-     * Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-     * Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-     * Identifies the column.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - public static final int CUSTOM_TAG_FIELD_NUMBER = 2; - private volatile java.lang.Object customTag_; - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 2; - * @return The customTag. - */ - @java.lang.Override - public java.lang.String getCustomTag() { - java.lang.Object ref = customTag_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - customTag_ = s; - return s; - } - } - /** - *
-     * A column can be tagged with a custom tag. In this case, the user must
-     * indicate an auxiliary table that contains statistical information on
-     * the possible values of this column (below).
-     * 
- * - * string custom_tag = 2; - * @return The bytes for customTag. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCustomTagBytes() { - java.lang.Object ref = customTag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - customTag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (field_ != null) { - output.writeMessage(1, getField()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customTag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customTag_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getField()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customTag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customTag_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField other = (com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) obj; - - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (!getCustomTag() - .equals(other.getCustomTag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; - hash = (53 * hash) + getCustomTag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A quasi-identifier column has a custom_tag, used to know which column
-     * in the data corresponds to which column in the statistical model.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.class, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - customTag_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField build() { - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField buildPartial() { - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField result = new com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField(this); - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - result.customTag_ = customTag_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) { - return mergeFrom((com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField other) { - if (other == com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance()) return this; - if (other.hasField()) { - mergeField(other.getField()); - } - if (!other.getCustomTag().isEmpty()) { - customTag_ = other.customTag_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-       * Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-       * Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-       * Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-       * Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-       * Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-       * Identifies the column.
-       * 
- * - * .google.privacy.dlp.v2.FieldId field = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - - private java.lang.Object customTag_ = ""; - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 2; - * @return The customTag. - */ - public java.lang.String getCustomTag() { - java.lang.Object ref = customTag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - customTag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 2; - * @return The bytes for customTag. - */ - public com.google.protobuf.ByteString - getCustomTagBytes() { - java.lang.Object ref = customTag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - customTag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 2; - * @param value The customTag to set. - * @return This builder for chaining. - */ - public Builder setCustomTag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - customTag_ = value; - onChanged(); - return this; - } - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 2; - * @return This builder for chaining. - */ - public Builder clearCustomTag() { - - customTag_ = getDefaultInstance().getCustomTag(); - onChanged(); - return this; - } - /** - *
-       * A column can be tagged with a custom tag. In this case, the user must
-       * indicate an auxiliary table that contains statistical information on
-       * the possible values of this column (below).
-       * 
- * - * string custom_tag = 2; - * @param value The bytes for customTag to set. - * @return This builder for chaining. - */ - public Builder setCustomTagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - customTag_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) - private static final com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField(); - } - - public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QuasiIdentifierField parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QuasiIdentifierField(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int TABLE_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.BigQueryTable table_; - /** - *
-   * Required. Auxiliary table location.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the table field is set. - */ - @java.lang.Override - public boolean hasTable() { - return table_ != null; - } - /** - *
-   * Required. Auxiliary table location.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTable getTable() { - return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; - } - /** - *
-   * Required. Auxiliary table location.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { - return getTable(); - } - - public static final int QUASI_IDS_FIELD_NUMBER = 1; - private java.util.List quasiIds_; - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List getQuasiIdsList() { - return quasiIds_; - } - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public java.util.List - getQuasiIdsOrBuilderList() { - return quasiIds_; - } - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public int getQuasiIdsCount() { - return quasiIds_.size(); - } - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getQuasiIds(int index) { - return quasiIds_.get(index); - } - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder getQuasiIdsOrBuilder( - int index) { - return quasiIds_.get(index); - } - - public static final int RELATIVE_FREQUENCY_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.FieldId relativeFrequency_; - /** - *
-   * Required. The relative frequency column must contain a floating-point number
-   * between 0 and 1 (inclusive). Null values are assumed to be zero.
-   * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the relativeFrequency field is set. - */ - @java.lang.Override - public boolean hasRelativeFrequency() { - return relativeFrequency_ != null; - } - /** - *
-   * Required. The relative frequency column must contain a floating-point number
-   * between 0 and 1 (inclusive). Null values are assumed to be zero.
-   * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The relativeFrequency. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { - return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; - } - /** - *
-   * Required. The relative frequency column must contain a floating-point number
-   * between 0 and 1 (inclusive). Null values are assumed to be zero.
-   * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { - return getRelativeFrequency(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < quasiIds_.size(); i++) { - output.writeMessage(1, quasiIds_.get(i)); - } - if (relativeFrequency_ != null) { - output.writeMessage(2, getRelativeFrequency()); - } - if (table_ != null) { - output.writeMessage(3, getTable()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < quasiIds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, quasiIds_.get(i)); - } - if (relativeFrequency_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRelativeFrequency()); - } - if (table_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTable()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StatisticalTable)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StatisticalTable other = (com.google.privacy.dlp.v2.StatisticalTable) obj; - - if (hasTable() != other.hasTable()) return false; - if (hasTable()) { - if (!getTable() - .equals(other.getTable())) return false; - } - if (!getQuasiIdsList() - .equals(other.getQuasiIdsList())) return false; - if (hasRelativeFrequency() != other.hasRelativeFrequency()) return false; - if (hasRelativeFrequency()) { - if (!getRelativeFrequency() - .equals(other.getRelativeFrequency())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTable()) { - hash = (37 * hash) + TABLE_FIELD_NUMBER; - hash = (53 * hash) + getTable().hashCode(); - } - if (getQuasiIdsCount() > 0) { - hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; - hash = (53 * hash) + getQuasiIdsList().hashCode(); - } - if (hasRelativeFrequency()) { - hash = (37 * hash) + RELATIVE_FREQUENCY_FIELD_NUMBER; - hash = (53 * hash) + getRelativeFrequency().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StatisticalTable prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An auxiliary table containing statistical information on the relative
-   * frequency of different quasi-identifiers values. It has one or several
-   * quasi-identifiers columns, and one column that indicates the relative
-   * frequency of each quasi-identifier tuple.
-   * If a tuple is present in the data but not in the auxiliary table, the
-   * corresponding relative frequency is assumed to be zero (and thus, the
-   * tuple is highly reidentifiable).
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StatisticalTable) - com.google.privacy.dlp.v2.StatisticalTableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StatisticalTable.class, com.google.privacy.dlp.v2.StatisticalTable.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StatisticalTable.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getQuasiIdsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (tableBuilder_ == null) { - table_ = null; - } else { - table_ = null; - tableBuilder_ = null; - } - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - quasiIdsBuilder_.clear(); - } - if (relativeFrequencyBuilder_ == null) { - relativeFrequency_ = null; - } else { - relativeFrequency_ = null; - relativeFrequencyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable build() { - com.google.privacy.dlp.v2.StatisticalTable result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable buildPartial() { - com.google.privacy.dlp.v2.StatisticalTable result = new com.google.privacy.dlp.v2.StatisticalTable(this); - int from_bitField0_ = bitField0_; - if (tableBuilder_ == null) { - result.table_ = table_; - } else { - result.table_ = tableBuilder_.build(); - } - if (quasiIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quasiIds_ = quasiIds_; - } else { - result.quasiIds_ = quasiIdsBuilder_.build(); - } - if (relativeFrequencyBuilder_ == null) { - result.relativeFrequency_ = relativeFrequency_; - } else { - result.relativeFrequency_ = relativeFrequencyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StatisticalTable) { - return mergeFrom((com.google.privacy.dlp.v2.StatisticalTable)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StatisticalTable other) { - if (other == com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance()) return this; - if (other.hasTable()) { - mergeTable(other.getTable()); - } - if (quasiIdsBuilder_ == null) { - if (!other.quasiIds_.isEmpty()) { - if (quasiIds_.isEmpty()) { - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuasiIdsIsMutable(); - quasiIds_.addAll(other.quasiIds_); - } - onChanged(); - } - } else { - if (!other.quasiIds_.isEmpty()) { - if (quasiIdsBuilder_.isEmpty()) { - quasiIdsBuilder_.dispose(); - quasiIdsBuilder_ = null; - quasiIds_ = other.quasiIds_; - bitField0_ = (bitField0_ & ~0x00000001); - quasiIdsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getQuasiIdsFieldBuilder() : null; - } else { - quasiIdsBuilder_.addAllMessages(other.quasiIds_); - } - } - } - if (other.hasRelativeFrequency()) { - mergeRelativeFrequency(other.getRelativeFrequency()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StatisticalTable parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StatisticalTable) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.BigQueryTable table_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; - /** - *
-     * Required. Auxiliary table location.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the table field is set. - */ - public boolean hasTable() { - return tableBuilder_ != null || table_ != null; - } - /** - *
-     * Required. Auxiliary table location.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - public com.google.privacy.dlp.v2.BigQueryTable getTable() { - if (tableBuilder_ == null) { - return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; - } else { - return tableBuilder_.getMessage(); - } - } - /** - *
-     * Required. Auxiliary table location.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - table_ = value; - onChanged(); - } else { - tableBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Auxiliary table location.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setTable( - com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { - if (tableBuilder_ == null) { - table_ = builderForValue.build(); - onChanged(); - } else { - tableBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Auxiliary table location.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { - if (tableBuilder_ == null) { - if (table_ != null) { - table_ = - com.google.privacy.dlp.v2.BigQueryTable.newBuilder(table_).mergeFrom(value).buildPartial(); - } else { - table_ = value; - } - onChanged(); - } else { - tableBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Auxiliary table location.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearTable() { - if (tableBuilder_ == null) { - table_ = null; - onChanged(); - } else { - table_ = null; - tableBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Auxiliary table location.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { - - onChanged(); - return getTableFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Auxiliary table location.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { - if (tableBuilder_ != null) { - return tableBuilder_.getMessageOrBuilder(); - } else { - return table_ == null ? - com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; - } - } - /** - *
-     * Required. Auxiliary table location.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> - getTableFieldBuilder() { - if (tableBuilder_ == null) { - tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( - getTable(), - getParentForChildren(), - isClean()); - table_ = null; - } - return tableBuilder_; - } - - private java.util.List quasiIds_ = - java.util.Collections.emptyList(); - private void ensureQuasiIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quasiIds_ = new java.util.ArrayList(quasiIds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder> quasiIdsBuilder_; - - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List getQuasiIdsList() { - if (quasiIdsBuilder_ == null) { - return java.util.Collections.unmodifiableList(quasiIds_); - } else { - return quasiIdsBuilder_.getMessageList(); - } - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public int getQuasiIdsCount() { - if (quasiIdsBuilder_ == null) { - return quasiIds_.size(); - } else { - return quasiIdsBuilder_.getCount(); - } - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); - } else { - return quasiIdsBuilder_.getMessage(index); - } - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, value); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setQuasiIds( - int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.set(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField value) { - if (quasiIdsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, value); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addQuasiIds( - int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder builderForValue) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.add(index, builderForValue.build()); - onChanged(); - } else { - quasiIdsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder addAllQuasiIds( - java.lang.Iterable values) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, quasiIds_); - onChanged(); - } else { - quasiIdsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearQuasiIds() { - if (quasiIdsBuilder_ == null) { - quasiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - quasiIdsBuilder_.clear(); - } - return this; - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeQuasiIds(int index) { - if (quasiIdsBuilder_ == null) { - ensureQuasiIdsIsMutable(); - quasiIds_.remove(index); - onChanged(); - } else { - quasiIdsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder getQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().getBuilder(index); - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder getQuasiIdsOrBuilder( - int index) { - if (quasiIdsBuilder_ == null) { - return quasiIds_.get(index); } else { - return quasiIdsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getQuasiIdsOrBuilderList() { - if (quasiIdsBuilder_ != null) { - return quasiIdsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(quasiIds_); - } - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder addQuasiIdsBuilder() { - return getQuasiIdsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance()); - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder addQuasiIdsBuilder( - int index) { - return getQuasiIdsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance()); - } - /** - *
-     * Required. Quasi-identifier columns.
-     * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.List - getQuasiIdsBuilderList() { - return getQuasiIdsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder> - getQuasiIdsFieldBuilder() { - if (quasiIdsBuilder_ == null) { - quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder>( - quasiIds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - quasiIds_ = null; - } - return quasiIdsBuilder_; - } - - private com.google.privacy.dlp.v2.FieldId relativeFrequency_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> relativeFrequencyBuilder_; - /** - *
-     * Required. The relative frequency column must contain a floating-point number
-     * between 0 and 1 (inclusive). Null values are assumed to be zero.
-     * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the relativeFrequency field is set. - */ - public boolean hasRelativeFrequency() { - return relativeFrequencyBuilder_ != null || relativeFrequency_ != null; - } - /** - *
-     * Required. The relative frequency column must contain a floating-point number
-     * between 0 and 1 (inclusive). Null values are assumed to be zero.
-     * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The relativeFrequency. - */ - public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { - if (relativeFrequencyBuilder_ == null) { - return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; - } else { - return relativeFrequencyBuilder_.getMessage(); - } - } - /** - *
-     * Required. The relative frequency column must contain a floating-point number
-     * between 0 and 1 (inclusive). Null values are assumed to be zero.
-     * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { - if (relativeFrequencyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - relativeFrequency_ = value; - onChanged(); - } else { - relativeFrequencyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The relative frequency column must contain a floating-point number
-     * between 0 and 1 (inclusive). Null values are assumed to be zero.
-     * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setRelativeFrequency( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (relativeFrequencyBuilder_ == null) { - relativeFrequency_ = builderForValue.build(); - onChanged(); - } else { - relativeFrequencyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The relative frequency column must contain a floating-point number
-     * between 0 and 1 (inclusive). Null values are assumed to be zero.
-     * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { - if (relativeFrequencyBuilder_ == null) { - if (relativeFrequency_ != null) { - relativeFrequency_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(relativeFrequency_).mergeFrom(value).buildPartial(); - } else { - relativeFrequency_ = value; - } - onChanged(); - } else { - relativeFrequencyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The relative frequency column must contain a floating-point number
-     * between 0 and 1 (inclusive). Null values are assumed to be zero.
-     * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearRelativeFrequency() { - if (relativeFrequencyBuilder_ == null) { - relativeFrequency_ = null; - onChanged(); - } else { - relativeFrequency_ = null; - relativeFrequencyBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The relative frequency column must contain a floating-point number
-     * between 0 and 1 (inclusive). Null values are assumed to be zero.
-     * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getRelativeFrequencyBuilder() { - - onChanged(); - return getRelativeFrequencyFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The relative frequency column must contain a floating-point number
-     * between 0 and 1 (inclusive). Null values are assumed to be zero.
-     * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { - if (relativeFrequencyBuilder_ != null) { - return relativeFrequencyBuilder_.getMessageOrBuilder(); - } else { - return relativeFrequency_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; - } - } - /** - *
-     * Required. The relative frequency column must contain a floating-point number
-     * between 0 and 1 (inclusive). Null values are assumed to be zero.
-     * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getRelativeFrequencyFieldBuilder() { - if (relativeFrequencyBuilder_ == null) { - relativeFrequencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getRelativeFrequency(), - getParentForChildren(), - isClean()); - relativeFrequency_ = null; - } - return relativeFrequencyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StatisticalTable) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StatisticalTable) - private static final com.google.privacy.dlp.v2.StatisticalTable DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StatisticalTable(); - } - - public static com.google.privacy.dlp.v2.StatisticalTable getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StatisticalTable parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StatisticalTable(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StatisticalTable getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java deleted file mode 100644 index 36a59a940517..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface StatisticalTableOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StatisticalTable) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Auxiliary table location.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the table field is set. - */ - boolean hasTable(); - /** - *
-   * Required. Auxiliary table location.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - com.google.privacy.dlp.v2.BigQueryTable getTable(); - /** - *
-   * Required. Auxiliary table location.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); - - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getQuasiIdsList(); - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getQuasiIds(int index); - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - int getQuasiIdsCount(); - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.List - getQuasiIdsOrBuilderList(); - /** - *
-   * Required. Quasi-identifier columns.
-   * 
- * - * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder getQuasiIdsOrBuilder( - int index); - - /** - *
-   * Required. The relative frequency column must contain a floating-point number
-   * between 0 and 1 (inclusive). Null values are assumed to be zero.
-   * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the relativeFrequency field is set. - */ - boolean hasRelativeFrequency(); - /** - *
-   * Required. The relative frequency column must contain a floating-point number
-   * between 0 and 1 (inclusive). Null values are assumed to be zero.
-   * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The relativeFrequency. - */ - com.google.privacy.dlp.v2.FieldId getRelativeFrequency(); - /** - *
-   * Required. The relative frequency column must contain a floating-point number
-   * between 0 and 1 (inclusive). Null values are assumed to be zero.
-   * 
- * - * .google.privacy.dlp.v2.FieldId relative_frequency = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java deleted file mode 100644 index 72230106c2ad..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfig.java +++ /dev/null @@ -1,3488 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Shared message indicating Cloud storage type.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StorageConfig} - */ -public final class StorageConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StorageConfig) - StorageConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use StorageConfig.newBuilder() to construct. - private StorageConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StorageConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StorageConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StorageConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - com.google.privacy.dlp.v2.DatastoreOptions.Builder subBuilder = null; - if (typeCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.DatastoreOptions) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.DatastoreOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.DatastoreOptions) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 2; - break; - } - case 26: { - com.google.privacy.dlp.v2.CloudStorageOptions.Builder subBuilder = null; - if (typeCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.CloudStorageOptions) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CloudStorageOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CloudStorageOptions) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 3; - break; - } - case 34: { - com.google.privacy.dlp.v2.BigQueryOptions.Builder subBuilder = null; - if (typeCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.BigQueryOptions) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.BigQueryOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.BigQueryOptions) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 4; - break; - } - case 50: { - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder subBuilder = null; - if (timespanConfig_ != null) { - subBuilder = timespanConfig_.toBuilder(); - } - timespanConfig_ = input.readMessage(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timespanConfig_); - timespanConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.privacy.dlp.v2.HybridOptions.Builder subBuilder = null; - if (typeCase_ == 9) { - subBuilder = ((com.google.privacy.dlp.v2.HybridOptions) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.HybridOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.HybridOptions) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 9; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StorageConfig.class, com.google.privacy.dlp.v2.StorageConfig.Builder.class); - } - - public interface TimespanConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StorageConfig.TimespanConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Exclude files, tables, or rows older than this value.
-     * If not set, no lower time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - *
-     * Exclude files, tables, or rows older than this value.
-     * If not set, no lower time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - *
-     * Exclude files, tables, or rows older than this value.
-     * If not set, no lower time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - *
-     * Exclude files, tables, or rows newer than this value.
-     * If not set, no upper time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-     * Exclude files, tables, or rows newer than this value.
-     * If not set, no upper time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-     * Exclude files, tables, or rows newer than this value.
-     * If not set, no upper time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - *
-     * Specification of the field containing the timestamp of scanned items.
-     * Used for data sources like Datastore and BigQuery.
-     * <b>For BigQuery</b>
-     * If this value is not specified and the table was modified between the
-     * given start and end times, the entire table will be scanned. If this
-     * value is specified, then rows are filtered based on the given start and
-     * end times. Rows with a `NULL` value in the provided BigQuery column are
-     * skipped.
-     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-     * `TIMESTAMP`, and `DATETIME`.
-     * If your BigQuery table is [partitioned at ingestion
-     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-     * you can use any of the following pseudo-columns as your timestamp field.
-     * When used with Cloud DLP, these pseudo-column names are case sensitive.
-     * <ul>
-     * <li><code>_PARTITIONTIME</code></li>
-     * <li><code>_PARTITIONDATE</code></li>
-     * <li><code>_PARTITION_LOAD_TIME</code></li>
-     * </ul>
-     * <b>For Datastore</b>
-     * If this value is specified, then entities are filtered based on the given
-     * start and end times. If an entity does not contain the provided timestamp
-     * property or contains empty or invalid values, then it is included.
-     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-     * See the
-     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-     * related to this operation.
-     * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - * @return Whether the timestampField field is set. - */ - boolean hasTimestampField(); - /** - *
-     * Specification of the field containing the timestamp of scanned items.
-     * Used for data sources like Datastore and BigQuery.
-     * <b>For BigQuery</b>
-     * If this value is not specified and the table was modified between the
-     * given start and end times, the entire table will be scanned. If this
-     * value is specified, then rows are filtered based on the given start and
-     * end times. Rows with a `NULL` value in the provided BigQuery column are
-     * skipped.
-     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-     * `TIMESTAMP`, and `DATETIME`.
-     * If your BigQuery table is [partitioned at ingestion
-     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-     * you can use any of the following pseudo-columns as your timestamp field.
-     * When used with Cloud DLP, these pseudo-column names are case sensitive.
-     * <ul>
-     * <li><code>_PARTITIONTIME</code></li>
-     * <li><code>_PARTITIONDATE</code></li>
-     * <li><code>_PARTITION_LOAD_TIME</code></li>
-     * </ul>
-     * <b>For Datastore</b>
-     * If this value is specified, then entities are filtered based on the given
-     * start and end times. If an entity does not contain the provided timestamp
-     * property or contains empty or invalid values, then it is included.
-     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-     * See the
-     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-     * related to this operation.
-     * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - * @return The timestampField. - */ - com.google.privacy.dlp.v2.FieldId getTimestampField(); - /** - *
-     * Specification of the field containing the timestamp of scanned items.
-     * Used for data sources like Datastore and BigQuery.
-     * <b>For BigQuery</b>
-     * If this value is not specified and the table was modified between the
-     * given start and end times, the entire table will be scanned. If this
-     * value is specified, then rows are filtered based on the given start and
-     * end times. Rows with a `NULL` value in the provided BigQuery column are
-     * skipped.
-     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-     * `TIMESTAMP`, and `DATETIME`.
-     * If your BigQuery table is [partitioned at ingestion
-     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-     * you can use any of the following pseudo-columns as your timestamp field.
-     * When used with Cloud DLP, these pseudo-column names are case sensitive.
-     * <ul>
-     * <li><code>_PARTITIONTIME</code></li>
-     * <li><code>_PARTITIONDATE</code></li>
-     * <li><code>_PARTITION_LOAD_TIME</code></li>
-     * </ul>
-     * <b>For Datastore</b>
-     * If this value is specified, then entities are filtered based on the given
-     * start and end times. If an entity does not contain the provided timestamp
-     * property or contains empty or invalid values, then it is included.
-     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-     * See the
-     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-     * related to this operation.
-     * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder(); - - /** - *
-     * When the job is started by a JobTrigger we will automatically figure out
-     * a valid start_time to avoid scanning files that have not been modified
-     * since the last time the JobTrigger executed. This will be based on the
-     * time of the execution of the last run of the JobTrigger or the timespan
-     * end_time used in the last run of the JobTrigger.
-     * 
- * - * bool enable_auto_population_of_timespan_config = 4; - * @return The enableAutoPopulationOfTimespanConfig. - */ - boolean getEnableAutoPopulationOfTimespanConfig(); - } - /** - *
-   * Configuration of the timespan of the items to include in scanning.
-   * Currently only supported when inspecting Cloud Storage and BigQuery.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StorageConfig.TimespanConfig} - */ - public static final class TimespanConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StorageConfig.TimespanConfig) - TimespanConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use TimespanConfig.newBuilder() to construct. - private TimespanConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TimespanConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TimespanConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TimespanConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (timestampField_ != null) { - subBuilder = timestampField_.toBuilder(); - } - timestampField_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timestampField_); - timestampField_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - - enableAutoPopulationOfTimespanConfig_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.class, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder.class); - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - *
-     * Exclude files, tables, or rows older than this value.
-     * If not set, no lower time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - *
-     * Exclude files, tables, or rows older than this value.
-     * If not set, no lower time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - *
-     * Exclude files, tables, or rows older than this value.
-     * If not set, no lower time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - *
-     * Exclude files, tables, or rows newer than this value.
-     * If not set, no upper time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-     * Exclude files, tables, or rows newer than this value.
-     * If not set, no upper time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-     * Exclude files, tables, or rows newer than this value.
-     * If not set, no upper time limit is applied.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int TIMESTAMP_FIELD_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.FieldId timestampField_; - /** - *
-     * Specification of the field containing the timestamp of scanned items.
-     * Used for data sources like Datastore and BigQuery.
-     * <b>For BigQuery</b>
-     * If this value is not specified and the table was modified between the
-     * given start and end times, the entire table will be scanned. If this
-     * value is specified, then rows are filtered based on the given start and
-     * end times. Rows with a `NULL` value in the provided BigQuery column are
-     * skipped.
-     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-     * `TIMESTAMP`, and `DATETIME`.
-     * If your BigQuery table is [partitioned at ingestion
-     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-     * you can use any of the following pseudo-columns as your timestamp field.
-     * When used with Cloud DLP, these pseudo-column names are case sensitive.
-     * <ul>
-     * <li><code>_PARTITIONTIME</code></li>
-     * <li><code>_PARTITIONDATE</code></li>
-     * <li><code>_PARTITION_LOAD_TIME</code></li>
-     * </ul>
-     * <b>For Datastore</b>
-     * If this value is specified, then entities are filtered based on the given
-     * start and end times. If an entity does not contain the provided timestamp
-     * property or contains empty or invalid values, then it is included.
-     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-     * See the
-     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-     * related to this operation.
-     * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - * @return Whether the timestampField field is set. - */ - @java.lang.Override - public boolean hasTimestampField() { - return timestampField_ != null; - } - /** - *
-     * Specification of the field containing the timestamp of scanned items.
-     * Used for data sources like Datastore and BigQuery.
-     * <b>For BigQuery</b>
-     * If this value is not specified and the table was modified between the
-     * given start and end times, the entire table will be scanned. If this
-     * value is specified, then rows are filtered based on the given start and
-     * end times. Rows with a `NULL` value in the provided BigQuery column are
-     * skipped.
-     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-     * `TIMESTAMP`, and `DATETIME`.
-     * If your BigQuery table is [partitioned at ingestion
-     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-     * you can use any of the following pseudo-columns as your timestamp field.
-     * When used with Cloud DLP, these pseudo-column names are case sensitive.
-     * <ul>
-     * <li><code>_PARTITIONTIME</code></li>
-     * <li><code>_PARTITIONDATE</code></li>
-     * <li><code>_PARTITION_LOAD_TIME</code></li>
-     * </ul>
-     * <b>For Datastore</b>
-     * If this value is specified, then entities are filtered based on the given
-     * start and end times. If an entity does not contain the provided timestamp
-     * property or contains empty or invalid values, then it is included.
-     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-     * See the
-     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-     * related to this operation.
-     * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - * @return The timestampField. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getTimestampField() { - return timestampField_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : timestampField_; - } - /** - *
-     * Specification of the field containing the timestamp of scanned items.
-     * Used for data sources like Datastore and BigQuery.
-     * <b>For BigQuery</b>
-     * If this value is not specified and the table was modified between the
-     * given start and end times, the entire table will be scanned. If this
-     * value is specified, then rows are filtered based on the given start and
-     * end times. Rows with a `NULL` value in the provided BigQuery column are
-     * skipped.
-     * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-     * `TIMESTAMP`, and `DATETIME`.
-     * If your BigQuery table is [partitioned at ingestion
-     * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-     * you can use any of the following pseudo-columns as your timestamp field.
-     * When used with Cloud DLP, these pseudo-column names are case sensitive.
-     * <ul>
-     * <li><code>_PARTITIONTIME</code></li>
-     * <li><code>_PARTITIONDATE</code></li>
-     * <li><code>_PARTITION_LOAD_TIME</code></li>
-     * </ul>
-     * <b>For Datastore</b>
-     * If this value is specified, then entities are filtered based on the given
-     * start and end times. If an entity does not contain the provided timestamp
-     * property or contains empty or invalid values, then it is included.
-     * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-     * See the
-     * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-     * related to this operation.
-     * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder() { - return getTimestampField(); - } - - public static final int ENABLE_AUTO_POPULATION_OF_TIMESPAN_CONFIG_FIELD_NUMBER = 4; - private boolean enableAutoPopulationOfTimespanConfig_; - /** - *
-     * When the job is started by a JobTrigger we will automatically figure out
-     * a valid start_time to avoid scanning files that have not been modified
-     * since the last time the JobTrigger executed. This will be based on the
-     * time of the execution of the last run of the JobTrigger or the timespan
-     * end_time used in the last run of the JobTrigger.
-     * 
- * - * bool enable_auto_population_of_timespan_config = 4; - * @return The enableAutoPopulationOfTimespanConfig. - */ - @java.lang.Override - public boolean getEnableAutoPopulationOfTimespanConfig() { - return enableAutoPopulationOfTimespanConfig_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (timestampField_ != null) { - output.writeMessage(3, getTimestampField()); - } - if (enableAutoPopulationOfTimespanConfig_ != false) { - output.writeBool(4, enableAutoPopulationOfTimespanConfig_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getEndTime()); - } - if (timestampField_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTimestampField()); - } - if (enableAutoPopulationOfTimespanConfig_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, enableAutoPopulationOfTimespanConfig_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StorageConfig.TimespanConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig other = (com.google.privacy.dlp.v2.StorageConfig.TimespanConfig) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime() - .equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (hasTimestampField() != other.hasTimestampField()) return false; - if (hasTimestampField()) { - if (!getTimestampField() - .equals(other.getTimestampField())) return false; - } - if (getEnableAutoPopulationOfTimespanConfig() - != other.getEnableAutoPopulationOfTimespanConfig()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - if (hasTimestampField()) { - hash = (37 * hash) + TIMESTAMP_FIELD_FIELD_NUMBER; - hash = (53 * hash) + getTimestampField().hashCode(); - } - hash = (37 * hash) + ENABLE_AUTO_POPULATION_OF_TIMESPAN_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getEnableAutoPopulationOfTimespanConfig()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Configuration of the timespan of the items to include in scanning.
-     * Currently only supported when inspecting Cloud Storage and BigQuery.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StorageConfig.TimespanConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StorageConfig.TimespanConfig) - com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.class, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - if (timestampFieldBuilder_ == null) { - timestampField_ = null; - } else { - timestampField_ = null; - timestampFieldBuilder_ = null; - } - enableAutoPopulationOfTimespanConfig_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_TimespanConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig build() { - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig buildPartial() { - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig result = new com.google.privacy.dlp.v2.StorageConfig.TimespanConfig(this); - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - if (timestampFieldBuilder_ == null) { - result.timestampField_ = timestampField_; - } else { - result.timestampField_ = timestampFieldBuilder_.build(); - } - result.enableAutoPopulationOfTimespanConfig_ = enableAutoPopulationOfTimespanConfig_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StorageConfig.TimespanConfig) { - return mergeFrom((com.google.privacy.dlp.v2.StorageConfig.TimespanConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig other) { - if (other == com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance()) return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.hasTimestampField()) { - mergeTimestampField(other.getTimestampField()); - } - if (other.getEnableAutoPopulationOfTimespanConfig() != false) { - setEnableAutoPopulationOfTimespanConfig(other.getEnableAutoPopulationOfTimespanConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StorageConfig.TimespanConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; - /** - *
-       * Exclude files, tables, or rows older than this value.
-       * If not set, no lower time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - *
-       * Exclude files, tables, or rows older than this value.
-       * If not set, no lower time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - *
-       * Exclude files, tables, or rows older than this value.
-       * If not set, no lower time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Exclude files, tables, or rows older than this value.
-       * If not set, no lower time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder setStartTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Exclude files, tables, or rows older than this value.
-       * If not set, no lower time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Exclude files, tables, or rows older than this value.
-       * If not set, no lower time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - *
-       * Exclude files, tables, or rows older than this value.
-       * If not set, no lower time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - *
-       * Exclude files, tables, or rows older than this value.
-       * If not set, no lower time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - *
-       * Exclude files, tables, or rows older than this value.
-       * If not set, no lower time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getStartTime(), - getParentForChildren(), - isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-       * Exclude files, tables, or rows newer than this value.
-       * If not set, no upper time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-       * Exclude files, tables, or rows newer than this value.
-       * If not set, no upper time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-       * Exclude files, tables, or rows newer than this value.
-       * If not set, no upper time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Exclude files, tables, or rows newer than this value.
-       * If not set, no upper time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Exclude files, tables, or rows newer than this value.
-       * If not set, no upper time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Exclude files, tables, or rows newer than this value.
-       * If not set, no upper time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-       * Exclude files, tables, or rows newer than this value.
-       * If not set, no upper time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-       * Exclude files, tables, or rows newer than this value.
-       * If not set, no upper time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-       * Exclude files, tables, or rows newer than this value.
-       * If not set, no upper time limit is applied.
-       * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private com.google.privacy.dlp.v2.FieldId timestampField_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> timestampFieldBuilder_; - /** - *
-       * Specification of the field containing the timestamp of scanned items.
-       * Used for data sources like Datastore and BigQuery.
-       * <b>For BigQuery</b>
-       * If this value is not specified and the table was modified between the
-       * given start and end times, the entire table will be scanned. If this
-       * value is specified, then rows are filtered based on the given start and
-       * end times. Rows with a `NULL` value in the provided BigQuery column are
-       * skipped.
-       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-       * `TIMESTAMP`, and `DATETIME`.
-       * If your BigQuery table is [partitioned at ingestion
-       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-       * you can use any of the following pseudo-columns as your timestamp field.
-       * When used with Cloud DLP, these pseudo-column names are case sensitive.
-       * <ul>
-       * <li><code>_PARTITIONTIME</code></li>
-       * <li><code>_PARTITIONDATE</code></li>
-       * <li><code>_PARTITION_LOAD_TIME</code></li>
-       * </ul>
-       * <b>For Datastore</b>
-       * If this value is specified, then entities are filtered based on the given
-       * start and end times. If an entity does not contain the provided timestamp
-       * property or contains empty or invalid values, then it is included.
-       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-       * See the
-       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-       * related to this operation.
-       * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - * @return Whether the timestampField field is set. - */ - public boolean hasTimestampField() { - return timestampFieldBuilder_ != null || timestampField_ != null; - } - /** - *
-       * Specification of the field containing the timestamp of scanned items.
-       * Used for data sources like Datastore and BigQuery.
-       * <b>For BigQuery</b>
-       * If this value is not specified and the table was modified between the
-       * given start and end times, the entire table will be scanned. If this
-       * value is specified, then rows are filtered based on the given start and
-       * end times. Rows with a `NULL` value in the provided BigQuery column are
-       * skipped.
-       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-       * `TIMESTAMP`, and `DATETIME`.
-       * If your BigQuery table is [partitioned at ingestion
-       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-       * you can use any of the following pseudo-columns as your timestamp field.
-       * When used with Cloud DLP, these pseudo-column names are case sensitive.
-       * <ul>
-       * <li><code>_PARTITIONTIME</code></li>
-       * <li><code>_PARTITIONDATE</code></li>
-       * <li><code>_PARTITION_LOAD_TIME</code></li>
-       * </ul>
-       * <b>For Datastore</b>
-       * If this value is specified, then entities are filtered based on the given
-       * start and end times. If an entity does not contain the provided timestamp
-       * property or contains empty or invalid values, then it is included.
-       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-       * See the
-       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-       * related to this operation.
-       * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - * @return The timestampField. - */ - public com.google.privacy.dlp.v2.FieldId getTimestampField() { - if (timestampFieldBuilder_ == null) { - return timestampField_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : timestampField_; - } else { - return timestampFieldBuilder_.getMessage(); - } - } - /** - *
-       * Specification of the field containing the timestamp of scanned items.
-       * Used for data sources like Datastore and BigQuery.
-       * <b>For BigQuery</b>
-       * If this value is not specified and the table was modified between the
-       * given start and end times, the entire table will be scanned. If this
-       * value is specified, then rows are filtered based on the given start and
-       * end times. Rows with a `NULL` value in the provided BigQuery column are
-       * skipped.
-       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-       * `TIMESTAMP`, and `DATETIME`.
-       * If your BigQuery table is [partitioned at ingestion
-       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-       * you can use any of the following pseudo-columns as your timestamp field.
-       * When used with Cloud DLP, these pseudo-column names are case sensitive.
-       * <ul>
-       * <li><code>_PARTITIONTIME</code></li>
-       * <li><code>_PARTITIONDATE</code></li>
-       * <li><code>_PARTITION_LOAD_TIME</code></li>
-       * </ul>
-       * <b>For Datastore</b>
-       * If this value is specified, then entities are filtered based on the given
-       * start and end times. If an entity does not contain the provided timestamp
-       * property or contains empty or invalid values, then it is included.
-       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-       * See the
-       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-       * related to this operation.
-       * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - */ - public Builder setTimestampField(com.google.privacy.dlp.v2.FieldId value) { - if (timestampFieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timestampField_ = value; - onChanged(); - } else { - timestampFieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Specification of the field containing the timestamp of scanned items.
-       * Used for data sources like Datastore and BigQuery.
-       * <b>For BigQuery</b>
-       * If this value is not specified and the table was modified between the
-       * given start and end times, the entire table will be scanned. If this
-       * value is specified, then rows are filtered based on the given start and
-       * end times. Rows with a `NULL` value in the provided BigQuery column are
-       * skipped.
-       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-       * `TIMESTAMP`, and `DATETIME`.
-       * If your BigQuery table is [partitioned at ingestion
-       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-       * you can use any of the following pseudo-columns as your timestamp field.
-       * When used with Cloud DLP, these pseudo-column names are case sensitive.
-       * <ul>
-       * <li><code>_PARTITIONTIME</code></li>
-       * <li><code>_PARTITIONDATE</code></li>
-       * <li><code>_PARTITION_LOAD_TIME</code></li>
-       * </ul>
-       * <b>For Datastore</b>
-       * If this value is specified, then entities are filtered based on the given
-       * start and end times. If an entity does not contain the provided timestamp
-       * property or contains empty or invalid values, then it is included.
-       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-       * See the
-       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-       * related to this operation.
-       * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - */ - public Builder setTimestampField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (timestampFieldBuilder_ == null) { - timestampField_ = builderForValue.build(); - onChanged(); - } else { - timestampFieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Specification of the field containing the timestamp of scanned items.
-       * Used for data sources like Datastore and BigQuery.
-       * <b>For BigQuery</b>
-       * If this value is not specified and the table was modified between the
-       * given start and end times, the entire table will be scanned. If this
-       * value is specified, then rows are filtered based on the given start and
-       * end times. Rows with a `NULL` value in the provided BigQuery column are
-       * skipped.
-       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-       * `TIMESTAMP`, and `DATETIME`.
-       * If your BigQuery table is [partitioned at ingestion
-       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-       * you can use any of the following pseudo-columns as your timestamp field.
-       * When used with Cloud DLP, these pseudo-column names are case sensitive.
-       * <ul>
-       * <li><code>_PARTITIONTIME</code></li>
-       * <li><code>_PARTITIONDATE</code></li>
-       * <li><code>_PARTITION_LOAD_TIME</code></li>
-       * </ul>
-       * <b>For Datastore</b>
-       * If this value is specified, then entities are filtered based on the given
-       * start and end times. If an entity does not contain the provided timestamp
-       * property or contains empty or invalid values, then it is included.
-       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-       * See the
-       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-       * related to this operation.
-       * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - */ - public Builder mergeTimestampField(com.google.privacy.dlp.v2.FieldId value) { - if (timestampFieldBuilder_ == null) { - if (timestampField_ != null) { - timestampField_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(timestampField_).mergeFrom(value).buildPartial(); - } else { - timestampField_ = value; - } - onChanged(); - } else { - timestampFieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Specification of the field containing the timestamp of scanned items.
-       * Used for data sources like Datastore and BigQuery.
-       * <b>For BigQuery</b>
-       * If this value is not specified and the table was modified between the
-       * given start and end times, the entire table will be scanned. If this
-       * value is specified, then rows are filtered based on the given start and
-       * end times. Rows with a `NULL` value in the provided BigQuery column are
-       * skipped.
-       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-       * `TIMESTAMP`, and `DATETIME`.
-       * If your BigQuery table is [partitioned at ingestion
-       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-       * you can use any of the following pseudo-columns as your timestamp field.
-       * When used with Cloud DLP, these pseudo-column names are case sensitive.
-       * <ul>
-       * <li><code>_PARTITIONTIME</code></li>
-       * <li><code>_PARTITIONDATE</code></li>
-       * <li><code>_PARTITION_LOAD_TIME</code></li>
-       * </ul>
-       * <b>For Datastore</b>
-       * If this value is specified, then entities are filtered based on the given
-       * start and end times. If an entity does not contain the provided timestamp
-       * property or contains empty or invalid values, then it is included.
-       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-       * See the
-       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-       * related to this operation.
-       * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - */ - public Builder clearTimestampField() { - if (timestampFieldBuilder_ == null) { - timestampField_ = null; - onChanged(); - } else { - timestampField_ = null; - timestampFieldBuilder_ = null; - } - - return this; - } - /** - *
-       * Specification of the field containing the timestamp of scanned items.
-       * Used for data sources like Datastore and BigQuery.
-       * <b>For BigQuery</b>
-       * If this value is not specified and the table was modified between the
-       * given start and end times, the entire table will be scanned. If this
-       * value is specified, then rows are filtered based on the given start and
-       * end times. Rows with a `NULL` value in the provided BigQuery column are
-       * skipped.
-       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-       * `TIMESTAMP`, and `DATETIME`.
-       * If your BigQuery table is [partitioned at ingestion
-       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-       * you can use any of the following pseudo-columns as your timestamp field.
-       * When used with Cloud DLP, these pseudo-column names are case sensitive.
-       * <ul>
-       * <li><code>_PARTITIONTIME</code></li>
-       * <li><code>_PARTITIONDATE</code></li>
-       * <li><code>_PARTITION_LOAD_TIME</code></li>
-       * </ul>
-       * <b>For Datastore</b>
-       * If this value is specified, then entities are filtered based on the given
-       * start and end times. If an entity does not contain the provided timestamp
-       * property or contains empty or invalid values, then it is included.
-       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-       * See the
-       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-       * related to this operation.
-       * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getTimestampFieldBuilder() { - - onChanged(); - return getTimestampFieldFieldBuilder().getBuilder(); - } - /** - *
-       * Specification of the field containing the timestamp of scanned items.
-       * Used for data sources like Datastore and BigQuery.
-       * <b>For BigQuery</b>
-       * If this value is not specified and the table was modified between the
-       * given start and end times, the entire table will be scanned. If this
-       * value is specified, then rows are filtered based on the given start and
-       * end times. Rows with a `NULL` value in the provided BigQuery column are
-       * skipped.
-       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-       * `TIMESTAMP`, and `DATETIME`.
-       * If your BigQuery table is [partitioned at ingestion
-       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-       * you can use any of the following pseudo-columns as your timestamp field.
-       * When used with Cloud DLP, these pseudo-column names are case sensitive.
-       * <ul>
-       * <li><code>_PARTITIONTIME</code></li>
-       * <li><code>_PARTITIONDATE</code></li>
-       * <li><code>_PARTITION_LOAD_TIME</code></li>
-       * </ul>
-       * <b>For Datastore</b>
-       * If this value is specified, then entities are filtered based on the given
-       * start and end times. If an entity does not contain the provided timestamp
-       * property or contains empty or invalid values, then it is included.
-       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-       * See the
-       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-       * related to this operation.
-       * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getTimestampFieldOrBuilder() { - if (timestampFieldBuilder_ != null) { - return timestampFieldBuilder_.getMessageOrBuilder(); - } else { - return timestampField_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : timestampField_; - } - } - /** - *
-       * Specification of the field containing the timestamp of scanned items.
-       * Used for data sources like Datastore and BigQuery.
-       * <b>For BigQuery</b>
-       * If this value is not specified and the table was modified between the
-       * given start and end times, the entire table will be scanned. If this
-       * value is specified, then rows are filtered based on the given start and
-       * end times. Rows with a `NULL` value in the provided BigQuery column are
-       * skipped.
-       * Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`,
-       * `TIMESTAMP`, and `DATETIME`.
-       * If your BigQuery table is [partitioned at ingestion
-       * time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time),
-       * you can use any of the following pseudo-columns as your timestamp field.
-       * When used with Cloud DLP, these pseudo-column names are case sensitive.
-       * <ul>
-       * <li><code>_PARTITIONTIME</code></li>
-       * <li><code>_PARTITIONDATE</code></li>
-       * <li><code>_PARTITION_LOAD_TIME</code></li>
-       * </ul>
-       * <b>For Datastore</b>
-       * If this value is specified, then entities are filtered based on the given
-       * start and end times. If an entity does not contain the provided timestamp
-       * property or contains empty or invalid values, then it is included.
-       * Valid data types of the provided timestamp property are: `TIMESTAMP`.
-       * See the
-       * [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan)
-       * related to this operation.
-       * 
- * - * .google.privacy.dlp.v2.FieldId timestamp_field = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getTimestampFieldFieldBuilder() { - if (timestampFieldBuilder_ == null) { - timestampFieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getTimestampField(), - getParentForChildren(), - isClean()); - timestampField_ = null; - } - return timestampFieldBuilder_; - } - - private boolean enableAutoPopulationOfTimespanConfig_ ; - /** - *
-       * When the job is started by a JobTrigger we will automatically figure out
-       * a valid start_time to avoid scanning files that have not been modified
-       * since the last time the JobTrigger executed. This will be based on the
-       * time of the execution of the last run of the JobTrigger or the timespan
-       * end_time used in the last run of the JobTrigger.
-       * 
- * - * bool enable_auto_population_of_timespan_config = 4; - * @return The enableAutoPopulationOfTimespanConfig. - */ - @java.lang.Override - public boolean getEnableAutoPopulationOfTimespanConfig() { - return enableAutoPopulationOfTimespanConfig_; - } - /** - *
-       * When the job is started by a JobTrigger we will automatically figure out
-       * a valid start_time to avoid scanning files that have not been modified
-       * since the last time the JobTrigger executed. This will be based on the
-       * time of the execution of the last run of the JobTrigger or the timespan
-       * end_time used in the last run of the JobTrigger.
-       * 
- * - * bool enable_auto_population_of_timespan_config = 4; - * @param value The enableAutoPopulationOfTimespanConfig to set. - * @return This builder for chaining. - */ - public Builder setEnableAutoPopulationOfTimespanConfig(boolean value) { - - enableAutoPopulationOfTimespanConfig_ = value; - onChanged(); - return this; - } - /** - *
-       * When the job is started by a JobTrigger we will automatically figure out
-       * a valid start_time to avoid scanning files that have not been modified
-       * since the last time the JobTrigger executed. This will be based on the
-       * time of the execution of the last run of the JobTrigger or the timespan
-       * end_time used in the last run of the JobTrigger.
-       * 
- * - * bool enable_auto_population_of_timespan_config = 4; - * @return This builder for chaining. - */ - public Builder clearEnableAutoPopulationOfTimespanConfig() { - - enableAutoPopulationOfTimespanConfig_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StorageConfig.TimespanConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StorageConfig.TimespanConfig) - private static final com.google.privacy.dlp.v2.StorageConfig.TimespanConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StorageConfig.TimespanConfig(); - } - - public static com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimespanConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TimespanConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DATASTORE_OPTIONS(2), - CLOUD_STORAGE_OPTIONS(3), - BIG_QUERY_OPTIONS(4), - HYBRID_OPTIONS(9), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 2: return DATASTORE_OPTIONS; - case 3: return CLOUD_STORAGE_OPTIONS; - case 4: return BIG_QUERY_OPTIONS; - case 9: return HYBRID_OPTIONS; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int DATASTORE_OPTIONS_FIELD_NUMBER = 2; - /** - *
-   * Google Cloud Datastore options.
-   * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - * @return Whether the datastoreOptions field is set. - */ - @java.lang.Override - public boolean hasDatastoreOptions() { - return typeCase_ == 2; - } - /** - *
-   * Google Cloud Datastore options.
-   * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - * @return The datastoreOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreOptions getDatastoreOptions() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.DatastoreOptions) type_; - } - return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); - } - /** - *
-   * Google Cloud Datastore options.
-   * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder getDatastoreOptionsOrBuilder() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.DatastoreOptions) type_; - } - return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); - } - - public static final int CLOUD_STORAGE_OPTIONS_FIELD_NUMBER = 3; - /** - *
-   * Cloud Storage options.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - * @return Whether the cloudStorageOptions field is set. - */ - @java.lang.Override - public boolean hasCloudStorageOptions() { - return typeCase_ == 3; - } - /** - *
-   * Cloud Storage options.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - * @return The cloudStorageOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions getCloudStorageOptions() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.CloudStorageOptions) type_; - } - return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); - } - /** - *
-   * Cloud Storage options.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder getCloudStorageOptionsOrBuilder() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.CloudStorageOptions) type_; - } - return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); - } - - public static final int BIG_QUERY_OPTIONS_FIELD_NUMBER = 4; - /** - *
-   * BigQuery options.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - * @return Whether the bigQueryOptions field is set. - */ - @java.lang.Override - public boolean hasBigQueryOptions() { - return typeCase_ == 4; - } - /** - *
-   * BigQuery options.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - * @return The bigQueryOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryOptions getBigQueryOptions() { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.BigQueryOptions) type_; - } - return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); - } - /** - *
-   * BigQuery options.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder getBigQueryOptionsOrBuilder() { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.BigQueryOptions) type_; - } - return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); - } - - public static final int HYBRID_OPTIONS_FIELD_NUMBER = 9; - /** - *
-   * Hybrid inspection options.
-   * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - * @return Whether the hybridOptions field is set. - */ - @java.lang.Override - public boolean hasHybridOptions() { - return typeCase_ == 9; - } - /** - *
-   * Hybrid inspection options.
-   * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - * @return The hybridOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridOptions getHybridOptions() { - if (typeCase_ == 9) { - return (com.google.privacy.dlp.v2.HybridOptions) type_; - } - return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); - } - /** - *
-   * Hybrid inspection options.
-   * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridOptionsOrBuilder getHybridOptionsOrBuilder() { - if (typeCase_ == 9) { - return (com.google.privacy.dlp.v2.HybridOptions) type_; - } - return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); - } - - public static final int TIMESPAN_CONFIG_FIELD_NUMBER = 6; - private com.google.privacy.dlp.v2.StorageConfig.TimespanConfig timespanConfig_; - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - * @return Whether the timespanConfig field is set. - */ - @java.lang.Override - public boolean hasTimespanConfig() { - return timespanConfig_ != null; - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - * @return The timespanConfig. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getTimespanConfig() { - return timespanConfig_ == null ? com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance() : timespanConfig_; - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder getTimespanConfigOrBuilder() { - return getTimespanConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.DatastoreOptions) type_); - } - if (typeCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.CloudStorageOptions) type_); - } - if (typeCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.BigQueryOptions) type_); - } - if (timespanConfig_ != null) { - output.writeMessage(6, getTimespanConfig()); - } - if (typeCase_ == 9) { - output.writeMessage(9, (com.google.privacy.dlp.v2.HybridOptions) type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.DatastoreOptions) type_); - } - if (typeCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.CloudStorageOptions) type_); - } - if (typeCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.BigQueryOptions) type_); - } - if (timespanConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getTimespanConfig()); - } - if (typeCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (com.google.privacy.dlp.v2.HybridOptions) type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StorageConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StorageConfig other = (com.google.privacy.dlp.v2.StorageConfig) obj; - - if (hasTimespanConfig() != other.hasTimespanConfig()) return false; - if (hasTimespanConfig()) { - if (!getTimespanConfig() - .equals(other.getTimespanConfig())) return false; - } - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 2: - if (!getDatastoreOptions() - .equals(other.getDatastoreOptions())) return false; - break; - case 3: - if (!getCloudStorageOptions() - .equals(other.getCloudStorageOptions())) return false; - break; - case 4: - if (!getBigQueryOptions() - .equals(other.getBigQueryOptions())) return false; - break; - case 9: - if (!getHybridOptions() - .equals(other.getHybridOptions())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTimespanConfig()) { - hash = (37 * hash) + TIMESPAN_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getTimespanConfig().hashCode(); - } - switch (typeCase_) { - case 2: - hash = (37 * hash) + DATASTORE_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getDatastoreOptions().hashCode(); - break; - case 3: - hash = (37 * hash) + CLOUD_STORAGE_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getCloudStorageOptions().hashCode(); - break; - case 4: - hash = (37 * hash) + BIG_QUERY_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getBigQueryOptions().hashCode(); - break; - case 9: - hash = (37 * hash) + HYBRID_OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getHybridOptions().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StorageConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StorageConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StorageConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StorageConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StorageConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StorageConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StorageConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StorageConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Shared message indicating Cloud storage type.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StorageConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StorageConfig) - com.google.privacy.dlp.v2.StorageConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StorageConfig.class, com.google.privacy.dlp.v2.StorageConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StorageConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (timespanConfigBuilder_ == null) { - timespanConfig_ = null; - } else { - timespanConfig_ = null; - timespanConfigBuilder_ = null; - } - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StorageConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig build() { - com.google.privacy.dlp.v2.StorageConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig buildPartial() { - com.google.privacy.dlp.v2.StorageConfig result = new com.google.privacy.dlp.v2.StorageConfig(this); - if (typeCase_ == 2) { - if (datastoreOptionsBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = datastoreOptionsBuilder_.build(); - } - } - if (typeCase_ == 3) { - if (cloudStorageOptionsBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = cloudStorageOptionsBuilder_.build(); - } - } - if (typeCase_ == 4) { - if (bigQueryOptionsBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = bigQueryOptionsBuilder_.build(); - } - } - if (typeCase_ == 9) { - if (hybridOptionsBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = hybridOptionsBuilder_.build(); - } - } - if (timespanConfigBuilder_ == null) { - result.timespanConfig_ = timespanConfig_; - } else { - result.timespanConfig_ = timespanConfigBuilder_.build(); - } - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StorageConfig) { - return mergeFrom((com.google.privacy.dlp.v2.StorageConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StorageConfig other) { - if (other == com.google.privacy.dlp.v2.StorageConfig.getDefaultInstance()) return this; - if (other.hasTimespanConfig()) { - mergeTimespanConfig(other.getTimespanConfig()); - } - switch (other.getTypeCase()) { - case DATASTORE_OPTIONS: { - mergeDatastoreOptions(other.getDatastoreOptions()); - break; - } - case CLOUD_STORAGE_OPTIONS: { - mergeCloudStorageOptions(other.getCloudStorageOptions()); - break; - } - case BIG_QUERY_OPTIONS: { - mergeBigQueryOptions(other.getBigQueryOptions()); - break; - } - case HYBRID_OPTIONS: { - mergeHybridOptions(other.getHybridOptions()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StorageConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StorageConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DatastoreOptions, com.google.privacy.dlp.v2.DatastoreOptions.Builder, com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder> datastoreOptionsBuilder_; - /** - *
-     * Google Cloud Datastore options.
-     * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - * @return Whether the datastoreOptions field is set. - */ - @java.lang.Override - public boolean hasDatastoreOptions() { - return typeCase_ == 2; - } - /** - *
-     * Google Cloud Datastore options.
-     * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - * @return The datastoreOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreOptions getDatastoreOptions() { - if (datastoreOptionsBuilder_ == null) { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.DatastoreOptions) type_; - } - return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); - } else { - if (typeCase_ == 2) { - return datastoreOptionsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); - } - } - /** - *
-     * Google Cloud Datastore options.
-     * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - */ - public Builder setDatastoreOptions(com.google.privacy.dlp.v2.DatastoreOptions value) { - if (datastoreOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - datastoreOptionsBuilder_.setMessage(value); - } - typeCase_ = 2; - return this; - } - /** - *
-     * Google Cloud Datastore options.
-     * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - */ - public Builder setDatastoreOptions( - com.google.privacy.dlp.v2.DatastoreOptions.Builder builderForValue) { - if (datastoreOptionsBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - datastoreOptionsBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 2; - return this; - } - /** - *
-     * Google Cloud Datastore options.
-     * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - */ - public Builder mergeDatastoreOptions(com.google.privacy.dlp.v2.DatastoreOptions value) { - if (datastoreOptionsBuilder_ == null) { - if (typeCase_ == 2 && - type_ != com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.DatastoreOptions.newBuilder((com.google.privacy.dlp.v2.DatastoreOptions) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 2) { - datastoreOptionsBuilder_.mergeFrom(value); - } else { - datastoreOptionsBuilder_.setMessage(value); - } - } - typeCase_ = 2; - return this; - } - /** - *
-     * Google Cloud Datastore options.
-     * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - */ - public Builder clearDatastoreOptions() { - if (datastoreOptionsBuilder_ == null) { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - } - datastoreOptionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Google Cloud Datastore options.
-     * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - */ - public com.google.privacy.dlp.v2.DatastoreOptions.Builder getDatastoreOptionsBuilder() { - return getDatastoreOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * Google Cloud Datastore options.
-     * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder getDatastoreOptionsOrBuilder() { - if ((typeCase_ == 2) && (datastoreOptionsBuilder_ != null)) { - return datastoreOptionsBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.DatastoreOptions) type_; - } - return com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); - } - } - /** - *
-     * Google Cloud Datastore options.
-     * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DatastoreOptions, com.google.privacy.dlp.v2.DatastoreOptions.Builder, com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder> - getDatastoreOptionsFieldBuilder() { - if (datastoreOptionsBuilder_ == null) { - if (!(typeCase_ == 2)) { - type_ = com.google.privacy.dlp.v2.DatastoreOptions.getDefaultInstance(); - } - datastoreOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DatastoreOptions, com.google.privacy.dlp.v2.DatastoreOptions.Builder, com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder>( - (com.google.privacy.dlp.v2.DatastoreOptions) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 2; - onChanged();; - return datastoreOptionsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageOptions, com.google.privacy.dlp.v2.CloudStorageOptions.Builder, com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder> cloudStorageOptionsBuilder_; - /** - *
-     * Cloud Storage options.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - * @return Whether the cloudStorageOptions field is set. - */ - @java.lang.Override - public boolean hasCloudStorageOptions() { - return typeCase_ == 3; - } - /** - *
-     * Cloud Storage options.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - * @return The cloudStorageOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptions getCloudStorageOptions() { - if (cloudStorageOptionsBuilder_ == null) { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.CloudStorageOptions) type_; - } - return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); - } else { - if (typeCase_ == 3) { - return cloudStorageOptionsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); - } - } - /** - *
-     * Cloud Storage options.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - */ - public Builder setCloudStorageOptions(com.google.privacy.dlp.v2.CloudStorageOptions value) { - if (cloudStorageOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - cloudStorageOptionsBuilder_.setMessage(value); - } - typeCase_ = 3; - return this; - } - /** - *
-     * Cloud Storage options.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - */ - public Builder setCloudStorageOptions( - com.google.privacy.dlp.v2.CloudStorageOptions.Builder builderForValue) { - if (cloudStorageOptionsBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - cloudStorageOptionsBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 3; - return this; - } - /** - *
-     * Cloud Storage options.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - */ - public Builder mergeCloudStorageOptions(com.google.privacy.dlp.v2.CloudStorageOptions value) { - if (cloudStorageOptionsBuilder_ == null) { - if (typeCase_ == 3 && - type_ != com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CloudStorageOptions.newBuilder((com.google.privacy.dlp.v2.CloudStorageOptions) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 3) { - cloudStorageOptionsBuilder_.mergeFrom(value); - } else { - cloudStorageOptionsBuilder_.setMessage(value); - } - } - typeCase_ = 3; - return this; - } - /** - *
-     * Cloud Storage options.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - */ - public Builder clearCloudStorageOptions() { - if (cloudStorageOptionsBuilder_ == null) { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - } - cloudStorageOptionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Cloud Storage options.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - */ - public com.google.privacy.dlp.v2.CloudStorageOptions.Builder getCloudStorageOptionsBuilder() { - return getCloudStorageOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * Cloud Storage options.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder getCloudStorageOptionsOrBuilder() { - if ((typeCase_ == 3) && (cloudStorageOptionsBuilder_ != null)) { - return cloudStorageOptionsBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.CloudStorageOptions) type_; - } - return com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); - } - } - /** - *
-     * Cloud Storage options.
-     * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageOptions, com.google.privacy.dlp.v2.CloudStorageOptions.Builder, com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder> - getCloudStorageOptionsFieldBuilder() { - if (cloudStorageOptionsBuilder_ == null) { - if (!(typeCase_ == 3)) { - type_ = com.google.privacy.dlp.v2.CloudStorageOptions.getDefaultInstance(); - } - cloudStorageOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CloudStorageOptions, com.google.privacy.dlp.v2.CloudStorageOptions.Builder, com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder>( - (com.google.privacy.dlp.v2.CloudStorageOptions) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 3; - onChanged();; - return cloudStorageOptionsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryOptions, com.google.privacy.dlp.v2.BigQueryOptions.Builder, com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder> bigQueryOptionsBuilder_; - /** - *
-     * BigQuery options.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - * @return Whether the bigQueryOptions field is set. - */ - @java.lang.Override - public boolean hasBigQueryOptions() { - return typeCase_ == 4; - } - /** - *
-     * BigQuery options.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - * @return The bigQueryOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryOptions getBigQueryOptions() { - if (bigQueryOptionsBuilder_ == null) { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.BigQueryOptions) type_; - } - return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); - } else { - if (typeCase_ == 4) { - return bigQueryOptionsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); - } - } - /** - *
-     * BigQuery options.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - */ - public Builder setBigQueryOptions(com.google.privacy.dlp.v2.BigQueryOptions value) { - if (bigQueryOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - bigQueryOptionsBuilder_.setMessage(value); - } - typeCase_ = 4; - return this; - } - /** - *
-     * BigQuery options.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - */ - public Builder setBigQueryOptions( - com.google.privacy.dlp.v2.BigQueryOptions.Builder builderForValue) { - if (bigQueryOptionsBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - bigQueryOptionsBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 4; - return this; - } - /** - *
-     * BigQuery options.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - */ - public Builder mergeBigQueryOptions(com.google.privacy.dlp.v2.BigQueryOptions value) { - if (bigQueryOptionsBuilder_ == null) { - if (typeCase_ == 4 && - type_ != com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.BigQueryOptions.newBuilder((com.google.privacy.dlp.v2.BigQueryOptions) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 4) { - bigQueryOptionsBuilder_.mergeFrom(value); - } else { - bigQueryOptionsBuilder_.setMessage(value); - } - } - typeCase_ = 4; - return this; - } - /** - *
-     * BigQuery options.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - */ - public Builder clearBigQueryOptions() { - if (bigQueryOptionsBuilder_ == null) { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - } - bigQueryOptionsBuilder_.clear(); - } - return this; - } - /** - *
-     * BigQuery options.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - */ - public com.google.privacy.dlp.v2.BigQueryOptions.Builder getBigQueryOptionsBuilder() { - return getBigQueryOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * BigQuery options.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder getBigQueryOptionsOrBuilder() { - if ((typeCase_ == 4) && (bigQueryOptionsBuilder_ != null)) { - return bigQueryOptionsBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.BigQueryOptions) type_; - } - return com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); - } - } - /** - *
-     * BigQuery options.
-     * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryOptions, com.google.privacy.dlp.v2.BigQueryOptions.Builder, com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder> - getBigQueryOptionsFieldBuilder() { - if (bigQueryOptionsBuilder_ == null) { - if (!(typeCase_ == 4)) { - type_ = com.google.privacy.dlp.v2.BigQueryOptions.getDefaultInstance(); - } - bigQueryOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.BigQueryOptions, com.google.privacy.dlp.v2.BigQueryOptions.Builder, com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder>( - (com.google.privacy.dlp.v2.BigQueryOptions) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 4; - onChanged();; - return bigQueryOptionsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridOptions, com.google.privacy.dlp.v2.HybridOptions.Builder, com.google.privacy.dlp.v2.HybridOptionsOrBuilder> hybridOptionsBuilder_; - /** - *
-     * Hybrid inspection options.
-     * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - * @return Whether the hybridOptions field is set. - */ - @java.lang.Override - public boolean hasHybridOptions() { - return typeCase_ == 9; - } - /** - *
-     * Hybrid inspection options.
-     * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - * @return The hybridOptions. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridOptions getHybridOptions() { - if (hybridOptionsBuilder_ == null) { - if (typeCase_ == 9) { - return (com.google.privacy.dlp.v2.HybridOptions) type_; - } - return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); - } else { - if (typeCase_ == 9) { - return hybridOptionsBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); - } - } - /** - *
-     * Hybrid inspection options.
-     * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - */ - public Builder setHybridOptions(com.google.privacy.dlp.v2.HybridOptions value) { - if (hybridOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - hybridOptionsBuilder_.setMessage(value); - } - typeCase_ = 9; - return this; - } - /** - *
-     * Hybrid inspection options.
-     * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - */ - public Builder setHybridOptions( - com.google.privacy.dlp.v2.HybridOptions.Builder builderForValue) { - if (hybridOptionsBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - hybridOptionsBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 9; - return this; - } - /** - *
-     * Hybrid inspection options.
-     * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - */ - public Builder mergeHybridOptions(com.google.privacy.dlp.v2.HybridOptions value) { - if (hybridOptionsBuilder_ == null) { - if (typeCase_ == 9 && - type_ != com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.HybridOptions.newBuilder((com.google.privacy.dlp.v2.HybridOptions) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 9) { - hybridOptionsBuilder_.mergeFrom(value); - } else { - hybridOptionsBuilder_.setMessage(value); - } - } - typeCase_ = 9; - return this; - } - /** - *
-     * Hybrid inspection options.
-     * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - */ - public Builder clearHybridOptions() { - if (hybridOptionsBuilder_ == null) { - if (typeCase_ == 9) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 9) { - typeCase_ = 0; - type_ = null; - } - hybridOptionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Hybrid inspection options.
-     * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - */ - public com.google.privacy.dlp.v2.HybridOptions.Builder getHybridOptionsBuilder() { - return getHybridOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * Hybrid inspection options.
-     * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.HybridOptionsOrBuilder getHybridOptionsOrBuilder() { - if ((typeCase_ == 9) && (hybridOptionsBuilder_ != null)) { - return hybridOptionsBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 9) { - return (com.google.privacy.dlp.v2.HybridOptions) type_; - } - return com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); - } - } - /** - *
-     * Hybrid inspection options.
-     * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridOptions, com.google.privacy.dlp.v2.HybridOptions.Builder, com.google.privacy.dlp.v2.HybridOptionsOrBuilder> - getHybridOptionsFieldBuilder() { - if (hybridOptionsBuilder_ == null) { - if (!(typeCase_ == 9)) { - type_ = com.google.privacy.dlp.v2.HybridOptions.getDefaultInstance(); - } - hybridOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.HybridOptions, com.google.privacy.dlp.v2.HybridOptions.Builder, com.google.privacy.dlp.v2.HybridOptionsOrBuilder>( - (com.google.privacy.dlp.v2.HybridOptions) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 9; - onChanged();; - return hybridOptionsBuilder_; - } - - private com.google.privacy.dlp.v2.StorageConfig.TimespanConfig timespanConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder, com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder> timespanConfigBuilder_; - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - * @return Whether the timespanConfig field is set. - */ - public boolean hasTimespanConfig() { - return timespanConfigBuilder_ != null || timespanConfig_ != null; - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - * @return The timespanConfig. - */ - public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getTimespanConfig() { - if (timespanConfigBuilder_ == null) { - return timespanConfig_ == null ? com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance() : timespanConfig_; - } else { - return timespanConfigBuilder_.getMessage(); - } - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - */ - public Builder setTimespanConfig(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig value) { - if (timespanConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timespanConfig_ = value; - onChanged(); - } else { - timespanConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - */ - public Builder setTimespanConfig( - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder builderForValue) { - if (timespanConfigBuilder_ == null) { - timespanConfig_ = builderForValue.build(); - onChanged(); - } else { - timespanConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - */ - public Builder mergeTimespanConfig(com.google.privacy.dlp.v2.StorageConfig.TimespanConfig value) { - if (timespanConfigBuilder_ == null) { - if (timespanConfig_ != null) { - timespanConfig_ = - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.newBuilder(timespanConfig_).mergeFrom(value).buildPartial(); - } else { - timespanConfig_ = value; - } - onChanged(); - } else { - timespanConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - */ - public Builder clearTimespanConfig() { - if (timespanConfigBuilder_ == null) { - timespanConfig_ = null; - onChanged(); - } else { - timespanConfig_ = null; - timespanConfigBuilder_ = null; - } - - return this; - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - */ - public com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder getTimespanConfigBuilder() { - - onChanged(); - return getTimespanConfigFieldBuilder().getBuilder(); - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - */ - public com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder getTimespanConfigOrBuilder() { - if (timespanConfigBuilder_ != null) { - return timespanConfigBuilder_.getMessageOrBuilder(); - } else { - return timespanConfig_ == null ? - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.getDefaultInstance() : timespanConfig_; - } - } - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder, com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder> - getTimespanConfigFieldBuilder() { - if (timespanConfigBuilder_ == null) { - timespanConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig, com.google.privacy.dlp.v2.StorageConfig.TimespanConfig.Builder, com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder>( - getTimespanConfig(), - getParentForChildren(), - isClean()); - timespanConfig_ = null; - } - return timespanConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StorageConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StorageConfig) - private static final com.google.privacy.dlp.v2.StorageConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StorageConfig(); - } - - public static com.google.privacy.dlp.v2.StorageConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StorageConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StorageConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java deleted file mode 100644 index b3cd3b0327ab..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageConfigOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface StorageConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StorageConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Google Cloud Datastore options.
-   * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - * @return Whether the datastoreOptions field is set. - */ - boolean hasDatastoreOptions(); - /** - *
-   * Google Cloud Datastore options.
-   * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - * @return The datastoreOptions. - */ - com.google.privacy.dlp.v2.DatastoreOptions getDatastoreOptions(); - /** - *
-   * Google Cloud Datastore options.
-   * 
- * - * .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2; - */ - com.google.privacy.dlp.v2.DatastoreOptionsOrBuilder getDatastoreOptionsOrBuilder(); - - /** - *
-   * Cloud Storage options.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - * @return Whether the cloudStorageOptions field is set. - */ - boolean hasCloudStorageOptions(); - /** - *
-   * Cloud Storage options.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - * @return The cloudStorageOptions. - */ - com.google.privacy.dlp.v2.CloudStorageOptions getCloudStorageOptions(); - /** - *
-   * Cloud Storage options.
-   * 
- * - * .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3; - */ - com.google.privacy.dlp.v2.CloudStorageOptionsOrBuilder getCloudStorageOptionsOrBuilder(); - - /** - *
-   * BigQuery options.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - * @return Whether the bigQueryOptions field is set. - */ - boolean hasBigQueryOptions(); - /** - *
-   * BigQuery options.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - * @return The bigQueryOptions. - */ - com.google.privacy.dlp.v2.BigQueryOptions getBigQueryOptions(); - /** - *
-   * BigQuery options.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4; - */ - com.google.privacy.dlp.v2.BigQueryOptionsOrBuilder getBigQueryOptionsOrBuilder(); - - /** - *
-   * Hybrid inspection options.
-   * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - * @return Whether the hybridOptions field is set. - */ - boolean hasHybridOptions(); - /** - *
-   * Hybrid inspection options.
-   * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - * @return The hybridOptions. - */ - com.google.privacy.dlp.v2.HybridOptions getHybridOptions(); - /** - *
-   * Hybrid inspection options.
-   * 
- * - * .google.privacy.dlp.v2.HybridOptions hybrid_options = 9; - */ - com.google.privacy.dlp.v2.HybridOptionsOrBuilder getHybridOptionsOrBuilder(); - - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - * @return Whether the timespanConfig field is set. - */ - boolean hasTimespanConfig(); - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - * @return The timespanConfig. - */ - com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getTimespanConfig(); - /** - * .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6; - */ - com.google.privacy.dlp.v2.StorageConfig.TimespanConfigOrBuilder getTimespanConfigOrBuilder(); - - public com.google.privacy.dlp.v2.StorageConfig.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabel.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabel.java deleted file mode 100644 index c1b640c68260..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabel.java +++ /dev/null @@ -1,567 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Storage metadata label to indicate which metadata entry contains findings.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StorageMetadataLabel} - */ -public final class StorageMetadataLabel extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StorageMetadataLabel) - StorageMetadataLabelOrBuilder { -private static final long serialVersionUID = 0L; - // Use StorageMetadataLabel.newBuilder() to construct. - private StorageMetadataLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StorageMetadataLabel() { - key_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StorageMetadataLabel(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StorageMetadataLabel( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StorageMetadataLabel.class, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder.class); - } - - public static final int KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object key_; - /** - * string key = 1; - * @return The key. - */ - @java.lang.Override - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } - } - /** - * string key = 1; - * @return The bytes for key. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StorageMetadataLabel)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StorageMetadataLabel other = (com.google.privacy.dlp.v2.StorageMetadataLabel) obj; - - if (!getKey() - .equals(other.getKey())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KEY_FIELD_NUMBER; - hash = (53 * hash) + getKey().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StorageMetadataLabel parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StorageMetadataLabel prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Storage metadata label to indicate which metadata entry contains findings.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StorageMetadataLabel} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StorageMetadataLabel) - com.google.privacy.dlp.v2.StorageMetadataLabelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StorageMetadataLabel.class, com.google.privacy.dlp.v2.StorageMetadataLabel.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StorageMetadataLabel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - key_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StorageMetadataLabel_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageMetadataLabel getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageMetadataLabel build() { - com.google.privacy.dlp.v2.StorageMetadataLabel result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageMetadataLabel buildPartial() { - com.google.privacy.dlp.v2.StorageMetadataLabel result = new com.google.privacy.dlp.v2.StorageMetadataLabel(this); - result.key_ = key_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StorageMetadataLabel) { - return mergeFrom((com.google.privacy.dlp.v2.StorageMetadataLabel)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StorageMetadataLabel other) { - if (other == com.google.privacy.dlp.v2.StorageMetadataLabel.getDefaultInstance()) return this; - if (!other.getKey().isEmpty()) { - key_ = other.key_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StorageMetadataLabel parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StorageMetadataLabel) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object key_ = ""; - /** - * string key = 1; - * @return The key. - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string key = 1; - * @return The bytes for key. - */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string key = 1; - * @param value The key to set. - * @return This builder for chaining. - */ - public Builder setKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - key_ = value; - onChanged(); - return this; - } - /** - * string key = 1; - * @return This builder for chaining. - */ - public Builder clearKey() { - - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - /** - * string key = 1; - * @param value The bytes for key to set. - * @return This builder for chaining. - */ - public Builder setKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - key_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StorageMetadataLabel) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StorageMetadataLabel) - private static final com.google.privacy.dlp.v2.StorageMetadataLabel DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StorageMetadataLabel(); - } - - public static com.google.privacy.dlp.v2.StorageMetadataLabel getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StorageMetadataLabel parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StorageMetadataLabel(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StorageMetadataLabel getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabelOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabelOrBuilder.java deleted file mode 100644 index aee8b378113f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StorageMetadataLabelOrBuilder.java +++ /dev/null @@ -1,21 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface StorageMetadataLabelOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StorageMetadataLabel) - com.google.protobuf.MessageOrBuilder { - - /** - * string key = 1; - * @return The key. - */ - java.lang.String getKey(); - /** - * string key = 1; - * @return The bytes for key. - */ - com.google.protobuf.ByteString - getKeyBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoType.java deleted file mode 100644 index 5b2018aaebb9..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoType.java +++ /dev/null @@ -1,1299 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * StoredInfoType resource message that contains information about the current
- * version and any pending updates.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredInfoType} - */ -public final class StoredInfoType extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredInfoType) - StoredInfoTypeOrBuilder { -private static final long serialVersionUID = 0L; - // Use StoredInfoType.newBuilder() to construct. - private StoredInfoType(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StoredInfoType() { - name_ = ""; - pendingVersions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StoredInfoType(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StoredInfoType( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder subBuilder = null; - if (currentVersion_ != null) { - subBuilder = currentVersion_.toBuilder(); - } - currentVersion_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeVersion.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(currentVersion_); - currentVersion_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - pendingVersions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - pendingVersions_.add( - input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeVersion.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - pendingVersions_ = java.util.Collections.unmodifiableList(pendingVersions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredInfoType.class, com.google.privacy.dlp.v2.StoredInfoType.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CURRENT_VERSION_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.StoredInfoTypeVersion currentVersion_; - /** - *
-   * Current version of the stored info type.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - * @return Whether the currentVersion field is set. - */ - @java.lang.Override - public boolean hasCurrentVersion() { - return currentVersion_ != null; - } - /** - *
-   * Current version of the stored info type.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - * @return The currentVersion. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeVersion getCurrentVersion() { - return currentVersion_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance() : currentVersion_; - } - /** - *
-   * Current version of the stored info type.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getCurrentVersionOrBuilder() { - return getCurrentVersion(); - } - - public static final int PENDING_VERSIONS_FIELD_NUMBER = 3; - private java.util.List pendingVersions_; - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - @java.lang.Override - public java.util.List getPendingVersionsList() { - return pendingVersions_; - } - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - @java.lang.Override - public java.util.List - getPendingVersionsOrBuilderList() { - return pendingVersions_; - } - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - @java.lang.Override - public int getPendingVersionsCount() { - return pendingVersions_.size(); - } - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeVersion getPendingVersions(int index) { - return pendingVersions_.get(index); - } - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getPendingVersionsOrBuilder( - int index) { - return pendingVersions_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (currentVersion_ != null) { - output.writeMessage(2, getCurrentVersion()); - } - for (int i = 0; i < pendingVersions_.size(); i++) { - output.writeMessage(3, pendingVersions_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (currentVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getCurrentVersion()); - } - for (int i = 0; i < pendingVersions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, pendingVersions_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StoredInfoType)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StoredInfoType other = (com.google.privacy.dlp.v2.StoredInfoType) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasCurrentVersion() != other.hasCurrentVersion()) return false; - if (hasCurrentVersion()) { - if (!getCurrentVersion() - .equals(other.getCurrentVersion())) return false; - } - if (!getPendingVersionsList() - .equals(other.getPendingVersionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCurrentVersion()) { - hash = (37 * hash) + CURRENT_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getCurrentVersion().hashCode(); - } - if (getPendingVersionsCount() > 0) { - hash = (37 * hash) + PENDING_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getPendingVersionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoType parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StoredInfoType prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * StoredInfoType resource message that contains information about the current
-   * version and any pending updates.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredInfoType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredInfoType) - com.google.privacy.dlp.v2.StoredInfoTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredInfoType.class, com.google.privacy.dlp.v2.StoredInfoType.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StoredInfoType.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPendingVersionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (currentVersionBuilder_ == null) { - currentVersion_ = null; - } else { - currentVersion_ = null; - currentVersionBuilder_ = null; - } - if (pendingVersionsBuilder_ == null) { - pendingVersions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - pendingVersionsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoType_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoType getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoType build() { - com.google.privacy.dlp.v2.StoredInfoType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoType buildPartial() { - com.google.privacy.dlp.v2.StoredInfoType result = new com.google.privacy.dlp.v2.StoredInfoType(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (currentVersionBuilder_ == null) { - result.currentVersion_ = currentVersion_; - } else { - result.currentVersion_ = currentVersionBuilder_.build(); - } - if (pendingVersionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - pendingVersions_ = java.util.Collections.unmodifiableList(pendingVersions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.pendingVersions_ = pendingVersions_; - } else { - result.pendingVersions_ = pendingVersionsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StoredInfoType) { - return mergeFrom((com.google.privacy.dlp.v2.StoredInfoType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StoredInfoType other) { - if (other == com.google.privacy.dlp.v2.StoredInfoType.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasCurrentVersion()) { - mergeCurrentVersion(other.getCurrentVersion()); - } - if (pendingVersionsBuilder_ == null) { - if (!other.pendingVersions_.isEmpty()) { - if (pendingVersions_.isEmpty()) { - pendingVersions_ = other.pendingVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePendingVersionsIsMutable(); - pendingVersions_.addAll(other.pendingVersions_); - } - onChanged(); - } - } else { - if (!other.pendingVersions_.isEmpty()) { - if (pendingVersionsBuilder_.isEmpty()) { - pendingVersionsBuilder_.dispose(); - pendingVersionsBuilder_ = null; - pendingVersions_ = other.pendingVersions_; - bitField0_ = (bitField0_ & ~0x00000001); - pendingVersionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPendingVersionsFieldBuilder() : null; - } else { - pendingVersionsBuilder_.addAllMessages(other.pendingVersions_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StoredInfoType parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StoredInfoType) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Resource name.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.StoredInfoTypeVersion currentVersion_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder> currentVersionBuilder_; - /** - *
-     * Current version of the stored info type.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - * @return Whether the currentVersion field is set. - */ - public boolean hasCurrentVersion() { - return currentVersionBuilder_ != null || currentVersion_ != null; - } - /** - *
-     * Current version of the stored info type.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - * @return The currentVersion. - */ - public com.google.privacy.dlp.v2.StoredInfoTypeVersion getCurrentVersion() { - if (currentVersionBuilder_ == null) { - return currentVersion_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance() : currentVersion_; - } else { - return currentVersionBuilder_.getMessage(); - } - } - /** - *
-     * Current version of the stored info type.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - */ - public Builder setCurrentVersion(com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { - if (currentVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - currentVersion_ = value; - onChanged(); - } else { - currentVersionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Current version of the stored info type.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - */ - public Builder setCurrentVersion( - com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder builderForValue) { - if (currentVersionBuilder_ == null) { - currentVersion_ = builderForValue.build(); - onChanged(); - } else { - currentVersionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Current version of the stored info type.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - */ - public Builder mergeCurrentVersion(com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { - if (currentVersionBuilder_ == null) { - if (currentVersion_ != null) { - currentVersion_ = - com.google.privacy.dlp.v2.StoredInfoTypeVersion.newBuilder(currentVersion_).mergeFrom(value).buildPartial(); - } else { - currentVersion_ = value; - } - onChanged(); - } else { - currentVersionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Current version of the stored info type.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - */ - public Builder clearCurrentVersion() { - if (currentVersionBuilder_ == null) { - currentVersion_ = null; - onChanged(); - } else { - currentVersion_ = null; - currentVersionBuilder_ = null; - } - - return this; - } - /** - *
-     * Current version of the stored info type.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder getCurrentVersionBuilder() { - - onChanged(); - return getCurrentVersionFieldBuilder().getBuilder(); - } - /** - *
-     * Current version of the stored info type.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getCurrentVersionOrBuilder() { - if (currentVersionBuilder_ != null) { - return currentVersionBuilder_.getMessageOrBuilder(); - } else { - return currentVersion_ == null ? - com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance() : currentVersion_; - } - } - /** - *
-     * Current version of the stored info type.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder> - getCurrentVersionFieldBuilder() { - if (currentVersionBuilder_ == null) { - currentVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder>( - getCurrentVersion(), - getParentForChildren(), - isClean()); - currentVersion_ = null; - } - return currentVersionBuilder_; - } - - private java.util.List pendingVersions_ = - java.util.Collections.emptyList(); - private void ensurePendingVersionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - pendingVersions_ = new java.util.ArrayList(pendingVersions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder> pendingVersionsBuilder_; - - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public java.util.List getPendingVersionsList() { - if (pendingVersionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(pendingVersions_); - } else { - return pendingVersionsBuilder_.getMessageList(); - } - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public int getPendingVersionsCount() { - if (pendingVersionsBuilder_ == null) { - return pendingVersions_.size(); - } else { - return pendingVersionsBuilder_.getCount(); - } - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeVersion getPendingVersions(int index) { - if (pendingVersionsBuilder_ == null) { - return pendingVersions_.get(index); - } else { - return pendingVersionsBuilder_.getMessage(index); - } - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public Builder setPendingVersions( - int index, com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { - if (pendingVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePendingVersionsIsMutable(); - pendingVersions_.set(index, value); - onChanged(); - } else { - pendingVersionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public Builder setPendingVersions( - int index, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder builderForValue) { - if (pendingVersionsBuilder_ == null) { - ensurePendingVersionsIsMutable(); - pendingVersions_.set(index, builderForValue.build()); - onChanged(); - } else { - pendingVersionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public Builder addPendingVersions(com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { - if (pendingVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePendingVersionsIsMutable(); - pendingVersions_.add(value); - onChanged(); - } else { - pendingVersionsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public Builder addPendingVersions( - int index, com.google.privacy.dlp.v2.StoredInfoTypeVersion value) { - if (pendingVersionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePendingVersionsIsMutable(); - pendingVersions_.add(index, value); - onChanged(); - } else { - pendingVersionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public Builder addPendingVersions( - com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder builderForValue) { - if (pendingVersionsBuilder_ == null) { - ensurePendingVersionsIsMutable(); - pendingVersions_.add(builderForValue.build()); - onChanged(); - } else { - pendingVersionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public Builder addPendingVersions( - int index, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder builderForValue) { - if (pendingVersionsBuilder_ == null) { - ensurePendingVersionsIsMutable(); - pendingVersions_.add(index, builderForValue.build()); - onChanged(); - } else { - pendingVersionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public Builder addAllPendingVersions( - java.lang.Iterable values) { - if (pendingVersionsBuilder_ == null) { - ensurePendingVersionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pendingVersions_); - onChanged(); - } else { - pendingVersionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public Builder clearPendingVersions() { - if (pendingVersionsBuilder_ == null) { - pendingVersions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - pendingVersionsBuilder_.clear(); - } - return this; - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public Builder removePendingVersions(int index) { - if (pendingVersionsBuilder_ == null) { - ensurePendingVersionsIsMutable(); - pendingVersions_.remove(index); - onChanged(); - } else { - pendingVersionsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder getPendingVersionsBuilder( - int index) { - return getPendingVersionsFieldBuilder().getBuilder(index); - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getPendingVersionsOrBuilder( - int index) { - if (pendingVersionsBuilder_ == null) { - return pendingVersions_.get(index); } else { - return pendingVersionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public java.util.List - getPendingVersionsOrBuilderList() { - if (pendingVersionsBuilder_ != null) { - return pendingVersionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pendingVersions_); - } - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder addPendingVersionsBuilder() { - return getPendingVersionsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance()); - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder addPendingVersionsBuilder( - int index) { - return getPendingVersionsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance()); - } - /** - *
-     * Pending versions of the stored info type. Empty if no versions are
-     * pending.
-     * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - public java.util.List - getPendingVersionsBuilderList() { - return getPendingVersionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder> - getPendingVersionsFieldBuilder() { - if (pendingVersionsBuilder_ == null) { - pendingVersionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeVersion, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder, com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder>( - pendingVersions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - pendingVersions_ = null; - } - return pendingVersionsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredInfoType) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredInfoType) - private static final com.google.privacy.dlp.v2.StoredInfoType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredInfoType(); - } - - public static com.google.privacy.dlp.v2.StoredInfoType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StoredInfoType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StoredInfoType(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfig.java deleted file mode 100644 index 4f77b11984bd..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfig.java +++ /dev/null @@ -1,1623 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Configuration for stored infoTypes. All fields and subfield are provided
- * by the user. For more information, see
- * https://cloud.google.com/dlp/docs/creating-custom-infotypes.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeConfig} - */ -public final class StoredInfoTypeConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredInfoTypeConfig) - StoredInfoTypeConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use StoredInfoTypeConfig.newBuilder() to construct. - private StoredInfoTypeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StoredInfoTypeConfig() { - displayName_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StoredInfoTypeConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StoredInfoTypeConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: { - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder subBuilder = null; - if (typeCase_ == 3) { - subBuilder = ((com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 3; - break; - } - case 34: { - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder subBuilder = null; - if (typeCase_ == 4) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Dictionary.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 4; - break; - } - case 42: { - com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder subBuilder = null; - if (typeCase_ == 5) { - subBuilder = ((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.CustomInfoType.Regex.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 5; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredInfoTypeConfig.class, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder.class); - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LARGE_CUSTOM_DICTIONARY(3), - DICTIONARY(4), - REGEX(5), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 3: return LARGE_CUSTOM_DICTIONARY; - case 4: return DICTIONARY; - case 5: return REGEX; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object displayName_; - /** - *
-   * Display name of the StoredInfoType (max 256 characters).
-   * 
- * - * string display_name = 1; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * Display name of the StoredInfoType (max 256 characters).
-   * 
- * - * string display_name = 1; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - *
-   * Description of the StoredInfoType (max 256 characters).
-   * 
- * - * string description = 2; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * Description of the StoredInfoType (max 256 characters).
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LARGE_CUSTOM_DICTIONARY_FIELD_NUMBER = 3; - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - * @return Whether the largeCustomDictionary field is set. - */ - @java.lang.Override - public boolean hasLargeCustomDictionary() { - return typeCase_ == 3; - } - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - * @return The largeCustomDictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getLargeCustomDictionary() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_; - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); - } - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder getLargeCustomDictionaryOrBuilder() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_; - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); - } - - public static final int DICTIONARY_FIELD_NUMBER = 4; - /** - *
-   * Store dictionary-based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - * @return Whether the dictionary field is set. - */ - @java.lang.Override - public boolean hasDictionary() { - return typeCase_ == 4; - } - /** - *
-   * Store dictionary-based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - * @return The dictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - /** - *
-   * Store dictionary-based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - - public static final int REGEX_FIELD_NUMBER = 5; - /** - *
-   * Store regular expression-based StoredInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - * @return Whether the regex field is set. - */ - @java.lang.Override - public boolean hasRegex() { - return typeCase_ == 5; - } - /** - *
-   * Store regular expression-based StoredInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - * @return The regex. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - /** - *
-   * Store regular expression-based StoredInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (typeCase_ == 3) { - output.writeMessage(3, (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_); - } - if (typeCase_ == 4) { - output.writeMessage(4, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); - } - if (typeCase_ == 5) { - output.writeMessage(5, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (typeCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_); - } - if (typeCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_); - } - if (typeCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StoredInfoTypeConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StoredInfoTypeConfig other = (com.google.privacy.dlp.v2.StoredInfoTypeConfig) obj; - - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 3: - if (!getLargeCustomDictionary() - .equals(other.getLargeCustomDictionary())) return false; - break; - case 4: - if (!getDictionary() - .equals(other.getDictionary())) return false; - break; - case 5: - if (!getRegex() - .equals(other.getRegex())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - switch (typeCase_) { - case 3: - hash = (37 * hash) + LARGE_CUSTOM_DICTIONARY_FIELD_NUMBER; - hash = (53 * hash) + getLargeCustomDictionary().hashCode(); - break; - case 4: - hash = (37 * hash) + DICTIONARY_FIELD_NUMBER; - hash = (53 * hash) + getDictionary().hashCode(); - break; - case 5: - hash = (37 * hash) + REGEX_FIELD_NUMBER; - hash = (53 * hash) + getRegex().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StoredInfoTypeConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Configuration for stored infoTypes. All fields and subfield are provided
-   * by the user. For more information, see
-   * https://cloud.google.com/dlp/docs/creating-custom-infotypes.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredInfoTypeConfig) - com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredInfoTypeConfig.class, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StoredInfoTypeConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - displayName_ = ""; - - description_ = ""; - - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfig build() { - com.google.privacy.dlp.v2.StoredInfoTypeConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfig buildPartial() { - com.google.privacy.dlp.v2.StoredInfoTypeConfig result = new com.google.privacy.dlp.v2.StoredInfoTypeConfig(this); - result.displayName_ = displayName_; - result.description_ = description_; - if (typeCase_ == 3) { - if (largeCustomDictionaryBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = largeCustomDictionaryBuilder_.build(); - } - } - if (typeCase_ == 4) { - if (dictionaryBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = dictionaryBuilder_.build(); - } - } - if (typeCase_ == 5) { - if (regexBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = regexBuilder_.build(); - } - } - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StoredInfoTypeConfig) { - return mergeFrom((com.google.privacy.dlp.v2.StoredInfoTypeConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StoredInfoTypeConfig other) { - if (other == com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance()) return this; - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - switch (other.getTypeCase()) { - case LARGE_CUSTOM_DICTIONARY: { - mergeLargeCustomDictionary(other.getLargeCustomDictionary()); - break; - } - case DICTIONARY: { - mergeDictionary(other.getDictionary()); - break; - } - case REGEX: { - mergeRegex(other.getRegex()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StoredInfoTypeConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StoredInfoTypeConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private java.lang.Object displayName_ = ""; - /** - *
-     * Display name of the StoredInfoType (max 256 characters).
-     * 
- * - * string display_name = 1; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Display name of the StoredInfoType (max 256 characters).
-     * 
- * - * string display_name = 1; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Display name of the StoredInfoType (max 256 characters).
-     * 
- * - * string display_name = 1; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * Display name of the StoredInfoType (max 256 characters).
-     * 
- * - * string display_name = 1; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * Display name of the StoredInfoType (max 256 characters).
-     * 
- * - * string display_name = 1; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * Description of the StoredInfoType (max 256 characters).
-     * 
- * - * string description = 2; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Description of the StoredInfoType (max 256 characters).
-     * 
- * - * string description = 2; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Description of the StoredInfoType (max 256 characters).
-     * 
- * - * string description = 2; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * Description of the StoredInfoType (max 256 characters).
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * Description of the StoredInfoType (max 256 characters).
-     * 
- * - * string description = 2; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder> largeCustomDictionaryBuilder_; - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - * @return Whether the largeCustomDictionary field is set. - */ - @java.lang.Override - public boolean hasLargeCustomDictionary() { - return typeCase_ == 3; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - * @return The largeCustomDictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getLargeCustomDictionary() { - if (largeCustomDictionaryBuilder_ == null) { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_; - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); - } else { - if (typeCase_ == 3) { - return largeCustomDictionaryBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); - } - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - */ - public Builder setLargeCustomDictionary(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig value) { - if (largeCustomDictionaryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - largeCustomDictionaryBuilder_.setMessage(value); - } - typeCase_ = 3; - return this; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - */ - public Builder setLargeCustomDictionary( - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder builderForValue) { - if (largeCustomDictionaryBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - largeCustomDictionaryBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 3; - return this; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - */ - public Builder mergeLargeCustomDictionary(com.google.privacy.dlp.v2.LargeCustomDictionaryConfig value) { - if (largeCustomDictionaryBuilder_ == null) { - if (typeCase_ == 3 && - type_ != com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.newBuilder((com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 3) { - largeCustomDictionaryBuilder_.mergeFrom(value); - } else { - largeCustomDictionaryBuilder_.setMessage(value); - } - } - typeCase_ = 3; - return this; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - */ - public Builder clearLargeCustomDictionary() { - if (largeCustomDictionaryBuilder_ == null) { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - } - largeCustomDictionaryBuilder_.clear(); - } - return this; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - */ - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder getLargeCustomDictionaryBuilder() { - return getLargeCustomDictionaryFieldBuilder().getBuilder(); - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder getLargeCustomDictionaryOrBuilder() { - if ((typeCase_ == 3) && (largeCustomDictionaryBuilder_ != null)) { - return largeCustomDictionaryBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_; - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); - } - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder> - getLargeCustomDictionaryFieldBuilder() { - if (largeCustomDictionaryBuilder_ == null) { - if (!(typeCase_ == 3)) { - type_ = com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.getDefaultInstance(); - } - largeCustomDictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig, com.google.privacy.dlp.v2.LargeCustomDictionaryConfig.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder>( - (com.google.privacy.dlp.v2.LargeCustomDictionaryConfig) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 3; - onChanged();; - return largeCustomDictionaryBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> dictionaryBuilder_; - /** - *
-     * Store dictionary-based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - * @return Whether the dictionary field is set. - */ - @java.lang.Override - public boolean hasDictionary() { - return typeCase_ == 4; - } - /** - *
-     * Store dictionary-based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - * @return The dictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { - if (dictionaryBuilder_ == null) { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } else { - if (typeCase_ == 4) { - return dictionaryBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - } - /** - *
-     * Store dictionary-based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - */ - public Builder setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { - if (dictionaryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - dictionaryBuilder_.setMessage(value); - } - typeCase_ = 4; - return this; - } - /** - *
-     * Store dictionary-based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - */ - public Builder setDictionary( - com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder builderForValue) { - if (dictionaryBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - dictionaryBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 4; - return this; - } - /** - *
-     * Store dictionary-based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - */ - public Builder mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary value) { - if (dictionaryBuilder_ == null) { - if (typeCase_ == 4 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 4) { - dictionaryBuilder_.mergeFrom(value); - } else { - dictionaryBuilder_.setMessage(value); - } - } - typeCase_ = 4; - return this; - } - /** - *
-     * Store dictionary-based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - */ - public Builder clearDictionary() { - if (dictionaryBuilder_ == null) { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - } - dictionaryBuilder_.clear(); - } - return this; - } - /** - *
-     * Store dictionary-based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder getDictionaryBuilder() { - return getDictionaryFieldBuilder().getBuilder(); - } - /** - *
-     * Store dictionary-based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder() { - if ((typeCase_ == 4) && (dictionaryBuilder_ != null)) { - return dictionaryBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 4) { - return (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - } - /** - *
-     * Store dictionary-based CustomInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> - getDictionaryFieldBuilder() { - if (dictionaryBuilder_ == null) { - if (!(typeCase_ == 4)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Dictionary.getDefaultInstance(); - } - dictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.Dictionary) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 4; - onChanged();; - return dictionaryBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> regexBuilder_; - /** - *
-     * Store regular expression-based StoredInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - * @return Whether the regex field is set. - */ - @java.lang.Override - public boolean hasRegex() { - return typeCase_ == 5; - } - /** - *
-     * Store regular expression-based StoredInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - * @return The regex. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { - if (regexBuilder_ == null) { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } else { - if (typeCase_ == 5) { - return regexBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - } - /** - *
-     * Store regular expression-based StoredInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - */ - public Builder setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { - if (regexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - regexBuilder_.setMessage(value); - } - typeCase_ = 5; - return this; - } - /** - *
-     * Store regular expression-based StoredInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - */ - public Builder setRegex( - com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder builderForValue) { - if (regexBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - regexBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 5; - return this; - } - /** - *
-     * Store regular expression-based StoredInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - */ - public Builder mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { - if (regexBuilder_ == null) { - if (typeCase_ == 5 && - type_ != com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.newBuilder((com.google.privacy.dlp.v2.CustomInfoType.Regex) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 5) { - regexBuilder_.mergeFrom(value); - } else { - regexBuilder_.setMessage(value); - } - } - typeCase_ = 5; - return this; - } - /** - *
-     * Store regular expression-based StoredInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - */ - public Builder clearRegex() { - if (regexBuilder_ == null) { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - } - regexBuilder_.clear(); - } - return this; - } - /** - *
-     * Store regular expression-based StoredInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - */ - public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getRegexBuilder() { - return getRegexFieldBuilder().getBuilder(); - } - /** - *
-     * Store regular expression-based StoredInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder() { - if ((typeCase_ == 5) && (regexBuilder_ != null)) { - return regexBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 5) { - return (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_; - } - return com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - } - /** - *
-     * Store regular expression-based StoredInfoType.
-     * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> - getRegexFieldBuilder() { - if (regexBuilder_ == null) { - if (!(typeCase_ == 5)) { - type_ = com.google.privacy.dlp.v2.CustomInfoType.Regex.getDefaultInstance(); - } - regexBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder>( - (com.google.privacy.dlp.v2.CustomInfoType.Regex) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 5; - onChanged();; - return regexBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredInfoTypeConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredInfoTypeConfig) - private static final com.google.privacy.dlp.v2.StoredInfoTypeConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredInfoTypeConfig(); - } - - public static com.google.privacy.dlp.v2.StoredInfoTypeConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StoredInfoTypeConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StoredInfoTypeConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfigOrBuilder.java deleted file mode 100644 index bd4966de7e44..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeConfigOrBuilder.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface StoredInfoTypeConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredInfoTypeConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Display name of the StoredInfoType (max 256 characters).
-   * 
- * - * string display_name = 1; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * Display name of the StoredInfoType (max 256 characters).
-   * 
- * - * string display_name = 1; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * Description of the StoredInfoType (max 256 characters).
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * Description of the StoredInfoType (max 256 characters).
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - * @return Whether the largeCustomDictionary field is set. - */ - boolean hasLargeCustomDictionary(); - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - * @return The largeCustomDictionary. - */ - com.google.privacy.dlp.v2.LargeCustomDictionaryConfig getLargeCustomDictionary(); - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryConfig large_custom_dictionary = 3; - */ - com.google.privacy.dlp.v2.LargeCustomDictionaryConfigOrBuilder getLargeCustomDictionaryOrBuilder(); - - /** - *
-   * Store dictionary-based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - * @return Whether the dictionary field is set. - */ - boolean hasDictionary(); - /** - *
-   * Store dictionary-based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - * @return The dictionary. - */ - com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary(); - /** - *
-   * Store dictionary-based CustomInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 4; - */ - com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionaryOrBuilder(); - - /** - *
-   * Store regular expression-based StoredInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - * @return Whether the regex field is set. - */ - boolean hasRegex(); - /** - *
-   * Store regular expression-based StoredInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - * @return The regex. - */ - com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex(); - /** - *
-   * Store regular expression-based StoredInfoType.
-   * 
- * - * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 5; - */ - com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder(); - - public com.google.privacy.dlp.v2.StoredInfoTypeConfig.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeName.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeName.java deleted file mode 100644 index 9f7ca00d1f64..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeName.java +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.privacy.dlp.v2; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class StoredInfoTypeName implements ResourceName { - private static final PathTemplate ORGANIZATION_STORED_INFO_TYPE = - PathTemplate.createWithoutUrlEncoding( - "organizations/{organization}/storedInfoTypes/{stored_info_type}"); - private static final PathTemplate PROJECT_STORED_INFO_TYPE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/storedInfoTypes/{stored_info_type}"); - private static final PathTemplate ORGANIZATION_LOCATION_STORED_INFO_TYPE = - PathTemplate.createWithoutUrlEncoding( - "organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}"); - private static final PathTemplate PROJECT_LOCATION_STORED_INFO_TYPE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String organization; - private final String storedInfoType; - private final String project; - private final String location; - - @Deprecated - protected StoredInfoTypeName() { - organization = null; - storedInfoType = null; - project = null; - location = null; - } - - private StoredInfoTypeName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - storedInfoType = Preconditions.checkNotNull(builder.getStoredInfoType()); - project = null; - location = null; - pathTemplate = ORGANIZATION_STORED_INFO_TYPE; - } - - private StoredInfoTypeName(ProjectStoredInfoTypeBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - storedInfoType = Preconditions.checkNotNull(builder.getStoredInfoType()); - organization = null; - location = null; - pathTemplate = PROJECT_STORED_INFO_TYPE; - } - - private StoredInfoTypeName(OrganizationLocationStoredInfoTypeBuilder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - location = Preconditions.checkNotNull(builder.getLocation()); - storedInfoType = Preconditions.checkNotNull(builder.getStoredInfoType()); - project = null; - pathTemplate = ORGANIZATION_LOCATION_STORED_INFO_TYPE; - } - - private StoredInfoTypeName(ProjectLocationStoredInfoTypeBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - storedInfoType = Preconditions.checkNotNull(builder.getStoredInfoType()); - organization = null; - pathTemplate = PROJECT_LOCATION_STORED_INFO_TYPE; - } - - public String getOrganization() { - return organization; - } - - public String getStoredInfoType() { - return storedInfoType; - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newOrganizationStoredInfoTypeBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectStoredInfoTypeBuilder newProjectStoredInfoTypeBuilder() { - return new ProjectStoredInfoTypeBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static OrganizationLocationStoredInfoTypeBuilder - newOrganizationLocationStoredInfoTypeBuilder() { - return new OrganizationLocationStoredInfoTypeBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static ProjectLocationStoredInfoTypeBuilder newProjectLocationStoredInfoTypeBuilder() { - return new ProjectLocationStoredInfoTypeBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static StoredInfoTypeName of(String organization, String storedInfoType) { - return newBuilder().setOrganization(organization).setStoredInfoType(storedInfoType).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static StoredInfoTypeName ofOrganizationStoredInfoTypeName( - String organization, String storedInfoType) { - return newBuilder().setOrganization(organization).setStoredInfoType(storedInfoType).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static StoredInfoTypeName ofProjectStoredInfoTypeName( - String project, String storedInfoType) { - return newProjectStoredInfoTypeBuilder() - .setProject(project) - .setStoredInfoType(storedInfoType) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static StoredInfoTypeName ofOrganizationLocationStoredInfoTypeName( - String organization, String location, String storedInfoType) { - return newOrganizationLocationStoredInfoTypeBuilder() - .setOrganization(organization) - .setLocation(location) - .setStoredInfoType(storedInfoType) - .build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static StoredInfoTypeName ofProjectLocationStoredInfoTypeName( - String project, String location, String storedInfoType) { - return newProjectLocationStoredInfoTypeBuilder() - .setProject(project) - .setLocation(location) - .setStoredInfoType(storedInfoType) - .build(); - } - - public static String format(String organization, String storedInfoType) { - return newBuilder() - .setOrganization(organization) - .setStoredInfoType(storedInfoType) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationStoredInfoTypeName( - String organization, String storedInfoType) { - return newBuilder() - .setOrganization(organization) - .setStoredInfoType(storedInfoType) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectStoredInfoTypeName(String project, String storedInfoType) { - return newProjectStoredInfoTypeBuilder() - .setProject(project) - .setStoredInfoType(storedInfoType) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationLocationStoredInfoTypeName( - String organization, String location, String storedInfoType) { - return newOrganizationLocationStoredInfoTypeBuilder() - .setOrganization(organization) - .setLocation(location) - .setStoredInfoType(storedInfoType) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectLocationStoredInfoTypeName( - String project, String location, String storedInfoType) { - return newProjectLocationStoredInfoTypeBuilder() - .setProject(project) - .setLocation(location) - .setStoredInfoType(storedInfoType) - .build() - .toString(); - } - - public static StoredInfoTypeName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (ORGANIZATION_STORED_INFO_TYPE.matches(formattedString)) { - Map matchMap = ORGANIZATION_STORED_INFO_TYPE.match(formattedString); - return ofOrganizationStoredInfoTypeName( - matchMap.get("organization"), matchMap.get("stored_info_type")); - } else if (PROJECT_STORED_INFO_TYPE.matches(formattedString)) { - Map matchMap = PROJECT_STORED_INFO_TYPE.match(formattedString); - return ofProjectStoredInfoTypeName(matchMap.get("project"), matchMap.get("stored_info_type")); - } else if (ORGANIZATION_LOCATION_STORED_INFO_TYPE.matches(formattedString)) { - Map matchMap = ORGANIZATION_LOCATION_STORED_INFO_TYPE.match(formattedString); - return ofOrganizationLocationStoredInfoTypeName( - matchMap.get("organization"), matchMap.get("location"), matchMap.get("stored_info_type")); - } else if (PROJECT_LOCATION_STORED_INFO_TYPE.matches(formattedString)) { - Map matchMap = PROJECT_LOCATION_STORED_INFO_TYPE.match(formattedString); - return ofProjectLocationStoredInfoTypeName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("stored_info_type")); - } - throw new ValidationException("StoredInfoTypeName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (StoredInfoTypeName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION_STORED_INFO_TYPE.matches(formattedString) - || PROJECT_STORED_INFO_TYPE.matches(formattedString) - || ORGANIZATION_LOCATION_STORED_INFO_TYPE.matches(formattedString) - || PROJECT_LOCATION_STORED_INFO_TYPE.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (organization != null) { - fieldMapBuilder.put("organization", organization); - } - if (storedInfoType != null) { - fieldMapBuilder.put("stored_info_type", storedInfoType); - } - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - StoredInfoTypeName that = ((StoredInfoTypeName) o); - return Objects.equals(this.organization, that.organization) - && Objects.equals(this.storedInfoType, that.storedInfoType) - && Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(organization); - h *= 1000003; - h ^= Objects.hashCode(storedInfoType); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for organizations/{organization}/storedInfoTypes/{stored_info_type}. */ - public static class Builder { - private String organization; - private String storedInfoType; - - protected Builder() {} - - public String getOrganization() { - return organization; - } - - public String getStoredInfoType() { - return storedInfoType; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public Builder setStoredInfoType(String storedInfoType) { - this.storedInfoType = storedInfoType; - return this; - } - - private Builder(StoredInfoTypeName storedInfoTypeName) { - Preconditions.checkArgument( - Objects.equals(storedInfoTypeName.pathTemplate, ORGANIZATION_STORED_INFO_TYPE), - "toBuilder is only supported when StoredInfoTypeName has the pattern of organizations/{organization}/storedInfoTypes/{stored_info_type}"); - this.organization = storedInfoTypeName.organization; - this.storedInfoType = storedInfoTypeName.storedInfoType; - } - - public StoredInfoTypeName build() { - return new StoredInfoTypeName(this); - } - } - - /** Builder for projects/{project}/storedInfoTypes/{stored_info_type}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectStoredInfoTypeBuilder { - private String project; - private String storedInfoType; - - protected ProjectStoredInfoTypeBuilder() {} - - public String getProject() { - return project; - } - - public String getStoredInfoType() { - return storedInfoType; - } - - public ProjectStoredInfoTypeBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectStoredInfoTypeBuilder setStoredInfoType(String storedInfoType) { - this.storedInfoType = storedInfoType; - return this; - } - - public StoredInfoTypeName build() { - return new StoredInfoTypeName(this); - } - } - - /** - * Builder for - * organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}. - */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class OrganizationLocationStoredInfoTypeBuilder { - private String organization; - private String location; - private String storedInfoType; - - protected OrganizationLocationStoredInfoTypeBuilder() {} - - public String getOrganization() { - return organization; - } - - public String getLocation() { - return location; - } - - public String getStoredInfoType() { - return storedInfoType; - } - - public OrganizationLocationStoredInfoTypeBuilder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public OrganizationLocationStoredInfoTypeBuilder setLocation(String location) { - this.location = location; - return this; - } - - public OrganizationLocationStoredInfoTypeBuilder setStoredInfoType(String storedInfoType) { - this.storedInfoType = storedInfoType; - return this; - } - - public StoredInfoTypeName build() { - return new StoredInfoTypeName(this); - } - } - - /** Builder for projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class ProjectLocationStoredInfoTypeBuilder { - private String project; - private String location; - private String storedInfoType; - - protected ProjectLocationStoredInfoTypeBuilder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getStoredInfoType() { - return storedInfoType; - } - - public ProjectLocationStoredInfoTypeBuilder setProject(String project) { - this.project = project; - return this; - } - - public ProjectLocationStoredInfoTypeBuilder setLocation(String location) { - this.location = location; - return this; - } - - public ProjectLocationStoredInfoTypeBuilder setStoredInfoType(String storedInfoType) { - this.storedInfoType = storedInfoType; - return this; - } - - public StoredInfoTypeName build() { - return new StoredInfoTypeName(this); - } - } -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeOrBuilder.java deleted file mode 100644 index 96b13d2f9a55..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface StoredInfoTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredInfoType) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Resource name.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Current version of the stored info type.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - * @return Whether the currentVersion field is set. - */ - boolean hasCurrentVersion(); - /** - *
-   * Current version of the stored info type.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - * @return The currentVersion. - */ - com.google.privacy.dlp.v2.StoredInfoTypeVersion getCurrentVersion(); - /** - *
-   * Current version of the stored info type.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeVersion current_version = 2; - */ - com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getCurrentVersionOrBuilder(); - - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - java.util.List - getPendingVersionsList(); - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - com.google.privacy.dlp.v2.StoredInfoTypeVersion getPendingVersions(int index); - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - int getPendingVersionsCount(); - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - java.util.List - getPendingVersionsOrBuilderList(); - /** - *
-   * Pending versions of the stored info type. Empty if no versions are
-   * pending.
-   * 
- * - * repeated .google.privacy.dlp.v2.StoredInfoTypeVersion pending_versions = 3; - */ - com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder getPendingVersionsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java deleted file mode 100644 index 3a4b156740a1..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeState.java +++ /dev/null @@ -1,190 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * State of a StoredInfoType version.
- * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.StoredInfoTypeState} - */ -public enum StoredInfoTypeState - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unused
-   * 
- * - * STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; - */ - STORED_INFO_TYPE_STATE_UNSPECIFIED(0), - /** - *
-   * StoredInfoType version is being created.
-   * 
- * - * PENDING = 1; - */ - PENDING(1), - /** - *
-   * StoredInfoType version is ready for use.
-   * 
- * - * READY = 2; - */ - READY(2), - /** - *
-   * StoredInfoType creation failed. All relevant error messages are returned in
-   * the `StoredInfoTypeVersion` message.
-   * 
- * - * FAILED = 3; - */ - FAILED(3), - /** - *
-   * StoredInfoType is no longer valid because artifacts stored in
-   * user-controlled storage were modified. To fix an invalid StoredInfoType,
-   * use the `UpdateStoredInfoType` method to create a new version.
-   * 
- * - * INVALID = 4; - */ - INVALID(4), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unused
-   * 
- * - * STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; - */ - public static final int STORED_INFO_TYPE_STATE_UNSPECIFIED_VALUE = 0; - /** - *
-   * StoredInfoType version is being created.
-   * 
- * - * PENDING = 1; - */ - public static final int PENDING_VALUE = 1; - /** - *
-   * StoredInfoType version is ready for use.
-   * 
- * - * READY = 2; - */ - public static final int READY_VALUE = 2; - /** - *
-   * StoredInfoType creation failed. All relevant error messages are returned in
-   * the `StoredInfoTypeVersion` message.
-   * 
- * - * FAILED = 3; - */ - public static final int FAILED_VALUE = 3; - /** - *
-   * StoredInfoType is no longer valid because artifacts stored in
-   * user-controlled storage were modified. To fix an invalid StoredInfoType,
-   * use the `UpdateStoredInfoType` method to create a new version.
-   * 
- * - * INVALID = 4; - */ - public static final int INVALID_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static StoredInfoTypeState valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static StoredInfoTypeState forNumber(int value) { - switch (value) { - case 0: return STORED_INFO_TYPE_STATE_UNSPECIFIED; - case 1: return PENDING; - case 2: return READY; - case 3: return FAILED; - case 4: return INVALID; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - StoredInfoTypeState> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public StoredInfoTypeState findValueByNumber(int number) { - return StoredInfoTypeState.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.getDescriptor().getEnumTypes().get(9); - } - - private static final StoredInfoTypeState[] VALUES = values(); - - public static StoredInfoTypeState valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private StoredInfoTypeState(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.StoredInfoTypeState) -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStats.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStats.java deleted file mode 100644 index 19e3e85d76f2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStats.java +++ /dev/null @@ -1,761 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Statistics for a StoredInfoType.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeStats} - */ -public final class StoredInfoTypeStats extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredInfoTypeStats) - StoredInfoTypeStatsOrBuilder { -private static final long serialVersionUID = 0L; - // Use StoredInfoTypeStats.newBuilder() to construct. - private StoredInfoTypeStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StoredInfoTypeStats() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StoredInfoTypeStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StoredInfoTypeStats( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder subBuilder = null; - if (typeCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.privacy.dlp.v2.LargeCustomDictionaryStats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredInfoTypeStats.class, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder.class); - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LARGE_CUSTOM_DICTIONARY(1), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return LARGE_CUSTOM_DICTIONARY; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int LARGE_CUSTOM_DICTIONARY_FIELD_NUMBER = 1; - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - * @return Whether the largeCustomDictionary field is set. - */ - @java.lang.Override - public boolean hasLargeCustomDictionary() { - return typeCase_ == 1; - } - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - * @return The largeCustomDictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryStats getLargeCustomDictionary() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_; - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); - } - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder getLargeCustomDictionaryOrBuilder() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_; - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StoredInfoTypeStats)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StoredInfoTypeStats other = (com.google.privacy.dlp.v2.StoredInfoTypeStats) obj; - - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 1: - if (!getLargeCustomDictionary() - .equals(other.getLargeCustomDictionary())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (typeCase_) { - case 1: - hash = (37 * hash) + LARGE_CUSTOM_DICTIONARY_FIELD_NUMBER; - hash = (53 * hash) + getLargeCustomDictionary().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StoredInfoTypeStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Statistics for a StoredInfoType.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeStats} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredInfoTypeStats) - com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredInfoTypeStats.class, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StoredInfoTypeStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeStats_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeStats getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeStats build() { - com.google.privacy.dlp.v2.StoredInfoTypeStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeStats buildPartial() { - com.google.privacy.dlp.v2.StoredInfoTypeStats result = new com.google.privacy.dlp.v2.StoredInfoTypeStats(this); - if (typeCase_ == 1) { - if (largeCustomDictionaryBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = largeCustomDictionaryBuilder_.build(); - } - } - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StoredInfoTypeStats) { - return mergeFrom((com.google.privacy.dlp.v2.StoredInfoTypeStats)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StoredInfoTypeStats other) { - if (other == com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance()) return this; - switch (other.getTypeCase()) { - case LARGE_CUSTOM_DICTIONARY: { - mergeLargeCustomDictionary(other.getLargeCustomDictionary()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StoredInfoTypeStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StoredInfoTypeStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.LargeCustomDictionaryStats, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder> largeCustomDictionaryBuilder_; - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - * @return Whether the largeCustomDictionary field is set. - */ - @java.lang.Override - public boolean hasLargeCustomDictionary() { - return typeCase_ == 1; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - * @return The largeCustomDictionary. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryStats getLargeCustomDictionary() { - if (largeCustomDictionaryBuilder_ == null) { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_; - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); - } else { - if (typeCase_ == 1) { - return largeCustomDictionaryBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); - } - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - */ - public Builder setLargeCustomDictionary(com.google.privacy.dlp.v2.LargeCustomDictionaryStats value) { - if (largeCustomDictionaryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - largeCustomDictionaryBuilder_.setMessage(value); - } - typeCase_ = 1; - return this; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - */ - public Builder setLargeCustomDictionary( - com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder builderForValue) { - if (largeCustomDictionaryBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - largeCustomDictionaryBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 1; - return this; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - */ - public Builder mergeLargeCustomDictionary(com.google.privacy.dlp.v2.LargeCustomDictionaryStats value) { - if (largeCustomDictionaryBuilder_ == null) { - if (typeCase_ == 1 && - type_ != com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance()) { - type_ = com.google.privacy.dlp.v2.LargeCustomDictionaryStats.newBuilder((com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 1) { - largeCustomDictionaryBuilder_.mergeFrom(value); - } else { - largeCustomDictionaryBuilder_.setMessage(value); - } - } - typeCase_ = 1; - return this; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - */ - public Builder clearLargeCustomDictionary() { - if (largeCustomDictionaryBuilder_ == null) { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - } - largeCustomDictionaryBuilder_.clear(); - } - return this; - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - */ - public com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder getLargeCustomDictionaryBuilder() { - return getLargeCustomDictionaryFieldBuilder().getBuilder(); - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder getLargeCustomDictionaryOrBuilder() { - if ((typeCase_ == 1) && (largeCustomDictionaryBuilder_ != null)) { - return largeCustomDictionaryBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_; - } - return com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); - } - } - /** - *
-     * StoredInfoType where findings are defined by a dictionary of phrases.
-     * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.LargeCustomDictionaryStats, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder> - getLargeCustomDictionaryFieldBuilder() { - if (largeCustomDictionaryBuilder_ == null) { - if (!(typeCase_ == 1)) { - type_ = com.google.privacy.dlp.v2.LargeCustomDictionaryStats.getDefaultInstance(); - } - largeCustomDictionaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.LargeCustomDictionaryStats, com.google.privacy.dlp.v2.LargeCustomDictionaryStats.Builder, com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder>( - (com.google.privacy.dlp.v2.LargeCustomDictionaryStats) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 1; - onChanged();; - return largeCustomDictionaryBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredInfoTypeStats) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredInfoTypeStats) - private static final com.google.privacy.dlp.v2.StoredInfoTypeStats DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredInfoTypeStats(); - } - - public static com.google.privacy.dlp.v2.StoredInfoTypeStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StoredInfoTypeStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StoredInfoTypeStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStatsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStatsOrBuilder.java deleted file mode 100644 index 667339e898bd..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeStatsOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface StoredInfoTypeStatsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredInfoTypeStats) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - * @return Whether the largeCustomDictionary field is set. - */ - boolean hasLargeCustomDictionary(); - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - * @return The largeCustomDictionary. - */ - com.google.privacy.dlp.v2.LargeCustomDictionaryStats getLargeCustomDictionary(); - /** - *
-   * StoredInfoType where findings are defined by a dictionary of phrases.
-   * 
- * - * .google.privacy.dlp.v2.LargeCustomDictionaryStats large_custom_dictionary = 1; - */ - com.google.privacy.dlp.v2.LargeCustomDictionaryStatsOrBuilder getLargeCustomDictionaryOrBuilder(); - - public com.google.privacy.dlp.v2.StoredInfoTypeStats.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java deleted file mode 100644 index 6a6c3e4a2cc6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersion.java +++ /dev/null @@ -1,1955 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Version of a StoredInfoType, including the configuration used to build it,
- * create timestamp, and current state.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeVersion} - */ -public final class StoredInfoTypeVersion extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredInfoTypeVersion) - StoredInfoTypeVersionOrBuilder { -private static final long serialVersionUID = 0L; - // Use StoredInfoTypeVersion.newBuilder() to construct. - private StoredInfoTypeVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StoredInfoTypeVersion() { - state_ = 0; - errors_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StoredInfoTypeVersion(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StoredInfoTypeVersion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errors_.add( - input.readMessage(com.google.privacy.dlp.v2.Error.parser(), extensionRegistry)); - break; - } - case 42: { - com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder subBuilder = null; - if (stats_ != null) { - subBuilder = stats_.toBuilder(); - } - stats_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeStats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stats_); - stats_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errors_ = java.util.Collections.unmodifiableList(errors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredInfoTypeVersion.class, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder.class); - } - - public static final int CONFIG_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; - /** - *
-   * StoredInfoType configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - * @return Whether the config field is set. - */ - @java.lang.Override - public boolean hasConfig() { - return config_ != null; - } - /** - *
-   * StoredInfoType configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - * @return The config. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { - return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; - } - /** - *
-   * StoredInfoType configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Create timestamp of the version. Read-only, determined by the system
-   * when the version is created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Create timestamp of the version. Read-only, determined by the system
-   * when the version is created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Create timestamp of the version. Read-only, determined by the system
-   * when the version is created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_; - /** - *
-   * Stored info type version state. Read-only, updated by the system
-   * during dictionary creation.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * Stored info type version state. Read-only, updated by the system
-   * during dictionary creation.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; - * @return The state. - */ - @java.lang.Override public com.google.privacy.dlp.v2.StoredInfoTypeState getState() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.StoredInfoTypeState result = com.google.privacy.dlp.v2.StoredInfoTypeState.valueOf(state_); - return result == null ? com.google.privacy.dlp.v2.StoredInfoTypeState.UNRECOGNIZED : result; - } - - public static final int ERRORS_FIELD_NUMBER = 4; - private java.util.List errors_; - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - @java.lang.Override - public java.util.List getErrorsList() { - return errors_; - } - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - @java.lang.Override - public java.util.List - getErrorsOrBuilderList() { - return errors_; - } - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - @java.lang.Override - public int getErrorsCount() { - return errors_.size(); - } - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Error getErrors(int index) { - return errors_.get(index); - } - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( - int index) { - return errors_.get(index); - } - - public static final int STATS_FIELD_NUMBER = 5; - private com.google.privacy.dlp.v2.StoredInfoTypeStats stats_; - /** - *
-   * Statistics about this storedInfoType version.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - * @return Whether the stats field is set. - */ - @java.lang.Override - public boolean hasStats() { - return stats_ != null; - } - /** - *
-   * Statistics about this storedInfoType version.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - * @return The stats. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeStats getStats() { - return stats_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance() : stats_; - } - /** - *
-   * Statistics about this storedInfoType version.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder getStatsOrBuilder() { - return getStats(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (config_ != null) { - output.writeMessage(1, getConfig()); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - if (state_ != com.google.privacy.dlp.v2.StoredInfoTypeState.STORED_INFO_TYPE_STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - for (int i = 0; i < errors_.size(); i++) { - output.writeMessage(4, errors_.get(i)); - } - if (stats_ != null) { - output.writeMessage(5, getStats()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getConfig()); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getCreateTime()); - } - if (state_ != com.google.privacy.dlp.v2.StoredInfoTypeState.STORED_INFO_TYPE_STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, state_); - } - for (int i = 0; i < errors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, errors_.get(i)); - } - if (stats_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getStats()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StoredInfoTypeVersion)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StoredInfoTypeVersion other = (com.google.privacy.dlp.v2.StoredInfoTypeVersion) obj; - - if (hasConfig() != other.hasConfig()) return false; - if (hasConfig()) { - if (!getConfig() - .equals(other.getConfig())) return false; - } - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (state_ != other.state_) return false; - if (!getErrorsList() - .equals(other.getErrorsList())) return false; - if (hasStats() != other.hasStats()) return false; - if (hasStats()) { - if (!getStats() - .equals(other.getStats())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (getErrorsCount() > 0) { - hash = (37 * hash) + ERRORS_FIELD_NUMBER; - hash = (53 * hash) + getErrorsList().hashCode(); - } - if (hasStats()) { - hash = (37 * hash) + STATS_FIELD_NUMBER; - hash = (53 * hash) + getStats().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StoredInfoTypeVersion prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Version of a StoredInfoType, including the configuration used to build it,
-   * create timestamp, and current state.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredInfoTypeVersion} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredInfoTypeVersion) - com.google.privacy.dlp.v2.StoredInfoTypeVersionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredInfoTypeVersion.class, com.google.privacy.dlp.v2.StoredInfoTypeVersion.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StoredInfoTypeVersion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getErrorsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - state_ = 0; - - if (errorsBuilder_ == null) { - errors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - errorsBuilder_.clear(); - } - if (statsBuilder_ == null) { - stats_ = null; - } else { - stats_ = null; - statsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StoredInfoTypeVersion_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeVersion getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeVersion build() { - com.google.privacy.dlp.v2.StoredInfoTypeVersion result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeVersion buildPartial() { - com.google.privacy.dlp.v2.StoredInfoTypeVersion result = new com.google.privacy.dlp.v2.StoredInfoTypeVersion(this); - int from_bitField0_ = bitField0_; - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.state_ = state_; - if (errorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - errors_ = java.util.Collections.unmodifiableList(errors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.errors_ = errors_; - } else { - result.errors_ = errorsBuilder_.build(); - } - if (statsBuilder_ == null) { - result.stats_ = stats_; - } else { - result.stats_ = statsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StoredInfoTypeVersion) { - return mergeFrom((com.google.privacy.dlp.v2.StoredInfoTypeVersion)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StoredInfoTypeVersion other) { - if (other == com.google.privacy.dlp.v2.StoredInfoTypeVersion.getDefaultInstance()) return this; - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (errorsBuilder_ == null) { - if (!other.errors_.isEmpty()) { - if (errors_.isEmpty()) { - errors_ = other.errors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureErrorsIsMutable(); - errors_.addAll(other.errors_); - } - onChanged(); - } - } else { - if (!other.errors_.isEmpty()) { - if (errorsBuilder_.isEmpty()) { - errorsBuilder_.dispose(); - errorsBuilder_ = null; - errors_ = other.errors_; - bitField0_ = (bitField0_ & ~0x00000001); - errorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getErrorsFieldBuilder() : null; - } else { - errorsBuilder_.addAllMessages(other.errors_); - } - } - } - if (other.hasStats()) { - mergeStats(other.getStats()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StoredInfoTypeVersion parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StoredInfoTypeVersion) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> configBuilder_; - /** - *
-     * StoredInfoType configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - * @return Whether the config field is set. - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - *
-     * StoredInfoType configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - * @return The config. - */ - public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - *
-     * StoredInfoType configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - */ - public Builder setConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * StoredInfoType configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - */ - public Builder setConfig( - com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * StoredInfoType configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - */ - public Builder mergeConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.privacy.dlp.v2.StoredInfoTypeConfig.newBuilder(config_).mergeFrom(value).buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * StoredInfoType configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - *
-     * StoredInfoType configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - *
-     * StoredInfoType configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null ? - com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; - } - } - /** - *
-     * StoredInfoType configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder>( - getConfig(), - getParentForChildren(), - isClean()); - config_ = null; - } - return configBuilder_; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Create timestamp of the version. Read-only, determined by the system
-     * when the version is created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Create timestamp of the version. Read-only, determined by the system
-     * when the version is created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Create timestamp of the version. Read-only, determined by the system
-     * when the version is created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Create timestamp of the version. Read-only, determined by the system
-     * when the version is created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Create timestamp of the version. Read-only, determined by the system
-     * when the version is created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Create timestamp of the version. Read-only, determined by the system
-     * when the version is created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Create timestamp of the version. Read-only, determined by the system
-     * when the version is created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Create timestamp of the version. Read-only, determined by the system
-     * when the version is created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Create timestamp of the version. Read-only, determined by the system
-     * when the version is created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private int state_ = 0; - /** - *
-     * Stored info type version state. Read-only, updated by the system
-     * during dictionary creation.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * Stored info type version state. Read-only, updated by the system
-     * during dictionary creation.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * Stored info type version state. Read-only, updated by the system
-     * during dictionary creation.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; - * @return The state. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeState getState() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.StoredInfoTypeState result = com.google.privacy.dlp.v2.StoredInfoTypeState.valueOf(state_); - return result == null ? com.google.privacy.dlp.v2.StoredInfoTypeState.UNRECOGNIZED : result; - } - /** - *
-     * Stored info type version state. Read-only, updated by the system
-     * during dictionary creation.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.privacy.dlp.v2.StoredInfoTypeState value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Stored info type version state. Read-only, updated by the system
-     * during dictionary creation.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.util.List errors_ = - java.util.Collections.emptyList(); - private void ensureErrorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - errors_ = new java.util.ArrayList(errors_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> errorsBuilder_; - - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public java.util.List getErrorsList() { - if (errorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(errors_); - } else { - return errorsBuilder_.getMessageList(); - } - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public int getErrorsCount() { - if (errorsBuilder_ == null) { - return errors_.size(); - } else { - return errorsBuilder_.getCount(); - } - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public com.google.privacy.dlp.v2.Error getErrors(int index) { - if (errorsBuilder_ == null) { - return errors_.get(index); - } else { - return errorsBuilder_.getMessage(index); - } - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public Builder setErrors( - int index, com.google.privacy.dlp.v2.Error value) { - if (errorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureErrorsIsMutable(); - errors_.set(index, value); - onChanged(); - } else { - errorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public Builder setErrors( - int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.set(index, builderForValue.build()); - onChanged(); - } else { - errorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public Builder addErrors(com.google.privacy.dlp.v2.Error value) { - if (errorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureErrorsIsMutable(); - errors_.add(value); - onChanged(); - } else { - errorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public Builder addErrors( - int index, com.google.privacy.dlp.v2.Error value) { - if (errorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureErrorsIsMutable(); - errors_.add(index, value); - onChanged(); - } else { - errorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public Builder addErrors( - com.google.privacy.dlp.v2.Error.Builder builderForValue) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.add(builderForValue.build()); - onChanged(); - } else { - errorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public Builder addErrors( - int index, com.google.privacy.dlp.v2.Error.Builder builderForValue) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.add(index, builderForValue.build()); - onChanged(); - } else { - errorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public Builder addAllErrors( - java.lang.Iterable values) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, errors_); - onChanged(); - } else { - errorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public Builder clearErrors() { - if (errorsBuilder_ == null) { - errors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - errorsBuilder_.clear(); - } - return this; - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public Builder removeErrors(int index) { - if (errorsBuilder_ == null) { - ensureErrorsIsMutable(); - errors_.remove(index); - onChanged(); - } else { - errorsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public com.google.privacy.dlp.v2.Error.Builder getErrorsBuilder( - int index) { - return getErrorsFieldBuilder().getBuilder(index); - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( - int index) { - if (errorsBuilder_ == null) { - return errors_.get(index); } else { - return errorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public java.util.List - getErrorsOrBuilderList() { - if (errorsBuilder_ != null) { - return errorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(errors_); - } - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder() { - return getErrorsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Error.getDefaultInstance()); - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public com.google.privacy.dlp.v2.Error.Builder addErrorsBuilder( - int index) { - return getErrorsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Error.getDefaultInstance()); - } - /** - *
-     * Errors that occurred when creating this storedInfoType version, or
-     * anomalies detected in the storedInfoType data that render it unusable. Only
-     * the five most recent errors will be displayed, with the most recent error
-     * appearing first.
-     * For example, some of the data for stored custom dictionaries is put in
-     * the user's Cloud Storage bucket, and if this data is modified or
-     * deleted by the user or another system, the dictionary becomes invalid.
-     * If any errors occur, fix the problem indicated by the error message and
-     * use the UpdateStoredInfoType API method to create another version of the
-     * storedInfoType to continue using it, reusing the same `config` if it was
-     * not the source of the error.
-     * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - public java.util.List - getErrorsBuilderList() { - return getErrorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder> - getErrorsFieldBuilder() { - if (errorsBuilder_ == null) { - errorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Error, com.google.privacy.dlp.v2.Error.Builder, com.google.privacy.dlp.v2.ErrorOrBuilder>( - errors_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - errors_ = null; - } - return errorsBuilder_; - } - - private com.google.privacy.dlp.v2.StoredInfoTypeStats stats_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeStats, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder, com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder> statsBuilder_; - /** - *
-     * Statistics about this storedInfoType version.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - * @return Whether the stats field is set. - */ - public boolean hasStats() { - return statsBuilder_ != null || stats_ != null; - } - /** - *
-     * Statistics about this storedInfoType version.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - * @return The stats. - */ - public com.google.privacy.dlp.v2.StoredInfoTypeStats getStats() { - if (statsBuilder_ == null) { - return stats_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance() : stats_; - } else { - return statsBuilder_.getMessage(); - } - } - /** - *
-     * Statistics about this storedInfoType version.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - */ - public Builder setStats(com.google.privacy.dlp.v2.StoredInfoTypeStats value) { - if (statsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stats_ = value; - onChanged(); - } else { - statsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Statistics about this storedInfoType version.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - */ - public Builder setStats( - com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder builderForValue) { - if (statsBuilder_ == null) { - stats_ = builderForValue.build(); - onChanged(); - } else { - statsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Statistics about this storedInfoType version.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - */ - public Builder mergeStats(com.google.privacy.dlp.v2.StoredInfoTypeStats value) { - if (statsBuilder_ == null) { - if (stats_ != null) { - stats_ = - com.google.privacy.dlp.v2.StoredInfoTypeStats.newBuilder(stats_).mergeFrom(value).buildPartial(); - } else { - stats_ = value; - } - onChanged(); - } else { - statsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Statistics about this storedInfoType version.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - */ - public Builder clearStats() { - if (statsBuilder_ == null) { - stats_ = null; - onChanged(); - } else { - stats_ = null; - statsBuilder_ = null; - } - - return this; - } - /** - *
-     * Statistics about this storedInfoType version.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder getStatsBuilder() { - - onChanged(); - return getStatsFieldBuilder().getBuilder(); - } - /** - *
-     * Statistics about this storedInfoType version.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder getStatsOrBuilder() { - if (statsBuilder_ != null) { - return statsBuilder_.getMessageOrBuilder(); - } else { - return stats_ == null ? - com.google.privacy.dlp.v2.StoredInfoTypeStats.getDefaultInstance() : stats_; - } - } - /** - *
-     * Statistics about this storedInfoType version.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeStats, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder, com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder> - getStatsFieldBuilder() { - if (statsBuilder_ == null) { - statsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeStats, com.google.privacy.dlp.v2.StoredInfoTypeStats.Builder, com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder>( - getStats(), - getParentForChildren(), - isClean()); - stats_ = null; - } - return statsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredInfoTypeVersion) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredInfoTypeVersion) - private static final com.google.privacy.dlp.v2.StoredInfoTypeVersion DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredInfoTypeVersion(); - } - - public static com.google.privacy.dlp.v2.StoredInfoTypeVersion getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StoredInfoTypeVersion parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StoredInfoTypeVersion(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeVersion getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java deleted file mode 100644 index adfc4e48c357..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredInfoTypeVersionOrBuilder.java +++ /dev/null @@ -1,208 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface StoredInfoTypeVersionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredInfoTypeVersion) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * StoredInfoType configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - *
-   * StoredInfoType configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - * @return The config. - */ - com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig(); - /** - *
-   * StoredInfoType configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 1; - */ - com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder(); - - /** - *
-   * Create timestamp of the version. Read-only, determined by the system
-   * when the version is created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Create timestamp of the version. Read-only, determined by the system
-   * when the version is created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Create timestamp of the version. Read-only, determined by the system
-   * when the version is created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Stored info type version state. Read-only, updated by the system
-   * during dictionary creation.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * Stored info type version state. Read-only, updated by the system
-   * during dictionary creation.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeState state = 3; - * @return The state. - */ - com.google.privacy.dlp.v2.StoredInfoTypeState getState(); - - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - java.util.List - getErrorsList(); - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - com.google.privacy.dlp.v2.Error getErrors(int index); - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - int getErrorsCount(); - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - java.util.List - getErrorsOrBuilderList(); - /** - *
-   * Errors that occurred when creating this storedInfoType version, or
-   * anomalies detected in the storedInfoType data that render it unusable. Only
-   * the five most recent errors will be displayed, with the most recent error
-   * appearing first.
-   * For example, some of the data for stored custom dictionaries is put in
-   * the user's Cloud Storage bucket, and if this data is modified or
-   * deleted by the user or another system, the dictionary becomes invalid.
-   * If any errors occur, fix the problem indicated by the error message and
-   * use the UpdateStoredInfoType API method to create another version of the
-   * storedInfoType to continue using it, reusing the same `config` if it was
-   * not the source of the error.
-   * 
- * - * repeated .google.privacy.dlp.v2.Error errors = 4; - */ - com.google.privacy.dlp.v2.ErrorOrBuilder getErrorsOrBuilder( - int index); - - /** - *
-   * Statistics about this storedInfoType version.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - * @return Whether the stats field is set. - */ - boolean hasStats(); - /** - *
-   * Statistics about this storedInfoType version.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - * @return The stats. - */ - com.google.privacy.dlp.v2.StoredInfoTypeStats getStats(); - /** - *
-   * Statistics about this storedInfoType version.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeStats stats = 5; - */ - com.google.privacy.dlp.v2.StoredInfoTypeStatsOrBuilder getStatsOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredType.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredType.java deleted file mode 100644 index 53b531e6352f..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredType.java +++ /dev/null @@ -1,857 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A reference to a StoredInfoType to use with scanning.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredType} - */ -public final class StoredType extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StoredType) - StoredTypeOrBuilder { -private static final long serialVersionUID = 0L; - // Use StoredType.newBuilder() to construct. - private StoredType(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StoredType() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StoredType(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StoredType( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredType.class, com.google.privacy.dlp.v2.StoredType.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Resource name of the requested `StoredInfoType`, for example
-   * `organizations/433245324/storedInfoTypes/432452342` or
-   * `projects/project-id/storedInfoTypes/432452342`.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Resource name of the requested `StoredInfoType`, for example
-   * `organizations/433245324/storedInfoTypes/432452342` or
-   * `projects/project-id/storedInfoTypes/432452342`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Timestamp indicating when the version of the `StoredInfoType` used for
-   * inspection was created. Output-only field, populated by the system.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Timestamp indicating when the version of the `StoredInfoType` used for
-   * inspection was created. Output-only field, populated by the system.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Timestamp indicating when the version of the `StoredInfoType` used for
-   * inspection was created. Output-only field, populated by the system.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (createTime_ != null) { - output.writeMessage(2, getCreateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getCreateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.StoredType)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.StoredType other = (com.google.privacy.dlp.v2.StoredType) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.StoredType parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredType parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredType parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.StoredType parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredType parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredType parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.StoredType parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.StoredType parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.StoredType prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A reference to a StoredInfoType to use with scanning.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.StoredType} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StoredType) - com.google.privacy.dlp.v2.StoredTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.StoredType.class, com.google.privacy.dlp.v2.StoredType.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.StoredType.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_StoredType_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredType getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.StoredType.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredType build() { - com.google.privacy.dlp.v2.StoredType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredType buildPartial() { - com.google.privacy.dlp.v2.StoredType result = new com.google.privacy.dlp.v2.StoredType(this); - result.name_ = name_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.StoredType) { - return mergeFrom((com.google.privacy.dlp.v2.StoredType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.StoredType other) { - if (other == com.google.privacy.dlp.v2.StoredType.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.StoredType parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.StoredType) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Resource name of the requested `StoredInfoType`, for example
-     * `organizations/433245324/storedInfoTypes/432452342` or
-     * `projects/project-id/storedInfoTypes/432452342`.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Resource name of the requested `StoredInfoType`, for example
-     * `organizations/433245324/storedInfoTypes/432452342` or
-     * `projects/project-id/storedInfoTypes/432452342`.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Resource name of the requested `StoredInfoType`, for example
-     * `organizations/433245324/storedInfoTypes/432452342` or
-     * `projects/project-id/storedInfoTypes/432452342`.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Resource name of the requested `StoredInfoType`, for example
-     * `organizations/433245324/storedInfoTypes/432452342` or
-     * `projects/project-id/storedInfoTypes/432452342`.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Resource name of the requested `StoredInfoType`, for example
-     * `organizations/433245324/storedInfoTypes/432452342` or
-     * `projects/project-id/storedInfoTypes/432452342`.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Timestamp indicating when the version of the `StoredInfoType` used for
-     * inspection was created. Output-only field, populated by the system.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Timestamp indicating when the version of the `StoredInfoType` used for
-     * inspection was created. Output-only field, populated by the system.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Timestamp indicating when the version of the `StoredInfoType` used for
-     * inspection was created. Output-only field, populated by the system.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Timestamp indicating when the version of the `StoredInfoType` used for
-     * inspection was created. Output-only field, populated by the system.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Timestamp indicating when the version of the `StoredInfoType` used for
-     * inspection was created. Output-only field, populated by the system.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Timestamp indicating when the version of the `StoredInfoType` used for
-     * inspection was created. Output-only field, populated by the system.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Timestamp indicating when the version of the `StoredInfoType` used for
-     * inspection was created. Output-only field, populated by the system.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Timestamp indicating when the version of the `StoredInfoType` used for
-     * inspection was created. Output-only field, populated by the system.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Timestamp indicating when the version of the `StoredInfoType` used for
-     * inspection was created. Output-only field, populated by the system.
-     * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StoredType) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StoredType) - private static final com.google.privacy.dlp.v2.StoredType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StoredType(); - } - - public static com.google.privacy.dlp.v2.StoredType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StoredType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StoredType(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.StoredType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredTypeOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredTypeOrBuilder.java deleted file mode 100644 index c72c5d388d95..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StoredTypeOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface StoredTypeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StoredType) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Resource name of the requested `StoredInfoType`, for example
-   * `organizations/433245324/storedInfoTypes/432452342` or
-   * `projects/project-id/storedInfoTypes/432452342`.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Resource name of the requested `StoredInfoType`, for example
-   * `organizations/433245324/storedInfoTypes/432452342` or
-   * `projects/project-id/storedInfoTypes/432452342`.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Timestamp indicating when the version of the `StoredInfoType` used for
-   * inspection was created. Output-only field, populated by the system.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Timestamp indicating when the version of the `StoredInfoType` used for
-   * inspection was created. Output-only field, populated by the system.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Timestamp indicating when the version of the `StoredInfoType` used for
-   * inspection was created. Output-only field, populated by the system.
-   * 
- * - * .google.protobuf.Timestamp create_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java deleted file mode 100644 index 587dc47a2a33..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java +++ /dev/null @@ -1,2231 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Structured content to inspect. Up to 50,000 `Value`s per request allowed. See
- * https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table
- * to learn more.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Table} - */ -public final class Table extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Table) - TableOrBuilder { -private static final long serialVersionUID = 0L; - // Use Table.newBuilder() to construct. - private Table(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Table() { - headers_ = java.util.Collections.emptyList(); - rows_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Table(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Table( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - headers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - headers_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - rows_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - rows_.add( - input.readMessage(com.google.privacy.dlp.v2.Table.Row.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - headers_ = java.util.Collections.unmodifiableList(headers_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - rows_ = java.util.Collections.unmodifiableList(rows_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Table.class, com.google.privacy.dlp.v2.Table.Builder.class); - } - - public interface RowOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Table.Row) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - java.util.List - getValuesList(); - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - com.google.privacy.dlp.v2.Value getValues(int index); - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - int getValuesCount(); - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - java.util.List - getValuesOrBuilderList(); - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getValuesOrBuilder( - int index); - } - /** - *
-   * Values of the row.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Table.Row} - */ - public static final class Row extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Table.Row) - RowOrBuilder { - private static final long serialVersionUID = 0L; - // Use Row.newBuilder() to construct. - private Row(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Row() { - values_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Row(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Row( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - values_.add( - input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = java.util.Collections.unmodifiableList(values_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Table.Row.class, com.google.privacy.dlp.v2.Table.Row.Builder.class); - } - - public static final int VALUES_FIELD_NUMBER = 1; - private java.util.List values_; - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - @java.lang.Override - public java.util.List getValuesList() { - return values_; - } - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - @java.lang.Override - public java.util.List - getValuesOrBuilderList() { - return values_; - } - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - @java.lang.Override - public int getValuesCount() { - return values_.size(); - } - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getValues(int index) { - return values_.get(index); - } - /** - *
-     * Individual cells.
-     * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getValuesOrBuilder( - int index) { - return values_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < values_.size(); i++) { - output.writeMessage(1, values_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < values_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, values_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Table.Row)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Table.Row other = (com.google.privacy.dlp.v2.Table.Row) obj; - - if (!getValuesList() - .equals(other.getValuesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getValuesCount() > 0) { - hash = (37 * hash) + VALUES_FIELD_NUMBER; - hash = (53 * hash) + getValuesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Table.Row parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Table.Row parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table.Row parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Table.Row parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table.Row parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Table.Row parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table.Row parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Table.Row parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table.Row parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Table.Row parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table.Row parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Table.Row parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Table.Row prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Values of the row.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Table.Row} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Table.Row) - com.google.privacy.dlp.v2.Table.RowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Table.Row.class, com.google.privacy.dlp.v2.Table.Row.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Table.Row.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getValuesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - valuesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_Row_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Table.Row getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Table.Row.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Table.Row build() { - com.google.privacy.dlp.v2.Table.Row result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Table.Row buildPartial() { - com.google.privacy.dlp.v2.Table.Row result = new com.google.privacy.dlp.v2.Table.Row(this); - int from_bitField0_ = bitField0_; - if (valuesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - values_ = java.util.Collections.unmodifiableList(values_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.values_ = values_; - } else { - result.values_ = valuesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Table.Row) { - return mergeFrom((com.google.privacy.dlp.v2.Table.Row)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Table.Row other) { - if (other == com.google.privacy.dlp.v2.Table.Row.getDefaultInstance()) return this; - if (valuesBuilder_ == null) { - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureValuesIsMutable(); - values_.addAll(other.values_); - } - onChanged(); - } - } else { - if (!other.values_.isEmpty()) { - if (valuesBuilder_.isEmpty()) { - valuesBuilder_.dispose(); - valuesBuilder_ = null; - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); - valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getValuesFieldBuilder() : null; - } else { - valuesBuilder_.addAllMessages(other.values_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Table.Row parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Table.Row) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List values_ = - java.util.Collections.emptyList(); - private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - values_ = new java.util.ArrayList(values_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> valuesBuilder_; - - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public java.util.List getValuesList() { - if (valuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(values_); - } else { - return valuesBuilder_.getMessageList(); - } - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public int getValuesCount() { - if (valuesBuilder_ == null) { - return values_.size(); - } else { - return valuesBuilder_.getCount(); - } - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public com.google.privacy.dlp.v2.Value getValues(int index) { - if (valuesBuilder_ == null) { - return values_.get(index); - } else { - return valuesBuilder_.getMessage(index); - } - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public Builder setValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.set(index, value); - onChanged(); - } else { - valuesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public Builder setValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.set(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public Builder addValues(com.google.privacy.dlp.v2.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(value); - onChanged(); - } else { - valuesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public Builder addValues( - int index, com.google.privacy.dlp.v2.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(index, value); - onChanged(); - } else { - valuesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public Builder addValues( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public Builder addValues( - int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public Builder addAllValues( - java.lang.Iterable values) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, values_); - onChanged(); - } else { - valuesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public Builder clearValues() { - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - valuesBuilder_.clear(); - } - return this; - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public Builder removeValues(int index) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.remove(index); - onChanged(); - } else { - valuesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder getValuesBuilder( - int index) { - return getValuesFieldBuilder().getBuilder(index); - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getValuesOrBuilder( - int index) { - if (valuesBuilder_ == null) { - return values_.get(index); } else { - return valuesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public java.util.List - getValuesOrBuilderList() { - if (valuesBuilder_ != null) { - return valuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(values_); - } - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addValuesBuilder() { - return getValuesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder addValuesBuilder( - int index) { - return getValuesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); - } - /** - *
-       * Individual cells.
-       * 
- * - * repeated .google.privacy.dlp.v2.Value values = 1; - */ - public java.util.List - getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getValuesFieldBuilder() { - if (valuesBuilder_ == null) { - valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - values_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - values_ = null; - } - return valuesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Table.Row) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Table.Row) - private static final com.google.privacy.dlp.v2.Table.Row DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Table.Row(); - } - - public static com.google.privacy.dlp.v2.Table.Row getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Row parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Row(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Table.Row getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int HEADERS_FIELD_NUMBER = 1; - private java.util.List headers_; - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - @java.lang.Override - public java.util.List getHeadersList() { - return headers_; - } - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - @java.lang.Override - public java.util.List - getHeadersOrBuilderList() { - return headers_; - } - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - @java.lang.Override - public int getHeadersCount() { - return headers_.size(); - } - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getHeaders(int index) { - return headers_.get(index); - } - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getHeadersOrBuilder( - int index) { - return headers_.get(index); - } - - public static final int ROWS_FIELD_NUMBER = 2; - private java.util.List rows_; - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - @java.lang.Override - public java.util.List getRowsList() { - return rows_; - } - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - @java.lang.Override - public java.util.List - getRowsOrBuilderList() { - return rows_; - } - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - @java.lang.Override - public int getRowsCount() { - return rows_.size(); - } - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Table.Row getRows(int index) { - return rows_.get(index); - } - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Table.RowOrBuilder getRowsOrBuilder( - int index) { - return rows_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < headers_.size(); i++) { - output.writeMessage(1, headers_.get(i)); - } - for (int i = 0; i < rows_.size(); i++) { - output.writeMessage(2, rows_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < headers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, headers_.get(i)); - } - for (int i = 0; i < rows_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rows_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Table)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Table other = (com.google.privacy.dlp.v2.Table) obj; - - if (!getHeadersList() - .equals(other.getHeadersList())) return false; - if (!getRowsList() - .equals(other.getRowsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getHeadersCount() > 0) { - hash = (37 * hash) + HEADERS_FIELD_NUMBER; - hash = (53 * hash) + getHeadersList().hashCode(); - } - if (getRowsCount() > 0) { - hash = (37 * hash) + ROWS_FIELD_NUMBER; - hash = (53 * hash) + getRowsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Table parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Table parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Table parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Table parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Table parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Table parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Table parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Table parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Table prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Structured content to inspect. Up to 50,000 `Value`s per request allowed. See
-   * https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table
-   * to learn more.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Table} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Table) - com.google.privacy.dlp.v2.TableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Table.class, com.google.privacy.dlp.v2.Table.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Table.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getHeadersFieldBuilder(); - getRowsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (headersBuilder_ == null) { - headers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - headersBuilder_.clear(); - } - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - rowsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Table_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Table getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Table.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Table build() { - com.google.privacy.dlp.v2.Table result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Table buildPartial() { - com.google.privacy.dlp.v2.Table result = new com.google.privacy.dlp.v2.Table(this); - int from_bitField0_ = bitField0_; - if (headersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - headers_ = java.util.Collections.unmodifiableList(headers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.headers_ = headers_; - } else { - result.headers_ = headersBuilder_.build(); - } - if (rowsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - rows_ = java.util.Collections.unmodifiableList(rows_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.rows_ = rows_; - } else { - result.rows_ = rowsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Table) { - return mergeFrom((com.google.privacy.dlp.v2.Table)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Table other) { - if (other == com.google.privacy.dlp.v2.Table.getDefaultInstance()) return this; - if (headersBuilder_ == null) { - if (!other.headers_.isEmpty()) { - if (headers_.isEmpty()) { - headers_ = other.headers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureHeadersIsMutable(); - headers_.addAll(other.headers_); - } - onChanged(); - } - } else { - if (!other.headers_.isEmpty()) { - if (headersBuilder_.isEmpty()) { - headersBuilder_.dispose(); - headersBuilder_ = null; - headers_ = other.headers_; - bitField0_ = (bitField0_ & ~0x00000001); - headersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getHeadersFieldBuilder() : null; - } else { - headersBuilder_.addAllMessages(other.headers_); - } - } - } - if (rowsBuilder_ == null) { - if (!other.rows_.isEmpty()) { - if (rows_.isEmpty()) { - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRowsIsMutable(); - rows_.addAll(other.rows_); - } - onChanged(); - } - } else { - if (!other.rows_.isEmpty()) { - if (rowsBuilder_.isEmpty()) { - rowsBuilder_.dispose(); - rowsBuilder_ = null; - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000002); - rowsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRowsFieldBuilder() : null; - } else { - rowsBuilder_.addAllMessages(other.rows_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Table parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Table) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List headers_ = - java.util.Collections.emptyList(); - private void ensureHeadersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - headers_ = new java.util.ArrayList(headers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> headersBuilder_; - - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public java.util.List getHeadersList() { - if (headersBuilder_ == null) { - return java.util.Collections.unmodifiableList(headers_); - } else { - return headersBuilder_.getMessageList(); - } - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public int getHeadersCount() { - if (headersBuilder_ == null) { - return headers_.size(); - } else { - return headersBuilder_.getCount(); - } - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public com.google.privacy.dlp.v2.FieldId getHeaders(int index) { - if (headersBuilder_ == null) { - return headers_.get(index); - } else { - return headersBuilder_.getMessage(index); - } - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public Builder setHeaders( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (headersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHeadersIsMutable(); - headers_.set(index, value); - onChanged(); - } else { - headersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public Builder setHeaders( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - headers_.set(index, builderForValue.build()); - onChanged(); - } else { - headersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public Builder addHeaders(com.google.privacy.dlp.v2.FieldId value) { - if (headersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHeadersIsMutable(); - headers_.add(value); - onChanged(); - } else { - headersBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public Builder addHeaders( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (headersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHeadersIsMutable(); - headers_.add(index, value); - onChanged(); - } else { - headersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public Builder addHeaders( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - headers_.add(builderForValue.build()); - onChanged(); - } else { - headersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public Builder addHeaders( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - headers_.add(index, builderForValue.build()); - onChanged(); - } else { - headersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public Builder addAllHeaders( - java.lang.Iterable values) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, headers_); - onChanged(); - } else { - headersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public Builder clearHeaders() { - if (headersBuilder_ == null) { - headers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - headersBuilder_.clear(); - } - return this; - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public Builder removeHeaders(int index) { - if (headersBuilder_ == null) { - ensureHeadersIsMutable(); - headers_.remove(index); - onChanged(); - } else { - headersBuilder_.remove(index); - } - return this; - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getHeadersBuilder( - int index) { - return getHeadersFieldBuilder().getBuilder(index); - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getHeadersOrBuilder( - int index) { - if (headersBuilder_ == null) { - return headers_.get(index); } else { - return headersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public java.util.List - getHeadersOrBuilderList() { - if (headersBuilder_ != null) { - return headersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(headers_); - } - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addHeadersBuilder() { - return getHeadersFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addHeadersBuilder( - int index) { - return getHeadersFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * Headers of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - public java.util.List - getHeadersBuilderList() { - return getHeadersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getHeadersFieldBuilder() { - if (headersBuilder_ == null) { - headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - headers_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - headers_ = null; - } - return headersBuilder_; - } - - private java.util.List rows_ = - java.util.Collections.emptyList(); - private void ensureRowsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - rows_ = new java.util.ArrayList(rows_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Table.Row, com.google.privacy.dlp.v2.Table.Row.Builder, com.google.privacy.dlp.v2.Table.RowOrBuilder> rowsBuilder_; - - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public java.util.List getRowsList() { - if (rowsBuilder_ == null) { - return java.util.Collections.unmodifiableList(rows_); - } else { - return rowsBuilder_.getMessageList(); - } - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public int getRowsCount() { - if (rowsBuilder_ == null) { - return rows_.size(); - } else { - return rowsBuilder_.getCount(); - } - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public com.google.privacy.dlp.v2.Table.Row getRows(int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); - } else { - return rowsBuilder_.getMessage(index); - } - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public Builder setRows( - int index, com.google.privacy.dlp.v2.Table.Row value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.set(index, value); - onChanged(); - } else { - rowsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public Builder setRows( - int index, com.google.privacy.dlp.v2.Table.Row.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.set(index, builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public Builder addRows(com.google.privacy.dlp.v2.Table.Row value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.add(value); - onChanged(); - } else { - rowsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public Builder addRows( - int index, com.google.privacy.dlp.v2.Table.Row value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.add(index, value); - onChanged(); - } else { - rowsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public Builder addRows( - com.google.privacy.dlp.v2.Table.Row.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public Builder addRows( - int index, com.google.privacy.dlp.v2.Table.Row.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(index, builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public Builder addAllRows( - java.lang.Iterable values) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rows_); - onChanged(); - } else { - rowsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public Builder clearRows() { - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - rowsBuilder_.clear(); - } - return this; - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public Builder removeRows(int index) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.remove(index); - onChanged(); - } else { - rowsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public com.google.privacy.dlp.v2.Table.Row.Builder getRowsBuilder( - int index) { - return getRowsFieldBuilder().getBuilder(index); - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public com.google.privacy.dlp.v2.Table.RowOrBuilder getRowsOrBuilder( - int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); } else { - return rowsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public java.util.List - getRowsOrBuilderList() { - if (rowsBuilder_ != null) { - return rowsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rows_); - } - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public com.google.privacy.dlp.v2.Table.Row.Builder addRowsBuilder() { - return getRowsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.Table.Row.getDefaultInstance()); - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public com.google.privacy.dlp.v2.Table.Row.Builder addRowsBuilder( - int index) { - return getRowsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.Table.Row.getDefaultInstance()); - } - /** - *
-     * Rows of the table.
-     * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - public java.util.List - getRowsBuilderList() { - return getRowsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Table.Row, com.google.privacy.dlp.v2.Table.Row.Builder, com.google.privacy.dlp.v2.Table.RowOrBuilder> - getRowsFieldBuilder() { - if (rowsBuilder_ == null) { - rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.Table.Row, com.google.privacy.dlp.v2.Table.Row.Builder, com.google.privacy.dlp.v2.Table.RowOrBuilder>( - rows_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - rows_ = null; - } - return rowsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Table) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Table) - private static final com.google.privacy.dlp.v2.Table DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Table(); - } - - public static com.google.privacy.dlp.v2.Table getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser

- PARSER = new com.google.protobuf.AbstractParser
() { - @java.lang.Override - public Table parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Table(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser
parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser
getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Table getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfile.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfile.java deleted file mode 100644 index 4e88222445b9..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfile.java +++ /dev/null @@ -1,5572 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * The profile for a scanned table.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TableDataProfile} - */ -public final class TableDataProfile extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TableDataProfile) - TableDataProfileOrBuilder { -private static final long serialVersionUID = 0L; - // Use TableDataProfile.newBuilder() to construct. - private TableDataProfile(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TableDataProfile() { - name_ = ""; - projectDataProfile_ = ""; - datasetProjectId_ = ""; - datasetLocation_ = ""; - datasetId_ = ""; - tableId_ = ""; - fullResource_ = ""; - state_ = 0; - predictedInfoTypes_ = java.util.Collections.emptyList(); - otherInfoTypes_ = java.util.Collections.emptyList(); - encryptionStatus_ = 0; - resourceVisibility_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TableDataProfile(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TableDataProfile( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - projectDataProfile_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - fullResource_ = s; - break; - } - case 42: { - com.google.privacy.dlp.v2.SensitivityScore.Builder subBuilder = null; - if (sensitivityScore_ != null) { - subBuilder = sensitivityScore_.toBuilder(); - } - sensitivityScore_ = input.readMessage(com.google.privacy.dlp.v2.SensitivityScore.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sensitivityScore_); - sensitivityScore_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.privacy.dlp.v2.DataRiskLevel.Builder subBuilder = null; - if (dataRiskLevel_ != null) { - subBuilder = dataRiskLevel_.toBuilder(); - } - dataRiskLevel_ = input.readMessage(com.google.privacy.dlp.v2.DataRiskLevel.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataRiskLevel_); - dataRiskLevel_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder subBuilder = null; - if (configSnapshot_ != null) { - subBuilder = configSnapshot_.toBuilder(); - } - configSnapshot_ = input.readMessage(com.google.privacy.dlp.v2.DataProfileConfigSnapshot.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(configSnapshot_); - configSnapshot_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastModifiedTime_ != null) { - subBuilder = lastModifiedTime_.toBuilder(); - } - lastModifiedTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastModifiedTime_); - lastModifiedTime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (expirationTime_ != null) { - subBuilder = expirationTime_.toBuilder(); - } - expirationTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(expirationTime_); - expirationTime_ = subBuilder.buildPartial(); - } - - break; - } - case 80: { - - scannedColumnCount_ = input.readInt64(); - break; - } - case 88: { - - failedColumnCount_ = input.readInt64(); - break; - } - case 96: { - - tableSizeBytes_ = input.readInt64(); - break; - } - case 104: { - - rowCount_ = input.readInt64(); - break; - } - case 112: { - int rawValue = input.readEnum(); - - encryptionStatus_ = rawValue; - break; - } - case 120: { - int rawValue = input.readEnum(); - - resourceVisibility_ = rawValue; - break; - } - case 130: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (profileLastGenerated_ != null) { - subBuilder = profileLastGenerated_.toBuilder(); - } - profileLastGenerated_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(profileLastGenerated_); - profileLastGenerated_ = subBuilder.buildPartial(); - } - - break; - } - case 138: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - resourceLabels_ = com.google.protobuf.MapField.newMapField( - ResourceLabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry - resourceLabels__ = input.readMessage( - ResourceLabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - resourceLabels_.getMutableMap().put( - resourceLabels__.getKey(), resourceLabels__.getValue()); - break; - } - case 170: { - com.google.privacy.dlp.v2.ProfileStatus.Builder subBuilder = null; - if (profileStatus_ != null) { - subBuilder = profileStatus_.toBuilder(); - } - profileStatus_ = input.readMessage(com.google.privacy.dlp.v2.ProfileStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(profileStatus_); - profileStatus_ = subBuilder.buildPartial(); - } - - break; - } - case 176: { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 186: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 194: { - java.lang.String s = input.readStringRequireUtf8(); - - datasetProjectId_ = s; - break; - } - case 202: { - java.lang.String s = input.readStringRequireUtf8(); - - datasetId_ = s; - break; - } - case 210: { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - case 218: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - predictedInfoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - predictedInfoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.InfoTypeSummary.parser(), extensionRegistry)); - break; - } - case 226: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - otherInfoTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - otherInfoTypes_.add( - input.readMessage(com.google.privacy.dlp.v2.OtherInfoTypeSummary.parser(), extensionRegistry)); - break; - } - case 234: { - java.lang.String s = input.readStringRequireUtf8(); - - datasetLocation_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - predictedInfoTypes_ = java.util.Collections.unmodifiableList(predictedInfoTypes_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - otherInfoTypes_ = java.util.Collections.unmodifiableList(otherInfoTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 17: - return internalGetResourceLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TableDataProfile.class, com.google.privacy.dlp.v2.TableDataProfile.Builder.class); - } - - /** - *
-   * Possible states of a profile. New items may be added.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.TableDataProfile.State} - */ - public enum State - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - *
-     * The profile is currently running. Once a profile has finished it will
-     * transition to DONE.
-     * 
- * - * RUNNING = 1; - */ - RUNNING(1), - /** - *
-     * The profile is no longer generating.
-     * If profile_status.status.code is 0, the profile succeeded, otherwise, it
-     * failed.
-     * 
- * - * DONE = 2; - */ - DONE(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The profile is currently running. Once a profile has finished it will
-     * transition to DONE.
-     * 
- * - * RUNNING = 1; - */ - public static final int RUNNING_VALUE = 1; - /** - *
-     * The profile is no longer generating.
-     * If profile_status.status.code is 0, the profile succeeded, otherwise, it
-     * failed.
-     * 
- * - * DONE = 2; - */ - public static final int DONE_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: return STATE_UNSPECIFIED; - case 1: return RUNNING; - case 2: return DONE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - State> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.TableDataProfile.getDescriptor().getEnumTypes().get(0); - } - - private static final State[] VALUES = values(); - - public static State valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TableDataProfile.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The name of the profile.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The name of the profile.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_DATA_PROFILE_FIELD_NUMBER = 2; - private volatile java.lang.Object projectDataProfile_; - /** - *
-   * The resource name to the project data profile for this table.
-   * 
- * - * string project_data_profile = 2; - * @return The projectDataProfile. - */ - @java.lang.Override - public java.lang.String getProjectDataProfile() { - java.lang.Object ref = projectDataProfile_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectDataProfile_ = s; - return s; - } - } - /** - *
-   * The resource name to the project data profile for this table.
-   * 
- * - * string project_data_profile = 2; - * @return The bytes for projectDataProfile. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectDataProfileBytes() { - java.lang.Object ref = projectDataProfile_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectDataProfile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATASET_PROJECT_ID_FIELD_NUMBER = 24; - private volatile java.lang.Object datasetProjectId_; - /** - *
-   * The GCP project ID that owns the BigQuery dataset.
-   * 
- * - * string dataset_project_id = 24; - * @return The datasetProjectId. - */ - @java.lang.Override - public java.lang.String getDatasetProjectId() { - java.lang.Object ref = datasetProjectId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetProjectId_ = s; - return s; - } - } - /** - *
-   * The GCP project ID that owns the BigQuery dataset.
-   * 
- * - * string dataset_project_id = 24; - * @return The bytes for datasetProjectId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDatasetProjectIdBytes() { - java.lang.Object ref = datasetProjectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - datasetProjectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATASET_LOCATION_FIELD_NUMBER = 29; - private volatile java.lang.Object datasetLocation_; - /** - *
-   * The BigQuery location where the dataset's data is stored.
-   * See https://cloud.google.com/bigquery/docs/locations for supported
-   * locations.
-   * 
- * - * string dataset_location = 29; - * @return The datasetLocation. - */ - @java.lang.Override - public java.lang.String getDatasetLocation() { - java.lang.Object ref = datasetLocation_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetLocation_ = s; - return s; - } - } - /** - *
-   * The BigQuery location where the dataset's data is stored.
-   * See https://cloud.google.com/bigquery/docs/locations for supported
-   * locations.
-   * 
- * - * string dataset_location = 29; - * @return The bytes for datasetLocation. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDatasetLocationBytes() { - java.lang.Object ref = datasetLocation_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - datasetLocation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATASET_ID_FIELD_NUMBER = 25; - private volatile java.lang.Object datasetId_; - /** - *
-   * The BigQuery dataset ID.
-   * 
- * - * string dataset_id = 25; - * @return The datasetId. - */ - @java.lang.Override - public java.lang.String getDatasetId() { - java.lang.Object ref = datasetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetId_ = s; - return s; - } - } - /** - *
-   * The BigQuery dataset ID.
-   * 
- * - * string dataset_id = 25; - * @return The bytes for datasetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDatasetIdBytes() { - java.lang.Object ref = datasetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - datasetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_ID_FIELD_NUMBER = 26; - private volatile java.lang.Object tableId_; - /** - *
-   * The BigQuery table ID.
-   * 
- * - * string table_id = 26; - * @return The tableId. - */ - @java.lang.Override - public java.lang.String getTableId() { - java.lang.Object ref = tableId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableId_ = s; - return s; - } - } - /** - *
-   * The BigQuery table ID.
-   * 
- * - * string table_id = 26; - * @return The bytes for tableId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTableIdBytes() { - java.lang.Object ref = tableId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tableId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FULL_RESOURCE_FIELD_NUMBER = 3; - private volatile java.lang.Object fullResource_; - /** - *
-   * The resource name of the table.
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * 
- * - * string full_resource = 3; - * @return The fullResource. - */ - @java.lang.Override - public java.lang.String getFullResource() { - java.lang.Object ref = fullResource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResource_ = s; - return s; - } - } - /** - *
-   * The resource name of the table.
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * 
- * - * string full_resource = 3; - * @return The bytes for fullResource. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFullResourceBytes() { - java.lang.Object ref = fullResource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROFILE_STATUS_FIELD_NUMBER = 21; - private com.google.privacy.dlp.v2.ProfileStatus profileStatus_; - /** - *
-   * Success or error status from the most recent profile generation attempt.
-   * May be empty if the profile is still being generated.
-   * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - * @return Whether the profileStatus field is set. - */ - @java.lang.Override - public boolean hasProfileStatus() { - return profileStatus_ != null; - } - /** - *
-   * Success or error status from the most recent profile generation attempt.
-   * May be empty if the profile is still being generated.
-   * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - * @return The profileStatus. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ProfileStatus getProfileStatus() { - return profileStatus_ == null ? com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance() : profileStatus_; - } - /** - *
-   * Success or error status from the most recent profile generation attempt.
-   * May be empty if the profile is still being generated.
-   * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ProfileStatusOrBuilder getProfileStatusOrBuilder() { - return getProfileStatus(); - } - - public static final int STATE_FIELD_NUMBER = 22; - private int state_; - /** - *
-   * State of a profile.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile.State state = 22; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-   * State of a profile.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile.State state = 22; - * @return The state. - */ - @java.lang.Override public com.google.privacy.dlp.v2.TableDataProfile.State getState() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TableDataProfile.State result = com.google.privacy.dlp.v2.TableDataProfile.State.valueOf(state_); - return result == null ? com.google.privacy.dlp.v2.TableDataProfile.State.UNRECOGNIZED : result; - } - - public static final int SENSITIVITY_SCORE_FIELD_NUMBER = 5; - private com.google.privacy.dlp.v2.SensitivityScore sensitivityScore_; - /** - *
-   * The sensitivity score of this table.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - * @return Whether the sensitivityScore field is set. - */ - @java.lang.Override - public boolean hasSensitivityScore() { - return sensitivityScore_ != null; - } - /** - *
-   * The sensitivity score of this table.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - * @return The sensitivityScore. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.SensitivityScore getSensitivityScore() { - return sensitivityScore_ == null ? com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance() : sensitivityScore_; - } - /** - *
-   * The sensitivity score of this table.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.SensitivityScoreOrBuilder getSensitivityScoreOrBuilder() { - return getSensitivityScore(); - } - - public static final int DATA_RISK_LEVEL_FIELD_NUMBER = 6; - private com.google.privacy.dlp.v2.DataRiskLevel dataRiskLevel_; - /** - *
-   * The data risk level of this table.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - * @return Whether the dataRiskLevel field is set. - */ - @java.lang.Override - public boolean hasDataRiskLevel() { - return dataRiskLevel_ != null; - } - /** - *
-   * The data risk level of this table.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - * @return The dataRiskLevel. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataRiskLevel getDataRiskLevel() { - return dataRiskLevel_ == null ? com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance() : dataRiskLevel_; - } - /** - *
-   * The data risk level of this table.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataRiskLevelOrBuilder getDataRiskLevelOrBuilder() { - return getDataRiskLevel(); - } - - public static final int PREDICTED_INFO_TYPES_FIELD_NUMBER = 27; - private java.util.List predictedInfoTypes_; - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - @java.lang.Override - public java.util.List getPredictedInfoTypesList() { - return predictedInfoTypes_; - } - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - @java.lang.Override - public java.util.List - getPredictedInfoTypesOrBuilderList() { - return predictedInfoTypes_; - } - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - @java.lang.Override - public int getPredictedInfoTypesCount() { - return predictedInfoTypes_.size(); - } - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeSummary getPredictedInfoTypes(int index) { - return predictedInfoTypes_.get(index); - } - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder getPredictedInfoTypesOrBuilder( - int index) { - return predictedInfoTypes_.get(index); - } - - public static final int OTHER_INFO_TYPES_FIELD_NUMBER = 28; - private java.util.List otherInfoTypes_; - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - @java.lang.Override - public java.util.List getOtherInfoTypesList() { - return otherInfoTypes_; - } - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - @java.lang.Override - public java.util.List - getOtherInfoTypesOrBuilderList() { - return otherInfoTypes_; - } - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - @java.lang.Override - public int getOtherInfoTypesCount() { - return otherInfoTypes_.size(); - } - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.OtherInfoTypeSummary getOtherInfoTypes(int index) { - return otherInfoTypes_.get(index); - } - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder getOtherInfoTypesOrBuilder( - int index) { - return otherInfoTypes_.get(index); - } - - public static final int CONFIG_SNAPSHOT_FIELD_NUMBER = 7; - private com.google.privacy.dlp.v2.DataProfileConfigSnapshot configSnapshot_; - /** - *
-   * The snapshot of the configurations used to generate the profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - * @return Whether the configSnapshot field is set. - */ - @java.lang.Override - public boolean hasConfigSnapshot() { - return configSnapshot_ != null; - } - /** - *
-   * The snapshot of the configurations used to generate the profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - * @return The configSnapshot. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileConfigSnapshot getConfigSnapshot() { - return configSnapshot_ == null ? com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance() : configSnapshot_; - } - /** - *
-   * The snapshot of the configurations used to generate the profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder getConfigSnapshotOrBuilder() { - return getConfigSnapshot(); - } - - public static final int LAST_MODIFIED_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp lastModifiedTime_; - /** - *
-   * The time when this table was last modified
-   * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - * @return Whether the lastModifiedTime field is set. - */ - @java.lang.Override - public boolean hasLastModifiedTime() { - return lastModifiedTime_ != null; - } - /** - *
-   * The time when this table was last modified
-   * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - * @return The lastModifiedTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastModifiedTime() { - return lastModifiedTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastModifiedTime_; - } - /** - *
-   * The time when this table was last modified
-   * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastModifiedTimeOrBuilder() { - return getLastModifiedTime(); - } - - public static final int EXPIRATION_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp expirationTime_; - /** - *
-   * Optional. The time when this table expires.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - * @return Whether the expirationTime field is set. - */ - @java.lang.Override - public boolean hasExpirationTime() { - return expirationTime_ != null; - } - /** - *
-   * Optional. The time when this table expires.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - * @return The expirationTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getExpirationTime() { - return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } - /** - *
-   * Optional. The time when this table expires.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { - return getExpirationTime(); - } - - public static final int SCANNED_COLUMN_COUNT_FIELD_NUMBER = 10; - private long scannedColumnCount_; - /** - *
-   * The number of columns profiled in the table.
-   * 
- * - * int64 scanned_column_count = 10; - * @return The scannedColumnCount. - */ - @java.lang.Override - public long getScannedColumnCount() { - return scannedColumnCount_; - } - - public static final int FAILED_COLUMN_COUNT_FIELD_NUMBER = 11; - private long failedColumnCount_; - /** - *
-   * The number of columns skipped in the table because of an error.
-   * 
- * - * int64 failed_column_count = 11; - * @return The failedColumnCount. - */ - @java.lang.Override - public long getFailedColumnCount() { - return failedColumnCount_; - } - - public static final int TABLE_SIZE_BYTES_FIELD_NUMBER = 12; - private long tableSizeBytes_; - /** - *
-   * The size of the table when the profile was generated.
-   * 
- * - * int64 table_size_bytes = 12; - * @return The tableSizeBytes. - */ - @java.lang.Override - public long getTableSizeBytes() { - return tableSizeBytes_; - } - - public static final int ROW_COUNT_FIELD_NUMBER = 13; - private long rowCount_; - /** - *
-   * Number of rows in the table when the profile was generated.
-   * 
- * - * int64 row_count = 13; - * @return The rowCount. - */ - @java.lang.Override - public long getRowCount() { - return rowCount_; - } - - public static final int ENCRYPTION_STATUS_FIELD_NUMBER = 14; - private int encryptionStatus_; - /** - *
-   * How the table is encrypted.
-   * 
- * - * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; - * @return The enum numeric value on the wire for encryptionStatus. - */ - @java.lang.Override public int getEncryptionStatusValue() { - return encryptionStatus_; - } - /** - *
-   * How the table is encrypted.
-   * 
- * - * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; - * @return The encryptionStatus. - */ - @java.lang.Override public com.google.privacy.dlp.v2.EncryptionStatus getEncryptionStatus() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.EncryptionStatus result = com.google.privacy.dlp.v2.EncryptionStatus.valueOf(encryptionStatus_); - return result == null ? com.google.privacy.dlp.v2.EncryptionStatus.UNRECOGNIZED : result; - } - - public static final int RESOURCE_VISIBILITY_FIELD_NUMBER = 15; - private int resourceVisibility_; - /** - *
-   * How broadly a resource has been shared.
-   * 
- * - * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; - * @return The enum numeric value on the wire for resourceVisibility. - */ - @java.lang.Override public int getResourceVisibilityValue() { - return resourceVisibility_; - } - /** - *
-   * How broadly a resource has been shared.
-   * 
- * - * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; - * @return The resourceVisibility. - */ - @java.lang.Override public com.google.privacy.dlp.v2.ResourceVisibility getResourceVisibility() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.ResourceVisibility result = com.google.privacy.dlp.v2.ResourceVisibility.valueOf(resourceVisibility_); - return result == null ? com.google.privacy.dlp.v2.ResourceVisibility.UNRECOGNIZED : result; - } - - public static final int PROFILE_LAST_GENERATED_FIELD_NUMBER = 16; - private com.google.protobuf.Timestamp profileLastGenerated_; - /** - *
-   * The last time the profile was generated.
-   * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - * @return Whether the profileLastGenerated field is set. - */ - @java.lang.Override - public boolean hasProfileLastGenerated() { - return profileLastGenerated_ != null; - } - /** - *
-   * The last time the profile was generated.
-   * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - * @return The profileLastGenerated. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getProfileLastGenerated() { - return profileLastGenerated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : profileLastGenerated_; - } - /** - *
-   * The last time the profile was generated.
-   * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getProfileLastGeneratedOrBuilder() { - return getProfileLastGenerated(); - } - - public static final int RESOURCE_LABELS_FIELD_NUMBER = 17; - private static final class ResourceLabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_ResourceLabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> resourceLabels_; - private com.google.protobuf.MapField - internalGetResourceLabels() { - if (resourceLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ResourceLabelsDefaultEntryHolder.defaultEntry); - } - return resourceLabels_; - } - - public int getResourceLabelsCount() { - return internalGetResourceLabels().getMap().size(); - } - /** - *
-   * The labels applied to the resource at the time the profile was generated.
-   * 
- * - * map<string, string> resource_labels = 17; - */ - - @java.lang.Override - public boolean containsResourceLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResourceLabels().getMap().containsKey(key); - } - /** - * Use {@link #getResourceLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResourceLabels() { - return getResourceLabelsMap(); - } - /** - *
-   * The labels applied to the resource at the time the profile was generated.
-   * 
- * - * map<string, string> resource_labels = 17; - */ - @java.lang.Override - - public java.util.Map getResourceLabelsMap() { - return internalGetResourceLabels().getMap(); - } - /** - *
-   * The labels applied to the resource at the time the profile was generated.
-   * 
- * - * map<string, string> resource_labels = 17; - */ - @java.lang.Override - - public java.lang.String getResourceLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResourceLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * The labels applied to the resource at the time the profile was generated.
-   * 
- * - * map<string, string> resource_labels = 17; - */ - @java.lang.Override - - public java.lang.String getResourceLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResourceLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 23; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * The time at which the table was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 23; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * The time at which the table was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 23; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * The time at which the table was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 23; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectDataProfile_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectDataProfile_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, fullResource_); - } - if (sensitivityScore_ != null) { - output.writeMessage(5, getSensitivityScore()); - } - if (dataRiskLevel_ != null) { - output.writeMessage(6, getDataRiskLevel()); - } - if (configSnapshot_ != null) { - output.writeMessage(7, getConfigSnapshot()); - } - if (lastModifiedTime_ != null) { - output.writeMessage(8, getLastModifiedTime()); - } - if (expirationTime_ != null) { - output.writeMessage(9, getExpirationTime()); - } - if (scannedColumnCount_ != 0L) { - output.writeInt64(10, scannedColumnCount_); - } - if (failedColumnCount_ != 0L) { - output.writeInt64(11, failedColumnCount_); - } - if (tableSizeBytes_ != 0L) { - output.writeInt64(12, tableSizeBytes_); - } - if (rowCount_ != 0L) { - output.writeInt64(13, rowCount_); - } - if (encryptionStatus_ != com.google.privacy.dlp.v2.EncryptionStatus.ENCRYPTION_STATUS_UNSPECIFIED.getNumber()) { - output.writeEnum(14, encryptionStatus_); - } - if (resourceVisibility_ != com.google.privacy.dlp.v2.ResourceVisibility.RESOURCE_VISIBILITY_UNSPECIFIED.getNumber()) { - output.writeEnum(15, resourceVisibility_); - } - if (profileLastGenerated_ != null) { - output.writeMessage(16, getProfileLastGenerated()); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetResourceLabels(), - ResourceLabelsDefaultEntryHolder.defaultEntry, - 17); - if (profileStatus_ != null) { - output.writeMessage(21, getProfileStatus()); - } - if (state_ != com.google.privacy.dlp.v2.TableDataProfile.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(22, state_); - } - if (createTime_ != null) { - output.writeMessage(23, getCreateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetProjectId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 24, datasetProjectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 25, datasetId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 26, tableId_); - } - for (int i = 0; i < predictedInfoTypes_.size(); i++) { - output.writeMessage(27, predictedInfoTypes_.get(i)); - } - for (int i = 0; i < otherInfoTypes_.size(); i++) { - output.writeMessage(28, otherInfoTypes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetLocation_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 29, datasetLocation_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectDataProfile_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectDataProfile_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, fullResource_); - } - if (sensitivityScore_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getSensitivityScore()); - } - if (dataRiskLevel_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getDataRiskLevel()); - } - if (configSnapshot_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getConfigSnapshot()); - } - if (lastModifiedTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getLastModifiedTime()); - } - if (expirationTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getExpirationTime()); - } - if (scannedColumnCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(10, scannedColumnCount_); - } - if (failedColumnCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(11, failedColumnCount_); - } - if (tableSizeBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(12, tableSizeBytes_); - } - if (rowCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(13, rowCount_); - } - if (encryptionStatus_ != com.google.privacy.dlp.v2.EncryptionStatus.ENCRYPTION_STATUS_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(14, encryptionStatus_); - } - if (resourceVisibility_ != com.google.privacy.dlp.v2.ResourceVisibility.RESOURCE_VISIBILITY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(15, resourceVisibility_); - } - if (profileLastGenerated_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, getProfileLastGenerated()); - } - for (java.util.Map.Entry entry - : internalGetResourceLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - resourceLabels__ = ResourceLabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(17, resourceLabels__); - } - if (profileStatus_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, getProfileStatus()); - } - if (state_ != com.google.privacy.dlp.v2.TableDataProfile.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(22, state_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(23, getCreateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetProjectId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, datasetProjectId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, datasetId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, tableId_); - } - for (int i = 0; i < predictedInfoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(27, predictedInfoTypes_.get(i)); - } - for (int i = 0; i < otherInfoTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(28, otherInfoTypes_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetLocation_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, datasetLocation_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TableDataProfile)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TableDataProfile other = (com.google.privacy.dlp.v2.TableDataProfile) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getProjectDataProfile() - .equals(other.getProjectDataProfile())) return false; - if (!getDatasetProjectId() - .equals(other.getDatasetProjectId())) return false; - if (!getDatasetLocation() - .equals(other.getDatasetLocation())) return false; - if (!getDatasetId() - .equals(other.getDatasetId())) return false; - if (!getTableId() - .equals(other.getTableId())) return false; - if (!getFullResource() - .equals(other.getFullResource())) return false; - if (hasProfileStatus() != other.hasProfileStatus()) return false; - if (hasProfileStatus()) { - if (!getProfileStatus() - .equals(other.getProfileStatus())) return false; - } - if (state_ != other.state_) return false; - if (hasSensitivityScore() != other.hasSensitivityScore()) return false; - if (hasSensitivityScore()) { - if (!getSensitivityScore() - .equals(other.getSensitivityScore())) return false; - } - if (hasDataRiskLevel() != other.hasDataRiskLevel()) return false; - if (hasDataRiskLevel()) { - if (!getDataRiskLevel() - .equals(other.getDataRiskLevel())) return false; - } - if (!getPredictedInfoTypesList() - .equals(other.getPredictedInfoTypesList())) return false; - if (!getOtherInfoTypesList() - .equals(other.getOtherInfoTypesList())) return false; - if (hasConfigSnapshot() != other.hasConfigSnapshot()) return false; - if (hasConfigSnapshot()) { - if (!getConfigSnapshot() - .equals(other.getConfigSnapshot())) return false; - } - if (hasLastModifiedTime() != other.hasLastModifiedTime()) return false; - if (hasLastModifiedTime()) { - if (!getLastModifiedTime() - .equals(other.getLastModifiedTime())) return false; - } - if (hasExpirationTime() != other.hasExpirationTime()) return false; - if (hasExpirationTime()) { - if (!getExpirationTime() - .equals(other.getExpirationTime())) return false; - } - if (getScannedColumnCount() - != other.getScannedColumnCount()) return false; - if (getFailedColumnCount() - != other.getFailedColumnCount()) return false; - if (getTableSizeBytes() - != other.getTableSizeBytes()) return false; - if (getRowCount() - != other.getRowCount()) return false; - if (encryptionStatus_ != other.encryptionStatus_) return false; - if (resourceVisibility_ != other.resourceVisibility_) return false; - if (hasProfileLastGenerated() != other.hasProfileLastGenerated()) return false; - if (hasProfileLastGenerated()) { - if (!getProfileLastGenerated() - .equals(other.getProfileLastGenerated())) return false; - } - if (!internalGetResourceLabels().equals( - other.internalGetResourceLabels())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + PROJECT_DATA_PROFILE_FIELD_NUMBER; - hash = (53 * hash) + getProjectDataProfile().hashCode(); - hash = (37 * hash) + DATASET_PROJECT_ID_FIELD_NUMBER; - hash = (53 * hash) + getDatasetProjectId().hashCode(); - hash = (37 * hash) + DATASET_LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getDatasetLocation().hashCode(); - hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; - hash = (53 * hash) + getDatasetId().hashCode(); - hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; - hash = (53 * hash) + getTableId().hashCode(); - hash = (37 * hash) + FULL_RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getFullResource().hashCode(); - if (hasProfileStatus()) { - hash = (37 * hash) + PROFILE_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getProfileStatus().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - if (hasSensitivityScore()) { - hash = (37 * hash) + SENSITIVITY_SCORE_FIELD_NUMBER; - hash = (53 * hash) + getSensitivityScore().hashCode(); - } - if (hasDataRiskLevel()) { - hash = (37 * hash) + DATA_RISK_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + getDataRiskLevel().hashCode(); - } - if (getPredictedInfoTypesCount() > 0) { - hash = (37 * hash) + PREDICTED_INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getPredictedInfoTypesList().hashCode(); - } - if (getOtherInfoTypesCount() > 0) { - hash = (37 * hash) + OTHER_INFO_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getOtherInfoTypesList().hashCode(); - } - if (hasConfigSnapshot()) { - hash = (37 * hash) + CONFIG_SNAPSHOT_FIELD_NUMBER; - hash = (53 * hash) + getConfigSnapshot().hashCode(); - } - if (hasLastModifiedTime()) { - hash = (37 * hash) + LAST_MODIFIED_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastModifiedTime().hashCode(); - } - if (hasExpirationTime()) { - hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; - hash = (53 * hash) + getExpirationTime().hashCode(); - } - hash = (37 * hash) + SCANNED_COLUMN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getScannedColumnCount()); - hash = (37 * hash) + FAILED_COLUMN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFailedColumnCount()); - hash = (37 * hash) + TABLE_SIZE_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTableSizeBytes()); - hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getRowCount()); - hash = (37 * hash) + ENCRYPTION_STATUS_FIELD_NUMBER; - hash = (53 * hash) + encryptionStatus_; - hash = (37 * hash) + RESOURCE_VISIBILITY_FIELD_NUMBER; - hash = (53 * hash) + resourceVisibility_; - if (hasProfileLastGenerated()) { - hash = (37 * hash) + PROFILE_LAST_GENERATED_FIELD_NUMBER; - hash = (53 * hash) + getProfileLastGenerated().hashCode(); - } - if (!internalGetResourceLabels().getMap().isEmpty()) { - hash = (37 * hash) + RESOURCE_LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetResourceLabels().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TableDataProfile parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TableDataProfile prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The profile for a scanned table.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TableDataProfile} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TableDataProfile) - com.google.privacy.dlp.v2.TableDataProfileOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 17: - return internalGetResourceLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 17: - return internalGetMutableResourceLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TableDataProfile.class, com.google.privacy.dlp.v2.TableDataProfile.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TableDataProfile.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPredictedInfoTypesFieldBuilder(); - getOtherInfoTypesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - projectDataProfile_ = ""; - - datasetProjectId_ = ""; - - datasetLocation_ = ""; - - datasetId_ = ""; - - tableId_ = ""; - - fullResource_ = ""; - - if (profileStatusBuilder_ == null) { - profileStatus_ = null; - } else { - profileStatus_ = null; - profileStatusBuilder_ = null; - } - state_ = 0; - - if (sensitivityScoreBuilder_ == null) { - sensitivityScore_ = null; - } else { - sensitivityScore_ = null; - sensitivityScoreBuilder_ = null; - } - if (dataRiskLevelBuilder_ == null) { - dataRiskLevel_ = null; - } else { - dataRiskLevel_ = null; - dataRiskLevelBuilder_ = null; - } - if (predictedInfoTypesBuilder_ == null) { - predictedInfoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - predictedInfoTypesBuilder_.clear(); - } - if (otherInfoTypesBuilder_ == null) { - otherInfoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - otherInfoTypesBuilder_.clear(); - } - if (configSnapshotBuilder_ == null) { - configSnapshot_ = null; - } else { - configSnapshot_ = null; - configSnapshotBuilder_ = null; - } - if (lastModifiedTimeBuilder_ == null) { - lastModifiedTime_ = null; - } else { - lastModifiedTime_ = null; - lastModifiedTimeBuilder_ = null; - } - if (expirationTimeBuilder_ == null) { - expirationTime_ = null; - } else { - expirationTime_ = null; - expirationTimeBuilder_ = null; - } - scannedColumnCount_ = 0L; - - failedColumnCount_ = 0L; - - tableSizeBytes_ = 0L; - - rowCount_ = 0L; - - encryptionStatus_ = 0; - - resourceVisibility_ = 0; - - if (profileLastGeneratedBuilder_ == null) { - profileLastGenerated_ = null; - } else { - profileLastGenerated_ = null; - profileLastGeneratedBuilder_ = null; - } - internalGetMutableResourceLabels().clear(); - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableDataProfile_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableDataProfile getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableDataProfile build() { - com.google.privacy.dlp.v2.TableDataProfile result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableDataProfile buildPartial() { - com.google.privacy.dlp.v2.TableDataProfile result = new com.google.privacy.dlp.v2.TableDataProfile(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.projectDataProfile_ = projectDataProfile_; - result.datasetProjectId_ = datasetProjectId_; - result.datasetLocation_ = datasetLocation_; - result.datasetId_ = datasetId_; - result.tableId_ = tableId_; - result.fullResource_ = fullResource_; - if (profileStatusBuilder_ == null) { - result.profileStatus_ = profileStatus_; - } else { - result.profileStatus_ = profileStatusBuilder_.build(); - } - result.state_ = state_; - if (sensitivityScoreBuilder_ == null) { - result.sensitivityScore_ = sensitivityScore_; - } else { - result.sensitivityScore_ = sensitivityScoreBuilder_.build(); - } - if (dataRiskLevelBuilder_ == null) { - result.dataRiskLevel_ = dataRiskLevel_; - } else { - result.dataRiskLevel_ = dataRiskLevelBuilder_.build(); - } - if (predictedInfoTypesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - predictedInfoTypes_ = java.util.Collections.unmodifiableList(predictedInfoTypes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.predictedInfoTypes_ = predictedInfoTypes_; - } else { - result.predictedInfoTypes_ = predictedInfoTypesBuilder_.build(); - } - if (otherInfoTypesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - otherInfoTypes_ = java.util.Collections.unmodifiableList(otherInfoTypes_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.otherInfoTypes_ = otherInfoTypes_; - } else { - result.otherInfoTypes_ = otherInfoTypesBuilder_.build(); - } - if (configSnapshotBuilder_ == null) { - result.configSnapshot_ = configSnapshot_; - } else { - result.configSnapshot_ = configSnapshotBuilder_.build(); - } - if (lastModifiedTimeBuilder_ == null) { - result.lastModifiedTime_ = lastModifiedTime_; - } else { - result.lastModifiedTime_ = lastModifiedTimeBuilder_.build(); - } - if (expirationTimeBuilder_ == null) { - result.expirationTime_ = expirationTime_; - } else { - result.expirationTime_ = expirationTimeBuilder_.build(); - } - result.scannedColumnCount_ = scannedColumnCount_; - result.failedColumnCount_ = failedColumnCount_; - result.tableSizeBytes_ = tableSizeBytes_; - result.rowCount_ = rowCount_; - result.encryptionStatus_ = encryptionStatus_; - result.resourceVisibility_ = resourceVisibility_; - if (profileLastGeneratedBuilder_ == null) { - result.profileLastGenerated_ = profileLastGenerated_; - } else { - result.profileLastGenerated_ = profileLastGeneratedBuilder_.build(); - } - result.resourceLabels_ = internalGetResourceLabels(); - result.resourceLabels_.makeImmutable(); - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TableDataProfile) { - return mergeFrom((com.google.privacy.dlp.v2.TableDataProfile)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TableDataProfile other) { - if (other == com.google.privacy.dlp.v2.TableDataProfile.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getProjectDataProfile().isEmpty()) { - projectDataProfile_ = other.projectDataProfile_; - onChanged(); - } - if (!other.getDatasetProjectId().isEmpty()) { - datasetProjectId_ = other.datasetProjectId_; - onChanged(); - } - if (!other.getDatasetLocation().isEmpty()) { - datasetLocation_ = other.datasetLocation_; - onChanged(); - } - if (!other.getDatasetId().isEmpty()) { - datasetId_ = other.datasetId_; - onChanged(); - } - if (!other.getTableId().isEmpty()) { - tableId_ = other.tableId_; - onChanged(); - } - if (!other.getFullResource().isEmpty()) { - fullResource_ = other.fullResource_; - onChanged(); - } - if (other.hasProfileStatus()) { - mergeProfileStatus(other.getProfileStatus()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (other.hasSensitivityScore()) { - mergeSensitivityScore(other.getSensitivityScore()); - } - if (other.hasDataRiskLevel()) { - mergeDataRiskLevel(other.getDataRiskLevel()); - } - if (predictedInfoTypesBuilder_ == null) { - if (!other.predictedInfoTypes_.isEmpty()) { - if (predictedInfoTypes_.isEmpty()) { - predictedInfoTypes_ = other.predictedInfoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePredictedInfoTypesIsMutable(); - predictedInfoTypes_.addAll(other.predictedInfoTypes_); - } - onChanged(); - } - } else { - if (!other.predictedInfoTypes_.isEmpty()) { - if (predictedInfoTypesBuilder_.isEmpty()) { - predictedInfoTypesBuilder_.dispose(); - predictedInfoTypesBuilder_ = null; - predictedInfoTypes_ = other.predictedInfoTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - predictedInfoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPredictedInfoTypesFieldBuilder() : null; - } else { - predictedInfoTypesBuilder_.addAllMessages(other.predictedInfoTypes_); - } - } - } - if (otherInfoTypesBuilder_ == null) { - if (!other.otherInfoTypes_.isEmpty()) { - if (otherInfoTypes_.isEmpty()) { - otherInfoTypes_ = other.otherInfoTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureOtherInfoTypesIsMutable(); - otherInfoTypes_.addAll(other.otherInfoTypes_); - } - onChanged(); - } - } else { - if (!other.otherInfoTypes_.isEmpty()) { - if (otherInfoTypesBuilder_.isEmpty()) { - otherInfoTypesBuilder_.dispose(); - otherInfoTypesBuilder_ = null; - otherInfoTypes_ = other.otherInfoTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - otherInfoTypesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOtherInfoTypesFieldBuilder() : null; - } else { - otherInfoTypesBuilder_.addAllMessages(other.otherInfoTypes_); - } - } - } - if (other.hasConfigSnapshot()) { - mergeConfigSnapshot(other.getConfigSnapshot()); - } - if (other.hasLastModifiedTime()) { - mergeLastModifiedTime(other.getLastModifiedTime()); - } - if (other.hasExpirationTime()) { - mergeExpirationTime(other.getExpirationTime()); - } - if (other.getScannedColumnCount() != 0L) { - setScannedColumnCount(other.getScannedColumnCount()); - } - if (other.getFailedColumnCount() != 0L) { - setFailedColumnCount(other.getFailedColumnCount()); - } - if (other.getTableSizeBytes() != 0L) { - setTableSizeBytes(other.getTableSizeBytes()); - } - if (other.getRowCount() != 0L) { - setRowCount(other.getRowCount()); - } - if (other.encryptionStatus_ != 0) { - setEncryptionStatusValue(other.getEncryptionStatusValue()); - } - if (other.resourceVisibility_ != 0) { - setResourceVisibilityValue(other.getResourceVisibilityValue()); - } - if (other.hasProfileLastGenerated()) { - mergeProfileLastGenerated(other.getProfileLastGenerated()); - } - internalGetMutableResourceLabels().mergeFrom( - other.internalGetResourceLabels()); - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TableDataProfile parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TableDataProfile) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The name of the profile.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the profile.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the profile.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The name of the profile.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The name of the profile.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object projectDataProfile_ = ""; - /** - *
-     * The resource name to the project data profile for this table.
-     * 
- * - * string project_data_profile = 2; - * @return The projectDataProfile. - */ - public java.lang.String getProjectDataProfile() { - java.lang.Object ref = projectDataProfile_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - projectDataProfile_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name to the project data profile for this table.
-     * 
- * - * string project_data_profile = 2; - * @return The bytes for projectDataProfile. - */ - public com.google.protobuf.ByteString - getProjectDataProfileBytes() { - java.lang.Object ref = projectDataProfile_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - projectDataProfile_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name to the project data profile for this table.
-     * 
- * - * string project_data_profile = 2; - * @param value The projectDataProfile to set. - * @return This builder for chaining. - */ - public Builder setProjectDataProfile( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - projectDataProfile_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name to the project data profile for this table.
-     * 
- * - * string project_data_profile = 2; - * @return This builder for chaining. - */ - public Builder clearProjectDataProfile() { - - projectDataProfile_ = getDefaultInstance().getProjectDataProfile(); - onChanged(); - return this; - } - /** - *
-     * The resource name to the project data profile for this table.
-     * 
- * - * string project_data_profile = 2; - * @param value The bytes for projectDataProfile to set. - * @return This builder for chaining. - */ - public Builder setProjectDataProfileBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - projectDataProfile_ = value; - onChanged(); - return this; - } - - private java.lang.Object datasetProjectId_ = ""; - /** - *
-     * The GCP project ID that owns the BigQuery dataset.
-     * 
- * - * string dataset_project_id = 24; - * @return The datasetProjectId. - */ - public java.lang.String getDatasetProjectId() { - java.lang.Object ref = datasetProjectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetProjectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The GCP project ID that owns the BigQuery dataset.
-     * 
- * - * string dataset_project_id = 24; - * @return The bytes for datasetProjectId. - */ - public com.google.protobuf.ByteString - getDatasetProjectIdBytes() { - java.lang.Object ref = datasetProjectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - datasetProjectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The GCP project ID that owns the BigQuery dataset.
-     * 
- * - * string dataset_project_id = 24; - * @param value The datasetProjectId to set. - * @return This builder for chaining. - */ - public Builder setDatasetProjectId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - datasetProjectId_ = value; - onChanged(); - return this; - } - /** - *
-     * The GCP project ID that owns the BigQuery dataset.
-     * 
- * - * string dataset_project_id = 24; - * @return This builder for chaining. - */ - public Builder clearDatasetProjectId() { - - datasetProjectId_ = getDefaultInstance().getDatasetProjectId(); - onChanged(); - return this; - } - /** - *
-     * The GCP project ID that owns the BigQuery dataset.
-     * 
- * - * string dataset_project_id = 24; - * @param value The bytes for datasetProjectId to set. - * @return This builder for chaining. - */ - public Builder setDatasetProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - datasetProjectId_ = value; - onChanged(); - return this; - } - - private java.lang.Object datasetLocation_ = ""; - /** - *
-     * The BigQuery location where the dataset's data is stored.
-     * See https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string dataset_location = 29; - * @return The datasetLocation. - */ - public java.lang.String getDatasetLocation() { - java.lang.Object ref = datasetLocation_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetLocation_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The BigQuery location where the dataset's data is stored.
-     * See https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string dataset_location = 29; - * @return The bytes for datasetLocation. - */ - public com.google.protobuf.ByteString - getDatasetLocationBytes() { - java.lang.Object ref = datasetLocation_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - datasetLocation_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The BigQuery location where the dataset's data is stored.
-     * See https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string dataset_location = 29; - * @param value The datasetLocation to set. - * @return This builder for chaining. - */ - public Builder setDatasetLocation( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - datasetLocation_ = value; - onChanged(); - return this; - } - /** - *
-     * The BigQuery location where the dataset's data is stored.
-     * See https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string dataset_location = 29; - * @return This builder for chaining. - */ - public Builder clearDatasetLocation() { - - datasetLocation_ = getDefaultInstance().getDatasetLocation(); - onChanged(); - return this; - } - /** - *
-     * The BigQuery location where the dataset's data is stored.
-     * See https://cloud.google.com/bigquery/docs/locations for supported
-     * locations.
-     * 
- * - * string dataset_location = 29; - * @param value The bytes for datasetLocation to set. - * @return This builder for chaining. - */ - public Builder setDatasetLocationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - datasetLocation_ = value; - onChanged(); - return this; - } - - private java.lang.Object datasetId_ = ""; - /** - *
-     * The BigQuery dataset ID.
-     * 
- * - * string dataset_id = 25; - * @return The datasetId. - */ - public java.lang.String getDatasetId() { - java.lang.Object ref = datasetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The BigQuery dataset ID.
-     * 
- * - * string dataset_id = 25; - * @return The bytes for datasetId. - */ - public com.google.protobuf.ByteString - getDatasetIdBytes() { - java.lang.Object ref = datasetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - datasetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The BigQuery dataset ID.
-     * 
- * - * string dataset_id = 25; - * @param value The datasetId to set. - * @return This builder for chaining. - */ - public Builder setDatasetId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - datasetId_ = value; - onChanged(); - return this; - } - /** - *
-     * The BigQuery dataset ID.
-     * 
- * - * string dataset_id = 25; - * @return This builder for chaining. - */ - public Builder clearDatasetId() { - - datasetId_ = getDefaultInstance().getDatasetId(); - onChanged(); - return this; - } - /** - *
-     * The BigQuery dataset ID.
-     * 
- * - * string dataset_id = 25; - * @param value The bytes for datasetId to set. - * @return This builder for chaining. - */ - public Builder setDatasetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - datasetId_ = value; - onChanged(); - return this; - } - - private java.lang.Object tableId_ = ""; - /** - *
-     * The BigQuery table ID.
-     * 
- * - * string table_id = 26; - * @return The tableId. - */ - public java.lang.String getTableId() { - java.lang.Object ref = tableId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tableId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The BigQuery table ID.
-     * 
- * - * string table_id = 26; - * @return The bytes for tableId. - */ - public com.google.protobuf.ByteString - getTableIdBytes() { - java.lang.Object ref = tableId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tableId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The BigQuery table ID.
-     * 
- * - * string table_id = 26; - * @param value The tableId to set. - * @return This builder for chaining. - */ - public Builder setTableId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - tableId_ = value; - onChanged(); - return this; - } - /** - *
-     * The BigQuery table ID.
-     * 
- * - * string table_id = 26; - * @return This builder for chaining. - */ - public Builder clearTableId() { - - tableId_ = getDefaultInstance().getTableId(); - onChanged(); - return this; - } - /** - *
-     * The BigQuery table ID.
-     * 
- * - * string table_id = 26; - * @param value The bytes for tableId to set. - * @return This builder for chaining. - */ - public Builder setTableIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - tableId_ = value; - onChanged(); - return this; - } - - private java.lang.Object fullResource_ = ""; - /** - *
-     * The resource name of the table.
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string full_resource = 3; - * @return The fullResource. - */ - public java.lang.String getFullResource() { - java.lang.Object ref = fullResource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the table.
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string full_resource = 3; - * @return The bytes for fullResource. - */ - public com.google.protobuf.ByteString - getFullResourceBytes() { - java.lang.Object ref = fullResource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the table.
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string full_resource = 3; - * @param value The fullResource to set. - * @return This builder for chaining. - */ - public Builder setFullResource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fullResource_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the table.
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string full_resource = 3; - * @return This builder for chaining. - */ - public Builder clearFullResource() { - - fullResource_ = getDefaultInstance().getFullResource(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the table.
-     * https://cloud.google.com/apis/design/resource_names#full_resource_name
-     * 
- * - * string full_resource = 3; - * @param value The bytes for fullResource to set. - * @return This builder for chaining. - */ - public Builder setFullResourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fullResource_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.ProfileStatus profileStatus_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ProfileStatus, com.google.privacy.dlp.v2.ProfileStatus.Builder, com.google.privacy.dlp.v2.ProfileStatusOrBuilder> profileStatusBuilder_; - /** - *
-     * Success or error status from the most recent profile generation attempt.
-     * May be empty if the profile is still being generated.
-     * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - * @return Whether the profileStatus field is set. - */ - public boolean hasProfileStatus() { - return profileStatusBuilder_ != null || profileStatus_ != null; - } - /** - *
-     * Success or error status from the most recent profile generation attempt.
-     * May be empty if the profile is still being generated.
-     * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - * @return The profileStatus. - */ - public com.google.privacy.dlp.v2.ProfileStatus getProfileStatus() { - if (profileStatusBuilder_ == null) { - return profileStatus_ == null ? com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance() : profileStatus_; - } else { - return profileStatusBuilder_.getMessage(); - } - } - /** - *
-     * Success or error status from the most recent profile generation attempt.
-     * May be empty if the profile is still being generated.
-     * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - */ - public Builder setProfileStatus(com.google.privacy.dlp.v2.ProfileStatus value) { - if (profileStatusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - profileStatus_ = value; - onChanged(); - } else { - profileStatusBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Success or error status from the most recent profile generation attempt.
-     * May be empty if the profile is still being generated.
-     * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - */ - public Builder setProfileStatus( - com.google.privacy.dlp.v2.ProfileStatus.Builder builderForValue) { - if (profileStatusBuilder_ == null) { - profileStatus_ = builderForValue.build(); - onChanged(); - } else { - profileStatusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Success or error status from the most recent profile generation attempt.
-     * May be empty if the profile is still being generated.
-     * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - */ - public Builder mergeProfileStatus(com.google.privacy.dlp.v2.ProfileStatus value) { - if (profileStatusBuilder_ == null) { - if (profileStatus_ != null) { - profileStatus_ = - com.google.privacy.dlp.v2.ProfileStatus.newBuilder(profileStatus_).mergeFrom(value).buildPartial(); - } else { - profileStatus_ = value; - } - onChanged(); - } else { - profileStatusBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Success or error status from the most recent profile generation attempt.
-     * May be empty if the profile is still being generated.
-     * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - */ - public Builder clearProfileStatus() { - if (profileStatusBuilder_ == null) { - profileStatus_ = null; - onChanged(); - } else { - profileStatus_ = null; - profileStatusBuilder_ = null; - } - - return this; - } - /** - *
-     * Success or error status from the most recent profile generation attempt.
-     * May be empty if the profile is still being generated.
-     * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - */ - public com.google.privacy.dlp.v2.ProfileStatus.Builder getProfileStatusBuilder() { - - onChanged(); - return getProfileStatusFieldBuilder().getBuilder(); - } - /** - *
-     * Success or error status from the most recent profile generation attempt.
-     * May be empty if the profile is still being generated.
-     * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - */ - public com.google.privacy.dlp.v2.ProfileStatusOrBuilder getProfileStatusOrBuilder() { - if (profileStatusBuilder_ != null) { - return profileStatusBuilder_.getMessageOrBuilder(); - } else { - return profileStatus_ == null ? - com.google.privacy.dlp.v2.ProfileStatus.getDefaultInstance() : profileStatus_; - } - } - /** - *
-     * Success or error status from the most recent profile generation attempt.
-     * May be empty if the profile is still being generated.
-     * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ProfileStatus, com.google.privacy.dlp.v2.ProfileStatus.Builder, com.google.privacy.dlp.v2.ProfileStatusOrBuilder> - getProfileStatusFieldBuilder() { - if (profileStatusBuilder_ == null) { - profileStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.ProfileStatus, com.google.privacy.dlp.v2.ProfileStatus.Builder, com.google.privacy.dlp.v2.ProfileStatusOrBuilder>( - getProfileStatus(), - getParentForChildren(), - isClean()); - profileStatus_ = null; - } - return profileStatusBuilder_; - } - - private int state_ = 0; - /** - *
-     * State of a profile.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile.State state = 22; - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override public int getStateValue() { - return state_; - } - /** - *
-     * State of a profile.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile.State state = 22; - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * State of a profile.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile.State state = 22; - * @return The state. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TableDataProfile.State getState() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TableDataProfile.State result = com.google.privacy.dlp.v2.TableDataProfile.State.valueOf(state_); - return result == null ? com.google.privacy.dlp.v2.TableDataProfile.State.UNRECOGNIZED : result; - } - /** - *
-     * State of a profile.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile.State state = 22; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.privacy.dlp.v2.TableDataProfile.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * State of a profile.
-     * 
- * - * .google.privacy.dlp.v2.TableDataProfile.State state = 22; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.SensitivityScore sensitivityScore_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.SensitivityScore, com.google.privacy.dlp.v2.SensitivityScore.Builder, com.google.privacy.dlp.v2.SensitivityScoreOrBuilder> sensitivityScoreBuilder_; - /** - *
-     * The sensitivity score of this table.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - * @return Whether the sensitivityScore field is set. - */ - public boolean hasSensitivityScore() { - return sensitivityScoreBuilder_ != null || sensitivityScore_ != null; - } - /** - *
-     * The sensitivity score of this table.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - * @return The sensitivityScore. - */ - public com.google.privacy.dlp.v2.SensitivityScore getSensitivityScore() { - if (sensitivityScoreBuilder_ == null) { - return sensitivityScore_ == null ? com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance() : sensitivityScore_; - } else { - return sensitivityScoreBuilder_.getMessage(); - } - } - /** - *
-     * The sensitivity score of this table.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - */ - public Builder setSensitivityScore(com.google.privacy.dlp.v2.SensitivityScore value) { - if (sensitivityScoreBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sensitivityScore_ = value; - onChanged(); - } else { - sensitivityScoreBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The sensitivity score of this table.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - */ - public Builder setSensitivityScore( - com.google.privacy.dlp.v2.SensitivityScore.Builder builderForValue) { - if (sensitivityScoreBuilder_ == null) { - sensitivityScore_ = builderForValue.build(); - onChanged(); - } else { - sensitivityScoreBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The sensitivity score of this table.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - */ - public Builder mergeSensitivityScore(com.google.privacy.dlp.v2.SensitivityScore value) { - if (sensitivityScoreBuilder_ == null) { - if (sensitivityScore_ != null) { - sensitivityScore_ = - com.google.privacy.dlp.v2.SensitivityScore.newBuilder(sensitivityScore_).mergeFrom(value).buildPartial(); - } else { - sensitivityScore_ = value; - } - onChanged(); - } else { - sensitivityScoreBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The sensitivity score of this table.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - */ - public Builder clearSensitivityScore() { - if (sensitivityScoreBuilder_ == null) { - sensitivityScore_ = null; - onChanged(); - } else { - sensitivityScore_ = null; - sensitivityScoreBuilder_ = null; - } - - return this; - } - /** - *
-     * The sensitivity score of this table.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - */ - public com.google.privacy.dlp.v2.SensitivityScore.Builder getSensitivityScoreBuilder() { - - onChanged(); - return getSensitivityScoreFieldBuilder().getBuilder(); - } - /** - *
-     * The sensitivity score of this table.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - */ - public com.google.privacy.dlp.v2.SensitivityScoreOrBuilder getSensitivityScoreOrBuilder() { - if (sensitivityScoreBuilder_ != null) { - return sensitivityScoreBuilder_.getMessageOrBuilder(); - } else { - return sensitivityScore_ == null ? - com.google.privacy.dlp.v2.SensitivityScore.getDefaultInstance() : sensitivityScore_; - } - } - /** - *
-     * The sensitivity score of this table.
-     * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.SensitivityScore, com.google.privacy.dlp.v2.SensitivityScore.Builder, com.google.privacy.dlp.v2.SensitivityScoreOrBuilder> - getSensitivityScoreFieldBuilder() { - if (sensitivityScoreBuilder_ == null) { - sensitivityScoreBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.SensitivityScore, com.google.privacy.dlp.v2.SensitivityScore.Builder, com.google.privacy.dlp.v2.SensitivityScoreOrBuilder>( - getSensitivityScore(), - getParentForChildren(), - isClean()); - sensitivityScore_ = null; - } - return sensitivityScoreBuilder_; - } - - private com.google.privacy.dlp.v2.DataRiskLevel dataRiskLevel_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataRiskLevel, com.google.privacy.dlp.v2.DataRiskLevel.Builder, com.google.privacy.dlp.v2.DataRiskLevelOrBuilder> dataRiskLevelBuilder_; - /** - *
-     * The data risk level of this table.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - * @return Whether the dataRiskLevel field is set. - */ - public boolean hasDataRiskLevel() { - return dataRiskLevelBuilder_ != null || dataRiskLevel_ != null; - } - /** - *
-     * The data risk level of this table.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - * @return The dataRiskLevel. - */ - public com.google.privacy.dlp.v2.DataRiskLevel getDataRiskLevel() { - if (dataRiskLevelBuilder_ == null) { - return dataRiskLevel_ == null ? com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance() : dataRiskLevel_; - } else { - return dataRiskLevelBuilder_.getMessage(); - } - } - /** - *
-     * The data risk level of this table.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - */ - public Builder setDataRiskLevel(com.google.privacy.dlp.v2.DataRiskLevel value) { - if (dataRiskLevelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataRiskLevel_ = value; - onChanged(); - } else { - dataRiskLevelBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The data risk level of this table.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - */ - public Builder setDataRiskLevel( - com.google.privacy.dlp.v2.DataRiskLevel.Builder builderForValue) { - if (dataRiskLevelBuilder_ == null) { - dataRiskLevel_ = builderForValue.build(); - onChanged(); - } else { - dataRiskLevelBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The data risk level of this table.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - */ - public Builder mergeDataRiskLevel(com.google.privacy.dlp.v2.DataRiskLevel value) { - if (dataRiskLevelBuilder_ == null) { - if (dataRiskLevel_ != null) { - dataRiskLevel_ = - com.google.privacy.dlp.v2.DataRiskLevel.newBuilder(dataRiskLevel_).mergeFrom(value).buildPartial(); - } else { - dataRiskLevel_ = value; - } - onChanged(); - } else { - dataRiskLevelBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The data risk level of this table.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - */ - public Builder clearDataRiskLevel() { - if (dataRiskLevelBuilder_ == null) { - dataRiskLevel_ = null; - onChanged(); - } else { - dataRiskLevel_ = null; - dataRiskLevelBuilder_ = null; - } - - return this; - } - /** - *
-     * The data risk level of this table.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - */ - public com.google.privacy.dlp.v2.DataRiskLevel.Builder getDataRiskLevelBuilder() { - - onChanged(); - return getDataRiskLevelFieldBuilder().getBuilder(); - } - /** - *
-     * The data risk level of this table.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - */ - public com.google.privacy.dlp.v2.DataRiskLevelOrBuilder getDataRiskLevelOrBuilder() { - if (dataRiskLevelBuilder_ != null) { - return dataRiskLevelBuilder_.getMessageOrBuilder(); - } else { - return dataRiskLevel_ == null ? - com.google.privacy.dlp.v2.DataRiskLevel.getDefaultInstance() : dataRiskLevel_; - } - } - /** - *
-     * The data risk level of this table.
-     * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataRiskLevel, com.google.privacy.dlp.v2.DataRiskLevel.Builder, com.google.privacy.dlp.v2.DataRiskLevelOrBuilder> - getDataRiskLevelFieldBuilder() { - if (dataRiskLevelBuilder_ == null) { - dataRiskLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataRiskLevel, com.google.privacy.dlp.v2.DataRiskLevel.Builder, com.google.privacy.dlp.v2.DataRiskLevelOrBuilder>( - getDataRiskLevel(), - getParentForChildren(), - isClean()); - dataRiskLevel_ = null; - } - return dataRiskLevelBuilder_; - } - - private java.util.List predictedInfoTypes_ = - java.util.Collections.emptyList(); - private void ensurePredictedInfoTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - predictedInfoTypes_ = new java.util.ArrayList(predictedInfoTypes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeSummary, com.google.privacy.dlp.v2.InfoTypeSummary.Builder, com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder> predictedInfoTypesBuilder_; - - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public java.util.List getPredictedInfoTypesList() { - if (predictedInfoTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(predictedInfoTypes_); - } else { - return predictedInfoTypesBuilder_.getMessageList(); - } - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public int getPredictedInfoTypesCount() { - if (predictedInfoTypesBuilder_ == null) { - return predictedInfoTypes_.size(); - } else { - return predictedInfoTypesBuilder_.getCount(); - } - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public com.google.privacy.dlp.v2.InfoTypeSummary getPredictedInfoTypes(int index) { - if (predictedInfoTypesBuilder_ == null) { - return predictedInfoTypes_.get(index); - } else { - return predictedInfoTypesBuilder_.getMessage(index); - } - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public Builder setPredictedInfoTypes( - int index, com.google.privacy.dlp.v2.InfoTypeSummary value) { - if (predictedInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePredictedInfoTypesIsMutable(); - predictedInfoTypes_.set(index, value); - onChanged(); - } else { - predictedInfoTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public Builder setPredictedInfoTypes( - int index, com.google.privacy.dlp.v2.InfoTypeSummary.Builder builderForValue) { - if (predictedInfoTypesBuilder_ == null) { - ensurePredictedInfoTypesIsMutable(); - predictedInfoTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - predictedInfoTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public Builder addPredictedInfoTypes(com.google.privacy.dlp.v2.InfoTypeSummary value) { - if (predictedInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePredictedInfoTypesIsMutable(); - predictedInfoTypes_.add(value); - onChanged(); - } else { - predictedInfoTypesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public Builder addPredictedInfoTypes( - int index, com.google.privacy.dlp.v2.InfoTypeSummary value) { - if (predictedInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePredictedInfoTypesIsMutable(); - predictedInfoTypes_.add(index, value); - onChanged(); - } else { - predictedInfoTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public Builder addPredictedInfoTypes( - com.google.privacy.dlp.v2.InfoTypeSummary.Builder builderForValue) { - if (predictedInfoTypesBuilder_ == null) { - ensurePredictedInfoTypesIsMutable(); - predictedInfoTypes_.add(builderForValue.build()); - onChanged(); - } else { - predictedInfoTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public Builder addPredictedInfoTypes( - int index, com.google.privacy.dlp.v2.InfoTypeSummary.Builder builderForValue) { - if (predictedInfoTypesBuilder_ == null) { - ensurePredictedInfoTypesIsMutable(); - predictedInfoTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - predictedInfoTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public Builder addAllPredictedInfoTypes( - java.lang.Iterable values) { - if (predictedInfoTypesBuilder_ == null) { - ensurePredictedInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, predictedInfoTypes_); - onChanged(); - } else { - predictedInfoTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public Builder clearPredictedInfoTypes() { - if (predictedInfoTypesBuilder_ == null) { - predictedInfoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - predictedInfoTypesBuilder_.clear(); - } - return this; - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public Builder removePredictedInfoTypes(int index) { - if (predictedInfoTypesBuilder_ == null) { - ensurePredictedInfoTypesIsMutable(); - predictedInfoTypes_.remove(index); - onChanged(); - } else { - predictedInfoTypesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public com.google.privacy.dlp.v2.InfoTypeSummary.Builder getPredictedInfoTypesBuilder( - int index) { - return getPredictedInfoTypesFieldBuilder().getBuilder(index); - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder getPredictedInfoTypesOrBuilder( - int index) { - if (predictedInfoTypesBuilder_ == null) { - return predictedInfoTypes_.get(index); } else { - return predictedInfoTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public java.util.List - getPredictedInfoTypesOrBuilderList() { - if (predictedInfoTypesBuilder_ != null) { - return predictedInfoTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(predictedInfoTypes_); - } - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public com.google.privacy.dlp.v2.InfoTypeSummary.Builder addPredictedInfoTypesBuilder() { - return getPredictedInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.InfoTypeSummary.getDefaultInstance()); - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public com.google.privacy.dlp.v2.InfoTypeSummary.Builder addPredictedInfoTypesBuilder( - int index) { - return getPredictedInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.InfoTypeSummary.getDefaultInstance()); - } - /** - *
-     * The infoTypes predicted from this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - public java.util.List - getPredictedInfoTypesBuilderList() { - return getPredictedInfoTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeSummary, com.google.privacy.dlp.v2.InfoTypeSummary.Builder, com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder> - getPredictedInfoTypesFieldBuilder() { - if (predictedInfoTypesBuilder_ == null) { - predictedInfoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.InfoTypeSummary, com.google.privacy.dlp.v2.InfoTypeSummary.Builder, com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder>( - predictedInfoTypes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - predictedInfoTypes_ = null; - } - return predictedInfoTypesBuilder_; - } - - private java.util.List otherInfoTypes_ = - java.util.Collections.emptyList(); - private void ensureOtherInfoTypesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - otherInfoTypes_ = new java.util.ArrayList(otherInfoTypes_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.OtherInfoTypeSummary, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder, com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder> otherInfoTypesBuilder_; - - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public java.util.List getOtherInfoTypesList() { - if (otherInfoTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(otherInfoTypes_); - } else { - return otherInfoTypesBuilder_.getMessageList(); - } - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public int getOtherInfoTypesCount() { - if (otherInfoTypesBuilder_ == null) { - return otherInfoTypes_.size(); - } else { - return otherInfoTypesBuilder_.getCount(); - } - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public com.google.privacy.dlp.v2.OtherInfoTypeSummary getOtherInfoTypes(int index) { - if (otherInfoTypesBuilder_ == null) { - return otherInfoTypes_.get(index); - } else { - return otherInfoTypesBuilder_.getMessage(index); - } - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public Builder setOtherInfoTypes( - int index, com.google.privacy.dlp.v2.OtherInfoTypeSummary value) { - if (otherInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOtherInfoTypesIsMutable(); - otherInfoTypes_.set(index, value); - onChanged(); - } else { - otherInfoTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public Builder setOtherInfoTypes( - int index, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder builderForValue) { - if (otherInfoTypesBuilder_ == null) { - ensureOtherInfoTypesIsMutable(); - otherInfoTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - otherInfoTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public Builder addOtherInfoTypes(com.google.privacy.dlp.v2.OtherInfoTypeSummary value) { - if (otherInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOtherInfoTypesIsMutable(); - otherInfoTypes_.add(value); - onChanged(); - } else { - otherInfoTypesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public Builder addOtherInfoTypes( - int index, com.google.privacy.dlp.v2.OtherInfoTypeSummary value) { - if (otherInfoTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOtherInfoTypesIsMutable(); - otherInfoTypes_.add(index, value); - onChanged(); - } else { - otherInfoTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public Builder addOtherInfoTypes( - com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder builderForValue) { - if (otherInfoTypesBuilder_ == null) { - ensureOtherInfoTypesIsMutable(); - otherInfoTypes_.add(builderForValue.build()); - onChanged(); - } else { - otherInfoTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public Builder addOtherInfoTypes( - int index, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder builderForValue) { - if (otherInfoTypesBuilder_ == null) { - ensureOtherInfoTypesIsMutable(); - otherInfoTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - otherInfoTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public Builder addAllOtherInfoTypes( - java.lang.Iterable values) { - if (otherInfoTypesBuilder_ == null) { - ensureOtherInfoTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, otherInfoTypes_); - onChanged(); - } else { - otherInfoTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public Builder clearOtherInfoTypes() { - if (otherInfoTypesBuilder_ == null) { - otherInfoTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - otherInfoTypesBuilder_.clear(); - } - return this; - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public Builder removeOtherInfoTypes(int index) { - if (otherInfoTypesBuilder_ == null) { - ensureOtherInfoTypesIsMutable(); - otherInfoTypes_.remove(index); - onChanged(); - } else { - otherInfoTypesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder getOtherInfoTypesBuilder( - int index) { - return getOtherInfoTypesFieldBuilder().getBuilder(index); - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder getOtherInfoTypesOrBuilder( - int index) { - if (otherInfoTypesBuilder_ == null) { - return otherInfoTypes_.get(index); } else { - return otherInfoTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public java.util.List - getOtherInfoTypesOrBuilderList() { - if (otherInfoTypesBuilder_ != null) { - return otherInfoTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(otherInfoTypes_); - } - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder addOtherInfoTypesBuilder() { - return getOtherInfoTypesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.OtherInfoTypeSummary.getDefaultInstance()); - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder addOtherInfoTypesBuilder( - int index) { - return getOtherInfoTypesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.OtherInfoTypeSummary.getDefaultInstance()); - } - /** - *
-     * Other infoTypes found in this table's data.
-     * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - public java.util.List - getOtherInfoTypesBuilderList() { - return getOtherInfoTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.OtherInfoTypeSummary, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder, com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder> - getOtherInfoTypesFieldBuilder() { - if (otherInfoTypesBuilder_ == null) { - otherInfoTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.OtherInfoTypeSummary, com.google.privacy.dlp.v2.OtherInfoTypeSummary.Builder, com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder>( - otherInfoTypes_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - otherInfoTypes_ = null; - } - return otherInfoTypesBuilder_; - } - - private com.google.privacy.dlp.v2.DataProfileConfigSnapshot configSnapshot_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileConfigSnapshot, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder, com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder> configSnapshotBuilder_; - /** - *
-     * The snapshot of the configurations used to generate the profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - * @return Whether the configSnapshot field is set. - */ - public boolean hasConfigSnapshot() { - return configSnapshotBuilder_ != null || configSnapshot_ != null; - } - /** - *
-     * The snapshot of the configurations used to generate the profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - * @return The configSnapshot. - */ - public com.google.privacy.dlp.v2.DataProfileConfigSnapshot getConfigSnapshot() { - if (configSnapshotBuilder_ == null) { - return configSnapshot_ == null ? com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance() : configSnapshot_; - } else { - return configSnapshotBuilder_.getMessage(); - } - } - /** - *
-     * The snapshot of the configurations used to generate the profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - */ - public Builder setConfigSnapshot(com.google.privacy.dlp.v2.DataProfileConfigSnapshot value) { - if (configSnapshotBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - configSnapshot_ = value; - onChanged(); - } else { - configSnapshotBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The snapshot of the configurations used to generate the profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - */ - public Builder setConfigSnapshot( - com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder builderForValue) { - if (configSnapshotBuilder_ == null) { - configSnapshot_ = builderForValue.build(); - onChanged(); - } else { - configSnapshotBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The snapshot of the configurations used to generate the profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - */ - public Builder mergeConfigSnapshot(com.google.privacy.dlp.v2.DataProfileConfigSnapshot value) { - if (configSnapshotBuilder_ == null) { - if (configSnapshot_ != null) { - configSnapshot_ = - com.google.privacy.dlp.v2.DataProfileConfigSnapshot.newBuilder(configSnapshot_).mergeFrom(value).buildPartial(); - } else { - configSnapshot_ = value; - } - onChanged(); - } else { - configSnapshotBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The snapshot of the configurations used to generate the profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - */ - public Builder clearConfigSnapshot() { - if (configSnapshotBuilder_ == null) { - configSnapshot_ = null; - onChanged(); - } else { - configSnapshot_ = null; - configSnapshotBuilder_ = null; - } - - return this; - } - /** - *
-     * The snapshot of the configurations used to generate the profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - */ - public com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder getConfigSnapshotBuilder() { - - onChanged(); - return getConfigSnapshotFieldBuilder().getBuilder(); - } - /** - *
-     * The snapshot of the configurations used to generate the profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - */ - public com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder getConfigSnapshotOrBuilder() { - if (configSnapshotBuilder_ != null) { - return configSnapshotBuilder_.getMessageOrBuilder(); - } else { - return configSnapshot_ == null ? - com.google.privacy.dlp.v2.DataProfileConfigSnapshot.getDefaultInstance() : configSnapshot_; - } - } - /** - *
-     * The snapshot of the configurations used to generate the profile.
-     * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileConfigSnapshot, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder, com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder> - getConfigSnapshotFieldBuilder() { - if (configSnapshotBuilder_ == null) { - configSnapshotBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DataProfileConfigSnapshot, com.google.privacy.dlp.v2.DataProfileConfigSnapshot.Builder, com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder>( - getConfigSnapshot(), - getParentForChildren(), - isClean()); - configSnapshot_ = null; - } - return configSnapshotBuilder_; - } - - private com.google.protobuf.Timestamp lastModifiedTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastModifiedTimeBuilder_; - /** - *
-     * The time when this table was last modified
-     * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - * @return Whether the lastModifiedTime field is set. - */ - public boolean hasLastModifiedTime() { - return lastModifiedTimeBuilder_ != null || lastModifiedTime_ != null; - } - /** - *
-     * The time when this table was last modified
-     * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - * @return The lastModifiedTime. - */ - public com.google.protobuf.Timestamp getLastModifiedTime() { - if (lastModifiedTimeBuilder_ == null) { - return lastModifiedTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastModifiedTime_; - } else { - return lastModifiedTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time when this table was last modified
-     * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - */ - public Builder setLastModifiedTime(com.google.protobuf.Timestamp value) { - if (lastModifiedTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastModifiedTime_ = value; - onChanged(); - } else { - lastModifiedTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time when this table was last modified
-     * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - */ - public Builder setLastModifiedTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastModifiedTimeBuilder_ == null) { - lastModifiedTime_ = builderForValue.build(); - onChanged(); - } else { - lastModifiedTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time when this table was last modified
-     * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - */ - public Builder mergeLastModifiedTime(com.google.protobuf.Timestamp value) { - if (lastModifiedTimeBuilder_ == null) { - if (lastModifiedTime_ != null) { - lastModifiedTime_ = - com.google.protobuf.Timestamp.newBuilder(lastModifiedTime_).mergeFrom(value).buildPartial(); - } else { - lastModifiedTime_ = value; - } - onChanged(); - } else { - lastModifiedTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time when this table was last modified
-     * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - */ - public Builder clearLastModifiedTime() { - if (lastModifiedTimeBuilder_ == null) { - lastModifiedTime_ = null; - onChanged(); - } else { - lastModifiedTime_ = null; - lastModifiedTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time when this table was last modified
-     * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - */ - public com.google.protobuf.Timestamp.Builder getLastModifiedTimeBuilder() { - - onChanged(); - return getLastModifiedTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time when this table was last modified
-     * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - */ - public com.google.protobuf.TimestampOrBuilder getLastModifiedTimeOrBuilder() { - if (lastModifiedTimeBuilder_ != null) { - return lastModifiedTimeBuilder_.getMessageOrBuilder(); - } else { - return lastModifiedTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : lastModifiedTime_; - } - } - /** - *
-     * The time when this table was last modified
-     * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getLastModifiedTimeFieldBuilder() { - if (lastModifiedTimeBuilder_ == null) { - lastModifiedTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getLastModifiedTime(), - getParentForChildren(), - isClean()); - lastModifiedTime_ = null; - } - return lastModifiedTimeBuilder_; - } - - private com.google.protobuf.Timestamp expirationTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expirationTimeBuilder_; - /** - *
-     * Optional. The time when this table expires.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - * @return Whether the expirationTime field is set. - */ - public boolean hasExpirationTime() { - return expirationTimeBuilder_ != null || expirationTime_ != null; - } - /** - *
-     * Optional. The time when this table expires.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - * @return The expirationTime. - */ - public com.google.protobuf.Timestamp getExpirationTime() { - if (expirationTimeBuilder_ == null) { - return expirationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } else { - return expirationTimeBuilder_.getMessage(); - } - } - /** - *
-     * Optional. The time when this table expires.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - */ - public Builder setExpirationTime(com.google.protobuf.Timestamp value) { - if (expirationTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - expirationTime_ = value; - onChanged(); - } else { - expirationTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. The time when this table expires.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - */ - public Builder setExpirationTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (expirationTimeBuilder_ == null) { - expirationTime_ = builderForValue.build(); - onChanged(); - } else { - expirationTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. The time when this table expires.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - */ - public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { - if (expirationTimeBuilder_ == null) { - if (expirationTime_ != null) { - expirationTime_ = - com.google.protobuf.Timestamp.newBuilder(expirationTime_).mergeFrom(value).buildPartial(); - } else { - expirationTime_ = value; - } - onChanged(); - } else { - expirationTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. The time when this table expires.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - */ - public Builder clearExpirationTime() { - if (expirationTimeBuilder_ == null) { - expirationTime_ = null; - onChanged(); - } else { - expirationTime_ = null; - expirationTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. The time when this table expires.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - */ - public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { - - onChanged(); - return getExpirationTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. The time when this table expires.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - */ - public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { - if (expirationTimeBuilder_ != null) { - return expirationTimeBuilder_.getMessageOrBuilder(); - } else { - return expirationTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : expirationTime_; - } - } - /** - *
-     * Optional. The time when this table expires.
-     * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getExpirationTimeFieldBuilder() { - if (expirationTimeBuilder_ == null) { - expirationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getExpirationTime(), - getParentForChildren(), - isClean()); - expirationTime_ = null; - } - return expirationTimeBuilder_; - } - - private long scannedColumnCount_ ; - /** - *
-     * The number of columns profiled in the table.
-     * 
- * - * int64 scanned_column_count = 10; - * @return The scannedColumnCount. - */ - @java.lang.Override - public long getScannedColumnCount() { - return scannedColumnCount_; - } - /** - *
-     * The number of columns profiled in the table.
-     * 
- * - * int64 scanned_column_count = 10; - * @param value The scannedColumnCount to set. - * @return This builder for chaining. - */ - public Builder setScannedColumnCount(long value) { - - scannedColumnCount_ = value; - onChanged(); - return this; - } - /** - *
-     * The number of columns profiled in the table.
-     * 
- * - * int64 scanned_column_count = 10; - * @return This builder for chaining. - */ - public Builder clearScannedColumnCount() { - - scannedColumnCount_ = 0L; - onChanged(); - return this; - } - - private long failedColumnCount_ ; - /** - *
-     * The number of columns skipped in the table because of an error.
-     * 
- * - * int64 failed_column_count = 11; - * @return The failedColumnCount. - */ - @java.lang.Override - public long getFailedColumnCount() { - return failedColumnCount_; - } - /** - *
-     * The number of columns skipped in the table because of an error.
-     * 
- * - * int64 failed_column_count = 11; - * @param value The failedColumnCount to set. - * @return This builder for chaining. - */ - public Builder setFailedColumnCount(long value) { - - failedColumnCount_ = value; - onChanged(); - return this; - } - /** - *
-     * The number of columns skipped in the table because of an error.
-     * 
- * - * int64 failed_column_count = 11; - * @return This builder for chaining. - */ - public Builder clearFailedColumnCount() { - - failedColumnCount_ = 0L; - onChanged(); - return this; - } - - private long tableSizeBytes_ ; - /** - *
-     * The size of the table when the profile was generated.
-     * 
- * - * int64 table_size_bytes = 12; - * @return The tableSizeBytes. - */ - @java.lang.Override - public long getTableSizeBytes() { - return tableSizeBytes_; - } - /** - *
-     * The size of the table when the profile was generated.
-     * 
- * - * int64 table_size_bytes = 12; - * @param value The tableSizeBytes to set. - * @return This builder for chaining. - */ - public Builder setTableSizeBytes(long value) { - - tableSizeBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * The size of the table when the profile was generated.
-     * 
- * - * int64 table_size_bytes = 12; - * @return This builder for chaining. - */ - public Builder clearTableSizeBytes() { - - tableSizeBytes_ = 0L; - onChanged(); - return this; - } - - private long rowCount_ ; - /** - *
-     * Number of rows in the table when the profile was generated.
-     * 
- * - * int64 row_count = 13; - * @return The rowCount. - */ - @java.lang.Override - public long getRowCount() { - return rowCount_; - } - /** - *
-     * Number of rows in the table when the profile was generated.
-     * 
- * - * int64 row_count = 13; - * @param value The rowCount to set. - * @return This builder for chaining. - */ - public Builder setRowCount(long value) { - - rowCount_ = value; - onChanged(); - return this; - } - /** - *
-     * Number of rows in the table when the profile was generated.
-     * 
- * - * int64 row_count = 13; - * @return This builder for chaining. - */ - public Builder clearRowCount() { - - rowCount_ = 0L; - onChanged(); - return this; - } - - private int encryptionStatus_ = 0; - /** - *
-     * How the table is encrypted.
-     * 
- * - * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; - * @return The enum numeric value on the wire for encryptionStatus. - */ - @java.lang.Override public int getEncryptionStatusValue() { - return encryptionStatus_; - } - /** - *
-     * How the table is encrypted.
-     * 
- * - * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; - * @param value The enum numeric value on the wire for encryptionStatus to set. - * @return This builder for chaining. - */ - public Builder setEncryptionStatusValue(int value) { - - encryptionStatus_ = value; - onChanged(); - return this; - } - /** - *
-     * How the table is encrypted.
-     * 
- * - * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; - * @return The encryptionStatus. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.EncryptionStatus getEncryptionStatus() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.EncryptionStatus result = com.google.privacy.dlp.v2.EncryptionStatus.valueOf(encryptionStatus_); - return result == null ? com.google.privacy.dlp.v2.EncryptionStatus.UNRECOGNIZED : result; - } - /** - *
-     * How the table is encrypted.
-     * 
- * - * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; - * @param value The encryptionStatus to set. - * @return This builder for chaining. - */ - public Builder setEncryptionStatus(com.google.privacy.dlp.v2.EncryptionStatus value) { - if (value == null) { - throw new NullPointerException(); - } - - encryptionStatus_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * How the table is encrypted.
-     * 
- * - * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; - * @return This builder for chaining. - */ - public Builder clearEncryptionStatus() { - - encryptionStatus_ = 0; - onChanged(); - return this; - } - - private int resourceVisibility_ = 0; - /** - *
-     * How broadly a resource has been shared.
-     * 
- * - * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; - * @return The enum numeric value on the wire for resourceVisibility. - */ - @java.lang.Override public int getResourceVisibilityValue() { - return resourceVisibility_; - } - /** - *
-     * How broadly a resource has been shared.
-     * 
- * - * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; - * @param value The enum numeric value on the wire for resourceVisibility to set. - * @return This builder for chaining. - */ - public Builder setResourceVisibilityValue(int value) { - - resourceVisibility_ = value; - onChanged(); - return this; - } - /** - *
-     * How broadly a resource has been shared.
-     * 
- * - * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; - * @return The resourceVisibility. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ResourceVisibility getResourceVisibility() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.ResourceVisibility result = com.google.privacy.dlp.v2.ResourceVisibility.valueOf(resourceVisibility_); - return result == null ? com.google.privacy.dlp.v2.ResourceVisibility.UNRECOGNIZED : result; - } - /** - *
-     * How broadly a resource has been shared.
-     * 
- * - * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; - * @param value The resourceVisibility to set. - * @return This builder for chaining. - */ - public Builder setResourceVisibility(com.google.privacy.dlp.v2.ResourceVisibility value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceVisibility_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * How broadly a resource has been shared.
-     * 
- * - * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; - * @return This builder for chaining. - */ - public Builder clearResourceVisibility() { - - resourceVisibility_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp profileLastGenerated_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> profileLastGeneratedBuilder_; - /** - *
-     * The last time the profile was generated.
-     * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - * @return Whether the profileLastGenerated field is set. - */ - public boolean hasProfileLastGenerated() { - return profileLastGeneratedBuilder_ != null || profileLastGenerated_ != null; - } - /** - *
-     * The last time the profile was generated.
-     * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - * @return The profileLastGenerated. - */ - public com.google.protobuf.Timestamp getProfileLastGenerated() { - if (profileLastGeneratedBuilder_ == null) { - return profileLastGenerated_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : profileLastGenerated_; - } else { - return profileLastGeneratedBuilder_.getMessage(); - } - } - /** - *
-     * The last time the profile was generated.
-     * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - */ - public Builder setProfileLastGenerated(com.google.protobuf.Timestamp value) { - if (profileLastGeneratedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - profileLastGenerated_ = value; - onChanged(); - } else { - profileLastGeneratedBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The last time the profile was generated.
-     * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - */ - public Builder setProfileLastGenerated( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (profileLastGeneratedBuilder_ == null) { - profileLastGenerated_ = builderForValue.build(); - onChanged(); - } else { - profileLastGeneratedBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The last time the profile was generated.
-     * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - */ - public Builder mergeProfileLastGenerated(com.google.protobuf.Timestamp value) { - if (profileLastGeneratedBuilder_ == null) { - if (profileLastGenerated_ != null) { - profileLastGenerated_ = - com.google.protobuf.Timestamp.newBuilder(profileLastGenerated_).mergeFrom(value).buildPartial(); - } else { - profileLastGenerated_ = value; - } - onChanged(); - } else { - profileLastGeneratedBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The last time the profile was generated.
-     * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - */ - public Builder clearProfileLastGenerated() { - if (profileLastGeneratedBuilder_ == null) { - profileLastGenerated_ = null; - onChanged(); - } else { - profileLastGenerated_ = null; - profileLastGeneratedBuilder_ = null; - } - - return this; - } - /** - *
-     * The last time the profile was generated.
-     * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - */ - public com.google.protobuf.Timestamp.Builder getProfileLastGeneratedBuilder() { - - onChanged(); - return getProfileLastGeneratedFieldBuilder().getBuilder(); - } - /** - *
-     * The last time the profile was generated.
-     * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - */ - public com.google.protobuf.TimestampOrBuilder getProfileLastGeneratedOrBuilder() { - if (profileLastGeneratedBuilder_ != null) { - return profileLastGeneratedBuilder_.getMessageOrBuilder(); - } else { - return profileLastGenerated_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : profileLastGenerated_; - } - } - /** - *
-     * The last time the profile was generated.
-     * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getProfileLastGeneratedFieldBuilder() { - if (profileLastGeneratedBuilder_ == null) { - profileLastGeneratedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getProfileLastGenerated(), - getParentForChildren(), - isClean()); - profileLastGenerated_ = null; - } - return profileLastGeneratedBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> resourceLabels_; - private com.google.protobuf.MapField - internalGetResourceLabels() { - if (resourceLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ResourceLabelsDefaultEntryHolder.defaultEntry); - } - return resourceLabels_; - } - private com.google.protobuf.MapField - internalGetMutableResourceLabels() { - onChanged();; - if (resourceLabels_ == null) { - resourceLabels_ = com.google.protobuf.MapField.newMapField( - ResourceLabelsDefaultEntryHolder.defaultEntry); - } - if (!resourceLabels_.isMutable()) { - resourceLabels_ = resourceLabels_.copy(); - } - return resourceLabels_; - } - - public int getResourceLabelsCount() { - return internalGetResourceLabels().getMap().size(); - } - /** - *
-     * The labels applied to the resource at the time the profile was generated.
-     * 
- * - * map<string, string> resource_labels = 17; - */ - - @java.lang.Override - public boolean containsResourceLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetResourceLabels().getMap().containsKey(key); - } - /** - * Use {@link #getResourceLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getResourceLabels() { - return getResourceLabelsMap(); - } - /** - *
-     * The labels applied to the resource at the time the profile was generated.
-     * 
- * - * map<string, string> resource_labels = 17; - */ - @java.lang.Override - - public java.util.Map getResourceLabelsMap() { - return internalGetResourceLabels().getMap(); - } - /** - *
-     * The labels applied to the resource at the time the profile was generated.
-     * 
- * - * map<string, string> resource_labels = 17; - */ - @java.lang.Override - - public java.lang.String getResourceLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResourceLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * The labels applied to the resource at the time the profile was generated.
-     * 
- * - * map<string, string> resource_labels = 17; - */ - @java.lang.Override - - public java.lang.String getResourceLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetResourceLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearResourceLabels() { - internalGetMutableResourceLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * The labels applied to the resource at the time the profile was generated.
-     * 
- * - * map<string, string> resource_labels = 17; - */ - - public Builder removeResourceLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableResourceLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableResourceLabels() { - return internalGetMutableResourceLabels().getMutableMap(); - } - /** - *
-     * The labels applied to the resource at the time the profile was generated.
-     * 
- * - * map<string, string> resource_labels = 17; - */ - public Builder putResourceLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableResourceLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * The labels applied to the resource at the time the profile was generated.
-     * 
- * - * map<string, string> resource_labels = 17; - */ - - public Builder putAllResourceLabels( - java.util.Map values) { - internalGetMutableResourceLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * The time at which the table was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 23; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * The time at which the table was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 23; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * The time at which the table was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 23; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time at which the table was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 23; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time at which the table was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 23; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time at which the table was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 23; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The time at which the table was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 23; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The time at which the table was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 23; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * The time at which the table was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 23; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TableDataProfile) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TableDataProfile) - private static final com.google.privacy.dlp.v2.TableDataProfile DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TableDataProfile(); - } - - public static com.google.privacy.dlp.v2.TableDataProfile getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TableDataProfile parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TableDataProfile(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableDataProfile getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfileOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfileOrBuilder.java deleted file mode 100644 index 8f69c540bfba..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableDataProfileOrBuilder.java +++ /dev/null @@ -1,615 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface TableDataProfileOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TableDataProfile) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the profile.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The name of the profile.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The resource name to the project data profile for this table.
-   * 
- * - * string project_data_profile = 2; - * @return The projectDataProfile. - */ - java.lang.String getProjectDataProfile(); - /** - *
-   * The resource name to the project data profile for this table.
-   * 
- * - * string project_data_profile = 2; - * @return The bytes for projectDataProfile. - */ - com.google.protobuf.ByteString - getProjectDataProfileBytes(); - - /** - *
-   * The GCP project ID that owns the BigQuery dataset.
-   * 
- * - * string dataset_project_id = 24; - * @return The datasetProjectId. - */ - java.lang.String getDatasetProjectId(); - /** - *
-   * The GCP project ID that owns the BigQuery dataset.
-   * 
- * - * string dataset_project_id = 24; - * @return The bytes for datasetProjectId. - */ - com.google.protobuf.ByteString - getDatasetProjectIdBytes(); - - /** - *
-   * The BigQuery location where the dataset's data is stored.
-   * See https://cloud.google.com/bigquery/docs/locations for supported
-   * locations.
-   * 
- * - * string dataset_location = 29; - * @return The datasetLocation. - */ - java.lang.String getDatasetLocation(); - /** - *
-   * The BigQuery location where the dataset's data is stored.
-   * See https://cloud.google.com/bigquery/docs/locations for supported
-   * locations.
-   * 
- * - * string dataset_location = 29; - * @return The bytes for datasetLocation. - */ - com.google.protobuf.ByteString - getDatasetLocationBytes(); - - /** - *
-   * The BigQuery dataset ID.
-   * 
- * - * string dataset_id = 25; - * @return The datasetId. - */ - java.lang.String getDatasetId(); - /** - *
-   * The BigQuery dataset ID.
-   * 
- * - * string dataset_id = 25; - * @return The bytes for datasetId. - */ - com.google.protobuf.ByteString - getDatasetIdBytes(); - - /** - *
-   * The BigQuery table ID.
-   * 
- * - * string table_id = 26; - * @return The tableId. - */ - java.lang.String getTableId(); - /** - *
-   * The BigQuery table ID.
-   * 
- * - * string table_id = 26; - * @return The bytes for tableId. - */ - com.google.protobuf.ByteString - getTableIdBytes(); - - /** - *
-   * The resource name of the table.
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * 
- * - * string full_resource = 3; - * @return The fullResource. - */ - java.lang.String getFullResource(); - /** - *
-   * The resource name of the table.
-   * https://cloud.google.com/apis/design/resource_names#full_resource_name
-   * 
- * - * string full_resource = 3; - * @return The bytes for fullResource. - */ - com.google.protobuf.ByteString - getFullResourceBytes(); - - /** - *
-   * Success or error status from the most recent profile generation attempt.
-   * May be empty if the profile is still being generated.
-   * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - * @return Whether the profileStatus field is set. - */ - boolean hasProfileStatus(); - /** - *
-   * Success or error status from the most recent profile generation attempt.
-   * May be empty if the profile is still being generated.
-   * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - * @return The profileStatus. - */ - com.google.privacy.dlp.v2.ProfileStatus getProfileStatus(); - /** - *
-   * Success or error status from the most recent profile generation attempt.
-   * May be empty if the profile is still being generated.
-   * 
- * - * .google.privacy.dlp.v2.ProfileStatus profile_status = 21; - */ - com.google.privacy.dlp.v2.ProfileStatusOrBuilder getProfileStatusOrBuilder(); - - /** - *
-   * State of a profile.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile.State state = 22; - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - *
-   * State of a profile.
-   * 
- * - * .google.privacy.dlp.v2.TableDataProfile.State state = 22; - * @return The state. - */ - com.google.privacy.dlp.v2.TableDataProfile.State getState(); - - /** - *
-   * The sensitivity score of this table.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - * @return Whether the sensitivityScore field is set. - */ - boolean hasSensitivityScore(); - /** - *
-   * The sensitivity score of this table.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - * @return The sensitivityScore. - */ - com.google.privacy.dlp.v2.SensitivityScore getSensitivityScore(); - /** - *
-   * The sensitivity score of this table.
-   * 
- * - * .google.privacy.dlp.v2.SensitivityScore sensitivity_score = 5; - */ - com.google.privacy.dlp.v2.SensitivityScoreOrBuilder getSensitivityScoreOrBuilder(); - - /** - *
-   * The data risk level of this table.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - * @return Whether the dataRiskLevel field is set. - */ - boolean hasDataRiskLevel(); - /** - *
-   * The data risk level of this table.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - * @return The dataRiskLevel. - */ - com.google.privacy.dlp.v2.DataRiskLevel getDataRiskLevel(); - /** - *
-   * The data risk level of this table.
-   * 
- * - * .google.privacy.dlp.v2.DataRiskLevel data_risk_level = 6; - */ - com.google.privacy.dlp.v2.DataRiskLevelOrBuilder getDataRiskLevelOrBuilder(); - - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - java.util.List - getPredictedInfoTypesList(); - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - com.google.privacy.dlp.v2.InfoTypeSummary getPredictedInfoTypes(int index); - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - int getPredictedInfoTypesCount(); - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - java.util.List - getPredictedInfoTypesOrBuilderList(); - /** - *
-   * The infoTypes predicted from this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.InfoTypeSummary predicted_info_types = 27; - */ - com.google.privacy.dlp.v2.InfoTypeSummaryOrBuilder getPredictedInfoTypesOrBuilder( - int index); - - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - java.util.List - getOtherInfoTypesList(); - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - com.google.privacy.dlp.v2.OtherInfoTypeSummary getOtherInfoTypes(int index); - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - int getOtherInfoTypesCount(); - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - java.util.List - getOtherInfoTypesOrBuilderList(); - /** - *
-   * Other infoTypes found in this table's data.
-   * 
- * - * repeated .google.privacy.dlp.v2.OtherInfoTypeSummary other_info_types = 28; - */ - com.google.privacy.dlp.v2.OtherInfoTypeSummaryOrBuilder getOtherInfoTypesOrBuilder( - int index); - - /** - *
-   * The snapshot of the configurations used to generate the profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - * @return Whether the configSnapshot field is set. - */ - boolean hasConfigSnapshot(); - /** - *
-   * The snapshot of the configurations used to generate the profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - * @return The configSnapshot. - */ - com.google.privacy.dlp.v2.DataProfileConfigSnapshot getConfigSnapshot(); - /** - *
-   * The snapshot of the configurations used to generate the profile.
-   * 
- * - * .google.privacy.dlp.v2.DataProfileConfigSnapshot config_snapshot = 7; - */ - com.google.privacy.dlp.v2.DataProfileConfigSnapshotOrBuilder getConfigSnapshotOrBuilder(); - - /** - *
-   * The time when this table was last modified
-   * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - * @return Whether the lastModifiedTime field is set. - */ - boolean hasLastModifiedTime(); - /** - *
-   * The time when this table was last modified
-   * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - * @return The lastModifiedTime. - */ - com.google.protobuf.Timestamp getLastModifiedTime(); - /** - *
-   * The time when this table was last modified
-   * 
- * - * .google.protobuf.Timestamp last_modified_time = 8; - */ - com.google.protobuf.TimestampOrBuilder getLastModifiedTimeOrBuilder(); - - /** - *
-   * Optional. The time when this table expires.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - * @return Whether the expirationTime field is set. - */ - boolean hasExpirationTime(); - /** - *
-   * Optional. The time when this table expires.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - * @return The expirationTime. - */ - com.google.protobuf.Timestamp getExpirationTime(); - /** - *
-   * Optional. The time when this table expires.
-   * 
- * - * .google.protobuf.Timestamp expiration_time = 9; - */ - com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); - - /** - *
-   * The number of columns profiled in the table.
-   * 
- * - * int64 scanned_column_count = 10; - * @return The scannedColumnCount. - */ - long getScannedColumnCount(); - - /** - *
-   * The number of columns skipped in the table because of an error.
-   * 
- * - * int64 failed_column_count = 11; - * @return The failedColumnCount. - */ - long getFailedColumnCount(); - - /** - *
-   * The size of the table when the profile was generated.
-   * 
- * - * int64 table_size_bytes = 12; - * @return The tableSizeBytes. - */ - long getTableSizeBytes(); - - /** - *
-   * Number of rows in the table when the profile was generated.
-   * 
- * - * int64 row_count = 13; - * @return The rowCount. - */ - long getRowCount(); - - /** - *
-   * How the table is encrypted.
-   * 
- * - * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; - * @return The enum numeric value on the wire for encryptionStatus. - */ - int getEncryptionStatusValue(); - /** - *
-   * How the table is encrypted.
-   * 
- * - * .google.privacy.dlp.v2.EncryptionStatus encryption_status = 14; - * @return The encryptionStatus. - */ - com.google.privacy.dlp.v2.EncryptionStatus getEncryptionStatus(); - - /** - *
-   * How broadly a resource has been shared.
-   * 
- * - * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; - * @return The enum numeric value on the wire for resourceVisibility. - */ - int getResourceVisibilityValue(); - /** - *
-   * How broadly a resource has been shared.
-   * 
- * - * .google.privacy.dlp.v2.ResourceVisibility resource_visibility = 15; - * @return The resourceVisibility. - */ - com.google.privacy.dlp.v2.ResourceVisibility getResourceVisibility(); - - /** - *
-   * The last time the profile was generated.
-   * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - * @return Whether the profileLastGenerated field is set. - */ - boolean hasProfileLastGenerated(); - /** - *
-   * The last time the profile was generated.
-   * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - * @return The profileLastGenerated. - */ - com.google.protobuf.Timestamp getProfileLastGenerated(); - /** - *
-   * The last time the profile was generated.
-   * 
- * - * .google.protobuf.Timestamp profile_last_generated = 16; - */ - com.google.protobuf.TimestampOrBuilder getProfileLastGeneratedOrBuilder(); - - /** - *
-   * The labels applied to the resource at the time the profile was generated.
-   * 
- * - * map<string, string> resource_labels = 17; - */ - int getResourceLabelsCount(); - /** - *
-   * The labels applied to the resource at the time the profile was generated.
-   * 
- * - * map<string, string> resource_labels = 17; - */ - boolean containsResourceLabels( - java.lang.String key); - /** - * Use {@link #getResourceLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getResourceLabels(); - /** - *
-   * The labels applied to the resource at the time the profile was generated.
-   * 
- * - * map<string, string> resource_labels = 17; - */ - java.util.Map - getResourceLabelsMap(); - /** - *
-   * The labels applied to the resource at the time the profile was generated.
-   * 
- * - * map<string, string> resource_labels = 17; - */ - - /* nullable */ -java.lang.String getResourceLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * The labels applied to the resource at the time the profile was generated.
-   * 
- * - * map<string, string> resource_labels = 17; - */ - - java.lang.String getResourceLabelsOrThrow( - java.lang.String key); - - /** - *
-   * The time at which the table was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 23; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * The time at which the table was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 23; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * The time at which the table was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 23; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocation.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocation.java deleted file mode 100644 index babc1fa9a345..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocation.java +++ /dev/null @@ -1,530 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Location of a finding within a table.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TableLocation} - */ -public final class TableLocation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TableLocation) - TableLocationOrBuilder { -private static final long serialVersionUID = 0L; - // Use TableLocation.newBuilder() to construct. - private TableLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TableLocation() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TableLocation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TableLocation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - rowIndex_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TableLocation.class, com.google.privacy.dlp.v2.TableLocation.Builder.class); - } - - public static final int ROW_INDEX_FIELD_NUMBER = 1; - private long rowIndex_; - /** - *
-   * The zero-based index of the row where the finding is located. Only
-   * populated for resources that have a natural ordering, not BigQuery. In
-   * BigQuery, to identify the row a finding came from, populate
-   * BigQueryOptions.identifying_fields with your primary key column names and
-   * when you store the findings the value of those columns will be stored
-   * inside of Finding.
-   * 
- * - * int64 row_index = 1; - * @return The rowIndex. - */ - @java.lang.Override - public long getRowIndex() { - return rowIndex_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (rowIndex_ != 0L) { - output.writeInt64(1, rowIndex_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (rowIndex_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, rowIndex_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TableLocation)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TableLocation other = (com.google.privacy.dlp.v2.TableLocation) obj; - - if (getRowIndex() - != other.getRowIndex()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ROW_INDEX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getRowIndex()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TableLocation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TableLocation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TableLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TableLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TableLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TableLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TableLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TableLocation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Location of a finding within a table.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TableLocation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TableLocation) - com.google.privacy.dlp.v2.TableLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TableLocation.class, com.google.privacy.dlp.v2.TableLocation.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TableLocation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - rowIndex_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TableLocation_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableLocation getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TableLocation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableLocation build() { - com.google.privacy.dlp.v2.TableLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableLocation buildPartial() { - com.google.privacy.dlp.v2.TableLocation result = new com.google.privacy.dlp.v2.TableLocation(this); - result.rowIndex_ = rowIndex_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TableLocation) { - return mergeFrom((com.google.privacy.dlp.v2.TableLocation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TableLocation other) { - if (other == com.google.privacy.dlp.v2.TableLocation.getDefaultInstance()) return this; - if (other.getRowIndex() != 0L) { - setRowIndex(other.getRowIndex()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TableLocation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TableLocation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long rowIndex_ ; - /** - *
-     * The zero-based index of the row where the finding is located. Only
-     * populated for resources that have a natural ordering, not BigQuery. In
-     * BigQuery, to identify the row a finding came from, populate
-     * BigQueryOptions.identifying_fields with your primary key column names and
-     * when you store the findings the value of those columns will be stored
-     * inside of Finding.
-     * 
- * - * int64 row_index = 1; - * @return The rowIndex. - */ - @java.lang.Override - public long getRowIndex() { - return rowIndex_; - } - /** - *
-     * The zero-based index of the row where the finding is located. Only
-     * populated for resources that have a natural ordering, not BigQuery. In
-     * BigQuery, to identify the row a finding came from, populate
-     * BigQueryOptions.identifying_fields with your primary key column names and
-     * when you store the findings the value of those columns will be stored
-     * inside of Finding.
-     * 
- * - * int64 row_index = 1; - * @param value The rowIndex to set. - * @return This builder for chaining. - */ - public Builder setRowIndex(long value) { - - rowIndex_ = value; - onChanged(); - return this; - } - /** - *
-     * The zero-based index of the row where the finding is located. Only
-     * populated for resources that have a natural ordering, not BigQuery. In
-     * BigQuery, to identify the row a finding came from, populate
-     * BigQueryOptions.identifying_fields with your primary key column names and
-     * when you store the findings the value of those columns will be stored
-     * inside of Finding.
-     * 
- * - * int64 row_index = 1; - * @return This builder for chaining. - */ - public Builder clearRowIndex() { - - rowIndex_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TableLocation) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TableLocation) - private static final com.google.privacy.dlp.v2.TableLocation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TableLocation(); - } - - public static com.google.privacy.dlp.v2.TableLocation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TableLocation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TableLocation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableLocation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocationOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocationOrBuilder.java deleted file mode 100644 index c823d019b0b6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableLocationOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface TableLocationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TableLocation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The zero-based index of the row where the finding is located. Only
-   * populated for resources that have a natural ordering, not BigQuery. In
-   * BigQuery, to identify the row a finding came from, populate
-   * BigQueryOptions.identifying_fields with your primary key column names and
-   * when you store the findings the value of those columns will be stored
-   * inside of Finding.
-   * 
- * - * int64 row_index = 1; - * @return The rowIndex. - */ - long getRowIndex(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptions.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptions.java deleted file mode 100644 index 25e72c8bc954..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptions.java +++ /dev/null @@ -1,941 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Instructions regarding the table content being inspected.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TableOptions} - */ -public final class TableOptions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TableOptions) - TableOptionsOrBuilder { -private static final long serialVersionUID = 0L; - // Use TableOptions.newBuilder() to construct. - private TableOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TableOptions() { - identifyingFields_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TableOptions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TableOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - identifyingFields_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - identifyingFields_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - identifyingFields_ = java.util.Collections.unmodifiableList(identifyingFields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TableOptions.class, com.google.privacy.dlp.v2.TableOptions.Builder.class); - } - - public static final int IDENTIFYING_FIELDS_FIELD_NUMBER = 1; - private java.util.List identifyingFields_; - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - @java.lang.Override - public java.util.List getIdentifyingFieldsList() { - return identifyingFields_; - } - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - @java.lang.Override - public java.util.List - getIdentifyingFieldsOrBuilderList() { - return identifyingFields_; - } - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - @java.lang.Override - public int getIdentifyingFieldsCount() { - return identifyingFields_.size(); - } - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index) { - return identifyingFields_.get(index); - } - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( - int index) { - return identifyingFields_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < identifyingFields_.size(); i++) { - output.writeMessage(1, identifyingFields_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < identifyingFields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, identifyingFields_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TableOptions)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TableOptions other = (com.google.privacy.dlp.v2.TableOptions) obj; - - if (!getIdentifyingFieldsList() - .equals(other.getIdentifyingFieldsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getIdentifyingFieldsCount() > 0) { - hash = (37 * hash) + IDENTIFYING_FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getIdentifyingFieldsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TableOptions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TableOptions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableOptions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TableOptions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableOptions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TableOptions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableOptions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TableOptions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableOptions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TableOptions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TableOptions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TableOptions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TableOptions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Instructions regarding the table content being inspected.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TableOptions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TableOptions) - com.google.privacy.dlp.v2.TableOptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TableOptions.class, com.google.privacy.dlp.v2.TableOptions.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TableOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getIdentifyingFieldsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (identifyingFieldsBuilder_ == null) { - identifyingFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - identifyingFieldsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpStorage.internal_static_google_privacy_dlp_v2_TableOptions_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableOptions getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TableOptions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableOptions build() { - com.google.privacy.dlp.v2.TableOptions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableOptions buildPartial() { - com.google.privacy.dlp.v2.TableOptions result = new com.google.privacy.dlp.v2.TableOptions(this); - int from_bitField0_ = bitField0_; - if (identifyingFieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - identifyingFields_ = java.util.Collections.unmodifiableList(identifyingFields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.identifyingFields_ = identifyingFields_; - } else { - result.identifyingFields_ = identifyingFieldsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TableOptions) { - return mergeFrom((com.google.privacy.dlp.v2.TableOptions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TableOptions other) { - if (other == com.google.privacy.dlp.v2.TableOptions.getDefaultInstance()) return this; - if (identifyingFieldsBuilder_ == null) { - if (!other.identifyingFields_.isEmpty()) { - if (identifyingFields_.isEmpty()) { - identifyingFields_ = other.identifyingFields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.addAll(other.identifyingFields_); - } - onChanged(); - } - } else { - if (!other.identifyingFields_.isEmpty()) { - if (identifyingFieldsBuilder_.isEmpty()) { - identifyingFieldsBuilder_.dispose(); - identifyingFieldsBuilder_ = null; - identifyingFields_ = other.identifyingFields_; - bitField0_ = (bitField0_ & ~0x00000001); - identifyingFieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getIdentifyingFieldsFieldBuilder() : null; - } else { - identifyingFieldsBuilder_.addAllMessages(other.identifyingFields_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TableOptions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TableOptions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List identifyingFields_ = - java.util.Collections.emptyList(); - private void ensureIdentifyingFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - identifyingFields_ = new java.util.ArrayList(identifyingFields_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> identifyingFieldsBuilder_; - - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public java.util.List getIdentifyingFieldsList() { - if (identifyingFieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(identifyingFields_); - } else { - return identifyingFieldsBuilder_.getMessageList(); - } - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public int getIdentifyingFieldsCount() { - if (identifyingFieldsBuilder_ == null) { - return identifyingFields_.size(); - } else { - return identifyingFieldsBuilder_.getCount(); - } - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index) { - if (identifyingFieldsBuilder_ == null) { - return identifyingFields_.get(index); - } else { - return identifyingFieldsBuilder_.getMessage(index); - } - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public Builder setIdentifyingFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (identifyingFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.set(index, value); - onChanged(); - } else { - identifyingFieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public Builder setIdentifyingFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.set(index, builderForValue.build()); - onChanged(); - } else { - identifyingFieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public Builder addIdentifyingFields(com.google.privacy.dlp.v2.FieldId value) { - if (identifyingFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.add(value); - onChanged(); - } else { - identifyingFieldsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public Builder addIdentifyingFields( - int index, com.google.privacy.dlp.v2.FieldId value) { - if (identifyingFieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.add(index, value); - onChanged(); - } else { - identifyingFieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public Builder addIdentifyingFields( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.add(builderForValue.build()); - onChanged(); - } else { - identifyingFieldsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public Builder addIdentifyingFields( - int index, com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.add(index, builderForValue.build()); - onChanged(); - } else { - identifyingFieldsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public Builder addAllIdentifyingFields( - java.lang.Iterable values) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, identifyingFields_); - onChanged(); - } else { - identifyingFieldsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public Builder clearIdentifyingFields() { - if (identifyingFieldsBuilder_ == null) { - identifyingFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - identifyingFieldsBuilder_.clear(); - } - return this; - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public Builder removeIdentifyingFields(int index) { - if (identifyingFieldsBuilder_ == null) { - ensureIdentifyingFieldsIsMutable(); - identifyingFields_.remove(index); - onChanged(); - } else { - identifyingFieldsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getIdentifyingFieldsBuilder( - int index) { - return getIdentifyingFieldsFieldBuilder().getBuilder(index); - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( - int index) { - if (identifyingFieldsBuilder_ == null) { - return identifyingFields_.get(index); } else { - return identifyingFieldsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public java.util.List - getIdentifyingFieldsOrBuilderList() { - if (identifyingFieldsBuilder_ != null) { - return identifyingFieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(identifyingFields_); - } - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addIdentifyingFieldsBuilder() { - return getIdentifyingFieldsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public com.google.privacy.dlp.v2.FieldId.Builder addIdentifyingFieldsBuilder( - int index) { - return getIdentifyingFieldsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldId.getDefaultInstance()); - } - /** - *
-     * The columns that are the primary keys for table objects included in
-     * ContentItem. A copy of this cell's value will stored alongside alongside
-     * each finding so that the finding can be traced to the specific row it came
-     * from. No more than 3 may be provided.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - public java.util.List - getIdentifyingFieldsBuilderList() { - return getIdentifyingFieldsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getIdentifyingFieldsFieldBuilder() { - if (identifyingFieldsBuilder_ == null) { - identifyingFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - identifyingFields_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - identifyingFields_ = null; - } - return identifyingFieldsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TableOptions) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TableOptions) - private static final com.google.privacy.dlp.v2.TableOptions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TableOptions(); - } - - public static com.google.privacy.dlp.v2.TableOptions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TableOptions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TableOptions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TableOptions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptionsOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptionsOrBuilder.java deleted file mode 100644 index 0c70d7361877..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOptionsOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/storage.proto - -package com.google.privacy.dlp.v2; - -public interface TableOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TableOptions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - java.util.List - getIdentifyingFieldsList(); - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - com.google.privacy.dlp.v2.FieldId getIdentifyingFields(int index); - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - int getIdentifyingFieldsCount(); - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - java.util.List - getIdentifyingFieldsOrBuilderList(); - /** - *
-   * The columns that are the primary keys for table objects included in
-   * ContentItem. A copy of this cell's value will stored alongside alongside
-   * each finding so that the finding can be traced to the specific row it came
-   * from. No more than 3 may be provided.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId identifying_fields = 1; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getIdentifyingFieldsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOrBuilder.java deleted file mode 100644 index 5608646ca0e4..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TableOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface TableOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Table) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - java.util.List - getHeadersList(); - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - com.google.privacy.dlp.v2.FieldId getHeaders(int index); - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - int getHeadersCount(); - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - java.util.List - getHeadersOrBuilderList(); - /** - *
-   * Headers of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldId headers = 1; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getHeadersOrBuilder( - int index); - - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - java.util.List - getRowsList(); - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - com.google.privacy.dlp.v2.Table.Row getRows(int index); - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - int getRowsCount(); - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - java.util.List - getRowsOrBuilderList(); - /** - *
-   * Rows of the table.
-   * 
- * - * repeated .google.privacy.dlp.v2.Table.Row rows = 2; - */ - com.google.privacy.dlp.v2.Table.RowOrBuilder getRowsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfig.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfig.java deleted file mode 100644 index 98fa846b9e41..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfig.java +++ /dev/null @@ -1,768 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a
- * portion of the value.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TimePartConfig} - */ -public final class TimePartConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TimePartConfig) - TimePartConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use TimePartConfig.newBuilder() to construct. - private TimePartConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TimePartConfig() { - partToExtract_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TimePartConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TimePartConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - partToExtract_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TimePartConfig.class, com.google.privacy.dlp.v2.TimePartConfig.Builder.class); - } - - /** - *
-   * Components that make up time.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.TimePartConfig.TimePart} - */ - public enum TimePart - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused
-     * 
- * - * TIME_PART_UNSPECIFIED = 0; - */ - TIME_PART_UNSPECIFIED(0), - /** - *
-     * [0-9999]
-     * 
- * - * YEAR = 1; - */ - YEAR(1), - /** - *
-     * [1-12]
-     * 
- * - * MONTH = 2; - */ - MONTH(2), - /** - *
-     * [1-31]
-     * 
- * - * DAY_OF_MONTH = 3; - */ - DAY_OF_MONTH(3), - /** - *
-     * [1-7]
-     * 
- * - * DAY_OF_WEEK = 4; - */ - DAY_OF_WEEK(4), - /** - *
-     * [1-53]
-     * 
- * - * WEEK_OF_YEAR = 5; - */ - WEEK_OF_YEAR(5), - /** - *
-     * [0-23]
-     * 
- * - * HOUR_OF_DAY = 6; - */ - HOUR_OF_DAY(6), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused
-     * 
- * - * TIME_PART_UNSPECIFIED = 0; - */ - public static final int TIME_PART_UNSPECIFIED_VALUE = 0; - /** - *
-     * [0-9999]
-     * 
- * - * YEAR = 1; - */ - public static final int YEAR_VALUE = 1; - /** - *
-     * [1-12]
-     * 
- * - * MONTH = 2; - */ - public static final int MONTH_VALUE = 2; - /** - *
-     * [1-31]
-     * 
- * - * DAY_OF_MONTH = 3; - */ - public static final int DAY_OF_MONTH_VALUE = 3; - /** - *
-     * [1-7]
-     * 
- * - * DAY_OF_WEEK = 4; - */ - public static final int DAY_OF_WEEK_VALUE = 4; - /** - *
-     * [1-53]
-     * 
- * - * WEEK_OF_YEAR = 5; - */ - public static final int WEEK_OF_YEAR_VALUE = 5; - /** - *
-     * [0-23]
-     * 
- * - * HOUR_OF_DAY = 6; - */ - public static final int HOUR_OF_DAY_VALUE = 6; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TimePart valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static TimePart forNumber(int value) { - switch (value) { - case 0: return TIME_PART_UNSPECIFIED; - case 1: return YEAR; - case 2: return MONTH; - case 3: return DAY_OF_MONTH; - case 4: return DAY_OF_WEEK; - case 5: return WEEK_OF_YEAR; - case 6: return HOUR_OF_DAY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - TimePart> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TimePart findValueByNumber(int number) { - return TimePart.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.TimePartConfig.getDescriptor().getEnumTypes().get(0); - } - - private static final TimePart[] VALUES = values(); - - public static TimePart valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private TimePart(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TimePartConfig.TimePart) - } - - public static final int PART_TO_EXTRACT_FIELD_NUMBER = 1; - private int partToExtract_; - /** - *
-   * The part of the time to keep.
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; - * @return The enum numeric value on the wire for partToExtract. - */ - @java.lang.Override public int getPartToExtractValue() { - return partToExtract_; - } - /** - *
-   * The part of the time to keep.
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; - * @return The partToExtract. - */ - @java.lang.Override public com.google.privacy.dlp.v2.TimePartConfig.TimePart getPartToExtract() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TimePartConfig.TimePart result = com.google.privacy.dlp.v2.TimePartConfig.TimePart.valueOf(partToExtract_); - return result == null ? com.google.privacy.dlp.v2.TimePartConfig.TimePart.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (partToExtract_ != com.google.privacy.dlp.v2.TimePartConfig.TimePart.TIME_PART_UNSPECIFIED.getNumber()) { - output.writeEnum(1, partToExtract_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (partToExtract_ != com.google.privacy.dlp.v2.TimePartConfig.TimePart.TIME_PART_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, partToExtract_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TimePartConfig)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TimePartConfig other = (com.google.privacy.dlp.v2.TimePartConfig) obj; - - if (partToExtract_ != other.partToExtract_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PART_TO_EXTRACT_FIELD_NUMBER; - hash = (53 * hash) + partToExtract_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TimePartConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TimePartConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a
-   * portion of the value.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TimePartConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TimePartConfig) - com.google.privacy.dlp.v2.TimePartConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TimePartConfig.class, com.google.privacy.dlp.v2.TimePartConfig.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TimePartConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - partToExtract_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TimePartConfig getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TimePartConfig build() { - com.google.privacy.dlp.v2.TimePartConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TimePartConfig buildPartial() { - com.google.privacy.dlp.v2.TimePartConfig result = new com.google.privacy.dlp.v2.TimePartConfig(this); - result.partToExtract_ = partToExtract_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TimePartConfig) { - return mergeFrom((com.google.privacy.dlp.v2.TimePartConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TimePartConfig other) { - if (other == com.google.privacy.dlp.v2.TimePartConfig.getDefaultInstance()) return this; - if (other.partToExtract_ != 0) { - setPartToExtractValue(other.getPartToExtractValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TimePartConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TimePartConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int partToExtract_ = 0; - /** - *
-     * The part of the time to keep.
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; - * @return The enum numeric value on the wire for partToExtract. - */ - @java.lang.Override public int getPartToExtractValue() { - return partToExtract_; - } - /** - *
-     * The part of the time to keep.
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; - * @param value The enum numeric value on the wire for partToExtract to set. - * @return This builder for chaining. - */ - public Builder setPartToExtractValue(int value) { - - partToExtract_ = value; - onChanged(); - return this; - } - /** - *
-     * The part of the time to keep.
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; - * @return The partToExtract. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TimePartConfig.TimePart getPartToExtract() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TimePartConfig.TimePart result = com.google.privacy.dlp.v2.TimePartConfig.TimePart.valueOf(partToExtract_); - return result == null ? com.google.privacy.dlp.v2.TimePartConfig.TimePart.UNRECOGNIZED : result; - } - /** - *
-     * The part of the time to keep.
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; - * @param value The partToExtract to set. - * @return This builder for chaining. - */ - public Builder setPartToExtract(com.google.privacy.dlp.v2.TimePartConfig.TimePart value) { - if (value == null) { - throw new NullPointerException(); - } - - partToExtract_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The part of the time to keep.
-     * 
- * - * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; - * @return This builder for chaining. - */ - public Builder clearPartToExtract() { - - partToExtract_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TimePartConfig) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TimePartConfig) - private static final com.google.privacy.dlp.v2.TimePartConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TimePartConfig(); - } - - public static com.google.privacy.dlp.v2.TimePartConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimePartConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TimePartConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TimePartConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfigOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfigOrBuilder.java deleted file mode 100644 index e42fb6dd8de6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TimePartConfigOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface TimePartConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TimePartConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The part of the time to keep.
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; - * @return The enum numeric value on the wire for partToExtract. - */ - int getPartToExtractValue(); - /** - *
-   * The part of the time to keep.
-   * 
- * - * .google.privacy.dlp.v2.TimePartConfig.TimePart part_to_extract = 1; - * @return The partToExtract. - */ - com.google.privacy.dlp.v2.TimePartConfig.TimePart getPartToExtract(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandling.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandling.java deleted file mode 100644 index 715e5b5afde7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandling.java +++ /dev/null @@ -1,1900 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * How to handle transformation errors during de-identification. A
- * transformation error occurs when the requested transformation is incompatible
- * with the data. For example, trying to de-identify an IP address using a
- * `DateShift` transformation would result in a transformation error, since date
- * info cannot be extracted from an IP address.
- * Information about any incompatible transformations, and how they were
- * handled, is returned in the response as part of the
- * `TransformationOverviews`.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling} - */ -public final class TransformationErrorHandling extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationErrorHandling) - TransformationErrorHandlingOrBuilder { -private static final long serialVersionUID = 0L; - // Use TransformationErrorHandling.newBuilder() to construct. - private TransformationErrorHandling(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TransformationErrorHandling() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TransformationErrorHandling(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TransformationErrorHandling( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder subBuilder = null; - if (modeCase_ == 1) { - subBuilder = ((com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_).toBuilder(); - } - mode_ = - input.readMessage(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_); - mode_ = subBuilder.buildPartial(); - } - modeCase_ = 1; - break; - } - case 18: { - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder subBuilder = null; - if (modeCase_ == 2) { - subBuilder = ((com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_).toBuilder(); - } - mode_ = - input.readMessage(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_); - mode_ = subBuilder.buildPartial(); - } - modeCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationErrorHandling.class, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder.class); - } - - public interface ThrowErrorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Throw an error and fail the request when a transformation error occurs.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} - */ - public static final class ThrowError extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) - ThrowErrorOrBuilder { - private static final long serialVersionUID = 0L; - // Use ThrowError.newBuilder() to construct. - private ThrowError(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ThrowError() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ThrowError(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ThrowError( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.class, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError other = (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Throw an error and fail the request when a transformation error occurs.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.class, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_ThrowError_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError build() { - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError buildPartial() { - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError result = new com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) { - return mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError other) { - if (other == com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) - private static final com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError(); - } - - public static com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ThrowError parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ThrowError(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LeaveUntransformedOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Skips the data without modifying it if the requested transformation would
-   * cause an error. For example, if a `DateShift` transformation were applied
-   * an an IP address, this mode would leave the IP address unchanged in the
-   * response.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} - */ - public static final class LeaveUntransformed extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) - LeaveUntransformedOrBuilder { - private static final long serialVersionUID = 0L; - // Use LeaveUntransformed.newBuilder() to construct. - private LeaveUntransformed(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LeaveUntransformed() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LeaveUntransformed(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private LeaveUntransformed( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.class, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed other = (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Skips the data without modifying it if the requested transformation would
-     * cause an error. For example, if a `DateShift` transformation were applied
-     * an an IP address, this mode would leave the IP address unchanged in the
-     * response.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.class, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_LeaveUntransformed_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed build() { - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed buildPartial() { - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed result = new com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) { - return mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed other) { - if (other == com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) - private static final com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed(); - } - - public static com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LeaveUntransformed parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new LeaveUntransformed(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int modeCase_ = 0; - private java.lang.Object mode_; - public enum ModeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - THROW_ERROR(1), - LEAVE_UNTRANSFORMED(2), - MODE_NOT_SET(0); - private final int value; - private ModeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ModeCase valueOf(int value) { - return forNumber(value); - } - - public static ModeCase forNumber(int value) { - switch (value) { - case 1: return THROW_ERROR; - case 2: return LEAVE_UNTRANSFORMED; - case 0: return MODE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ModeCase - getModeCase() { - return ModeCase.forNumber( - modeCase_); - } - - public static final int THROW_ERROR_FIELD_NUMBER = 1; - /** - *
-   * Throw an error
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - * @return Whether the throwError field is set. - */ - @java.lang.Override - public boolean hasThrowError() { - return modeCase_ == 1; - } - /** - *
-   * Throw an error
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - * @return The throwError. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getThrowError() { - if (modeCase_ == 1) { - return (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_; - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); - } - /** - *
-   * Throw an error
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder getThrowErrorOrBuilder() { - if (modeCase_ == 1) { - return (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_; - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); - } - - public static final int LEAVE_UNTRANSFORMED_FIELD_NUMBER = 2; - /** - *
-   * Ignore errors
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - * @return Whether the leaveUntransformed field is set. - */ - @java.lang.Override - public boolean hasLeaveUntransformed() { - return modeCase_ == 2; - } - /** - *
-   * Ignore errors
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - * @return The leaveUntransformed. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getLeaveUntransformed() { - if (modeCase_ == 2) { - return (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_; - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); - } - /** - *
-   * Ignore errors
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder getLeaveUntransformedOrBuilder() { - if (modeCase_ == 2) { - return (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_; - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (modeCase_ == 1) { - output.writeMessage(1, (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_); - } - if (modeCase_ == 2) { - output.writeMessage(2, (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (modeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_); - } - if (modeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TransformationErrorHandling)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TransformationErrorHandling other = (com.google.privacy.dlp.v2.TransformationErrorHandling) obj; - - if (!getModeCase().equals(other.getModeCase())) return false; - switch (modeCase_) { - case 1: - if (!getThrowError() - .equals(other.getThrowError())) return false; - break; - case 2: - if (!getLeaveUntransformed() - .equals(other.getLeaveUntransformed())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (modeCase_) { - case 1: - hash = (37 * hash) + THROW_ERROR_FIELD_NUMBER; - hash = (53 * hash) + getThrowError().hashCode(); - break; - case 2: - hash = (37 * hash) + LEAVE_UNTRANSFORMED_FIELD_NUMBER; - hash = (53 * hash) + getLeaveUntransformed().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationErrorHandling parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationErrorHandling prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * How to handle transformation errors during de-identification. A
-   * transformation error occurs when the requested transformation is incompatible
-   * with the data. For example, trying to de-identify an IP address using a
-   * `DateShift` transformation would result in a transformation error, since date
-   * info cannot be extracted from an IP address.
-   * Information about any incompatible transformations, and how they were
-   * handled, is returned in the response as part of the
-   * `TransformationOverviews`.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationErrorHandling} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationErrorHandling) - com.google.privacy.dlp.v2.TransformationErrorHandlingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationErrorHandling.class, com.google.privacy.dlp.v2.TransformationErrorHandling.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TransformationErrorHandling.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - modeCase_ = 0; - mode_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationErrorHandling_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling build() { - com.google.privacy.dlp.v2.TransformationErrorHandling result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling buildPartial() { - com.google.privacy.dlp.v2.TransformationErrorHandling result = new com.google.privacy.dlp.v2.TransformationErrorHandling(this); - if (modeCase_ == 1) { - if (throwErrorBuilder_ == null) { - result.mode_ = mode_; - } else { - result.mode_ = throwErrorBuilder_.build(); - } - } - if (modeCase_ == 2) { - if (leaveUntransformedBuilder_ == null) { - result.mode_ = mode_; - } else { - result.mode_ = leaveUntransformedBuilder_.build(); - } - } - result.modeCase_ = modeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TransformationErrorHandling) { - return mergeFrom((com.google.privacy.dlp.v2.TransformationErrorHandling)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationErrorHandling other) { - if (other == com.google.privacy.dlp.v2.TransformationErrorHandling.getDefaultInstance()) return this; - switch (other.getModeCase()) { - case THROW_ERROR: { - mergeThrowError(other.getThrowError()); - break; - } - case LEAVE_UNTRANSFORMED: { - mergeLeaveUntransformed(other.getLeaveUntransformed()); - break; - } - case MODE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TransformationErrorHandling parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TransformationErrorHandling) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int modeCase_ = 0; - private java.lang.Object mode_; - public ModeCase - getModeCase() { - return ModeCase.forNumber( - modeCase_); - } - - public Builder clearMode() { - modeCase_ = 0; - mode_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder> throwErrorBuilder_; - /** - *
-     * Throw an error
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - * @return Whether the throwError field is set. - */ - @java.lang.Override - public boolean hasThrowError() { - return modeCase_ == 1; - } - /** - *
-     * Throw an error
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - * @return The throwError. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getThrowError() { - if (throwErrorBuilder_ == null) { - if (modeCase_ == 1) { - return (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_; - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); - } else { - if (modeCase_ == 1) { - return throwErrorBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); - } - } - /** - *
-     * Throw an error
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - */ - public Builder setThrowError(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError value) { - if (throwErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - mode_ = value; - onChanged(); - } else { - throwErrorBuilder_.setMessage(value); - } - modeCase_ = 1; - return this; - } - /** - *
-     * Throw an error
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - */ - public Builder setThrowError( - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder builderForValue) { - if (throwErrorBuilder_ == null) { - mode_ = builderForValue.build(); - onChanged(); - } else { - throwErrorBuilder_.setMessage(builderForValue.build()); - } - modeCase_ = 1; - return this; - } - /** - *
-     * Throw an error
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - */ - public Builder mergeThrowError(com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError value) { - if (throwErrorBuilder_ == null) { - if (modeCase_ == 1 && - mode_ != com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance()) { - mode_ = com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.newBuilder((com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_) - .mergeFrom(value).buildPartial(); - } else { - mode_ = value; - } - onChanged(); - } else { - if (modeCase_ == 1) { - throwErrorBuilder_.mergeFrom(value); - } else { - throwErrorBuilder_.setMessage(value); - } - } - modeCase_ = 1; - return this; - } - /** - *
-     * Throw an error
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - */ - public Builder clearThrowError() { - if (throwErrorBuilder_ == null) { - if (modeCase_ == 1) { - modeCase_ = 0; - mode_ = null; - onChanged(); - } - } else { - if (modeCase_ == 1) { - modeCase_ = 0; - mode_ = null; - } - throwErrorBuilder_.clear(); - } - return this; - } - /** - *
-     * Throw an error
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - */ - public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder getThrowErrorBuilder() { - return getThrowErrorFieldBuilder().getBuilder(); - } - /** - *
-     * Throw an error
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder getThrowErrorOrBuilder() { - if ((modeCase_ == 1) && (throwErrorBuilder_ != null)) { - return throwErrorBuilder_.getMessageOrBuilder(); - } else { - if (modeCase_ == 1) { - return (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_; - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); - } - } - /** - *
-     * Throw an error
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder> - getThrowErrorFieldBuilder() { - if (throwErrorBuilder_ == null) { - if (!(modeCase_ == 1)) { - mode_ = com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.getDefaultInstance(); - } - throwErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder>( - (com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) mode_, - getParentForChildren(), - isClean()); - mode_ = null; - } - modeCase_ = 1; - onChanged();; - return throwErrorBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder> leaveUntransformedBuilder_; - /** - *
-     * Ignore errors
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - * @return Whether the leaveUntransformed field is set. - */ - @java.lang.Override - public boolean hasLeaveUntransformed() { - return modeCase_ == 2; - } - /** - *
-     * Ignore errors
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - * @return The leaveUntransformed. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getLeaveUntransformed() { - if (leaveUntransformedBuilder_ == null) { - if (modeCase_ == 2) { - return (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_; - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); - } else { - if (modeCase_ == 2) { - return leaveUntransformedBuilder_.getMessage(); - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); - } - } - /** - *
-     * Ignore errors
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - */ - public Builder setLeaveUntransformed(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed value) { - if (leaveUntransformedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - mode_ = value; - onChanged(); - } else { - leaveUntransformedBuilder_.setMessage(value); - } - modeCase_ = 2; - return this; - } - /** - *
-     * Ignore errors
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - */ - public Builder setLeaveUntransformed( - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder builderForValue) { - if (leaveUntransformedBuilder_ == null) { - mode_ = builderForValue.build(); - onChanged(); - } else { - leaveUntransformedBuilder_.setMessage(builderForValue.build()); - } - modeCase_ = 2; - return this; - } - /** - *
-     * Ignore errors
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - */ - public Builder mergeLeaveUntransformed(com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed value) { - if (leaveUntransformedBuilder_ == null) { - if (modeCase_ == 2 && - mode_ != com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance()) { - mode_ = com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.newBuilder((com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_) - .mergeFrom(value).buildPartial(); - } else { - mode_ = value; - } - onChanged(); - } else { - if (modeCase_ == 2) { - leaveUntransformedBuilder_.mergeFrom(value); - } else { - leaveUntransformedBuilder_.setMessage(value); - } - } - modeCase_ = 2; - return this; - } - /** - *
-     * Ignore errors
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - */ - public Builder clearLeaveUntransformed() { - if (leaveUntransformedBuilder_ == null) { - if (modeCase_ == 2) { - modeCase_ = 0; - mode_ = null; - onChanged(); - } - } else { - if (modeCase_ == 2) { - modeCase_ = 0; - mode_ = null; - } - leaveUntransformedBuilder_.clear(); - } - return this; - } - /** - *
-     * Ignore errors
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - */ - public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder getLeaveUntransformedBuilder() { - return getLeaveUntransformedFieldBuilder().getBuilder(); - } - /** - *
-     * Ignore errors
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder getLeaveUntransformedOrBuilder() { - if ((modeCase_ == 2) && (leaveUntransformedBuilder_ != null)) { - return leaveUntransformedBuilder_.getMessageOrBuilder(); - } else { - if (modeCase_ == 2) { - return (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_; - } - return com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); - } - } - /** - *
-     * Ignore errors
-     * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder> - getLeaveUntransformedFieldBuilder() { - if (leaveUntransformedBuilder_ == null) { - if (!(modeCase_ == 2)) { - mode_ = com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.getDefaultInstance(); - } - leaveUntransformedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.Builder, com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder>( - (com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) mode_, - getParentForChildren(), - isClean()); - mode_ = null; - } - modeCase_ = 2; - onChanged();; - return leaveUntransformedBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationErrorHandling) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationErrorHandling) - private static final com.google.privacy.dlp.v2.TransformationErrorHandling DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationErrorHandling(); - } - - public static com.google.privacy.dlp.v2.TransformationErrorHandling getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransformationErrorHandling parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransformationErrorHandling(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationErrorHandling getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandlingOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandlingOrBuilder.java deleted file mode 100644 index d088516eb979..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationErrorHandlingOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface TransformationErrorHandlingOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationErrorHandling) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Throw an error
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - * @return Whether the throwError field is set. - */ - boolean hasThrowError(); - /** - *
-   * Throw an error
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - * @return The throwError. - */ - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError getThrowError(); - /** - *
-   * Throw an error
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.ThrowError throw_error = 1; - */ - com.google.privacy.dlp.v2.TransformationErrorHandling.ThrowErrorOrBuilder getThrowErrorOrBuilder(); - - /** - *
-   * Ignore errors
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - * @return Whether the leaveUntransformed field is set. - */ - boolean hasLeaveUntransformed(); - /** - *
-   * Ignore errors
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - * @return The leaveUntransformed. - */ - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed getLeaveUntransformed(); - /** - *
-   * Ignore errors
-   * 
- * - * .google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed leave_untransformed = 2; - */ - com.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformedOrBuilder getLeaveUntransformedOrBuilder(); - - public com.google.privacy.dlp.v2.TransformationErrorHandling.ModeCase getModeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverview.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverview.java deleted file mode 100644 index 687083d689da..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverview.java +++ /dev/null @@ -1,953 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Overview of the modifications that occurred.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationOverview} - */ -public final class TransformationOverview extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationOverview) - TransformationOverviewOrBuilder { -private static final long serialVersionUID = 0L; - // Use TransformationOverview.newBuilder() to construct. - private TransformationOverview(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TransformationOverview() { - transformationSummaries_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TransformationOverview(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TransformationOverview( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: { - - transformedBytes_ = input.readInt64(); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - transformationSummaries_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - transformationSummaries_.add( - input.readMessage(com.google.privacy.dlp.v2.TransformationSummary.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - transformationSummaries_ = java.util.Collections.unmodifiableList(transformationSummaries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationOverview.class, com.google.privacy.dlp.v2.TransformationOverview.Builder.class); - } - - public static final int TRANSFORMED_BYTES_FIELD_NUMBER = 2; - private long transformedBytes_; - /** - *
-   * Total size in bytes that were transformed in some way.
-   * 
- * - * int64 transformed_bytes = 2; - * @return The transformedBytes. - */ - @java.lang.Override - public long getTransformedBytes() { - return transformedBytes_; - } - - public static final int TRANSFORMATION_SUMMARIES_FIELD_NUMBER = 3; - private java.util.List transformationSummaries_; - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - @java.lang.Override - public java.util.List getTransformationSummariesList() { - return transformationSummaries_; - } - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - @java.lang.Override - public java.util.List - getTransformationSummariesOrBuilderList() { - return transformationSummaries_; - } - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - @java.lang.Override - public int getTransformationSummariesCount() { - return transformationSummaries_.size(); - } - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary getTransformationSummaries(int index) { - return transformationSummaries_.get(index); - } - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummaryOrBuilder getTransformationSummariesOrBuilder( - int index) { - return transformationSummaries_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (transformedBytes_ != 0L) { - output.writeInt64(2, transformedBytes_); - } - for (int i = 0; i < transformationSummaries_.size(); i++) { - output.writeMessage(3, transformationSummaries_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (transformedBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, transformedBytes_); - } - for (int i = 0; i < transformationSummaries_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, transformationSummaries_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TransformationOverview)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TransformationOverview other = (com.google.privacy.dlp.v2.TransformationOverview) obj; - - if (getTransformedBytes() - != other.getTransformedBytes()) return false; - if (!getTransformationSummariesList() - .equals(other.getTransformationSummariesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TRANSFORMED_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTransformedBytes()); - if (getTransformationSummariesCount() > 0) { - hash = (37 * hash) + TRANSFORMATION_SUMMARIES_FIELD_NUMBER; - hash = (53 * hash) + getTransformationSummariesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationOverview parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationOverview prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Overview of the modifications that occurred.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationOverview} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationOverview) - com.google.privacy.dlp.v2.TransformationOverviewOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationOverview.class, com.google.privacy.dlp.v2.TransformationOverview.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TransformationOverview.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getTransformationSummariesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - transformedBytes_ = 0L; - - if (transformationSummariesBuilder_ == null) { - transformationSummaries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - transformationSummariesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationOverview getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationOverview build() { - com.google.privacy.dlp.v2.TransformationOverview result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationOverview buildPartial() { - com.google.privacy.dlp.v2.TransformationOverview result = new com.google.privacy.dlp.v2.TransformationOverview(this); - int from_bitField0_ = bitField0_; - result.transformedBytes_ = transformedBytes_; - if (transformationSummariesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - transformationSummaries_ = java.util.Collections.unmodifiableList(transformationSummaries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.transformationSummaries_ = transformationSummaries_; - } else { - result.transformationSummaries_ = transformationSummariesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TransformationOverview) { - return mergeFrom((com.google.privacy.dlp.v2.TransformationOverview)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationOverview other) { - if (other == com.google.privacy.dlp.v2.TransformationOverview.getDefaultInstance()) return this; - if (other.getTransformedBytes() != 0L) { - setTransformedBytes(other.getTransformedBytes()); - } - if (transformationSummariesBuilder_ == null) { - if (!other.transformationSummaries_.isEmpty()) { - if (transformationSummaries_.isEmpty()) { - transformationSummaries_ = other.transformationSummaries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTransformationSummariesIsMutable(); - transformationSummaries_.addAll(other.transformationSummaries_); - } - onChanged(); - } - } else { - if (!other.transformationSummaries_.isEmpty()) { - if (transformationSummariesBuilder_.isEmpty()) { - transformationSummariesBuilder_.dispose(); - transformationSummariesBuilder_ = null; - transformationSummaries_ = other.transformationSummaries_; - bitField0_ = (bitField0_ & ~0x00000001); - transformationSummariesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTransformationSummariesFieldBuilder() : null; - } else { - transformationSummariesBuilder_.addAllMessages(other.transformationSummaries_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TransformationOverview parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TransformationOverview) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long transformedBytes_ ; - /** - *
-     * Total size in bytes that were transformed in some way.
-     * 
- * - * int64 transformed_bytes = 2; - * @return The transformedBytes. - */ - @java.lang.Override - public long getTransformedBytes() { - return transformedBytes_; - } - /** - *
-     * Total size in bytes that were transformed in some way.
-     * 
- * - * int64 transformed_bytes = 2; - * @param value The transformedBytes to set. - * @return This builder for chaining. - */ - public Builder setTransformedBytes(long value) { - - transformedBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * Total size in bytes that were transformed in some way.
-     * 
- * - * int64 transformed_bytes = 2; - * @return This builder for chaining. - */ - public Builder clearTransformedBytes() { - - transformedBytes_ = 0L; - onChanged(); - return this; - } - - private java.util.List transformationSummaries_ = - java.util.Collections.emptyList(); - private void ensureTransformationSummariesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - transformationSummaries_ = new java.util.ArrayList(transformationSummaries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationSummary, com.google.privacy.dlp.v2.TransformationSummary.Builder, com.google.privacy.dlp.v2.TransformationSummaryOrBuilder> transformationSummariesBuilder_; - - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public java.util.List getTransformationSummariesList() { - if (transformationSummariesBuilder_ == null) { - return java.util.Collections.unmodifiableList(transformationSummaries_); - } else { - return transformationSummariesBuilder_.getMessageList(); - } - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public int getTransformationSummariesCount() { - if (transformationSummariesBuilder_ == null) { - return transformationSummaries_.size(); - } else { - return transformationSummariesBuilder_.getCount(); - } - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public com.google.privacy.dlp.v2.TransformationSummary getTransformationSummaries(int index) { - if (transformationSummariesBuilder_ == null) { - return transformationSummaries_.get(index); - } else { - return transformationSummariesBuilder_.getMessage(index); - } - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public Builder setTransformationSummaries( - int index, com.google.privacy.dlp.v2.TransformationSummary value) { - if (transformationSummariesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransformationSummariesIsMutable(); - transformationSummaries_.set(index, value); - onChanged(); - } else { - transformationSummariesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public Builder setTransformationSummaries( - int index, com.google.privacy.dlp.v2.TransformationSummary.Builder builderForValue) { - if (transformationSummariesBuilder_ == null) { - ensureTransformationSummariesIsMutable(); - transformationSummaries_.set(index, builderForValue.build()); - onChanged(); - } else { - transformationSummariesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public Builder addTransformationSummaries(com.google.privacy.dlp.v2.TransformationSummary value) { - if (transformationSummariesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransformationSummariesIsMutable(); - transformationSummaries_.add(value); - onChanged(); - } else { - transformationSummariesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public Builder addTransformationSummaries( - int index, com.google.privacy.dlp.v2.TransformationSummary value) { - if (transformationSummariesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransformationSummariesIsMutable(); - transformationSummaries_.add(index, value); - onChanged(); - } else { - transformationSummariesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public Builder addTransformationSummaries( - com.google.privacy.dlp.v2.TransformationSummary.Builder builderForValue) { - if (transformationSummariesBuilder_ == null) { - ensureTransformationSummariesIsMutable(); - transformationSummaries_.add(builderForValue.build()); - onChanged(); - } else { - transformationSummariesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public Builder addTransformationSummaries( - int index, com.google.privacy.dlp.v2.TransformationSummary.Builder builderForValue) { - if (transformationSummariesBuilder_ == null) { - ensureTransformationSummariesIsMutable(); - transformationSummaries_.add(index, builderForValue.build()); - onChanged(); - } else { - transformationSummariesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public Builder addAllTransformationSummaries( - java.lang.Iterable values) { - if (transformationSummariesBuilder_ == null) { - ensureTransformationSummariesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, transformationSummaries_); - onChanged(); - } else { - transformationSummariesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public Builder clearTransformationSummaries() { - if (transformationSummariesBuilder_ == null) { - transformationSummaries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - transformationSummariesBuilder_.clear(); - } - return this; - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public Builder removeTransformationSummaries(int index) { - if (transformationSummariesBuilder_ == null) { - ensureTransformationSummariesIsMutable(); - transformationSummaries_.remove(index); - onChanged(); - } else { - transformationSummariesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public com.google.privacy.dlp.v2.TransformationSummary.Builder getTransformationSummariesBuilder( - int index) { - return getTransformationSummariesFieldBuilder().getBuilder(index); - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public com.google.privacy.dlp.v2.TransformationSummaryOrBuilder getTransformationSummariesOrBuilder( - int index) { - if (transformationSummariesBuilder_ == null) { - return transformationSummaries_.get(index); } else { - return transformationSummariesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public java.util.List - getTransformationSummariesOrBuilderList() { - if (transformationSummariesBuilder_ != null) { - return transformationSummariesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(transformationSummaries_); - } - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public com.google.privacy.dlp.v2.TransformationSummary.Builder addTransformationSummariesBuilder() { - return getTransformationSummariesFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.TransformationSummary.getDefaultInstance()); - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public com.google.privacy.dlp.v2.TransformationSummary.Builder addTransformationSummariesBuilder( - int index) { - return getTransformationSummariesFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.TransformationSummary.getDefaultInstance()); - } - /** - *
-     * Transformations applied to the dataset.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - public java.util.List - getTransformationSummariesBuilderList() { - return getTransformationSummariesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationSummary, com.google.privacy.dlp.v2.TransformationSummary.Builder, com.google.privacy.dlp.v2.TransformationSummaryOrBuilder> - getTransformationSummariesFieldBuilder() { - if (transformationSummariesBuilder_ == null) { - transformationSummariesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationSummary, com.google.privacy.dlp.v2.TransformationSummary.Builder, com.google.privacy.dlp.v2.TransformationSummaryOrBuilder>( - transformationSummaries_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - transformationSummaries_ = null; - } - return transformationSummariesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationOverview) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationOverview) - private static final com.google.privacy.dlp.v2.TransformationOverview DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationOverview(); - } - - public static com.google.privacy.dlp.v2.TransformationOverview getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransformationOverview parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransformationOverview(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationOverview getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverviewOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverviewOrBuilder.java deleted file mode 100644 index e293041d32df..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationOverviewOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface TransformationOverviewOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationOverview) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Total size in bytes that were transformed in some way.
-   * 
- * - * int64 transformed_bytes = 2; - * @return The transformedBytes. - */ - long getTransformedBytes(); - - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - java.util.List - getTransformationSummariesList(); - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - com.google.privacy.dlp.v2.TransformationSummary getTransformationSummaries(int index); - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - int getTransformationSummariesCount(); - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - java.util.List - getTransformationSummariesOrBuilderList(); - /** - *
-   * Transformations applied to the dataset.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary transformation_summaries = 3; - */ - com.google.privacy.dlp.v2.TransformationSummaryOrBuilder getTransformationSummariesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummary.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummary.java deleted file mode 100644 index f11a0d0a68a3..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummary.java +++ /dev/null @@ -1,3391 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Summary of a single transformation.
- * Only one of 'transformation', 'field_transformation', or 'record_suppress'
- * will be set.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationSummary} - */ -public final class TransformationSummary extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationSummary) - TransformationSummaryOrBuilder { -private static final long serialVersionUID = 0L; - // Use TransformationSummary.newBuilder() to construct. - private TransformationSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TransformationSummary() { - fieldTransformations_ = java.util.Collections.emptyList(); - results_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TransformationSummary(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TransformationSummary( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; - if (infoType_ != null) { - subBuilder = infoType_.toBuilder(); - } - infoType_ = input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(infoType_); - infoType_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; - if (field_ != null) { - subBuilder = field_.toBuilder(); - } - field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(field_); - field_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.privacy.dlp.v2.PrimitiveTransformation.Builder subBuilder = null; - if (transformation_ != null) { - subBuilder = transformation_.toBuilder(); - } - transformation_ = input.readMessage(com.google.privacy.dlp.v2.PrimitiveTransformation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(transformation_); - transformation_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - results_.add( - input.readMessage(com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fieldTransformations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fieldTransformations_.add( - input.readMessage(com.google.privacy.dlp.v2.FieldTransformation.parser(), extensionRegistry)); - break; - } - case 50: { - com.google.privacy.dlp.v2.RecordSuppression.Builder subBuilder = null; - if (recordSuppress_ != null) { - subBuilder = recordSuppress_.toBuilder(); - } - recordSuppress_ = input.readMessage(com.google.privacy.dlp.v2.RecordSuppression.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(recordSuppress_); - recordSuppress_ = subBuilder.buildPartial(); - } - - break; - } - case 56: { - - transformedBytes_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fieldTransformations_ = java.util.Collections.unmodifiableList(fieldTransformations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationSummary.class, com.google.privacy.dlp.v2.TransformationSummary.Builder.class); - } - - /** - *
-   * Possible outcomes of transformations.
-   * 
- * - * Protobuf enum {@code google.privacy.dlp.v2.TransformationSummary.TransformationResultCode} - */ - public enum TransformationResultCode - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unused
-     * 
- * - * TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; - */ - TRANSFORMATION_RESULT_CODE_UNSPECIFIED(0), - /** - *
-     * Transformation completed without an error.
-     * 
- * - * SUCCESS = 1; - */ - SUCCESS(1), - /** - *
-     * Transformation had an error.
-     * 
- * - * ERROR = 2; - */ - ERROR(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unused
-     * 
- * - * TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; - */ - public static final int TRANSFORMATION_RESULT_CODE_UNSPECIFIED_VALUE = 0; - /** - *
-     * Transformation completed without an error.
-     * 
- * - * SUCCESS = 1; - */ - public static final int SUCCESS_VALUE = 1; - /** - *
-     * Transformation had an error.
-     * 
- * - * ERROR = 2; - */ - public static final int ERROR_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TransformationResultCode valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static TransformationResultCode forNumber(int value) { - switch (value) { - case 0: return TRANSFORMATION_RESULT_CODE_UNSPECIFIED; - case 1: return SUCCESS; - case 2: return ERROR; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - TransformationResultCode> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TransformationResultCode findValueByNumber(int number) { - return TransformationResultCode.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.privacy.dlp.v2.TransformationSummary.getDescriptor().getEnumTypes().get(0); - } - - private static final TransformationResultCode[] VALUES = values(); - - public static TransformationResultCode valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private TransformationResultCode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.privacy.dlp.v2.TransformationSummary.TransformationResultCode) - } - - public interface SummaryResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationSummary.SummaryResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Number of transformations counted by this result.
-     * 
- * - * int64 count = 1; - * @return The count. - */ - long getCount(); - - /** - *
-     * Outcome of the transformation.
-     * 
- * - * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; - * @return The enum numeric value on the wire for code. - */ - int getCodeValue(); - /** - *
-     * Outcome of the transformation.
-     * 
- * - * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; - * @return The code. - */ - com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode getCode(); - - /** - *
-     * A place for warnings or errors to show up if a transformation didn't
-     * work as expected.
-     * 
- * - * string details = 3; - * @return The details. - */ - java.lang.String getDetails(); - /** - *
-     * A place for warnings or errors to show up if a transformation didn't
-     * work as expected.
-     * 
- * - * string details = 3; - * @return The bytes for details. - */ - com.google.protobuf.ByteString - getDetailsBytes(); - } - /** - *
-   * A collection that informs the user the number of times a particular
-   * `TransformationResultCode` and error details occurred.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationSummary.SummaryResult} - */ - public static final class SummaryResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransformationSummary.SummaryResult) - SummaryResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use SummaryResult.newBuilder() to construct. - private SummaryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SummaryResult() { - code_ = 0; - details_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SummaryResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SummaryResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - count_ = input.readInt64(); - break; - } - case 16: { - int rawValue = input.readEnum(); - - code_ = rawValue; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - details_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.class, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder.class); - } - - public static final int COUNT_FIELD_NUMBER = 1; - private long count_; - /** - *
-     * Number of transformations counted by this result.
-     * 
- * - * int64 count = 1; - * @return The count. - */ - @java.lang.Override - public long getCount() { - return count_; - } - - public static final int CODE_FIELD_NUMBER = 2; - private int code_; - /** - *
-     * Outcome of the transformation.
-     * 
- * - * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; - * @return The enum numeric value on the wire for code. - */ - @java.lang.Override public int getCodeValue() { - return code_; - } - /** - *
-     * Outcome of the transformation.
-     * 
- * - * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; - * @return The code. - */ - @java.lang.Override public com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode getCode() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode result = com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.valueOf(code_); - return result == null ? com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.UNRECOGNIZED : result; - } - - public static final int DETAILS_FIELD_NUMBER = 3; - private volatile java.lang.Object details_; - /** - *
-     * A place for warnings or errors to show up if a transformation didn't
-     * work as expected.
-     * 
- * - * string details = 3; - * @return The details. - */ - @java.lang.Override - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } - } - /** - *
-     * A place for warnings or errors to show up if a transformation didn't
-     * work as expected.
-     * 
- * - * string details = 3; - * @return The bytes for details. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (count_ != 0L) { - output.writeInt64(1, count_); - } - if (code_ != com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.TRANSFORMATION_RESULT_CODE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, code_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, details_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (count_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, count_); - } - if (code_ != com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.TRANSFORMATION_RESULT_CODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, code_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(details_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, details_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TransformationSummary.SummaryResult)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult other = (com.google.privacy.dlp.v2.TransformationSummary.SummaryResult) obj; - - if (getCount() - != other.getCount()) return false; - if (code_ != other.code_) return false; - if (!getDetails() - .equals(other.getDetails())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCount()); - hash = (37 * hash) + CODE_FIELD_NUMBER; - hash = (53 * hash) + code_; - hash = (37 * hash) + DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDetails().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationSummary.SummaryResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A collection that informs the user the number of times a particular
-     * `TransformationResultCode` and error details occurred.
-     * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationSummary.SummaryResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationSummary.SummaryResult) - com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.class, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - count_ = 0L; - - code_ = 0; - - details_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult build() { - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult buildPartial() { - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult result = new com.google.privacy.dlp.v2.TransformationSummary.SummaryResult(this); - result.count_ = count_; - result.code_ = code_; - result.details_ = details_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TransformationSummary.SummaryResult) { - return mergeFrom((com.google.privacy.dlp.v2.TransformationSummary.SummaryResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationSummary.SummaryResult other) { - if (other == com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.getDefaultInstance()) return this; - if (other.getCount() != 0L) { - setCount(other.getCount()); - } - if (other.code_ != 0) { - setCodeValue(other.getCodeValue()); - } - if (!other.getDetails().isEmpty()) { - details_ = other.details_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TransformationSummary.SummaryResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long count_ ; - /** - *
-       * Number of transformations counted by this result.
-       * 
- * - * int64 count = 1; - * @return The count. - */ - @java.lang.Override - public long getCount() { - return count_; - } - /** - *
-       * Number of transformations counted by this result.
-       * 
- * - * int64 count = 1; - * @param value The count to set. - * @return This builder for chaining. - */ - public Builder setCount(long value) { - - count_ = value; - onChanged(); - return this; - } - /** - *
-       * Number of transformations counted by this result.
-       * 
- * - * int64 count = 1; - * @return This builder for chaining. - */ - public Builder clearCount() { - - count_ = 0L; - onChanged(); - return this; - } - - private int code_ = 0; - /** - *
-       * Outcome of the transformation.
-       * 
- * - * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; - * @return The enum numeric value on the wire for code. - */ - @java.lang.Override public int getCodeValue() { - return code_; - } - /** - *
-       * Outcome of the transformation.
-       * 
- * - * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; - * @param value The enum numeric value on the wire for code to set. - * @return This builder for chaining. - */ - public Builder setCodeValue(int value) { - - code_ = value; - onChanged(); - return this; - } - /** - *
-       * Outcome of the transformation.
-       * 
- * - * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; - * @return The code. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode getCode() { - @SuppressWarnings("deprecation") - com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode result = com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.valueOf(code_); - return result == null ? com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode.UNRECOGNIZED : result; - } - /** - *
-       * Outcome of the transformation.
-       * 
- * - * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; - * @param value The code to set. - * @return This builder for chaining. - */ - public Builder setCode(com.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode value) { - if (value == null) { - throw new NullPointerException(); - } - - code_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * Outcome of the transformation.
-       * 
- * - * .google.privacy.dlp.v2.TransformationSummary.TransformationResultCode code = 2; - * @return This builder for chaining. - */ - public Builder clearCode() { - - code_ = 0; - onChanged(); - return this; - } - - private java.lang.Object details_ = ""; - /** - *
-       * A place for warnings or errors to show up if a transformation didn't
-       * work as expected.
-       * 
- * - * string details = 3; - * @return The details. - */ - public java.lang.String getDetails() { - java.lang.Object ref = details_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - details_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A place for warnings or errors to show up if a transformation didn't
-       * work as expected.
-       * 
- * - * string details = 3; - * @return The bytes for details. - */ - public com.google.protobuf.ByteString - getDetailsBytes() { - java.lang.Object ref = details_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - details_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A place for warnings or errors to show up if a transformation didn't
-       * work as expected.
-       * 
- * - * string details = 3; - * @param value The details to set. - * @return This builder for chaining. - */ - public Builder setDetails( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - details_ = value; - onChanged(); - return this; - } - /** - *
-       * A place for warnings or errors to show up if a transformation didn't
-       * work as expected.
-       * 
- * - * string details = 3; - * @return This builder for chaining. - */ - public Builder clearDetails() { - - details_ = getDefaultInstance().getDetails(); - onChanged(); - return this; - } - /** - *
-       * A place for warnings or errors to show up if a transformation didn't
-       * work as expected.
-       * 
- * - * string details = 3; - * @param value The bytes for details to set. - * @return This builder for chaining. - */ - public Builder setDetailsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - details_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationSummary.SummaryResult) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationSummary.SummaryResult) - private static final com.google.privacy.dlp.v2.TransformationSummary.SummaryResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationSummary.SummaryResult(); - } - - public static com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SummaryResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SummaryResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int INFO_TYPE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.InfoType infoType_; - /** - *
-   * Set if the transformation was limited to a specific InfoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - @java.lang.Override - public boolean hasInfoType() { - return infoType_ != null; - } - /** - *
-   * Set if the transformation was limited to a specific InfoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoType getInfoType() { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - /** - *
-   * Set if the transformation was limited to a specific InfoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - return getInfoType(); - } - - public static final int FIELD_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.FieldId field_; - /** - *
-   * Set if the transformation was limited to a specific FieldId.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return Whether the field field is set. - */ - @java.lang.Override - public boolean hasField() { - return field_ != null; - } - /** - *
-   * Set if the transformation was limited to a specific FieldId.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return The field. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldId getField() { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - /** - *
-   * Set if the transformation was limited to a specific FieldId.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - return getField(); - } - - public static final int TRANSFORMATION_FIELD_NUMBER = 3; - private com.google.privacy.dlp.v2.PrimitiveTransformation transformation_; - /** - *
-   * The specific transformation these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - * @return Whether the transformation field is set. - */ - @java.lang.Override - public boolean hasTransformation() { - return transformation_ != null; - } - /** - *
-   * The specific transformation these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - * @return The transformation. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformation getTransformation() { - return transformation_ == null ? com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : transformation_; - } - /** - *
-   * The specific transformation these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getTransformationOrBuilder() { - return getTransformation(); - } - - public static final int FIELD_TRANSFORMATIONS_FIELD_NUMBER = 5; - private java.util.List fieldTransformations_; - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - @java.lang.Override - public java.util.List getFieldTransformationsList() { - return fieldTransformations_; - } - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - @java.lang.Override - public java.util.List - getFieldTransformationsOrBuilderList() { - return fieldTransformations_; - } - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - @java.lang.Override - public int getFieldTransformationsCount() { - return fieldTransformations_.size(); - } - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index) { - return fieldTransformations_.get(index); - } - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( - int index) { - return fieldTransformations_.get(index); - } - - public static final int RECORD_SUPPRESS_FIELD_NUMBER = 6; - private com.google.privacy.dlp.v2.RecordSuppression recordSuppress_; - /** - *
-   * The specific suppression option these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - * @return Whether the recordSuppress field is set. - */ - @java.lang.Override - public boolean hasRecordSuppress() { - return recordSuppress_ != null; - } - /** - *
-   * The specific suppression option these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - * @return The recordSuppress. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordSuppression getRecordSuppress() { - return recordSuppress_ == null ? com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance() : recordSuppress_; - } - /** - *
-   * The specific suppression option these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressOrBuilder() { - return getRecordSuppress(); - } - - public static final int RESULTS_FIELD_NUMBER = 4; - private java.util.List results_; - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getResults(int index) { - return results_.get(index); - } - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int TRANSFORMED_BYTES_FIELD_NUMBER = 7; - private long transformedBytes_; - /** - *
-   * Total size in bytes that were transformed in some way.
-   * 
- * - * int64 transformed_bytes = 7; - * @return The transformedBytes. - */ - @java.lang.Override - public long getTransformedBytes() { - return transformedBytes_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (infoType_ != null) { - output.writeMessage(1, getInfoType()); - } - if (field_ != null) { - output.writeMessage(2, getField()); - } - if (transformation_ != null) { - output.writeMessage(3, getTransformation()); - } - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(4, results_.get(i)); - } - for (int i = 0; i < fieldTransformations_.size(); i++) { - output.writeMessage(5, fieldTransformations_.get(i)); - } - if (recordSuppress_ != null) { - output.writeMessage(6, getRecordSuppress()); - } - if (transformedBytes_ != 0L) { - output.writeInt64(7, transformedBytes_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (infoType_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getInfoType()); - } - if (field_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getField()); - } - if (transformation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTransformation()); - } - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, results_.get(i)); - } - for (int i = 0; i < fieldTransformations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, fieldTransformations_.get(i)); - } - if (recordSuppress_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getRecordSuppress()); - } - if (transformedBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(7, transformedBytes_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TransformationSummary)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TransformationSummary other = (com.google.privacy.dlp.v2.TransformationSummary) obj; - - if (hasInfoType() != other.hasInfoType()) return false; - if (hasInfoType()) { - if (!getInfoType() - .equals(other.getInfoType())) return false; - } - if (hasField() != other.hasField()) return false; - if (hasField()) { - if (!getField() - .equals(other.getField())) return false; - } - if (hasTransformation() != other.hasTransformation()) return false; - if (hasTransformation()) { - if (!getTransformation() - .equals(other.getTransformation())) return false; - } - if (!getFieldTransformationsList() - .equals(other.getFieldTransformationsList())) return false; - if (hasRecordSuppress() != other.hasRecordSuppress()) return false; - if (hasRecordSuppress()) { - if (!getRecordSuppress() - .equals(other.getRecordSuppress())) return false; - } - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (getTransformedBytes() - != other.getTransformedBytes()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasInfoType()) { - hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getInfoType().hashCode(); - } - if (hasField()) { - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - } - if (hasTransformation()) { - hash = (37 * hash) + TRANSFORMATION_FIELD_NUMBER; - hash = (53 * hash) + getTransformation().hashCode(); - } - if (getFieldTransformationsCount() > 0) { - hash = (37 * hash) + FIELD_TRANSFORMATIONS_FIELD_NUMBER; - hash = (53 * hash) + getFieldTransformationsList().hashCode(); - } - if (hasRecordSuppress()) { - hash = (37 * hash) + RECORD_SUPPRESS_FIELD_NUMBER; - hash = (53 * hash) + getRecordSuppress().hashCode(); - } - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - hash = (37 * hash) + TRANSFORMED_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTransformedBytes()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransformationSummary parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TransformationSummary prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Summary of a single transformation.
-   * Only one of 'transformation', 'field_transformation', or 'record_suppress'
-   * will be set.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransformationSummary} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransformationSummary) - com.google.privacy.dlp.v2.TransformationSummaryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransformationSummary.class, com.google.privacy.dlp.v2.TransformationSummary.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TransformationSummary.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFieldTransformationsFieldBuilder(); - getResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (infoTypeBuilder_ == null) { - infoType_ = null; - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - if (fieldBuilder_ == null) { - field_ = null; - } else { - field_ = null; - fieldBuilder_ = null; - } - if (transformationBuilder_ == null) { - transformation_ = null; - } else { - transformation_ = null; - transformationBuilder_ = null; - } - if (fieldTransformationsBuilder_ == null) { - fieldTransformations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldTransformationsBuilder_.clear(); - } - if (recordSuppressBuilder_ == null) { - recordSuppress_ = null; - } else { - recordSuppress_ = null; - recordSuppressBuilder_ = null; - } - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - resultsBuilder_.clear(); - } - transformedBytes_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TransformationSummary.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary build() { - com.google.privacy.dlp.v2.TransformationSummary result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary buildPartial() { - com.google.privacy.dlp.v2.TransformationSummary result = new com.google.privacy.dlp.v2.TransformationSummary(this); - int from_bitField0_ = bitField0_; - if (infoTypeBuilder_ == null) { - result.infoType_ = infoType_; - } else { - result.infoType_ = infoTypeBuilder_.build(); - } - if (fieldBuilder_ == null) { - result.field_ = field_; - } else { - result.field_ = fieldBuilder_.build(); - } - if (transformationBuilder_ == null) { - result.transformation_ = transformation_; - } else { - result.transformation_ = transformationBuilder_.build(); - } - if (fieldTransformationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fieldTransformations_ = java.util.Collections.unmodifiableList(fieldTransformations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fieldTransformations_ = fieldTransformations_; - } else { - result.fieldTransformations_ = fieldTransformationsBuilder_.build(); - } - if (recordSuppressBuilder_ == null) { - result.recordSuppress_ = recordSuppress_; - } else { - result.recordSuppress_ = recordSuppressBuilder_.build(); - } - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - result.transformedBytes_ = transformedBytes_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TransformationSummary) { - return mergeFrom((com.google.privacy.dlp.v2.TransformationSummary)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TransformationSummary other) { - if (other == com.google.privacy.dlp.v2.TransformationSummary.getDefaultInstance()) return this; - if (other.hasInfoType()) { - mergeInfoType(other.getInfoType()); - } - if (other.hasField()) { - mergeField(other.getField()); - } - if (other.hasTransformation()) { - mergeTransformation(other.getTransformation()); - } - if (fieldTransformationsBuilder_ == null) { - if (!other.fieldTransformations_.isEmpty()) { - if (fieldTransformations_.isEmpty()) { - fieldTransformations_ = other.fieldTransformations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.addAll(other.fieldTransformations_); - } - onChanged(); - } - } else { - if (!other.fieldTransformations_.isEmpty()) { - if (fieldTransformationsBuilder_.isEmpty()) { - fieldTransformationsBuilder_.dispose(); - fieldTransformationsBuilder_ = null; - fieldTransformations_ = other.fieldTransformations_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldTransformationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFieldTransformationsFieldBuilder() : null; - } else { - fieldTransformationsBuilder_.addAllMessages(other.fieldTransformations_); - } - } - } - if (other.hasRecordSuppress()) { - mergeRecordSuppress(other.getRecordSuppress()); - } - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000002); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (other.getTransformedBytes() != 0L) { - setTransformedBytes(other.getTransformedBytes()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TransformationSummary parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TransformationSummary) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.privacy.dlp.v2.InfoType infoType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; - /** - *
-     * Set if the transformation was limited to a specific InfoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - public boolean hasInfoType() { - return infoTypeBuilder_ != null || infoType_ != null; - } - /** - *
-     * Set if the transformation was limited to a specific InfoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - public com.google.privacy.dlp.v2.InfoType getInfoType() { - if (infoTypeBuilder_ == null) { - return infoType_ == null ? com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } else { - return infoTypeBuilder_.getMessage(); - } - } - /** - *
-     * Set if the transformation was limited to a specific InfoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - infoType_ = value; - onChanged(); - } else { - infoTypeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Set if the transformation was limited to a specific InfoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder setInfoType( - com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { - if (infoTypeBuilder_ == null) { - infoType_ = builderForValue.build(); - onChanged(); - } else { - infoTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Set if the transformation was limited to a specific InfoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { - if (infoTypeBuilder_ == null) { - if (infoType_ != null) { - infoType_ = - com.google.privacy.dlp.v2.InfoType.newBuilder(infoType_).mergeFrom(value).buildPartial(); - } else { - infoType_ = value; - } - onChanged(); - } else { - infoTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Set if the transformation was limited to a specific InfoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public Builder clearInfoType() { - if (infoTypeBuilder_ == null) { - infoType_ = null; - onChanged(); - } else { - infoType_ = null; - infoTypeBuilder_ = null; - } - - return this; - } - /** - *
-     * Set if the transformation was limited to a specific InfoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { - - onChanged(); - return getInfoTypeFieldBuilder().getBuilder(); - } - /** - *
-     * Set if the transformation was limited to a specific InfoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { - if (infoTypeBuilder_ != null) { - return infoTypeBuilder_.getMessageOrBuilder(); - } else { - return infoType_ == null ? - com.google.privacy.dlp.v2.InfoType.getDefaultInstance() : infoType_; - } - } - /** - *
-     * Set if the transformation was limited to a specific InfoType.
-     * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> - getInfoTypeFieldBuilder() { - if (infoTypeBuilder_ == null) { - infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( - getInfoType(), - getParentForChildren(), - isClean()); - infoType_ = null; - } - return infoTypeBuilder_; - } - - private com.google.privacy.dlp.v2.FieldId field_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; - /** - *
-     * Set if the transformation was limited to a specific FieldId.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return Whether the field field is set. - */ - public boolean hasField() { - return fieldBuilder_ != null || field_ != null; - } - /** - *
-     * Set if the transformation was limited to a specific FieldId.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return The field. - */ - public com.google.privacy.dlp.v2.FieldId getField() { - if (fieldBuilder_ == null) { - return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } else { - return fieldBuilder_.getMessage(); - } - } - /** - *
-     * Set if the transformation was limited to a specific FieldId.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public Builder setField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - field_ = value; - onChanged(); - } else { - fieldBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Set if the transformation was limited to a specific FieldId.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public Builder setField( - com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { - if (fieldBuilder_ == null) { - field_ = builderForValue.build(); - onChanged(); - } else { - fieldBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Set if the transformation was limited to a specific FieldId.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { - if (fieldBuilder_ == null) { - if (field_ != null) { - field_ = - com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); - } else { - field_ = value; - } - onChanged(); - } else { - fieldBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Set if the transformation was limited to a specific FieldId.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public Builder clearField() { - if (fieldBuilder_ == null) { - field_ = null; - onChanged(); - } else { - field_ = null; - fieldBuilder_ = null; - } - - return this; - } - /** - *
-     * Set if the transformation was limited to a specific FieldId.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { - - onChanged(); - return getFieldFieldBuilder().getBuilder(); - } - /** - *
-     * Set if the transformation was limited to a specific FieldId.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { - if (fieldBuilder_ != null) { - return fieldBuilder_.getMessageOrBuilder(); - } else { - return field_ == null ? - com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; - } - } - /** - *
-     * Set if the transformation was limited to a specific FieldId.
-     * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> - getFieldFieldBuilder() { - if (fieldBuilder_ == null) { - fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( - getField(), - getParentForChildren(), - isClean()); - field_ = null; - } - return fieldBuilder_; - } - - private com.google.privacy.dlp.v2.PrimitiveTransformation transformation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> transformationBuilder_; - /** - *
-     * The specific transformation these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - * @return Whether the transformation field is set. - */ - public boolean hasTransformation() { - return transformationBuilder_ != null || transformation_ != null; - } - /** - *
-     * The specific transformation these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - * @return The transformation. - */ - public com.google.privacy.dlp.v2.PrimitiveTransformation getTransformation() { - if (transformationBuilder_ == null) { - return transformation_ == null ? com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : transformation_; - } else { - return transformationBuilder_.getMessage(); - } - } - /** - *
-     * The specific transformation these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - */ - public Builder setTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { - if (transformationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transformation_ = value; - onChanged(); - } else { - transformationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The specific transformation these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - */ - public Builder setTransformation( - com.google.privacy.dlp.v2.PrimitiveTransformation.Builder builderForValue) { - if (transformationBuilder_ == null) { - transformation_ = builderForValue.build(); - onChanged(); - } else { - transformationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The specific transformation these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - */ - public Builder mergeTransformation(com.google.privacy.dlp.v2.PrimitiveTransformation value) { - if (transformationBuilder_ == null) { - if (transformation_ != null) { - transformation_ = - com.google.privacy.dlp.v2.PrimitiveTransformation.newBuilder(transformation_).mergeFrom(value).buildPartial(); - } else { - transformation_ = value; - } - onChanged(); - } else { - transformationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The specific transformation these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - */ - public Builder clearTransformation() { - if (transformationBuilder_ == null) { - transformation_ = null; - onChanged(); - } else { - transformation_ = null; - transformationBuilder_ = null; - } - - return this; - } - /** - *
-     * The specific transformation these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - */ - public com.google.privacy.dlp.v2.PrimitiveTransformation.Builder getTransformationBuilder() { - - onChanged(); - return getTransformationFieldBuilder().getBuilder(); - } - /** - *
-     * The specific transformation these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - */ - public com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getTransformationOrBuilder() { - if (transformationBuilder_ != null) { - return transformationBuilder_.getMessageOrBuilder(); - } else { - return transformation_ == null ? - com.google.privacy.dlp.v2.PrimitiveTransformation.getDefaultInstance() : transformation_; - } - } - /** - *
-     * The specific transformation these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder> - getTransformationFieldBuilder() { - if (transformationBuilder_ == null) { - transformationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.PrimitiveTransformation, com.google.privacy.dlp.v2.PrimitiveTransformation.Builder, com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder>( - getTransformation(), - getParentForChildren(), - isClean()); - transformation_ = null; - } - return transformationBuilder_; - } - - private java.util.List fieldTransformations_ = - java.util.Collections.emptyList(); - private void ensureFieldTransformationsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fieldTransformations_ = new java.util.ArrayList(fieldTransformations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder> fieldTransformationsBuilder_; - - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public java.util.List getFieldTransformationsList() { - if (fieldTransformationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fieldTransformations_); - } else { - return fieldTransformationsBuilder_.getMessageList(); - } - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public int getFieldTransformationsCount() { - if (fieldTransformationsBuilder_ == null) { - return fieldTransformations_.size(); - } else { - return fieldTransformationsBuilder_.getCount(); - } - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index) { - if (fieldTransformationsBuilder_ == null) { - return fieldTransformations_.get(index); - } else { - return fieldTransformationsBuilder_.getMessage(index); - } - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public Builder setFieldTransformations( - int index, com.google.privacy.dlp.v2.FieldTransformation value) { - if (fieldTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldTransformationsIsMutable(); - fieldTransformations_.set(index, value); - onChanged(); - } else { - fieldTransformationsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public Builder setFieldTransformations( - int index, com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldTransformationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public Builder addFieldTransformations(com.google.privacy.dlp.v2.FieldTransformation value) { - if (fieldTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldTransformationsIsMutable(); - fieldTransformations_.add(value); - onChanged(); - } else { - fieldTransformationsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public Builder addFieldTransformations( - int index, com.google.privacy.dlp.v2.FieldTransformation value) { - if (fieldTransformationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldTransformationsIsMutable(); - fieldTransformations_.add(index, value); - onChanged(); - } else { - fieldTransformationsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public Builder addFieldTransformations( - com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.add(builderForValue.build()); - onChanged(); - } else { - fieldTransformationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public Builder addFieldTransformations( - int index, com.google.privacy.dlp.v2.FieldTransformation.Builder builderForValue) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldTransformationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public Builder addAllFieldTransformations( - java.lang.Iterable values) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fieldTransformations_); - onChanged(); - } else { - fieldTransformationsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public Builder clearFieldTransformations() { - if (fieldTransformationsBuilder_ == null) { - fieldTransformations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldTransformationsBuilder_.clear(); - } - return this; - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public Builder removeFieldTransformations(int index) { - if (fieldTransformationsBuilder_ == null) { - ensureFieldTransformationsIsMutable(); - fieldTransformations_.remove(index); - onChanged(); - } else { - fieldTransformationsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public com.google.privacy.dlp.v2.FieldTransformation.Builder getFieldTransformationsBuilder( - int index) { - return getFieldTransformationsFieldBuilder().getBuilder(index); - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( - int index) { - if (fieldTransformationsBuilder_ == null) { - return fieldTransformations_.get(index); } else { - return fieldTransformationsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public java.util.List - getFieldTransformationsOrBuilderList() { - if (fieldTransformationsBuilder_ != null) { - return fieldTransformationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fieldTransformations_); - } - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public com.google.privacy.dlp.v2.FieldTransformation.Builder addFieldTransformationsBuilder() { - return getFieldTransformationsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()); - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public com.google.privacy.dlp.v2.FieldTransformation.Builder addFieldTransformationsBuilder( - int index) { - return getFieldTransformationsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.FieldTransformation.getDefaultInstance()); - } - /** - *
-     * The field transformation that was applied.
-     * If multiple field transformations are requested for a single field,
-     * this list will contain all of them; otherwise, only one is supplied.
-     * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - public java.util.List - getFieldTransformationsBuilderList() { - return getFieldTransformationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder> - getFieldTransformationsFieldBuilder() { - if (fieldTransformationsBuilder_ == null) { - fieldTransformationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.FieldTransformation, com.google.privacy.dlp.v2.FieldTransformation.Builder, com.google.privacy.dlp.v2.FieldTransformationOrBuilder>( - fieldTransformations_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fieldTransformations_ = null; - } - return fieldTransformationsBuilder_; - } - - private com.google.privacy.dlp.v2.RecordSuppression recordSuppress_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder> recordSuppressBuilder_; - /** - *
-     * The specific suppression option these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - * @return Whether the recordSuppress field is set. - */ - public boolean hasRecordSuppress() { - return recordSuppressBuilder_ != null || recordSuppress_ != null; - } - /** - *
-     * The specific suppression option these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - * @return The recordSuppress. - */ - public com.google.privacy.dlp.v2.RecordSuppression getRecordSuppress() { - if (recordSuppressBuilder_ == null) { - return recordSuppress_ == null ? com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance() : recordSuppress_; - } else { - return recordSuppressBuilder_.getMessage(); - } - } - /** - *
-     * The specific suppression option these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - */ - public Builder setRecordSuppress(com.google.privacy.dlp.v2.RecordSuppression value) { - if (recordSuppressBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - recordSuppress_ = value; - onChanged(); - } else { - recordSuppressBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The specific suppression option these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - */ - public Builder setRecordSuppress( - com.google.privacy.dlp.v2.RecordSuppression.Builder builderForValue) { - if (recordSuppressBuilder_ == null) { - recordSuppress_ = builderForValue.build(); - onChanged(); - } else { - recordSuppressBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The specific suppression option these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - */ - public Builder mergeRecordSuppress(com.google.privacy.dlp.v2.RecordSuppression value) { - if (recordSuppressBuilder_ == null) { - if (recordSuppress_ != null) { - recordSuppress_ = - com.google.privacy.dlp.v2.RecordSuppression.newBuilder(recordSuppress_).mergeFrom(value).buildPartial(); - } else { - recordSuppress_ = value; - } - onChanged(); - } else { - recordSuppressBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The specific suppression option these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - */ - public Builder clearRecordSuppress() { - if (recordSuppressBuilder_ == null) { - recordSuppress_ = null; - onChanged(); - } else { - recordSuppress_ = null; - recordSuppressBuilder_ = null; - } - - return this; - } - /** - *
-     * The specific suppression option these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - */ - public com.google.privacy.dlp.v2.RecordSuppression.Builder getRecordSuppressBuilder() { - - onChanged(); - return getRecordSuppressFieldBuilder().getBuilder(); - } - /** - *
-     * The specific suppression option these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - */ - public com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressOrBuilder() { - if (recordSuppressBuilder_ != null) { - return recordSuppressBuilder_.getMessageOrBuilder(); - } else { - return recordSuppress_ == null ? - com.google.privacy.dlp.v2.RecordSuppression.getDefaultInstance() : recordSuppress_; - } - } - /** - *
-     * The specific suppression option these stats apply to.
-     * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder> - getRecordSuppressFieldBuilder() { - if (recordSuppressBuilder_ == null) { - recordSuppressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.RecordSuppression, com.google.privacy.dlp.v2.RecordSuppression.Builder, com.google.privacy.dlp.v2.RecordSuppressionOrBuilder>( - getRecordSuppress(), - getParentForChildren(), - isClean()); - recordSuppress_ = null; - } - return recordSuppressBuilder_; - } - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder, com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder> resultsBuilder_; - - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public Builder setResults( - int index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public Builder setResults( - int index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public Builder addResults(com.google.privacy.dlp.v2.TransformationSummary.SummaryResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public Builder addResults( - int index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public Builder addResults( - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public Builder addResults( - int index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.getDefaultInstance()); - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.getDefaultInstance()); - } - /** - *
-     * Collection of all transformations that took place or had an error.
-     * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder, com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult, com.google.privacy.dlp.v2.TransformationSummary.SummaryResult.Builder, com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder>( - results_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private long transformedBytes_ ; - /** - *
-     * Total size in bytes that were transformed in some way.
-     * 
- * - * int64 transformed_bytes = 7; - * @return The transformedBytes. - */ - @java.lang.Override - public long getTransformedBytes() { - return transformedBytes_; - } - /** - *
-     * Total size in bytes that were transformed in some way.
-     * 
- * - * int64 transformed_bytes = 7; - * @param value The transformedBytes to set. - * @return This builder for chaining. - */ - public Builder setTransformedBytes(long value) { - - transformedBytes_ = value; - onChanged(); - return this; - } - /** - *
-     * Total size in bytes that were transformed in some way.
-     * 
- * - * int64 transformed_bytes = 7; - * @return This builder for chaining. - */ - public Builder clearTransformedBytes() { - - transformedBytes_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransformationSummary) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransformationSummary) - private static final com.google.privacy.dlp.v2.TransformationSummary DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransformationSummary(); - } - - public static com.google.privacy.dlp.v2.TransformationSummary getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransformationSummary parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransformationSummary(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransformationSummary getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummaryOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummaryOrBuilder.java deleted file mode 100644 index 680cc23117e3..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransformationSummaryOrBuilder.java +++ /dev/null @@ -1,225 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface TransformationSummaryOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransformationSummary) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Set if the transformation was limited to a specific InfoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return Whether the infoType field is set. - */ - boolean hasInfoType(); - /** - *
-   * Set if the transformation was limited to a specific InfoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - * @return The infoType. - */ - com.google.privacy.dlp.v2.InfoType getInfoType(); - /** - *
-   * Set if the transformation was limited to a specific InfoType.
-   * 
- * - * .google.privacy.dlp.v2.InfoType info_type = 1; - */ - com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); - - /** - *
-   * Set if the transformation was limited to a specific FieldId.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return Whether the field field is set. - */ - boolean hasField(); - /** - *
-   * Set if the transformation was limited to a specific FieldId.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - * @return The field. - */ - com.google.privacy.dlp.v2.FieldId getField(); - /** - *
-   * Set if the transformation was limited to a specific FieldId.
-   * 
- * - * .google.privacy.dlp.v2.FieldId field = 2; - */ - com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); - - /** - *
-   * The specific transformation these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - * @return Whether the transformation field is set. - */ - boolean hasTransformation(); - /** - *
-   * The specific transformation these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - * @return The transformation. - */ - com.google.privacy.dlp.v2.PrimitiveTransformation getTransformation(); - /** - *
-   * The specific transformation these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.PrimitiveTransformation transformation = 3; - */ - com.google.privacy.dlp.v2.PrimitiveTransformationOrBuilder getTransformationOrBuilder(); - - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - java.util.List - getFieldTransformationsList(); - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - com.google.privacy.dlp.v2.FieldTransformation getFieldTransformations(int index); - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - int getFieldTransformationsCount(); - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - java.util.List - getFieldTransformationsOrBuilderList(); - /** - *
-   * The field transformation that was applied.
-   * If multiple field transformations are requested for a single field,
-   * this list will contain all of them; otherwise, only one is supplied.
-   * 
- * - * repeated .google.privacy.dlp.v2.FieldTransformation field_transformations = 5; - */ - com.google.privacy.dlp.v2.FieldTransformationOrBuilder getFieldTransformationsOrBuilder( - int index); - - /** - *
-   * The specific suppression option these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - * @return Whether the recordSuppress field is set. - */ - boolean hasRecordSuppress(); - /** - *
-   * The specific suppression option these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - * @return The recordSuppress. - */ - com.google.privacy.dlp.v2.RecordSuppression getRecordSuppress(); - /** - *
-   * The specific suppression option these stats apply to.
-   * 
- * - * .google.privacy.dlp.v2.RecordSuppression record_suppress = 6; - */ - com.google.privacy.dlp.v2.RecordSuppressionOrBuilder getRecordSuppressOrBuilder(); - - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - java.util.List - getResultsList(); - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getResults(int index); - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - int getResultsCount(); - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-   * Collection of all transformations that took place or had an error.
-   * 
- * - * repeated .google.privacy.dlp.v2.TransformationSummary.SummaryResult results = 4; - */ - com.google.privacy.dlp.v2.TransformationSummary.SummaryResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-   * Total size in bytes that were transformed in some way.
-   * 
- * - * int64 transformed_bytes = 7; - * @return The transformedBytes. - */ - long getTransformedBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKey.java deleted file mode 100644 index 59900aa0e3cd..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKey.java +++ /dev/null @@ -1,632 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Use this to have a random data crypto key generated.
- * It will be discarded after the request finishes.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransientCryptoKey} - */ -public final class TransientCryptoKey extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.TransientCryptoKey) - TransientCryptoKeyOrBuilder { -private static final long serialVersionUID = 0L; - // Use TransientCryptoKey.newBuilder() to construct. - private TransientCryptoKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TransientCryptoKey() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TransientCryptoKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TransientCryptoKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransientCryptoKey.class, com.google.privacy.dlp.v2.TransientCryptoKey.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Name of the key.
-   * This is an arbitrary string used to differentiate different keys.
-   * A unique key is generated per name: two separate `TransientCryptoKey`
-   * protos share the same generated key if their names are the same.
-   * When the data crypto key is generated, this name is not used in any way
-   * (repeating the api call will result in a different key being generated).
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Name of the key.
-   * This is an arbitrary string used to differentiate different keys.
-   * A unique key is generated per name: two separate `TransientCryptoKey`
-   * protos share the same generated key if their names are the same.
-   * When the data crypto key is generated, this name is not used in any way
-   * (repeating the api call will result in a different key being generated).
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.TransientCryptoKey)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.TransientCryptoKey other = (com.google.privacy.dlp.v2.TransientCryptoKey) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.TransientCryptoKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.TransientCryptoKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Use this to have a random data crypto key generated.
-   * It will be discarded after the request finishes.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.TransientCryptoKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.TransientCryptoKey) - com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.TransientCryptoKey.class, com.google.privacy.dlp.v2.TransientCryptoKey.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.TransientCryptoKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransientCryptoKey getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransientCryptoKey build() { - com.google.privacy.dlp.v2.TransientCryptoKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransientCryptoKey buildPartial() { - com.google.privacy.dlp.v2.TransientCryptoKey result = new com.google.privacy.dlp.v2.TransientCryptoKey(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.TransientCryptoKey) { - return mergeFrom((com.google.privacy.dlp.v2.TransientCryptoKey)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.TransientCryptoKey other) { - if (other == com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.TransientCryptoKey parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.TransientCryptoKey) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Name of the key.
-     * This is an arbitrary string used to differentiate different keys.
-     * A unique key is generated per name: two separate `TransientCryptoKey`
-     * protos share the same generated key if their names are the same.
-     * When the data crypto key is generated, this name is not used in any way
-     * (repeating the api call will result in a different key being generated).
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the key.
-     * This is an arbitrary string used to differentiate different keys.
-     * A unique key is generated per name: two separate `TransientCryptoKey`
-     * protos share the same generated key if their names are the same.
-     * When the data crypto key is generated, this name is not used in any way
-     * (repeating the api call will result in a different key being generated).
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the key.
-     * This is an arbitrary string used to differentiate different keys.
-     * A unique key is generated per name: two separate `TransientCryptoKey`
-     * protos share the same generated key if their names are the same.
-     * When the data crypto key is generated, this name is not used in any way
-     * (repeating the api call will result in a different key being generated).
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the key.
-     * This is an arbitrary string used to differentiate different keys.
-     * A unique key is generated per name: two separate `TransientCryptoKey`
-     * protos share the same generated key if their names are the same.
-     * When the data crypto key is generated, this name is not used in any way
-     * (repeating the api call will result in a different key being generated).
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the key.
-     * This is an arbitrary string used to differentiate different keys.
-     * A unique key is generated per name: two separate `TransientCryptoKey`
-     * protos share the same generated key if their names are the same.
-     * When the data crypto key is generated, this name is not used in any way
-     * (repeating the api call will result in a different key being generated).
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.TransientCryptoKey) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.TransientCryptoKey) - private static final com.google.privacy.dlp.v2.TransientCryptoKey DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.TransientCryptoKey(); - } - - public static com.google.privacy.dlp.v2.TransientCryptoKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransientCryptoKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransientCryptoKey(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.TransientCryptoKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKeyOrBuilder.java deleted file mode 100644 index 072f5f73f2f6..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/TransientCryptoKeyOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface TransientCryptoKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.TransientCryptoKey) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the key.
-   * This is an arbitrary string used to differentiate different keys.
-   * A unique key is generated per name: two separate `TransientCryptoKey`
-   * protos share the same generated key if their names are the same.
-   * When the data crypto key is generated, this name is not used in any way
-   * (repeating the api call will result in a different key being generated).
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Name of the key.
-   * This is an arbitrary string used to differentiate different keys.
-   * A unique key is generated per name: two separate `TransientCryptoKey`
-   * protos share the same generated key if their names are the same.
-   * When the data crypto key is generated, this name is not used in any way
-   * (repeating the api call will result in a different key being generated).
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKey.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKey.java deleted file mode 100644 index 0c2c1a2fa173..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKey.java +++ /dev/null @@ -1,515 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Using raw keys is prone to security risks due to accidentally
- * leaking the key. Choose another type of key if possible.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UnwrappedCryptoKey} - */ -public final class UnwrappedCryptoKey extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UnwrappedCryptoKey) - UnwrappedCryptoKeyOrBuilder { -private static final long serialVersionUID = 0L; - // Use UnwrappedCryptoKey.newBuilder() to construct. - private UnwrappedCryptoKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UnwrappedCryptoKey() { - key_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UnwrappedCryptoKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UnwrappedCryptoKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - - key_ = input.readBytes(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UnwrappedCryptoKey.class, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder.class); - } - - public static final int KEY_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString key_; - /** - *
-   * Required. A 128/192/256 bit key.
-   * 
- * - * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The key. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKey() { - return key_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!key_.isEmpty()) { - output.writeBytes(1, key_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!key_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, key_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.UnwrappedCryptoKey)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.UnwrappedCryptoKey other = (com.google.privacy.dlp.v2.UnwrappedCryptoKey) obj; - - if (!getKey() - .equals(other.getKey())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KEY_FIELD_NUMBER; - hash = (53 * hash) + getKey().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.UnwrappedCryptoKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Using raw keys is prone to security risks due to accidentally
-   * leaking the key. Choose another type of key if possible.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UnwrappedCryptoKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UnwrappedCryptoKey) - com.google.privacy.dlp.v2.UnwrappedCryptoKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UnwrappedCryptoKey.class, com.google.privacy.dlp.v2.UnwrappedCryptoKey.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.UnwrappedCryptoKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - key_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UnwrappedCryptoKey getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UnwrappedCryptoKey build() { - com.google.privacy.dlp.v2.UnwrappedCryptoKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UnwrappedCryptoKey buildPartial() { - com.google.privacy.dlp.v2.UnwrappedCryptoKey result = new com.google.privacy.dlp.v2.UnwrappedCryptoKey(this); - result.key_ = key_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.UnwrappedCryptoKey) { - return mergeFrom((com.google.privacy.dlp.v2.UnwrappedCryptoKey)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.UnwrappedCryptoKey other) { - if (other == com.google.privacy.dlp.v2.UnwrappedCryptoKey.getDefaultInstance()) return this; - if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { - setKey(other.getKey()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.UnwrappedCryptoKey parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.UnwrappedCryptoKey) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-     * Required. A 128/192/256 bit key.
-     * 
- * - * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The key. - */ - @java.lang.Override - public com.google.protobuf.ByteString getKey() { - return key_; - } - /** - *
-     * Required. A 128/192/256 bit key.
-     * 
- * - * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The key to set. - * @return This builder for chaining. - */ - public Builder setKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - key_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. A 128/192/256 bit key.
-     * 
- * - * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearKey() { - - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UnwrappedCryptoKey) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UnwrappedCryptoKey) - private static final com.google.privacy.dlp.v2.UnwrappedCryptoKey DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UnwrappedCryptoKey(); - } - - public static com.google.privacy.dlp.v2.UnwrappedCryptoKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UnwrappedCryptoKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UnwrappedCryptoKey(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UnwrappedCryptoKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKeyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKeyOrBuilder.java deleted file mode 100644 index ce2457619b00..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UnwrappedCryptoKeyOrBuilder.java +++ /dev/null @@ -1,19 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface UnwrappedCryptoKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UnwrappedCryptoKey) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. A 128/192/256 bit key.
-   * 
- * - * bytes key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The key. - */ - com.google.protobuf.ByteString getKey(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java deleted file mode 100644 index 22f6ee82407a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequest.java +++ /dev/null @@ -1,1081 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for UpdateDeidentifyTemplate.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} - */ -public final class UpdateDeidentifyTemplateRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) - UpdateDeidentifyTemplateRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateDeidentifyTemplateRequest.newBuilder() to construct. - private UpdateDeidentifyTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateDeidentifyTemplateRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateDeidentifyTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateDeidentifyTemplateRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.DeidentifyTemplate.Builder subBuilder = null; - if (deidentifyTemplate_ != null) { - subBuilder = deidentifyTemplate_.toBuilder(); - } - deidentifyTemplate_ = input.readMessage(com.google.privacy.dlp.v2.DeidentifyTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deidentifyTemplate_); - deidentifyTemplate_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of organization and deidentify template to be updated, for
-   * example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of organization and deidentify template to be updated, for
-   * example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEIDENTIFY_TEMPLATE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.DeidentifyTemplate deidentifyTemplate_; - /** - *
-   * New DeidentifyTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - * @return Whether the deidentifyTemplate field is set. - */ - @java.lang.Override - public boolean hasDeidentifyTemplate() { - return deidentifyTemplate_ != null; - } - /** - *
-   * New DeidentifyTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - * @return The deidentifyTemplate. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate() { - return deidentifyTemplate_ == null ? com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; - } - /** - *
-   * New DeidentifyTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder() { - return getDeidentifyTemplate(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (deidentifyTemplate_ != null) { - output.writeMessage(2, getDeidentifyTemplate()); - } - if (updateMask_ != null) { - output.writeMessage(3, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (deidentifyTemplate_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getDeidentifyTemplate()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest other = (com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasDeidentifyTemplate() != other.hasDeidentifyTemplate()) return false; - if (hasDeidentifyTemplate()) { - if (!getDeidentifyTemplate() - .equals(other.getDeidentifyTemplate())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasDeidentifyTemplate()) { - hash = (37 * hash) + DEIDENTIFY_TEMPLATE_FIELD_NUMBER; - hash = (53 * hash) + getDeidentifyTemplate().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for UpdateDeidentifyTemplate.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.class, com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (deidentifyTemplateBuilder_ == null) { - deidentifyTemplate_ = null; - } else { - deidentifyTemplate_ = null; - deidentifyTemplateBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest build() { - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest buildPartial() { - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest result = new com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(this); - result.name_ = name_; - if (deidentifyTemplateBuilder_ == null) { - result.deidentifyTemplate_ = deidentifyTemplate_; - } else { - result.deidentifyTemplate_ = deidentifyTemplateBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) { - return mergeFrom((com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest other) { - if (other == com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasDeidentifyTemplate()) { - mergeDeidentifyTemplate(other.getDeidentifyTemplate()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of organization and deidentify template to be updated, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of organization and deidentify template to be updated, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of organization and deidentify template to be updated, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of organization and deidentify template to be updated, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of organization and deidentify template to be updated, for
-     * example `organizations/433245324/deidentifyTemplates/432452342` or
-     * projects/project-id/deidentifyTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.DeidentifyTemplate deidentifyTemplate_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> deidentifyTemplateBuilder_; - /** - *
-     * New DeidentifyTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - * @return Whether the deidentifyTemplate field is set. - */ - public boolean hasDeidentifyTemplate() { - return deidentifyTemplateBuilder_ != null || deidentifyTemplate_ != null; - } - /** - *
-     * New DeidentifyTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - * @return The deidentifyTemplate. - */ - public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate() { - if (deidentifyTemplateBuilder_ == null) { - return deidentifyTemplate_ == null ? com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; - } else { - return deidentifyTemplateBuilder_.getMessage(); - } - } - /** - *
-     * New DeidentifyTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - */ - public Builder setDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate value) { - if (deidentifyTemplateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deidentifyTemplate_ = value; - onChanged(); - } else { - deidentifyTemplateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * New DeidentifyTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - */ - public Builder setDeidentifyTemplate( - com.google.privacy.dlp.v2.DeidentifyTemplate.Builder builderForValue) { - if (deidentifyTemplateBuilder_ == null) { - deidentifyTemplate_ = builderForValue.build(); - onChanged(); - } else { - deidentifyTemplateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * New DeidentifyTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - */ - public Builder mergeDeidentifyTemplate(com.google.privacy.dlp.v2.DeidentifyTemplate value) { - if (deidentifyTemplateBuilder_ == null) { - if (deidentifyTemplate_ != null) { - deidentifyTemplate_ = - com.google.privacy.dlp.v2.DeidentifyTemplate.newBuilder(deidentifyTemplate_).mergeFrom(value).buildPartial(); - } else { - deidentifyTemplate_ = value; - } - onChanged(); - } else { - deidentifyTemplateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * New DeidentifyTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - */ - public Builder clearDeidentifyTemplate() { - if (deidentifyTemplateBuilder_ == null) { - deidentifyTemplate_ = null; - onChanged(); - } else { - deidentifyTemplate_ = null; - deidentifyTemplateBuilder_ = null; - } - - return this; - } - /** - *
-     * New DeidentifyTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - */ - public com.google.privacy.dlp.v2.DeidentifyTemplate.Builder getDeidentifyTemplateBuilder() { - - onChanged(); - return getDeidentifyTemplateFieldBuilder().getBuilder(); - } - /** - *
-     * New DeidentifyTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - */ - public com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder() { - if (deidentifyTemplateBuilder_ != null) { - return deidentifyTemplateBuilder_.getMessageOrBuilder(); - } else { - return deidentifyTemplate_ == null ? - com.google.privacy.dlp.v2.DeidentifyTemplate.getDefaultInstance() : deidentifyTemplate_; - } - } - /** - *
-     * New DeidentifyTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder> - getDeidentifyTemplateFieldBuilder() { - if (deidentifyTemplateBuilder_ == null) { - deidentifyTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.DeidentifyTemplate, com.google.privacy.dlp.v2.DeidentifyTemplate.Builder, com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder>( - getDeidentifyTemplate(), - getParentForChildren(), - isClean()); - deidentifyTemplate_ = null; - } - return deidentifyTemplateBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) - private static final com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(); - } - - public static com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateDeidentifyTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateDeidentifyTemplateRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java deleted file mode 100644 index 72bfe90f457b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateDeidentifyTemplateRequestOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface UpdateDeidentifyTemplateRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of organization and deidentify template to be updated, for
-   * example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of organization and deidentify template to be updated, for
-   * example `organizations/433245324/deidentifyTemplates/432452342` or
-   * projects/project-id/deidentifyTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * New DeidentifyTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - * @return Whether the deidentifyTemplate field is set. - */ - boolean hasDeidentifyTemplate(); - /** - *
-   * New DeidentifyTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - * @return The deidentifyTemplate. - */ - com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate(); - /** - *
-   * New DeidentifyTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.DeidentifyTemplate deidentify_template = 2; - */ - com.google.privacy.dlp.v2.DeidentifyTemplateOrBuilder getDeidentifyTemplateOrBuilder(); - - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java deleted file mode 100644 index c5cd9a70708e..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequest.java +++ /dev/null @@ -1,1081 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for UpdateInspectTemplate.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UpdateInspectTemplateRequest} - */ -public final class UpdateInspectTemplateRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UpdateInspectTemplateRequest) - UpdateInspectTemplateRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateInspectTemplateRequest.newBuilder() to construct. - private UpdateInspectTemplateRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateInspectTemplateRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateInspectTemplateRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateInspectTemplateRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.InspectTemplate.Builder subBuilder = null; - if (inspectTemplate_ != null) { - subBuilder = inspectTemplate_.toBuilder(); - } - inspectTemplate_ = input.readMessage(com.google.privacy.dlp.v2.InspectTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inspectTemplate_); - inspectTemplate_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.class, com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of organization and inspectTemplate to be updated, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of organization and inspectTemplate to be updated, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INSPECT_TEMPLATE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.InspectTemplate inspectTemplate_; - /** - *
-   * New InspectTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - * @return Whether the inspectTemplate field is set. - */ - @java.lang.Override - public boolean hasInspectTemplate() { - return inspectTemplate_ != null; - } - /** - *
-   * New InspectTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - * @return The inspectTemplate. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate() { - return inspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; - } - /** - *
-   * New InspectTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder() { - return getInspectTemplate(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (inspectTemplate_ != null) { - output.writeMessage(2, getInspectTemplate()); - } - if (updateMask_ != null) { - output.writeMessage(3, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (inspectTemplate_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getInspectTemplate()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.UpdateInspectTemplateRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.UpdateInspectTemplateRequest other = (com.google.privacy.dlp.v2.UpdateInspectTemplateRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasInspectTemplate() != other.hasInspectTemplate()) return false; - if (hasInspectTemplate()) { - if (!getInspectTemplate() - .equals(other.getInspectTemplate())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasInspectTemplate()) { - hash = (37 * hash) + INSPECT_TEMPLATE_FIELD_NUMBER; - hash = (53 * hash) + getInspectTemplate().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for UpdateInspectTemplate.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UpdateInspectTemplateRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UpdateInspectTemplateRequest) - com.google.privacy.dlp.v2.UpdateInspectTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.class, com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (inspectTemplateBuilder_ == null) { - inspectTemplate_ = null; - } else { - inspectTemplate_ = null; - inspectTemplateBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateInspectTemplateRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateInspectTemplateRequest build() { - com.google.privacy.dlp.v2.UpdateInspectTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateInspectTemplateRequest buildPartial() { - com.google.privacy.dlp.v2.UpdateInspectTemplateRequest result = new com.google.privacy.dlp.v2.UpdateInspectTemplateRequest(this); - result.name_ = name_; - if (inspectTemplateBuilder_ == null) { - result.inspectTemplate_ = inspectTemplate_; - } else { - result.inspectTemplate_ = inspectTemplateBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.UpdateInspectTemplateRequest) { - return mergeFrom((com.google.privacy.dlp.v2.UpdateInspectTemplateRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest other) { - if (other == com.google.privacy.dlp.v2.UpdateInspectTemplateRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasInspectTemplate()) { - mergeInspectTemplate(other.getInspectTemplate()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.UpdateInspectTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.UpdateInspectTemplateRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of organization and inspectTemplate to be updated, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of organization and inspectTemplate to be updated, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of organization and inspectTemplate to be updated, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of organization and inspectTemplate to be updated, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of organization and inspectTemplate to be updated, for
-     * example `organizations/433245324/inspectTemplates/432452342` or
-     * projects/project-id/inspectTemplates/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.InspectTemplate inspectTemplate_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> inspectTemplateBuilder_; - /** - *
-     * New InspectTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - * @return Whether the inspectTemplate field is set. - */ - public boolean hasInspectTemplate() { - return inspectTemplateBuilder_ != null || inspectTemplate_ != null; - } - /** - *
-     * New InspectTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - * @return The inspectTemplate. - */ - public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate() { - if (inspectTemplateBuilder_ == null) { - return inspectTemplate_ == null ? com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; - } else { - return inspectTemplateBuilder_.getMessage(); - } - } - /** - *
-     * New InspectTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - */ - public Builder setInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { - if (inspectTemplateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inspectTemplate_ = value; - onChanged(); - } else { - inspectTemplateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * New InspectTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - */ - public Builder setInspectTemplate( - com.google.privacy.dlp.v2.InspectTemplate.Builder builderForValue) { - if (inspectTemplateBuilder_ == null) { - inspectTemplate_ = builderForValue.build(); - onChanged(); - } else { - inspectTemplateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * New InspectTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - */ - public Builder mergeInspectTemplate(com.google.privacy.dlp.v2.InspectTemplate value) { - if (inspectTemplateBuilder_ == null) { - if (inspectTemplate_ != null) { - inspectTemplate_ = - com.google.privacy.dlp.v2.InspectTemplate.newBuilder(inspectTemplate_).mergeFrom(value).buildPartial(); - } else { - inspectTemplate_ = value; - } - onChanged(); - } else { - inspectTemplateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * New InspectTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - */ - public Builder clearInspectTemplate() { - if (inspectTemplateBuilder_ == null) { - inspectTemplate_ = null; - onChanged(); - } else { - inspectTemplate_ = null; - inspectTemplateBuilder_ = null; - } - - return this; - } - /** - *
-     * New InspectTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - */ - public com.google.privacy.dlp.v2.InspectTemplate.Builder getInspectTemplateBuilder() { - - onChanged(); - return getInspectTemplateFieldBuilder().getBuilder(); - } - /** - *
-     * New InspectTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - */ - public com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder() { - if (inspectTemplateBuilder_ != null) { - return inspectTemplateBuilder_.getMessageOrBuilder(); - } else { - return inspectTemplate_ == null ? - com.google.privacy.dlp.v2.InspectTemplate.getDefaultInstance() : inspectTemplate_; - } - } - /** - *
-     * New InspectTemplate value.
-     * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder> - getInspectTemplateFieldBuilder() { - if (inspectTemplateBuilder_ == null) { - inspectTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.InspectTemplate, com.google.privacy.dlp.v2.InspectTemplate.Builder, com.google.privacy.dlp.v2.InspectTemplateOrBuilder>( - getInspectTemplate(), - getParentForChildren(), - isClean()); - inspectTemplate_ = null; - } - return inspectTemplateBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UpdateInspectTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UpdateInspectTemplateRequest) - private static final com.google.privacy.dlp.v2.UpdateInspectTemplateRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UpdateInspectTemplateRequest(); - } - - public static com.google.privacy.dlp.v2.UpdateInspectTemplateRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateInspectTemplateRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateInspectTemplateRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateInspectTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java deleted file mode 100644 index bbe54d472dc2..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateInspectTemplateRequestOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface UpdateInspectTemplateRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UpdateInspectTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of organization and inspectTemplate to be updated, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of organization and inspectTemplate to be updated, for
-   * example `organizations/433245324/inspectTemplates/432452342` or
-   * projects/project-id/inspectTemplates/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * New InspectTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - * @return Whether the inspectTemplate field is set. - */ - boolean hasInspectTemplate(); - /** - *
-   * New InspectTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - * @return The inspectTemplate. - */ - com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate(); - /** - *
-   * New InspectTemplate value.
-   * 
- * - * .google.privacy.dlp.v2.InspectTemplate inspect_template = 2; - */ - com.google.privacy.dlp.v2.InspectTemplateOrBuilder getInspectTemplateOrBuilder(); - - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequest.java deleted file mode 100644 index ecd13ab84a74..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequest.java +++ /dev/null @@ -1,1074 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for UpdateJobTrigger.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UpdateJobTriggerRequest} - */ -public final class UpdateJobTriggerRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UpdateJobTriggerRequest) - UpdateJobTriggerRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateJobTriggerRequest.newBuilder() to construct. - private UpdateJobTriggerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateJobTriggerRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateJobTriggerRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateJobTriggerRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.JobTrigger.Builder subBuilder = null; - if (jobTrigger_ != null) { - subBuilder = jobTrigger_.toBuilder(); - } - jobTrigger_ = input.readMessage(com.google.privacy.dlp.v2.JobTrigger.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(jobTrigger_); - jobTrigger_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UpdateJobTriggerRequest.class, com.google.privacy.dlp.v2.UpdateJobTriggerRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_TRIGGER_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.JobTrigger jobTrigger_; - /** - *
-   * New JobTrigger value.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - * @return Whether the jobTrigger field is set. - */ - @java.lang.Override - public boolean hasJobTrigger() { - return jobTrigger_ != null; - } - /** - *
-   * New JobTrigger value.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - * @return The jobTrigger. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.JobTrigger getJobTrigger() { - return jobTrigger_ == null ? com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; - } - /** - *
-   * New JobTrigger value.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder() { - return getJobTrigger(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (jobTrigger_ != null) { - output.writeMessage(2, getJobTrigger()); - } - if (updateMask_ != null) { - output.writeMessage(3, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (jobTrigger_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getJobTrigger()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.UpdateJobTriggerRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.UpdateJobTriggerRequest other = (com.google.privacy.dlp.v2.UpdateJobTriggerRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasJobTrigger() != other.hasJobTrigger()) return false; - if (hasJobTrigger()) { - if (!getJobTrigger() - .equals(other.getJobTrigger())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasJobTrigger()) { - hash = (37 * hash) + JOB_TRIGGER_FIELD_NUMBER; - hash = (53 * hash) + getJobTrigger().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.UpdateJobTriggerRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for UpdateJobTrigger.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UpdateJobTriggerRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UpdateJobTriggerRequest) - com.google.privacy.dlp.v2.UpdateJobTriggerRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UpdateJobTriggerRequest.class, com.google.privacy.dlp.v2.UpdateJobTriggerRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.UpdateJobTriggerRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (jobTriggerBuilder_ == null) { - jobTrigger_ = null; - } else { - jobTrigger_ = null; - jobTriggerBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateJobTriggerRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.UpdateJobTriggerRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateJobTriggerRequest build() { - com.google.privacy.dlp.v2.UpdateJobTriggerRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateJobTriggerRequest buildPartial() { - com.google.privacy.dlp.v2.UpdateJobTriggerRequest result = new com.google.privacy.dlp.v2.UpdateJobTriggerRequest(this); - result.name_ = name_; - if (jobTriggerBuilder_ == null) { - result.jobTrigger_ = jobTrigger_; - } else { - result.jobTrigger_ = jobTriggerBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.UpdateJobTriggerRequest) { - return mergeFrom((com.google.privacy.dlp.v2.UpdateJobTriggerRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.UpdateJobTriggerRequest other) { - if (other == com.google.privacy.dlp.v2.UpdateJobTriggerRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasJobTrigger()) { - mergeJobTrigger(other.getJobTrigger()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.UpdateJobTriggerRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.UpdateJobTriggerRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of the project and the triggeredJob, for example
-     * `projects/dlp-test-project/jobTriggers/53234423`.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.JobTrigger jobTrigger_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> jobTriggerBuilder_; - /** - *
-     * New JobTrigger value.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - * @return Whether the jobTrigger field is set. - */ - public boolean hasJobTrigger() { - return jobTriggerBuilder_ != null || jobTrigger_ != null; - } - /** - *
-     * New JobTrigger value.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - * @return The jobTrigger. - */ - public com.google.privacy.dlp.v2.JobTrigger getJobTrigger() { - if (jobTriggerBuilder_ == null) { - return jobTrigger_ == null ? com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; - } else { - return jobTriggerBuilder_.getMessage(); - } - } - /** - *
-     * New JobTrigger value.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - */ - public Builder setJobTrigger(com.google.privacy.dlp.v2.JobTrigger value) { - if (jobTriggerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobTrigger_ = value; - onChanged(); - } else { - jobTriggerBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * New JobTrigger value.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - */ - public Builder setJobTrigger( - com.google.privacy.dlp.v2.JobTrigger.Builder builderForValue) { - if (jobTriggerBuilder_ == null) { - jobTrigger_ = builderForValue.build(); - onChanged(); - } else { - jobTriggerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * New JobTrigger value.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - */ - public Builder mergeJobTrigger(com.google.privacy.dlp.v2.JobTrigger value) { - if (jobTriggerBuilder_ == null) { - if (jobTrigger_ != null) { - jobTrigger_ = - com.google.privacy.dlp.v2.JobTrigger.newBuilder(jobTrigger_).mergeFrom(value).buildPartial(); - } else { - jobTrigger_ = value; - } - onChanged(); - } else { - jobTriggerBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * New JobTrigger value.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - */ - public Builder clearJobTrigger() { - if (jobTriggerBuilder_ == null) { - jobTrigger_ = null; - onChanged(); - } else { - jobTrigger_ = null; - jobTriggerBuilder_ = null; - } - - return this; - } - /** - *
-     * New JobTrigger value.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - */ - public com.google.privacy.dlp.v2.JobTrigger.Builder getJobTriggerBuilder() { - - onChanged(); - return getJobTriggerFieldBuilder().getBuilder(); - } - /** - *
-     * New JobTrigger value.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - */ - public com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder() { - if (jobTriggerBuilder_ != null) { - return jobTriggerBuilder_.getMessageOrBuilder(); - } else { - return jobTrigger_ == null ? - com.google.privacy.dlp.v2.JobTrigger.getDefaultInstance() : jobTrigger_; - } - } - /** - *
-     * New JobTrigger value.
-     * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder> - getJobTriggerFieldBuilder() { - if (jobTriggerBuilder_ == null) { - jobTriggerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.JobTrigger, com.google.privacy.dlp.v2.JobTrigger.Builder, com.google.privacy.dlp.v2.JobTriggerOrBuilder>( - getJobTrigger(), - getParentForChildren(), - isClean()); - jobTrigger_ = null; - } - return jobTriggerBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UpdateJobTriggerRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UpdateJobTriggerRequest) - private static final com.google.privacy.dlp.v2.UpdateJobTriggerRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UpdateJobTriggerRequest(); - } - - public static com.google.privacy.dlp.v2.UpdateJobTriggerRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateJobTriggerRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateJobTriggerRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateJobTriggerRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequestOrBuilder.java deleted file mode 100644 index 513d1bc88b88..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateJobTriggerRequestOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface UpdateJobTriggerRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UpdateJobTriggerRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of the project and the triggeredJob, for example
-   * `projects/dlp-test-project/jobTriggers/53234423`.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * New JobTrigger value.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - * @return Whether the jobTrigger field is set. - */ - boolean hasJobTrigger(); - /** - *
-   * New JobTrigger value.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - * @return The jobTrigger. - */ - com.google.privacy.dlp.v2.JobTrigger getJobTrigger(); - /** - *
-   * New JobTrigger value.
-   * 
- * - * .google.privacy.dlp.v2.JobTrigger job_trigger = 2; - */ - com.google.privacy.dlp.v2.JobTriggerOrBuilder getJobTriggerOrBuilder(); - - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequest.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequest.java deleted file mode 100644 index 33f80bab761a..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequest.java +++ /dev/null @@ -1,1105 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Request message for UpdateStoredInfoType.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} - */ -public final class UpdateStoredInfoTypeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) - UpdateStoredInfoTypeRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateStoredInfoTypeRequest.newBuilder() to construct. - private UpdateStoredInfoTypeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateStoredInfoTypeRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateStoredInfoTypeRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateStoredInfoTypeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = input.readMessage(com.google.privacy.dlp.v2.StoredInfoTypeConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. Resource name of organization and storedInfoType to be updated, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. Resource name of organization and storedInfoType to be updated, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONFIG_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; - /** - *
-   * Updated configuration for the storedInfoType. If not provided, a new
-   * version of the storedInfoType will be created with the existing
-   * configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - * @return Whether the config field is set. - */ - @java.lang.Override - public boolean hasConfig() { - return config_ != null; - } - /** - *
-   * Updated configuration for the storedInfoType. If not provided, a new
-   * version of the storedInfoType will be created with the existing
-   * configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - * @return The config. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { - return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; - } - /** - *
-   * Updated configuration for the storedInfoType. If not provided, a new
-   * version of the storedInfoType will be created with the existing
-   * configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (config_ != null) { - output.writeMessage(2, getConfig()); - } - if (updateMask_ != null) { - output.writeMessage(3, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (config_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getConfig()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest other = (com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasConfig() != other.hasConfig()) return false; - if (hasConfig()) { - if (!getConfig() - .equals(other.getConfig())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasConfig()) { - hash = (37 * hash) + CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getConfig().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request message for UpdateStoredInfoType.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.class, com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (configBuilder_ == null) { - config_ = null; - } else { - config_ = null; - configBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_UpdateStoredInfoTypeRequest_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest build() { - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest buildPartial() { - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest result = new com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(this); - result.name_ = name_; - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) { - return mergeFrom((com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest other) { - if (other == com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasConfig()) { - mergeConfig(other.getConfig()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. Resource name of organization and storedInfoType to be updated, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Resource name of organization and storedInfoType to be updated, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Resource name of organization and storedInfoType to be updated, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of organization and storedInfoType to be updated, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. Resource name of organization and storedInfoType to be updated, for
-     * example `organizations/433245324/storedInfoTypes/432452342` or
-     * projects/project-id/storedInfoTypes/432452342.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.privacy.dlp.v2.StoredInfoTypeConfig config_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> configBuilder_; - /** - *
-     * Updated configuration for the storedInfoType. If not provided, a new
-     * version of the storedInfoType will be created with the existing
-     * configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - * @return Whether the config field is set. - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - *
-     * Updated configuration for the storedInfoType. If not provided, a new
-     * version of the storedInfoType will be created with the existing
-     * configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - * @return The config. - */ - public com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null ? com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - *
-     * Updated configuration for the storedInfoType. If not provided, a new
-     * version of the storedInfoType will be created with the existing
-     * configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - */ - public Builder setConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Updated configuration for the storedInfoType. If not provided, a new
-     * version of the storedInfoType will be created with the existing
-     * configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - */ - public Builder setConfig( - com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Updated configuration for the storedInfoType. If not provided, a new
-     * version of the storedInfoType will be created with the existing
-     * configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - */ - public Builder mergeConfig(com.google.privacy.dlp.v2.StoredInfoTypeConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.privacy.dlp.v2.StoredInfoTypeConfig.newBuilder(config_).mergeFrom(value).buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Updated configuration for the storedInfoType. If not provided, a new
-     * version of the storedInfoType will be created with the existing
-     * configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - *
-     * Updated configuration for the storedInfoType. If not provided, a new
-     * version of the storedInfoType will be created with the existing
-     * configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Updated configuration for the storedInfoType. If not provided, a new
-     * version of the storedInfoType will be created with the existing
-     * configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - */ - public com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null ? - com.google.privacy.dlp.v2.StoredInfoTypeConfig.getDefaultInstance() : config_; - } - } - /** - *
-     * Updated configuration for the storedInfoType. If not provided, a new
-     * version of the storedInfoType will be created with the existing
-     * configuration.
-     * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.StoredInfoTypeConfig, com.google.privacy.dlp.v2.StoredInfoTypeConfig.Builder, com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder>( - getConfig(), - getParentForChildren(), - isClean()); - config_ = null; - } - return configBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Mask to control which fields get updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) - private static final com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(); - } - - public static com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateStoredInfoTypeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateStoredInfoTypeRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequestOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequestOrBuilder.java deleted file mode 100644 index 571697176b18..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/UpdateStoredInfoTypeRequestOrBuilder.java +++ /dev/null @@ -1,93 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface UpdateStoredInfoTypeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Resource name of organization and storedInfoType to be updated, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. Resource name of organization and storedInfoType to be updated, for
-   * example `organizations/433245324/storedInfoTypes/432452342` or
-   * projects/project-id/storedInfoTypes/432452342.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Updated configuration for the storedInfoType. If not provided, a new
-   * version of the storedInfoType will be created with the existing
-   * configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - *
-   * Updated configuration for the storedInfoType. If not provided, a new
-   * version of the storedInfoType will be created with the existing
-   * configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - * @return The config. - */ - com.google.privacy.dlp.v2.StoredInfoTypeConfig getConfig(); - /** - *
-   * Updated configuration for the storedInfoType. If not provided, a new
-   * version of the storedInfoType will be created with the existing
-   * configuration.
-   * 
- * - * .google.privacy.dlp.v2.StoredInfoTypeConfig config = 2; - */ - com.google.privacy.dlp.v2.StoredInfoTypeConfigOrBuilder getConfigOrBuilder(); - - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Mask to control which fields get updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Value.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Value.java deleted file mode 100644 index 1dcea9980bc9..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Value.java +++ /dev/null @@ -1,2037 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * Set of primitive values supported by the system.
- * Note that for the purposes of inspection or transformation, the number
- * of bytes considered to comprise a 'Value' is based on its representation
- * as a UTF-8 encoded string. For example, if 'integer_value' is set to
- * 123456789, the number of bytes would be counted as 9, even though an
- * int64 only holds up to 8 bytes of data.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Value} - */ -public final class Value extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.Value) - ValueOrBuilder { -private static final long serialVersionUID = 0L; - // Use Value.newBuilder() to construct. - private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Value() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Value(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Value( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - type_ = input.readInt64(); - typeCase_ = 1; - break; - } - case 17: { - type_ = input.readDouble(); - typeCase_ = 2; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - typeCase_ = 3; - type_ = s; - break; - } - case 32: { - type_ = input.readBool(); - typeCase_ = 4; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (typeCase_ == 5) { - subBuilder = ((com.google.protobuf.Timestamp) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Timestamp) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 5; - break; - } - case 50: { - com.google.type.TimeOfDay.Builder subBuilder = null; - if (typeCase_ == 6) { - subBuilder = ((com.google.type.TimeOfDay) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.type.TimeOfDay.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.type.TimeOfDay) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 6; - break; - } - case 58: { - com.google.type.Date.Builder subBuilder = null; - if (typeCase_ == 7) { - subBuilder = ((com.google.type.Date) type_).toBuilder(); - } - type_ = - input.readMessage(com.google.type.Date.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.type.Date) type_); - type_ = subBuilder.buildPartial(); - } - typeCase_ = 7; - break; - } - case 64: { - int rawValue = input.readEnum(); - typeCase_ = 8; - type_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Value.class, com.google.privacy.dlp.v2.Value.Builder.class); - } - - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INTEGER_VALUE(1), - FLOAT_VALUE(2), - STRING_VALUE(3), - BOOLEAN_VALUE(4), - TIMESTAMP_VALUE(5), - TIME_VALUE(6), - DATE_VALUE(7), - DAY_OF_WEEK_VALUE(8), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return INTEGER_VALUE; - case 2: return FLOAT_VALUE; - case 3: return STRING_VALUE; - case 4: return BOOLEAN_VALUE; - case 5: return TIMESTAMP_VALUE; - case 6: return TIME_VALUE; - case 7: return DATE_VALUE; - case 8: return DAY_OF_WEEK_VALUE; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public static final int INTEGER_VALUE_FIELD_NUMBER = 1; - /** - *
-   * integer
-   * 
- * - * int64 integer_value = 1; - * @return Whether the integerValue field is set. - */ - @java.lang.Override - public boolean hasIntegerValue() { - return typeCase_ == 1; - } - /** - *
-   * integer
-   * 
- * - * int64 integer_value = 1; - * @return The integerValue. - */ - @java.lang.Override - public long getIntegerValue() { - if (typeCase_ == 1) { - return (java.lang.Long) type_; - } - return 0L; - } - - public static final int FLOAT_VALUE_FIELD_NUMBER = 2; - /** - *
-   * float
-   * 
- * - * double float_value = 2; - * @return Whether the floatValue field is set. - */ - @java.lang.Override - public boolean hasFloatValue() { - return typeCase_ == 2; - } - /** - *
-   * float
-   * 
- * - * double float_value = 2; - * @return The floatValue. - */ - @java.lang.Override - public double getFloatValue() { - if (typeCase_ == 2) { - return (java.lang.Double) type_; - } - return 0D; - } - - public static final int STRING_VALUE_FIELD_NUMBER = 3; - /** - *
-   * string
-   * 
- * - * string string_value = 3; - * @return Whether the stringValue field is set. - */ - public boolean hasStringValue() { - return typeCase_ == 3; - } - /** - *
-   * string
-   * 
- * - * string string_value = 3; - * @return The stringValue. - */ - public java.lang.String getStringValue() { - java.lang.Object ref = ""; - if (typeCase_ == 3) { - ref = type_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (typeCase_ == 3) { - type_ = s; - } - return s; - } - } - /** - *
-   * string
-   * 
- * - * string string_value = 3; - * @return The bytes for stringValue. - */ - public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = ""; - if (typeCase_ == 3) { - ref = type_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (typeCase_ == 3) { - type_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4; - /** - *
-   * boolean
-   * 
- * - * bool boolean_value = 4; - * @return Whether the booleanValue field is set. - */ - @java.lang.Override - public boolean hasBooleanValue() { - return typeCase_ == 4; - } - /** - *
-   * boolean
-   * 
- * - * bool boolean_value = 4; - * @return The booleanValue. - */ - @java.lang.Override - public boolean getBooleanValue() { - if (typeCase_ == 4) { - return (java.lang.Boolean) type_; - } - return false; - } - - public static final int TIMESTAMP_VALUE_FIELD_NUMBER = 5; - /** - *
-   * timestamp
-   * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - * @return Whether the timestampValue field is set. - */ - @java.lang.Override - public boolean hasTimestampValue() { - return typeCase_ == 5; - } - /** - *
-   * timestamp
-   * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - * @return The timestampValue. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getTimestampValue() { - if (typeCase_ == 5) { - return (com.google.protobuf.Timestamp) type_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - /** - *
-   * timestamp
-   * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { - if (typeCase_ == 5) { - return (com.google.protobuf.Timestamp) type_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - public static final int TIME_VALUE_FIELD_NUMBER = 6; - /** - *
-   * time of day
-   * 
- * - * .google.type.TimeOfDay time_value = 6; - * @return Whether the timeValue field is set. - */ - @java.lang.Override - public boolean hasTimeValue() { - return typeCase_ == 6; - } - /** - *
-   * time of day
-   * 
- * - * .google.type.TimeOfDay time_value = 6; - * @return The timeValue. - */ - @java.lang.Override - public com.google.type.TimeOfDay getTimeValue() { - if (typeCase_ == 6) { - return (com.google.type.TimeOfDay) type_; - } - return com.google.type.TimeOfDay.getDefaultInstance(); - } - /** - *
-   * time of day
-   * 
- * - * .google.type.TimeOfDay time_value = 6; - */ - @java.lang.Override - public com.google.type.TimeOfDayOrBuilder getTimeValueOrBuilder() { - if (typeCase_ == 6) { - return (com.google.type.TimeOfDay) type_; - } - return com.google.type.TimeOfDay.getDefaultInstance(); - } - - public static final int DATE_VALUE_FIELD_NUMBER = 7; - /** - *
-   * date
-   * 
- * - * .google.type.Date date_value = 7; - * @return Whether the dateValue field is set. - */ - @java.lang.Override - public boolean hasDateValue() { - return typeCase_ == 7; - } - /** - *
-   * date
-   * 
- * - * .google.type.Date date_value = 7; - * @return The dateValue. - */ - @java.lang.Override - public com.google.type.Date getDateValue() { - if (typeCase_ == 7) { - return (com.google.type.Date) type_; - } - return com.google.type.Date.getDefaultInstance(); - } - /** - *
-   * date
-   * 
- * - * .google.type.Date date_value = 7; - */ - @java.lang.Override - public com.google.type.DateOrBuilder getDateValueOrBuilder() { - if (typeCase_ == 7) { - return (com.google.type.Date) type_; - } - return com.google.type.Date.getDefaultInstance(); - } - - public static final int DAY_OF_WEEK_VALUE_FIELD_NUMBER = 8; - /** - *
-   * day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return Whether the dayOfWeekValue field is set. - */ - public boolean hasDayOfWeekValue() { - return typeCase_ == 8; - } - /** - *
-   * day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return The enum numeric value on the wire for dayOfWeekValue. - */ - public int getDayOfWeekValueValue() { - if (typeCase_ == 8) { - return (java.lang.Integer) type_; - } - return 0; - } - /** - *
-   * day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return The dayOfWeekValue. - */ - public com.google.type.DayOfWeek getDayOfWeekValue() { - if (typeCase_ == 8) { - @SuppressWarnings("deprecation") - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf( - (java.lang.Integer) type_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - return com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (typeCase_ == 1) { - output.writeInt64( - 1, (long)((java.lang.Long) type_)); - } - if (typeCase_ == 2) { - output.writeDouble( - 2, (double)((java.lang.Double) type_)); - } - if (typeCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); - } - if (typeCase_ == 4) { - output.writeBool( - 4, (boolean)((java.lang.Boolean) type_)); - } - if (typeCase_ == 5) { - output.writeMessage(5, (com.google.protobuf.Timestamp) type_); - } - if (typeCase_ == 6) { - output.writeMessage(6, (com.google.type.TimeOfDay) type_); - } - if (typeCase_ == 7) { - output.writeMessage(7, (com.google.type.Date) type_); - } - if (typeCase_ == 8) { - output.writeEnum(8, ((java.lang.Integer) type_)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size( - 1, (long)((java.lang.Long) type_)); - } - if (typeCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize( - 2, (double)((java.lang.Double) type_)); - } - if (typeCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); - } - if (typeCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize( - 4, (boolean)((java.lang.Boolean) type_)); - } - if (typeCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.protobuf.Timestamp) type_); - } - if (typeCase_ == 6) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (com.google.type.TimeOfDay) type_); - } - if (typeCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (com.google.type.Date) type_); - } - if (typeCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(8, ((java.lang.Integer) type_)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.Value)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.Value other = (com.google.privacy.dlp.v2.Value) obj; - - if (!getTypeCase().equals(other.getTypeCase())) return false; - switch (typeCase_) { - case 1: - if (getIntegerValue() - != other.getIntegerValue()) return false; - break; - case 2: - if (java.lang.Double.doubleToLongBits(getFloatValue()) - != java.lang.Double.doubleToLongBits( - other.getFloatValue())) return false; - break; - case 3: - if (!getStringValue() - .equals(other.getStringValue())) return false; - break; - case 4: - if (getBooleanValue() - != other.getBooleanValue()) return false; - break; - case 5: - if (!getTimestampValue() - .equals(other.getTimestampValue())) return false; - break; - case 6: - if (!getTimeValue() - .equals(other.getTimeValue())) return false; - break; - case 7: - if (!getDateValue() - .equals(other.getDateValue())) return false; - break; - case 8: - if (getDayOfWeekValueValue() - != other.getDayOfWeekValueValue()) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (typeCase_) { - case 1: - hash = (37 * hash) + INTEGER_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getIntegerValue()); - break; - case 2: - hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getFloatValue())); - break; - case 3: - hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getStringValue().hashCode(); - break; - case 4: - hash = (37 * hash) + BOOLEAN_VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getBooleanValue()); - break; - case 5: - hash = (37 * hash) + TIMESTAMP_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getTimestampValue().hashCode(); - break; - case 6: - hash = (37 * hash) + TIME_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getTimeValue().hashCode(); - break; - case 7: - hash = (37 * hash) + DATE_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getDateValue().hashCode(); - break; - case 8: - hash = (37 * hash) + DAY_OF_WEEK_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getDayOfWeekValueValue(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.Value parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Value parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Value parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Value parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Value parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.Value parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Value parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Value parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Value parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Value parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.Value parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.Value parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.Value prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Set of primitive values supported by the system.
-   * Note that for the purposes of inspection or transformation, the number
-   * of bytes considered to comprise a 'Value' is based on its representation
-   * as a UTF-8 encoded string. For example, if 'integer_value' is set to
-   * 123456789, the number of bytes would be counted as 9, even though an
-   * int64 only holds up to 8 bytes of data.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.Value} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.Value) - com.google.privacy.dlp.v2.ValueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.Value.class, com.google.privacy.dlp.v2.Value.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.Value.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - typeCase_ = 0; - type_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_Value_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Value getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.Value.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Value build() { - com.google.privacy.dlp.v2.Value result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Value buildPartial() { - com.google.privacy.dlp.v2.Value result = new com.google.privacy.dlp.v2.Value(this); - if (typeCase_ == 1) { - result.type_ = type_; - } - if (typeCase_ == 2) { - result.type_ = type_; - } - if (typeCase_ == 3) { - result.type_ = type_; - } - if (typeCase_ == 4) { - result.type_ = type_; - } - if (typeCase_ == 5) { - if (timestampValueBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = timestampValueBuilder_.build(); - } - } - if (typeCase_ == 6) { - if (timeValueBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = timeValueBuilder_.build(); - } - } - if (typeCase_ == 7) { - if (dateValueBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = dateValueBuilder_.build(); - } - } - if (typeCase_ == 8) { - result.type_ = type_; - } - result.typeCase_ = typeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.Value) { - return mergeFrom((com.google.privacy.dlp.v2.Value)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.Value other) { - if (other == com.google.privacy.dlp.v2.Value.getDefaultInstance()) return this; - switch (other.getTypeCase()) { - case INTEGER_VALUE: { - setIntegerValue(other.getIntegerValue()); - break; - } - case FLOAT_VALUE: { - setFloatValue(other.getFloatValue()); - break; - } - case STRING_VALUE: { - typeCase_ = 3; - type_ = other.type_; - onChanged(); - break; - } - case BOOLEAN_VALUE: { - setBooleanValue(other.getBooleanValue()); - break; - } - case TIMESTAMP_VALUE: { - mergeTimestampValue(other.getTimestampValue()); - break; - } - case TIME_VALUE: { - mergeTimeValue(other.getTimeValue()); - break; - } - case DATE_VALUE: { - mergeDateValue(other.getDateValue()); - break; - } - case DAY_OF_WEEK_VALUE: { - setDayOfWeekValueValue(other.getDayOfWeekValueValue()); - break; - } - case TYPE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.Value parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.Value) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int typeCase_ = 0; - private java.lang.Object type_; - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } - - public Builder clearType() { - typeCase_ = 0; - type_ = null; - onChanged(); - return this; - } - - - /** - *
-     * integer
-     * 
- * - * int64 integer_value = 1; - * @return Whether the integerValue field is set. - */ - public boolean hasIntegerValue() { - return typeCase_ == 1; - } - /** - *
-     * integer
-     * 
- * - * int64 integer_value = 1; - * @return The integerValue. - */ - public long getIntegerValue() { - if (typeCase_ == 1) { - return (java.lang.Long) type_; - } - return 0L; - } - /** - *
-     * integer
-     * 
- * - * int64 integer_value = 1; - * @param value The integerValue to set. - * @return This builder for chaining. - */ - public Builder setIntegerValue(long value) { - typeCase_ = 1; - type_ = value; - onChanged(); - return this; - } - /** - *
-     * integer
-     * 
- * - * int64 integer_value = 1; - * @return This builder for chaining. - */ - public Builder clearIntegerValue() { - if (typeCase_ == 1) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * float
-     * 
- * - * double float_value = 2; - * @return Whether the floatValue field is set. - */ - public boolean hasFloatValue() { - return typeCase_ == 2; - } - /** - *
-     * float
-     * 
- * - * double float_value = 2; - * @return The floatValue. - */ - public double getFloatValue() { - if (typeCase_ == 2) { - return (java.lang.Double) type_; - } - return 0D; - } - /** - *
-     * float
-     * 
- * - * double float_value = 2; - * @param value The floatValue to set. - * @return This builder for chaining. - */ - public Builder setFloatValue(double value) { - typeCase_ = 2; - type_ = value; - onChanged(); - return this; - } - /** - *
-     * float
-     * 
- * - * double float_value = 2; - * @return This builder for chaining. - */ - public Builder clearFloatValue() { - if (typeCase_ == 2) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - return this; - } - - /** - *
-     * string
-     * 
- * - * string string_value = 3; - * @return Whether the stringValue field is set. - */ - @java.lang.Override - public boolean hasStringValue() { - return typeCase_ == 3; - } - /** - *
-     * string
-     * 
- * - * string string_value = 3; - * @return The stringValue. - */ - @java.lang.Override - public java.lang.String getStringValue() { - java.lang.Object ref = ""; - if (typeCase_ == 3) { - ref = type_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (typeCase_ == 3) { - type_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * string
-     * 
- * - * string string_value = 3; - * @return The bytes for stringValue. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = ""; - if (typeCase_ == 3) { - ref = type_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (typeCase_ == 3) { - type_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * string
-     * 
- * - * string string_value = 3; - * @param value The stringValue to set. - * @return This builder for chaining. - */ - public Builder setStringValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - typeCase_ = 3; - type_ = value; - onChanged(); - return this; - } - /** - *
-     * string
-     * 
- * - * string string_value = 3; - * @return This builder for chaining. - */ - public Builder clearStringValue() { - if (typeCase_ == 3) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - return this; - } - /** - *
-     * string
-     * 
- * - * string string_value = 3; - * @param value The bytes for stringValue to set. - * @return This builder for chaining. - */ - public Builder setStringValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - typeCase_ = 3; - type_ = value; - onChanged(); - return this; - } - - /** - *
-     * boolean
-     * 
- * - * bool boolean_value = 4; - * @return Whether the booleanValue field is set. - */ - public boolean hasBooleanValue() { - return typeCase_ == 4; - } - /** - *
-     * boolean
-     * 
- * - * bool boolean_value = 4; - * @return The booleanValue. - */ - public boolean getBooleanValue() { - if (typeCase_ == 4) { - return (java.lang.Boolean) type_; - } - return false; - } - /** - *
-     * boolean
-     * 
- * - * bool boolean_value = 4; - * @param value The booleanValue to set. - * @return This builder for chaining. - */ - public Builder setBooleanValue(boolean value) { - typeCase_ = 4; - type_ = value; - onChanged(); - return this; - } - /** - *
-     * boolean
-     * 
- * - * bool boolean_value = 4; - * @return This builder for chaining. - */ - public Builder clearBooleanValue() { - if (typeCase_ == 4) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampValueBuilder_; - /** - *
-     * timestamp
-     * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - * @return Whether the timestampValue field is set. - */ - @java.lang.Override - public boolean hasTimestampValue() { - return typeCase_ == 5; - } - /** - *
-     * timestamp
-     * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - * @return The timestampValue. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getTimestampValue() { - if (timestampValueBuilder_ == null) { - if (typeCase_ == 5) { - return (com.google.protobuf.Timestamp) type_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } else { - if (typeCase_ == 5) { - return timestampValueBuilder_.getMessage(); - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * timestamp
-     * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - */ - public Builder setTimestampValue(com.google.protobuf.Timestamp value) { - if (timestampValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - timestampValueBuilder_.setMessage(value); - } - typeCase_ = 5; - return this; - } - /** - *
-     * timestamp
-     * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - */ - public Builder setTimestampValue( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (timestampValueBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - timestampValueBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 5; - return this; - } - /** - *
-     * timestamp
-     * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - */ - public Builder mergeTimestampValue(com.google.protobuf.Timestamp value) { - if (timestampValueBuilder_ == null) { - if (typeCase_ == 5 && - type_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - type_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 5) { - timestampValueBuilder_.mergeFrom(value); - } else { - timestampValueBuilder_.setMessage(value); - } - } - typeCase_ = 5; - return this; - } - /** - *
-     * timestamp
-     * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - */ - public Builder clearTimestampValue() { - if (timestampValueBuilder_ == null) { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 5) { - typeCase_ = 0; - type_ = null; - } - timestampValueBuilder_.clear(); - } - return this; - } - /** - *
-     * timestamp
-     * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - */ - public com.google.protobuf.Timestamp.Builder getTimestampValueBuilder() { - return getTimestampValueFieldBuilder().getBuilder(); - } - /** - *
-     * timestamp
-     * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder() { - if ((typeCase_ == 5) && (timestampValueBuilder_ != null)) { - return timestampValueBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 5) { - return (com.google.protobuf.Timestamp) type_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * timestamp
-     * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getTimestampValueFieldBuilder() { - if (timestampValueBuilder_ == null) { - if (!(typeCase_ == 5)) { - type_ = com.google.protobuf.Timestamp.getDefaultInstance(); - } - timestampValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - (com.google.protobuf.Timestamp) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 5; - onChanged();; - return timestampValueBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> timeValueBuilder_; - /** - *
-     * time of day
-     * 
- * - * .google.type.TimeOfDay time_value = 6; - * @return Whether the timeValue field is set. - */ - @java.lang.Override - public boolean hasTimeValue() { - return typeCase_ == 6; - } - /** - *
-     * time of day
-     * 
- * - * .google.type.TimeOfDay time_value = 6; - * @return The timeValue. - */ - @java.lang.Override - public com.google.type.TimeOfDay getTimeValue() { - if (timeValueBuilder_ == null) { - if (typeCase_ == 6) { - return (com.google.type.TimeOfDay) type_; - } - return com.google.type.TimeOfDay.getDefaultInstance(); - } else { - if (typeCase_ == 6) { - return timeValueBuilder_.getMessage(); - } - return com.google.type.TimeOfDay.getDefaultInstance(); - } - } - /** - *
-     * time of day
-     * 
- * - * .google.type.TimeOfDay time_value = 6; - */ - public Builder setTimeValue(com.google.type.TimeOfDay value) { - if (timeValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - timeValueBuilder_.setMessage(value); - } - typeCase_ = 6; - return this; - } - /** - *
-     * time of day
-     * 
- * - * .google.type.TimeOfDay time_value = 6; - */ - public Builder setTimeValue( - com.google.type.TimeOfDay.Builder builderForValue) { - if (timeValueBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - timeValueBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 6; - return this; - } - /** - *
-     * time of day
-     * 
- * - * .google.type.TimeOfDay time_value = 6; - */ - public Builder mergeTimeValue(com.google.type.TimeOfDay value) { - if (timeValueBuilder_ == null) { - if (typeCase_ == 6 && - type_ != com.google.type.TimeOfDay.getDefaultInstance()) { - type_ = com.google.type.TimeOfDay.newBuilder((com.google.type.TimeOfDay) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 6) { - timeValueBuilder_.mergeFrom(value); - } else { - timeValueBuilder_.setMessage(value); - } - } - typeCase_ = 6; - return this; - } - /** - *
-     * time of day
-     * 
- * - * .google.type.TimeOfDay time_value = 6; - */ - public Builder clearTimeValue() { - if (timeValueBuilder_ == null) { - if (typeCase_ == 6) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 6) { - typeCase_ = 0; - type_ = null; - } - timeValueBuilder_.clear(); - } - return this; - } - /** - *
-     * time of day
-     * 
- * - * .google.type.TimeOfDay time_value = 6; - */ - public com.google.type.TimeOfDay.Builder getTimeValueBuilder() { - return getTimeValueFieldBuilder().getBuilder(); - } - /** - *
-     * time of day
-     * 
- * - * .google.type.TimeOfDay time_value = 6; - */ - @java.lang.Override - public com.google.type.TimeOfDayOrBuilder getTimeValueOrBuilder() { - if ((typeCase_ == 6) && (timeValueBuilder_ != null)) { - return timeValueBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 6) { - return (com.google.type.TimeOfDay) type_; - } - return com.google.type.TimeOfDay.getDefaultInstance(); - } - } - /** - *
-     * time of day
-     * 
- * - * .google.type.TimeOfDay time_value = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder> - getTimeValueFieldBuilder() { - if (timeValueBuilder_ == null) { - if (!(typeCase_ == 6)) { - type_ = com.google.type.TimeOfDay.getDefaultInstance(); - } - timeValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.TimeOfDay, com.google.type.TimeOfDay.Builder, com.google.type.TimeOfDayOrBuilder>( - (com.google.type.TimeOfDay) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 6; - onChanged();; - return timeValueBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> dateValueBuilder_; - /** - *
-     * date
-     * 
- * - * .google.type.Date date_value = 7; - * @return Whether the dateValue field is set. - */ - @java.lang.Override - public boolean hasDateValue() { - return typeCase_ == 7; - } - /** - *
-     * date
-     * 
- * - * .google.type.Date date_value = 7; - * @return The dateValue. - */ - @java.lang.Override - public com.google.type.Date getDateValue() { - if (dateValueBuilder_ == null) { - if (typeCase_ == 7) { - return (com.google.type.Date) type_; - } - return com.google.type.Date.getDefaultInstance(); - } else { - if (typeCase_ == 7) { - return dateValueBuilder_.getMessage(); - } - return com.google.type.Date.getDefaultInstance(); - } - } - /** - *
-     * date
-     * 
- * - * .google.type.Date date_value = 7; - */ - public Builder setDateValue(com.google.type.Date value) { - if (dateValueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - dateValueBuilder_.setMessage(value); - } - typeCase_ = 7; - return this; - } - /** - *
-     * date
-     * 
- * - * .google.type.Date date_value = 7; - */ - public Builder setDateValue( - com.google.type.Date.Builder builderForValue) { - if (dateValueBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - dateValueBuilder_.setMessage(builderForValue.build()); - } - typeCase_ = 7; - return this; - } - /** - *
-     * date
-     * 
- * - * .google.type.Date date_value = 7; - */ - public Builder mergeDateValue(com.google.type.Date value) { - if (dateValueBuilder_ == null) { - if (typeCase_ == 7 && - type_ != com.google.type.Date.getDefaultInstance()) { - type_ = com.google.type.Date.newBuilder((com.google.type.Date) type_) - .mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - if (typeCase_ == 7) { - dateValueBuilder_.mergeFrom(value); - } else { - dateValueBuilder_.setMessage(value); - } - } - typeCase_ = 7; - return this; - } - /** - *
-     * date
-     * 
- * - * .google.type.Date date_value = 7; - */ - public Builder clearDateValue() { - if (dateValueBuilder_ == null) { - if (typeCase_ == 7) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - } else { - if (typeCase_ == 7) { - typeCase_ = 0; - type_ = null; - } - dateValueBuilder_.clear(); - } - return this; - } - /** - *
-     * date
-     * 
- * - * .google.type.Date date_value = 7; - */ - public com.google.type.Date.Builder getDateValueBuilder() { - return getDateValueFieldBuilder().getBuilder(); - } - /** - *
-     * date
-     * 
- * - * .google.type.Date date_value = 7; - */ - @java.lang.Override - public com.google.type.DateOrBuilder getDateValueOrBuilder() { - if ((typeCase_ == 7) && (dateValueBuilder_ != null)) { - return dateValueBuilder_.getMessageOrBuilder(); - } else { - if (typeCase_ == 7) { - return (com.google.type.Date) type_; - } - return com.google.type.Date.getDefaultInstance(); - } - } - /** - *
-     * date
-     * 
- * - * .google.type.Date date_value = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> - getDateValueFieldBuilder() { - if (dateValueBuilder_ == null) { - if (!(typeCase_ == 7)) { - type_ = com.google.type.Date.getDefaultInstance(); - } - dateValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( - (com.google.type.Date) type_, - getParentForChildren(), - isClean()); - type_ = null; - } - typeCase_ = 7; - onChanged();; - return dateValueBuilder_; - } - - /** - *
-     * day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return Whether the dayOfWeekValue field is set. - */ - @java.lang.Override - public boolean hasDayOfWeekValue() { - return typeCase_ == 8; - } - /** - *
-     * day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return The enum numeric value on the wire for dayOfWeekValue. - */ - @java.lang.Override - public int getDayOfWeekValueValue() { - if (typeCase_ == 8) { - return ((java.lang.Integer) type_).intValue(); - } - return 0; - } - /** - *
-     * day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @param value The enum numeric value on the wire for dayOfWeekValue to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeekValueValue(int value) { - typeCase_ = 8; - type_ = value; - onChanged(); - return this; - } - /** - *
-     * day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return The dayOfWeekValue. - */ - @java.lang.Override - public com.google.type.DayOfWeek getDayOfWeekValue() { - if (typeCase_ == 8) { - @SuppressWarnings("deprecation") - com.google.type.DayOfWeek result = com.google.type.DayOfWeek.valueOf( - (java.lang.Integer) type_); - return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; - } - return com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED; - } - /** - *
-     * day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @param value The dayOfWeekValue to set. - * @return This builder for chaining. - */ - public Builder setDayOfWeekValue(com.google.type.DayOfWeek value) { - if (value == null) { - throw new NullPointerException(); - } - typeCase_ = 8; - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * day of week
-     * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return This builder for chaining. - */ - public Builder clearDayOfWeekValue() { - if (typeCase_ == 8) { - typeCase_ = 0; - type_ = null; - onChanged(); - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.Value) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.Value) - private static final com.google.privacy.dlp.v2.Value DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.Value(); - } - - public static com.google.privacy.dlp.v2.Value getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Value parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Value(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.Value getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequency.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequency.java deleted file mode 100644 index f80ced7bb8d7..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequency.java +++ /dev/null @@ -1,746 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -/** - *
- * A value of a field, including its frequency.
- * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ValueFrequency} - */ -public final class ValueFrequency extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.ValueFrequency) - ValueFrequencyOrBuilder { -private static final long serialVersionUID = 0L; - // Use ValueFrequency.newBuilder() to construct. - private ValueFrequency(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ValueFrequency() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ValueFrequency(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ValueFrequency( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.privacy.dlp.v2.Value.Builder subBuilder = null; - if (value_ != null) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - count_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ValueFrequency.class, com.google.privacy.dlp.v2.ValueFrequency.Builder.class); - } - - public static final int VALUE_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.Value value_; - /** - *
-   * A value contained in the field in question.
-   * 
- * - * .google.privacy.dlp.v2.Value value = 1; - * @return Whether the value field is set. - */ - @java.lang.Override - public boolean hasValue() { - return value_ != null; - } - /** - *
-   * A value contained in the field in question.
-   * 
- * - * .google.privacy.dlp.v2.Value value = 1; - * @return The value. - */ - @java.lang.Override - public com.google.privacy.dlp.v2.Value getValue() { - return value_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; - } - /** - *
-   * A value contained in the field in question.
-   * 
- * - * .google.privacy.dlp.v2.Value value = 1; - */ - @java.lang.Override - public com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder() { - return getValue(); - } - - public static final int COUNT_FIELD_NUMBER = 2; - private long count_; - /** - *
-   * How many times the value is contained in the field.
-   * 
- * - * int64 count = 2; - * @return The count. - */ - @java.lang.Override - public long getCount() { - return count_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (value_ != null) { - output.writeMessage(1, getValue()); - } - if (count_ != 0L) { - output.writeInt64(2, count_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (value_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValue()); - } - if (count_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, count_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.privacy.dlp.v2.ValueFrequency)) { - return super.equals(obj); - } - com.google.privacy.dlp.v2.ValueFrequency other = (com.google.privacy.dlp.v2.ValueFrequency) obj; - - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue() - .equals(other.getValue())) return false; - } - if (getCount() - != other.getCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - hash = (37 * hash) + COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.privacy.dlp.v2.ValueFrequency parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.privacy.dlp.v2.ValueFrequency prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A value of a field, including its frequency.
-   * 
- * - * Protobuf type {@code google.privacy.dlp.v2.ValueFrequency} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.ValueFrequency) - com.google.privacy.dlp.v2.ValueFrequencyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.privacy.dlp.v2.ValueFrequency.class, com.google.privacy.dlp.v2.ValueFrequency.Builder.class); - } - - // Construct using com.google.privacy.dlp.v2.ValueFrequency.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (valueBuilder_ == null) { - value_ = null; - } else { - value_ = null; - valueBuilder_ = null; - } - count_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ValueFrequency getDefaultInstanceForType() { - return com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance(); - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ValueFrequency build() { - com.google.privacy.dlp.v2.ValueFrequency result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ValueFrequency buildPartial() { - com.google.privacy.dlp.v2.ValueFrequency result = new com.google.privacy.dlp.v2.ValueFrequency(this); - if (valueBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = valueBuilder_.build(); - } - result.count_ = count_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.privacy.dlp.v2.ValueFrequency) { - return mergeFrom((com.google.privacy.dlp.v2.ValueFrequency)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.privacy.dlp.v2.ValueFrequency other) { - if (other == com.google.privacy.dlp.v2.ValueFrequency.getDefaultInstance()) return this; - if (other.hasValue()) { - mergeValue(other.getValue()); - } - if (other.getCount() != 0L) { - setCount(other.getCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.privacy.dlp.v2.ValueFrequency parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.privacy.dlp.v2.ValueFrequency) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.privacy.dlp.v2.Value value_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> valueBuilder_; - /** - *
-     * A value contained in the field in question.
-     * 
- * - * .google.privacy.dlp.v2.Value value = 1; - * @return Whether the value field is set. - */ - public boolean hasValue() { - return valueBuilder_ != null || value_ != null; - } - /** - *
-     * A value contained in the field in question.
-     * 
- * - * .google.privacy.dlp.v2.Value value = 1; - * @return The value. - */ - public com.google.privacy.dlp.v2.Value getValue() { - if (valueBuilder_ == null) { - return value_ == null ? com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; - } else { - return valueBuilder_.getMessage(); - } - } - /** - *
-     * A value contained in the field in question.
-     * 
- * - * .google.privacy.dlp.v2.Value value = 1; - */ - public Builder setValue(com.google.privacy.dlp.v2.Value value) { - if (valueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - value_ = value; - onChanged(); - } else { - valueBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A value contained in the field in question.
-     * 
- * - * .google.privacy.dlp.v2.Value value = 1; - */ - public Builder setValue( - com.google.privacy.dlp.v2.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A value contained in the field in question.
-     * 
- * - * .google.privacy.dlp.v2.Value value = 1; - */ - public Builder mergeValue(com.google.privacy.dlp.v2.Value value) { - if (valueBuilder_ == null) { - if (value_ != null) { - value_ = - com.google.privacy.dlp.v2.Value.newBuilder(value_).mergeFrom(value).buildPartial(); - } else { - value_ = value; - } - onChanged(); - } else { - valueBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A value contained in the field in question.
-     * 
- * - * .google.privacy.dlp.v2.Value value = 1; - */ - public Builder clearValue() { - if (valueBuilder_ == null) { - value_ = null; - onChanged(); - } else { - value_ = null; - valueBuilder_ = null; - } - - return this; - } - /** - *
-     * A value contained in the field in question.
-     * 
- * - * .google.privacy.dlp.v2.Value value = 1; - */ - public com.google.privacy.dlp.v2.Value.Builder getValueBuilder() { - - onChanged(); - return getValueFieldBuilder().getBuilder(); - } - /** - *
-     * A value contained in the field in question.
-     * 
- * - * .google.privacy.dlp.v2.Value value = 1; - */ - public com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? - com.google.privacy.dlp.v2.Value.getDefaultInstance() : value_; - } - } - /** - *
-     * A value contained in the field in question.
-     * 
- * - * .google.privacy.dlp.v2.Value value = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> - getValueFieldBuilder() { - if (valueBuilder_ == null) { - valueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( - getValue(), - getParentForChildren(), - isClean()); - value_ = null; - } - return valueBuilder_; - } - - private long count_ ; - /** - *
-     * How many times the value is contained in the field.
-     * 
- * - * int64 count = 2; - * @return The count. - */ - @java.lang.Override - public long getCount() { - return count_; - } - /** - *
-     * How many times the value is contained in the field.
-     * 
- * - * int64 count = 2; - * @param value The count to set. - * @return This builder for chaining. - */ - public Builder setCount(long value) { - - count_ = value; - onChanged(); - return this; - } - /** - *
-     * How many times the value is contained in the field.
-     * 
- * - * int64 count = 2; - * @return This builder for chaining. - */ - public Builder clearCount() { - - count_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.ValueFrequency) - } - - // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.ValueFrequency) - private static final com.google.privacy.dlp.v2.ValueFrequency DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.ValueFrequency(); - } - - public static com.google.privacy.dlp.v2.ValueFrequency getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ValueFrequency parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ValueFrequency(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.privacy.dlp.v2.ValueFrequency getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequencyOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequencyOrBuilder.java deleted file mode 100644 index ce5bc42687ae..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueFrequencyOrBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ValueFrequencyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.ValueFrequency) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A value contained in the field in question.
-   * 
- * - * .google.privacy.dlp.v2.Value value = 1; - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - *
-   * A value contained in the field in question.
-   * 
- * - * .google.privacy.dlp.v2.Value value = 1; - * @return The value. - */ - com.google.privacy.dlp.v2.Value getValue(); - /** - *
-   * A value contained in the field in question.
-   * 
- * - * .google.privacy.dlp.v2.Value value = 1; - */ - com.google.privacy.dlp.v2.ValueOrBuilder getValueOrBuilder(); - - /** - *
-   * How many times the value is contained in the field.
-   * 
- * - * int64 count = 2; - * @return The count. - */ - long getCount(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueOrBuilder.java b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueOrBuilder.java deleted file mode 100644 index 8816ef2613b8..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ValueOrBuilder.java +++ /dev/null @@ -1,206 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/privacy/dlp/v2/dlp.proto - -package com.google.privacy.dlp.v2; - -public interface ValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.Value) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * integer
-   * 
- * - * int64 integer_value = 1; - * @return Whether the integerValue field is set. - */ - boolean hasIntegerValue(); - /** - *
-   * integer
-   * 
- * - * int64 integer_value = 1; - * @return The integerValue. - */ - long getIntegerValue(); - - /** - *
-   * float
-   * 
- * - * double float_value = 2; - * @return Whether the floatValue field is set. - */ - boolean hasFloatValue(); - /** - *
-   * float
-   * 
- * - * double float_value = 2; - * @return The floatValue. - */ - double getFloatValue(); - - /** - *
-   * string
-   * 
- * - * string string_value = 3; - * @return Whether the stringValue field is set. - */ - boolean hasStringValue(); - /** - *
-   * string
-   * 
- * - * string string_value = 3; - * @return The stringValue. - */ - java.lang.String getStringValue(); - /** - *
-   * string
-   * 
- * - * string string_value = 3; - * @return The bytes for stringValue. - */ - com.google.protobuf.ByteString - getStringValueBytes(); - - /** - *
-   * boolean
-   * 
- * - * bool boolean_value = 4; - * @return Whether the booleanValue field is set. - */ - boolean hasBooleanValue(); - /** - *
-   * boolean
-   * 
- * - * bool boolean_value = 4; - * @return The booleanValue. - */ - boolean getBooleanValue(); - - /** - *
-   * timestamp
-   * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - * @return Whether the timestampValue field is set. - */ - boolean hasTimestampValue(); - /** - *
-   * timestamp
-   * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - * @return The timestampValue. - */ - com.google.protobuf.Timestamp getTimestampValue(); - /** - *
-   * timestamp
-   * 
- * - * .google.protobuf.Timestamp timestamp_value = 5; - */ - com.google.protobuf.TimestampOrBuilder getTimestampValueOrBuilder(); - - /** - *
-   * time of day
-   * 
- * - * .google.type.TimeOfDay time_value = 6; - * @return Whether the timeValue field is set. - */ - boolean hasTimeValue(); - /** - *
-   * time of day
-   * 
- * - * .google.type.TimeOfDay time_value = 6; - * @return The timeValue. - */ - com.google.type.TimeOfDay getTimeValue(); - /** - *
-   * time of day
-   * 
- * - * .google.type.TimeOfDay time_value = 6; - */ - com.google.type.TimeOfDayOrBuilder getTimeValueOrBuilder(); - - /** - *
-   * date
-   * 
- * - * .google.type.Date date_value = 7; - * @return Whether the dateValue field is set. - */ - boolean hasDateValue(); - /** - *
-   * date
-   * 
- * - * .google.type.Date date_value = 7; - * @return The dateValue. - */ - com.google.type.Date getDateValue(); - /** - *
-   * date
-   * 
- * - * .google.type.Date date_value = 7; - */ - com.google.type.DateOrBuilder getDateValueOrBuilder(); - - /** - *
-   * day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return Whether the dayOfWeekValue field is set. - */ - boolean hasDayOfWeekValue(); - /** - *
-   * day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return The enum numeric value on the wire for dayOfWeekValue. - */ - int getDayOfWeekValueValue(); - /** - *
-   * day of week
-   * 
- * - * .google.type.DayOfWeek day_of_week_value = 8; - * @return The dayOfWeekValue. - */ - com.google.type.DayOfWeek getDayOfWeekValue(); - - public com.google.privacy.dlp.v2.Value.TypeCase getTypeCase(); -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto deleted file mode 100644 index 4dc3a3862d00..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto +++ /dev/null @@ -1,5372 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.privacy.dlp.v2; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/privacy/dlp/v2/storage.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "google/type/date.proto"; -import "google/type/dayofweek.proto"; -import "google/type/timeofday.proto"; - -option csharp_namespace = "Google.Cloud.Dlp.V2"; -option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp"; -option java_multiple_files = true; -option java_outer_classname = "DlpProto"; -option java_package = "com.google.privacy.dlp.v2"; -option php_namespace = "Google\\Cloud\\Dlp\\V2"; -option ruby_package = "Google::Cloud::Dlp::V2"; -option (google.api.resource_definition) = { - type: "dlp.googleapis.com/DlpContent" - pattern: "projects/{project}/dlpContent" - pattern: "projects/{project}/locations/{location}/dlpContent" -}; -option (google.api.resource_definition) = { - type: "dlp.googleapis.com/OrganizationLocation" - pattern: "organizations/{organization}/locations/{location}" -}; - -// The Cloud Data Loss Prevention (DLP) API is a service that allows clients -// to detect the presence of Personally Identifiable Information (PII) and other -// privacy-sensitive data in user-supplied, unstructured data streams, like text -// blocks or images. -// The service also includes methods for sensitive data redaction and -// scheduling of data scans on Google Cloud Platform based data sets. -// -// To learn more about concepts and find how-to guides see -// https://cloud.google.com/dlp/docs/. -service DlpService { - option (google.api.default_host) = "dlp.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Finds potentially sensitive info in content. - // This method has limits on input size, processing time, and output size. - // - // When no InfoTypes or CustomInfoTypes are specified in this request, the - // system will automatically choose what detectors to run. By default this may - // be all types, but may change over time as detectors are updated. - // - // For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images - // and https://cloud.google.com/dlp/docs/inspecting-text, - rpc InspectContent(InspectContentRequest) returns (InspectContentResponse) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/content:inspect" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/content:inspect" - body: "*" - } - }; - } - - // Redacts potentially sensitive info from an image. - // This method has limits on input size, processing time, and output size. - // See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to - // learn more. - // - // When no InfoTypes or CustomInfoTypes are specified in this request, the - // system will automatically choose what detectors to run. By default this may - // be all types, but may change over time as detectors are updated. - rpc RedactImage(RedactImageRequest) returns (RedactImageResponse) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/image:redact" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/image:redact" - body: "*" - } - }; - } - - // De-identifies potentially sensitive info from a ContentItem. - // This method has limits on input size and output size. - // See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to - // learn more. - // - // When no InfoTypes or CustomInfoTypes are specified in this request, the - // system will automatically choose what detectors to run. By default this may - // be all types, but may change over time as detectors are updated. - rpc DeidentifyContent(DeidentifyContentRequest) returns (DeidentifyContentResponse) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/content:deidentify" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/content:deidentify" - body: "*" - } - }; - } - - // Re-identifies content that has been de-identified. - // See - // https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example - // to learn more. - rpc ReidentifyContent(ReidentifyContentRequest) returns (ReidentifyContentResponse) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/content:reidentify" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/content:reidentify" - body: "*" - } - }; - } - - // Returns a list of the sensitive information types that DLP API - // supports. See https://cloud.google.com/dlp/docs/infotypes-reference to - // learn more. - rpc ListInfoTypes(ListInfoTypesRequest) returns (ListInfoTypesResponse) { - option (google.api.http) = { - get: "/v2/infoTypes" - additional_bindings { - get: "/v2/{parent=locations/*}/infoTypes" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Creates an InspectTemplate for reusing frequently used configuration - // for inspecting content, images, and storage. - // See https://cloud.google.com/dlp/docs/creating-templates to learn more. - rpc CreateInspectTemplate(CreateInspectTemplateRequest) returns (InspectTemplate) { - option (google.api.http) = { - post: "/v2/{parent=organizations/*}/inspectTemplates" - body: "*" - additional_bindings { - post: "/v2/{parent=organizations/*/locations/*}/inspectTemplates" - body: "*" - } - additional_bindings { - post: "/v2/{parent=projects/*}/inspectTemplates" - body: "*" - } - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/inspectTemplates" - body: "*" - } - }; - option (google.api.method_signature) = "parent,inspect_template"; - } - - // Updates the InspectTemplate. - // See https://cloud.google.com/dlp/docs/creating-templates to learn more. - rpc UpdateInspectTemplate(UpdateInspectTemplateRequest) returns (InspectTemplate) { - option (google.api.http) = { - patch: "/v2/{name=organizations/*/inspectTemplates/*}" - body: "*" - additional_bindings { - patch: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" - body: "*" - } - additional_bindings { - patch: "/v2/{name=projects/*/inspectTemplates/*}" - body: "*" - } - additional_bindings { - patch: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" - body: "*" - } - }; - option (google.api.method_signature) = "name,inspect_template,update_mask"; - } - - // Gets an InspectTemplate. - // See https://cloud.google.com/dlp/docs/creating-templates to learn more. - rpc GetInspectTemplate(GetInspectTemplateRequest) returns (InspectTemplate) { - option (google.api.http) = { - get: "/v2/{name=organizations/*/inspectTemplates/*}" - additional_bindings { - get: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/inspectTemplates/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists InspectTemplates. - // See https://cloud.google.com/dlp/docs/creating-templates to learn more. - rpc ListInspectTemplates(ListInspectTemplatesRequest) returns (ListInspectTemplatesResponse) { - option (google.api.http) = { - get: "/v2/{parent=organizations/*}/inspectTemplates" - additional_bindings { - get: "/v2/{parent=organizations/*/locations/*}/inspectTemplates" - } - additional_bindings { - get: "/v2/{parent=projects/*}/inspectTemplates" - } - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/inspectTemplates" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes an InspectTemplate. - // See https://cloud.google.com/dlp/docs/creating-templates to learn more. - rpc DeleteInspectTemplate(DeleteInspectTemplateRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=organizations/*/inspectTemplates/*}" - additional_bindings { - delete: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/inspectTemplates/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a DeidentifyTemplate for reusing frequently used configuration - // for de-identifying content, images, and storage. - // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn - // more. - rpc CreateDeidentifyTemplate(CreateDeidentifyTemplateRequest) returns (DeidentifyTemplate) { - option (google.api.http) = { - post: "/v2/{parent=organizations/*}/deidentifyTemplates" - body: "*" - additional_bindings { - post: "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates" - body: "*" - } - additional_bindings { - post: "/v2/{parent=projects/*}/deidentifyTemplates" - body: "*" - } - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/deidentifyTemplates" - body: "*" - } - }; - option (google.api.method_signature) = "parent,deidentify_template"; - } - - // Updates the DeidentifyTemplate. - // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn - // more. - rpc UpdateDeidentifyTemplate(UpdateDeidentifyTemplateRequest) returns (DeidentifyTemplate) { - option (google.api.http) = { - patch: "/v2/{name=organizations/*/deidentifyTemplates/*}" - body: "*" - additional_bindings { - patch: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" - body: "*" - } - additional_bindings { - patch: "/v2/{name=projects/*/deidentifyTemplates/*}" - body: "*" - } - additional_bindings { - patch: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" - body: "*" - } - }; - option (google.api.method_signature) = "name,deidentify_template,update_mask"; - } - - // Gets a DeidentifyTemplate. - // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn - // more. - rpc GetDeidentifyTemplate(GetDeidentifyTemplateRequest) returns (DeidentifyTemplate) { - option (google.api.http) = { - get: "/v2/{name=organizations/*/deidentifyTemplates/*}" - additional_bindings { - get: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/deidentifyTemplates/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists DeidentifyTemplates. - // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn - // more. - rpc ListDeidentifyTemplates(ListDeidentifyTemplatesRequest) returns (ListDeidentifyTemplatesResponse) { - option (google.api.http) = { - get: "/v2/{parent=organizations/*}/deidentifyTemplates" - additional_bindings { - get: "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates" - } - additional_bindings { - get: "/v2/{parent=projects/*}/deidentifyTemplates" - } - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/deidentifyTemplates" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a DeidentifyTemplate. - // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn - // more. - rpc DeleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=organizations/*/deidentifyTemplates/*}" - additional_bindings { - delete: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/deidentifyTemplates/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a job trigger to run DLP actions such as scanning storage for - // sensitive information on a set schedule. - // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - rpc CreateJobTrigger(CreateJobTriggerRequest) returns (JobTrigger) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/jobTriggers" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/jobTriggers" - body: "*" - } - additional_bindings { - post: "/v2/{parent=organizations/*/locations/*}/jobTriggers" - body: "*" - } - }; - option (google.api.method_signature) = "parent,job_trigger"; - } - - // Updates a job trigger. - // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - rpc UpdateJobTrigger(UpdateJobTriggerRequest) returns (JobTrigger) { - option (google.api.http) = { - patch: "/v2/{name=projects/*/jobTriggers/*}" - body: "*" - additional_bindings { - patch: "/v2/{name=projects/*/locations/*/jobTriggers/*}" - body: "*" - } - additional_bindings { - patch: "/v2/{name=organizations/*/locations/*/jobTriggers/*}" - body: "*" - } - }; - option (google.api.method_signature) = "name,job_trigger,update_mask"; - } - - // Inspect hybrid content and store findings to a trigger. The inspection - // will be processed asynchronously. To review the findings monitor the - // jobs within the trigger. - rpc HybridInspectJobTrigger(HybridInspectJobTriggerRequest) returns (HybridInspectResponse) { - option (google.api.http) = { - post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Gets a job trigger. - // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - rpc GetJobTrigger(GetJobTriggerRequest) returns (JobTrigger) { - option (google.api.http) = { - get: "/v2/{name=projects/*/jobTriggers/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/jobTriggers/*}" - } - additional_bindings { - get: "/v2/{name=organizations/*/locations/*/jobTriggers/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists job triggers. - // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - rpc ListJobTriggers(ListJobTriggersRequest) returns (ListJobTriggersResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*}/jobTriggers" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/jobTriggers" - } - additional_bindings { - get: "/v2/{parent=organizations/*/locations/*}/jobTriggers" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a job trigger. - // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. - rpc DeleteJobTrigger(DeleteJobTriggerRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/jobTriggers/*}" - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/jobTriggers/*}" - } - additional_bindings { - delete: "/v2/{name=organizations/*/locations/*/jobTriggers/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Activate a job trigger. Causes the immediate execute of a trigger - // instead of waiting on the trigger event to occur. - rpc ActivateJobTrigger(ActivateJobTriggerRequest) returns (DlpJob) { - option (google.api.http) = { - post: "/v2/{name=projects/*/jobTriggers/*}:activate" - body: "*" - additional_bindings { - post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:activate" - body: "*" - } - }; - } - - // Creates a new job to inspect storage or calculate risk metrics. - // See https://cloud.google.com/dlp/docs/inspecting-storage and - // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - // - // When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the - // system will automatically choose what detectors to run. By default this may - // be all types, but may change over time as detectors are updated. - rpc CreateDlpJob(CreateDlpJobRequest) returns (DlpJob) { - option (google.api.http) = { - post: "/v2/{parent=projects/*}/dlpJobs" - body: "*" - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/dlpJobs" - body: "*" - } - }; - option (google.api.method_signature) = "parent,inspect_job"; - option (google.api.method_signature) = "parent,risk_job"; - } - - // Lists DlpJobs that match the specified filter in the request. - // See https://cloud.google.com/dlp/docs/inspecting-storage and - // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - rpc ListDlpJobs(ListDlpJobsRequest) returns (ListDlpJobsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*}/dlpJobs" - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/dlpJobs" - } - additional_bindings { - get: "/v2/{parent=organizations/*/locations/*}/dlpJobs" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the latest state of a long-running DlpJob. - // See https://cloud.google.com/dlp/docs/inspecting-storage and - // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - rpc GetDlpJob(GetDlpJobRequest) returns (DlpJob) { - option (google.api.http) = { - get: "/v2/{name=projects/*/dlpJobs/*}" - additional_bindings { - get: "/v2/{name=projects/*/locations/*/dlpJobs/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a long-running DlpJob. This method indicates that the client is - // no longer interested in the DlpJob result. The job will be canceled if - // possible. - // See https://cloud.google.com/dlp/docs/inspecting-storage and - // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - rpc DeleteDlpJob(DeleteDlpJobRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/dlpJobs/*}" - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/dlpJobs/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Starts asynchronous cancellation on a long-running DlpJob. The server - // makes a best effort to cancel the DlpJob, but success is not - // guaranteed. - // See https://cloud.google.com/dlp/docs/inspecting-storage and - // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. - rpc CancelDlpJob(CancelDlpJobRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v2/{name=projects/*/dlpJobs/*}:cancel" - body: "*" - additional_bindings { - post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel" - body: "*" - } - }; - } - - // Creates a pre-built stored infoType to be used for inspection. - // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - // learn more. - rpc CreateStoredInfoType(CreateStoredInfoTypeRequest) returns (StoredInfoType) { - option (google.api.http) = { - post: "/v2/{parent=organizations/*}/storedInfoTypes" - body: "*" - additional_bindings { - post: "/v2/{parent=organizations/*/locations/*}/storedInfoTypes" - body: "*" - } - additional_bindings { - post: "/v2/{parent=projects/*}/storedInfoTypes" - body: "*" - } - additional_bindings { - post: "/v2/{parent=projects/*/locations/*}/storedInfoTypes" - body: "*" - } - }; - option (google.api.method_signature) = "parent,config"; - } - - // Updates the stored infoType by creating a new version. The existing version - // will continue to be used until the new version is ready. - // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - // learn more. - rpc UpdateStoredInfoType(UpdateStoredInfoTypeRequest) returns (StoredInfoType) { - option (google.api.http) = { - patch: "/v2/{name=organizations/*/storedInfoTypes/*}" - body: "*" - additional_bindings { - patch: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" - body: "*" - } - additional_bindings { - patch: "/v2/{name=projects/*/storedInfoTypes/*}" - body: "*" - } - additional_bindings { - patch: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" - body: "*" - } - }; - option (google.api.method_signature) = "name,config,update_mask"; - } - - // Gets a stored infoType. - // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - // learn more. - rpc GetStoredInfoType(GetStoredInfoTypeRequest) returns (StoredInfoType) { - option (google.api.http) = { - get: "/v2/{name=organizations/*/storedInfoTypes/*}" - additional_bindings { - get: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/storedInfoTypes/*}" - } - additional_bindings { - get: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists stored infoTypes. - // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - // learn more. - rpc ListStoredInfoTypes(ListStoredInfoTypesRequest) returns (ListStoredInfoTypesResponse) { - option (google.api.http) = { - get: "/v2/{parent=organizations/*}/storedInfoTypes" - additional_bindings { - get: "/v2/{parent=organizations/*/locations/*}/storedInfoTypes" - } - additional_bindings { - get: "/v2/{parent=projects/*}/storedInfoTypes" - } - additional_bindings { - get: "/v2/{parent=projects/*/locations/*}/storedInfoTypes" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a stored infoType. - // See https://cloud.google.com/dlp/docs/creating-stored-infotypes to - // learn more. - rpc DeleteStoredInfoType(DeleteStoredInfoTypeRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=organizations/*/storedInfoTypes/*}" - additional_bindings { - delete: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/storedInfoTypes/*}" - } - additional_bindings { - delete: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Inspect hybrid content and store findings to a job. - // To review the findings, inspect the job. Inspection will occur - // asynchronously. - rpc HybridInspectDlpJob(HybridInspectDlpJobRequest) returns (HybridInspectResponse) { - option (google.api.http) = { - post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Finish a running hybrid DlpJob. Triggers the finalization steps and running - // of any enabled actions that have not yet run. - rpc FinishDlpJob(FinishDlpJobRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish" - body: "*" - }; - } -} - -// List of excluded infoTypes. -message ExcludeInfoTypes { - // InfoType list in ExclusionRule rule drops a finding when it overlaps or - // contained within with a finding of an infoType from this list. For - // example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and - // `exclusion_rule` containing `exclude_info_types.info_types` with - // "EMAIL_ADDRESS" the phone number findings are dropped if they overlap - // with EMAIL_ADDRESS finding. - // That leads to "555-222-2222@example.org" to generate only a single - // finding, namely email address. - repeated InfoType info_types = 1; -} - -// The rule that specifies conditions when findings of infoTypes specified in -// `InspectionRuleSet` are removed from results. -message ExclusionRule { - // Exclusion rule types. - oneof type { - // Dictionary which defines the rule. - CustomInfoType.Dictionary dictionary = 1; - - // Regular expression which defines the rule. - CustomInfoType.Regex regex = 2; - - // Set of infoTypes for which findings would affect this rule. - ExcludeInfoTypes exclude_info_types = 3; - } - - // How the rule is applied, see MatchingType documentation for details. - MatchingType matching_type = 4; -} - -// A single inspection rule to be applied to infoTypes, specified in -// `InspectionRuleSet`. -message InspectionRule { - // Inspection rule types. - oneof type { - // Hotword-based detection rule. - CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; - - // Exclusion rule. - ExclusionRule exclusion_rule = 2; - } -} - -// Rule set for modifying a set of infoTypes to alter behavior under certain -// circumstances, depending on the specific details of the rules within the set. -message InspectionRuleSet { - // List of infoTypes this rule set is applied to. - repeated InfoType info_types = 1; - - // Set of rules to be applied to infoTypes. The rules are applied in order. - repeated InspectionRule rules = 2; -} - -// Configuration description of the scanning process. -// When used with redactContent only info_types and min_likelihood are currently -// used. -message InspectConfig { - // Configuration to control the number of findings returned for inspection. - // This is not used for de-identification or data profiling. - // - // When redacting sensitive data from images, finding limits don't apply. They - // can cause unexpected or inconsistent results, where only some data is - // redacted. Don't include finding limits in - // [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] - // requests. Otherwise, Cloud DLP returns an error. - message FindingLimits { - // Max findings configuration per infoType, per content item or long - // running DlpJob. - message InfoTypeLimit { - // Type of information the findings limit applies to. Only one limit per - // info_type should be provided. If InfoTypeLimit does not have an - // info_type, the DLP API applies the limit against all info_types that - // are found but not specified in another InfoTypeLimit. - InfoType info_type = 1; - - // Max findings limit for the given infoType. - int32 max_findings = 2; - } - - // Max number of findings that will be returned for each item scanned. - // When set within `InspectJobConfig`, - // the maximum returned is 2000 regardless if this is set higher. - // When set within `InspectContentRequest`, this field is ignored. - int32 max_findings_per_item = 1; - - // Max number of findings that will be returned per request/job. - // When set within `InspectContentRequest`, the maximum returned is 2000 - // regardless if this is set higher. - int32 max_findings_per_request = 2; - - // Configuration of findings limit given for specified infoTypes. - repeated InfoTypeLimit max_findings_per_info_type = 3; - } - - // Restricts what info_types to look for. The values must correspond to - // InfoType values returned by ListInfoTypes or listed at - // https://cloud.google.com/dlp/docs/infotypes-reference. - // - // When no InfoTypes or CustomInfoTypes are specified in a request, the - // system may automatically choose what detectors to run. By default this may - // be all types, but may change over time as detectors are updated. - // - // If you need precise control and predictability as to what detectors are - // run you should specify specific InfoTypes listed in the reference, - // otherwise a default list will be used, which may change over time. - repeated InfoType info_types = 1; - - // Only returns findings equal or above this threshold. The default is - // POSSIBLE. - // See https://cloud.google.com/dlp/docs/likelihood to learn more. - Likelihood min_likelihood = 2; - - // Configuration to control the number of findings returned. - // This is not used for data profiling. - // - // When redacting sensitive data from images, finding limits don't apply. They - // can cause unexpected or inconsistent results, where only some data is - // redacted. Don't include finding limits in - // [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] - // requests. Otherwise, Cloud DLP returns an error. - FindingLimits limits = 3; - - // When true, a contextual quote from the data that triggered a finding is - // included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote]. - // This is not used for data profiling. - bool include_quote = 4; - - // When true, excludes type information of the findings. - // This is not used for data profiling. - bool exclude_info_types = 5; - - // CustomInfoTypes provided by the user. See - // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. - repeated CustomInfoType custom_info_types = 6; - - // Deprecated and unused. - repeated ContentOption content_options = 8; - - // Set of rules to apply to the findings for this InspectConfig. - // Exclusion rules, contained in the set are executed in the end, other - // rules are executed in the order they are specified for each info type. - repeated InspectionRuleSet rule_set = 10; -} - -// Container for bytes to inspect or redact. -message ByteContentItem { - // The type of data being sent for inspection. To learn more, see - // [Supported file - // types](https://cloud.google.com/dlp/docs/supported-file-types). - enum BytesType { - // Unused - BYTES_TYPE_UNSPECIFIED = 0; - - // Any image type. - IMAGE = 6; - - // jpeg - IMAGE_JPEG = 1; - - // bmp - IMAGE_BMP = 2; - - // png - IMAGE_PNG = 3; - - // svg - IMAGE_SVG = 4; - - // plain text - TEXT_UTF8 = 5; - - // docx, docm, dotx, dotm - WORD_DOCUMENT = 7; - - // pdf - PDF = 8; - - // pptx, pptm, potx, potm, pot - POWERPOINT_DOCUMENT = 9; - - // xlsx, xlsm, xltx, xltm - EXCEL_DOCUMENT = 10; - - // avro - AVRO = 11; - - // csv - CSV = 12; - - // tsv - TSV = 13; - } - - // The type of data stored in the bytes string. Default will be TEXT_UTF8. - BytesType type = 1; - - // Content data to inspect or redact. - bytes data = 2; -} - -// Container structure for the content to inspect. -message ContentItem { - // Data of the item either in the byte array or UTF-8 string form, or table. - oneof data_item { - // String data to inspect or redact. - string value = 3; - - // Structured content for inspection. See - // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to - // learn more. - Table table = 4; - - // Content data to inspect or redact. Replaces `type` and `data`. - ByteContentItem byte_item = 5; - } -} - -// Structured content to inspect. Up to 50,000 `Value`s per request allowed. See -// https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table -// to learn more. -message Table { - // Values of the row. - message Row { - // Individual cells. - repeated Value values = 1; - } - - // Headers of the table. - repeated FieldId headers = 1; - - // Rows of the table. - repeated Row rows = 2; -} - -// All the findings for a single scanned item. -message InspectResult { - // List of findings for an item. - repeated Finding findings = 1; - - // If true, then this item might have more findings than were returned, - // and the findings returned are an arbitrary subset of all findings. - // The findings list might be truncated because the input items were too - // large, or because the server reached the maximum amount of resources - // allowed for a single API call. For best results, divide the input into - // smaller batches. - bool findings_truncated = 2; -} - -// Represents a piece of potentially sensitive content. -message Finding { - option (google.api.resource) = { - type: "dlp.googleapis.com/Finding" - pattern: "projects/{project}/locations/{location}/findings/{finding}" - }; - - // Resource name in format - // projects/{project}/locations/{location}/findings/{finding} Populated only - // when viewing persisted findings. - string name = 14; - - // The content that was found. Even if the content is not textual, it - // may be converted to a textual representation here. - // Provided if `include_quote` is true and the finding is - // less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes - // in length, the quote may be omitted. - string quote = 1; - - // The type of content that might have been found. - // Provided if `excluded_types` is false. - InfoType info_type = 2; - - // Confidence of how likely it is that the `info_type` is correct. - Likelihood likelihood = 3; - - // Where the content was found. - Location location = 4; - - // Timestamp when finding was detected. - google.protobuf.Timestamp create_time = 6; - - // Contains data parsed from quotes. Only populated if include_quote was set - // to true and a supported infoType was requested. Currently supported - // infoTypes: DATE, DATE_OF_BIRTH and TIME. - QuoteInfo quote_info = 7; - - // The job that stored the finding. - string resource_name = 8 [(google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - }]; - - // Job trigger name, if applicable, for this finding. - string trigger_name = 9 [(google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - }]; - - // The labels associated with this `Finding`. - // - // Label keys must be between 1 and 63 characters long and must conform - // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - // - // Label values must be between 0 and 63 characters long and must conform - // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. - // - // No more than 10 labels can be associated with a given finding. - // - // Examples: - // * `"environment" : "production"` - // * `"pipeline" : "etl"` - map labels = 10; - - // Time the job started that produced this finding. - google.protobuf.Timestamp job_create_time = 11; - - // The job that stored the finding. - string job_name = 13 [(google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - }]; - - // The unique finding id. - string finding_id = 15; -} - -// Specifies the location of the finding. -message Location { - // Zero-based byte offsets delimiting the finding. - // These are relative to the finding's containing element. - // Note that when the content is not textual, this references - // the UTF-8 encoded textual representation of the content. - // Omitted if content is an image. - Range byte_range = 1; - - // Unicode character offsets delimiting the finding. - // These are relative to the finding's containing element. - // Provided when the content is text. - Range codepoint_range = 2; - - // List of nested objects pointing to the precise location of the finding - // within the file or record. - repeated ContentLocation content_locations = 7; - - // Information about the container where this finding occurred, if available. - Container container = 8; -} - -// Precise location of the finding within a document, record, image, or metadata -// container. -message ContentLocation { - // Name of the container where the finding is located. - // The top level name is the source file name or table name. Names of some - // common storage containers are formatted as follows: - // - // * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` - // * Cloud Storage files: `gs://{bucket}/{path}` - // * Datastore namespace: {namespace} - // - // Nested names could be absent if the embedded object has no string - // identifier (for example, an image contained within a document). - string container_name = 1; - - // Type of the container within the file with location of the finding. - oneof location { - // Location within a row or record of a database table. - RecordLocation record_location = 2; - - // Location within an image's pixels. - ImageLocation image_location = 3; - - // Location data for document files. - DocumentLocation document_location = 5; - - // Location within the metadata for inspected content. - MetadataLocation metadata_location = 8; - } - - // Finding container modification timestamp, if applicable. For Cloud Storage, - // this field contains the last file modification timestamp. For a BigQuery - // table, this field contains the last_modified_time property. For Datastore, - // this field isn't populated. - google.protobuf.Timestamp container_timestamp = 6; - - // Finding container version, if available - // ("generation" for Cloud Storage). - string container_version = 7; -} - -// Metadata Location -message MetadataLocation { - // Type of metadata containing the finding. - MetadataType type = 1; - - // Label of the piece of metadata containing the finding, for example - - // latitude, author, caption. - oneof label { - // Storage metadata. - StorageMetadataLabel storage_label = 3; - } -} - -// Storage metadata label to indicate which metadata entry contains findings. -message StorageMetadataLabel { - string key = 1; -} - -// Location of a finding within a document. -message DocumentLocation { - // Offset of the line, from the beginning of the file, where the finding - // is located. - int64 file_offset = 1; -} - -// Location of a finding within a row or record. -message RecordLocation { - // Key of the finding. - RecordKey record_key = 1; - - // Field id of the field containing the finding. - FieldId field_id = 2; - - // Location within a `ContentItem.Table`. - TableLocation table_location = 3; -} - -// Location of a finding within a table. -message TableLocation { - // The zero-based index of the row where the finding is located. Only - // populated for resources that have a natural ordering, not BigQuery. In - // BigQuery, to identify the row a finding came from, populate - // BigQueryOptions.identifying_fields with your primary key column names and - // when you store the findings the value of those columns will be stored - // inside of Finding. - int64 row_index = 1; -} - -// Represents a container that may contain DLP findings. -// Examples of a container include a file, table, or database record. -message Container { - // Container type, for example BigQuery or Cloud Storage. - string type = 1; - - // Project where the finding was found. - // Can be different from the project that owns the finding. - string project_id = 2; - - // A string representation of the full container name. - // Examples: - // - BigQuery: 'Project:DataSetId.TableId' - // - Cloud Storage: 'gs://Bucket/folders/filename.txt' - string full_path = 3; - - // The root of the container. - // Examples: - // - // - For BigQuery table `project_id:dataset_id.table_id`, the root is - // `dataset_id` - // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root - // is `gs://bucket` - string root_path = 4; - - // The rest of the path after the root. - // Examples: - // - // - For BigQuery table `project_id:dataset_id.table_id`, the relative path is - // `table_id` - // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative - // path is `folder/filename.txt` - string relative_path = 5; - - // Findings container modification timestamp, if applicable. For Cloud - // Storage, this field contains the last file modification timestamp. For a - // BigQuery table, this field contains the last_modified_time property. For - // Datastore, this field isn't populated. - google.protobuf.Timestamp update_time = 6; - - // Findings container version, if available - // ("generation" for Cloud Storage). - string version = 7; -} - -// Generic half-open interval [start, end) -message Range { - // Index of the first character of the range (inclusive). - int64 start = 1; - - // Index of the last character of the range (exclusive). - int64 end = 2; -} - -// Location of the finding within an image. -message ImageLocation { - // Bounding boxes locating the pixels within the image containing the finding. - repeated BoundingBox bounding_boxes = 1; -} - -// Bounding box encompassing detected text within an image. -message BoundingBox { - // Top coordinate of the bounding box. (0,0) is upper left. - int32 top = 1; - - // Left coordinate of the bounding box. (0,0) is upper left. - int32 left = 2; - - // Width of the bounding box in pixels. - int32 width = 3; - - // Height of the bounding box in pixels. - int32 height = 4; -} - -// Request to search for potentially sensitive info in an image and redact it -// by covering it with a colored rectangle. -message RedactImageRequest { - // Configuration for determining how redaction of images should occur. - message ImageRedactionConfig { - // Type of information to redact from images. - oneof target { - // Only one per info_type should be provided per request. If not - // specified, and redact_all_text is false, the DLP API will redact all - // text that it matches against all info_types that are found, but not - // specified in another ImageRedactionConfig. - InfoType info_type = 1; - - // If true, all text found in the image, regardless whether it matches an - // info_type, is redacted. Only one should be provided. - bool redact_all_text = 2; - } - - // The color to use when redacting content from an image. If not specified, - // the default is black. - Color redaction_color = 3; - } - - // Parent resource name. - // - // The format of this value varies depending on whether you have [specified a - // processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [(google.api.resource_reference) = { - child_type: "dlp.googleapis.com/DlpContent" - }]; - - // Deprecated. This field has no effect. - string location_id = 8; - - // Configuration for the inspector. - InspectConfig inspect_config = 2; - - // The configuration for specifying what content to redact from images. - repeated ImageRedactionConfig image_redaction_configs = 5; - - // Whether the response should include findings along with the redacted - // image. - bool include_findings = 6; - - // The content must be PNG, JPEG, SVG or BMP. - ByteContentItem byte_item = 7; -} - -// Represents a color in the RGB color space. -message Color { - // The amount of red in the color as a value in the interval [0, 1]. - float red = 1; - - // The amount of green in the color as a value in the interval [0, 1]. - float green = 2; - - // The amount of blue in the color as a value in the interval [0, 1]. - float blue = 3; -} - -// Results of redacting an image. -message RedactImageResponse { - // The redacted image. The type will be the same as the original image. - bytes redacted_image = 1; - - // If an image was being inspected and the InspectConfig's include_quote was - // set to true, then this field will include all text, if any, that was found - // in the image. - string extracted_text = 2; - - // The findings. Populated when include_findings in the request is true. - InspectResult inspect_result = 3; -} - -// Request to de-identify a ContentItem. -message DeidentifyContentRequest { - // Parent resource name. - // - // The format of this value varies depending on whether you have [specified a - // processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [(google.api.resource_reference) = { - child_type: "dlp.googleapis.com/DlpContent" - }]; - - // Configuration for the de-identification of the content item. - // Items specified here will override the template referenced by the - // deidentify_template_name argument. - DeidentifyConfig deidentify_config = 2; - - // Configuration for the inspector. - // Items specified here will override the template referenced by the - // inspect_template_name argument. - InspectConfig inspect_config = 3; - - // The item to de-identify. Will be treated as text. - ContentItem item = 4; - - // Template to use. Any configuration directly specified in - // inspect_config will override those set in the template. Singular fields - // that are set in this request will replace their corresponding fields in the - // template. Repeated fields are appended. Singular sub-messages and groups - // are recursively merged. - string inspect_template_name = 5; - - // Template to use. Any configuration directly specified in - // deidentify_config will override those set in the template. Singular fields - // that are set in this request will replace their corresponding fields in the - // template. Repeated fields are appended. Singular sub-messages and groups - // are recursively merged. - string deidentify_template_name = 6; - - // Deprecated. This field has no effect. - string location_id = 7; -} - -// Results of de-identifying a ContentItem. -message DeidentifyContentResponse { - // The de-identified item. - ContentItem item = 1; - - // An overview of the changes that were made on the `item`. - TransformationOverview overview = 2; -} - -// Request to re-identify an item. -message ReidentifyContentRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on whether you have [specified a - // processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/DlpContent" - } - ]; - - // Configuration for the re-identification of the content item. - // This field shares the same proto message type that is used for - // de-identification, however its usage here is for the reversal of the - // previous de-identification. Re-identification is performed by examining - // the transformations used to de-identify the items and executing the - // reverse. This requires that only reversible transformations - // be provided here. The reversible transformations are: - // - // - `CryptoDeterministicConfig` - // - `CryptoReplaceFfxFpeConfig` - DeidentifyConfig reidentify_config = 2; - - // Configuration for the inspector. - InspectConfig inspect_config = 3; - - // The item to re-identify. Will be treated as text. - ContentItem item = 4; - - // Template to use. Any configuration directly specified in - // `inspect_config` will override those set in the template. Singular fields - // that are set in this request will replace their corresponding fields in the - // template. Repeated fields are appended. Singular sub-messages and groups - // are recursively merged. - string inspect_template_name = 5; - - // Template to use. References an instance of `DeidentifyTemplate`. - // Any configuration directly specified in `reidentify_config` or - // `inspect_config` will override those set in the template. The - // `DeidentifyTemplate` used must include only reversible transformations. - // Singular fields that are set in this request will replace their - // corresponding fields in the template. Repeated fields are appended. - // Singular sub-messages and groups are recursively merged. - string reidentify_template_name = 6; - - // Deprecated. This field has no effect. - string location_id = 7; -} - -// Results of re-identifying an item. -message ReidentifyContentResponse { - // The re-identified item. - ContentItem item = 1; - - // An overview of the changes that were made to the `item`. - TransformationOverview overview = 2; -} - -// Request to search for potentially sensitive info in a ContentItem. -message InspectContentRequest { - // Parent resource name. - // - // The format of this value varies depending on whether you have [specified a - // processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [(google.api.resource_reference) = { - child_type: "dlp.googleapis.com/DlpContent" - }]; - - // Configuration for the inspector. What specified here will override - // the template referenced by the inspect_template_name argument. - InspectConfig inspect_config = 2; - - // The item to inspect. - ContentItem item = 3; - - // Template to use. Any configuration directly specified in - // inspect_config will override those set in the template. Singular fields - // that are set in this request will replace their corresponding fields in the - // template. Repeated fields are appended. Singular sub-messages and groups - // are recursively merged. - string inspect_template_name = 4; - - // Deprecated. This field has no effect. - string location_id = 5; -} - -// Results of inspecting an item. -message InspectContentResponse { - // The findings. - InspectResult result = 1; -} - -// Cloud repository for storing output. -message OutputStorageConfig { - // Predefined schemas for storing findings. - // Only for use with external storage. - enum OutputSchema { - // Unused. - OUTPUT_SCHEMA_UNSPECIFIED = 0; - - // Basic schema including only `info_type`, `quote`, `certainty`, and - // `timestamp`. - BASIC_COLUMNS = 1; - - // Schema tailored to findings from scanning Cloud Storage. - GCS_COLUMNS = 2; - - // Schema tailored to findings from scanning Google Datastore. - DATASTORE_COLUMNS = 3; - - // Schema tailored to findings from scanning Google BigQuery. - BIG_QUERY_COLUMNS = 4; - - // Schema containing all columns. - ALL_COLUMNS = 5; - } - - // Output storage types. - oneof type { - // Store findings in an existing table or a new table in an existing - // dataset. If table_id is not set a new one will be generated - // for you with the following format: - // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used - // for generating the date details. - // - // For Inspect, each column in an existing output table must have the same - // name, type, and mode of a field in the `Finding` object. - // - // For Risk, an existing output table should be the output of a previous - // Risk analysis job run on the same source table, with the same privacy - // metric and quasi-identifiers. Risk jobs that analyze the same table but - // compute a different privacy metric, or use different sets of - // quasi-identifiers, cannot store their results in the same table. - BigQueryTable table = 1; - } - - // Schema used for writing the findings for Inspect jobs. This field is only - // used for Inspect and must be unspecified for Risk jobs. Columns are derived - // from the `Finding` object. If appending to an existing table, any columns - // from the predefined schema that are missing will be added. No columns in - // the existing table will be deleted. - // - // If unspecified, then all available columns will be used for a new table or - // an (existing) table with no schema, and no changes will be made to an - // existing table that has a schema. - // Only for use with external storage. - OutputSchema output_schema = 3; -} - -// Statistics regarding a specific InfoType. -message InfoTypeStats { - // The type of finding this stat is for. - InfoType info_type = 1; - - // Number of findings for this infoType. - int64 count = 2; -} - -// The results of an inspect DataSource job. -message InspectDataSourceDetails { - // Snapshot of the inspection configuration. - message RequestedOptions { - // If run with an InspectTemplate, a snapshot of its state at the time of - // this run. - InspectTemplate snapshot_inspect_template = 1; - - // Inspect config. - InspectJobConfig job_config = 3; - } - - // All result fields mentioned below are updated while the job is processing. - message Result { - // Total size in bytes that were processed. - int64 processed_bytes = 1; - - // Estimate of the number of bytes to process. - int64 total_estimated_bytes = 2; - - // Statistics of how many instances of each info type were found during - // inspect job. - repeated InfoTypeStats info_type_stats = 3; - - // Statistics related to the processing of hybrid inspect. - HybridInspectStatistics hybrid_stats = 7; - } - - // The configuration used for this job. - RequestedOptions requested_options = 2; - - // A summary of the outcome of this inspection job. - Result result = 3; -} - -// Statistics related to processing hybrid inspect requests. -message HybridInspectStatistics { - // The number of hybrid inspection requests processed within this job. - int64 processed_count = 1; - - // The number of hybrid inspection requests aborted because the job ran - // out of quota or was ended before they could be processed. - int64 aborted_count = 2; - - // The number of hybrid requests currently being processed. Only populated - // when called via method `getDlpJob`. - // A burst of traffic may cause hybrid inspect requests to be enqueued. - // Processing will take place as quickly as possible, but resource limitations - // may impact how long a request is enqueued for. - int64 pending_count = 3; -} - -// InfoType description. -message InfoTypeDescription { - // Internal name of the infoType. - string name = 1; - - // Human readable form of the infoType name. - string display_name = 2; - - // Which parts of the API supports this InfoType. - repeated InfoTypeSupportedBy supported_by = 3; - - // Description of the infotype. Translated when language is provided in the - // request. - string description = 4; - - // A list of available versions for the infotype. - repeated VersionDescription versions = 9; - - // The category of the infoType. - repeated InfoTypeCategory categories = 10; -} - -// Classification of infoTypes to organize them according to geographic -// location, industry, and data type. -message InfoTypeCategory { - // Enum of the current locations. - // We might add more locations in the future. - enum LocationCategory { - // Unused location - LOCATION_UNSPECIFIED = 0; - - // The infoType is not issued by or tied to a specific region, but is used - // almost everywhere. - GLOBAL = 1; - - // The infoType is typically used in Argentina. - ARGENTINA = 2; - - // The infoType is typically used in Australia. - AUSTRALIA = 3; - - // The infoType is typically used in Belgium. - BELGIUM = 4; - - // The infoType is typically used in Brazil. - BRAZIL = 5; - - // The infoType is typically used in Canada. - CANADA = 6; - - // The infoType is typically used in Chile. - CHILE = 7; - - // The infoType is typically used in China. - CHINA = 8; - - // The infoType is typically used in Colombia. - COLOMBIA = 9; - - // The infoType is typically used in Denmark. - DENMARK = 10; - - // The infoType is typically used in France. - FRANCE = 11; - - // The infoType is typically used in Finland. - FINLAND = 12; - - // The infoType is typically used in Germany. - GERMANY = 13; - - // The infoType is typically used in Hong Kong. - HONG_KONG = 14; - - // The infoType is typically used in India. - INDIA = 15; - - // The infoType is typically used in Indonesia. - INDONESIA = 16; - - // The infoType is typically used in Ireland. - IRELAND = 17; - - // The infoType is typically used in Israel. - ISRAEL = 18; - - // The infoType is typically used in Italy. - ITALY = 19; - - // The infoType is typically used in Japan. - JAPAN = 20; - - // The infoType is typically used in Korea. - KOREA = 21; - - // The infoType is typically used in Mexico. - MEXICO = 22; - - // The infoType is typically used in the Netherlands. - THE_NETHERLANDS = 23; - - // The infoType is typically used in Norway. - NORWAY = 24; - - // The infoType is typically used in Paraguay. - PARAGUAY = 25; - - // The infoType is typically used in Peru. - PERU = 26; - - // The infoType is typically used in Poland. - POLAND = 27; - - // The infoType is typically used in Portugal. - PORTUGAL = 28; - - // The infoType is typically used in Singapore. - SINGAPORE = 29; - - // The infoType is typically used in South Africa. - SOUTH_AFRICA = 30; - - // The infoType is typically used in Spain. - SPAIN = 31; - - // The infoType is typically used in Sweden. - SWEDEN = 32; - - // The infoType is typically used in Taiwan. - TAIWAN = 33; - - // The infoType is typically used in Thailand. - THAILAND = 34; - - // The infoType is typically used in Turkey. - TURKEY = 35; - - // The infoType is typically used in the United Kingdom. - UNITED_KINGDOM = 36; - - // The infoType is typically used in the United States. - UNITED_STATES = 37; - - // The infoType is typically used in Uruguay. - URUGUAY = 38; - - // The infoType is typically used in Venezuela. - VENEZUELA = 39; - - // The infoType is typically used in Google internally. - INTERNAL = 40; - } - - // Enum of the current industries in the category. - // We might add more industries in the future. - enum IndustryCategory { - // Unused industry - INDUSTRY_UNSPECIFIED = 0; - - // The infoType is typically used in the finance industry. - FINANCE = 1; - - // The infoType is typically used in the health industry. - HEALTH = 2; - - // The infoType is typically used in the telecommunications industry. - TELECOMMUNICATIONS = 3; - } - - // Enum of the current types in the category. - // We might add more types in the future. - enum TypeCategory { - // Unused type - TYPE_UNSPECIFIED = 0; - - // Personally identifiable information, for example, a - // name or phone number - PII = 1; - - // Personally identifiable information that is especially sensitive, for - // example, a passport number. - SPII = 2; - - // Attributes that can partially identify someone, especially in - // combination with other attributes, like age, height, and gender. - DEMOGRAPHIC = 3; - - // Confidential or secret information, for example, a password. - CREDENTIAL = 4; - - // An identification document issued by a government. - GOVERNMENT_ID = 5; - - // A document, for example, a resume or source code. - DOCUMENT = 6; - - // Information that is not sensitive on its own, but provides details about - // the circumstances surrounding an entity or an event. - CONTEXTUAL_INFORMATION = 7; - } - - oneof category { - // The region or country that issued the ID or document represented by the - // infoType. - LocationCategory location_category = 1; - - // The group of relevant businesses where this infoType is commonly used - IndustryCategory industry_category = 2; - - // The class of identifiers where this infoType belongs - TypeCategory type_category = 3; - } -} - -// Details about each available version for an infotype. -message VersionDescription { - // Name of the version - string version = 1; - - // Description of the version. - string description = 2; -} - -// Request for the list of infoTypes. -message ListInfoTypesRequest { - // The parent resource name. - // - // The format of this value is as follows: - // - // locations/LOCATION_ID - string parent = 4; - - // BCP-47 language code for localized infoType friendly - // names. If omitted, or if localized strings are not available, - // en-US strings will be returned. - string language_code = 1; - - // filter to only return infoTypes supported by certain parts of the - // API. Defaults to supported_by=INSPECT. - string filter = 2; - - // Deprecated. This field has no effect. - string location_id = 3; -} - -// Response to the ListInfoTypes request. -message ListInfoTypesResponse { - // Set of sensitive infoTypes. - repeated InfoTypeDescription info_types = 1; -} - -// Configuration for a risk analysis job. See -// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more. -message RiskAnalysisJobConfig { - // Privacy metric to compute. - PrivacyMetric privacy_metric = 1; - - // Input dataset to compute metrics over. - BigQueryTable source_table = 2; - - // Actions to execute at the completion of the job. Are executed in the order - // provided. - repeated Action actions = 3; -} - -// A column with a semantic tag attached. -message QuasiId { - // Required. Identifies the column. - FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; - - // Semantic tag that identifies what a column contains, to determine which - // statistical model to use to estimate the reidentifiability of each - // value. [required] - oneof tag { - // A column can be tagged with a InfoType to use the relevant public - // dataset as a statistical model of population, if available. We - // currently support US ZIP codes, region codes, ages and genders. - // To programmatically obtain the list of supported InfoTypes, use - // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. - InfoType info_type = 2; - - // A column can be tagged with a custom tag. In this case, the user must - // indicate an auxiliary table that contains statistical information on - // the possible values of this column (below). - string custom_tag = 3; - - // If no semantic tag is indicated, we infer the statistical model from - // the distribution of values in the input data - google.protobuf.Empty inferred = 4; - } -} - -// An auxiliary table containing statistical information on the relative -// frequency of different quasi-identifiers values. It has one or several -// quasi-identifiers columns, and one column that indicates the relative -// frequency of each quasi-identifier tuple. -// If a tuple is present in the data but not in the auxiliary table, the -// corresponding relative frequency is assumed to be zero (and thus, the -// tuple is highly reidentifiable). -message StatisticalTable { - // A quasi-identifier column has a custom_tag, used to know which column - // in the data corresponds to which column in the statistical model. - message QuasiIdentifierField { - // Identifies the column. - FieldId field = 1; - - // A column can be tagged with a custom tag. In this case, the user must - // indicate an auxiliary table that contains statistical information on - // the possible values of this column (below). - string custom_tag = 2; - } - - // Required. Auxiliary table location. - BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Quasi-identifier columns. - repeated QuasiIdentifierField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The relative frequency column must contain a floating-point number - // between 0 and 1 (inclusive). Null values are assumed to be zero. - FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Privacy metric to compute for reidentification risk analysis. -message PrivacyMetric { - // Compute numerical stats over an individual column, including - // min, max, and quantiles. - message NumericalStatsConfig { - // Field to compute numerical stats on. Supported types are - // integer, float, date, datetime, timestamp, time. - FieldId field = 1; - } - - // Compute numerical stats over an individual column, including - // number of distinct values and value count distribution. - message CategoricalStatsConfig { - // Field to compute categorical stats on. All column types are - // supported except for arrays and structs. However, it may be more - // informative to use NumericalStats when the field type is supported, - // depending on the data. - FieldId field = 1; - } - - // k-anonymity metric, used for analysis of reidentification risk. - message KAnonymityConfig { - // Set of fields to compute k-anonymity over. When multiple fields are - // specified, they are considered a single composite key. Structs and - // repeated data types are not supported; however, nested fields are - // supported so long as they are not structs themselves or nested within - // a repeated field. - repeated FieldId quasi_ids = 1; - - // Message indicating that multiple rows might be associated to a - // single individual. If the same entity_id is associated to multiple - // quasi-identifier tuples over distinct rows, we consider the entire - // collection of tuples as the composite quasi-identifier. This collection - // is a multiset: the order in which the different tuples appear in the - // dataset is ignored, but their frequency is taken into account. - // - // Important note: a maximum of 1000 rows can be associated to a single - // entity ID. If more rows are associated with the same entity ID, some - // might be ignored. - EntityId entity_id = 2; - } - - // l-diversity metric, used for analysis of reidentification risk. - message LDiversityConfig { - // Set of quasi-identifiers indicating how equivalence classes are - // defined for the l-diversity computation. When multiple fields are - // specified, they are considered a single composite key. - repeated FieldId quasi_ids = 1; - - // Sensitive field for computing the l-value. - FieldId sensitive_attribute = 2; - } - - // Reidentifiability metric. This corresponds to a risk model similar to what - // is called "journalist risk" in the literature, except the attack dataset is - // statistically modeled instead of being perfectly known. This can be done - // using publicly available data (like the US Census), or using a custom - // statistical model (indicated as one or several BigQuery tables), or by - // extrapolating from the distribution of values in the input dataset. - message KMapEstimationConfig { - // A column with a semantic tag attached. - message TaggedField { - // Required. Identifies the column. - FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; - - // Semantic tag that identifies what a column contains, to determine which - // statistical model to use to estimate the reidentifiability of each - // value. [required] - oneof tag { - // A column can be tagged with a InfoType to use the relevant public - // dataset as a statistical model of population, if available. We - // currently support US ZIP codes, region codes, ages and genders. - // To programmatically obtain the list of supported InfoTypes, use - // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. - InfoType info_type = 2; - - // A column can be tagged with a custom tag. In this case, the user must - // indicate an auxiliary table that contains statistical information on - // the possible values of this column (below). - string custom_tag = 3; - - // If no semantic tag is indicated, we infer the statistical model from - // the distribution of values in the input data - google.protobuf.Empty inferred = 4; - } - } - - // An auxiliary table contains statistical information on the relative - // frequency of different quasi-identifiers values. It has one or several - // quasi-identifiers columns, and one column that indicates the relative - // frequency of each quasi-identifier tuple. - // If a tuple is present in the data but not in the auxiliary table, the - // corresponding relative frequency is assumed to be zero (and thus, the - // tuple is highly reidentifiable). - message AuxiliaryTable { - // A quasi-identifier column has a custom_tag, used to know which column - // in the data corresponds to which column in the statistical model. - message QuasiIdField { - // Identifies the column. - FieldId field = 1; - - // A auxiliary field. - string custom_tag = 2; - } - - // Required. Auxiliary table location. - BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Quasi-identifier columns. - repeated QuasiIdField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The relative frequency column must contain a floating-point number - // between 0 and 1 (inclusive). Null values are assumed to be zero. - FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Required. Fields considered to be quasi-identifiers. No two columns can have the - // same tag. - repeated TaggedField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; - - // ISO 3166-1 alpha-2 region code to use in the statistical modeling. - // Set if no column is tagged with a region-specific InfoType (like - // US_ZIP_5) or a region code. - string region_code = 2; - - // Several auxiliary tables can be used in the analysis. Each custom_tag - // used to tag a quasi-identifiers column must appear in exactly one column - // of one auxiliary table. - repeated AuxiliaryTable auxiliary_tables = 3; - } - - // δ-presence metric, used to estimate how likely it is for an attacker to - // figure out that one given individual appears in a de-identified dataset. - // Similarly to the k-map metric, we cannot compute δ-presence exactly without - // knowing the attack dataset, so we use a statistical model instead. - message DeltaPresenceEstimationConfig { - // Required. Fields considered to be quasi-identifiers. No two fields can have the - // same tag. - repeated QuasiId quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; - - // ISO 3166-1 alpha-2 region code to use in the statistical modeling. - // Set if no column is tagged with a region-specific InfoType (like - // US_ZIP_5) or a region code. - string region_code = 2; - - // Several auxiliary tables can be used in the analysis. Each custom_tag - // used to tag a quasi-identifiers field must appear in exactly one - // field of one auxiliary table. - repeated StatisticalTable auxiliary_tables = 3; - } - - // Types of analysis. - oneof type { - // Numerical stats - NumericalStatsConfig numerical_stats_config = 1; - - // Categorical stats - CategoricalStatsConfig categorical_stats_config = 2; - - // K-anonymity - KAnonymityConfig k_anonymity_config = 3; - - // l-diversity - LDiversityConfig l_diversity_config = 4; - - // k-map - KMapEstimationConfig k_map_estimation_config = 5; - - // delta-presence - DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; - } -} - -// Result of a risk analysis operation request. -message AnalyzeDataSourceRiskDetails { - // Result of the numerical stats computation. - message NumericalStatsResult { - // Minimum value appearing in the column. - Value min_value = 1; - - // Maximum value appearing in the column. - Value max_value = 2; - - // List of 99 values that partition the set of field values into 100 equal - // sized buckets. - repeated Value quantile_values = 4; - } - - // Result of the categorical stats computation. - message CategoricalStatsResult { - // Histogram of value frequencies in the column. - message CategoricalStatsHistogramBucket { - // Lower bound on the value frequency of the values in this bucket. - int64 value_frequency_lower_bound = 1; - - // Upper bound on the value frequency of the values in this bucket. - int64 value_frequency_upper_bound = 2; - - // Total number of values in this bucket. - int64 bucket_size = 3; - - // Sample of value frequencies in this bucket. The total number of - // values returned per bucket is capped at 20. - repeated ValueFrequency bucket_values = 4; - - // Total number of distinct values in this bucket. - int64 bucket_value_count = 5; - } - - // Histogram of value frequencies in the column. - repeated CategoricalStatsHistogramBucket value_frequency_histogram_buckets = 5; - } - - // Result of the k-anonymity computation. - message KAnonymityResult { - // The set of columns' values that share the same ldiversity value - message KAnonymityEquivalenceClass { - // Set of values defining the equivalence class. One value per - // quasi-identifier column in the original KAnonymity metric message. - // The order is always the same as the original request. - repeated Value quasi_ids_values = 1; - - // Size of the equivalence class, for example number of rows with the - // above set of values. - int64 equivalence_class_size = 2; - } - - // Histogram of k-anonymity equivalence classes. - message KAnonymityHistogramBucket { - // Lower bound on the size of the equivalence classes in this bucket. - int64 equivalence_class_size_lower_bound = 1; - - // Upper bound on the size of the equivalence classes in this bucket. - int64 equivalence_class_size_upper_bound = 2; - - // Total number of equivalence classes in this bucket. - int64 bucket_size = 3; - - // Sample of equivalence classes in this bucket. The total number of - // classes returned per bucket is capped at 20. - repeated KAnonymityEquivalenceClass bucket_values = 4; - - // Total number of distinct equivalence classes in this bucket. - int64 bucket_value_count = 5; - } - - // Histogram of k-anonymity equivalence classes. - repeated KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; - } - - // Result of the l-diversity computation. - message LDiversityResult { - // The set of columns' values that share the same ldiversity value. - message LDiversityEquivalenceClass { - // Quasi-identifier values defining the k-anonymity equivalence - // class. The order is always the same as the original request. - repeated Value quasi_ids_values = 1; - - // Size of the k-anonymity equivalence class. - int64 equivalence_class_size = 2; - - // Number of distinct sensitive values in this equivalence class. - int64 num_distinct_sensitive_values = 3; - - // Estimated frequencies of top sensitive values. - repeated ValueFrequency top_sensitive_values = 4; - } - - // Histogram of l-diversity equivalence class sensitive value frequencies. - message LDiversityHistogramBucket { - // Lower bound on the sensitive value frequencies of the equivalence - // classes in this bucket. - int64 sensitive_value_frequency_lower_bound = 1; - - // Upper bound on the sensitive value frequencies of the equivalence - // classes in this bucket. - int64 sensitive_value_frequency_upper_bound = 2; - - // Total number of equivalence classes in this bucket. - int64 bucket_size = 3; - - // Sample of equivalence classes in this bucket. The total number of - // classes returned per bucket is capped at 20. - repeated LDiversityEquivalenceClass bucket_values = 4; - - // Total number of distinct equivalence classes in this bucket. - int64 bucket_value_count = 5; - } - - // Histogram of l-diversity equivalence class sensitive value frequencies. - repeated LDiversityHistogramBucket sensitive_value_frequency_histogram_buckets = 5; - } - - // Result of the reidentifiability analysis. Note that these results are an - // estimation, not exact values. - message KMapEstimationResult { - // A tuple of values for the quasi-identifier columns. - message KMapEstimationQuasiIdValues { - // The quasi-identifier values. - repeated Value quasi_ids_values = 1; - - // The estimated anonymity for these quasi-identifier values. - int64 estimated_anonymity = 2; - } - - // A KMapEstimationHistogramBucket message with the following values: - // min_anonymity: 3 - // max_anonymity: 5 - // frequency: 42 - // means that there are 42 records whose quasi-identifier values correspond - // to 3, 4 or 5 people in the overlying population. An important particular - // case is when min_anonymity = max_anonymity = 1: the frequency field then - // corresponds to the number of uniquely identifiable records. - message KMapEstimationHistogramBucket { - // Always positive. - int64 min_anonymity = 1; - - // Always greater than or equal to min_anonymity. - int64 max_anonymity = 2; - - // Number of records within these anonymity bounds. - int64 bucket_size = 5; - - // Sample of quasi-identifier tuple values in this bucket. The total - // number of classes returned per bucket is capped at 20. - repeated KMapEstimationQuasiIdValues bucket_values = 6; - - // Total number of distinct quasi-identifier tuple values in this bucket. - int64 bucket_value_count = 7; - } - - // The intervals [min_anonymity, max_anonymity] do not overlap. If a value - // doesn't correspond to any such interval, the associated frequency is - // zero. For example, the following records: - // {min_anonymity: 1, max_anonymity: 1, frequency: 17} - // {min_anonymity: 2, max_anonymity: 3, frequency: 42} - // {min_anonymity: 5, max_anonymity: 10, frequency: 99} - // mean that there are no record with an estimated anonymity of 4, 5, or - // larger than 10. - repeated KMapEstimationHistogramBucket k_map_estimation_histogram = 1; - } - - // Result of the δ-presence computation. Note that these results are an - // estimation, not exact values. - message DeltaPresenceEstimationResult { - // A tuple of values for the quasi-identifier columns. - message DeltaPresenceEstimationQuasiIdValues { - // The quasi-identifier values. - repeated Value quasi_ids_values = 1; - - // The estimated probability that a given individual sharing these - // quasi-identifier values is in the dataset. This value, typically - // called δ, is the ratio between the number of records in the dataset - // with these quasi-identifier values, and the total number of individuals - // (inside *and* outside the dataset) with these quasi-identifier values. - // For example, if there are 15 individuals in the dataset who share the - // same quasi-identifier values, and an estimated 100 people in the entire - // population with these values, then δ is 0.15. - double estimated_probability = 2; - } - - // A DeltaPresenceEstimationHistogramBucket message with the following - // values: - // min_probability: 0.1 - // max_probability: 0.2 - // frequency: 42 - // means that there are 42 records for which δ is in [0.1, 0.2). An - // important particular case is when min_probability = max_probability = 1: - // then, every individual who shares this quasi-identifier combination is in - // the dataset. - message DeltaPresenceEstimationHistogramBucket { - // Between 0 and 1. - double min_probability = 1; - - // Always greater than or equal to min_probability. - double max_probability = 2; - - // Number of records within these probability bounds. - int64 bucket_size = 5; - - // Sample of quasi-identifier tuple values in this bucket. The total - // number of classes returned per bucket is capped at 20. - repeated DeltaPresenceEstimationQuasiIdValues bucket_values = 6; - - // Total number of distinct quasi-identifier tuple values in this bucket. - int64 bucket_value_count = 7; - } - - // The intervals [min_probability, max_probability) do not overlap. If a - // value doesn't correspond to any such interval, the associated frequency - // is zero. For example, the following records: - // {min_probability: 0, max_probability: 0.1, frequency: 17} - // {min_probability: 0.2, max_probability: 0.3, frequency: 42} - // {min_probability: 0.3, max_probability: 0.4, frequency: 99} - // mean that there are no record with an estimated probability in [0.1, 0.2) - // nor larger or equal to 0.4. - repeated DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; - } - - // Risk analysis options. - message RequestedRiskAnalysisOptions { - // The job config for the risk job. - RiskAnalysisJobConfig job_config = 1; - } - - // Privacy metric to compute. - PrivacyMetric requested_privacy_metric = 1; - - // Input dataset to compute metrics over. - BigQueryTable requested_source_table = 2; - - // Values associated with this metric. - oneof result { - // Numerical stats result - NumericalStatsResult numerical_stats_result = 3; - - // Categorical stats result - CategoricalStatsResult categorical_stats_result = 4; - - // K-anonymity result - KAnonymityResult k_anonymity_result = 5; - - // L-divesity result - LDiversityResult l_diversity_result = 6; - - // K-map result - KMapEstimationResult k_map_estimation_result = 7; - - // Delta-presence result - DeltaPresenceEstimationResult delta_presence_estimation_result = 9; - } - - // The configuration used for this job. - RequestedRiskAnalysisOptions requested_options = 10; -} - -// A value of a field, including its frequency. -message ValueFrequency { - // A value contained in the field in question. - Value value = 1; - - // How many times the value is contained in the field. - int64 count = 2; -} - -// Set of primitive values supported by the system. -// Note that for the purposes of inspection or transformation, the number -// of bytes considered to comprise a 'Value' is based on its representation -// as a UTF-8 encoded string. For example, if 'integer_value' is set to -// 123456789, the number of bytes would be counted as 9, even though an -// int64 only holds up to 8 bytes of data. -message Value { - // Value types - oneof type { - // integer - int64 integer_value = 1; - - // float - double float_value = 2; - - // string - string string_value = 3; - - // boolean - bool boolean_value = 4; - - // timestamp - google.protobuf.Timestamp timestamp_value = 5; - - // time of day - google.type.TimeOfDay time_value = 6; - - // date - google.type.Date date_value = 7; - - // day of week - google.type.DayOfWeek day_of_week_value = 8; - } -} - -// Message for infoType-dependent details parsed from quote. -message QuoteInfo { - // Object representation of the quote. - oneof parsed_quote { - // The date time indicated by the quote. - DateTime date_time = 2; - } -} - -// Message for a date time object. -// e.g. 2018-01-01, 5th August. -message DateTime { - // Time zone of the date time object. - message TimeZone { - // Set only if the offset can be determined. Positive for time ahead of UTC. - // E.g. For "UTC-9", this value is -540. - int32 offset_minutes = 1; - } - - // One or more of the following must be set. - // Must be a valid date or time value. - google.type.Date date = 1; - - // Day of week - google.type.DayOfWeek day_of_week = 2; - - // Time of day - google.type.TimeOfDay time = 3; - - // Time zone - TimeZone time_zone = 4; -} - -// The configuration that controls how the data will change. -message DeidentifyConfig { - oneof transformation { - // Treat the dataset as free-form text and apply the same free text - // transformation everywhere. - InfoTypeTransformations info_type_transformations = 1; - - // Treat the dataset as structured. Transformations can be applied to - // specific locations within structured datasets, such as transforming - // a column within a table. - RecordTransformations record_transformations = 2; - - // Treat the dataset as an image and redact. - ImageTransformations image_transformations = 4; - } - - // Mode for handling transformation errors. If left unspecified, the default - // mode is `TransformationErrorHandling.ThrowError`. - TransformationErrorHandling transformation_error_handling = 3; -} - -// A type of transformation that is applied over images. -message ImageTransformations { - // Configuration for determining how redaction of images should occur. - message ImageTransformation { - // Apply transformation to the selected info_types. - message SelectedInfoTypes { - // Required. InfoTypes to apply the transformation to. Required. Provided InfoType - // must be unique within the ImageTransformations message. - repeated InfoType info_types = 5 [(google.api.field_behavior) = REQUIRED]; - } - - // Apply transformation to all findings. - message AllInfoTypes { - - } - - // Apply to all text. - message AllText { - - } - - oneof target { - // Apply transformation to the selected info_types. - SelectedInfoTypes selected_info_types = 4; - - // Apply transformation to all findings not specified in other - // ImageTransformation's selected_info_types. Only one instance is allowed - // within the ImageTransformations message. - AllInfoTypes all_info_types = 5; - - // Apply transformation to all text that doesn't match an infoType. Only - // one instance is allowed within the ImageTransformations message. - AllText all_text = 6; - } - - // The color to use when redacting content from an image. If not - // specified, the default is black. - Color redaction_color = 3; - } - - repeated ImageTransformation transforms = 2; -} - -// How to handle transformation errors during de-identification. A -// transformation error occurs when the requested transformation is incompatible -// with the data. For example, trying to de-identify an IP address using a -// `DateShift` transformation would result in a transformation error, since date -// info cannot be extracted from an IP address. -// Information about any incompatible transformations, and how they were -// handled, is returned in the response as part of the -// `TransformationOverviews`. -message TransformationErrorHandling { - // Throw an error and fail the request when a transformation error occurs. - message ThrowError { - - } - - // Skips the data without modifying it if the requested transformation would - // cause an error. For example, if a `DateShift` transformation were applied - // an an IP address, this mode would leave the IP address unchanged in the - // response. - message LeaveUntransformed { - - } - - // How transformation errors should be handled. - oneof mode { - // Throw an error - ThrowError throw_error = 1; - - // Ignore errors - LeaveUntransformed leave_untransformed = 2; - } -} - -// A rule for transforming a value. -message PrimitiveTransformation { - oneof transformation { - // Replace with a specified value. - ReplaceValueConfig replace_config = 1; - - // Redact - RedactConfig redact_config = 2; - - // Mask - CharacterMaskConfig character_mask_config = 3; - - // Ffx-Fpe - CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; - - // Fixed size bucketing - FixedSizeBucketingConfig fixed_size_bucketing_config = 5; - - // Bucketing - BucketingConfig bucketing_config = 6; - - // Replace with infotype - ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; - - // Time extraction - TimePartConfig time_part_config = 8; - - // Crypto - CryptoHashConfig crypto_hash_config = 9; - - // Date Shift - DateShiftConfig date_shift_config = 11; - - // Deterministic Crypto - CryptoDeterministicConfig crypto_deterministic_config = 12; - - // Replace with a value randomly drawn (with replacement) from a dictionary. - ReplaceDictionaryConfig replace_dictionary_config = 13; - } -} - -// For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a -// portion of the value. -message TimePartConfig { - // Components that make up time. - enum TimePart { - // Unused - TIME_PART_UNSPECIFIED = 0; - - // [0-9999] - YEAR = 1; - - // [1-12] - MONTH = 2; - - // [1-31] - DAY_OF_MONTH = 3; - - // [1-7] - DAY_OF_WEEK = 4; - - // [1-53] - WEEK_OF_YEAR = 5; - - // [0-23] - HOUR_OF_DAY = 6; - } - - // The part of the time to keep. - TimePart part_to_extract = 1; -} - -// Pseudonymization method that generates surrogates via cryptographic hashing. -// Uses SHA-256. -// The key size must be either 32 or 64 bytes. -// Outputs a base64 encoded representation of the hashed output -// (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). -// Currently, only string and integer values can be hashed. -// See https://cloud.google.com/dlp/docs/pseudonymization to learn more. -message CryptoHashConfig { - // The key used by the hash function. - CryptoKey crypto_key = 1; -} - -// Pseudonymization method that generates deterministic encryption for the given -// input. Outputs a base64 encoded representation of the encrypted output. -// Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297. -message CryptoDeterministicConfig { - // The key used by the encryption function. For deterministic encryption - // using AES-SIV, the provided key is internally expanded to 64 bytes prior to - // use. - CryptoKey crypto_key = 1; - - // The custom info type to annotate the surrogate with. - // This annotation will be applied to the surrogate by prefixing it with - // the name of the custom info type followed by the number of - // characters comprising the surrogate. The following scheme defines the - // format: {info type name}({surrogate character count}):{surrogate} - // - // For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and - // the surrogate is 'abc', the full replacement value - // will be: 'MY_TOKEN_INFO_TYPE(3):abc' - // - // This annotation identifies the surrogate when inspecting content using the - // custom info type 'Surrogate'. This facilitates reversal of the - // surrogate when it occurs in free text. - // - // Note: For record transformations where the entire cell in a table is being - // transformed, surrogates are not mandatory. Surrogates are used to denote - // the location of the token and are necessary for re-identification in free - // form text. - // - // In order for inspection to work properly, the name of this info type must - // not occur naturally anywhere in your data; otherwise, inspection may either - // - // - reverse a surrogate that does not correspond to an actual identifier - // - be unable to parse the surrogate and result in an error - // - // Therefore, choose your custom info type name carefully after considering - // what your data looks like. One way to select a name that has a high chance - // of yielding reliable detection is to include one or more unicode characters - // that are highly improbable to exist in your data. - // For example, assuming your data is entered from a regular ASCII keyboard, - // the symbol with the hex code point 29DD might be used like so: - // ⧝MY_TOKEN_TYPE. - InfoType surrogate_info_type = 2; - - // A context may be used for higher security and maintaining - // referential integrity such that the same identifier in two different - // contexts will be given a distinct surrogate. The context is appended to - // plaintext value being encrypted. On decryption the provided context is - // validated against the value used during encryption. If a context was - // provided during encryption, same context must be provided during decryption - // as well. - // - // If the context is not set, plaintext would be used as is for encryption. - // If the context is set but: - // - // 1. there is no record present when transforming a given value or - // 2. the field is not present when transforming a given value, - // - // plaintext would be used as is for encryption. - // - // Note that case (1) is expected when an `InfoTypeTransformation` is - // applied to both structured and unstructured `ContentItem`s. - FieldId context = 3; -} - -// Replace each input value with a given `Value`. -message ReplaceValueConfig { - // Value to replace it with. - Value new_value = 1; -} - -// Replace each input value with a value randomly selected from the dictionary. -message ReplaceDictionaryConfig { - oneof type { - // A list of words to select from for random replacement. The - // [limits](https://cloud.google.com/dlp/limits) page contains details about - // the size limits of dictionaries. - CustomInfoType.Dictionary.WordList word_list = 1; - } -} - -// Replace each matching finding with the name of the info_type. -message ReplaceWithInfoTypeConfig { - -} - -// Redact a given value. For example, if used with an `InfoTypeTransformation` -// transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the -// output would be 'My phone number is '. -message RedactConfig { - -} - -// Characters to skip when doing deidentification of a value. These will be left -// alone and skipped. -message CharsToIgnore { - // Convenience enum for indicating common characters to not transform. - enum CommonCharsToIgnore { - // Unused. - COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0; - - // 0-9 - NUMERIC = 1; - - // A-Z - ALPHA_UPPER_CASE = 2; - - // a-z - ALPHA_LOWER_CASE = 3; - - // US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ - PUNCTUATION = 4; - - // Whitespace character, one of [ \t\n\x0B\f\r] - WHITESPACE = 5; - } - - oneof characters { - // Characters to not transform when masking. - string characters_to_skip = 1; - - // Common characters to not transform when masking. Useful to avoid removing - // punctuation. - CommonCharsToIgnore common_characters_to_ignore = 2; - } -} - -// Partially mask a string by replacing a given number of characters with a -// fixed character. Masking can start from the beginning or end of the string. -// This can be used on data of any type (numbers, longs, and so on) and when -// de-identifying structured data we'll attempt to preserve the original data's -// type. (This allows you to take a long like 123 and modify it to a string like -// **3. -message CharacterMaskConfig { - // Character to use to mask the sensitive values—for example, `*` for an - // alphabetic string such as a name, or `0` for a numeric string such as ZIP - // code or credit card number. This string must have a length of 1. If not - // supplied, this value defaults to `*` for strings, and `0` for digits. - string masking_character = 1; - - // Number of characters to mask. If not set, all matching chars will be - // masked. Skipped characters do not count towards this tally. - // - // If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP - // masks all but a number of characters. - // For example, suppose you have the following values: - // - // - `masking_character` is `*` - // - `number_to_mask` is `-4` - // - `reverse_order` is `false` - // - `CharsToIgnore` includes `-` - // - Input string is `1234-5678-9012-3456` - // - // The resulting de-identified string is - // `****-****-****-3456`. Cloud DLP masks all but the last four characters. - // If `reverse_order` is `true`, all but the first four characters are masked - // as `1234-****-****-****`. - int32 number_to_mask = 2; - - // Mask characters in reverse order. For example, if `masking_character` is - // `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the - // input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. - // If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` - // is `true`, then the string `12345` is masked as `12***`. - bool reverse_order = 3; - - // When masking a string, items in this list will be skipped when replacing - // characters. For example, if the input string is `555-555-5555` and you - // instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP - // returns `***-**5-5555`. - repeated CharsToIgnore characters_to_ignore = 4; -} - -// Buckets values based on fixed size ranges. The -// Bucketing transformation can provide all of this functionality, -// but requires more configuration. This message is provided as a convenience to -// the user for simple bucketing strategies. -// -// The transformed value will be a hyphenated string of -// {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and upper_bound -// = 20, all values that are within this bucket will be replaced with "10-20". -// -// This can be used on data of type: double, long. -// -// If the bound Value type differs from the type of data -// being transformed, we will first attempt converting the type of the data to -// be transformed to match the type of the bound before comparing. -// -// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. -message FixedSizeBucketingConfig { - // Required. Lower bound value of buckets. All values less than `lower_bound` are - // grouped together into a single bucket; for example if `lower_bound` = 10, - // then all values less than 10 are replaced with the value "-10". - Value lower_bound = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Upper bound value of buckets. All values greater than upper_bound are - // grouped together into a single bucket; for example if `upper_bound` = 89, - // then all values greater than 89 are replaced with the value "89+". - Value upper_bound = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Size of each bucket (except for minimum and maximum buckets). So if - // `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the - // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, - // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. - double bucket_size = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Generalization function that buckets values based on ranges. The ranges and -// replacement values are dynamically provided by the user for custom behavior, -// such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH -// This can be used on -// data of type: number, long, string, timestamp. -// If the bound `Value` type differs from the type of data being transformed, we -// will first attempt converting the type of the data to be transformed to match -// the type of the bound before comparing. -// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. -message BucketingConfig { - // Bucket is represented as a range, along with replacement values. - message Bucket { - // Lower bound of the range, inclusive. Type should be the same as max if - // used. - Value min = 1; - - // Upper bound of the range, exclusive; type must match min. - Value max = 2; - - // Required. Replacement value for this bucket. - Value replacement_value = 3 [(google.api.field_behavior) = REQUIRED]; - } - - // Set of buckets. Ranges must be non-overlapping. - repeated Bucket buckets = 1; -} - -// Replaces an identifier with a surrogate using Format Preserving Encryption -// (FPE) with the FFX mode of operation; however when used in the -// `ReidentifyContent` API method, it serves the opposite function by reversing -// the surrogate back into the original identifier. The identifier must be -// encoded as ASCII. For a given crypto key and context, the same identifier -// will be replaced with the same surrogate. Identifiers must be at least two -// characters long. In the case that the identifier is the empty string, it will -// be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn -// more. -// -// Note: We recommend using CryptoDeterministicConfig for all use cases which -// do not require preserving the input alphabet space and size, plus warrant -// referential integrity. -message CryptoReplaceFfxFpeConfig { - // These are commonly used subsets of the alphabet that the FFX mode - // natively supports. In the algorithm, the alphabet is selected using - // the "radix". Therefore each corresponds to a particular radix. - enum FfxCommonNativeAlphabet { - // Unused. - FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; - - // `[0-9]` (radix of 10) - NUMERIC = 1; - - // `[0-9A-F]` (radix of 16) - HEXADECIMAL = 2; - - // `[0-9A-Z]` (radix of 36) - UPPER_CASE_ALPHA_NUMERIC = 3; - - // `[0-9A-Za-z]` (radix of 62) - ALPHA_NUMERIC = 4; - } - - // Required. The key used by the encryption algorithm. - CryptoKey crypto_key = 1 [(google.api.field_behavior) = REQUIRED]; - - // The 'tweak', a context may be used for higher security since the same - // identifier in two different contexts won't be given the same surrogate. If - // the context is not set, a default tweak will be used. - // - // If the context is set but: - // - // 1. there is no record present when transforming a given value or - // 1. the field is not present when transforming a given value, - // - // a default tweak will be used. - // - // Note that case (1) is expected when an `InfoTypeTransformation` is - // applied to both structured and unstructured `ContentItem`s. - // Currently, the referenced field may be of value type integer or string. - // - // The tweak is constructed as a sequence of bytes in big endian byte order - // such that: - // - // - a 64 bit integer is encoded followed by a single byte of value 1 - // - a string is encoded in UTF-8 format followed by a single byte of value 2 - FieldId context = 2; - - // Choose an alphabet which the data being transformed will be made up of. - oneof alphabet { - // Common alphabets. - FfxCommonNativeAlphabet common_alphabet = 4; - - // This is supported by mapping these to the alphanumeric characters - // that the FFX mode natively supports. This happens before/after - // encryption/decryption. - // Each character listed must appear only once. - // Number of characters must be in the range [2, 95]. - // This must be encoded as ASCII. - // The order of characters does not matter. - // The full list of allowed characters is: - // 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - // ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/ - string custom_alphabet = 5; - - // The native way to select the alphabet. Must be in the range [2, 95]. - int32 radix = 6; - } - - // The custom infoType to annotate the surrogate with. - // This annotation will be applied to the surrogate by prefixing it with - // the name of the custom infoType followed by the number of - // characters comprising the surrogate. The following scheme defines the - // format: info_type_name(surrogate_character_count):surrogate - // - // For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and - // the surrogate is 'abc', the full replacement value - // will be: 'MY_TOKEN_INFO_TYPE(3):abc' - // - // This annotation identifies the surrogate when inspecting content using the - // custom infoType - // [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). - // This facilitates reversal of the surrogate when it occurs in free text. - // - // In order for inspection to work properly, the name of this infoType must - // not occur naturally anywhere in your data; otherwise, inspection may - // find a surrogate that does not correspond to an actual identifier. - // Therefore, choose your custom infoType name carefully after considering - // what your data looks like. One way to select a name that has a high chance - // of yielding reliable detection is to include one or more unicode characters - // that are highly improbable to exist in your data. - // For example, assuming your data is entered from a regular ASCII keyboard, - // the symbol with the hex code point 29DD might be used like so: - // ⧝MY_TOKEN_TYPE - InfoType surrogate_info_type = 8; -} - -// This is a data encryption key (DEK) (as opposed to -// a key encryption key (KEK) stored by Cloud Key Management Service -// (Cloud KMS). -// When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate -// IAM policy on the KEK to ensure an attacker cannot -// unwrap the DEK. -message CryptoKey { - // Sources of crypto keys. - oneof source { - // Transient crypto key - TransientCryptoKey transient = 1; - - // Unwrapped crypto key - UnwrappedCryptoKey unwrapped = 2; - - // Key wrapped using Cloud KMS - KmsWrappedCryptoKey kms_wrapped = 3; - } -} - -// Use this to have a random data crypto key generated. -// It will be discarded after the request finishes. -message TransientCryptoKey { - // Required. Name of the key. - // This is an arbitrary string used to differentiate different keys. - // A unique key is generated per name: two separate `TransientCryptoKey` - // protos share the same generated key if their names are the same. - // When the data crypto key is generated, this name is not used in any way - // (repeating the api call will result in a different key being generated). - string name = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Using raw keys is prone to security risks due to accidentally -// leaking the key. Choose another type of key if possible. -message UnwrappedCryptoKey { - // Required. A 128/192/256 bit key. - bytes key = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Include to use an existing data crypto key wrapped by KMS. -// The wrapped key must be a 128-, 192-, or 256-bit key. -// Authorization requires the following IAM permissions when sending a request -// to perform a crypto transformation using a KMS-wrapped crypto key: -// dlp.kms.encrypt -// -// For more information, see [Creating a wrapped key] -// (https://cloud.google.com/dlp/docs/create-wrapped-key). -// -// Note: When you use Cloud KMS for cryptographic operations, -// [charges apply](https://cloud.google.com/kms/pricing). -message KmsWrappedCryptoKey { - // Required. The wrapped data crypto key. - bytes wrapped_key = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The resource name of the KMS CryptoKey to use for unwrapping. - string crypto_key_name = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Shifts dates by random number of days, with option to be consistent for the -// same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting -// to learn more. -message DateShiftConfig { - // Required. Range of shift in days. Actual shift will be selected at random within this - // range (inclusive ends). Negative means shift to earlier in time. Must not - // be more than 365250 days (1000 years) each direction. - // - // For example, 3 means shift date to at most 3 days into the future. - int32 upper_bound_days = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. For example, -5 means shift date to at most 5 days back in the past. - int32 lower_bound_days = 2 [(google.api.field_behavior) = REQUIRED]; - - // Points to the field that contains the context, for example, an entity id. - // If set, must also set cryptoKey. If set, shift will be consistent for the - // given context. - FieldId context = 3; - - // Method for calculating shift that takes context into consideration. If - // set, must also set context. Can only be applied to table items. - oneof method { - // Causes the shift to be computed based on this key and the context. This - // results in the same shift for the same context and crypto_key. If - // set, must also set context. Can only be applied to table items. - CryptoKey crypto_key = 4; - } -} - -// A type of transformation that will scan unstructured text and -// apply various `PrimitiveTransformation`s to each finding, where the -// transformation is applied to only values that were identified as a specific -// info_type. -message InfoTypeTransformations { - // A transformation to apply to text that is identified as a specific - // info_type. - message InfoTypeTransformation { - // InfoTypes to apply the transformation to. An empty list will cause - // this transformation to apply to all findings that correspond to - // infoTypes that were requested in `InspectConfig`. - repeated InfoType info_types = 1; - - // Required. Primitive transformation to apply to the infoType. - PrimitiveTransformation primitive_transformation = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Required. Transformation for each infoType. Cannot specify more than one - // for a given infoType. - repeated InfoTypeTransformation transformations = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// The transformation to apply to the field. -message FieldTransformation { - // Required. Input field(s) to apply the transformation to. - // When you have columns that reference their position within a list, - // omit the index from the FieldId. FieldId name matching ignores the index. - // For example, instead of "contact.nums[0].type", use "contact.nums.type". - repeated FieldId fields = 1 [(google.api.field_behavior) = REQUIRED]; - - // Only apply the transformation if the condition evaluates to true for the - // given `RecordCondition`. The conditions are allowed to reference fields - // that are not used in the actual transformation. - // - // Example Use Cases: - // - // - Apply a different bucket transformation to an age column if the zip code - // column for the same record is within a specific range. - // - Redact a field if the date of birth field is greater than 85. - RecordCondition condition = 3; - - // Transformation to apply. [required] - oneof transformation { - // Apply the transformation to the entire field. - PrimitiveTransformation primitive_transformation = 4; - - // Treat the contents of the field as free text, and selectively - // transform content that matches an `InfoType`. - InfoTypeTransformations info_type_transformations = 5; - } -} - -// A type of transformation that is applied over structured data such as a -// table. -message RecordTransformations { - // Transform the record by applying various field transformations. - repeated FieldTransformation field_transformations = 1; - - // Configuration defining which records get suppressed entirely. Records that - // match any suppression rule are omitted from the output. - repeated RecordSuppression record_suppressions = 2; -} - -// Configuration to suppress records whose suppression conditions evaluate to -// true. -message RecordSuppression { - // A condition that when it evaluates to true will result in the record being - // evaluated to be suppressed from the transformed content. - RecordCondition condition = 1; -} - -// A condition for determining whether a transformation should be applied to -// a field. -message RecordCondition { - // The field type of `value` and `field` do not need to match to be - // considered equal, but not all comparisons are possible. - // EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types, - // but all other comparisons are invalid with incompatible types. - // A `value` of type: - // - // - `string` can be compared against all other types - // - `boolean` can only be compared against other booleans - // - `integer` can be compared against doubles or a string if the string value - // can be parsed as an integer. - // - `double` can be compared against integers or a string if the string can - // be parsed as a double. - // - `Timestamp` can be compared against strings in RFC 3339 date string - // format. - // - `TimeOfDay` can be compared against timestamps and strings in the format - // of 'HH:mm:ss'. - // - // If we fail to compare do to type mismatch, a warning will be given and - // the condition will evaluate to false. - message Condition { - // Required. Field within the record this condition is evaluated against. - FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Operator used to compare the field or infoType to the value. - RelationalOperator operator = 3 [(google.api.field_behavior) = REQUIRED]; - - // Value to compare against. [Mandatory, except for `EXISTS` tests.] - Value value = 4; - } - - // A collection of conditions. - message Conditions { - // A collection of conditions. - repeated Condition conditions = 1; - } - - // An expression, consisting of an operator and conditions. - message Expressions { - // Logical operators for conditional checks. - enum LogicalOperator { - // Unused - LOGICAL_OPERATOR_UNSPECIFIED = 0; - - // Conditional AND - AND = 1; - } - - // The operator to apply to the result of conditions. Default and currently - // only supported value is `AND`. - LogicalOperator logical_operator = 1; - - // Expression types. - oneof type { - // Conditions to apply to the expression. - Conditions conditions = 3; - } - } - - // An expression. - Expressions expressions = 3; -} - -// Overview of the modifications that occurred. -message TransformationOverview { - // Total size in bytes that were transformed in some way. - int64 transformed_bytes = 2; - - // Transformations applied to the dataset. - repeated TransformationSummary transformation_summaries = 3; -} - -// Summary of a single transformation. -// Only one of 'transformation', 'field_transformation', or 'record_suppress' -// will be set. -message TransformationSummary { - // Possible outcomes of transformations. - enum TransformationResultCode { - // Unused - TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; - - // Transformation completed without an error. - SUCCESS = 1; - - // Transformation had an error. - ERROR = 2; - } - - // A collection that informs the user the number of times a particular - // `TransformationResultCode` and error details occurred. - message SummaryResult { - // Number of transformations counted by this result. - int64 count = 1; - - // Outcome of the transformation. - TransformationResultCode code = 2; - - // A place for warnings or errors to show up if a transformation didn't - // work as expected. - string details = 3; - } - - // Set if the transformation was limited to a specific InfoType. - InfoType info_type = 1; - - // Set if the transformation was limited to a specific FieldId. - FieldId field = 2; - - // The specific transformation these stats apply to. - PrimitiveTransformation transformation = 3; - - // The field transformation that was applied. - // If multiple field transformations are requested for a single field, - // this list will contain all of them; otherwise, only one is supplied. - repeated FieldTransformation field_transformations = 5; - - // The specific suppression option these stats apply to. - RecordSuppression record_suppress = 6; - - // Collection of all transformations that took place or had an error. - repeated SummaryResult results = 4; - - // Total size in bytes that were transformed in some way. - int64 transformed_bytes = 7; -} - -// A flattened description of a `PrimitiveTransformation` or -// `RecordSuppression`. -message TransformationDescription { - // The transformation type. - TransformationType type = 1; - - // A description of the transformation. This is empty for a - // RECORD_SUPPRESSION, or is the output of calling toString() on the - // `PrimitiveTransformation` protocol buffer message for any other type of - // transformation. - string description = 2; - - // A human-readable string representation of the `RecordCondition` - // corresponding to this transformation. Set if a `RecordCondition` was used - // to determine whether or not to apply this transformation. - // - // Examples: - // * (age_field > 85) - // * (age_field <= 18) - // * (zip_field exists) - // * (zip_field == 01234) && (city_field != "Springville") - // * (zip_field == 01234) && (age_field <= 18) && (city_field exists) - string condition = 3; - - // Set if the transformation was limited to a specific `InfoType`. - InfoType info_type = 4; -} - -// Details about a single transformation. This object contains a description of -// the transformation, information about whether the transformation was -// successfully applied, and the precise location where the transformation -// occurred. These details are stored in a user-specified BigQuery table. -message TransformationDetails { - // The name of the job that completed the transformation. - string resource_name = 1; - - // The top level name of the container where the transformation is located - // (this will be the source file name or table name). - string container_name = 2; - - // Description of transformation. This would only contain more than one - // element if there were multiple matching transformations and which one to - // apply was ambiguous. Not set for states that contain no transformation, - // currently only state that contains no transformation is - // TransformationResultStateType.METADATA_UNRETRIEVABLE. - repeated TransformationDescription transformation = 3; - - // Status of the transformation, if transformation was not successful, this - // will specify what caused it to fail, otherwise it will show that the - // transformation was successful. - TransformationResultStatus status_details = 4; - - // The number of bytes that were transformed. If transformation was - // unsuccessful or did not take place because there was no content to - // transform, this will be zero. - int64 transformed_bytes = 5; - - // The precise location of the transformed content in the original container. - TransformationLocation transformation_location = 6; -} - -// Specifies the location of a transformation. -message TransformationLocation { - oneof location_type { - // For infotype transformations, link to the corresponding findings ID so - // that location information does not need to be duplicated. Each findings - // ID correlates to an entry in the findings output table, this table only - // gets created when users specify to save findings (add the save findings - // action to the request). - string finding_id = 1; - - // For record transformations, provide a field and container information. - RecordTransformation record_transformation = 2; - } - - // Information about the functionality of the container where this finding - // occurred, if available. - TransformationContainerType container_type = 3; -} - -message RecordTransformation { - // For record transformations, provide a field. - FieldId field_id = 1; - - // Findings container modification timestamp, if applicable. - google.protobuf.Timestamp container_timestamp = 2; - - // Container version, if available ("generation" for Cloud Storage). - string container_version = 3; -} - -message TransformationResultStatus { - // Transformation result status type, this will be either SUCCESS, or it will - // be the reason for why the transformation was not completely successful. - TransformationResultStatusType result_status_type = 1; - - // Detailed error codes and messages - google.rpc.Status details = 2; -} - -// Enum of possible outcomes of transformations. SUCCESS if transformation and -// storing of transformation was successful, otherwise, reason for not -// transforming. -enum TransformationResultStatusType { - STATE_TYPE_UNSPECIFIED = 0; - - // This will be set when a finding could not be transformed (i.e. outside user - // set bucket range). - INVALID_TRANSFORM = 1; - - // This will be set when a BigQuery transformation was successful but could - // not be stored back in BigQuery because the transformed row exceeds - // BigQuery's max row size. - BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2; - - // This will be set when there is a finding in the custom metadata of a file, - // but at the write time of the transformed file, this key / value pair is - // unretrievable. - METADATA_UNRETRIEVABLE = 3; - - // This will be set when the transformation and storing of it is successful. - SUCCESS = 4; -} - -// Describes functionality of a given container in its original format. -enum TransformationContainerType { - TRANSFORM_UNKNOWN_CONTAINER = 0; - - TRANSFORM_BODY = 1; - - TRANSFORM_METADATA = 2; - - TRANSFORM_TABLE = 3; -} - -// An enum of rules that can be used to transform a value. Can be a -// record suppression, or one of the transformation rules specified under -// `PrimitiveTransformation`. -enum TransformationType { - // Unused - TRANSFORMATION_TYPE_UNSPECIFIED = 0; - - // Record suppression - RECORD_SUPPRESSION = 1; - - // Replace value - REPLACE_VALUE = 2; - - // Replace value using a dictionary. - REPLACE_DICTIONARY = 15; - - // Redact - REDACT = 3; - - // Character mask - CHARACTER_MASK = 4; - - // FFX-FPE - CRYPTO_REPLACE_FFX_FPE = 5; - - // Fixed size bucketing - FIXED_SIZE_BUCKETING = 6; - - // Bucketing - BUCKETING = 7; - - // Replace with info type - REPLACE_WITH_INFO_TYPE = 8; - - // Time part - TIME_PART = 9; - - // Crypto hash - CRYPTO_HASH = 10; - - // Date shift - DATE_SHIFT = 12; - - // Deterministic crypto - CRYPTO_DETERMINISTIC_CONFIG = 13; - - // Redact image - REDACT_IMAGE = 14; -} - -// Config for storing transformation details. -message TransformationDetailsStorageConfig { - // Location to store the transformation summary. - oneof type { - // The BigQuery table in which to store the output. This may be an existing - // table or in a new table in an existing dataset. - // If table_id is not set a new one will be generated for you with the - // following format: - // dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific - // time zone will be used for generating the date details. - BigQueryTable table = 1; - } -} - -// Schedule for inspect job triggers. -message Schedule { - oneof option { - // With this option a job is started on a regular periodic basis. For - // example: every day (86400 seconds). - // - // A scheduled start time will be skipped if the previous - // execution has not ended when its scheduled time occurs. - // - // This value must be set to a time duration greater than or equal - // to 1 day and can be no longer than 60 days. - google.protobuf.Duration recurrence_period_duration = 1; - } -} - -// Job trigger option for hybrid jobs. Jobs must be manually created -// and finished. -message Manual { - -} - -// The inspectTemplate contains a configuration (set of types of sensitive data -// to be detected) to be used anywhere you otherwise would normally specify -// InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates -// to learn more. -message InspectTemplate { - option (google.api.resource) = { - type: "dlp.googleapis.com/InspectTemplate" - pattern: "organizations/{organization}/inspectTemplates/{inspect_template}" - pattern: "projects/{project}/inspectTemplates/{inspect_template}" - pattern: "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}" - pattern: "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}" - }; - - // Output only. The template name. - // - // The template will have one of the following formats: - // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR - // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Display name (max 256 chars). - string display_name = 2; - - // Short description (max 256 chars). - string description = 3; - - // Output only. The creation timestamp of an inspectTemplate. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update timestamp of an inspectTemplate. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The core content of the template. Configuration of the scanning process. - InspectConfig inspect_config = 6; -} - -// DeidentifyTemplates contains instructions on how to de-identify content. -// See https://cloud.google.com/dlp/docs/concepts-templates to learn more. -message DeidentifyTemplate { - option (google.api.resource) = { - type: "dlp.googleapis.com/DeidentifyTemplate" - pattern: "organizations/{organization}/deidentifyTemplates/{deidentify_template}" - pattern: "projects/{project}/deidentifyTemplates/{deidentify_template}" - pattern: "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}" - pattern: "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}" - }; - - // Output only. The template name. - // - // The template will have one of the following formats: - // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR - // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Display name (max 256 chars). - string display_name = 2; - - // Short description (max 256 chars). - string description = 3; - - // Output only. The creation timestamp of an inspectTemplate. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update timestamp of an inspectTemplate. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The core content of the template. - DeidentifyConfig deidentify_config = 6; -} - -// Details information about an error encountered during job execution or -// the results of an unsuccessful activation of the JobTrigger. -message Error { - // Detailed error codes and messages. - google.rpc.Status details = 1; - - // The times the error occurred. - repeated google.protobuf.Timestamp timestamps = 2; -} - -// Contains a configuration to make dlp api calls on a repeating basis. -// See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more. -message JobTrigger { - option (google.api.resource) = { - type: "dlp.googleapis.com/JobTrigger" - pattern: "projects/{project}/jobTriggers/{job_trigger}" - pattern: "projects/{project}/locations/{location}/jobTriggers/{job_trigger}" - }; - - // What event needs to occur for a new job to be started. - message Trigger { - oneof trigger { - // Create a job on a repeating basis based on the elapse of time. - Schedule schedule = 1; - - // For use with hybrid jobs. Jobs must be manually created and finished. - Manual manual = 2; - } - } - - // Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs - // will be created with this configuration. The service may automatically - // pause triggers experiencing frequent errors. To restart a job, set the - // status to HEALTHY after correcting user errors. - enum Status { - // Unused. - STATUS_UNSPECIFIED = 0; - - // Trigger is healthy. - HEALTHY = 1; - - // Trigger is temporarily paused. - PAUSED = 2; - - // Trigger is cancelled and can not be resumed. - CANCELLED = 3; - } - - // Unique resource name for the triggeredJob, assigned by the service when the - // triggeredJob is created, for example - // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1; - - // Display name (max 100 chars) - string display_name = 2; - - // User provided description (max 256 chars) - string description = 3; - - // The configuration details for the specific type of job to run. - oneof job { - // For inspect jobs, a snapshot of the configuration. - InspectJobConfig inspect_job = 4; - } - - // A list of triggers which will be OR'ed together. Only one in the list - // needs to trigger for a job to be started. The list may contain only - // a single Schedule trigger and must have at least one object. - repeated Trigger triggers = 5; - - // Output only. A stream of errors encountered when the trigger was activated. Repeated - // errors may result in the JobTrigger automatically being paused. - // Will return the last 100 errors. Whenever the JobTrigger is modified - // this list will be cleared. - repeated Error errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The creation timestamp of a triggeredJob. - google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update timestamp of a triggeredJob. - google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The timestamp of the last time this trigger executed. - google.protobuf.Timestamp last_run_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. A status for this trigger. - Status status = 10 [(google.api.field_behavior) = REQUIRED]; -} - -// A task to execute on the completion of a job. -// See https://cloud.google.com/dlp/docs/concepts-actions to learn more. -message Action { - // If set, the detailed findings will be persisted to the specified - // OutputStorageConfig. Only a single instance of this action can be - // specified. - // Compatible with: Inspect, Risk - message SaveFindings { - // Location to store findings outside of DLP. - OutputStorageConfig output_config = 1; - } - - // Publish a message into a given Pub/Sub topic when DlpJob has completed. The - // message contains a single field, `DlpJobName`, which is equal to the - // finished job's - // [`DlpJob.name`](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob). - // Compatible with: Inspect, Risk - message PublishToPubSub { - // Cloud Pub/Sub topic to send notifications to. The topic must have given - // publishing access rights to the DLP API service account executing - // the long running DlpJob sending the notifications. - // Format is projects/{project}/topics/{topic}. - string topic = 1; - } - - // Publish the result summary of a DlpJob to the Cloud Security - // Command Center (CSCC Alpha). - // This action is only available for projects which are parts of - // an organization and whitelisted for the alpha Cloud Security Command - // Center. - // The action will publish the count of finding instances and their info - // types. The summary of findings will be persisted in CSCC and are governed - // by CSCC service-specific policy, see - // https://cloud.google.com/terms/service-terms Only a single instance of this - // action can be specified. Compatible with: Inspect - message PublishSummaryToCscc { - - } - - // Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag - // templates are applied to the resource that Cloud DLP scanned. Data - // Catalog tag templates are stored in the same project and region where the - // BigQuery table exists. For Cloud DLP to create and apply the tag template, - // the Cloud DLP service agent must have the - // `roles/datacatalog.tagTemplateOwner` permission on the project. The tag - // template contains fields summarizing the results of the DlpJob. Any field - // values previously written by another DlpJob are deleted. [InfoType naming - // patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using - // this feature. - // - // Findings are persisted in Data Catalog storage and are governed by - // service-specific policies for Data Catalog. For more information, see - // [Service Specific Terms](https://cloud.google.com/terms/service-terms). - // - // Only a single instance of this action can be specified. This action is - // allowed only if all resources being scanned are BigQuery tables. - // Compatible with: Inspect - message PublishFindingsToCloudDataCatalog { - - } - - // Create a de-identified copy of the requested table or files. - // - // A TransformationDetail will be created for each transformation. - // - // If any rows in BigQuery are skipped during de-identification - // (transformation errors or row size exceeds BigQuery insert API limits) they - // are placed in the failure output table. If the original row exceeds - // the BigQuery insert API limit it will be truncated when written to the - // failure output table. The failure output table can be set in the - // action.deidentify.output.big_query_output.deidentified_failure_output_table - // field, if no table is set, a table will be automatically created in the - // same project and dataset as the original table. - // - // Compatible with: Inspect - message Deidentify { - // User specified deidentify templates and configs for structured, - // unstructured, and image files. - TransformationConfig transformation_config = 7; - - // Config for storing transformation details. This is separate from the - // de-identified content, and contains metadata about the successful - // transformations and/or failures that occurred while de-identifying. This - // needs to be set in order for users to access information about the status - // of each transformation (see - // [TransformationDetails][google.privacy.dlp.v2.TransformationDetails] - // message for more information about what is noted). - TransformationDetailsStorageConfig transformation_details_storage_config = 3; - - oneof output { - // Required. User settable Cloud Storage bucket and folders to store de-identified - // files. This field must be set for cloud storage deidentification. The - // output Cloud Storage bucket must be different from the input bucket. - // De-identified files will overwrite files in the output path. - // - // Form of: gs://bucket/folder/ or gs://bucket - string cloud_storage_output = 9 [(google.api.field_behavior) = REQUIRED]; - } - - // List of user-specified file type groups to transform. If specified, only - // the files with these filetypes will be transformed. If empty, all - // supported files will be transformed. Supported types may be automatically - // added over time. If a file type is set in this field that isn't supported - // by the Deidentify action then the job will fail and will not be - // successfully created/started. Currently the only filetypes supported are: - // IMAGES, TEXT_FILES, CSV, TSV. - repeated FileType file_types_to_transform = 8; - } - - // Sends an email when the job completes. The email goes to IAM project owners - // and technical [Essential - // Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts). - message JobNotificationEmails { - - } - - // Enable Stackdriver metric dlp.googleapis.com/finding_count. This - // will publish a metric to stack driver on each infotype requested and - // how many findings were found for it. CustomDetectors will be bucketed - // as 'Custom' under the Stackdriver label 'info_type'. - message PublishToStackdriver { - - } - - oneof action { - // Save resulting findings in a provided location. - SaveFindings save_findings = 1; - - // Publish a notification to a Pub/Sub topic. - PublishToPubSub pub_sub = 2; - - // Publish summary to Cloud Security Command Center (Alpha). - PublishSummaryToCscc publish_summary_to_cscc = 3; - - // Publish findings to Cloud Datahub. - PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5; - - // Create a de-identified copy of the input data. - Deidentify deidentify = 7; - - // Enable email notification for project owners and editors on job's - // completion/failure. - JobNotificationEmails job_notification_emails = 8; - - // Enable Stackdriver metric dlp.googleapis.com/finding_count. - PublishToStackdriver publish_to_stackdriver = 9; - } -} - -// User specified templates and configs for how to deidentify structured, -// unstructures, and image files. User must provide either a unstructured -// deidentify template or at least one redact image config. -message TransformationConfig { - // De-identify template. - // If this template is specified, it will serve as the default de-identify - // template. This template cannot contain `record_transformations` since it - // can be used for unstructured content such as free-form text files. If this - // template is not set, a default `ReplaceWithInfoTypeConfig` will be used to - // de-identify unstructured content. - string deidentify_template = 1; - - // Structured de-identify template. - // If this template is specified, it will serve as the de-identify template - // for structured content such as delimited files and tables. If this template - // is not set but the `deidentify_template` is set, then `deidentify_template` - // will also apply to the structured content. If neither template is set, a - // default `ReplaceWithInfoTypeConfig` will be used to de-identify structured - // content. - string structured_deidentify_template = 2; - - // Image redact template. - // If this template is specified, it will serve as the de-identify template - // for images. If this template is not set, all findings in the image will be - // redacted with a black box. - string image_redact_template = 4; -} - -// Request message for CreateInspectTemplate. -message CreateInspectTemplateRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on the scope of the request - // (project or organization) and whether you have [specified a processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // + Organizations scope, location specified:
- // `organizations/`ORG_ID`/locations/`LOCATION_ID - // + Organizations scope, no location specified (defaults to global):
- // `organizations/`ORG_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/InspectTemplate" - } - ]; - - // Required. The InspectTemplate to create. - InspectTemplate inspect_template = 2 [(google.api.field_behavior) = REQUIRED]; - - // The template id can contain uppercase and lowercase letters, - // numbers, and hyphens; that is, it must match the regular - // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - // characters. Can be empty to allow the system to generate one. - string template_id = 3; - - // Deprecated. This field has no effect. - string location_id = 4; -} - -// Request message for UpdateInspectTemplate. -message UpdateInspectTemplateRequest { - // Required. Resource name of organization and inspectTemplate to be updated, for - // example `organizations/433245324/inspectTemplates/432452342` or - // projects/project-id/inspectTemplates/432452342. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/InspectTemplate" - } - ]; - - // New InspectTemplate value. - InspectTemplate inspect_template = 2; - - // Mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3; -} - -// Request message for GetInspectTemplate. -message GetInspectTemplateRequest { - // Required. Resource name of the organization and inspectTemplate to be read, for - // example `organizations/433245324/inspectTemplates/432452342` or - // projects/project-id/inspectTemplates/432452342. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/InspectTemplate" - } - ]; -} - -// Request message for ListInspectTemplates. -message ListInspectTemplatesRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on the scope of the request - // (project or organization) and whether you have [specified a processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // + Organizations scope, location specified:
- // `organizations/`ORG_ID`/locations/`LOCATION_ID - // + Organizations scope, no location specified (defaults to global):
- // `organizations/`ORG_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/InspectTemplate" - } - ]; - - // Page token to continue retrieval. Comes from previous call - // to `ListInspectTemplates`. - string page_token = 2; - - // Size of the page, can be limited by the server. If zero server returns - // a page of max size 100. - int32 page_size = 3; - - // Comma separated list of fields to order by, - // followed by `asc` or `desc` postfix. This list is case-insensitive, - // default sorting order is ascending, redundant space characters are - // insignificant. - // - // Example: `name asc,update_time, create_time desc` - // - // Supported fields are: - // - // - `create_time`: corresponds to the time the template was created. - // - `update_time`: corresponds to the time the template was last updated. - // - `name`: corresponds to the template's name. - // - `display_name`: corresponds to the template's display name. - string order_by = 4; - - // Deprecated. This field has no effect. - string location_id = 5; -} - -// Response message for ListInspectTemplates. -message ListInspectTemplatesResponse { - // List of inspectTemplates, up to page_size in ListInspectTemplatesRequest. - repeated InspectTemplate inspect_templates = 1; - - // If the next page is available then the next page token to be used - // in following ListInspectTemplates request. - string next_page_token = 2; -} - -// Request message for DeleteInspectTemplate. -message DeleteInspectTemplateRequest { - // Required. Resource name of the organization and inspectTemplate to be deleted, for - // example `organizations/433245324/inspectTemplates/432452342` or - // projects/project-id/inspectTemplates/432452342. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/InspectTemplate" - } - ]; -} - -// Request message for CreateJobTrigger. -message CreateJobTriggerRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on whether you have [specified a - // processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/JobTrigger" - } - ]; - - // Required. The JobTrigger to create. - JobTrigger job_trigger = 2 [(google.api.field_behavior) = REQUIRED]; - - // The trigger id can contain uppercase and lowercase letters, - // numbers, and hyphens; that is, it must match the regular - // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - // characters. Can be empty to allow the system to generate one. - string trigger_id = 3; - - // Deprecated. This field has no effect. - string location_id = 4; -} - -// Request message for ActivateJobTrigger. -message ActivateJobTriggerRequest { - // Required. Resource name of the trigger to activate, for example - // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - } - ]; -} - -// Request message for UpdateJobTrigger. -message UpdateJobTriggerRequest { - // Required. Resource name of the project and the triggeredJob, for example - // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - } - ]; - - // New JobTrigger value. - JobTrigger job_trigger = 2; - - // Mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3; -} - -// Request message for GetJobTrigger. -message GetJobTriggerRequest { - // Required. Resource name of the project and the triggeredJob, for example - // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - } - ]; -} - -// Request message for CreateDlpJobRequest. Used to initiate long running -// jobs such as calculating risk metrics or inspecting Google Cloud -// Storage. -message CreateDlpJobRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on whether you have [specified a - // processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/DlpJob" - } - ]; - - // The configuration details for the specific type of job to run. - oneof job { - // An inspection job scans a storage repository for InfoTypes. - InspectJobConfig inspect_job = 2; - - // A risk analysis job calculates re-identification risk metrics for a - // BigQuery table. - RiskAnalysisJobConfig risk_job = 3; - } - - // The job id can contain uppercase and lowercase letters, - // numbers, and hyphens; that is, it must match the regular - // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - // characters. Can be empty to allow the system to generate one. - string job_id = 4; - - // Deprecated. This field has no effect. - string location_id = 5; -} - -// Request message for ListJobTriggers. -message ListJobTriggersRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on whether you have [specified a - // processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/JobTrigger" - } - ]; - - // Page token to continue retrieval. Comes from previous call - // to ListJobTriggers. `order_by` field must not - // change for subsequent calls. - string page_token = 2; - - // Size of the page, can be limited by a server. - int32 page_size = 3; - - // Comma separated list of triggeredJob fields to order by, - // followed by `asc` or `desc` postfix. This list is case-insensitive, - // default sorting order is ascending, redundant space characters are - // insignificant. - // - // Example: `name asc,update_time, create_time desc` - // - // Supported fields are: - // - // - `create_time`: corresponds to the time the JobTrigger was created. - // - `update_time`: corresponds to the time the JobTrigger was last updated. - // - `last_run_time`: corresponds to the last time the JobTrigger ran. - // - `name`: corresponds to the JobTrigger's name. - // - `display_name`: corresponds to the JobTrigger's display name. - // - `status`: corresponds to JobTrigger's status. - string order_by = 4; - - // Allows filtering. - // - // Supported syntax: - // - // * Filter expressions are made up of one or more restrictions. - // * Restrictions can be combined by `AND` or `OR` logical operators. A - // sequence of restrictions implicitly uses `AND`. - // * A restriction has the form of `{field} {operator} {value}`. - // * Supported fields/values for inspect triggers: - // - `status` - HEALTHY|PAUSED|CANCELLED - // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - // - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by - // quotation marks. Nanoseconds are ignored. - // - 'error_count' - Number of errors that have occurred while running. - // * The operator must be `=` or `!=` for status and inspected_storage. - // - // Examples: - // - // * inspected_storage = cloud_storage AND status = HEALTHY - // * inspected_storage = cloud_storage OR inspected_storage = bigquery - // * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) - // * last_run_time > \"2017-12-12T00:00:00+00:00\" - // - // The length of this field should be no more than 500 characters. - string filter = 5; - - // The type of jobs. Will use `DlpJobType.INSPECT` if not set. - DlpJobType type = 6; - - // Deprecated. This field has no effect. - string location_id = 7; -} - -// Response message for ListJobTriggers. -message ListJobTriggersResponse { - // List of triggeredJobs, up to page_size in ListJobTriggersRequest. - repeated JobTrigger job_triggers = 1; - - // If the next page is available then the next page token to be used - // in following ListJobTriggers request. - string next_page_token = 2; -} - -// Request message for DeleteJobTrigger. -message DeleteJobTriggerRequest { - // Required. Resource name of the project and the triggeredJob, for example - // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - } - ]; -} - -// Controls what and how to inspect for findings. -message InspectJobConfig { - // The data to scan. - StorageConfig storage_config = 1; - - // How and what to scan for. - InspectConfig inspect_config = 2; - - // If provided, will be used as the default for all values in InspectConfig. - // `inspect_config` will be merged into the values persisted as part of the - // template. - string inspect_template_name = 3; - - // Actions to execute at the completion of the job. - repeated Action actions = 4; -} - -// A task to execute when a data profile has been generated. -message DataProfileAction { - // If set, the detailed data profiles will be persisted to the location - // of your choice whenever updated. - message Export { - // Store all table and column profiles in an existing table or a new table - // in an existing dataset. Each re-generation will result in a new row in - // BigQuery. - BigQueryTable profile_table = 1; - } - - // Send a Pub/Sub message into the given Pub/Sub topic to connect other - // systems to data profile generation. The message payload data will - // be the byte serialization of `DataProfilePubSubMessage`. - message PubSubNotification { - // The levels of detail that can be included in the Pub/Sub message. - enum DetailLevel { - // Unused. - DETAIL_LEVEL_UNSPECIFIED = 0; - - // The full table data profile. - TABLE_PROFILE = 1; - - // The resource name of the table. - RESOURCE_NAME = 2; - } - - // Cloud Pub/Sub topic to send notifications to. - // Format is projects/{project}/topics/{topic}. - string topic = 1; - - // The type of event that triggers a Pub/Sub. At most one - // `PubSubNotification` per EventType is permitted. - EventType event = 2; - - // Conditions (e.g., data risk or sensitivity level) for triggering a - // Pub/Sub. - DataProfilePubSubCondition pubsub_condition = 3; - - // How much data to include in the Pub/Sub message. If the user wishes to - // limit the size of the message, they can use resource_name and fetch the - // profile fields they wish to. Per table profile (not per column). - DetailLevel detail_of_message = 4; - } - - // Types of event that can trigger an action. - enum EventType { - // Unused. - EVENT_TYPE_UNSPECIFIED = 0; - - // New profile (not a re-profile). - NEW_PROFILE = 1; - - // Changed one of the following profile metrics: - // * Table data risk score - // * Table sensitivity score - // * Table resource visibility - // * Table encryption type - // * Table predicted infoTypes - // * Table other infoTypes - CHANGED_PROFILE = 2; - - // Table data risk score or sensitivity score increased. - SCORE_INCREASED = 3; - - // A user (non-internal) error occurred. - ERROR_CHANGED = 4; - } - - oneof action { - // Export data profiles into a provided location. - Export export_data = 1; - - // Publish a message into the Pub/Sub topic. - PubSubNotification pub_sub_notification = 2; - } -} - -// Configuration for setting up a job to scan resources for profile generation. -// Only one data profile configuration may exist per organization, folder, -// or project. -// -// The generated data profiles are retained according to the -// [data retention policy] -// (https://cloud.google.com/dlp/docs/data-profiles#retention). -message DataProfileJobConfig { - // The data to scan. - DataProfileLocation location = 1; - - // The project that will run the scan. The DLP service - // account that exists within this project must have access to all resources - // that are profiled, and the Cloud DLP API must be enabled. - string project_id = 5; - - // Detection logic for profile generation. - // - // Not all template features are used by profiles. FindingLimits, - // include_quote and exclude_info_types have no impact on - // data profiling. - // - // Multiple templates may be provided if there is data in multiple regions. - // At most one template must be specified per-region (including "global"). - // Each region is scanned using the applicable template. If no region-specific - // template is specified, but a "global" template is specified, it will be - // copied to that region and used instead. If no global or region-specific - // template is provided for a region with data, that region's data will not be - // scanned. - // - // For more information, see - // https://cloud.google.com/dlp/docs/data-profiles#data_residency. - repeated string inspect_templates = 7; - - // Actions to execute at the completion of the job. - repeated DataProfileAction data_profile_actions = 6; -} - -// The data that will be profiled. -message DataProfileLocation { - // The location to be scanned. - oneof location { - // The ID of an organization to scan. - int64 organization_id = 1; - - // The ID of the Folder within an organization to scan. - int64 folder_id = 2; - } -} - -// Combines all of the information about a DLP job. -message DlpJob { - option (google.api.resource) = { - type: "dlp.googleapis.com/DlpJob" - pattern: "projects/{project}/dlpJobs/{dlp_job}" - pattern: "projects/{project}/locations/{location}/dlpJobs/{dlp_job}" - }; - - // Possible states of a job. New items may be added. - enum JobState { - // Unused. - JOB_STATE_UNSPECIFIED = 0; - - // The job has not yet started. - PENDING = 1; - - // The job is currently running. Once a job has finished it will transition - // to FAILED or DONE. - RUNNING = 2; - - // The job is no longer running. - DONE = 3; - - // The job was canceled before it could be completed. - CANCELED = 4; - - // The job had an error and did not complete. - FAILED = 5; - - // The job is currently accepting findings via hybridInspect. - // A hybrid job in ACTIVE state may continue to have findings added to it - // through the calling of hybridInspect. After the job has finished no more - // calls to hybridInspect may be made. ACTIVE jobs can transition to DONE. - ACTIVE = 6; - } - - // The server-assigned name. - string name = 1; - - // The type of job. - DlpJobType type = 2; - - // State of a job. - JobState state = 3; - - oneof details { - // Results from analyzing risk of a data source. - AnalyzeDataSourceRiskDetails risk_details = 4; - - // Results from inspecting a data source. - InspectDataSourceDetails inspect_details = 5; - } - - // Time when the job was created. - google.protobuf.Timestamp create_time = 6; - - // Time when the job started. - google.protobuf.Timestamp start_time = 7; - - // Time when the job finished. - google.protobuf.Timestamp end_time = 8; - - // If created by a job trigger, the resource name of the trigger that - // instantiated the job. - string job_trigger_name = 10; - - // A stream of errors encountered running the job. - repeated Error errors = 11; -} - -// The request message for [DlpJobs.GetDlpJob][]. -message GetDlpJobRequest { - // Required. The name of the DlpJob resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - } - ]; -} - -// The request message for listing DLP jobs. -message ListDlpJobsRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on whether you have [specified a - // processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 4 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/DlpJob" - } - ]; - - // Allows filtering. - // - // Supported syntax: - // - // * Filter expressions are made up of one or more restrictions. - // * Restrictions can be combined by `AND` or `OR` logical operators. A - // sequence of restrictions implicitly uses `AND`. - // * A restriction has the form of `{field} {operator} {value}`. - // * Supported fields/values for inspect jobs: - // - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - // - `trigger_name` - The name of the trigger that created the job. - // - 'end_time` - Corresponds to the time the job finished. - // - 'start_time` - Corresponds to the time the job finished. - // * Supported fields for risk analysis jobs: - // - `state` - RUNNING|CANCELED|FINISHED|FAILED - // - 'end_time` - Corresponds to the time the job finished. - // - 'start_time` - Corresponds to the time the job finished. - // * The operator must be `=` or `!=`. - // - // Examples: - // - // * inspected_storage = cloud_storage AND state = done - // * inspected_storage = cloud_storage OR inspected_storage = bigquery - // * inspected_storage = cloud_storage AND (state = done OR state = canceled) - // * end_time > \"2017-12-12T00:00:00+00:00\" - // - // The length of this field should be no more than 500 characters. - string filter = 1; - - // The standard list page size. - int32 page_size = 2; - - // The standard list page token. - string page_token = 3; - - // The type of job. Defaults to `DlpJobType.INSPECT` - DlpJobType type = 5; - - // Comma separated list of fields to order by, - // followed by `asc` or `desc` postfix. This list is case-insensitive, - // default sorting order is ascending, redundant space characters are - // insignificant. - // - // Example: `name asc, end_time asc, create_time desc` - // - // Supported fields are: - // - // - `create_time`: corresponds to the time the job was created. - // - `end_time`: corresponds to the time the job ended. - // - `name`: corresponds to the job's name. - // - `state`: corresponds to `state` - string order_by = 6; - - // Deprecated. This field has no effect. - string location_id = 7; -} - -// The response message for listing DLP jobs. -message ListDlpJobsResponse { - // A list of DlpJobs that matches the specified filter in the request. - repeated DlpJob jobs = 1; - - // The standard List next-page token. - string next_page_token = 2; -} - -// The request message for canceling a DLP job. -message CancelDlpJobRequest { - // Required. The name of the DlpJob resource to be cancelled. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - } - ]; -} - -// The request message for finishing a DLP hybrid job. -message FinishDlpJobRequest { - // Required. The name of the DlpJob resource to be cancelled. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - } - ]; -} - -// The request message for deleting a DLP job. -message DeleteDlpJobRequest { - // Required. The name of the DlpJob resource to be deleted. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - } - ]; -} - -// Request message for CreateDeidentifyTemplate. -message CreateDeidentifyTemplateRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on the scope of the request - // (project or organization) and whether you have [specified a processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // + Organizations scope, location specified:
- // `organizations/`ORG_ID`/locations/`LOCATION_ID - // + Organizations scope, no location specified (defaults to global):
- // `organizations/`ORG_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/DeidentifyTemplate" - } - ]; - - // Required. The DeidentifyTemplate to create. - DeidentifyTemplate deidentify_template = 2 [(google.api.field_behavior) = REQUIRED]; - - // The template id can contain uppercase and lowercase letters, - // numbers, and hyphens; that is, it must match the regular - // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - // characters. Can be empty to allow the system to generate one. - string template_id = 3; - - // Deprecated. This field has no effect. - string location_id = 4; -} - -// Request message for UpdateDeidentifyTemplate. -message UpdateDeidentifyTemplateRequest { - // Required. Resource name of organization and deidentify template to be updated, for - // example `organizations/433245324/deidentifyTemplates/432452342` or - // projects/project-id/deidentifyTemplates/432452342. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DeidentifyTemplate" - } - ]; - - // New DeidentifyTemplate value. - DeidentifyTemplate deidentify_template = 2; - - // Mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3; -} - -// Request message for GetDeidentifyTemplate. -message GetDeidentifyTemplateRequest { - // Required. Resource name of the organization and deidentify template to be read, for - // example `organizations/433245324/deidentifyTemplates/432452342` or - // projects/project-id/deidentifyTemplates/432452342. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DeidentifyTemplate" - } - ]; -} - -// Request message for ListDeidentifyTemplates. -message ListDeidentifyTemplatesRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on the scope of the request - // (project or organization) and whether you have [specified a processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // + Organizations scope, location specified:
- // `organizations/`ORG_ID`/locations/`LOCATION_ID - // + Organizations scope, no location specified (defaults to global):
- // `organizations/`ORG_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/DeidentifyTemplate" - } - ]; - - // Page token to continue retrieval. Comes from previous call - // to `ListDeidentifyTemplates`. - string page_token = 2; - - // Size of the page, can be limited by the server. If zero server returns - // a page of max size 100. - int32 page_size = 3; - - // Comma separated list of fields to order by, - // followed by `asc` or `desc` postfix. This list is case-insensitive, - // default sorting order is ascending, redundant space characters are - // insignificant. - // - // Example: `name asc,update_time, create_time desc` - // - // Supported fields are: - // - // - `create_time`: corresponds to the time the template was created. - // - `update_time`: corresponds to the time the template was last updated. - // - `name`: corresponds to the template's name. - // - `display_name`: corresponds to the template's display name. - string order_by = 4; - - // Deprecated. This field has no effect. - string location_id = 5; -} - -// Response message for ListDeidentifyTemplates. -message ListDeidentifyTemplatesResponse { - // List of deidentify templates, up to page_size in - // ListDeidentifyTemplatesRequest. - repeated DeidentifyTemplate deidentify_templates = 1; - - // If the next page is available then the next page token to be used - // in following ListDeidentifyTemplates request. - string next_page_token = 2; -} - -// Request message for DeleteDeidentifyTemplate. -message DeleteDeidentifyTemplateRequest { - // Required. Resource name of the organization and deidentify template to be deleted, - // for example `organizations/433245324/deidentifyTemplates/432452342` or - // projects/project-id/deidentifyTemplates/432452342. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DeidentifyTemplate" - } - ]; -} - -// Configuration for a custom dictionary created from a data source of any size -// up to the maximum size defined in the -// [limits](https://cloud.google.com/dlp/limits) page. The artifacts of -// dictionary creation are stored in the specified Cloud Storage -// location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries -// that satisfy the size requirements. -message LargeCustomDictionaryConfig { - // Location to store dictionary artifacts in Cloud Storage. These files - // will only be accessible by project owners and the DLP API. If any of these - // artifacts are modified, the dictionary is considered invalid and can no - // longer be used. - CloudStoragePath output_path = 1; - - oneof source { - // Set of files containing newline-delimited lists of dictionary phrases. - CloudStorageFileSet cloud_storage_file_set = 2; - - // Field in a BigQuery table where each cell represents a dictionary phrase. - BigQueryField big_query_field = 3; - } -} - -// Summary statistics of a custom dictionary. -message LargeCustomDictionaryStats { - // Approximate number of distinct phrases in the dictionary. - int64 approx_num_phrases = 1; -} - -// Configuration for stored infoTypes. All fields and subfield are provided -// by the user. For more information, see -// https://cloud.google.com/dlp/docs/creating-custom-infotypes. -message StoredInfoTypeConfig { - // Display name of the StoredInfoType (max 256 characters). - string display_name = 1; - - // Description of the StoredInfoType (max 256 characters). - string description = 2; - - // Stored infotype types. - oneof type { - // StoredInfoType where findings are defined by a dictionary of phrases. - LargeCustomDictionaryConfig large_custom_dictionary = 3; - - // Store dictionary-based CustomInfoType. - CustomInfoType.Dictionary dictionary = 4; - - // Store regular expression-based StoredInfoType. - CustomInfoType.Regex regex = 5; - } -} - -// Statistics for a StoredInfoType. -message StoredInfoTypeStats { - // Stat types - oneof type { - // StoredInfoType where findings are defined by a dictionary of phrases. - LargeCustomDictionaryStats large_custom_dictionary = 1; - } -} - -// Version of a StoredInfoType, including the configuration used to build it, -// create timestamp, and current state. -message StoredInfoTypeVersion { - // StoredInfoType configuration. - StoredInfoTypeConfig config = 1; - - // Create timestamp of the version. Read-only, determined by the system - // when the version is created. - google.protobuf.Timestamp create_time = 2; - - // Stored info type version state. Read-only, updated by the system - // during dictionary creation. - StoredInfoTypeState state = 3; - - // Errors that occurred when creating this storedInfoType version, or - // anomalies detected in the storedInfoType data that render it unusable. Only - // the five most recent errors will be displayed, with the most recent error - // appearing first. - // - // For example, some of the data for stored custom dictionaries is put in - // the user's Cloud Storage bucket, and if this data is modified or - // deleted by the user or another system, the dictionary becomes invalid. - // - // If any errors occur, fix the problem indicated by the error message and - // use the UpdateStoredInfoType API method to create another version of the - // storedInfoType to continue using it, reusing the same `config` if it was - // not the source of the error. - repeated Error errors = 4; - - // Statistics about this storedInfoType version. - StoredInfoTypeStats stats = 5; -} - -// StoredInfoType resource message that contains information about the current -// version and any pending updates. -message StoredInfoType { - option (google.api.resource) = { - type: "dlp.googleapis.com/StoredInfoType" - pattern: "organizations/{organization}/storedInfoTypes/{stored_info_type}" - pattern: "projects/{project}/storedInfoTypes/{stored_info_type}" - pattern: "organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}" - pattern: "projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}" - }; - - // Resource name. - string name = 1; - - // Current version of the stored info type. - StoredInfoTypeVersion current_version = 2; - - // Pending versions of the stored info type. Empty if no versions are - // pending. - repeated StoredInfoTypeVersion pending_versions = 3; -} - -// Request message for CreateStoredInfoType. -message CreateStoredInfoTypeRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on the scope of the request - // (project or organization) and whether you have [specified a processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // + Organizations scope, location specified:
- // `organizations/`ORG_ID`/locations/`LOCATION_ID - // + Organizations scope, no location specified (defaults to global):
- // `organizations/`ORG_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/StoredInfoType" - } - ]; - - // Required. Configuration of the storedInfoType to create. - StoredInfoTypeConfig config = 2 [(google.api.field_behavior) = REQUIRED]; - - // The storedInfoType ID can contain uppercase and lowercase letters, - // numbers, and hyphens; that is, it must match the regular - // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 - // characters. Can be empty to allow the system to generate one. - string stored_info_type_id = 3; - - // Deprecated. This field has no effect. - string location_id = 4; -} - -// Request message for UpdateStoredInfoType. -message UpdateStoredInfoTypeRequest { - // Required. Resource name of organization and storedInfoType to be updated, for - // example `organizations/433245324/storedInfoTypes/432452342` or - // projects/project-id/storedInfoTypes/432452342. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/StoredInfoType" - } - ]; - - // Updated configuration for the storedInfoType. If not provided, a new - // version of the storedInfoType will be created with the existing - // configuration. - StoredInfoTypeConfig config = 2; - - // Mask to control which fields get updated. - google.protobuf.FieldMask update_mask = 3; -} - -// Request message for GetStoredInfoType. -message GetStoredInfoTypeRequest { - // Required. Resource name of the organization and storedInfoType to be read, for - // example `organizations/433245324/storedInfoTypes/432452342` or - // projects/project-id/storedInfoTypes/432452342. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/StoredInfoType" - } - ]; -} - -// Request message for ListStoredInfoTypes. -message ListStoredInfoTypesRequest { - // Required. Parent resource name. - // - // The format of this value varies depending on the scope of the request - // (project or organization) and whether you have [specified a processing - // location](https://cloud.google.com/dlp/docs/specifying-location): - // - // + Projects scope, location specified:
- // `projects/`PROJECT_ID`/locations/`LOCATION_ID - // + Projects scope, no location specified (defaults to global):
- // `projects/`PROJECT_ID - // - // The following example `parent` string specifies a parent project with the - // identifier `example-project`, and specifies the `europe-west3` location - // for processing data: - // - // parent=projects/example-project/locations/europe-west3 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "dlp.googleapis.com/StoredInfoType" - } - ]; - - // Page token to continue retrieval. Comes from previous call - // to `ListStoredInfoTypes`. - string page_token = 2; - - // Size of the page, can be limited by the server. If zero server returns - // a page of max size 100. - int32 page_size = 3; - - // Comma separated list of fields to order by, - // followed by `asc` or `desc` postfix. This list is case-insensitive, - // default sorting order is ascending, redundant space characters are - // insignificant. - // - // Example: `name asc, display_name, create_time desc` - // - // Supported fields are: - // - // - `create_time`: corresponds to the time the most recent version of the - // resource was created. - // - `state`: corresponds to the state of the resource. - // - `name`: corresponds to resource name. - // - `display_name`: corresponds to info type's display name. - string order_by = 4; - - // Deprecated. This field has no effect. - string location_id = 5; -} - -// Response message for ListStoredInfoTypes. -message ListStoredInfoTypesResponse { - // List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest. - repeated StoredInfoType stored_info_types = 1; - - // If the next page is available then the next page token to be used - // in following ListStoredInfoTypes request. - string next_page_token = 2; -} - -// Request message for DeleteStoredInfoType. -message DeleteStoredInfoTypeRequest { - // Required. Resource name of the organization and storedInfoType to be deleted, for - // example `organizations/433245324/storedInfoTypes/432452342` or - // projects/project-id/storedInfoTypes/432452342. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/StoredInfoType" - } - ]; -} - -// Request to search for potentially sensitive info in a custom location. -message HybridInspectJobTriggerRequest { - // Required. Resource name of the trigger to execute a hybrid inspect on, for example - // `projects/dlp-test-project/jobTriggers/53234423`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/JobTrigger" - } - ]; - - // The item to inspect. - HybridContentItem hybrid_item = 3; -} - -// Request to search for potentially sensitive info in a custom location. -message HybridInspectDlpJobRequest { - // Required. Resource name of the job to execute a hybrid inspect on, for example - // `projects/dlp-test-project/dlpJob/53234423`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dlp.googleapis.com/DlpJob" - } - ]; - - // The item to inspect. - HybridContentItem hybrid_item = 3; -} - -// An individual hybrid item to inspect. Will be stored temporarily during -// processing. -message HybridContentItem { - // The item to inspect. - ContentItem item = 1; - - // Supplementary information that will be added to each finding. - HybridFindingDetails finding_details = 2; -} - -// Populate to associate additional data with each finding. -message HybridFindingDetails { - // Details about the container where the content being inspected is from. - Container container_details = 1; - - // Offset in bytes of the line, from the beginning of the file, where the - // finding is located. Populate if the item being scanned is only part of a - // bigger item, such as a shard of a file and you want to track the absolute - // position of the finding. - int64 file_offset = 2; - - // Offset of the row for tables. Populate if the row(s) being scanned are - // part of a bigger dataset and you want to keep track of their absolute - // position. - int64 row_offset = 3; - - // If the container is a table, additional information to make findings - // meaningful such as the columns that are primary keys. If not known ahead - // of time, can also be set within each inspect hybrid call and the two - // will be merged. Note that identifying_fields will only be stored to - // BigQuery, and only if the BigQuery action has been included. - TableOptions table_options = 4; - - // Labels to represent user provided metadata about the data being inspected. - // If configured by the job, some key values may be required. - // The labels associated with `Finding`'s produced by hybrid - // inspection. - // - // Label keys must be between 1 and 63 characters long and must conform - // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - // - // Label values must be between 0 and 63 characters long and must conform - // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. - // - // No more than 10 labels can be associated with a given finding. - // - // Examples: - // * `"environment" : "production"` - // * `"pipeline" : "etl"` - map labels = 5; -} - -// Quota exceeded errors will be thrown once quota has been met. -message HybridInspectResponse { - -} - -// Operators available for comparing the value of fields. -enum RelationalOperator { - // Unused - RELATIONAL_OPERATOR_UNSPECIFIED = 0; - - // Equal. Attempts to match even with incompatible types. - EQUAL_TO = 1; - - // Not equal to. Attempts to match even with incompatible types. - NOT_EQUAL_TO = 2; - - // Greater than. - GREATER_THAN = 3; - - // Less than. - LESS_THAN = 4; - - // Greater than or equals. - GREATER_THAN_OR_EQUALS = 5; - - // Less than or equals. - LESS_THAN_OR_EQUALS = 6; - - // Exists - EXISTS = 7; -} - -// Type of the match which can be applied to different ways of matching, like -// Dictionary, regular expression and intersecting with findings of another -// info type. -enum MatchingType { - // Invalid. - MATCHING_TYPE_UNSPECIFIED = 0; - - // Full match. - // - // - Dictionary: join of Dictionary results matched complete finding quote - // - Regex: all regex matches fill a finding quote start to end - // - Exclude info type: completely inside affecting info types findings - MATCHING_TYPE_FULL_MATCH = 1; - - // Partial match. - // - // - Dictionary: at least one of the tokens in the finding matches - // - Regex: substring of the finding matches - // - Exclude info type: intersects with affecting info types findings - MATCHING_TYPE_PARTIAL_MATCH = 2; - - // Inverse match. - // - // - Dictionary: no tokens in the finding match the dictionary - // - Regex: finding doesn't match the regex - // - Exclude info type: no intersection with affecting info types findings - MATCHING_TYPE_INVERSE_MATCH = 3; -} - -// Deprecated and unused. -enum ContentOption { - // Includes entire content of a file or a data stream. - CONTENT_UNSPECIFIED = 0; - - // Text content within the data, excluding any metadata. - CONTENT_TEXT = 1; - - // Images found in the data. - CONTENT_IMAGE = 2; -} - -// Type of metadata containing the finding. -enum MetadataType { - // Unused - METADATATYPE_UNSPECIFIED = 0; - - // General file metadata provided by Cloud Storage. - STORAGE_METADATA = 2; -} - -// Parts of the APIs which use certain infoTypes. -enum InfoTypeSupportedBy { - // Unused. - ENUM_TYPE_UNSPECIFIED = 0; - - // Supported by the inspect operations. - INSPECT = 1; - - // Supported by the risk analysis operations. - RISK_ANALYSIS = 2; -} - -// An enum to represent the various types of DLP jobs. -enum DlpJobType { - // Defaults to INSPECT_JOB. - DLP_JOB_TYPE_UNSPECIFIED = 0; - - // The job inspected Google Cloud for sensitive data. - INSPECT_JOB = 1; - - // The job executed a Risk Analysis computation. - RISK_ANALYSIS_JOB = 2; -} - -// State of a StoredInfoType version. -enum StoredInfoTypeState { - // Unused - STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; - - // StoredInfoType version is being created. - PENDING = 1; - - // StoredInfoType version is ready for use. - READY = 2; - - // StoredInfoType creation failed. All relevant error messages are returned in - // the `StoredInfoTypeVersion` message. - FAILED = 3; - - // StoredInfoType is no longer valid because artifacts stored in - // user-controlled storage were modified. To fix an invalid StoredInfoType, - // use the `UpdateStoredInfoType` method to create a new version. - INVALID = 4; -} - -// Score is a summary of all elements in the data profile. -// A higher number means more risk. -message DataRiskLevel { - // Various score levels for resources. - enum DataRiskLevelScore { - // Unused. - RISK_SCORE_UNSPECIFIED = 0; - - // Low risk - Lower indication of sensitive data that appears to have - // additional access restrictions in place or no indication of sensitive - // data found. - RISK_LOW = 10; - - // Medium risk - Sensitive data may be present but additional access or fine - // grain access restrictions appear to be present. Consider limiting - // access even further or transform data to mask. - RISK_MODERATE = 20; - - // High risk – SPII may be present. Access controls may include public - // ACLs. Exfiltration of data may lead to user data loss. Re-identification - // of users may be possible. Consider limiting usage and or removing SPII. - RISK_HIGH = 30; - } - - // The score applied to the resource. - DataRiskLevelScore score = 1; -} - -// How broadly a resource has been shared. New items may be added over time. -// A higher number means more restricted. -enum ResourceVisibility { - // Unused. - RESOURCE_VISIBILITY_UNSPECIFIED = 0; - - // Visible to any user. - RESOURCE_VISIBILITY_PUBLIC = 10; - - // Visible only to specific users. - RESOURCE_VISIBILITY_RESTRICTED = 20; -} - -// Snapshot of the configurations used to generate the profile. -message DataProfileConfigSnapshot { - // A copy of the inspection config used to generate this profile. This - // is a copy of the inspect_template specified in `DataProfileJobConfig`. - InspectConfig inspect_config = 2; - - // A copy of the configuration used to generate this profile. - DataProfileJobConfig data_profile_job = 3; -} - -// The profile for a scanned table. -message TableDataProfile { - // Possible states of a profile. New items may be added. - enum State { - // Unused. - STATE_UNSPECIFIED = 0; - - // The profile is currently running. Once a profile has finished it will - // transition to DONE. - RUNNING = 1; - - // The profile is no longer generating. - // If profile_status.status.code is 0, the profile succeeded, otherwise, it - // failed. - DONE = 2; - } - - // The name of the profile. - string name = 1; - - // The resource name to the project data profile for this table. - string project_data_profile = 2; - - // The GCP project ID that owns the BigQuery dataset. - string dataset_project_id = 24; - - // The BigQuery location where the dataset's data is stored. - // See https://cloud.google.com/bigquery/docs/locations for supported - // locations. - string dataset_location = 29; - - // The BigQuery dataset ID. - string dataset_id = 25; - - // The BigQuery table ID. - string table_id = 26; - - // The resource name of the table. - // https://cloud.google.com/apis/design/resource_names#full_resource_name - string full_resource = 3; - - // Success or error status from the most recent profile generation attempt. - // May be empty if the profile is still being generated. - ProfileStatus profile_status = 21; - - // State of a profile. - State state = 22; - - // The sensitivity score of this table. - SensitivityScore sensitivity_score = 5; - - // The data risk level of this table. - DataRiskLevel data_risk_level = 6; - - // The infoTypes predicted from this table's data. - repeated InfoTypeSummary predicted_info_types = 27; - - // Other infoTypes found in this table's data. - repeated OtherInfoTypeSummary other_info_types = 28; - - // The snapshot of the configurations used to generate the profile. - DataProfileConfigSnapshot config_snapshot = 7; - - // The time when this table was last modified - google.protobuf.Timestamp last_modified_time = 8; - - // Optional. The time when this table expires. - google.protobuf.Timestamp expiration_time = 9; - - // The number of columns profiled in the table. - int64 scanned_column_count = 10; - - // The number of columns skipped in the table because of an error. - int64 failed_column_count = 11; - - // The size of the table when the profile was generated. - int64 table_size_bytes = 12; - - // Number of rows in the table when the profile was generated. - int64 row_count = 13; - - // How the table is encrypted. - EncryptionStatus encryption_status = 14; - - // How broadly a resource has been shared. - ResourceVisibility resource_visibility = 15; - - // The last time the profile was generated. - google.protobuf.Timestamp profile_last_generated = 16; - - // The labels applied to the resource at the time the profile was generated. - map resource_labels = 17; - - // The time at which the table was created. - google.protobuf.Timestamp create_time = 23; -} - -message ProfileStatus { - // Profiling status code and optional message - google.rpc.Status status = 1; - - // Time when the profile generation status was updated - google.protobuf.Timestamp timestamp = 3; -} - -// How a resource is encrypted. -enum EncryptionStatus { - // Unused. - ENCRYPTION_STATUS_UNSPECIFIED = 0; - - // Google manages server-side encryption keys on your behalf. - ENCRYPTION_GOOGLE_MANAGED = 1; - - // Customer provides the key. - ENCRYPTION_CUSTOMER_MANAGED = 2; -} - -// The infoType details for this column. -message InfoTypeSummary { - // The infoType. - InfoType info_type = 1; - - // Approximate percentage of non-null rows that contained data detected by - // this infotype. - int32 estimated_prevalence = 2; -} - -// Infotype details for other infoTypes found within a column. -message OtherInfoTypeSummary { - // The other infoType. - InfoType info_type = 1; - - // Approximate percentage of non-null rows that contained data detected by - // this infotype. - int32 estimated_prevalence = 2; -} - -// A condition for determining whether a Pub/Sub should be triggered. -message DataProfilePubSubCondition { - // Various score levels for resources. - enum ProfileScoreBucket { - // Unused. - PROFILE_SCORE_BUCKET_UNSPECIFIED = 0; - - // High risk/sensitivity detected. - HIGH = 1; - - // Medium or high risk/sensitivity detected. - MEDIUM_OR_HIGH = 2; - } - - // A condition consisting of a value. - message PubSubCondition { - // The value for the condition to trigger. - oneof value { - // The minimum data risk score that triggers the condition. - ProfileScoreBucket minimum_risk_score = 1; - - // The minimum sensitivity level that triggers the condition. - ProfileScoreBucket minimum_sensitivity_score = 2; - } - } - - // An expression, consisting of an operator and conditions. - message PubSubExpressions { - // Logical operators for conditional checks. - enum PubSubLogicalOperator { - // Unused. - LOGICAL_OPERATOR_UNSPECIFIED = 0; - - // Conditional OR. - OR = 1; - - // Conditional AND. - AND = 2; - } - - // The operator to apply to the collection of conditions. - PubSubLogicalOperator logical_operator = 1; - - // Conditions to apply to the expression. - repeated PubSubCondition conditions = 2; - } - - // An expression. - PubSubExpressions expressions = 1; -} - -// Pub/Sub topic message for a DataProfileAction.PubSubNotification event. -// To receive a message of protocol buffer schema type, convert the message data -// to an object of this proto class. -message DataProfilePubSubMessage { - // If `DetailLevel` is `TABLE_PROFILE` this will be fully populated. - // Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and - // `full_resource` will be populated. - TableDataProfile profile = 1; - - // The event that caused the Pub/Sub message to be sent. - DataProfileAction.EventType event = 2; -} diff --git a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto b/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto deleted file mode 100644 index 7709f546be5b..000000000000 --- a/owl-bot-staging/java-dlp/v2/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto +++ /dev/null @@ -1,808 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.privacy.dlp.v2; - -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Dlp.V2"; -option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp"; -option java_multiple_files = true; -option java_outer_classname = "DlpStorage"; -option java_package = "com.google.privacy.dlp.v2"; -option php_namespace = "Google\\Cloud\\Dlp\\V2"; -option ruby_package = "Google::Cloud::Dlp::V2"; - -// Type of information detected by the API. -message InfoType { - // Name of the information type. Either a name of your choosing when - // creating a CustomInfoType, or one of the names listed - // at https://cloud.google.com/dlp/docs/infotypes-reference when specifying - // a built-in type. When sending Cloud DLP results to Data Catalog, infoType - // names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`. - string name = 1; - - // Optional version name for this InfoType. - string version = 2; -} - -// Score is a summary of all elements in the data profile. -// A higher number means more sensitive. -message SensitivityScore { - // Various score levels for resources. - enum SensitivityScoreLevel { - // Unused. - SENSITIVITY_SCORE_UNSPECIFIED = 0; - - // No sensitive information detected. Limited access. - SENSITIVITY_LOW = 10; - - // Medium risk - PII, potentially sensitive data, or fields with free-text - // data that are at higher risk of having intermittent sensitive data. - // Consider limiting access. - SENSITIVITY_MODERATE = 20; - - // High risk – SPII may be present. Exfiltration of data may lead to user - // data loss. Re-identification of users may be possible. Consider limiting - // usage and or removing SPII. - SENSITIVITY_HIGH = 30; - } - - // The score applied to the resource. - SensitivityScoreLevel score = 1; -} - -// Categorization of results based on how likely they are to represent a match, -// based on the number of elements they contain which imply a match. -enum Likelihood { - // Default value; same as POSSIBLE. - LIKELIHOOD_UNSPECIFIED = 0; - - // Few matching elements. - VERY_UNLIKELY = 1; - - UNLIKELY = 2; - - // Some matching elements. - POSSIBLE = 3; - - LIKELY = 4; - - // Many matching elements. - VERY_LIKELY = 5; -} - -// A reference to a StoredInfoType to use with scanning. -message StoredType { - // Resource name of the requested `StoredInfoType`, for example - // `organizations/433245324/storedInfoTypes/432452342` or - // `projects/project-id/storedInfoTypes/432452342`. - string name = 1; - - // Timestamp indicating when the version of the `StoredInfoType` used for - // inspection was created. Output-only field, populated by the system. - google.protobuf.Timestamp create_time = 2; -} - -// Custom information type provided by the user. Used to find domain-specific -// sensitive information configurable to the data in question. -message CustomInfoType { - // Custom information type based on a dictionary of words or phrases. This can - // be used to match sensitive information specific to the data, such as a list - // of employee IDs or job titles. - // - // Dictionary words are case-insensitive and all characters other than letters - // and digits in the unicode [Basic Multilingual - // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) - // will be replaced with whitespace when scanning for matches, so the - // dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", - // "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters - // surrounding any match must be of a different type than the adjacent - // characters within the word, so letters must be next to non-letters and - // digits next to non-digits. For example, the dictionary word "jen" will - // match the first three letters of the text "jen123" but will return no - // matches for "jennifer". - // - // Dictionary words containing a large number of characters that are not - // letters or digits may result in unexpected findings because such characters - // are treated as whitespace. The - // [limits](https://cloud.google.com/dlp/limits) page contains details about - // the size limits of dictionaries. For dictionaries that do not fit within - // these constraints, consider using `LargeCustomDictionaryConfig` in the - // `StoredInfoType` API. - message Dictionary { - // Message defining a list of words or phrases to search for in the data. - message WordList { - // Words or phrases defining the dictionary. The dictionary must contain - // at least one phrase and every phrase must contain at least 2 characters - // that are letters or digits. [required] - repeated string words = 1; - } - - oneof source { - // List of words or phrases to search for. - WordList word_list = 1; - - // Newline-delimited file of words in Cloud Storage. Only a single file - // is accepted. - CloudStoragePath cloud_storage_path = 3; - } - } - - // Message defining a custom regular expression. - message Regex { - // Pattern defining the regular expression. Its syntax - // (https://github.com/google/re2/wiki/Syntax) can be found under the - // google/re2 repository on GitHub. - string pattern = 1; - - // The index of the submatch to extract as findings. When not - // specified, the entire match is returned. No more than 3 may be included. - repeated int32 group_indexes = 2; - } - - // Message for detecting output from deidentification transformations - // such as - // [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). - // These types of transformations are - // those that perform pseudonymization, thereby producing a "surrogate" as - // output. This should be used in conjunction with a field on the - // transformation such as `surrogate_info_type`. This CustomInfoType does - // not support the use of `detection_rules`. - message SurrogateType { - - } - - // Deprecated; use `InspectionRuleSet` instead. Rule for modifying a - // `CustomInfoType` to alter behavior under certain circumstances, depending - // on the specific details of the rule. Not supported for the `surrogate_type` - // custom infoType. - message DetectionRule { - // Message for specifying a window around a finding to apply a detection - // rule. - message Proximity { - // Number of characters before the finding to consider. For tabular data, - // if you want to modify the likelihood of an entire column of findngs, - // set this to 1. For more information, see - // [Hotword example: Set the match likelihood of a table column] - // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). - int32 window_before = 1; - - // Number of characters after the finding to consider. - int32 window_after = 2; - } - - // Message for specifying an adjustment to the likelihood of a finding as - // part of a detection rule. - message LikelihoodAdjustment { - oneof adjustment { - // Set the likelihood of a finding to a fixed value. - Likelihood fixed_likelihood = 1; - - // Increase or decrease the likelihood by the specified number of - // levels. For example, if a finding would be `POSSIBLE` without the - // detection rule and `relative_likelihood` is 1, then it is upgraded to - // `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. - // Likelihood may never drop below `VERY_UNLIKELY` or exceed - // `VERY_LIKELY`, so applying an adjustment of 1 followed by an - // adjustment of -1 when base likelihood is `VERY_LIKELY` will result in - // a final likelihood of `LIKELY`. - int32 relative_likelihood = 2; - } - } - - // The rule that adjusts the likelihood of findings within a certain - // proximity of hotwords. - message HotwordRule { - // Regular expression pattern defining what qualifies as a hotword. - Regex hotword_regex = 1; - - // Range of characters within which the entire hotword must reside. - // The total length of the window cannot exceed 1000 characters. - // The finding itself will be included in the window, so that hotwords can - // be used to match substrings of the finding itself. Suppose you - // want Cloud DLP to promote the likelihood of the phone number - // regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the - // area code of a company's office. In this case, use the hotword regex - // "\(xxx\)", where "xxx" is the area code in question. - // - // For tabular data, if you want to modify the likelihood of an entire - // column of findngs, see - // [Hotword example: Set the match likelihood of a table column] - // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). - Proximity proximity = 2; - - // Likelihood adjustment to apply to all matching findings. - LikelihoodAdjustment likelihood_adjustment = 3; - } - - oneof type { - // Hotword-based detection rule. - HotwordRule hotword_rule = 1; - } - } - - enum ExclusionType { - // A finding of this custom info type will not be excluded from results. - EXCLUSION_TYPE_UNSPECIFIED = 0; - - // A finding of this custom info type will be excluded from final results, - // but can still affect rule execution. - EXCLUSION_TYPE_EXCLUDE = 1; - } - - // CustomInfoType can either be a new infoType, or an extension of built-in - // infoType, when the name matches one of existing infoTypes and that infoType - // is specified in `InspectContent.info_types` field. Specifying the latter - // adds findings to the one detected by the system. If built-in info type is - // not specified in `InspectContent.info_types` list then the name is treated - // as a custom info type. - InfoType info_type = 1; - - // Likelihood to return for this CustomInfoType. This base value can be - // altered by a detection rule if the finding meets the criteria specified by - // the rule. Defaults to `VERY_LIKELY` if not specified. - Likelihood likelihood = 6; - - oneof type { - // A list of phrases to detect as a CustomInfoType. - Dictionary dictionary = 2; - - // Regular expression based CustomInfoType. - Regex regex = 3; - - // Message for detecting output from deidentification transformations that - // support reversing. - SurrogateType surrogate_type = 4; - - // Load an existing `StoredInfoType` resource for use in - // `InspectDataSource`. Not currently supported in `InspectContent`. - StoredType stored_type = 5; - } - - // Set of detection rules to apply to all findings of this CustomInfoType. - // Rules are applied in order that they are specified. Not supported for the - // `surrogate_type` CustomInfoType. - repeated DetectionRule detection_rules = 7; - - // If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding - // to be returned. It still can be used for rules matching. - ExclusionType exclusion_type = 8; -} - -// General identifier of a data field in a storage service. -message FieldId { - // Name describing the field. - string name = 1; -} - -// Datastore partition ID. -// A partition ID identifies a grouping of entities. The grouping is always -// by project and namespace, however the namespace ID may be empty. -// -// A partition ID contains several dimensions: -// project ID and namespace ID. -message PartitionId { - // The ID of the project to which the entities belong. - string project_id = 2; - - // If not empty, the ID of the namespace to which the entities belong. - string namespace_id = 4; -} - -// A representation of a Datastore kind. -message KindExpression { - // The name of the kind. - string name = 1; -} - -// Options defining a data set within Google Cloud Datastore. -message DatastoreOptions { - // A partition ID identifies a grouping of entities. The grouping is always - // by project and namespace, however the namespace ID may be empty. - PartitionId partition_id = 1; - - // The kind to process. - KindExpression kind = 2; -} - -// Definitions of file type groups to scan. New types will be added to this -// list. -enum FileType { - // Includes all files. - FILE_TYPE_UNSPECIFIED = 0; - - // Includes all file extensions not covered by another entry. Binary - // scanning attempts to convert the content of the file to utf_8 to scan - // the file. - // If you wish to avoid this fall back, specify one or more of the other - // FileType's in your storage scan. - BINARY_FILE = 1; - - // Included file extensions: - // asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart, - // dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm, - // mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht, - // properties, py, pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex, - // shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md, - // txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml. - TEXT_FILE = 2; - - // Included file extensions: - // bmp, gif, jpg, jpeg, jpe, png. - // bytes_limit_per_file has no effect on image files. - // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'. - IMAGE = 3; - - // Word files >30 MB will be scanned as binary files. - // Included file extensions: - // docx, dotx, docm, dotm - WORD = 5; - - // PDF files >30 MB will be scanned as binary files. - // Included file extensions: - // pdf - PDF = 6; - - // Included file extensions: - // avro - AVRO = 7; - - // Included file extensions: - // csv - CSV = 8; - - // Included file extensions: - // tsv - TSV = 9; - - // Powerpoint files >30 MB will be scanned as binary files. - // Included file extensions: - // pptx, pptm, potx, potm, pot - POWERPOINT = 11; - - // Excel files >30 MB will be scanned as binary files. - // Included file extensions: - // xlsx, xlsm, xltx, xltm - EXCEL = 12; -} - -// Message representing a set of files in a Cloud Storage bucket. Regular -// expressions are used to allow fine-grained control over which files in the -// bucket to include. -// -// Included files are those that match at least one item in `include_regex` and -// do not match any items in `exclude_regex`. Note that a file that matches -// items from both lists will _not_ be included. For a match to occur, the -// entire file path (i.e., everything in the url after the bucket name) must -// match the regular expression. -// -// For example, given the input `{bucket_name: "mybucket", include_regex: -// ["directory1/.*"], exclude_regex: -// ["directory1/excluded.*"]}`: -// -// * `gs://mybucket/directory1/myfile` will be included -// * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches -// across `/`) -// * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the -// full path doesn't match any items in `include_regex`) -// * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path -// matches an item in `exclude_regex`) -// -// If `include_regex` is left empty, it will match all files by default -// (this is equivalent to setting `include_regex: [".*"]`). -// -// Some other common use cases: -// -// * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all -// files in `mybucket` except for .pdf files -// * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will -// include all files directly under `gs://mybucket/directory/`, without matching -// across `/` -message CloudStorageRegexFileSet { - // The name of a Cloud Storage bucket. Required. - string bucket_name = 1; - - // A list of regular expressions matching file paths to include. All files in - // the bucket that match at least one of these regular expressions will be - // included in the set of files, except for those that also match an item in - // `exclude_regex`. Leaving this field empty will match all files by default - // (this is equivalent to including `.*` in the list). - // - // Regular expressions use RE2 - // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found - // under the google/re2 repository on GitHub. - repeated string include_regex = 2; - - // A list of regular expressions matching file paths to exclude. All files in - // the bucket that match at least one of these regular expressions will be - // excluded from the scan. - // - // Regular expressions use RE2 - // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found - // under the google/re2 repository on GitHub. - repeated string exclude_regex = 3; -} - -// Options defining a file or a set of files within a Cloud Storage -// bucket. -message CloudStorageOptions { - // Set of files to scan. - message FileSet { - // The Cloud Storage url of the file(s) to scan, in the format - // `gs:///`. Trailing wildcard in the path is allowed. - // - // If the url ends in a trailing slash, the bucket or directory represented - // by the url will be scanned non-recursively (content in sub-directories - // will not be scanned). This means that `gs://mybucket/` is equivalent to - // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to - // `gs://mybucket/directory/*`. - // - // Exactly one of `url` or `regex_file_set` must be set. - string url = 1; - - // The regex-filtered set of files to scan. Exactly one of `url` or - // `regex_file_set` must be set. - CloudStorageRegexFileSet regex_file_set = 2; - } - - // How to sample bytes if not all bytes are scanned. Meaningful only when used - // in conjunction with bytes_limit_per_file. If not specified, scanning would - // start from the top. - enum SampleMethod { - SAMPLE_METHOD_UNSPECIFIED = 0; - - // Scan from the top (default). - TOP = 1; - - // For each file larger than bytes_limit_per_file, randomly pick the offset - // to start scanning. The scanned bytes are contiguous. - RANDOM_START = 2; - } - - // The set of one or more files to scan. - FileSet file_set = 1; - - // Max number of bytes to scan from a file. If a scanned file's size is bigger - // than this value then the rest of the bytes are omitted. Only one - // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. - // Cannot be set if de-identification is requested. - int64 bytes_limit_per_file = 4; - - // Max percentage of bytes to scan from a file. The rest are omitted. The - // number of bytes scanned is rounded down. Must be between 0 and 100, - // inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one - // of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. - // Cannot be set if de-identification is requested. - int32 bytes_limit_per_file_percent = 8; - - // List of file type groups to include in the scan. - // 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'. - repeated FileType file_types = 5; - - SampleMethod sample_method = 6; - - // Limits the number of files to scan to this percentage of the input FileSet. - // Number of files scanned is rounded down. Must be between 0 and 100, - // inclusively. Both 0 and 100 means no limit. Defaults to 0. - int32 files_limit_percent = 7; -} - -// Message representing a set of files in Cloud Storage. -message CloudStorageFileSet { - // The url, in the format `gs:///`. Trailing wildcard in the - // path is allowed. - string url = 1; -} - -// Message representing a single file or path in Cloud Storage. -message CloudStoragePath { - // A url representing a file or path (no wildcards) in Cloud Storage. - // Example: gs://[BUCKET_NAME]/dictionary.txt - string path = 1; -} - -// Options defining BigQuery table and row identifiers. -message BigQueryOptions { - // How to sample rows if not all rows are scanned. Meaningful only when used - // in conjunction with either rows_limit or rows_limit_percent. If not - // specified, rows are scanned in the order BigQuery reads them. - enum SampleMethod { - SAMPLE_METHOD_UNSPECIFIED = 0; - - // Scan groups of rows in the order BigQuery provides (default). Multiple - // groups of rows may be scanned in parallel, so results may not appear in - // the same order the rows are read. - TOP = 1; - - // Randomly pick groups of rows to scan. - RANDOM_START = 2; - } - - // Complete BigQuery table reference. - BigQueryTable table_reference = 1; - - // Table fields that may uniquely identify a row within the table. When - // `actions.saveFindings.outputConfig.table` is specified, the values of - // columns specified here are available in the output table under - // `location.content_locations.record_location.record_key.id_values`. Nested - // fields such as `person.birthdate.year` are allowed. - repeated FieldId identifying_fields = 2; - - // Max number of rows to scan. If the table has more rows than this value, the - // rest of the rows are omitted. If not set, or if set to 0, all rows will be - // scanned. Only one of rows_limit and rows_limit_percent can be specified. - // Cannot be used in conjunction with TimespanConfig. - int64 rows_limit = 3; - - // Max percentage of rows to scan. The rest are omitted. The number of rows - // scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and - // 100 means no limit. Defaults to 0. Only one of rows_limit and - // rows_limit_percent can be specified. Cannot be used in conjunction with - // TimespanConfig. - int32 rows_limit_percent = 6; - - SampleMethod sample_method = 4; - - // References to fields excluded from scanning. This allows you to skip - // inspection of entire columns which you know have no findings. - repeated FieldId excluded_fields = 5; - - // Limit scanning only to these fields. - repeated FieldId included_fields = 7; -} - -// Shared message indicating Cloud storage type. -message StorageConfig { - // Configuration of the timespan of the items to include in scanning. - // Currently only supported when inspecting Cloud Storage and BigQuery. - message TimespanConfig { - // Exclude files, tables, or rows older than this value. - // If not set, no lower time limit is applied. - google.protobuf.Timestamp start_time = 1; - - // Exclude files, tables, or rows newer than this value. - // If not set, no upper time limit is applied. - google.protobuf.Timestamp end_time = 2; - - // Specification of the field containing the timestamp of scanned items. - // Used for data sources like Datastore and BigQuery. - // - // For BigQuery - // - // If this value is not specified and the table was modified between the - // given start and end times, the entire table will be scanned. If this - // value is specified, then rows are filtered based on the given start and - // end times. Rows with a `NULL` value in the provided BigQuery column are - // skipped. - // Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, - // `TIMESTAMP`, and `DATETIME`. - // - // If your BigQuery table is [partitioned at ingestion - // time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), - // you can use any of the following pseudo-columns as your timestamp field. - // When used with Cloud DLP, these pseudo-column names are case sensitive. - // - //
    - //
  • _PARTITIONTIME
  • - //
  • _PARTITIONDATE
  • - //
  • _PARTITION_LOAD_TIME
  • - //
- // - // For Datastore - // - // If this value is specified, then entities are filtered based on the given - // start and end times. If an entity does not contain the provided timestamp - // property or contains empty or invalid values, then it is included. - // Valid data types of the provided timestamp property are: `TIMESTAMP`. - // - // See the - // [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-timespan) - // related to this operation. - FieldId timestamp_field = 3; - - // When the job is started by a JobTrigger we will automatically figure out - // a valid start_time to avoid scanning files that have not been modified - // since the last time the JobTrigger executed. This will be based on the - // time of the execution of the last run of the JobTrigger or the timespan - // end_time used in the last run of the JobTrigger. - bool enable_auto_population_of_timespan_config = 4; - } - - oneof type { - // Google Cloud Datastore options. - DatastoreOptions datastore_options = 2; - - // Cloud Storage options. - CloudStorageOptions cloud_storage_options = 3; - - // BigQuery options. - BigQueryOptions big_query_options = 4; - - // Hybrid inspection options. - HybridOptions hybrid_options = 9; - } - - TimespanConfig timespan_config = 6; -} - -// Configuration to control jobs where the content being inspected is outside -// of Google Cloud Platform. -message HybridOptions { - // A short description of where the data is coming from. Will be stored once - // in the job. 256 max length. - string description = 1; - - // These are labels that each inspection request must include within their - // 'finding_labels' map. Request may contain others, but any missing one of - // these will be rejected. - // - // Label keys must be between 1 and 63 characters long and must conform - // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - // - // No more than 10 keys can be required. - repeated string required_finding_label_keys = 2; - - // To organize findings, these labels will be added to each finding. - // - // Label keys must be between 1 and 63 characters long and must conform - // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - // - // Label values must be between 0 and 63 characters long and must conform - // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. - // - // No more than 10 labels can be associated with a given finding. - // - // Examples: - // * `"environment" : "production"` - // * `"pipeline" : "etl"` - map labels = 3; - - // If the container is a table, additional information to make findings - // meaningful such as the columns that are primary keys. - TableOptions table_options = 4; -} - -// Row key for identifying a record in BigQuery table. -message BigQueryKey { - // Complete BigQuery table reference. - BigQueryTable table_reference = 1; - - // Row number inferred at the time the table was scanned. This value is - // nondeterministic, cannot be queried, and may be null for inspection - // jobs. To locate findings within a table, specify - // `inspect_job.storage_config.big_query_options.identifying_fields` in - // `CreateDlpJobRequest`. - int64 row_number = 2; -} - -// Record key for a finding in Cloud Datastore. -message DatastoreKey { - // Datastore entity key. - Key entity_key = 1; -} - -// A unique identifier for a Datastore entity. -// If a key's partition ID or any of its path kinds or names are -// reserved/read-only, the key is reserved/read-only. -// A reserved/read-only key is forbidden in certain documented contexts. -message Key { - // A (kind, ID/name) pair used to construct a key path. - // - // If either name or ID is set, the element is complete. - // If neither is set, the element is incomplete. - message PathElement { - // The kind of the entity. - // A kind matching regex `__.*__` is reserved/read-only. - // A kind must not contain more than 1500 bytes when UTF-8 encoded. - // Cannot be `""`. - string kind = 1; - - // The type of ID. - oneof id_type { - // The auto-allocated ID of the entity. - // Never equal to zero. Values less than zero are discouraged and may not - // be supported in the future. - int64 id = 2; - - // The name of the entity. - // A name matching regex `__.*__` is reserved/read-only. - // A name must not be more than 1500 bytes when UTF-8 encoded. - // Cannot be `""`. - string name = 3; - } - } - - // Entities are partitioned into subsets, currently identified by a project - // ID and namespace ID. - // Queries are scoped to a single partition. - PartitionId partition_id = 1; - - // The entity path. - // An entity path consists of one or more elements composed of a kind and a - // string or numerical identifier, which identify entities. The first - // element identifies a _root entity_, the second element identifies - // a _child_ of the root entity, the third element identifies a child of the - // second entity, and so forth. The entities identified by all prefixes of - // the path are called the element's _ancestors_. - // - // A path can never be empty, and a path can have at most 100 elements. - repeated PathElement path = 2; -} - -// Message for a unique key indicating a record that contains a finding. -message RecordKey { - oneof type { - DatastoreKey datastore_key = 2; - - BigQueryKey big_query_key = 3; - } - - // Values of identifying columns in the given row. Order of values matches - // the order of `identifying_fields` specified in the scanning request. - repeated string id_values = 5; -} - -// Message defining the location of a BigQuery table. A table is uniquely -// identified by its project_id, dataset_id, and table_name. Within a query -// a table is often referenced with a string in the format of: -// `:.` or -// `..`. -message BigQueryTable { - // The Google Cloud Platform project ID of the project containing the table. - // If omitted, project ID is inferred from the API call. - string project_id = 1; - - // Dataset ID of the table. - string dataset_id = 2; - - // Name of the table. - string table_id = 3; -} - -// Message defining a field of a BigQuery table. -message BigQueryField { - // Source table of the field. - BigQueryTable table = 1; - - // Designated field in the BigQuery table. - FieldId field = 2; -} - -// An entity in a dataset is a field or set of fields that correspond to a -// single person. For example, in medical records the `EntityId` might be a -// patient identifier, or for financial records it might be an account -// identifier. This message is used when generalizations or analysis must take -// into account that multiple rows correspond to the same entity. -message EntityId { - // Composite key indicating which field contains the entity identifier. - FieldId field = 1; -} - -// Instructions regarding the table content being inspected. -message TableOptions { - // The columns that are the primary keys for table objects included in - // ContentItem. A copy of this cell's value will stored alongside alongside - // each finding so that the finding can be traced to the specific row it came - // from. No more than 3 may be provided. - repeated FieldId identifying_fields = 1; -}